@kakadu/components 6.17.1 → 6.19.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.
package/build/index.mjs CHANGED
@@ -7,11 +7,11 @@ import { default as y } from "./components/logos/bankid-logo.mjs";
7
7
  import { default as k } from "./components/logos/dnb-logo.mjs";
8
8
  import { default as b } from "./components/logos/entur-logo.mjs";
9
9
  import { default as P } from "./components/logos/gjensidige-logo.mjs";
10
- import { default as w } from "./components/logos/kakadu-academy-logo.mjs";
11
- import { default as D } from "./components/logos/kakadu-guide-icon.mjs";
10
+ import { default as A } from "./components/logos/kakadu-academy-logo.mjs";
11
+ import { default as B } from "./components/logos/kakadu-guide-icon.mjs";
12
12
  import { default as M, KakaduGuideLogoSvg as E, kakaduGuideLogoVariants as G } from "./components/logos/kakadu-guide-logo.mjs";
13
13
  import { default as H } from "./components/logos/kakadu-index-logo.mjs";
14
- import { default as V } from "./components/logos/kakadu-logo.mjs";
14
+ import { default as N } from "./components/logos/kakadu-logo.mjs";
15
15
  import { default as U } from "./components/logos/kakadu-play-logo.mjs";
16
16
  import { default as J } from "./components/logos/kolumbus-logo.mjs";
17
17
  import { default as z } from "./components/logos/nordea-logo.mjs";
@@ -28,11 +28,11 @@ import { default as xe } from "./components/box.mjs";
28
28
  import { default as Se, ButtonLoader as ie, buttonDangerStyles as ve, buttonSecondaryStyles as ce, buttonSuccessStyles as he, buttonVariants as Le, buttonWarningStyles as ye } from "./components/button.mjs";
29
29
  import { default as ke, buttonTooltipPositions as Te } from "./components/button-tooltip.mjs";
30
30
  import { default as Ie } from "./components/card.mjs";
31
- import { default as Ae, CheckboxIcon as we, TextCheckbox as Be } from "./components/checkbox.mjs";
31
+ import { default as we, CheckboxIcon as Ae, TextCheckbox as De } from "./components/checkbox.mjs";
32
32
  import { default as Fe } from "./components/click-ripples.mjs";
33
33
  import { default as Ee, formatCode as Ge } from "./components/code.mjs";
34
34
  import { default as He } from "./components/collapsible.mjs";
35
- import { default as Ve, getComboboxOptionString as Ne } from "./components/combobox.mjs";
35
+ import { default as Ne, getComboboxOptionString as Ve } from "./components/combobox.mjs";
36
36
  import { default as We } from "./components/copy-icon-button.mjs";
37
37
  import { default as je } from "./components/datum.mjs";
38
38
  import { default as Oe } from "./components/decorators.mjs";
@@ -45,11 +45,11 @@ import { default as po } from "./components/header.mjs";
45
45
  import { default as no, normalBlendStyles as xo } from "./components/hover-gradient.mjs";
46
46
  import { default as So, iconButtonVariants as io } from "./components/icon-button.mjs";
47
47
  import { default as co, InputAttachment as ho, InputLabel as Lo, errorParagraph as yo, inputStyles as Co, legendStyles as ko } from "./components/input.mjs";
48
- import { default as bo, ModalActions as Io, ModalContent as Po, ModalHeading as Ao, useModal as wo, useModalContext as Bo } from "./components/modal.mjs";
48
+ import { default as bo, ModalActions as Io, ModalContent as Po, ModalHeading as wo, useModal as Ao, useModalContext as Do } from "./components/modal.mjs";
49
49
  import { default as Fo } from "./components/moving-gradients.mjs";
50
50
  import { default as Eo } from "./components/moving-stars.mjs";
51
51
  import { default as Ro, noticeTypes as Ho, noticeTypes as Ko } from "./components/notice.mjs";
52
- import { default as No, NotificationProvider as Uo, useCreateNotification as Wo } from "./components/notification.mjs";
52
+ import { default as Vo, NotificationProvider as Uo, useCreateNotification as Wo } from "./components/notification.mjs";
53
53
  import { default as jo, dangerPopoverMenuItemStyles as zo, usePopoverMenu as Oo } from "./components/popover-menu.mjs";
54
54
  import { default as qo, PopoverContainer as Xo, usePopover as Yo, usePopoverContext as Zo } from "./components/popover.mjs";
55
55
  import { default as $o, useRevealer as et } from "./components/revealer.mjs";
