@linzjs/step-ag-grid 17.7.0 → 17.9.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 (44) hide show
  1. package/dist/src/components/Grid.d.ts +1 -0
  2. package/dist/src/components/GridNoRowsOverlay.d.ts +3 -1
  3. package/dist/src/contexts/GridContext.d.ts +1 -0
  4. package/dist/step-ag-grid.cjs.js +1115 -706
  5. package/dist/step-ag-grid.cjs.js.map +1 -1
  6. package/dist/step-ag-grid.esm.js +1117 -708
  7. package/dist/step-ag-grid.esm.js.map +1 -1
  8. package/package.json +47 -46
  9. package/src/components/Grid.tsx +42 -22
  10. package/src/components/GridNoRowsOverlay.tsx +27 -3
  11. package/src/contexts/GridContext.tsx +4 -0
  12. package/src/contexts/GridContextProvider.tsx +5 -0
  13. package/src/stories/components/ActionButton.stories.tsx +3 -3
  14. package/src/stories/grid/GridDragRow.stories.tsx +3 -3
  15. package/src/stories/grid/GridFilterButtons.stories.tsx +3 -3
  16. package/src/stories/grid/GridNoRowsOverlay.stories.tsx +3 -3
  17. package/src/stories/grid/GridNonEditableRow.stories.tsx +3 -3
  18. package/src/stories/grid/GridPopoutContextMenu.stories.tsx +3 -3
  19. package/src/stories/grid/GridPopoutEditGeneric.stories.tsx +3 -3
  20. package/src/stories/grid/GridPopoutEditGenericTextArea.stories.tsx +3 -3
  21. package/src/stories/grid/GridPopoverEditBearing.stories.tsx +3 -3
  22. package/src/stories/grid/GridPopoverEditDropDown.stories.tsx +3 -3
  23. package/src/stories/grid/GridPopoverEditMultiSelect.stories.tsx +3 -3
  24. package/src/stories/grid/GridPopoverEditMultiSelectGrid.stories.tsx +3 -3
  25. package/src/stories/grid/GridReadOnly.stories.tsx +26 -8
  26. package/src/stories/grid/gridFormInteraction/GridFormDropDownInteraction.stories.tsx +3 -3
  27. package/src/stories/grid/gridFormInteraction/GridFormEditBearingCorrectionInteraction.stories.tsx +3 -3
  28. package/src/stories/grid/gridFormInteraction/GridFormEditBearingInteraction.stories.tsx +3 -3
  29. package/src/stories/grid/gridFormInteraction/GridFormMultiSelectGridInteraction.stories.tsx +3 -3
  30. package/src/stories/grid/gridFormInteraction/GridFormMultiSelectInteraction.stories.tsx +3 -3
  31. package/src/stories/grid/gridFormInteraction/GridFormPopoverMenuInteraction.stories.tsx +3 -3
  32. package/src/stories/grid/gridFormInteraction/GridFormTextAreaInteraction.stories.tsx +3 -3
  33. package/src/stories/grid/gridFormInteraction/GridFormTextInputInteraction.stories.tsx +3 -3
  34. package/src/stories/grid/gridFormStatic/GridFormDropDown.stories.tsx +3 -3
  35. package/src/stories/grid/gridFormStatic/GridFormEditBearing.stories.tsx +3 -3
  36. package/src/stories/grid/gridFormStatic/GridFormEditBearingCorrection.stories.tsx +3 -3
  37. package/src/stories/grid/gridFormStatic/GridFormMessage.stories.tsx +3 -3
  38. package/src/stories/grid/gridFormStatic/GridFormMultiSelect.stories.tsx +3 -3
  39. package/src/stories/grid/gridFormStatic/GridFormPopoverMenu.stories.tsx +3 -3
  40. package/src/stories/grid/gridFormStatic/GridFormTextArea.stories.tsx +3 -3
  41. package/src/stories/grid/gridFormStatic/GridFormTextInput.stories.tsx +3 -3
  42. package/src/stories/grid/interactions/GridKeyboardInteractions.stories.tsx +3 -3
  43. package/src/stories/react-menu/ReactMenu.stories.tsx +3 -3
  44. package/dist/node_modules/@linzjs/lui/dist/assets/svg-content.d.ts +0 -7
@@ -28,6 +28,21 @@ function _interopNamespaceDefault(e) {
28
28
  return Object.freeze(n);
29
29
  }
30
30
 
31
+ function _mergeNamespaces(n, m) {
32
+ m.forEach(function (e) {
33
+ e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
34
+ if (k !== 'default' && !(k in n)) {
35
+ var d = Object.getOwnPropertyDescriptor(e, k);
36
+ Object.defineProperty(n, k, d.get ? d : {
37
+ enumerable: true,
38
+ get: function () { return e[k]; }
39
+ });
40
+ }
41
+ });
42
+ });
43
+ return Object.freeze(n);
44
+ }
45
+
31
46
  var testUtils__namespace = /*#__PURE__*/_interopNamespaceDefault(testUtils);
32
47
 
33
48
  /**
@@ -39,6 +54,42 @@ const ComponentLoadingWrapper = (props) => {
39
54
 
40
55
  function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
41
56
 
57
+ (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
58
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
59
+ return new (P || (P = Promise))(function (resolve, reject) {
60
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
61
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
62
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
63
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
64
+ });
65
+ };
66
+
67
+ (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
68
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
69
+ return new (P || (P = Promise))(function (resolve, reject) {
70
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
71
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
72
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
73
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
74
+ });
75
+ };
76
+
77
+ function useInterval(callback, delay) {
78
+ const savedCallback = React.useRef(callback);
79
+ useIsomorphicLayoutEffect$1(() => {
80
+ savedCallback.current = callback;
81
+ }, [callback]);
82
+ React.useEffect(() => {
83
+ if (!delay && delay !== 0) {
84
+ return;
85
+ }
86
+ const id = setInterval(() => savedCallback.current(), delay);
87
+ return () => clearInterval(id);
88
+ }, [delay]);
89
+ }
90
+
91
+ const useIsomorphicLayoutEffect$1 = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
92
+
42
93
  const GridContext = React.createContext({
43
94
  gridReady: false,
44
95
  gridRenderState: () => null,
@@ -173,6 +224,9 @@ const GridContext = React.createContext({
173
224
  setOnCellEditingComplete: () => {
174
225
  console.error("no context provider for setOnCellEditingComplete");
175
226
  },
227
+ showNoRowsOverlay: () => {
228
+ console.error("no context provider for showLoadingOverlay");
229
+ },
176
230
  });
177
231
  const useGridContext = () => React.useContext(GridContext);
178
232
 
@@ -191,53 +245,6 @@ const GridUpdatingContext = React.createContext({
191
245
  updatedDep: 0,
192
246
  });
193
247
 
194
- /**
195
- * Cancels timeouts on scope being destroyed.
196
- *
197
- * This could almost be a debounce, but debounce tracks by function reference, this tracks by hook reference.
198
- * This could have been implemented using debounce if the callers function was wrapped in useCallback,
199
- * but there's no way to enforce that, so it would lead to bugs.
200
- */
201
- const useTimeoutHook = () => {
202
- const timeout = React.useRef();
203
- /**
204
- * Clear any pending timeouts.
205
- */
206
- const clearTimeouts = () => {
207
- if (timeout.current) {
208
- const tc = timeout.current;
209
- timeout.current = undefined;
210
- clearTimeout(tc);
211
- }
212
- };
213
- /**
214
- * Call this when your action has completed.
215
- */
216
- const invoke = React.useCallback((fn, waitTimeMs) => {
217
- clearTimeouts();
218
- timeout.current = setTimeout(fn, waitTimeMs);
219
- }, []);
220
- /**
221
- * Clear timeout on loss of scope.
222
- */
223
- React.useEffect(() => {
224
- return () => clearTimeouts();
225
- }, []);
226
- return invoke;
227
- };
228
- const useIntervalHook = ({ callback, timeoutMs }) => {
229
- const callbackRef = React.useRef(callback);
230
- callbackRef.current = callback;
231
- React.useEffect(() => {
232
- const interval = setInterval(() => {
233
- callbackRef.current && callbackRef.current();
234
- }, timeoutMs);
235
- return () => {
236
- clearInterval(interval);
237
- };
238
- }, [timeoutMs]);
239
- };
240
-
241
248
  const isNotEmpty = lodashEs.negate(lodashEs.isEmpty);
242
249
  const wait$1 = (timeoutMs) => new Promise((resolve) => {
243
250
  setTimeout(resolve, timeoutMs);
@@ -290,11 +297,21 @@ const sanitiseFileName = (filename) => {
290
297
  return valid.slice(0, -fileExt.length - 1).slice(0, 64) + "." + fileExt;
291
298
  };
292
299
 
293
- const GridNoRowsOverlay = (params) => {
294
- if (params.rowCount === 0)
295
- return jsxRuntime.jsx("span", { children: params.noRowsOverlayText ?? "There are currently no rows" });
296
- if (params.filteredRowCount === 0)
297
- return jsxRuntime.jsx("span", { children: "All rows have been filtered" });
300
+ const GridLoadingOverlayComponent = (props) => (jsxRuntime.jsx("div", { style: {
301
+ left: 0,
302
+ top: 0,
303
+ bottom: 0,
304
+ right: 0,
305
+ position: "absolute",
306
+ backgroundColor: "rgba(255,255,255,0.5)",
307
+ }, children: jsxRuntime.jsx("div", { style: { height: "100%", position: "relative" }, children: jsxRuntime.jsx("div", { style: { position: "absolute", left: 0, top: props.headerRowHeight, right: 0, bottom: 0 }, children: jsxRuntime.jsx(lui.LuiStatusSpinner, {}) }) }) }));
308
+ const GridNoRowsOverlay = (props) => {
309
+ if (props.loading)
310
+ return jsxRuntime.jsx(GridLoadingOverlayComponent, { headerRowHeight: props.headerRowHeight });
311
+ if (props.rowCount === 0)
312
+ return jsxRuntime.jsx("div", { children: props.noRowsOverlayText ?? "There are currently no rows" });
313
+ if (props.filteredRowCount === 0)
314
+ return jsxRuntime.jsx("div", { children: "All rows have been filtered" });
298
315
  return jsxRuntime.jsx("span", {});
299
316
  };
300
317
 
@@ -2345,10 +2362,9 @@ const useGridContextMenu = ({ contextMenuSelectRow, contextMenu: ContextMenu, })
2345
2362
  /**
2346
2363
  * Wrapper for AgGrid to add commonly used functionality.
2347
2364
  */
2348
- const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressColumnVirtualization = true, theme = "ag-theme-step-default", sizeColumns = "auto", selectColumnPinned = null, contextMenuSelectRow = false, singleClickEdit = false, rowData, rowHeight = theme === "ag-theme-step-default" ? 40 : theme === "ag-theme-step-compact" ? 36 : undefined, ...params }) => {
2349
- const { gridReady, gridRenderState, setApis, ensureRowVisible, getFirstRowId, selectRowsById, focusByRowById, ensureSelectedRowIsVisible, autoSizeColumns, sizeColumnsToFit, externallySelectedItemsAreInSync, setExternallySelectedItemsAreInSync, isExternalFilterPresent, doesExternalFilterPass, setOnCellEditingComplete, getColDef, } = React.useContext(GridContext);
2365
+ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressColumnVirtualization = true, theme = "ag-theme-step-default", sizeColumns = "auto", selectColumnPinned = null, contextMenuSelectRow = false, singleClickEdit = false, rowData, rowHeight = theme === "ag-theme-step-default" ? 40 : theme === "ag-theme-step-compact" ? 36 : 40, ...params }) => {
2366
+ const { gridReady, gridRenderState, setApis, ensureRowVisible, getFirstRowId, selectRowsById, focusByRowById, ensureSelectedRowIsVisible, autoSizeColumns, sizeColumnsToFit, externallySelectedItemsAreInSync, setExternallySelectedItemsAreInSync, isExternalFilterPresent, doesExternalFilterPass, setOnCellEditingComplete, getColDef, showNoRowsOverlay, prePopupOps, stopEditing, } = React.useContext(GridContext);
2350
2367
  const { checkUpdating, updatedDep, updatingCols } = React.useContext(GridUpdatingContext);
2351
- const { prePopupOps } = React.useContext(GridContext);
2352
2368
  const gridDivRef = React.useRef(null);
2353
2369
  const lastSelectedIds = React.useRef([]);
2354
2370
  const [staleGrid, setStaleGrid] = React.useState(false);
@@ -2404,23 +2420,20 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2404
2420
  /**
2405
2421
  * Auto-size windows that had deferred auto-size
2406
2422
  */
2407
- useIntervalHook({
2408
- callback: () => {
2409
- // Check if window has been popped out and needs resize
2410
- const currentDocument = gridDivRef.current?.ownerDocument;
2411
- if (currentDocument !== lastOwnerDocumentRef.current) {
2412
- lastOwnerDocumentRef.current = currentDocument;
2413
- if (currentDocument) {
2414
- needsAutoSize.current = true;
2415
- }
2423
+ useInterval(() => {
2424
+ // Check if window has been popped out and needs resize
2425
+ const currentDocument = gridDivRef.current?.ownerDocument;
2426
+ if (currentDocument !== lastOwnerDocumentRef.current) {
2427
+ lastOwnerDocumentRef.current = currentDocument;
2428
+ if (currentDocument) {
2429
+ needsAutoSize.current = true;
2416
2430
  }
2417
- if (needsAutoSize.current) {
2418
- needsAutoSize.current = false;
2419
- setInitialContentSize();
2420
- }
2421
- },
2422
- timeoutMs: 200,
2423
- });
2431
+ }
2432
+ if (needsAutoSize.current) {
2433
+ needsAutoSize.current = false;
2434
+ setInitialContentSize();
2435
+ }
2436
+ }, 200);
2424
2437
  /**
2425
2438
  * On data load select the first row of the grid if required.
2426
2439
  */
@@ -2518,7 +2531,7 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2518
2531
  const columnDefs = React.useMemo(() => {
2519
2532
  const adjustColDefs = params.columnDefs.map((colDef) => {
2520
2533
  const colDefEditable = colDef.editable;
2521
- const editable = combineEditables(params.readOnly !== true, params.defaultColDef?.editable, colDefEditable);
2534
+ const editable = combineEditables(params.loading !== true && params.readOnly !== true, params.defaultColDef?.editable, colDefEditable);
2522
2535
  return {
2523
2536
  ...colDef,
2524
2537
  editable,
@@ -2565,6 +2578,7 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2565
2578
  params.columnDefs,
2566
2579
  params.selectable,
2567
2580
  params.onRowDragEnd,
2581
+ params.loading,
2568
2582
  params.readOnly,
2569
2583
  params.defaultColDef?.editable,
2570
2584
  selectColumnPinned,
@@ -2728,6 +2742,15 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2728
2742
  });
2729
2743
  }
2730
2744
  }, [autoSizeColumns, getColDef, sizeColumns, updatedDep, updatingCols]);
2745
+ const prevLoading = React.useRef(false);
2746
+ React.useEffect(() => {
2747
+ const newLoading = !rowData || params.loading === true;
2748
+ if (newLoading && !prevLoading.current) {
2749
+ stopEditing();
2750
+ showNoRowsOverlay();
2751
+ }
2752
+ prevLoading.current = newLoading;
2753
+ }, [params.loading, rowData, showNoRowsOverlay, stopEditing]);
2731
2754
  /**
2732
2755
  * Resize columns to fit if required on window/container resize
2733
2756
  */
@@ -2796,12 +2819,13 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2796
2819
  }, [params]);
2797
2820
  // This is setting a ref in the GridContext so won't be triggering an update loop
2798
2821
  setOnCellEditingComplete(params.onCellEditingComplete);
2822
+ const headerRowCount = columnDefs.some((c) => c.children) ? 2 : 1;
2799
2823
  return (jsxRuntime.jsxs("div", { "data-testid": dataTestId, className: clsx("Grid-container", theme, "theme-specific", staleGrid && "Grid-sortIsStale", gridReady && rowData && autoSized && "Grid-ready"), children: [gridContextMenu.component, jsxRuntime.jsx("div", { style: { flex: 1 }, ref: gridDivRef, children: jsxRuntime.jsx(agGridReact.AgGridReact, { rowHeight: rowHeight, animateRows: params.animateRows, rowClassRules: params.rowClassRules, getRowId: (params) => `${params.data.id}`, suppressRowClickSelection: true, rowSelection: rowSelection, suppressBrowserResizeObserver: true, onGridSizeChanged: onGridSizeChanged, suppressColumnVirtualisation: suppressColumnVirtualization, suppressClickEdit: true, onColumnVisible: () => {
2800
2824
  setInitialContentSize();
2801
2825
  }, onRowDataUpdated: onRowDataChanged, onCellKeyDown: onCellKeyPress, onCellClicked: onCellClicked, onCellDoubleClicked: onCellDoubleClick, onCellEditingStarted: refreshSelectedRows, domLayout: params.domLayout, onColumnResized: onColumnResized, defaultColDef: { minWidth: 48, ...lodashEs.omit(params.defaultColDef, ["editable"]) }, columnDefs: columnDefsAdjusted, rowData: rowData, noRowsOverlayComponent: (event) => {
2802
2826
  let rowCount = 0;
2803
2827
  event.api.forEachNode(() => rowCount++);
2804
- return (jsxRuntime.jsx(GridNoRowsOverlay, { rowCount: rowCount, filteredRowCount: event.api.getDisplayedRowCount(), noRowsOverlayText: params.noRowsOverlayText }));
2828
+ return (jsxRuntime.jsx(GridNoRowsOverlay, { loading: !rowData || params.loading === true, rowCount: rowCount, headerRowHeight: headerRowCount * rowHeight, filteredRowCount: event.api.getDisplayedRowCount(), noRowsOverlayText: params.noRowsOverlayText }));
2805
2829
  }, onModelUpdated: onModelUpdated, onGridReady: onGridReady, onSortChanged: ensureSelectedRowIsVisible, postSortRows: params.onRowDragEnd ? undefined : postSortRows, onSelectionChanged: synchroniseExternalStateToGridSelection, onColumnMoved: params.onColumnMoved, alwaysShowVerticalScroll: params.alwaysShowVerticalScroll, isExternalFilterPresent: isExternalFilterPresent, doesExternalFilterPass: doesExternalFilterPass, maintainColumnOrder: true, preventDefaultOnContextMenu: true, onCellContextMenu: gridContextMenu.cellContextMenu, rowDragText: params.rowDragText, onRowDragMove: onRowDragMove, onRowDragEnd: onRowDragEnd, onRowDragLeave: onRowDragLeave }) })] }));
2806
2830
  };
2807
2831
 
@@ -3114,6 +3138,41 @@ const GridFilterQuick = ({ quickFilterPlaceholder, defaultValue }) => {
3114
3138
 
3115
3139
  const GridFilters = ({ children }) => (jsxRuntime.jsx("div", { className: "Grid-container-filters", children: children }));
3116
3140
 
3141
+ /**
3142
+ * Cancels timeouts on scope being destroyed.
3143
+ *
3144
+ * This could almost be a debounce, but debounce tracks by function reference, this tracks by hook reference.
3145
+ * This could have been implemented using debounce if the callers function was wrapped in useCallback,
3146
+ * but there's no way to enforce that, so it would lead to bugs.
3147
+ */
3148
+ const useTimeoutHook = () => {
3149
+ const timeout = React.useRef();
3150
+ /**
3151
+ * Clear any pending timeouts.
3152
+ */
3153
+ const clearTimeouts = () => {
3154
+ if (timeout.current) {
3155
+ const tc = timeout.current;
3156
+ timeout.current = undefined;
3157
+ clearTimeout(tc);
3158
+ }
3159
+ };
3160
+ /**
3161
+ * Call this when your action has completed.
3162
+ */
3163
+ const invoke = React.useCallback((fn, waitTimeMs) => {
3164
+ clearTimeouts();
3165
+ timeout.current = setTimeout(fn, waitTimeMs);
3166
+ }, []);
3167
+ /**
3168
+ * Clear timeout on loss of scope.
3169
+ */
3170
+ React.useEffect(() => {
3171
+ return () => clearTimeouts();
3172
+ }, []);
3173
+ return invoke;
3174
+ };
3175
+
3117
3176
  /**
3118
3177
  * Defers state change up to a minimum time since last state change.
3119
3178
  */
@@ -4999,6 +5058,9 @@ const GridContextProvider = (props) => {
4999
5058
  const isExternalFilterPresent = () => !lodashEs.isEmpty(externalFilters.current);
5000
5059
  const doesExternalFilterPass = (node) => externalFilters.current.every((filter) => filter(node.data, node));
5001
5060
  const getColDef = React.useCallback((colId) => (!!colId && gridApi?.getColumnDef(colId)) || undefined, [gridApi]);
5061
+ const showNoRowsOverlay = React.useCallback(() => {
5062
+ gridApi?.showNoRowsOverlay();
5063
+ }, [gridApi]);
5002
5064
  /**
5003
5065
  * Apply column visibility
5004
5066
  */
@@ -5084,6 +5146,7 @@ const GridContextProvider = (props) => {
5084
5146
  doesExternalFilterPass,
5085
5147
  downloadCsv,
5086
5148
  setOnCellEditingComplete,
5149
+ showNoRowsOverlay,
5087
5150
  }, children: props.children }));
5088
5151
  };
5089
5152
  /**
@@ -6472,31 +6535,6 @@ var ReactElement = {};
6472
6535
 
6473
6536
  var reactIs = {exports: {}};
6474
6537
 
6475
- var reactIs_production_min = {};
6476
-
6477
- /** @license React v17.0.2
6478
- * react-is.production.min.js
6479
- *
6480
- * Copyright (c) Facebook, Inc. and its affiliates.
6481
- *
6482
- * This source code is licensed under the MIT license found in the
6483
- * LICENSE file in the root directory of this source tree.
6484
- */
6485
-
6486
- var hasRequiredReactIs_production_min;
6487
-
6488
- function requireReactIs_production_min () {
6489
- if (hasRequiredReactIs_production_min) return reactIs_production_min;
6490
- hasRequiredReactIs_production_min = 1;
6491
- var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;
6492
- if("function"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x("react.element");c=x("react.portal");d=x("react.fragment");e=x("react.strict_mode");f=x("react.profiler");g=x("react.provider");h=x("react.context");k=x("react.forward_ref");l=x("react.suspense");m=x("react.suspense_list");n=x("react.memo");p=x("react.lazy");q=x("react.block");r=x("react.server.block");u=x("react.fundamental");v=x("react.debug_trace_mode");w=x("react.legacy_hidden");}
6493
- function y(a){if("object"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;reactIs_production_min.ContextConsumer=h;reactIs_production_min.ContextProvider=z;reactIs_production_min.Element=A;reactIs_production_min.ForwardRef=B;reactIs_production_min.Fragment=C;reactIs_production_min.Lazy=D;reactIs_production_min.Memo=E;reactIs_production_min.Portal=F;reactIs_production_min.Profiler=G;reactIs_production_min.StrictMode=H;
6494
- reactIs_production_min.Suspense=I;reactIs_production_min.isAsyncMode=function(){return !1};reactIs_production_min.isConcurrentMode=function(){return !1};reactIs_production_min.isContextConsumer=function(a){return y(a)===h};reactIs_production_min.isContextProvider=function(a){return y(a)===g};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===b};reactIs_production_min.isForwardRef=function(a){return y(a)===k};reactIs_production_min.isFragment=function(a){return y(a)===d};reactIs_production_min.isLazy=function(a){return y(a)===p};reactIs_production_min.isMemo=function(a){return y(a)===n};
6495
- reactIs_production_min.isPortal=function(a){return y(a)===c};reactIs_production_min.isProfiler=function(a){return y(a)===f};reactIs_production_min.isStrictMode=function(a){return y(a)===e};reactIs_production_min.isSuspense=function(a){return y(a)===l};reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};
6496
- reactIs_production_min.typeOf=y;
6497
- return reactIs_production_min;
6498
- }
6499
-
6500
6538
  var reactIs_development = {};
6501
6539
 
6502
6540
  /** @license React v17.0.2
@@ -6728,6 +6766,31 @@ function requireReactIs_development () {
6728
6766
  return reactIs_development;
6729
6767
  }
6730
6768
 
6769
+ var reactIs_production_min = {};
6770
+
6771
+ /** @license React v17.0.2
6772
+ * react-is.production.min.js
6773
+ *
6774
+ * Copyright (c) Facebook, Inc. and its affiliates.
6775
+ *
6776
+ * This source code is licensed under the MIT license found in the
6777
+ * LICENSE file in the root directory of this source tree.
6778
+ */
6779
+
6780
+ var hasRequiredReactIs_production_min;
6781
+
6782
+ function requireReactIs_production_min () {
6783
+ if (hasRequiredReactIs_production_min) return reactIs_production_min;
6784
+ hasRequiredReactIs_production_min = 1;
6785
+ var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;
6786
+ if("function"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x("react.element");c=x("react.portal");d=x("react.fragment");e=x("react.strict_mode");f=x("react.profiler");g=x("react.provider");h=x("react.context");k=x("react.forward_ref");l=x("react.suspense");m=x("react.suspense_list");n=x("react.memo");p=x("react.lazy");q=x("react.block");r=x("react.server.block");u=x("react.fundamental");v=x("react.debug_trace_mode");w=x("react.legacy_hidden");}
6787
+ function y(a){if("object"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;reactIs_production_min.ContextConsumer=h;reactIs_production_min.ContextProvider=z;reactIs_production_min.Element=A;reactIs_production_min.ForwardRef=B;reactIs_production_min.Fragment=C;reactIs_production_min.Lazy=D;reactIs_production_min.Memo=E;reactIs_production_min.Portal=F;reactIs_production_min.Profiler=G;reactIs_production_min.StrictMode=H;
6788
+ reactIs_production_min.Suspense=I;reactIs_production_min.isAsyncMode=function(){return !1};reactIs_production_min.isConcurrentMode=function(){return !1};reactIs_production_min.isContextConsumer=function(a){return y(a)===h};reactIs_production_min.isContextProvider=function(a){return y(a)===g};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===b};reactIs_production_min.isForwardRef=function(a){return y(a)===k};reactIs_production_min.isFragment=function(a){return y(a)===d};reactIs_production_min.isLazy=function(a){return y(a)===p};reactIs_production_min.isMemo=function(a){return y(a)===n};
6789
+ reactIs_production_min.isPortal=function(a){return y(a)===c};reactIs_production_min.isProfiler=function(a){return y(a)===f};reactIs_production_min.isStrictMode=function(a){return y(a)===e};reactIs_production_min.isSuspense=function(a){return y(a)===l};reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};
6790
+ reactIs_production_min.typeOf=y;
6791
+ return reactIs_production_min;
6792
+ }
6793
+
6731
6794
  if (process.env.NODE_ENV === 'production') {
6732
6795
  reactIs.exports = requireReactIs_production_min();
6733
6796
  } else {
@@ -6984,7 +7047,7 @@ ReactTestComponent.default = _default$2j;
6984
7047
  Object.defineProperty(build$1, '__esModule', {
6985
7048
  value: true
6986
7049
  });
6987
- build$1.default = build$1.DEFAULT_OPTIONS = void 0;
7050
+ var default_1 = build$1.default = DEFAULT_OPTIONS_1 = build$1.DEFAULT_OPTIONS = void 0;
6988
7051
  var format_1 = build$1.format = format;
6989
7052
  var plugins_1 = build$1.plugins = void 0;
6990
7053
 
@@ -7403,7 +7466,7 @@ const DEFAULT_OPTIONS = {
7403
7466
  printFunctionName: true,
7404
7467
  theme: DEFAULT_THEME
7405
7468
  };
7406
- build$1.DEFAULT_OPTIONS = DEFAULT_OPTIONS;
7469
+ var DEFAULT_OPTIONS_1 = build$1.DEFAULT_OPTIONS = DEFAULT_OPTIONS;
7407
7470
 
7408
7471
  function validateOptions(options) {
7409
7472
  Object.keys(options).forEach(key => {
@@ -7478,7 +7541,7 @@ const getEscapeString = options =>
7478
7541
  ? options.escapeString
7479
7542
  : DEFAULT_OPTIONS.escapeString;
7480
7543
 
7481
- const getConfig$1 = options => {
7544
+ const getConfig$4 = options => {
7482
7545
  var _options$printBasicPr;
7483
7546
 
7484
7547
  return {
@@ -7545,7 +7608,7 @@ function format(val, options) {
7545
7608
  const plugin = findPlugin(options.plugins, val);
7546
7609
 
7547
7610
  if (plugin !== null) {
7548
- return printPlugin(plugin, val, getConfig$1(options), '', 0, []);
7611
+ return printPlugin(plugin, val, getConfig$4(options), '', 0, []);
7549
7612
  }
7550
7613
  }
7551
7614
  }
@@ -7561,7 +7624,7 @@ function format(val, options) {
7561
7624
  return basicResult;
7562
7625
  }
7563
7626
 
7564
- return printComplexValue(val, getConfig$1(options), '', 0, []);
7627
+ return printComplexValue(val, getConfig$4(options), '', 0, []);
7565
7628
  }
7566
7629
 
7567
7630
  const plugins = {
@@ -7575,7 +7638,15 @@ const plugins = {
7575
7638
  };
7576
7639
  plugins_1 = build$1.plugins = plugins;
7577
7640
  var _default$2i = format;
7578
- build$1.default = _default$2i;
7641
+ default_1 = build$1.default = _default$2i;
7642
+
7643
+ var index = /*#__PURE__*/_mergeNamespaces({
7644
+ __proto__: null,
7645
+ get DEFAULT_OPTIONS () { return DEFAULT_OPTIONS_1; },
7646
+ get default () { return default_1; },
7647
+ format: format_1,
7648
+ get plugins () { return plugins_1; }
7649
+ }, [build$1]);
7579
7650
 
7580
7651
  /**
7581
7652
  * @source {https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#Polyfill}
@@ -14456,10 +14527,10 @@ var test = {
14456
14527
  foo: {}
14457
14528
  };
14458
14529
 
14459
- var $Object = Object;
14530
+ var $Object$1 = Object;
14460
14531
 
14461
14532
  var hasProto$1 = function hasProto() {
14462
- return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);
14533
+ return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object$1);
14463
14534
  };
14464
14535
 
14465
14536
  /* eslint no-invalid-this: 1 */
@@ -14523,9 +14594,9 @@ var src = bind$1.call(Function.call, Object.prototype.hasOwnProperty);
14523
14594
 
14524
14595
  var undefined$1;
14525
14596
 
14526
- var $SyntaxError = SyntaxError;
14597
+ var $SyntaxError$1 = SyntaxError;
14527
14598
  var $Function = Function;
14528
- var $TypeError$1 = TypeError;
14599
+ var $TypeError$4 = TypeError;
14529
14600
 
14530
14601
  // eslint-disable-next-line consistent-return
14531
14602
  var getEvalledConstructor = function (expressionSyntax) {
@@ -14544,7 +14615,7 @@ if ($gOPD$2) {
14544
14615
  }
14545
14616
 
14546
14617
  var throwTypeError = function () {
14547
- throw new $TypeError$1();
14618
+ throw new $TypeError$4();
14548
14619
  };
14549
14620
  var ThrowTypeError = $gOPD$2
14550
14621
  ? (function () {
@@ -14631,10 +14702,10 @@ var INTRINSICS = {
14631
14702
  '%String%': String,
14632
14703
  '%StringIteratorPrototype%': hasSymbols$4 && getProto$1 ? getProto$1(''[Symbol.iterator]()) : undefined$1,
14633
14704
  '%Symbol%': hasSymbols$4 ? Symbol : undefined$1,
14634
- '%SyntaxError%': $SyntaxError,
14705
+ '%SyntaxError%': $SyntaxError$1,
14635
14706
  '%ThrowTypeError%': ThrowTypeError,
14636
14707
  '%TypedArray%': TypedArray,
14637
- '%TypeError%': $TypeError$1,
14708
+ '%TypeError%': $TypeError$4,
14638
14709
  '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
14639
14710
  '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
14640
14711
  '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
@@ -14749,9 +14820,9 @@ var stringToPath = function stringToPath(string) {
14749
14820
  var first = $strSlice(string, 0, 1);
14750
14821
  var last = $strSlice(string, -1);
14751
14822
  if (first === '%' && last !== '%') {
14752
- throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
14823
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected closing `%`');
14753
14824
  } else if (last === '%' && first !== '%') {
14754
- throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
14825
+ throw new $SyntaxError$1('invalid intrinsic syntax, expected opening `%`');
14755
14826
  }
14756
14827
  var result = [];
14757
14828
  $replace$1(string, rePropName, function (match, number, quote, subString) {
@@ -14775,7 +14846,7 @@ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
14775
14846
  value = doEval(intrinsicName);
14776
14847
  }
14777
14848
  if (typeof value === 'undefined' && !allowMissing) {
14778
- throw new $TypeError$1('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
14849
+ throw new $TypeError$4('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
14779
14850
  }
14780
14851
 
14781
14852
  return {
@@ -14785,19 +14856,19 @@ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
14785
14856
  };
14786
14857
  }
14787
14858
 
14788
- throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
14859
+ throw new $SyntaxError$1('intrinsic ' + name + ' does not exist!');
14789
14860
  };
14790
14861
 
14791
14862
  var getIntrinsic = function GetIntrinsic(name, allowMissing) {
14792
14863
  if (typeof name !== 'string' || name.length === 0) {
14793
- throw new $TypeError$1('intrinsic name must be a non-empty string');
14864
+ throw new $TypeError$4('intrinsic name must be a non-empty string');
14794
14865
  }
14795
14866
  if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
14796
- throw new $TypeError$1('"allowMissing" argument must be a boolean');
14867
+ throw new $TypeError$4('"allowMissing" argument must be a boolean');
14797
14868
  }
14798
14869
 
14799
14870
  if ($exec$1(/^%?[^%]*%?$/, name) === null) {
14800
- throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
14871
+ throw new $SyntaxError$1('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
14801
14872
  }
14802
14873
  var parts = stringToPath(name);
14803
14874
  var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
@@ -14824,7 +14895,7 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
14824
14895
  )
14825
14896
  && first !== last
14826
14897
  ) {
14827
- throw new $SyntaxError('property names with quotes must have matching quotes');
14898
+ throw new $SyntaxError$1('property names with quotes must have matching quotes');
14828
14899
  }
14829
14900
  if (part === 'constructor' || !isOwn) {
14830
14901
  skipFurtherCaching = true;
@@ -14838,7 +14909,7 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
14838
14909
  } else if (value != null) {
14839
14910
  if (!(part in value)) {
14840
14911
  if (!allowMissing) {
14841
- throw new $TypeError$1('base intrinsic for ' + name + ' exists, but the property is not available.');
14912
+ throw new $TypeError$4('base intrinsic for ' + name + ' exists, but the property is not available.');
14842
14913
  }
14843
14914
  return void undefined$1;
14844
14915
  }
@@ -14871,14 +14942,14 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
14871
14942
  return value;
14872
14943
  };
14873
14944
 
14874
- var GetIntrinsic$6 = getIntrinsic;
14945
+ var GetIntrinsic$7 = getIntrinsic;
14875
14946
 
14876
- var $defineProperty = GetIntrinsic$6('%Object.defineProperty%', true);
14947
+ var $defineProperty$1 = GetIntrinsic$7('%Object.defineProperty%', true);
14877
14948
 
14878
14949
  var hasPropertyDescriptors$1 = function hasPropertyDescriptors() {
14879
- if ($defineProperty) {
14950
+ if ($defineProperty$1) {
14880
14951
  try {
14881
- $defineProperty({}, 'a', { value: 1 });
14952
+ $defineProperty$1({}, 'a', { value: 1 });
14882
14953
  return true;
14883
14954
  } catch (e) {
14884
14955
  // IE 8 has a broken defineProperty
@@ -14894,7 +14965,7 @@ hasPropertyDescriptors$1.hasArrayLengthDefineBug = function hasArrayLengthDefine
14894
14965
  return null;
14895
14966
  }
14896
14967
  try {
14897
- return $defineProperty([], 'length', { value: 1 }).length !== 1;
14968
+ return $defineProperty$1([], 'length', { value: 1 }).length !== 1;
14898
14969
  } catch (e) {
14899
14970
  // In Firefox 4-22, defining length on an array throws an exception.
14900
14971
  return true;
@@ -14903,20 +14974,92 @@ hasPropertyDescriptors$1.hasArrayLengthDefineBug = function hasArrayLengthDefine
14903
14974
 
14904
14975
  var hasPropertyDescriptors_1 = hasPropertyDescriptors$1;
14905
14976
 
14977
+ var GetIntrinsic$6 = getIntrinsic;
14978
+
14979
+ var $gOPD$1 = GetIntrinsic$6('%Object.getOwnPropertyDescriptor%', true);
14980
+
14981
+ if ($gOPD$1) {
14982
+ try {
14983
+ $gOPD$1([], 'length');
14984
+ } catch (e) {
14985
+ // IE 8 has a broken gOPD
14986
+ $gOPD$1 = null;
14987
+ }
14988
+ }
14989
+
14990
+ var gopd$1 = $gOPD$1;
14991
+
14992
+ var hasPropertyDescriptors = hasPropertyDescriptors_1();
14993
+
14994
+ var GetIntrinsic$5 = getIntrinsic;
14995
+
14996
+ var $defineProperty = hasPropertyDescriptors && GetIntrinsic$5('%Object.defineProperty%', true);
14997
+
14998
+ var $SyntaxError = GetIntrinsic$5('%SyntaxError%');
14999
+ var $TypeError$3 = GetIntrinsic$5('%TypeError%');
15000
+
15001
+ var gopd = gopd$1;
15002
+
15003
+ /** @type {(obj: Record<PropertyKey, unknown>, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */
15004
+ var defineDataProperty$1 = function defineDataProperty(
15005
+ obj,
15006
+ property,
15007
+ value
15008
+ ) {
15009
+ if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
15010
+ throw new $TypeError$3('`obj` must be an object or a function`');
15011
+ }
15012
+ if (typeof property !== 'string' && typeof property !== 'symbol') {
15013
+ throw new $TypeError$3('`property` must be a string or a symbol`');
15014
+ }
15015
+ if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
15016
+ throw new $TypeError$3('`nonEnumerable`, if provided, must be a boolean or null');
15017
+ }
15018
+ if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
15019
+ throw new $TypeError$3('`nonWritable`, if provided, must be a boolean or null');
15020
+ }
15021
+ if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
15022
+ throw new $TypeError$3('`nonConfigurable`, if provided, must be a boolean or null');
15023
+ }
15024
+ if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
15025
+ throw new $TypeError$3('`loose`, if provided, must be a boolean');
15026
+ }
15027
+
15028
+ var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
15029
+ var nonWritable = arguments.length > 4 ? arguments[4] : null;
15030
+ var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
15031
+ var loose = arguments.length > 6 ? arguments[6] : false;
15032
+
15033
+ /* @type {false | TypedPropertyDescriptor<unknown>} */
15034
+ var desc = !!gopd && gopd(obj, property);
15035
+
15036
+ if ($defineProperty) {
15037
+ $defineProperty(obj, property, {
15038
+ configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
15039
+ enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
15040
+ value: value,
15041
+ writable: nonWritable === null && desc ? desc.writable : !nonWritable
15042
+ });
15043
+ } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
15044
+ // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
15045
+ obj[property] = value; // eslint-disable-line no-param-reassign
15046
+ } else {
15047
+ throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
15048
+ }
15049
+ };
15050
+
14906
15051
  var keys$2 = objectKeys$2;
14907
15052
  var hasSymbols$3 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
14908
15053
 
14909
15054
  var toStr$7 = Object.prototype.toString;
14910
15055
  var concat = Array.prototype.concat;
14911
- var origDefineProperty = Object.defineProperty;
15056
+ var defineDataProperty = defineDataProperty$1;
14912
15057
 
14913
15058
  var isFunction = function (fn) {
14914
15059
  return typeof fn === 'function' && toStr$7.call(fn) === '[object Function]';
14915
15060
  };
14916
15061
 
14917
- var hasPropertyDescriptors = hasPropertyDescriptors_1();
14918
-
14919
- var supportsDescriptors$2 = origDefineProperty && hasPropertyDescriptors;
15062
+ var supportsDescriptors$2 = hasPropertyDescriptors_1();
14920
15063
 
14921
15064
  var defineProperty$1 = function (object, name, value, predicate) {
14922
15065
  if (name in object) {
@@ -14928,15 +15071,11 @@ var defineProperty$1 = function (object, name, value, predicate) {
14928
15071
  return;
14929
15072
  }
14930
15073
  }
15074
+
14931
15075
  if (supportsDescriptors$2) {
14932
- origDefineProperty(object, name, {
14933
- configurable: true,
14934
- enumerable: false,
14935
- value: value,
14936
- writable: true
14937
- });
15076
+ defineDataProperty(object, name, value, true);
14938
15077
  } else {
14939
- object[name] = value; // eslint-disable-line no-param-reassign
15078
+ defineDataProperty(object, name, value);
14940
15079
  }
14941
15080
  };
14942
15081
 
@@ -14955,7 +15094,7 @@ defineProperties$1.supportsDescriptors = !!supportsDescriptors$2;
14955
15094
 
14956
15095
  var defineProperties_1 = defineProperties$1;
14957
15096
 
14958
- var callBind$5 = {exports: {}};
15097
+ var callBind$6 = {exports: {}};
14959
15098
 
14960
15099
  (function (module) {
14961
15100
 
@@ -15004,20 +15143,20 @@ var callBind$5 = {exports: {}};
15004
15143
  } else {
15005
15144
  module.exports.apply = applyBind;
15006
15145
  }
15007
- } (callBind$5));
15146
+ } (callBind$6));
15008
15147
 
15009
- var callBindExports = callBind$5.exports;
15148
+ var callBindExports = callBind$6.exports;
15010
15149
 
15011
- var GetIntrinsic$5 = getIntrinsic;
15150
+ var GetIntrinsic$4 = getIntrinsic;
15012
15151
 
15013
- var callBind$4 = callBindExports;
15152
+ var callBind$5 = callBindExports;
15014
15153
 
15015
- var $indexOf$1 = callBind$4(GetIntrinsic$5('String.prototype.indexOf'));
15154
+ var $indexOf$1 = callBind$5(GetIntrinsic$4('String.prototype.indexOf'));
15016
15155
 
15017
- var callBound$c = function callBoundIntrinsic(name, allowMissing) {
15018
- var intrinsic = GetIntrinsic$5(name, !!allowMissing);
15156
+ var callBound$b = function callBoundIntrinsic(name, allowMissing) {
15157
+ var intrinsic = GetIntrinsic$4(name, !!allowMissing);
15019
15158
  if (typeof intrinsic === 'function' && $indexOf$1(name, '.prototype.') > -1) {
15020
- return callBind$4(intrinsic);
15159
+ return callBind$5(intrinsic);
15021
15160
  }
15022
15161
  return intrinsic;
15023
15162
  };
@@ -15025,10 +15164,10 @@ var callBound$c = function callBoundIntrinsic(name, allowMissing) {
15025
15164
  // modified from https://github.com/es-shims/es6-shim
15026
15165
  var objectKeys$1 = objectKeys$2;
15027
15166
  var hasSymbols$2 = shams$1();
15028
- var callBound$b = callBound$c;
15167
+ var callBound$a = callBound$b;
15029
15168
  var toObject = Object;
15030
- var $push = callBound$b('Array.prototype.push');
15031
- var $propIsEnumerable = callBound$b('Object.prototype.propertyIsEnumerable');
15169
+ var $push = callBound$a('Array.prototype.push');
15170
+ var $propIsEnumerable = callBound$a('Object.prototype.propertyIsEnumerable');
15032
15171
  var originalGetSymbols = hasSymbols$2 ? Object.getOwnPropertySymbols : null;
15033
15172
 
15034
15173
  // eslint-disable-next-line no-unused-vars
@@ -15121,12 +15260,12 @@ var polyfill$4 = function getPolyfill() {
15121
15260
  return Object.assign;
15122
15261
  };
15123
15262
 
15124
- var define$3 = defineProperties_1;
15263
+ var define$4 = defineProperties_1;
15125
15264
  var getPolyfill$5 = polyfill$4;
15126
15265
 
15127
15266
  var shim$5 = function shimAssign() {
15128
15267
  var polyfill = getPolyfill$5();
15129
- define$3(
15268
+ define$4(
15130
15269
  Object,
15131
15270
  { assign: polyfill },
15132
15271
  { assign: function () { return Object.assign !== polyfill; } }
@@ -15135,13 +15274,13 @@ var shim$5 = function shimAssign() {
15135
15274
  };
15136
15275
 
15137
15276
  var defineProperties = defineProperties_1;
15138
- var callBind$3 = callBindExports;
15277
+ var callBind$4 = callBindExports;
15139
15278
 
15140
15279
  var implementation$6 = implementation$8;
15141
15280
  var getPolyfill$4 = polyfill$4;
15142
15281
  var shim$4 = shim$5;
15143
15282
 
15144
- var polyfill$3 = callBind$3.apply(getPolyfill$4());
15283
+ var polyfill$3 = callBind$4.apply(getPolyfill$4());
15145
15284
  // eslint-disable-next-line no-unused-vars
15146
15285
  var bound = function assign(target, source1) {
15147
15286
  return polyfill$3(Object, arguments);
@@ -15155,27 +15294,25 @@ defineProperties(bound, {
15155
15294
 
15156
15295
  var object_assign = bound;
15157
15296
 
15158
- var implementation$5 = {exports: {}};
15159
-
15160
15297
  var functionsHaveNames = function functionsHaveNames() {
15161
15298
  return typeof function f() {}.name === 'string';
15162
15299
  };
15163
15300
 
15164
- var gOPD$4 = Object.getOwnPropertyDescriptor;
15165
- if (gOPD$4) {
15301
+ var gOPD$3 = Object.getOwnPropertyDescriptor;
15302
+ if (gOPD$3) {
15166
15303
  try {
15167
- gOPD$4([], 'length');
15304
+ gOPD$3([], 'length');
15168
15305
  } catch (e) {
15169
15306
  // IE 8 has a broken gOPD
15170
- gOPD$4 = null;
15307
+ gOPD$3 = null;
15171
15308
  }
15172
15309
  }
15173
15310
 
15174
15311
  functionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() {
15175
- if (!functionsHaveNames() || !gOPD$4) {
15312
+ if (!functionsHaveNames() || !gOPD$3) {
15176
15313
  return false;
15177
15314
  }
15178
- var desc = gOPD$4(function () {}, 'name');
15315
+ var desc = gOPD$3(function () {}, 'name');
15179
15316
  return !!desc && !!desc.configurable;
15180
15317
  };
15181
15318
 
@@ -15187,60 +15324,72 @@ functionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames()
15187
15324
 
15188
15325
  var functionsHaveNames_1 = functionsHaveNames;
15189
15326
 
15190
- (function (module) {
15191
-
15192
- var functionsHaveConfigurableNames = functionsHaveNames_1.functionsHaveConfigurableNames();
15327
+ var define$3 = defineDataProperty$1;
15328
+ var hasDescriptors = hasPropertyDescriptors_1();
15329
+ var functionsHaveConfigurableNames = functionsHaveNames_1.functionsHaveConfigurableNames();
15193
15330
 
15194
- var $Object = Object;
15195
- var $TypeError = TypeError;
15331
+ var $TypeError$2 = TypeError;
15196
15332
 
15197
- module.exports = function flags() {
15198
- if (this != null && this !== $Object(this)) {
15199
- throw new $TypeError('RegExp.prototype.flags getter called on non-object');
15200
- }
15201
- var result = '';
15202
- if (this.hasIndices) {
15203
- result += 'd';
15204
- }
15205
- if (this.global) {
15206
- result += 'g';
15207
- }
15208
- if (this.ignoreCase) {
15209
- result += 'i';
15210
- }
15211
- if (this.multiline) {
15212
- result += 'm';
15213
- }
15214
- if (this.dotAll) {
15215
- result += 's';
15216
- }
15217
- if (this.unicode) {
15218
- result += 'u';
15219
- }
15220
- if (this.unicodeSets) {
15221
- result += 'v';
15222
- }
15223
- if (this.sticky) {
15224
- result += 'y';
15333
+ var setFunctionName$1 = function setFunctionName(fn, name) {
15334
+ if (typeof fn !== 'function') {
15335
+ throw new $TypeError$2('`fn` is not a function');
15336
+ }
15337
+ var loose = arguments.length > 2 && !!arguments[2];
15338
+ if (!loose || functionsHaveConfigurableNames) {
15339
+ if (hasDescriptors) {
15340
+ define$3(fn, 'name', name, true, true);
15341
+ } else {
15342
+ define$3(fn, 'name', name);
15225
15343
  }
15226
- return result;
15227
- };
15344
+ }
15345
+ return fn;
15346
+ };
15228
15347
 
15229
- if (functionsHaveConfigurableNames && Object.defineProperty) {
15230
- Object.defineProperty(module.exports, 'name', { value: 'get flags' });
15231
- }
15232
- } (implementation$5));
15348
+ var setFunctionName = setFunctionName$1;
15233
15349
 
15234
- var implementationExports = implementation$5.exports;
15350
+ var $Object = Object;
15351
+ var $TypeError$1 = TypeError;
15235
15352
 
15236
- var implementation$4 = implementationExports;
15353
+ var implementation$5 = setFunctionName(function flags() {
15354
+ if (this != null && this !== $Object(this)) {
15355
+ throw new $TypeError$1('RegExp.prototype.flags getter called on non-object');
15356
+ }
15357
+ var result = '';
15358
+ if (this.hasIndices) {
15359
+ result += 'd';
15360
+ }
15361
+ if (this.global) {
15362
+ result += 'g';
15363
+ }
15364
+ if (this.ignoreCase) {
15365
+ result += 'i';
15366
+ }
15367
+ if (this.multiline) {
15368
+ result += 'm';
15369
+ }
15370
+ if (this.dotAll) {
15371
+ result += 's';
15372
+ }
15373
+ if (this.unicode) {
15374
+ result += 'u';
15375
+ }
15376
+ if (this.unicodeSets) {
15377
+ result += 'v';
15378
+ }
15379
+ if (this.sticky) {
15380
+ result += 'y';
15381
+ }
15382
+ return result;
15383
+ }, 'get flags', true);
15384
+
15385
+ var implementation$4 = implementation$5;
15237
15386
 
15238
15387
  var supportsDescriptors$1 = defineProperties_1.supportsDescriptors;
15239
- var $gOPD$1 = Object.getOwnPropertyDescriptor;
15388
+ var $gOPD = Object.getOwnPropertyDescriptor;
15240
15389
 
15241
15390
  var polyfill$2 = function getPolyfill() {
15242
15391
  if (supportsDescriptors$1 && (/a/mig).flags === 'gim') {
15243
- var descriptor = $gOPD$1(RegExp.prototype, 'flags');
15392
+ var descriptor = $gOPD(RegExp.prototype, 'flags');
15244
15393
  if (
15245
15394
  descriptor
15246
15395
  && typeof descriptor.get === 'function'
@@ -15270,7 +15419,7 @@ var polyfill$2 = function getPolyfill() {
15270
15419
 
15271
15420
  var supportsDescriptors = defineProperties_1.supportsDescriptors;
15272
15421
  var getPolyfill$3 = polyfill$2;
15273
- var gOPD$3 = Object.getOwnPropertyDescriptor;
15422
+ var gOPD$2 = Object.getOwnPropertyDescriptor;
15274
15423
  var defineProperty = Object.defineProperty;
15275
15424
  var TypeErr = TypeError;
15276
15425
  var getProto = Object.getPrototypeOf;
@@ -15282,7 +15431,7 @@ var shim$3 = function shimFlags() {
15282
15431
  }
15283
15432
  var polyfill = getPolyfill$3();
15284
15433
  var proto = getProto(regex);
15285
- var descriptor = gOPD$3(proto, 'flags');
15434
+ var descriptor = gOPD$2(proto, 'flags');
15286
15435
  if (!descriptor || descriptor.get !== polyfill) {
15287
15436
  defineProperty(proto, 'flags', {
15288
15437
  configurable: true,
@@ -15294,13 +15443,13 @@ var shim$3 = function shimFlags() {
15294
15443
  };
15295
15444
 
15296
15445
  var define$2 = defineProperties_1;
15297
- var callBind$2 = callBindExports;
15446
+ var callBind$3 = callBindExports;
15298
15447
 
15299
- var implementation$3 = implementationExports;
15448
+ var implementation$3 = implementation$5;
15300
15449
  var getPolyfill$2 = polyfill$2;
15301
15450
  var shim$2 = shim$3;
15302
15451
 
15303
- var flagsBound = callBind$2(getPolyfill$2());
15452
+ var flagsBound = callBind$3(getPolyfill$2());
15304
15453
 
15305
15454
  define$2(flagsBound, {
15306
15455
  getPolyfill: getPolyfill$2,
@@ -15341,7 +15490,7 @@ var booleanValueOf = Boolean.prototype.valueOf;
15341
15490
  var objectToString = Object.prototype.toString;
15342
15491
  var functionToString = Function.prototype.toString;
15343
15492
  var $match = String.prototype.match;
15344
- var $slice$2 = String.prototype.slice;
15493
+ var $slice$1 = String.prototype.slice;
15345
15494
  var $replace = String.prototype.replace;
15346
15495
  var $toUpperCase = String.prototype.toUpperCase;
15347
15496
  var $toLowerCase = String.prototype.toLowerCase;
@@ -15383,7 +15532,7 @@ function addNumericSeparator(num, str) {
15383
15532
  var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
15384
15533
  if (int !== num) {
15385
15534
  var intStr = String(int);
15386
- var dec = $slice$2.call(str, intStr.length + 1);
15535
+ var dec = $slice$1.call(str, intStr.length + 1);
15387
15536
  return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
15388
15537
  }
15389
15538
  }
@@ -15568,7 +15717,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
15568
15717
  var ys = arrObjKeys(obj, inspect);
15569
15718
  var isPlainObject = gPO$1 ? gPO$1(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
15570
15719
  var protoTag = obj instanceof Object ? '' : 'null prototype';
15571
- var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice$2.call(toStr$6(obj), 8, -1) : protoTag ? 'Object' : '';
15720
+ var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice$1.call(toStr$6(obj), 8, -1) : protoTag ? 'Object' : '';
15572
15721
  var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
15573
15722
  var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
15574
15723
  if (ys.length === 0) { return tag + '{}'; }
@@ -15737,7 +15886,7 @@ function inspectString(str, opts) {
15737
15886
  if (str.length > opts.maxStringLength) {
15738
15887
  var remaining = str.length - opts.maxStringLength;
15739
15888
  var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
15740
- return inspectString($slice$2.call(str, 0, opts.maxStringLength), opts) + trailer;
15889
+ return inspectString($slice$1.call(str, 0, opts.maxStringLength), opts) + trailer;
15741
15890
  }
15742
15891
  // eslint-disable-next-line no-control-regex
15743
15892
  var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
@@ -15840,20 +15989,20 @@ function arrObjKeys(obj, inspect) {
15840
15989
  return xs;
15841
15990
  }
15842
15991
 
15843
- var GetIntrinsic$4 = getIntrinsic;
15844
- var callBound$a = callBound$c;
15992
+ var GetIntrinsic$3 = getIntrinsic;
15993
+ var callBound$9 = callBound$b;
15845
15994
  var inspect = objectInspect;
15846
15995
 
15847
- var $TypeError = GetIntrinsic$4('%TypeError%');
15848
- var $WeakMap$1 = GetIntrinsic$4('%WeakMap%', true);
15849
- var $Map$2 = GetIntrinsic$4('%Map%', true);
15996
+ var $TypeError = GetIntrinsic$3('%TypeError%');
15997
+ var $WeakMap$1 = GetIntrinsic$3('%WeakMap%', true);
15998
+ var $Map$2 = GetIntrinsic$3('%Map%', true);
15850
15999
 
15851
- var $weakMapGet = callBound$a('WeakMap.prototype.get', true);
15852
- var $weakMapSet = callBound$a('WeakMap.prototype.set', true);
15853
- var $weakMapHas = callBound$a('WeakMap.prototype.has', true);
15854
- var $mapGet$1 = callBound$a('Map.prototype.get', true);
15855
- var $mapSet = callBound$a('Map.prototype.set', true);
15856
- var $mapHas$5 = callBound$a('Map.prototype.has', true);
16000
+ var $weakMapGet = callBound$9('WeakMap.prototype.get', true);
16001
+ var $weakMapSet = callBound$9('WeakMap.prototype.set', true);
16002
+ var $weakMapHas = callBound$9('WeakMap.prototype.has', true);
16003
+ var $mapGet$1 = callBound$9('Map.prototype.get', true);
16004
+ var $mapSet = callBound$9('Map.prototype.set', true);
16005
+ var $mapHas$5 = callBound$9('Map.prototype.has', true);
15857
16006
 
15858
16007
  /*
15859
16008
  * This function traverses the list returning the node corresponding to the
@@ -16000,13 +16149,13 @@ var shim$1 = function shimObjectIs() {
16000
16149
  };
16001
16150
 
16002
16151
  var define = defineProperties_1;
16003
- var callBind$1 = callBindExports;
16152
+ var callBind$2 = callBindExports;
16004
16153
 
16005
16154
  var implementation = implementation$2;
16006
16155
  var getPolyfill = polyfill$1;
16007
16156
  var shim = shim$1;
16008
16157
 
16009
- var polyfill = callBind$1(getPolyfill(), Object);
16158
+ var polyfill = callBind$2(getPolyfill(), Object);
16010
16159
 
16011
16160
  define(polyfill, {
16012
16161
  getPolyfill: getPolyfill,
@@ -16022,16 +16171,16 @@ var shams = function hasToStringTagShams() {
16022
16171
  return hasSymbols$1() && !!Symbol.toStringTag;
16023
16172
  };
16024
16173
 
16025
- var hasToStringTag$8 = shams();
16026
- var callBound$9 = callBound$c;
16174
+ var hasToStringTag$7 = shams();
16175
+ var callBound$8 = callBound$b;
16027
16176
 
16028
- var $toString$4 = callBound$9('Object.prototype.toString');
16177
+ var $toString$3 = callBound$8('Object.prototype.toString');
16029
16178
 
16030
16179
  var isStandardArguments = function isArguments(value) {
16031
- if (hasToStringTag$8 && value && typeof value === 'object' && Symbol.toStringTag in value) {
16180
+ if (hasToStringTag$7 && value && typeof value === 'object' && Symbol.toStringTag in value) {
16032
16181
  return false;
16033
16182
  }
16034
- return $toString$4(value) === '[object Arguments]';
16183
+ return $toString$3(value) === '[object Arguments]';
16035
16184
  };
16036
16185
 
16037
16186
  var isLegacyArguments = function isArguments(value) {
@@ -16042,8 +16191,8 @@ var isLegacyArguments = function isArguments(value) {
16042
16191
  typeof value === 'object' &&
16043
16192
  typeof value.length === 'number' &&
16044
16193
  value.length >= 0 &&
16045
- $toString$4(value) !== '[object Array]' &&
16046
- $toString$4(value.callee) === '[object Function]';
16194
+ $toString$3(value) !== '[object Array]' &&
16195
+ $toString$3(value.callee) === '[object Function]';
16047
16196
  };
16048
16197
 
16049
16198
  var supportsStandardArguments = (function () {
@@ -16109,7 +16258,7 @@ var genClass = '[object GeneratorFunction]';
16109
16258
  var ddaClass = '[object HTMLAllCollection]'; // IE 11
16110
16259
  var ddaClass2 = '[object HTML document.all class]';
16111
16260
  var ddaClass3 = '[object HTMLCollection]'; // IE 9-10
16112
- var hasToStringTag$7 = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`
16261
+ var hasToStringTag$6 = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`
16113
16262
 
16114
16263
  var isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing
16115
16264
 
@@ -16153,7 +16302,7 @@ var isCallable$1 = reflectApply
16153
16302
  if (isDDA(value)) { return true; }
16154
16303
  if (!value) { return false; }
16155
16304
  if (typeof value !== 'function' && typeof value !== 'object') { return false; }
16156
- if (hasToStringTag$7) { return tryFunctionObject(value); }
16305
+ if (hasToStringTag$6) { return tryFunctionObject(value); }
16157
16306
  if (isES6ClassFn(value)) { return false; }
16158
16307
  var strClass = toStr$5.call(value);
16159
16308
  if (strClass !== fnClass && strClass !== genClass && !(/^\[object HTML/).test(strClass)) { return false; }
@@ -16200,7 +16349,7 @@ var forEachObject = function forEachObject(object, iterator, receiver) {
16200
16349
  }
16201
16350
  };
16202
16351
 
16203
- var forEach$2 = function forEach(list, iterator, thisArg) {
16352
+ var forEach$1 = function forEach(list, iterator, thisArg) {
16204
16353
  if (!isCallable(iterator)) {
16205
16354
  throw new TypeError('iterator must be a function');
16206
16355
  }
@@ -16219,7 +16368,7 @@ var forEach$2 = function forEach(list, iterator, thisArg) {
16219
16368
  }
16220
16369
  };
16221
16370
 
16222
- var forEach_1 = forEach$2;
16371
+ var forEach_1 = forEach$1;
16223
16372
 
16224
16373
  var possibleNames = [
16225
16374
  'BigInt64Array',
@@ -16237,7 +16386,7 @@ var possibleNames = [
16237
16386
 
16238
16387
  var g$2 = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
16239
16388
 
16240
- var availableTypedArrays$2 = function availableTypedArrays() {
16389
+ var availableTypedArrays$1 = function availableTypedArrays() {
16241
16390
  var out = [];
16242
16391
  for (var i = 0; i < possibleNames.length; i++) {
16243
16392
  if (typeof g$2[possibleNames[i]] === 'function') {
@@ -16247,33 +16396,22 @@ var availableTypedArrays$2 = function availableTypedArrays() {
16247
16396
  return out;
16248
16397
  };
16249
16398
 
16250
- var GetIntrinsic$3 = getIntrinsic;
16251
-
16252
- var $gOPD = GetIntrinsic$3('%Object.getOwnPropertyDescriptor%', true);
16253
-
16254
- if ($gOPD) {
16255
- try {
16256
- $gOPD([], 'length');
16257
- } catch (e) {
16258
- // IE 8 has a broken gOPD
16259
- $gOPD = null;
16260
- }
16261
- }
16262
-
16263
- var gopd = $gOPD;
16264
-
16265
- var forEach$1 = forEach_1;
16266
- var availableTypedArrays$1 = availableTypedArrays$2;
16267
- var callBound$8 = callBound$c;
16399
+ var forEach = forEach_1;
16400
+ var availableTypedArrays = availableTypedArrays$1;
16401
+ var callBind$1 = callBindExports;
16402
+ var callBound$7 = callBound$b;
16403
+ var gOPD$1 = gopd$1;
16268
16404
 
16269
- var $toString$3 = callBound$8('Object.prototype.toString');
16270
- var hasToStringTag$6 = shams();
16271
- var gOPD$2 = gopd;
16405
+ var $toString$2 = callBound$7('Object.prototype.toString');
16406
+ var hasToStringTag$5 = shams();
16272
16407
 
16273
16408
  var g$1 = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
16274
- var typedArrays$1 = availableTypedArrays$1();
16409
+ var typedArrays = availableTypedArrays();
16410
+
16411
+ var $slice = callBound$7('String.prototype.slice');
16412
+ var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');
16275
16413
 
16276
- var $indexOf = callBound$8('Array.prototype.indexOf', true) || function indexOf(array, value) {
16414
+ var $indexOf = callBound$7('Array.prototype.indexOf', true) || function indexOf(array, value) {
16277
16415
  for (var i = 0; i < array.length; i += 1) {
16278
16416
  if (array[i] === value) {
16279
16417
  return i;
@@ -16281,54 +16419,85 @@ var $indexOf = callBound$8('Array.prototype.indexOf', true) || function indexOf(
16281
16419
  }
16282
16420
  return -1;
16283
16421
  };
16284
- var $slice$1 = callBound$8('String.prototype.slice');
16285
- var toStrTags$1 = {};
16286
- var getPrototypeOf$1 = Object.getPrototypeOf; // require('getprototypeof');
16287
- if (hasToStringTag$6 && gOPD$2 && getPrototypeOf$1) {
16288
- forEach$1(typedArrays$1, function (typedArray) {
16422
+ var cache = { __proto__: null };
16423
+ if (hasToStringTag$5 && gOPD$1 && getPrototypeOf) {
16424
+ forEach(typedArrays, function (typedArray) {
16289
16425
  var arr = new g$1[typedArray]();
16290
16426
  if (Symbol.toStringTag in arr) {
16291
- var proto = getPrototypeOf$1(arr);
16292
- var descriptor = gOPD$2(proto, Symbol.toStringTag);
16427
+ var proto = getPrototypeOf(arr);
16428
+ var descriptor = gOPD$1(proto, Symbol.toStringTag);
16293
16429
  if (!descriptor) {
16294
- var superProto = getPrototypeOf$1(proto);
16295
- descriptor = gOPD$2(superProto, Symbol.toStringTag);
16430
+ var superProto = getPrototypeOf(proto);
16431
+ descriptor = gOPD$1(superProto, Symbol.toStringTag);
16296
16432
  }
16297
- toStrTags$1[typedArray] = descriptor.get;
16433
+ cache['$' + typedArray] = callBind$1(descriptor.get);
16298
16434
  }
16299
16435
  });
16436
+ } else {
16437
+ forEach(typedArrays, function (typedArray) {
16438
+ var arr = new g$1[typedArray]();
16439
+ cache['$' + typedArray] = callBind$1(arr.slice);
16440
+ });
16300
16441
  }
16301
16442
 
16302
- var tryTypedArrays$1 = function tryAllTypedArrays(value) {
16303
- var anyTrue = false;
16304
- forEach$1(toStrTags$1, function (getter, typedArray) {
16305
- if (!anyTrue) {
16443
+ var tryTypedArrays = function tryAllTypedArrays(value) {
16444
+ var found = false;
16445
+ forEach(cache, function (getter, typedArray) {
16446
+ if (!found) {
16306
16447
  try {
16307
- anyTrue = getter.call(value) === typedArray;
16448
+ if ('$' + getter(value) === typedArray) {
16449
+ found = $slice(typedArray, 1);
16450
+ }
16308
16451
  } catch (e) { /**/ }
16309
16452
  }
16310
16453
  });
16311
- return anyTrue;
16454
+ return found;
16312
16455
  };
16313
16456
 
16314
- var isTypedArray$2 = function isTypedArray(value) {
16457
+ var trySlices = function tryAllSlices(value) {
16458
+ var found = false;
16459
+ forEach(cache, function (getter, name) {
16460
+ if (!found) {
16461
+ try {
16462
+ getter(value);
16463
+ found = $slice(name, 1);
16464
+ } catch (e) { /**/ }
16465
+ }
16466
+ });
16467
+ return found;
16468
+ };
16469
+
16470
+ var whichTypedArray$2 = function whichTypedArray(value) {
16315
16471
  if (!value || typeof value !== 'object') { return false; }
16316
- if (!hasToStringTag$6 || !(Symbol.toStringTag in value)) {
16317
- var tag = $slice$1($toString$3(value), 8, -1);
16318
- return $indexOf(typedArrays$1, tag) > -1;
16472
+ if (!hasToStringTag$5) {
16473
+ var tag = $slice($toString$2(value), 8, -1);
16474
+ if ($indexOf(typedArrays, tag) > -1) {
16475
+ return tag;
16476
+ }
16477
+ if (tag !== 'Object') {
16478
+ return false;
16479
+ }
16480
+ // node < 0.6 hits here on real Typed Arrays
16481
+ return trySlices(value);
16319
16482
  }
16320
- if (!gOPD$2) { return false; }
16321
- return tryTypedArrays$1(value);
16483
+ if (!gOPD$1) { return null; } // unknown engine
16484
+ return tryTypedArrays(value);
16485
+ };
16486
+
16487
+ var whichTypedArray$1 = whichTypedArray$2;
16488
+
16489
+ var isTypedArray$1 = function isTypedArray(value) {
16490
+ return !!whichTypedArray$1(value);
16322
16491
  };
16323
16492
 
16324
16493
  var callBind = callBindExports;
16325
- var callBound$7 = callBound$c;
16494
+ var callBound$6 = callBound$b;
16326
16495
  var GetIntrinsic$2 = getIntrinsic;
16327
- var isTypedArray$1 = isTypedArray$2;
16496
+ var isTypedArray = isTypedArray$1;
16328
16497
 
16329
16498
  var $ArrayBuffer = GetIntrinsic$2('ArrayBuffer', true);
16330
16499
  var $Float32Array = GetIntrinsic$2('Float32Array', true);
16331
- var $byteLength$2 = callBound$7('ArrayBuffer.prototype.byteLength', true);
16500
+ var $byteLength$2 = callBound$6('ArrayBuffer.prototype.byteLength', true);
16332
16501
 
16333
16502
  // in node 0.10, ArrayBuffers have no prototype methods, but have an own slot-checking `slice` method
16334
16503
  var abSlice = $ArrayBuffer && !$byteLength$2 && new $ArrayBuffer().slice;
@@ -16354,7 +16523,7 @@ var isArrayBuffer$2 = $byteLength$2 || $abSlice
16354
16523
  // in node 0.8, ArrayBuffers have no prototype or own methods
16355
16524
  ? function IsArrayBuffer(obj) {
16356
16525
  try {
16357
- return (new $Float32Array(obj)).buffer === obj && !isTypedArray$1(obj);
16526
+ return (new $Float32Array(obj)).buffer === obj && !isTypedArray(obj);
16358
16527
  } catch (e) {
16359
16528
  return typeof obj === 'object' && e.name === 'RangeError';
16360
16529
  }
@@ -16375,25 +16544,25 @@ var tryDateObject = function tryDateGetDayCall(value) {
16375
16544
 
16376
16545
  var toStr$3 = Object.prototype.toString;
16377
16546
  var dateClass = '[object Date]';
16378
- var hasToStringTag$5 = shams();
16547
+ var hasToStringTag$4 = shams();
16379
16548
 
16380
16549
  var isDateObject = function isDateObject(value) {
16381
16550
  if (typeof value !== 'object' || value === null) {
16382
16551
  return false;
16383
16552
  }
16384
- return hasToStringTag$5 ? tryDateObject(value) : toStr$3.call(value) === dateClass;
16553
+ return hasToStringTag$4 ? tryDateObject(value) : toStr$3.call(value) === dateClass;
16385
16554
  };
16386
16555
 
16387
- var callBound$6 = callBound$c;
16388
- var hasToStringTag$4 = shams();
16556
+ var callBound$5 = callBound$b;
16557
+ var hasToStringTag$3 = shams();
16389
16558
  var has;
16390
16559
  var $exec;
16391
16560
  var isRegexMarker;
16392
16561
  var badStringifier;
16393
16562
 
16394
- if (hasToStringTag$4) {
16395
- has = callBound$6('Object.prototype.hasOwnProperty');
16396
- $exec = callBound$6('RegExp.prototype.exec');
16563
+ if (hasToStringTag$3) {
16564
+ has = callBound$5('Object.prototype.hasOwnProperty');
16565
+ $exec = callBound$5('RegExp.prototype.exec');
16397
16566
  isRegexMarker = {};
16398
16567
 
16399
16568
  var throwRegexMarker = function () {
@@ -16409,18 +16578,18 @@ if (hasToStringTag$4) {
16409
16578
  }
16410
16579
  }
16411
16580
 
16412
- var $toString$2 = callBound$6('Object.prototype.toString');
16413
- var gOPD$1 = Object.getOwnPropertyDescriptor;
16581
+ var $toString$1 = callBound$5('Object.prototype.toString');
16582
+ var gOPD = Object.getOwnPropertyDescriptor;
16414
16583
  var regexClass = '[object RegExp]';
16415
16584
 
16416
- var isRegex$1 = hasToStringTag$4
16585
+ var isRegex$1 = hasToStringTag$3
16417
16586
  // eslint-disable-next-line consistent-return
16418
16587
  ? function isRegex(value) {
16419
16588
  if (!value || typeof value !== 'object') {
16420
16589
  return false;
16421
16590
  }
16422
16591
 
16423
- var descriptor = gOPD$1(value, 'lastIndex');
16592
+ var descriptor = gOPD(value, 'lastIndex');
16424
16593
  var hasLastIndexDataProperty = descriptor && has(descriptor, 'value');
16425
16594
  if (!hasLastIndexDataProperty) {
16426
16595
  return false;
@@ -16438,12 +16607,12 @@ var isRegex$1 = hasToStringTag$4
16438
16607
  return false;
16439
16608
  }
16440
16609
 
16441
- return $toString$2(value) === regexClass;
16610
+ return $toString$1(value) === regexClass;
16442
16611
  };
16443
16612
 
16444
- var callBound$5 = callBound$c;
16613
+ var callBound$4 = callBound$b;
16445
16614
 
16446
- var $byteLength$1 = callBound$5('SharedArrayBuffer.prototype.byteLength', true);
16615
+ var $byteLength$1 = callBound$4('SharedArrayBuffer.prototype.byteLength', true);
16447
16616
 
16448
16617
  var isSharedArrayBuffer$1 = $byteLength$1
16449
16618
  ? function isSharedArrayBuffer(obj) {
@@ -16472,7 +16641,7 @@ var tryStringObject = function tryStringObject(value) {
16472
16641
  };
16473
16642
  var toStr$2 = Object.prototype.toString;
16474
16643
  var strClass = '[object String]';
16475
- var hasToStringTag$3 = shams();
16644
+ var hasToStringTag$2 = shams();
16476
16645
 
16477
16646
  var isString$1 = function isString(value) {
16478
16647
  if (typeof value === 'string') {
@@ -16481,7 +16650,7 @@ var isString$1 = function isString(value) {
16481
16650
  if (typeof value !== 'object') {
16482
16651
  return false;
16483
16652
  }
16484
- return hasToStringTag$3 ? tryStringObject(value) : toStr$2.call(value) === strClass;
16653
+ return hasToStringTag$2 ? tryStringObject(value) : toStr$2.call(value) === strClass;
16485
16654
  };
16486
16655
 
16487
16656
  var numToStr = Number.prototype.toString;
@@ -16495,7 +16664,7 @@ var tryNumberObject = function tryNumberObject(value) {
16495
16664
  };
16496
16665
  var toStr$1 = Object.prototype.toString;
16497
16666
  var numClass = '[object Number]';
16498
- var hasToStringTag$2 = shams();
16667
+ var hasToStringTag$1 = shams();
16499
16668
 
16500
16669
  var isNumberObject = function isNumberObject(value) {
16501
16670
  if (typeof value === 'number') {
@@ -16504,12 +16673,12 @@ var isNumberObject = function isNumberObject(value) {
16504
16673
  if (typeof value !== 'object') {
16505
16674
  return false;
16506
16675
  }
16507
- return hasToStringTag$2 ? tryNumberObject(value) : toStr$1.call(value) === numClass;
16676
+ return hasToStringTag$1 ? tryNumberObject(value) : toStr$1.call(value) === numClass;
16508
16677
  };
16509
16678
 
16510
- var callBound$4 = callBound$c;
16511
- var $boolToStr = callBound$4('Boolean.prototype.toString');
16512
- var $toString$1 = callBound$4('Object.prototype.toString');
16679
+ var callBound$3 = callBound$b;
16680
+ var $boolToStr = callBound$3('Boolean.prototype.toString');
16681
+ var $toString = callBound$3('Object.prototype.toString');
16513
16682
 
16514
16683
  var tryBooleanObject = function booleanBrandCheck(value) {
16515
16684
  try {
@@ -16520,7 +16689,7 @@ var tryBooleanObject = function booleanBrandCheck(value) {
16520
16689
  }
16521
16690
  };
16522
16691
  var boolClass = '[object Boolean]';
16523
- var hasToStringTag$1 = shams();
16692
+ var hasToStringTag = shams();
16524
16693
 
16525
16694
  var isBooleanObject = function isBoolean(value) {
16526
16695
  if (typeof value === 'boolean') {
@@ -16529,7 +16698,7 @@ var isBooleanObject = function isBoolean(value) {
16529
16698
  if (value === null || typeof value !== 'object') {
16530
16699
  return false;
16531
16700
  }
16532
- return hasToStringTag$1 && Symbol.toStringTag in value ? tryBooleanObject(value) : $toString$1(value) === boolClass;
16701
+ return hasToStringTag && Symbol.toStringTag in value ? tryBooleanObject(value) : $toString(value) === boolClass;
16533
16702
  };
16534
16703
 
16535
16704
  var isSymbol$1 = {exports: {}};
@@ -16775,14 +16944,14 @@ var isWeakmap = exported || function isWeakMap(x) {
16775
16944
  var isWeakset = {exports: {}};
16776
16945
 
16777
16946
  var GetIntrinsic$1 = getIntrinsic;
16778
- var callBound$3 = callBound$c;
16947
+ var callBound$2 = callBound$b;
16779
16948
 
16780
16949
  var $WeakSet = GetIntrinsic$1('%WeakSet%', true);
16781
16950
 
16782
- var $setHas$1 = callBound$3('WeakSet.prototype.has', true);
16951
+ var $setHas$1 = callBound$2('WeakSet.prototype.has', true);
16783
16952
 
16784
16953
  if ($setHas$1) {
16785
- var $mapHas$1 = callBound$3('WeakMap.prototype.has', true);
16954
+ var $mapHas$1 = callBound$2('WeakMap.prototype.has', true);
16786
16955
 
16787
16956
  isWeakset.exports = function isWeakSet(x) {
16788
16957
  if (!x || typeof x !== 'object') {
@@ -16834,61 +17003,7 @@ var whichCollection$1 = function whichCollection(value) {
16834
17003
  return false;
16835
17004
  };
16836
17005
 
16837
- var forEach = forEach_1;
16838
- var availableTypedArrays = availableTypedArrays$2;
16839
- var callBound$2 = callBound$c;
16840
- var gOPD = gopd;
16841
-
16842
- var $toString = callBound$2('Object.prototype.toString');
16843
- var hasToStringTag = shams();
16844
-
16845
- var g = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
16846
- var typedArrays = availableTypedArrays();
16847
-
16848
- var $slice = callBound$2('String.prototype.slice');
16849
- var toStrTags = {};
16850
- var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');
16851
- if (hasToStringTag && gOPD && getPrototypeOf) {
16852
- forEach(typedArrays, function (typedArray) {
16853
- if (typeof g[typedArray] === 'function') {
16854
- var arr = new g[typedArray]();
16855
- if (Symbol.toStringTag in arr) {
16856
- var proto = getPrototypeOf(arr);
16857
- var descriptor = gOPD(proto, Symbol.toStringTag);
16858
- if (!descriptor) {
16859
- var superProto = getPrototypeOf(proto);
16860
- descriptor = gOPD(superProto, Symbol.toStringTag);
16861
- }
16862
- toStrTags[typedArray] = descriptor.get;
16863
- }
16864
- }
16865
- });
16866
- }
16867
-
16868
- var tryTypedArrays = function tryAllTypedArrays(value) {
16869
- var foundName = false;
16870
- forEach(toStrTags, function (getter, typedArray) {
16871
- if (!foundName) {
16872
- try {
16873
- var name = getter.call(value);
16874
- if (name === typedArray) {
16875
- foundName = name;
16876
- }
16877
- } catch (e) {}
16878
- }
16879
- });
16880
- return foundName;
16881
- };
16882
-
16883
- var isTypedArray = isTypedArray$2;
16884
-
16885
- var whichTypedArray$1 = function whichTypedArray(value) {
16886
- if (!isTypedArray(value)) { return false; }
16887
- if (!hasToStringTag || !(Symbol.toStringTag in value)) { return $slice($toString(value), 8, -1); }
16888
- return tryTypedArrays(value);
16889
- };
16890
-
16891
- var callBound$1 = callBound$c;
17006
+ var callBound$1 = callBound$b;
16892
17007
  var $byteLength = callBound$1('ArrayBuffer.prototype.byteLength', true);
16893
17008
 
16894
17009
  var isArrayBuffer$1 = isArrayBuffer$2;
@@ -16901,7 +17016,7 @@ var arrayBufferByteLength = function byteLength(ab) {
16901
17016
  }; // in node < 0.11, byteLength is an own nonconfigurable property
16902
17017
 
16903
17018
  var assign = object_assign;
16904
- var callBound = callBound$c;
17019
+ var callBound = callBound$b;
16905
17020
  var flags = regexp_prototype_flags;
16906
17021
  var GetIntrinsic = getIntrinsic;
16907
17022
  var getIterator = node;
@@ -16916,7 +17031,7 @@ var isSharedArrayBuffer = isSharedArrayBuffer$1;
16916
17031
  var objectKeys = objectKeys$2;
16917
17032
  var whichBoxedPrimitive = whichBoxedPrimitive$1;
16918
17033
  var whichCollection = whichCollection$1;
16919
- var whichTypedArray = whichTypedArray$1;
17034
+ var whichTypedArray = whichTypedArray$2;
16920
17035
  var byteLength = arrayBufferByteLength;
16921
17036
 
16922
17037
  var sabByteLength = callBound('SharedArrayBuffer.prototype.byteLength', true);
@@ -18103,7 +18218,7 @@ function createDOMElementFilter(filterNode) {
18103
18218
  return {
18104
18219
  test: val => {
18105
18220
  var _val$constructor2;
18106
- return (val == null ? void 0 : (_val$constructor2 = val.constructor) == null ? void 0 : _val$constructor2.name) && testNode(val);
18221
+ return (val == null || (_val$constructor2 = val.constructor) == null ? void 0 : _val$constructor2.name) && testNode(val);
18107
18222
  },
18108
18223
  serialize: (node, config, indentation, depth, refs, printer) => {
18109
18224
  if (nodeIsText(node)) {
@@ -18199,7 +18314,7 @@ function getDocument$2() {
18199
18314
  }
18200
18315
  return window.document;
18201
18316
  }
18202
- function getWindowFromNode$1(node) {
18317
+ function getWindowFromNode$2(node) {
18203
18318
  if (node.defaultView) {
18204
18319
  // node is document
18205
18320
  return node.defaultView;
@@ -18237,8 +18352,8 @@ function checkContainerType$1(container) {
18237
18352
  const shouldHighlight = () => {
18238
18353
  let colors;
18239
18354
  try {
18240
- var _process, _process$env;
18241
- colors = JSON.parse((_process = process) == null ? void 0 : (_process$env = _process.env) == null ? void 0 : _process$env.COLORS);
18355
+ var _process;
18356
+ colors = JSON.parse((_process = process) == null || (_process = _process.env) == null ? void 0 : _process.COLORS);
18242
18357
  } catch (e) {
18243
18358
  // If this throws, process?.env?.COLORS wasn't parsable. Since we only
18244
18359
  // care about `true` or `false`, we can safely ignore the error.
@@ -18261,7 +18376,7 @@ const COMMENT_NODE = 8;
18261
18376
 
18262
18377
  // https://github.com/facebook/jest/blob/615084195ae1ae61ddd56162c62bbdda17587569/packages/pretty-format/src/plugins/DOMElement.ts#L50
18263
18378
  function filterCommentsAndDefaultIgnoreTagsTags(value) {
18264
- return value.nodeType !== COMMENT_NODE && (value.nodeType !== ELEMENT_NODE || !value.matches(getConfig().defaultIgnore));
18379
+ return value.nodeType !== COMMENT_NODE && (value.nodeType !== ELEMENT_NODE || !value.matches(getConfig$3().defaultIgnore));
18265
18380
  }
18266
18381
  function prettyDOM(dom, maxLength, options) {
18267
18382
  if (options === void 0) {
@@ -18365,7 +18480,7 @@ function configure(newConfig) {
18365
18480
  ...newConfig
18366
18481
  };
18367
18482
  }
18368
- function getConfig() {
18483
+ function getConfig$3() {
18369
18484
  return config;
18370
18485
  }
18371
18486
 
@@ -18702,12 +18817,12 @@ function prettyRoles(dom, _ref6) {
18702
18817
  const delimiterBar = '-'.repeat(50);
18703
18818
  const elementsString = elements.map(el => {
18704
18819
  const nameString = "Name \"" + computeAccessibleName(el, {
18705
- computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
18820
+ computedStyleSupportsPseudoElements: getConfig$3().computedStyleSupportsPseudoElements
18706
18821
  }) + "\":\n";
18707
18822
  const domString = prettyDOM(el.cloneNode(false));
18708
18823
  if (includeDescription) {
18709
18824
  const descriptionString = "Description \"" + computeAccessibleDescription(el, {
18710
- computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
18825
+ computedStyleSupportsPseudoElements: getConfig$3().computedStyleSupportsPseudoElements
18711
18826
  }) + "\":\n";
18712
18827
  return "" + nameString + descriptionString + domString;
18713
18828
  }
@@ -18716,6 +18831,14 @@ function prettyRoles(dom, _ref6) {
18716
18831
  return role + ":\n\n" + elementsString + "\n\n" + delimiterBar;
18717
18832
  }).join('\n');
18718
18833
  }
18834
+ const logRoles = function (dom, _temp2) {
18835
+ let {
18836
+ hidden = false
18837
+ } = _temp2 === void 0 ? {} : _temp2;
18838
+ return console.log(prettyRoles(dom, {
18839
+ hidden
18840
+ }));
18841
+ };
18719
18842
 
18720
18843
  /**
18721
18844
  * @param {Element} element -
@@ -18911,7 +19034,7 @@ function getSuggestedQuery(element, variant, method) {
18911
19034
  variant = 'get';
18912
19035
  }
18913
19036
  // don't create suggestions for script and style elements
18914
- if (element.matches(getConfig().defaultIgnore)) {
19037
+ if (element.matches(getConfig$3().defaultIgnore)) {
18915
19038
  return undefined;
18916
19039
  }
18917
19040
 
@@ -18921,7 +19044,7 @@ function getSuggestedQuery(element, variant, method) {
18921
19044
  return makeSuggestion('Role', element, role, {
18922
19045
  variant,
18923
19046
  name: computeAccessibleName(element, {
18924
- computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
19047
+ computedStyleSupportsPseudoElements: getConfig$3().computedStyleSupportsPseudoElements
18925
19048
  })
18926
19049
  });
18927
19050
  }
@@ -18960,7 +19083,7 @@ function getSuggestedQuery(element, variant, method) {
18960
19083
  variant
18961
19084
  });
18962
19085
  }
18963
- const testId = element.getAttribute(getConfig().testIdAttribute);
19086
+ const testId = element.getAttribute(getConfig$3().testIdAttribute);
18964
19087
  if (canSuggest('TestId', method, testId)) {
18965
19088
  return makeSuggestion('TestId', element, testId, {
18966
19089
  variant
@@ -18977,12 +19100,14 @@ function copyStackTrace(target, source) {
18977
19100
  function waitFor(callback, _ref) {
18978
19101
  let {
18979
19102
  container = getDocument$2(),
18980
- timeout = getConfig().asyncUtilTimeout,
18981
- showOriginalStackTrace = getConfig().showOriginalStackTrace,
19103
+ timeout = getConfig$3().asyncUtilTimeout,
19104
+ showOriginalStackTrace = getConfig$3().showOriginalStackTrace,
18982
19105
  stackTraceError,
18983
19106
  interval = 50,
18984
19107
  onTimeout = error => {
18985
- error.message = getConfig().getElementError(error.message, container).message;
19108
+ Object.defineProperty(error, 'message', {
19109
+ value: getConfig$3().getElementError(error.message, container).message
19110
+ });
18986
19111
  return error;
18987
19112
  },
18988
19113
  mutationObserverOptions = {
@@ -19004,7 +19129,7 @@ function waitFor(callback, _ref) {
19004
19129
  if (usingJestFakeTimers) {
19005
19130
  const {
19006
19131
  unstable_advanceTimersWrapper: advanceTimersWrapper
19007
- } = getConfig();
19132
+ } = getConfig$3();
19008
19133
  checkCallback();
19009
19134
  // this is a dangerous rule to disable because it could lead to an
19010
19135
  // infinite loop. However, eslint isn't smart enough to know that we're
@@ -19052,7 +19177,7 @@ function waitFor(callback, _ref) {
19052
19177
  intervalId = setInterval(checkRealTimersCallback, interval);
19053
19178
  const {
19054
19179
  MutationObserver
19055
- } = getWindowFromNode$1(container);
19180
+ } = getWindowFromNode$2(container);
19056
19181
  observer = new MutationObserver(checkRealTimersCallback);
19057
19182
  observer.observe(container, mutationObserverOptions);
19058
19183
  checkCallback();
@@ -19122,7 +19247,7 @@ function waitForWrapper(callback, options) {
19122
19247
  // create the error here so its stack trace is as close to the
19123
19248
  // calling code as possible
19124
19249
  const stackTraceError = new Error('STACK_TRACE_MESSAGE');
19125
- return getConfig().asyncWrapper(() => waitFor(callback, {
19250
+ return getConfig$3().asyncWrapper(() => waitFor(callback, {
19126
19251
  stackTraceError,
19127
19252
  ...options
19128
19253
  }));
@@ -19134,7 +19259,7 @@ eslint
19134
19259
  */
19135
19260
 
19136
19261
  function getElementError(message, container) {
19137
- return getConfig().getElementError(message, container);
19262
+ return getConfig$3().getElementError(message, container);
19138
19263
  }
19139
19264
  function getMultipleElementsFoundError(message, container) {
19140
19265
  return getElementError(message + "\n\n(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).", container);
@@ -19154,6 +19279,13 @@ function queryAllByAttribute(attribute, container, text, _temp) {
19154
19279
  });
19155
19280
  return Array.from(container.querySelectorAll("[" + attribute + "]")).filter(node => matcher(node.getAttribute(attribute), node, text, matchNormalizer));
19156
19281
  }
19282
+ function queryByAttribute(attribute, container, text, options) {
19283
+ const els = queryAllByAttribute(attribute, container, text, options);
19284
+ if (els.length > 1) {
19285
+ throw getMultipleElementsFoundError("Found multiple elements by [" + attribute + "=" + text + "]", container);
19286
+ }
19287
+ return els[0] || null;
19288
+ }
19157
19289
 
19158
19290
  // this accepts a query function and returns a function which throws an error
19159
19291
  // if more than one elements is returned, otherwise it returns the first
@@ -19172,7 +19304,7 @@ function makeSingleQuery(allQuery, getMultipleError) {
19172
19304
  };
19173
19305
  }
19174
19306
  function getSuggestionError(suggestion, container) {
19175
- return getConfig().getElementError("A better query is available, try this:\n" + suggestion.toString() + "\n", container);
19307
+ return getConfig$3().getElementError("A better query is available, try this:\n" + suggestion.toString() + "\n", container);
19176
19308
  }
19177
19309
 
19178
19310
  // this accepts a query function and returns a function which throws an error
@@ -19184,7 +19316,7 @@ function makeGetAllQuery(allQuery, getMissingError) {
19184
19316
  }
19185
19317
  const els = allQuery(container, ...args);
19186
19318
  if (!els.length) {
19187
- throw getConfig().getElementError(getMissingError(container, ...args), container);
19319
+ throw getConfig$3().getElementError(getMissingError(container, ...args), container);
19188
19320
  }
19189
19321
  return els;
19190
19322
  };
@@ -19208,7 +19340,7 @@ const wrapSingleQueryWithSuggestion = (query, queryAllByName, variant) => functi
19208
19340
  }
19209
19341
  const element = query(container, ...args);
19210
19342
  const [{
19211
- suggest = getConfig().throwSuggestions
19343
+ suggest = getConfig$3().throwSuggestions
19212
19344
  } = {}] = args.slice(-1);
19213
19345
  if (element && suggest) {
19214
19346
  const suggestion = getSuggestedQuery(element, variant);
@@ -19224,7 +19356,7 @@ const wrapAllByQueryWithSuggestion = (query, queryAllByName, variant) => functio
19224
19356
  }
19225
19357
  const els = query(container, ...args);
19226
19358
  const [{
19227
- suggest = getConfig().throwSuggestions
19359
+ suggest = getConfig$3().throwSuggestions
19228
19360
  } = {}] = args.slice(-1);
19229
19361
  if (els.length && suggest) {
19230
19362
  // get a unique list of all suggestion messages. We are only going to make a suggestion if
@@ -19258,6 +19390,20 @@ function buildQueries(queryAllBy, getMultipleError, getMissingError) {
19258
19390
  return [queryBy, getAllWithSuggestions, getByWithSuggestions, findAllBy, findBy];
19259
19391
  }
19260
19392
 
19393
+ var queryHelpers = /*#__PURE__*/Object.freeze({
19394
+ __proto__: null,
19395
+ getElementError: getElementError,
19396
+ wrapAllByQueryWithSuggestion: wrapAllByQueryWithSuggestion,
19397
+ wrapSingleQueryWithSuggestion: wrapSingleQueryWithSuggestion,
19398
+ getMultipleElementsFoundError: getMultipleElementsFoundError,
19399
+ queryAllByAttribute: queryAllByAttribute,
19400
+ queryByAttribute: queryByAttribute,
19401
+ makeSingleQuery: makeSingleQuery,
19402
+ makeGetAllQuery: makeGetAllQuery,
19403
+ makeFindQuery: makeFindQuery,
19404
+ buildQueries: buildQueries
19405
+ });
19406
+
19261
19407
  function queryAllLabels(container) {
19262
19408
  return Array.from(container.querySelectorAll('label,input')).map(node => {
19263
19409
  return {
@@ -19367,12 +19513,12 @@ const getAllByLabelText = function (container, text) {
19367
19513
  if (labels.length) {
19368
19514
  const tagNames = labels.map(label => getTagNameOfElementAssociatedWithLabelViaFor(container, label)).filter(tagName => !!tagName);
19369
19515
  if (tagNames.length) {
19370
- throw getConfig().getElementError(tagNames.map(tagName => "Found a label with the text of: " + text + ", however the element associated with this label (<" + tagName + " />) is non-labellable [https://html.spec.whatwg.org/multipage/forms.html#category-label]. If you really need to label a <" + tagName + " />, you can use aria-label or aria-labelledby instead.").join('\n\n'), container);
19516
+ throw getConfig$3().getElementError(tagNames.map(tagName => "Found a label with the text of: " + text + ", however the element associated with this label (<" + tagName + " />) is non-labellable [https://html.spec.whatwg.org/multipage/forms.html#category-label]. If you really need to label a <" + tagName + " />, you can use aria-label or aria-labelledby instead.").join('\n\n'), container);
19371
19517
  } else {
19372
- throw getConfig().getElementError("Found a label with the text of: " + text + ", however no form control was found associated to that label. Make sure you're using the \"for\" attribute or \"aria-labelledby\" attribute correctly.", container);
19518
+ throw getConfig$3().getElementError("Found a label with the text of: " + text + ", however no form control was found associated to that label. Make sure you're using the \"for\" attribute or \"aria-labelledby\" attribute correctly.", container);
19373
19519
  }
19374
19520
  } else {
19375
- throw getConfig().getElementError("Unable to find a label with the text of: " + text, container);
19521
+ throw getConfig$3().getElementError("Unable to find a label with the text of: " + text, container);
19376
19522
  }
19377
19523
  }
19378
19524
  return els;
@@ -19414,7 +19560,7 @@ const queryAllByText = function (container, text, _temp) {
19414
19560
  exact = true,
19415
19561
  collapseWhitespace,
19416
19562
  trim,
19417
- ignore = getConfig().defaultIgnore,
19563
+ ignore = getConfig$3().defaultIgnore,
19418
19564
  normalizer
19419
19565
  } = _temp === void 0 ? {} : _temp;
19420
19566
  checkContainerType$1(container);
@@ -19526,7 +19672,7 @@ const [queryByTitle, getAllByTitle, getByTitle, findAllByTitle, findByTitle] = b
19526
19672
  /* eslint-disable complexity */
19527
19673
  const queryAllByRole = function (container, role, _temp) {
19528
19674
  let {
19529
- hidden = getConfig().defaultHidden,
19675
+ hidden = getConfig$3().defaultHidden,
19530
19676
  name,
19531
19677
  description,
19532
19678
  queryFallbacks = false,
@@ -19695,7 +19841,7 @@ const queryAllByRole = function (container, role, _temp) {
19695
19841
  return true;
19696
19842
  }
19697
19843
  return matches(computeAccessibleName(element, {
19698
- computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
19844
+ computedStyleSupportsPseudoElements: getConfig$3().computedStyleSupportsPseudoElements
19699
19845
  }), element, name, text => text);
19700
19846
  }).filter(element => {
19701
19847
  if (description === undefined) {
@@ -19703,7 +19849,7 @@ const queryAllByRole = function (container, role, _temp) {
19703
19849
  return true;
19704
19850
  }
19705
19851
  return matches(computeAccessibleDescription(element, {
19706
- computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements
19852
+ computedStyleSupportsPseudoElements: getConfig$3().computedStyleSupportsPseudoElements
19707
19853
  }), element, description, text => text);
19708
19854
  }).filter(element => {
19709
19855
  return hidden === false ? isInaccessible(element, {
@@ -19746,11 +19892,11 @@ const getMultipleError$1 = function (c, role, _temp2) {
19746
19892
  };
19747
19893
  const getMissingError$1 = function (container, role, _temp3) {
19748
19894
  let {
19749
- hidden = getConfig().defaultHidden,
19895
+ hidden = getConfig$3().defaultHidden,
19750
19896
  name,
19751
19897
  description
19752
19898
  } = _temp3 === void 0 ? {} : _temp3;
19753
- if (getConfig()._disableExpensiveErrorDiagnostics) {
19899
+ if (getConfig$3()._disableExpensiveErrorDiagnostics) {
19754
19900
  return "Unable to find role=\"" + role + "\"" + getNameHint(name);
19755
19901
  }
19756
19902
  let roles = '';
@@ -19791,7 +19937,7 @@ const getMissingError$1 = function (container, role, _temp3) {
19791
19937
  const queryAllByRoleWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByRole, queryAllByRole.name, 'queryAll');
19792
19938
  const [queryByRole, getAllByRole, getByRole, findAllByRole, findByRole] = buildQueries(queryAllByRole, getMultipleError$1, getMissingError$1);
19793
19939
 
19794
- const getTestIdAttribute = () => getConfig().testIdAttribute;
19940
+ const getTestIdAttribute = () => getConfig$3().testIdAttribute;
19795
19941
  const queryAllByTestId = function () {
19796
19942
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
19797
19943
  args[_key] = arguments[_key];
@@ -19880,6 +20026,47 @@ function getQueriesForElement(element, queries$1, initialValue) {
19880
20026
  }, initialValue);
19881
20027
  }
19882
20028
 
20029
+ const isRemoved = result => !result || Array.isArray(result) && !result.length;
20030
+
20031
+ // Check if the element is not present.
20032
+ // As the name implies, waitForElementToBeRemoved should check `present` --> `removed`
20033
+ function initialCheck(elements) {
20034
+ if (isRemoved(elements)) {
20035
+ throw new Error('The element(s) given to waitForElementToBeRemoved are already removed. waitForElementToBeRemoved requires that the element(s) exist(s) before waiting for removal.');
20036
+ }
20037
+ }
20038
+ async function waitForElementToBeRemoved(callback, options) {
20039
+ // created here so we get a nice stacktrace
20040
+ const timeoutError = new Error('Timed out in waitForElementToBeRemoved.');
20041
+ if (typeof callback !== 'function') {
20042
+ initialCheck(callback);
20043
+ const elements = Array.isArray(callback) ? callback : [callback];
20044
+ const getRemainingElements = elements.map(element => {
20045
+ let parent = element.parentElement;
20046
+ if (parent === null) return () => null;
20047
+ while (parent.parentElement) parent = parent.parentElement;
20048
+ return () => parent.contains(element) ? element : null;
20049
+ });
20050
+ callback = () => getRemainingElements.map(c => c()).filter(Boolean);
20051
+ }
20052
+ initialCheck(callback());
20053
+ return waitForWrapper(() => {
20054
+ let result;
20055
+ try {
20056
+ result = callback();
20057
+ } catch (error) {
20058
+ if (error.name === 'TestingLibraryElementError') {
20059
+ return undefined;
20060
+ }
20061
+ throw error;
20062
+ }
20063
+ if (!isRemoved(result)) {
20064
+ throw timeoutError;
20065
+ }
20066
+ return undefined;
20067
+ }, options);
20068
+ }
20069
+
19883
20070
  /*
19884
20071
  eslint
19885
20072
  require-await: "off"
@@ -20578,7 +20765,7 @@ const eventAliasMap$1 = {
20578
20765
  };
20579
20766
 
20580
20767
  function fireEvent(element, event) {
20581
- return getConfig().eventWrapper(() => {
20768
+ return getConfig$3().eventWrapper(() => {
20582
20769
  if (!event) {
20583
20770
  throw new Error("Unable to fire an event - please provide an event object.");
20584
20771
  }
@@ -20622,7 +20809,7 @@ function createEvent$1(eventName, node, init, _temp) {
20622
20809
  });
20623
20810
  }
20624
20811
  Object.assign(node, targetProperties);
20625
- const window = getWindowFromNode$1(node);
20812
+ const window = getWindowFromNode$2(node);
20626
20813
  const EventConstructor = window[EventType] || window.Event;
20627
20814
  let event;
20628
20815
  /* istanbul ignore else */
@@ -20746,7 +20933,7 @@ const initialValue = {
20746
20933
  debug,
20747
20934
  logTestingPlaygroundURL
20748
20935
  };
20749
- typeof document !== 'undefined' && document.body // eslint-disable-line @typescript-eslint/no-unnecessary-condition
20936
+ const screen = typeof document !== 'undefined' && document.body // eslint-disable-line @typescript-eslint/no-unnecessary-condition
20750
20937
  ? getQueriesForElement(document.body, queries, initialValue) : Object.keys(queries).reduce((helpers, key) => {
20751
20938
  // `key` is for all intents and purposes the type of keyof `helpers`, which itself is the type of `initialValue` plus incoming properties from `queries`
20752
20939
  // if `Object.keys(something)` returned Array<keyof typeof something> this explicit type assertion would not be necessary
@@ -20757,6 +20944,88 @@ typeof document !== 'undefined' && document.body // eslint-disable-line @typescr
20757
20944
  return helpers;
20758
20945
  }, initialValue);
20759
20946
 
20947
+ var named$1 = /*#__PURE__*/Object.freeze({
20948
+ __proto__: null,
20949
+ buildQueries: buildQueries,
20950
+ configure: configure,
20951
+ createEvent: createEvent$1,
20952
+ findAllByAltText: findAllByAltText,
20953
+ findAllByDisplayValue: findAllByDisplayValue,
20954
+ findAllByLabelText: findAllByLabelText,
20955
+ findAllByPlaceholderText: findAllByPlaceholderText,
20956
+ findAllByRole: findAllByRole,
20957
+ findAllByTestId: findAllByTestId,
20958
+ findAllByText: findAllByText,
20959
+ findAllByTitle: findAllByTitle,
20960
+ findByAltText: findByAltText,
20961
+ findByDisplayValue: findByDisplayValue,
20962
+ findByLabelText: findByLabelText,
20963
+ findByPlaceholderText: findByPlaceholderText,
20964
+ findByRole: findByRole,
20965
+ findByTestId: findByTestId,
20966
+ findByText: findByText,
20967
+ findByTitle: findByTitle,
20968
+ fireEvent: fireEvent,
20969
+ getAllByAltText: getAllByAltText,
20970
+ getAllByDisplayValue: getAllByDisplayValue,
20971
+ getAllByLabelText: getAllByLabelTextWithSuggestions,
20972
+ getAllByPlaceholderText: getAllByPlaceholderText,
20973
+ getAllByRole: getAllByRole,
20974
+ getAllByTestId: getAllByTestId,
20975
+ getAllByText: getAllByText,
20976
+ getAllByTitle: getAllByTitle,
20977
+ getByAltText: getByAltText,
20978
+ getByDisplayValue: getByDisplayValue,
20979
+ getByLabelText: getByLabelTextWithSuggestions,
20980
+ getByPlaceholderText: getByPlaceholderText,
20981
+ getByRole: getByRole,
20982
+ getByTestId: getByTestId,
20983
+ getByText: getByText,
20984
+ getByTitle: getByTitle,
20985
+ getConfig: getConfig$3,
20986
+ getDefaultNormalizer: getDefaultNormalizer,
20987
+ getElementError: getElementError,
20988
+ getMultipleElementsFoundError: getMultipleElementsFoundError,
20989
+ getNodeText: getNodeText,
20990
+ getQueriesForElement: getQueriesForElement,
20991
+ getRoles: getRoles,
20992
+ getSuggestedQuery: getSuggestedQuery,
20993
+ isInaccessible: isInaccessible,
20994
+ logDOM: logDOM,
20995
+ logRoles: logRoles,
20996
+ makeFindQuery: makeFindQuery,
20997
+ makeGetAllQuery: makeGetAllQuery,
20998
+ makeSingleQuery: makeSingleQuery,
20999
+ prettyDOM: prettyDOM,
21000
+ prettyFormat: index,
21001
+ queries: queries,
21002
+ queryAllByAltText: queryAllByAltTextWithSuggestions,
21003
+ queryAllByAttribute: queryAllByAttribute,
21004
+ queryAllByDisplayValue: queryAllByDisplayValueWithSuggestions,
21005
+ queryAllByLabelText: queryAllByLabelTextWithSuggestions,
21006
+ queryAllByPlaceholderText: queryAllByPlaceholderTextWithSuggestions,
21007
+ queryAllByRole: queryAllByRoleWithSuggestions,
21008
+ queryAllByTestId: queryAllByTestIdWithSuggestions,
21009
+ queryAllByText: queryAllByTextWithSuggestions,
21010
+ queryAllByTitle: queryAllByTitleWithSuggestions,
21011
+ queryByAltText: queryByAltText,
21012
+ queryByAttribute: queryByAttribute,
21013
+ queryByDisplayValue: queryByDisplayValue,
21014
+ queryByLabelText: queryByLabelText,
21015
+ queryByPlaceholderText: queryByPlaceholderText,
21016
+ queryByRole: queryByRole,
21017
+ queryByTestId: queryByTestId,
21018
+ queryByText: queryByText,
21019
+ queryByTitle: queryByTitle,
21020
+ queryHelpers: queryHelpers,
21021
+ screen: screen,
21022
+ waitFor: waitForWrapper,
21023
+ waitForElementToBeRemoved: waitForElementToBeRemoved,
21024
+ within: getQueriesForElement,
21025
+ wrapAllByQueryWithSuggestion: wrapAllByQueryWithSuggestion,
21026
+ wrapSingleQueryWithSuggestion: wrapSingleQueryWithSuggestion
21027
+ });
21028
+
20760
21029
  const domAct = testUtils__namespace.act;
20761
21030
  function getGlobalThis() {
20762
21031
  /* istanbul ignore else */
@@ -20980,15 +21249,15 @@ var helpers = {};
20980
21249
  Object.defineProperty(helpers, "__esModule", {
20981
21250
  value: true
20982
21251
  });
20983
- helpers.TEXT_NODE = void 0;
20984
- helpers.checkContainerType = checkContainerType;
20985
- helpers.getDocument = getDocument$1;
20986
- var getWindowFromNode_1 = helpers.getWindowFromNode = getWindowFromNode;
20987
- helpers.jestFakeTimersAreEnabled = jestFakeTimersAreEnabled;
21252
+ var TEXT_NODE_1 = helpers.TEXT_NODE = void 0;
21253
+ var checkContainerType_1 = helpers.checkContainerType = checkContainerType;
21254
+ var getDocument_1 = helpers.getDocument = getDocument$1;
21255
+ var getWindowFromNode_1 = helpers.getWindowFromNode = getWindowFromNode$1;
21256
+ var jestFakeTimersAreEnabled_1 = helpers.jestFakeTimersAreEnabled = jestFakeTimersAreEnabled;
20988
21257
  // Constant node.nodeType for text nodes, see:
20989
21258
  // https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType#Node_type_constants
20990
21259
  const TEXT_NODE = 3;
20991
- helpers.TEXT_NODE = TEXT_NODE;
21260
+ TEXT_NODE_1 = helpers.TEXT_NODE = TEXT_NODE;
20992
21261
  function jestFakeTimersAreEnabled() {
20993
21262
  /* istanbul ignore else */
20994
21263
  // eslint-disable-next-line
@@ -21011,7 +21280,7 @@ function getDocument$1() {
21011
21280
  }
21012
21281
  return window.document;
21013
21282
  }
21014
- function getWindowFromNode(node) {
21283
+ function getWindowFromNode$1(node) {
21015
21284
  if (node.defaultView) {
21016
21285
  // node is document
21017
21286
  return node.defaultView;
@@ -21046,8 +21315,19 @@ function checkContainerType(container) {
21046
21315
  }
21047
21316
  }
21048
21317
 
21318
+ var named = /*#__PURE__*/_mergeNamespaces({
21319
+ __proto__: null,
21320
+ get TEXT_NODE () { return TEXT_NODE_1; },
21321
+ checkContainerType: checkContainerType_1,
21322
+ default: helpers,
21323
+ getDocument: getDocument_1,
21324
+ getWindowFromNode: getWindowFromNode_1,
21325
+ jestFakeTimersAreEnabled: jestFakeTimersAreEnabled_1
21326
+ }, [helpers]);
21327
+
21328
+ const { getWindowFromNode } = named;
21049
21329
  function getWindow(node) {
21050
- return getWindowFromNode_1(node);
21330
+ return getWindowFromNode(node);
21051
21331
  }
21052
21332
 
21053
21333
  // jsdom does not implement Blob.text()
@@ -21084,6 +21364,19 @@ function createFileList(window, files) {
21084
21364
  return list;
21085
21365
  }
21086
21366
 
21367
+ function _define_property$8(obj, key, value) {
21368
+ if (key in obj) {
21369
+ Object.defineProperty(obj, key, {
21370
+ value: value,
21371
+ enumerable: true,
21372
+ configurable: true,
21373
+ writable: true
21374
+ });
21375
+ } else {
21376
+ obj[key] = value;
21377
+ }
21378
+ return obj;
21379
+ }
21087
21380
  // DataTransfer is not implemented in jsdom.
21088
21381
  // DataTransfer with FileList is being created by the browser on certain events.
21089
21382
  class DataTransferItemStub {
@@ -21099,8 +21392,10 @@ class DataTransferItemStub {
21099
21392
  throw new Error('not implemented');
21100
21393
  }
21101
21394
  constructor(dataOrFile, type){
21102
- this.file = null;
21103
- this.data = undefined;
21395
+ _define_property$8(this, "kind", void 0);
21396
+ _define_property$8(this, "type", void 0);
21397
+ _define_property$8(this, "file", null);
21398
+ _define_property$8(this, "data", undefined);
21104
21399
  if (typeof dataOrFile === 'string') {
21105
21400
  this.kind = 'string';
21106
21401
  this.type = String(type);
@@ -21135,8 +21430,8 @@ function getTypeMatcher(type, exact) {
21135
21430
  function createDataTransferStub(window) {
21136
21431
  return new class DataTransferStub {
21137
21432
  getData(format) {
21138
- var ref;
21139
- const match = (ref = this.items.find(getTypeMatcher(format, true))) !== null && ref !== void 0 ? ref : this.items.find(getTypeMatcher(format, false));
21433
+ var _this_items_find;
21434
+ const match = (_this_items_find = this.items.find(getTypeMatcher(format, true))) !== null && _this_items_find !== void 0 ? _this_items_find : this.items.find(getTypeMatcher(format, false));
21140
21435
  let text = '';
21141
21436
  match === null || match === void 0 ? void 0 : match.getAsString((t)=>{
21142
21437
  text = t;
@@ -21173,10 +21468,10 @@ function createDataTransferStub(window) {
21173
21468
  }
21174
21469
  /* istanbul ignore next */ setDragImage() {}
21175
21470
  constructor(){
21176
- this.dropEffect = 'none';
21177
- this.effectAllowed = 'uninitialized';
21178
- this.items = new DataTransferItemListStub();
21179
- this.files = createFileList(window, []);
21471
+ _define_property$8(this, "dropEffect", 'none');
21472
+ _define_property$8(this, "effectAllowed", 'uninitialized');
21473
+ _define_property$8(this, "items", new DataTransferItemListStub());
21474
+ _define_property$8(this, "files", createFileList(window, []));
21180
21475
  }
21181
21476
  }();
21182
21477
  }
@@ -21204,13 +21499,26 @@ function getBlobFromDataTransferItem(window, item) {
21204
21499
  }
21205
21500
 
21206
21501
  // Clipboard is not available in jsdom
21502
+ function _define_property$7(obj, key, value) {
21503
+ if (key in obj) {
21504
+ Object.defineProperty(obj, key, {
21505
+ value: value,
21506
+ enumerable: true,
21507
+ configurable: true,
21508
+ writable: true
21509
+ });
21510
+ } else {
21511
+ obj[key] = value;
21512
+ }
21513
+ return obj;
21514
+ }
21207
21515
  // MDN lists string|Blob|Promise<Blob|string> as possible types in ClipboardItemData
21208
21516
  // lib.dom.d.ts lists only Promise<Blob|string>
21209
21517
  // https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem/ClipboardItem#syntax
21210
21518
  function createClipboardItem(window, ...blobs) {
21211
21519
  const dataMap = Object.fromEntries(blobs.map((b)=>[
21212
21520
  typeof b === 'string' ? 'text/plain' : b.type,
21213
- Promise.resolve(b),
21521
+ Promise.resolve(b)
21214
21522
  ]));
21215
21523
  // use real ClipboardItem if available
21216
21524
  /* istanbul ignore if */ if (typeof window.ClipboardItem !== 'undefined') {
@@ -21232,6 +21540,7 @@ function createClipboardItem(window, ...blobs) {
21232
21540
  });
21233
21541
  }
21234
21542
  constructor(d){
21543
+ _define_property$7(this, "data", void 0);
21235
21544
  this.data = d;
21236
21545
  }
21237
21546
  }(dataMap);
@@ -21262,15 +21571,14 @@ function createClipboardStub(window, control) {
21262
21571
  }
21263
21572
  constructor(...args){
21264
21573
  super(...args);
21265
- this.items = [];
21574
+ _define_property$7(this, "items", []);
21266
21575
  }
21267
21576
  }(), {
21268
21577
  [ClipboardStubControl]: control
21269
21578
  });
21270
21579
  }
21271
21580
  function isClipboardStub(clipboard) {
21272
- var ref;
21273
- return !!((ref = clipboard) === null || ref === void 0 ? void 0 : ref[ClipboardStubControl]);
21581
+ return !!(clipboard === null || clipboard === void 0 ? void 0 : clipboard[ClipboardStubControl]);
21274
21582
  }
21275
21583
  function attachClipboardStubToView(window) {
21276
21584
  if (isClipboardStub(window.navigator.clipboard)) {
@@ -21340,11 +21648,12 @@ async function writeDataTransferToClipboard(document, clipboardData) {
21340
21648
  throw new Error('The Clipboard API is unavailable.');
21341
21649
  }
21342
21650
  }
21343
- /* istanbul ignore else */ if (typeof globalThis.afterEach === 'function') {
21344
- globalThis.afterEach(()=>resetClipboardStubOnView(globalThis.window));
21651
+ const g = globalThis;
21652
+ /* istanbul ignore else */ if (typeof g.afterEach === 'function') {
21653
+ g.afterEach(()=>resetClipboardStubOnView(globalThis.window));
21345
21654
  }
21346
- /* istanbul ignore else */ if (typeof globalThis.afterAll === 'function') {
21347
- globalThis.afterAll(()=>detachClipboardStubFromView(globalThis.window));
21655
+ /* istanbul ignore else */ if (typeof g.afterAll === 'function') {
21656
+ g.afterAll(()=>detachClipboardStubFromView(globalThis.window));
21348
21657
  }
21349
21658
 
21350
21659
  //jsdom is not supporting isContentEditable
@@ -21395,8 +21704,8 @@ var maxLengthSupportedTypes;
21395
21704
  // can't use .maxLength property because of a jsdom bug:
21396
21705
  // https://github.com/jsdom/jsdom/issues/2927
21397
21706
  function getMaxLength(element) {
21398
- var ref;
21399
- const attr = (ref = element.getAttribute('maxlength')) !== null && ref !== void 0 ? ref : '';
21707
+ var _element_getAttribute;
21708
+ const attr = (_element_getAttribute = element.getAttribute('maxlength')) !== null && _element_getAttribute !== void 0 ? _element_getAttribute : '';
21400
21709
  return /^\d+$/.test(attr) && Number(attr) >= 0 ? Number(attr) : undefined;
21401
21710
  }
21402
21711
  function supportsMaxLength(element) {
@@ -21411,7 +21720,7 @@ const FOCUSABLE_SELECTOR = [
21411
21720
  '[contenteditable=""]',
21412
21721
  '[contenteditable="true"]',
21413
21722
  'a[href]',
21414
- '[tabindex]:not([disabled])',
21723
+ '[tabindex]:not([disabled])'
21415
21724
  ].join(', ');
21416
21725
 
21417
21726
  function isFocusable(element) {
@@ -21457,16 +21766,16 @@ function readPrintableChar(text, pos, context) {
21457
21766
  };
21458
21767
  }
21459
21768
  function readTag(text, pos, startBracket, context) {
21460
- var ref, ref1;
21769
+ var _text_slice_match, _text_slice_match1;
21461
21770
  const releasePreviousModifier = text[pos] === '/' ? '/' : '';
21462
21771
  pos += releasePreviousModifier.length;
21463
21772
  const escapedDescriptor = startBracket === '{' && text[pos] === '\\';
21464
21773
  pos += Number(escapedDescriptor);
21465
- const descriptor = escapedDescriptor ? text[pos] : (ref = text.slice(pos).match(startBracket === '{' ? /^\w+|^[^}>/]/ : /^\w+/)) === null || ref === void 0 ? void 0 : ref[0];
21774
+ const descriptor = escapedDescriptor ? text[pos] : (_text_slice_match = text.slice(pos).match(startBracket === '{' ? /^\w+|^[^}>/]/ : /^\w+/)) === null || _text_slice_match === void 0 ? void 0 : _text_slice_match[0];
21466
21775
  assertDescriptor(descriptor, text, pos, context);
21467
21776
  pos += descriptor.length;
21468
- var ref2;
21469
- const repeatModifier = (ref2 = (ref1 = text.slice(pos).match(/^>\d+/)) === null || ref1 === void 0 ? void 0 : ref1[0]) !== null && ref2 !== void 0 ? ref2 : '';
21777
+ var _text_slice_match_;
21778
+ const repeatModifier = (_text_slice_match_ = (_text_slice_match1 = text.slice(pos).match(/^>\d+/)) === null || _text_slice_match1 === void 0 ? void 0 : _text_slice_match1[0]) !== null && _text_slice_match_ !== void 0 ? _text_slice_match_ : '';
21470
21779
  pos += repeatModifier.length;
21471
21780
  const releaseSelfModifier = text[pos] === '/' || !repeatModifier && text[pos] === '>' ? text[pos] : '';
21472
21781
  pos += releaseSelfModifier.length;
@@ -21476,7 +21785,7 @@ function readTag(text, pos, startBracket, context) {
21476
21785
  throw new Error(getErrorMessage([
21477
21786
  !repeatModifier && 'repeat modifier',
21478
21787
  !releaseSelfModifier && 'release modifier',
21479
- `"${expectedEndBracket}"`,
21788
+ `"${expectedEndBracket}"`
21480
21789
  ].filter(Boolean).join(' or '), text[pos], text, context));
21481
21790
  }
21482
21791
  pos += endBracket.length;
@@ -21543,14 +21852,14 @@ function isDisabled(element) {
21543
21852
  'select',
21544
21853
  'textarea',
21545
21854
  'optgroup',
21546
- 'option',
21855
+ 'option'
21547
21856
  ])) {
21548
21857
  if (el.hasAttribute('disabled')) {
21549
21858
  return true;
21550
21859
  }
21551
21860
  } else if (isElementType(el, 'fieldset')) {
21552
- var ref;
21553
- if (el.hasAttribute('disabled') && !((ref = el.querySelector(':scope > legend')) === null || ref === void 0 ? void 0 : ref.contains(element))) {
21861
+ var _el_querySelector;
21862
+ if (el.hasAttribute('disabled') && !((_el_querySelector = el.querySelector(':scope > legend')) === null || _el_querySelector === void 0 ? void 0 : _el_querySelector.contains(element))) {
21554
21863
  return true;
21555
21864
  }
21556
21865
  } else if (el.tagName.includes('-')) {
@@ -21575,8 +21884,8 @@ function getActiveElement(document) {
21575
21884
  }
21576
21885
  }
21577
21886
  function getActiveElementOrBody(document) {
21578
- var ref;
21579
- return (ref = getActiveElement(document)) !== null && ref !== void 0 ? ref : /* istanbul ignore next */ document.body;
21887
+ var _getActiveElement;
21888
+ return (_getActiveElement = getActiveElement(document)) !== null && _getActiveElement !== void 0 ? _getActiveElement : /* istanbul ignore next */ document.body;
21580
21889
  }
21581
21890
 
21582
21891
  function findClosest(element, callback) {
@@ -21622,8 +21931,8 @@ function isElement$1(node) {
21622
21931
  const contenteditable = getContentEditable(selection.focusNode);
21623
21932
  if (contenteditable) {
21624
21933
  if (!selection.isCollapsed) {
21625
- var ref;
21626
- const focusNode = ((ref = contenteditable.firstChild) === null || ref === void 0 ? void 0 : ref.nodeType) === 3 ? contenteditable.firstChild : contenteditable;
21934
+ var _contenteditable_firstChild;
21935
+ const focusNode = ((_contenteditable_firstChild = contenteditable.firstChild) === null || _contenteditable_firstChild === void 0 ? void 0 : _contenteditable_firstChild.nodeType) === 3 ? contenteditable.firstChild : contenteditable;
21627
21936
  selection.setBaseAndExtent(focusNode, 0, focusNode, 0);
21628
21937
  }
21629
21938
  } else {
@@ -21632,8 +21941,9 @@ function isElement$1(node) {
21632
21941
  }
21633
21942
  }
21634
21943
 
21944
+ const { getConfig: getConfig$2 } = named$1;
21635
21945
  function wrapEvent(cb, _element) {
21636
- return getConfig().eventWrapper(cb);
21946
+ return getConfig$2().eventWrapper(cb);
21637
21947
  }
21638
21948
 
21639
21949
  /**
@@ -21646,10 +21956,7 @@ function wrapEvent(cb, _element) {
21646
21956
  } else if (target) {
21647
21957
  wrapEvent(()=>target.focus());
21648
21958
  } else {
21649
- wrapEvent(()=>{
21650
- var ref;
21651
- return (ref = activeElement) === null || ref === void 0 ? void 0 : ref.blur();
21652
- });
21959
+ wrapEvent(()=>activeElement === null || activeElement === void 0 ? void 0 : activeElement.blur());
21653
21960
  }
21654
21961
  updateSelectionOnFocus(target !== null && target !== void 0 ? target : element.ownerDocument.body);
21655
21962
  }
@@ -21719,7 +22026,7 @@ function getInitialValue(element) {
21719
22026
  function setUISelectionRaw(element, selection) {
21720
22027
  element[UISelection] = selection;
21721
22028
  }
21722
- function setUISelection(element, { focusOffset: focusOffsetParam , anchorOffset: anchorOffsetParam = focusOffsetParam }, mode = 'replace') {
22029
+ function setUISelection(element, { focusOffset: focusOffsetParam, anchorOffset: anchorOffsetParam = focusOffsetParam }, mode = 'replace') {
21723
22030
  const valueLength = getUIValue(element).length;
21724
22031
  const sanitizeOffset = (o)=>Math.max(0, Math.min(valueLength, o));
21725
22032
  const anchorOffset = mode === 'replace' || element[UISelection] === undefined ? sanitizeOffset(anchorOffsetParam) : element[UISelection].anchorOffset;
@@ -21745,10 +22052,10 @@ function setUISelection(element, { focusOffset: focusOffsetParam , anchorOffset:
21745
22052
  }
21746
22053
  }
21747
22054
  function getUISelection(element) {
21748
- var _selectionStart, _selectionEnd, _UISelection;
21749
- const sel = (_UISelection = element[UISelection]) !== null && _UISelection !== void 0 ? _UISelection : {
21750
- anchorOffset: (_selectionStart = element.selectionStart) !== null && _selectionStart !== void 0 ? _selectionStart : 0,
21751
- focusOffset: (_selectionEnd = element.selectionEnd) !== null && _selectionEnd !== void 0 ? _selectionEnd : 0
22055
+ var _element_selectionStart, _element_selectionEnd, _element_UISelection;
22056
+ const sel = (_element_UISelection = element[UISelection]) !== null && _element_UISelection !== void 0 ? _element_UISelection : {
22057
+ anchorOffset: (_element_selectionStart = element.selectionStart) !== null && _element_selectionStart !== void 0 ? _element_selectionStart : 0,
22058
+ focusOffset: (_element_selectionEnd = element.selectionEnd) !== null && _element_selectionEnd !== void 0 ? _element_selectionEnd : 0
21752
22059
  };
21753
22060
  return {
21754
22061
  ...sel,
@@ -21898,14 +22205,14 @@ function isTextNode(node) {
21898
22205
  }
21899
22206
  function walkNodes(node, direction, callback) {
21900
22207
  for(;;){
21901
- var ref;
22208
+ var _node_ownerDocument;
21902
22209
  const sibling = node[`${direction}Sibling`];
21903
22210
  if (sibling) {
21904
22211
  node = getDescendant(sibling, direction === 'next' ? 'first' : 'last');
21905
22212
  if (callback(node)) {
21906
22213
  return node;
21907
22214
  }
21908
- } else if (node.parentNode && (!isElement(node.parentNode) || !isContentEditable(node.parentNode) && node.parentNode !== ((ref = node.ownerDocument) === null || ref === void 0 ? void 0 : ref.body))) {
22215
+ } else if (node.parentNode && (!isElement(node.parentNode) || !isContentEditable(node.parentNode) && node.parentNode !== ((_node_ownerDocument = node.ownerDocument) === null || _node_ownerDocument === void 0 ? void 0 : _node_ownerDocument.body))) {
21909
22216
  node = node.parentNode;
21910
22217
  } else {
21911
22218
  break;
@@ -21940,8 +22247,8 @@ function startTrackValue(element) {
21940
22247
  };
21941
22248
  }
21942
22249
  function trackOrSetValue(element, v) {
21943
- var ref, ref1;
21944
- (ref = element[TrackChanges]) === null || ref === void 0 ? void 0 : (ref1 = ref.tracked) === null || ref1 === void 0 ? void 0 : ref1.push(v);
22250
+ var _element_TrackChanges_tracked, _element_TrackChanges;
22251
+ (_element_TrackChanges = element[TrackChanges]) === null || _element_TrackChanges === void 0 ? void 0 : (_element_TrackChanges_tracked = _element_TrackChanges.tracked) === null || _element_TrackChanges_tracked === void 0 ? void 0 : _element_TrackChanges_tracked.push(v);
21945
22252
  if (!element[TrackChanges]) {
21946
22253
  setUIValueClean(element);
21947
22254
  setUISelection(element, {
@@ -21950,10 +22257,10 @@ function trackOrSetValue(element, v) {
21950
22257
  }
21951
22258
  }
21952
22259
  function commitValueAfterInput(element, cursorOffset) {
21953
- var ref;
22260
+ var _changes_tracked;
21954
22261
  const changes = element[TrackChanges];
21955
22262
  element[TrackChanges] = undefined;
21956
- if (!(changes === null || changes === void 0 ? void 0 : (ref = changes.tracked) === null || ref === void 0 ? void 0 : ref.length)) {
22263
+ if (!(changes === null || changes === void 0 ? void 0 : (_changes_tracked = changes.tracked) === null || _changes_tracked === void 0 ? void 0 : _changes_tracked.length)) {
21957
22264
  return;
21958
22265
  }
21959
22266
  const isJustReactStateUpdate = changes.tracked.length === 2 && changes.tracked[0] === changes.previousValue && changes.tracked[1] === element.value;
@@ -21997,16 +22304,16 @@ function getElement(node) {
21997
22304
  if (typeAndSelection.type === 'input') {
21998
22305
  return typeAndSelection.selection;
21999
22306
  } else if (typeAndSelection.type === 'contenteditable') {
22000
- var ref;
22307
+ var _typeAndSelection_selection;
22001
22308
  // Multi-range on contenteditable edits the first selection instead of the last
22002
- return (ref = typeAndSelection.selection) === null || ref === void 0 ? void 0 : ref.getRangeAt(0);
22309
+ return (_typeAndSelection_selection = typeAndSelection.selection) === null || _typeAndSelection_selection === void 0 ? void 0 : _typeAndSelection_selection.getRangeAt(0);
22003
22310
  }
22004
22311
  }
22005
22312
 
22006
22313
  /**
22007
22314
  * Set the selection
22008
- */ function setSelection({ focusNode , focusOffset , anchorNode =focusNode , anchorOffset =focusOffset }) {
22009
- var ref, ref1;
22315
+ */ function setSelection({ focusNode, focusOffset, anchorNode = focusNode, anchorOffset = focusOffset }) {
22316
+ var _anchorNode_ownerDocument_getSelection, _anchorNode_ownerDocument;
22010
22317
  const typeAndSelection = getTargetTypeAndSelection(focusNode);
22011
22318
  if (typeAndSelection.type === 'input') {
22012
22319
  return setUISelection(focusNode, {
@@ -22014,7 +22321,7 @@ function getElement(node) {
22014
22321
  focusOffset
22015
22322
  });
22016
22323
  }
22017
- (ref1 = (ref = anchorNode.ownerDocument) === null || ref === void 0 ? void 0 : ref.getSelection()) === null || ref1 === void 0 ? void 0 : ref1.setBaseAndExtent(anchorNode, anchorOffset, focusNode, focusOffset);
22324
+ (_anchorNode_ownerDocument = anchorNode.ownerDocument) === null || _anchorNode_ownerDocument === void 0 ? void 0 : (_anchorNode_ownerDocument_getSelection = _anchorNode_ownerDocument.getSelection()) === null || _anchorNode_ownerDocument_getSelection === void 0 ? void 0 : _anchorNode_ownerDocument_getSelection.setBaseAndExtent(anchorNode, anchorOffset, focusNode, focusOffset);
22018
22325
  }
22019
22326
 
22020
22327
  function isDateOrTime(element) {
@@ -22097,7 +22404,7 @@ function editInputElement(instance, element, inputRange, data, inputType) {
22097
22404
  }
22098
22405
  }
22099
22406
  }
22100
- const { newValue , newOffset , oldValue } = calculateNewValue(dataToInsert, element, inputRange, inputType);
22407
+ const { newValue, newOffset, oldValue } = calculateNewValue(dataToInsert, element, inputRange, inputType);
22101
22408
  if (newValue === oldValue && newOffset === inputRange.startOffset && newOffset === inputRange.endOffset) {
22102
22409
  return;
22103
22410
  }
@@ -22125,7 +22432,7 @@ function editInputElement(instance, element, inputRange, data, inputType) {
22125
22432
  });
22126
22433
  }
22127
22434
  }
22128
- function calculateNewValue(inputData, node, { startOffset , endOffset }, inputType) {
22435
+ function calculateNewValue(inputData, node, { startOffset, endOffset }, inputType) {
22129
22436
  const value = getUIValue(node);
22130
22437
  const prologEnd = Math.max(0, startOffset === endOffset && inputType === 'deleteContentBackward' ? startOffset - 1 : startOffset);
22131
22438
  const prolog = value.substring(0, prologEnd);
@@ -22153,12 +22460,12 @@ function commitInput(instance, element, newOffset, inputInit) {
22153
22460
  commitValueAfterInput(element, newOffset);
22154
22461
  }
22155
22462
  function isValidNumberInput(value) {
22156
- var ref, ref1;
22463
+ var _value_match, _value_match1;
22157
22464
  // the browser allows some invalid input but not others
22158
22465
  // it allows up to two '-' at any place before any 'e' or one directly following 'e'
22159
22466
  // it allows one '.' at any place before e
22160
22467
  const valueParts = value.split('e', 2);
22161
- return !(/[^\d.\-e]/.test(value) || Number((ref = value.match(/-/g)) === null || ref === void 0 ? void 0 : ref.length) > 2 || Number((ref1 = value.match(/\./g)) === null || ref1 === void 0 ? void 0 : ref1.length) > 1 || valueParts[1] && !/^-?\d*$/.test(valueParts[1]));
22468
+ return !(/[^\d.\-e]/.test(value) || Number((_value_match = value.match(/-/g)) === null || _value_match === void 0 ? void 0 : _value_match.length) > 2 || Number((_value_match1 = value.match(/\./g)) === null || _value_match1 === void 0 ? void 0 : _value_match1.length) > 1 || valueParts[1] && !/^-?\d*$/.test(valueParts[1]));
22162
22469
  }
22163
22470
 
22164
22471
  behavior.cut = (event, target, instance)=>{
@@ -22183,7 +22490,7 @@ function getValueOrTextContent(element) {
22183
22490
  function isVisible(element) {
22184
22491
  const window = getWindow(element);
22185
22492
  for(let el = element; el === null || el === void 0 ? void 0 : el.ownerDocument; el = el.parentElement){
22186
- const { display , visibility } = window.getComputedStyle(el);
22493
+ const { display, visibility } = window.getComputedStyle(el);
22187
22494
  if (display === 'none') {
22188
22495
  return false;
22189
22496
  }
@@ -22277,12 +22584,12 @@ function getTabDestination(activeElement, shift) {
22277
22584
  focusOffset: selection.startOffset === selection.endOffset ? selection.focusOffset + direction : direction < 0 ? selection.startOffset : selection.endOffset
22278
22585
  });
22279
22586
  } else {
22280
- const selection1 = node.ownerDocument.getSelection();
22281
- if (!(selection1 === null || selection1 === void 0 ? void 0 : selection1.focusNode)) {
22587
+ const selection = node.ownerDocument.getSelection();
22588
+ if (!(selection === null || selection === void 0 ? void 0 : selection.focusNode)) {
22282
22589
  return;
22283
22590
  }
22284
- if (selection1.isCollapsed) {
22285
- const nextPosition = getNextCursorPosition(selection1.focusNode, selection1.focusOffset, direction);
22591
+ if (selection.isCollapsed) {
22592
+ const nextPosition = getNextCursorPosition(selection.focusNode, selection.focusOffset, direction);
22286
22593
  if (nextPosition) {
22287
22594
  setSelection({
22288
22595
  focusNode: nextPosition.node,
@@ -22290,7 +22597,7 @@ function getTabDestination(activeElement, shift) {
22290
22597
  });
22291
22598
  }
22292
22599
  } else {
22293
- selection1[direction < 0 ? 'collapseToStart' : 'collapseToEnd']();
22600
+ selection[direction < 0 ? 'collapseToStart' : 'collapseToEnd']();
22294
22601
  }
22295
22602
  }
22296
22603
  }
@@ -22305,8 +22612,8 @@ function getTabDestination(activeElement, shift) {
22305
22612
  focusOffset: getUIValue(target).length
22306
22613
  });
22307
22614
  }
22308
- var ref;
22309
- const focusNode = (ref = getContentEditable(target)) !== null && ref !== void 0 ? ref : target.ownerDocument.body;
22615
+ var _getContentEditable;
22616
+ const focusNode = (_getContentEditable = getContentEditable(target)) !== null && _getContentEditable !== void 0 ? _getContentEditable : target.ownerDocument.body;
22310
22617
  setSelection({
22311
22618
  focusNode,
22312
22619
  anchorOffset: 0,
@@ -22317,8 +22624,8 @@ function isAllSelected(target) {
22317
22624
  if (hasOwnSelection(target)) {
22318
22625
  return getUISelection(target).startOffset === 0 && getUISelection(target).endOffset === getUIValue(target).length;
22319
22626
  }
22320
- var ref;
22321
- const focusNode = (ref = getContentEditable(target)) !== null && ref !== void 0 ? ref : target.ownerDocument.body;
22627
+ var _getContentEditable;
22628
+ const focusNode = (_getContentEditable = getContentEditable(target)) !== null && _getContentEditable !== void 0 ? _getContentEditable : target.ownerDocument.body;
22322
22629
  const selection = target.ownerDocument.getSelection();
22323
22630
  return (selection === null || selection === void 0 ? void 0 : selection.anchorNode) === focusNode && selection.focusNode === focusNode && selection.anchorOffset === 0 && selection.focusOffset === focusNode.childNodes.length;
22324
22631
  }
@@ -22328,7 +22635,7 @@ function isAllSelected(target) {
22328
22635
  *
22329
22636
  * Handles input elements and contenteditable if it only contains a single text node.
22330
22637
  */ function setSelectionRange(element, anchorOffset, focusOffset) {
22331
- var ref;
22638
+ var _element_firstChild;
22332
22639
  if (hasOwnSelection(element)) {
22333
22640
  return setSelection({
22334
22641
  focusNode: element,
@@ -22336,7 +22643,7 @@ function isAllSelected(target) {
22336
22643
  focusOffset
22337
22644
  });
22338
22645
  }
22339
- /* istanbul ignore else */ if (isContentEditable(element) && ((ref = element.firstChild) === null || ref === void 0 ? void 0 : ref.nodeType) === 3) {
22646
+ /* istanbul ignore else */ if (isContentEditable(element) && ((_element_firstChild = element.firstChild) === null || _element_firstChild === void 0 ? void 0 : _element_firstChild.nodeType) === 3) {
22340
22647
  return setSelection({
22341
22648
  focusNode: element.firstChild,
22342
22649
  anchorOffset,
@@ -22365,9 +22672,9 @@ function walkRadio(instance, el, direction) {
22365
22672
  }
22366
22673
 
22367
22674
  behavior.keydown = (event, target, instance)=>{
22368
- var ref;
22369
- var ref1;
22370
- return (ref1 = (ref = keydownBehavior[event.key]) === null || ref === void 0 ? void 0 : ref.call(keydownBehavior, event, target, instance)) !== null && ref1 !== void 0 ? ref1 : combinationBehavior(event, target, instance);
22675
+ var _keydownBehavior_event_key;
22676
+ var _keydownBehavior_event_key1;
22677
+ return (_keydownBehavior_event_key1 = (_keydownBehavior_event_key = keydownBehavior[event.key]) === null || _keydownBehavior_event_key === void 0 ? void 0 : _keydownBehavior_event_key.call(keydownBehavior, event, target, instance)) !== null && _keydownBehavior_event_key1 !== void 0 ? _keydownBehavior_event_key1 : combinationBehavior(event, target, instance);
22371
22678
  };
22372
22679
  const keydownBehavior = {
22373
22680
  ArrowDown: (event, target, instance)=>{
@@ -22420,9 +22727,9 @@ const keydownBehavior = {
22420
22727
  'textarea'
22421
22728
  ]) || isContentEditable(target)) {
22422
22729
  return ()=>{
22423
- var ref;
22424
- var ref1;
22425
- const newPos = (ref1 = (ref = getValueOrTextContent(target)) === null || ref === void 0 ? void 0 : ref.length) !== null && ref1 !== void 0 ? ref1 : /* istanbul ignore next */ 0;
22730
+ var _getValueOrTextContent;
22731
+ var _getValueOrTextContent_length;
22732
+ const newPos = (_getValueOrTextContent_length = (_getValueOrTextContent = getValueOrTextContent(target)) === null || _getValueOrTextContent === void 0 ? void 0 : _getValueOrTextContent.length) !== null && _getValueOrTextContent_length !== void 0 ? _getValueOrTextContent_length : /* istanbul ignore next */ 0;
22426
22733
  setSelectionRange(target, newPos, newPos);
22427
22734
  };
22428
22735
  }
@@ -22505,7 +22812,7 @@ const ClickInputOnEnter = [
22505
22812
  'file',
22506
22813
  'image',
22507
22814
  'reset',
22508
- 'submit',
22815
+ 'submit'
22509
22816
  ];
22510
22817
  const SubmitSingleInputOnEnter = [
22511
22818
  'email',
@@ -22515,12 +22822,12 @@ const SubmitSingleInputOnEnter = [
22515
22822
  'tel',
22516
22823
  'text',
22517
22824
  'url',
22518
- 'week',
22825
+ 'week'
22519
22826
  ];
22520
22827
 
22521
22828
  behavior.keyup = (event, target, instance)=>{
22522
- var ref;
22523
- return (ref = keyupBehavior[event.key]) === null || ref === void 0 ? void 0 : ref.call(keyupBehavior, event, target, instance);
22829
+ var _keyupBehavior_event_key;
22830
+ return (_keyupBehavior_event_key = keyupBehavior[event.key]) === null || _keyupBehavior_event_key === void 0 ? void 0 : _keyupBehavior_event_key.call(keyupBehavior, event, target, instance);
22524
22831
  };
22525
22832
  const keyupBehavior = {
22526
22833
  ' ': (event, target, instance)=>{
@@ -22533,8 +22840,8 @@ const keyupBehavior = {
22533
22840
  behavior.paste = (event, target, instance)=>{
22534
22841
  if (isEditable(target)) {
22535
22842
  return ()=>{
22536
- var ref;
22537
- const insertData = (ref = event.clipboardData) === null || ref === void 0 ? void 0 : ref.getData('text');
22843
+ var _event_clipboardData;
22844
+ const insertData = (_event_clipboardData = event.clipboardData) === null || _event_clipboardData === void 0 ? void 0 : _event_clipboardData.getData('text');
22538
22845
  if (insertData) {
22539
22846
  input(instance, target, insertData, 'insertFromPaste');
22540
22847
  }
@@ -23313,7 +23620,7 @@ const eventInitializer = {
23313
23620
  initUIEvent,
23314
23621
  initUIEventModififiers,
23315
23622
  initMouseEvent,
23316
- initPointerEvent,
23623
+ initPointerEvent
23317
23624
  ],
23318
23625
  KeyboardEvent: [
23319
23626
  initUIEvent,
@@ -23322,58 +23629,58 @@ const eventInitializer = {
23322
23629
  ]
23323
23630
  };
23324
23631
  function createEvent(type, target, init) {
23325
- var ref;
23632
+ var _eventInitializer_EventType;
23326
23633
  const window = getWindow(target);
23327
- const { EventType , defaultInit } = eventMap[eventMapKeys[type]];
23634
+ const { EventType, defaultInit } = eventMap[eventMapKeys[type]];
23328
23635
  const event = new (getEventConstructors(window))[EventType](type, defaultInit);
23329
- (ref = eventInitializer[EventType]) === null || ref === void 0 ? void 0 : ref.forEach((f)=>f(event, init !== null && init !== void 0 ? init : {}));
23636
+ (_eventInitializer_EventType = eventInitializer[EventType]) === null || _eventInitializer_EventType === void 0 ? void 0 : _eventInitializer_EventType.forEach((f)=>f(event, init !== null && init !== void 0 ? init : {}));
23330
23637
  return event;
23331
23638
  }
23332
23639
  /* istanbul ignore next */ function getEventConstructors(window) {
23333
- var _Event;
23334
- /* eslint-disable @typescript-eslint/no-unnecessary-condition, @typescript-eslint/no-extraneous-class */ const Event = (_Event = window.Event) !== null && _Event !== void 0 ? _Event : class Event {
23640
+ var _window_Event;
23641
+ /* eslint-disable @typescript-eslint/no-unnecessary-condition, @typescript-eslint/no-extraneous-class */ const Event = (_window_Event = window.Event) !== null && _window_Event !== void 0 ? _window_Event : class Event {
23335
23642
  };
23336
- var _AnimationEvent;
23337
- const AnimationEvent = (_AnimationEvent = window.AnimationEvent) !== null && _AnimationEvent !== void 0 ? _AnimationEvent : class AnimationEvent extends Event {
23643
+ var _window_AnimationEvent;
23644
+ const AnimationEvent = (_window_AnimationEvent = window.AnimationEvent) !== null && _window_AnimationEvent !== void 0 ? _window_AnimationEvent : class AnimationEvent extends Event {
23338
23645
  };
23339
- var _ClipboardEvent;
23340
- const ClipboardEvent = (_ClipboardEvent = window.ClipboardEvent) !== null && _ClipboardEvent !== void 0 ? _ClipboardEvent : class ClipboardEvent extends Event {
23646
+ var _window_ClipboardEvent;
23647
+ const ClipboardEvent = (_window_ClipboardEvent = window.ClipboardEvent) !== null && _window_ClipboardEvent !== void 0 ? _window_ClipboardEvent : class ClipboardEvent extends Event {
23341
23648
  };
23342
- var _PopStateEvent;
23343
- const PopStateEvent = (_PopStateEvent = window.PopStateEvent) !== null && _PopStateEvent !== void 0 ? _PopStateEvent : class PopStateEvent extends Event {
23649
+ var _window_PopStateEvent;
23650
+ const PopStateEvent = (_window_PopStateEvent = window.PopStateEvent) !== null && _window_PopStateEvent !== void 0 ? _window_PopStateEvent : class PopStateEvent extends Event {
23344
23651
  };
23345
- var _ProgressEvent;
23346
- const ProgressEvent = (_ProgressEvent = window.ProgressEvent) !== null && _ProgressEvent !== void 0 ? _ProgressEvent : class ProgressEvent extends Event {
23652
+ var _window_ProgressEvent;
23653
+ const ProgressEvent = (_window_ProgressEvent = window.ProgressEvent) !== null && _window_ProgressEvent !== void 0 ? _window_ProgressEvent : class ProgressEvent extends Event {
23347
23654
  };
23348
- var _TransitionEvent;
23349
- const TransitionEvent = (_TransitionEvent = window.TransitionEvent) !== null && _TransitionEvent !== void 0 ? _TransitionEvent : class TransitionEvent extends Event {
23655
+ var _window_TransitionEvent;
23656
+ const TransitionEvent = (_window_TransitionEvent = window.TransitionEvent) !== null && _window_TransitionEvent !== void 0 ? _window_TransitionEvent : class TransitionEvent extends Event {
23350
23657
  };
23351
- var _UIEvent;
23352
- const UIEvent = (_UIEvent = window.UIEvent) !== null && _UIEvent !== void 0 ? _UIEvent : class UIEvent extends Event {
23658
+ var _window_UIEvent;
23659
+ const UIEvent = (_window_UIEvent = window.UIEvent) !== null && _window_UIEvent !== void 0 ? _window_UIEvent : class UIEvent extends Event {
23353
23660
  };
23354
- var _CompositionEvent;
23355
- const CompositionEvent = (_CompositionEvent = window.CompositionEvent) !== null && _CompositionEvent !== void 0 ? _CompositionEvent : class CompositionEvent extends UIEvent {
23661
+ var _window_CompositionEvent;
23662
+ const CompositionEvent = (_window_CompositionEvent = window.CompositionEvent) !== null && _window_CompositionEvent !== void 0 ? _window_CompositionEvent : class CompositionEvent extends UIEvent {
23356
23663
  };
23357
- var _FocusEvent;
23358
- const FocusEvent = (_FocusEvent = window.FocusEvent) !== null && _FocusEvent !== void 0 ? _FocusEvent : class FocusEvent extends UIEvent {
23664
+ var _window_FocusEvent;
23665
+ const FocusEvent = (_window_FocusEvent = window.FocusEvent) !== null && _window_FocusEvent !== void 0 ? _window_FocusEvent : class FocusEvent extends UIEvent {
23359
23666
  };
23360
- var _InputEvent;
23361
- const InputEvent = (_InputEvent = window.InputEvent) !== null && _InputEvent !== void 0 ? _InputEvent : class InputEvent extends UIEvent {
23667
+ var _window_InputEvent;
23668
+ const InputEvent = (_window_InputEvent = window.InputEvent) !== null && _window_InputEvent !== void 0 ? _window_InputEvent : class InputEvent extends UIEvent {
23362
23669
  };
23363
- var _KeyboardEvent;
23364
- const KeyboardEvent = (_KeyboardEvent = window.KeyboardEvent) !== null && _KeyboardEvent !== void 0 ? _KeyboardEvent : class KeyboardEvent extends UIEvent {
23670
+ var _window_KeyboardEvent;
23671
+ const KeyboardEvent = (_window_KeyboardEvent = window.KeyboardEvent) !== null && _window_KeyboardEvent !== void 0 ? _window_KeyboardEvent : class KeyboardEvent extends UIEvent {
23365
23672
  };
23366
- var _MouseEvent;
23367
- const MouseEvent = (_MouseEvent = window.MouseEvent) !== null && _MouseEvent !== void 0 ? _MouseEvent : class MouseEvent extends UIEvent {
23673
+ var _window_MouseEvent;
23674
+ const MouseEvent = (_window_MouseEvent = window.MouseEvent) !== null && _window_MouseEvent !== void 0 ? _window_MouseEvent : class MouseEvent extends UIEvent {
23368
23675
  };
23369
- var _DragEvent;
23370
- const DragEvent = (_DragEvent = window.DragEvent) !== null && _DragEvent !== void 0 ? _DragEvent : class DragEvent extends MouseEvent {
23676
+ var _window_DragEvent;
23677
+ const DragEvent = (_window_DragEvent = window.DragEvent) !== null && _window_DragEvent !== void 0 ? _window_DragEvent : class DragEvent extends MouseEvent {
23371
23678
  };
23372
- var _PointerEvent;
23373
- const PointerEvent = (_PointerEvent = window.PointerEvent) !== null && _PointerEvent !== void 0 ? _PointerEvent : class PointerEvent extends MouseEvent {
23679
+ var _window_PointerEvent;
23680
+ const PointerEvent = (_window_PointerEvent = window.PointerEvent) !== null && _window_PointerEvent !== void 0 ? _window_PointerEvent : class PointerEvent extends MouseEvent {
23374
23681
  };
23375
- var _TouchEvent;
23376
- const TouchEvent = (_TouchEvent = window.TouchEvent) !== null && _TouchEvent !== void 0 ? _TouchEvent : class TouchEvent extends UIEvent {
23682
+ var _window_TouchEvent;
23683
+ const TouchEvent = (_window_TouchEvent = window.TouchEvent) !== null && _window_TouchEvent !== void 0 ? _window_TouchEvent : class TouchEvent extends UIEvent {
23377
23684
  };
23378
23685
  /* eslint-enable @typescript-eslint/no-unnecessary-condition, @typescript-eslint/no-extraneous-class */ return {
23379
23686
  Event,
@@ -23403,25 +23710,25 @@ function assignProps(obj, props) {
23403
23710
  function sanitizeNumber(n) {
23404
23711
  return Number(n !== null && n !== void 0 ? n : 0);
23405
23712
  }
23406
- function initClipboardEvent(event, { clipboardData }) {
23713
+ function initClipboardEvent(event, { clipboardData }) {
23407
23714
  assignProps(event, {
23408
23715
  clipboardData
23409
23716
  });
23410
23717
  }
23411
- function initInputEvent(event, { data , inputType , isComposing }) {
23718
+ function initInputEvent(event, { data, inputType, isComposing }) {
23412
23719
  assignProps(event, {
23413
23720
  data,
23414
23721
  isComposing: Boolean(isComposing),
23415
23722
  inputType: String(inputType)
23416
23723
  });
23417
23724
  }
23418
- function initUIEvent(event, { view , detail }) {
23725
+ function initUIEvent(event, { view, detail }) {
23419
23726
  assignProps(event, {
23420
23727
  view,
23421
23728
  detail: sanitizeNumber(detail !== null && detail !== void 0 ? detail : 0)
23422
23729
  });
23423
23730
  }
23424
- function initUIEventModififiers(event, { altKey , ctrlKey , metaKey , shiftKey , modifierAltGraph , modifierCapsLock , modifierFn , modifierFnLock , modifierNumLock , modifierScrollLock , modifierSymbol , modifierSymbolLock }) {
23731
+ function initUIEventModififiers(event, { altKey, ctrlKey, metaKey, shiftKey, modifierAltGraph, modifierCapsLock, modifierFn, modifierFnLock, modifierNumLock, modifierScrollLock, modifierSymbol, modifierSymbolLock }) {
23425
23732
  assignProps(event, {
23426
23733
  altKey: Boolean(altKey),
23427
23734
  ctrlKey: Boolean(ctrlKey),
@@ -23445,7 +23752,7 @@ function initUIEventModififiers(event, { altKey , ctrlKey , metaKey , shiftKey ,
23445
23752
  }
23446
23753
  });
23447
23754
  }
23448
- function initKeyboardEvent(event, { key , code , location , repeat , isComposing , charCode }) {
23755
+ function initKeyboardEvent(event, { key, code, location, repeat, isComposing, charCode }) {
23449
23756
  assignProps(event, {
23450
23757
  key: String(key),
23451
23758
  code: String(code),
@@ -23455,7 +23762,7 @@ function initKeyboardEvent(event, { key , code , location , repeat , isComposing
23455
23762
  charCode
23456
23763
  });
23457
23764
  }
23458
- function initMouseEvent(event, { x , y , screenX , screenY , clientX =x , clientY =y , button , buttons , relatedTarget }) {
23765
+ function initMouseEvent(event, { x, y, screenX, screenY, clientX = x, clientY = y, button, buttons, relatedTarget }) {
23459
23766
  assignProps(event, {
23460
23767
  screenX: sanitizeNumber(screenX),
23461
23768
  screenY: sanitizeNumber(screenY),
@@ -23468,7 +23775,7 @@ function initMouseEvent(event, { x , y , screenX , screenY , clientX =x , client
23468
23775
  relatedTarget
23469
23776
  });
23470
23777
  }
23471
- function initPointerEvent(event, { pointerId , width , height , pressure , tangentialPressure , tiltX , tiltY , twist , pointerType , isPrimary }) {
23778
+ function initPointerEvent(event, { pointerId, width, height, pressure, tangentialPressure, tiltX, tiltY, twist, pointerType, isPrimary }) {
23472
23779
  assignProps(event, {
23473
23780
  pointerId: sanitizeNumber(pointerId),
23474
23781
  width: sanitizeNumber(width),
@@ -23494,9 +23801,9 @@ function dispatchUIEvent(target, type, init, preventDefault = false) {
23494
23801
  return dispatchEvent.call(this, target, event, preventDefault);
23495
23802
  }
23496
23803
  function dispatchEvent(target, event, preventDefault = false) {
23497
- var ref;
23804
+ var _behavior_type;
23498
23805
  const type = event.type;
23499
- const behaviorImplementation = preventDefault ? ()=>{} : (ref = behavior[type]) === null || ref === void 0 ? void 0 : ref(event, target, this);
23806
+ const behaviorImplementation = preventDefault ? ()=>{} : (_behavior_type = behavior[type]) === null || _behavior_type === void 0 ? void 0 : _behavior_type.call(behavior, event, target, this);
23500
23807
  if (behaviorImplementation) {
23501
23808
  event.preventDefault();
23502
23809
  let defaultPrevented = false;
@@ -23530,7 +23837,7 @@ function prepareInterceptor(element, propName, interceptorImpl) {
23530
23837
  throw new Error(`Element ${element.tagName} does not implement "${String(propName)}".`);
23531
23838
  }
23532
23839
  function intercept(...args) {
23533
- const { applyNative =false , realArgs , then , } = interceptorImpl.call(this, ...args);
23840
+ const { applyNative = false, realArgs, then } = interceptorImpl.call(this, ...args);
23534
23841
  const realFunc = (!applyNative && objectDescriptor || prototypeDescriptor)[target];
23535
23842
  if (target === 'set') {
23536
23843
  realFunc.call(this, realArgs);
@@ -23676,11 +23983,23 @@ function wait(config) {
23676
23983
  }
23677
23984
  return Promise.all([
23678
23985
  new Promise((resolve)=>globalThis.setTimeout(()=>resolve(), delay)),
23679
- config.advanceTimers(delay),
23986
+ config.advanceTimers(delay)
23680
23987
  ]);
23681
23988
  }
23682
23989
 
23683
- var _pressed, _code, _code1;
23990
+ function _define_property$6(obj, key, value) {
23991
+ if (key in obj) {
23992
+ Object.defineProperty(obj, key, {
23993
+ value: value,
23994
+ enumerable: true,
23995
+ configurable: true,
23996
+ writable: true
23997
+ });
23998
+ } else {
23999
+ obj[key] = value;
24000
+ }
24001
+ return obj;
24002
+ }
23684
24003
  var DOM_KEY_LOCATION;
23685
24004
  (function(DOM_KEY_LOCATION) {
23686
24005
  DOM_KEY_LOCATION[DOM_KEY_LOCATION["STANDARD"] = 0] = "STANDARD";
@@ -23695,7 +24014,7 @@ const modifierKeys = [
23695
24014
  'Fn',
23696
24015
  'Meta',
23697
24016
  'Shift',
23698
- 'Symbol',
24017
+ 'Symbol'
23699
24018
  ];
23700
24019
  function isModifierKey(key) {
23701
24020
  return modifierKeys.includes(key);
@@ -23705,7 +24024,7 @@ const modifierLocks = [
23705
24024
  'FnLock',
23706
24025
  'NumLock',
23707
24026
  'ScrollLock',
23708
- 'SymbolLock',
24027
+ 'SymbolLock'
23709
24028
  ];
23710
24029
  function isModifierLock(key) {
23711
24030
  return modifierLocks.includes(key);
@@ -23718,12 +24037,14 @@ class KeyboardHost {
23718
24037
  return Object.values(this.pressed).map((p)=>p.keyDef);
23719
24038
  }
23720
24039
  /** Press a key */ async keydown(instance, keyDef) {
24040
+ var // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
24041
+ _this_pressed, _code, _this_pressed_code;
23721
24042
  const key = String(keyDef.key);
23722
24043
  const code = String(keyDef.code);
23723
24044
  const target = getActiveElementOrBody(instance.config.document);
23724
24045
  this.setKeydownTarget(target);
23725
- var ref;
23726
- (ref = (_pressed = this.pressed)[_code = code]) !== null && ref !== void 0 ? ref : _pressed[_code] = {
24046
+ var _;
24047
+ (_ = (_this_pressed = this.pressed)[_code = code]) !== null && _ !== void 0 ? _ : _this_pressed[_code] = {
23727
24048
  keyDef,
23728
24049
  unpreventedDefault: false
23729
24050
  };
@@ -23738,7 +24059,7 @@ class KeyboardHost {
23738
24059
  this.modifiers[key] = true;
23739
24060
  this.modifierLockStart[key] = true;
23740
24061
  }
23741
- (_code1 = this.pressed[code]).unpreventedDefault || (_code1.unpreventedDefault = unprevented);
24062
+ (_this_pressed_code = this.pressed[code]).unpreventedDefault || (_this_pressed_code.unpreventedDefault = unprevented);
23742
24063
  if (unprevented && this.hasKeyPress(key)) {
23743
24064
  instance.dispatchUIEvent(getActiveElementOrBody(instance.config.document), 'keypress', {
23744
24065
  key,
@@ -23778,7 +24099,8 @@ class KeyboardHost {
23778
24099
  return (key.length === 1 || key === 'Enter') && !this.modifiers.Control && !this.modifiers.Alt;
23779
24100
  }
23780
24101
  constructor(system){
23781
- this.modifiers = {
24102
+ _define_property$6(this, "system", void 0);
24103
+ _define_property$6(this, "modifiers", {
23782
24104
  Alt: false,
23783
24105
  AltGraph: false,
23784
24106
  CapsLock: false,
@@ -23791,11 +24113,11 @@ class KeyboardHost {
23791
24113
  Shift: false,
23792
24114
  Symbol: false,
23793
24115
  SymbolLock: false
23794
- };
23795
- this.pressed = {};
23796
- this.carryChar = '';
23797
- this.lastKeydownTarget = undefined;
23798
- this.modifierLockStart = {};
24116
+ });
24117
+ _define_property$6(this, "pressed", {});
24118
+ _define_property$6(this, "carryChar", '');
24119
+ _define_property$6(this, "lastKeydownTarget", undefined);
24120
+ _define_property$6(this, "modifierLockStart", {});
23799
24121
  this.system = system;
23800
24122
  }
23801
24123
  }
@@ -23978,9 +24300,22 @@ const defaultKeyMap = [
23978
24300
  {
23979
24301
  name: 'TouchC',
23980
24302
  pointerType: 'touch'
23981
- },
24303
+ }
23982
24304
  ];
23983
24305
 
24306
+ function _define_property$5(obj, key, value) {
24307
+ if (key in obj) {
24308
+ Object.defineProperty(obj, key, {
24309
+ value: value,
24310
+ enumerable: true,
24311
+ configurable: true,
24312
+ writable: true
24313
+ });
24314
+ } else {
24315
+ obj[key] = value;
24316
+ }
24317
+ return obj;
24318
+ }
23984
24319
  class Buttons {
23985
24320
  getButtons() {
23986
24321
  let v = 0;
@@ -24014,7 +24349,7 @@ class Buttons {
24014
24349
  return undefined;
24015
24350
  }
24016
24351
  constructor(){
24017
- this.pressed = {};
24352
+ _define_property$5(this, "pressed", {});
24018
24353
  }
24019
24354
  }
24020
24355
  const MouseButton = {
@@ -24045,6 +24380,19 @@ function getMouseEventButton(button) {
24045
24380
  return button;
24046
24381
  }
24047
24382
 
24383
+ function _define_property$4(obj, key, value) {
24384
+ if (key in obj) {
24385
+ Object.defineProperty(obj, key, {
24386
+ value: value,
24387
+ enumerable: true,
24388
+ configurable: true,
24389
+ writable: true
24390
+ });
24391
+ } else {
24392
+ obj[key] = value;
24393
+ }
24394
+ return obj;
24395
+ }
24048
24396
  class Device {
24049
24397
  get countPressed() {
24050
24398
  return this.pressedKeys.size;
@@ -24059,7 +24407,7 @@ class Device {
24059
24407
  return this.pressedKeys.delete(keyDef.name);
24060
24408
  }
24061
24409
  constructor(){
24062
- this.pressedKeys = new Set();
24410
+ _define_property$4(this, "pressedKeys", new Set());
24063
24411
  }
24064
24412
  }
24065
24413
 
@@ -24069,8 +24417,8 @@ function getTreeDiff(a, b) {
24069
24417
  treeA.push(el);
24070
24418
  }
24071
24419
  const treeB = [];
24072
- for(let el1 = b; el1; el1 = el1.parentElement){
24073
- treeB.push(el1);
24420
+ for(let el = b; el; el = el.parentElement){
24421
+ treeB.push(el);
24074
24422
  }
24075
24423
  let i = 0;
24076
24424
  for(;; i++){
@@ -24081,11 +24429,11 @@ function getTreeDiff(a, b) {
24081
24429
  return [
24082
24430
  treeA.slice(0, treeA.length - i),
24083
24431
  treeB.slice(0, treeB.length - i),
24084
- treeB.slice(treeB.length - i),
24432
+ treeB.slice(treeB.length - i)
24085
24433
  ];
24086
24434
  }
24087
24435
 
24088
- function resolveCaretPosition({ target , node , offset }) {
24436
+ function resolveCaretPosition({ target, node, offset }) {
24089
24437
  if (hasOwnSelection(target)) {
24090
24438
  return {
24091
24439
  node: target,
@@ -24139,7 +24487,7 @@ function findNodeAtTextOffset(node, offset, isRoot = true) {
24139
24487
  };
24140
24488
  }
24141
24489
 
24142
- function setSelectionPerMouseDown({ document , target , clickCount , node , offset }) {
24490
+ function setSelectionPerMouseDown({ document, target, clickCount, node, offset }) {
24143
24491
  if (hasNoSelection(target)) {
24144
24492
  return;
24145
24493
  }
@@ -24168,12 +24516,12 @@ function setSelectionPerMouseDown({ document , target , clickCount , node , offs
24168
24516
  end: end !== null && end !== void 0 ? end : text.length
24169
24517
  };
24170
24518
  } else {
24171
- const { node: startNode , offset: startOffset } = resolveCaretPosition({
24519
+ const { node: startNode, offset: startOffset } = resolveCaretPosition({
24172
24520
  target,
24173
24521
  node,
24174
24522
  offset: start
24175
24523
  });
24176
- const { node: endNode , offset: endOffset } = resolveCaretPosition({
24524
+ const { node: endNode, offset: endOffset } = resolveCaretPosition({
24177
24525
  target,
24178
24526
  node,
24179
24527
  offset: end
@@ -24202,17 +24550,17 @@ function getTextRange(text, pos, clickCount) {
24202
24550
  if (clickCount % 3 === 2) {
24203
24551
  return [
24204
24552
  textPos - text.substr(0, pos).match(/(\w+|\s+|\W)?$/)[0].length,
24205
- pos === undefined ? pos : pos + text.substr(pos).match(/^(\w+|\s+|\W)?/)[0].length,
24553
+ pos === undefined ? pos : pos + text.substr(pos).match(/^(\w+|\s+|\W)?/)[0].length
24206
24554
  ];
24207
24555
  }
24208
24556
  // triple click
24209
24557
  return [
24210
24558
  textPos - text.substr(0, pos).match(/[^\r\n]*$/)[0].length,
24211
- pos === undefined ? pos : pos + text.substr(pos).match(/^[^\r\n]*/)[0].length,
24559
+ pos === undefined ? pos : pos + text.substr(pos).match(/^[^\r\n]*/)[0].length
24212
24560
  ];
24213
24561
  }
24214
24562
 
24215
- function modifySelectionPerMouseMove(selectionRange, { document , target , node , offset }) {
24563
+ function modifySelectionPerMouseMove(selectionRange, { document, target, node, offset }) {
24216
24564
  const selectionFocus = resolveCaretPosition({
24217
24565
  target,
24218
24566
  node,
@@ -24246,10 +24594,23 @@ function modifySelectionPerMouseMove(selectionRange, { document , target , node
24246
24594
  }
24247
24595
 
24248
24596
  function isDifferentPointerPosition(positionA, positionB) {
24249
- var ref, ref1, ref2, ref3, ref4, ref5, ref6, ref7;
24250
- return positionA.target !== positionB.target || ((ref = positionA.coords) === null || ref === void 0 ? void 0 : ref.x) !== ((ref1 = positionB.coords) === null || ref1 === void 0 ? void 0 : ref1.y) || ((ref2 = positionA.coords) === null || ref2 === void 0 ? void 0 : ref2.y) !== ((ref3 = positionB.coords) === null || ref3 === void 0 ? void 0 : ref3.y) || ((ref4 = positionA.caret) === null || ref4 === void 0 ? void 0 : ref4.node) !== ((ref5 = positionB.caret) === null || ref5 === void 0 ? void 0 : ref5.node) || ((ref6 = positionA.caret) === null || ref6 === void 0 ? void 0 : ref6.offset) !== ((ref7 = positionB.caret) === null || ref7 === void 0 ? void 0 : ref7.offset);
24597
+ var _positionA_coords, _positionB_coords, _positionA_coords1, _positionB_coords1, _positionA_caret, _positionB_caret, _positionA_caret1, _positionB_caret1;
24598
+ return positionA.target !== positionB.target || ((_positionA_coords = positionA.coords) === null || _positionA_coords === void 0 ? void 0 : _positionA_coords.x) !== ((_positionB_coords = positionB.coords) === null || _positionB_coords === void 0 ? void 0 : _positionB_coords.y) || ((_positionA_coords1 = positionA.coords) === null || _positionA_coords1 === void 0 ? void 0 : _positionA_coords1.y) !== ((_positionB_coords1 = positionB.coords) === null || _positionB_coords1 === void 0 ? void 0 : _positionB_coords1.y) || ((_positionA_caret = positionA.caret) === null || _positionA_caret === void 0 ? void 0 : _positionA_caret.node) !== ((_positionB_caret = positionB.caret) === null || _positionB_caret === void 0 ? void 0 : _positionB_caret.node) || ((_positionA_caret1 = positionA.caret) === null || _positionA_caret1 === void 0 ? void 0 : _positionA_caret1.offset) !== ((_positionB_caret1 = positionB.caret) === null || _positionB_caret1 === void 0 ? void 0 : _positionB_caret1.offset);
24251
24599
  }
24252
24600
 
24601
+ function _define_property$3(obj, key, value) {
24602
+ if (key in obj) {
24603
+ Object.defineProperty(obj, key, {
24604
+ value: value,
24605
+ enumerable: true,
24606
+ configurable: true,
24607
+ writable: true
24608
+ });
24609
+ } else {
24610
+ obj[key] = value;
24611
+ }
24612
+ return obj;
24613
+ }
24253
24614
  /**
24254
24615
  * This object is the single "virtual" mouse that might be controlled by multiple different pointer devices.
24255
24616
  */ class Mouse {
@@ -24347,39 +24708,40 @@ function isDifferentPointerPosition(positionA, positionB) {
24347
24708
  return init;
24348
24709
  }
24349
24710
  getTarget(instance) {
24350
- var _target;
24351
- return (_target = this.position.target) !== null && _target !== void 0 ? _target : instance.config.document.body;
24711
+ var _this_position_target;
24712
+ return (_this_position_target = this.position.target) !== null && _this_position_target !== void 0 ? _this_position_target : instance.config.document.body;
24352
24713
  }
24353
24714
  startSelecting(instance, clickCount) {
24354
- var ref, ref1;
24715
+ var _this_position_caret, _this_position_caret1;
24355
24716
  // TODO: support extending range (shift)
24356
24717
  this.selecting = setSelectionPerMouseDown({
24357
24718
  document: instance.config.document,
24358
24719
  target: this.getTarget(instance),
24359
- node: (ref = this.position.caret) === null || ref === void 0 ? void 0 : ref.node,
24360
- offset: (ref1 = this.position.caret) === null || ref1 === void 0 ? void 0 : ref1.offset,
24720
+ node: (_this_position_caret = this.position.caret) === null || _this_position_caret === void 0 ? void 0 : _this_position_caret.node,
24721
+ offset: (_this_position_caret1 = this.position.caret) === null || _this_position_caret1 === void 0 ? void 0 : _this_position_caret1.offset,
24361
24722
  clickCount
24362
24723
  });
24363
24724
  }
24364
24725
  modifySelecting(instance) {
24365
- var ref, ref1;
24726
+ var _this_position_caret, _this_position_caret1;
24366
24727
  if (!this.selecting) {
24367
24728
  return;
24368
24729
  }
24369
24730
  modifySelectionPerMouseMove(this.selecting, {
24370
24731
  document: instance.config.document,
24371
24732
  target: this.getTarget(instance),
24372
- node: (ref = this.position.caret) === null || ref === void 0 ? void 0 : ref.node,
24373
- offset: (ref1 = this.position.caret) === null || ref1 === void 0 ? void 0 : ref1.offset
24733
+ node: (_this_position_caret = this.position.caret) === null || _this_position_caret === void 0 ? void 0 : _this_position_caret.node,
24734
+ offset: (_this_position_caret1 = this.position.caret) === null || _this_position_caret1 === void 0 ? void 0 : _this_position_caret1.offset
24374
24735
  });
24375
24736
  }
24376
24737
  endSelecting() {
24377
24738
  this.selecting = undefined;
24378
24739
  }
24379
24740
  constructor(){
24380
- this.position = {};
24381
- this.buttons = new Buttons();
24382
- this.buttonDownTarget = {};
24741
+ _define_property$3(this, "position", {});
24742
+ _define_property$3(this, "buttons", new Buttons());
24743
+ _define_property$3(this, "selecting", void 0);
24744
+ _define_property$3(this, "buttonDownTarget", {});
24383
24745
  // According to spec the `detail` on click events should be the number
24384
24746
  // of *consecutive* clicks with a specific button.
24385
24747
  // On `mousedown` and `mouseup` it should be this number increased by one.
@@ -24390,7 +24752,7 @@ function isDifferentPointerPosition(positionA, positionB) {
24390
24752
  // If there is a delay while a button is pressed,
24391
24753
  // the `mouseup` and `click` are normal, but a following `mousedown` starts a new click count.
24392
24754
  // We'll follow the minimal implementation of Webkit.
24393
- this.clickCount = new class {
24755
+ _define_property$3(this, "clickCount", new class {
24394
24756
  incOnClick(button) {
24395
24757
  const current = this.down[button] === undefined ? undefined : Number(this.down[button]) + 1;
24396
24758
  this.count = this.count[button] === undefined ? {} : {
@@ -24399,13 +24761,13 @@ function isDifferentPointerPosition(positionA, positionB) {
24399
24761
  return current;
24400
24762
  }
24401
24763
  getOnDown(button) {
24402
- var _button;
24764
+ var _this_count_button;
24403
24765
  this.down = {
24404
- [button]: (_button = this.count[button]) !== null && _button !== void 0 ? _button : 0
24766
+ [button]: (_this_count_button = this.count[button]) !== null && _this_count_button !== void 0 ? _this_count_button : 0
24405
24767
  };
24406
- var _button1;
24768
+ var _this_count_button1;
24407
24769
  this.count = {
24408
- [button]: (_button1 = this.count[button]) !== null && _button1 !== void 0 ? _button1 : 0
24770
+ [button]: (_this_count_button1 = this.count[button]) !== null && _this_count_button1 !== void 0 ? _this_count_button1 : 0
24409
24771
  };
24410
24772
  return Number(this.count[button]) + 1;
24411
24773
  }
@@ -24416,16 +24778,16 @@ function isDifferentPointerPosition(positionA, positionB) {
24416
24778
  this.count = {};
24417
24779
  }
24418
24780
  constructor(){
24419
- this.down = {};
24420
- this.count = {};
24781
+ _define_property$3(this, "down", {});
24782
+ _define_property$3(this, "count", {});
24421
24783
  }
24422
- }();
24784
+ }());
24423
24785
  }
24424
24786
  }
24425
24787
 
24426
24788
  function hasPointerEvents(instance, element) {
24427
- var ref;
24428
- return ((ref = checkPointerEvents(instance, element)) === null || ref === void 0 ? void 0 : ref.pointerEvents) !== 'none';
24789
+ var _checkPointerEvents;
24790
+ return ((_checkPointerEvents = checkPointerEvents(instance, element)) === null || _checkPointerEvents === void 0 ? void 0 : _checkPointerEvents.pointerEvents) !== 'none';
24429
24791
  }
24430
24792
  function closestPointerEventsDeclaration(element) {
24431
24793
  const window = getWindow(element);
@@ -24465,7 +24827,7 @@ function assertPointerEvents(instance, element) {
24465
24827
  throw new Error([
24466
24828
  `Unable to perform pointer interaction as the element ${declaration.tree.length > 1 ? 'inherits' : 'has'} \`pointer-events: none\`:`,
24467
24829
  '',
24468
- printTree(declaration.tree),
24830
+ printTree(declaration.tree)
24469
24831
  ].join('\n'));
24470
24832
  }
24471
24833
  }
@@ -24477,17 +24839,17 @@ function printTree(tree) {
24477
24839
  el.hasAttribute('data-testid') && `(testId=${el.getAttribute('data-testid')})`,
24478
24840
  getLabelDescr(el),
24479
24841
  tree.length > 1 && i === 0 && ' <-- This element declared `pointer-events: none`',
24480
- tree.length > 1 && i === tree.length - 1 && ' <-- Asserted pointer events here',
24842
+ tree.length > 1 && i === tree.length - 1 && ' <-- Asserted pointer events here'
24481
24843
  ].filter(Boolean).join('')).join('\n');
24482
24844
  }
24483
24845
  function getLabelDescr(element) {
24484
- var ref;
24846
+ var _element_labels;
24485
24847
  let label;
24486
24848
  if (element.hasAttribute('aria-label')) {
24487
24849
  label = element.getAttribute('aria-label');
24488
24850
  } else if (element.hasAttribute('aria-labelledby')) {
24489
- var ref1, ref2;
24490
- label = (ref1 = element.ownerDocument.getElementById(element.getAttribute('aria-labelledby'))) === null || ref1 === void 0 ? void 0 : (ref2 = ref1.textContent) === null || ref2 === void 0 ? void 0 : ref2.trim();
24851
+ var _element_ownerDocument_getElementById_textContent, _element_ownerDocument_getElementById;
24852
+ label = (_element_ownerDocument_getElementById = element.ownerDocument.getElementById(element.getAttribute('aria-labelledby'))) === null || _element_ownerDocument_getElementById === void 0 ? void 0 : (_element_ownerDocument_getElementById_textContent = _element_ownerDocument_getElementById.textContent) === null || _element_ownerDocument_getElementById_textContent === void 0 ? void 0 : _element_ownerDocument_getElementById_textContent.trim();
24491
24853
  } else if (isElementType(element, [
24492
24854
  'button',
24493
24855
  'input',
@@ -24495,15 +24857,15 @@ function getLabelDescr(element) {
24495
24857
  'output',
24496
24858
  'progress',
24497
24859
  'select',
24498
- 'textarea',
24499
- ]) && ((ref = element.labels) === null || ref === void 0 ? void 0 : ref.length)) {
24860
+ 'textarea'
24861
+ ]) && ((_element_labels = element.labels) === null || _element_labels === void 0 ? void 0 : _element_labels.length)) {
24500
24862
  label = Array.from(element.labels).map((el)=>{
24501
- var ref;
24502
- return (ref = el.textContent) === null || ref === void 0 ? void 0 : ref.trim();
24863
+ var _el_textContent;
24864
+ return (_el_textContent = el.textContent) === null || _el_textContent === void 0 ? void 0 : _el_textContent.trim();
24503
24865
  }).join('|');
24504
24866
  } else if (isElementType(element, 'button')) {
24505
- var ref3;
24506
- label = (ref3 = element.textContent) === null || ref3 === void 0 ? void 0 : ref3.trim();
24867
+ var _element_textContent;
24868
+ label = (_element_textContent = element.textContent) === null || _element_textContent === void 0 ? void 0 : _element_textContent.trim();
24507
24869
  }
24508
24870
  label = label === null || label === void 0 ? void 0 : label.replace(/\n/g, ' ');
24509
24871
  if (Number(label === null || label === void 0 ? void 0 : label.length) > 30) {
@@ -24517,6 +24879,19 @@ function hasBitFlag(conf, flag) {
24517
24879
  return (conf & flag) > 0;
24518
24880
  }
24519
24881
 
24882
+ function _define_property$2(obj, key, value) {
24883
+ if (key in obj) {
24884
+ Object.defineProperty(obj, key, {
24885
+ value: value,
24886
+ enumerable: true,
24887
+ configurable: true,
24888
+ writable: true
24889
+ });
24890
+ } else {
24891
+ obj[key] = value;
24892
+ }
24893
+ return obj;
24894
+ }
24520
24895
  class Pointer {
24521
24896
  init(instance, position) {
24522
24897
  this.position = position;
@@ -24590,8 +24965,8 @@ class Pointer {
24590
24965
  this.isCancelled = true;
24591
24966
  }
24592
24967
  getTarget(instance) {
24593
- var _target;
24594
- return (_target = this.position.target) !== null && _target !== void 0 ? _target : instance.config.document.body;
24968
+ var _this_position_target;
24969
+ return (_this_position_target = this.position.target) !== null && _this_position_target !== void 0 ? _this_position_target : instance.config.document.body;
24595
24970
  }
24596
24971
  getEventInit() {
24597
24972
  return {
@@ -24601,12 +24976,15 @@ class Pointer {
24601
24976
  isPrimary: this.isPrimary
24602
24977
  };
24603
24978
  }
24604
- constructor({ pointerId , pointerType , isPrimary }){
24605
- this.isMultitouch = false;
24606
- this.isCancelled = false;
24607
- this.isDown = false;
24608
- this.isPrevented = false;
24609
- this.position = {};
24979
+ constructor({ pointerId, pointerType, isPrimary }){
24980
+ _define_property$2(this, "pointerId", void 0);
24981
+ _define_property$2(this, "pointerType", void 0);
24982
+ _define_property$2(this, "isPrimary", void 0);
24983
+ _define_property$2(this, "isMultitouch", false);
24984
+ _define_property$2(this, "isCancelled", false);
24985
+ _define_property$2(this, "isDown", false);
24986
+ _define_property$2(this, "isPrevented", false);
24987
+ _define_property$2(this, "position", {});
24610
24988
  this.pointerId = pointerId;
24611
24989
  this.pointerType = pointerType;
24612
24990
  this.isPrimary = isPrimary;
@@ -24614,7 +24992,19 @@ class Pointer {
24614
24992
  }
24615
24993
  }
24616
24994
 
24617
- var _registry, _k;
24995
+ function _define_property$1(obj, key, value) {
24996
+ if (key in obj) {
24997
+ Object.defineProperty(obj, key, {
24998
+ value: value,
24999
+ enumerable: true,
25000
+ configurable: true,
25001
+ writable: true
25002
+ });
25003
+ } else {
25004
+ obj[key] = value;
25005
+ }
25006
+ return obj;
25007
+ }
24618
25008
  class PointerHost {
24619
25009
  isKeyPressed(keyDef) {
24620
25010
  return this.devices.get(keyDef.pointerType).isPressed(keyDef);
@@ -24674,10 +25064,10 @@ class PointerHost {
24674
25064
  this.mouse.down(instance, keyDef, pointer);
24675
25065
  }
24676
25066
  if (!pointer.isMultitouch) {
24677
- const mousemove1 = this.mouse.move(instance, pointer.position);
24678
- mousemove1 === null || mousemove1 === void 0 ? void 0 : mousemove1.leave();
24679
- mousemove1 === null || mousemove1 === void 0 ? void 0 : mousemove1.enter();
24680
- mousemove1 === null || mousemove1 === void 0 ? void 0 : mousemove1.move();
25067
+ const mousemove = this.mouse.move(instance, pointer.position);
25068
+ mousemove === null || mousemove === void 0 ? void 0 : mousemove.leave();
25069
+ mousemove === null || mousemove === void 0 ? void 0 : mousemove.enter();
25070
+ mousemove === null || mousemove === void 0 ? void 0 : mousemove.move();
24681
25071
  this.mouse.up(instance, keyDef, pointer);
24682
25072
  }
24683
25073
  }
@@ -24692,25 +25082,30 @@ class PointerHost {
24692
25082
  this.mouse.resetClickCount();
24693
25083
  }
24694
25084
  getMouseTarget(instance) {
24695
- var _target;
24696
- return (_target = this.mouse.position.target) !== null && _target !== void 0 ? _target : instance.config.document.body;
25085
+ var _this_mouse_position_target;
25086
+ return (_this_mouse_position_target = this.mouse.position.target) !== null && _this_mouse_position_target !== void 0 ? _this_mouse_position_target : instance.config.document.body;
24697
25087
  }
24698
25088
  setMousePosition(position) {
24699
25089
  this.mouse.position = position;
24700
25090
  this.pointers.get('mouse').position = position;
24701
25091
  }
24702
25092
  constructor(system){
24703
- this.devices = new class {
25093
+ _define_property$1(this, "system", void 0);
25094
+ _define_property$1(this, "mouse", void 0);
25095
+ _define_property$1(this, "buttons", void 0);
25096
+ _define_property$1(this, "devices", new class {
24704
25097
  get(k) {
24705
- var ref;
24706
- (ref = (_registry = this.registry)[_k = k]) !== null && ref !== void 0 ? ref : _registry[_k] = new Device();
25098
+ var // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
25099
+ _this_registry, _k;
25100
+ var _;
25101
+ (_ = (_this_registry = this.registry)[_k = k]) !== null && _ !== void 0 ? _ : _this_registry[_k] = new Device();
24707
25102
  return this.registry[k];
24708
25103
  }
24709
25104
  constructor(){
24710
- this.registry = {};
25105
+ _define_property$1(this, "registry", {});
24711
25106
  }
24712
- }();
24713
- this.pointers = new class {
25107
+ }());
25108
+ _define_property$1(this, "pointers", new class {
24714
25109
  new(pointerName, keyDef) {
24715
25110
  const isPrimary = keyDef.pointerType !== 'touch' || !Object.values(this.registry).some((p)=>p.pointerType === 'touch' && !p.isCancelled);
24716
25111
  if (!isPrimary) {
@@ -24737,22 +25132,35 @@ class PointerHost {
24737
25132
  return pointerName in this.registry;
24738
25133
  }
24739
25134
  constructor(){
24740
- this.registry = {
25135
+ _define_property$1(this, "registry", {
24741
25136
  mouse: new Pointer({
24742
25137
  pointerId: 1,
24743
25138
  pointerType: 'mouse',
24744
25139
  isPrimary: true
24745
25140
  })
24746
- };
24747
- this.nextId = 2;
25141
+ });
25142
+ _define_property$1(this, "nextId", 2);
24748
25143
  }
24749
- }();
25144
+ }());
24750
25145
  this.system = system;
24751
25146
  this.buttons = new Buttons();
24752
25147
  this.mouse = new Mouse();
24753
25148
  }
24754
25149
  }
24755
25150
 
25151
+ function _define_property(obj, key, value) {
25152
+ if (key in obj) {
25153
+ Object.defineProperty(obj, key, {
25154
+ value: value,
25155
+ enumerable: true,
25156
+ configurable: true,
25157
+ writable: true
25158
+ });
25159
+ } else {
25160
+ obj[key] = value;
25161
+ }
25162
+ return obj;
25163
+ }
24756
25164
  /**
24757
25165
  * @internal Do not create/alter this by yourself as this type might be subject to changes.
24758
25166
  */ class System {
@@ -24773,8 +25181,8 @@ class PointerHost {
24773
25181
  };
24774
25182
  }
24775
25183
  constructor(){
24776
- this.keyboard = new KeyboardHost(this);
24777
- this.pointer = new PointerHost(this);
25184
+ _define_property(this, "keyboard", new KeyboardHost(this));
25185
+ _define_property(this, "pointer", new PointerHost(this));
24778
25186
  }
24779
25187
  }
24780
25188
 
@@ -24820,7 +25228,7 @@ async function unhover$1(element) {
24820
25228
  });
24821
25229
  }
24822
25230
 
24823
- async function tab$1({ shift } = {}) {
25231
+ async function tab$1({ shift } = {}) {
24824
25232
  return this.keyboard(shift === true ? '{Shift>}{Tab}{/Shift}' : shift === false ? '[/ShiftLeft][/ShiftRight]{Tab}' : '{Tab}');
24825
25233
  }
24826
25234
 
@@ -24836,18 +25244,18 @@ async function tab$1({ shift } = {}) {
24836
25244
  */ function parseKeyDef$1(keyboardMap, text) {
24837
25245
  const defs = [];
24838
25246
  do {
24839
- const { type , descriptor , consumedLength , releasePrevious , releaseSelf =true , repeat , } = readNextDescriptor(text, 'keyboard');
24840
- var ref;
24841
- const keyDef = (ref = keyboardMap.find((def)=>{
25247
+ const { type, descriptor, consumedLength, releasePrevious, releaseSelf = true, repeat } = readNextDescriptor(text, 'keyboard');
25248
+ var _keyboardMap_find;
25249
+ const keyDef = (_keyboardMap_find = keyboardMap.find((def)=>{
24842
25250
  if (type === '[') {
24843
- var ref;
24844
- return ((ref = def.code) === null || ref === void 0 ? void 0 : ref.toLowerCase()) === descriptor.toLowerCase();
25251
+ var _def_code;
25252
+ return ((_def_code = def.code) === null || _def_code === void 0 ? void 0 : _def_code.toLowerCase()) === descriptor.toLowerCase();
24845
25253
  } else if (type === '{') {
24846
- var ref1;
24847
- return ((ref1 = def.key) === null || ref1 === void 0 ? void 0 : ref1.toLowerCase()) === descriptor.toLowerCase();
25254
+ var _def_key;
25255
+ return ((_def_key = def.key) === null || _def_key === void 0 ? void 0 : _def_key.toLowerCase()) === descriptor.toLowerCase();
24848
25256
  }
24849
25257
  return def.key === descriptor;
24850
- })) !== null && ref !== void 0 ? ref : {
25258
+ })) !== null && _keyboardMap_find !== void 0 ? _keyboardMap_find : {
24851
25259
  key: 'Unknown',
24852
25260
  code: 'Unknown',
24853
25261
  [type === '[' ? 'code' : 'key']: descriptor
@@ -24870,8 +25278,8 @@ async function keyboard$1(text) {
24870
25278
  await keyboardAction(this, actions[i]);
24871
25279
  }
24872
25280
  }
24873
- async function keyboardAction(instance, { keyDef , releasePrevious , releaseSelf , repeat }) {
24874
- const { system } = instance;
25281
+ async function keyboardAction(instance, { keyDef, releasePrevious, releaseSelf, repeat }) {
25282
+ const { system } = instance;
24875
25283
  // Release the key automatically if it was pressed before.
24876
25284
  if (system.keyboard.isKeyPressed(keyDef)) {
24877
25285
  await system.keyboard.keyup(instance, keyDef);
@@ -24917,8 +25325,8 @@ function readSelectedValueFromInput(target) {
24917
25325
 
24918
25326
  async function copy$1() {
24919
25327
  const doc = this.config.document;
24920
- var _activeElement;
24921
- const target = (_activeElement = doc.activeElement) !== null && _activeElement !== void 0 ? _activeElement : /* istanbul ignore next */ doc.body;
25328
+ var _doc_activeElement;
25329
+ const target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== void 0 ? _doc_activeElement : /* istanbul ignore next */ doc.body;
24922
25330
  const clipboardData = copySelection(target);
24923
25331
  if (clipboardData.items.length === 0) {
24924
25332
  return;
@@ -24933,8 +25341,8 @@ async function copy$1() {
24933
25341
 
24934
25342
  async function cut$1() {
24935
25343
  const doc = this.config.document;
24936
- var _activeElement;
24937
- const target = (_activeElement = doc.activeElement) !== null && _activeElement !== void 0 ? _activeElement : /* istanbul ignore next */ doc.body;
25344
+ var _doc_activeElement;
25345
+ const target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== void 0 ? _doc_activeElement : /* istanbul ignore next */ doc.body;
24938
25346
  const clipboardData = copySelection(target);
24939
25347
  if (clipboardData.items.length === 0) {
24940
25348
  return;
@@ -24949,10 +25357,10 @@ async function cut$1() {
24949
25357
 
24950
25358
  async function paste$1(clipboardData) {
24951
25359
  const doc = this.config.document;
24952
- var _activeElement;
24953
- const target = (_activeElement = doc.activeElement) !== null && _activeElement !== void 0 ? _activeElement : /* istanbul ignore next */ doc.body;
24954
- var ref;
24955
- const dataTransfer = (ref = typeof clipboardData === 'string' ? getClipboardDataFromString(doc, clipboardData) : clipboardData) !== null && ref !== void 0 ? ref : await readDataTransferFromClipboard(doc).catch(()=>{
25360
+ var _doc_activeElement;
25361
+ const target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== void 0 ? _doc_activeElement : /* istanbul ignore next */ doc.body;
25362
+ var _ref;
25363
+ const dataTransfer = (_ref = typeof clipboardData === 'string' ? getClipboardDataFromString(doc, clipboardData) : clipboardData) !== null && _ref !== void 0 ? _ref : await readDataTransferFromClipboard(doc).catch(()=>{
24956
25364
  throw new Error('`userEvent.paste()` without `clipboardData` requires the `ClipboardAPI` to be available.');
24957
25365
  });
24958
25366
  this.dispatchUIEvent(target, 'paste', {
@@ -24968,7 +25376,7 @@ function getClipboardDataFromString(doc, text) {
24968
25376
  function parseKeyDef(pointerMap, keys) {
24969
25377
  const defs = [];
24970
25378
  do {
24971
- const { descriptor , consumedLength , releasePrevious , releaseSelf =true , } = readNextDescriptor(keys, 'pointer');
25379
+ const { descriptor, consumedLength, releasePrevious, releaseSelf = true } = readNextDescriptor(keys, 'pointer');
24972
25380
  const keyDef = pointerMap.find((p)=>p.name === descriptor);
24973
25381
  if (keyDef) {
24974
25382
  defs.push({
@@ -24983,7 +25391,7 @@ function parseKeyDef(pointerMap, keys) {
24983
25391
  }
24984
25392
 
24985
25393
  async function pointer$1(input) {
24986
- const { pointerMap } = this.config;
25394
+ const { pointerMap } = this.config;
24987
25395
  const actions = [];
24988
25396
  (Array.isArray(input) ? input : [
24989
25397
  input
@@ -25006,16 +25414,16 @@ async function pointer$1(input) {
25006
25414
  this.system.pointer.resetClickCount();
25007
25415
  }
25008
25416
  async function pointerAction(instance, action) {
25009
- var ref, ref1;
25417
+ var _previousPosition_caret, _previousPosition_caret1;
25010
25418
  const pointerName = 'pointerName' in action && action.pointerName ? action.pointerName : 'keyDef' in action ? instance.system.pointer.getPointerName(action.keyDef) : 'mouse';
25011
25419
  const previousPosition = instance.system.pointer.getPreviousPosition(pointerName);
25012
- var _target, _coords, _node, _offset;
25420
+ var _action_target, _action_coords, _action_node, _action_offset;
25013
25421
  const position = {
25014
- target: (_target = action.target) !== null && _target !== void 0 ? _target : getPrevTarget(instance, previousPosition),
25015
- coords: (_coords = action.coords) !== null && _coords !== void 0 ? _coords : previousPosition === null || previousPosition === void 0 ? void 0 : previousPosition.coords,
25422
+ target: (_action_target = action.target) !== null && _action_target !== void 0 ? _action_target : getPrevTarget(instance, previousPosition),
25423
+ coords: (_action_coords = action.coords) !== null && _action_coords !== void 0 ? _action_coords : previousPosition === null || previousPosition === void 0 ? void 0 : previousPosition.coords,
25016
25424
  caret: {
25017
- node: (_node = action.node) !== null && _node !== void 0 ? _node : hasCaretPosition(action) ? undefined : previousPosition === null || previousPosition === void 0 ? void 0 : (ref = previousPosition.caret) === null || ref === void 0 ? void 0 : ref.node,
25018
- offset: (_offset = action.offset) !== null && _offset !== void 0 ? _offset : hasCaretPosition(action) ? undefined : previousPosition === null || previousPosition === void 0 ? void 0 : (ref1 = previousPosition.caret) === null || ref1 === void 0 ? void 0 : ref1.offset
25425
+ node: (_action_node = action.node) !== null && _action_node !== void 0 ? _action_node : hasCaretPosition(action) ? undefined : previousPosition === null || previousPosition === void 0 ? void 0 : (_previousPosition_caret = previousPosition.caret) === null || _previousPosition_caret === void 0 ? void 0 : _previousPosition_caret.node,
25426
+ offset: (_action_offset = action.offset) !== null && _action_offset !== void 0 ? _action_offset : hasCaretPosition(action) ? undefined : previousPosition === null || previousPosition === void 0 ? void 0 : (_previousPosition_caret1 = previousPosition.caret) === null || _previousPosition_caret1 === void 0 ? void 0 : _previousPosition_caret1.offset
25019
25427
  }
25020
25428
  };
25021
25429
  if ('keyDef' in action) {
@@ -25037,15 +25445,15 @@ async function pointerAction(instance, action) {
25037
25445
  }
25038
25446
  }
25039
25447
  function hasCaretPosition(action) {
25040
- var _target, ref;
25041
- return !!((ref = (_target = action.target) !== null && _target !== void 0 ? _target : action.node) !== null && ref !== void 0 ? ref : action.offset !== undefined);
25448
+ var _action_target, _ref;
25449
+ return !!((_ref = (_action_target = action.target) !== null && _action_target !== void 0 ? _action_target : action.node) !== null && _ref !== void 0 ? _ref : action.offset !== undefined);
25042
25450
  }
25043
25451
  function getPrevTarget(instance, position) {
25044
25452
  if (!position) {
25045
25453
  throw new Error('This pointer has no previous position. Provide a target property!');
25046
25454
  }
25047
- var _target;
25048
- return (_target = position.target) !== null && _target !== void 0 ? _target : instance.config.document.body;
25455
+ var _position_target;
25456
+ return (_position_target = position.target) !== null && _position_target !== void 0 ? _position_target : instance.config.document.body;
25049
25457
  }
25050
25458
 
25051
25459
  async function clear$1(element) {
@@ -25063,6 +25471,7 @@ async function clear$1(element) {
25063
25471
  input(this, element, '', 'deleteContentBackward');
25064
25472
  }
25065
25473
 
25474
+ const { getConfig: getConfig$1 } = named$1;
25066
25475
  async function selectOptions$1(select, values) {
25067
25476
  return selectOptionsBase.call(this, true, select, values);
25068
25477
  }
@@ -25071,7 +25480,7 @@ async function deselectOptions$1(select, values) {
25071
25480
  }
25072
25481
  async function selectOptionsBase(newValue, select, values) {
25073
25482
  if (!newValue && !select.multiple) {
25074
- throw getConfig().getElementError(`Unable to deselect an option in a non-multiple select. Use selectOptions to change the selection instead.`, select);
25483
+ throw getConfig$1().getElementError(`Unable to deselect an option in a non-multiple select. Use selectOptions to change the selection instead.`, select);
25075
25484
  }
25076
25485
  const valArray = Array.isArray(values) ? values : [
25077
25486
  values
@@ -25085,7 +25494,7 @@ async function selectOptionsBase(newValue, select, values) {
25085
25494
  if (matchingOption) {
25086
25495
  return matchingOption;
25087
25496
  } else {
25088
- throw getConfig().getElementError(`Value "${String(val)}" not found in options`, select);
25497
+ throw getConfig$1().getElementError(`Value "${String(val)}" not found in options`, select);
25089
25498
  }
25090
25499
  }
25091
25500
  }).filter((option)=>!isDisabled(option));
@@ -25126,15 +25535,15 @@ async function selectOptionsBase(newValue, select, values) {
25126
25535
  await wait(this.config);
25127
25536
  }
25128
25537
  } else if (selectedOptions.length === 1) {
25129
- const withPointerEvents1 = this.config.pointerEventsCheck === 0 ? true : hasPointerEvents(this, select);
25538
+ const withPointerEvents = this.config.pointerEventsCheck === 0 ? true : hasPointerEvents(this, select);
25130
25539
  // the click to open the select options
25131
- if (withPointerEvents1) {
25540
+ if (withPointerEvents) {
25132
25541
  await this.click(select);
25133
25542
  } else {
25134
25543
  focusElement(select);
25135
25544
  }
25136
25545
  selectOption(selectedOptions[0]);
25137
- if (withPointerEvents1) {
25546
+ if (withPointerEvents) {
25138
25547
  // the browser triggers another click event on the select for the click on the option
25139
25548
  // this second click has no 'down' phase
25140
25549
  this.dispatchUIEvent(select, 'pointerover');
@@ -25147,19 +25556,19 @@ async function selectOptionsBase(newValue, select, values) {
25147
25556
  }
25148
25557
  await wait(this.config);
25149
25558
  } else {
25150
- throw getConfig().getElementError(`Cannot select multiple options on a non-multiple select`, select);
25559
+ throw getConfig$1().getElementError(`Cannot select multiple options on a non-multiple select`, select);
25151
25560
  }
25152
25561
  } else if (select.getAttribute('role') === 'listbox') {
25153
- for (const option1 of selectedOptions){
25154
- await this.click(option1);
25155
- await this.unhover(option1);
25562
+ for (const option of selectedOptions){
25563
+ await this.click(option);
25564
+ await this.unhover(option);
25156
25565
  }
25157
25566
  } else {
25158
- throw getConfig().getElementError(`Cannot select options on elements that are neither select nor listbox elements`, select);
25567
+ throw getConfig$1().getElementError(`Cannot select options on elements that are neither select nor listbox elements`, select);
25159
25568
  }
25160
25569
  }
25161
25570
 
25162
- async function type$1(element, text, { skipClick =this.config.skipClick , skipAutoClose =this.config.skipAutoClose , initialSelectionStart , initialSelectionEnd } = {}) {
25571
+ async function type$1(element, text, { skipClick = this.config.skipClick, skipAutoClose = this.config.skipAutoClose, initialSelectionStart, initialSelectionEnd } = {}) {
25163
25572
  // TODO: properly type guard
25164
25573
  // we use this workaround for now to prevent changing behavior
25165
25574
  if (element.disabled) return;
@@ -25188,8 +25597,8 @@ function restoreProperty(obj, prop, descriptor) {
25188
25597
  }
25189
25598
  }
25190
25599
  function setFiles(el, files) {
25191
- var ref;
25192
- (ref = el[fakeFiles]) === null || ref === void 0 ? void 0 : ref.restore();
25600
+ var _el_fakeFiles;
25601
+ (_el_fakeFiles = el[fakeFiles]) === null || _el_fakeFiles === void 0 ? void 0 : _el_fakeFiles.restore();
25193
25602
  const typeDescr = Object.getOwnPropertyDescriptor(el, 'type');
25194
25603
  const valueDescr = Object.getOwnPropertyDescriptor(el, 'value');
25195
25604
  const filesDescr = Object.getOwnPropertyDescriptor(el, 'files');
@@ -25213,8 +25622,8 @@ function setFiles(el, files) {
25213
25622
  if (v === '') {
25214
25623
  restore();
25215
25624
  } else {
25216
- var ref;
25217
- valueDescr === null || valueDescr === void 0 ? void 0 : (ref = valueDescr.set) === null || ref === void 0 ? void 0 : ref.call(el, v);
25625
+ var _valueDescr_set;
25626
+ valueDescr === null || valueDescr === void 0 ? void 0 : (_valueDescr_set = valueDescr.set) === null || _valueDescr_set === void 0 ? void 0 : _valueDescr_set.call(el, v);
25218
25627
  }
25219
25628
  }
25220
25629
  },
@@ -25243,11 +25652,11 @@ async function upload$1(element, fileOrFiles) {
25243
25652
  fileOrFiles
25244
25653
  ]).filter((file)=>!this.config.applyAccept || isAcceptableFile(file, input.accept)).slice(0, input.multiple ? undefined : 1);
25245
25654
  const fileDialog = ()=>{
25246
- var ref;
25655
+ var _input_files;
25247
25656
  // do not fire an input event if the file selection does not change
25248
- if (files.length === ((ref = input.files) === null || ref === void 0 ? void 0 : ref.length) && files.every((f, i)=>{
25249
- var ref;
25250
- return f === ((ref = input.files) === null || ref === void 0 ? void 0 : ref.item(i));
25657
+ if (files.length === ((_input_files = input.files) === null || _input_files === void 0 ? void 0 : _input_files.length) && files.every((f, i)=>{
25658
+ var _input_files;
25659
+ return f === ((_input_files = input.files) === null || _input_files === void 0 ? void 0 : _input_files.item(i));
25251
25660
  })) {
25252
25661
  return;
25253
25662
  }
@@ -25279,26 +25688,26 @@ function isAcceptableFile(file, accept) {
25279
25688
  });
25280
25689
  }
25281
25690
 
25282
- var api = /*#__PURE__*/Object.freeze({
25283
- __proto__: null,
25284
- clear: clear$1,
25285
- click: click$1,
25286
- copy: copy$1,
25287
- cut: cut$1,
25288
- dblClick: dblClick$1,
25289
- deselectOptions: deselectOptions$1,
25290
- hover: hover$1,
25291
- keyboard: keyboard$1,
25292
- paste: paste$1,
25293
- pointer: pointer$1,
25294
- selectOptions: selectOptions$1,
25295
- tab: tab$1,
25296
- tripleClick: tripleClick$1,
25297
- type: type$1,
25298
- unhover: unhover$1,
25299
- upload: upload$1
25300
- });
25301
-
25691
+ const userEventApi = {
25692
+ click: click$1,
25693
+ dblClick: dblClick$1,
25694
+ tripleClick: tripleClick$1,
25695
+ hover: hover$1,
25696
+ unhover: unhover$1,
25697
+ tab: tab$1,
25698
+ keyboard: keyboard$1,
25699
+ copy: copy$1,
25700
+ cut: cut$1,
25701
+ paste: paste$1,
25702
+ pointer: pointer$1,
25703
+ clear: clear$1,
25704
+ deselectOptions: deselectOptions$1,
25705
+ selectOptions: selectOptions$1,
25706
+ type: type$1,
25707
+ upload: upload$1
25708
+ };
25709
+
25710
+ const { getConfig } = named$1;
25302
25711
  /**
25303
25712
  * Wrap an internal Promise
25304
25713
  */ function wrapAsync(implementation) {
@@ -25341,18 +25750,18 @@ function createConfig(options = {}, defaults = defaultOptionsSetup, node) {
25341
25750
  */ function setupMain(options = {}) {
25342
25751
  const config = createConfig(options);
25343
25752
  prepareDocument(config.document);
25344
- var _defaultView;
25345
- const view = (_defaultView = config.document.defaultView) !== null && _defaultView !== void 0 ? _defaultView : /* istanbul ignore next */ globalThis.window;
25753
+ var _config_document_defaultView;
25754
+ const view = (_config_document_defaultView = config.document.defaultView) !== null && _config_document_defaultView !== void 0 ? _config_document_defaultView : /* istanbul ignore next */ globalThis.window;
25346
25755
  attachClipboardStubToView(view);
25347
25756
  return createInstance(config).api;
25348
25757
  }
25349
25758
  /**
25350
25759
  * Setup in direct call per `userEvent.anyApi()`
25351
- */ function setupDirect({ keyboardState , pointerState , ...options } = {}, node) {
25760
+ */ function setupDirect({ keyboardState, pointerState, ...options } = {}, node) {
25352
25761
  const config = createConfig(options, defaultOptionsDirect, node);
25353
25762
  prepareDocument(config.document);
25354
- var ref;
25355
- const system = (ref = pointerState !== null && pointerState !== void 0 ? pointerState : keyboardState) !== null && ref !== void 0 ? ref : new System();
25763
+ var _ref;
25764
+ const system = (_ref = pointerState !== null && pointerState !== void 0 ? pointerState : keyboardState) !== null && _ref !== void 0 ? _ref : new System();
25356
25765
  return {
25357
25766
  api: createInstance(config, system).api,
25358
25767
  system
@@ -25387,22 +25796,22 @@ function createInstance(config, system = new System()) {
25387
25796
  dispatchUIEvent: dispatchUIEvent.bind(instance),
25388
25797
  system,
25389
25798
  levelRefs: {},
25390
- ...api
25799
+ ...userEventApi
25391
25800
  });
25392
25801
  return {
25393
25802
  instance,
25394
25803
  api: {
25395
- ...Object.fromEntries(Object.entries(api).map(([name, api])=>[
25804
+ ...Object.fromEntries(Object.entries(userEventApi).map(([name, api])=>[
25396
25805
  name,
25397
- wrapAndBindImpl(instance, api),
25806
+ wrapAndBindImpl(instance, api)
25398
25807
  ])),
25399
25808
  setup: setupSub.bind(instance)
25400
25809
  }
25401
25810
  };
25402
25811
  }
25403
25812
  function getDocument(options, node, defaults) {
25404
- var _document, ref;
25405
- return (ref = (_document = options.document) !== null && _document !== void 0 ? _document : node && getDocumentFromNode(node)) !== null && ref !== void 0 ? ref : defaults.document;
25813
+ var _options_document, _ref;
25814
+ return (_ref = (_options_document = options.document) !== null && _options_document !== void 0 ? _options_document : node && getDocumentFromNode(node)) !== null && _ref !== void 0 ? _ref : defaults.document;
25406
25815
  }
25407
25816
 
25408
25817
  function clear(element) {
@@ -25427,11 +25836,11 @@ function hover(element, options = {}) {
25427
25836
  return setupDirect(options).api.hover(element);
25428
25837
  }
25429
25838
  async function keyboard(text, options = {}) {
25430
- const { api , system } = setupDirect(options);
25839
+ const { api, system } = setupDirect(options);
25431
25840
  return api.keyboard(text).then(()=>system);
25432
25841
  }
25433
25842
  async function pointer(input, options = {}) {
25434
- const { api , system } = setupDirect(options);
25843
+ const { api, system } = setupDirect(options);
25435
25844
  return api.pointer(input).then(()=>system);
25436
25845
  }
25437
25846
  function paste(clipboardData, options) {
@@ -25447,7 +25856,7 @@ function type(element, text, options = {}) {
25447
25856
  return setupDirect(options, element).api.type(element, text, options);
25448
25857
  }
25449
25858
  function unhover(element, options = {}) {
25450
- const { api , system } = setupDirect(options);
25859
+ const { api, system } = setupDirect(options);
25451
25860
  system.pointer.setMousePosition({
25452
25861
  target: element
25453
25862
  });