@@ -58,9 +58,9 @@ import { default as rt, SeparatorLabel as ft, SmallSeparator as st, VerticalSepa
58
58
  import { default as dt, SkeletonInstance as pt, getDeterministicSkeletonWidth as mt } from "./components/skeleton.mjs";
59
59
  import { RevealSpinner as xt, default as gt } from "./components/spinner.mjs";
60
60
  import { AnchorHeading as it, Footnote as vt, Heading as ct, Hero as ht, Label as Lt, Paragraph as yt, Span as Ct, default as kt, defaultHeadingElementType as Tt, spanStyles as bt, textShadowStyles as It } from "./components/text.mjs";
61
- import { default as At, textButtonVariants as wt } from "./components/text-button.mjs";
62
- import { default as Dt, getThemePreference as Ft, setThemePreference as Mt, themePreferences as Et, useIsDarkTheme as Gt, useIsLightTheme as Rt, useTheme as Ht } from "./components/theme-setter.mjs";
63
- import { default as Vt } from "./components/veil.mjs";
61
+ import { default as wt, textButtonVariants as At } from "./components/text-button.mjs";
62
+ import { default as Bt, getThemePreference as Ft, setThemePreference as Mt, themePreferences as Et, useIsDarkTheme as Gt, useIsLightTheme as Rt, useTheme as Ht } from "./components/theme-setter.mjs";
63
+ import { default as Nt } from "./components/veil.mjs";
64
64
  import { default as Ut, wrapperWidths as Wt } from "./components/wrapper.mjs";
65
65
  import { default as jt, iconShadowStyles as zt, iconTypes as Ot } from "./icons/icon.mjs";
66
66
  import { default as qt } from "./icons/anchor-down.mjs";
@@ -80,13 +80,13 @@ import { default as La } from "./icons/chevron-right.mjs";
80
80
  import { default as Ca } from "./icons/chevron-up.mjs";
81
81
  import { default as Ta } from "./icons/cog.mjs";
82
82
  import { default as Ia } from "./icons/copy.mjs";
83
- import { default as Aa } from "./icons/document.mjs";
84
- import { default as Ba } from "./icons/dots.mjs";
83
+ import { default as wa } from "./icons/document.mjs";
84
+ import { default as Da } from "./icons/dots.mjs";
85
85
  import { default as Fa } from "./icons/drag.mjs";
86
86
  import { default as Ea } from "./icons/edit.mjs";
87
87
  import { default as Ra } from "./icons/external.mjs";
88
88
  import { default as Ka } from "./icons/exclamation-triangle.mjs";
89
- import { default as Na } from "./icons/eye.mjs";
89
+ import { default as Va } from "./icons/eye.mjs";
90
90
  import { default as Wa } from "./icons/information.mjs";
91
91
  import { default as ja } from "./icons/kakadu-guide-glyph.mjs";
92
92
  import { default as Oa } from "./icons/kakadu-guide-icon.mjs";
@@ -102,25 +102,28 @@ import { default as pr } from "./icons/thumbs-down.mjs";
102
102
  import { default as nr } from "./icons/thumbs-up.mjs";
103
103
  import { default as gr } from "./icons/times.mjs";
104
104
  import { default as ir } from "./icons/trash.mjs";
105
- import { default as cr } from "./icons/trend-up.mjs";
106
- import { default as Lr } from "./icons/chrome-browser-logo.mjs";
107
- import { default as Cr } from "./icons/edge-browser-logo.mjs";
108
- import { default as Tr } from "./hooks/use-escaped-id.mjs";
109
- import { purgeCache as Ir, default as Pr, useFetcher as Ar, useJsonFetch as wr, useJsonFetcher as Br } from "./hooks/use-fetch.mjs";
110
- import { default as Fr } from "./hooks/use-is-document-focused.mjs";
111
- import { useHasBeenInView as Er, default as Gr } from "./hooks/use-is-in-view.mjs";
112
- import { default as Hr } from "./hooks/use-local-storage.mjs";
113
- import { default as Vr } from "./hooks/use-media-query.mjs";
114
- import { default as Ur } from "./hooks/use-synchronized-value.mjs";
115
- import { default as Jr } from "./hooks/use-throttled.mjs";
116
- import { default as zr } from "./utilities/boolean-filter.mjs";
117
- import { default as Qr } from "./utilities/clamp.mjs";
118
- import { default as Xr } from "./utilities/copy-to-clipboard.mjs";
119
- import { default as Zr } from "./utilities/generate-random-id.mjs";
120
- import { default as $r } from "./utilities/listeners.mjs";
121
- import { default as of } from "./utilities/scale.mjs";
122
- import { default as af } from "./utilities/search.mjs";
123
- import { default as ff } from "./utilities/string-to-hex-color.mjs";
105
+ import { default as cr } from "./icons/trend-down.mjs";
106
+ import { default as Lr } from "./icons/trend-up.mjs";
107
+ import { default as Cr } from "./icons/chrome-browser-logo.mjs";
108
+ import { default as Tr } from "./icons/edge-browser-logo.mjs";
109
+ import { default as Ir } from "./hooks/use-escaped-id.mjs";
110
+ import { purgeCache as wr, default as Ar, useFetcher as Dr, useJsonFetch as Br, useJsonFetcher as Fr } from "./hooks/use-fetch.mjs";
111
+ import { default as Er } from "./hooks/use-is-document-focused.mjs";
112
+ import { useHasBeenInView as Rr, default as Hr } from "./hooks/use-is-in-view.mjs";
113
+ import { default as Nr } from "./hooks/use-local-storage.mjs";
114
+ import { default as Ur } from "./hooks/use-media-query.mjs";
115
+ import { default as Jr } from "./hooks/use-session-storage.mjs";
116
+ import { default as zr } from "./hooks/use-synchronized-value.mjs";
117
+ import { default as Qr } from "./hooks/use-throttled.mjs";
118
+ import { default as Xr } from "./utilities/boolean-filter.mjs";
119
+ import { default as Zr } from "./utilities/clamp.mjs";
120
+ import { default as $r } from "./utilities/copy-to-clipboard.mjs";
121
+ import { default as of } from "./utilities/generate-random-id.mjs";
122
+ import { default as af } from "./utilities/is-number.mjs";
123
+ import { default as ff } from "./utilities/listeners.mjs";
124
+ import { default as lf } from "./utilities/scale.mjs";
125
+ import { default as df } from "./utilities/search.mjs";
126
+ import { default as mf } from "./utilities/string-to-hex-color.mjs";
124
127
  export {
125
128
  x as AktLogoSvg,
126
129
  v as AmediaLogoSvg,
@@ -146,33 +149,33 @@ export {
146
149
  pa as CaretRightSvg,
147
150
  na as CaretUpSvg,
148
151
  ga as CheckSvg,
149
- Ae as Checkbox,
150
- we as CheckboxIcon,
152
+ we as Checkbox,
153
+ Ae as CheckboxIcon,
151
154
  ia as ChevronDownSvg,
152
155
  ca as ChevronLeftSvg,
153
156
  La as ChevronRightSvg,
154
157
  Ca as ChevronUpSvg,
155
- Lr as ChromeBrowserLogoSvg,
158
+ Cr as ChromeBrowserLogoSvg,
156
159
  Fe as ClickRipples,
157
160
  Ee as Code,
158
161
  Ta as CogSvg,
159
162
  He as Collapsible,
160
- Ve as Combobox,
163
+ Ne as Combobox,
161
164
  We as CopyIconButton,
162
165
  Ia as CopySvg,
163
166
  je as Datum,
164
167
  Oe as Decorators,
165
168
  k as DnbLogoSvg,
166
- Aa as DocumentSvg,
169
+ wa as DocumentSvg,
167
170
  qe as Dot,
168
- Ba as DotsSvg,
171
+ Da as DotsSvg,
169
172
  Fa as DragSvg,
170
- Cr as EdgeBrowserLogoSvg,
173
+ Tr as EdgeBrowserLogoSvg,
171
174
  Ea as EditSvg,
172
175
  b as EnturLogoSvg,
173
176
  Ka as ExclamationTriangleSvg,
174
177
  Ra as ExternalSvg,
175
- Na as EyeSvg,
178
+ Va as EyeSvg,
176
179
  Ye as Flag,
177
180
  $e as Flex,
178
181
  t as FontFamilyHead,
@@ -190,14 +193,14 @@ export {
190
193
  co as Input,
191
194
  ho as InputAttachment,
192
195
  Lo as InputLabel,
193
- w as KakaduAcademyLogoSvg,
196
+ A as KakaduAcademyLogoSvg,
194
197
  ja as KakaduGuideGlyphSvg,
195
- D as KakaduGuideIcon,
198
+ B as KakaduGuideIcon,
196
199
  Oa as KakaduGuideIconSvg,
197
200
  M as KakaduGuideLogo,
198
201
  E as KakaduGuideLogoSvg,
199
202
  H as KakaduIndexLogoSvg,
200
- V as KakaduLogoSvg,
203
+ N as KakaduLogoSvg,
201
204
  U as KakaduPlayLogoSvg,
202
205
  J as KolumbusLogoSvg,
203
206
  Lt as Label,
@@ -205,13 +208,13 @@ export {
205
208
  bo as Modal,
206
209
  Io as ModalActions,
207
210
  Po as ModalContent,
208
- Ao as ModalHeading,
211
+ wo as ModalHeading,
209
212
  Fo as MovingGradients,
210
213
  Eo as MovingStars,
211
214
  z as NordeaLogoSvg,
212
215
  Q as NorskTippingLogoSvg,
213
216
  Ro as Notice,
214
- No as Notification,
217
+ Vo as Notification,
215
218
  Uo as NotificationProvider,
216
219
  Ya as PackageSvg,
217
220
  yt as Paragraph,
@@ -241,19 +244,20 @@ export {
241
244
  ae as StorebrandLogoSvg,
242
245
  ur as TestSvg,
243
246
  kt as Text,
244
- At as TextButton,
245
- Be as TextCheckbox,
246
- Dt as ThemeSetter,
247
+ wt as TextButton,
248
+ De as TextCheckbox,
249
+ Bt as ThemeSetter,
247
250
  pr as ThumbsDownSvg,
248
251
  nr as ThumbsUpSvg,
249
252
  gr as TimesSvg,
250
253
  ir as TrashSvg,
251
- cr as TrendUpSvg,
252
- Vt as Veil,
254
+ cr as TrendDownSvg,
255
+ Lr as TrendUpSvg,
256
+ Nt as Veil,
253
257
  lt as VerticalSeparator,
254
258
  Ut as Wrapper,
255
259
  se as ariaTextStyles,
256
- zr as booleanFilter,
260
+ Xr as booleanFilter,
257
261
  ve as buttonDangerStyles,
258
262
  a as buttonResetStyles,
259
263
  ce as buttonSecondaryStyles,
@@ -261,9 +265,9 @@ export {
261
265
  Te as buttonTooltipPositions,
262
266
  Le as buttonVariants,
263
267
  ye as buttonWarningStyles,
264
- Qr as clamp,
265
- Xr as copyToClipboard,
266
- $r as createListener,
268
+ Zr as clamp,
269
+ $r as copyToClipboard,
270
+ ff as createListener,
267
271
  zo as dangerPopoverMenuItemStyles,
268
272
  r as darkBackgroundColor,
269
273
  de as defaultAtomElementType,
@@ -277,14 +281,15 @@ export {
277
281
  ro as footerSectionLinks,
278
282
  fo as footerSections,
279
283
  Ge as formatCode,
280
- Zr as generateRandomId,
281
- Ne as getComboboxOptionString,
284
+ of as generateRandomId,
285
+ Ve as getComboboxOptionString,
282
286
  mt as getDeterministicSkeletonWidth,
283
287
  Ft as getThemePreference,
284
288
  io as iconButtonVariants,
285
289
  zt as iconShadowStyles,
286
290
  Ot as iconTypes,
287
291
  Co as inputStyles,
292
+ af as isNumber,
288
293
  G as kakaduGuideLogoVariants,
289
294
  ko as legendStyles,
290
295
  l as lightBackgroundColor,
@@ -294,37 +299,38 @@ export {
294
299
  Ko as notificationTypes,
295
300
  d as overflowProtectionStyles,
296
301
  p as overlayEffectStyles,
297
- Ir as purgeCache,
298
- of as scale,
299
- af as search,
302
+ wr as purgeCache,
303
+ lf as scale,
304
+ df as search,
300
305
  Mt as setThemePreference,
301
306
  bt as spanStyles,
302
- ff as stringToHexColor,
303
- wt as textButtonVariants,
307
+ mf as stringToHexColor,
308
+ At as textButtonVariants,
304
309
  It as textShadowStyles,
305
310
  m as theme,
306
311
  Et as themePreferences,
307
312
  Wo as useCreateNotification,
308
- Tr as useEscapedId,
309
- Pr as useFetch,
310
- Ar as useFetcher,
311
- Er as useHasBeenInView,
313
+ Ir as useEscapedId,
314
+ Ar as useFetch,
315
+ Dr as useFetcher,
316
+ Rr as useHasBeenInView,
312
317
  Gt as useIsDarkTheme,
313
- Fr as useIsDocumentFocused,
314
- Gr as useIsInView,
318
+ Er as useIsDocumentFocused,
319
+ Hr as useIsInView,
315
320
  Rt as useIsLightTheme,
316
- wr as useJsonFetch,
317
- Br as useJsonFetcher,
318
- Hr as useLocalStorage,
319
- Vr as useMediaQuery,
320
- wo as useModal,
321
- Bo as useModalContext,
321
+ Br as useJsonFetch,
322
+ Fr as useJsonFetcher,
323
+ Nr as useLocalStorage,
324
+ Ur as useMediaQuery,
325
+ Ao as useModal,
326
+ Do as useModalContext,
322
327
  Yo as usePopover,
323
328
  Zo as usePopoverContext,
324
329
  Oo as usePopoverMenu,
325
330
  et as useRevealer,
326
- Ur as useSynchronizedValue,
331
+ Jr as useSessionStorage,
332
+ zr as useSynchronizedValue,
327
333
  Ht as useTheme,
328
- Jr as useThrottled,
334
+ Qr as useThrottled,
329
335
  Wt as wrapperWidths
330
336
  };
@@ -0,0 +1 @@
1
+ export default function isNumber(input: any): input is number;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function u(e){return typeof e=="number"&&!Number.isNaN(e)}exports.default=u;
@@ -0,0 +1,6 @@
1
+ function r(e) {
2
+ return typeof e == "number" && !Number.isNaN(e);
3
+ }
4
+ export {
5
+ r as default
6
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kakadu/components",
3
- "version": "6.17.1",
3
+ "version": "6.19.0",
4
4
  "description": "Kakadu components library",
5
5
  "license": "MIT",
6
6
  "main": "./build/index.js",
@@ -68,13 +68,13 @@
68
68
  "devDependencies": {
69
69
  "@chromatic-com/storybook": "^4.1.4",
70
70
  "@kuma-ui/core": "^1.6.4",
71
- "@storybook/addon-a11y": "^10.6.6",
72
- "@storybook/addon-docs": "^10.6.6",
73
- "@storybook/addon-vitest": "^10.6.6",
74
- "@storybook/nextjs-vite": "^10.6.6",
71
+ "@storybook/addon-a11y": "^10.6.7",
72
+ "@storybook/addon-docs": "^10.6.7",
73
+ "@storybook/addon-vitest": "^10.6.7",
74
+ "@storybook/nextjs-vite": "^10.6.7",
75
75
  "@testing-library/jest-dom": "^6.9.1",
76
76
  "@testing-library/react": "^16.3.3",
77
- "@testing-library/user-event": "^14.6.8",
77
+ "@testing-library/user-event": "^14.6.13",
78
78
  "@types/fast-levenshtein": "^0.0.4",
79
79
  "@types/node": "^20.19.43",
80
80
  "@types/react": "^19.3.0",
@@ -82,19 +82,19 @@
82
82
  "@vitejs/plugin-react": "^5.2.0",
83
83
  "@vitest/browser-playwright": "^4.0.4",
84
84
  "@vitest/coverage-v8": "^4.0.4",
85
- "chromatic": "^18.14.1",
85
+ "chromatic": "^18.15.0",
86
86
  "dotenv": "^17.4.2",
87
87
  "eslint-config-xo-react": "^0.27.0",
88
- "eslint-plugin-storybook": "^10.6.6",
88
+ "eslint-plugin-storybook": "^10.6.7",
89
89
  "jsdom": "^27.4.0",
90
- "next": "^16.4.5",
91
- "playwright": "^1.65.0",
92
- "prettier": "^3.9.10",
90
+ "next": "^16.4.6",
91
+ "playwright": "^1.65.1",
92
+ "prettier": "^3.10.1",
93
93
  "react": "^19.3.1",
94
94
  "react-dom": "^19.3.1",
95
- "storybook": "^10.6.6",
95
+ "storybook": "^10.6.7",
96
96
  "typescript": "^5.9.3",
97
- "vite": "^6.4.5",
97
+ "vite": "^6.4.6",
98
98
  "vitest": "^4.0.4",
99
99
  "xo": "^0.59.3"
100
100
  },
@@ -1,9 +0,0 @@
1
- "use strict";const Fe=require("react"),be=require("./_commonjsHelpers-DGT2Y9Xa.js");var Y={exports:{}};/*!
2
- * tabbable 6.5.1
3
- * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
4
- */var pe=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],J=pe.join(","),he=typeof Element>"u",M=he?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Q=!he&&Element.prototype.getRootNode?function(i){return i==null||i.getRootNode==null?void 0:i.getRootNode()}:function(i){return i==null?void 0:i.ownerDocument},ee=function(e,t){t===void 0&&(t=!0);var o=e==null||e.getAttribute==null?void 0:e.getAttribute("inert"),s=o===""||o==="true",l=s||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):ee(e.parentNode));return l},Oe=function(e){var t,o=e==null||e.getAttribute==null||(t=e.getAttribute("contenteditable"))==null?void 0:t.toLowerCase();return o===""||o==="true"||o==="plaintext-only"},ye=function(e,t,o){if(ee(e))return[];var s=Array.prototype.slice.apply(e.querySelectorAll(J));return t&&M.call(e,J)&&s.unshift(e),s=s.filter(o),s},te=function(e,t,o){for(var s=[],l=Array.from(e);l.length;){var a=l.shift();if(!ee(a,!1))if(a.tagName==="SLOT"){var y=a.assignedElements(),T=y.length?y:a.children,F=te(T,!0,o);o.flatten?s.push.apply(s,F):s.push({scopeParent:a,candidates:F})}else{var k=M.call(a,J);k&&o.filter(a)&&(t||!e.includes(a))&&s.push(a);var D=a.shadowRoot||typeof o.getShadowRoot=="function"&&o.getShadowRoot(a),N=!ee(D,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(a));if(D&&N){var _=te(D===!0?a.children:D.children,!0,o);o.flatten?s.push.apply(s,_):s.push({scopeParent:a,candidates:_})}else l.unshift.apply(l,a.children)}}return s},me=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},L=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Oe(e))&&!me(e)?0:e.tabIndex},De=function(e,t){var o=L(e);return o<0&&t&&!me(e)?0:o},ke=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},ge=function(e){return e.tagName==="INPUT"},Ne=function(e){return ge(e)&&e.type==="hidden"},Re=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(o){return o.tagName==="SUMMARY"});return t},Pe=function(e,t){for(var o=0;o<e.length;o++)if(e[o].checked&&e[o].form===t)return e[o]},Ce=function(e){if(!e.name)return!0;var t=e.form||Q(e),o=function(y){return t.querySelectorAll('input[type="radio"][name="'+y+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=o(window.CSS.escape(e.name));else try{s=o(e.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var l=Pe(s,e.form);return!l||l===e},Ae=function(e){return ge(e)&&e.type==="radio"},Ie=function(e){return Ae(e)&&!Ce(e)},_e=function(e){var t,o=e&&Q(e),s=(t=o)==null?void 0:t.host,l=!1;if(o&&o!==e){var a,y;for(l=!!((a=s)!=null&&(a=a.ownerDocument)!=null&&a.contains(s)||e!=null&&(y=e.ownerDocument)!=null&&y.contains(e));!l&&s;){var T,F;o=Q(s),s=(T=o)==null?void 0:T.host,l=!!((F=s)!=null&&(F=F.ownerDocument)!=null&&F.contains(s))}}return l},se=function(e){var t=e.getBoundingClientRect(),o=t.width,s=t.height;return o===0&&s===0},je=function(e,t){var o=t.displayCheck,s=t.getShadowRoot;if(o==="full-native"&&"checkVisibility"in e){var l=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!l}var a=getComputedStyle(e),y=a.visibility;if(y==="hidden"||y==="collapse")return!0;var T=M.call(e,"details>summary:first-of-type"),F=T?e.parentElement:e;if(M.call(F,"details:not([open]) *"))return!0;if(!o||o==="full"||o==="full-native"||o==="legacy-full"){if(typeof s=="function"){for(var k=e;e;){var D=e.parentElement,N=Q(e);if(D&&!D.shadowRoot&&s(D)===!0)return se(e);e.assignedSlot?e=e.assignedSlot:!D&&N!==e.ownerDocument?e=N.host:e=D}e=k}if(_e(e))return!e.getClientRects().length;if(o!=="legacy-full")return!0}else if(o==="non-zero-area")return se(e);return!1},xe=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var o=0;o<t.children.length;o++){var s=t.children.item(o);if(s.tagName==="LEGEND")return M.call(t,"fieldset[disabled] *")?!0:!s.contains(e)}return!0}t=t.parentElement}return!1},re=function(e,t){return!(t.disabled||Ne(t)||je(t,e)||Re(t)||xe(t))},oe=function(e,t){return!(Ie(t)||L(t)<0||!re(e,t))},Le=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},we=function(e){var t=[],o=[];return e.forEach(function(s,l){var a=!!s.scopeParent,y=a?s.scopeParent:s,T=De(y,a),F=a?we(s.candidates):y;T===0?a?t.push.apply(t,F):t.push(y):o.push({documentOrder:l,tabIndex:T,item:s,isScope:a,content:F})}),o.sort(ke).reduce(function(s,l){return l.isScope?s.push.apply(s,l.content):s.push(l.content),s},[]).concat(t)},Te=function(e,t){t=t||{};var o;return t.getShadowRoot?o=te([e],t.includeContainer,{filter:oe.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Le}):o=ye(e,t.includeContainer,oe.bind(null,t)),we(o)},Se=function(e,t){t=t||{};var o;return t.getShadowRoot?o=te([e],t.includeContainer,{filter:re.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):o=ye(e,t.includeContainer,re.bind(null,t)),o},K=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return M.call(e,J)===!1?!1:oe(t,e)},Be=pe.concat("iframe:not([inert]):not([inert] *)").join(","),X=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return M.call(e,Be)===!1?!1:re(t,e)};const Ke=Object.freeze(Object.defineProperty({__proto__:null,focusable:Se,getTabIndex:L,isFocusable:X,isTabbable:K,tabbable:Te},Symbol.toStringTag,{value:"Module"}));/*!
5
- * focus-trap 7.8.0
6
- * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
7
- */function ue(i,e){(e==null||e>i.length)&&(e=i.length);for(var t=0,o=Array(e);t<e;t++)o[t]=i[t];return o}function Me(i){if(Array.isArray(i))return ue(i)}function ce(i,e){var t=typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(!t){if(Array.isArray(i)||(t=Ee(i))||e){t&&(i=t);var o=0,s=function(){};return{s,n:function(){return o>=i.length?{done:!0}:{done:!1,value:i[o++]}},e:function(T){throw T},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
8
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var l,a=!0,y=!1;return{s:function(){t=t.call(i)},n:function(){var T=t.next();return a=T.done,T},e:function(T){y=!0,l=T},f:function(){try{a||t.return==null||t.return()}finally{if(y)throw l}}}}function qe(i,e,t){return(e=He(e))in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function $e(i){if(typeof Symbol<"u"&&i[Symbol.iterator]!=null||i["@@iterator"]!=null)return Array.from(i)}function Ve(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
9
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function le(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(i);e&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})),t.push.apply(t,o)}return t}function fe(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?le(Object(t),!0).forEach(function(o){qe(i,o,t[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):le(Object(t)).forEach(function(o){Object.defineProperty(i,o,Object.getOwnPropertyDescriptor(t,o))})}return i}function Ge(i){return Me(i)||$e(i)||Ee(i)||Ve()}function Ue(i,e){if(typeof i!="object"||!i)return i;var t=i[Symbol.toPrimitive];if(t!==void 0){var o=t.call(i,e);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(i)}function He(i){var e=Ue(i,"string");return typeof e=="symbol"?e:e+""}function Ee(i,e){if(i){if(typeof i=="string")return ue(i,e);var t={}.toString.call(i).slice(8,-1);return t==="Object"&&i.constructor&&(t=i.constructor.name),t==="Map"||t==="Set"?Array.from(i):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ue(i,e):void 0}}var I={getActiveTrap:function(e){return(e==null?void 0:e.length)>0?e[e.length-1]:null},activateTrap:function(e,t){var o=I.getActiveTrap(e);t!==o&&I.pauseTrap(e);var s=e.indexOf(t);s===-1||e.splice(s,1),e.push(t)},deactivateTrap:function(e,t){var o=e.indexOf(t);o!==-1&&e.splice(o,1),I.unpauseTrap(e)},pauseTrap:function(e){var t=I.getActiveTrap(e);t==null||t._setPausedState(!0)},unpauseTrap:function(e){var t=I.getActiveTrap(e);t&&!t._isManuallyPaused()&&t._setPausedState(!1)}},We=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},ze=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},G=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},Ye=function(e){return G(e)&&!e.shiftKey},Ze=function(e){return G(e)&&e.shiftKey},de=function(e){return setTimeout(e,0)},V=function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];return typeof e=="function"?e.apply(void 0,o):e},Z=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},Xe=[],Je=function(e,t){var o=(t==null?void 0:t.document)||document,s=(t==null?void 0:t.trapStack)||Xe,l=fe({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isolateSubtrees:!1,isKeyForward:Ye,isKeyBackward:Ze},t),a={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadySilent:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},y,T=function(n,r,c){return n&&n[r]!==void 0?n[r]:l[c||r]},F=function(n,r){var c=typeof(r==null?void 0:r.composedPath)=="function"?r.composedPath():void 0;return a.containerGroups.findIndex(function(h){var p=h.container,g=h.tabbableNodes;return p.contains(n)||(c==null?void 0:c.includes(p))||g.find(function(v){return v===n})})},k=function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=r.hasFallback,h=c===void 0?!1:c,p=r.params,g=p===void 0?[]:p,v=l[n];if(typeof v=="function"&&(v=v.apply(void 0,Ge(g))),v===!0&&(v=void 0),!v){if(v===void 0||v===!1)return v;throw new Error("`".concat(n,"` was specified but was not a node, or did not return a node"))}var S=v;if(typeof v=="string"){try{S=o.querySelector(v)}catch(E){throw new Error("`".concat(n,'` appears to be an invalid selector; error="').concat(E.message,'"'))}if(!S&&!h)throw new Error("`".concat(n,"` as selector refers to no known node"))}return S},D=function(){var n=k("initialFocus",{hasFallback:!0});if(n===!1)return!1;if(n===void 0||n&&!X(n,l.tabbableOptions))if(F(o.activeElement)>=0)n=o.activeElement;else{var r=a.tabbableGroups[0],c=r&&r.firstTabbableNode;n=c||k("fallbackFocus")}else n===null&&(n=k("fallbackFocus"));if(!n)throw new Error("Your focus-trap needs to have at least one focusable element");return n},N=function(){if(a.containerGroups=a.containers.map(function(n){var r=Te(n,l.tabbableOptions),c=Se(n,l.tabbableOptions),h=r.length>0?r[0]:void 0,p=r.length>0?r[r.length-1]:void 0,g=c.find(function(E){return K(E)}),v=c.slice().reverse().find(function(E){return K(E)}),S=!!r.find(function(E){return L(E)>0});return{container:n,tabbableNodes:r,focusableNodes:c,posTabIndexesFound:S,firstTabbableNode:h,lastTabbableNode:p,firstDomTabbableNode:g,lastDomTabbableNode:v,nextTabbableNode:function(R){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,C=r.indexOf(R);return C<0?A?c.slice(c.indexOf(R)+1).find(function(B){return K(B)}):c.slice(0,c.indexOf(R)).reverse().find(function(B){return K(B)}):r[C+(A?1:-1)]}}}),a.tabbableGroups=a.containerGroups.filter(function(n){return n.tabbableNodes.length>0}),a.tabbableGroups.length<=0&&!k("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(a.containerGroups.find(function(n){return n.posTabIndexesFound})&&a.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},_=function(n){var r=n.activeElement;if(r)return r.shadowRoot&&r.shadowRoot.activeElement!==null?_(r.shadowRoot):r},P=function(n){if(n!==!1&&n!==_(document)){if(!n||!n.focus){P(D());return}n.focus({preventScroll:!!l.preventScroll}),a.mostRecentlyFocusedNode=n,We(n)&&n.select()}},U=function(n){var r=k("setReturnFocus",{params:[n]});return r||(r===!1?!1:n)},j=function(n){var r=n.target,c=n.event,h=n.isBackward,p=h===void 0?!1:h;r=r||Z(c),N();var g=null;if(a.tabbableGroups.length>0){var v=F(r,c),S=v>=0?a.containerGroups[v]:void 0;if(v<0)p?g=a.tabbableGroups[a.tabbableGroups.length-1].lastTabbableNode:g=a.tabbableGroups[0].firstTabbableNode;else if(p){var E=a.tabbableGroups.findIndex(function(ne){var ie=ne.firstTabbableNode;return r===ie});if(E<0&&(S.container===r||X(r,l.tabbableOptions)&&!K(r,l.tabbableOptions)&&!S.nextTabbableNode(r,!1))&&(E=v),E>=0){var R=E===0?a.tabbableGroups.length-1:E-1,A=a.tabbableGroups[R];g=L(r)>=0?A.lastTabbableNode:A.lastDomTabbableNode}else G(c)||(g=S.nextTabbableNode(r,!1))}else{var C=a.tabbableGroups.findIndex(function(ne){var ie=ne.lastTabbableNode;return r===ie});if(C<0&&(S.container===r||X(r,l.tabbableOptions)&&!K(r,l.tabbableOptions)&&!S.nextTabbableNode(r))&&(C=v),C>=0){var B=C===a.tabbableGroups.length-1?0:C+1,x=a.tabbableGroups[B];g=L(r)>=0?x.firstTabbableNode:x.firstDomTabbableNode}else G(c)||(g=S.nextTabbableNode(r))}}else g=k("fallbackFocus");return g},q=function(n){var r=Z(n);if(!(F(r,n)>=0)){if(V(l.clickOutsideDeactivates,n)){y.deactivate({returnFocus:l.returnFocusOnDeactivate});return}V(l.allowOutsideClick,n)||n.preventDefault()}},H=function(n){var r=Z(n),c=F(r,n)>=0;if(c||r instanceof Document)c&&(a.mostRecentlyFocusedNode=r);else{n.stopImmediatePropagation();var h,p=!0;if(a.mostRecentlyFocusedNode)if(L(a.mostRecentlyFocusedNode)>0){var g=F(a.mostRecentlyFocusedNode),v=a.containerGroups[g].tabbableNodes;if(v.length>0){var S=v.findIndex(function(E){return E===a.mostRecentlyFocusedNode});S>=0&&(l.isKeyForward(a.recentNavEvent)?S+1<v.length&&(h=v[S+1],p=!1):S-1>=0&&(h=v[S-1],p=!1))}}else a.containerGroups.some(function(E){return E.tabbableNodes.some(function(R){return L(R)>0})})||(p=!1);else p=!1;p&&(h=j({target:a.mostRecentlyFocusedNode,isBackward:l.isKeyBackward(a.recentNavEvent)})),P(h||a.mostRecentlyFocusedNode||D())}a.recentNavEvent=void 0},ae=function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;a.recentNavEvent=n;var c=j({event:n,isBackward:r});c&&(G(n)&&n.preventDefault(),P(c))},W=function(n){(l.isKeyForward(n)||l.isKeyBackward(n))&&ae(n,l.isKeyBackward(n))},z=function(n){ze(n)&&V(l.escapeDeactivates,n)!==!1&&(n.preventDefault(),y.deactivate())},$=function(n){var r=Z(n);F(r,n)>=0||V(l.clickOutsideDeactivates,n)||V(l.allowOutsideClick,n)||(n.preventDefault(),n.stopImmediatePropagation())},d=function(){if(a.active)return I.activateTrap(s,y),a.delayInitialFocusTimer=l.delayInitialFocus?de(function(){P(D())}):P(D()),o.addEventListener("focusin",H,!0),o.addEventListener("mousedown",q,{capture:!0,passive:!1}),o.addEventListener("touchstart",q,{capture:!0,passive:!1}),o.addEventListener("click",$,{capture:!0,passive:!1}),o.addEventListener("keydown",W,{capture:!0,passive:!1}),o.addEventListener("keydown",z),y},f=function(n){a.active&&!a.paused&&y._setSubtreeIsolation(!1),a.adjacentElements.clear(),a.alreadySilent.clear();var r=new Set,c=new Set,h=ce(n),p;try{for(h.s();!(p=h.n()).done;){var g=p.value;r.add(g);for(var v=typeof ShadowRoot<"u"&&g.getRootNode()instanceof ShadowRoot,S=g;S;){r.add(S);var E=S.parentElement,R=[];E?R=E.children:!E&&v&&(R=S.getRootNode().children,E=S.getRootNode().host,v=typeof ShadowRoot<"u"&&E.getRootNode()instanceof ShadowRoot);var A=ce(R),C;try{for(A.s();!(C=A.n()).done;){var B=C.value;c.add(B)}}catch(x){A.e(x)}finally{A.f()}S=E}}}catch(x){h.e(x)}finally{h.f()}r.forEach(function(x){c.delete(x)}),a.adjacentElements=c},m=function(){if(a.active)return o.removeEventListener("focusin",H,!0),o.removeEventListener("mousedown",q,!0),o.removeEventListener("touchstart",q,!0),o.removeEventListener("click",$,!0),o.removeEventListener("keydown",W,!0),o.removeEventListener("keydown",z),y},u=function(n){var r=n.some(function(c){var h=Array.from(c.removedNodes);return h.some(function(p){return p===a.mostRecentlyFocusedNode})});r&&P(D())},w=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(u):void 0,O=function(){w&&(w.disconnect(),a.active&&!a.paused&&a.containers.map(function(n){w.observe(n,{subtree:!0,childList:!0})}))};return y={get active(){return a.active},get paused(){return a.paused},activate:function(n){if(a.active)return this;var r=T(n,"onActivate"),c=T(n,"onPostActivate"),h=T(n,"checkCanFocusTrap"),p=I.getActiveTrap(s),g=!1;if(p&&!p.paused){var v;(v=p._setSubtreeIsolation)===null||v===void 0||v.call(p,!1),g=!0}try{h||N(),a.active=!0,a.paused=!1,a.nodeFocusedBeforeActivation=_(o),r==null||r();var S=function(){h&&N(),d(),O(),l.isolateSubtrees&&y._setSubtreeIsolation(!0),c==null||c()};if(h)return h(a.containers.concat()).then(S,S),this;S()}catch(R){if(p===I.getActiveTrap(s)&&g){var E;(E=p._setSubtreeIsolation)===null||E===void 0||E.call(p,!0)}throw R}return this},deactivate:function(n){if(!a.active)return this;var r=fe({onDeactivate:l.onDeactivate,onPostDeactivate:l.onPostDeactivate,checkCanReturnFocus:l.checkCanReturnFocus},n);clearTimeout(a.delayInitialFocusTimer),a.delayInitialFocusTimer=void 0,a.paused||y._setSubtreeIsolation(!1),a.alreadySilent.clear(),m(),a.active=!1,a.paused=!1,O(),I.deactivateTrap(s,y);var c=T(r,"onDeactivate"),h=T(r,"onPostDeactivate"),p=T(r,"checkCanReturnFocus"),g=T(r,"returnFocus","returnFocusOnDeactivate");c==null||c();var v=function(){de(function(){g&&P(U(a.nodeFocusedBeforeActivation)),h==null||h()})};return g&&p?(p(U(a.nodeFocusedBeforeActivation)).then(v,v),this):(v(),this)},pause:function(n){return a.active?(a.manuallyPaused=!0,this._setPausedState(!0,n)):this},unpause:function(n){return a.active?(a.manuallyPaused=!1,s[s.length-1]!==this?this:this._setPausedState(!1,n)):this},updateContainerElements:function(n){var r=[].concat(n).filter(Boolean);return a.containers=r.map(function(c){return typeof c=="string"?o.querySelector(c):c}),l.isolateSubtrees&&f(a.containers),a.active&&(N(),l.isolateSubtrees&&!a.paused&&y._setSubtreeIsolation(!0)),O(),this}},Object.defineProperties(y,{_isManuallyPaused:{value:function(){return a.manuallyPaused}},_setPausedState:{value:function(n,r){if(a.paused===n)return this;if(a.paused=n,n){var c=T(r,"onPause"),h=T(r,"onPostPause");c==null||c(),m(),O(),y._setSubtreeIsolation(!1),h==null||h()}else{var p=T(r,"onUnpause"),g=T(r,"onPostUnpause");p==null||p(),y._setSubtreeIsolation(!0),N(),d(),O(),g==null||g()}return this}},_setSubtreeIsolation:{value:function(n){l.isolateSubtrees&&a.adjacentElements.forEach(function(r){var c;if(n)switch(l.isolateSubtrees){case"aria-hidden":(r.ariaHidden==="true"||((c=r.getAttribute("aria-hidden"))===null||c===void 0?void 0:c.toLowerCase())==="true")&&a.alreadySilent.add(r),r.setAttribute("aria-hidden","true");break;default:(r.inert||r.hasAttribute("inert"))&&a.alreadySilent.add(r),r.setAttribute("inert",!0);break}else if(!a.alreadySilent.has(r))switch(l.isolateSubtrees){case"aria-hidden":r.removeAttribute("aria-hidden");break;default:r.removeAttribute("inert");break}})}}}),y.updateContainerElements(e),y};const Qe=Object.freeze(Object.defineProperty({__proto__:null,createFocusTrap:Je},Symbol.toStringTag,{value:"Module"})),et=be.getAugmentedNamespace(Qe),tt=be.getAugmentedNamespace(Ke);var ve;function rt(){if(ve)return Y.exports;ve=1;function i(d){"@babel/helpers - typeof";return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},i(d)}var e,t;function o(d,f){if(!(d instanceof f))throw new TypeError("Cannot call a class as a function")}function s(d,f){for(var m=0;m<f.length;m++){var u=f[m];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(d,P(u.key),u)}}function l(d,f,m){return f&&s(d.prototype,f),Object.defineProperty(d,"prototype",{writable:!1}),d}function a(d,f,m){return f=k(f),y(d,F()?Reflect.construct(f,m||[],k(d).constructor):f.apply(d,m))}function y(d,f){if(f&&(i(f)=="object"||typeof f=="function"))return f;if(f!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return T(d)}function T(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}function F(){try{var d=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(F=function(){return!!d})()}function k(d){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(f){return f.__proto__||Object.getPrototypeOf(f)},k(d)}function D(d,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");d.prototype=Object.create(f&&f.prototype,{constructor:{value:d,writable:!0,configurable:!0}}),Object.defineProperty(d,"prototype",{writable:!1}),f&&N(d,f)}function N(d,f){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(m,u){return m.__proto__=u,m},N(d,f)}function _(d,f,m){return(f=P(f))in d?Object.defineProperty(d,f,{value:m,enumerable:!0,configurable:!0,writable:!0}):d[f]=m,d}function P(d){var f=U(d,"string");return i(f)=="symbol"?f:f+""}function U(d,f){if(i(d)!="object"||!d)return d;var m=d[Symbol.toPrimitive];if(m!==void 0){var u=m.call(d,f);if(i(u)!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(f==="string"?String:Number)(d)}var j=Fe,q=et,H=q.createFocusTrap,ae=tt,W=ae.isFocusable,z=parseInt((e=(t=/^(\d+)\./.exec(j.version))===null||t===void 0?void 0:t[1])!==null&&e!==void 0?e:0,10),$=(function(d){function f(m){var u;o(this,f),u=a(this,f,[m]),_(u,"getNodeForOption",function(b){var n,r=(n=this.internalOptions[b])!==null&&n!==void 0?n:this.originalOptions[b];if(typeof r=="function"){for(var c=arguments.length,h=new Array(c>1?c-1:0),p=1;p<c;p++)h[p-1]=arguments[p];r=r.apply(void 0,h)}if(r===!0&&(r=void 0),!r){if(r===void 0||r===!1)return r;throw new Error("`".concat(b,"` was specified but was not a node, or did not return a node"))}var g=r;if(typeof r=="string"){var v;if(g=(v=this.getDocument())===null||v===void 0?void 0:v.querySelector(r),!g)throw new Error("`".concat(b,"` as selector refers to no known node"))}return g}),u.handleDeactivate=u.handleDeactivate.bind(u),u.handlePostDeactivate=u.handlePostDeactivate.bind(u),u.handleClickOutsideDeactivates=u.handleClickOutsideDeactivates.bind(u),u.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:u.handleDeactivate,onPostDeactivate:u.handlePostDeactivate,clickOutsideDeactivates:u.handleClickOutsideDeactivates},u.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var w=m.focusTrapOptions;for(var O in w)if(Object.prototype.hasOwnProperty.call(w,O)){if(O==="returnFocusOnDeactivate"||O==="onDeactivate"||O==="onPostDeactivate"||O==="checkCanReturnFocus"||O==="clickOutsideDeactivates"){u.originalOptions[O]=w[O];continue}u.internalOptions[O]=w[O]}return u.outsideClick=null,u.focusTrapElements=m.containerElements||[],u.updatePreviousElement(),u}return D(f,d),l(f,[{key:"getDocument",value:function(){return this.props.focusTrapOptions.document||(typeof document<"u"?document:void 0)}},{key:"getReturnFocusNode",value:function(){var u=this.getNodeForOption("setReturnFocus",this.previouslyFocusedElement);return u||(u===!1?!1:this.previouslyFocusedElement)}},{key:"updatePreviousElement",value:function(){var u=this.getDocument();u&&(this.previouslyFocusedElement=u.activeElement)}},{key:"deactivateTrap",value:function(){!this.focusTrap||!this.focusTrap.active||this.focusTrap.deactivate({returnFocus:!1,checkCanReturnFocus:null,onDeactivate:this.originalOptions.onDeactivate})}},{key:"handleClickOutsideDeactivates",value:function(u){var w=typeof this.originalOptions.clickOutsideDeactivates=="function"?this.originalOptions.clickOutsideDeactivates.call(null,u):this.originalOptions.clickOutsideDeactivates;return w&&(this.outsideClick={target:u.target,allowDeactivation:w}),w}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var u=this,w=function(){var b=u.getReturnFocusNode(),n=!!(u.originalOptions.returnFocusOnDeactivate&&b!==null&&b!==void 0&&b.focus&&(!u.outsideClick||u.outsideClick.allowDeactivation&&!W(u.outsideClick.target,u.internalOptions.tabbableOptions))),r=u.internalOptions.preventScroll,c=r===void 0?!1:r;n&&b.focus({preventScroll:c}),u.originalOptions.onPostDeactivate&&u.originalOptions.onPostDeactivate.call(null),u.outsideClick=null};this.originalOptions.checkCanReturnFocus?this.originalOptions.checkCanReturnFocus.call(null,this.getReturnFocusNode()).then(w,w):w()}},{key:"setupFocusTrap",value:function(){if(this.focusTrap)this.props.active&&!this.focusTrap.active&&(this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause());else{var u=this.focusTrapElements.some(Boolean);u&&(this.focusTrap=this.props._createFocusTrap(this.focusTrapElements,this.internalOptions),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause())}}},{key:"componentDidMount",value:function(){this.props.active&&this.setupFocusTrap()}},{key:"componentDidUpdate",value:function(u){if(this.focusTrap){u.containerElements!==this.props.containerElements&&this.focusTrap.updateContainerElements(this.props.containerElements);var w=!u.active&&this.props.active,O=u.active&&!this.props.active,b=!u.paused&&this.props.paused,n=u.paused&&!this.props.paused;if(w&&(this.updatePreviousElement(),this.focusTrap.activate()),O){this.deactivateTrap();return}b&&this.focusTrap.pause(),n&&this.focusTrap.unpause()}else u.containerElements!==this.props.containerElements&&(this.focusTrapElements=this.props.containerElements),this.props.active&&(this.updatePreviousElement(),this.setupFocusTrap())}},{key:"componentWillUnmount",value:function(){this.deactivateTrap()}},{key:"render",value:function(){var u=this,w=this.props.children?j.Children.only(this.props.children):void 0;if(w){if(w.type&&w.type===j.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");var O=function(r){var c=u.props.containerElements;w&&(z>=19?typeof w.props.ref=="function"?w.props.ref(r):w.props.ref&&(w.props.ref.current=r):typeof w.ref=="function"?w.ref(r):w.ref&&(w.ref.current=r)),u.focusTrapElements=c||[r]},b=j.cloneElement(w,{ref:O});return b}return null}}])})(j.Component);return $.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:H},Y.exports=$,Y.exports.FocusTrap=$,Y.exports}var at=rt();exports.focusTrapReactExports=at;