@oaknational/oak-components 0.6.0 → 0.6.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../node_modules/tslib/tslib.es6.js","../../src/styles/theme/color.ts","../../src/styles/helpers/parseColor.ts","../../src/styles/helpers/truthy.ts","../../src/styles/utils/responsiveStyle.ts","../../src/styles/utils/colorStyle.ts","../../src/styles/helpers/pxToRem.ts","../../src/styles/theme/spacing.ts","../../src/styles/helpers/parseSpacing.ts","../../src/styles/utils/positionStyle.ts","../../src/styles/utils/sizeStyle.ts","../../src/styles/utils/spacingStyle.ts","../../src/styles/theme/borders.ts","../../src/styles/helpers/parseBorder.ts","../../src/styles/helpers/parseBorderRadius.ts","../../src/styles/utils/borderStyle.ts","../../src/styles/utils/displayStyle.ts","../../src/styles/theme/dropShadow.ts","../../src/styles/helpers/parseDropShadow.ts","../../src/styles/utils/dropShadowStyle.ts","../../src/styles/theme/opacity.ts","../../src/styles/utils/opacityStyle.ts","../../src/styles/helpers/parseOpacity.ts","../../src/styles/utils/transformStyle.ts","../../src/styles/theme/transitions.ts","../../src/styles/utils/transitionStyle.ts","../../src/styles/helpers/parseTransitions.ts","../../src/styles/theme/typography.ts","../../src/styles/utils/typographyStyle.ts","../../src/styles/helpers/parseTypography.ts","../../src/styles/theme/zIndex.ts","../../src/styles/utils/zIndexStyle.ts","../../src/styles/helpers/parseZIndex.ts","../../src/components/atoms/OakBox/OakBox.tsx","../../src/styles/utils/flexStyle.ts","../../src/components/atoms/OakFlex/OakFlex.tsx","../../src/components/atoms/OakSpan/OakSpan.tsx","../../src/components/atoms/OakForm/OakForm.tsx","../../src/styles/helpers/parseColorFilter.ts","../../src/styles/utils/colorFilterStyle.tsx","../../src/components/atoms/OakImage/OakImage.tsx","../../src/components/atoms/OakImage/useShowPlaceholder.ts","../../src/components/atoms/OakTypography/OakTypography.tsx","../../src/components/atoms/OakHeading/OakHeading.tsx","../../src/components/atoms/OakP/OakP.tsx","../../src/components/atoms/OakUL/OakUL.tsx","../../src/components/atoms/OakOL/OakOL.tsx","../../src/styles/utils/listStyle.ts","../../src/components/atoms/OakLI/OakLI.tsx","../../src/components/atoms/OakLabel/OakLabel.tsx","../../src/image-map.ts","../../src/components/atoms/OakIcon/OakIcon.tsx","../../src/components/atoms/OakGrid/OakGrid.tsx","../../src/components/atoms/OakGridArea/OakGridArea.tsx","../../src/components/atoms/OakMaxWidth/OakMaxWidth.tsx","../../src/components/atoms/OakCloudinaryImage/cloudinary.ts","../../src/components/atoms/OakCloudinaryImage/OakCloudinaryImage.tsx","../../src/components/atoms/OakKbd/OakKbd.tsx","../../src/styles/global/reset.styles.ts","../../src/styles/global/oak.styles.ts","../../src/components/atoms/OakGlobalStyle/OakGlobalStyle.tsx","../../src/components/atoms/OakScreenReader/OakScreenReader.tsx","../../src/components/molecules/OakLoadingSpinner/OakLoadingSpinner.tsx","../../src/components/atoms/InternalButton/InternalButton.tsx","../../src/components/molecules/InternalShadowRectButton/InternalShadowRectButton.tsx","../../src/components/molecules/OakPrimaryButton/OakPrimaryButton.tsx","../../src/components/molecules/OakPrimaryInvertedButton/OakPrimaryInvertedButton.tsx","../../src/components/molecules/InternalShadowRoundButton/InternalShadowRoundButton.tsx","../../src/components/molecules/OakTertiaryButton/OakTertiaryButton.tsx","../../src/components/molecules/OakRadioGroup/OakRadioGroup.tsx","../../src/components/molecules/OakRadioButton/OakRadioButton.tsx","../../src/components/atoms/InternalCheckBox/InternalCheckBox.tsx","../../src/components/atoms/InternalCheckBoxLabel/InternalCheckBoxLabel.tsx","../../src/components/atoms/InternalCheckBoxWrapper/InternalCheckBoxWrapper.tsx","../../src/components/atoms/InternalTextInput/InternalTextInput.tsx","../../src/components/molecules/OakTextInput/OakTextInput.tsx","../../src/components/molecules/OakRoundIcon/OakRoundIcon.tsx","../../src/components/atoms/InternalTooltip/InternalTooltip.tsx","../../src/components/molecules/OakTooltip/OakTooltip.tsx","../../src/components/molecules/OakBackLink/OakBackLink.tsx","../../src/components/atoms/InternalCard/InternalCard.tsx","../../src/components/atoms/InternalCardWithBackgroundElement/InternalCardWithBackgroundElement.tsx","../../src/styles/helpers/parseBorderWidth.ts","../../src/components/atoms/InternalStyledSvg/InternalStyledSvg.tsx","../../src/components/molecules/OakHandDrawnCard/OakHandDrawnCard.tsx","../../src/components/molecules/OakHandDrawnCardWithIcon/OakHandDrawnCardWithIcon.tsx","../../src/components/molecules/OakPromoTag/OakPromoTag.tsx","../../src/components/molecules/OakCollapsibleContent/OakCollapsibleContent.tsx","../../src/components/molecules/OakLink/OakLink.tsx","../../src/components/molecules/OakDragAndDropInstructions/OakDragAndDropInstructions.tsx","../../src/components/molecules/OakDraggable/OakDraggable.tsx","../../src/components/molecules/OakDroppable/OakDroppable.tsx","../../src/components/organisms/pupil/OakQuizCheckBox/OakQuizCheckBox.tsx","../../src/components/organisms/pupil/OakQuizRadioButton/OakQuizRadioButton.tsx","../../src/components/organisms/pupil/OakHintButton/OakHintButton.tsx","../../src/components/organisms/pupil/OakQuizHint/OakQuizHint.tsx","../../src/components/organisms/pupil/OakQuizFeedback/OakQuizFeedback.tsx","../../src/components/organisms/pupil/OakLessonBottomNav/OakLessonBottomNav.tsx","../../src/components/organisms/pupil/OakLessonTopNav/OakLessonTopNav.tsx","../../src/components/organisms/pupil/OakQuizCounter/OakQuizCounter.tsx","../../src/components/organisms/pupil/OakLessonLayout/OakLessonLayout.tsx","../../src/components/organisms/pupil/OakLessonNavItem/OakLessonNavItem.tsx","../../src/components/organisms/pupil/OakLessonReviewItem/OakPupilLessonReviewItem.tsx","../../node_modules/@dnd-kit/utilities/dist/utilities.esm.js","../../node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js","../../node_modules/@dnd-kit/core/dist/core.esm.js","../../node_modules/@dnd-kit/sortable/dist/sortable.esm.js","../../src/components/atoms/InternalDndContext/InternalDndContext.tsx","../../src/animation/usePrefersReducedMotion.ts","../../src/components/organisms/pupil/OakQuizOrder/OakQuizOrder.tsx","../../src/components/organisms/pupil/InternalDroppableHoldingPen/InternalDroppableHoldingPen.tsx","../../src/components/organisms/pupil/OakQuizMatch/OakQuizMatch.tsx","../../src/components/organisms/OakPrimaryNavItem/OakPrimaryNavItem.tsx","../../src/components/molecules/OakBulletList/OakBulletList.tsx","../../src/components/molecules/OakLessonInfoCard/OakLessonInfoCard.tsx","../../src/components/molecules/OakCheckBox/OakCheckBox.tsx","../../src/components/molecules/OakDraggableFeedback/OakDraggableFeedback.tsx","../../src/components/molecules/OakFieldError/OakFieldError.tsx","../../src/components/organisms/pupil/OakLessonVideoTranscript/OakLessonVideoTranscript.tsx","../../src/components/organisms/OakPrimaryNav/OakPrimaryNav.tsx","../../src/components/organisms/pupil/OakQuizTextInput/OakQuizTextInput.tsx","../../src/components/molecules/OakSecondaryButton/OakSecondaryButton.tsx","../../src/components/organisms/OakSubjectIcon/OakSubjectIcon.tsx","../../src/components/atoms/OakThemeProvider/OakThemeProvider.tsx","../../src/styles/theme/default.theme.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","export const oakColorTokens = {\n white: \"#ffffff\",\n grey10: \"#f9f9f9\",\n grey20: \"#f2f2f2\",\n grey30: \"#e4e4e4\",\n grey40: \"#cacaca\",\n grey50: \"#808080\",\n grey60: \"#575757\",\n grey70: \"#2d2d2d\",\n black: \"#222222\",\n oakGreen: \"#287c34\",\n mint: \"#bef2bd\",\n mint30: \"#ebfbeb\",\n mint50: \"#dff9de\",\n mint110: \"#93e892\",\n aqua: \"#b0e2de\",\n aqua30: \"#e7f6f5\",\n aqua50: \"#cee7e5\",\n aqua110: \"#7cd8d0\",\n lavender: \"#a0b6f2\",\n lavender30: \"#e3e9fb\",\n lavender50: \"#c6d1ef\",\n lavender110: \"#7c9aec\",\n pink: \"#deb7d5\",\n pink30: \"#f5e9f2\",\n pink50: \"#e5d1e0\",\n pink110: \"#cf9cc3\",\n lemon: \"#ffe555\",\n lemon30: \"#fff7cc\",\n lemon50: \"#f6e8a0\",\n lemon110: \"#fbd60e\",\n amber: \"#ff934e\",\n amber30: \"#ffece0\",\n amber50: \"#ffc8a6\",\n red: \"#dd0035\",\n red30: \"#f8d8e0\",\n red50: \"#ee809a\",\n navy: \"#0d24c4\",\n navy110: \"#0a1d9d\",\n navy120: \"#081676\",\n blue: \"#374cf1\",\n magenta: \"#d02aa7\",\n purple: \"#845ad9\",\n teal: \"#037b7d\",\n transparent: \"transparent\",\n};\n\nexport type OakColorToken = keyof typeof oakColorTokens;\n\n/**\n *\n * Use this tool to convert Hex to color filter values https://codepen.io/sosuke/pen/Pjoqqp\n *\n */\n\nexport const oakColorFilterTokens = {\n black:\n \"invert(10%) sepia(1%) saturate(236%) hue-rotate(314deg) brightness(95%) contrast(91%)\",\n red: \"invert(13%) sepia(78%) saturate(5255%) hue-rotate(337deg) brightness(88%) contrast(111%)\",\n oakGreen:\n \"invert(37%) sepia(16%) saturate(1947%) hue-rotate(77deg) brightness(100%) contrast(88%)\",\n white:\n \"invert(98%) sepia(98%) saturate(0%) hue-rotate(328deg) brightness(102%) contrast(102%)\",\n grey40:\n \"invert(92%) sepia(0%) saturate(581%) hue-rotate(147deg) brightness(94%) contrast(80%)\",\n grey50:\n \"invert(54%) sepia(0%) saturate(38%) hue-rotate(176deg) brightness(92%) contrast(91%)\",\n navy: \"invert(21%) sepia(90%) saturate(3220%) hue-rotate(232deg) brightness(71%) contrast(127%)\",\n navy110:\n \"invert(16%) sepia(72%) saturate(7176%) hue-rotate(239deg) brightness(61%) contrast(109%)\",\n navy120:\n \"invert(12%) sepia(79%) saturate(3172%) hue-rotate(231deg) brightness(82%) contrast(114%)\",\n};\n\nexport type OakColorFilterToken = keyof typeof oakColorFilterTokens;\n\nexport const oakUiRoleTokens = [\n \"text-primary\",\n \"text-subdued\",\n \"text-error\",\n \"text-disabled\",\n \"text-link-active\",\n \"text-link-hover\",\n \"text-link-visited\",\n \"text-link-pressed\",\n \"text-inverted\",\n \"text-success\",\n \"text-warning\",\n \"bg-primary\",\n \"bg-neutral\",\n \"bg-neutral-stronger\",\n \"bg-btn-primary\",\n \"bg-btn-primary-hover\",\n \"bg-btn-primary-disabled\",\n \"bg-btn-secondary\",\n \"bg-btn-secondary-hover\",\n \"bg-btn-secondary-disabled\",\n \"bg-icon\",\n \"bg-icon-hover\",\n \"bg-decorative1-main\",\n \"bg-decorative1-subdued\",\n \"bg-decorative1-very-subdued\",\n \"bg-decorative2-main\",\n \"bg-decorative2-subdued\",\n \"bg-decorative2-very-subdued\",\n \"bg-decorative3-main\",\n \"bg-decorative3-subdued\",\n \"bg-decorative3-very-subdued\",\n \"bg-decorative4-main\",\n \"bg-decorative4-subdued\",\n \"bg-decorative4-very-subdued\",\n \"bg-decorative5-main\",\n \"bg-decorative5-subdued\",\n \"bg-decorative5-very-subdued\",\n \"bg-correct\",\n \"bg-incorrect\",\n \"icon-main\",\n \"icon-inverted\",\n \"icon-disabled\",\n \"icon-brand\",\n \"icon-success\",\n \"icon-error\",\n \"icon-warning\",\n \"border-primary\",\n \"border-inverted\",\n \"border-neutral\",\n \"border-brand\",\n \"border-success\",\n \"border-error\",\n \"border-warning\",\n \"border-decorative1\",\n \"border-decorative1-stronger\",\n \"border-decorative2\",\n \"border-decorative2-stronger\",\n \"border-decorative3\",\n \"border-decorative3-stronger\",\n \"border-decorative4\",\n \"border-decorative4-stronger\",\n \"border-decorative5\",\n \"border-decorative5-stronger\",\n \"border-decorative6\",\n \"border-decorative6-stronger\",\n \"transparent\",\n] as const;\n\nexport type OakUiRoleToken = (typeof oakUiRoleTokens)[number];\n\nexport type UiRoleMap = Record<\n OakUiRoleToken,\n OakColorToken | null | undefined\n>;\n\nexport type OakCombinedColorToken = OakColorToken | OakUiRoleToken;\n","import {\n OakColorToken,\n OakCombinedColorToken,\n OakUiRoleToken,\n oakColorTokens,\n oakUiRoleTokens,\n} from \"@/styles/theme/color\";\nimport { PropsWithTheme } from \"@/styles/theme/theme\";\n\n/**\n * - takes any of color token\n * - if an OakColor derives and returns the corresponding css value\n * - if an OakUiRole derives returns a function that takes the current theme and returns the corresponding css value\n */\nfunction parseColor(): undefined;\nfunction parseColor(\n value?: OakCombinedColorToken | null,\n): (props: PropsWithTheme) => string;\nfunction parseColor(\n value?: OakCombinedColorToken | null,\n): ((props: PropsWithTheme) => string) | undefined;\nfunction parseColor(value?: OakCombinedColorToken | null) {\n if (value === undefined || value === null) {\n return undefined;\n }\n if (value in oakColorTokens) {\n return oakColorTokens[value as OakColorToken];\n }\n\n if (oakUiRoleTokens.includes(value as OakUiRoleToken)) {\n return ({ theme }: PropsWithTheme) => {\n const c = theme.uiColors[value as OakUiRoleToken];\n return oakColorTokens[c as OakColorToken];\n };\n }\n}\n\nexport { parseColor };\n","// @see https://stackoverflow.com/questions/47632622/typescript-and-filter-boolean\n\nexport type Truthy<T> = T extends false | \"\" | 0 | null | undefined ? never : T; // from lodash\n\n/**\n *\n * @description truthy takes a value and returns true|false with the correct type\n * It's useful, for example, when filtering out null values from an array.\n * Typescript compiler needs a hint to realise there aren't any more null values.\n * [{ foo: \"bar\" }, null]<Record | null>[].filter(truthy) // [{ foo: \"bar\"}]<Record>[]\n */\nexport function truthy<T>(value: T): value is Truthy<T> {\n return !!value;\n}\n","import {\n css,\n DefaultTheme,\n Interpolation,\n ThemedStyledProps,\n} from \"styled-components\";\n\nimport { truthy } from \"@/styles/helpers/truthy\";\nimport { PropsWithTheme } from \"@/styles/theme/theme\";\n\nconst breakpointsByName = {\n small: 750,\n large: 1280,\n};\n\nexport const breakpoints = Object.values(breakpointsByName).sort((a, b) =>\n a > b ? 1 : -1,\n);\n\nexport type BreakpointName = keyof typeof breakpointsByName;\n\nexport const getBreakpoint = (\n breakpointName: keyof typeof breakpointsByName,\n) => {\n return breakpointsByName[breakpointName];\n};\n\nexport type Device = \"mobile\" | \"tablet\" | \"desktop\";\n\nconst mediaQueries: Record<Device, string> = {\n mobile: `(max-width: ${getBreakpoint(\"small\") - 1}px)`,\n tablet: `(min-width: ${getBreakpoint(\"small\")}px and max-width: ${\n getBreakpoint(\"large\") - 1\n }px)`,\n desktop: `(min-width: ${getBreakpoint(\"large\")}px)`,\n};\n\nexport const getMediaQuery = (device: Device) => {\n return mediaQueries[device];\n};\n\nexport type ResponsiveValues<Value> = (Value | null) | (Value | null)[];\n\ntype Generic = string | number | undefined | null;\n\nexport const responsiveStyle =\n <Props, T extends Generic>(\n attr: string,\n getValues: (props: Props) => ResponsiveValues<T | undefined | null>,\n parse:\n | ((unparsed: T | undefined | null) => Generic)\n | ((\n unparsed: T | undefined | null,\n ) => (props: PropsWithTheme) => Generic) = (x) => x,\n ) =>\n (props: Props): Interpolation<ThemedStyledProps<Props, DefaultTheme>> => {\n const attrCss = (value: T | undefined | null) =>\n typeof value === \"undefined\"\n ? undefined\n : css`\n ${attr}: ${parse(value)};\n `;\n const values = getValues(props);\n if (typeof values === \"undefined\") {\n return undefined;\n }\n if (!Array.isArray(values)) {\n return css`\n ${attrCss(values)}\n `;\n }\n if (values.length === 0) {\n return [];\n }\n\n return [\n css`\n ${attrCss(values[0])}\n `,\n ...breakpoints\n .slice(0, values.length)\n .map((breakpoint, i) => {\n const value = values[i + 1]; // Values are shifted relative to breakpoints\n\n if (value === undefined) {\n return undefined;\n }\n\n return css`\n @media (min-width: ${breakpoint}px) {\n ${css`\n ${attrCss(value)}\n `}\n }\n `;\n })\n .filter(truthy),\n ];\n };\n","import { css } from \"styled-components\";\n\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport { OakCombinedColorToken } from \"@/styles/theme/color\";\n\n/**\n * Color token!\n */\ntype ColorToken = ResponsiveValues<OakCombinedColorToken | null>;\n\nexport type ColorStyleProps = {\n /**\n * Sets the `color` of the element.\n *\n * Accepts a color token or a responsive array of color tokens.\n */\n $color?: ColorToken;\n /**\n * Sets the `background-color` of the element.\n *\n * Accepts a color token or a responsive array of color tokens.\n */\n $background?: ColorToken;\n};\nexport const colorStyle = css<ColorStyleProps>`\n ${responsiveStyle<ColorStyleProps, OakCombinedColorToken>(\n \"color\",\n (props) => props.$color,\n parseColor,\n )}\n ${responsiveStyle<ColorStyleProps, OakCombinedColorToken>(\n \"background\",\n (props) => props.$background,\n parseColor,\n )}\n`;\n","const BASE_FONT_SIZE_PX = 16;\nexport const REM_DP = 3;\n\nexport default function pxToRem(px: number): number {\n return Number((px / BASE_FONT_SIZE_PX).toFixed(REM_DP));\n}\n","export const oakAllSpacingTokens = {\n \"all-spacing-0\": 0,\n \"all-spacing-1\": 4,\n \"all-spacing-2\": 8,\n \"all-spacing-3\": 12,\n \"all-spacing-4\": 16,\n \"all-spacing-5\": 20,\n \"all-spacing-6\": 24,\n \"all-spacing-7\": 32,\n \"all-spacing-8\": 40,\n \"all-spacing-9\": 48,\n \"all-spacing-10\": 56,\n \"all-spacing-11\": 64,\n \"all-spacing-12\": 72,\n \"all-spacing-13\": 80,\n \"all-spacing-14\": 92,\n \"all-spacing-15\": 100,\n \"all-spacing-16\": 120,\n \"all-spacing-17\": 160,\n \"all-spacing-18\": 180,\n \"all-spacing-19\": 240,\n \"all-spacing-20\": 360,\n \"all-spacing-21\": 480,\n \"all-spacing-22\": 640,\n \"all-spacing-23\": 960,\n \"all-spacing-24\": 1280,\n};\n\nexport type OakAllSpacingToken = keyof typeof oakAllSpacingTokens;\n\nexport const oakInnerPaddingTokens = {\n \"inner-padding-none\": \"all-spacing-0\",\n \"inner-padding-ssx\": \"all-spacing-1\",\n \"inner-padding-xs\": \"all-spacing-2\",\n \"inner-padding-s\": \"all-spacing-3\",\n \"inner-padding-m\": \"all-spacing-4\",\n \"inner-padding-l\": \"all-spacing-5\",\n \"inner-padding-xl\": \"all-spacing-6\",\n};\n\nexport type OakInnerPaddingToken = keyof typeof oakInnerPaddingTokens;\n\nexport const oakSpaceBetweenTokens = {\n \"space-between-none\": \"all-spacing-0\",\n \"space-between-sssx\": \"all-spacing-1\",\n \"space-between-ssx\": \"all-spacing-2\",\n \"space-between-xs\": \"all-spacing-3\",\n \"space-between-s\": \"all-spacing-4\",\n \"space-between-m\": \"all-spacing-6\",\n \"space-between-m2\": \"all-spacing-7\",\n \"space-between-l\": \"all-spacing-9\",\n \"space-between-xl\": \"all-spacing-10\",\n \"space-between-xxl\": \"all-spacing-12\",\n \"space-between-xxxl\": \"all-spacing-13\",\n};\n\nexport type OakSpaceBetweenToken = keyof typeof oakSpaceBetweenTokens;\n\ntype AdditionalSpacingTypes =\n | \"100%\"\n | 0\n | \"100vh\"\n | \"100vw\"\n | \"auto\"\n | \"fit-content\"\n | \"max-content\"\n | \"min-content\"\n | \"inherit\"\n | \"initial\"\n | \"unset\";\n\nexport type OakCombinedSpacingToken =\n | OakAllSpacingToken\n | OakInnerPaddingToken\n | OakSpaceBetweenToken\n | AdditionalSpacingTypes;\n","import pxToRem from \"@/styles/helpers/pxToRem\";\nimport {\n OakAllSpacingToken,\n OakInnerPaddingToken,\n OakSpaceBetweenToken,\n OakCombinedSpacingToken,\n oakAllSpacingTokens,\n oakInnerPaddingTokens,\n oakSpaceBetweenTokens,\n} from \"@/styles/theme/spacing\";\n\n/**\n * - takes any of OakInnerPadding, OakSpaceBetween, OakAllSpacing, and other accepted values,\n * - derives and returns the corresponding css value\n * - converting to rem where necessary\n */\nexport function parseSpacing(value?: OakCombinedSpacingToken | null) {\n // if value is null or undefined, return undefined\n if (value === undefined || value === null) {\n return undefined;\n }\n\n // mapped values\n if (value in oakAllSpacingTokens) {\n return `${pxToRem(oakAllSpacingTokens[value as OakAllSpacingToken])}rem`; // NB. type assertion is necessary because the OakAllSpacing type is dervied from oakAllSpacingPx\n }\n\n if (value in oakInnerPaddingTokens) {\n const v = oakInnerPaddingTokens[value as OakInnerPaddingToken];\n return `${pxToRem(oakAllSpacingTokens[v as OakAllSpacingToken])}rem`;\n }\n\n if (value in oakSpaceBetweenTokens) {\n const v = oakSpaceBetweenTokens[value as OakSpaceBetweenToken];\n return `${pxToRem(oakAllSpacingTokens[v as OakAllSpacingToken])}rem`;\n }\n\n // value is a number, percentage or css value\n return value;\n}\n","import { CSSProperties } from \"react\";\nimport { css } from \"styled-components\";\n\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport {\n OakAllSpacingToken,\n OakSpaceBetweenToken,\n} from \"@/styles/theme/spacing\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\ntype PositionSpacing =\n | OakAllSpacingToken\n | OakSpaceBetweenToken\n | null\n | undefined;\n\nexport type PositionStyleProps = {\n /**\n * Sets the `position` CSS property of the element.\n *\n * Accepts a `position` value or a responsive array of `position` values. Can be nulled.\n */\n $position?: ResponsiveValues<CSSProperties[\"position\"]>;\n /**\n * Sets the `top` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $top?: ResponsiveValues<PositionSpacing>;\n /**\n * Sets the `right` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $right?: ResponsiveValues<PositionSpacing>;\n /**\n * Sets the `bottom` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $bottom?: ResponsiveValues<PositionSpacing>;\n /**\n * Sets the `left` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $left?: ResponsiveValues<PositionSpacing>;\n /**\n * Sets the `inset` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $inset?: ResponsiveValues<PositionSpacing>;\n /**\n * Sets the `overflow` CSS property of the element.\n *\n * Accepts an `overflow` value or a responsive array of `overflow` values.\n */\n $overflow?: ResponsiveValues<CSSProperties[\"overflow\"]>;\n /**\n * Sets the `overflow-x` CSS property of the element.\n *\n * Accepts an `overflow-x` value or a responsive array of `overflow-x` values.\n */\n $overflowX?: ResponsiveValues<CSSProperties[\"overflowX\"]>;\n /**\n * Sets the `overflow-y` CSS property of the element.\n *\n * Accepts an `overflow-y` value or a responsive array of `overflow-y` values.\n */\n $overflowY?: ResponsiveValues<CSSProperties[\"overflowY\"]>;\n /**\n * Sets the `object-fit` CSS property of the element.\n *\n * Accepts an `object-fit` value or a responsive array of `object-fit` values.\n */\n $objectFit?: ResponsiveValues<CSSProperties[\"objectFit\"]>;\n /**\n * Sets the `pointer-events` CSS property of the element.\n *\n * Accepts a `pointer-events` value or a responsive array of `pointer-events` values.\n */\n $pointerEvents?: ResponsiveValues<CSSProperties[\"pointerEvents\"]>;\n /**\n * Sets the `visibility` CSS property of the element.\n *\n * Accepts a `visibility` value or a responsive array of `visibility` values.\n */\n $visibility?: ResponsiveValues<CSSProperties[\"visibility\"]>;\n};\n\nexport const positionStyle = css<PositionStyleProps>`\n ${responsiveStyle(\"position\", (props) => props.$position)}\n ${responsiveStyle(\"top\", (props) => props.$top, parseSpacing)} \n ${responsiveStyle(\"right\", (props) => props.$right, parseSpacing)} \n ${responsiveStyle(\"bottom\", (props) => props.$bottom, parseSpacing)} \n ${responsiveStyle(\"left\", (props) => props.$left, parseSpacing)} \n ${responsiveStyle(\"inset\", (props) => props.$inset, parseSpacing)} \n ${responsiveStyle(\"overflow\", (props) => props.$overflow)}\n ${responsiveStyle(\"overflow-x\", (props) => props.$overflowX)}\n ${responsiveStyle(\"overflow-y\", (props) => props.$overflowY)}\n ${responsiveStyle(\"object-fit\", (props) => props.$objectFit)}\n ${responsiveStyle(\"pointer-events\", (props) => props.$pointerEvents)}\n ${responsiveStyle(\"visibility\", (props) => props.$visibility)}\n`;\n","import { css, CSSProperties } from \"styled-components\";\n\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport { OakCombinedSpacingToken } from \"@/styles/theme/spacing\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\ntype SizeValues = ResponsiveValues<OakCombinedSpacingToken | null | undefined>;\n\nexport type SizeStyleProps = {\n /**\n * Sets the `width` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $width?: SizeValues;\n /**\n * Sets the `min-width` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $minWidth?: SizeValues;\n /**\n * Sets the `max-width` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $maxWidth?: SizeValues;\n /**\n * Sets the `height` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $height?: SizeValues;\n /**\n * Sets the `min-height` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $minHeight?: SizeValues;\n /**\n * Sets the `max-height` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $maxHeight?: SizeValues;\n /**\n * Sets the `aspect-ratio` CSS property of the element.\n *\n * Accepts an `aspect-ratio` value or a responsive array of `aspect-ratio` values.\n */\n $aspectRatio?: ResponsiveValues<CSSProperties[\"aspectRatio\"]>;\n /**\n * Sets the `box-sizing` CSS property of the element.\n *\n * Accepts a `box-sizing` value or a responsive array of `box-sizing` values.\n */\n $boxSizing?: ResponsiveValues<CSSProperties[\"boxSizing\"]>;\n};\n\nexport const sizeStyle = css<SizeStyleProps>`\n ${responsiveStyle(\"width\", (props) => props.$width, parseSpacing)}\n ${responsiveStyle(\"min-width\", (props) => props.$minWidth, parseSpacing)}\n ${responsiveStyle(\"max-width\", (props) => props.$maxWidth, parseSpacing)}\n ${responsiveStyle(\"height\", (props) => props.$height, parseSpacing)}\n ${responsiveStyle(\"min-height\", (props) => props.$minHeight, parseSpacing)}\n ${responsiveStyle(\"max-height\", (props) => props.$maxHeight, parseSpacing)}\n ${responsiveStyle(\"aspect-ratio\", (props) => props.$aspectRatio)}\n ${responsiveStyle(\"box-sizing\", (props) => props.$boxSizing)}\n`;\n","import { css } from \"styled-components\";\n\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport {\n OakInnerPaddingToken,\n OakSpaceBetweenToken,\n} from \"@/styles/theme/spacing\";\n\ntype PaddingValues = ResponsiveValues<OakInnerPaddingToken | null | undefined>;\n\nexport type PaddingStyleProps = {\n /**\n * Applies `padding` to all sides of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $pa?: PaddingValues;\n /**\n * Applies `padding` to the left and right of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $ph?: PaddingValues;\n /**\n * Applies `padding` to the top and bottom of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $pv?: PaddingValues;\n /**\n * Applies `padding` to the left of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $pl?: PaddingValues;\n /**\n * Applies `padding` to the right of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $pr?: PaddingValues;\n /**\n * Applies `padding` to the top of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $pt?: PaddingValues;\n /**\n * Applies `padding` to the bottom of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $pb?: PaddingValues;\n};\n\ntype MarginValue = \"auto\" | OakSpaceBetweenToken | null | undefined;\ntype MarginValues = ResponsiveValues<MarginValue>;\n\nexport type MarginStyleProps = {\n /**\n * Applies `margin` to all sides of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $ma?: MarginValues;\n /**\n * Applies `margin` to the left and right of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $mh?: MarginValues;\n /**\n * Applies `margin` to the top and bottom of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $mv?: MarginValues;\n /**\n * Applies `margin` to the left of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $ml?: MarginValues;\n /**\n * Applies `margin` to the right of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $mr?: MarginValues;\n /**\n * Applies `margin` to the top of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $mt?: MarginValues;\n /**\n * Applies `margin` to the bottom of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $mb?: MarginValues;\n};\n\nconst paddingAll = css<{ $pa?: PaddingValues }>`\n ${responsiveStyle(\"padding\", (props) => props.$pa, parseSpacing)}\n`;\nconst paddingHorizontal = css<{ $ph?: PaddingValues }>`\n ${responsiveStyle(\"padding-left\", (props) => props.$ph, parseSpacing)}\n ${responsiveStyle(\"padding-right\", (props) => props.$ph, parseSpacing)}\n`;\nconst paddingVertical = css<{ $pv?: PaddingValues }>`\n ${responsiveStyle(\"padding-top\", (props) => props.$pv, parseSpacing)}\n ${responsiveStyle(\"padding-bottom\", (props) => props.$pv, parseSpacing)}\n`;\nconst paddingLeft = css<{ $pl?: PaddingValues }>`\n ${responsiveStyle(\"padding-left\", (props) => props.$pl, parseSpacing)}\n`;\nconst paddingRight = css<{ $pr?: PaddingValues }>`\n ${responsiveStyle(\"padding-right\", (props) => props.$pr, parseSpacing)}\n`;\nconst paddingTop = css<{ $pt?: PaddingValues }>`\n ${responsiveStyle(\"padding-top\", (props) => props.$pt, parseSpacing)}\n`;\nconst paddingBottom = css<{ $pb?: PaddingValues }>`\n ${responsiveStyle(\"padding-bottom\", (props) => props.$pb, parseSpacing)}\n`;\nconst marginAll = css<{ $ma?: MarginValues }>`\n ${responsiveStyle(\"margin\", (props) => props.$ma, parseSpacing)}\n`;\nconst marginHorizontal = css<{ $mh?: MarginValues }>`\n ${responsiveStyle(\"margin-left\", (props) => props.$mh, parseSpacing)}\n ${responsiveStyle(\"margin-right\", (props) => props.$mh, parseSpacing)}\n`;\nconst marginVertical = css<{ $mv?: MarginValues }>`\n ${responsiveStyle(\"margin-top\", (props) => props.$mv, parseSpacing)}\n ${responsiveStyle(\"margin-bottom\", (props) => props.$mv, parseSpacing)}\n`;\nconst marginLeft = css<{ $ml?: MarginValues }>`\n ${responsiveStyle(\"margin-left\", (props) => props.$ml, parseSpacing)}\n`;\nconst marginRight = css<{ $mr?: MarginValues }>`\n ${responsiveStyle(\"margin-right\", (props) => props.$mr, parseSpacing)}\n`;\nconst marginTop = css<{ $mt?: MarginValues }>`\n ${responsiveStyle(\"margin-top\", (props) => props.$mt, parseSpacing)}\n`;\nconst marginBottom = css<{ $mb?: MarginValues }>`\n ${responsiveStyle(\"margin-bottom\", (props) => props.$mb, parseSpacing)}\n`;\n\nexport const marginStyle = css<MarginStyleProps>`\n ${marginAll}\n ${marginHorizontal}\n ${marginVertical}\n ${marginLeft}\n ${marginRight}\n ${marginTop}\n ${marginBottom}\n`;\n\nexport const paddingStyle = css<PaddingStyleProps>`\n ${paddingAll}\n ${paddingHorizontal}\n ${paddingVertical}\n ${paddingLeft}\n ${paddingRight}\n ${paddingTop}\n ${paddingBottom}\n`;\n\nexport type SpacingStyleProps = PaddingStyleProps & MarginStyleProps;\nexport const spacingStyle = css<SpacingStyleProps>`\n ${paddingStyle}\n ${marginStyle}\n`;\n","export const oakBorderWidthTokens = {\n \"border-solid-none\": 0,\n \"border-solid-s\": 1,\n \"border-solid-m\": 2,\n \"border-solid-l\": 3,\n \"border-solid-xl\": 4,\n};\n\nexport const oakBorderRadiusTokens = {\n \"border-radius-square\": 0,\n \"border-radius-xs\": 2,\n \"border-radius-s\": 4,\n \"border-radius-m\": 6,\n \"border-radius-m2\": 8,\n \"border-radius-l\": 16,\n \"border-radius-xl\": 24,\n \"border-radius-circle\": 100,\n};\n\nexport type OakBorderRadiusToken = keyof typeof oakBorderRadiusTokens;\nexport type OakBorderWidthToken = keyof typeof oakBorderWidthTokens;\n","import {\n OakBorderWidthToken,\n oakBorderWidthTokens,\n} from \"@/styles/theme/borders\";\nimport pxToRem from \"@/styles/helpers/pxToRem\";\n\nexport const parseBorder = (value?: OakBorderWidthToken | null) => {\n if (value === undefined || value === null) {\n return undefined;\n }\n if (value in oakBorderWidthTokens) {\n return `${pxToRem(\n oakBorderWidthTokens[value as OakBorderWidthToken],\n )}rem solid`;\n }\n};\n","import pxToRem from \"./pxToRem\";\n\nimport {\n OakBorderRadiusToken,\n oakBorderRadiusTokens,\n} from \"@/styles/theme/borders\";\n\nexport const parseBorderRadius = (value?: OakBorderRadiusToken | null) => {\n if (value === undefined || value === null) {\n return undefined;\n }\n if (value in oakBorderRadiusTokens) {\n return `${pxToRem(\n oakBorderRadiusTokens[value as OakBorderRadiusToken],\n )}rem`;\n }\n};\n","import { CSSProperties, css } from \"styled-components\";\n\nimport {\n OakBorderRadiusToken,\n OakBorderWidthToken,\n} from \"@/styles/theme/borders\";\nimport { OakCombinedColorToken } from \"@/styles/theme/color\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseBorder } from \"@/styles/helpers/parseBorder\";\nimport { parseBorderRadius } from \"@/styles/helpers/parseBorderRadius\";\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\ntype BorderWidth = ResponsiveValues<OakBorderWidthToken>;\ntype _BorderStyleProps = ResponsiveValues<CSSProperties[\"borderStyle\"]>;\ntype BorderColorProps = ResponsiveValues<OakCombinedColorToken>;\ntype BorderRadiusProps = ResponsiveValues<OakBorderRadiusToken>;\n\nexport type BorderStyleProps = {\n /**\n * Apply border on all sides\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $ba?: BorderWidth;\n /**\n * Apply border to the top\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $bt?: BorderWidth;\n /**\n * Apply border to the right\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $br?: BorderWidth;\n /**\n * Apply border to the bottom\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $bb?: BorderWidth;\n /**\n * Apply border to the left\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $bl?: BorderWidth;\n /**\n * Apply border to the left and right\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $bh?: BorderWidth;\n /**\n * Apply border to the top and bottom\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $bv?: BorderWidth;\n /**\n * Apply `border-style` to the element\n *\n * Accepts a single value or a responsive array of values.\n */\n $borderStyle?: _BorderStyleProps;\n /**\n * Apply a border color to all sides of the element\n *\n * Accepts a color token or a responsive array of color tokens.\n */\n $borderColor?: BorderColorProps;\n $borderRadius?: BorderRadiusProps;\n /**\n * Apply border radius to the top left\n *\n * Accepts an `OakBorderRadiusToken` or a responsive array of `OakBorderRadiusToken`s.\n */\n $btlr?: BorderRadiusProps;\n /**\n * Apply border radius to the top right\n *\n * Accepts a border-radius token or a responsive array of border-radius tokens.\n */\n $btrr?: BorderRadiusProps;\n /**\n * Apply border radius to the bottom left\n *\n * Accepts a border-radius token or a responsive array of border-radius tokens.\n */\n $bblr?: BorderRadiusProps;\n /**\n * Apply border radius to the bottom right\n *\n * Accepts a border-radius token or a responsive array of border-radius tokens.\n */\n $bbrr?: BorderRadiusProps;\n /**\n * Apply border radius to the top right and top left\n *\n * Accepts a border-radius token or a responsive array of border-radius tokens.\n */\n $btr?: BorderRadiusProps;\n /**\n * Apply border radius to the bottom right and bottom left\n *\n * Accepts a border-radius token or a responsive array of border-radius tokens\n */\n $bbr?: BorderRadiusProps;\n};\n\nconst borderAll = css<{ $ba?: BorderWidth }>`\n ${responsiveStyle(\"border\", (props) => props.$ba, parseBorder)}\n`;\nconst borderTop = css<{ $bt?: BorderWidth }>`\n ${responsiveStyle(\"border-top\", (props) => props.$bt, parseBorder)}\n`;\nconst borderRight = css<{ $br?: BorderWidth }>`\n ${responsiveStyle(\"border-right\", (props) => props.$br, parseBorder)}\n`;\nconst borderBottom = css<{ $bb?: BorderWidth }>`\n ${responsiveStyle(\"border-bottom\", (props) => props.$bb, parseBorder)}\n`;\nconst borderLeft = css<{ $bl?: BorderWidth }>`\n ${responsiveStyle(\"border-left\", (props) => props.$bl, parseBorder)}\n`;\nconst borderHorizontal = css<{ $bh?: BorderWidth }>`\n ${responsiveStyle(\"border-left\", (props) => props.$bh, parseBorder)}\n ${responsiveStyle(\"border-right\", (props) => props.$bh, parseBorder)}\n`;\nconst borderVertical = css<{ $bv?: BorderWidth }>`\n ${responsiveStyle(\"border-top\", (props) => props.$bv, parseBorder)}\n ${responsiveStyle(\"border-bottom\", (props) => props.$bv, parseBorder)}\n`;\nconst borderColor = css<{ $borderColor?: BorderColorProps }>`\n ${responsiveStyle(\"border-color\", (props) => props.$borderColor, parseColor)}\n`;\nconst borderRadius = css<{ $borderRadius?: BorderRadiusProps }>`\n ${responsiveStyle(\n \"border-radius\",\n (props) => props.$borderRadius,\n parseBorderRadius,\n )}\n`;\nconst borderRadiusTopLeft = css<BorderStyleProps>`\n ${responsiveStyle(\n \"border-top-left-radius\",\n (props) => props.$btlr,\n parseBorderRadius,\n )}\n`;\nconst borderRadiusTopRight = css<BorderStyleProps>`\n ${responsiveStyle(\n \"border-top-right-radius\",\n (props) => props.$btrr,\n parseBorderRadius,\n )}\n`;\nconst borderRadiusBottomLeft = css<BorderStyleProps>`\n ${responsiveStyle(\n \"border-bottom-left-radius\",\n (props) => props.$bblr,\n parseBorderRadius,\n )}\n`;\nconst borderRadiusBottomRight = css<BorderStyleProps>`\n ${responsiveStyle(\n \"border-bottom-right-radius\",\n (props) => props.$bbrr,\n parseBorderRadius,\n )}\n`;\nconst borderRadiusTop = css<BorderStyleProps>`\n ${responsiveStyle(\n \"border-top-left-radius\",\n (props) => props.$btr,\n parseBorderRadius,\n )}\n ${responsiveStyle(\n \"border-top-right-radius\",\n (props) => props.$btr,\n parseBorderRadius,\n )}\n`;\nconst borderRadiusBottom = css<BorderStyleProps>`\n ${responsiveStyle(\n \"border-bottom-left-radius\",\n (props) => props.$bbr,\n parseBorderRadius,\n )}\n ${responsiveStyle(\n \"border-bottom-right-radius\",\n (props) => props.$bbr,\n parseBorderRadius,\n )}\n`;\nconst borderStrokeStyle = css<BorderStyleProps>`\n ${responsiveStyle(\"border-style\", (props) => props.$borderStyle)};\n`;\nexport const borderStyle = css<BorderStyleProps>`\n ${borderAll}\n ${borderTop}\n ${borderRight}\n ${borderBottom}\n ${borderLeft}\n ${borderHorizontal}\n ${borderVertical}\n ${borderColor}\n ${borderRadius}\n ${borderRadiusTopLeft}\n ${borderRadiusTopRight}\n ${borderRadiusBottomLeft}\n ${borderRadiusBottomRight}\n ${borderRadiusTop}\n ${borderRadiusBottom}\n ${borderStrokeStyle}\n`;\n","import { CSSProperties } from \"react\";\nimport { css } from \"styled-components\";\n\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\nexport type DisplayStyleProps = {\n /**\n * Sets the `display` CSS property of the element.\n *\n * Accepts a `display` value or a responsive array of `display` values.\n */\n $display?: ResponsiveValues<CSSProperties[\"display\"]>;\n};\n\nexport const displayStyle = css<DisplayStyleProps>`\n ${responsiveStyle(\"display\", (props) => props.$display)}\n`;\n","export const oakDropShadowTokens = {\n \"drop-shadow-standard\": \"0 0.5rem 0.5rem rgba(92, 92, 92, 20%)\",\n \"drop-shadow-lemon\": `0.125rem 0.125rem 0 rgba(255, 229, 85, 100%)`,\n \"drop-shadow-wide-lemon\": `0.25rem 0.25rem 0 rgba(255, 229, 85, 100%)`,\n \"drop-shadow-centered-lemon\": `0 0 0 0.125rem rgba(255, 229, 85, 100%)`,\n \"drop-shadow-grey\": \"0.25rem 0.25rem 0 rgba(87, 87, 87, 100%)\",\n \"drop-shadow-centered-grey\": \"0 0 0 0.3rem rgba(87, 87, 87, 100%)\",\n};\n\nexport type OakDropShadowToken = keyof typeof oakDropShadowTokens;\n","import {\n OakDropShadowToken,\n oakDropShadowTokens,\n} from \"@/styles/theme/dropShadow\";\n\nexport const parseDropShadow = (variant?: OakDropShadowToken | null) => {\n if (variant === null) {\n return \"none\";\n }\n\n if (!variant) {\n return;\n }\n\n if (variant in oakDropShadowTokens) {\n return oakDropShadowTokens[variant as OakDropShadowToken];\n }\n};\n","import { css } from \"styled-components\";\n\nimport { OakDropShadowToken } from \"@/styles/theme/dropShadow\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\nexport type DropShadowStyleProps = {\n /**\n * Applies a drop-shadow to the element.\n *\n * Accepts a drop-shadow token or a responsive array of drop-shadow tokens.\n */\n $dropShadow?: ResponsiveValues<OakDropShadowToken>;\n};\n\nexport const dropShadowStyle = css<DropShadowStyleProps>`\n ${responsiveStyle(\n \"box-shadow\",\n (props) => props.$dropShadow,\n parseDropShadow,\n )}\n`;\n","export const oakOpacityTokens = {\n transparent: 0,\n \"semi-transparent\": 0.25,\n \"semi-opaque\": 0.5,\n opaque: 1,\n};\n\nexport type OakOpacityToken = keyof typeof oakOpacityTokens;\n","import { css } from \"styled-components\";\n\nimport { OakOpacityToken } from \"@/styles/theme/opacity\";\nimport { parseOpacity } from \"@/styles/helpers/parseOpacity\";\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\nexport type OpacityStyleProps = {\n /**\n * Sets the `opacity` CSS property of the element.\n *\n * Accepts an opacity token or a responsive array of opacity tokens.\n */\n $opacity?: ResponsiveValues<OakOpacityToken>;\n};\n\nexport const opacityStyle = css<OpacityStyleProps>`\n ${responsiveStyle(\"opacity\", (props) => props.$opacity, parseOpacity)}\n`;\n","import { OakOpacityToken, oakOpacityTokens } from \"@/styles/theme/opacity\";\n\nexport const parseOpacity = (variant?: OakOpacityToken | null) => {\n if (!variant) {\n return;\n }\n\n if (variant in oakOpacityTokens) {\n return oakOpacityTokens[variant as OakOpacityToken];\n }\n};\n","import { CSSProperties, css } from \"styled-components\";\n\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\nexport type TransformStyleProps = {\n /**\n * Sets the `transform` CSS property of the element.\n *\n * Accepts a `transform` value or a responsive array of `transform` values. Can be nulled.\n */\n $transform?: ResponsiveValues<CSSProperties[\"transform\"] | null>;\n /**\n * Sets the `transform-origin` CSS property of the element.\n *\n * Accepts a `transform-origin` value or a responsive array of `transform-origin` values. Can be nulled.\n */\n $transformOrigin?: ResponsiveValues<CSSProperties[\"transformOrigin\"] | null>;\n};\n\nexport const transformStyle = css<TransformStyleProps>`\n ${responsiveStyle(\"transform\", (props) => props.$transform)}\n ${responsiveStyle(\"transform-origin\", (props) => props.$transformOrigin)}\n`;\n","export const oakTransitionTokens = {\n \"standard-ease\": \"all 0.3s ease\",\n \"standard-transform\": \"rotate(-2deg) translateY(-16px) translateX(8px)\",\n};\n\nexport type OakTransitionToken = keyof typeof oakTransitionTokens;\n","import { css } from \"styled-components\";\n\nimport { OakTransitionToken } from \"@/styles/theme/transitions\";\nimport { parseTransitions } from \"@/styles/helpers/parseTransitions\";\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\ntype Transition = OakTransitionToken;\n\nexport type TransitionStyleProps = {\n /**\n * Sets the `transition` CSS property of the element.\n *\n * Accepts a transition token or a responsive array of transition tokens.\n */\n $transition?: ResponsiveValues<Transition>;\n};\n\nexport const transitionStyle = css<TransitionStyleProps>`\n ${responsiveStyle(\n \"transition\",\n (props) => props.$transition,\n parseTransitions,\n )}\n`;\n","import {\n OakTransitionToken,\n oakTransitionTokens,\n} from \"@/styles/theme/transitions\";\n\nexport const parseTransitions = (variant?: OakTransitionToken | null) => {\n if (!variant) {\n return;\n }\n\n if (variant in oakTransitionTokens) {\n return oakTransitionTokens[variant as OakTransitionToken];\n }\n};\n","export const oakFontSizeTokens = {\n \"font-size-1\": 12,\n \"font-size-2\": 14,\n \"font-size-3\": 16,\n \"font-size-4\": 18,\n \"font-size-5\": 20,\n \"font-size-6\": 24,\n \"font-size-7\": 32,\n \"font-size-8\": 40,\n \"font-size-9\": 48,\n \"font-size-10\": 56,\n};\nexport type OakFontSizeToken = keyof typeof oakFontSizeTokens;\n\nconst fontWeights = [300, 400, 600, 700] as const;\ntype FontWeight = (typeof fontWeights)[number];\nconst lineHeights = [16, 20, 24, 28, 32, 40, 48, 56, 64] as const;\ntype LineHeight = (typeof lineHeights)[number];\nconst letterSpacings = [\"0.0115rem\", \"-0.005rem\"] as const;\ntype LetterSpacing = (typeof letterSpacings)[number];\n\ntype FontParameters = readonly [\n OakFontSizeToken,\n LineHeight,\n FontWeight,\n LetterSpacing,\n];\n\nexport const oakFontTokens = {\n \"heading-1\": [\"font-size-10\", 64, 600, \"0.0115rem\"],\n \"heading-2\": [\"font-size-9\", 56, 600, \"0.0115rem\"],\n \"heading-3\": [\"font-size-8\", 48, 600, \"0.0115rem\"],\n \"heading-4\": [\"font-size-7\", 40, 600, \"0.0115rem\"],\n \"heading-5\": [\"font-size-6\", 32, 600, \"0.0115rem\"],\n \"heading-6\": [\"font-size-5\", 24, 600, \"0.0115rem\"],\n \"heading-7\": [\"font-size-3\", 20, 600, \"0.0115rem\"],\n \"heading-light-1\": [\"font-size-10\", 64, 400, \"0.0115rem\"],\n \"heading-light-2\": [\"font-size-9\", 56, 400, \"0.0115rem\"],\n \"heading-light-3\": [\"font-size-8\", 48, 400, \"0.0115rem\"],\n \"heading-light-4\": [\"font-size-7\", 40, 400, \"0.0115rem\"],\n \"heading-light-5\": [\"font-size-6\", 32, 400, \"0.0115rem\"],\n \"heading-light-6\": [\"font-size-5\", 24, 400, \"0.0115rem\"],\n \"heading-light-7\": [\"font-size-3\", 20, 400, \"0.0115rem\"],\n \"body-1\": [\"font-size-4\", 28, 300, \"-0.005rem\"],\n \"body-2\": [\"font-size-3\", 24, 300, \"-0.005rem\"],\n \"body-3\": [\"font-size-2\", 20, 300, \"-0.005rem\"],\n \"body-4\": [\"font-size-1\", 16, 300, \"-0.005rem\"],\n \"body-1-bold\": [\"font-size-4\", 28, 700, \"-0.005rem\"],\n \"body-2-bold\": [\"font-size-3\", 24, 700, \"-0.005rem\"],\n \"body-3-bold\": [\"font-size-2\", 20, 700, \"-0.005rem\"],\n \"list-item-1\": [\"font-size-4\", 32, 300, \"-0.005rem\"],\n \"list-item-2\": [\"font-size-3\", 24, 300, \"-0.005rem\"],\n} satisfies Record<string, FontParameters>;\n\nexport type OakFontToken = keyof typeof oakFontTokens;\n\nexport const oakTextDecorations = [\n \"underline\",\n \"overline\",\n \"line-through\",\n \"none\",\n] as const;\n\nexport const oakWhiteSpaces = [\n \"normal\",\n \"nowrap\",\n \"pre\",\n \"pre-wrap\",\n \"pre-line\",\n \"break-spaces\",\n] as const;\n\nexport const oakWordWraps = [\n \"normal\",\n \"break-word\",\n \"initial\",\n \"inherit\",\n] as const;\n\nexport const oakTextOverflows = [\"clip\", \"ellipsis\"] as const;\n\nexport type OakTextDecoration = (typeof oakTextDecorations)[number];\nexport type OakWhiteSpace = (typeof oakWhiteSpaces)[number];\nexport type OakWordWrap = (typeof oakWordWraps)[number];\nexport type OakTextOverflow = (typeof oakTextOverflows)[number];\n","import { CSSProperties, css } from \"styled-components\";\n\nimport {\n OakFontToken,\n OakTextDecoration,\n OakTextOverflow,\n OakWhiteSpace,\n OakWordWrap,\n} from \"@/styles/theme/typography\";\nimport {\n parseFontSize,\n parseFontWeight,\n parseLetterSpacing,\n parseLineHeight,\n} from \"@/styles/helpers/parseTypography\";\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\nexport type TypographyStyleProps = {\n /**\n * Sets the `font-size`, `line-height`, `font-weight` and `letter-spacing` of the element.\n *\n * Accepts a font token or a responsive array of font tokens.\n */\n $font?: ResponsiveValues<OakFontToken>;\n /**\n * Sets the `text-decoration` CSS property of the element.\n *\n * Accepts a text-decoration token or a responsive array of text-decoration tokens.\n */\n $textDecoration?: ResponsiveValues<OakTextDecoration>;\n /**\n * Sets the `text-align` CSS property of the element.\n *\n * Accepts a `text-align` value or a responsive array of `text-align` values.\n */\n $textAlign?: ResponsiveValues<CSSProperties[\"textAlign\"]>;\n /**\n * Sets the `white-space` CSS property of the element.\n *\n * Accepts a white-space token or a responsive array of white-space tokens.\n */\n $whiteSpace?: ResponsiveValues<OakWhiteSpace>;\n /**\n * Sets the `word-wrap` CSS property of the element.\n *\n * Accepts a word-wrap token or a responsive array of word-wrap tokens.\n */\n $wordWrap?: ResponsiveValues<OakWordWrap>;\n /**\n * Sets the `text-overflow` CSS property of the element.\n *\n * Accepts a text-overflow token or a responsive array of text-overflow tokens.\n */\n $textOverflow?: ResponsiveValues<OakTextOverflow>;\n};\n\nexport const typographyStyle = css<TypographyStyleProps>`\n font-family: Lexend, sans-serif;\n ${responsiveStyle(\"font-weight\", (props) => props.$font, parseFontWeight)}\n ${responsiveStyle(\"font-size\", (props) => props.$font, parseFontSize)}\n ${responsiveStyle(\"line-height\", (props) => props.$font, parseLineHeight)}\n ${responsiveStyle(\n \"letter-spacing\",\n (props) => props.$font,\n parseLetterSpacing,\n )}\n ${responsiveStyle(\"text-align\", (props) => props.$textAlign)}\n ${responsiveStyle(\"text-decoration\", (props) => props.$textDecoration)}\n ${responsiveStyle(\"white-space\", (props) => props.$whiteSpace)}\n ${responsiveStyle(\"word-wrap\", (props) => props.$wordWrap)}\n ${responsiveStyle(\"text-overflow\", (props) => props.$textOverflow)}\n`;\n","import {\n OakFontToken,\n oakFontSizeTokens,\n oakFontTokens,\n} from \"@/styles/theme/typography\";\nimport pxToRem from \"@/styles/helpers/pxToRem\";\n\nexport const parseFontWeight = (font?: OakFontToken | null) => {\n if (!font) return;\n return oakFontTokens[font]?.[2];\n};\n\nexport const parseFontSize = (\n font?: OakFontToken | null,\n): string | null | undefined => {\n if (!font) return;\n const fontSize = oakFontTokens[font]?.[0];\n if (!fontSize) return;\n const fontSizePx = oakFontSizeTokens[fontSize];\n return `${pxToRem(fontSizePx)}rem`;\n};\nexport const parseLineHeight = (\n font?: OakFontToken | null,\n): string | null | undefined => {\n if (!font) return;\n const lineHeight = oakFontTokens[font]?.[1];\n if (!lineHeight) return;\n return `${pxToRem(lineHeight)}rem`;\n};\nexport const parseLetterSpacing = (font?: OakFontToken | null) => {\n if (!font) return;\n return oakFontTokens[font]?.[3];\n};\n","export const oakZIndexTokens = {\n behind: -1,\n neutral: 0,\n \"in-front\": 1,\n \"mobile-filters\": 2,\n \"fixed-header\": 100,\n \"modal-close-button\": 150,\n \"modal-dialog\": 300,\n} as const;\n\nexport type OakZIndexToken = keyof typeof oakZIndexTokens | null;\n","import { css } from \"styled-components\";\n\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\nimport { OakZIndexToken } from \"@/styles/theme/zIndex\";\nimport { parseZIndex } from \"@/styles/helpers/parseZIndex\";\n\nexport type ZIndexStyleProps = {\n /**\n * Sets the `z-index` CSS property of the element.\n *\n * Accepts a z-index token or a responsive array of z-index tokens.\n */\n $zIndex?: ResponsiveValues<OakZIndexToken>;\n};\n\nexport const zIndexStyle = css<ZIndexStyleProps>`\n ${responsiveStyle(\"z-index\", (props) => props.$zIndex, parseZIndex)}\n`;\n","import { OakZIndexToken, oakZIndexTokens } from \"@/styles/theme/zIndex\";\n\nexport const parseZIndex = (value?: OakZIndexToken) => {\n if (value === undefined || value === null) {\n return undefined;\n }\n return oakZIndexTokens[value];\n};\n","import { MouseEventHandler } from \"react\";\nimport styled, { css } from \"styled-components\";\n\n/**\n * OakBox exposes all the styles that are available styles on a div element.\n */\n\nimport { colorStyle, ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport {\n positionStyle,\n PositionStyleProps,\n} from \"@/styles/utils/positionStyle\";\nimport { sizeStyle, SizeStyleProps } from \"@/styles/utils/sizeStyle\";\nimport { spacingStyle, SpacingStyleProps } from \"@/styles/utils/spacingStyle\";\nimport { borderStyle, BorderStyleProps } from \"@/styles/utils/borderStyle\";\nimport { displayStyle, DisplayStyleProps } from \"@/styles/utils/displayStyle\";\nimport {\n dropShadowStyle,\n DropShadowStyleProps,\n} from \"@/styles/utils/dropShadowStyle\";\nimport { opacityStyle, OpacityStyleProps } from \"@/styles/utils/opacityStyle\";\nimport {\n transformStyle,\n TransformStyleProps,\n} from \"@/styles/utils/transformStyle\";\nimport {\n transitionStyle,\n TransitionStyleProps,\n} from \"@/styles/utils/transitionStyle\";\nimport {\n typographyStyle,\n TypographyStyleProps,\n} from \"@/styles/utils/typographyStyle\";\nimport { zIndexStyle, ZIndexStyleProps } from \"@/styles/utils/zIndexStyle\";\n\n// TODO: these are not yet implemented\n// import cover, { CoverProps } from \"@/styles/utils/coverStyle\";\n// import customScrollbar from \"@/styles/utils/customScrollbarStyle\";\n\ntype HTMLProps = {\n onClick?: MouseEventHandler;\n};\n\nexport type OakBoxProps = {\n children?: React.ReactNode;\n} & PositionStyleProps &\n SizeStyleProps &\n SpacingStyleProps &\n ColorStyleProps &\n BorderStyleProps &\n DisplayStyleProps &\n DropShadowStyleProps &\n OpacityStyleProps &\n TransformStyleProps &\n TransitionStyleProps &\n TypographyStyleProps &\n ZIndexStyleProps &\n HTMLProps;\n\nexport const oakBoxCss = css<OakBoxProps>`\n ${positionStyle}\n ${sizeStyle}\n ${spacingStyle}\n ${colorStyle}\n ${borderStyle}\n ${displayStyle}\n ${dropShadowStyle}\n ${opacityStyle}\n ${transformStyle}\n ${transitionStyle}\n ${typographyStyle}\n ${zIndexStyle}\n ${(props) =>\n /* onClick might be passed in the useClickableCard pattern */\n props.onClick &&\n css`\n :hover {\n cursor: pointer;\n }\n `}\n`;\n\n/**\n * OakBox exposes all the styles that are available styles on a div tag. These include:\n * - color\n * - size\n * - display\n * - spacing\n * - position\n * - border\n * - opacity\n * - z-index\n * - typography\n * - transition\n * - transform\n * - drop-shadow\n *\n */\nexport const OakBox = styled.div<OakBoxProps>`\n ${oakBoxCss}\n`;\n","import { CSSProperties } from \"react\";\nimport { css } from \"styled-components\";\n\nimport type { DisplayStyleProps } from \"./displayStyle\";\n\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport {\n OakAllSpacingToken,\n OakCombinedSpacingToken,\n OakSpaceBetweenToken,\n} from \"@/styles/theme/spacing\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\nexport type FlexStyleProps = DisplayStyleProps & {\n /**\n * Sets the `flex-direction` CSS property of the element.\n *\n * Accepts a `flex-direction` value or a responsive array of flex-direction values.\n */\n $flexDirection?: ResponsiveValues<CSSProperties[\"flexDirection\"]>;\n /**\n * Sets the `flex-wrap` CSS property of the element.\n *\n * Accepts a `flex-wrap` value or a responsive array of flex-wrap values.\n */\n $flexWrap?: ResponsiveValues<CSSProperties[\"flexWrap\"]>;\n /**\n * Sets the `align-items` CSS property of the element.\n *\n * Accepts an `align-items` value or a responsive array of `align-items` values.\n */\n $alignItems?: ResponsiveValues<CSSProperties[\"alignItems\"]>;\n /**\n * Sets the `align-content` CSS property of the element.\n *\n * Accepts an `align-content` value or a responsive array of `align-content` values.\n */\n $alignContent?: ResponsiveValues<CSSProperties[\"alignContent\"]>;\n /**\n * Sets the `justify-content` CSS property of the element.\n *\n * Accepts a `justify-content` value or a responsive array of `justify-content` values.\n */\n $justifyContent?: ResponsiveValues<CSSProperties[\"justifyContent\"]>;\n /**\n * Sets the `align-self` CSS property of the element.\n *\n * Accepts an `align-self` value or a responsive array of `align-self` values.\n */\n $alignSelf?: ResponsiveValues<CSSProperties[\"alignSelf\"]>;\n /**\n * Sets the `flex-grow` CSS property of the element.\n *\n * Accepts a `flex-grow` value or a responsive array of `flex-grow` values.\n */\n $flexGrow?: ResponsiveValues<CSSProperties[\"flexGrow\"]>;\n /**\n * Sets the `flex-shrink` CSS property of the element.\n *\n * Accepts a `flex-shrink` value or a responsive array of `flex-shrink` values.\n */\n $flexShrink?: ResponsiveValues<CSSProperties[\"flexShrink\"]>;\n /**\n * Sets the `order` CSS property of the element.\n *\n * Accepts an `order` value or a responsive array of `order` values.\n */\n $order?: ResponsiveValues<CSSProperties[\"order\"]>;\n /**\n * Sets the `flex-basis` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $flexBasis?: ResponsiveValues<OakCombinedSpacingToken | null | undefined>;\n /**\n * Sets the `gap` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $gap?: ResponsiveValues<\n OakAllSpacingToken | OakSpaceBetweenToken | null | undefined\n >;\n /**\n * Sets the `column-gap` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $columnGap?: ResponsiveValues<\n OakAllSpacingToken | OakSpaceBetweenToken | null | undefined\n >;\n /**\n * Sets the `row-gap` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $rowGap?: ResponsiveValues<\n OakAllSpacingToken | OakSpaceBetweenToken | null | undefined\n >;\n};\n\nexport const flexStyle = css<FlexStyleProps>`\n ${responsiveStyle(\"display\", (props) => props.$display ?? \"flex\")}\n ${responsiveStyle(\"flex-direction\", (props) => props.$flexDirection)}\n ${responsiveStyle(\"flex-wrap\", (props) => props.$flexWrap)}\n ${responsiveStyle(\"align-items\", (props) => props.$alignItems)}\n ${responsiveStyle(\"align-content\", (props) => props.$alignContent)}\n ${responsiveStyle(\"justify-content\", (props) => props.$justifyContent)}\n ${responsiveStyle(\"align-self\", (props) => props.$alignSelf)}\n ${responsiveStyle(\"order\", (props) => props.$order)}\n ${responsiveStyle(\"flex-grow\", (props) => props.$flexGrow)}\n ${responsiveStyle(\"flex-shrink\", (props) => props.$flexShrink)}\n ${responsiveStyle(\"flex-basis\", (props) => props.$flexBasis, parseSpacing)}\n ${responsiveStyle(\"gap\", (props) => props.$gap, parseSpacing)}\n ${responsiveStyle(\"column-gap\", (props) => props.$columnGap, parseSpacing)}\n ${responsiveStyle(\"row-gap\", (props) => props.$rowGap, parseSpacing)}\n`;\n","import styled from \"styled-components\";\n\nimport { OakBox, OakBoxProps } from \"@/components/atoms/OakBox\";\nimport { flexStyle, FlexStyleProps } from \"@/styles/utils/flexStyle\";\n\nexport type OakFlexProps = FlexStyleProps & OakBoxProps;\n\n/**\n * Flex sets `display: flex;` and exposes various flex props, along with Box\n * props.\n *\n * ## Usage\n * Before adding props to this component, think about whether it makes sense\n * to add it to Box instead, as this component extends that.\n */\nconst OakFlex = styled(OakBox)<OakFlexProps>`\n ${flexStyle}\n`;\n\nexport { OakFlex };\n","import styled from \"styled-components\";\n\nimport { colorStyle, ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport { opacityStyle, OpacityStyleProps } from \"@/styles/utils/opacityStyle\";\nimport {\n marginStyle,\n MarginStyleProps,\n paddingStyle,\n PaddingStyleProps,\n} from \"@/styles/utils/spacingStyle\";\nimport {\n typographyStyle,\n TypographyStyleProps,\n} from \"@/styles/utils/typographyStyle\";\nimport { borderStyle, BorderStyleProps } from \"@/styles/utils/borderStyle\";\n\nexport type OakSpanProps = ColorStyleProps &\n OpacityStyleProps &\n MarginStyleProps &\n PaddingStyleProps &\n BorderStyleProps &\n TypographyStyleProps;\n\n/**\n * Span renders a `span` (inline text) component, exposing all the typography props.\n * ## Usage\n * Use this component when you want to apply styles to a piece of inline text.\n */\nexport const OakSpan = styled.span<OakSpanProps>`\n ${colorStyle}\n ${opacityStyle}\n ${marginStyle}\n ${paddingStyle}\n ${borderStyle}\n ${typographyStyle}\n`;\n","import styled from \"styled-components\";\n\nimport { OakBoxProps, oakBoxCss } from \"../OakBox\";\n\n/**\n *\n * Inherit everything from OakBox, but change the element to a form.\n *\n * @deprecated Use `<OakBox as=\"form\">` instead\n */\nexport const OakForm = styled.form<OakBoxProps>`\n ${oakBoxCss}\n`;\n\nexport type OakFormProps = OakBoxProps;\n","import {\n OakColorFilterToken,\n OakUiRoleToken,\n oakColorFilterTokens,\n oakUiRoleTokens,\n} from \"@/styles/theme/color\";\nimport { OakCombinedColorToken } from \"@/styles/theme\";\nimport { PropsWithTheme } from \"@/styles/theme/theme\";\n\nfunction parseColorFilter(\n value?: OakCombinedColorToken | null,\n): (props: PropsWithTheme) => string;\nfunction parseColorFilter(\n value?: OakCombinedColorToken | null,\n): ((props: PropsWithTheme) => string) | undefined;\nfunction parseColorFilter(value?: OakCombinedColorToken | null) {\n if (value === undefined || value === null) {\n return undefined;\n }\n if (value in oakColorFilterTokens) {\n return oakColorFilterTokens[value as OakColorFilterToken];\n }\n\n if (oakUiRoleTokens.includes(value as OakUiRoleToken)) {\n return ({ theme }: PropsWithTheme) => {\n const c = theme.uiColors[value as OakUiRoleToken];\n if (c && c in oakColorFilterTokens) {\n return oakColorFilterTokens[c as OakColorFilterToken];\n }\n return undefined;\n };\n }\n}\n\nexport { parseColorFilter };\n","import { css } from \"styled-components\";\n\nimport { parseColorFilter } from \"@/styles/helpers/parseColorFilter\";\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport { OakCombinedColorToken } from \"@/styles/theme/color\";\n\ntype ColorFilterToken = ResponsiveValues<OakCombinedColorToken | null>;\n\nexport type ColorFilterStyleProps = {\n /**\n * Applies a color-filter to the element.\n *\n * Accepts a color filter token or a responsive array of color tokens.\n */\n $colorFilter?: ColorFilterToken;\n};\nexport const colorFilterStyle = css<ColorFilterStyleProps>`\n ${responsiveStyle<ColorFilterStyleProps, OakCombinedColorToken>(\n \"filter\",\n (props) => props.$colorFilter,\n parseColorFilter,\n )}\n`;\n","import React, {\n ComponentPropsWithoutRef,\n ElementType,\n MouseEventHandler,\n} from \"react\";\nimport Image, { ImageProps } from \"next/image\";\nimport styled, { css } from \"styled-components\";\n\nimport { useShowPlaceholder } from \"./useShowPlaceholder\";\n\nimport {\n ColorFilterStyleProps,\n colorFilterStyle,\n} from \"@/styles/utils/colorFilterStyle\";\nimport { OakBox, OakBoxProps } from \"@/components/atoms/OakBox\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\ntype HTMLProps = {\n onClick?: MouseEventHandler;\n};\n\nexport type OakImageProps<C extends ElementType = typeof Image> = Omit<\n ImageProps,\n \"placeholder\"\n> &\n OakBoxProps &\n ColorFilterStyleProps &\n HTMLProps & {\n as?: C;\n /**\n * The placeholder to use while the image is loading\n *\n * Defaults to `oak` which is a placeholder containing the Oak logo\n * also accepts the same options as next/image */\n placeholder?: ImageProps[\"placeholder\"] | \"oak\";\n /**\n * Additional props forwarded to the underlying `Image` component `as`\n */\n imageProps?: Partial<ComponentPropsWithoutRef<C>>;\n };\n\ntype StyledImageProps = Omit<OakImageProps, \"as\"> & {\n $showOakPlaceholder: boolean;\n};\n\nconst oakPlaceholder =\n \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA2NCA2NCI+PHBhdGggZmlsbD0iIzIyMiIgZD0iTTI4Ljc3OSAxOS4xNzZhMjcuMTkxIDI3LjE5MSAwIDAgMC0zLjggMS42IDE2LjcgMTYuNyAwIDAgMC03LjEgOC40YzAgLjEtLjEuMi0uMS4zLS43IDIuNC0uNiAyIDEuMyAyLjMgMS45LjMgMSAuNSAxIDEuMy0uMSA4LjggNC4xIDE1LjEgMTEuNCAxOS42YTEuNSAxLjUgMCAwIDAgMS43LjJjNS43LTIuNiA5LjMtNyAxMC4zLTEzLjJhMSAxIDAgMCAxIDEtMWwzLS4yYy44IDAgMS4zLjIgMS4yIDEuMmExNy45IDE3LjkgMCAwIDEtMy4yIDkuMiAyMy43IDIzLjcgMCAwIDEtMTAuOSA5LjEgNS40MDEgNS40MDEgMCAwIDEtNC41LS4yIDI2LjI5OCAyNi4yOTggMCAwIDEtOC41LTYuNiAyNS45IDI1LjkgMCAwIDEtNi40LTE0LjRjMC0uNi0uMi0uNy0uOC0uOC0yLjUtLjQtMi41LS4xLTIuMy0yLjlhMTkuMyAxOS4zIDAgMCAxIDEwLjgtMTYuNiAzOC45OTkgMzguOTk5IDAgMCAxIDUuNy0yLjEgMi4xIDIuMSAwIDAgMCAuOS0xLjMgMTQuMSAxNC4xIDAgMCAxIDMuNS02LjNsLjMtLjNjMS45LTIgMi42LTIgNC4zLjJsLjQuNWMxLjEgMS4xIDEgMS41LS4xIDIuNmExMS45IDExLjkgMCAwIDAtMy4yIDQuNCAxNi45IDE2LjkgMCAwIDEgNy41IDIuM2M1LjcgMy41IDkuMiA4LjMgOS45IDE1IC4wMTYuOTAxLS4wMTcgMS44MDItLjEgMi43IDAgLjgtLjYgMS0xLjIgMS4yYTE2LjEgMTYuMSAwIDAgMS0xMS0uNyAxNy45MDEgMTcuOTAxIDAgMCAxLTEwLjktMTMuNiA5Ljc5NiA5Ljc5NiAwIDAgMS0uMS0xLjlabTE4LjEgMTIuMmMuNC01LjUtNi45LTEyLjYtMTMtMTIuMS41IDYuNSA3LjYgMTIuOCAxMyAxMi4xWiIgb3BhY2l0eT0iLjEiLz48L3N2Zz4=\";\n\nconst clickStyles = css<{ onClick?: MouseEventHandler }>`\n ${(props) =>\n /* onClick might be passed in the useClickableCard pattern */\n props.onClick &&\n css`\n :hover {\n cursor: pointer;\n }\n `}\n`;\n\nconst placeholderStyles = css<StyledImageProps>`\n ${(props) =>\n props.$showOakPlaceholder &&\n css`\n background-image: url(${oakPlaceholder});\n background-color: ${parseColor(\"bg-decorative2-very-subdued\")};\n background-size: ${parseSpacing(\"all-spacing-11\")};\n background-position: center;\n background-repeat: no-repeat;\n `}\n`;\n\nconst StyledFillImage = styled(Image)<StyledImageProps>`\n ${colorFilterStyle}\n ${clickStyles}\n ${placeholderStyles}\n object-fit: contain;\n`;\n\nconst StyledResponsiveImage = styled(Image)<StyledImageProps>`\n ${colorFilterStyle}\n ${clickStyles}\n ${placeholderStyles}\n width: 100%;\n height: auto;\n`;\n\n/**\n * A wrapper for NextJs's Image component.\n *\n * Use this for all image types as well as icons.\n * Can accept remote urls provided they are whitelisted in next.config.js and relative urls for local images provided they begin with a \"/\".\n * Set the width and height of the image through the `$width` and `$height` props when the aspect ratio is not known. This will letterbox the image to avoid stretching.\n * Alternatively pass `width` and `height` props when the aspect ratio is known and use $minWidth to set the rendered width, avoiding letter-boxing.\n * NB. for letterboxed images, $background controls the color of the letterbox not the image.\n * `positionStyle` and `spacingStyle` props are also exposed for container.\n * sizes is exposed for further optimisation read Next docs for more info.\n *\n */\nexport const OakImage = <C extends ElementType = typeof Image>({\n ...props\n}: OakImageProps<C>) => {\n const {\n as,\n src,\n alt,\n width,\n height,\n sizes,\n $width = \"100%\",\n $position = \"relative\",\n $colorFilter,\n placeholder = \"oak\",\n unoptimized,\n imageProps,\n onLoad,\n onError,\n ...rest\n } = props;\n const finalPlaceholder = placeholder === \"oak\" ? undefined : placeholder;\n const { showPlaceholder, handleComplete, setImg } = useShowPlaceholder();\n\n // We don't know the aspect ratio of the image, so we must use fill and letterbox it to avoid stretching\n // Use $width and $height to set the width and height of the image container\n if (!width || !height) {\n return (\n <OakBox $position={$position} $width={$width} {...rest}>\n <StyledFillImage\n ref={setImg}\n as={as ?? Image}\n src={src}\n alt={alt}\n sizes={sizes}\n fill\n $colorFilter={$colorFilter}\n placeholder={finalPlaceholder}\n $showOakPlaceholder={placeholder === \"oak\" && showPlaceholder}\n unoptimized={unoptimized}\n onLoad={handleComplete(onLoad)}\n onError={handleComplete(onError)}\n {...imageProps}\n />\n </OakBox>\n );\n }\n\n // When we know the aspect ratio, we can use Image's repsonsive layout\n // Use $minWidth to set the width with auto height\n\n return (\n <OakBox $maxWidth={\"all-spacing-0\"} $position={$position} {...rest}>\n <StyledResponsiveImage\n ref={setImg}\n as={as ?? Image}\n src={src}\n alt={alt}\n width={width}\n height={height}\n sizes={sizes}\n unoptimized={unoptimized}\n $colorFilter={$colorFilter}\n placeholder={finalPlaceholder}\n $showOakPlaceholder={placeholder === \"oak\" && showPlaceholder}\n onLoad={handleComplete(onLoad)}\n onError={handleComplete(onError)}\n {...imageProps}\n />\n </OakBox>\n );\n};\n","import { ReactEventHandler, useCallback, useState } from \"react\";\n\nexport function useShowPlaceholder() {\n // Default to false so that we don't show the placeholder if the image is already complete\n const [showPlaceholder, setShowPlaceholder] = useState(false);\n const setImg = useCallback((img: HTMLImageElement | null) => {\n // the `load` or `error` event may never be called if the image is coming from the cache\n // so we need to check the `complete` property as well as listen to the `onLoad` and `onError` events\n img && setShowPlaceholder(!img.complete);\n }, []);\n\n return {\n showPlaceholder,\n setImg,\n /**\n * Wraps the `onLoad` and `onError` events to set the placeholder state\n */\n handleComplete(\n originalHandler?: ReactEventHandler<HTMLImageElement>,\n ): ReactEventHandler<HTMLImageElement> {\n return (event) => {\n if (originalHandler) {\n originalHandler(event);\n }\n setShowPlaceholder(false);\n };\n },\n };\n}\n","import styled from \"styled-components\";\n\nimport {\n typographyStyle,\n TypographyStyleProps,\n} from \"@/styles/utils/typographyStyle\";\nimport { OakBox, OakBoxProps } from \"@/components/atoms/OakBox\";\n\nexport type OakTypographyProps = OakBoxProps & TypographyStyleProps;\n\n/**\n * The Typography component sets a typography style context from which children\n * inherit style properties through the cascade.\n * ## Usage\n * This should be the primary component to set a typography context.\n * Use this component whenever you want to style blocks of 'body' text.\n */\nexport const OakTypography = styled(OakBox)<OakTypographyProps>`\n ${typographyStyle}\n`;\n","import React, { FC } from \"react\";\nimport styled from \"styled-components\";\n\nimport { ColorStyleProps, colorStyle } from \"@/styles/utils/colorStyle\";\nimport { MarginStyleProps, marginStyle } from \"@/styles/utils/spacingStyle\";\nimport { OpacityStyleProps, opacityStyle } from \"@/styles/utils/opacityStyle\";\nimport {\n TypographyStyleProps,\n typographyStyle,\n} from \"@/styles/utils/typographyStyle\";\n\nexport const oakHeadingTags = [\n \"div\",\n \"h1\",\n \"h2\",\n \"h3\",\n \"h4\",\n \"h5\",\n \"h6\",\n] as const;\n\nexport type OakHeadingTag = (typeof oakHeadingTags)[number];\n\ntype OakHeadingTagProps = {\n children?: React.ReactNode;\n id?: string;\n /**\n * HTML tag to be used for the heading\n *\n * Accepts a heading tag token\n */\n tag: OakHeadingTag;\n ariaLabel?: string;\n ariaHidden?: boolean;\n};\n\nexport const HeadingTagComponent: FC<OakHeadingTagProps> = (props) => {\n const { tag, ariaLabel, ariaHidden, ...otherProps } = props;\n const Tag = tag;\n return (\n <Tag {...otherProps} aria-label={ariaLabel} aria-hidden={ariaHidden} />\n );\n};\n\nexport type OakHeadingProps = TypographyStyleProps &\n OakHeadingTagProps &\n ColorStyleProps &\n OpacityStyleProps &\n MarginStyleProps;\n\n/**\n *\n * OakHeading can be one of the following style tags dependant on its role: \"div\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\".\n * Use the controls to view different font styles.\n *\n */\nexport const OakHeading = styled(HeadingTagComponent)<OakHeadingProps>`\n ${typographyStyle}\n ${marginStyle}\n ${colorStyle}\n ${opacityStyle}\n`;\n","import styled from \"styled-components\";\n\nimport { colorStyle, ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport { marginStyle, MarginStyleProps } from \"@/styles/utils/spacingStyle\";\nimport {\n typographyStyle,\n TypographyStyleProps,\n} from \"@/styles/utils/typographyStyle\";\n\nexport type OakPProps = MarginStyleProps &\n TypographyStyleProps &\n ColorStyleProps;\n\n/**\n * Styled `p` (paragraph) component.\n * ## Usage\n * In general, using a `p` as a descendant of `<Body>` should suffice.\n * However, if you want different styles for a particular paragraph,\n * you can use this component to apply additional styles.\n */\nexport const OakP = styled.p<OakPProps>`\n ${typographyStyle}\n ${colorStyle}\n ${marginStyle}\n\n a {\n color: ${(props) =>\n props.theme &&\n props.theme.uiColors &&\n props.theme.uiColors[\"text-link-active\"]};\n }\n`;\n","import styled, { css } from \"styled-components\";\n\nimport { OakBoxProps, oakBoxCss } from \"../OakBox\";\n\nexport type OakULProps = OakBoxProps & {\n $reset?: boolean;\n};\n\n/**\n * Styled `ul` (unordered list) component.\n *\n * ## Usage\n *\n * Resets browser spacing and other styles, accepts BoxProps' style props.\n *\n * */\n\nexport const OakUL = styled.ul<OakULProps>`\n ${(props) =>\n props.$reset &&\n css`\n list-style: none;\n padding: 0;\n `}\n margin: 0;\n ${oakBoxCss}\n`;\n","import styled from \"styled-components\";\n\nimport { colorStyle, ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport { marginStyle, MarginStyleProps } from \"@/styles/utils/spacingStyle\";\nimport {\n typographyStyle,\n TypographyStyleProps,\n} from \"@/styles/utils/typographyStyle\";\n\nexport type OakOLProps = MarginStyleProps &\n ColorStyleProps &\n TypographyStyleProps;\n\n/**\n * Styled `ol` (ordered list) component.\n *\n * ## Usage\n *\n * Use where we have an ordered list to ensure numbers are styled\n *\n * */\nexport const OakOL = styled.ol<OakOLProps>`\n counter-reset: item;\n padding: 0;\n\n li {\n display: block;\n counter-increment: item;\n margin: 0;\n padding: 0 0 0 16px;\n text-indent: -16px;\n list-style-type: none;\n line-height: 32px;\n\n // Portable text generates linebreaks within list items\n\n br {\n content: \"\";\n display: block;\n margin-top: 8px;\n }\n }\n\n & li::before {\n padding-right: 4px;\n content: counter(item) \".\";\n }\n a {\n color: ${(props) =>\n props.theme &&\n props.theme.uiColors &&\n props.theme.uiColors[\"text-link-active\"]};\n }\n ${marginStyle}\n ${colorStyle}\n ${typographyStyle}\n`;\n","import { CSSProperties, css } from \"styled-components\";\n\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\nexport type ListStyleProps = {\n /**\n * Sets the `list-style` CSS property of the element.\n *\n * Accepts a `list-style` value or a responsive array of `list-style` values.\n */\n $listStyle?: ResponsiveValues<CSSProperties[\"listStyle\"]>;\n};\n\nexport const listStyle = css<ListStyleProps>`\n ${responsiveStyle(\"list-style\", (props) => props.$listStyle)}\n`;\n","import styled from \"styled-components\";\n\nimport { oakBoxCss } from \"../OakBox\";\nimport { OakFlexProps } from \"../OakFlex\";\n\nimport { DisplayStyleProps, displayStyle } from \"@/styles/utils/displayStyle\";\nimport { ListStyleProps, listStyle } from \"@/styles/utils/listStyle\";\nimport {\n TypographyStyleProps,\n typographyStyle,\n} from \"@/styles/utils/typographyStyle\";\n\nexport type OakLIProps = OakFlexProps &\n TypographyStyleProps &\n ListStyleProps &\n DisplayStyleProps;\n\n/**\n * Styled `li` (list item) component.\n *\n * ## Usage\n *\n * Places where we directly want to style a list item\n *\n **/\nexport const OakLI = styled.li<OakLIProps>`\n ${oakBoxCss}\n ${typographyStyle}\n ${listStyle}\n ${displayStyle}\n`;\n\nOakLI.defaultProps = {\n $display: \"revert\",\n};\n","import styled from \"styled-components\";\n\nimport {\n TypographyStyleProps,\n typographyStyle,\n} from \"@/styles/utils/typographyStyle\";\nimport { ColorStyleProps, colorStyle } from \"@/styles/utils/colorStyle\";\n\nexport type OakLabelProps = TypographyStyleProps & ColorStyleProps;\n\n/**\n * Label renders a `label` element, exposing all the typography props.\n * ## Usage\n * Use this component when you want to apply styles to a label, likely within\n * a form.\n */\nexport const OakLabel = styled.label<OakLabelProps>`\n ${typographyStyle}\n ${colorStyle}\n`;\n","export const icons = {\n \"question-mark\": \"v1706872277/icons/question-mark.svg\",\n home: \"v1699887218/icons/gvqxjxcw07ei2kkmwnes.svg\",\n send: \"v1699893673/icons/rmvytilpjgvh3pgwc8ph.svg\",\n rocket: \"v1699894015/icons/u26xm5hteot875ozfnk9.svg\",\n edit: \"v1699894149/icons/qxlunbg5tfrdherzsvlt.svg\",\n hamburger: \"v1699895123/icons/jaqdnomtbhqvjcap962u.svg\",\n cross: \"v1699895179/icons/xigimrbivcaxt4omxamp.svg\",\n bell: \"v1699895207/icons/ecejtvqerx81prxyxh9b.svg\",\n twitter: \"v1699895251/icons/bq6a50xtkvnzhltfggzz.svg\",\n worksheet: \"v1699895300/icons/ez1s6mtpe5jkunnxzvlw.svg\",\n facebook: \"v1699895330/icons/iojlvh3o5lshy2jupyph.svg\",\n share: \"v1699895363/icons/agcmduftef3wcla6gzec.svg\",\n \"arrow-right\": \"v1707149070/icons/fv0z57zerrioft52dd9n.svg\",\n \"worksheet-3\": \"v1699895429/icons/bzhojpjxp9rukdvh7daz.svg\",\n \"chevron-right\": \"v1707752509/icons/vk9xxxhnsltsickom6q9.svg\",\n save: \"v1699895505/icons/rh1ahwwtbemvz0ihluew.svg\",\n \"quiz-3\": \"v1699895534/icons/zoayhgtrotv32fad7d3k.svg\",\n \"chevron-down\": \"v1699953557/icons/botfld6brychmttwtv6u.svg\",\n linkedin: \"v1699953592/icons/leqneklorqqzb1zo6rf1.svg\",\n \"magic-carpet\": \"v1699953622/icons/jifivg9xxm7sb0fjdilm.svg\",\n books: \"v1699953657/icons/hz4l3iq6i68kazvkvorq.svg\",\n \"supervision-level\": \"v1699953696/icons/cwqhknapp3maa4g0t3lj.svg\",\n \"quiz-white\": \"v1699953730/icons/gpcehpgr9mqoumsa25xe.svg\",\n \"arrow-left\": \"v1707149179/icons/ejrm9dpgpzb7ddbo8z2i.svg\",\n \"additional-material\": \"v1699953798/icons/ntoq4tqvcm2uj1pajubt.svg\",\n \"slide-deck-3\": \"v1699953830/icons/sm92moja9d5utu3cj16c.svg\",\n \"sign-language\": \"v1699953861/icons/ns94ozvozzi22enxkx0x.svg\",\n external: \"v1699953892/icons/hlxmejse3mcr4tqo6t8u.svg\",\n \"equipment-required\": \"v1699953925/icons/pw22bdhj2vrzfv2ogi4e.svg\",\n \"chevron-left\": \"v1707752509/icons/rbvzan0ozubmr4j0uqdn.svg\",\n download: \"v1699953991/icons/dk0f6a6hdpzxftjosngn.svg\",\n search: \"v1704901279/icons/canbi3fuz5fanzom2hvi.svg\",\n \"chevron-up\": \"v1699954058/icons/pay71thmhhylj7z28sj1.svg\",\n go: \"v1699954090/icons/vdzptyvmitylra8x4usy.svg\",\n copyright: \"v1699954118/icons/boiod3rflocgsnfokyo8.svg\",\n \"arrow-down\": \"v1699954152/icons/wpfmbmwpyfinipg0d61y.svg\",\n project: \"v1699954186/icons/zofq5pheud6spnwjpewk.svg\",\n \"slide-deck\": \"v1699954241/icons/sjjy5f3g4eciwcuxxr33.svg\",\n \"content-guidance\": \"v1699954277/icons/tm3uhcqenaznq4fxys7j.svg\",\n tick: \"v1699954310/icons/efd3esaor6zqk7seh6kt.svg\",\n instagram: \"v1699954343/icons/ayfeljric0kkimdymvva.svg\",\n dot: \"v1699954371/icons/knykdclphkm8lgff4u2g.svg\",\n \"dot-png\": \"v1699954394/icons/qecbh291nzwmhcvqayqd.png\",\n warning: \"v1704901279/icons/zzszodmk7fvxm9xzzg9s.svg\",\n \"lightbulb-yellow\": \"v1705078631/icons/q2v4sqxouy1ngcajoavv.svg\",\n lightbulb: \"v1705078631/icons/zldisxmbff36z68rwcef.svg\",\n quiz: \"v1705416077/icons/kaaizjcudy0jfgfrrdel.svg\",\n video: \"v1705416078/icons/wzey1zfxrvv3apeebbf5.svg\",\n intro: \"v1705662092/icons/pl7bnmb13txese9yxkjv.svg\",\n \"move-arrows\": \"v1709052869/icons/hoddjsgpzkszgvnmn91q.svg\",\n \"subject-art\": \"subject-icons/art.svg\",\n \"subject-biology\": \"subject-icons/biology.svg\",\n \"subject-chemistry\": \"subject-icons/chemistry.svg\",\n \"subject-citizenship\": \"subject-icons/citizenship.svg\",\n \"subject-combined-science\": \"subject-icons/science.svg\",\n \"subject-communication-and-language\":\n \"subject-icons/communication-and-language.svg\",\n \"subject-computing\": \"subject-icons/computing.svg\",\n \"subject-computing-non-gcse\": \"subject-icons/computing.svg\",\n \"subject-creative-arts\": \"subject-icons/creative-arts.svg\",\n \"subject-design-technology\": \"subject-icons/design-technology.svg\",\n \"subject-drama\": \"subject-icons/drama.svg\",\n \"subject-english\": \"subject-icons/english.svg\",\n \"subject-english-grammar\": \"subject-icons/english-grammar.svg\",\n \"subject-english-reading-for-pleasure\": \"subject-icons/literature.svg\",\n \"subject-english-spelling\": \"subject-icons/english-spelling.svg\",\n \"subject-french\": \"subject-icons/french.svg\",\n \"subject-geography\": \"subject-icons/geography.svg\",\n \"subject-german\": \"subject-icons/german.svg\",\n \"subject-history\": \"subject-icons/history.svg\",\n \"subject-independent-living\": \"subject-icons/independent-living.svg\",\n \"subject-latin\": \"subject-icons/latin.svg\",\n \"subject-maths\": \"subject-icons/maths.svg\",\n \"subject-music\": \"subject-icons/music-hollow.svg\",\n \"subject-numeracy\": \"subject-icons/numeracy.svg\",\n \"occupational-therapy\": \"subject-icons/therapy.svg\",\n \"subject-physical-development\": \"subject-icons/physical-development.svg\",\n \"subject-physical-education\": \"subject-icons/physical-education.svg\",\n \"subject-physical-therapy\": \"subject-icons/physical-therapy.svg\",\n \"subject-physics\": \"subject-icons/physics.svg\",\n \"subject-religious-education\": \"subject-icons/religious-education.svg\",\n \"subject-rshe-pshe\": \"subject-icons/rshe-pshe.svg\",\n \"subject-science\": \"subject-icons/science.svg\",\n \"subject-sensory-integration\": \"subject-icons/sensory-integration.svg\",\n \"subject-spanish\": \"subject-icons/spanish.svg\",\n \"subject-speech-and-language-therapy\":\n \"subject-icons/speech-and-language.svg\",\n \"subject-therapy\": \"subject-icons/therapy.svg\",\n \"subject-understanding-the-world\":\n \"subject-icons/understanding-the-world.svg\",\n} as const;\n\nexport type IconName = keyof typeof icons;\n","import React from \"react\";\n\nimport { IconName, icons } from \"../../../image-map\";\n\nimport { OakImage, OakImageProps } from \"@/components/atoms/OakImage\";\n\nexport const oakIconNames = Object.keys(icons) as IconName[];\n\nexport type OakIconName = IconName;\n\nexport type OakIconProps = Omit<OakImageProps, \"alt\" | \"src\"> & {\n /**\n * The name of the icon to display\n *\n * Accepts an icon name token\n */\n iconName: OakIconName;\n alt?: string;\n};\n\n/**\n * returns true if the given string is a valid `OakIconName`\n */\nexport function isValidIconName(iconName: string): iconName is OakIconName {\n return oakIconNames.includes(iconName as OakIconName);\n}\n\n/**\n * A wrapper around OakImage which uses the image-map.json file to map icon names to image paths.\n */\nexport const OakIcon = (props: OakIconProps) => {\n const {\n iconName,\n alt,\n $width = \"all-spacing-7\",\n $height = \"all-spacing-7\",\n $minHeight = $height,\n $minWidth = $width,\n imageProps,\n ...rest\n } = props;\n\n return (\n <OakImage\n src={`https://${process.env.NEXT_PUBLIC_OAK_ASSETS_HOST}/${process.env.NEXT_PUBLIC_OAK_ASSETS_PATH}/${icons[iconName]}`}\n alt={alt ?? iconName}\n $width={$width}\n $height={$height}\n $minHeight={$minHeight}\n $minWidth={$minWidth}\n placeholder=\"empty\"\n // Icons should not be optimised since the SVG is already as small as it can be and should be served directly\n unoptimized\n {...rest}\n />\n );\n};\n","import styled, { css, CSSProperties } from \"styled-components\";\n\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport { OakBox, OakBoxProps } from \"@/components/atoms/OakBox\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { OakCombinedSpacingToken } from \"@/styles\";\n\nconst gridStyle = css<OakGridProps>`\n ${responsiveStyle(\"row-gap\", (props) => props.$rg, parseSpacing)}\n ${responsiveStyle(\"column-gap\", (props) => props.$cg, parseSpacing)}\n ${responsiveStyle(\"grid-auto-rows\", (props) => props.$gridAutoRows)}\n ${responsiveStyle(\"grid-template-areas\", (props) => props.$gridTemplateAreas)}\n ${responsiveStyle(\n \"grid-template-columns\",\n (props) => props.$gridTemplateColumns,\n )}\n ${responsiveStyle(\"grid-template-rows\", (props) => props.$gridTemplateRows)}\n`;\n\nexport type OakGridProps = OakBoxProps & {\n /**\n * Applies `row-gap` to the grid\n *\n * Accepts a spacing token or a responsive array of spacing tokens.\n */\n $rg?: ResponsiveValues<OakCombinedSpacingToken>;\n /**\n * Applies `column-gap` to the grid\n *\n * Accepts a spacing token or a responsive array of spacing tokens.\n */\n $cg?: ResponsiveValues<OakCombinedSpacingToken>;\n /**\n * Applies `grid-auto-rows` to the grid\n *\n * Accepts a `grid-auto-rows` value or a responsive array of `grid-auto-rows` values.\n */\n $gridAutoRows?: ResponsiveValues<CSSProperties[\"gridAutoRows\"]>;\n /**\n * Applies `grid-template-areas` to the grid\n *\n * Accepts a `grid-template-areas` value or a responsive array of `grid-template-areas` values.\n */\n $gridTemplateAreas?: ResponsiveValues<CSSProperties[\"gridTemplateAreas\"]>;\n /**\n * Applies `grid-template-columns` to the grid\n *\n * Accepts a `grid-template-columns` value or a responsive array of `grid-template-columns` values.\n */\n $gridTemplateColumns?: ResponsiveValues<CSSProperties[\"gridTemplateColumns\"]>;\n /**\n * Applies `grid-template-rows` to the grid\n *\n * Accepts a `grid-template-rows` value or a responsive array of `grid-template-rows` values.\n */\n $gridTemplateRows?: ResponsiveValues<CSSProperties[\"gridTemplateRows\"]>;\n};\n\n/**\n * Creates a grid layout\n *\n * Defaults to a 12 column grid\n */\nexport const OakGrid = styled(OakBox)<OakGridProps>`\n display: grid;\n grid-template-columns: repeat(12, 1fr);\n width: 100%;\n ${gridStyle}\n`;\n","import styled, { css, CSSProperties } from \"styled-components\";\n\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport { SpacingStyleProps } from \"@/styles/utils/spacingStyle\";\nimport { OakFlex, OakFlexProps } from \"@/components/atoms/OakFlex\";\n\ntype ColRowSpan = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n\nexport type OakGridAreaProps = {\n /**\n * Determines the number of columns the element should span.\n *\n * Accepts a value from 0-12 or a responsive value of 0-12.\n */\n $colSpan: ResponsiveValues<ColRowSpan>;\n /**\n * Determines the number of rows the element should span.\n *\n * Accepts a value from 0-12 or a responsive value of 0-12.\n */\n $rowSpan?: ResponsiveValues<ColRowSpan>;\n /**\n * Sets the order of the element.\n *\n * Accepts a number or a responsive array of numbers.\n */\n $order?: ResponsiveValues<CSSProperties[\"order\"]>;\n /**\n * The start column of the element.\n *\n * Accepts a value from 0-12 or a responsive value of 0-12.\n */\n $colStart?: ResponsiveValues<ColRowSpan>;\n /**\n * The end column of the element.\n *\n * Accepts a value from 0-12 or a responsive value of 0-12.\n */\n $colEnd?: ResponsiveValues<ColRowSpan>;\n /**\n * The start row of the element.\n *\n * Accepts a value from 0-12 or a responsive value of 0-12.\n */\n $rowStart?: ResponsiveValues<ColRowSpan>;\n} & SpacingStyleProps;\n\nconst combineSpanStart = (\n start?: ColRowSpan | null,\n span?: ColRowSpan | null,\n) => {\n return start ? `${start}/${span}` : `${span}`;\n};\n\nconst parseSpanStart = (value?: string | null) => {\n if (value?.includes(\"/\")) {\n const [start, span] = value.split(\"/\");\n return `${start} / span ${span}`;\n }\n const span = value;\n return `span ${span}`;\n};\n\nconst gridArea = css<OakGridAreaProps>`\n flex-direction: column;\n ${responsiveStyle(\n \"grid-column\",\n (props) => {\n return Array.isArray(props.$colSpan)\n ? props.$colSpan.map((span, index) =>\n combineSpanStart(\n Array.isArray(props.$colStart)\n ? props.$colStart[index]\n : props.$colStart,\n span,\n ),\n )\n : combineSpanStart(\n Array.isArray(props.$colStart)\n ? props.$colStart[0]\n : props.$colStart,\n props.$colSpan,\n );\n },\n (value) => parseSpanStart(value),\n )};\n ${responsiveStyle(\n \"grid-row\",\n (props) => {\n return Array.isArray(props.$rowSpan)\n ? props.$rowSpan.map((span, index) =>\n combineSpanStart(\n Array.isArray(props.$rowStart)\n ? props.$rowStart[index]\n : props.$rowStart,\n span,\n ),\n )\n : combineSpanStart(\n Array.isArray(props.$rowStart)\n ? props.$rowStart[0]\n : props.$rowStart,\n props.$rowSpan,\n );\n },\n (value) => parseSpanStart(value),\n )};\n ${responsiveStyle(\n \"order\",\n (props) => props.$order,\n (value) => value && `${value}`,\n )};\n ${responsiveStyle(\"grid-row\", (props) =>\n props.$rowSpan ? `span ${props.$rowSpan}` : \"span 1\",\n )};\n ${responsiveStyle(\"grid-column-start\", (props) => props.$colStart)}\n ${responsiveStyle(\"grid-column-end\", (props) => props.$colEnd)}\n ${responsiveStyle(\"grid-row-start\", (props) => props.$rowStart)}\n`;\n\n/**\n *\n * OakGridArea is a flex container that should be used inside OakGrid.\n *\n * - There is no nesting of OakGridAreas\n * - Column and row arrangements are achieved through $colSpan, $rowSpan, $colStart, $colEnd, $rowStart, $rowEnd\n *\n */\n\nexport const OakGridArea = styled(OakFlex)<OakGridAreaProps & OakFlexProps>`\n ${gridArea}\n`;\n","import styled from \"styled-components\";\n\nimport { OakFlex, OakFlexProps } from \"../OakFlex\";\n\nexport type OakMaxWidthProps = OakFlexProps;\n\n/**\n * This component will provide a default maxWidth and ph value, it take Flex props.\n * ## Usage\n * Use this component on pages to limit the max-width to a specific container.\n * This will make it easier to create full browser width or custom width containers on the same page\n * with different background colors / image url.\n */\nexport const OakMaxWidth = styled(OakFlex)``;\n\nOakMaxWidth.defaultProps = {\n $maxWidth: [\"all-spacing-21\", \"all-spacing-24\"],\n $ph: [\"inner-padding-none\", \"inner-padding-s\"],\n $flexDirection: \"column\",\n $flexGrow: 1,\n $width: \"100%\",\n $mh: \"auto\",\n};\n","import { getCldImageUrl, type CldImageProps } from \"next-cloudinary\";\n\nexport function getCloudinaryIdFromUrl(\n src: string | URL,\n config?: CldImageProps[\"config\"],\n) {\n // When a private CDN is used, CldImage will only accept the image ID as the src\n // this appears to be a limitation of the library which appears to have been designed\n // with basic public CDN usage in mind.\n return src.toString().replace(getCloudinaryRootUrl(config), \"\");\n}\n\n// Attempts to build the stem of a cloudinary URL, this is used to extract the image id\nfunction getCloudinaryRootUrl(config?: CldImageProps[\"config\"]) {\n // `getCldImageUrl` handles all the logic to construct a cloudinary URL from the given config\n // (supporting private CDNs, custom CNAMES etc. so we don't have to)\n const canaryUrl = new URL(getCldImageUrl({ src: \"canary.jpg\" }, config));\n return canaryUrl.origin + \"/image/upload/\";\n}\n","import React, { createContext, useContext } from \"react\";\nimport { CldImage, CldImageProps } from \"next-cloudinary\";\n\nimport { OakImage, OakImageProps } from \"../OakImage\";\n\nimport { getCloudinaryIdFromUrl } from \"./cloudinary\";\n\nexport type OakCloudinaryImageProps = Omit<\n OakImageProps<typeof CldImage>,\n \"src\" | \"imageProps\"\n> & {\n /**\n * The cloudinary image id or the full cloudinary URL\n *\n * Usually in the format `v1234567890/image.jpg`\n */\n cloudinaryId: string;\n};\n\nconst cloudinaryConfigContext = createContext<\n CldImageProps[\"config\"] | undefined\n>(undefined);\n\n/**\n * Provides a Cloudinary config to all descendent `OakCloudinaryImage` elements.\n *\n * See https://cloudinary.com/documentation/cloudinary_sdks#configuration_parameters\n * for documentation of the config object.\n */\nexport const OakCloudinaryConfigProvider = cloudinaryConfigContext.Provider;\n\n/**\n * OakCloudinaryImage wraps OakImage providing responsive images from Cloudinary\n * based on the `sizes` prop.\n *\n * Cloudinary cloud name can be set globally with `NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME` or a config\n * can be passed with `OakCloudinaryConfigProvider`.\n */\nexport const OakCloudinaryImage = ({\n cloudinaryId,\n unoptimized = false || cloudinaryId.endsWith(\".svg\"),\n ...props\n}: OakCloudinaryImageProps) => {\n const config = useContext(cloudinaryConfigContext);\n const src = getCloudinaryIdFromUrl(cloudinaryId, config);\n\n return (\n <OakImage\n as={CldImage}\n src={src}\n imageProps={{\n config,\n flags: unoptimized ? undefined : [\"keep_attribution\"],\n }}\n unoptimized={unoptimized}\n {...props}\n />\n );\n};\n","import React, { ReactNode } from \"react\";\n\nimport { OakSpan } from \"@/components/atoms/OakSpan\";\n\nexport type OakKbdProps = {\n children: ReactNode;\n};\n\n/**\n * Represents textual user input from a keyboard, voice input, or any other text entry device.\n * */\nexport const OakKbd = ({ children }: OakKbdProps) => {\n return (\n <OakSpan\n $font=\"body-3-bold\"\n as=\"kbd\"\n $borderColor=\"border-decorative3-stronger\"\n $background=\"bg-primary\"\n $borderRadius=\"border-radius-m\"\n $ba=\"border-solid-m\"\n $ph=\"inner-padding-xs\"\n $pv=\"inner-padding-ssx\"\n $whiteSpace=\"nowrap\"\n >\n {children}\n </OakSpan>\n );\n};\n","/**\n * From https://piccalil.li/blog/a-modern-css-reset/\n * Do not edit this file. If you want to add global styles, use oak.styles.ts\n */\n\nimport { css } from \"styled-components\";\n\nexport const resetGlobalCss = css`\n /* Box sizing rules */\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n\n /* Remove default margin */\n body,\n h1,\n h2,\n h3,\n h4,\n h5,\n p,\n figure,\n blockquote,\n dl,\n dd {\n margin: 0;\n }\n\n /* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */\n ul[role=\"list\"],\n ol[role=\"list\"] {\n list-style: none;\n padding-left: 0;\n margin-top: 0;\n margin-bottom: 0;\n }\n\n /* Set core root defaults */\n html,\n html:focus-within {\n scroll-behavior: smooth;\n }\n\n /* Set core body defaults */\n body {\n min-height: 100vh;\n text-rendering: optimizespeed;\n line-height: 1.5;\n }\n\n /* A elements that don't have a class get default styles */\n a:not([class]) {\n text-decoration-skip-ink: auto;\n }\n\n /* Make images easier to work with */\n img,\n picture {\n max-width: 100%;\n display: block;\n }\n\n /* Inherit fonts for inputs and buttons */\n input,\n button,\n textarea,\n select {\n font: inherit;\n }\n\n cite {\n font-style: inherit;\n }\n\n /* Remove all animations, transitions and smooth scroll for people that prefer not to see them */\n @media (prefers-reduced-motion: reduce) {\n html:focus-within {\n scroll-behavior: auto;\n }\n\n *,\n *::before,\n *::after {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n scroll-behavior: auto !important;\n }\n }\n`;\n\nexport default resetGlobalCss;\n","/**\n * This is our global stylesheet. It's for resets in addition to reset.styles.ts\n * which is taken from a publically available reset. We want to minimise global\n * styles where possible so if you add any styles here please comment with what\n * they are doing and why they belong here (rather than in component specific\n * styles)\n */\n\nimport { css } from \"styled-components\";\n\nexport const oakGlobalCss = css`\n html,\n body {\n padding: 0;\n margin: 0;\n font-family: Lexend, sans-serif;\n font-weight: 300;\n line-height: 1.4;\n }\n\n /* stylelint-disable */\n body,\n #__next {\n /* stylelint-enable */\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n }\n\n a {\n color: inherit;\n text-decoration: none;\n font-family: inherit;\n\n /*\n * Remove grey background on tap on ios\n */\n -webkit-tap-highlight-color: transparent;\n }\n\n button {\n /*\n * some browsers have a small margin by default\n * @see https://github.com/oaknational/Oak-Web-Application/issues/709\n */\n margin: 0;\n\n /*\n * Remove grey background on tap on ios\n */\n -webkit-tap-highlight-color: transparent;\n }\n\n /*\n * Inline styling for mathjax equations\n */\n mjx-container {\n display: inline-grid !important;\n margin: 0 !important;\n }\n`;\n","import { createGlobalStyle } from \"styled-components\";\n\nimport { resetGlobalCss } from \"@/styles/global/reset.styles\";\nimport { oakGlobalCss } from \"@/styles/global/oak.styles\";\n\n/**\n *\n * Currently this is just for storybook as it is already applied in OWA\n *\n */\n\nexport const OakGlobalStyle = createGlobalStyle`\n ${resetGlobalCss}\n ${oakGlobalCss}\n`;\n","import styled, { css } from \"styled-components\";\n\nconst screenReaderStyle = css`\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n`;\n\n/**\n * This component will visually hide its contents but will still be available\n * to screen readers, assitive technology, and scrapers.\n * ## Usage\n * Use this component in places where content shouldn't be visible, but should\n * be accessible to assistive technology.\n */\nexport const OakScreenReader = styled.span`\n ${screenReaderStyle}\n`;\n","import React from \"react\";\nimport styled, { css, keyframes } from \"styled-components\";\n\nimport { OakScreenReader } from \"@/components/atoms/OakScreenReader\";\nimport { SizeStyleProps } from \"@/styles/utils/sizeStyle\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { responsiveStyle } from \"@/styles/utils/responsiveStyle\";\nimport { ColorStyleProps, colorStyle } from \"@/styles/utils/colorStyle\";\nimport { OakCombinedColorToken } from \"@/styles\";\n\nconst SpinnerKeyframe = keyframes`\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n`;\n\nexport type OakLoadingSpinnerProps = Pick<SizeStyleProps, \"$width\"> &\n ColorStyleProps & { loaderColor?: OakCombinedColorToken };\n\nconst StyledLoadingSpinner = styled.span<OakLoadingSpinnerProps>`\n ${(props) =>\n props.$width\n ? responsiveStyle(\"--width\", (props) => props.$width, parseSpacing)\n : css`\n --width: 1.25rem;\n `}\n --inner-width: calc(var(--width) / 10 * 8);\n --thickness: calc(var(--width) / 12);\n\n display: inline-flex;\n width: var(--width);\n height: var(--width);\n\n ::after {\n content: \" \";\n display: block;\n width: var(--inner-width);\n height: var(--inner-width);\n margin: var(--thickness);\n border-radius: 50%;\n border: var(--thickness) solid currentcolor;\n ${(props) =>\n props.loaderColor\n ? css`\n border-color: ${props.loaderColor} ${props.loaderColor}\n ${props.loaderColor} transparent;\n `\n : css`\n border-color: currentcolor currentcolor currentcolor transparent;\n `}\n animation: ${SpinnerKeyframe} 1.2s linear infinite;\n }\n ${colorStyle}\n`;\n\n/**\n *\n * A loading spinner of variable size.\n *\n */\nexport const OakLoadingSpinner = (props: OakLoadingSpinnerProps) => (\n <StyledLoadingSpinner {...props}>\n <OakScreenReader>Loading</OakScreenReader>\n </StyledLoadingSpinner>\n);\n","import React, { ElementType, useRef } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { colorStyle, ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport { displayStyle, DisplayStyleProps } from \"@/styles/utils/displayStyle\";\nimport { spacingStyle, SpacingStyleProps } from \"@/styles/utils/spacingStyle\";\nimport {\n typographyStyle,\n TypographyStyleProps,\n} from \"@/styles/utils/typographyStyle\";\nimport {\n dropShadowStyle,\n DropShadowStyleProps,\n} from \"@/styles/utils/dropShadowStyle\";\nimport { borderStyle, BorderStyleProps } from \"@/styles/utils/borderStyle\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\n\ntype StyledButtonProps = TypographyStyleProps &\n SpacingStyleProps &\n ColorStyleProps &\n DisplayStyleProps &\n BorderStyleProps &\n DropShadowStyleProps & {\n isLoading?: boolean;\n };\n\nconst internalButtonCss = css<StyledButtonProps>`\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n cursor: pointer;\n text-align: left;\n font-family: unset;\n outline: none;\n ${typographyStyle}\n ${colorStyle}\n ${spacingStyle}\n ${displayStyle}\n ${borderStyle}\n ${dropShadowStyle}\n &:disabled {\n pointer-events: none;\n cursor: default;\n }\n`;\n\nexport type InternalButtonProps = StyledButtonProps & {\n onHovered?: (\n event: React.MouseEvent<HTMLButtonElement, MouseEvent>,\n duration: number,\n ) => void;\n};\n\nconst UnstyledInternalButton = <C extends ElementType = \"button\">(\n props: InternalButtonProps & PolymorphicPropsWithoutRef<C>,\n) => {\n const { onClick, onHovered, element: Component = \"button\", ...rest } = props;\n\n const hoverStart = useRef(Date.now());\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n if (onClick) {\n onClick(event);\n }\n };\n\n const handleMouseEnter = () => {\n hoverStart.current = Date.now();\n };\n\n const handleMouseLeave = (event: React.MouseEvent<HTMLButtonElement>) => {\n const delta = Date.now() - hoverStart.current;\n if (onHovered) {\n onHovered(event, delta);\n }\n };\n\n return (\n <Component\n {...rest}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n />\n );\n};\n\n/**\n *\n * An unstyled button to be used as a basis for all UI button components.\n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n * \n * NB. We must export a styled component for it to be inheritable\n */\nexport const InternalButton = styled(UnstyledInternalButton)`\n ${internalButtonCss}\n`;\n","import React, { ElementType } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { OakBox, OakBoxProps, OakFlex, OakSpan } from \"@/components/atoms\";\nimport {\n InternalButton,\n InternalButtonProps,\n} from \"@/components/atoms/InternalButton\";\nimport { OakIcon, OakIconName } from \"@/components/atoms/OakIcon\";\nimport { OakLoadingSpinner } from \"@/components/molecules/OakLoadingSpinner\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport {\n PositionStyleProps,\n positionStyle,\n} from \"@/styles/utils/positionStyle\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { OakCombinedColorToken, OakDropShadowToken } from \"@/styles\";\nimport { SizeStyleProps, sizeStyle } from \"@/styles/utils/sizeStyle\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\n\nexport type InternalShadowRectButtonProps = Omit<\n InternalButtonProps,\n | \"$pa\"\n | \"$ph\"\n | \"$pv\"\n | \"$ba\"\n | \"$borderRadius\"\n | \"$borderColor\"\n | \"$background\"\n | \"$color\"\n> & {\n iconName?: OakIconName;\n isTrailingIcon?: boolean;\n defaultTextColor: OakCombinedColorToken;\n defaultBackground: OakCombinedColorToken;\n defaultBorderColor: OakCombinedColorToken;\n hoverTextColor: OakCombinedColorToken;\n hoverBackground: OakCombinedColorToken;\n hoverBorderColor: OakCombinedColorToken;\n disabledBackground: OakCombinedColorToken;\n disabledBorderColor: OakCombinedColorToken;\n disabledTextColor: OakCombinedColorToken;\n width?: SizeStyleProps[\"$width\"];\n maxWidth?: SizeStyleProps[\"$maxWidth\"];\n hoverShadow?: OakDropShadowToken | null;\n} & PositionStyleProps;\n\nconst StyledInternalButton = styled(InternalButton)<\n SizeStyleProps & {\n $defaultTextColor: OakCombinedColorToken;\n $defaultBackground: OakCombinedColorToken;\n $defaultBorderColor: OakCombinedColorToken;\n $hoverTextColor: OakCombinedColorToken;\n $hoverBackground: OakCombinedColorToken;\n $hoverBorderColor: OakCombinedColorToken;\n $disabledBackground: OakCombinedColorToken;\n $disabledBorderColor: OakCombinedColorToken;\n $disabledTextColor: OakCombinedColorToken;\n }\n>`\n ${positionStyle}\n ${sizeStyle}\n display: inline-block;\n ${(props) => css`\n &:hover {\n text-decoration: underline;\n color: ${parseColor(props.$hoverTextColor)};\n background: ${parseColor(props.$hoverBackground)};\n border-color: ${parseColor(props.$hoverBorderColor)};\n }\n &:active {\n background: ${parseColor(props.$defaultBackground)};\n border-color: ${parseColor(props.$defaultBorderColor)};\n color: ${parseColor(props.$defaultTextColor)};\n }\n &:disabled {\n background: ${parseColor(props.$disabledBackground)};\n border-color: ${parseColor(props.$disabledBorderColor)};\n color: ${parseColor(props.$disabledTextColor)};\n }\n `}\n`;\n\nconst StyledButtonWrapper = styled(OakBox)<\n OakBoxProps & {\n $hoverShadow?: OakDropShadowToken | null;\n }\n>`\n .grey-shadow:has(+ * + .internal-button:focus-visible) {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n .yellow-shadow:has(+ .internal-button:focus-visible) {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")};\n }\n .yellow-shadow:has(+ .internal-button:hover),\n .yellow-shadow:has(+ .internal-button:hover:not(:focus-visible, :active)) {\n box-shadow: ${(props) => parseDropShadow(props.$hoverShadow)};\n }\n .grey-shadow:has(+ * + .internal-button:hover) {\n box-shadow: none;\n }\n .grey-shadow:has(+ * + .internal-button:active) {\n box-shadow: ${parseDropShadow(\"drop-shadow-grey\")};\n }\n .yellow-shadow:has(+ .internal-button:active) {\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")};\n }\n`;\n\n/**\n *\n * A styled rectangular button, not intended to be used directly. \n * Instead used by OakPrimaryButton and OakSecondaryButton.\n * \n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n */\nexport const InternalShadowRectButton = <C extends ElementType = \"button\">(\n props: InternalShadowRectButtonProps & PolymorphicPropsWithoutRef<C>,\n) => {\n const {\n element = \"button\",\n children,\n iconName,\n isTrailingIcon,\n isLoading,\n disabled,\n width = \"max-content\",\n maxWidth,\n defaultBackground,\n defaultBorderColor,\n defaultTextColor,\n disabledTextColor,\n hoverTextColor,\n hoverBackground,\n hoverBorderColor,\n disabledBackground,\n disabledBorderColor,\n className,\n hoverShadow = \"drop-shadow-lemon\",\n ...rest\n } = props;\n\n const icon = (\n <>\n {iconName && (\n <OakIcon\n iconName={iconName}\n $width={\"all-spacing-6\"}\n $height={\"all-spacing-6\"}\n $colorFilter={props.disabled ? disabledTextColor : defaultTextColor}\n />\n )}\n </>\n );\n\n const loader = (\n <OakBox $width={\"all-spacing-6\"} $height={\"all-spacing-6\"}>\n <OakLoadingSpinner $width={\"all-spacing-6\"} />\n </OakBox>\n );\n\n const iconLogic = <>{isLoading && !disabled ? loader : icon}</>;\n\n return (\n <StyledButtonWrapper\n className={className}\n $position={\"relative\"}\n $width={width}\n $maxWidth={maxWidth}\n $hoverShadow={hoverShadow}\n >\n <OakBox\n className=\"grey-shadow\"\n $position={\"absolute\"}\n $borderRadius={\"border-radius-s\"}\n $width={\"100%\"}\n $height={\"100%\"}\n $top=\"all-spacing-0\"\n />\n\n <OakBox\n className=\"yellow-shadow\"\n $position={\"absolute\"}\n $borderRadius={\"border-radius-s\"}\n $width={\"100%\"}\n $height={\"100%\"}\n $top=\"all-spacing-0\"\n />\n\n <StyledInternalButton\n element={element}\n className=\"internal-button\"\n $ba={\"border-solid-m\"}\n $background={defaultBackground}\n $borderColor={defaultBorderColor}\n $color={defaultTextColor}\n $pv={\"inner-padding-s\"}\n $ph={\"inner-padding-m\"}\n $borderRadius={\"border-radius-s\"}\n $position={\"relative\"}\n disabled={disabled || isLoading}\n $width={\"100%\"}\n $height={\"100%\"}\n $hoverTextColor={hoverTextColor}\n $hoverBackground={hoverBackground}\n $hoverBorderColor={hoverBorderColor}\n $defaultTextColor={defaultTextColor}\n $defaultBackground={defaultBackground}\n $defaultBorderColor={defaultBorderColor}\n $disabledTextColor={disabledTextColor}\n $disabledBackground={disabledBackground}\n $disabledBorderColor={disabledBorderColor}\n {...rest}\n >\n <OakFlex\n $flexDirection={\"row\"}\n $alignItems={\"center\"}\n $gap=\"space-between-ssx\"\n $justifyContent=\"center\"\n >\n {!isTrailingIcon && iconLogic}\n <OakSpan $font={\"heading-7\"}>{children}</OakSpan>\n {isTrailingIcon && iconLogic}\n </OakFlex>\n </StyledInternalButton>\n </StyledButtonWrapper>\n );\n};\n","import React, { ElementType } from \"react\";\n\nimport {\n InternalShadowRectButton,\n InternalShadowRectButtonProps,\n} from \"@/components/molecules/InternalShadowRectButton\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\n\nexport type OakPrimaryButtonProps = Omit<\n InternalShadowRectButtonProps,\n | \"defaultBorderColor\"\n | \"defaultBackground\"\n | \"defaultTextColor\"\n | \"hoverBackground\"\n | \"hoverBorderColor\"\n | \"hoverTextColor\"\n | \"disabledBackground\"\n | \"disabledBorderColor\"\n | \"disabledTextColor\"\n>;\n\n/**\n *\n * A specific implementation of InternalRectButton\n *\n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n *\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n */\nexport const OakPrimaryButton = <C extends ElementType = \"button\">({\n element,\n ...rest\n}: OakPrimaryButtonProps & PolymorphicPropsWithoutRef<C>) => {\n return (\n <InternalShadowRectButton\n element={element ?? \"button\"}\n defaultBorderColor=\"bg-btn-primary\"\n defaultBackground=\"bg-btn-primary\"\n defaultTextColor=\"text-inverted\"\n hoverBackground=\"bg-btn-primary-hover\"\n hoverBorderColor=\"bg-btn-primary-hover\"\n hoverTextColor=\"text-inverted\"\n disabledBackground=\"bg-btn-primary-disabled\"\n disabledBorderColor=\"text-disabled\"\n disabledTextColor=\"text-inverted\"\n {...rest}\n />\n );\n};\n","import React, { ElementType } from \"react\";\n\nimport {\n InternalShadowRectButton,\n InternalShadowRectButtonProps,\n} from \"@/components/molecules/InternalShadowRectButton\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\n\nexport type OakPrimaryInvertedButtonProps = Omit<\n InternalShadowRectButtonProps,\n | \"defaultBorderColor\"\n | \"defaultBackground\"\n | \"defaultTextColor\"\n | \"hoverBackground\"\n | \"hoverBorderColor\"\n | \"hoverTextColor\"\n | \"disabledBackground\"\n | \"disabledBorderColor\"\n | \"disabledTextColor\"\n>;\n\n/**\n *\n * A specific implementation of InternalRectButton\n *\n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n *\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n */\nexport const OakPrimaryInvertedButton = <C extends ElementType = \"button\">({\n element,\n ...rest\n}: OakPrimaryInvertedButtonProps & PolymorphicPropsWithoutRef<C>) => {\n return (\n <InternalShadowRectButton\n element={element ?? \"button\"}\n defaultBorderColor=\"bg-btn-secondary\"\n defaultBackground=\"bg-btn-secondary\"\n defaultTextColor=\"text-primary\"\n hoverBackground=\"bg-btn-secondary\"\n hoverBorderColor=\"bg-btn-secondary\"\n hoverTextColor=\"text-primary\"\n disabledBackground=\"bg-btn-secondary\"\n disabledBorderColor=\"bg-btn-secondary\"\n disabledTextColor=\"text-disabled\"\n hoverShadow={null}\n {...rest}\n />\n );\n};\n","import React, { ElementType } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { OakRoundIconProps } from \"../OakRoundIcon\";\n\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\nimport { OakBox, OakFlex, OakSpan } from \"@/components/atoms\";\nimport {\n InternalButton,\n InternalButtonProps,\n} from \"@/components/atoms/InternalButton\";\nimport { OakIcon, OakIconName } from \"@/components/atoms/OakIcon\";\nimport { OakLoadingSpinner } from \"@/components/molecules/OakLoadingSpinner\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport {\n PositionStyleProps,\n positionStyle,\n} from \"@/styles/utils/positionStyle\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { OakCombinedColorToken } from \"@/styles\";\nimport { SizeStyleProps, sizeStyle } from \"@/styles/utils/sizeStyle\";\n\nexport type InternalShadowRoundButtonProps = Omit<\n InternalButtonProps,\n | \"$pa\"\n | \"$ph\"\n | \"$pv\"\n | \"$ba\"\n | \"$borderRadius\"\n | \"$borderColor\"\n | \"$background\"\n | \"$color\"\n> & {\n iconName?: OakIconName;\n isTrailingIcon?: boolean;\n defaultTextColor: OakCombinedColorToken;\n hoverTextColor: OakCombinedColorToken;\n disabledTextColor: OakCombinedColorToken;\n defaultIconBackground: OakCombinedColorToken;\n hoverIconBackground: OakCombinedColorToken;\n disabledIconBackground: OakCombinedColorToken;\n defaultIconColor?: OakRoundIconProps[\"$colorFilter\"];\n disabledIconColor?: OakRoundIconProps[\"$colorFilter\"];\n width?: SizeStyleProps[\"$width\"];\n maxWidth?: SizeStyleProps[\"$maxWidth\"];\n iconBackgroundSize: SizeStyleProps[\"$width\"];\n iconSize: SizeStyleProps[\"$width\"];\n} & PositionStyleProps;\n\nconst StyledInternalButton = styled(InternalButton)<\n Omit<InternalShadowRoundButtonProps, \"iconBackgroundSize\" | \"iconSize\"> &\n SizeStyleProps\n>`\n display: inline-block;\n ${positionStyle}\n ${sizeStyle}\n ${(props) => css`\n &:hover {\n text-decoration: underline;\n color: ${parseColor(props.$hoverTextColor)};\n }\n &:active {\n color: ${parseColor(props.$defaultTextColor)};\n }\n &:disabled {\n color: ${parseColor(props.$disabledTextColor)};\n }\n `}\n`;\n\nconst StyledButtonWrapper = styled(OakBox)<{\n $disabledIconBackground: OakCombinedColorToken;\n $hoverIconBackground: OakCombinedColorToken;\n $defaultIconBackground: OakCombinedColorToken;\n}>`\n > :first-child:focus-visible .shadow {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n > :first-child:hover .shadow {\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")};\n }\n > :first-child:active .shadow {\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")},\n ${parseDropShadow(\"drop-shadow-grey\")};\n }\n ${(props) => css`\n > :first-child:disabled .icon-container {\n background: ${parseColor(props.$disabledIconBackground)};\n }\n > :first-child:hover .icon-container {\n background: ${parseColor(props.$hoverIconBackground)};\n }\n > :first-child:active .icon-container {\n background: ${parseColor(props.$defaultIconBackground)};\n }\n `}\n`;\n\n/**\n *\n * A styled button with round icons, not intended to be used directly. \n * Instead used by OakTertiaryButton and OakHintButton.\n * \n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n */\nexport const InternalShadowRoundButton = <C extends ElementType = \"button\">(\n props: InternalShadowRoundButtonProps & PolymorphicPropsWithoutRef<C>,\n) => {\n const {\n element = \"button\",\n children,\n iconName,\n isTrailingIcon,\n isLoading,\n disabled,\n width = \"max-content\",\n maxWidth,\n iconBackgroundSize,\n iconSize,\n disabledIconBackground,\n disabledTextColor,\n defaultIconColor,\n hoverIconBackground,\n defaultIconBackground,\n disabledIconColor,\n defaultTextColor,\n hoverTextColor,\n className,\n ...rest\n } = props;\n\n const icon = (\n <>\n {iconName && (\n <OakIcon\n iconName={iconName}\n $width={iconSize}\n $height={iconSize}\n $colorFilter={\n props.disabled\n ? disabledIconColor\n : defaultIconColor\n ? defaultIconColor\n : null\n }\n />\n )}\n </>\n );\n const loader = (\n <OakBox $width={iconSize} $height={iconSize}>\n <OakLoadingSpinner $width={iconSize} loaderColor=\"white\" />\n </OakBox>\n );\n const iconLogic = (\n <OakFlex\n className={\"icon-container\"}\n $background={props.defaultIconBackground}\n $color={props.defaultTextColor}\n $borderRadius={\"border-radius-circle\"}\n $position={\"relative\"}\n $width={iconBackgroundSize}\n $height={iconBackgroundSize}\n $alignItems={\"center\"}\n $justifyContent={\"center\"}\n $minWidth={iconBackgroundSize}\n >\n <OakBox\n className=\"shadow\"\n $position={\"absolute\"}\n $borderRadius={\"border-radius-circle\"}\n $width={\"100%\"}\n $height={\"100%\"}\n $top=\"all-spacing-0\"\n />\n\n {isLoading && !disabled ? loader : icon}\n </OakFlex>\n );\n\n return (\n <StyledButtonWrapper\n className={className}\n $position={\"relative\"}\n $width={width}\n $maxWidth={maxWidth}\n $disabledIconBackground={disabledIconBackground}\n $hoverIconBackground={hoverIconBackground}\n $defaultIconBackground={defaultIconBackground}\n >\n <StyledInternalButton\n element={element ?? \"button\"}\n {...rest}\n $hoverTextColor={hoverTextColor}\n $defaultTextColor={defaultTextColor}\n $disabledTextColor={disabledTextColor}\n $color={defaultTextColor}\n $position={\"relative\"}\n disabled={disabled || isLoading}\n >\n <OakFlex\n $flexDirection={\"row\"}\n $alignItems={\"center\"}\n $gap={children ? \"space-between-xs\" : \"space-between-none\"}\n $justifyContent=\"center\"\n >\n {!isTrailingIcon && iconLogic}\n <OakSpan $font={\"heading-7\"}>{children}</OakSpan>\n {isTrailingIcon && iconLogic}\n </OakFlex>\n </StyledInternalButton>\n </StyledButtonWrapper>\n );\n};\n","import React, { ElementType } from \"react\";\n\nimport { OakRoundIconProps } from \"../OakRoundIcon\";\nimport { InternalShadowRoundButton } from \"../InternalShadowRoundButton\";\n\nimport { OakIconName } from \"@/components/atoms\";\nimport { InternalButtonProps } from \"@/components/atoms/InternalButton\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\n\ntype OakTertiaryButtonProps = InternalButtonProps & {\n iconBackground?: OakRoundIconProps[\"$background\"];\n iconColorFilter?: OakRoundIconProps[\"$colorFilter\"];\n isTrailingIcon?: boolean;\n iconName?: OakIconName;\n};\n\n/**\n * An implementation of InternalShadowRoundButton, its a subtle button with no border and a round icon.\n */\nexport const OakTertiaryButton = <C extends ElementType = \"button\">({\n element,\n isTrailingIcon,\n iconName,\n children,\n ...props\n}: OakTertiaryButtonProps & PolymorphicPropsWithoutRef<C>) => {\n return (\n <InternalShadowRoundButton\n element={element ?? \"button\"}\n {...props}\n isTrailingIcon={isTrailingIcon}\n iconName={iconName}\n defaultIconColor={\"white\"}\n disabledIconColor=\"white\"\n disabledIconBackground=\"bg-btn-primary-disabled\"\n defaultIconBackground=\"black\"\n hoverIconBackground=\"bg-btn-primary-hover\"\n defaultTextColor=\"text-primary\"\n hoverTextColor=\"bg-btn-primary-hover\"\n disabledTextColor=\"text-disabled\"\n iconBackgroundSize={\"all-spacing-7\"}\n iconSize={\"all-spacing-6\"}\n >\n {children}\n </InternalShadowRoundButton>\n );\n};\n","import React, { createContext, useState } from \"react\";\n\nimport { TypographyStyleProps } from \"@/styles/utils/typographyStyle\";\nimport { ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport { OakFlex, OakLabel } from \"@/components/atoms\";\nimport { FlexStyleProps } from \"@/styles/utils/flexStyle\";\n\ntype RadioContextType = {\n currentValue: string;\n name: string;\n disabled?: boolean;\n onValueUpdated?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n};\n\nexport const RadioContext = createContext<RadioContextType>({\n currentValue: \"default\",\n name: \"default\",\n});\n\nexport type OakRadioGroupProps = {\n label?: string;\n name: string;\n disabled?: boolean;\n children: React.ReactNode;\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n /**\n * Sets the value of the radio group\n * for use as a controlled component\n */\n value?: string;\n /**\n * Sets the initial value of the radio group\n * for use as an uncontrolled component\n */\n defaultValue?: string;\n} & Pick<TypographyStyleProps, \"$font\"> &\n ColorStyleProps &\n Pick<FlexStyleProps, \"$flexDirection\" | \"$alignItems\" | \"$gap\">;\n\n/**\n *\n * OakRadioGroup allow users to select a single item from a list of mutually exclusive options .\n * OakRadioGroup consists of a set of OakRadioButtons, and a label. Each radio includes a label and a visual selection indicator. A single radio button within the group can be selected at a time. Users may click or touch a radio button to select it, or use the Tab key to navigate to the group, the arrow keys to navigate within the group, and the Space key to select an option.\n * ## Usage\n *\n * use the callback onChange to get the value of the selected radio button.\n *\n */\nexport const OakRadioGroup = (props: OakRadioGroupProps) => {\n const {\n name,\n children,\n label,\n onChange,\n $font = \"body-1-bold\",\n $gap = \"space-between-s\",\n disabled,\n value,\n defaultValue = \"\",\n ...rest\n } = props;\n\n const [currentValue, setValue] = useState(defaultValue);\n\n const handleValueUpdated = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (value === undefined) {\n setValue(event.target.value);\n }\n if (onChange) {\n onChange(event);\n }\n };\n\n return (\n <OakFlex role=\"radiogroup\" $gap={$gap} {...rest}>\n {label && <OakLabel $font={$font}>{label}</OakLabel>}\n <RadioContext.Provider\n value={{\n currentValue: value ?? currentValue,\n name,\n disabled: disabled,\n onValueUpdated: handleValueUpdated,\n }}\n >\n {children}\n </RadioContext.Provider>\n </OakFlex>\n );\n};\n","import React, { ReactNode, forwardRef, useContext } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { RadioContext } from \"@/components/molecules/OakRadioGroup/OakRadioGroup\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { parseBorder } from \"@/styles/helpers/parseBorder\";\nimport { FlexStyleProps } from \"@/styles/utils/flexStyle\";\nimport { responsiveStyle } from \"@/styles/utils/responsiveStyle\";\nimport {\n OakBox,\n OakBoxProps,\n OakFlex,\n OakFlexProps,\n OakLabel,\n OakLabelProps,\n} from \"@/components/atoms\";\nimport {\n OakAllSpacingToken,\n OakBorderWidthToken,\n OakCombinedColorToken,\n} from \"@/styles\";\n\ntype RadioButtonLabelProps = {\n $labelAlignItems?: FlexStyleProps[\"$alignItems\"];\n $labelGap?: FlexStyleProps[\"$gap\"];\n disabled?: boolean;\n} & OakLabelProps;\n\nconst RadioButtonLabel = styled(OakLabel)<RadioButtonLabelProps>`\n ${(props) =>\n !props.disabled &&\n css`\n cursor: pointer;\n `}\n\n display: flex;\n ${responsiveStyle(\"gap\", (props) => props.$labelGap, parseSpacing)}\n ${responsiveStyle(\"align-items\", (props) => props.$labelAlignItems)}\n`;\n\nconst HiddenRadioButtonInput = styled.input.attrs({\n type: \"radio\",\n})`\n position: absolute;\n opacity: 0;\n ${(props) =>\n !props.disabled &&\n css`\n cursor: pointer;\n `}\n`;\n\ntype VisibleRadioButtonInputProps = OakFlexProps & {\n $disableFocusRing: boolean;\n $radioInnerSize: OakAllSpacingToken;\n disabled?: boolean;\n};\n\nconst VisibleRadioButtonInput = styled(OakFlex)<VisibleRadioButtonInputProps>`\n border-radius: 50%;\n\n ${(props) =>\n !props.$disableFocusRing &&\n css`\n ${HiddenRadioButtonInput}:focus-visible ~ &::before {\n content: \"\";\n height: ${parseSpacing(\"all-spacing-7\")};\n width: ${parseSpacing(\"all-spacing-7\")};\n background: \"transparent\"\n display: block;\n position: absolute;\n border-radius: 50%;\n border: ${parseBorder(\"border-solid-m\")} ${parseColor(\"grey60\")};\n box-shadow: ${`inset 0 0 0 0.13rem ${parseColor(\"lemon\")}`};\n }`}\n\n ${HiddenRadioButtonInput}:checked ~ &::after {\n content: \"\";\n height: ${(props) => parseSpacing(props.$radioInnerSize)};\n width: ${(props) => parseSpacing(props.$radioInnerSize)};\n background: ${parseColor(\"black\")};\n position: absolute;\n border-radius: 50%;\n border: ${parseBorder(\"border-solid-m\")} ${parseColor(\"white\")};\n }\n`;\n\n// This is a hack to force React to rerender when the disabled prop is changed. Otherwise the pseudo element is not updated.\nconst DisabledVisibleRadioButtonInput = styled(VisibleRadioButtonInput)`\n ${HiddenRadioButtonInput}:checked ~ &::after {\n content: \"\";\n height: ${(props) => parseSpacing(props.$radioInnerSize)};\n width: ${(props) => parseSpacing(props.$radioInnerSize)};\n background: ${parseColor(\"bg-btn-primary-disabled\")};\n position: absolute;\n border-radius: 50%;\n border: ${parseBorder(\"border-solid-m\")} ${parseColor(\"white\")};\n }\n`;\n\nexport type OakRadioButtonProps = {\n id: string;\n label: ReactNode;\n value: string;\n tabIndex?: number;\n \"data-testid\"?: string;\n disabled?: boolean;\n /**\n * Allows the focus ring to be disabled. This is useful when focus is indicated\n * by other means, such as a border or background color change.\n */\n disableFocusRing?: boolean;\n /**\n * Allows the size of the radio button to be customized.\n */\n radioOuterSize?: OakAllSpacingToken;\n /**\n * Allows the size of the inner \"checked\" circle of the radio button to be customized.\n */\n radioInnerSize?: OakAllSpacingToken;\n /**\n * Allows the width of the radio button border to be customized.\n */\n radioBorderWidth?: OakBorderWidthToken;\n /**\n * Allows the background color of the radio button to be customized.\n */\n radioBackground?: OakCombinedColorToken;\n /**\n * Allows the width of the radio button border to be customized when the radio button is checked.\n */\n checkedRadioBorderWidth?: OakBorderWidthToken;\n} & OakBoxProps &\n RadioButtonLabelProps;\n\n/**\n * A radio button component.\n *\n * Use within `OakRadioGroup` component.\n */\nexport const OakRadioButton = forwardRef<HTMLInputElement, OakRadioButtonProps>(\n (props, ref) => {\n const radioContext = useContext(RadioContext);\n const { currentValue, name, onValueUpdated } = radioContext;\n const {\n id,\n label,\n value,\n tabIndex,\n disabled,\n $labelGap = \"space-between-ssx\",\n $labelAlignItems = \"center\",\n $font = \"body-1\",\n \"data-testid\": dataTestId,\n disableFocusRing = false,\n radioInnerSize = \"all-spacing-4\",\n radioOuterSize = \"all-spacing-6\",\n radioBorderWidth = \"border-solid-m\",\n radioBackground = \"bg-primary\",\n checkedRadioBorderWidth = \"border-solid-m\",\n ...rest\n } = props;\n const checked = value === currentValue;\n const anyDisabled = disabled || radioContext.disabled;\n const finalRadioBorderWidth = checked\n ? checkedRadioBorderWidth\n : radioBorderWidth;\n\n return (\n <OakBox {...rest}>\n <RadioButtonLabel\n htmlFor={id}\n $labelAlignItems={$labelAlignItems}\n $labelGap={$labelGap}\n $font={$font}\n data-testid={dataTestId}\n disabled={anyDisabled}\n >\n <HiddenRadioButtonInput\n name={name}\n id={id}\n value={value}\n onChange={onValueUpdated}\n checked={value === currentValue}\n tabIndex={tabIndex}\n disabled={anyDisabled}\n ref={ref}\n />\n {!anyDisabled ? (\n <VisibleRadioButtonInput\n $height={radioOuterSize}\n $width={radioOuterSize}\n $ba={finalRadioBorderWidth}\n $borderColor={\"black\"}\n $flexGrow={0}\n $flexShrink={0}\n $alignItems={\"center\"}\n $justifyContent={\"center\"}\n $background={radioBackground}\n $disableFocusRing={!!disableFocusRing}\n $radioInnerSize={radioInnerSize}\n />\n ) : (\n <DisabledVisibleRadioButtonInput\n $height={radioOuterSize}\n $width={radioOuterSize}\n $ba={finalRadioBorderWidth}\n $borderColor={\"bg-btn-primary-disabled\"}\n $flexGrow={0}\n $flexShrink={0}\n $alignItems={\"center\"}\n $justifyContent={\"center\"}\n $background={radioBackground}\n $disableFocusRing={!!disableFocusRing}\n $radioInnerSize={radioInnerSize}\n />\n )}\n {label}\n </RadioButtonLabel>\n </OakBox>\n );\n },\n);\n\nexport type OakRadioButtonType = typeof OakRadioButton;\n","import React, { forwardRef, useRef } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { OakBorderRadiusToken, OakCombinedColorToken } from \"@/styles\";\nimport { parseBorderRadius } from \"@/styles/helpers/parseBorderRadius\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { BorderStyleProps, borderStyle } from \"@/styles/utils/borderStyle\";\nimport { ColorStyleProps, colorStyle } from \"@/styles/utils/colorStyle\";\nimport { SizeStyleProps, sizeStyle } from \"@/styles/utils/sizeStyle\";\nimport { SpacingStyleProps, spacingStyle } from \"@/styles/utils/spacingStyle\";\n\n/**\n *\n * These components can be used with InternalCheckBoxWrapper which allows for customisable icons\n *\n * Several flavours of checkbox are created here:\n * - Default\n * - Hover decorations\n * - Focus decorations\n * - Hover + Focus decorations\n *\n * As they are styled components they can be further customised in implementation. Alternatively additional\n * components can be created here.\n *\n */\n\nexport type BaseCheckBoxProps = {\n id: string;\n disabled?: boolean;\n value: string;\n defaultChecked?: boolean;\n onHovered?: (value: string, id: string, duration: number) => void;\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;\n onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;\n \"data-testid\"?: string;\n};\n\nconst BaseCheckBox = forwardRef(\n (props: BaseCheckBoxProps, ref?: React.Ref<HTMLInputElement>) => {\n const { onHovered, ...rest } = props;\n\n const hoverStart = useRef(Date.now());\n\n const handleMouseEnter = () => {\n hoverStart.current = Date.now();\n };\n\n const handleMouseLeave = () => {\n const delta = Date.now() - hoverStart.current;\n if (onHovered) {\n onHovered(props.value, props.id, delta);\n }\n };\n\n return (\n <input\n ref={ref}\n type=\"checkbox\"\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n {...rest}\n name={props.id}\n />\n );\n },\n);\n\ntype StyledBaseCheckBoxProps = BaseCheckBoxProps &\n ColorStyleProps &\n SpacingStyleProps &\n BorderStyleProps &\n SizeStyleProps & {\n $checkedBackground?: OakCombinedColorToken | null;\n };\n\ntype HoverBaseCheckBoxProps = {\n $hoverBorderRadius: OakBorderRadiusToken;\n};\n\n/**\n *\n * These components can be used with InternalCheckBoxWrapper which allows for customisable icons\n *\n * Several flavours of checkbox are created here:\n * - Default\n * - Hover decorations\n * - Focus decorations\n * - Hover + Focus decorations\n *\n * NB. Hover decorations must be wrapped in a box with position relative to allow for the hover effect to work\n *\n * As they are styled components they can be further customised in implementation. Alternatively additional\n * components can be created here.\n *\n *\n * ## Events\n * The following callbacks are available for tracking focus events:\n *\n * ### onChange\n * onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n *\n * ### onFocus\n * onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;\n *\n * ### onBlur\n * onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;\n *\n * ### onHovered\n * `onHovered?: (id, value, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n *\n *\n */\nexport const InternalCheckBox = styled(BaseCheckBox)<StyledBaseCheckBoxProps>`\n /* removing default appearance */\n -webkit-appearance: none;\n appearance: none;\n cursor: pointer;\n margin: 0;\n outline: none;\n ${borderStyle}\n ${colorStyle}\n ${spacingStyle}\n ${sizeStyle}\n\n &:checked {\n ${(props) => css`\n background: ${parseColor(props.$checkedBackground)};\n `};\n }\n\n &:disabled {\n pointer-events: none;\n }\n`;\n\nInternalCheckBox.defaultProps = {\n $borderRadius: \"border-radius-xs\",\n $ba: \"border-solid-m\",\n $borderColor: \"text-primary\",\n $checkedBackground: \"text-primary\",\n};\n\nexport const InternalCheckBoxHover = styled(InternalCheckBox)<\n StyledBaseCheckBoxProps & HoverBaseCheckBoxProps\n>`\n /* @media wrapper is required to prevent hover effect on iOS Safari */\n\n @media (hover: hover) {\n &:hover:not(&:checked):not(&:disabled)::after {\n content: \"\";\n position: absolute;\n top: 50%;\n left: 50%;\n width: 60%;\n height: 60%;\n transform: translate(-50%, -50%);\n border-radius: ${(props) => css`\n ${parseBorderRadius(props.$hoverBorderRadius)}\n `};\n background: ${(props) => css`\n ${parseColor(props.$checkedBackground)}\n `};\n }\n }\n`;\n\nInternalCheckBoxHover.defaultProps = {\n $hoverBorderRadius: \"border-radius-xs\",\n};\n\nconst focusStyle = css`\n &:focus-visible {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")};\n }\n`;\n\nexport const InternalCheckBoxFocus = styled(\n InternalCheckBox,\n)<StyledBaseCheckBoxProps>`\n ${focusStyle}\n`;\n\nexport const InternalCheckBoxHoverFocus = styled(InternalCheckBoxHover)<\n StyledBaseCheckBoxProps & HoverBaseCheckBoxProps\n>`\n ${focusStyle}\n`;\n","import styled, { css } from \"styled-components\";\n\nimport { OakLabel, OakLabelProps } from \"@/components/atoms\";\nimport { responsiveStyle } from \"@/styles/utils/responsiveStyle\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { FlexStyleProps } from \"@/styles/utils/flexStyle\";\n\nexport type InternalCheckBoxLabelProps = {\n labelAlignItems?: FlexStyleProps[\"$alignItems\"];\n labelGap?: FlexStyleProps[\"$gap\"];\n disabled?: boolean;\n \"data-testid\"?: string;\n} & OakLabelProps;\n\n/**\n *\n * Specialised Label Component can be used and extended to create various different versions of CheckboxLabels\n *\n */\nexport const InternalCheckBoxLabel = styled(\n OakLabel,\n)<InternalCheckBoxLabelProps>`\n display: flex;\n align-items: center;\n ${responsiveStyle(\"gap\", (props) => props.labelGap, parseSpacing)}\n ${responsiveStyle(\"align-items\", (props) => props.labelAlignItems)}\n`;\n\nexport const InternalCheckBoxLabelHoverDecor = styled(InternalCheckBoxLabel)`\n ${(props) =>\n props.disabled\n ? css`\n pointer-events: none;\n `\n : css`\n cursor: pointer;\n `}\n @media (hover: hover) {\n &:hover {\n text-decoration: ${(props) => (props.disabled ? \"none\" : \"underline\")};\n }\n }\n`;\n","import React from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakBoxProps, OakIcon } from \"@/components/atoms\";\nimport { OakAllSpacingToken, OakInnerPaddingToken } from \"@/styles\";\nimport { ResponsiveValues } from \"@/styles/utils/responsiveStyle\";\n\nconst StyledIconContainer = styled(OakBox)<\n OakBoxProps & { disabled?: boolean }\n>`\n pointer-events: none;\n opacity: 0;\n\n input:checked + & {\n opacity: 1;\n }\n`;\n\nexport type InternalCheckBoxWrapperProps = {\n size?: ResponsiveValues<OakAllSpacingToken>;\n internalCheckbox: React.JSX.Element;\n iconPadding?: OakInnerPaddingToken;\n checkedIcon?: React.JSX.Element;\n};\n\n/**\n *\n * This component is a wrapper for the InternalCheckBox component. It allows for customisable icons.\n *\n * NB. size must have the same value as the InternalCheckBox width and height\n *\n *\n */\nexport const InternalCheckBoxWrapper = (\n props: InternalCheckBoxWrapperProps,\n) => {\n const {\n size = \"all-spacing-6\",\n iconPadding = \"inner-padding-none\",\n internalCheckbox,\n checkedIcon = (\n <OakIcon\n iconName=\"tick\"\n $width={\"100%\"}\n $height={\"100%\"}\n $colorFilter={\"white\"}\n />\n ),\n } = props;\n\n return (\n <OakBox $position=\"relative\" $width={size} $height={size}>\n {internalCheckbox}\n <StyledIconContainer\n $position={\"absolute\"}\n $top={\"all-spacing-0\"}\n $left={\"all-spacing-0\"}\n $pa={iconPadding}\n $width={size}\n $height={size}\n >\n {checkedIcon}\n </StyledIconContainer>\n </OakBox>\n );\n};\n","import React, {\n DetailedHTMLProps,\n InputHTMLAttributes,\n FocusEvent,\n useRef,\n} from \"react\";\nimport styled from \"styled-components\";\n\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { getBreakpoint } from \"@/styles/utils/responsiveStyle\";\nimport { SpacingStyleProps, spacingStyle } from \"@/styles/utils/spacingStyle\";\nimport { SizeStyleProps, sizeStyle } from \"@/styles/utils/sizeStyle\";\n\ntype StyledInputProps = Omit<\n DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,\n \"ref\"\n> &\n SpacingStyleProps &\n SizeStyleProps;\n\n/**\n * Using `appearance none !important;` here because many style resets will set this\n * value to textfield, causing some browsers to implement undesirable styles.\n * E.g. ios and rounded borders (which border-radius doesn't fix without\n * appearance: none)\n */\nconst StyledInput = styled.input`\n appearance: none !important;\n border: 0;\n border-radius: 0;\n border-color: transparent;\n box-shadow: none;\n font-family: inherit;\n background: transparent;\n outline: none;\n color: inherit;\n\n @media (max-width: ${getBreakpoint(\"small\")}px) {\n /* iOS zooms in on inputs with font sizes <16px on mobile */\n font-size: 16px;\n }\n\n ::placeholder {\n color: ${({ theme }) =>\n theme && theme.uiColors && parseColor(theme.uiColors[\"text-subdued\"])};\n }\n\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n appearance: none;\n }\n\n :disabled {\n cursor: not-allowed;\n }\n\n ${spacingStyle}\n ${sizeStyle}\n`;\n\nexport type InternalTextInputProps = Omit<StyledInputProps, \"placeholder\"> & {\n /**\n * A textual hint or example to display before a value has been entered\n */\n placeholder?: string;\n /**\n * Fired only when the input is focused for the first time\n */\n onInitialFocus?: (e: FocusEvent<HTMLInputElement>) => void;\n};\n\n/**\n *\n * An unstyled input to be used as a basis for UI input components.\n * Supports all the props of a regular `HTMLInputElement`\n *\n * 🚨 The CSS `outline` is disabled so a focus ring must be applied by the consuming component.\n *\n * The following callbacks are available for tracking focus events:\n *\n * ### onFocus\n * `(e: FocusEvent<HTMLInputElement>) => void;`\n * ### onBlur\n * `(e: FocusEvent<HTMLInputElement>) => void;`\n * ### onInitialFocus\n * `(e: FocusEvent<HTMLInputElement>) => void;`<br>\n * occurs only when the input is focused for the first time\n *\n */\nexport const InternalTextInput = (props: InternalTextInputProps) => {\n const { onInitialFocus, onFocus, ...rest } = props;\n\n const hadInitialFocused = useRef(false);\n\n const handleOnFocus = (e: FocusEvent<HTMLInputElement>) => {\n if (!hadInitialFocused.current && props.onInitialFocus) {\n props.onInitialFocus(e);\n hadInitialFocused.current = true;\n }\n\n if (props.onFocus) {\n props.onFocus(e);\n }\n };\n\n return <StyledInput {...rest} onFocus={handleOnFocus} />;\n};\n","import React, { ChangeEventHandler } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport {\n InternalTextInput,\n InternalTextInputProps,\n} from \"@/components/atoms/InternalTextInput\";\nimport { OakFlex, OakIcon, OakIconName } from \"@/components/atoms\";\nimport { OakCombinedColorToken, OakDropShadowToken } from \"@/styles\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { SizeStyleProps } from \"@/styles/utils/sizeStyle\";\n\ntype StyledTextInputWrapperProps = {\n $color: OakCombinedColorToken;\n $hoverBackground: OakCombinedColorToken;\n $background: OakCombinedColorToken;\n $borderColor: OakCombinedColorToken;\n $focusRingDropShadows: OakDropShadowToken[];\n $disabledBackgroundColor: OakCombinedColorToken;\n $readOnlyBorderColor: OakCombinedColorToken;\n $disabledColor: OakCombinedColorToken;\n $readOnlyColor: OakCombinedColorToken;\n $disabled: boolean;\n $readOnly: boolean;\n};\n\nexport type OakTextInputProps = {\n /**\n * Disables user input and updates the appearance accordingly.\n */\n disabled?: boolean;\n /**\n * Makes the input read-only. Preventing the user from changing the value.\n */\n readOnly?: boolean;\n /**\n * Sets the value. Use this in controlled components;\n */\n value?: string;\n /**\n * Sets the initial value. Use this for an uncontrolled component;\n */\n defaultValue?: string;\n /**\n * Used to target the input element in tests.\n */\n \"data-testid\"?: string;\n onChange?: ChangeEventHandler<HTMLInputElement>;\n /**\n * Alters the appearance of the input field to indicate whether the input is valid or invalid.\n */\n validity?: \"valid\" | \"invalid\";\n /**\n * Adds an icon to the input\n *\n * Defaults to the start of the input\n */\n iconName?: OakIconName;\n /**\n * Position the icon at the end of the input\n */\n isTrailingIcon?: boolean;\n /**\n * Give the field a highlight to draw attention to it\n */\n isHighlighted?: boolean;\n iconColor?: OakCombinedColorToken;\n validBorderColor?: OakCombinedColorToken;\n invalidBorderColor?: OakCombinedColorToken;\n validIconColor?: OakCombinedColorToken;\n invalidIconColor?: OakCombinedColorToken;\n color?: OakCombinedColorToken;\n hoverBackground?: OakCombinedColorToken;\n background?: OakCombinedColorToken;\n borderColor?: OakCombinedColorToken;\n focusRingDropShadows?: OakDropShadowToken[];\n disabledBackgroundColor?: OakCombinedColorToken;\n readOnlyBorderColor?: OakCombinedColorToken;\n disabledColor?: OakCombinedColorToken;\n readOnlyColor?: OakCombinedColorToken;\n highlightBackgroundColor?: OakCombinedColorToken;\n /**\n * The width of the surrounding div - the input and icon will fill this\n */\n wrapperWidth?: SizeStyleProps[\"$width\"];\n wrapperMaxWidth?: SizeStyleProps[\"$maxWidth\"];\n iconAlt?: string;\n} & InternalTextInputProps;\n\nconst StyledTextInputWrapper = styled(OakFlex)<StyledTextInputWrapperProps>`\n &:hover {\n cursor: text;\n }\n\n &:focus-within {\n box-shadow: ${(props) =>\n props.$focusRingDropShadows\n .map((dropShadow) => parseDropShadow(dropShadow))\n .join(\",\")};\n }\n\n background: ${(props) => parseColor(props.$background)};\n\n ${(props) =>\n !props.$readOnly &&\n css`\n @media (hover: hover) {\n &:hover:not(:focus-within) {\n background: ${parseColor(props.$hoverBackground)};\n }\n }\n `}\n\n ${(props) =>\n props.$readOnly &&\n css`\n border-color: ${parseColor(props.$readOnlyBorderColor)};\n color: ${parseColor(props.$readOnlyColor)};\n `}\n\n ${(props) =>\n props.$disabled &&\n css`\n background: ${parseColor(props.$disabledBackgroundColor)};\n color: ${parseColor(props.$disabledColor)};\n &:hover {\n cursor: not-allowed;\n }\n `}\n`;\n\n/**\n * Default input which can be extended to create specialised inputs.\n */\nexport const OakTextInput = ({\n type = \"text\",\n borderColor = \"border-primary\",\n readOnlyBorderColor = \"border-neutral\",\n focusRingDropShadows = [\n \"drop-shadow-centered-lemon\",\n \"drop-shadow-centered-grey\",\n ],\n background = \"bg-primary\",\n hoverBackground = \"bg-neutral\",\n disabledBackgroundColor = \"bg-neutral\",\n highlightBackgroundColor = \"bg-decorative5-main\",\n color = \"text-primary\",\n disabledColor = \"text-disabled\",\n readOnlyColor = \"text-subdued\",\n validity,\n iconColor = \"icon-inverted\",\n validBorderColor = \"border-success\",\n invalidBorderColor = \"border-error\",\n validIconColor = \"icon-success\",\n invalidIconColor = \"border-error\",\n iconName,\n iconAlt,\n isTrailingIcon = false,\n isHighlighted = false,\n wrapperWidth,\n wrapperMaxWidth,\n ...props\n}: OakTextInputProps) => {\n let finalBackgroundColor = background;\n let finalBorderColor = borderColor;\n let finalIconColor = iconColor;\n let finalReadOnlyBorderColor = readOnlyBorderColor;\n\n switch (true) {\n case validity === \"valid\":\n finalBorderColor = validBorderColor;\n finalIconColor = validIconColor;\n finalReadOnlyBorderColor = validBorderColor;\n break;\n case validity === \"invalid\":\n finalBorderColor = invalidBorderColor;\n finalIconColor = invalidIconColor;\n finalReadOnlyBorderColor = invalidBorderColor;\n break;\n case isHighlighted:\n finalBackgroundColor = highlightBackgroundColor;\n break;\n }\n\n return (\n <StyledTextInputWrapper\n $height=\"fit-content\"\n $width={wrapperWidth}\n $maxWidth={wrapperMaxWidth}\n $borderRadius=\"border-radius-s\"\n $ba=\"border-solid-m\"\n $borderColor={finalBorderColor}\n $focusRingDropShadows={focusRingDropShadows}\n $background={finalBackgroundColor}\n $hoverBackground={hoverBackground}\n $disabledBackgroundColor={disabledBackgroundColor}\n $readOnlyBorderColor={finalReadOnlyBorderColor}\n $disabledColor={disabledColor}\n $readOnlyColor={readOnlyColor}\n $color={color}\n $alignItems=\"center\"\n $position=\"relative\"\n $gap=\"space-between-s\"\n $ph=\"inner-padding-l\"\n $disabled={!!props.disabled}\n $readOnly={!!props.readOnly}\n onClick={(event) => {\n event.currentTarget.querySelector(\"input\")?.focus();\n }}\n >\n {!isTrailingIcon && iconName && (\n <OakIcon\n iconName={iconName}\n $colorFilter={finalIconColor}\n $pointerEvents=\"none\"\n $width={\"all-spacing-7\"}\n alt={iconAlt}\n />\n )}\n\n <OakFlex $flexGrow={1}>\n <InternalTextInput\n type={type}\n {...props}\n $width={\"100%\"}\n $pv=\"inner-padding-l\"\n $height=\"all-spacing-12\"\n />\n </OakFlex>\n {isTrailingIcon && iconName && (\n <OakIcon\n iconName={iconName}\n $colorFilter={finalIconColor}\n $pointerEvents=\"none\"\n $width={\"all-spacing-7\"}\n alt={iconAlt}\n />\n )}\n </StyledTextInputWrapper>\n );\n};\n","import React from \"react\";\n\nimport {\n OakBox,\n OakIcon,\n OakIconProps,\n OakImage,\n OakImageProps,\n} from \"@/components/atoms\";\n\ntype ImageProps = OakImageProps & {\n iconName?: undefined;\n};\n\ntype IconProps = OakIconProps & {\n src?: undefined;\n};\n\nexport type OakRoundIconProps = IconProps | ImageProps;\n\n/**\n * A wrapper around `OakIcon` which applies a rounded background.\n * Supports either an icon name or an image src\n */\nexport const OakRoundIcon = ({\n $background = \"bg-decorative5-main\",\n $borderRadius = \"border-radius-circle\",\n $width = \"all-spacing-9\",\n $height = \"all-spacing-9\",\n $pa = \"inner-padding-ssx\",\n className,\n ...rest\n}: OakRoundIconProps) => {\n const icon = rest.iconName ? (\n <OakIcon {...rest} $height=\"100%\" $width=\"100%\" />\n ) : (\n <OakImage {...rest} $height=\"100%\" $width=\"100%\" />\n );\n\n return (\n <OakBox\n className={className}\n $background={$background}\n $borderRadius={$borderRadius}\n $width={$width}\n $height={$height}\n $pa={$pa}\n >\n {icon}\n </OakBox>\n );\n};\n","import React, { ReactNode } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { OakFlex, OakFlexProps } from \"../OakFlex\";\n\nimport { OakCombinedColorToken } from \"@/styles\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport { responsiveStyle } from \"@/styles/utils/responsiveStyle\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\nexport type InternalTooltipProps = OakFlexProps & {\n isOpen: boolean;\n tooltip: ReactNode;\n children?: ReactNode;\n tooltipPosition?: \"bottom-left\" | \"bottom-right\" | \"top-left\" | \"top-right\";\n};\n\nconst StyledFlex = styled(OakFlex)`\n width: max-content;\n pointer-events: none;\n`;\n\ntype StyledSvgProps = {\n $fill: ColorStyleProps[\"$background\"];\n $tooltipPosition?: InternalTooltipProps[\"tooltipPosition\"];\n};\n\nconst StyledSvg = styled.svg<StyledSvgProps>`\n position: absolute;\n ${({ $tooltipPosition }) => {\n switch ($tooltipPosition) {\n case \"bottom-right\":\n return css`\n top: -${parseSpacing(\"space-between-s\")};\n right: ${parseSpacing(\"space-between-none\")};\n transform: scale(-1, -1);\n `;\n case \"top-right\":\n return css`\n bottom: -${parseSpacing(\"space-between-s\")};\n right: ${parseSpacing(\"space-between-none\")};\n transform: scaleX(-1);\n `;\n case \"top-left\":\n return css`\n bottom: -${parseSpacing(\"space-between-s\")};\n left: ${parseSpacing(\"space-between-none\")};\n `;\n default:\n return css`\n top: -${parseSpacing(\"space-between-s\")};\n left: ${parseSpacing(\"space-between-none\")};\n transform: scaleY(-1);\n `;\n }\n }}\n ${responsiveStyle<StyledSvgProps, OakCombinedColorToken>(\n \"fill\",\n (props) => props.$fill,\n parseColor,\n )}\n`;\n\n/**\n * A primitive tooltip to be used as a basis for more opinionated UI components.\n */\nexport const InternalTooltip = ({\n isOpen,\n children,\n tooltip,\n $background = \"black\",\n $color = \"text-inverted\",\n tooltipPosition = \"bottom-left\",\n ...props\n}: InternalTooltipProps) => {\n const positionProps = (() => {\n const props: Partial<OakFlexProps> = {};\n\n switch (tooltipPosition) {\n case \"top-left\":\n case \"top-right\":\n props.$top = \"space-between-none\";\n props.$transform = `translateY(calc(-100% - ${parseSpacing(\n \"space-between-s\",\n )}))`;\n break;\n default:\n props.$bottom = \"space-between-none\";\n props.$transform = `translateY(calc(100% + ${parseSpacing(\n \"space-between-s\",\n )}))`;\n break;\n }\n\n switch (tooltipPosition) {\n case \"top-left\":\n case \"bottom-left\":\n props.$left = \"space-between-none\";\n break;\n default:\n props.$right = \"space-between-none\";\n break;\n }\n\n return props;\n })();\n\n return (\n <OakFlex $position=\"relative\" $width=\"fit-content\" $height=\"fit-content\">\n {isOpen && (\n <OakFlex\n role=\"tooltip\"\n $position=\"absolute\"\n {...positionProps}\n $zIndex=\"modal-dialog\"\n $flexDirection=\"column\"\n >\n <StyledFlex\n {...props}\n $position=\"relative\"\n $background={$background}\n $color={$color}\n $maxWidth={[\"all-spacing-20\", \"all-spacing-22\"]}\n >\n {tooltip}\n <StyledSvg\n width=\"16\"\n height=\"16\"\n $fill={$background}\n $tooltipPosition={tooltipPosition}\n >\n <path d=\"M0 0H16L8 8L0 16V0Z\" />\n </StyledSvg>\n </StyledFlex>\n </OakFlex>\n )}\n {children}\n </OakFlex>\n );\n};\n","import React from \"react\";\n\nimport {\n InternalTooltip,\n InternalTooltipProps,\n} from \"@/components/atoms/InternalTooltip/InternalTooltip\";\n\n/**\n * A tooltip with oven-ready styling\n */\nexport const OakTooltip = ({\n tooltipPosition,\n ...props\n}: Pick<\n InternalTooltipProps,\n \"isOpen\" | \"tooltip\" | \"children\" | \"tooltipPosition\"\n>) => {\n const squaredCornerRadiusProp: keyof InternalTooltipProps = (() => {\n switch (tooltipPosition) {\n case \"bottom-right\":\n return \"$btrr\";\n case \"top-right\":\n return \"$bbrr\";\n case \"top-left\":\n return \"$bblr\";\n default:\n return \"$btlr\";\n }\n })();\n\n const borderRadiusProps: Partial<InternalTooltipProps> = {\n $borderRadius: \"border-radius-m\",\n [squaredCornerRadiusProp]: \"border-radius-square\",\n };\n\n return (\n <InternalTooltip\n $background=\"bg-decorative5-main\"\n $color=\"text-primary\"\n $pv=\"inner-padding-m\"\n $ph=\"inner-padding-xl\"\n $font=\"heading-light-7\"\n tooltipPosition={tooltipPosition}\n {...props}\n {...borderRadiusProps}\n />\n );\n};\n","import React, { ElementType, ComponentPropsWithoutRef } from \"react\";\nimport styled from \"styled-components\";\n\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseColorFilter } from \"@/styles/helpers/parseColorFilter\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { OakIcon } from \"@/components/atoms\";\n\nexport type OakBackLinkProps<C extends ElementType> = {\n as?: C;\n label?: string;\n} & ComponentPropsWithoutRef<C>;\n\nconst StyledBackLink = styled.a`\n border-radius: 50%;\n display: flex;\n width: fit-content;\n height: fit-content;\n border: none;\n padding: 0;\n outline: none;\n\n img {\n pointer-events: none;\n }\n\n &:not(:disabled) {\n cursor: pointer;\n }\n\n &:active {\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")},\n ${parseDropShadow(\"drop-shadow-grey\")};\n }\n\n &:hover,\n &:focus-visible {\n background: ${parseColor(\"bg-btn-primary\")};\n\n img {\n filter: ${parseColorFilter(\"text-inverted\")};\n }\n }\n\n &:focus-visible {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n\n &:disabled {\n background: ${parseColor(\"bg-btn-primary-disabled\")};\n\n img {\n filter: ${parseColorFilter(\"text-inverted\")};\n }\n }\n`;\n\n/**\n * Used to navigate the user back to the previous page in the app.\n *\n * Polymorphic rendering as any HTML element or component using `as` — defaults to `a`.\n *\n * E.g.\n *\n * * Default (Anchor) `<OakBackLink href=\"https://www.thenational.academy/\" />`\n * * Button `<OakBackLink as=\"button\" onClick={() => goBack(-1)} />`\n */\nexport const OakBackLink = <C extends ElementType = \"a\">({\n as,\n label = \"Back\",\n ...props\n}: OakBackLinkProps<C>) => {\n return (\n <StyledBackLink as={as ?? \"a\"} aria-label={label} {...props}>\n <OakIcon\n alt=\"\"\n iconName=\"chevron-left\"\n $width=\"all-spacing-8\"\n $height=\"all-spacing-8\"\n />\n </StyledBackLink>\n );\n};\n","import styled from \"styled-components\";\n\nimport { OakFlex, OakFlexProps } from \"@/components/atoms/OakFlex\";\n\nexport type InternalCardProps = OakFlexProps;\n\n/**\n *\n * InternalCard extends OakFlex. It has all the props of OakFlex, but applies default styles for consistency.\n *\n */\nconst InternalCard = styled(OakFlex)``;\n\nInternalCard.defaultProps = {\n $pa: \"inner-padding-xl\",\n $flexDirection: \"column\",\n $flexGrow: 1,\n $position: \"relative\",\n};\n\nexport { InternalCard };\n","import React, { ReactElement } from \"react\";\nimport styled from \"styled-components\";\n\nimport { InternalCard, InternalCardProps } from \"../InternalCard/InternalCard\";\nimport { OakBox } from \"../OakBox\";\n\nexport type InternalCardWithBackgroundElementProps = InternalCardProps & {\n backgroundElement: ReactElement;\n};\n\n/**\n * The `backgroundElement` should be sized to fit the entire card\n */\nconst StyledBackgroundBox = styled(OakBox)`\n & > * {\n width: 100%;\n height: 100%;\n }\n`;\n\n/**\n * A flexed card with a presentational background element positioned behind the card contents.\n */\nexport const InternalCardWithBackgroundElement = ({\n backgroundElement,\n children,\n ...props\n}: InternalCardWithBackgroundElementProps) => {\n return (\n <InternalCard {...props}>\n <StyledBackgroundBox\n $position=\"absolute\"\n $inset=\"space-between-none\"\n aria-hidden\n >\n {backgroundElement}\n </StyledBackgroundBox>\n <OakBox $position=\"relative\">{children}</OakBox>\n </InternalCard>\n );\n};\n","import { OakBorderWidthToken, oakBorderWidthTokens } from \"../theme\";\n\nimport pxToRem from \"./pxToRem\";\n\nexport function parseBorderWidth(\n value: OakBorderWidthToken | null | undefined,\n) {\n if (!value) {\n return undefined;\n }\n\n if (value in oakBorderWidthTokens) {\n return `${pxToRem(oakBorderWidthTokens[value])}rem`;\n }\n}\n","import styled from \"styled-components\";\n\nimport { OakBorderWidthToken, OakCombinedColorToken } from \"@/styles\";\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseBorderWidth } from \"@/styles/helpers/parseBorderWidth\";\n\nexport type InternalStyledSvgProps = {\n $fill?: ResponsiveValues<OakCombinedColorToken>;\n $stroke?: ResponsiveValues<OakCombinedColorToken>;\n $strokeWidth?: ResponsiveValues<OakBorderWidthToken>;\n};\n\n/**\n * A styled SVG element with props to apply design tokens to the fill and stroke.\n */\nexport const InternalStyledSvg = styled.svg<InternalStyledSvgProps>`\n ${responsiveStyle<InternalStyledSvgProps, OakCombinedColorToken>(\n \"fill\",\n (props) => props.$fill,\n parseColor,\n )}\n ${responsiveStyle<InternalStyledSvgProps, OakCombinedColorToken>(\n \"stroke\",\n (props) => props.$stroke,\n parseColor,\n )}\n ${responsiveStyle<InternalStyledSvgProps, OakBorderWidthToken>(\n \"stroke-width\",\n (props) => props.$strokeWidth,\n parseBorderWidth,\n )}\n`;\n","import React from \"react\";\n\nimport {\n InternalCardWithBackgroundElement,\n InternalCardWithBackgroundElementProps,\n} from \"@/components/atoms/InternalCardWithBackgroundElement/InternalCardWithBackgroundElement\";\nimport {\n InternalStyledSvg,\n InternalStyledSvgProps,\n} from \"@/components/atoms/InternalStyledSvg\";\n\nexport type OakHandDrawnCardProps = Omit<\n InternalCardWithBackgroundElementProps,\n \"backgroundElement\"\n> & {\n fill?: InternalStyledSvgProps[\"$fill\"];\n stroke?: InternalStyledSvgProps[\"$stroke\"];\n strokeWidth?: InternalStyledSvgProps[\"$strokeWidth\"];\n};\n\n/**\n * A flexed card with a hand-drawn filled background\n *\n * An optional `stroke` and `strokeWidth` can be applied to give the background a border\n */\nexport const OakHandDrawnCard = ({\n $pa = \"inner-padding-xl\",\n fill = \"bg-decorative1-main\",\n stroke,\n strokeWidth,\n $width = \"fit-content\",\n ...props\n}: OakHandDrawnCardProps) => {\n return (\n <InternalCardWithBackgroundElement\n $pa={$pa}\n $width={$width}\n backgroundElement={\n <InternalStyledSvg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 457 120\"\n preserveAspectRatio=\"none\"\n $fill={fill}\n $stroke={stroke}\n $strokeWidth={strokeWidth}\n >\n <path\n d=\"M27.442 2.59c5.262-.362 11.96-.656 18.624-.932 4.374-.19 8.748-.371 12.712-.578 1.367-.07 3.042-.087 4.716-.095C65.032.976 66.57.959 67.903.907 91.858-.017 115.164.268 139.325.57l6.22.078c20.333.12 40.768.086 61.033-.13 6.664-.025 13.294-.043 19.957-.06C243.656.415 260.777.363 277.83.234c8.85-.07 17.667-.052 26.518-.035 12.132.026 24.366.052 36.771-.147 8.475-.138 17.633.087 26.757.302 3.725.087 7.45.182 11.107.25 3.69.061 7.347.139 10.969.217 4.511.095 8.988.19 13.499.259 13.464.207 30.619 1.519 30.619 1.519 3.588.449 7.074 1.32 10.286 2.59 2.973 1.304 4.682 4.135 6.391 6.967.717 1.165 1.435 2.33 2.221 3.384.273.363.342.812.376 1.26.034.406.102.82.307 1.175 3.52 6.388 2.427 12.604 1.299 19.044a27.243 27.243 0 0 0-.273 1.658 70.082 70.082 0 0 0 .478 16.273l.205 5.31c.171 4.575.342 9.133.854 13.683.274 2.357.205 4.705.137 7.07-.102 3.238-.205 6.492.547 9.808.547 2.261-.308 4.705-1.162 7.13-.342.993-.684 1.986-.923 2.962-.239.984-.546 1.951-.82 2.926-.342 1.2-.718 2.392-.991 3.6-1.196 5.379-4.511 8.435-11.756 9.134-2.392.233-4.75.518-7.142.855h-6.937c-5.263.371-11.961.656-18.624.932-4.375.19-8.749.371-12.713.579-1.367.069-3.041.086-4.716.095-1.538.008-3.075.025-4.408.086-23.956.924-47.262.639-71.422.337l-6.186-.078a3693.945 3693.945 0 0 0-61.033.129c-6.664.026-13.294.044-19.958.061-17.121.043-34.241.095-51.294.224-8.851.069-17.667.052-26.518.035-12.132-.026-24.366-.052-36.771.147-8.475.138-17.633-.087-26.758-.303-3.725-.086-7.45-.181-11.106-.25-3.69-.06-7.313-.138-10.97-.216-4.51-.095-8.987-.19-13.498-.259-18.932-.293-30.175-1.079-33.66-2.754-1.47-.38-2.871-.837-4.238-1.355-3.076-1.304-4.887-4.135-6.664-6.967-.752-1.165-1.47-2.331-2.29-3.384-.273-.363-.341-.812-.376-1.261-.034-.405-.102-.82-.307-1.174C0 95.664 1.128 89.448 2.324 83.008l.308-1.658c.478-5.421.341-10.869-.513-16.273-.102-1.77-.17-3.548-.24-5.318-.17-4.567-.375-9.125-.888-13.675-.273-2.357-.205-4.705-.136-7.07.102-3.238.205-6.493-.581-9.808-.547-2.262.341-4.705 1.196-7.13.342-.994.717-1.986.99-2.962.24-.984.548-1.96.855-2.927.376-1.2.752-2.39 1.025-3.6C5.605 7.21 9.022 4.154 16.574 3.455c2.495-.233 10.936-.855 10.936-.855l-.069-.009Z\"\n vectorEffect=\"non-scaling-stroke\"\n />\n </InternalStyledSvg>\n }\n {...props}\n />\n );\n};\n","import React from \"react\";\n\nimport { OakHandDrawnCardProps, OakHandDrawnCard } from \"../OakHandDrawnCard\";\n\nimport { OakIcon, OakIconProps } from \"@/components/atoms\";\n\nexport type OakHandDrawnBoxWithIconProps = Omit<\n OakHandDrawnCardProps,\n \"children\"\n> & {\n iconName: OakIconProps[\"iconName\"];\n alt?: OakIconProps[\"alt\"];\n iconColor?: OakIconProps[\"$colorFilter\"];\n iconWidth?: OakIconProps[\"$width\"];\n iconHeight?: OakIconProps[\"$height\"];\n};\n\n/**\n * A hand-drawn card with an icon in the center\n */\nexport const OakHandDrawnCardWithIcon = ({\n iconName,\n iconColor = \"text-primary\",\n iconWidth = [\"all-spacing-11\", \"all-spacing-16\"],\n iconHeight = [\"all-spacing-11\", \"all-spacing-16\"],\n alt,\n $width = [\"all-spacing-13\", \"all-spacing-17\"],\n $height = [\"all-spacing-13\", \"all-spacing-17\"],\n $alignItems = \"center\",\n $justifyContent = \"center\",\n ...props\n}: OakHandDrawnBoxWithIconProps) => {\n return (\n <OakHandDrawnCard\n $width={$width}\n $height={$height}\n $alignItems={$alignItems}\n $justifyContent={$justifyContent}\n {...props}\n >\n <OakIcon\n iconName={iconName}\n alt={alt}\n $height={iconHeight}\n $width={iconWidth}\n $colorFilter={iconColor}\n />\n </OakHandDrawnCard>\n );\n};\n","import React from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakFlex, OakSpan } from \"@/components/atoms\";\nimport { InternalStyledSvg } from \"@/components/atoms/InternalStyledSvg\";\n\nconst StyledPromoTag = styled(OakFlex)`\n aspect-ratio: 2 / 1;\n`;\n\n/**\n * Renders a tag with the text \"New\"\n */\nexport const OakPromoTag = () => {\n return (\n <StyledPromoTag\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $position=\"relative\"\n $width={[\"all-spacing-8\", \"all-spacing-9\", \"all-spacing-10\"]}\n >\n <InternalStyledSvg\n height=\"100%\"\n width=\"100%\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 56 27\"\n $fill=\"bg-icon\"\n >\n <path d=\"M6.421 0c8.661.839 17.303.834 26.16.714a89.843 89.843 0 0 1 4.834-.013c6.333.32 12.39.317 18.506-.275 0 1.26.178 2.352 0 3.44-.276 1.38-.829 2.759-1.342 4.15-.138.354-.532.706-.808 1.06-.445.248-.63.5-.553.753 1.598 1.093-.256 2.185 0 3.277.276 1.529 1.322 3.058 1.204 4.572-.138 1.771-1.046 3.543-1.973 5.312-.288.4-1.065.792-2.309 1.169-2.288.755-4.103 1.67-11.206 1.965-9.936.417-20.953.385-30.678-.09-2.447-.12-4.38-.532-5.209-.853-1.035-.458-1.52-.929-1.44-1.4C.937 18.988-.109 14.194.01 9.4c0-2.645 1.973-5.29 3.413-7.933.237-.424 1.697-.839 3-1.468Z\" />\n </InternalStyledSvg>\n <OakFlex\n $position=\"absolute\"\n $inset=\"all-spacing-0\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <OakSpan\n $color=\"lemon\"\n $font={[\"body-3-bold\", \"body-3-bold\", \"heading-7\"]}\n >\n New\n </OakSpan>\n </OakFlex>\n </StyledPromoTag>\n );\n};\n","import React, { ComponentProps } from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex } from \"@/components/atoms\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { parseBorderRadius } from \"@/styles/helpers/parseBorderRadius\";\n\nexport type OakCollapsibleContentProps = ComponentProps<typeof OakFlex> & {\n /**\n * Whether the content is displayed or not\n */\n isOpen: boolean;\n};\n\nconst StyledScrollBox = styled(OakBox)`\n &::-webkit-scrollbar-thumb {\n border-radius: ${parseBorderRadius(\"border-radius-m\")};\n background-color: ${parseColor(\"grey50\")};\n }\n &::-webkit-scrollbar-track {\n border-radius: ${parseBorderRadius(\"border-radius-m\")};\n background-color: ${parseColor(\"white\")};\n }\n &::-webkit-scrollbar {\n width: ${parseSpacing(\"all-spacing-3\")};\n height: ${parseSpacing(\"all-spacing-3\")};\n border-radius: ${parseBorderRadius(\"border-radius-m\")};\n }\n`;\n\n/**\n * A filled scrollable box that can be hidden with the `isOpen` prop.\n * Useful for hiding content that is not immediately relevant\n */\nexport const OakCollapsibleContent = ({\n isOpen,\n children,\n id,\n ...rest\n}: OakCollapsibleContentProps) => {\n return (\n <OakBox $display={isOpen ? \"block\" : \"none\"} id={id}>\n <OakFlex\n $background=\"bg-neutral-stronger\"\n $ph=\"inner-padding-m\"\n $pv=\"inner-padding-xl\"\n $borderRadius=\"border-radius-m\"\n {...rest}\n >\n <StyledScrollBox\n $overflow=\"auto\"\n $maxHeight=\"100%\"\n $width=\"100%\"\n $pr=\"inner-padding-m\"\n >\n {children}\n </StyledScrollBox>\n </OakFlex>\n </OakBox>\n );\n};\n","import React, { ElementType, forwardRef } from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakLoadingSpinner } from \"../OakLoadingSpinner\";\n\nimport {\n PolymorphicPropsWithRef,\n PolymorphicRef,\n} from \"@/components/polymorphic\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { parseBorderRadius } from \"@/styles/helpers/parseBorderRadius\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { OakFlex, OakIcon, OakIconProps, OakSpan } from \"@/components/atoms\";\nimport { parseColorFilter } from \"@/styles/helpers/parseColorFilter\";\n\nconst StyledOakIcon = styled(OakIcon)`\n width: ${parseSpacing(\"all-spacing-6\")};\n height: ${parseSpacing(\"all-spacing-6\")};\n`;\n\nconst StyledLink = styled.a`\n display: inline-flex;\n align-items: center;\n gap: ${parseSpacing(\"space-between-sssx\")};\n outline: none;\n border-radius: ${parseBorderRadius(\"border-radius-m\")};\n padding: ${parseSpacing(\"inner-padding-ssx\")};\n margin: -${parseSpacing(\"inner-padding-ssx\")};\n appearance: none;\n font: inherit;\n background: none;\n border: none;\n text-decoration: underline;\n cursor: pointer;\n\n color: ${parseColor(\"text-link-active\")};\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"text-link-active\")};\n }\n\n &:focus-visible {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n\n &:visited {\n color: ${parseColor(\"text-link-visited\")};\n\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"text-link-visited\")};\n }\n }\n\n @media (hover: hover) {\n &:hover,\n &:visited:hover {\n color: ${parseColor(\"text-link-hover\")};\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"text-link-hover\")};\n }\n }\n }\n\n &:active {\n color: ${parseColor(\"text-link-pressed\")};\n\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"text-link-pressed\")};\n }\n }\n\n &[disabled] {\n cursor: not-allowed;\n color: ${parseColor(\"text-disabled\")};\n\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"icon-disabled\")};\n }\n }\n`;\n\nexport type OakLinkProps = {\n iconName?: OakIconProps[\"iconName\"];\n isTrailingIcon?: boolean;\n isLoading?: boolean;\n};\n\ntype OakLinkComponent = <C extends React.ElementType = \"a\">(\n props: PolymorphicPropsWithRef<C> & OakLinkProps,\n) => React.ReactNode;\n\n/**\n * A blue link with an optional icon and loading state.\n *\n * Defaulting to a `HTMLAnchorElement` this component is polymorphic and can be rendered as a button or any other element.\n */\nexport const OakLink: OakLinkComponent = forwardRef(\n <C extends ElementType = \"a\">(\n props: PolymorphicPropsWithRef<C> & OakLinkProps,\n ref: PolymorphicRef<C>,\n ) => {\n const {\n element = \"a\",\n iconName,\n isTrailingIcon,\n children,\n isLoading,\n ...rest\n } = props;\n const icon = (() => {\n switch (true) {\n case isLoading:\n return (\n <OakFlex\n $width=\"all-spacing-6\"\n $height=\"all-spacing-6\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <OakLoadingSpinner\n $width=\"all-spacing-4\"\n $color=\"icon-inverted\"\n />\n </OakFlex>\n );\n case !!iconName:\n return <StyledOakIcon iconName={iconName} />;\n default:\n return null;\n }\n })();\n const disabled = (() => {\n switch (true) {\n case \"disabled\" in rest:\n return rest.disabled;\n case isLoading:\n return true;\n default:\n return undefined;\n }\n })();\n\n return (\n <StyledLink as={element} ref={ref} disabled={disabled} {...rest}>\n {!isTrailingIcon && icon}\n <OakSpan>{children}</OakSpan>\n {isTrailingIcon && icon}\n </StyledLink>\n );\n },\n);\n","import React, { ComponentPropsWithoutRef } from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex, OakIcon, OakKbd } from \"@/components/atoms\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\n/**\n * Adds additional leading between each line of text to make room for the\n * keyboard instructions wrapped in `<OakKbd>`\n *\n * This might be a useful atom to extract\n */\nconst StyledLeadingTrim = styled(OakBox)`\n margin-block: calc(-${parseSpacing(\"space-between-ssx\")} / 2);\n line-height: calc(1.5rem + ${parseSpacing(\"space-between-ssx\")});\n`;\n\n/**\n * Displays instructions for drag and drop functionality\n */\nexport const OakDragAndDropInstructions = (\n props: ComponentPropsWithoutRef<typeof OakFlex>,\n) => {\n return (\n <OakFlex $gap=\"space-between-ssx\" {...props}>\n <OakFlex $flexGrow={0}>\n <OakIcon iconName=\"move-arrows\" />\n </OakFlex>\n <StyledLeadingTrim $font=\"body-2\">\n Click and drag answers to change the order, or select using{\" \"}\n <OakKbd>\n <span aria-hidden=\"true\">↹</span> Tab\n </OakKbd>{\" \"}\n then move by pressing <OakKbd>Space</OakKbd> and the <OakKbd>↑</OakKbd>{\" \"}\n <OakKbd>↓</OakKbd> arrows on your keyboard.\n </StyledLeadingTrim>\n </OakFlex>\n );\n};\n","import React, {\n ComponentPropsWithRef,\n ComponentPropsWithoutRef,\n FC,\n forwardRef,\n} from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex, OakIcon } from \"@/components/atoms\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseBorder } from \"@/styles/helpers/parseBorder\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { IconName } from \"@/image-map\";\nimport { OakCombinedColorToken } from \"@/styles/theme/color\";\nimport { parseBorderWidth } from \"@/styles/helpers/parseBorderWidth\";\nimport { parseColorFilter } from \"@/styles/helpers/parseColorFilter\";\n\ntype OakDraggableProps = {\n /**\n * Whether the item is currently being dragged\n */\n isDragging?: boolean;\n /**\n * Present the element in a subdued state with hover effects disabled\n */\n isDisabled?: boolean;\n /**\n * Read only\n *\n * Disables hover effects\n */\n isReadOnly?: boolean;\n /**\n * Icon to display\n */\n iconName?: IconName;\n /**\n * Icon color when not being dragged or hovered\n */\n iconColor?: OakCombinedColorToken;\n /**\n * The alt text for the icon\n */\n iconAlt?: string;\n /**\n * The background color of the draggable when not being dragged or hovered\n */\n background?: OakCombinedColorToken;\n /**\n * The color of the draggable when not being dragged or hovered\n */\n color?: OakCombinedColorToken;\n};\n\nconst StyledOakIcon = styled(OakIcon)``;\n\nconst StyledDraggable = styled(OakBox)<{ $iconColor: OakCombinedColorToken }>`\n cursor: grab;\n outline: none;\n user-select: none;\n\n ${StyledOakIcon} {\n filter: ${(props) => parseColorFilter(props.$iconColor)};\n }\n\n @media (hover: hover) {\n &:hover:not([data-dragging=\"true\"]):not([data-disabled=\"true\"]):not(\n [data-readonly=\"true\"]\n ) {\n background-color: ${parseColor(\"bg-decorative1-subdued\")};\n color: ${parseColor(\"text-primary\")};\n box-shadow: ${parseDropShadow(\"drop-shadow-standard\")};\n border-bottom: ${parseBorder(\"border-solid-xl\")}\n ${parseColor(\"border-primary\")};\n padding-bottom: ${parseSpacing(\"inner-padding-m\")};\n text-decoration: underline;\n\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"icon-inverted\")};\n }\n }\n }\n\n &:focus-visible:not([data-dragging=\"true\"]):not([data-disabled=\"true\"]) {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n\n &[data-dragging=\"true\"] {\n cursor: move;\n background-color: ${parseColor(\"bg-decorative1-main\")};\n color: ${parseColor(\"text-primary\")};\n outline: ${parseBorder(\"border-solid-xl\")} ${parseColor(\"border-primary\")};\n outline-offset: -${parseBorderWidth(\"border-solid-xl\")};\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")},\n ${parseDropShadow(\"drop-shadow-grey\")};\n text-decoration: underline;\n\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"icon-inverted\")};\n }\n }\n\n &[data-disabled=\"true\"] {\n cursor: default;\n background-color: ${parseColor(\"bg-neutral\")};\n color: ${parseColor(\"text-disabled\")};\n\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"icon-disabled\")};\n }\n }\n\n &[data-readonly=\"true\"] {\n cursor: default;\n }\n`;\n\nconst StyledFlex = styled(OakFlex)`\n margin-block: -${parseSpacing(\"space-between-ssx\")};\n`;\n\n/**\n * The component has no intrinsic draggable functionality.\n * It is intended to be used with `useDraggable` from `@dnd-kit/core`\n */\nexport const OakDraggable: FC<\n ComponentPropsWithRef<OakDraggableProps & typeof OakBox>\n> = forwardRef<\n HTMLDivElement,\n OakDraggableProps & ComponentPropsWithoutRef<typeof OakBox>\n>(\n (\n {\n children,\n iconName = \"move-arrows\",\n iconColor = \"icon-inverted\",\n iconAlt = \"\",\n color = \"text-primary\",\n background = \"bg-primary\",\n isDragging,\n isDisabled,\n isReadOnly,\n ...props\n },\n ref,\n ) => {\n return (\n <StyledDraggable\n ref={ref}\n $pv=\"inner-padding-l\"\n $pl=\"inner-padding-s\"\n $pr=\"inner-padding-m\"\n $background={background}\n $color={color}\n $borderRadius=\"border-radius-m2\"\n $minHeight=\"all-spacing-10\"\n data-dragging={isDragging}\n data-disabled={isDisabled}\n data-readonly={isReadOnly}\n $iconColor={iconColor}\n {...props}\n >\n <StyledFlex $gap=\"space-between-s\" $alignItems=\"center\">\n <StyledOakIcon\n iconName={iconName}\n $width=\"all-spacing-7\"\n $height=\"all-spacing-7\"\n alt={iconAlt}\n />\n <OakFlex $font=\"body-1-bold\">{children}</OakFlex>\n </StyledFlex>\n </StyledDraggable>\n );\n },\n);\n","import React, {\n ComponentPropsWithRef,\n ComponentPropsWithoutRef,\n FC,\n ReactNode,\n forwardRef,\n} from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex } from \"@/components/atoms\";\nimport { parseBorder } from \"@/styles/helpers/parseBorder\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\n\nexport type OakDroppableProps = {\n /**\n * Indicates whether a draggable is currently being dragged over the droppable\n */\n isOver?: boolean;\n /**\n * Present the element in a state making it clear that it can be dropped into\n */\n isDisabled?: boolean;\n /**\n * Give the droppable a highlight to draw attention to it\n */\n isHighlighted?: boolean;\n /**\n * A slot for a label to be displayed to the RHS of the droppable\n *\n * useful for giving the user a hint about what to drop\n */\n labelSlot?: ReactNode;\n /**\n * A slot for the draggable that is currently occupying the droppable\n */\n children?: ReactNode;\n};\n\nconst StyledFlex = styled(OakFlex)`\n outline: ${parseBorder(\"border-solid-l\")} ${parseColor(\"border-primary\")};\n outline-style: dashed;\n\n &[data-disabled=\"true\"] {\n outline-color: ${parseColor(\"border-neutral\")};\n }\n`;\n\n/**\n * A drop zone for a draggable\n *\n * Has no intrinsic drop functionality.\n * It is intended to be used with `useDraggable` from `@dnd-kit/core`\n */\nexport const OakDroppable: FC<\n OakDroppableProps & ComponentPropsWithRef<typeof OakFlex>\n> = forwardRef<\n HTMLDivElement,\n OakDroppableProps & ComponentPropsWithoutRef<typeof OakFlex>\n>(\n (\n { children, labelSlot, isOver, isHighlighted, isDisabled, ...props },\n ref,\n ) => {\n const slotBackground = (() => {\n switch (true) {\n case isOver:\n return \"bg-primary\";\n case isDisabled:\n return \"bg-decorative2-subdued\";\n default:\n return \"bg-neutral\";\n }\n })();\n const background = (() => {\n switch (true) {\n case isOver:\n return \"bg-decorative2-main\";\n case isHighlighted:\n return \"bg-decorative5-main\";\n default:\n return \"bg-decorative2-subdued\";\n }\n })();\n\n return (\n <OakFlex\n ref={ref}\n $background={background}\n $pa=\"inner-padding-m\"\n $borderRadius=\"border-radius-l\"\n $gap=\"space-between-s\"\n $flexDirection={[\"column\", \"row\", \"row\"]}\n {...props}\n >\n <StyledFlex\n $background={slotBackground}\n $pa=\"inner-padding-ssx\"\n $borderRadius=\"border-radius-m2\"\n $minHeight=\"all-spacing-11\"\n $flexBasis=\"100%\"\n data-disabled={isDisabled}\n >\n <OakBox $width=\"100%\">{children}</OakBox>\n </StyledFlex>\n {labelSlot && (\n <OakFlex\n $background={isOver ? \"bg-primary\" : \"bg-decorative2-very-subdued\"}\n $borderRadius=\"border-radius-m2\"\n $alignItems=\"center\"\n $font=\"body-1\"\n $ph=\"inner-padding-l\"\n $minHeight=\"all-spacing-10\"\n $pv=\"inner-padding-ssx\"\n $flexBasis=\"100%\"\n $width=\"100%\"\n $alignSelf=\"center\"\n data-testid=\"label\"\n >\n {labelSlot}\n </OakFlex>\n )}\n </OakFlex>\n );\n },\n);\n","import React, { useRef } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { OakBox, OakFlex, OakFlexProps, OakIcon } from \"@/components/atoms\";\nimport { InternalCheckBoxWrapper } from \"@/components/atoms/InternalCheckBoxWrapper\";\nimport { InternalCheckBoxLabelHoverDecor } from \"@/components/atoms/InternalCheckBoxLabel\";\nimport {\n BaseCheckBoxProps,\n InternalCheckBox,\n} from \"@/components/atoms/InternalCheckBox/InternalCheckBox\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseBorder } from \"@/styles/helpers/parseBorder\";\nimport { parseBorderRadius } from \"@/styles/helpers/parseBorderRadius\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { OakCombinedColorToken } from \"@/styles\";\n\nconst StyledInternalCheckBox = styled(InternalCheckBox)`\n &:checked:not(:disabled) {\n border: ${parseBorder(\"border-solid-l\")};\n border-color: ${parseColor(\"border-primary\")};\n }\n\n &:checked:disabled {\n border: ${parseBorder(\"border-solid-l\")};\n border-color: ${parseColor(\"text-disabled\")};\n }\n\n @media (hover: hover) {\n &:hover:not(:disabled) {\n background: ${parseColor(\"bg-primary\")};\n }\n }\n`;\n\nconst StyledInternalCheckBoxLabelHoverDecor = styled(\n InternalCheckBoxLabelHoverDecor,\n)`\n pointer-events: none; // To prevent the label from stealing the click event from the input\n`;\n\ntype StyledFlexBoxProps = OakFlexProps & {\n $overlayBorderColor: OakCombinedColorToken;\n $feedbackBgColor?: OakCombinedColorToken;\n $outlineColor: OakCombinedColorToken;\n};\n\nconst StyledFlexBox = styled(OakFlex)<StyledFlexBoxProps>`\n &:not(:focus-within) {\n ${(props) =>\n !!props.$outlineColor &&\n css`\n outline: ${parseBorder(\"border-solid-xl\")}\n ${parseColor(props.$outlineColor)};\n `}\n }\n\n &:has(input:not(:disabled)) {\n cursor: pointer;\n }\n\n &:has(input:disabled) {\n pointer-events: none;\n cursor: none;\n }\n\n &:focus-within {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n\n @media (hover: hover) {\n &:hover:has(input:not(:disabled)){\n background-color: ${parseColor(\"bg-decorative1-subdued\")};\n }\n\n &:hover input:not(:disabled) {\n background: ${parseColor(\"bg-primary\")};\n }\n\n &:hover:has(input:not(:disabled)) ${InternalCheckBoxLabelHoverDecor} {\n text-decoration: underline;\n }\n\n &:hover:has(\n ${InternalCheckBoxLabelHoverDecor} input:not(:focus-visible):not(:checked):not(:disabled)\n )::after {\n content: \"\";\n inset: 0;\n pointer-events: none;\n position: absolute;\n border-bottom: ${parseBorder(\"border-solid-xl\")};\n border-radius: ${parseBorderRadius(\"border-radius-m2\")};\n }\n\n &:focus-within {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n \n &:has(input:checked:not(:disabled)) {\n outline: ${parseBorder(\"border-solid-xl\")};\n }\n\n &:has(input:checked:disabled) {\n outline-color: ${(props) => css`\n ${parseColor(props.$overlayBorderColor)}\n `};\n }\n\n &:has(input:disabled:not(:checked)) {\n ${(props) =>\n props.$feedbackBgColor\n ? css`\n background-color: ${props.$feedbackBgColor};\n `\n : undefined}\n }\n\n &:has(input:disabled:checked) {\n ${(props) => css`\n background-color: ${parseColor(props.$feedbackBgColor)};\n `};\n }\n`;\n\nexport type OakQuizCheckBoxProps = Omit<BaseCheckBoxProps, \"defaultChecked\"> & {\n feedback?: \"correct\" | \"incorrect\" | null;\n image?: React.JSX.Element;\n innerRef?: React.RefObject<HTMLInputElement>;\n displayValue?: string;\n /**\n * Give the field a highlight to draw attention to it\n */\n isHighlighted?: boolean;\n};\n\n/**\n * A checkbox representing the options in a multiple choice question.\n */\nexport const OakQuizCheckBox = (props: OakQuizCheckBoxProps) => {\n const {\n id,\n value,\n feedback,\n image,\n disabled,\n innerRef,\n displayValue,\n isHighlighted,\n ...rest\n } = props;\n\n const isFeedback = !!feedback;\n\n const defaultRef = useRef<HTMLInputElement>(null);\n const inputRef = innerRef ?? defaultRef;\n const showTick =\n (feedback === \"correct\" && inputRef.current?.checked) ||\n (feedback === \"incorrect\" && !inputRef.current?.checked);\n const showCross = feedback === \"incorrect\" && inputRef.current?.checked;\n\n const handleContainerClick = (\n e:\n | React.MouseEvent<HTMLDivElement>\n | React.MouseEvent<HTMLInputElement>\n | React.MouseEvent<HTMLLabelElement>,\n ) => {\n const inputId = (e.target as HTMLInputElement).id;\n\n if (inputId !== id) {\n inputRef.current?.click();\n }\n };\n\n const imageContainer = (\n <OakFlex\n $flexDirection=\"column\"\n $minWidth={\"all-spacing-20\"}\n $gap={\"space-between-s\"}\n >\n <OakBox>{image}</OakBox>\n {displayValue}\n </OakFlex>\n );\n\n const feedbackBgColor = showTick ? \"bg-correct\" : \"bg-incorrect\";\n const feedbackBorderColor = showTick ? \"border-success\" : \"border-error\";\n\n const inputCheckbox = (\n <StyledFlexBox\n $pa=\"inner-padding-l\"\n $borderRadius={\"border-radius-m2\"}\n $borderColor={\n isHighlighted ? \"border-decorative5-stronger\" : \"border-primary\"\n }\n $background={\n disabled && !isFeedback ? \"bg-neutral-stronger\" : \"bg-primary\"\n }\n $flexGrow={1}\n onClick={handleContainerClick}\n $overlayBorderColor={isFeedback ? feedbackBorderColor : \"text-disabled\"}\n $feedbackBgColor={isFeedback ? feedbackBgColor : undefined}\n $outlineColor={\n isHighlighted ? \"border-decorative5-stronger\" : \"transparent\"\n }\n >\n <StyledInternalCheckBoxLabelHoverDecor\n htmlFor={id}\n labelGap={\"space-between-s\"}\n labelAlignItems={\"center\"}\n $color={disabled && !isFeedback ? \"text-disabled\" : \"text-primary\"}\n $font={\"body-1\"}\n disabled={disabled}\n >\n <InternalCheckBoxWrapper\n size={\"all-spacing-7\"}\n iconPadding=\"inner-padding-ssx\"\n checkedIcon={\n <OakBox\n $width=\"100%\"\n $height=\"100%\"\n $background={\n disabled || isFeedback ? \"text-disabled\" : \"text-primary\"\n }\n >\n <OakBox\n $ba={\"border-solid-m\"}\n $borderColor={\"white\"}\n $width={\"100%\"}\n $height={\"100%\"}\n />\n </OakBox>\n }\n internalCheckbox={\n <StyledInternalCheckBox\n id={id}\n value={value}\n disabled={disabled || isFeedback}\n {...rest}\n $width={\"all-spacing-7\"}\n $height={\"all-spacing-7\"}\n $ba={\"border-solid-m\"}\n $borderColor=\"border-neutral\"\n $borderRadius={\"border-radius-s\"}\n $background={isHighlighted ? \"bg-decorative5-main\" : \"bg-primary\"}\n $checkedBackground={null}\n ref={inputRef}\n />\n }\n />\n {image ? imageContainer : displayValue}\n </StyledInternalCheckBoxLabelHoverDecor>\n {isFeedback && (showTick || showCross) && (\n <OakFlex\n className=\"feedbackIconWrapper\"\n $flexGrow={1}\n $justifyContent={\"flex-end\"}\n $alignItems={\"flex-end\"}\n $height={\"100%\"}\n >\n {showTick && (\n <OakIcon\n iconName={\"tick\"}\n $colorFilter={\"icon-success\"}\n alt={\n feedback === \"correct\" ? \"Correct\" : \"Unselected correct choice\"\n }\n />\n )}\n {showCross && (\n <OakIcon\n iconName={\"cross\"}\n $colorFilter={\"icon-error\"}\n alt={\"Incorrect\"}\n />\n )}\n </OakFlex>\n )}\n </StyledFlexBox>\n );\n\n return (\n <OakFlex $width={\"100%\"} $position={\"relative\"}>\n {inputCheckbox}\n </OakFlex>\n );\n};\n","import React, { MouseEventHandler, useContext } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { OakBox, OakFlex, OakIcon } from \"@/components/atoms\";\nimport {\n OakRadioButton,\n OakRadioButtonProps,\n} from \"@/components/molecules/OakRadioButton/OakRadioButton\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { parseBorder } from \"@/styles/helpers/parseBorder\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseBorderRadius } from \"@/styles/helpers/parseBorderRadius\";\nimport { RadioContext } from \"@/components/molecules/OakRadioGroup/OakRadioGroup\";\nimport { OakUiRoleToken } from \"@/styles\";\n\nexport type OakQuizRadioButtonProps = OakRadioButtonProps & {\n /**\n * Present the element with answer feedback\n */\n feedback?: \"correct\" | \"incorrect\" | null;\n /**\n * An image to display above the label\n */\n image?: JSX.Element;\n /**\n * Give the field a highlight to draw attention to it\n */\n isHighlighted?: boolean;\n};\n\ntype StyledOakFlexProps = {\n $disabled: boolean;\n $checked: boolean;\n $outlineColor?: OakUiRoleToken;\n};\n\nconst StyledOakFlex = styled(OakFlex)<StyledOakFlexProps>`\n &:not(:focus-within) {\n ${(props) =>\n !!props.$outlineColor &&\n css`\n outline: ${parseBorder(\"border-solid-xl\")}\n ${parseColor(props.$outlineColor)};\n `}\n }\n\n &:hover {\n cursor: ${(props) => (props.$disabled ? \"default\" : \"pointer\")};\n }\n\n &:focus-within {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n\n ${(props) =>\n !props.$disabled &&\n css`\n &:hover {\n background-color: ${parseColor(\"bg-decorative1-subdued\")};\n text-decoration: underline;\n }\n `}\n\n ${(props) =>\n !props.$disabled &&\n !props.$checked &&\n css`\n &:hover:not(:focus-within)::after {\n pointer-events: none;\n content: \"\";\n position: absolute;\n inset: 0;\n border-radius: ${parseBorderRadius(\"border-radius-m2\")};\n border-bottom: ${parseBorder(\"border-solid-l\")} ${parseColor(\"grey60\")};\n }\n `}\n`;\n\n/**\n * A radio button representing the options in a multiple choice question.\n *\n * Use with `OakRadioGroup` to create a group of radio buttons.\n */\nexport const OakQuizRadioButton = (props: OakQuizRadioButtonProps) => {\n const { value, feedback, image, disabled, isHighlighted, label, ...rest } =\n props;\n const showFeedback = !!feedback;\n // Give the input focus when the entire component is clicked\n const handleOnClick: MouseEventHandler<HTMLElement> = (event) => {\n event.currentTarget.querySelector(\"input\")?.click();\n };\n const checked = useContext(RadioContext).currentValue === value;\n let outlineColor: OakUiRoleToken | undefined;\n let backgroundColor: OakUiRoleToken = \"bg-primary\";\n let feedbackIcon: \"tick\" | \"cross\" | null = null;\n let feedbackAltText: string | undefined;\n let radioBackground: OakUiRoleToken = \"bg-primary\";\n\n switch (true) {\n case disabled && !showFeedback:\n backgroundColor = \"bg-neutral-stronger\";\n break;\n case feedback === \"correct\" && checked:\n outlineColor = \"border-success\";\n backgroundColor = \"bg-correct\";\n feedbackIcon = \"tick\";\n feedbackAltText = \"Correct\";\n break;\n case feedback === \"incorrect\" && checked:\n outlineColor = \"border-error\";\n backgroundColor = \"bg-incorrect\";\n feedbackIcon = \"cross\";\n feedbackAltText = \"Incorrect\";\n break;\n case feedback === \"incorrect\" && !checked:\n feedbackIcon = \"tick\";\n feedbackAltText = \"Unselected correct choice\";\n break;\n case isHighlighted:\n radioBackground = \"bg-decorative5-main\";\n outlineColor = \"border-decorative5-stronger\";\n break;\n case checked && !disabled:\n outlineColor = \"border-primary\";\n break;\n }\n\n return (\n <StyledOakFlex\n $pa=\"inner-padding-l\"\n $borderRadius=\"border-radius-m2\"\n $justifyContent=\"space-between\"\n $position=\"relative\"\n $alignContent=\"center\"\n onClick={handleOnClick}\n $disabled={disabled || showFeedback}\n $checked={checked}\n $outlineColor={outlineColor}\n $background={backgroundColor}\n >\n <OakRadioButton\n value={value}\n disabled={disabled || showFeedback}\n $labelGap=\"space-between-s\"\n disableFocusRing\n radioInnerSize=\"all-spacing-6\"\n radioOuterSize=\"all-spacing-7\"\n radioBackground={radioBackground}\n checkedRadioBorderWidth=\"border-solid-l\"\n label={\n image ? (\n <OakFlex\n $flexDirection=\"column\"\n $minWidth=\"all-spacing-20\"\n $gap=\"space-between-s\"\n >\n <OakBox>{image}</OakBox>\n {label}\n </OakFlex>\n ) : (\n label\n )\n }\n {...rest}\n />\n {showFeedback && feedbackIcon && (\n <OakFlex $alignSelf=\"flex-end\">\n <OakIcon\n iconName={feedbackIcon}\n $colorFilter={\n feedbackIcon === \"tick\" ? \"icon-success\" : \"icon-error\"\n }\n alt={feedbackAltText}\n />\n </OakFlex>\n )}\n </StyledOakFlex>\n );\n};\n","import React, { MouseEventHandler } from \"react\";\nimport styled from \"styled-components\";\n\nimport { InternalShadowRoundButton } from \"@/components/molecules/InternalShadowRoundButton\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\n\nexport type OakHintButtonProps = {\n isOpen: boolean;\n onClick?: MouseEventHandler;\n isLoading?: boolean;\n disabled?: boolean;\n};\n\nconst StyledInternalShadowRoundButton = styled(InternalShadowRoundButton)`\n &:hover .shadow {\n box-shadow: none !important;\n }\n &:active .shadow {\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")},\n ${parseDropShadow(\"drop-shadow-grey\")} !important;\n }\n`;\n\n/**\n *\n * A specific implementation of InternalShadowRoundButton\n *\n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n *\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n */\nexport const OakHintButton = (props: OakHintButtonProps) => {\n const { isOpen, disabled } = props;\n return (\n <StyledInternalShadowRoundButton\n iconName={isOpen && !disabled ? \"lightbulb-yellow\" : \"lightbulb\"}\n defaultIconBackground={isOpen ? \"black\" : \"bg-decorative5-main\"}\n hoverIconBackground={isOpen ? \"black\" : \"bg-decorative5-main\"}\n defaultTextColor={\"text-primary\"}\n hoverTextColor={\"text-primary\"}\n disabledIconBackground={\"bg-btn-primary-disabled\"}\n disabledTextColor={\"text-disabled\"}\n disabledIconColor={\"white\"}\n onClick={props.onClick}\n isLoading={props.isLoading}\n disabled={props.disabled}\n iconBackgroundSize={\"all-spacing-8\"}\n iconSize={\"all-spacing-6\"}\n >\n {!isOpen ? \"Need a hint?\" : \"Close hint\"}\n </StyledInternalShadowRoundButton>\n );\n};\n","import React, { MouseEventHandler, ReactNode, useState } from \"react\";\n\nimport { OakTooltip } from \"@/components/molecules\";\nimport { OakHintButton } from \"@/components/organisms/pupil/OakHintButton\";\n\nexport type OakQuizHintProps = {\n /**\n * Some content to give as a hint to answer a question\n */\n hint: ReactNode;\n};\n\n/**\n * Presents a button which will show a hint when clicked\n */\nexport const OakQuizHint = ({ hint }: OakQuizHintProps) => {\n const [isOpen, setIsOpen] = useState(false);\n const handleClick: MouseEventHandler = () => {\n setIsOpen(!isOpen);\n };\n\n return (\n <OakTooltip tooltip={hint} isOpen={isOpen}>\n <OakHintButton isOpen={isOpen} onClick={handleClick} />\n </OakTooltip>\n );\n};\n","import React, { ReactNode } from \"react\";\n\nimport { OakBox, OakFlex, OakSpan } from \"@/components/atoms\";\nimport { OakRoundIcon } from \"@/components/molecules\";\n\nexport type OakQuizFeedbackProps = {\n /**\n * Feedback for an answer\n * `partially-correct` can be used to feedback on a multi-answer MCQ where some\n * correct options were not selected and/or some incorrect answers were selected\n */\n feedback: \"correct\" | \"incorrect\" | \"partially-correct\";\n /**\n * Some additional content to present with the feedback.\n * This is likely the correct answer(s) to the question or some praise.\n *\n * Only displayed when `feedback` has been applied.\n */\n answerFeedback?: ReactNode;\n};\n\n/**\n * Gives feedback after a question has been answered\n */\nexport const OakQuizFeedback = ({\n feedback,\n answerFeedback,\n}: OakQuizFeedbackProps) => {\n let feedbackLabel: string;\n\n switch (feedback) {\n case \"correct\":\n feedbackLabel = \"Correct\";\n break;\n case \"incorrect\":\n feedbackLabel = \"Incorrect\";\n break;\n case \"partially-correct\":\n feedbackLabel = \"Almost correct\";\n break;\n }\n\n return (\n <OakBox aria-live=\"polite\">\n <OakFlex $gap=\"space-between-xs\">\n <OakRoundIcon\n iconName={feedback === \"correct\" ? \"tick\" : \"cross\"}\n alt=\"\"\n $pa=\"inner-padding-none\"\n $background={feedback === \"correct\" ? \"icon-success\" : \"icon-error\"}\n $colorFilter=\"text-inverted\"\n $width=\"all-spacing-6\"\n $height=\"all-spacing-6\"\n />\n <OakSpan\n $font=\"heading-6\"\n $color={feedback === \"correct\" ? \"text-success\" : \"text-error\"}\n >\n {feedbackLabel}\n </OakSpan>\n </OakFlex>\n {answerFeedback && (\n <OakSpan\n as=\"p\"\n $mt=\"space-between-xs\"\n $font={feedback === \"correct\" ? \"body-2-bold\" : \"body-2\"}\n >\n {answerFeedback}\n </OakSpan>\n )}\n </OakBox>\n );\n};\n","import React, { ReactNode } from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakQuizHint, OakQuizHintProps } from \"../OakQuizHint\";\nimport {\n OakQuizFeedback,\n OakQuizFeedbackProps,\n} from \"../OakQuizFeedback/OakQuizFeedback\";\n\nimport { OakFlex } from \"@/components/atoms\";\n\n/**\n * `content-box` ensures that the border is not subtracted from the height of the element\n */\nconst StyledOakFlex = styled(OakFlex)`\n box-sizing: content-box;\n`;\n\nexport type OakLessonBottomNavProps = {\n children?: ReactNode;\n feedback?: OakQuizFeedbackProps[\"feedback\"] | null;\n answerFeedback?: OakQuizFeedbackProps[\"answerFeedback\"];\n hint?: OakQuizHintProps[\"hint\"];\n};\n\n/**\n * Renders feedback for an answer and onward navigation buttons to continue the lesson\n */\nexport const OakLessonBottomNav = ({\n hint,\n feedback,\n answerFeedback,\n children,\n}: OakLessonBottomNavProps) => {\n let content: ReactNode;\n\n switch (true) {\n case !!feedback:\n content = (\n <OakQuizFeedback feedback={feedback} answerFeedback={answerFeedback} />\n );\n break;\n case !!hint:\n content = <OakQuizHint hint={hint} />;\n break;\n default:\n content = null;\n }\n\n return (\n <StyledOakFlex\n $flexDirection={[\"column\", \"row\"]}\n $pa=\"inner-padding-m\"\n $minHeight=\"all-spacing-9\"\n $gap=\"space-between-m\"\n >\n <OakFlex $alignItems=\"center\">{content}</OakFlex>\n <OakFlex\n $flexGrow=\"1\"\n $height=\"fit-content\"\n $alignSelf=\"flex-end\"\n $justifyContent={[\"initial\", \"flex-end\"]}\n $width={[\"100%\", \"auto\"]}\n >\n {children}\n </OakFlex>\n </StyledOakFlex>\n );\n};\n","import React, { ReactNode } from \"react\";\nimport styled from \"styled-components\";\n\nimport {\n OakBox,\n OakFlex,\n OakHeading,\n OakIconProps,\n OakSpan,\n} from \"@/components/atoms\";\nimport { OakRoundIcon } from \"@/components/molecules\";\nimport { getBreakpoint } from \"@/styles/utils/responsiveStyle\";\n\ntype LessonSectionName = \"intro\" | \"starter-quiz\" | \"video\" | \"exit-quiz\";\n\nconst StyledMobileSummary = styled(OakSpan)`\n @media (min-width: ${getBreakpoint(\"small\")}px) {\n display: none;\n }\n`;\n\nexport type OakLessonTopNavProps = {\n lessonSectionName: LessonSectionName;\n /**\n * Slot to render `OakBackLink` or similar\n */\n backLinkSlot: ReactNode;\n heading: ReactNode;\n /**\n * Displayed at the mobile breakpoint where the counter is not rendered.\n * Provides alternative content for the counter/progress in the lesson.\n */\n mobileSummary: ReactNode;\n /**\n * Slot to render `OakQuizCounter` or similar\n */\n counterSlot?: ReactNode;\n};\n\n/**\n * Controls for navigating back and displaying progress in a lesson\n */\nexport const OakLessonTopNav = ({\n lessonSectionName,\n backLinkSlot,\n counterSlot,\n heading,\n mobileSummary,\n}: OakLessonTopNavProps) => {\n return (\n <OakFlex $gap=\"space-between-m\" $alignItems=\"center\">\n <OakBox $pl={[\"inner-padding-none\", \"inner-padding-s\"]}>\n {backLinkSlot}\n </OakBox>\n <OakFlex $flexGrow=\"none\">\n <OakRoundIcon\n {...pickSectionIcon(lessonSectionName)}\n $width=\"all-spacing-8\"\n $height=\"all-spacing-8\"\n />\n </OakFlex>\n <OakBox>\n <OakHeading tag=\"h1\" $font={[\"heading-7\", \"heading-5\"]}>\n {heading}\n </OakHeading>\n <StyledMobileSummary $font=\"body-3\">\n {mobileSummary}\n </StyledMobileSummary>\n </OakBox>\n <OakFlex $flexGrow={1} $justifyContent=\"flex-end\">\n <OakBox $display={[\"none\", \"block\"]}>{counterSlot}</OakBox>\n </OakFlex>\n </OakFlex>\n );\n};\n\nfunction pickSectionIcon(\n sectionName: LessonSectionName,\n): Pick<OakIconProps, \"iconName\" | \"$background\"> {\n switch (sectionName) {\n case \"intro\":\n return {\n iconName: \"intro\",\n $background: \"aqua110\",\n };\n case \"starter-quiz\":\n return {\n iconName: \"quiz\",\n $background: \"mint110\",\n };\n case \"video\":\n return {\n iconName: \"video\",\n $background: \"pink110\",\n };\n case \"exit-quiz\":\n return {\n iconName: \"quiz\",\n $background: \"lemon110\",\n };\n }\n}\n","import React from \"react\";\n\nimport { OakSpan } from \"@/components/atoms\";\n\nexport type OakQuizCounterProps = {\n counter: number;\n total: number;\n};\n\n/**\n * A counter representing progress through the questions in a quiz\n */\nexport const OakQuizCounter = (props: OakQuizCounterProps) => {\n const { counter, total } = props;\n return (\n <OakSpan $font={\"heading-light-4\"} $color={\"text-disabled\"}>\n <OakSpan $font={\"heading-4\"} $color={\"text-primary\"}>\n {counter}{\" \"}\n </OakSpan>\n of {total}\n </OakSpan>\n );\n};\n","import React, { ReactNode } from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex } from \"@/components/atoms\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { getBreakpoint } from \"@/styles/utils/responsiveStyle\";\nimport { OakCombinedColorToken } from \"@/styles\";\n\ntype LessonSectionName =\n | \"overview\"\n | \"intro\"\n | \"starter-quiz\"\n | \"video\"\n | \"exit-quiz\"\n | \"review\";\n\nexport type OakLessonLayoutProps = {\n lessonSectionName: LessonSectionName;\n topNavSlot: ReactNode;\n bottomNavSlot: ReactNode;\n children: ReactNode;\n};\n\n/**\n * `OakBox` does not support space-between tokens on `padding` only `margin`, so we need to\n * set it here to apply appropriate padding to the top of the content.\n */\nconst StyledLayoutBox = styled(OakBox)`\n @media (min-width: ${getBreakpoint(\"small\")}px) {\n padding-top: ${parseSpacing(\"space-between-xl\")};\n }\n`;\n\nconst StickyFooter = styled(OakBox)`\n position: sticky;\n bottom: 0;\n z-index: 10;\n`;\n\n/**\n * Provides overall page layout and colours for the sections of a lesson.\n */\nexport const OakLessonLayout = ({\n lessonSectionName,\n topNavSlot,\n bottomNavSlot,\n children,\n}: OakLessonLayoutProps) => {\n const [\n pageBackgroundColor,\n contentBackgroundColor,\n contentBorderColor,\n mobileContentBackgroundColor,\n ] = pickSectionColours(lessonSectionName);\n\n return (\n <StyledLayoutBox\n $display={\"flex\"}\n $width=\"100%\"\n $minHeight={\"100%\"}\n $ph={[\"inner-padding-none\", \"inner-padding-xl\"]}\n $background={pageBackgroundColor}\n >\n <OakFlex\n $flexDirection=\"column\"\n $flexGrow={1}\n $background={[mobileContentBackgroundColor, contentBackgroundColor]}\n $btr={[null, \"border-radius-xl\"]}\n $bt={[null, \"border-solid-xl\"]}\n $bh={[null, \"border-solid-xl\"]}\n $borderColor={[null, contentBorderColor]}\n $maxWidth=\"all-spacing-24\"\n $minHeight=\"100%\"\n $mh=\"auto\"\n $pt={[\"inner-padding-none\", \"inner-padding-m\"]}\n $gap={[\"space-between-l\", \"space-between-xl\"]}\n >\n {topNavSlot && (\n <OakBox\n $pv=\"inner-padding-l\"\n $pl={[\"inner-padding-m\", \"inner-padding-xs\"]}\n $pr={[\"inner-padding-m\", \"inner-padding-none\"]}\n $mr={[\"space-between-none\", \"space-between-l\"]}\n $background={[\"bg-primary\", \"transparent\"]}\n >\n {topNavSlot}\n </OakBox>\n )}\n <OakFlex $flexGrow={1} $flexDirection=\"column\">\n {children}\n </OakFlex>\n {bottomNavSlot && (\n <StickyFooter\n $mh={[\n \"space-between-none\",\n \"space-between-none\",\n \"space-between-sssx\",\n ]}\n $borderColor={contentBorderColor}\n $bt={\"border-solid-xl\"}\n $background={[\"bg-primary\", contentBackgroundColor]}\n >\n {bottomNavSlot}\n </StickyFooter>\n )}\n </OakFlex>\n </StyledLayoutBox>\n );\n};\n\nfunction pickSectionColours(\n sectionName: LessonSectionName,\n): [\n pageBackgroundColor: OakCombinedColorToken,\n contentBackgroundColor: OakCombinedColorToken,\n contentBorderColor: OakCombinedColorToken,\n mobileContentBackgroundColor: OakCombinedColorToken,\n] {\n switch (sectionName) {\n case \"overview\":\n return [\n \"bg-decorative1-main\",\n \"bg-primary\",\n \"border-decorative1-stronger\",\n \"bg-primary\",\n ];\n case \"intro\":\n return [\n \"bg-decorative2-subdued\",\n \"bg-decorative2-very-subdued\",\n \"border-inverted\",\n \"bg-decorative2-subdued\",\n ];\n case \"starter-quiz\":\n return [\n \"bg-decorative1-main\",\n \"bg-decorative1-very-subdued\",\n \"border-inverted\",\n \"bg-decorative1-subdued\",\n ];\n case \"video\":\n return [\n \"bg-decorative4-subdued\",\n \"bg-primary\",\n \"border-decorative4\",\n \"bg-primary\",\n ];\n case \"exit-quiz\":\n return [\n \"bg-decorative5-main\",\n \"bg-decorative5-very-subdued\",\n \"border-inverted\",\n \"bg-decorative5-subdued\",\n ];\n case \"review\":\n return [\n \"bg-decorative1-main\",\n \"bg-primary\",\n \"border-decorative1-stronger\",\n \"bg-primary\",\n ];\n }\n}\n","import React, { ComponentPropsWithoutRef, ElementType } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport {\n OakBox,\n OakFlex,\n OakIcon,\n OakIconName,\n OakSpan,\n} from \"@/components/atoms\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { OakRoundIcon } from \"@/components/molecules\";\nimport { parseColorFilter } from \"@/styles/helpers/parseColorFilter\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { OakCombinedColorToken } from \"@/styles\";\n\ntype LessonSectionName = \"intro\" | \"starter-quiz\" | \"video\" | \"exit-quiz\";\n\ntype BaseOakLessonNavItemProps<C extends ElementType> = {\n as?: C;\n /**\n * Disable the section preventing navigation to it.\n */\n disabled?: boolean;\n} & ComponentPropsWithoutRef<C>;\n\ntype QuizSectionProps = {\n lessonSectionName: \"starter-quiz\" | \"exit-quiz\";\n /**\n * The number of questions in the quiz\n */\n numQuestions: number;\n /**\n * The number of questions answered correctly\n */\n grade: number;\n};\n\ntype VideoSectionProps = {\n lessonSectionName: \"video\";\n};\n\ntype IntroSectionProps = {\n lessonSectionName: \"intro\";\n};\n\ntype SectionProps = {\n /**\n * Denotes the progress in the lesson section\n */\n progress: \"not-started\" | \"in-progress\" | \"complete\";\n} & (IntroSectionProps | QuizSectionProps | VideoSectionProps);\n\nexport type OakLessonNavItemProps<C extends ElementType> =\n BaseOakLessonNavItemProps<C> & SectionProps;\n\nconst StyledLabel = styled(OakBox)``;\n\nconst StyledRoundIcon = styled(OakRoundIcon)<{\n $disabled?: boolean;\n}>`\n width: ${parseSpacing(\"all-spacing-8\")};\n height: ${parseSpacing(\"all-spacing-8\")};\n padding: 0;\n\n background: transparent;\n\n img {\n filter: ${(props) =>\n parseColorFilter(props.$disabled ? \"icon-disabled\" : \"icon-inverted\")};\n }\n`;\n\nconst activeIconStyles = css`\n ${StyledRoundIcon} {\n background: ${parseColor(\"bg-btn-primary\")};\n\n img {\n filter: ${parseColorFilter(\"icon-main\")};\n }\n }\n`;\n\nconst StyledLessonNavItem = styled(OakFlex)<{ $disabled?: boolean }>`\n outline: none;\n text-align: initial;\n\n &:focus-visible {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n\n ${(props) => props.$disabled && \"cursor: default\"}\n\n ${(props) =>\n !props.$disabled &&\n css`\n cursor: pointer;\n\n /* Don't apply hover styles on touch devices */\n @media (hover: hover) {\n &:hover {\n ${StyledLabel} {\n text-decoration: underline;\n }\n\n ${activeIconStyles}\n }\n }\n\n &:active {\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")},\n ${parseDropShadow(\"drop-shadow-grey\")};\n ${activeIconStyles}\n }\n `}\n`;\n\nconst FlexedOakBox = styled(OakBox)`\n flex: 1;\n`;\n\n/**\n * Enables navigation to the given section of a lesson as well as displaying current progress\n */\nexport const OakLessonNavItem = <C extends ElementType = \"a\">(\n props: OakLessonNavItemProps<C>,\n) => {\n const { as, lessonSectionName, progress, disabled, href, onClick, ...rest } =\n props;\n const [notStartedBackgroundColor, backgroundColor, borderColor] =\n pickColorsForSection(lessonSectionName);\n\n return (\n <StyledLessonNavItem\n as={disabled ? \"div\" : as ?? \"a\"}\n $gap=\"space-between-m\"\n $alignItems=\"center\"\n $background={\n progress === \"not-started\" ? notStartedBackgroundColor : backgroundColor\n }\n $ph={[\"inner-padding-m\", \"inner-padding-xl\"]}\n $pv=\"inner-padding-l\"\n $borderRadius=\"border-radius-l\"\n $borderColor={borderColor}\n $ba=\"border-solid-l\"\n $disabled={disabled}\n $color=\"text-primary\"\n href={disabled ? undefined : href}\n onClick={disabled ? undefined : onClick}\n {...rest}\n >\n <OakFlex $width=\"all-spacing-13\" $justifyContent=\"center\">\n <OakIcon\n iconName={pickIconForSection(lessonSectionName)}\n $width=\"all-spacing-10\"\n $height=\"all-spacing-10\"\n />\n </OakFlex>\n <FlexedOakBox>\n <StyledLabel\n as=\"strong\"\n $font={[\"heading-6\", \"heading-5\"]}\n $color={disabled ? \"text-disabled\" : \"text-primary\"}\n >\n {pickLabelForSection(lessonSectionName)}\n </StyledLabel>\n <OakBox $font={[\"body-2\", \"body-1\"]}>\n {pickSummaryForProgress(props)}\n </OakBox>\n </FlexedOakBox>\n {renderQuestionCounter(props)}\n <StyledRoundIcon iconName=\"chevron-right\" $disabled={disabled} />\n </StyledLessonNavItem>\n );\n};\n\nfunction renderQuestionCounter(props: SectionProps) {\n if (props.progress !== \"complete\") {\n return null;\n }\n\n /**\n * The large answer counter is only rendered when on a non-mobile screen\n */\n switch (props.lessonSectionName) {\n case \"exit-quiz\":\n case \"starter-quiz\":\n return (\n <OakBox $display={[\"none\", \"block\"]} $mr=\"space-between-m\">\n <OakSpan $font=\"heading-4\">{props.grade}</OakSpan>\n <OakSpan $font=\"heading-6\">&nbsp;/&nbsp;{props.numQuestions}</OakSpan>\n </OakBox>\n );\n default:\n return null;\n }\n}\n\nfunction pickIconForSection(sectionName: LessonSectionName): OakIconName {\n switch (sectionName) {\n case \"intro\":\n return \"intro\";\n case \"starter-quiz\":\n case \"exit-quiz\":\n return \"quiz\";\n case \"video\":\n return \"video\";\n }\n}\n\nfunction pickColorsForSection(\n sectionName: LessonSectionName,\n): [\n notStartedBackgroundColor: OakCombinedColorToken,\n backgroundColor: OakCombinedColorToken,\n borderColor: OakCombinedColorToken,\n] {\n switch (sectionName) {\n case \"intro\":\n return [\n \"bg-decorative2-very-subdued\",\n \"bg-decorative2-main\",\n \"border-decorative2-stronger\",\n ];\n case \"starter-quiz\":\n return [\n \"bg-decorative1-very-subdued\",\n \"bg-decorative1-main\",\n \"border-decorative1-stronger\",\n ];\n case \"video\":\n return [\n \"bg-decorative4-very-subdued\",\n \"bg-decorative4-main\",\n \"border-decorative4-stronger\",\n ];\n case \"exit-quiz\":\n return [\n \"bg-decorative5-very-subdued\",\n \"bg-decorative5-main\",\n \"border-decorative5-stronger\",\n ];\n }\n}\n\nfunction pickLabelForSection(sectionName: LessonSectionName): string {\n switch (sectionName) {\n case \"intro\":\n return \"Introduction\";\n case \"starter-quiz\":\n return \"Starter quiz\";\n case \"video\":\n return \"Lesson video\";\n case \"exit-quiz\":\n return \"Exit quiz\";\n }\n}\n\nfunction pickSummaryForProgress(props: SectionProps) {\n switch (props.progress) {\n case \"not-started\":\n return pickSummaryForNotStarted(props);\n case \"in-progress\":\n return \"In progress...\";\n case \"complete\":\n return (\n <OakFlex $gap=\"space-between-sssx\" $alignItems=\"center\">\n <OakIcon\n iconName=\"tick\"\n $width=\"all-spacing-6\"\n $height=\"all-spacing-6\"\n />\n {pickSummaryForComplete(props)}\n </OakFlex>\n );\n }\n}\n\nfunction pickSummaryForNotStarted(props: SectionProps) {\n switch (props.lessonSectionName) {\n case \"intro\":\n return \"Prepare\";\n case \"starter-quiz\":\n return `Activate - ${props.numQuestions} Questions`;\n case \"exit-quiz\":\n return `Check - ${props.numQuestions} questions`;\n case \"video\":\n return \"Learn\";\n }\n}\n\nfunction pickSummaryForComplete(props: SectionProps) {\n switch (props.lessonSectionName) {\n case \"intro\":\n case \"video\":\n return \"Completed\";\n case \"starter-quiz\":\n case \"exit-quiz\":\n // The counter is rendered as the summary next\n // when on a mobile device, so it is hidden on larger screens\n return (\n <>\n <OakBox $display={[\"none\", \"block\"]}>Completed</OakBox>\n <OakBox $display={[\"block\", \"none\"]}>\n {props.grade}/{props.numQuestions} correct\n </OakBox>\n </>\n );\n }\n}\n","import React from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex, OakIcon, OakSpan } from \"@/components/atoms\";\nimport { OakRoundIcon } from \"@/components/molecules\";\nimport { OakCombinedColorToken } from \"@/styles\";\n\ntype LessonSectionName = \"intro\" | \"starter-quiz\" | \"video\" | \"exit-quiz\";\ntype BaseOakLessonReviewItemProps = {\n completed: boolean;\n};\ntype QuizSectionProps = {\n lessonSectionName: \"starter-quiz\" | \"exit-quiz\";\n /**\n * The number of questions in the quiz\n */\n numQuestions: number;\n /**\n * The number of questions answered correctly\n */\n grade: number;\n};\n\ntype VideoSectionProps = {\n lessonSectionName: \"video\";\n};\ntype IntroSectionProps = {\n lessonSectionName: \"intro\";\n};\n\nexport type OakLessonReviewItemProps = BaseOakLessonReviewItemProps &\n (IntroSectionProps | QuizSectionProps | VideoSectionProps);\n\nconst StyledLessonReviewItem = styled(OakFlex)<{ completed: boolean }>`\n outline: none;\n text-align: initial;\n`;\n\nexport const OakLessonReviewItem = (props: OakLessonReviewItemProps) => {\n const { completed, lessonSectionName, ...rest } = props;\n const [completedBackgroundColor, borderColor, iconBackgroundColor] =\n pickColorsForSection(lessonSectionName);\n const lessonSectionNameToIconMap = new Map();\n\n lessonSectionNameToIconMap.set(\"intro\", \"intro\");\n lessonSectionNameToIconMap.set(\"starter-quiz\", \"quiz\");\n lessonSectionNameToIconMap.set(\"exit-quiz\", \"quiz\");\n lessonSectionNameToIconMap.set(\"video\", \"video\");\n\n return (\n <StyledLessonReviewItem\n completed={completed}\n $gap=\"space-between-m\"\n $alignItems=\"center\"\n $background={completed ? completedBackgroundColor : \"white\"}\n $ph={[\"inner-padding-m\", \"inner-padding-xl\"]}\n $pv=\"inner-padding-l\"\n $borderRadius=\"border-radius-l\"\n $borderColor={completed ? completedBackgroundColor : borderColor}\n $ba=\"border-solid-l\"\n {...rest}\n >\n <OakRoundIcon\n iconName={lessonSectionNameToIconMap.get(lessonSectionName)}\n $width=\"all-spacing-10\"\n $height=\"all-spacing-10\"\n $background={iconBackgroundColor}\n />\n <OakFlex $flexGrow={1} $flexShrink={1} $flexDirection={\"column\"}>\n <OakBox $font={[\"heading-6\", \"heading-5\"]} $color={\"text-primary\"}>\n {pickLabelForSection(lessonSectionName)}\n </OakBox>\n <OakBox $font={[\"body-2\", \"body-1\"]}>\n {pickSummaryForProgress(props)}\n </OakBox>\n </OakFlex>\n {renderQuestionCounter(props)}\n </StyledLessonReviewItem>\n );\n};\n\nconst pickSummaryForProgress = (props: OakLessonReviewItemProps) => {\n if (props.completed === false) {\n return pickSummaryForIncomplete(props);\n } else {\n return (\n <OakFlex $gap=\"space-between-sssx\" $alignItems=\"center\">\n <OakIcon\n iconName=\"tick\"\n $width=\"all-spacing-6\"\n $height=\"all-spacing-6\"\n />\n Completed\n </OakFlex>\n );\n }\n};\n\nconst pickSummaryForIncomplete = (props: OakLessonReviewItemProps) => {\n switch (props.lessonSectionName) {\n case \"intro\":\n return \"Prepare\";\n case \"starter-quiz\":\n return `Activate - ${props.numQuestions} questions`;\n case \"exit-quiz\":\n return `Check - ${props.numQuestions} questions`;\n case \"video\":\n return \"Learn\";\n }\n};\n\nconst pickLabelForSection = (sectionName: LessonSectionName): string => {\n switch (sectionName) {\n case \"intro\":\n return \"Introduction\";\n case \"starter-quiz\":\n return \"Starter quiz\";\n case \"video\":\n return \"Lesson video\";\n case \"exit-quiz\":\n return \"Exit quiz\";\n }\n};\n\nconst pickColorsForSection = (\n sectionName: LessonSectionName,\n): [\n completedBackgroundColor: OakCombinedColorToken,\n borderColor: OakCombinedColorToken,\n iconBackgroundColor: OakCombinedColorToken,\n] => {\n switch (sectionName) {\n case \"intro\":\n return [\"bg-decorative2-very-subdued\", \"border-decorative2\", \"aqua\"];\n case \"starter-quiz\":\n return [\"bg-decorative1-very-subdued\", \"border-decorative1\", \"mint\"];\n case \"video\":\n return [\"bg-decorative4-very-subdued\", \"border-decorative4\", \"pink\"];\n case \"exit-quiz\":\n return [\"bg-decorative5-very-subdued\", \"border-decorative5\", \"lemon\"];\n }\n};\n\nconst renderQuestionCounter = (props: OakLessonReviewItemProps) => {\n if (props.completed === false) {\n return null;\n }\n\n switch (props.lessonSectionName) {\n case \"exit-quiz\":\n case \"starter-quiz\":\n return (\n <OakBox>\n <OakSpan $font=\"heading-4\">{props.grade}</OakSpan>\n <OakSpan $font=\"heading-6\">&nbsp;/&nbsp;{props.numQuestions}</OakSpan>\n </OakBox>\n );\n default:\n return null;\n }\n};\n","import { useMemo, useLayoutEffect, useEffect, useRef, useCallback } from 'react';\n\nfunction useCombinedRefs() {\n for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n refs[_key] = arguments[_key];\n }\n\n return useMemo(() => node => {\n refs.forEach(ref => ref(node));\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n refs);\n}\n\n// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js\nconst canUseDOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\nfunction isWindow(element) {\n const elementString = Object.prototype.toString.call(element);\n return elementString === '[object Window]' || // In Electron context the Window object serializes to [object global]\n elementString === '[object global]';\n}\n\nfunction isNode(node) {\n return 'nodeType' in node;\n}\n\nfunction getWindow(target) {\n var _target$ownerDocument, _target$ownerDocument2;\n\n if (!target) {\n return window;\n }\n\n if (isWindow(target)) {\n return target;\n }\n\n if (!isNode(target)) {\n return window;\n }\n\n return (_target$ownerDocument = (_target$ownerDocument2 = target.ownerDocument) == null ? void 0 : _target$ownerDocument2.defaultView) != null ? _target$ownerDocument : window;\n}\n\nfunction isDocument(node) {\n const {\n Document\n } = getWindow(node);\n return node instanceof Document;\n}\n\nfunction isHTMLElement(node) {\n if (isWindow(node)) {\n return false;\n }\n\n return node instanceof getWindow(node).HTMLElement;\n}\n\nfunction isSVGElement(node) {\n return node instanceof getWindow(node).SVGElement;\n}\n\nfunction getOwnerDocument(target) {\n if (!target) {\n return document;\n }\n\n if (isWindow(target)) {\n return target.document;\n }\n\n if (!isNode(target)) {\n return document;\n }\n\n if (isDocument(target)) {\n return target;\n }\n\n if (isHTMLElement(target) || isSVGElement(target)) {\n return target.ownerDocument;\n }\n\n return document;\n}\n\n/**\r\n * A hook that resolves to useEffect on the server and useLayoutEffect on the client\r\n * @param callback {function} Callback function that is invoked when the dependencies of the hook change\r\n */\n\nconst useIsomorphicLayoutEffect = canUseDOM ? useLayoutEffect : useEffect;\n\nfunction useEvent(handler) {\n const handlerRef = useRef(handler);\n useIsomorphicLayoutEffect(() => {\n handlerRef.current = handler;\n });\n return useCallback(function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return handlerRef.current == null ? void 0 : handlerRef.current(...args);\n }, []);\n}\n\nfunction useInterval() {\n const intervalRef = useRef(null);\n const set = useCallback((listener, duration) => {\n intervalRef.current = setInterval(listener, duration);\n }, []);\n const clear = useCallback(() => {\n if (intervalRef.current !== null) {\n clearInterval(intervalRef.current);\n intervalRef.current = null;\n }\n }, []);\n return [set, clear];\n}\n\nfunction useLatestValue(value, dependencies) {\n if (dependencies === void 0) {\n dependencies = [value];\n }\n\n const valueRef = useRef(value);\n useIsomorphicLayoutEffect(() => {\n if (valueRef.current !== value) {\n valueRef.current = value;\n }\n }, dependencies);\n return valueRef;\n}\n\nfunction useLazyMemo(callback, dependencies) {\n const valueRef = useRef();\n return useMemo(() => {\n const newValue = callback(valueRef.current);\n valueRef.current = newValue;\n return newValue;\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [...dependencies]);\n}\n\nfunction useNodeRef(onChange) {\n const onChangeHandler = useEvent(onChange);\n const node = useRef(null);\n const setNodeRef = useCallback(element => {\n if (element !== node.current) {\n onChangeHandler == null ? void 0 : onChangeHandler(element, node.current);\n }\n\n node.current = element;\n }, //eslint-disable-next-line\n []);\n return [node, setNodeRef];\n}\n\nfunction usePrevious(value) {\n const ref = useRef();\n useEffect(() => {\n ref.current = value;\n }, [value]);\n return ref.current;\n}\n\nlet ids = {};\nfunction useUniqueId(prefix, value) {\n return useMemo(() => {\n if (value) {\n return value;\n }\n\n const id = ids[prefix] == null ? 0 : ids[prefix] + 1;\n ids[prefix] = id;\n return prefix + \"-\" + id;\n }, [prefix, value]);\n}\n\nfunction createAdjustmentFn(modifier) {\n return function (object) {\n for (var _len = arguments.length, adjustments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n adjustments[_key - 1] = arguments[_key];\n }\n\n return adjustments.reduce((accumulator, adjustment) => {\n const entries = Object.entries(adjustment);\n\n for (const [key, valueAdjustment] of entries) {\n const value = accumulator[key];\n\n if (value != null) {\n accumulator[key] = value + modifier * valueAdjustment;\n }\n }\n\n return accumulator;\n }, { ...object\n });\n };\n}\n\nconst add = /*#__PURE__*/createAdjustmentFn(1);\nconst subtract = /*#__PURE__*/createAdjustmentFn(-1);\n\nfunction hasViewportRelativeCoordinates(event) {\n return 'clientX' in event && 'clientY' in event;\n}\n\nfunction isKeyboardEvent(event) {\n if (!event) {\n return false;\n }\n\n const {\n KeyboardEvent\n } = getWindow(event.target);\n return KeyboardEvent && event instanceof KeyboardEvent;\n}\n\nfunction isTouchEvent(event) {\n if (!event) {\n return false;\n }\n\n const {\n TouchEvent\n } = getWindow(event.target);\n return TouchEvent && event instanceof TouchEvent;\n}\n\n/**\r\n * Returns the normalized x and y coordinates for mouse and touch events.\r\n */\n\nfunction getEventCoordinates(event) {\n if (isTouchEvent(event)) {\n if (event.touches && event.touches.length) {\n const {\n clientX: x,\n clientY: y\n } = event.touches[0];\n return {\n x,\n y\n };\n } else if (event.changedTouches && event.changedTouches.length) {\n const {\n clientX: x,\n clientY: y\n } = event.changedTouches[0];\n return {\n x,\n y\n };\n }\n }\n\n if (hasViewportRelativeCoordinates(event)) {\n return {\n x: event.clientX,\n y: event.clientY\n };\n }\n\n return null;\n}\n\nconst CSS = /*#__PURE__*/Object.freeze({\n Translate: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n const {\n x,\n y\n } = transform;\n return \"translate3d(\" + (x ? Math.round(x) : 0) + \"px, \" + (y ? Math.round(y) : 0) + \"px, 0)\";\n }\n\n },\n Scale: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n const {\n scaleX,\n scaleY\n } = transform;\n return \"scaleX(\" + scaleX + \") scaleY(\" + scaleY + \")\";\n }\n\n },\n Transform: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n return [CSS.Translate.toString(transform), CSS.Scale.toString(transform)].join(' ');\n }\n\n },\n Transition: {\n toString(_ref) {\n let {\n property,\n duration,\n easing\n } = _ref;\n return property + \" \" + duration + \"ms \" + easing;\n }\n\n }\n});\n\nconst SELECTOR = 'a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]';\nfunction findFirstFocusableNode(element) {\n if (element.matches(SELECTOR)) {\n return element;\n }\n\n return element.querySelector(SELECTOR);\n}\n\nexport { CSS, add, canUseDOM, findFirstFocusableNode, getEventCoordinates, getOwnerDocument, getWindow, hasViewportRelativeCoordinates, isDocument, isHTMLElement, isKeyboardEvent, isNode, isSVGElement, isTouchEvent, isWindow, subtract, useCombinedRefs, useEvent, useInterval, useIsomorphicLayoutEffect, useLatestValue, useLazyMemo, useNodeRef, usePrevious, useUniqueId };\n//# sourceMappingURL=utilities.esm.js.map\n","import React, { useState, useCallback } from 'react';\n\nconst hiddenStyles = {\n display: 'none'\n};\nfunction HiddenText(_ref) {\n let {\n id,\n value\n } = _ref;\n return React.createElement(\"div\", {\n id: id,\n style: hiddenStyles\n }, value);\n}\n\nfunction LiveRegion(_ref) {\n let {\n id,\n announcement,\n ariaLiveType = \"assertive\"\n } = _ref;\n // Hide element visually but keep it readable by screen readers\n const visuallyHidden = {\n position: 'fixed',\n width: 1,\n height: 1,\n margin: -1,\n border: 0,\n padding: 0,\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(100%)',\n whiteSpace: 'nowrap'\n };\n return React.createElement(\"div\", {\n id: id,\n style: visuallyHidden,\n role: \"status\",\n \"aria-live\": ariaLiveType,\n \"aria-atomic\": true\n }, announcement);\n}\n\nfunction useAnnouncement() {\n const [announcement, setAnnouncement] = useState('');\n const announce = useCallback(value => {\n if (value != null) {\n setAnnouncement(value);\n }\n }, []);\n return {\n announce,\n announcement\n };\n}\n\nexport { HiddenText, LiveRegion, useAnnouncement };\n//# sourceMappingURL=accessibility.esm.js.map\n","import React, { createContext, useContext, useEffect, useState, useCallback, useMemo, useRef, useReducer, memo, cloneElement, forwardRef } from 'react';\nimport { createPortal, unstable_batchedUpdates } from 'react-dom';\nimport { useUniqueId, getEventCoordinates, getWindow, isDocument, isHTMLElement, isSVGElement, canUseDOM, isWindow, isNode, getOwnerDocument, add, isKeyboardEvent, subtract, useLazyMemo, useInterval, usePrevious, useLatestValue, useEvent, useIsomorphicLayoutEffect, useNodeRef, findFirstFocusableNode, CSS } from '@dnd-kit/utilities';\nimport { useAnnouncement, HiddenText, LiveRegion } from '@dnd-kit/accessibility';\n\nconst DndMonitorContext = /*#__PURE__*/createContext(null);\n\nfunction useDndMonitor(listener) {\n const registerListener = useContext(DndMonitorContext);\n useEffect(() => {\n if (!registerListener) {\n throw new Error('useDndMonitor must be used within a children of <DndContext>');\n }\n\n const unsubscribe = registerListener(listener);\n return unsubscribe;\n }, [listener, registerListener]);\n}\n\nfunction useDndMonitorProvider() {\n const [listeners] = useState(() => new Set());\n const registerListener = useCallback(listener => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n }, [listeners]);\n const dispatch = useCallback(_ref => {\n let {\n type,\n event\n } = _ref;\n listeners.forEach(listener => {\n var _listener$type;\n\n return (_listener$type = listener[type]) == null ? void 0 : _listener$type.call(listener, event);\n });\n }, [listeners]);\n return [dispatch, registerListener];\n}\n\nconst defaultScreenReaderInstructions = {\n draggable: \"\\n To pick up a draggable item, press the space bar.\\n While dragging, use the arrow keys to move the item.\\n Press space again to drop the item in its new position, or press escape to cancel.\\n \"\n};\nconst defaultAnnouncements = {\n onDragStart(_ref) {\n let {\n active\n } = _ref;\n return \"Picked up draggable item \" + active.id + \".\";\n },\n\n onDragOver(_ref2) {\n let {\n active,\n over\n } = _ref2;\n\n if (over) {\n return \"Draggable item \" + active.id + \" was moved over droppable area \" + over.id + \".\";\n }\n\n return \"Draggable item \" + active.id + \" is no longer over a droppable area.\";\n },\n\n onDragEnd(_ref3) {\n let {\n active,\n over\n } = _ref3;\n\n if (over) {\n return \"Draggable item \" + active.id + \" was dropped over droppable area \" + over.id;\n }\n\n return \"Draggable item \" + active.id + \" was dropped.\";\n },\n\n onDragCancel(_ref4) {\n let {\n active\n } = _ref4;\n return \"Dragging was cancelled. Draggable item \" + active.id + \" was dropped.\";\n }\n\n};\n\nfunction Accessibility(_ref) {\n let {\n announcements = defaultAnnouncements,\n container,\n hiddenTextDescribedById,\n screenReaderInstructions = defaultScreenReaderInstructions\n } = _ref;\n const {\n announce,\n announcement\n } = useAnnouncement();\n const liveRegionId = useUniqueId(\"DndLiveRegion\");\n const [mounted, setMounted] = useState(false);\n useEffect(() => {\n setMounted(true);\n }, []);\n useDndMonitor(useMemo(() => ({\n onDragStart(_ref2) {\n let {\n active\n } = _ref2;\n announce(announcements.onDragStart({\n active\n }));\n },\n\n onDragMove(_ref3) {\n let {\n active,\n over\n } = _ref3;\n\n if (announcements.onDragMove) {\n announce(announcements.onDragMove({\n active,\n over\n }));\n }\n },\n\n onDragOver(_ref4) {\n let {\n active,\n over\n } = _ref4;\n announce(announcements.onDragOver({\n active,\n over\n }));\n },\n\n onDragEnd(_ref5) {\n let {\n active,\n over\n } = _ref5;\n announce(announcements.onDragEnd({\n active,\n over\n }));\n },\n\n onDragCancel(_ref6) {\n let {\n active,\n over\n } = _ref6;\n announce(announcements.onDragCancel({\n active,\n over\n }));\n }\n\n }), [announce, announcements]));\n\n if (!mounted) {\n return null;\n }\n\n const markup = React.createElement(React.Fragment, null, React.createElement(HiddenText, {\n id: hiddenTextDescribedById,\n value: screenReaderInstructions.draggable\n }), React.createElement(LiveRegion, {\n id: liveRegionId,\n announcement: announcement\n }));\n return container ? createPortal(markup, container) : markup;\n}\n\nvar Action;\n\n(function (Action) {\n Action[\"DragStart\"] = \"dragStart\";\n Action[\"DragMove\"] = \"dragMove\";\n Action[\"DragEnd\"] = \"dragEnd\";\n Action[\"DragCancel\"] = \"dragCancel\";\n Action[\"DragOver\"] = \"dragOver\";\n Action[\"RegisterDroppable\"] = \"registerDroppable\";\n Action[\"SetDroppableDisabled\"] = \"setDroppableDisabled\";\n Action[\"UnregisterDroppable\"] = \"unregisterDroppable\";\n})(Action || (Action = {}));\n\nfunction noop() {}\n\nfunction useSensor(sensor, options) {\n return useMemo(() => ({\n sensor,\n options: options != null ? options : {}\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [sensor, options]);\n}\n\nfunction useSensors() {\n for (var _len = arguments.length, sensors = new Array(_len), _key = 0; _key < _len; _key++) {\n sensors[_key] = arguments[_key];\n }\n\n return useMemo(() => [...sensors].filter(sensor => sensor != null), // eslint-disable-next-line react-hooks/exhaustive-deps\n [...sensors]);\n}\n\nconst defaultCoordinates = /*#__PURE__*/Object.freeze({\n x: 0,\n y: 0\n});\n\n/**\r\n * Returns the distance between two points\r\n */\nfunction distanceBetween(p1, p2) {\n return Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2));\n}\n\nfunction getRelativeTransformOrigin(event, rect) {\n const eventCoordinates = getEventCoordinates(event);\n\n if (!eventCoordinates) {\n return '0 0';\n }\n\n const transformOrigin = {\n x: (eventCoordinates.x - rect.left) / rect.width * 100,\n y: (eventCoordinates.y - rect.top) / rect.height * 100\n };\n return transformOrigin.x + \"% \" + transformOrigin.y + \"%\";\n}\n\n/**\r\n * Sort collisions from smallest to greatest value\r\n */\nfunction sortCollisionsAsc(_ref, _ref2) {\n let {\n data: {\n value: a\n }\n } = _ref;\n let {\n data: {\n value: b\n }\n } = _ref2;\n return a - b;\n}\n/**\r\n * Sort collisions from greatest to smallest value\r\n */\n\nfunction sortCollisionsDesc(_ref3, _ref4) {\n let {\n data: {\n value: a\n }\n } = _ref3;\n let {\n data: {\n value: b\n }\n } = _ref4;\n return b - a;\n}\n/**\r\n * Returns the coordinates of the corners of a given rectangle:\r\n * [TopLeft {x, y}, TopRight {x, y}, BottomLeft {x, y}, BottomRight {x, y}]\r\n */\n\nfunction cornersOfRectangle(_ref5) {\n let {\n left,\n top,\n height,\n width\n } = _ref5;\n return [{\n x: left,\n y: top\n }, {\n x: left + width,\n y: top\n }, {\n x: left,\n y: top + height\n }, {\n x: left + width,\n y: top + height\n }];\n}\nfunction getFirstCollision(collisions, property) {\n if (!collisions || collisions.length === 0) {\n return null;\n }\n\n const [firstCollision] = collisions;\n return property ? firstCollision[property] : firstCollision;\n}\n\n/**\r\n * Returns the coordinates of the center of a given ClientRect\r\n */\n\nfunction centerOfRectangle(rect, left, top) {\n if (left === void 0) {\n left = rect.left;\n }\n\n if (top === void 0) {\n top = rect.top;\n }\n\n return {\n x: left + rect.width * 0.5,\n y: top + rect.height * 0.5\n };\n}\n/**\r\n * Returns the closest rectangles from an array of rectangles to the center of a given\r\n * rectangle.\r\n */\n\n\nconst closestCenter = _ref => {\n let {\n collisionRect,\n droppableRects,\n droppableContainers\n } = _ref;\n const centerRect = centerOfRectangle(collisionRect, collisionRect.left, collisionRect.top);\n const collisions = [];\n\n for (const droppableContainer of droppableContainers) {\n const {\n id\n } = droppableContainer;\n const rect = droppableRects.get(id);\n\n if (rect) {\n const distBetween = distanceBetween(centerOfRectangle(rect), centerRect);\n collisions.push({\n id,\n data: {\n droppableContainer,\n value: distBetween\n }\n });\n }\n }\n\n return collisions.sort(sortCollisionsAsc);\n};\n\n/**\r\n * Returns the closest rectangles from an array of rectangles to the corners of\r\n * another rectangle.\r\n */\n\nconst closestCorners = _ref => {\n let {\n collisionRect,\n droppableRects,\n droppableContainers\n } = _ref;\n const corners = cornersOfRectangle(collisionRect);\n const collisions = [];\n\n for (const droppableContainer of droppableContainers) {\n const {\n id\n } = droppableContainer;\n const rect = droppableRects.get(id);\n\n if (rect) {\n const rectCorners = cornersOfRectangle(rect);\n const distances = corners.reduce((accumulator, corner, index) => {\n return accumulator + distanceBetween(rectCorners[index], corner);\n }, 0);\n const effectiveDistance = Number((distances / 4).toFixed(4));\n collisions.push({\n id,\n data: {\n droppableContainer,\n value: effectiveDistance\n }\n });\n }\n }\n\n return collisions.sort(sortCollisionsAsc);\n};\n\n/**\r\n * Returns the intersecting rectangle area between two rectangles\r\n */\n\nfunction getIntersectionRatio(entry, target) {\n const top = Math.max(target.top, entry.top);\n const left = Math.max(target.left, entry.left);\n const right = Math.min(target.left + target.width, entry.left + entry.width);\n const bottom = Math.min(target.top + target.height, entry.top + entry.height);\n const width = right - left;\n const height = bottom - top;\n\n if (left < right && top < bottom) {\n const targetArea = target.width * target.height;\n const entryArea = entry.width * entry.height;\n const intersectionArea = width * height;\n const intersectionRatio = intersectionArea / (targetArea + entryArea - intersectionArea);\n return Number(intersectionRatio.toFixed(4));\n } // Rectangles do not overlap, or overlap has an area of zero (edge/corner overlap)\n\n\n return 0;\n}\n/**\r\n * Returns the rectangles that has the greatest intersection area with a given\r\n * rectangle in an array of rectangles.\r\n */\n\nconst rectIntersection = _ref => {\n let {\n collisionRect,\n droppableRects,\n droppableContainers\n } = _ref;\n const collisions = [];\n\n for (const droppableContainer of droppableContainers) {\n const {\n id\n } = droppableContainer;\n const rect = droppableRects.get(id);\n\n if (rect) {\n const intersectionRatio = getIntersectionRatio(rect, collisionRect);\n\n if (intersectionRatio > 0) {\n collisions.push({\n id,\n data: {\n droppableContainer,\n value: intersectionRatio\n }\n });\n }\n }\n }\n\n return collisions.sort(sortCollisionsDesc);\n};\n\n/**\r\n * Check if a given point is contained within a bounding rectangle\r\n */\n\nfunction isPointWithinRect(point, rect) {\n const {\n top,\n left,\n bottom,\n right\n } = rect;\n return top <= point.y && point.y <= bottom && left <= point.x && point.x <= right;\n}\n/**\r\n * Returns the rectangles that the pointer is hovering over\r\n */\n\n\nconst pointerWithin = _ref => {\n let {\n droppableContainers,\n droppableRects,\n pointerCoordinates\n } = _ref;\n\n if (!pointerCoordinates) {\n return [];\n }\n\n const collisions = [];\n\n for (const droppableContainer of droppableContainers) {\n const {\n id\n } = droppableContainer;\n const rect = droppableRects.get(id);\n\n if (rect && isPointWithinRect(pointerCoordinates, rect)) {\n /* There may be more than a single rectangle intersecting\r\n * with the pointer coordinates. In order to sort the\r\n * colliding rectangles, we measure the distance between\r\n * the pointer and the corners of the intersecting rectangle\r\n */\n const corners = cornersOfRectangle(rect);\n const distances = corners.reduce((accumulator, corner) => {\n return accumulator + distanceBetween(pointerCoordinates, corner);\n }, 0);\n const effectiveDistance = Number((distances / 4).toFixed(4));\n collisions.push({\n id,\n data: {\n droppableContainer,\n value: effectiveDistance\n }\n });\n }\n }\n\n return collisions.sort(sortCollisionsAsc);\n};\n\nfunction adjustScale(transform, rect1, rect2) {\n return { ...transform,\n scaleX: rect1 && rect2 ? rect1.width / rect2.width : 1,\n scaleY: rect1 && rect2 ? rect1.height / rect2.height : 1\n };\n}\n\nfunction getRectDelta(rect1, rect2) {\n return rect1 && rect2 ? {\n x: rect1.left - rect2.left,\n y: rect1.top - rect2.top\n } : defaultCoordinates;\n}\n\nfunction createRectAdjustmentFn(modifier) {\n return function adjustClientRect(rect) {\n for (var _len = arguments.length, adjustments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n adjustments[_key - 1] = arguments[_key];\n }\n\n return adjustments.reduce((acc, adjustment) => ({ ...acc,\n top: acc.top + modifier * adjustment.y,\n bottom: acc.bottom + modifier * adjustment.y,\n left: acc.left + modifier * adjustment.x,\n right: acc.right + modifier * adjustment.x\n }), { ...rect\n });\n };\n}\nconst getAdjustedRect = /*#__PURE__*/createRectAdjustmentFn(1);\n\nfunction parseTransform(transform) {\n if (transform.startsWith('matrix3d(')) {\n const transformArray = transform.slice(9, -1).split(/, /);\n return {\n x: +transformArray[12],\n y: +transformArray[13],\n scaleX: +transformArray[0],\n scaleY: +transformArray[5]\n };\n } else if (transform.startsWith('matrix(')) {\n const transformArray = transform.slice(7, -1).split(/, /);\n return {\n x: +transformArray[4],\n y: +transformArray[5],\n scaleX: +transformArray[0],\n scaleY: +transformArray[3]\n };\n }\n\n return null;\n}\n\nfunction inverseTransform(rect, transform, transformOrigin) {\n const parsedTransform = parseTransform(transform);\n\n if (!parsedTransform) {\n return rect;\n }\n\n const {\n scaleX,\n scaleY,\n x: translateX,\n y: translateY\n } = parsedTransform;\n const x = rect.left - translateX - (1 - scaleX) * parseFloat(transformOrigin);\n const y = rect.top - translateY - (1 - scaleY) * parseFloat(transformOrigin.slice(transformOrigin.indexOf(' ') + 1));\n const w = scaleX ? rect.width / scaleX : rect.width;\n const h = scaleY ? rect.height / scaleY : rect.height;\n return {\n width: w,\n height: h,\n top: y,\n right: x + w,\n bottom: y + h,\n left: x\n };\n}\n\nconst defaultOptions = {\n ignoreTransform: false\n};\n/**\r\n * Returns the bounding client rect of an element relative to the viewport.\r\n */\n\nfunction getClientRect(element, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n let rect = element.getBoundingClientRect();\n\n if (options.ignoreTransform) {\n const {\n transform,\n transformOrigin\n } = getWindow(element).getComputedStyle(element);\n\n if (transform) {\n rect = inverseTransform(rect, transform, transformOrigin);\n }\n }\n\n const {\n top,\n left,\n width,\n height,\n bottom,\n right\n } = rect;\n return {\n top,\n left,\n width,\n height,\n bottom,\n right\n };\n}\n/**\r\n * Returns the bounding client rect of an element relative to the viewport.\r\n *\r\n * @remarks\r\n * The ClientRect returned by this method does not take into account transforms\r\n * applied to the element it measures.\r\n *\r\n */\n\nfunction getTransformAgnosticClientRect(element) {\n return getClientRect(element, {\n ignoreTransform: true\n });\n}\n\nfunction getWindowClientRect(element) {\n const width = element.innerWidth;\n const height = element.innerHeight;\n return {\n top: 0,\n left: 0,\n right: width,\n bottom: height,\n width,\n height\n };\n}\n\nfunction isFixed(node, computedStyle) {\n if (computedStyle === void 0) {\n computedStyle = getWindow(node).getComputedStyle(node);\n }\n\n return computedStyle.position === 'fixed';\n}\n\nfunction isScrollable(element, computedStyle) {\n if (computedStyle === void 0) {\n computedStyle = getWindow(element).getComputedStyle(element);\n }\n\n const overflowRegex = /(auto|scroll|overlay)/;\n const properties = ['overflow', 'overflowX', 'overflowY'];\n return properties.some(property => {\n const value = computedStyle[property];\n return typeof value === 'string' ? overflowRegex.test(value) : false;\n });\n}\n\nfunction getScrollableAncestors(element, limit) {\n const scrollParents = [];\n\n function findScrollableAncestors(node) {\n if (limit != null && scrollParents.length >= limit) {\n return scrollParents;\n }\n\n if (!node) {\n return scrollParents;\n }\n\n if (isDocument(node) && node.scrollingElement != null && !scrollParents.includes(node.scrollingElement)) {\n scrollParents.push(node.scrollingElement);\n return scrollParents;\n }\n\n if (!isHTMLElement(node) || isSVGElement(node)) {\n return scrollParents;\n }\n\n if (scrollParents.includes(node)) {\n return scrollParents;\n }\n\n const computedStyle = getWindow(element).getComputedStyle(node);\n\n if (node !== element) {\n if (isScrollable(node, computedStyle)) {\n scrollParents.push(node);\n }\n }\n\n if (isFixed(node, computedStyle)) {\n return scrollParents;\n }\n\n return findScrollableAncestors(node.parentNode);\n }\n\n if (!element) {\n return scrollParents;\n }\n\n return findScrollableAncestors(element);\n}\nfunction getFirstScrollableAncestor(node) {\n const [firstScrollableAncestor] = getScrollableAncestors(node, 1);\n return firstScrollableAncestor != null ? firstScrollableAncestor : null;\n}\n\nfunction getScrollableElement(element) {\n if (!canUseDOM || !element) {\n return null;\n }\n\n if (isWindow(element)) {\n return element;\n }\n\n if (!isNode(element)) {\n return null;\n }\n\n if (isDocument(element) || element === getOwnerDocument(element).scrollingElement) {\n return window;\n }\n\n if (isHTMLElement(element)) {\n return element;\n }\n\n return null;\n}\n\nfunction getScrollXCoordinate(element) {\n if (isWindow(element)) {\n return element.scrollX;\n }\n\n return element.scrollLeft;\n}\nfunction getScrollYCoordinate(element) {\n if (isWindow(element)) {\n return element.scrollY;\n }\n\n return element.scrollTop;\n}\nfunction getScrollCoordinates(element) {\n return {\n x: getScrollXCoordinate(element),\n y: getScrollYCoordinate(element)\n };\n}\n\nvar Direction;\n\n(function (Direction) {\n Direction[Direction[\"Forward\"] = 1] = \"Forward\";\n Direction[Direction[\"Backward\"] = -1] = \"Backward\";\n})(Direction || (Direction = {}));\n\nfunction isDocumentScrollingElement(element) {\n if (!canUseDOM || !element) {\n return false;\n }\n\n return element === document.scrollingElement;\n}\n\nfunction getScrollPosition(scrollingContainer) {\n const minScroll = {\n x: 0,\n y: 0\n };\n const dimensions = isDocumentScrollingElement(scrollingContainer) ? {\n height: window.innerHeight,\n width: window.innerWidth\n } : {\n height: scrollingContainer.clientHeight,\n width: scrollingContainer.clientWidth\n };\n const maxScroll = {\n x: scrollingContainer.scrollWidth - dimensions.width,\n y: scrollingContainer.scrollHeight - dimensions.height\n };\n const isTop = scrollingContainer.scrollTop <= minScroll.y;\n const isLeft = scrollingContainer.scrollLeft <= minScroll.x;\n const isBottom = scrollingContainer.scrollTop >= maxScroll.y;\n const isRight = scrollingContainer.scrollLeft >= maxScroll.x;\n return {\n isTop,\n isLeft,\n isBottom,\n isRight,\n maxScroll,\n minScroll\n };\n}\n\nconst defaultThreshold = {\n x: 0.2,\n y: 0.2\n};\nfunction getScrollDirectionAndSpeed(scrollContainer, scrollContainerRect, _ref, acceleration, thresholdPercentage) {\n let {\n top,\n left,\n right,\n bottom\n } = _ref;\n\n if (acceleration === void 0) {\n acceleration = 10;\n }\n\n if (thresholdPercentage === void 0) {\n thresholdPercentage = defaultThreshold;\n }\n\n const {\n isTop,\n isBottom,\n isLeft,\n isRight\n } = getScrollPosition(scrollContainer);\n const direction = {\n x: 0,\n y: 0\n };\n const speed = {\n x: 0,\n y: 0\n };\n const threshold = {\n height: scrollContainerRect.height * thresholdPercentage.y,\n width: scrollContainerRect.width * thresholdPercentage.x\n };\n\n if (!isTop && top <= scrollContainerRect.top + threshold.height) {\n // Scroll Up\n direction.y = Direction.Backward;\n speed.y = acceleration * Math.abs((scrollContainerRect.top + threshold.height - top) / threshold.height);\n } else if (!isBottom && bottom >= scrollContainerRect.bottom - threshold.height) {\n // Scroll Down\n direction.y = Direction.Forward;\n speed.y = acceleration * Math.abs((scrollContainerRect.bottom - threshold.height - bottom) / threshold.height);\n }\n\n if (!isRight && right >= scrollContainerRect.right - threshold.width) {\n // Scroll Right\n direction.x = Direction.Forward;\n speed.x = acceleration * Math.abs((scrollContainerRect.right - threshold.width - right) / threshold.width);\n } else if (!isLeft && left <= scrollContainerRect.left + threshold.width) {\n // Scroll Left\n direction.x = Direction.Backward;\n speed.x = acceleration * Math.abs((scrollContainerRect.left + threshold.width - left) / threshold.width);\n }\n\n return {\n direction,\n speed\n };\n}\n\nfunction getScrollElementRect(element) {\n if (element === document.scrollingElement) {\n const {\n innerWidth,\n innerHeight\n } = window;\n return {\n top: 0,\n left: 0,\n right: innerWidth,\n bottom: innerHeight,\n width: innerWidth,\n height: innerHeight\n };\n }\n\n const {\n top,\n left,\n right,\n bottom\n } = element.getBoundingClientRect();\n return {\n top,\n left,\n right,\n bottom,\n width: element.clientWidth,\n height: element.clientHeight\n };\n}\n\nfunction getScrollOffsets(scrollableAncestors) {\n return scrollableAncestors.reduce((acc, node) => {\n return add(acc, getScrollCoordinates(node));\n }, defaultCoordinates);\n}\nfunction getScrollXOffset(scrollableAncestors) {\n return scrollableAncestors.reduce((acc, node) => {\n return acc + getScrollXCoordinate(node);\n }, 0);\n}\nfunction getScrollYOffset(scrollableAncestors) {\n return scrollableAncestors.reduce((acc, node) => {\n return acc + getScrollYCoordinate(node);\n }, 0);\n}\n\nfunction scrollIntoViewIfNeeded(element, measure) {\n if (measure === void 0) {\n measure = getClientRect;\n }\n\n if (!element) {\n return;\n }\n\n const {\n top,\n left,\n bottom,\n right\n } = measure(element);\n const firstScrollableAncestor = getFirstScrollableAncestor(element);\n\n if (!firstScrollableAncestor) {\n return;\n }\n\n if (bottom <= 0 || right <= 0 || top >= window.innerHeight || left >= window.innerWidth) {\n element.scrollIntoView({\n block: 'center',\n inline: 'center'\n });\n }\n}\n\nconst properties = [['x', ['left', 'right'], getScrollXOffset], ['y', ['top', 'bottom'], getScrollYOffset]];\nclass Rect {\n constructor(rect, element) {\n this.rect = void 0;\n this.width = void 0;\n this.height = void 0;\n this.top = void 0;\n this.bottom = void 0;\n this.right = void 0;\n this.left = void 0;\n const scrollableAncestors = getScrollableAncestors(element);\n const scrollOffsets = getScrollOffsets(scrollableAncestors);\n this.rect = { ...rect\n };\n this.width = rect.width;\n this.height = rect.height;\n\n for (const [axis, keys, getScrollOffset] of properties) {\n for (const key of keys) {\n Object.defineProperty(this, key, {\n get: () => {\n const currentOffsets = getScrollOffset(scrollableAncestors);\n const scrollOffsetsDeltla = scrollOffsets[axis] - currentOffsets;\n return this.rect[key] + scrollOffsetsDeltla;\n },\n enumerable: true\n });\n }\n }\n\n Object.defineProperty(this, 'rect', {\n enumerable: false\n });\n }\n\n}\n\nclass Listeners {\n constructor(target) {\n this.target = void 0;\n this.listeners = [];\n\n this.removeAll = () => {\n this.listeners.forEach(listener => {\n var _this$target;\n\n return (_this$target = this.target) == null ? void 0 : _this$target.removeEventListener(...listener);\n });\n };\n\n this.target = target;\n }\n\n add(eventName, handler, options) {\n var _this$target2;\n\n (_this$target2 = this.target) == null ? void 0 : _this$target2.addEventListener(eventName, handler, options);\n this.listeners.push([eventName, handler, options]);\n }\n\n}\n\nfunction getEventListenerTarget(target) {\n // If the `event.target` element is removed from the document events will still be targeted\n // at it, and hence won't always bubble up to the window or document anymore.\n // If there is any risk of an element being removed while it is being dragged,\n // the best practice is to attach the event listeners directly to the target.\n // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget\n const {\n EventTarget\n } = getWindow(target);\n return target instanceof EventTarget ? target : getOwnerDocument(target);\n}\n\nfunction hasExceededDistance(delta, measurement) {\n const dx = Math.abs(delta.x);\n const dy = Math.abs(delta.y);\n\n if (typeof measurement === 'number') {\n return Math.sqrt(dx ** 2 + dy ** 2) > measurement;\n }\n\n if ('x' in measurement && 'y' in measurement) {\n return dx > measurement.x && dy > measurement.y;\n }\n\n if ('x' in measurement) {\n return dx > measurement.x;\n }\n\n if ('y' in measurement) {\n return dy > measurement.y;\n }\n\n return false;\n}\n\nvar EventName;\n\n(function (EventName) {\n EventName[\"Click\"] = \"click\";\n EventName[\"DragStart\"] = \"dragstart\";\n EventName[\"Keydown\"] = \"keydown\";\n EventName[\"ContextMenu\"] = \"contextmenu\";\n EventName[\"Resize\"] = \"resize\";\n EventName[\"SelectionChange\"] = \"selectionchange\";\n EventName[\"VisibilityChange\"] = \"visibilitychange\";\n})(EventName || (EventName = {}));\n\nfunction preventDefault(event) {\n event.preventDefault();\n}\nfunction stopPropagation(event) {\n event.stopPropagation();\n}\n\nvar KeyboardCode;\n\n(function (KeyboardCode) {\n KeyboardCode[\"Space\"] = \"Space\";\n KeyboardCode[\"Down\"] = \"ArrowDown\";\n KeyboardCode[\"Right\"] = \"ArrowRight\";\n KeyboardCode[\"Left\"] = \"ArrowLeft\";\n KeyboardCode[\"Up\"] = \"ArrowUp\";\n KeyboardCode[\"Esc\"] = \"Escape\";\n KeyboardCode[\"Enter\"] = \"Enter\";\n})(KeyboardCode || (KeyboardCode = {}));\n\nconst defaultKeyboardCodes = {\n start: [KeyboardCode.Space, KeyboardCode.Enter],\n cancel: [KeyboardCode.Esc],\n end: [KeyboardCode.Space, KeyboardCode.Enter]\n};\nconst defaultKeyboardCoordinateGetter = (event, _ref) => {\n let {\n currentCoordinates\n } = _ref;\n\n switch (event.code) {\n case KeyboardCode.Right:\n return { ...currentCoordinates,\n x: currentCoordinates.x + 25\n };\n\n case KeyboardCode.Left:\n return { ...currentCoordinates,\n x: currentCoordinates.x - 25\n };\n\n case KeyboardCode.Down:\n return { ...currentCoordinates,\n y: currentCoordinates.y + 25\n };\n\n case KeyboardCode.Up:\n return { ...currentCoordinates,\n y: currentCoordinates.y - 25\n };\n }\n\n return undefined;\n};\n\nclass KeyboardSensor {\n constructor(props) {\n this.props = void 0;\n this.autoScrollEnabled = false;\n this.referenceCoordinates = void 0;\n this.listeners = void 0;\n this.windowListeners = void 0;\n this.props = props;\n const {\n event: {\n target\n }\n } = props;\n this.props = props;\n this.listeners = new Listeners(getOwnerDocument(target));\n this.windowListeners = new Listeners(getWindow(target));\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.handleCancel = this.handleCancel.bind(this);\n this.attach();\n }\n\n attach() {\n this.handleStart();\n this.windowListeners.add(EventName.Resize, this.handleCancel);\n this.windowListeners.add(EventName.VisibilityChange, this.handleCancel);\n setTimeout(() => this.listeners.add(EventName.Keydown, this.handleKeyDown));\n }\n\n handleStart() {\n const {\n activeNode,\n onStart\n } = this.props;\n const node = activeNode.node.current;\n\n if (node) {\n scrollIntoViewIfNeeded(node);\n }\n\n onStart(defaultCoordinates);\n }\n\n handleKeyDown(event) {\n if (isKeyboardEvent(event)) {\n const {\n active,\n context,\n options\n } = this.props;\n const {\n keyboardCodes = defaultKeyboardCodes,\n coordinateGetter = defaultKeyboardCoordinateGetter,\n scrollBehavior = 'smooth'\n } = options;\n const {\n code\n } = event;\n\n if (keyboardCodes.end.includes(code)) {\n this.handleEnd(event);\n return;\n }\n\n if (keyboardCodes.cancel.includes(code)) {\n this.handleCancel(event);\n return;\n }\n\n const {\n collisionRect\n } = context.current;\n const currentCoordinates = collisionRect ? {\n x: collisionRect.left,\n y: collisionRect.top\n } : defaultCoordinates;\n\n if (!this.referenceCoordinates) {\n this.referenceCoordinates = currentCoordinates;\n }\n\n const newCoordinates = coordinateGetter(event, {\n active,\n context: context.current,\n currentCoordinates\n });\n\n if (newCoordinates) {\n const coordinatesDelta = subtract(newCoordinates, currentCoordinates);\n const scrollDelta = {\n x: 0,\n y: 0\n };\n const {\n scrollableAncestors\n } = context.current;\n\n for (const scrollContainer of scrollableAncestors) {\n const direction = event.code;\n const {\n isTop,\n isRight,\n isLeft,\n isBottom,\n maxScroll,\n minScroll\n } = getScrollPosition(scrollContainer);\n const scrollElementRect = getScrollElementRect(scrollContainer);\n const clampedCoordinates = {\n x: Math.min(direction === KeyboardCode.Right ? scrollElementRect.right - scrollElementRect.width / 2 : scrollElementRect.right, Math.max(direction === KeyboardCode.Right ? scrollElementRect.left : scrollElementRect.left + scrollElementRect.width / 2, newCoordinates.x)),\n y: Math.min(direction === KeyboardCode.Down ? scrollElementRect.bottom - scrollElementRect.height / 2 : scrollElementRect.bottom, Math.max(direction === KeyboardCode.Down ? scrollElementRect.top : scrollElementRect.top + scrollElementRect.height / 2, newCoordinates.y))\n };\n const canScrollX = direction === KeyboardCode.Right && !isRight || direction === KeyboardCode.Left && !isLeft;\n const canScrollY = direction === KeyboardCode.Down && !isBottom || direction === KeyboardCode.Up && !isTop;\n\n if (canScrollX && clampedCoordinates.x !== newCoordinates.x) {\n const newScrollCoordinates = scrollContainer.scrollLeft + coordinatesDelta.x;\n const canScrollToNewCoordinates = direction === KeyboardCode.Right && newScrollCoordinates <= maxScroll.x || direction === KeyboardCode.Left && newScrollCoordinates >= minScroll.x;\n\n if (canScrollToNewCoordinates && !coordinatesDelta.y) {\n // We don't need to update coordinates, the scroll adjustment alone will trigger\n // logic to auto-detect the new container we are over\n scrollContainer.scrollTo({\n left: newScrollCoordinates,\n behavior: scrollBehavior\n });\n return;\n }\n\n if (canScrollToNewCoordinates) {\n scrollDelta.x = scrollContainer.scrollLeft - newScrollCoordinates;\n } else {\n scrollDelta.x = direction === KeyboardCode.Right ? scrollContainer.scrollLeft - maxScroll.x : scrollContainer.scrollLeft - minScroll.x;\n }\n\n if (scrollDelta.x) {\n scrollContainer.scrollBy({\n left: -scrollDelta.x,\n behavior: scrollBehavior\n });\n }\n\n break;\n } else if (canScrollY && clampedCoordinates.y !== newCoordinates.y) {\n const newScrollCoordinates = scrollContainer.scrollTop + coordinatesDelta.y;\n const canScrollToNewCoordinates = direction === KeyboardCode.Down && newScrollCoordinates <= maxScroll.y || direction === KeyboardCode.Up && newScrollCoordinates >= minScroll.y;\n\n if (canScrollToNewCoordinates && !coordinatesDelta.x) {\n // We don't need to update coordinates, the scroll adjustment alone will trigger\n // logic to auto-detect the new container we are over\n scrollContainer.scrollTo({\n top: newScrollCoordinates,\n behavior: scrollBehavior\n });\n return;\n }\n\n if (canScrollToNewCoordinates) {\n scrollDelta.y = scrollContainer.scrollTop - newScrollCoordinates;\n } else {\n scrollDelta.y = direction === KeyboardCode.Down ? scrollContainer.scrollTop - maxScroll.y : scrollContainer.scrollTop - minScroll.y;\n }\n\n if (scrollDelta.y) {\n scrollContainer.scrollBy({\n top: -scrollDelta.y,\n behavior: scrollBehavior\n });\n }\n\n break;\n }\n }\n\n this.handleMove(event, add(subtract(newCoordinates, this.referenceCoordinates), scrollDelta));\n }\n }\n }\n\n handleMove(event, coordinates) {\n const {\n onMove\n } = this.props;\n event.preventDefault();\n onMove(coordinates);\n }\n\n handleEnd(event) {\n const {\n onEnd\n } = this.props;\n event.preventDefault();\n this.detach();\n onEnd();\n }\n\n handleCancel(event) {\n const {\n onCancel\n } = this.props;\n event.preventDefault();\n this.detach();\n onCancel();\n }\n\n detach() {\n this.listeners.removeAll();\n this.windowListeners.removeAll();\n }\n\n}\nKeyboardSensor.activators = [{\n eventName: 'onKeyDown',\n handler: (event, _ref, _ref2) => {\n let {\n keyboardCodes = defaultKeyboardCodes,\n onActivation\n } = _ref;\n let {\n active\n } = _ref2;\n const {\n code\n } = event.nativeEvent;\n\n if (keyboardCodes.start.includes(code)) {\n const activator = active.activatorNode.current;\n\n if (activator && event.target !== activator) {\n return false;\n }\n\n event.preventDefault();\n onActivation == null ? void 0 : onActivation({\n event: event.nativeEvent\n });\n return true;\n }\n\n return false;\n }\n}];\n\nfunction isDistanceConstraint(constraint) {\n return Boolean(constraint && 'distance' in constraint);\n}\n\nfunction isDelayConstraint(constraint) {\n return Boolean(constraint && 'delay' in constraint);\n}\n\nclass AbstractPointerSensor {\n constructor(props, events, listenerTarget) {\n var _getEventCoordinates;\n\n if (listenerTarget === void 0) {\n listenerTarget = getEventListenerTarget(props.event.target);\n }\n\n this.props = void 0;\n this.events = void 0;\n this.autoScrollEnabled = true;\n this.document = void 0;\n this.activated = false;\n this.initialCoordinates = void 0;\n this.timeoutId = null;\n this.listeners = void 0;\n this.documentListeners = void 0;\n this.windowListeners = void 0;\n this.props = props;\n this.events = events;\n const {\n event\n } = props;\n const {\n target\n } = event;\n this.props = props;\n this.events = events;\n this.document = getOwnerDocument(target);\n this.documentListeners = new Listeners(this.document);\n this.listeners = new Listeners(listenerTarget);\n this.windowListeners = new Listeners(getWindow(target));\n this.initialCoordinates = (_getEventCoordinates = getEventCoordinates(event)) != null ? _getEventCoordinates : defaultCoordinates;\n this.handleStart = this.handleStart.bind(this);\n this.handleMove = this.handleMove.bind(this);\n this.handleEnd = this.handleEnd.bind(this);\n this.handleCancel = this.handleCancel.bind(this);\n this.handleKeydown = this.handleKeydown.bind(this);\n this.removeTextSelection = this.removeTextSelection.bind(this);\n this.attach();\n }\n\n attach() {\n const {\n events,\n props: {\n options: {\n activationConstraint,\n bypassActivationConstraint\n }\n }\n } = this;\n this.listeners.add(events.move.name, this.handleMove, {\n passive: false\n });\n this.listeners.add(events.end.name, this.handleEnd);\n this.windowListeners.add(EventName.Resize, this.handleCancel);\n this.windowListeners.add(EventName.DragStart, preventDefault);\n this.windowListeners.add(EventName.VisibilityChange, this.handleCancel);\n this.windowListeners.add(EventName.ContextMenu, preventDefault);\n this.documentListeners.add(EventName.Keydown, this.handleKeydown);\n\n if (activationConstraint) {\n if (bypassActivationConstraint != null && bypassActivationConstraint({\n event: this.props.event,\n activeNode: this.props.activeNode,\n options: this.props.options\n })) {\n return this.handleStart();\n }\n\n if (isDelayConstraint(activationConstraint)) {\n this.timeoutId = setTimeout(this.handleStart, activationConstraint.delay);\n return;\n }\n\n if (isDistanceConstraint(activationConstraint)) {\n return;\n }\n }\n\n this.handleStart();\n }\n\n detach() {\n this.listeners.removeAll();\n this.windowListeners.removeAll(); // Wait until the next event loop before removing document listeners\n // This is necessary because we listen for `click` and `selection` events on the document\n\n setTimeout(this.documentListeners.removeAll, 50);\n\n if (this.timeoutId !== null) {\n clearTimeout(this.timeoutId);\n this.timeoutId = null;\n }\n }\n\n handleStart() {\n const {\n initialCoordinates\n } = this;\n const {\n onStart\n } = this.props;\n\n if (initialCoordinates) {\n this.activated = true; // Stop propagation of click events once activation constraints are met\n\n this.documentListeners.add(EventName.Click, stopPropagation, {\n capture: true\n }); // Remove any text selection from the document\n\n this.removeTextSelection(); // Prevent further text selection while dragging\n\n this.documentListeners.add(EventName.SelectionChange, this.removeTextSelection);\n onStart(initialCoordinates);\n }\n }\n\n handleMove(event) {\n var _getEventCoordinates2;\n\n const {\n activated,\n initialCoordinates,\n props\n } = this;\n const {\n onMove,\n options: {\n activationConstraint\n }\n } = props;\n\n if (!initialCoordinates) {\n return;\n }\n\n const coordinates = (_getEventCoordinates2 = getEventCoordinates(event)) != null ? _getEventCoordinates2 : defaultCoordinates;\n const delta = subtract(initialCoordinates, coordinates); // Constraint validation\n\n if (!activated && activationConstraint) {\n if (isDistanceConstraint(activationConstraint)) {\n if (activationConstraint.tolerance != null && hasExceededDistance(delta, activationConstraint.tolerance)) {\n return this.handleCancel();\n }\n\n if (hasExceededDistance(delta, activationConstraint.distance)) {\n return this.handleStart();\n }\n }\n\n if (isDelayConstraint(activationConstraint)) {\n if (hasExceededDistance(delta, activationConstraint.tolerance)) {\n return this.handleCancel();\n }\n }\n\n return;\n }\n\n if (event.cancelable) {\n event.preventDefault();\n }\n\n onMove(coordinates);\n }\n\n handleEnd() {\n const {\n onEnd\n } = this.props;\n this.detach();\n onEnd();\n }\n\n handleCancel() {\n const {\n onCancel\n } = this.props;\n this.detach();\n onCancel();\n }\n\n handleKeydown(event) {\n if (event.code === KeyboardCode.Esc) {\n this.handleCancel();\n }\n }\n\n removeTextSelection() {\n var _this$document$getSel;\n\n (_this$document$getSel = this.document.getSelection()) == null ? void 0 : _this$document$getSel.removeAllRanges();\n }\n\n}\n\nconst events = {\n move: {\n name: 'pointermove'\n },\n end: {\n name: 'pointerup'\n }\n};\nclass PointerSensor extends AbstractPointerSensor {\n constructor(props) {\n const {\n event\n } = props; // Pointer events stop firing if the target is unmounted while dragging\n // Therefore we attach listeners to the owner document instead\n\n const listenerTarget = getOwnerDocument(event.target);\n super(props, events, listenerTarget);\n }\n\n}\nPointerSensor.activators = [{\n eventName: 'onPointerDown',\n handler: (_ref, _ref2) => {\n let {\n nativeEvent: event\n } = _ref;\n let {\n onActivation\n } = _ref2;\n\n if (!event.isPrimary || event.button !== 0) {\n return false;\n }\n\n onActivation == null ? void 0 : onActivation({\n event\n });\n return true;\n }\n}];\n\nconst events$1 = {\n move: {\n name: 'mousemove'\n },\n end: {\n name: 'mouseup'\n }\n};\nvar MouseButton;\n\n(function (MouseButton) {\n MouseButton[MouseButton[\"RightClick\"] = 2] = \"RightClick\";\n})(MouseButton || (MouseButton = {}));\n\nclass MouseSensor extends AbstractPointerSensor {\n constructor(props) {\n super(props, events$1, getOwnerDocument(props.event.target));\n }\n\n}\nMouseSensor.activators = [{\n eventName: 'onMouseDown',\n handler: (_ref, _ref2) => {\n let {\n nativeEvent: event\n } = _ref;\n let {\n onActivation\n } = _ref2;\n\n if (event.button === MouseButton.RightClick) {\n return false;\n }\n\n onActivation == null ? void 0 : onActivation({\n event\n });\n return true;\n }\n}];\n\nconst events$2 = {\n move: {\n name: 'touchmove'\n },\n end: {\n name: 'touchend'\n }\n};\nclass TouchSensor extends AbstractPointerSensor {\n constructor(props) {\n super(props, events$2);\n }\n\n static setup() {\n // Adding a non-capture and non-passive `touchmove` listener in order\n // to force `event.preventDefault()` calls to work in dynamically added\n // touchmove event handlers. This is required for iOS Safari.\n window.addEventListener(events$2.move.name, noop, {\n capture: false,\n passive: false\n });\n return function teardown() {\n window.removeEventListener(events$2.move.name, noop);\n }; // We create a new handler because the teardown function of another sensor\n // could remove our event listener if we use a referentially equal listener.\n\n function noop() {}\n }\n\n}\nTouchSensor.activators = [{\n eventName: 'onTouchStart',\n handler: (_ref, _ref2) => {\n let {\n nativeEvent: event\n } = _ref;\n let {\n onActivation\n } = _ref2;\n const {\n touches\n } = event;\n\n if (touches.length > 1) {\n return false;\n }\n\n onActivation == null ? void 0 : onActivation({\n event\n });\n return true;\n }\n}];\n\nvar AutoScrollActivator;\n\n(function (AutoScrollActivator) {\n AutoScrollActivator[AutoScrollActivator[\"Pointer\"] = 0] = \"Pointer\";\n AutoScrollActivator[AutoScrollActivator[\"DraggableRect\"] = 1] = \"DraggableRect\";\n})(AutoScrollActivator || (AutoScrollActivator = {}));\n\nvar TraversalOrder;\n\n(function (TraversalOrder) {\n TraversalOrder[TraversalOrder[\"TreeOrder\"] = 0] = \"TreeOrder\";\n TraversalOrder[TraversalOrder[\"ReversedTreeOrder\"] = 1] = \"ReversedTreeOrder\";\n})(TraversalOrder || (TraversalOrder = {}));\n\nfunction useAutoScroller(_ref) {\n let {\n acceleration,\n activator = AutoScrollActivator.Pointer,\n canScroll,\n draggingRect,\n enabled,\n interval = 5,\n order = TraversalOrder.TreeOrder,\n pointerCoordinates,\n scrollableAncestors,\n scrollableAncestorRects,\n delta,\n threshold\n } = _ref;\n const scrollIntent = useScrollIntent({\n delta,\n disabled: !enabled\n });\n const [setAutoScrollInterval, clearAutoScrollInterval] = useInterval();\n const scrollSpeed = useRef({\n x: 0,\n y: 0\n });\n const scrollDirection = useRef({\n x: 0,\n y: 0\n });\n const rect = useMemo(() => {\n switch (activator) {\n case AutoScrollActivator.Pointer:\n return pointerCoordinates ? {\n top: pointerCoordinates.y,\n bottom: pointerCoordinates.y,\n left: pointerCoordinates.x,\n right: pointerCoordinates.x\n } : null;\n\n case AutoScrollActivator.DraggableRect:\n return draggingRect;\n }\n }, [activator, draggingRect, pointerCoordinates]);\n const scrollContainerRef = useRef(null);\n const autoScroll = useCallback(() => {\n const scrollContainer = scrollContainerRef.current;\n\n if (!scrollContainer) {\n return;\n }\n\n const scrollLeft = scrollSpeed.current.x * scrollDirection.current.x;\n const scrollTop = scrollSpeed.current.y * scrollDirection.current.y;\n scrollContainer.scrollBy(scrollLeft, scrollTop);\n }, []);\n const sortedScrollableAncestors = useMemo(() => order === TraversalOrder.TreeOrder ? [...scrollableAncestors].reverse() : scrollableAncestors, [order, scrollableAncestors]);\n useEffect(() => {\n if (!enabled || !scrollableAncestors.length || !rect) {\n clearAutoScrollInterval();\n return;\n }\n\n for (const scrollContainer of sortedScrollableAncestors) {\n if ((canScroll == null ? void 0 : canScroll(scrollContainer)) === false) {\n continue;\n }\n\n const index = scrollableAncestors.indexOf(scrollContainer);\n const scrollContainerRect = scrollableAncestorRects[index];\n\n if (!scrollContainerRect) {\n continue;\n }\n\n const {\n direction,\n speed\n } = getScrollDirectionAndSpeed(scrollContainer, scrollContainerRect, rect, acceleration, threshold);\n\n for (const axis of ['x', 'y']) {\n if (!scrollIntent[axis][direction[axis]]) {\n speed[axis] = 0;\n direction[axis] = 0;\n }\n }\n\n if (speed.x > 0 || speed.y > 0) {\n clearAutoScrollInterval();\n scrollContainerRef.current = scrollContainer;\n setAutoScrollInterval(autoScroll, interval);\n scrollSpeed.current = speed;\n scrollDirection.current = direction;\n return;\n }\n }\n\n scrollSpeed.current = {\n x: 0,\n y: 0\n };\n scrollDirection.current = {\n x: 0,\n y: 0\n };\n clearAutoScrollInterval();\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [acceleration, autoScroll, canScroll, clearAutoScrollInterval, enabled, interval, // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(rect), // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(scrollIntent), setAutoScrollInterval, scrollableAncestors, sortedScrollableAncestors, scrollableAncestorRects, // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(threshold)]);\n}\nconst defaultScrollIntent = {\n x: {\n [Direction.Backward]: false,\n [Direction.Forward]: false\n },\n y: {\n [Direction.Backward]: false,\n [Direction.Forward]: false\n }\n};\n\nfunction useScrollIntent(_ref2) {\n let {\n delta,\n disabled\n } = _ref2;\n const previousDelta = usePrevious(delta);\n return useLazyMemo(previousIntent => {\n if (disabled || !previousDelta || !previousIntent) {\n // Reset scroll intent tracking when auto-scrolling is disabled\n return defaultScrollIntent;\n }\n\n const direction = {\n x: Math.sign(delta.x - previousDelta.x),\n y: Math.sign(delta.y - previousDelta.y)\n }; // Keep track of the user intent to scroll in each direction for both axis\n\n return {\n x: {\n [Direction.Backward]: previousIntent.x[Direction.Backward] || direction.x === -1,\n [Direction.Forward]: previousIntent.x[Direction.Forward] || direction.x === 1\n },\n y: {\n [Direction.Backward]: previousIntent.y[Direction.Backward] || direction.y === -1,\n [Direction.Forward]: previousIntent.y[Direction.Forward] || direction.y === 1\n }\n };\n }, [disabled, delta, previousDelta]);\n}\n\nfunction useCachedNode(draggableNodes, id) {\n const draggableNode = id !== null ? draggableNodes.get(id) : undefined;\n const node = draggableNode ? draggableNode.node.current : null;\n return useLazyMemo(cachedNode => {\n var _ref;\n\n if (id === null) {\n return null;\n } // In some cases, the draggable node can unmount while dragging\n // This is the case for virtualized lists. In those situations,\n // we fall back to the last known value for that node.\n\n\n return (_ref = node != null ? node : cachedNode) != null ? _ref : null;\n }, [node, id]);\n}\n\nfunction useCombineActivators(sensors, getSyntheticHandler) {\n return useMemo(() => sensors.reduce((accumulator, sensor) => {\n const {\n sensor: Sensor\n } = sensor;\n const sensorActivators = Sensor.activators.map(activator => ({\n eventName: activator.eventName,\n handler: getSyntheticHandler(activator.handler, sensor)\n }));\n return [...accumulator, ...sensorActivators];\n }, []), [sensors, getSyntheticHandler]);\n}\n\nvar MeasuringStrategy;\n\n(function (MeasuringStrategy) {\n MeasuringStrategy[MeasuringStrategy[\"Always\"] = 0] = \"Always\";\n MeasuringStrategy[MeasuringStrategy[\"BeforeDragging\"] = 1] = \"BeforeDragging\";\n MeasuringStrategy[MeasuringStrategy[\"WhileDragging\"] = 2] = \"WhileDragging\";\n})(MeasuringStrategy || (MeasuringStrategy = {}));\n\nvar MeasuringFrequency;\n\n(function (MeasuringFrequency) {\n MeasuringFrequency[\"Optimized\"] = \"optimized\";\n})(MeasuringFrequency || (MeasuringFrequency = {}));\n\nconst defaultValue = /*#__PURE__*/new Map();\nfunction useDroppableMeasuring(containers, _ref) {\n let {\n dragging,\n dependencies,\n config\n } = _ref;\n const [queue, setQueue] = useState(null);\n const {\n frequency,\n measure,\n strategy\n } = config;\n const containersRef = useRef(containers);\n const disabled = isDisabled();\n const disabledRef = useLatestValue(disabled);\n const measureDroppableContainers = useCallback(function (ids) {\n if (ids === void 0) {\n ids = [];\n }\n\n if (disabledRef.current) {\n return;\n }\n\n setQueue(value => {\n if (value === null) {\n return ids;\n }\n\n return value.concat(ids.filter(id => !value.includes(id)));\n });\n }, [disabledRef]);\n const timeoutId = useRef(null);\n const droppableRects = useLazyMemo(previousValue => {\n if (disabled && !dragging) {\n return defaultValue;\n }\n\n if (!previousValue || previousValue === defaultValue || containersRef.current !== containers || queue != null) {\n const map = new Map();\n\n for (let container of containers) {\n if (!container) {\n continue;\n }\n\n if (queue && queue.length > 0 && !queue.includes(container.id) && container.rect.current) {\n // This container does not need to be re-measured\n map.set(container.id, container.rect.current);\n continue;\n }\n\n const node = container.node.current;\n const rect = node ? new Rect(measure(node), node) : null;\n container.rect.current = rect;\n\n if (rect) {\n map.set(container.id, rect);\n }\n }\n\n return map;\n }\n\n return previousValue;\n }, [containers, queue, dragging, disabled, measure]);\n useEffect(() => {\n containersRef.current = containers;\n }, [containers]);\n useEffect(() => {\n if (disabled) {\n return;\n }\n\n measureDroppableContainers();\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [dragging, disabled]);\n useEffect(() => {\n if (queue && queue.length > 0) {\n setQueue(null);\n }\n }, //eslint-disable-next-line react-hooks/exhaustive-deps\n [JSON.stringify(queue)]);\n useEffect(() => {\n if (disabled || typeof frequency !== 'number' || timeoutId.current !== null) {\n return;\n }\n\n timeoutId.current = setTimeout(() => {\n measureDroppableContainers();\n timeoutId.current = null;\n }, frequency);\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [frequency, disabled, measureDroppableContainers, ...dependencies]);\n return {\n droppableRects,\n measureDroppableContainers,\n measuringScheduled: queue != null\n };\n\n function isDisabled() {\n switch (strategy) {\n case MeasuringStrategy.Always:\n return false;\n\n case MeasuringStrategy.BeforeDragging:\n return dragging;\n\n default:\n return !dragging;\n }\n }\n}\n\nfunction useInitialValue(value, computeFn) {\n return useLazyMemo(previousValue => {\n if (!value) {\n return null;\n }\n\n if (previousValue) {\n return previousValue;\n }\n\n return typeof computeFn === 'function' ? computeFn(value) : value;\n }, [computeFn, value]);\n}\n\nfunction useInitialRect(node, measure) {\n return useInitialValue(node, measure);\n}\n\n/**\r\n * Returns a new MutationObserver instance.\r\n * If `MutationObserver` is undefined in the execution environment, returns `undefined`.\r\n */\n\nfunction useMutationObserver(_ref) {\n let {\n callback,\n disabled\n } = _ref;\n const handleMutations = useEvent(callback);\n const mutationObserver = useMemo(() => {\n if (disabled || typeof window === 'undefined' || typeof window.MutationObserver === 'undefined') {\n return undefined;\n }\n\n const {\n MutationObserver\n } = window;\n return new MutationObserver(handleMutations);\n }, [handleMutations, disabled]);\n useEffect(() => {\n return () => mutationObserver == null ? void 0 : mutationObserver.disconnect();\n }, [mutationObserver]);\n return mutationObserver;\n}\n\n/**\r\n * Returns a new ResizeObserver instance bound to the `onResize` callback.\r\n * If `ResizeObserver` is undefined in the execution environment, returns `undefined`.\r\n */\n\nfunction useResizeObserver(_ref) {\n let {\n callback,\n disabled\n } = _ref;\n const handleResize = useEvent(callback);\n const resizeObserver = useMemo(() => {\n if (disabled || typeof window === 'undefined' || typeof window.ResizeObserver === 'undefined') {\n return undefined;\n }\n\n const {\n ResizeObserver\n } = window;\n return new ResizeObserver(handleResize);\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [disabled]);\n useEffect(() => {\n return () => resizeObserver == null ? void 0 : resizeObserver.disconnect();\n }, [resizeObserver]);\n return resizeObserver;\n}\n\nfunction defaultMeasure(element) {\n return new Rect(getClientRect(element), element);\n}\n\nfunction useRect(element, measure, fallbackRect) {\n if (measure === void 0) {\n measure = defaultMeasure;\n }\n\n const [rect, measureRect] = useReducer(reducer, null);\n const mutationObserver = useMutationObserver({\n callback(records) {\n if (!element) {\n return;\n }\n\n for (const record of records) {\n const {\n type,\n target\n } = record;\n\n if (type === 'childList' && target instanceof HTMLElement && target.contains(element)) {\n measureRect();\n break;\n }\n }\n }\n\n });\n const resizeObserver = useResizeObserver({\n callback: measureRect\n });\n useIsomorphicLayoutEffect(() => {\n measureRect();\n\n if (element) {\n resizeObserver == null ? void 0 : resizeObserver.observe(element);\n mutationObserver == null ? void 0 : mutationObserver.observe(document.body, {\n childList: true,\n subtree: true\n });\n } else {\n resizeObserver == null ? void 0 : resizeObserver.disconnect();\n mutationObserver == null ? void 0 : mutationObserver.disconnect();\n }\n }, [element]);\n return rect;\n\n function reducer(currentRect) {\n if (!element) {\n return null;\n }\n\n if (element.isConnected === false) {\n var _ref;\n\n // Fall back to last rect we measured if the element is\n // no longer connected to the DOM.\n return (_ref = currentRect != null ? currentRect : fallbackRect) != null ? _ref : null;\n }\n\n const newRect = measure(element);\n\n if (JSON.stringify(currentRect) === JSON.stringify(newRect)) {\n return currentRect;\n }\n\n return newRect;\n }\n}\n\nfunction useRectDelta(rect) {\n const initialRect = useInitialValue(rect);\n return getRectDelta(rect, initialRect);\n}\n\nconst defaultValue$1 = [];\nfunction useScrollableAncestors(node) {\n const previousNode = useRef(node);\n const ancestors = useLazyMemo(previousValue => {\n if (!node) {\n return defaultValue$1;\n }\n\n if (previousValue && previousValue !== defaultValue$1 && node && previousNode.current && node.parentNode === previousNode.current.parentNode) {\n return previousValue;\n }\n\n return getScrollableAncestors(node);\n }, [node]);\n useEffect(() => {\n previousNode.current = node;\n }, [node]);\n return ancestors;\n}\n\nfunction useScrollOffsets(elements) {\n const [scrollCoordinates, setScrollCoordinates] = useState(null);\n const prevElements = useRef(elements); // To-do: Throttle the handleScroll callback\n\n const handleScroll = useCallback(event => {\n const scrollingElement = getScrollableElement(event.target);\n\n if (!scrollingElement) {\n return;\n }\n\n setScrollCoordinates(scrollCoordinates => {\n if (!scrollCoordinates) {\n return null;\n }\n\n scrollCoordinates.set(scrollingElement, getScrollCoordinates(scrollingElement));\n return new Map(scrollCoordinates);\n });\n }, []);\n useEffect(() => {\n const previousElements = prevElements.current;\n\n if (elements !== previousElements) {\n cleanup(previousElements);\n const entries = elements.map(element => {\n const scrollableElement = getScrollableElement(element);\n\n if (scrollableElement) {\n scrollableElement.addEventListener('scroll', handleScroll, {\n passive: true\n });\n return [scrollableElement, getScrollCoordinates(scrollableElement)];\n }\n\n return null;\n }).filter(entry => entry != null);\n setScrollCoordinates(entries.length ? new Map(entries) : null);\n prevElements.current = elements;\n }\n\n return () => {\n cleanup(elements);\n cleanup(previousElements);\n };\n\n function cleanup(elements) {\n elements.forEach(element => {\n const scrollableElement = getScrollableElement(element);\n scrollableElement == null ? void 0 : scrollableElement.removeEventListener('scroll', handleScroll);\n });\n }\n }, [handleScroll, elements]);\n return useMemo(() => {\n if (elements.length) {\n return scrollCoordinates ? Array.from(scrollCoordinates.values()).reduce((acc, coordinates) => add(acc, coordinates), defaultCoordinates) : getScrollOffsets(elements);\n }\n\n return defaultCoordinates;\n }, [elements, scrollCoordinates]);\n}\n\nfunction useScrollOffsetsDelta(scrollOffsets, dependencies) {\n if (dependencies === void 0) {\n dependencies = [];\n }\n\n const initialScrollOffsets = useRef(null);\n useEffect(() => {\n initialScrollOffsets.current = null;\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n dependencies);\n useEffect(() => {\n const hasScrollOffsets = scrollOffsets !== defaultCoordinates;\n\n if (hasScrollOffsets && !initialScrollOffsets.current) {\n initialScrollOffsets.current = scrollOffsets;\n }\n\n if (!hasScrollOffsets && initialScrollOffsets.current) {\n initialScrollOffsets.current = null;\n }\n }, [scrollOffsets]);\n return initialScrollOffsets.current ? subtract(scrollOffsets, initialScrollOffsets.current) : defaultCoordinates;\n}\n\nfunction useSensorSetup(sensors) {\n useEffect(() => {\n if (!canUseDOM) {\n return;\n }\n\n const teardownFns = sensors.map(_ref => {\n let {\n sensor\n } = _ref;\n return sensor.setup == null ? void 0 : sensor.setup();\n });\n return () => {\n for (const teardown of teardownFns) {\n teardown == null ? void 0 : teardown();\n }\n };\n }, // TO-DO: Sensors length could theoretically change which would not be a valid dependency\n // eslint-disable-next-line react-hooks/exhaustive-deps\n sensors.map(_ref2 => {\n let {\n sensor\n } = _ref2;\n return sensor;\n }));\n}\n\nfunction useSyntheticListeners(listeners, id) {\n return useMemo(() => {\n return listeners.reduce((acc, _ref) => {\n let {\n eventName,\n handler\n } = _ref;\n\n acc[eventName] = event => {\n handler(event, id);\n };\n\n return acc;\n }, {});\n }, [listeners, id]);\n}\n\nfunction useWindowRect(element) {\n return useMemo(() => element ? getWindowClientRect(element) : null, [element]);\n}\n\nconst defaultValue$2 = [];\nfunction useRects(elements, measure) {\n if (measure === void 0) {\n measure = getClientRect;\n }\n\n const [firstElement] = elements;\n const windowRect = useWindowRect(firstElement ? getWindow(firstElement) : null);\n const [rects, measureRects] = useReducer(reducer, defaultValue$2);\n const resizeObserver = useResizeObserver({\n callback: measureRects\n });\n\n if (elements.length > 0 && rects === defaultValue$2) {\n measureRects();\n }\n\n useIsomorphicLayoutEffect(() => {\n if (elements.length) {\n elements.forEach(element => resizeObserver == null ? void 0 : resizeObserver.observe(element));\n } else {\n resizeObserver == null ? void 0 : resizeObserver.disconnect();\n measureRects();\n }\n }, [elements]);\n return rects;\n\n function reducer() {\n if (!elements.length) {\n return defaultValue$2;\n }\n\n return elements.map(element => isDocumentScrollingElement(element) ? windowRect : new Rect(measure(element), element));\n }\n}\n\nfunction getMeasurableNode(node) {\n if (!node) {\n return null;\n }\n\n if (node.children.length > 1) {\n return node;\n }\n\n const firstChild = node.children[0];\n return isHTMLElement(firstChild) ? firstChild : node;\n}\n\nfunction useDragOverlayMeasuring(_ref) {\n let {\n measure\n } = _ref;\n const [rect, setRect] = useState(null);\n const handleResize = useCallback(entries => {\n for (const {\n target\n } of entries) {\n if (isHTMLElement(target)) {\n setRect(rect => {\n const newRect = measure(target);\n return rect ? { ...rect,\n width: newRect.width,\n height: newRect.height\n } : newRect;\n });\n break;\n }\n }\n }, [measure]);\n const resizeObserver = useResizeObserver({\n callback: handleResize\n });\n const handleNodeChange = useCallback(element => {\n const node = getMeasurableNode(element);\n resizeObserver == null ? void 0 : resizeObserver.disconnect();\n\n if (node) {\n resizeObserver == null ? void 0 : resizeObserver.observe(node);\n }\n\n setRect(node ? measure(node) : null);\n }, [measure, resizeObserver]);\n const [nodeRef, setRef] = useNodeRef(handleNodeChange);\n return useMemo(() => ({\n nodeRef,\n rect,\n setRef\n }), [rect, nodeRef, setRef]);\n}\n\nconst defaultSensors = [{\n sensor: PointerSensor,\n options: {}\n}, {\n sensor: KeyboardSensor,\n options: {}\n}];\nconst defaultData = {\n current: {}\n};\nconst defaultMeasuringConfiguration = {\n draggable: {\n measure: getTransformAgnosticClientRect\n },\n droppable: {\n measure: getTransformAgnosticClientRect,\n strategy: MeasuringStrategy.WhileDragging,\n frequency: MeasuringFrequency.Optimized\n },\n dragOverlay: {\n measure: getClientRect\n }\n};\n\nclass DroppableContainersMap extends Map {\n get(id) {\n var _super$get;\n\n return id != null ? (_super$get = super.get(id)) != null ? _super$get : undefined : undefined;\n }\n\n toArray() {\n return Array.from(this.values());\n }\n\n getEnabled() {\n return this.toArray().filter(_ref => {\n let {\n disabled\n } = _ref;\n return !disabled;\n });\n }\n\n getNodeFor(id) {\n var _this$get$node$curren, _this$get;\n\n return (_this$get$node$curren = (_this$get = this.get(id)) == null ? void 0 : _this$get.node.current) != null ? _this$get$node$curren : undefined;\n }\n\n}\n\nconst defaultPublicContext = {\n activatorEvent: null,\n active: null,\n activeNode: null,\n activeNodeRect: null,\n collisions: null,\n containerNodeRect: null,\n draggableNodes: /*#__PURE__*/new Map(),\n droppableRects: /*#__PURE__*/new Map(),\n droppableContainers: /*#__PURE__*/new DroppableContainersMap(),\n over: null,\n dragOverlay: {\n nodeRef: {\n current: null\n },\n rect: null,\n setRef: noop\n },\n scrollableAncestors: [],\n scrollableAncestorRects: [],\n measuringConfiguration: defaultMeasuringConfiguration,\n measureDroppableContainers: noop,\n windowRect: null,\n measuringScheduled: false\n};\nconst defaultInternalContext = {\n activatorEvent: null,\n activators: [],\n active: null,\n activeNodeRect: null,\n ariaDescribedById: {\n draggable: ''\n },\n dispatch: noop,\n draggableNodes: /*#__PURE__*/new Map(),\n over: null,\n measureDroppableContainers: noop\n};\nconst InternalContext = /*#__PURE__*/createContext(defaultInternalContext);\nconst PublicContext = /*#__PURE__*/createContext(defaultPublicContext);\n\nfunction getInitialState() {\n return {\n draggable: {\n active: null,\n initialCoordinates: {\n x: 0,\n y: 0\n },\n nodes: new Map(),\n translate: {\n x: 0,\n y: 0\n }\n },\n droppable: {\n containers: new DroppableContainersMap()\n }\n };\n}\nfunction reducer(state, action) {\n switch (action.type) {\n case Action.DragStart:\n return { ...state,\n draggable: { ...state.draggable,\n initialCoordinates: action.initialCoordinates,\n active: action.active\n }\n };\n\n case Action.DragMove:\n if (!state.draggable.active) {\n return state;\n }\n\n return { ...state,\n draggable: { ...state.draggable,\n translate: {\n x: action.coordinates.x - state.draggable.initialCoordinates.x,\n y: action.coordinates.y - state.draggable.initialCoordinates.y\n }\n }\n };\n\n case Action.DragEnd:\n case Action.DragCancel:\n return { ...state,\n draggable: { ...state.draggable,\n active: null,\n initialCoordinates: {\n x: 0,\n y: 0\n },\n translate: {\n x: 0,\n y: 0\n }\n }\n };\n\n case Action.RegisterDroppable:\n {\n const {\n element\n } = action;\n const {\n id\n } = element;\n const containers = new DroppableContainersMap(state.droppable.containers);\n containers.set(id, element);\n return { ...state,\n droppable: { ...state.droppable,\n containers\n }\n };\n }\n\n case Action.SetDroppableDisabled:\n {\n const {\n id,\n key,\n disabled\n } = action;\n const element = state.droppable.containers.get(id);\n\n if (!element || key !== element.key) {\n return state;\n }\n\n const containers = new DroppableContainersMap(state.droppable.containers);\n containers.set(id, { ...element,\n disabled\n });\n return { ...state,\n droppable: { ...state.droppable,\n containers\n }\n };\n }\n\n case Action.UnregisterDroppable:\n {\n const {\n id,\n key\n } = action;\n const element = state.droppable.containers.get(id);\n\n if (!element || key !== element.key) {\n return state;\n }\n\n const containers = new DroppableContainersMap(state.droppable.containers);\n containers.delete(id);\n return { ...state,\n droppable: { ...state.droppable,\n containers\n }\n };\n }\n\n default:\n {\n return state;\n }\n }\n}\n\nfunction RestoreFocus(_ref) {\n let {\n disabled\n } = _ref;\n const {\n active,\n activatorEvent,\n draggableNodes\n } = useContext(InternalContext);\n const previousActivatorEvent = usePrevious(activatorEvent);\n const previousActiveId = usePrevious(active == null ? void 0 : active.id); // Restore keyboard focus on the activator node\n\n useEffect(() => {\n if (disabled) {\n return;\n }\n\n if (!activatorEvent && previousActivatorEvent && previousActiveId != null) {\n if (!isKeyboardEvent(previousActivatorEvent)) {\n return;\n }\n\n if (document.activeElement === previousActivatorEvent.target) {\n // No need to restore focus\n return;\n }\n\n const draggableNode = draggableNodes.get(previousActiveId);\n\n if (!draggableNode) {\n return;\n }\n\n const {\n activatorNode,\n node\n } = draggableNode;\n\n if (!activatorNode.current && !node.current) {\n return;\n }\n\n requestAnimationFrame(() => {\n for (const element of [activatorNode.current, node.current]) {\n if (!element) {\n continue;\n }\n\n const focusableNode = findFirstFocusableNode(element);\n\n if (focusableNode) {\n focusableNode.focus();\n break;\n }\n }\n });\n }\n }, [activatorEvent, disabled, draggableNodes, previousActiveId, previousActivatorEvent]);\n return null;\n}\n\nfunction applyModifiers(modifiers, _ref) {\n let {\n transform,\n ...args\n } = _ref;\n return modifiers != null && modifiers.length ? modifiers.reduce((accumulator, modifier) => {\n return modifier({\n transform: accumulator,\n ...args\n });\n }, transform) : transform;\n}\n\nfunction useMeasuringConfiguration(config) {\n return useMemo(() => ({\n draggable: { ...defaultMeasuringConfiguration.draggable,\n ...(config == null ? void 0 : config.draggable)\n },\n droppable: { ...defaultMeasuringConfiguration.droppable,\n ...(config == null ? void 0 : config.droppable)\n },\n dragOverlay: { ...defaultMeasuringConfiguration.dragOverlay,\n ...(config == null ? void 0 : config.dragOverlay)\n }\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [config == null ? void 0 : config.draggable, config == null ? void 0 : config.droppable, config == null ? void 0 : config.dragOverlay]);\n}\n\nfunction useLayoutShiftScrollCompensation(_ref) {\n let {\n activeNode,\n measure,\n initialRect,\n config = true\n } = _ref;\n const initialized = useRef(false);\n const {\n x,\n y\n } = typeof config === 'boolean' ? {\n x: config,\n y: config\n } : config;\n useIsomorphicLayoutEffect(() => {\n const disabled = !x && !y;\n\n if (disabled || !activeNode) {\n initialized.current = false;\n return;\n }\n\n if (initialized.current || !initialRect) {\n // Return early if layout shift scroll compensation was already attempted\n // or if there is no initialRect to compare to.\n return;\n } // Get the most up to date node ref for the active draggable\n\n\n const node = activeNode == null ? void 0 : activeNode.node.current;\n\n if (!node || node.isConnected === false) {\n // Return early if there is no attached node ref or if the node is\n // disconnected from the document.\n return;\n }\n\n const rect = measure(node);\n const rectDelta = getRectDelta(rect, initialRect);\n\n if (!x) {\n rectDelta.x = 0;\n }\n\n if (!y) {\n rectDelta.y = 0;\n } // Only perform layout shift scroll compensation once\n\n\n initialized.current = true;\n\n if (Math.abs(rectDelta.x) > 0 || Math.abs(rectDelta.y) > 0) {\n const firstScrollableAncestor = getFirstScrollableAncestor(node);\n\n if (firstScrollableAncestor) {\n firstScrollableAncestor.scrollBy({\n top: rectDelta.y,\n left: rectDelta.x\n });\n }\n }\n }, [activeNode, x, y, initialRect, measure]);\n}\n\nconst ActiveDraggableContext = /*#__PURE__*/createContext({ ...defaultCoordinates,\n scaleX: 1,\n scaleY: 1\n});\nvar Status;\n\n(function (Status) {\n Status[Status[\"Uninitialized\"] = 0] = \"Uninitialized\";\n Status[Status[\"Initializing\"] = 1] = \"Initializing\";\n Status[Status[\"Initialized\"] = 2] = \"Initialized\";\n})(Status || (Status = {}));\n\nconst DndContext = /*#__PURE__*/memo(function DndContext(_ref) {\n var _sensorContext$curren, _dragOverlay$nodeRef$, _dragOverlay$rect, _over$rect;\n\n let {\n id,\n accessibility,\n autoScroll = true,\n children,\n sensors = defaultSensors,\n collisionDetection = rectIntersection,\n measuring,\n modifiers,\n ...props\n } = _ref;\n const store = useReducer(reducer, undefined, getInitialState);\n const [state, dispatch] = store;\n const [dispatchMonitorEvent, registerMonitorListener] = useDndMonitorProvider();\n const [status, setStatus] = useState(Status.Uninitialized);\n const isInitialized = status === Status.Initialized;\n const {\n draggable: {\n active: activeId,\n nodes: draggableNodes,\n translate\n },\n droppable: {\n containers: droppableContainers\n }\n } = state;\n const node = activeId ? draggableNodes.get(activeId) : null;\n const activeRects = useRef({\n initial: null,\n translated: null\n });\n const active = useMemo(() => {\n var _node$data;\n\n return activeId != null ? {\n id: activeId,\n // It's possible for the active node to unmount while dragging\n data: (_node$data = node == null ? void 0 : node.data) != null ? _node$data : defaultData,\n rect: activeRects\n } : null;\n }, [activeId, node]);\n const activeRef = useRef(null);\n const [activeSensor, setActiveSensor] = useState(null);\n const [activatorEvent, setActivatorEvent] = useState(null);\n const latestProps = useLatestValue(props, Object.values(props));\n const draggableDescribedById = useUniqueId(\"DndDescribedBy\", id);\n const enabledDroppableContainers = useMemo(() => droppableContainers.getEnabled(), [droppableContainers]);\n const measuringConfiguration = useMeasuringConfiguration(measuring);\n const {\n droppableRects,\n measureDroppableContainers,\n measuringScheduled\n } = useDroppableMeasuring(enabledDroppableContainers, {\n dragging: isInitialized,\n dependencies: [translate.x, translate.y],\n config: measuringConfiguration.droppable\n });\n const activeNode = useCachedNode(draggableNodes, activeId);\n const activationCoordinates = useMemo(() => activatorEvent ? getEventCoordinates(activatorEvent) : null, [activatorEvent]);\n const autoScrollOptions = getAutoScrollerOptions();\n const initialActiveNodeRect = useInitialRect(activeNode, measuringConfiguration.draggable.measure);\n useLayoutShiftScrollCompensation({\n activeNode: activeId ? draggableNodes.get(activeId) : null,\n config: autoScrollOptions.layoutShiftCompensation,\n initialRect: initialActiveNodeRect,\n measure: measuringConfiguration.draggable.measure\n });\n const activeNodeRect = useRect(activeNode, measuringConfiguration.draggable.measure, initialActiveNodeRect);\n const containerNodeRect = useRect(activeNode ? activeNode.parentElement : null);\n const sensorContext = useRef({\n activatorEvent: null,\n active: null,\n activeNode,\n collisionRect: null,\n collisions: null,\n droppableRects,\n draggableNodes,\n draggingNode: null,\n draggingNodeRect: null,\n droppableContainers,\n over: null,\n scrollableAncestors: [],\n scrollAdjustedTranslate: null\n });\n const overNode = droppableContainers.getNodeFor((_sensorContext$curren = sensorContext.current.over) == null ? void 0 : _sensorContext$curren.id);\n const dragOverlay = useDragOverlayMeasuring({\n measure: measuringConfiguration.dragOverlay.measure\n }); // Use the rect of the drag overlay if it is mounted\n\n const draggingNode = (_dragOverlay$nodeRef$ = dragOverlay.nodeRef.current) != null ? _dragOverlay$nodeRef$ : activeNode;\n const draggingNodeRect = isInitialized ? (_dragOverlay$rect = dragOverlay.rect) != null ? _dragOverlay$rect : activeNodeRect : null;\n const usesDragOverlay = Boolean(dragOverlay.nodeRef.current && dragOverlay.rect); // The delta between the previous and new position of the draggable node\n // is only relevant when there is no drag overlay\n\n const nodeRectDelta = useRectDelta(usesDragOverlay ? null : activeNodeRect); // Get the window rect of the dragging node\n\n const windowRect = useWindowRect(draggingNode ? getWindow(draggingNode) : null); // Get scrollable ancestors of the dragging node\n\n const scrollableAncestors = useScrollableAncestors(isInitialized ? overNode != null ? overNode : activeNode : null);\n const scrollableAncestorRects = useRects(scrollableAncestors); // Apply modifiers\n\n const modifiedTranslate = applyModifiers(modifiers, {\n transform: {\n x: translate.x - nodeRectDelta.x,\n y: translate.y - nodeRectDelta.y,\n scaleX: 1,\n scaleY: 1\n },\n activatorEvent,\n active,\n activeNodeRect,\n containerNodeRect,\n draggingNodeRect,\n over: sensorContext.current.over,\n overlayNodeRect: dragOverlay.rect,\n scrollableAncestors,\n scrollableAncestorRects,\n windowRect\n });\n const pointerCoordinates = activationCoordinates ? add(activationCoordinates, translate) : null;\n const scrollOffsets = useScrollOffsets(scrollableAncestors); // Represents the scroll delta since dragging was initiated\n\n const scrollAdjustment = useScrollOffsetsDelta(scrollOffsets); // Represents the scroll delta since the last time the active node rect was measured\n\n const activeNodeScrollDelta = useScrollOffsetsDelta(scrollOffsets, [activeNodeRect]);\n const scrollAdjustedTranslate = add(modifiedTranslate, scrollAdjustment);\n const collisionRect = draggingNodeRect ? getAdjustedRect(draggingNodeRect, modifiedTranslate) : null;\n const collisions = active && collisionRect ? collisionDetection({\n active,\n collisionRect,\n droppableRects,\n droppableContainers: enabledDroppableContainers,\n pointerCoordinates\n }) : null;\n const overId = getFirstCollision(collisions, 'id');\n const [over, setOver] = useState(null); // When there is no drag overlay used, we need to account for the\n // window scroll delta\n\n const appliedTranslate = usesDragOverlay ? modifiedTranslate : add(modifiedTranslate, activeNodeScrollDelta);\n const transform = adjustScale(appliedTranslate, (_over$rect = over == null ? void 0 : over.rect) != null ? _over$rect : null, activeNodeRect);\n const instantiateSensor = useCallback((event, _ref2) => {\n let {\n sensor: Sensor,\n options\n } = _ref2;\n\n if (activeRef.current == null) {\n return;\n }\n\n const activeNode = draggableNodes.get(activeRef.current);\n\n if (!activeNode) {\n return;\n }\n\n const activatorEvent = event.nativeEvent;\n const sensorInstance = new Sensor({\n active: activeRef.current,\n activeNode,\n event: activatorEvent,\n options,\n // Sensors need to be instantiated with refs for arguments that change over time\n // otherwise they are frozen in time with the stale arguments\n context: sensorContext,\n\n onStart(initialCoordinates) {\n const id = activeRef.current;\n\n if (id == null) {\n return;\n }\n\n const draggableNode = draggableNodes.get(id);\n\n if (!draggableNode) {\n return;\n }\n\n const {\n onDragStart\n } = latestProps.current;\n const event = {\n active: {\n id,\n data: draggableNode.data,\n rect: activeRects\n }\n };\n unstable_batchedUpdates(() => {\n onDragStart == null ? void 0 : onDragStart(event);\n setStatus(Status.Initializing);\n dispatch({\n type: Action.DragStart,\n initialCoordinates,\n active: id\n });\n dispatchMonitorEvent({\n type: 'onDragStart',\n event\n });\n });\n },\n\n onMove(coordinates) {\n dispatch({\n type: Action.DragMove,\n coordinates\n });\n },\n\n onEnd: createHandler(Action.DragEnd),\n onCancel: createHandler(Action.DragCancel)\n });\n unstable_batchedUpdates(() => {\n setActiveSensor(sensorInstance);\n setActivatorEvent(event.nativeEvent);\n });\n\n function createHandler(type) {\n return async function handler() {\n const {\n active,\n collisions,\n over,\n scrollAdjustedTranslate\n } = sensorContext.current;\n let event = null;\n\n if (active && scrollAdjustedTranslate) {\n const {\n cancelDrop\n } = latestProps.current;\n event = {\n activatorEvent,\n active: active,\n collisions,\n delta: scrollAdjustedTranslate,\n over\n };\n\n if (type === Action.DragEnd && typeof cancelDrop === 'function') {\n const shouldCancel = await Promise.resolve(cancelDrop(event));\n\n if (shouldCancel) {\n type = Action.DragCancel;\n }\n }\n }\n\n activeRef.current = null;\n unstable_batchedUpdates(() => {\n dispatch({\n type\n });\n setStatus(Status.Uninitialized);\n setOver(null);\n setActiveSensor(null);\n setActivatorEvent(null);\n const eventName = type === Action.DragEnd ? 'onDragEnd' : 'onDragCancel';\n\n if (event) {\n const handler = latestProps.current[eventName];\n handler == null ? void 0 : handler(event);\n dispatchMonitorEvent({\n type: eventName,\n event\n });\n }\n });\n };\n }\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [draggableNodes]);\n const bindActivatorToSensorInstantiator = useCallback((handler, sensor) => {\n return (event, active) => {\n const nativeEvent = event.nativeEvent;\n const activeDraggableNode = draggableNodes.get(active);\n\n if ( // Another sensor is already instantiating\n activeRef.current !== null || // No active draggable\n !activeDraggableNode || // Event has already been captured\n nativeEvent.dndKit || nativeEvent.defaultPrevented) {\n return;\n }\n\n const activationContext = {\n active: activeDraggableNode\n };\n const shouldActivate = handler(event, sensor.options, activationContext);\n\n if (shouldActivate === true) {\n nativeEvent.dndKit = {\n capturedBy: sensor.sensor\n };\n activeRef.current = active;\n instantiateSensor(event, sensor);\n }\n };\n }, [draggableNodes, instantiateSensor]);\n const activators = useCombineActivators(sensors, bindActivatorToSensorInstantiator);\n useSensorSetup(sensors);\n useIsomorphicLayoutEffect(() => {\n if (activeNodeRect && status === Status.Initializing) {\n setStatus(Status.Initialized);\n }\n }, [activeNodeRect, status]);\n useEffect(() => {\n const {\n onDragMove\n } = latestProps.current;\n const {\n active,\n activatorEvent,\n collisions,\n over\n } = sensorContext.current;\n\n if (!active || !activatorEvent) {\n return;\n }\n\n const event = {\n active,\n activatorEvent,\n collisions,\n delta: {\n x: scrollAdjustedTranslate.x,\n y: scrollAdjustedTranslate.y\n },\n over\n };\n unstable_batchedUpdates(() => {\n onDragMove == null ? void 0 : onDragMove(event);\n dispatchMonitorEvent({\n type: 'onDragMove',\n event\n });\n });\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [scrollAdjustedTranslate.x, scrollAdjustedTranslate.y]);\n useEffect(() => {\n const {\n active,\n activatorEvent,\n collisions,\n droppableContainers,\n scrollAdjustedTranslate\n } = sensorContext.current;\n\n if (!active || activeRef.current == null || !activatorEvent || !scrollAdjustedTranslate) {\n return;\n }\n\n const {\n onDragOver\n } = latestProps.current;\n const overContainer = droppableContainers.get(overId);\n const over = overContainer && overContainer.rect.current ? {\n id: overContainer.id,\n rect: overContainer.rect.current,\n data: overContainer.data,\n disabled: overContainer.disabled\n } : null;\n const event = {\n active,\n activatorEvent,\n collisions,\n delta: {\n x: scrollAdjustedTranslate.x,\n y: scrollAdjustedTranslate.y\n },\n over\n };\n unstable_batchedUpdates(() => {\n setOver(over);\n onDragOver == null ? void 0 : onDragOver(event);\n dispatchMonitorEvent({\n type: 'onDragOver',\n event\n });\n });\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [overId]);\n useIsomorphicLayoutEffect(() => {\n sensorContext.current = {\n activatorEvent,\n active,\n activeNode,\n collisionRect,\n collisions,\n droppableRects,\n draggableNodes,\n draggingNode,\n draggingNodeRect,\n droppableContainers,\n over,\n scrollableAncestors,\n scrollAdjustedTranslate\n };\n activeRects.current = {\n initial: draggingNodeRect,\n translated: collisionRect\n };\n }, [active, activeNode, collisions, collisionRect, draggableNodes, draggingNode, draggingNodeRect, droppableRects, droppableContainers, over, scrollableAncestors, scrollAdjustedTranslate]);\n useAutoScroller({ ...autoScrollOptions,\n delta: translate,\n draggingRect: collisionRect,\n pointerCoordinates,\n scrollableAncestors,\n scrollableAncestorRects\n });\n const publicContext = useMemo(() => {\n const context = {\n active,\n activeNode,\n activeNodeRect,\n activatorEvent,\n collisions,\n containerNodeRect,\n dragOverlay,\n draggableNodes,\n droppableContainers,\n droppableRects,\n over,\n measureDroppableContainers,\n scrollableAncestors,\n scrollableAncestorRects,\n measuringConfiguration,\n measuringScheduled,\n windowRect\n };\n return context;\n }, [active, activeNode, activeNodeRect, activatorEvent, collisions, containerNodeRect, dragOverlay, draggableNodes, droppableContainers, droppableRects, over, measureDroppableContainers, scrollableAncestors, scrollableAncestorRects, measuringConfiguration, measuringScheduled, windowRect]);\n const internalContext = useMemo(() => {\n const context = {\n activatorEvent,\n activators,\n active,\n activeNodeRect,\n ariaDescribedById: {\n draggable: draggableDescribedById\n },\n dispatch,\n draggableNodes,\n over,\n measureDroppableContainers\n };\n return context;\n }, [activatorEvent, activators, active, activeNodeRect, dispatch, draggableDescribedById, draggableNodes, over, measureDroppableContainers]);\n return React.createElement(DndMonitorContext.Provider, {\n value: registerMonitorListener\n }, React.createElement(InternalContext.Provider, {\n value: internalContext\n }, React.createElement(PublicContext.Provider, {\n value: publicContext\n }, React.createElement(ActiveDraggableContext.Provider, {\n value: transform\n }, children)), React.createElement(RestoreFocus, {\n disabled: (accessibility == null ? void 0 : accessibility.restoreFocus) === false\n })), React.createElement(Accessibility, { ...accessibility,\n hiddenTextDescribedById: draggableDescribedById\n }));\n\n function getAutoScrollerOptions() {\n const activeSensorDisablesAutoscroll = (activeSensor == null ? void 0 : activeSensor.autoScrollEnabled) === false;\n const autoScrollGloballyDisabled = typeof autoScroll === 'object' ? autoScroll.enabled === false : autoScroll === false;\n const enabled = isInitialized && !activeSensorDisablesAutoscroll && !autoScrollGloballyDisabled;\n\n if (typeof autoScroll === 'object') {\n return { ...autoScroll,\n enabled\n };\n }\n\n return {\n enabled\n };\n }\n});\n\nconst NullContext = /*#__PURE__*/createContext(null);\nconst defaultRole = 'button';\nconst ID_PREFIX = 'Droppable';\nfunction useDraggable(_ref) {\n let {\n id,\n data,\n disabled = false,\n attributes\n } = _ref;\n const key = useUniqueId(ID_PREFIX);\n const {\n activators,\n activatorEvent,\n active,\n activeNodeRect,\n ariaDescribedById,\n draggableNodes,\n over\n } = useContext(InternalContext);\n const {\n role = defaultRole,\n roleDescription = 'draggable',\n tabIndex = 0\n } = attributes != null ? attributes : {};\n const isDragging = (active == null ? void 0 : active.id) === id;\n const transform = useContext(isDragging ? ActiveDraggableContext : NullContext);\n const [node, setNodeRef] = useNodeRef();\n const [activatorNode, setActivatorNodeRef] = useNodeRef();\n const listeners = useSyntheticListeners(activators, id);\n const dataRef = useLatestValue(data);\n useIsomorphicLayoutEffect(() => {\n draggableNodes.set(id, {\n id,\n key,\n node,\n activatorNode,\n data: dataRef\n });\n return () => {\n const node = draggableNodes.get(id);\n\n if (node && node.key === key) {\n draggableNodes.delete(id);\n }\n };\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [draggableNodes, id]);\n const memoizedAttributes = useMemo(() => ({\n role,\n tabIndex,\n 'aria-disabled': disabled,\n 'aria-pressed': isDragging && role === defaultRole ? true : undefined,\n 'aria-roledescription': roleDescription,\n 'aria-describedby': ariaDescribedById.draggable\n }), [disabled, role, tabIndex, isDragging, roleDescription, ariaDescribedById.draggable]);\n return {\n active,\n activatorEvent,\n activeNodeRect,\n attributes: memoizedAttributes,\n isDragging,\n listeners: disabled ? undefined : listeners,\n node,\n over,\n setNodeRef,\n setActivatorNodeRef,\n transform\n };\n}\n\nfunction useDndContext() {\n return useContext(PublicContext);\n}\n\nconst ID_PREFIX$1 = 'Droppable';\nconst defaultResizeObserverConfig = {\n timeout: 25\n};\nfunction useDroppable(_ref) {\n let {\n data,\n disabled = false,\n id,\n resizeObserverConfig\n } = _ref;\n const key = useUniqueId(ID_PREFIX$1);\n const {\n active,\n dispatch,\n over,\n measureDroppableContainers\n } = useContext(InternalContext);\n const previous = useRef({\n disabled\n });\n const resizeObserverConnected = useRef(false);\n const rect = useRef(null);\n const callbackId = useRef(null);\n const {\n disabled: resizeObserverDisabled,\n updateMeasurementsFor,\n timeout: resizeObserverTimeout\n } = { ...defaultResizeObserverConfig,\n ...resizeObserverConfig\n };\n const ids = useLatestValue(updateMeasurementsFor != null ? updateMeasurementsFor : id);\n const handleResize = useCallback(() => {\n if (!resizeObserverConnected.current) {\n // ResizeObserver invokes the `handleResize` callback as soon as `observe` is called,\n // assuming the element is rendered and displayed.\n resizeObserverConnected.current = true;\n return;\n }\n\n if (callbackId.current != null) {\n clearTimeout(callbackId.current);\n }\n\n callbackId.current = setTimeout(() => {\n measureDroppableContainers(Array.isArray(ids.current) ? ids.current : [ids.current]);\n callbackId.current = null;\n }, resizeObserverTimeout);\n }, //eslint-disable-next-line react-hooks/exhaustive-deps\n [resizeObserverTimeout]);\n const resizeObserver = useResizeObserver({\n callback: handleResize,\n disabled: resizeObserverDisabled || !active\n });\n const handleNodeChange = useCallback((newElement, previousElement) => {\n if (!resizeObserver) {\n return;\n }\n\n if (previousElement) {\n resizeObserver.unobserve(previousElement);\n resizeObserverConnected.current = false;\n }\n\n if (newElement) {\n resizeObserver.observe(newElement);\n }\n }, [resizeObserver]);\n const [nodeRef, setNodeRef] = useNodeRef(handleNodeChange);\n const dataRef = useLatestValue(data);\n useEffect(() => {\n if (!resizeObserver || !nodeRef.current) {\n return;\n }\n\n resizeObserver.disconnect();\n resizeObserverConnected.current = false;\n resizeObserver.observe(nodeRef.current);\n }, [nodeRef, resizeObserver]);\n useIsomorphicLayoutEffect(() => {\n dispatch({\n type: Action.RegisterDroppable,\n element: {\n id,\n key,\n disabled,\n node: nodeRef,\n rect,\n data: dataRef\n }\n });\n return () => dispatch({\n type: Action.UnregisterDroppable,\n key,\n id\n });\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [id]);\n useEffect(() => {\n if (disabled !== previous.current.disabled) {\n dispatch({\n type: Action.SetDroppableDisabled,\n id,\n key,\n disabled\n });\n previous.current.disabled = disabled;\n }\n }, [id, key, disabled, dispatch]);\n return {\n active,\n rect,\n isOver: (over == null ? void 0 : over.id) === id,\n node: nodeRef,\n over,\n setNodeRef\n };\n}\n\nfunction AnimationManager(_ref) {\n let {\n animation,\n children\n } = _ref;\n const [clonedChildren, setClonedChildren] = useState(null);\n const [element, setElement] = useState(null);\n const previousChildren = usePrevious(children);\n\n if (!children && !clonedChildren && previousChildren) {\n setClonedChildren(previousChildren);\n }\n\n useIsomorphicLayoutEffect(() => {\n if (!element) {\n return;\n }\n\n const key = clonedChildren == null ? void 0 : clonedChildren.key;\n const id = clonedChildren == null ? void 0 : clonedChildren.props.id;\n\n if (key == null || id == null) {\n setClonedChildren(null);\n return;\n }\n\n Promise.resolve(animation(id, element)).then(() => {\n setClonedChildren(null);\n });\n }, [animation, clonedChildren, element]);\n return React.createElement(React.Fragment, null, children, clonedChildren ? cloneElement(clonedChildren, {\n ref: setElement\n }) : null);\n}\n\nconst defaultTransform = {\n x: 0,\n y: 0,\n scaleX: 1,\n scaleY: 1\n};\nfunction NullifiedContextProvider(_ref) {\n let {\n children\n } = _ref;\n return React.createElement(InternalContext.Provider, {\n value: defaultInternalContext\n }, React.createElement(ActiveDraggableContext.Provider, {\n value: defaultTransform\n }, children));\n}\n\nconst baseStyles = {\n position: 'fixed',\n touchAction: 'none'\n};\n\nconst defaultTransition = activatorEvent => {\n const isKeyboardActivator = isKeyboardEvent(activatorEvent);\n return isKeyboardActivator ? 'transform 250ms ease' : undefined;\n};\n\nconst PositionedOverlay = /*#__PURE__*/forwardRef((_ref, ref) => {\n let {\n as,\n activatorEvent,\n adjustScale,\n children,\n className,\n rect,\n style,\n transform,\n transition = defaultTransition\n } = _ref;\n\n if (!rect) {\n return null;\n }\n\n const scaleAdjustedTransform = adjustScale ? transform : { ...transform,\n scaleX: 1,\n scaleY: 1\n };\n const styles = { ...baseStyles,\n width: rect.width,\n height: rect.height,\n top: rect.top,\n left: rect.left,\n transform: CSS.Transform.toString(scaleAdjustedTransform),\n transformOrigin: adjustScale && activatorEvent ? getRelativeTransformOrigin(activatorEvent, rect) : undefined,\n transition: typeof transition === 'function' ? transition(activatorEvent) : transition,\n ...style\n };\n return React.createElement(as, {\n className,\n style: styles,\n ref\n }, children);\n});\n\nconst defaultDropAnimationSideEffects = options => _ref => {\n let {\n active,\n dragOverlay\n } = _ref;\n const originalStyles = {};\n const {\n styles,\n className\n } = options;\n\n if (styles != null && styles.active) {\n for (const [key, value] of Object.entries(styles.active)) {\n if (value === undefined) {\n continue;\n }\n\n originalStyles[key] = active.node.style.getPropertyValue(key);\n active.node.style.setProperty(key, value);\n }\n }\n\n if (styles != null && styles.dragOverlay) {\n for (const [key, value] of Object.entries(styles.dragOverlay)) {\n if (value === undefined) {\n continue;\n }\n\n dragOverlay.node.style.setProperty(key, value);\n }\n }\n\n if (className != null && className.active) {\n active.node.classList.add(className.active);\n }\n\n if (className != null && className.dragOverlay) {\n dragOverlay.node.classList.add(className.dragOverlay);\n }\n\n return function cleanup() {\n for (const [key, value] of Object.entries(originalStyles)) {\n active.node.style.setProperty(key, value);\n }\n\n if (className != null && className.active) {\n active.node.classList.remove(className.active);\n }\n };\n};\n\nconst defaultKeyframeResolver = _ref2 => {\n let {\n transform: {\n initial,\n final\n }\n } = _ref2;\n return [{\n transform: CSS.Transform.toString(initial)\n }, {\n transform: CSS.Transform.toString(final)\n }];\n};\n\nconst defaultDropAnimationConfiguration = {\n duration: 250,\n easing: 'ease',\n keyframes: defaultKeyframeResolver,\n sideEffects: /*#__PURE__*/defaultDropAnimationSideEffects({\n styles: {\n active: {\n opacity: '0'\n }\n }\n })\n};\nfunction useDropAnimation(_ref3) {\n let {\n config,\n draggableNodes,\n droppableContainers,\n measuringConfiguration\n } = _ref3;\n return useEvent((id, node) => {\n if (config === null) {\n return;\n }\n\n const activeDraggable = draggableNodes.get(id);\n\n if (!activeDraggable) {\n return;\n }\n\n const activeNode = activeDraggable.node.current;\n\n if (!activeNode) {\n return;\n }\n\n const measurableNode = getMeasurableNode(node);\n\n if (!measurableNode) {\n return;\n }\n\n const {\n transform\n } = getWindow(node).getComputedStyle(node);\n const parsedTransform = parseTransform(transform);\n\n if (!parsedTransform) {\n return;\n }\n\n const animation = typeof config === 'function' ? config : createDefaultDropAnimation(config);\n scrollIntoViewIfNeeded(activeNode, measuringConfiguration.draggable.measure);\n return animation({\n active: {\n id,\n data: activeDraggable.data,\n node: activeNode,\n rect: measuringConfiguration.draggable.measure(activeNode)\n },\n draggableNodes,\n dragOverlay: {\n node,\n rect: measuringConfiguration.dragOverlay.measure(measurableNode)\n },\n droppableContainers,\n measuringConfiguration,\n transform: parsedTransform\n });\n });\n}\n\nfunction createDefaultDropAnimation(options) {\n const {\n duration,\n easing,\n sideEffects,\n keyframes\n } = { ...defaultDropAnimationConfiguration,\n ...options\n };\n return _ref4 => {\n let {\n active,\n dragOverlay,\n transform,\n ...rest\n } = _ref4;\n\n if (!duration) {\n // Do not animate if animation duration is zero.\n return;\n }\n\n const delta = {\n x: dragOverlay.rect.left - active.rect.left,\n y: dragOverlay.rect.top - active.rect.top\n };\n const scale = {\n scaleX: transform.scaleX !== 1 ? active.rect.width * transform.scaleX / dragOverlay.rect.width : 1,\n scaleY: transform.scaleY !== 1 ? active.rect.height * transform.scaleY / dragOverlay.rect.height : 1\n };\n const finalTransform = {\n x: transform.x - delta.x,\n y: transform.y - delta.y,\n ...scale\n };\n const animationKeyframes = keyframes({ ...rest,\n active,\n dragOverlay,\n transform: {\n initial: transform,\n final: finalTransform\n }\n });\n const [firstKeyframe] = animationKeyframes;\n const lastKeyframe = animationKeyframes[animationKeyframes.length - 1];\n\n if (JSON.stringify(firstKeyframe) === JSON.stringify(lastKeyframe)) {\n // The start and end keyframes are the same, infer that there is no animation needed.\n return;\n }\n\n const cleanup = sideEffects == null ? void 0 : sideEffects({\n active,\n dragOverlay,\n ...rest\n });\n const animation = dragOverlay.node.animate(animationKeyframes, {\n duration,\n easing,\n fill: 'forwards'\n });\n return new Promise(resolve => {\n animation.onfinish = () => {\n cleanup == null ? void 0 : cleanup();\n resolve();\n };\n });\n };\n}\n\nlet key = 0;\nfunction useKey(id) {\n return useMemo(() => {\n if (id == null) {\n return;\n }\n\n key++;\n return key;\n }, [id]);\n}\n\nconst DragOverlay = /*#__PURE__*/React.memo(_ref => {\n let {\n adjustScale = false,\n children,\n dropAnimation: dropAnimationConfig,\n style,\n transition,\n modifiers,\n wrapperElement = 'div',\n className,\n zIndex = 999\n } = _ref;\n const {\n activatorEvent,\n active,\n activeNodeRect,\n containerNodeRect,\n draggableNodes,\n droppableContainers,\n dragOverlay,\n over,\n measuringConfiguration,\n scrollableAncestors,\n scrollableAncestorRects,\n windowRect\n } = useDndContext();\n const transform = useContext(ActiveDraggableContext);\n const key = useKey(active == null ? void 0 : active.id);\n const modifiedTransform = applyModifiers(modifiers, {\n activatorEvent,\n active,\n activeNodeRect,\n containerNodeRect,\n draggingNodeRect: dragOverlay.rect,\n over,\n overlayNodeRect: dragOverlay.rect,\n scrollableAncestors,\n scrollableAncestorRects,\n transform,\n windowRect\n });\n const initialRect = useInitialValue(activeNodeRect);\n const dropAnimation = useDropAnimation({\n config: dropAnimationConfig,\n draggableNodes,\n droppableContainers,\n measuringConfiguration\n }); // We need to wait for the active node to be measured before connecting the drag overlay ref\n // otherwise collisions can be computed against a mispositioned drag overlay\n\n const ref = initialRect ? dragOverlay.setRef : undefined;\n return React.createElement(NullifiedContextProvider, null, React.createElement(AnimationManager, {\n animation: dropAnimation\n }, active && key ? React.createElement(PositionedOverlay, {\n key: key,\n id: active.id,\n ref: ref,\n as: wrapperElement,\n activatorEvent: activatorEvent,\n adjustScale: adjustScale,\n className: className,\n transition: transition,\n rect: initialRect,\n style: {\n zIndex,\n ...style\n },\n transform: modifiedTransform\n }, children) : null));\n});\n\nexport { AutoScrollActivator, DndContext, DragOverlay, KeyboardCode, KeyboardSensor, MeasuringFrequency, MeasuringStrategy, MouseSensor, PointerSensor, TouchSensor, TraversalOrder, applyModifiers, closestCenter, closestCorners, defaultAnnouncements, defaultCoordinates, defaultDropAnimationConfiguration as defaultDropAnimation, defaultDropAnimationSideEffects, defaultScreenReaderInstructions, getClientRect, getFirstCollision, getScrollableAncestors, pointerWithin, rectIntersection, useDndContext, useDndMonitor, useDraggable, useDroppable, useSensor, useSensors };\n//# sourceMappingURL=core.esm.js.map\n","import React, { useMemo, useRef, useEffect, useState, useContext } from 'react';\nimport { useDndContext, getClientRect, useDroppable, useDraggable, closestCorners, getFirstCollision, getScrollableAncestors, KeyboardCode } from '@dnd-kit/core';\nimport { useUniqueId, useIsomorphicLayoutEffect, CSS, useCombinedRefs, isKeyboardEvent, subtract } from '@dnd-kit/utilities';\n\n/**\r\n * Move an array item to a different position. Returns a new array with the item moved to the new position.\r\n */\nfunction arrayMove(array, from, to) {\n const newArray = array.slice();\n newArray.splice(to < 0 ? newArray.length + to : to, 0, newArray.splice(from, 1)[0]);\n return newArray;\n}\n\n/**\r\n * Swap an array item to a different position. Returns a new array with the item swapped to the new position.\r\n */\nfunction arraySwap(array, from, to) {\n const newArray = array.slice();\n newArray[from] = array[to];\n newArray[to] = array[from];\n return newArray;\n}\n\nfunction getSortedRects(items, rects) {\n return items.reduce((accumulator, id, index) => {\n const rect = rects.get(id);\n\n if (rect) {\n accumulator[index] = rect;\n }\n\n return accumulator;\n }, Array(items.length));\n}\n\nfunction isValidIndex(index) {\n return index !== null && index >= 0;\n}\n\nfunction itemsEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (a.length !== b.length) {\n return false;\n }\n\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction normalizeDisabled(disabled) {\n if (typeof disabled === 'boolean') {\n return {\n draggable: disabled,\n droppable: disabled\n };\n }\n\n return disabled;\n}\n\n// To-do: We should be calculating scale transformation\nconst defaultScale = {\n scaleX: 1,\n scaleY: 1\n};\nconst horizontalListSortingStrategy = _ref => {\n var _rects$activeIndex;\n\n let {\n rects,\n activeNodeRect: fallbackActiveRect,\n activeIndex,\n overIndex,\n index\n } = _ref;\n const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;\n\n if (!activeNodeRect) {\n return null;\n }\n\n const itemGap = getItemGap(rects, index, activeIndex);\n\n if (index === activeIndex) {\n const newIndexRect = rects[overIndex];\n\n if (!newIndexRect) {\n return null;\n }\n\n return {\n x: activeIndex < overIndex ? newIndexRect.left + newIndexRect.width - (activeNodeRect.left + activeNodeRect.width) : newIndexRect.left - activeNodeRect.left,\n y: 0,\n ...defaultScale\n };\n }\n\n if (index > activeIndex && index <= overIndex) {\n return {\n x: -activeNodeRect.width - itemGap,\n y: 0,\n ...defaultScale\n };\n }\n\n if (index < activeIndex && index >= overIndex) {\n return {\n x: activeNodeRect.width + itemGap,\n y: 0,\n ...defaultScale\n };\n }\n\n return {\n x: 0,\n y: 0,\n ...defaultScale\n };\n};\n\nfunction getItemGap(rects, index, activeIndex) {\n const currentRect = rects[index];\n const previousRect = rects[index - 1];\n const nextRect = rects[index + 1];\n\n if (!currentRect || !previousRect && !nextRect) {\n return 0;\n }\n\n if (activeIndex < index) {\n return previousRect ? currentRect.left - (previousRect.left + previousRect.width) : nextRect.left - (currentRect.left + currentRect.width);\n }\n\n return nextRect ? nextRect.left - (currentRect.left + currentRect.width) : currentRect.left - (previousRect.left + previousRect.width);\n}\n\nconst rectSortingStrategy = _ref => {\n let {\n rects,\n activeIndex,\n overIndex,\n index\n } = _ref;\n const newRects = arrayMove(rects, overIndex, activeIndex);\n const oldRect = rects[index];\n const newRect = newRects[index];\n\n if (!newRect || !oldRect) {\n return null;\n }\n\n return {\n x: newRect.left - oldRect.left,\n y: newRect.top - oldRect.top,\n scaleX: newRect.width / oldRect.width,\n scaleY: newRect.height / oldRect.height\n };\n};\n\nconst rectSwappingStrategy = _ref => {\n let {\n activeIndex,\n index,\n rects,\n overIndex\n } = _ref;\n let oldRect;\n let newRect;\n\n if (index === activeIndex) {\n oldRect = rects[index];\n newRect = rects[overIndex];\n }\n\n if (index === overIndex) {\n oldRect = rects[index];\n newRect = rects[activeIndex];\n }\n\n if (!newRect || !oldRect) {\n return null;\n }\n\n return {\n x: newRect.left - oldRect.left,\n y: newRect.top - oldRect.top,\n scaleX: newRect.width / oldRect.width,\n scaleY: newRect.height / oldRect.height\n };\n};\n\n// To-do: We should be calculating scale transformation\nconst defaultScale$1 = {\n scaleX: 1,\n scaleY: 1\n};\nconst verticalListSortingStrategy = _ref => {\n var _rects$activeIndex;\n\n let {\n activeIndex,\n activeNodeRect: fallbackActiveRect,\n index,\n rects,\n overIndex\n } = _ref;\n const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;\n\n if (!activeNodeRect) {\n return null;\n }\n\n if (index === activeIndex) {\n const overIndexRect = rects[overIndex];\n\n if (!overIndexRect) {\n return null;\n }\n\n return {\n x: 0,\n y: activeIndex < overIndex ? overIndexRect.top + overIndexRect.height - (activeNodeRect.top + activeNodeRect.height) : overIndexRect.top - activeNodeRect.top,\n ...defaultScale$1\n };\n }\n\n const itemGap = getItemGap$1(rects, index, activeIndex);\n\n if (index > activeIndex && index <= overIndex) {\n return {\n x: 0,\n y: -activeNodeRect.height - itemGap,\n ...defaultScale$1\n };\n }\n\n if (index < activeIndex && index >= overIndex) {\n return {\n x: 0,\n y: activeNodeRect.height + itemGap,\n ...defaultScale$1\n };\n }\n\n return {\n x: 0,\n y: 0,\n ...defaultScale$1\n };\n};\n\nfunction getItemGap$1(clientRects, index, activeIndex) {\n const currentRect = clientRects[index];\n const previousRect = clientRects[index - 1];\n const nextRect = clientRects[index + 1];\n\n if (!currentRect) {\n return 0;\n }\n\n if (activeIndex < index) {\n return previousRect ? currentRect.top - (previousRect.top + previousRect.height) : nextRect ? nextRect.top - (currentRect.top + currentRect.height) : 0;\n }\n\n return nextRect ? nextRect.top - (currentRect.top + currentRect.height) : previousRect ? currentRect.top - (previousRect.top + previousRect.height) : 0;\n}\n\nconst ID_PREFIX = 'Sortable';\nconst Context = /*#__PURE__*/React.createContext({\n activeIndex: -1,\n containerId: ID_PREFIX,\n disableTransforms: false,\n items: [],\n overIndex: -1,\n useDragOverlay: false,\n sortedRects: [],\n strategy: rectSortingStrategy,\n disabled: {\n draggable: false,\n droppable: false\n }\n});\nfunction SortableContext(_ref) {\n let {\n children,\n id,\n items: userDefinedItems,\n strategy = rectSortingStrategy,\n disabled: disabledProp = false\n } = _ref;\n const {\n active,\n dragOverlay,\n droppableRects,\n over,\n measureDroppableContainers\n } = useDndContext();\n const containerId = useUniqueId(ID_PREFIX, id);\n const useDragOverlay = Boolean(dragOverlay.rect !== null);\n const items = useMemo(() => userDefinedItems.map(item => typeof item === 'object' && 'id' in item ? item.id : item), [userDefinedItems]);\n const isDragging = active != null;\n const activeIndex = active ? items.indexOf(active.id) : -1;\n const overIndex = over ? items.indexOf(over.id) : -1;\n const previousItemsRef = useRef(items);\n const itemsHaveChanged = !itemsEqual(items, previousItemsRef.current);\n const disableTransforms = overIndex !== -1 && activeIndex === -1 || itemsHaveChanged;\n const disabled = normalizeDisabled(disabledProp);\n useIsomorphicLayoutEffect(() => {\n if (itemsHaveChanged && isDragging) {\n measureDroppableContainers(items);\n }\n }, [itemsHaveChanged, items, isDragging, measureDroppableContainers]);\n useEffect(() => {\n previousItemsRef.current = items;\n }, [items]);\n const contextValue = useMemo(() => ({\n activeIndex,\n containerId,\n disabled,\n disableTransforms,\n items,\n overIndex,\n useDragOverlay,\n sortedRects: getSortedRects(items, droppableRects),\n strategy\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [activeIndex, containerId, disabled.draggable, disabled.droppable, disableTransforms, items, overIndex, droppableRects, useDragOverlay, strategy]);\n return React.createElement(Context.Provider, {\n value: contextValue\n }, children);\n}\n\nconst defaultNewIndexGetter = _ref => {\n let {\n id,\n items,\n activeIndex,\n overIndex\n } = _ref;\n return arrayMove(items, activeIndex, overIndex).indexOf(id);\n};\nconst defaultAnimateLayoutChanges = _ref2 => {\n let {\n containerId,\n isSorting,\n wasDragging,\n index,\n items,\n newIndex,\n previousItems,\n previousContainerId,\n transition\n } = _ref2;\n\n if (!transition || !wasDragging) {\n return false;\n }\n\n if (previousItems !== items && index === newIndex) {\n return false;\n }\n\n if (isSorting) {\n return true;\n }\n\n return newIndex !== index && containerId === previousContainerId;\n};\nconst defaultTransition = {\n duration: 200,\n easing: 'ease'\n};\nconst transitionProperty = 'transform';\nconst disabledTransition = /*#__PURE__*/CSS.Transition.toString({\n property: transitionProperty,\n duration: 0,\n easing: 'linear'\n});\nconst defaultAttributes = {\n roleDescription: 'sortable'\n};\n\n/*\r\n * When the index of an item changes while sorting,\r\n * we need to temporarily disable the transforms\r\n */\n\nfunction useDerivedTransform(_ref) {\n let {\n disabled,\n index,\n node,\n rect\n } = _ref;\n const [derivedTransform, setDerivedtransform] = useState(null);\n const previousIndex = useRef(index);\n useIsomorphicLayoutEffect(() => {\n if (!disabled && index !== previousIndex.current && node.current) {\n const initial = rect.current;\n\n if (initial) {\n const current = getClientRect(node.current, {\n ignoreTransform: true\n });\n const delta = {\n x: initial.left - current.left,\n y: initial.top - current.top,\n scaleX: initial.width / current.width,\n scaleY: initial.height / current.height\n };\n\n if (delta.x || delta.y) {\n setDerivedtransform(delta);\n }\n }\n }\n\n if (index !== previousIndex.current) {\n previousIndex.current = index;\n }\n }, [disabled, index, node, rect]);\n useEffect(() => {\n if (derivedTransform) {\n setDerivedtransform(null);\n }\n }, [derivedTransform]);\n return derivedTransform;\n}\n\nfunction useSortable(_ref) {\n let {\n animateLayoutChanges = defaultAnimateLayoutChanges,\n attributes: userDefinedAttributes,\n disabled: localDisabled,\n data: customData,\n getNewIndex = defaultNewIndexGetter,\n id,\n strategy: localStrategy,\n resizeObserverConfig,\n transition = defaultTransition\n } = _ref;\n const {\n items,\n containerId,\n activeIndex,\n disabled: globalDisabled,\n disableTransforms,\n sortedRects,\n overIndex,\n useDragOverlay,\n strategy: globalStrategy\n } = useContext(Context);\n const disabled = normalizeLocalDisabled(localDisabled, globalDisabled);\n const index = items.indexOf(id);\n const data = useMemo(() => ({\n sortable: {\n containerId,\n index,\n items\n },\n ...customData\n }), [containerId, customData, index, items]);\n const itemsAfterCurrentSortable = useMemo(() => items.slice(items.indexOf(id)), [items, id]);\n const {\n rect,\n node,\n isOver,\n setNodeRef: setDroppableNodeRef\n } = useDroppable({\n id,\n data,\n disabled: disabled.droppable,\n resizeObserverConfig: {\n updateMeasurementsFor: itemsAfterCurrentSortable,\n ...resizeObserverConfig\n }\n });\n const {\n active,\n activatorEvent,\n activeNodeRect,\n attributes,\n setNodeRef: setDraggableNodeRef,\n listeners,\n isDragging,\n over,\n setActivatorNodeRef,\n transform\n } = useDraggable({\n id,\n data,\n attributes: { ...defaultAttributes,\n ...userDefinedAttributes\n },\n disabled: disabled.draggable\n });\n const setNodeRef = useCombinedRefs(setDroppableNodeRef, setDraggableNodeRef);\n const isSorting = Boolean(active);\n const displaceItem = isSorting && !disableTransforms && isValidIndex(activeIndex) && isValidIndex(overIndex);\n const shouldDisplaceDragSource = !useDragOverlay && isDragging;\n const dragSourceDisplacement = shouldDisplaceDragSource && displaceItem ? transform : null;\n const strategy = localStrategy != null ? localStrategy : globalStrategy;\n const finalTransform = displaceItem ? dragSourceDisplacement != null ? dragSourceDisplacement : strategy({\n rects: sortedRects,\n activeNodeRect,\n activeIndex,\n overIndex,\n index\n }) : null;\n const newIndex = isValidIndex(activeIndex) && isValidIndex(overIndex) ? getNewIndex({\n id,\n items,\n activeIndex,\n overIndex\n }) : index;\n const activeId = active == null ? void 0 : active.id;\n const previous = useRef({\n activeId,\n items,\n newIndex,\n containerId\n });\n const itemsHaveChanged = items !== previous.current.items;\n const shouldAnimateLayoutChanges = animateLayoutChanges({\n active,\n containerId,\n isDragging,\n isSorting,\n id,\n index,\n items,\n newIndex: previous.current.newIndex,\n previousItems: previous.current.items,\n previousContainerId: previous.current.containerId,\n transition,\n wasDragging: previous.current.activeId != null\n });\n const derivedTransform = useDerivedTransform({\n disabled: !shouldAnimateLayoutChanges,\n index,\n node,\n rect\n });\n useEffect(() => {\n if (isSorting && previous.current.newIndex !== newIndex) {\n previous.current.newIndex = newIndex;\n }\n\n if (containerId !== previous.current.containerId) {\n previous.current.containerId = containerId;\n }\n\n if (items !== previous.current.items) {\n previous.current.items = items;\n }\n }, [isSorting, newIndex, containerId, items]);\n useEffect(() => {\n if (activeId === previous.current.activeId) {\n return;\n }\n\n if (activeId && !previous.current.activeId) {\n previous.current.activeId = activeId;\n return;\n }\n\n const timeoutId = setTimeout(() => {\n previous.current.activeId = activeId;\n }, 50);\n return () => clearTimeout(timeoutId);\n }, [activeId]);\n return {\n active,\n activeIndex,\n attributes,\n data,\n rect,\n index,\n newIndex,\n items,\n isOver,\n isSorting,\n isDragging,\n listeners,\n node,\n overIndex,\n over,\n setNodeRef,\n setActivatorNodeRef,\n setDroppableNodeRef,\n setDraggableNodeRef,\n transform: derivedTransform != null ? derivedTransform : finalTransform,\n transition: getTransition()\n };\n\n function getTransition() {\n if ( // Temporarily disable transitions for a single frame to set up derived transforms\n derivedTransform || // Or to prevent items jumping to back to their \"new\" position when items change\n itemsHaveChanged && previous.current.newIndex === index) {\n return disabledTransition;\n }\n\n if (shouldDisplaceDragSource && !isKeyboardEvent(activatorEvent) || !transition) {\n return undefined;\n }\n\n if (isSorting || shouldAnimateLayoutChanges) {\n return CSS.Transition.toString({ ...transition,\n property: transitionProperty\n });\n }\n\n return undefined;\n }\n}\n\nfunction normalizeLocalDisabled(localDisabled, globalDisabled) {\n var _localDisabled$dragga, _localDisabled$droppa;\n\n if (typeof localDisabled === 'boolean') {\n return {\n draggable: localDisabled,\n // Backwards compatibility\n droppable: false\n };\n }\n\n return {\n draggable: (_localDisabled$dragga = localDisabled == null ? void 0 : localDisabled.draggable) != null ? _localDisabled$dragga : globalDisabled.draggable,\n droppable: (_localDisabled$droppa = localDisabled == null ? void 0 : localDisabled.droppable) != null ? _localDisabled$droppa : globalDisabled.droppable\n };\n}\n\nfunction hasSortableData(entry) {\n if (!entry) {\n return false;\n }\n\n const data = entry.data.current;\n\n if (data && 'sortable' in data && typeof data.sortable === 'object' && 'containerId' in data.sortable && 'items' in data.sortable && 'index' in data.sortable) {\n return true;\n }\n\n return false;\n}\n\nconst directions = [KeyboardCode.Down, KeyboardCode.Right, KeyboardCode.Up, KeyboardCode.Left];\nconst sortableKeyboardCoordinates = (event, _ref) => {\n let {\n context: {\n active,\n collisionRect,\n droppableRects,\n droppableContainers,\n over,\n scrollableAncestors\n }\n } = _ref;\n\n if (directions.includes(event.code)) {\n event.preventDefault();\n\n if (!active || !collisionRect) {\n return;\n }\n\n const filteredContainers = [];\n droppableContainers.getEnabled().forEach(entry => {\n if (!entry || entry != null && entry.disabled) {\n return;\n }\n\n const rect = droppableRects.get(entry.id);\n\n if (!rect) {\n return;\n }\n\n switch (event.code) {\n case KeyboardCode.Down:\n if (collisionRect.top < rect.top) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Up:\n if (collisionRect.top > rect.top) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Left:\n if (collisionRect.left > rect.left) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Right:\n if (collisionRect.left < rect.left) {\n filteredContainers.push(entry);\n }\n\n break;\n }\n });\n const collisions = closestCorners({\n active,\n collisionRect: collisionRect,\n droppableRects,\n droppableContainers: filteredContainers,\n pointerCoordinates: null\n });\n let closestId = getFirstCollision(collisions, 'id');\n\n if (closestId === (over == null ? void 0 : over.id) && collisions.length > 1) {\n closestId = collisions[1].id;\n }\n\n if (closestId != null) {\n const activeDroppable = droppableContainers.get(active.id);\n const newDroppable = droppableContainers.get(closestId);\n const newRect = newDroppable ? droppableRects.get(newDroppable.id) : null;\n const newNode = newDroppable == null ? void 0 : newDroppable.node.current;\n\n if (newNode && newRect && activeDroppable && newDroppable) {\n const newScrollAncestors = getScrollableAncestors(newNode);\n const hasDifferentScrollAncestors = newScrollAncestors.some((element, index) => scrollableAncestors[index] !== element);\n const hasSameContainer = isSameContainer(activeDroppable, newDroppable);\n const isAfterActive = isAfter(activeDroppable, newDroppable);\n const offset = hasDifferentScrollAncestors || !hasSameContainer ? {\n x: 0,\n y: 0\n } : {\n x: isAfterActive ? collisionRect.width - newRect.width : 0,\n y: isAfterActive ? collisionRect.height - newRect.height : 0\n };\n const rectCoordinates = {\n x: newRect.left,\n y: newRect.top\n };\n const newCoordinates = offset.x && offset.y ? rectCoordinates : subtract(rectCoordinates, offset);\n return newCoordinates;\n }\n }\n }\n\n return undefined;\n};\n\nfunction isSameContainer(a, b) {\n if (!hasSortableData(a) || !hasSortableData(b)) {\n return false;\n }\n\n return a.data.current.sortable.containerId === b.data.current.sortable.containerId;\n}\n\nfunction isAfter(a, b) {\n if (!hasSortableData(a) || !hasSortableData(b)) {\n return false;\n }\n\n if (!isSameContainer(a, b)) {\n return false;\n }\n\n return a.data.current.sortable.index < b.data.current.sortable.index;\n}\n\nexport { SortableContext, arrayMove, arraySwap, defaultAnimateLayoutChanges, defaultNewIndexGetter, hasSortableData, horizontalListSortingStrategy, rectSortingStrategy, rectSwappingStrategy, sortableKeyboardCoordinates, useSortable, verticalListSortingStrategy };\n//# sourceMappingURL=sortable.esm.js.map\n","import { DndContext, DndContextProps } from \"@dnd-kit/core\";\nimport React, { FC, createContext, useContext, useEffect } from \"react\";\n\n/**\n * Facilitates DI for the DndContext\n */\nexport const injectDndContext = createContext<FC<DndContextProps>>(DndContext);\n\n/**\n * Wraps dnd-kit's `DndContext` to normalise scroll behaviour and enable dependency injection\n */\nexport const InternalDndContext = (props: DndContextProps) => {\n const DndContext = useContext(injectDndContext);\n\n /**\n * Disable smooth scrolling during drag to ensure that the dragged item is always visible\n */\n useEffect(() => {\n const originalScrollingBehaviour =\n document.documentElement.style.scrollBehavior;\n document.documentElement.style.scrollBehavior = \"auto\";\n\n return () => {\n document.documentElement.style.scrollBehavior =\n originalScrollingBehaviour;\n };\n });\n\n return <DndContext {...props} />;\n};\n","import { useEffect, useState } from \"react\";\n\n/**\n * Returns true if the user has requested that the system minimize the amount of non-essential motion it uses.\n */\nexport function usePrefersReducedMotion() {\n const [prefersReducedMotion, setPrefersReducedMotion] = useState(false);\n\n useEffect(() => {\n const mediaQuery = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n\n setPrefersReducedMotion(mediaQuery.matches);\n }, []);\n\n return prefersReducedMotion;\n}\n","import React, { useState } from \"react\";\nimport {\n closestCenter,\n KeyboardSensor,\n useSensor,\n useSensors,\n DragEndEvent,\n DragOverlay,\n DragStartEvent,\n UniqueIdentifier,\n Announcements,\n MouseSensor,\n TouchSensor,\n} from \"@dnd-kit/core\";\nimport {\n arrayMove,\n SortableContext,\n sortableKeyboardCoordinates,\n useSortable,\n verticalListSortingStrategy,\n} from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport { createPortal } from \"react-dom\";\n\nimport { OakFlex } from \"@/components/atoms\";\nimport {\n OakDragAndDropInstructions,\n OakDraggable,\n OakDroppable,\n} from \"@/components/molecules\";\nimport { InternalDndContext } from \"@/components/atoms/InternalDndContext/InternalDndContext\";\nimport { usePrefersReducedMotion } from \"@/animation/usePrefersReducedMotion\";\n\ntype OakQuizOrderItem = {\n id: string;\n label: string;\n};\n\nexport type OakQuizOrderProps = {\n /**\n * The initial order of items\n *\n * this cannot be updated on subsequent renders\n */\n initialItems: OakQuizOrderItem[];\n /**\n * Notified the consumer when the order of items has changed\n */\n onChange?: (items: OakQuizOrderItem[]) => void;\n /**\n * Highlight all items to indicate that they can be interacted with\n */\n isHighlighted?: boolean;\n};\n\nconst ConnectedDraggable = ({\n id,\n label,\n isHighlighted,\n}: OakQuizOrderItem & { isHighlighted?: boolean }) => {\n const {\n attributes,\n listeners,\n setNodeRef,\n transform,\n transition,\n isOver,\n isDragging,\n } = useSortable({ id });\n const style = {\n transform: CSS.Transform.toString(transform),\n transition,\n };\n\n return (\n <OakDroppable isOver={isOver} isHighlighted={isHighlighted}>\n <OakDraggable\n ref={setNodeRef}\n style={style}\n isDisabled={isDragging}\n {...attributes}\n {...listeners}\n aria-describedby={undefined}\n aria-roledescription=\"sortable item\"\n aria-pressed={undefined}\n aria-selected={!!attributes[\"aria-pressed\"]}\n role=\"option\"\n >\n {label}\n </OakDraggable>\n </OakDroppable>\n );\n};\n\n/**\n * A sortable list of items with drag and drop functionality. Items can be dragged over named slots to re-arrange them\n *\n * Keyboard navigation is supported with the `tab`, `space` and `arrow` keys\n */\nexport const OakQuizOrder = ({\n initialItems,\n onChange,\n isHighlighted,\n}: OakQuizOrderProps) => {\n const [items, setItems] = useState<OakQuizOrderItem[]>(initialItems);\n const [activeId, setActiveId] = useState<string | null>(null);\n const activeItem = items.find((item) => item.id === activeId);\n const sensors = useSensors(\n useSensor(MouseSensor),\n useSensor(TouchSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n scrollBehavior: usePrefersReducedMotion() ? \"instant\" : \"smooth\",\n }),\n );\n\n return (\n <>\n <OakDragAndDropInstructions $mb=\"space-between-m2\" />\n <InternalDndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={handleDragEnd}\n onDragStart={handleDragStart}\n accessibility={{\n announcements: createAccouncements(items),\n }}\n >\n <SortableContext items={items} strategy={verticalListSortingStrategy}>\n <OakFlex\n $gap=\"space-between-s\"\n $flexDirection=\"column\"\n role=\"listbox\"\n aria-label=\"Sortable items\"\n >\n {items.map((item) => (\n <ConnectedDraggable\n key={item.id}\n {...item}\n isHighlighted={isHighlighted}\n />\n ))}\n </OakFlex>\n {createPortal(\n <DragOverlay>\n {activeItem && (\n <OakDraggable isDragging>{activeItem.label}</OakDraggable>\n )}\n </DragOverlay>,\n document.body,\n )}\n </SortableContext>\n </InternalDndContext>\n </>\n );\n\n function handleDragStart(event: DragStartEvent) {\n const { active } = event;\n setActiveId(active.id.toString());\n }\n\n function handleDragEnd(event: DragEndEvent) {\n const { active, over } = event;\n\n if (active.id !== over?.id) {\n setItems((items) => {\n const oldIndex = items.findIndex((item) => item.id === active.id);\n const newIndex = items.findIndex((item) => item.id === over?.id);\n const newItems = arrayMove(items, oldIndex, newIndex);\n\n onChange?.(newItems);\n\n return newItems;\n });\n }\n\n setActiveId(null);\n }\n};\n\nfunction createAccouncements(items: OakQuizOrderItem[]): Announcements {\n const getPosition = (id: UniqueIdentifier) =>\n items.findIndex((item) => item.id === id) + 1;\n const getItemLabel = (id: UniqueIdentifier) =>\n items.find((item) => item.id === id)?.label;\n\n return {\n onDragStart() {\n return undefined;\n },\n onDragOver({ active, over }) {\n if (over) {\n return `Sortable item ${getItemLabel(\n active.id,\n )} is in position ${getPosition(over.id)} of ${items.length}`;\n }\n },\n onDragEnd({ active, over }) {\n if (over) {\n return `Sortable item ${getItemLabel(\n active.id,\n )} was dropped into position ${getPosition(over.id)} of ${\n items.length\n }`;\n }\n },\n onDragCancel({ active }) {\n return `Dragging was cancelled. Sortable item ${getItemLabel(\n active.id,\n )} was dropped.`;\n },\n };\n}\n","import React, {\n ComponentPropsWithRef,\n ComponentPropsWithoutRef,\n FC,\n forwardRef,\n useLayoutEffect,\n useState,\n} from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex } from \"@/components/atoms\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\n\nconst StyledOakBox = styled(OakBox)`\n background-color: ${parseColor(\"grey20\")};\n background-color: color-mix(in lch, ${parseColor(\"black\")} 5%, transparent);\n\n &[data-over=\"true\"] {\n background-color: ${parseColor(\"white\")};\n background-color: color-mix(\n in lch,\n ${parseColor(\"white\")} 60%,\n transparent\n );\n }\n`;\n\ntype InternalDroppableHoldingPenProps = {\n /**\n * Indicates whether a draggable is currently being dragged over the droppable\n */\n isOver?: boolean;\n};\n\n/**\n * An internal holding pen for multiple draggable items\n *\n * Has no intrinsic drop functionally.\n * It is intended to be used with `useDroppable` from `@dnd-kit/core`\n */\nexport const InternalDroppableHoldingPen: FC<\n ComponentPropsWithRef<typeof OakFlex>\n> = forwardRef<\n HTMLDivElement,\n InternalDroppableHoldingPenProps & ComponentPropsWithoutRef<typeof OakFlex>\n>(({ isOver, children, ...props }, ref) => {\n const [domContent, setContentBox] = useState<HTMLDivElement | null>(null);\n const [minHeight, setMinHeight] = useState<number>(0);\n\n useLayoutEffect(() => {\n if (!domContent) {\n return;\n }\n\n // Prevents the holding area from shrinking when an item is removed\n // avoiding layout shift\n const observer = new ResizeObserver((entries) => {\n for (const entry of entries) {\n setMinHeight((currentHeight) =>\n Math.max(entry.borderBoxSize[0]?.blockSize ?? 0, currentHeight),\n );\n }\n });\n\n observer.observe(domContent);\n\n // Reset min height when the window is resized so that the holding pen can shrink\n function resetMinHeight() {\n setMinHeight(0);\n }\n window.addEventListener(\"resize\", resetMinHeight);\n\n return () => {\n observer.disconnect();\n window.removeEventListener(\"resize\", resetMinHeight);\n };\n }, [domContent]);\n\n return (\n <StyledOakBox\n ref={ref}\n $mb=\"space-between-m2\"\n $borderRadius=\"border-radius-l\"\n data-over={isOver}\n style={{ minHeight: minHeight === 0 ? \"auto\" : minHeight }}\n {...props}\n >\n <OakFlex\n $alignItems=\"flex-start\"\n $minHeight=\"all-spacing-13\"\n $pa=\"inner-padding-s\"\n $gap=\"space-between-xs\"\n $flexWrap=\"wrap\"\n ref={setContentBox}\n >\n {children}\n </OakFlex>\n </StyledOakBox>\n );\n});\n","import React, { ReactNode, useRef, useState } from \"react\";\nimport {\n closestCenter,\n KeyboardSensor,\n useSensor,\n useSensors,\n DragEndEvent,\n DragOverlay,\n DragStartEvent,\n Announcements,\n MouseSensor,\n TouchSensor,\n useDraggable,\n useDroppable,\n} from \"@dnd-kit/core\";\nimport { createPortal } from \"react-dom\";\nimport { sortableKeyboardCoordinates } from \"@dnd-kit/sortable\";\n\nimport { InternalDroppableHoldingPen } from \"../InternalDroppableHoldingPen\";\n\nimport { OakFlex } from \"@/components/atoms\";\nimport {\n OakDragAndDropInstructions,\n OakDraggable,\n OakDroppable,\n} from \"@/components/molecules\";\nimport { usePrefersReducedMotion } from \"@/animation/usePrefersReducedMotion\";\nimport { InternalDndContext } from \"@/components/atoms/InternalDndContext/InternalDndContext\";\n\ntype DraggableId = string;\ntype DroppableId = string;\ntype DraggableItem = {\n id: DraggableId;\n label: string;\n};\ntype DroppableItem = {\n id: DroppableId;\n label: string;\n};\ntype Matches = Record<DroppableId, DraggableItem>;\n\nexport type OakQuizMatchProps = {\n /**\n * The initial options\n *\n * these are the items that can be dragged into a slot to form a match\n *\n * this cannot be updated on subsequent renders\n */\n initialOptions: DraggableItem[];\n /**\n * The initial slots\n *\n * these are the slots into which an option can be dropped to form a match\n *\n * this cannot be updated on subsequent renders\n */\n initialSlots: DroppableItem[];\n /**\n * Notify the consumer when matches have changed\n */\n onChange?: (matches: Matches) => void;\n /**\n * Highlight the droppable slots\n */\n isHighlighted?: boolean;\n};\n\nconst ConnectedDraggable = ({\n id,\n label,\n isOver,\n}: DraggableItem & { isOver?: boolean }) => {\n const { attributes, listeners, setNodeRef, isDragging } = useDraggable({\n id,\n data: { id, label },\n });\n\n return (\n <OakDraggable\n ref={setNodeRef}\n isDisabled={isOver}\n color=\"text-inverted\"\n background=\"bg-btn-primary\"\n iconColor=\"icon-main\"\n {...attributes}\n {...listeners}\n role=\"option\"\n aria-describedby={undefined}\n aria-roledescription=\"draggable item\"\n aria-pressed={undefined}\n aria-selected={!!attributes[\"aria-pressed\"]}\n style={{ opacity: isDragging ? 0 : 1 }}\n >\n {label}\n </OakDraggable>\n );\n};\n\nconst ConnectedDroppableHoldingPen = ({\n children,\n}: {\n children?: ReactNode;\n}) => {\n const { setNodeRef, isOver } = useDroppable({\n id: \"holding-pen\",\n data: { label: \"holding pen\" },\n });\n\n return (\n <InternalDroppableHoldingPen\n ref={setNodeRef}\n isOver={isOver}\n aria-label=\"Available items\"\n data-testid=\"holding-pen\"\n role=\"listbox\"\n >\n {children}\n </InternalDroppableHoldingPen>\n );\n};\n\nconst ConnectedDroppable = ({\n id,\n label,\n match,\n isHighlighted,\n}: DroppableItem & { match?: DraggableItem; isHighlighted?: boolean }) => {\n const { setNodeRef, isOver, active } = useDroppable({\n id,\n data: { id, label },\n });\n\n return (\n <OakDroppable\n isOver={isOver}\n isDisabled={!active}\n ref={setNodeRef}\n id={id}\n labelSlot={label}\n data-testid=\"slot\"\n isHighlighted={isHighlighted}\n >\n {match && <ConnectedDraggable {...match} isOver={isOver} />}\n </OakDroppable>\n );\n};\n\n/**\n * A list of draggable items with matching slots to drop them into.\n *\n * Keyboard navigation is supported with the `tab`, `space` and `arrow` keys\n */\nexport const OakQuizMatch = ({\n initialOptions,\n initialSlots,\n isHighlighted,\n onChange,\n}: OakQuizMatchProps) => {\n const [matches, setMatches] = useState<Matches>({});\n const draggables = useRef(initialOptions).current;\n const droppables = useRef(initialSlots).current;\n const [activeId, setActiveId] = useState<DraggableId | null>(null);\n const activeDraggable = draggables.find((item) => item.id === activeId);\n const prefersReducedMotion = usePrefersReducedMotion();\n const sensors = useSensors(\n useSensor(MouseSensor),\n useSensor(TouchSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n scrollBehavior: prefersReducedMotion ? \"instant\" : \"smooth\",\n }),\n );\n const matchedDraggableIds = Object.values(matches).map((item) => item.id);\n const unmatchedDraggables = draggables.filter(\n (draggable) => !matchedDraggableIds.includes(draggable.id),\n );\n return (\n <>\n <OakDragAndDropInstructions $mb=\"space-between-m2\" />\n <InternalDndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={handleDragEnd}\n onDragStart={handleDragStart}\n accessibility={{ announcements }}\n >\n <ConnectedDroppableHoldingPen>\n {unmatchedDraggables.map((item) => (\n <ConnectedDraggable key={item.id} {...item} />\n ))}\n </ConnectedDroppableHoldingPen>\n <OakFlex\n $gap=\"space-between-s\"\n $flexDirection=\"column\"\n aria-label=\"Matched items\"\n role=\"listbox\"\n >\n {droppables.map((droppable) => (\n <ConnectedDroppable\n key={droppable.id}\n {...droppable}\n isHighlighted={isHighlighted}\n match={matches[droppable.id]}\n />\n ))}\n </OakFlex>\n {createPortal(\n <DragOverlay dropAnimation={prefersReducedMotion ? null : undefined}>\n {activeDraggable && (\n <OakDraggable isDragging>{activeDraggable.label}</OakDraggable>\n )}\n </DragOverlay>,\n document.body,\n )}\n </InternalDndContext>\n </>\n );\n\n function handleDragStart(event: DragStartEvent) {\n const { active } = event;\n setActiveId(active.id.toString());\n }\n\n function handleDragEnd(event: DragEndEvent) {\n const { active, over } = event;\n\n if (over) {\n setMatches((matches) => {\n // Remove the draggable from its current slot\n const entries = Object.entries(matches).filter(\n ([, draggable]) => draggable?.id !== active.id,\n );\n const newMatches = Object.fromEntries(entries);\n\n if (over.id !== \"holding-pen\") {\n // We've dropped the draggable into a slot so add it to the new slot\n newMatches[over.id] = active.data.current as DraggableItem;\n }\n\n onChange?.(newMatches);\n\n return newMatches;\n });\n }\n\n setActiveId(null);\n }\n};\n\nconst announcements: Announcements = {\n onDragStart() {\n return undefined;\n },\n onDragOver({ active, over }) {\n if (over?.data.current && active.data?.current) {\n return `Item ${active.data.current.label} is over ${over.data.current.label}`;\n }\n },\n onDragEnd({ active, over }) {\n if (over?.data.current && active.data?.current) {\n return `Item ${active.data.current.label} was dropped onto ${over.data.current.label}`;\n }\n },\n onDragCancel({ active }) {\n if (active.data?.current) {\n return `Dragging was cancelled. Item ${active.data.current.label} was dropped.`;\n }\n },\n};\n","import type { UrlObject } from \"url\";\n\nimport React, { ReactNode } from \"react\";\nimport Link from \"next/link\";\nimport styled from \"styled-components\";\n\nimport {\n OakPrimaryButton,\n OakPrimaryButtonProps,\n} from \"@/components/molecules/OakPrimaryButton\";\nimport {\n OakPrimaryInvertedButton,\n OakPrimaryInvertedButtonProps,\n} from \"@/components/molecules/OakPrimaryInvertedButton\";\n\ntype Url = string | UrlObject;\n\nexport type OakPrimaryNavItemProps = {\n href: Url;\n isCurrent?: boolean;\n shallow?: boolean;\n children: ReactNode;\n} & OakPrimaryButtonProps &\n OakPrimaryInvertedButtonProps;\n\nconst OakPrimaryButtonWithoutPointerEvents = styled(OakPrimaryButton)`\n pointer-events: none;\n`;\n\n/**\n *\n * A specific implementation of OakPrimaryButton and OakPrimaryInvertedButton rendering\n * relevant view depending on isCurrent prop\n *\n */\nexport const OakPrimaryNavItem = ({\n href,\n isCurrent = false,\n shallow = true,\n children,\n}: OakPrimaryNavItemProps) => {\n return isCurrent ? (\n <OakPrimaryButtonWithoutPointerEvents\n element={\"span\"}\n aria-current={\"page\"}\n >\n {children}\n </OakPrimaryButtonWithoutPointerEvents>\n ) : (\n <OakPrimaryInvertedButton\n element={Link}\n href={href}\n shallow={shallow}\n isTrailingIcon={true}\n >\n {children}\n </OakPrimaryInvertedButton>\n );\n};\n","import React from \"react\";\n\nimport { OakSpan, OakSpanProps } from \"@/components/atoms\";\n\nexport type OakBulletListProps = {\n listItems: string[];\n} & OakSpanProps;\n\n/**\n * An inline bulleted list\n */\nexport const OakBulletList = (props: OakBulletListProps) => {\n const { listItems, ...rest } = props;\n return (\n <OakSpan {...rest}>\n {listItems.map((item, i) => {\n return (\n <OakSpan key={i}>\n {i !== 0 && <OakSpan> • </OakSpan>}\n <OakSpan>{item}</OakSpan>\n </OakSpan>\n );\n })}\n </OakSpan>\n );\n};\n","import React from \"react\";\n\nimport {\n OakFlex,\n OakHeading,\n OakHeadingTag,\n OakIcon,\n OakIconName,\n} from \"@/components/atoms\";\nimport { OakHandDrawnCard } from \"@/components/molecules/OakHandDrawnCard\";\n\nexport type OakInfoCardProps = {\n children: React.ReactNode;\n};\n\nexport type OakCardHeaderprops = {\n iconName: OakIconName;\n tag: OakHeadingTag;\n children: string;\n};\n\nexport const OakCardHeader = (props: OakCardHeaderprops) => {\n const { iconName, tag, children } = props;\n\n return (\n <OakFlex $alignItems={\"center\"} $gap={\"space-between-ssx\"}>\n <OakIcon iconName={iconName} />\n <OakHeading $font={\"heading-6\"} tag={tag}>\n {children}\n </OakHeading>\n </OakFlex>\n );\n};\n\n/**\n *\n * OakLessonInfoCards are created using the custom card either oakLessoninfoCard or oakStaticMessageCard and the content is added as children. And use the oakCardHeader to create the header of the card.\n *\n */\nexport const OakLessonInfoCard = (props: OakInfoCardProps) => {\n const { children, ...rest } = props;\n\n return (\n <OakFlex\n $borderRadius={\"border-radius-l\"}\n $pa={\"inner-padding-xl\"}\n $flexDirection={\"column\"}\n $gap={\"space-between-s\"}\n $background={\"white\"}\n {...rest}\n >\n {children}\n </OakFlex>\n );\n};\n\nexport const OakStaticMessageCard = (props: OakInfoCardProps) => {\n const { children, ...rest } = props;\n\n return (\n <OakHandDrawnCard\n {...rest}\n fill={[\n \"bg-decorative2-very-subdued\",\n \"bg-decorative2-subdued\",\n \"bg-decorative2-subdued\",\n ]}\n >\n <OakFlex\n $pa={\"inner-padding-none\"}\n $flexDirection={\"column\"}\n $gap={\"space-between-s\"}\n >\n {children}\n </OakFlex>\n </OakHandDrawnCard>\n );\n};\n","import React, { useRef } from \"react\";\n\nimport {\n BaseCheckBoxProps,\n InternalCheckBoxHoverFocus,\n} from \"@/components/atoms/InternalCheckBox/InternalCheckBox\";\nimport {\n InternalCheckBoxLabel,\n InternalCheckBoxLabelProps,\n} from \"@/components/atoms/InternalCheckBoxLabel\";\nimport { InternalCheckBoxWrapper } from \"@/components/atoms/InternalCheckBoxWrapper\";\nimport {\n OakAllSpacingToken,\n OakBorderRadiusToken,\n OakBorderWidthToken,\n OakCombinedColorToken,\n OakInnerPaddingToken,\n} from \"@/styles\";\n\nexport type OakCheckBoxProps = BaseCheckBoxProps & {\n checkboxSize?: OakAllSpacingToken;\n checkboxBorder?: OakBorderWidthToken;\n checkboxBorderRadius?: OakBorderRadiusToken;\n checkedIcon?: React.JSX.Element;\n checkedBackgroundFill?: boolean;\n hoverBorderRadius?: OakBorderRadiusToken;\n iconPadding?: OakInnerPaddingToken;\n defaultColor?: OakCombinedColorToken;\n disabledColor?: OakCombinedColorToken;\n displayValue?: string;\n} & InternalCheckBoxLabelProps;\n\n/**\n *\n * Default checkbox which can be extended to create specialised checkboxes.\n * - if provided, displayValue is used to display a different value to the value prop.\n *\n *\n * ## Events\n * The following callbacks are available for tracking focus events:\n *\n * ### onChange\n * onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n *\n * ### onFocus\n * onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;\n *\n * ### onBlur\n * onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;\n *\n * ### onHovered\n * `onHovered?: (id, value, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n *\n *\n */\nexport const OakCheckBox = (props: OakCheckBoxProps) => {\n const {\n id,\n value,\n displayValue = value,\n disabled = false,\n defaultChecked = false,\n onChange,\n onFocus,\n onBlur,\n onHovered,\n iconPadding = \"inner-padding-none\",\n hoverBorderRadius = \"border-radius-xs\",\n checkboxSize = \"all-spacing-6\",\n checkboxBorder = \"border-solid-m\",\n checkboxBorderRadius = \"border-radius-xs\",\n defaultColor = \"text-primary\",\n disabledColor = \"text-disabled\",\n labelGap = \"space-between-s\",\n labelAlignItems = \"center\",\n checkedBackgroundFill = true,\n checkedIcon,\n } = props;\n\n const hoverStart = useRef(Date.now());\n\n const handleMouseEnter = () => {\n hoverStart.current = Date.now();\n };\n\n const handleMouseLeave = () => {\n const delta = Date.now() - hoverStart.current;\n if (onHovered) {\n onHovered(value, id, delta);\n }\n };\n\n const currentColor = disabled ? disabledColor : defaultColor;\n\n return (\n <InternalCheckBoxLabel\n htmlFor={id}\n labelGap={labelGap}\n labelAlignItems={labelAlignItems}\n $color={currentColor}\n disabled={disabled}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n data-testid={props[\"data-testid\"]}\n >\n <InternalCheckBoxWrapper\n size={checkboxSize}\n internalCheckbox={\n <InternalCheckBoxHoverFocus\n id={id}\n value={value}\n $width={checkboxSize}\n $height={checkboxSize}\n $ba={checkboxBorder}\n $borderRadius={checkboxBorderRadius}\n $borderColor={currentColor}\n $checkedBackground={checkedBackgroundFill ? currentColor : null}\n $hoverBorderRadius={hoverBorderRadius}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n defaultChecked={defaultChecked}\n disabled={disabled}\n />\n }\n checkedIcon={checkedIcon}\n iconPadding={iconPadding}\n />\n {displayValue}\n </InternalCheckBoxLabel>\n );\n};\n","import React, { ComponentPropsWithoutRef } from \"react\";\n\nimport { OakDraggable } from \"@/components/molecules/OakDraggable\";\n\ntype OakDraggableFeedbackProps = ComponentPropsWithoutRef<\n typeof OakDraggable\n> & {\n /**\n * Alters the appearance of the element to indicate whether or not it is in a correct state\n */\n feedback: \"correct\" | \"incorrect\";\n};\n\n/**\n * A draggable element that visually indicates whether or not its state is correct or not\n */\nexport const OakDraggableFeedback = ({\n feedback,\n ...props\n}: OakDraggableFeedbackProps) => {\n return (\n <OakDraggable\n {...props}\n iconName={feedback === \"correct\" ? \"tick\" : \"cross\"}\n iconColor={feedback === \"correct\" ? \"icon-success\" : \"icon-error\"}\n iconAlt={feedback === \"correct\" ? \"correct\" : \"incorrect\"}\n $ba=\"border-solid-xl\"\n $borderColor={feedback === \"correct\" ? \"border-success\" : \"border-error\"}\n $background={feedback === \"correct\" ? \"bg-correct\" : \"bg-incorrect\"}\n isReadOnly\n />\n );\n};\n","import React from \"react\";\n\nimport { OakFlex } from \"@/components/atoms/OakFlex\";\nimport { OakSpan } from \"@/components/atoms/OakSpan\";\nimport { OakIcon } from \"@/components/atoms/OakIcon\";\n\nexport type OakFieldErrorProps = {\n children?: React.ReactNode;\n};\n\n/**\n *\n * OakFieldError renders a error message when passed children.\n *\n */\nexport const OakFieldError = (props: OakFieldErrorProps) => {\n const { children } = props;\n if (!children) {\n /**\n * Return early to avoid unwanted whitespace when there's no error\n */\n return null;\n }\n return (\n <OakFlex $alignItems={\"center\"} $flexDirection={\"row\"}>\n <OakFlex $alignSelf={\"flex-start\"} $mr={\"space-between-s\"}>\n <OakIcon iconName=\"content-guidance\" $colorFilter={\"red\"} />\n </OakFlex>\n <OakSpan $color=\"red\">{children}</OakSpan>\n </OakFlex>\n );\n};\n","import React, { ReactNode, useState } from \"react\";\n\nimport { OakBox, OakFlex } from \"@/components/atoms\";\nimport {\n OakCollapsibleContent,\n OakTertiaryButton,\n} from \"@/components/molecules\";\n\ntype OakLessonVideoTranscriptProps = {\n /**\n * The transcript content\n */\n children: ReactNode;\n /**\n * The id of the collapsible content element. This is used to link the button to the content\n */\n id: string;\n /**\n * A control to toggle the video to display sign language\n */\n signLanguageControl?: ReactNode;\n};\n\n/**\n * Display a togglable video transcript with a slot to display a sign language control\n */\nexport const OakLessonVideoTranscript = ({\n children,\n id,\n signLanguageControl = null,\n}: OakLessonVideoTranscriptProps) => {\n const [showTranscript, setShowTranscript] = useState(false);\n\n return (\n <>\n <OakFlex\n $flexDirection={[\"column-reverse\", \"row\"]}\n $justifyContent=\"space-between\"\n >\n <OakBox>\n {children && (\n <OakTertiaryButton\n onClick={() => setShowTranscript(!showTranscript)}\n iconName={showTranscript ? \"chevron-up\" : \"chevron-down\"}\n isTrailingIcon\n aria-controls={id}\n aria-expanded={showTranscript}\n $mb=\"space-between-m\"\n >\n {showTranscript ? \"Hide transcript\" : \"Show transcript\"}\n </OakTertiaryButton>\n )}\n </OakBox>\n {signLanguageControl && (\n <OakBox $mb=\"space-between-m\">{signLanguageControl}</OakBox>\n )}\n </OakFlex>\n {children && (\n <OakCollapsibleContent\n id={id}\n $maxHeight=\"all-spacing-23\"\n isOpen={showTranscript}\n $font=\"body-1\"\n $color=\"text-primary\"\n >\n {children}\n </OakCollapsibleContent>\n )}\n </>\n );\n};\n","import React from \"react\";\n\nimport { OakFlex } from \"@/components/atoms/OakFlex\";\nimport { OakLI } from \"@/components/atoms\";\nimport {\n OakPrimaryNavItem,\n OakPrimaryNavItemProps,\n} from \"@/components/organisms/OakPrimaryNavItem\";\n\nexport type OakPrimaryNavProps = {\n ariaLabel?: string;\n navItems: OakPrimaryNavItemProps[];\n};\n\n/**\n * A row of buttons for navigating between different sections\n */\nexport const OakPrimaryNav = ({ ariaLabel, navItems }: OakPrimaryNavProps) => {\n return (\n <nav aria-label={ariaLabel}>\n <OakFlex\n as={\"ul\"}\n $flexDirection={[\"row\"]}\n $gap={\"space-between-m\"}\n $mh={\"space-between-none\"}\n $mv={\"space-between-none\"}\n $ph={\"inner-padding-none\"}\n >\n {navItems.map(\n (\n { href, isCurrent, children }: OakPrimaryNavItemProps,\n index: number,\n ) => (\n <OakLI $listStyle={\"none\"} key={index}>\n <OakPrimaryNavItem href={href} isCurrent={isCurrent}>\n {children}\n </OakPrimaryNavItem>\n </OakLI>\n ),\n )}\n </OakFlex>\n </nav>\n );\n};\n","import React from \"react\";\n\nimport { OakTextInput, OakTextInputProps } from \"@/components/molecules\";\n\ntype OakQuizTextInputProps = Omit<\n OakTextInputProps,\n \"validity\" | \"iconName\" | \"iconAlt\" | \"isTrailingIcon\"\n> & {\n /**\n * Alters the appearance of the input to indicate whether or not a correct answer was given.\n * Also sets the input to read-only.\n */\n feedback?: \"correct\" | \"incorrect\" | null;\n};\n\n/**\n * A text input for a free-text question in a quiz\n */\nexport const OakQuizTextInput = ({\n feedback,\n readOnly,\n ...props\n}: OakQuizTextInputProps) => {\n let validity: OakTextInputProps[\"validity\"];\n let iconName: OakTextInputProps[\"iconName\"];\n let iconAlt: OakTextInputProps[\"iconAlt\"] = undefined;\n\n switch (feedback) {\n case \"correct\":\n validity = \"valid\";\n iconName = \"tick\";\n iconAlt = \"Correct\";\n break;\n case \"incorrect\":\n validity = \"invalid\";\n iconName = \"cross\";\n iconAlt = \"Incorrect\";\n break;\n }\n\n return (\n <OakTextInput\n {...props}\n validity={validity}\n iconName={iconName}\n iconAlt={iconAlt}\n readOnly={readOnly || !!feedback}\n isTrailingIcon\n />\n );\n};\n","import React, { ElementType } from \"react\";\n\nimport {\n InternalShadowRectButton,\n InternalShadowRectButtonProps,\n} from \"@/components/molecules/InternalShadowRectButton\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\n\nexport type OakSecondaryButtonProps = Omit<\n InternalShadowRectButtonProps,\n | \"defaultBorderColor\"\n | \"defaultBackground\"\n | \"defaultTextColor\"\n | \"hoverBackground\"\n | \"hoverBorderColor\"\n | \"hoverTextColor\"\n | \"disabledBackground\"\n | \"disabledBorderColor\"\n | \"disabledTextColor\"\n>;\n\n/**\n *\n * A specific implementation of InternalRectButton\n *\n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n *\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n */\nexport const OakSecondaryButton = <C extends ElementType = \"button\">({\n element,\n ...rest\n}: OakSecondaryButtonProps & PolymorphicPropsWithoutRef<C>) => {\n return (\n <InternalShadowRectButton\n element={element ?? \"button\"}\n defaultBorderColor=\"text-primary\"\n defaultBackground=\"bg-btn-secondary\"\n defaultTextColor=\"text-primary\"\n hoverBackground=\"bg-btn-secondary-hover\"\n hoverBorderColor=\"text-primary\"\n hoverTextColor=\"text-primary\"\n disabledBackground=\"bg-btn-secondary-disabled\"\n disabledBorderColor=\"text-disabled\"\n disabledTextColor=\"text-disabled\"\n {...rest}\n />\n );\n};\n","import React from \"react\";\n\nimport {\n OakHandDrawnBoxWithIconProps,\n OakHandDrawnCardWithIcon,\n OakPromoTag,\n} from \"@/components/molecules\";\nimport { OakBox } from \"@/components/atoms\";\n\nexport type OakSubjectIconProps = Pick<\n OakHandDrawnBoxWithIconProps,\n \"iconName\" | \"fill\" | \"iconColor\" | \"alt\"\n> & {\n iconName: `subject-${string}`;\n showPromoTag?: boolean;\n};\n\n/**\n * A large illuminated hand-drawn box with a subject icon in the center\n *\n * Accepts an optional `showPromoTag` prop to display a \"New\" tag in the top left corner\n */\nexport const OakSubjectIcon = ({\n showPromoTag,\n ...rest\n}: OakSubjectIconProps) => {\n return (\n <OakBox $width=\"fit-content\" $height=\"fit-content\" $position=\"relative\">\n <OakHandDrawnCardWithIcon {...rest} />\n {showPromoTag && (\n <OakBox\n $position=\"absolute\"\n $top={[\"all-spacing-0\", \"all-spacing-2\"]}\n $left={[\"all-spacing-0\", \"all-spacing-2\"]}\n >\n <OakPromoTag />\n </OakBox>\n )}\n </OakBox>\n );\n};\n","import React from \"react\";\nimport { ThemeProvider } from \"styled-components\";\n\nimport { OakTheme } from \"@/styles\";\n\nexport type OakThemeProviderProps = {\n theme: OakTheme;\n children: React.ReactNode;\n};\n\n/**\n *\n * OakThemeProvider wraps Styled Components ThemeProvider allowing the use of the custom type OakTheme.\n *\n */\nexport const OakThemeProvider = ({\n theme,\n children,\n}: OakThemeProviderProps) => {\n return <ThemeProvider theme={theme}>{children}</ThemeProvider>;\n};\n","import { OakTheme } from \"./theme\";\n\nexport const oakDefaultTheme: OakTheme = {\n name: \"default\",\n uiColors: {\n \"text-primary\": \"black\",\n \"text-subdued\": \"grey60\",\n \"text-error\": \"red\",\n \"text-disabled\": \"grey50\",\n \"text-link-active\": \"navy\",\n \"text-link-hover\": \"navy110\",\n \"text-link-pressed\": \"navy120\",\n \"text-link-visited\": \"navy120\",\n \"text-inverted\": \"white\",\n \"text-success\": \"oakGreen\",\n \"text-warning\": \"amber\",\n \"bg-primary\": \"white\",\n \"bg-neutral\": \"grey20\",\n \"bg-neutral-stronger\": \"grey30\",\n \"bg-btn-primary\": \"black\",\n \"bg-btn-primary-hover\": \"grey60\",\n \"bg-btn-primary-disabled\": \"grey50\",\n \"bg-btn-secondary\": \"white\",\n \"bg-btn-secondary-hover\": \"grey20\",\n \"bg-btn-secondary-disabled\": \"grey30\",\n \"bg-icon\": \"black\",\n \"bg-icon-hover\": \"grey60\",\n \"bg-decorative1-main\": \"mint\",\n \"bg-decorative1-subdued\": \"mint50\",\n \"bg-decorative1-very-subdued\": \"mint30\",\n \"bg-decorative2-main\": \"aqua\",\n \"bg-decorative2-subdued\": \"aqua50\",\n \"bg-decorative2-very-subdued\": \"aqua30\",\n \"bg-decorative3-main\": \"lavender\",\n \"bg-decorative3-subdued\": \"lavender50\",\n \"bg-decorative3-very-subdued\": \"lavender30\",\n \"bg-decorative4-main\": \"pink\",\n \"bg-decorative4-subdued\": \"pink50\",\n \"bg-decorative4-very-subdued\": \"pink30\",\n \"bg-decorative5-main\": \"lemon\",\n \"bg-decorative5-subdued\": \"lemon50\",\n \"bg-decorative5-very-subdued\": \"lemon30\",\n \"bg-correct\": \"mint50\",\n \"bg-incorrect\": \"red30\",\n \"icon-main\": \"white\",\n \"icon-inverted\": \"black\",\n \"icon-disabled\": \"grey50\",\n \"icon-brand\": \"oakGreen\",\n \"icon-success\": \"oakGreen\",\n \"icon-error\": \"red\",\n \"icon-warning\": \"amber\",\n \"border-primary\": \"black\",\n \"border-inverted\": \"white\",\n \"border-neutral\": \"grey50\",\n \"border-brand\": \"oakGreen\",\n \"border-success\": \"oakGreen\",\n \"border-error\": \"red\",\n \"border-warning\": \"amber\",\n \"border-decorative1\": \"mint\",\n \"border-decorative1-stronger\": \"mint110\",\n \"border-decorative2\": \"aqua\",\n \"border-decorative2-stronger\": \"aqua110\",\n \"border-decorative3\": \"lavender\",\n \"border-decorative3-stronger\": \"lavender110\",\n \"border-decorative4\": \"pink\",\n \"border-decorative4-stronger\": \"pink110\",\n \"border-decorative5\": \"lemon\",\n \"border-decorative5-stronger\": \"lemon110\",\n \"border-decorative6\": \"amber50\",\n \"border-decorative6-stronger\": \"amber\",\n transparent: \"transparent\",\n },\n};\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","__read","o","m","Symbol","iterator","r","ar","next","done","push","value","error","__makeTemplateObject","cooked","raw","defineProperty","SuppressedError","oakColorTokens","white","grey10","grey20","grey30","grey40","grey50","grey60","grey70","black","oakGreen","mint","mint30","mint50","mint110","aqua","aqua30","aqua50","aqua110","lavender","lavender30","lavender50","lavender110","pink","pink30","pink50","pink110","lemon","lemon30","lemon50","lemon110","amber","amber30","amber50","red","red30","red50","navy","navy110","navy120","blue","magenta","purple","teal","transparent","oakColorFilterTokens","oakUiRoleTokens","parseColor","includes","_a","c","theme","uiColors","truthy","breakpointsByName","small","large","breakpoints","values","sort","a","b","getBreakpoint","breakpointName","responsiveStyle","attr","getValues","parse","x","props","attrCss","undefined","css","templateObject_1","Array","isArray","to","from","pack","l","slice","concat","__spreadArray","templateObject_3","map","breakpoint","templateObject_4","filter","templateObject_2","colorStyle","$color","$background","BASE_FONT_SIZE_PX","REM_DP","pxToRem","px","Number","toFixed","oakAllSpacingTokens","oakInnerPaddingTokens","oakSpaceBetweenTokens","parseSpacing","positionStyle","$position","$top","$right","$bottom","$left","$inset","$overflow","$overflowX","$overflowY","$objectFit","$pointerEvents","$visibility","sizeStyle","$width","$minWidth","$maxWidth","$height","$minHeight","$maxHeight","$aspectRatio","$boxSizing","paddingAll","$pa","paddingHorizontal","$ph","paddingVertical","$pv","paddingLeft","$pl","paddingRight","templateObject_5","$pr","paddingTop","templateObject_6","$pt","paddingBottom","templateObject_7","$pb","marginAll","templateObject_8","$ma","marginHorizontal","templateObject_9","$mh","marginVertical","templateObject_10","$mv","marginLeft","templateObject_11","$ml","marginRight","templateObject_12","$mr","marginTop","templateObject_13","$mt","marginBottom","templateObject_14","$mb","marginStyle","paddingStyle","spacingStyle","oakBorderWidthTokens","oakBorderRadiusTokens","parseBorder","parseBorderRadius","borderAll","$ba","borderTop","$bt","borderRight","$br","borderBottom","$bb","borderLeft","$bl","borderHorizontal","$bh","borderVertical","$bv","borderColor","$borderColor","borderRadius","$borderRadius","borderRadiusTopLeft","$btlr","borderRadiusTopRight","$btrr","borderRadiusBottomLeft","$bblr","borderRadiusBottomRight","$bbrr","borderRadiusTop","$btr","borderRadiusBottom","templateObject_15","$bbr","borderStrokeStyle","templateObject_16","$borderStyle","borderStyle","templateObject_17","displayStyle","$display","oakDropShadowTokens","parseDropShadow","variant","dropShadowStyle","$dropShadow","oakOpacityTokens","opaque","opacityStyle","$opacity","transformStyle","$transform","$transformOrigin","oakTransitionTokens","transitionStyle","$transition","oakFontSizeTokens","oakFontTokens","typographyStyle","$font","font","fontSize","lineHeight","$textAlign","$textDecoration","$whiteSpace","$wordWrap","$textOverflow","oakZIndexTokens","behind","neutral","zIndexStyle","$zIndex","oakBoxCss","onClick","OakBox","styled","div","flexStyle","$flexDirection","$flexWrap","$alignItems","$alignContent","$justifyContent","$alignSelf","$order","$flexGrow","$flexShrink","$flexBasis","$gap","$columnGap","$rowGap","OakFlex","default","OakSpan","span","OakForm","form","parseColorFilter","colorFilterStyle","$colorFilter","clickStyles","placeholderStyles","$showOakPlaceholder","StyledFillImage","Image","StyledResponsiveImage","OakImage","as","src","alt","width","height","sizes","_b","_c","_d","placeholder","unoptimized","imageProps","onLoad","onError","rest","finalPlaceholder","_e","useState","showPlaceholder","setShowPlaceholder","setImg","useCallback","img","complete","handleComplete","originalHandler","event","useShowPlaceholder","React","createElement","ref","fill","OakTypography","HeadingTagComponent","tag","ariaLabel","ariaHidden","otherProps","Tag","OakHeading","OakP","OakUL","ul","$reset","OakOL","ol","listStyle","$listStyle","OakLI","li","defaultProps","OakLabel","label","icons","home","send","rocket","edit","hamburger","cross","bell","twitter","worksheet","facebook","share","save","linkedin","books","external","download","search","go","copyright","project","tick","instagram","dot","warning","lightbulb","quiz","video","intro","oakIconNames","keys","OakIcon","iconName","process","env","NEXT_PUBLIC_OAK_ASSETS_HOST","NEXT_PUBLIC_OAK_ASSETS_PATH","gridStyle","$rg","$cg","$gridAutoRows","$gridTemplateAreas","$gridTemplateColumns","$gridTemplateRows","OakGrid","combineSpanStart","start","parseSpanStart","split","span_1","gridArea","$colSpan","index","$colStart","$rowSpan","$rowStart","$colEnd","OakGridArea","OakMaxWidth","getCloudinaryIdFromUrl","config","toString","replace","canaryUrl","URL","getCldImageUrl","origin","getCloudinaryRootUrl","cloudinaryConfigContext","createContext","OakCloudinaryConfigProvider","Provider","OakKbd","children","resetGlobalCss","oakGlobalCss","OakGlobalStyle","createGlobalStyle","screenReaderStyle","OakScreenReader","SpinnerKeyframe","keyframes","StyledLoadingSpinner","loaderColor","OakLoadingSpinner","internalButtonCss","InternalButton","onHovered","Component","hoverStart","useRef","Date","now","onMouseEnter","current","onMouseLeave","delta","StyledInternalButton","$hoverTextColor","$hoverBackground","$hoverBorderColor","$defaultBackground","$defaultBorderColor","$defaultTextColor","$disabledBackground","$disabledBorderColor","$disabledTextColor","StyledButtonWrapper","$hoverShadow","InternalShadowRectButton","element","isTrailingIcon","isLoading","disabled","maxWidth","defaultBackground","defaultBorderColor","defaultTextColor","disabledTextColor","hoverTextColor","hoverBackground","hoverBorderColor","disabledBackground","disabledBorderColor","className","hoverShadow","icon","Fragment","loader","iconLogic","OakPrimaryButton","OakPrimaryInvertedButton","$disabledIconBackground","$hoverIconBackground","$defaultIconBackground","InternalShadowRoundButton","iconBackgroundSize","iconSize","disabledIconBackground","defaultIconColor","hoverIconBackground","defaultIconBackground","disabledIconColor","OakTertiaryButton","RadioContext","currentValue","name","RadioButtonLabel","$labelGap","$labelAlignItems","HiddenRadioButtonInput","input","attrs","type","VisibleRadioButtonInput","$disableFocusRing","$radioInnerSize","DisabledVisibleRadioButtonInput","OakRadioButton","forwardRef","radioContext","useContext","onValueUpdated","id","tabIndex","dataTestId","disableFocusRing","radioInnerSize","_f","radioOuterSize","_g","radioBorderWidth","_h","radioBackground","_j","checkedRadioBorderWidth","checked","anyDisabled","finalRadioBorderWidth","htmlFor","onChange","BaseCheckBox","InternalCheckBox","$checkedBackground","InternalCheckBoxHover","$hoverBorderRadius","focusStyle","InternalCheckBoxHoverFocus","InternalCheckBoxLabel","labelGap","labelAlignItems","InternalCheckBoxLabelHoverDecor","StyledIconContainer","InternalCheckBoxWrapper","size","iconPadding","internalCheckbox","checkedIcon","StyledInput","InternalTextInput","onInitialFocus","onFocus","hadInitialFocused","StyledTextInputWrapper","$focusRingDropShadows","dropShadow","join","$readOnly","$readOnlyBorderColor","$readOnlyColor","$disabled","$disabledBackgroundColor","$disabledColor","OakTextInput","readOnlyBorderColor","focusRingDropShadows","background","disabledBackgroundColor","highlightBackgroundColor","_k","color","_l","disabledColor","_m","readOnlyColor","validity","_o","iconColor","_p","validBorderColor","_q","invalidBorderColor","_r","validIconColor","_s","invalidIconColor","iconAlt","_t","_u","isHighlighted","wrapperWidth","wrapperMaxWidth","finalBackgroundColor","finalBorderColor","finalIconColor","finalReadOnlyBorderColor","readOnly","currentTarget","querySelector","focus","OakRoundIcon","StyledFlex","StyledSvg","svg","$tooltipPosition","$fill","InternalTooltip","isOpen","tooltip","tooltipPosition","positionProps","role","d","OakTooltip","borderRadiusProps","StyledBackLink","InternalCard","StyledBackgroundBox","InternalCardWithBackgroundElement","backgroundElement","parseBorderWidth","InternalStyledSvg","$stroke","$strokeWidth","OakHandDrawnCard","stroke","strokeWidth","xmlns","viewBox","preserveAspectRatio","vectorEffect","OakHandDrawnCardWithIcon","iconWidth","iconHeight","StyledPromoTag","OakPromoTag","StyledScrollBox","OakCollapsibleContent","StyledOakIcon","StyledLink","OakLink","StyledLeadingTrim","OakDragAndDropInstructions","StyledDraggable","$iconColor","OakDraggable","isDragging","isDisabled","isReadOnly","OakDroppable","labelSlot","isOver","slotBackground","StyledInternalCheckBox","StyledInternalCheckBoxLabelHoverDecor","StyledFlexBox","$outlineColor","$overlayBorderColor","$feedbackBgColor","StyledOakFlex","$checked","StyledInternalShadowRoundButton","OakHintButton","OakQuizHint","hint","setIsOpen","OakQuizFeedback","feedbackLabel","feedback","answerFeedback","StyledMobileSummary","StyledLayoutBox","StickyFooter","StyledLabel","StyledRoundIcon","activeIconStyles","StyledLessonNavItem","FlexedOakBox","pickIconForSection","sectionName","StyledLessonReviewItem","pickSummaryForProgress","completed","pickSummaryForIncomplete","lessonSectionName","numQuestions","pickLabelForSection","pickColorsForSection","renderQuestionCounter","grade","canUseDOM","window","document","isWindow","elementString","isNode","node","getWindow","target","_target$ownerDocument","_target$ownerDocument2","ownerDocument","defaultView","isDocument","Document","isHTMLElement","HTMLElement","isSVGElement","SVGElement","getOwnerDocument","useIsomorphicLayoutEffect","useLayoutEffect","useEffect","useEvent","handler","handlerRef","_len","args","_key","useLatestValue","dependencies","valueRef","useLazyMemo","callback","useMemo","newValue","useNodeRef","onChangeHandler","setNodeRef","usePrevious","ids","useUniqueId","prefix","createAdjustmentFn","modifier","object","adjustments","reduce","accumulator","adjustment","entries","key","valueAdjustment","add","subtract","isKeyboardEvent","KeyboardEvent","getEventCoordinates","TouchEvent","isTouchEvent","touches","clientX","clientY","y","changedTouches","hasViewportRelativeCoordinates","CSS","freeze","Translate","transform","Math","round","Scale","scaleX","scaleY","Transform","Transition","_ref","property","duration","easing","SELECTOR","findFirstFocusableNode","matches","hiddenStyles","display","HiddenText","style","LiveRegion","announcement","ariaLiveType","position","margin","border","padding","overflow","clip","clipPath","whiteSpace","DndMonitorContext","defaultScreenReaderInstructions","draggable","defaultAnnouncements","onDragStart","active","onDragOver","_ref2","over","onDragEnd","_ref3","onDragCancel","_ref4","Accessibility","announcements","container","hiddenTextDescribedById","screenReaderInstructions","announce","setAnnouncement","useAnnouncement","liveRegionId","mounted","setMounted","listener","registerListener","Error","useDndMonitor","onDragMove","_ref5","_ref6","markup","createPortal","Action","noop","useSensor","sensor","options","useSensors","sensors","defaultCoordinates","distanceBetween","p1","p2","sqrt","pow","getRelativeTransformOrigin","rect","eventCoordinates","left","top","sortCollisionsAsc","data","sortCollisionsDesc","cornersOfRectangle","getFirstCollision","collisions","firstCollision","centerOfRectangle","closestCenter","collisionRect","droppableRects","droppableContainers","centerRect","droppableContainer","get","distBetween","getIntersectionRatio","entry","max","right","min","bottom","targetArea","entryArea","intersectionArea","rectIntersection","intersectionRatio","getRectDelta","rect1","rect2","createRectAdjustmentFn","acc","getAdjustedRect","parseTransform","startsWith","transformArray","defaultOptions","ignoreTransform","getClientRect","getBoundingClientRect","transformOrigin","getComputedStyle","parsedTransform","translateX","translateY","parseFloat","w","h","inverseTransform","getTransformAgnosticClientRect","getScrollableAncestors","limit","scrollParents","findScrollableAncestors","scrollingElement","computedStyle","overflowRegex","some","test","isScrollable","isFixed","parentNode","getFirstScrollableAncestor","firstScrollableAncestor","getScrollableElement","getScrollXCoordinate","scrollX","scrollLeft","getScrollYCoordinate","scrollY","scrollTop","getScrollCoordinates","Direction","isDocumentScrollingElement","getScrollPosition","scrollingContainer","minScroll","dimensions","innerHeight","innerWidth","clientHeight","clientWidth","maxScroll","scrollWidth","scrollHeight","isTop","isLeft","isBottom","isRight","defaultThreshold","getScrollDirectionAndSpeed","scrollContainer","scrollContainerRect","acceleration","thresholdPercentage","direction","speed","threshold","Backward","abs","Forward","getScrollElementRect","getScrollOffsets","scrollableAncestors","scrollIntoViewIfNeeded","measure","scrollIntoView","block","inline","properties","Rect","constructor","scrollOffsets","axis","getScrollOffset","currentOffsets","scrollOffsetsDeltla","enumerable","Listeners","listeners","removeAll","forEach","_this$target","removeEventListener","eventName","_this$target2","addEventListener","hasExceededDistance","measurement","dx","dy","EventName","KeyboardCode","preventDefault","stopPropagation","defaultKeyboardCodes","Space","Enter","cancel","Esc","end","defaultKeyboardCoordinateGetter","currentCoordinates","code","Right","Left","Down","Up","KeyboardSensor","autoScrollEnabled","referenceCoordinates","windowListeners","handleKeyDown","bind","handleCancel","attach","handleStart","Resize","VisibilityChange","setTimeout","Keydown","activeNode","onStart","context","keyboardCodes","coordinateGetter","scrollBehavior","handleEnd","newCoordinates","coordinatesDelta","scrollDelta","scrollElementRect","clampedCoordinates","canScrollX","canScrollY","newScrollCoordinates","canScrollToNewCoordinates","scrollTo","behavior","scrollBy","handleMove","coordinates","onMove","onEnd","detach","onCancel","isDistanceConstraint","constraint","Boolean","isDelayConstraint","activators","onActivation","nativeEvent","activator","activatorNode","AbstractPointerSensor","events","listenerTarget","_getEventCoordinates","EventTarget","getEventListenerTarget","activated","initialCoordinates","timeoutId","documentListeners","handleKeydown","removeTextSelection","activationConstraint","bypassActivationConstraint","move","passive","DragStart","ContextMenu","delay","clearTimeout","Click","capture","SelectionChange","_getEventCoordinates2","tolerance","distance","cancelable","_this$document$getSel","getSelection","removeAllRanges","PointerSensor","super","isPrimary","button","events$1","MouseButton","MouseSensor","RightClick","events$2","TouchSensor","setup","AutoScrollActivator","TraversalOrder","useAutoScroller","Pointer","canScroll","draggingRect","enabled","interval","order","TreeOrder","pointerCoordinates","scrollableAncestorRects","scrollIntent","previousDelta","previousIntent","defaultScrollIntent","sign","useScrollIntent","setAutoScrollInterval","clearAutoScrollInterval","intervalRef","setInterval","clearInterval","useInterval","scrollSpeed","scrollDirection","DraggableRect","scrollContainerRef","autoScroll","sortedScrollableAncestors","reverse","JSON","stringify","MeasuringStrategy","MeasuringFrequency","defaultValue","Map","useInitialValue","computeFn","previousValue","useResizeObserver","handleResize","resizeObserver","ResizeObserver","disconnect","defaultMeasure","useRect","fallbackRect","measureRect","useReducer","currentRect","isConnected","newRect","mutationObserver","handleMutations","MutationObserver","useMutationObserver","records","record","contains","observe","body","childList","subtree","defaultValue$1","useScrollOffsetsDelta","initialScrollOffsets","hasScrollOffsets","useWindowRect","getWindowClientRect","defaultValue$2","getMeasurableNode","firstChild","defaultSensors","defaultData","defaultMeasuringConfiguration","droppable","strategy","WhileDragging","frequency","Optimized","dragOverlay","DroppableContainersMap","_super$get","toArray","getEnabled","getNodeFor","_this$get$node$curren","_this$get","defaultPublicContext","activatorEvent","activeNodeRect","containerNodeRect","draggableNodes","nodeRef","setRef","measuringConfiguration","measureDroppableContainers","windowRect","measuringScheduled","defaultInternalContext","ariaDescribedById","dispatch","InternalContext","PublicContext","getInitialState","nodes","translate","containers","reducer","state","action","DragMove","DragEnd","DragCancel","RegisterDroppable","set","SetDroppableDisabled","UnregisterDroppable","delete","RestoreFocus","previousActivatorEvent","previousActiveId","activeElement","draggableNode","requestAnimationFrame","focusableNode","applyModifiers","modifiers","ActiveDraggableContext","Status","DndContext","memo","_sensorContext$curren","_dragOverlay$nodeRef$","_dragOverlay$rect","_over$rect","accessibility","collisionDetection","measuring","store","dispatchMonitorEvent","registerMonitorListener","Set","_listener$type","useDndMonitorProvider","status","setStatus","Uninitialized","isInitialized","Initialized","activeId","activeRects","initial","translated","_node$data","activeRef","activeSensor","setActiveSensor","setActivatorEvent","latestProps","draggableDescribedById","enabledDroppableContainers","dragging","queue","setQueue","containersRef","Always","BeforeDragging","disabledRef","useDroppableMeasuring","cachedNode","useCachedNode","activationCoordinates","autoScrollOptions","activeSensorDisablesAutoscroll","autoScrollGloballyDisabled","getAutoScrollerOptions","initialActiveNodeRect","useInitialRect","initialRect","initialized","rectDelta","useLayoutShiftScrollCompensation","layoutShiftCompensation","parentElement","sensorContext","draggingNode","draggingNodeRect","scrollAdjustedTranslate","overNode","setRect","handleNodeChange","useDragOverlayMeasuring","usesDragOverlay","nodeRectDelta","previousNode","ancestors","useScrollableAncestors","elements","firstElement","rects","measureRects","useRects","modifiedTranslate","overlayNodeRect","scrollCoordinates","setScrollCoordinates","prevElements","handleScroll","previousElements","cleanup","scrollableElement","useScrollOffsets","scrollAdjustment","activeNodeScrollDelta","overId","setOver","adjustScale","instantiateSensor","Sensor","sensorInstance","unstable_batchedUpdates","Initializing","createHandler","async","cancelDrop","Promise","resolve","bindActivatorToSensorInstantiator","activeDraggableNode","dndKit","defaultPrevented","activationContext","capturedBy","getSyntheticHandler","useCombineActivators","teardownFns","teardown","useSensorSetup","overContainer","publicContext","internalContext","restoreFocus","NullContext","defaultRole","ID_PREFIX","useDraggable","attributes","roleDescription","setActivatorNodeRef","useSyntheticListeners","dataRef","useDndContext","ID_PREFIX$1","defaultResizeObserverConfig","timeout","useDroppable","resizeObserverConfig","previous","resizeObserverConnected","callbackId","resizeObserverDisabled","updateMeasurementsFor","resizeObserverTimeout","newElement","previousElement","unobserve","AnimationManager","animation","clonedChildren","setClonedChildren","setElement","previousChildren","then","cloneElement","defaultTransform","NullifiedContextProvider","baseStyles","touchAction","defaultTransition","PositionedOverlay","transition","scaleAdjustedTransform","styles","defaultDropAnimationSideEffects","originalStyles","getPropertyValue","setProperty","classList","remove","defaultDropAnimationConfiguration","final","sideEffects","opacity","useDropAnimation","activeDraggable","measurableNode","scale","finalTransform","animationKeyframes","firstKeyframe","lastKeyframe","animate","onfinish","createDefaultDropAnimation","useKey","DragOverlay","dropAnimation","dropAnimationConfig","wrapperElement","zIndex","modifiedTransform","arrayMove","array","newArray","splice","getSortedRects","items","isValidIndex","rectSortingStrategy","activeIndex","overIndex","newRects","oldRect","defaultScale$1","verticalListSortingStrategy","_rects$activeIndex","fallbackActiveRect","overIndexRect","itemGap","clientRects","previousRect","nextRect","getItemGap$1","Context","containerId","disableTransforms","useDragOverlay","sortedRects","SortableContext","userDefinedItems","disabledProp","item","previousItemsRef","itemsHaveChanged","itemsEqual","normalizeDisabled","contextValue","defaultNewIndexGetter","defaultAnimateLayoutChanges","isSorting","wasDragging","newIndex","previousItems","previousContainerId","transitionProperty","disabledTransition","defaultAttributes","useSortable","animateLayoutChanges","userDefinedAttributes","localDisabled","customData","getNewIndex","localStrategy","globalDisabled","globalStrategy","_localDisabled$dragga","_localDisabled$droppa","normalizeLocalDisabled","sortable","itemsAfterCurrentSortable","setDroppableNodeRef","setDraggableNodeRef","refs","useCombinedRefs","displaceItem","shouldDisplaceDragSource","dragSourceDisplacement","shouldAnimateLayoutChanges","derivedTransform","setDerivedtransform","previousIndex","useDerivedTransform","getTransition","hasSortableData","directions","sortableKeyboardCoordinates","filteredContainers","corners","rectCorners","distances","corner","effectiveDistance","closestCorners","closestId","activeDroppable","newDroppable","newNode","hasDifferentScrollAncestors","hasSameContainer","isSameContainer","isAfterActive","isAfter","offset","rectCoordinates","injectDndContext","InternalDndContext","originalScrollingBehaviour","documentElement","usePrefersReducedMotion","prefersReducedMotion","setPrefersReducedMotion","mediaQuery","matchMedia","ConnectedDraggable","createAccouncements","getPosition","findIndex","getItemLabel","find","StyledOakBox","InternalDroppableHoldingPen","domContent","setContentBox","minHeight","setMinHeight","observer","currentHeight","borderBoxSize","blockSize","entries_1","TypeError","__values","entries_1_1","resetMinHeight","ConnectedDroppableHoldingPen","ConnectedDroppable","match","OakPrimaryButtonWithoutPointerEvents","OakPrimaryNavItem","href","isCurrent","shallow","Link","listItems","displayValue","defaultChecked","onBlur","hoverBorderRadius","checkboxSize","checkboxBorder","checkboxBorderRadius","defaultColor","checkedBackgroundFill","currentColor","cloudinaryId","endsWith","CldImage","flags","content","topNavSlot","bottomNavSlot","pickSectionColours","pageBackgroundColor","contentBackgroundColor","contentBorderColor","mobileContentBackgroundColor","progress","notStartedBackgroundColor","backgroundColor","pickSummaryForNotStarted","pickSummaryForComplete","completedBackgroundColor","iconBackgroundColor","lessonSectionNameToIconMap","backLinkSlot","counterSlot","heading","mobileSummary","pickSectionIcon","signLanguageControl","showTranscript","setShowTranscript","navItems","image","innerRef","isFeedback","defaultRef","inputRef","showTick","showCross","imageContainer","feedbackBgColor","feedbackBorderColor","inputCheckbox","click","counter","total","initialOptions","initialSlots","setMatches","draggables","droppables","setActiveId","matchedDraggableIds","unmatchedDraggables","newMatches","fromEntries","initialItems","setItems","activeItem","oldIndex","newItems","outlineColor","feedbackAltText","showFeedback","feedbackIcon","setValue","showPromoTag","ThemeProvider"],"mappings":"8QA+BWA,EAAW,WAQlB,OAPAA,EAAWC,OAAOC,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KAAIN,EAAEM,GAAKL,EAAEK,IAE9E,OAAON,CACV,EACMH,EAASa,MAAMC,KAAMP,UAChC,EAEO,SAASQ,EAAOX,EAAGY,GACtB,IAAIb,EAAI,CAAA,EACR,IAAK,IAAIM,KAAKL,EAAOH,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,IAAMO,EAAEC,QAAQR,GAAK,IAC9EN,EAAEM,GAAKL,EAAEK,IACb,GAAS,MAALL,GAAqD,mBAAjCH,OAAOiB,sBACtB,KAAIb,EAAI,EAAb,IAAgBI,EAAIR,OAAOiB,sBAAsBd,GAAIC,EAAII,EAAED,OAAQH,IAC3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TC,QAAS,UACTC,IAAK,UACLC,MAAO,UACPC,MAAO,UACPC,KAAM,UACNC,QAAS,UACTC,QAAS,UACTC,KAAM,UACNC,QAAS,UACTC,OAAQ,UACRC,KAAM,UACNC,YAAa,eAWFC,EAAuB,CAClCpC,MACE,wFACFyB,IAAK,2FACLxB,SACE,0FACFT,MACE,yFACFI,OACE,wFACFC,OACE,uFACF+B,KAAM,2FACNC,QACE,2FACFC,QACE,4FAKSO,EAAkB,CAC7B,eACA,eACA,aACA,gBACA,mBACA,kBACA,oBACA,oBACA,gBACA,eACA,eACA,aACA,aACA,sBACA,iBACA,uBACA,0BACA,mBACA,yBACA,4BACA,UACA,gBACA,sBACA,yBACA,8BACA,sBACA,yBACA,8BACA,sBACA,yBACA,8BACA,sBACA,yBACA,8BACA,sBACA,yBACA,8BACA,aACA,eACA,YACA,gBACA,gBACA,aACA,eACA,aACA,eACA,iBACA,kBACA,iBACA,eACA,iBACA,eACA,iBACA,qBACA,8BACA,qBACA,8BACA,qBACA,8BACA,qBACA,8BACA,qBACA,8BACA,qBACA,8BACA,eCzHF,SAASC,EAAWtD,GAClB,GAAIA,QAGJ,OAAIA,KAASO,EACJA,EAAeP,GAGpBqD,EAAgBE,SAASvD,GACpB,SAACwD,GAAE,IACFC,EADOD,EAAAE,MACGC,SAAS3D,GACzB,OAAOO,EAAekD,EACxB,OAJF,CAMF,CCxBM,SAAUG,EAAU5D,GACxB,QAASA,CACX,CCHA,gBAAM6D,EAAoB,CACxBC,MAAO,IACPC,MAAO,MAGIC,EAAc7F,OAAO8F,OAAOJ,GAAmBK,MAAK,SAACC,EAAGC,GACnE,OAAAD,EAAIC,EAAI,GAAK,CAAb,IAKWC,EAAgB,SAC3BC,GAEA,OAAOT,EAAkBS,EAC3B,EAoBaC,EACX,SACEC,EACAC,EACAC,GAMF,YANE,IAAAA,IAAAA,EAIgD,SAAAC,GAAM,OAAAA,IAExD,SAACC,GACC,IAAMC,EAAU,SAAC7E,GACf,YAAiB,IAAVA,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uB,SACvB,iBAAkB,QAClB,uBAAwB,SACxB,0BAA2B,SAC3B,mBAAoB,QACpB,yBAA0B,SAC1B,4BAA6B,SAC7B,UAAW,QACX,gBAAiB,SACjB,sBAAuB,OACvB,yBAA0B,SAC1B,8BAA+B,SAC/B,sBAAuB,OACvB,yBAA0B,SAC1B,8BAA+B,SAC/B,sBAAuB,WACvB,yBAA0B,aAC1B,8BAA+B,aAC/B,sBAAuB,OACvB,yBAA0B,SAC1B,8BAA+B,SAC/B,sBAAuB,QACvB,yBAA0B,UAC1B,8BAA+B,UAC/B,aAAc,SACd,eAAgB,QAChB,YAAa,QACb,gBAAiB,QACjB,gBAAiB,SACjB,aAAc,WACd,eAAgB,WAChB,aAAc,MACd,eAAgB,QAChB,iBAAkB,QAClB,kBAAmB,QACnB,iBAAkB,SAClB,eAAgB,WAChB,iBAAkB,WAClB,eAAgB,MAChB,iBAAkB,QAClB,qBAAsB,OACtB,8BAA+B,UAC/B,qBAAsB,OACtB,8BAA+B,UAC/B,qBAAsB,WACtB,8BAA+B,cAC/B,qBAAsB,OACtB,8BAA+B,UAC/B,qBAAsB,QACtB,8BAA+B,WAC/B,qBAAsB,UACtB,8BAA+B,QAC/BR,YAAa,4HjF3Da,CAC5B,MACA,KACA,KACA,KACA,KACA,KACA","x_google_ignoreList":[0,103,104,105,106]}
1
+ {"version":3,"file":"index.js","sources":["../../node_modules/tslib/tslib.es6.js","../../src/styles/theme/color.ts","../../src/styles/helpers/parseColor.ts","../../src/styles/helpers/truthy.ts","../../src/styles/utils/responsiveStyle.ts","../../src/styles/utils/colorStyle.ts","../../src/styles/helpers/pxToRem.ts","../../src/styles/theme/spacing.ts","../../src/styles/helpers/parseSpacing.ts","../../src/styles/utils/positionStyle.ts","../../src/styles/utils/sizeStyle.ts","../../src/styles/utils/spacingStyle.ts","../../src/styles/theme/borders.ts","../../src/styles/helpers/parseBorder.ts","../../src/styles/helpers/parseBorderRadius.ts","../../src/styles/utils/borderStyle.ts","../../src/styles/utils/displayStyle.ts","../../src/styles/theme/dropShadow.ts","../../src/styles/helpers/parseDropShadow.ts","../../src/styles/utils/dropShadowStyle.ts","../../src/styles/theme/opacity.ts","../../src/styles/utils/opacityStyle.ts","../../src/styles/helpers/parseOpacity.ts","../../src/styles/utils/transformStyle.ts","../../src/styles/theme/transitions.ts","../../src/styles/utils/transitionStyle.ts","../../src/styles/helpers/parseTransitions.ts","../../src/styles/theme/typography.ts","../../src/styles/utils/typographyStyle.ts","../../src/styles/helpers/parseTypography.ts","../../src/styles/theme/zIndex.ts","../../src/styles/utils/zIndexStyle.ts","../../src/styles/helpers/parseZIndex.ts","../../src/components/atoms/OakBox/OakBox.tsx","../../src/styles/utils/flexStyle.ts","../../src/components/atoms/OakFlex/OakFlex.tsx","../../src/components/atoms/OakSpan/OakSpan.tsx","../../src/components/atoms/OakForm/OakForm.tsx","../../src/styles/helpers/parseColorFilter.ts","../../src/styles/utils/colorFilterStyle.tsx","../../src/components/atoms/OakImage/OakImage.tsx","../../src/components/atoms/OakImage/useShowPlaceholder.ts","../../src/components/atoms/OakTypography/OakTypography.tsx","../../src/components/atoms/OakHeading/OakHeading.tsx","../../src/components/atoms/OakP/OakP.tsx","../../src/components/atoms/OakUL/OakUL.tsx","../../src/components/atoms/OakOL/OakOL.tsx","../../src/styles/utils/listStyle.ts","../../src/components/atoms/OakLI/OakLI.tsx","../../src/components/atoms/OakLabel/OakLabel.tsx","../../src/image-map.ts","../../src/components/atoms/OakIcon/OakIcon.tsx","../../src/components/atoms/OakGrid/OakGrid.tsx","../../src/components/atoms/OakGridArea/OakGridArea.tsx","../../src/components/atoms/OakMaxWidth/OakMaxWidth.tsx","../../src/components/atoms/OakCloudinaryImage/cloudinary.ts","../../src/components/atoms/OakCloudinaryImage/OakCloudinaryImage.tsx","../../src/components/atoms/OakKbd/OakKbd.tsx","../../src/styles/global/reset.styles.ts","../../src/styles/global/oak.styles.ts","../../src/components/atoms/OakGlobalStyle/OakGlobalStyle.tsx","../../src/components/atoms/OakScreenReader/OakScreenReader.tsx","../../src/components/molecules/OakLoadingSpinner/OakLoadingSpinner.tsx","../../src/components/atoms/InternalButton/InternalButton.tsx","../../src/components/molecules/InternalShadowRectButton/InternalShadowRectButton.tsx","../../src/components/molecules/OakPrimaryButton/OakPrimaryButton.tsx","../../src/components/molecules/OakPrimaryInvertedButton/OakPrimaryInvertedButton.tsx","../../src/components/molecules/InternalShadowRoundButton/InternalShadowRoundButton.tsx","../../src/components/molecules/OakTertiaryButton/OakTertiaryButton.tsx","../../src/components/molecules/OakRadioGroup/OakRadioGroup.tsx","../../src/components/molecules/OakRadioButton/OakRadioButton.tsx","../../src/components/atoms/InternalCheckBox/InternalCheckBox.tsx","../../src/components/atoms/InternalCheckBoxLabel/InternalCheckBoxLabel.tsx","../../src/components/atoms/InternalCheckBoxWrapper/InternalCheckBoxWrapper.tsx","../../src/components/atoms/InternalTextInput/InternalTextInput.tsx","../../src/components/molecules/OakTextInput/OakTextInput.tsx","../../src/components/molecules/OakRoundIcon/OakRoundIcon.tsx","../../src/components/atoms/InternalTooltip/InternalTooltip.tsx","../../src/components/molecules/OakTooltip/OakTooltip.tsx","../../src/components/molecules/OakBackLink/OakBackLink.tsx","../../src/components/atoms/InternalCard/InternalCard.tsx","../../src/components/atoms/InternalCardWithBackgroundElement/InternalCardWithBackgroundElement.tsx","../../src/styles/helpers/parseBorderWidth.ts","../../src/components/atoms/InternalStyledSvg/InternalStyledSvg.tsx","../../src/components/molecules/OakHandDrawnCard/OakHandDrawnCard.tsx","../../src/components/molecules/OakHandDrawnCardWithIcon/OakHandDrawnCardWithIcon.tsx","../../src/components/molecules/OakPromoTag/OakPromoTag.tsx","../../src/components/molecules/OakCollapsibleContent/OakCollapsibleContent.tsx","../../src/components/molecules/OakLink/OakLink.tsx","../../src/components/molecules/OakDragAndDropInstructions/OakDragAndDropInstructions.tsx","../../src/components/molecules/OakDraggable/OakDraggable.tsx","../../src/components/molecules/OakDroppable/OakDroppable.tsx","../../src/components/organisms/pupil/OakQuizCheckBox/OakQuizCheckBox.tsx","../../src/components/organisms/pupil/OakQuizRadioButton/OakQuizRadioButton.tsx","../../src/components/organisms/pupil/OakHintButton/OakHintButton.tsx","../../src/components/organisms/pupil/OakQuizHint/OakQuizHint.tsx","../../src/components/organisms/pupil/OakQuizFeedback/OakQuizFeedback.tsx","../../src/components/organisms/pupil/OakLessonBottomNav/OakLessonBottomNav.tsx","../../src/components/organisms/pupil/OakLessonTopNav/OakLessonTopNav.tsx","../../src/components/organisms/pupil/OakQuizCounter/OakQuizCounter.tsx","../../src/components/organisms/pupil/OakLessonLayout/OakLessonLayout.tsx","../../src/components/organisms/pupil/OakLessonNavItem/OakLessonNavItem.tsx","../../src/components/organisms/pupil/OakLessonReviewItem/OakPupilLessonReviewItem.tsx","../../node_modules/@dnd-kit/utilities/dist/utilities.esm.js","../../node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js","../../node_modules/@dnd-kit/core/dist/core.esm.js","../../node_modules/@dnd-kit/sortable/dist/sortable.esm.js","../../src/components/atoms/InternalDndContext/InternalDndContext.tsx","../../src/animation/usePrefersReducedMotion.ts","../../src/components/organisms/pupil/OakQuizOrder/OakQuizOrder.tsx","../../src/components/organisms/pupil/InternalDroppableHoldingPen/InternalDroppableHoldingPen.tsx","../../src/components/organisms/pupil/OakQuizMatch/OakQuizMatch.tsx","../../src/components/organisms/OakPrimaryNavItem/OakPrimaryNavItem.tsx","../../src/components/molecules/OakBulletList/OakBulletList.tsx","../../src/components/molecules/OakLessonInfoCard/OakLessonInfoCard.tsx","../../src/components/molecules/OakCheckBox/OakCheckBox.tsx","../../src/components/molecules/OakDraggableFeedback/OakDraggableFeedback.tsx","../../src/components/molecules/OakFieldError/OakFieldError.tsx","../../src/components/organisms/pupil/OakLessonVideoTranscript/OakLessonVideoTranscript.tsx","../../src/components/organisms/OakPrimaryNav/OakPrimaryNav.tsx","../../src/components/organisms/pupil/OakQuizTextInput/OakQuizTextInput.tsx","../../src/components/molecules/OakSecondaryButton/OakSecondaryButton.tsx","../../src/components/organisms/OakSubjectIcon/OakSubjectIcon.tsx","../../src/components/atoms/OakThemeProvider/OakThemeProvider.tsx","../../src/styles/theme/default.theme.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n function next() {\r\n while (env.stack.length) {\r\n var rec = env.stack.pop();\r\n try {\r\n var result = rec.dispose && rec.dispose.call(rec.value);\r\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","export const oakColorTokens = {\n white: \"#ffffff\",\n grey10: \"#f9f9f9\",\n grey20: \"#f2f2f2\",\n grey30: \"#e4e4e4\",\n grey40: \"#cacaca\",\n grey50: \"#808080\",\n grey60: \"#575757\",\n grey70: \"#2d2d2d\",\n black: \"#222222\",\n oakGreen: \"#287c34\",\n mint: \"#bef2bd\",\n mint30: \"#ebfbeb\",\n mint50: \"#dff9de\",\n mint110: \"#93e892\",\n aqua: \"#b0e2de\",\n aqua30: \"#e7f6f5\",\n aqua50: \"#cee7e5\",\n aqua110: \"#7cd8d0\",\n lavender: \"#a0b6f2\",\n lavender30: \"#e3e9fb\",\n lavender50: \"#c6d1ef\",\n lavender110: \"#7c9aec\",\n pink: \"#deb7d5\",\n pink30: \"#f5e9f2\",\n pink50: \"#e5d1e0\",\n pink110: \"#cf9cc3\",\n lemon: \"#ffe555\",\n lemon30: \"#fff7cc\",\n lemon50: \"#f6e8a0\",\n lemon110: \"#fbd60e\",\n amber: \"#ff934e\",\n amber30: \"#ffece0\",\n amber50: \"#ffc8a6\",\n red: \"#dd0035\",\n red30: \"#f8d8e0\",\n red50: \"#ee809a\",\n navy: \"#0d24c4\",\n navy110: \"#0a1d9d\",\n navy120: \"#081676\",\n blue: \"#374cf1\",\n magenta: \"#d02aa7\",\n purple: \"#845ad9\",\n teal: \"#037b7d\",\n transparent: \"transparent\",\n};\n\nexport type OakColorToken = keyof typeof oakColorTokens;\n\n/**\n *\n * Use this tool to convert Hex to color filter values https://codepen.io/sosuke/pen/Pjoqqp\n *\n */\n\nexport const oakColorFilterTokens = {\n black:\n \"invert(10%) sepia(1%) saturate(236%) hue-rotate(314deg) brightness(95%) contrast(91%)\",\n red: \"invert(13%) sepia(78%) saturate(5255%) hue-rotate(337deg) brightness(88%) contrast(111%)\",\n oakGreen:\n \"invert(37%) sepia(16%) saturate(1947%) hue-rotate(77deg) brightness(100%) contrast(88%)\",\n white:\n \"invert(98%) sepia(98%) saturate(0%) hue-rotate(328deg) brightness(102%) contrast(102%)\",\n grey40:\n \"invert(92%) sepia(0%) saturate(581%) hue-rotate(147deg) brightness(94%) contrast(80%)\",\n grey50:\n \"invert(54%) sepia(0%) saturate(38%) hue-rotate(176deg) brightness(92%) contrast(91%)\",\n navy: \"invert(21%) sepia(90%) saturate(3220%) hue-rotate(232deg) brightness(71%) contrast(127%)\",\n navy110:\n \"invert(16%) sepia(72%) saturate(7176%) hue-rotate(239deg) brightness(61%) contrast(109%)\",\n navy120:\n \"invert(12%) sepia(79%) saturate(3172%) hue-rotate(231deg) brightness(82%) contrast(114%)\",\n};\n\nexport type OakColorFilterToken = keyof typeof oakColorFilterTokens;\n\nexport const oakUiRoleTokens = [\n \"text-primary\",\n \"text-subdued\",\n \"text-error\",\n \"text-disabled\",\n \"text-link-active\",\n \"text-link-hover\",\n \"text-link-visited\",\n \"text-link-pressed\",\n \"text-inverted\",\n \"text-success\",\n \"text-warning\",\n \"bg-primary\",\n \"bg-neutral\",\n \"bg-neutral-stronger\",\n \"bg-btn-primary\",\n \"bg-btn-primary-hover\",\n \"bg-btn-primary-disabled\",\n \"bg-btn-secondary\",\n \"bg-btn-secondary-hover\",\n \"bg-btn-secondary-disabled\",\n \"bg-icon\",\n \"bg-icon-hover\",\n \"bg-decorative1-main\",\n \"bg-decorative1-subdued\",\n \"bg-decorative1-very-subdued\",\n \"bg-decorative2-main\",\n \"bg-decorative2-subdued\",\n \"bg-decorative2-very-subdued\",\n \"bg-decorative3-main\",\n \"bg-decorative3-subdued\",\n \"bg-decorative3-very-subdued\",\n \"bg-decorative4-main\",\n \"bg-decorative4-subdued\",\n \"bg-decorative4-very-subdued\",\n \"bg-decorative5-main\",\n \"bg-decorative5-subdued\",\n \"bg-decorative5-very-subdued\",\n \"bg-correct\",\n \"bg-incorrect\",\n \"icon-main\",\n \"icon-inverted\",\n \"icon-disabled\",\n \"icon-brand\",\n \"icon-success\",\n \"icon-error\",\n \"icon-warning\",\n \"border-primary\",\n \"border-inverted\",\n \"border-neutral\",\n \"border-brand\",\n \"border-success\",\n \"border-error\",\n \"border-warning\",\n \"border-decorative1\",\n \"border-decorative1-stronger\",\n \"border-decorative2\",\n \"border-decorative2-stronger\",\n \"border-decorative3\",\n \"border-decorative3-stronger\",\n \"border-decorative4\",\n \"border-decorative4-stronger\",\n \"border-decorative5\",\n \"border-decorative5-stronger\",\n \"border-decorative6\",\n \"border-decorative6-stronger\",\n \"transparent\",\n] as const;\n\nexport type OakUiRoleToken = (typeof oakUiRoleTokens)[number];\n\nexport type UiRoleMap = Record<\n OakUiRoleToken,\n OakColorToken | null | undefined\n>;\n\nexport type OakCombinedColorToken = OakColorToken | OakUiRoleToken;\n","import {\n OakColorToken,\n OakCombinedColorToken,\n OakUiRoleToken,\n oakColorTokens,\n oakUiRoleTokens,\n} from \"@/styles/theme/color\";\nimport { PropsWithTheme } from \"@/styles/theme/theme\";\n\n/**\n * - takes any of color token\n * - if an OakColor derives and returns the corresponding css value\n * - if an OakUiRole derives returns a function that takes the current theme and returns the corresponding css value\n */\nfunction parseColor(): undefined;\nfunction parseColor(\n value?: OakCombinedColorToken | null,\n): (props: PropsWithTheme) => string;\nfunction parseColor(\n value?: OakCombinedColorToken | null,\n): ((props: PropsWithTheme) => string) | undefined;\nfunction parseColor(value?: OakCombinedColorToken | null) {\n if (value === undefined || value === null) {\n return undefined;\n }\n if (value in oakColorTokens) {\n return oakColorTokens[value as OakColorToken];\n }\n\n if (oakUiRoleTokens.includes(value as OakUiRoleToken)) {\n return ({ theme }: PropsWithTheme) => {\n const c = theme.uiColors[value as OakUiRoleToken];\n return oakColorTokens[c as OakColorToken];\n };\n }\n}\n\nexport { parseColor };\n","// @see https://stackoverflow.com/questions/47632622/typescript-and-filter-boolean\n\nexport type Truthy<T> = T extends false | \"\" | 0 | null | undefined ? never : T; // from lodash\n\n/**\n *\n * @description truthy takes a value and returns true|false with the correct type\n * It's useful, for example, when filtering out null values from an array.\n * Typescript compiler needs a hint to realise there aren't any more null values.\n * [{ foo: \"bar\" }, null]<Record | null>[].filter(truthy) // [{ foo: \"bar\"}]<Record>[]\n */\nexport function truthy<T>(value: T): value is Truthy<T> {\n return !!value;\n}\n","import {\n css,\n DefaultTheme,\n Interpolation,\n ThemedStyledProps,\n} from \"styled-components\";\n\nimport { truthy } from \"@/styles/helpers/truthy\";\nimport { PropsWithTheme } from \"@/styles/theme/theme\";\n\nconst breakpointsByName = {\n small: 750,\n large: 1280,\n};\n\nexport const breakpoints = Object.values(breakpointsByName).sort((a, b) =>\n a > b ? 1 : -1,\n);\n\nexport type BreakpointName = keyof typeof breakpointsByName;\n\nexport const getBreakpoint = (\n breakpointName: keyof typeof breakpointsByName,\n) => {\n return breakpointsByName[breakpointName];\n};\n\nexport type Device = \"mobile\" | \"tablet\" | \"desktop\";\n\nconst mediaQueries: Record<Device, string> = {\n mobile: `(max-width: ${getBreakpoint(\"small\") - 1}px)`,\n tablet: `(min-width: ${getBreakpoint(\"small\")}px and max-width: ${\n getBreakpoint(\"large\") - 1\n }px)`,\n desktop: `(min-width: ${getBreakpoint(\"large\")}px)`,\n};\n\nexport const getMediaQuery = (device: Device) => {\n return mediaQueries[device];\n};\n\nexport type ResponsiveValues<Value> = (Value | null) | (Value | null)[];\n\ntype Generic = string | number | undefined | null;\n\nexport const responsiveStyle =\n <Props, T extends Generic>(\n attr: string,\n getValues: (props: Props) => ResponsiveValues<T | undefined | null>,\n parse:\n | ((unparsed: T | undefined | null) => Generic)\n | ((\n unparsed: T | undefined | null,\n ) => (props: PropsWithTheme) => Generic) = (x) => x,\n ) =>\n (props: Props): Interpolation<ThemedStyledProps<Props, DefaultTheme>> => {\n const attrCss = (value: T | undefined | null) =>\n typeof value === \"undefined\"\n ? undefined\n : css`\n ${attr}: ${parse(value)};\n `;\n const values = getValues(props);\n if (typeof values === \"undefined\") {\n return undefined;\n }\n if (!Array.isArray(values)) {\n return css`\n ${attrCss(values)}\n `;\n }\n if (values.length === 0) {\n return [];\n }\n\n return [\n css`\n ${attrCss(values[0])}\n `,\n ...breakpoints\n .slice(0, values.length)\n .map((breakpoint, i) => {\n const value = values[i + 1]; // Values are shifted relative to breakpoints\n\n if (value === undefined) {\n return undefined;\n }\n\n return css`\n @media (min-width: ${breakpoint}px) {\n ${css`\n ${attrCss(value)}\n `}\n }\n `;\n })\n .filter(truthy),\n ];\n };\n","import { css } from \"styled-components\";\n\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport { OakCombinedColorToken } from \"@/styles/theme/color\";\n\n/**\n * Color token!\n */\ntype ColorToken = ResponsiveValues<OakCombinedColorToken | null>;\n\nexport type ColorStyleProps = {\n /**\n * Sets the `color` of the element.\n *\n * Accepts a color token or a responsive array of color tokens.\n */\n $color?: ColorToken;\n /**\n * Sets the `background-color` of the element.\n *\n * Accepts a color token or a responsive array of color tokens.\n */\n $background?: ColorToken;\n};\nexport const colorStyle = css<ColorStyleProps>`\n ${responsiveStyle<ColorStyleProps, OakCombinedColorToken>(\n \"color\",\n (props) => props.$color,\n parseColor,\n )}\n ${responsiveStyle<ColorStyleProps, OakCombinedColorToken>(\n \"background\",\n (props) => props.$background,\n parseColor,\n )}\n`;\n","const BASE_FONT_SIZE_PX = 16;\nexport const REM_DP = 3;\n\nexport default function pxToRem(px: number): number {\n return Number((px / BASE_FONT_SIZE_PX).toFixed(REM_DP));\n}\n","export const oakAllSpacingTokens = {\n \"all-spacing-0\": 0,\n \"all-spacing-1\": 4,\n \"all-spacing-2\": 8,\n \"all-spacing-3\": 12,\n \"all-spacing-4\": 16,\n \"all-spacing-5\": 20,\n \"all-spacing-6\": 24,\n \"all-spacing-7\": 32,\n \"all-spacing-8\": 40,\n \"all-spacing-9\": 48,\n \"all-spacing-10\": 56,\n \"all-spacing-11\": 64,\n \"all-spacing-12\": 72,\n \"all-spacing-13\": 80,\n \"all-spacing-14\": 92,\n \"all-spacing-15\": 100,\n \"all-spacing-16\": 120,\n \"all-spacing-17\": 160,\n \"all-spacing-18\": 180,\n \"all-spacing-19\": 240,\n \"all-spacing-20\": 360,\n \"all-spacing-21\": 480,\n \"all-spacing-22\": 640,\n \"all-spacing-23\": 960,\n \"all-spacing-24\": 1280,\n};\n\nexport type OakAllSpacingToken = keyof typeof oakAllSpacingTokens;\n\nexport const oakInnerPaddingTokens = {\n \"inner-padding-none\": \"all-spacing-0\",\n \"inner-padding-ssx\": \"all-spacing-1\",\n \"inner-padding-xs\": \"all-spacing-2\",\n \"inner-padding-s\": \"all-spacing-3\",\n \"inner-padding-m\": \"all-spacing-4\",\n \"inner-padding-l\": \"all-spacing-5\",\n \"inner-padding-xl\": \"all-spacing-6\",\n};\n\nexport type OakInnerPaddingToken = keyof typeof oakInnerPaddingTokens;\n\nexport const oakSpaceBetweenTokens = {\n \"space-between-none\": \"all-spacing-0\",\n \"space-between-sssx\": \"all-spacing-1\",\n \"space-between-ssx\": \"all-spacing-2\",\n \"space-between-xs\": \"all-spacing-3\",\n \"space-between-s\": \"all-spacing-4\",\n \"space-between-m\": \"all-spacing-6\",\n \"space-between-m2\": \"all-spacing-7\",\n \"space-between-l\": \"all-spacing-9\",\n \"space-between-xl\": \"all-spacing-10\",\n \"space-between-xxl\": \"all-spacing-12\",\n \"space-between-xxxl\": \"all-spacing-13\",\n};\n\nexport type OakSpaceBetweenToken = keyof typeof oakSpaceBetweenTokens;\n\ntype AdditionalSpacingTypes =\n | \"100%\"\n | 0\n | \"100vh\"\n | \"100vw\"\n | \"auto\"\n | \"fit-content\"\n | \"max-content\"\n | \"min-content\"\n | \"inherit\"\n | \"initial\"\n | \"unset\";\n\nexport type OakCombinedSpacingToken =\n | OakAllSpacingToken\n | OakInnerPaddingToken\n | OakSpaceBetweenToken\n | AdditionalSpacingTypes;\n","import pxToRem from \"@/styles/helpers/pxToRem\";\nimport {\n OakAllSpacingToken,\n OakInnerPaddingToken,\n OakSpaceBetweenToken,\n OakCombinedSpacingToken,\n oakAllSpacingTokens,\n oakInnerPaddingTokens,\n oakSpaceBetweenTokens,\n} from \"@/styles/theme/spacing\";\n\n/**\n * - takes any of OakInnerPadding, OakSpaceBetween, OakAllSpacing, and other accepted values,\n * - derives and returns the corresponding css value\n * - converting to rem where necessary\n */\nexport function parseSpacing(value?: OakCombinedSpacingToken | null) {\n // if value is null or undefined, return undefined\n if (value === undefined || value === null) {\n return undefined;\n }\n\n // mapped values\n if (value in oakAllSpacingTokens) {\n return `${pxToRem(oakAllSpacingTokens[value as OakAllSpacingToken])}rem`; // NB. type assertion is necessary because the OakAllSpacing type is dervied from oakAllSpacingPx\n }\n\n if (value in oakInnerPaddingTokens) {\n const v = oakInnerPaddingTokens[value as OakInnerPaddingToken];\n return `${pxToRem(oakAllSpacingTokens[v as OakAllSpacingToken])}rem`;\n }\n\n if (value in oakSpaceBetweenTokens) {\n const v = oakSpaceBetweenTokens[value as OakSpaceBetweenToken];\n return `${pxToRem(oakAllSpacingTokens[v as OakAllSpacingToken])}rem`;\n }\n\n // value is a number, percentage or css value\n return value;\n}\n","import { CSSProperties } from \"react\";\nimport { css } from \"styled-components\";\n\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport {\n OakAllSpacingToken,\n OakSpaceBetweenToken,\n} from \"@/styles/theme/spacing\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\ntype PositionSpacing =\n | OakAllSpacingToken\n | OakSpaceBetweenToken\n | null\n | undefined;\n\nexport type PositionStyleProps = {\n /**\n * Sets the `position` CSS property of the element.\n *\n * Accepts a `position` value or a responsive array of `position` values. Can be nulled.\n */\n $position?: ResponsiveValues<CSSProperties[\"position\"]>;\n /**\n * Sets the `top` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $top?: ResponsiveValues<PositionSpacing>;\n /**\n * Sets the `right` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $right?: ResponsiveValues<PositionSpacing>;\n /**\n * Sets the `bottom` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $bottom?: ResponsiveValues<PositionSpacing>;\n /**\n * Sets the `left` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $left?: ResponsiveValues<PositionSpacing>;\n /**\n * Sets the `inset` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $inset?: ResponsiveValues<PositionSpacing>;\n /**\n * Sets the `overflow` CSS property of the element.\n *\n * Accepts an `overflow` value or a responsive array of `overflow` values.\n */\n $overflow?: ResponsiveValues<CSSProperties[\"overflow\"]>;\n /**\n * Sets the `overflow-x` CSS property of the element.\n *\n * Accepts an `overflow-x` value or a responsive array of `overflow-x` values.\n */\n $overflowX?: ResponsiveValues<CSSProperties[\"overflowX\"]>;\n /**\n * Sets the `overflow-y` CSS property of the element.\n *\n * Accepts an `overflow-y` value or a responsive array of `overflow-y` values.\n */\n $overflowY?: ResponsiveValues<CSSProperties[\"overflowY\"]>;\n /**\n * Sets the `object-fit` CSS property of the element.\n *\n * Accepts an `object-fit` value or a responsive array of `object-fit` values.\n */\n $objectFit?: ResponsiveValues<CSSProperties[\"objectFit\"]>;\n /**\n * Sets the `pointer-events` CSS property of the element.\n *\n * Accepts a `pointer-events` value or a responsive array of `pointer-events` values.\n */\n $pointerEvents?: ResponsiveValues<CSSProperties[\"pointerEvents\"]>;\n /**\n * Sets the `visibility` CSS property of the element.\n *\n * Accepts a `visibility` value or a responsive array of `visibility` values.\n */\n $visibility?: ResponsiveValues<CSSProperties[\"visibility\"]>;\n};\n\nexport const positionStyle = css<PositionStyleProps>`\n ${responsiveStyle(\"position\", (props) => props.$position)}\n ${responsiveStyle(\"top\", (props) => props.$top, parseSpacing)} \n ${responsiveStyle(\"right\", (props) => props.$right, parseSpacing)} \n ${responsiveStyle(\"bottom\", (props) => props.$bottom, parseSpacing)} \n ${responsiveStyle(\"left\", (props) => props.$left, parseSpacing)} \n ${responsiveStyle(\"inset\", (props) => props.$inset, parseSpacing)} \n ${responsiveStyle(\"overflow\", (props) => props.$overflow)}\n ${responsiveStyle(\"overflow-x\", (props) => props.$overflowX)}\n ${responsiveStyle(\"overflow-y\", (props) => props.$overflowY)}\n ${responsiveStyle(\"object-fit\", (props) => props.$objectFit)}\n ${responsiveStyle(\"pointer-events\", (props) => props.$pointerEvents)}\n ${responsiveStyle(\"visibility\", (props) => props.$visibility)}\n`;\n","import { css, CSSProperties } from \"styled-components\";\n\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport { OakCombinedSpacingToken } from \"@/styles/theme/spacing\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\ntype SizeValues = ResponsiveValues<OakCombinedSpacingToken | null | undefined>;\n\nexport type SizeStyleProps = {\n /**\n * Sets the `width` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $width?: SizeValues;\n /**\n * Sets the `min-width` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $minWidth?: SizeValues;\n /**\n * Sets the `max-width` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $maxWidth?: SizeValues;\n /**\n * Sets the `height` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $height?: SizeValues;\n /**\n * Sets the `min-height` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $minHeight?: SizeValues;\n /**\n * Sets the `max-height` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $maxHeight?: SizeValues;\n /**\n * Sets the `aspect-ratio` CSS property of the element.\n *\n * Accepts an `aspect-ratio` value or a responsive array of `aspect-ratio` values.\n */\n $aspectRatio?: ResponsiveValues<CSSProperties[\"aspectRatio\"]>;\n /**\n * Sets the `box-sizing` CSS property of the element.\n *\n * Accepts a `box-sizing` value or a responsive array of `box-sizing` values.\n */\n $boxSizing?: ResponsiveValues<CSSProperties[\"boxSizing\"]>;\n};\n\nexport const sizeStyle = css<SizeStyleProps>`\n ${responsiveStyle(\"width\", (props) => props.$width, parseSpacing)}\n ${responsiveStyle(\"min-width\", (props) => props.$minWidth, parseSpacing)}\n ${responsiveStyle(\"max-width\", (props) => props.$maxWidth, parseSpacing)}\n ${responsiveStyle(\"height\", (props) => props.$height, parseSpacing)}\n ${responsiveStyle(\"min-height\", (props) => props.$minHeight, parseSpacing)}\n ${responsiveStyle(\"max-height\", (props) => props.$maxHeight, parseSpacing)}\n ${responsiveStyle(\"aspect-ratio\", (props) => props.$aspectRatio)}\n ${responsiveStyle(\"box-sizing\", (props) => props.$boxSizing)}\n`;\n","import { css } from \"styled-components\";\n\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport {\n OakInnerPaddingToken,\n OakSpaceBetweenToken,\n} from \"@/styles/theme/spacing\";\n\ntype PaddingValues = ResponsiveValues<OakInnerPaddingToken | null | undefined>;\n\nexport type PaddingStyleProps = {\n /**\n * Applies `padding` to all sides of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $pa?: PaddingValues;\n /**\n * Applies `padding` to the left and right of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $ph?: PaddingValues;\n /**\n * Applies `padding` to the top and bottom of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $pv?: PaddingValues;\n /**\n * Applies `padding` to the left of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $pl?: PaddingValues;\n /**\n * Applies `padding` to the right of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $pr?: PaddingValues;\n /**\n * Applies `padding` to the top of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $pt?: PaddingValues;\n /**\n * Applies `padding` to the bottom of the element\n *\n * Accepts an inner padding token or a responsive array of inner padding tokens. Can be nulled.\n */\n $pb?: PaddingValues;\n};\n\ntype MarginValue = \"auto\" | OakSpaceBetweenToken | null | undefined;\ntype MarginValues = ResponsiveValues<MarginValue>;\n\nexport type MarginStyleProps = {\n /**\n * Applies `margin` to all sides of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $ma?: MarginValues;\n /**\n * Applies `margin` to the left and right of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $mh?: MarginValues;\n /**\n * Applies `margin` to the top and bottom of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $mv?: MarginValues;\n /**\n * Applies `margin` to the left of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $ml?: MarginValues;\n /**\n * Applies `margin` to the right of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $mr?: MarginValues;\n /**\n * Applies `margin` to the top of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $mt?: MarginValues;\n /**\n * Applies `margin` to the bottom of the element\n *\n * Accepts a space between token or a responsive array of space between tokens. Can be nulled.\n */\n $mb?: MarginValues;\n};\n\nconst paddingAll = css<{ $pa?: PaddingValues }>`\n ${responsiveStyle(\"padding\", (props) => props.$pa, parseSpacing)}\n`;\nconst paddingHorizontal = css<{ $ph?: PaddingValues }>`\n ${responsiveStyle(\"padding-left\", (props) => props.$ph, parseSpacing)}\n ${responsiveStyle(\"padding-right\", (props) => props.$ph, parseSpacing)}\n`;\nconst paddingVertical = css<{ $pv?: PaddingValues }>`\n ${responsiveStyle(\"padding-top\", (props) => props.$pv, parseSpacing)}\n ${responsiveStyle(\"padding-bottom\", (props) => props.$pv, parseSpacing)}\n`;\nconst paddingLeft = css<{ $pl?: PaddingValues }>`\n ${responsiveStyle(\"padding-left\", (props) => props.$pl, parseSpacing)}\n`;\nconst paddingRight = css<{ $pr?: PaddingValues }>`\n ${responsiveStyle(\"padding-right\", (props) => props.$pr, parseSpacing)}\n`;\nconst paddingTop = css<{ $pt?: PaddingValues }>`\n ${responsiveStyle(\"padding-top\", (props) => props.$pt, parseSpacing)}\n`;\nconst paddingBottom = css<{ $pb?: PaddingValues }>`\n ${responsiveStyle(\"padding-bottom\", (props) => props.$pb, parseSpacing)}\n`;\nconst marginAll = css<{ $ma?: MarginValues }>`\n ${responsiveStyle(\"margin\", (props) => props.$ma, parseSpacing)}\n`;\nconst marginHorizontal = css<{ $mh?: MarginValues }>`\n ${responsiveStyle(\"margin-left\", (props) => props.$mh, parseSpacing)}\n ${responsiveStyle(\"margin-right\", (props) => props.$mh, parseSpacing)}\n`;\nconst marginVertical = css<{ $mv?: MarginValues }>`\n ${responsiveStyle(\"margin-top\", (props) => props.$mv, parseSpacing)}\n ${responsiveStyle(\"margin-bottom\", (props) => props.$mv, parseSpacing)}\n`;\nconst marginLeft = css<{ $ml?: MarginValues }>`\n ${responsiveStyle(\"margin-left\", (props) => props.$ml, parseSpacing)}\n`;\nconst marginRight = css<{ $mr?: MarginValues }>`\n ${responsiveStyle(\"margin-right\", (props) => props.$mr, parseSpacing)}\n`;\nconst marginTop = css<{ $mt?: MarginValues }>`\n ${responsiveStyle(\"margin-top\", (props) => props.$mt, parseSpacing)}\n`;\nconst marginBottom = css<{ $mb?: MarginValues }>`\n ${responsiveStyle(\"margin-bottom\", (props) => props.$mb, parseSpacing)}\n`;\n\nexport const marginStyle = css<MarginStyleProps>`\n ${marginAll}\n ${marginHorizontal}\n ${marginVertical}\n ${marginLeft}\n ${marginRight}\n ${marginTop}\n ${marginBottom}\n`;\n\nexport const paddingStyle = css<PaddingStyleProps>`\n ${paddingAll}\n ${paddingHorizontal}\n ${paddingVertical}\n ${paddingLeft}\n ${paddingRight}\n ${paddingTop}\n ${paddingBottom}\n`;\n\nexport type SpacingStyleProps = PaddingStyleProps & MarginStyleProps;\nexport const spacingStyle = css<SpacingStyleProps>`\n ${paddingStyle}\n ${marginStyle}\n`;\n","export const oakBorderWidthTokens = {\n \"border-solid-none\": 0,\n \"border-solid-s\": 1,\n \"border-solid-m\": 2,\n \"border-solid-l\": 3,\n \"border-solid-xl\": 4,\n};\n\nexport const oakBorderRadiusTokens = {\n \"border-radius-square\": 0,\n \"border-radius-xs\": 2,\n \"border-radius-s\": 4,\n \"border-radius-m\": 6,\n \"border-radius-m2\": 8,\n \"border-radius-l\": 16,\n \"border-radius-xl\": 24,\n \"border-radius-circle\": 100,\n};\n\nexport type OakBorderRadiusToken = keyof typeof oakBorderRadiusTokens;\nexport type OakBorderWidthToken = keyof typeof oakBorderWidthTokens;\n","import {\n OakBorderWidthToken,\n oakBorderWidthTokens,\n} from \"@/styles/theme/borders\";\nimport pxToRem from \"@/styles/helpers/pxToRem\";\n\nexport const parseBorder = (value?: OakBorderWidthToken | null) => {\n if (value === undefined || value === null) {\n return undefined;\n }\n if (value in oakBorderWidthTokens) {\n return `${pxToRem(\n oakBorderWidthTokens[value as OakBorderWidthToken],\n )}rem solid`;\n }\n};\n","import pxToRem from \"./pxToRem\";\n\nimport {\n OakBorderRadiusToken,\n oakBorderRadiusTokens,\n} from \"@/styles/theme/borders\";\n\nexport const parseBorderRadius = (value?: OakBorderRadiusToken | null) => {\n if (value === undefined || value === null) {\n return undefined;\n }\n if (value in oakBorderRadiusTokens) {\n return `${pxToRem(\n oakBorderRadiusTokens[value as OakBorderRadiusToken],\n )}rem`;\n }\n};\n","import { CSSProperties, css } from \"styled-components\";\n\nimport {\n OakBorderRadiusToken,\n OakBorderWidthToken,\n} from \"@/styles/theme/borders\";\nimport { OakCombinedColorToken } from \"@/styles/theme/color\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseBorder } from \"@/styles/helpers/parseBorder\";\nimport { parseBorderRadius } from \"@/styles/helpers/parseBorderRadius\";\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\ntype BorderWidth = ResponsiveValues<OakBorderWidthToken>;\ntype _BorderStyleProps = ResponsiveValues<CSSProperties[\"borderStyle\"]>;\ntype BorderColorProps = ResponsiveValues<OakCombinedColorToken>;\ntype BorderRadiusProps = ResponsiveValues<OakBorderRadiusToken>;\n\nexport type BorderStyleProps = {\n /**\n * Apply border on all sides\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $ba?: BorderWidth;\n /**\n * Apply border to the top\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $bt?: BorderWidth;\n /**\n * Apply border to the right\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $br?: BorderWidth;\n /**\n * Apply border to the bottom\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $bb?: BorderWidth;\n /**\n * Apply border to the left\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $bl?: BorderWidth;\n /**\n * Apply border to the left and right\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $bh?: BorderWidth;\n /**\n * Apply border to the top and bottom\n *\n * Accepts a border-width token or a responsive array of border-width tokens\n */\n $bv?: BorderWidth;\n /**\n * Apply `border-style` to the element\n *\n * Accepts a single value or a responsive array of values.\n */\n $borderStyle?: _BorderStyleProps;\n /**\n * Apply a border color to all sides of the element\n *\n * Accepts a color token or a responsive array of color tokens.\n */\n $borderColor?: BorderColorProps;\n $borderRadius?: BorderRadiusProps;\n /**\n * Apply border radius to the top left\n *\n * Accepts an `OakBorderRadiusToken` or a responsive array of `OakBorderRadiusToken`s.\n */\n $btlr?: BorderRadiusProps;\n /**\n * Apply border radius to the top right\n *\n * Accepts a border-radius token or a responsive array of border-radius tokens.\n */\n $btrr?: BorderRadiusProps;\n /**\n * Apply border radius to the bottom left\n *\n * Accepts a border-radius token or a responsive array of border-radius tokens.\n */\n $bblr?: BorderRadiusProps;\n /**\n * Apply border radius to the bottom right\n *\n * Accepts a border-radius token or a responsive array of border-radius tokens.\n */\n $bbrr?: BorderRadiusProps;\n /**\n * Apply border radius to the top right and top left\n *\n * Accepts a border-radius token or a responsive array of border-radius tokens.\n */\n $btr?: BorderRadiusProps;\n /**\n * Apply border radius to the bottom right and bottom left\n *\n * Accepts a border-radius token or a responsive array of border-radius tokens\n */\n $bbr?: BorderRadiusProps;\n};\n\nconst borderAll = css<{ $ba?: BorderWidth }>`\n ${responsiveStyle(\"border\", (props) => props.$ba, parseBorder)}\n`;\nconst borderTop = css<{ $bt?: BorderWidth }>`\n ${responsiveStyle(\"border-top\", (props) => props.$bt, parseBorder)}\n`;\nconst borderRight = css<{ $br?: BorderWidth }>`\n ${responsiveStyle(\"border-right\", (props) => props.$br, parseBorder)}\n`;\nconst borderBottom = css<{ $bb?: BorderWidth }>`\n ${responsiveStyle(\"border-bottom\", (props) => props.$bb, parseBorder)}\n`;\nconst borderLeft = css<{ $bl?: BorderWidth }>`\n ${responsiveStyle(\"border-left\", (props) => props.$bl, parseBorder)}\n`;\nconst borderHorizontal = css<{ $bh?: BorderWidth }>`\n ${responsiveStyle(\"border-left\", (props) => props.$bh, parseBorder)}\n ${responsiveStyle(\"border-right\", (props) => props.$bh, parseBorder)}\n`;\nconst borderVertical = css<{ $bv?: BorderWidth }>`\n ${responsiveStyle(\"border-top\", (props) => props.$bv, parseBorder)}\n ${responsiveStyle(\"border-bottom\", (props) => props.$bv, parseBorder)}\n`;\nconst borderColor = css<{ $borderColor?: BorderColorProps }>`\n ${responsiveStyle(\"border-color\", (props) => props.$borderColor, parseColor)}\n`;\nconst borderRadius = css<{ $borderRadius?: BorderRadiusProps }>`\n ${responsiveStyle(\n \"border-radius\",\n (props) => props.$borderRadius,\n parseBorderRadius,\n )}\n`;\nconst borderRadiusTopLeft = css<BorderStyleProps>`\n ${responsiveStyle(\n \"border-top-left-radius\",\n (props) => props.$btlr,\n parseBorderRadius,\n )}\n`;\nconst borderRadiusTopRight = css<BorderStyleProps>`\n ${responsiveStyle(\n \"border-top-right-radius\",\n (props) => props.$btrr,\n parseBorderRadius,\n )}\n`;\nconst borderRadiusBottomLeft = css<BorderStyleProps>`\n ${responsiveStyle(\n \"border-bottom-left-radius\",\n (props) => props.$bblr,\n parseBorderRadius,\n )}\n`;\nconst borderRadiusBottomRight = css<BorderStyleProps>`\n ${responsiveStyle(\n \"border-bottom-right-radius\",\n (props) => props.$bbrr,\n parseBorderRadius,\n )}\n`;\nconst borderRadiusTop = css<BorderStyleProps>`\n ${responsiveStyle(\n \"border-top-left-radius\",\n (props) => props.$btr,\n parseBorderRadius,\n )}\n ${responsiveStyle(\n \"border-top-right-radius\",\n (props) => props.$btr,\n parseBorderRadius,\n )}\n`;\nconst borderRadiusBottom = css<BorderStyleProps>`\n ${responsiveStyle(\n \"border-bottom-left-radius\",\n (props) => props.$bbr,\n parseBorderRadius,\n )}\n ${responsiveStyle(\n \"border-bottom-right-radius\",\n (props) => props.$bbr,\n parseBorderRadius,\n )}\n`;\nconst borderStrokeStyle = css<BorderStyleProps>`\n ${responsiveStyle(\"border-style\", (props) => props.$borderStyle)};\n`;\nexport const borderStyle = css<BorderStyleProps>`\n ${borderAll}\n ${borderTop}\n ${borderRight}\n ${borderBottom}\n ${borderLeft}\n ${borderHorizontal}\n ${borderVertical}\n ${borderColor}\n ${borderRadius}\n ${borderRadiusTopLeft}\n ${borderRadiusTopRight}\n ${borderRadiusBottomLeft}\n ${borderRadiusBottomRight}\n ${borderRadiusTop}\n ${borderRadiusBottom}\n ${borderStrokeStyle}\n`;\n","import { CSSProperties } from \"react\";\nimport { css } from \"styled-components\";\n\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\nexport type DisplayStyleProps = {\n /**\n * Sets the `display` CSS property of the element.\n *\n * Accepts a `display` value or a responsive array of `display` values.\n */\n $display?: ResponsiveValues<CSSProperties[\"display\"]>;\n};\n\nexport const displayStyle = css<DisplayStyleProps>`\n ${responsiveStyle(\"display\", (props) => props.$display)}\n`;\n","export const oakDropShadowTokens = {\n \"drop-shadow-standard\": \"0 0.5rem 0.5rem rgba(92, 92, 92, 20%)\",\n \"drop-shadow-lemon\": `0.125rem 0.125rem 0 rgba(255, 229, 85, 100%)`,\n \"drop-shadow-wide-lemon\": `0.25rem 0.25rem 0 rgba(255, 229, 85, 100%)`,\n \"drop-shadow-centered-lemon\": `0 0 0 0.125rem rgba(255, 229, 85, 100%)`,\n \"drop-shadow-grey\": \"0.25rem 0.25rem 0 rgba(87, 87, 87, 100%)\",\n \"drop-shadow-centered-grey\": \"0 0 0 0.3rem rgba(87, 87, 87, 100%)\",\n};\n\nexport type OakDropShadowToken = keyof typeof oakDropShadowTokens;\n","import {\n OakDropShadowToken,\n oakDropShadowTokens,\n} from \"@/styles/theme/dropShadow\";\n\nexport const parseDropShadow = (variant?: OakDropShadowToken | null) => {\n if (variant === null) {\n return \"none\";\n }\n\n if (!variant) {\n return;\n }\n\n if (variant in oakDropShadowTokens) {\n return oakDropShadowTokens[variant as OakDropShadowToken];\n }\n};\n","import { css } from \"styled-components\";\n\nimport { OakDropShadowToken } from \"@/styles/theme/dropShadow\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\nexport type DropShadowStyleProps = {\n /**\n * Applies a drop-shadow to the element.\n *\n * Accepts a drop-shadow token or a responsive array of drop-shadow tokens.\n */\n $dropShadow?: ResponsiveValues<OakDropShadowToken>;\n};\n\nexport const dropShadowStyle = css<DropShadowStyleProps>`\n ${responsiveStyle(\n \"box-shadow\",\n (props) => props.$dropShadow,\n parseDropShadow,\n )}\n`;\n","export const oakOpacityTokens = {\n transparent: 0,\n \"semi-transparent\": 0.25,\n \"semi-opaque\": 0.5,\n opaque: 1,\n};\n\nexport type OakOpacityToken = keyof typeof oakOpacityTokens;\n","import { css } from \"styled-components\";\n\nimport { OakOpacityToken } from \"@/styles/theme/opacity\";\nimport { parseOpacity } from \"@/styles/helpers/parseOpacity\";\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\nexport type OpacityStyleProps = {\n /**\n * Sets the `opacity` CSS property of the element.\n *\n * Accepts an opacity token or a responsive array of opacity tokens.\n */\n $opacity?: ResponsiveValues<OakOpacityToken>;\n};\n\nexport const opacityStyle = css<OpacityStyleProps>`\n ${responsiveStyle(\"opacity\", (props) => props.$opacity, parseOpacity)}\n`;\n","import { OakOpacityToken, oakOpacityTokens } from \"@/styles/theme/opacity\";\n\nexport const parseOpacity = (variant?: OakOpacityToken | null) => {\n if (!variant) {\n return;\n }\n\n if (variant in oakOpacityTokens) {\n return oakOpacityTokens[variant as OakOpacityToken];\n }\n};\n","import { CSSProperties, css } from \"styled-components\";\n\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\nexport type TransformStyleProps = {\n /**\n * Sets the `transform` CSS property of the element.\n *\n * Accepts a `transform` value or a responsive array of `transform` values. Can be nulled.\n */\n $transform?: ResponsiveValues<CSSProperties[\"transform\"] | null>;\n /**\n * Sets the `transform-origin` CSS property of the element.\n *\n * Accepts a `transform-origin` value or a responsive array of `transform-origin` values. Can be nulled.\n */\n $transformOrigin?: ResponsiveValues<CSSProperties[\"transformOrigin\"] | null>;\n};\n\nexport const transformStyle = css<TransformStyleProps>`\n ${responsiveStyle(\"transform\", (props) => props.$transform)}\n ${responsiveStyle(\"transform-origin\", (props) => props.$transformOrigin)}\n`;\n","export const oakTransitionTokens = {\n \"standard-ease\": \"all 0.3s ease\",\n \"standard-transform\": \"rotate(-2deg) translateY(-16px) translateX(8px)\",\n};\n\nexport type OakTransitionToken = keyof typeof oakTransitionTokens;\n","import { css } from \"styled-components\";\n\nimport { OakTransitionToken } from \"@/styles/theme/transitions\";\nimport { parseTransitions } from \"@/styles/helpers/parseTransitions\";\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\ntype Transition = OakTransitionToken;\n\nexport type TransitionStyleProps = {\n /**\n * Sets the `transition` CSS property of the element.\n *\n * Accepts a transition token or a responsive array of transition tokens.\n */\n $transition?: ResponsiveValues<Transition>;\n};\n\nexport const transitionStyle = css<TransitionStyleProps>`\n ${responsiveStyle(\n \"transition\",\n (props) => props.$transition,\n parseTransitions,\n )}\n`;\n","import {\n OakTransitionToken,\n oakTransitionTokens,\n} from \"@/styles/theme/transitions\";\n\nexport const parseTransitions = (variant?: OakTransitionToken | null) => {\n if (!variant) {\n return;\n }\n\n if (variant in oakTransitionTokens) {\n return oakTransitionTokens[variant as OakTransitionToken];\n }\n};\n","export const oakFontSizeTokens = {\n \"font-size-1\": 12,\n \"font-size-2\": 14,\n \"font-size-3\": 16,\n \"font-size-4\": 18,\n \"font-size-5\": 20,\n \"font-size-6\": 24,\n \"font-size-7\": 32,\n \"font-size-8\": 40,\n \"font-size-9\": 48,\n \"font-size-10\": 56,\n};\nexport type OakFontSizeToken = keyof typeof oakFontSizeTokens;\n\nconst fontWeights = [300, 400, 600, 700] as const;\ntype FontWeight = (typeof fontWeights)[number];\nconst lineHeights = [16, 20, 24, 28, 32, 40, 48, 56, 64] as const;\ntype LineHeight = (typeof lineHeights)[number];\nconst letterSpacings = [\"0.0115rem\", \"-0.005rem\"] as const;\ntype LetterSpacing = (typeof letterSpacings)[number];\n\ntype FontParameters = readonly [\n OakFontSizeToken,\n LineHeight,\n FontWeight,\n LetterSpacing,\n];\n\nexport const oakFontTokens = {\n \"heading-1\": [\"font-size-10\", 64, 600, \"0.0115rem\"],\n \"heading-2\": [\"font-size-9\", 56, 600, \"0.0115rem\"],\n \"heading-3\": [\"font-size-8\", 48, 600, \"0.0115rem\"],\n \"heading-4\": [\"font-size-7\", 40, 600, \"0.0115rem\"],\n \"heading-5\": [\"font-size-6\", 32, 600, \"0.0115rem\"],\n \"heading-6\": [\"font-size-5\", 24, 600, \"0.0115rem\"],\n \"heading-7\": [\"font-size-3\", 20, 600, \"0.0115rem\"],\n \"heading-light-1\": [\"font-size-10\", 64, 400, \"0.0115rem\"],\n \"heading-light-2\": [\"font-size-9\", 56, 400, \"0.0115rem\"],\n \"heading-light-3\": [\"font-size-8\", 48, 400, \"0.0115rem\"],\n \"heading-light-4\": [\"font-size-7\", 40, 400, \"0.0115rem\"],\n \"heading-light-5\": [\"font-size-6\", 32, 400, \"0.0115rem\"],\n \"heading-light-6\": [\"font-size-5\", 24, 400, \"0.0115rem\"],\n \"heading-light-7\": [\"font-size-3\", 20, 400, \"0.0115rem\"],\n \"body-1\": [\"font-size-4\", 28, 300, \"-0.005rem\"],\n \"body-2\": [\"font-size-3\", 24, 300, \"-0.005rem\"],\n \"body-3\": [\"font-size-2\", 20, 300, \"-0.005rem\"],\n \"body-4\": [\"font-size-1\", 16, 300, \"-0.005rem\"],\n \"body-1-bold\": [\"font-size-4\", 28, 700, \"-0.005rem\"],\n \"body-2-bold\": [\"font-size-3\", 24, 700, \"-0.005rem\"],\n \"body-3-bold\": [\"font-size-2\", 20, 700, \"-0.005rem\"],\n \"list-item-1\": [\"font-size-4\", 32, 300, \"-0.005rem\"],\n \"list-item-2\": [\"font-size-3\", 24, 300, \"-0.005rem\"],\n} satisfies Record<string, FontParameters>;\n\nexport type OakFontToken = keyof typeof oakFontTokens;\n\nexport const oakTextDecorations = [\n \"underline\",\n \"overline\",\n \"line-through\",\n \"none\",\n] as const;\n\nexport const oakWhiteSpaces = [\n \"normal\",\n \"nowrap\",\n \"pre\",\n \"pre-wrap\",\n \"pre-line\",\n \"break-spaces\",\n] as const;\n\nexport const oakWordWraps = [\n \"normal\",\n \"break-word\",\n \"initial\",\n \"inherit\",\n] as const;\n\nexport const oakTextOverflows = [\"clip\", \"ellipsis\"] as const;\n\nexport type OakTextDecoration = (typeof oakTextDecorations)[number];\nexport type OakWhiteSpace = (typeof oakWhiteSpaces)[number];\nexport type OakWordWrap = (typeof oakWordWraps)[number];\nexport type OakTextOverflow = (typeof oakTextOverflows)[number];\n","import { CSSProperties, css } from \"styled-components\";\n\nimport {\n OakFontToken,\n OakTextDecoration,\n OakTextOverflow,\n OakWhiteSpace,\n OakWordWrap,\n} from \"@/styles/theme/typography\";\nimport {\n parseFontSize,\n parseFontWeight,\n parseLetterSpacing,\n parseLineHeight,\n} from \"@/styles/helpers/parseTypography\";\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\nexport type TypographyStyleProps = {\n /**\n * Sets the `font-size`, `line-height`, `font-weight` and `letter-spacing` of the element.\n *\n * Accepts a font token or a responsive array of font tokens.\n */\n $font?: ResponsiveValues<OakFontToken>;\n /**\n * Sets the `text-decoration` CSS property of the element.\n *\n * Accepts a text-decoration token or a responsive array of text-decoration tokens.\n */\n $textDecoration?: ResponsiveValues<OakTextDecoration>;\n /**\n * Sets the `text-align` CSS property of the element.\n *\n * Accepts a `text-align` value or a responsive array of `text-align` values.\n */\n $textAlign?: ResponsiveValues<CSSProperties[\"textAlign\"]>;\n /**\n * Sets the `white-space` CSS property of the element.\n *\n * Accepts a white-space token or a responsive array of white-space tokens.\n */\n $whiteSpace?: ResponsiveValues<OakWhiteSpace>;\n /**\n * Sets the `word-wrap` CSS property of the element.\n *\n * Accepts a word-wrap token or a responsive array of word-wrap tokens.\n */\n $wordWrap?: ResponsiveValues<OakWordWrap>;\n /**\n * Sets the `text-overflow` CSS property of the element.\n *\n * Accepts a text-overflow token or a responsive array of text-overflow tokens.\n */\n $textOverflow?: ResponsiveValues<OakTextOverflow>;\n};\n\nexport const typographyStyle = css<TypographyStyleProps>`\n font-family: Lexend, sans-serif;\n ${responsiveStyle(\"font-weight\", (props) => props.$font, parseFontWeight)}\n ${responsiveStyle(\"font-size\", (props) => props.$font, parseFontSize)}\n ${responsiveStyle(\"line-height\", (props) => props.$font, parseLineHeight)}\n ${responsiveStyle(\n \"letter-spacing\",\n (props) => props.$font,\n parseLetterSpacing,\n )}\n ${responsiveStyle(\"text-align\", (props) => props.$textAlign)}\n ${responsiveStyle(\"text-decoration\", (props) => props.$textDecoration)}\n ${responsiveStyle(\"white-space\", (props) => props.$whiteSpace)}\n ${responsiveStyle(\"word-wrap\", (props) => props.$wordWrap)}\n ${responsiveStyle(\"text-overflow\", (props) => props.$textOverflow)}\n`;\n","import {\n OakFontToken,\n oakFontSizeTokens,\n oakFontTokens,\n} from \"@/styles/theme/typography\";\nimport pxToRem from \"@/styles/helpers/pxToRem\";\n\nexport const parseFontWeight = (font?: OakFontToken | null) => {\n if (!font) return;\n return oakFontTokens[font]?.[2];\n};\n\nexport const parseFontSize = (\n font?: OakFontToken | null,\n): string | null | undefined => {\n if (!font) return;\n const fontSize = oakFontTokens[font]?.[0];\n if (!fontSize) return;\n const fontSizePx = oakFontSizeTokens[fontSize];\n return `${pxToRem(fontSizePx)}rem`;\n};\nexport const parseLineHeight = (\n font?: OakFontToken | null,\n): string | null | undefined => {\n if (!font) return;\n const lineHeight = oakFontTokens[font]?.[1];\n if (!lineHeight) return;\n return `${pxToRem(lineHeight)}rem`;\n};\nexport const parseLetterSpacing = (font?: OakFontToken | null) => {\n if (!font) return;\n return oakFontTokens[font]?.[3];\n};\n","export const oakZIndexTokens = {\n behind: -1,\n neutral: 0,\n \"in-front\": 1,\n \"mobile-filters\": 2,\n \"fixed-header\": 100,\n \"modal-close-button\": 150,\n \"modal-dialog\": 300,\n} as const;\n\nexport type OakZIndexToken = keyof typeof oakZIndexTokens | null;\n","import { css } from \"styled-components\";\n\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\nimport { OakZIndexToken } from \"@/styles/theme/zIndex\";\nimport { parseZIndex } from \"@/styles/helpers/parseZIndex\";\n\nexport type ZIndexStyleProps = {\n /**\n * Sets the `z-index` CSS property of the element.\n *\n * Accepts a z-index token or a responsive array of z-index tokens.\n */\n $zIndex?: ResponsiveValues<OakZIndexToken>;\n};\n\nexport const zIndexStyle = css<ZIndexStyleProps>`\n ${responsiveStyle(\"z-index\", (props) => props.$zIndex, parseZIndex)}\n`;\n","import { OakZIndexToken, oakZIndexTokens } from \"@/styles/theme/zIndex\";\n\nexport const parseZIndex = (value?: OakZIndexToken) => {\n if (value === undefined || value === null) {\n return undefined;\n }\n return oakZIndexTokens[value];\n};\n","import { MouseEventHandler } from \"react\";\nimport styled, { css } from \"styled-components\";\n\n/**\n * OakBox exposes all the styles that are available styles on a div element.\n */\n\nimport { colorStyle, ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport {\n positionStyle,\n PositionStyleProps,\n} from \"@/styles/utils/positionStyle\";\nimport { sizeStyle, SizeStyleProps } from \"@/styles/utils/sizeStyle\";\nimport { spacingStyle, SpacingStyleProps } from \"@/styles/utils/spacingStyle\";\nimport { borderStyle, BorderStyleProps } from \"@/styles/utils/borderStyle\";\nimport { displayStyle, DisplayStyleProps } from \"@/styles/utils/displayStyle\";\nimport {\n dropShadowStyle,\n DropShadowStyleProps,\n} from \"@/styles/utils/dropShadowStyle\";\nimport { opacityStyle, OpacityStyleProps } from \"@/styles/utils/opacityStyle\";\nimport {\n transformStyle,\n TransformStyleProps,\n} from \"@/styles/utils/transformStyle\";\nimport {\n transitionStyle,\n TransitionStyleProps,\n} from \"@/styles/utils/transitionStyle\";\nimport {\n typographyStyle,\n TypographyStyleProps,\n} from \"@/styles/utils/typographyStyle\";\nimport { zIndexStyle, ZIndexStyleProps } from \"@/styles/utils/zIndexStyle\";\n\n// TODO: these are not yet implemented\n// import cover, { CoverProps } from \"@/styles/utils/coverStyle\";\n// import customScrollbar from \"@/styles/utils/customScrollbarStyle\";\n\ntype HTMLProps = {\n onClick?: MouseEventHandler;\n};\n\nexport type OakBoxProps = {\n children?: React.ReactNode;\n} & PositionStyleProps &\n SizeStyleProps &\n SpacingStyleProps &\n ColorStyleProps &\n BorderStyleProps &\n DisplayStyleProps &\n DropShadowStyleProps &\n OpacityStyleProps &\n TransformStyleProps &\n TransitionStyleProps &\n TypographyStyleProps &\n ZIndexStyleProps &\n HTMLProps;\n\nexport const oakBoxCss = css<OakBoxProps>`\n ${positionStyle}\n ${sizeStyle}\n ${spacingStyle}\n ${colorStyle}\n ${borderStyle}\n ${displayStyle}\n ${dropShadowStyle}\n ${opacityStyle}\n ${transformStyle}\n ${transitionStyle}\n ${typographyStyle}\n ${zIndexStyle}\n ${(props) =>\n /* onClick might be passed in the useClickableCard pattern */\n props.onClick &&\n css`\n :hover {\n cursor: pointer;\n }\n `}\n`;\n\n/**\n * OakBox exposes all the styles that are available styles on a div tag. These include:\n * - color\n * - size\n * - display\n * - spacing\n * - position\n * - border\n * - opacity\n * - z-index\n * - typography\n * - transition\n * - transform\n * - drop-shadow\n *\n */\nexport const OakBox = styled.div<OakBoxProps>`\n ${oakBoxCss}\n`;\n","import { CSSProperties } from \"react\";\nimport { css } from \"styled-components\";\n\nimport type { DisplayStyleProps } from \"./displayStyle\";\n\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport {\n OakAllSpacingToken,\n OakCombinedSpacingToken,\n OakSpaceBetweenToken,\n} from \"@/styles/theme/spacing\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\nexport type FlexStyleProps = DisplayStyleProps & {\n /**\n * Sets the `flex-direction` CSS property of the element.\n *\n * Accepts a `flex-direction` value or a responsive array of flex-direction values.\n */\n $flexDirection?: ResponsiveValues<CSSProperties[\"flexDirection\"]>;\n /**\n * Sets the `flex-wrap` CSS property of the element.\n *\n * Accepts a `flex-wrap` value or a responsive array of flex-wrap values.\n */\n $flexWrap?: ResponsiveValues<CSSProperties[\"flexWrap\"]>;\n /**\n * Sets the `align-items` CSS property of the element.\n *\n * Accepts an `align-items` value or a responsive array of `align-items` values.\n */\n $alignItems?: ResponsiveValues<CSSProperties[\"alignItems\"]>;\n /**\n * Sets the `align-content` CSS property of the element.\n *\n * Accepts an `align-content` value or a responsive array of `align-content` values.\n */\n $alignContent?: ResponsiveValues<CSSProperties[\"alignContent\"]>;\n /**\n * Sets the `justify-content` CSS property of the element.\n *\n * Accepts a `justify-content` value or a responsive array of `justify-content` values.\n */\n $justifyContent?: ResponsiveValues<CSSProperties[\"justifyContent\"]>;\n /**\n * Sets the `align-self` CSS property of the element.\n *\n * Accepts an `align-self` value or a responsive array of `align-self` values.\n */\n $alignSelf?: ResponsiveValues<CSSProperties[\"alignSelf\"]>;\n /**\n * Sets the `flex-grow` CSS property of the element.\n *\n * Accepts a `flex-grow` value or a responsive array of `flex-grow` values.\n */\n $flexGrow?: ResponsiveValues<CSSProperties[\"flexGrow\"]>;\n /**\n * Sets the `flex-shrink` CSS property of the element.\n *\n * Accepts a `flex-shrink` value or a responsive array of `flex-shrink` values.\n */\n $flexShrink?: ResponsiveValues<CSSProperties[\"flexShrink\"]>;\n /**\n * Sets the `order` CSS property of the element.\n *\n * Accepts an `order` value or a responsive array of `order` values.\n */\n $order?: ResponsiveValues<CSSProperties[\"order\"]>;\n /**\n * Sets the `flex-basis` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $flexBasis?: ResponsiveValues<OakCombinedSpacingToken | null | undefined>;\n /**\n * Sets the `gap` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $gap?: ResponsiveValues<\n OakAllSpacingToken | OakSpaceBetweenToken | null | undefined\n >;\n /**\n * Sets the `column-gap` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $columnGap?: ResponsiveValues<\n OakAllSpacingToken | OakSpaceBetweenToken | null | undefined\n >;\n /**\n * Sets the `row-gap` CSS property of the element.\n *\n * Accepts a spacing token or a responsive array of spacing tokens. Can be nulled.\n */\n $rowGap?: ResponsiveValues<\n OakAllSpacingToken | OakSpaceBetweenToken | null | undefined\n >;\n};\n\nexport const flexStyle = css<FlexStyleProps>`\n ${responsiveStyle(\"display\", (props) => props.$display ?? \"flex\")}\n ${responsiveStyle(\"flex-direction\", (props) => props.$flexDirection)}\n ${responsiveStyle(\"flex-wrap\", (props) => props.$flexWrap)}\n ${responsiveStyle(\"align-items\", (props) => props.$alignItems)}\n ${responsiveStyle(\"align-content\", (props) => props.$alignContent)}\n ${responsiveStyle(\"justify-content\", (props) => props.$justifyContent)}\n ${responsiveStyle(\"align-self\", (props) => props.$alignSelf)}\n ${responsiveStyle(\"order\", (props) => props.$order)}\n ${responsiveStyle(\"flex-grow\", (props) => props.$flexGrow)}\n ${responsiveStyle(\"flex-shrink\", (props) => props.$flexShrink)}\n ${responsiveStyle(\"flex-basis\", (props) => props.$flexBasis, parseSpacing)}\n ${responsiveStyle(\"gap\", (props) => props.$gap, parseSpacing)}\n ${responsiveStyle(\"column-gap\", (props) => props.$columnGap, parseSpacing)}\n ${responsiveStyle(\"row-gap\", (props) => props.$rowGap, parseSpacing)}\n`;\n","import styled from \"styled-components\";\n\nimport { OakBox, OakBoxProps } from \"@/components/atoms/OakBox\";\nimport { flexStyle, FlexStyleProps } from \"@/styles/utils/flexStyle\";\n\nexport type OakFlexProps = FlexStyleProps & OakBoxProps;\n\n/**\n * Flex sets `display: flex;` and exposes various flex props, along with Box\n * props.\n *\n * ## Usage\n * Before adding props to this component, think about whether it makes sense\n * to add it to Box instead, as this component extends that.\n */\nconst OakFlex = styled(OakBox)<OakFlexProps>`\n ${flexStyle}\n`;\n\nexport { OakFlex };\n","import styled from \"styled-components\";\n\nimport { colorStyle, ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport { opacityStyle, OpacityStyleProps } from \"@/styles/utils/opacityStyle\";\nimport {\n marginStyle,\n MarginStyleProps,\n paddingStyle,\n PaddingStyleProps,\n} from \"@/styles/utils/spacingStyle\";\nimport {\n typographyStyle,\n TypographyStyleProps,\n} from \"@/styles/utils/typographyStyle\";\nimport { borderStyle, BorderStyleProps } from \"@/styles/utils/borderStyle\";\n\nexport type OakSpanProps = ColorStyleProps &\n OpacityStyleProps &\n MarginStyleProps &\n PaddingStyleProps &\n BorderStyleProps &\n TypographyStyleProps;\n\n/**\n * Span renders a `span` (inline text) component, exposing all the typography props.\n * ## Usage\n * Use this component when you want to apply styles to a piece of inline text.\n */\nexport const OakSpan = styled.span<OakSpanProps>`\n ${colorStyle}\n ${opacityStyle}\n ${marginStyle}\n ${paddingStyle}\n ${borderStyle}\n ${typographyStyle}\n`;\n","import styled from \"styled-components\";\n\nimport { OakBoxProps, oakBoxCss } from \"../OakBox\";\n\n/**\n *\n * Inherit everything from OakBox, but change the element to a form.\n *\n * @deprecated Use `<OakBox as=\"form\">` instead\n */\nexport const OakForm = styled.form<OakBoxProps>`\n ${oakBoxCss}\n`;\n\nexport type OakFormProps = OakBoxProps;\n","import {\n OakColorFilterToken,\n OakUiRoleToken,\n oakColorFilterTokens,\n oakUiRoleTokens,\n} from \"@/styles/theme/color\";\nimport { OakCombinedColorToken } from \"@/styles/theme\";\nimport { PropsWithTheme } from \"@/styles/theme/theme\";\n\nfunction parseColorFilter(\n value?: OakCombinedColorToken | null,\n): (props: PropsWithTheme) => string;\nfunction parseColorFilter(\n value?: OakCombinedColorToken | null,\n): ((props: PropsWithTheme) => string) | undefined;\nfunction parseColorFilter(value?: OakCombinedColorToken | null) {\n if (value === undefined || value === null) {\n return undefined;\n }\n if (value in oakColorFilterTokens) {\n return oakColorFilterTokens[value as OakColorFilterToken];\n }\n\n if (oakUiRoleTokens.includes(value as OakUiRoleToken)) {\n return ({ theme }: PropsWithTheme) => {\n const c = theme.uiColors[value as OakUiRoleToken];\n if (c && c in oakColorFilterTokens) {\n return oakColorFilterTokens[c as OakColorFilterToken];\n }\n return undefined;\n };\n }\n}\n\nexport { parseColorFilter };\n","import { css } from \"styled-components\";\n\nimport { parseColorFilter } from \"@/styles/helpers/parseColorFilter\";\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport { OakCombinedColorToken } from \"@/styles/theme/color\";\n\ntype ColorFilterToken = ResponsiveValues<OakCombinedColorToken | null>;\n\nexport type ColorFilterStyleProps = {\n /**\n * Applies a color-filter to the element.\n *\n * Accepts a color filter token or a responsive array of color tokens.\n */\n $colorFilter?: ColorFilterToken;\n};\nexport const colorFilterStyle = css<ColorFilterStyleProps>`\n ${responsiveStyle<ColorFilterStyleProps, OakCombinedColorToken>(\n \"filter\",\n (props) => props.$colorFilter,\n parseColorFilter,\n )}\n`;\n","import React, {\n ComponentPropsWithoutRef,\n ElementType,\n MouseEventHandler,\n} from \"react\";\nimport Image, { ImageProps } from \"next/image\";\nimport styled, { css } from \"styled-components\";\n\nimport { useShowPlaceholder } from \"./useShowPlaceholder\";\n\nimport {\n ColorFilterStyleProps,\n colorFilterStyle,\n} from \"@/styles/utils/colorFilterStyle\";\nimport { OakBox, OakBoxProps } from \"@/components/atoms/OakBox\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\ntype HTMLProps = {\n onClick?: MouseEventHandler;\n};\n\nexport type OakImageProps<C extends ElementType = typeof Image> = Omit<\n ImageProps,\n \"placeholder\"\n> &\n OakBoxProps &\n ColorFilterStyleProps &\n HTMLProps & {\n as?: C;\n /**\n * The placeholder to use while the image is loading\n *\n * Defaults to `oak` which is a placeholder containing the Oak logo\n * also accepts the same options as next/image */\n placeholder?: ImageProps[\"placeholder\"] | \"oak\";\n /**\n * Additional props forwarded to the underlying `Image` component `as`\n */\n imageProps?: Partial<ComponentPropsWithoutRef<C>>;\n };\n\ntype StyledImageProps = Omit<OakImageProps, \"as\"> & {\n $showOakPlaceholder: boolean;\n};\n\n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gMTcuOTAxIDAgMCAxLTEwLjktMTMuNiA5Ljc5NiA5Ljc5NiAwIDAgMS0uMS0xLjlabTE4LjEgMTIuMmMuNC01LjUtNi45LTEyLjYtMTMtMTIuMS41IDYuNSA3LjYgMTIuOCAxMyAxMi4xWiIgb3BhY2l0eT0iLjEiLz48L3N2Zz4=\";\n\nconst clickStyles = css<{ onClick?: MouseEventHandler }>`\n ${(props) =>\n /* onClick might be passed in the useClickableCard pattern */\n props.onClick &&\n css`\n :hover {\n cursor: pointer;\n }\n `}\n`;\n\nconst placeholderStyles = css<StyledImageProps>`\n ${(props) =>\n props.$showOakPlaceholder &&\n css`\n background-image: url(${oakPlaceholder});\n background-color: ${parseColor(\"bg-decorative2-very-subdued\")};\n background-size: ${parseSpacing(\"all-spacing-11\")};\n background-position: center;\n background-repeat: no-repeat;\n `}\n`;\n\nconst StyledFillImage = styled(Image)<StyledImageProps>`\n ${colorFilterStyle}\n ${clickStyles}\n ${placeholderStyles}\n object-fit: contain;\n`;\n\nconst StyledResponsiveImage = styled(Image)<StyledImageProps>`\n ${colorFilterStyle}\n ${clickStyles}\n ${placeholderStyles}\n width: 100%;\n height: auto;\n`;\n\n/**\n * A wrapper for NextJs's Image component.\n *\n * Use this for all image types as well as icons.\n * Can accept remote urls provided they are whitelisted in next.config.js and relative urls for local images provided they begin with a \"/\".\n * Set the width and height of the image through the `$width` and `$height` props when the aspect ratio is not known. This will letterbox the image to avoid stretching.\n * Alternatively pass `width` and `height` props when the aspect ratio is known and use $minWidth to set the rendered width, avoiding letter-boxing.\n * NB. for letterboxed images, $background controls the color of the letterbox not the image.\n * `positionStyle` and `spacingStyle` props are also exposed for container.\n * sizes is exposed for further optimisation read Next docs for more info.\n *\n */\nexport const OakImage = <C extends ElementType = typeof Image>({\n ...props\n}: OakImageProps<C>) => {\n const {\n as,\n src,\n alt,\n width,\n height,\n sizes,\n $width = \"100%\",\n $position = \"relative\",\n $colorFilter,\n placeholder = \"oak\",\n unoptimized,\n imageProps,\n onLoad,\n onError,\n ...rest\n } = props;\n const finalPlaceholder = placeholder === \"oak\" ? undefined : placeholder;\n const { showPlaceholder, handleComplete, setImg } = useShowPlaceholder();\n\n // We don't know the aspect ratio of the image, so we must use fill and letterbox it to avoid stretching\n // Use $width and $height to set the width and height of the image container\n if (!width || !height) {\n return (\n <OakBox $position={$position} $width={$width} {...rest}>\n <StyledFillImage\n ref={setImg}\n as={as ?? Image}\n src={src}\n alt={alt}\n sizes={sizes}\n fill\n $colorFilter={$colorFilter}\n placeholder={finalPlaceholder}\n $showOakPlaceholder={placeholder === \"oak\" && showPlaceholder}\n unoptimized={unoptimized}\n onLoad={handleComplete(onLoad)}\n onError={handleComplete(onError)}\n {...imageProps}\n />\n </OakBox>\n );\n }\n\n // When we know the aspect ratio, we can use Image's repsonsive layout\n // Use $minWidth to set the width with auto height\n\n return (\n <OakBox $maxWidth={\"all-spacing-0\"} $position={$position} {...rest}>\n <StyledResponsiveImage\n ref={setImg}\n as={as ?? Image}\n src={src}\n alt={alt}\n width={width}\n height={height}\n sizes={sizes}\n unoptimized={unoptimized}\n $colorFilter={$colorFilter}\n placeholder={finalPlaceholder}\n $showOakPlaceholder={placeholder === \"oak\" && showPlaceholder}\n onLoad={handleComplete(onLoad)}\n onError={handleComplete(onError)}\n {...imageProps}\n />\n </OakBox>\n );\n};\n","import { ReactEventHandler, useCallback, useState } from \"react\";\n\nexport function useShowPlaceholder() {\n // Default to false so that we don't show the placeholder if the image is already complete\n const [showPlaceholder, setShowPlaceholder] = useState(false);\n const setImg = useCallback((img: HTMLImageElement | null) => {\n // the `load` or `error` event may never be called if the image is coming from the cache\n // so we need to check the `complete` property as well as listen to the `onLoad` and `onError` events\n img && setShowPlaceholder(!img.complete);\n }, []);\n\n return {\n showPlaceholder,\n setImg,\n /**\n * Wraps the `onLoad` and `onError` events to set the placeholder state\n */\n handleComplete(\n originalHandler?: ReactEventHandler<HTMLImageElement>,\n ): ReactEventHandler<HTMLImageElement> {\n return (event) => {\n if (originalHandler) {\n originalHandler(event);\n }\n setShowPlaceholder(false);\n };\n },\n };\n}\n","import styled from \"styled-components\";\n\nimport {\n typographyStyle,\n TypographyStyleProps,\n} from \"@/styles/utils/typographyStyle\";\nimport { OakBox, OakBoxProps } from \"@/components/atoms/OakBox\";\n\nexport type OakTypographyProps = OakBoxProps & TypographyStyleProps;\n\n/**\n * The Typography component sets a typography style context from which children\n * inherit style properties through the cascade.\n * ## Usage\n * This should be the primary component to set a typography context.\n * Use this component whenever you want to style blocks of 'body' text.\n */\nexport const OakTypography = styled(OakBox)<OakTypographyProps>`\n ${typographyStyle}\n`;\n","import React, { FC } from \"react\";\nimport styled from \"styled-components\";\n\nimport { ColorStyleProps, colorStyle } from \"@/styles/utils/colorStyle\";\nimport { MarginStyleProps, marginStyle } from \"@/styles/utils/spacingStyle\";\nimport { OpacityStyleProps, opacityStyle } from \"@/styles/utils/opacityStyle\";\nimport {\n TypographyStyleProps,\n typographyStyle,\n} from \"@/styles/utils/typographyStyle\";\n\nexport const oakHeadingTags = [\n \"div\",\n \"h1\",\n \"h2\",\n \"h3\",\n \"h4\",\n \"h5\",\n \"h6\",\n] as const;\n\nexport type OakHeadingTag = (typeof oakHeadingTags)[number];\n\ntype OakHeadingTagProps = {\n children?: React.ReactNode;\n id?: string;\n /**\n * HTML tag to be used for the heading\n *\n * Accepts a heading tag token\n */\n tag: OakHeadingTag;\n ariaLabel?: string;\n ariaHidden?: boolean;\n};\n\nexport const HeadingTagComponent: FC<OakHeadingTagProps> = (props) => {\n const { tag, ariaLabel, ariaHidden, ...otherProps } = props;\n const Tag = tag;\n return (\n <Tag {...otherProps} aria-label={ariaLabel} aria-hidden={ariaHidden} />\n );\n};\n\nexport type OakHeadingProps = TypographyStyleProps &\n OakHeadingTagProps &\n ColorStyleProps &\n OpacityStyleProps &\n MarginStyleProps;\n\n/**\n *\n * OakHeading can be one of the following style tags dependant on its role: \"div\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\".\n * Use the controls to view different font styles.\n *\n */\nexport const OakHeading = styled(HeadingTagComponent)<OakHeadingProps>`\n ${typographyStyle}\n ${marginStyle}\n ${colorStyle}\n ${opacityStyle}\n`;\n","import styled from \"styled-components\";\n\nimport { colorStyle, ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport { marginStyle, MarginStyleProps } from \"@/styles/utils/spacingStyle\";\nimport {\n typographyStyle,\n TypographyStyleProps,\n} from \"@/styles/utils/typographyStyle\";\n\nexport type OakPProps = MarginStyleProps &\n TypographyStyleProps &\n ColorStyleProps;\n\n/**\n * Styled `p` (paragraph) component.\n * ## Usage\n * In general, using a `p` as a descendant of `<Body>` should suffice.\n * However, if you want different styles for a particular paragraph,\n * you can use this component to apply additional styles.\n */\nexport const OakP = styled.p<OakPProps>`\n ${typographyStyle}\n ${colorStyle}\n ${marginStyle}\n\n a {\n color: ${(props) =>\n props.theme &&\n props.theme.uiColors &&\n props.theme.uiColors[\"text-link-active\"]};\n }\n`;\n","import styled, { css } from \"styled-components\";\n\nimport { OakBoxProps, oakBoxCss } from \"../OakBox\";\n\nexport type OakULProps = OakBoxProps & {\n $reset?: boolean;\n};\n\n/**\n * Styled `ul` (unordered list) component.\n *\n * ## Usage\n *\n * Resets browser spacing and other styles, accepts BoxProps' style props.\n *\n * */\n\nexport const OakUL = styled.ul<OakULProps>`\n ${(props) =>\n props.$reset &&\n css`\n list-style: none;\n padding: 0;\n `}\n margin: 0;\n ${oakBoxCss}\n`;\n","import styled from \"styled-components\";\n\nimport { colorStyle, ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport { marginStyle, MarginStyleProps } from \"@/styles/utils/spacingStyle\";\nimport {\n typographyStyle,\n TypographyStyleProps,\n} from \"@/styles/utils/typographyStyle\";\n\nexport type OakOLProps = MarginStyleProps &\n ColorStyleProps &\n TypographyStyleProps;\n\n/**\n * Styled `ol` (ordered list) component.\n *\n * ## Usage\n *\n * Use where we have an ordered list to ensure numbers are styled\n *\n * */\nexport const OakOL = styled.ol<OakOLProps>`\n counter-reset: item;\n padding: 0;\n\n li {\n display: block;\n counter-increment: item;\n margin: 0;\n padding: 0 0 0 16px;\n text-indent: -16px;\n list-style-type: none;\n line-height: 32px;\n\n // Portable text generates linebreaks within list items\n\n br {\n content: \"\";\n display: block;\n margin-top: 8px;\n }\n }\n\n & li::before {\n padding-right: 4px;\n content: counter(item) \".\";\n }\n a {\n color: ${(props) =>\n props.theme &&\n props.theme.uiColors &&\n props.theme.uiColors[\"text-link-active\"]};\n }\n ${marginStyle}\n ${colorStyle}\n ${typographyStyle}\n`;\n","import { CSSProperties, css } from \"styled-components\";\n\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\n\nexport type ListStyleProps = {\n /**\n * Sets the `list-style` CSS property of the element.\n *\n * Accepts a `list-style` value or a responsive array of `list-style` values.\n */\n $listStyle?: ResponsiveValues<CSSProperties[\"listStyle\"]>;\n};\n\nexport const listStyle = css<ListStyleProps>`\n ${responsiveStyle(\"list-style\", (props) => props.$listStyle)}\n`;\n","import styled from \"styled-components\";\n\nimport { oakBoxCss } from \"../OakBox\";\nimport { OakFlexProps } from \"../OakFlex\";\n\nimport { DisplayStyleProps, displayStyle } from \"@/styles/utils/displayStyle\";\nimport { ListStyleProps, listStyle } from \"@/styles/utils/listStyle\";\nimport {\n TypographyStyleProps,\n typographyStyle,\n} from \"@/styles/utils/typographyStyle\";\n\nexport type OakLIProps = OakFlexProps &\n TypographyStyleProps &\n ListStyleProps &\n DisplayStyleProps;\n\n/**\n * Styled `li` (list item) component.\n *\n * ## Usage\n *\n * Places where we directly want to style a list item\n *\n **/\nexport const OakLI = styled.li<OakLIProps>`\n ${oakBoxCss}\n ${typographyStyle}\n ${listStyle}\n ${displayStyle}\n`;\n\nOakLI.defaultProps = {\n $display: \"revert\",\n};\n","import styled from \"styled-components\";\n\nimport {\n TypographyStyleProps,\n typographyStyle,\n} from \"@/styles/utils/typographyStyle\";\nimport { ColorStyleProps, colorStyle } from \"@/styles/utils/colorStyle\";\n\nexport type OakLabelProps = TypographyStyleProps & ColorStyleProps;\n\n/**\n * Label renders a `label` element, exposing all the typography props.\n * ## Usage\n * Use this component when you want to apply styles to a label, likely within\n * a form.\n */\nexport const OakLabel = styled.label<OakLabelProps>`\n ${typographyStyle}\n ${colorStyle}\n`;\n","export const icons = {\n \"question-mark\": \"v1706872277/icons/question-mark.svg\",\n home: \"v1699887218/icons/gvqxjxcw07ei2kkmwnes.svg\",\n send: \"v1699893673/icons/rmvytilpjgvh3pgwc8ph.svg\",\n rocket: \"v1699894015/icons/u26xm5hteot875ozfnk9.svg\",\n edit: \"v1699894149/icons/qxlunbg5tfrdherzsvlt.svg\",\n hamburger: \"v1699895123/icons/jaqdnomtbhqvjcap962u.svg\",\n cross: \"v1699895179/icons/xigimrbivcaxt4omxamp.svg\",\n bell: \"v1699895207/icons/ecejtvqerx81prxyxh9b.svg\",\n twitter: \"v1699895251/icons/bq6a50xtkvnzhltfggzz.svg\",\n worksheet: \"v1699895300/icons/ez1s6mtpe5jkunnxzvlw.svg\",\n facebook: \"v1699895330/icons/iojlvh3o5lshy2jupyph.svg\",\n share: \"v1699895363/icons/agcmduftef3wcla6gzec.svg\",\n \"arrow-right\": \"v1707149070/icons/fv0z57zerrioft52dd9n.svg\",\n \"worksheet-3\": \"v1699895429/icons/bzhojpjxp9rukdvh7daz.svg\",\n \"chevron-right\": \"v1707752509/icons/vk9xxxhnsltsickom6q9.svg\",\n save: \"v1699895505/icons/rh1ahwwtbemvz0ihluew.svg\",\n \"quiz-3\": \"v1699895534/icons/zoayhgtrotv32fad7d3k.svg\",\n \"chevron-down\": \"v1699953557/icons/botfld6brychmttwtv6u.svg\",\n linkedin: \"v1699953592/icons/leqneklorqqzb1zo6rf1.svg\",\n \"magic-carpet\": \"v1699953622/icons/jifivg9xxm7sb0fjdilm.svg\",\n books: \"v1699953657/icons/hz4l3iq6i68kazvkvorq.svg\",\n \"supervision-level\": \"v1699953696/icons/cwqhknapp3maa4g0t3lj.svg\",\n \"quiz-white\": \"v1699953730/icons/gpcehpgr9mqoumsa25xe.svg\",\n \"arrow-left\": \"v1707149179/icons/ejrm9dpgpzb7ddbo8z2i.svg\",\n \"additional-material\": \"v1699953798/icons/ntoq4tqvcm2uj1pajubt.svg\",\n \"slide-deck-3\": \"v1699953830/icons/sm92moja9d5utu3cj16c.svg\",\n \"sign-language\": \"v1699953861/icons/ns94ozvozzi22enxkx0x.svg\",\n external: \"v1699953892/icons/hlxmejse3mcr4tqo6t8u.svg\",\n \"equipment-required\": \"v1699953925/icons/pw22bdhj2vrzfv2ogi4e.svg\",\n \"chevron-left\": \"v1707752509/icons/rbvzan0ozubmr4j0uqdn.svg\",\n download: \"v1699953991/icons/dk0f6a6hdpzxftjosngn.svg\",\n search: \"v1704901279/icons/canbi3fuz5fanzom2hvi.svg\",\n \"chevron-up\": \"v1699954058/icons/pay71thmhhylj7z28sj1.svg\",\n go: \"v1699954090/icons/vdzptyvmitylra8x4usy.svg\",\n copyright: \"v1699954118/icons/boiod3rflocgsnfokyo8.svg\",\n \"arrow-down\": \"v1699954152/icons/wpfmbmwpyfinipg0d61y.svg\",\n project: \"v1699954186/icons/zofq5pheud6spnwjpewk.svg\",\n \"slide-deck\": \"v1699954241/icons/sjjy5f3g4eciwcuxxr33.svg\",\n \"content-guidance\": \"v1699954277/icons/tm3uhcqenaznq4fxys7j.svg\",\n tick: \"v1699954310/icons/efd3esaor6zqk7seh6kt.svg\",\n instagram: \"v1699954343/icons/ayfeljric0kkimdymvva.svg\",\n dot: \"v1699954371/icons/knykdclphkm8lgff4u2g.svg\",\n \"dot-png\": \"v1699954394/icons/qecbh291nzwmhcvqayqd.png\",\n warning: \"v1704901279/icons/zzszodmk7fvxm9xzzg9s.svg\",\n \"lightbulb-yellow\": \"v1705078631/icons/q2v4sqxouy1ngcajoavv.svg\",\n lightbulb: \"v1705078631/icons/zldisxmbff36z68rwcef.svg\",\n quiz: \"v1705416077/icons/kaaizjcudy0jfgfrrdel.svg\",\n video: \"v1705416078/icons/wzey1zfxrvv3apeebbf5.svg\",\n intro: \"v1705662092/icons/pl7bnmb13txese9yxkjv.svg\",\n \"move-arrows\": \"v1709052869/icons/hoddjsgpzkszgvnmn91q.svg\",\n \"subject-art\": \"subject-icons/art.svg\",\n \"subject-biology\": \"subject-icons/biology.svg\",\n \"subject-chemistry\": \"subject-icons/chemistry.svg\",\n \"subject-citizenship\": \"subject-icons/citizenship.svg\",\n \"subject-combined-science\": \"subject-icons/science.svg\",\n \"subject-communication-and-language\":\n \"subject-icons/communication-and-language.svg\",\n \"subject-computing\": \"subject-icons/computing.svg\",\n \"subject-computing-non-gcse\": \"subject-icons/computing.svg\",\n \"subject-creative-arts\": \"subject-icons/creative-arts.svg\",\n \"subject-design-technology\": \"subject-icons/design-technology.svg\",\n \"subject-drama\": \"subject-icons/drama.svg\",\n \"subject-english\": \"subject-icons/english.svg\",\n \"subject-english-grammar\": \"subject-icons/english-grammar.svg\",\n \"subject-english-reading-for-pleasure\": \"subject-icons/literature.svg\",\n \"subject-english-spelling\": \"subject-icons/english-spelling.svg\",\n \"subject-french\": \"subject-icons/french.svg\",\n \"subject-geography\": \"subject-icons/geography.svg\",\n \"subject-german\": \"subject-icons/german.svg\",\n \"subject-history\": \"subject-icons/history.svg\",\n \"subject-independent-living\": \"subject-icons/independent-living.svg\",\n \"subject-latin\": \"subject-icons/latin.svg\",\n \"subject-maths\": \"subject-icons/maths.svg\",\n \"subject-music\": \"subject-icons/music-hollow.svg\",\n \"subject-numeracy\": \"subject-icons/numeracy.svg\",\n \"occupational-therapy\": \"subject-icons/therapy.svg\",\n \"subject-physical-development\": \"subject-icons/physical-development.svg\",\n \"subject-physical-education\": \"subject-icons/physical-education.svg\",\n \"subject-physical-therapy\": \"subject-icons/physical-therapy.svg\",\n \"subject-physics\": \"subject-icons/physics.svg\",\n \"subject-religious-education\": \"subject-icons/religious-education.svg\",\n \"subject-rshe-pshe\": \"subject-icons/rshe-pshe.svg\",\n \"subject-science\": \"subject-icons/science.svg\",\n \"subject-sensory-integration\": \"subject-icons/sensory-integration.svg\",\n \"subject-spanish\": \"subject-icons/spanish.svg\",\n \"subject-speech-and-language-therapy\":\n \"subject-icons/speech-and-language.svg\",\n \"subject-therapy\": \"subject-icons/therapy.svg\",\n \"subject-understanding-the-world\":\n \"subject-icons/understanding-the-world.svg\",\n} as const;\n\nexport type IconName = keyof typeof icons;\n","import React from \"react\";\n\nimport { IconName, icons } from \"../../../image-map\";\n\nimport { OakImage, OakImageProps } from \"@/components/atoms/OakImage\";\n\nexport const oakIconNames = Object.keys(icons) as IconName[];\n\nexport type OakIconName = IconName;\n\nexport type OakIconProps = Omit<OakImageProps, \"alt\" | \"src\"> & {\n /**\n * The name of the icon to display\n *\n * Accepts an icon name token\n */\n iconName: OakIconName;\n alt?: string;\n};\n\n/**\n * returns true if the given string is a valid `OakIconName`\n */\nexport function isValidIconName(iconName: string): iconName is OakIconName {\n return oakIconNames.includes(iconName as OakIconName);\n}\n\n/**\n * A wrapper around OakImage which uses the image-map.json file to map icon names to image paths.\n */\nexport const OakIcon = (props: OakIconProps) => {\n const {\n iconName,\n alt,\n $width = \"all-spacing-7\",\n $height = \"all-spacing-7\",\n $minHeight = $height,\n $minWidth = $width,\n imageProps,\n ...rest\n } = props;\n\n return (\n <OakImage\n src={`https://${process.env.NEXT_PUBLIC_OAK_ASSETS_HOST}/${process.env.NEXT_PUBLIC_OAK_ASSETS_PATH}/${icons[iconName]}`}\n alt={alt ?? iconName}\n $width={$width}\n $height={$height}\n $minHeight={$minHeight}\n $minWidth={$minWidth}\n placeholder=\"empty\"\n // Icons should not be optimised since the SVG is already as small as it can be and should be served directly\n unoptimized\n {...rest}\n />\n );\n};\n","import styled, { css, CSSProperties } from \"styled-components\";\n\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport { OakBox, OakBoxProps } from \"@/components/atoms/OakBox\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { OakCombinedSpacingToken } from \"@/styles\";\n\nconst gridStyle = css<OakGridProps>`\n ${responsiveStyle(\"row-gap\", (props) => props.$rg, parseSpacing)}\n ${responsiveStyle(\"column-gap\", (props) => props.$cg, parseSpacing)}\n ${responsiveStyle(\"grid-auto-rows\", (props) => props.$gridAutoRows)}\n ${responsiveStyle(\"grid-template-areas\", (props) => props.$gridTemplateAreas)}\n ${responsiveStyle(\n \"grid-template-columns\",\n (props) => props.$gridTemplateColumns,\n )}\n ${responsiveStyle(\"grid-template-rows\", (props) => props.$gridTemplateRows)}\n`;\n\nexport type OakGridProps = OakBoxProps & {\n /**\n * Applies `row-gap` to the grid\n *\n * Accepts a spacing token or a responsive array of spacing tokens.\n */\n $rg?: ResponsiveValues<OakCombinedSpacingToken>;\n /**\n * Applies `column-gap` to the grid\n *\n * Accepts a spacing token or a responsive array of spacing tokens.\n */\n $cg?: ResponsiveValues<OakCombinedSpacingToken>;\n /**\n * Applies `grid-auto-rows` to the grid\n *\n * Accepts a `grid-auto-rows` value or a responsive array of `grid-auto-rows` values.\n */\n $gridAutoRows?: ResponsiveValues<CSSProperties[\"gridAutoRows\"]>;\n /**\n * Applies `grid-template-areas` to the grid\n *\n * Accepts a `grid-template-areas` value or a responsive array of `grid-template-areas` values.\n */\n $gridTemplateAreas?: ResponsiveValues<CSSProperties[\"gridTemplateAreas\"]>;\n /**\n * Applies `grid-template-columns` to the grid\n *\n * Accepts a `grid-template-columns` value or a responsive array of `grid-template-columns` values.\n */\n $gridTemplateColumns?: ResponsiveValues<CSSProperties[\"gridTemplateColumns\"]>;\n /**\n * Applies `grid-template-rows` to the grid\n *\n * Accepts a `grid-template-rows` value or a responsive array of `grid-template-rows` values.\n */\n $gridTemplateRows?: ResponsiveValues<CSSProperties[\"gridTemplateRows\"]>;\n};\n\n/**\n * Creates a grid layout\n *\n * Defaults to a 12 column grid\n */\nexport const OakGrid = styled(OakBox)<OakGridProps>`\n display: grid;\n grid-template-columns: repeat(12, 1fr);\n width: 100%;\n ${gridStyle}\n`;\n","import styled, { css, CSSProperties } from \"styled-components\";\n\nimport {\n responsiveStyle,\n ResponsiveValues,\n} from \"@/styles/utils/responsiveStyle\";\nimport { SpacingStyleProps } from \"@/styles/utils/spacingStyle\";\nimport { OakFlex, OakFlexProps } from \"@/components/atoms/OakFlex\";\n\ntype ColRowSpan = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n\nexport type OakGridAreaProps = {\n /**\n * Determines the number of columns the element should span.\n *\n * Accepts a value from 0-12 or a responsive value of 0-12.\n */\n $colSpan: ResponsiveValues<ColRowSpan>;\n /**\n * Determines the number of rows the element should span.\n *\n * Accepts a value from 0-12 or a responsive value of 0-12.\n */\n $rowSpan?: ResponsiveValues<ColRowSpan>;\n /**\n * Sets the order of the element.\n *\n * Accepts a number or a responsive array of numbers.\n */\n $order?: ResponsiveValues<CSSProperties[\"order\"]>;\n /**\n * The start column of the element.\n *\n * Accepts a value from 0-12 or a responsive value of 0-12.\n */\n $colStart?: ResponsiveValues<ColRowSpan>;\n /**\n * The end column of the element.\n *\n * Accepts a value from 0-12 or a responsive value of 0-12.\n */\n $colEnd?: ResponsiveValues<ColRowSpan>;\n /**\n * The start row of the element.\n *\n * Accepts a value from 0-12 or a responsive value of 0-12.\n */\n $rowStart?: ResponsiveValues<ColRowSpan>;\n} & SpacingStyleProps;\n\nconst combineSpanStart = (\n start?: ColRowSpan | null,\n span?: ColRowSpan | null,\n) => {\n return start ? `${start}/${span}` : `${span}`;\n};\n\nconst parseSpanStart = (value?: string | null) => {\n if (value?.includes(\"/\")) {\n const [start, span] = value.split(\"/\");\n return `${start} / span ${span}`;\n }\n const span = value;\n return `span ${span}`;\n};\n\nconst gridArea = css<OakGridAreaProps>`\n flex-direction: column;\n ${responsiveStyle(\n \"grid-column\",\n (props) => {\n return Array.isArray(props.$colSpan)\n ? props.$colSpan.map((span, index) =>\n combineSpanStart(\n Array.isArray(props.$colStart)\n ? props.$colStart[index]\n : props.$colStart,\n span,\n ),\n )\n : combineSpanStart(\n Array.isArray(props.$colStart)\n ? props.$colStart[0]\n : props.$colStart,\n props.$colSpan,\n );\n },\n (value) => parseSpanStart(value),\n )};\n ${responsiveStyle(\n \"grid-row\",\n (props) => {\n return Array.isArray(props.$rowSpan)\n ? props.$rowSpan.map((span, index) =>\n combineSpanStart(\n Array.isArray(props.$rowStart)\n ? props.$rowStart[index]\n : props.$rowStart,\n span,\n ),\n )\n : combineSpanStart(\n Array.isArray(props.$rowStart)\n ? props.$rowStart[0]\n : props.$rowStart,\n props.$rowSpan,\n );\n },\n (value) => parseSpanStart(value),\n )};\n ${responsiveStyle(\n \"order\",\n (props) => props.$order,\n (value) => value && `${value}`,\n )};\n ${responsiveStyle(\"grid-row\", (props) =>\n props.$rowSpan ? `span ${props.$rowSpan}` : \"span 1\",\n )};\n ${responsiveStyle(\"grid-column-start\", (props) => props.$colStart)}\n ${responsiveStyle(\"grid-column-end\", (props) => props.$colEnd)}\n ${responsiveStyle(\"grid-row-start\", (props) => props.$rowStart)}\n`;\n\n/**\n *\n * OakGridArea is a flex container that should be used inside OakGrid.\n *\n * - There is no nesting of OakGridAreas\n * - Column and row arrangements are achieved through $colSpan, $rowSpan, $colStart, $colEnd, $rowStart, $rowEnd\n *\n */\n\nexport const OakGridArea = styled(OakFlex)<OakGridAreaProps & OakFlexProps>`\n ${gridArea}\n`;\n","import styled from \"styled-components\";\n\nimport { OakFlex, OakFlexProps } from \"../OakFlex\";\n\nexport type OakMaxWidthProps = OakFlexProps;\n\n/**\n * This component will provide a default maxWidth and ph value, it take Flex props.\n * ## Usage\n * Use this component on pages to limit the max-width to a specific container.\n * This will make it easier to create full browser width or custom width containers on the same page\n * with different background colors / image url.\n */\nexport const OakMaxWidth = styled(OakFlex)``;\n\nOakMaxWidth.defaultProps = {\n $maxWidth: [\"all-spacing-21\", \"all-spacing-24\"],\n $ph: [\"inner-padding-none\", \"inner-padding-s\"],\n $flexDirection: \"column\",\n $flexGrow: 1,\n $width: \"100%\",\n $mh: \"auto\",\n};\n","import { getCldImageUrl, type CldImageProps } from \"next-cloudinary\";\n\nexport function getCloudinaryIdFromUrl(\n src: string | URL,\n config?: CldImageProps[\"config\"],\n) {\n // When a private CDN is used, CldImage will only accept the image ID as the src\n // this appears to be a limitation of the library which appears to have been designed\n // with basic public CDN usage in mind.\n return src.toString().replace(getCloudinaryRootUrl(config), \"\");\n}\n\n// Attempts to build the stem of a cloudinary URL, this is used to extract the image id\nfunction getCloudinaryRootUrl(config?: CldImageProps[\"config\"]) {\n // `getCldImageUrl` handles all the logic to construct a cloudinary URL from the given config\n // (supporting private CDNs, custom CNAMES etc. so we don't have to)\n const canaryUrl = new URL(getCldImageUrl({ src: \"canary.jpg\" }, config));\n return canaryUrl.origin + \"/image/upload/\";\n}\n","import React, { createContext, useContext } from \"react\";\nimport { CldImage, CldImageProps } from \"next-cloudinary\";\n\nimport { OakImage, OakImageProps } from \"../OakImage\";\n\nimport { getCloudinaryIdFromUrl } from \"./cloudinary\";\n\nexport type OakCloudinaryImageProps = Omit<\n OakImageProps<typeof CldImage>,\n \"src\" | \"imageProps\"\n> & {\n /**\n * The cloudinary image id or the full cloudinary URL\n *\n * Usually in the format `v1234567890/image.jpg`\n */\n cloudinaryId: string;\n};\n\nconst cloudinaryConfigContext = createContext<\n CldImageProps[\"config\"] | undefined\n>(undefined);\n\n/**\n * Provides a Cloudinary config to all descendent `OakCloudinaryImage` elements.\n *\n * See https://cloudinary.com/documentation/cloudinary_sdks#configuration_parameters\n * for documentation of the config object.\n */\nexport const OakCloudinaryConfigProvider = cloudinaryConfigContext.Provider;\n\n/**\n * OakCloudinaryImage wraps OakImage providing responsive images from Cloudinary\n * based on the `sizes` prop.\n *\n * Cloudinary cloud name can be set globally with `NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME` or a config\n * can be passed with `OakCloudinaryConfigProvider`.\n */\nexport const OakCloudinaryImage = ({\n cloudinaryId,\n unoptimized = false || cloudinaryId.endsWith(\".svg\"),\n ...props\n}: OakCloudinaryImageProps) => {\n const config = useContext(cloudinaryConfigContext);\n const src = getCloudinaryIdFromUrl(cloudinaryId, config);\n\n return (\n <OakImage\n as={CldImage}\n src={src}\n imageProps={{\n config,\n flags: unoptimized ? undefined : [\"keep_attribution\"],\n }}\n unoptimized={unoptimized}\n {...props}\n />\n );\n};\n","import React, { ReactNode } from \"react\";\n\nimport { OakSpan } from \"@/components/atoms/OakSpan\";\n\nexport type OakKbdProps = {\n children: ReactNode;\n};\n\n/**\n * Represents textual user input from a keyboard, voice input, or any other text entry device.\n * */\nexport const OakKbd = ({ children }: OakKbdProps) => {\n return (\n <OakSpan\n $font=\"body-3-bold\"\n as=\"kbd\"\n $borderColor=\"border-decorative3-stronger\"\n $background=\"bg-primary\"\n $borderRadius=\"border-radius-m\"\n $ba=\"border-solid-m\"\n $ph=\"inner-padding-xs\"\n $pv=\"inner-padding-ssx\"\n $whiteSpace=\"nowrap\"\n >\n {children}\n </OakSpan>\n );\n};\n","/**\n * From https://piccalil.li/blog/a-modern-css-reset/\n * Do not edit this file. If you want to add global styles, use oak.styles.ts\n */\n\nimport { css } from \"styled-components\";\n\nexport const resetGlobalCss = css`\n /* Box sizing rules */\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n\n /* Remove default margin */\n body,\n h1,\n h2,\n h3,\n h4,\n h5,\n p,\n figure,\n blockquote,\n dl,\n dd {\n margin: 0;\n }\n\n /* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */\n ul[role=\"list\"],\n ol[role=\"list\"] {\n list-style: none;\n padding-left: 0;\n margin-top: 0;\n margin-bottom: 0;\n }\n\n /* Set core root defaults */\n html,\n html:focus-within {\n scroll-behavior: smooth;\n }\n\n /* Set core body defaults */\n body {\n min-height: 100vh;\n text-rendering: optimizespeed;\n line-height: 1.5;\n }\n\n /* A elements that don't have a class get default styles */\n a:not([class]) {\n text-decoration-skip-ink: auto;\n }\n\n /* Make images easier to work with */\n img,\n picture {\n max-width: 100%;\n display: block;\n }\n\n /* Inherit fonts for inputs and buttons */\n input,\n button,\n textarea,\n select {\n font: inherit;\n }\n\n cite {\n font-style: inherit;\n }\n\n /* Remove all animations, transitions and smooth scroll for people that prefer not to see them */\n @media (prefers-reduced-motion: reduce) {\n html:focus-within {\n scroll-behavior: auto;\n }\n\n *,\n *::before,\n *::after {\n animation-duration: 0.01ms !important;\n animation-iteration-count: 1 !important;\n transition-duration: 0.01ms !important;\n scroll-behavior: auto !important;\n }\n }\n`;\n\nexport default resetGlobalCss;\n","/**\n * This is our global stylesheet. It's for resets in addition to reset.styles.ts\n * which is taken from a publically available reset. We want to minimise global\n * styles where possible so if you add any styles here please comment with what\n * they are doing and why they belong here (rather than in component specific\n * styles)\n */\n\nimport { css } from \"styled-components\";\n\nexport const oakGlobalCss = css`\n html,\n body {\n padding: 0;\n margin: 0;\n font-family: Lexend, sans-serif;\n font-weight: 300;\n line-height: 1.4;\n }\n\n /* stylelint-disable */\n body,\n #__next {\n /* stylelint-enable */\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n }\n\n a {\n color: inherit;\n text-decoration: none;\n font-family: inherit;\n\n /*\n * Remove grey background on tap on ios\n */\n -webkit-tap-highlight-color: transparent;\n }\n\n button {\n /*\n * some browsers have a small margin by default\n * @see https://github.com/oaknational/Oak-Web-Application/issues/709\n */\n margin: 0;\n\n /*\n * Remove grey background on tap on ios\n */\n -webkit-tap-highlight-color: transparent;\n }\n\n /*\n * Inline styling for mathjax equations\n */\n mjx-container {\n display: inline-grid !important;\n margin: 0 !important;\n }\n`;\n","import { createGlobalStyle } from \"styled-components\";\n\nimport { resetGlobalCss } from \"@/styles/global/reset.styles\";\nimport { oakGlobalCss } from \"@/styles/global/oak.styles\";\n\n/**\n *\n * Currently this is just for storybook as it is already applied in OWA\n *\n */\n\nexport const OakGlobalStyle = createGlobalStyle`\n ${resetGlobalCss}\n ${oakGlobalCss}\n`;\n","import styled, { css } from \"styled-components\";\n\nconst screenReaderStyle = css`\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n`;\n\n/**\n * This component will visually hide its contents but will still be available\n * to screen readers, assitive technology, and scrapers.\n * ## Usage\n * Use this component in places where content shouldn't be visible, but should\n * be accessible to assistive technology.\n */\nexport const OakScreenReader = styled.span`\n ${screenReaderStyle}\n`;\n","import React from \"react\";\nimport styled, { css, keyframes } from \"styled-components\";\n\nimport { OakScreenReader } from \"@/components/atoms/OakScreenReader\";\nimport { SizeStyleProps } from \"@/styles/utils/sizeStyle\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { responsiveStyle } from \"@/styles/utils/responsiveStyle\";\nimport { ColorStyleProps, colorStyle } from \"@/styles/utils/colorStyle\";\nimport { OakCombinedColorToken } from \"@/styles\";\n\nconst SpinnerKeyframe = keyframes`\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n`;\n\nexport type OakLoadingSpinnerProps = Pick<SizeStyleProps, \"$width\"> &\n ColorStyleProps & { loaderColor?: OakCombinedColorToken };\n\nconst StyledLoadingSpinner = styled.span<OakLoadingSpinnerProps>`\n ${(props) =>\n props.$width\n ? responsiveStyle(\"--width\", (props) => props.$width, parseSpacing)\n : css`\n --width: 1.25rem;\n `}\n --inner-width: calc(var(--width) / 10 * 8);\n --thickness: calc(var(--width) / 12);\n\n display: inline-flex;\n width: var(--width);\n height: var(--width);\n\n ::after {\n content: \" \";\n display: block;\n width: var(--inner-width);\n height: var(--inner-width);\n margin: var(--thickness);\n border-radius: 50%;\n border: var(--thickness) solid currentcolor;\n ${(props) =>\n props.loaderColor\n ? css`\n border-color: ${props.loaderColor} ${props.loaderColor}\n ${props.loaderColor} transparent;\n `\n : css`\n border-color: currentcolor currentcolor currentcolor transparent;\n `}\n animation: ${SpinnerKeyframe} 1.2s linear infinite;\n }\n ${colorStyle}\n`;\n\n/**\n *\n * A loading spinner of variable size.\n *\n */\nexport const OakLoadingSpinner = (props: OakLoadingSpinnerProps) => (\n <StyledLoadingSpinner {...props}>\n <OakScreenReader>Loading</OakScreenReader>\n </StyledLoadingSpinner>\n);\n","import React, { ElementType, useRef } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { colorStyle, ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport { displayStyle, DisplayStyleProps } from \"@/styles/utils/displayStyle\";\nimport { spacingStyle, SpacingStyleProps } from \"@/styles/utils/spacingStyle\";\nimport {\n typographyStyle,\n TypographyStyleProps,\n} from \"@/styles/utils/typographyStyle\";\nimport {\n dropShadowStyle,\n DropShadowStyleProps,\n} from \"@/styles/utils/dropShadowStyle\";\nimport { borderStyle, BorderStyleProps } from \"@/styles/utils/borderStyle\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\n\ntype StyledButtonProps = TypographyStyleProps &\n SpacingStyleProps &\n ColorStyleProps &\n DisplayStyleProps &\n BorderStyleProps &\n DropShadowStyleProps & {\n isLoading?: boolean;\n };\n\nconst internalButtonCss = css<StyledButtonProps>`\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n cursor: pointer;\n text-align: left;\n font-family: unset;\n outline: none;\n ${typographyStyle}\n ${colorStyle}\n ${spacingStyle}\n ${displayStyle}\n ${borderStyle}\n ${dropShadowStyle}\n &:disabled {\n pointer-events: none;\n cursor: default;\n }\n`;\n\nexport type InternalButtonProps = StyledButtonProps & {\n onHovered?: (\n event: React.MouseEvent<HTMLButtonElement, MouseEvent>,\n duration: number,\n ) => void;\n};\n\nconst UnstyledInternalButton = <C extends ElementType = \"button\">(\n props: InternalButtonProps & PolymorphicPropsWithoutRef<C>,\n) => {\n const { onClick, onHovered, element: Component = \"button\", ...rest } = props;\n\n const hoverStart = useRef(Date.now());\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n if (onClick) {\n onClick(event);\n }\n };\n\n const handleMouseEnter = () => {\n hoverStart.current = Date.now();\n };\n\n const handleMouseLeave = (event: React.MouseEvent<HTMLButtonElement>) => {\n const delta = Date.now() - hoverStart.current;\n if (onHovered) {\n onHovered(event, delta);\n }\n };\n\n return (\n <Component\n {...rest}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n />\n );\n};\n\n/**\n *\n * An unstyled button to be used as a basis for all UI button components.\n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n * \n * NB. We must export a styled component for it to be inheritable\n */\nexport const InternalButton = styled(UnstyledInternalButton)`\n ${internalButtonCss}\n`;\n","import React, { ElementType } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { OakBox, OakBoxProps, OakFlex, OakSpan } from \"@/components/atoms\";\nimport {\n InternalButton,\n InternalButtonProps,\n} from \"@/components/atoms/InternalButton\";\nimport { OakIcon, OakIconName } from \"@/components/atoms/OakIcon\";\nimport { OakLoadingSpinner } from \"@/components/molecules/OakLoadingSpinner\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport {\n PositionStyleProps,\n positionStyle,\n} from \"@/styles/utils/positionStyle\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { OakCombinedColorToken, OakDropShadowToken } from \"@/styles\";\nimport { SizeStyleProps, sizeStyle } from \"@/styles/utils/sizeStyle\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\n\nexport type InternalShadowRectButtonProps = Omit<\n InternalButtonProps,\n | \"$pa\"\n | \"$ph\"\n | \"$pv\"\n | \"$ba\"\n | \"$borderRadius\"\n | \"$borderColor\"\n | \"$background\"\n | \"$color\"\n> & {\n iconName?: OakIconName;\n isTrailingIcon?: boolean;\n defaultTextColor: OakCombinedColorToken;\n defaultBackground: OakCombinedColorToken;\n defaultBorderColor: OakCombinedColorToken;\n hoverTextColor: OakCombinedColorToken;\n hoverBackground: OakCombinedColorToken;\n hoverBorderColor: OakCombinedColorToken;\n disabledBackground: OakCombinedColorToken;\n disabledBorderColor: OakCombinedColorToken;\n disabledTextColor: OakCombinedColorToken;\n width?: SizeStyleProps[\"$width\"];\n maxWidth?: SizeStyleProps[\"$maxWidth\"];\n hoverShadow?: OakDropShadowToken | null;\n} & PositionStyleProps;\n\nconst StyledInternalButton = styled(InternalButton)<\n SizeStyleProps & {\n $defaultTextColor: OakCombinedColorToken;\n $defaultBackground: OakCombinedColorToken;\n $defaultBorderColor: OakCombinedColorToken;\n $hoverTextColor: OakCombinedColorToken;\n $hoverBackground: OakCombinedColorToken;\n $hoverBorderColor: OakCombinedColorToken;\n $disabledBackground: OakCombinedColorToken;\n $disabledBorderColor: OakCombinedColorToken;\n $disabledTextColor: OakCombinedColorToken;\n }\n>`\n ${positionStyle}\n ${sizeStyle}\n display: inline-block;\n ${(props) => css`\n &:hover {\n text-decoration: underline;\n color: ${parseColor(props.$hoverTextColor)};\n background: ${parseColor(props.$hoverBackground)};\n border-color: ${parseColor(props.$hoverBorderColor)};\n }\n &:active {\n background: ${parseColor(props.$defaultBackground)};\n border-color: ${parseColor(props.$defaultBorderColor)};\n color: ${parseColor(props.$defaultTextColor)};\n }\n &:disabled {\n background: ${parseColor(props.$disabledBackground)};\n border-color: ${parseColor(props.$disabledBorderColor)};\n color: ${parseColor(props.$disabledTextColor)};\n }\n `}\n`;\n\nconst StyledButtonWrapper = styled(OakBox)<\n OakBoxProps & {\n $hoverShadow?: OakDropShadowToken | null;\n }\n>`\n .grey-shadow:has(+ * + .internal-button:focus-visible) {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n .yellow-shadow:has(+ .internal-button:focus-visible) {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")};\n }\n .yellow-shadow:has(+ .internal-button:hover),\n .yellow-shadow:has(+ .internal-button:hover:not(:focus-visible, :active)) {\n box-shadow: ${(props) => parseDropShadow(props.$hoverShadow)};\n }\n .grey-shadow:has(+ * + .internal-button:hover) {\n box-shadow: none;\n }\n .grey-shadow:has(+ * + .internal-button:active) {\n box-shadow: ${parseDropShadow(\"drop-shadow-grey\")};\n }\n .yellow-shadow:has(+ .internal-button:active) {\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")};\n }\n`;\n\n/**\n *\n * A styled rectangular button, not intended to be used directly. \n * Instead used by OakPrimaryButton and OakSecondaryButton.\n * \n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n */\nexport const InternalShadowRectButton = <C extends ElementType = \"button\">(\n props: InternalShadowRectButtonProps & PolymorphicPropsWithoutRef<C>,\n) => {\n const {\n element = \"button\",\n children,\n iconName,\n isTrailingIcon,\n isLoading,\n disabled,\n width = \"max-content\",\n maxWidth,\n defaultBackground,\n defaultBorderColor,\n defaultTextColor,\n disabledTextColor,\n hoverTextColor,\n hoverBackground,\n hoverBorderColor,\n disabledBackground,\n disabledBorderColor,\n className,\n hoverShadow = \"drop-shadow-lemon\",\n ...rest\n } = props;\n\n const icon = (\n <>\n {iconName && (\n <OakIcon\n iconName={iconName}\n $width={\"all-spacing-6\"}\n $height={\"all-spacing-6\"}\n $colorFilter={props.disabled ? disabledTextColor : defaultTextColor}\n />\n )}\n </>\n );\n\n const loader = (\n <OakBox $width={\"all-spacing-6\"} $height={\"all-spacing-6\"}>\n <OakLoadingSpinner $width={\"all-spacing-6\"} />\n </OakBox>\n );\n\n const iconLogic = <>{isLoading && !disabled ? loader : icon}</>;\n\n return (\n <StyledButtonWrapper\n className={className}\n $position={\"relative\"}\n $width={width}\n $maxWidth={maxWidth}\n $hoverShadow={hoverShadow}\n >\n <OakBox\n className=\"grey-shadow\"\n $position={\"absolute\"}\n $borderRadius={\"border-radius-s\"}\n $width={\"100%\"}\n $height={\"100%\"}\n $top=\"all-spacing-0\"\n />\n\n <OakBox\n className=\"yellow-shadow\"\n $position={\"absolute\"}\n $borderRadius={\"border-radius-s\"}\n $width={\"100%\"}\n $height={\"100%\"}\n $top=\"all-spacing-0\"\n />\n\n <StyledInternalButton\n element={element}\n className=\"internal-button\"\n $ba={\"border-solid-m\"}\n $background={defaultBackground}\n $borderColor={defaultBorderColor}\n $color={defaultTextColor}\n $pv={\"inner-padding-s\"}\n $ph={\"inner-padding-m\"}\n $borderRadius={\"border-radius-s\"}\n $position={\"relative\"}\n disabled={disabled || isLoading}\n $width={\"100%\"}\n $height={\"100%\"}\n $hoverTextColor={hoverTextColor}\n $hoverBackground={hoverBackground}\n $hoverBorderColor={hoverBorderColor}\n $defaultTextColor={defaultTextColor}\n $defaultBackground={defaultBackground}\n $defaultBorderColor={defaultBorderColor}\n $disabledTextColor={disabledTextColor}\n $disabledBackground={disabledBackground}\n $disabledBorderColor={disabledBorderColor}\n {...rest}\n >\n <OakFlex\n $flexDirection={\"row\"}\n $alignItems={\"center\"}\n $gap=\"space-between-ssx\"\n $justifyContent=\"center\"\n >\n {!isTrailingIcon && iconLogic}\n <OakSpan $font={\"heading-7\"}>{children}</OakSpan>\n {isTrailingIcon && iconLogic}\n </OakFlex>\n </StyledInternalButton>\n </StyledButtonWrapper>\n );\n};\n","import React, { ElementType } from \"react\";\n\nimport {\n InternalShadowRectButton,\n InternalShadowRectButtonProps,\n} from \"@/components/molecules/InternalShadowRectButton\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\n\nexport type OakPrimaryButtonProps = Omit<\n InternalShadowRectButtonProps,\n | \"defaultBorderColor\"\n | \"defaultBackground\"\n | \"defaultTextColor\"\n | \"hoverBackground\"\n | \"hoverBorderColor\"\n | \"hoverTextColor\"\n | \"disabledBackground\"\n | \"disabledBorderColor\"\n | \"disabledTextColor\"\n>;\n\n/**\n *\n * A specific implementation of InternalRectButton\n *\n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n *\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n */\nexport const OakPrimaryButton = <C extends ElementType = \"button\">({\n element,\n ...rest\n}: OakPrimaryButtonProps & PolymorphicPropsWithoutRef<C>) => {\n return (\n <InternalShadowRectButton\n element={element ?? \"button\"}\n defaultBorderColor=\"bg-btn-primary\"\n defaultBackground=\"bg-btn-primary\"\n defaultTextColor=\"text-inverted\"\n hoverBackground=\"bg-btn-primary-hover\"\n hoverBorderColor=\"bg-btn-primary-hover\"\n hoverTextColor=\"text-inverted\"\n disabledBackground=\"bg-btn-primary-disabled\"\n disabledBorderColor=\"text-disabled\"\n disabledTextColor=\"text-inverted\"\n {...rest}\n />\n );\n};\n","import React, { ElementType } from \"react\";\n\nimport {\n InternalShadowRectButton,\n InternalShadowRectButtonProps,\n} from \"@/components/molecules/InternalShadowRectButton\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\n\nexport type OakPrimaryInvertedButtonProps = Omit<\n InternalShadowRectButtonProps,\n | \"defaultBorderColor\"\n | \"defaultBackground\"\n | \"defaultTextColor\"\n | \"hoverBackground\"\n | \"hoverBorderColor\"\n | \"hoverTextColor\"\n | \"disabledBackground\"\n | \"disabledBorderColor\"\n | \"disabledTextColor\"\n>;\n\n/**\n *\n * A specific implementation of InternalRectButton\n *\n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n *\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n */\nexport const OakPrimaryInvertedButton = <C extends ElementType = \"button\">({\n element,\n ...rest\n}: OakPrimaryInvertedButtonProps & PolymorphicPropsWithoutRef<C>) => {\n return (\n <InternalShadowRectButton\n element={element ?? \"button\"}\n defaultBorderColor=\"bg-btn-secondary\"\n defaultBackground=\"bg-btn-secondary\"\n defaultTextColor=\"text-primary\"\n hoverBackground=\"bg-btn-secondary\"\n hoverBorderColor=\"bg-btn-secondary\"\n hoverTextColor=\"text-primary\"\n disabledBackground=\"bg-btn-secondary\"\n disabledBorderColor=\"bg-btn-secondary\"\n disabledTextColor=\"text-disabled\"\n hoverShadow={null}\n {...rest}\n />\n );\n};\n","import React, { ElementType } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { OakRoundIconProps } from \"../OakRoundIcon\";\n\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\nimport { OakBox, OakFlex, OakSpan } from \"@/components/atoms\";\nimport {\n InternalButton,\n InternalButtonProps,\n} from \"@/components/atoms/InternalButton\";\nimport { OakIcon, OakIconName } from \"@/components/atoms/OakIcon\";\nimport { OakLoadingSpinner } from \"@/components/molecules/OakLoadingSpinner\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport {\n PositionStyleProps,\n positionStyle,\n} from \"@/styles/utils/positionStyle\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { OakCombinedColorToken } from \"@/styles\";\nimport { SizeStyleProps, sizeStyle } from \"@/styles/utils/sizeStyle\";\n\nexport type InternalShadowRoundButtonProps = Omit<\n InternalButtonProps,\n | \"$pa\"\n | \"$ph\"\n | \"$pv\"\n | \"$ba\"\n | \"$borderRadius\"\n | \"$borderColor\"\n | \"$background\"\n | \"$color\"\n> & {\n iconName?: OakIconName;\n isTrailingIcon?: boolean;\n defaultTextColor: OakCombinedColorToken;\n hoverTextColor: OakCombinedColorToken;\n disabledTextColor: OakCombinedColorToken;\n defaultIconBackground: OakCombinedColorToken;\n hoverIconBackground: OakCombinedColorToken;\n disabledIconBackground: OakCombinedColorToken;\n defaultIconColor?: OakRoundIconProps[\"$colorFilter\"];\n disabledIconColor?: OakRoundIconProps[\"$colorFilter\"];\n width?: SizeStyleProps[\"$width\"];\n maxWidth?: SizeStyleProps[\"$maxWidth\"];\n iconBackgroundSize: SizeStyleProps[\"$width\"];\n iconSize: SizeStyleProps[\"$width\"];\n} & PositionStyleProps;\n\nconst StyledInternalButton = styled(InternalButton)<\n Omit<InternalShadowRoundButtonProps, \"iconBackgroundSize\" | \"iconSize\"> &\n SizeStyleProps\n>`\n display: inline-block;\n ${positionStyle}\n ${sizeStyle}\n ${(props) => css`\n &:hover {\n text-decoration: underline;\n color: ${parseColor(props.$hoverTextColor)};\n }\n &:active {\n color: ${parseColor(props.$defaultTextColor)};\n }\n &:disabled {\n color: ${parseColor(props.$disabledTextColor)};\n }\n `}\n`;\n\nconst StyledButtonWrapper = styled(OakBox)<{\n $disabledIconBackground: OakCombinedColorToken;\n $hoverIconBackground: OakCombinedColorToken;\n $defaultIconBackground: OakCombinedColorToken;\n}>`\n > :first-child:focus-visible .shadow {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n > :first-child:hover .shadow {\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")};\n }\n > :first-child:active .shadow {\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")},\n ${parseDropShadow(\"drop-shadow-grey\")};\n }\n ${(props) => css`\n > :first-child:disabled .icon-container {\n background: ${parseColor(props.$disabledIconBackground)};\n }\n > :first-child:hover .icon-container {\n background: ${parseColor(props.$hoverIconBackground)};\n }\n > :first-child:active .icon-container {\n background: ${parseColor(props.$defaultIconBackground)};\n }\n `}\n`;\n\n/**\n *\n * A styled button with round icons, not intended to be used directly. \n * Instead used by OakTertiaryButton and OakHintButton.\n * \n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n */\nexport const InternalShadowRoundButton = <C extends ElementType = \"button\">(\n props: InternalShadowRoundButtonProps & PolymorphicPropsWithoutRef<C>,\n) => {\n const {\n element = \"button\",\n children,\n iconName,\n isTrailingIcon,\n isLoading,\n disabled,\n width = \"max-content\",\n maxWidth,\n iconBackgroundSize,\n iconSize,\n disabledIconBackground,\n disabledTextColor,\n defaultIconColor,\n hoverIconBackground,\n defaultIconBackground,\n disabledIconColor,\n defaultTextColor,\n hoverTextColor,\n className,\n ...rest\n } = props;\n\n const icon = (\n <>\n {iconName && (\n <OakIcon\n iconName={iconName}\n $width={iconSize}\n $height={iconSize}\n $colorFilter={\n props.disabled\n ? disabledIconColor\n : defaultIconColor\n ? defaultIconColor\n : null\n }\n />\n )}\n </>\n );\n const loader = (\n <OakBox $width={iconSize} $height={iconSize}>\n <OakLoadingSpinner $width={iconSize} loaderColor=\"white\" />\n </OakBox>\n );\n const iconLogic = (\n <OakFlex\n className={\"icon-container\"}\n $background={props.defaultIconBackground}\n $color={props.defaultTextColor}\n $borderRadius={\"border-radius-circle\"}\n $position={\"relative\"}\n $width={iconBackgroundSize}\n $height={iconBackgroundSize}\n $alignItems={\"center\"}\n $justifyContent={\"center\"}\n $minWidth={iconBackgroundSize}\n >\n <OakBox\n className=\"shadow\"\n $position={\"absolute\"}\n $borderRadius={\"border-radius-circle\"}\n $width={\"100%\"}\n $height={\"100%\"}\n $top=\"all-spacing-0\"\n />\n\n {isLoading && !disabled ? loader : icon}\n </OakFlex>\n );\n\n return (\n <StyledButtonWrapper\n className={className}\n $position={\"relative\"}\n $width={width}\n $maxWidth={maxWidth}\n $disabledIconBackground={disabledIconBackground}\n $hoverIconBackground={hoverIconBackground}\n $defaultIconBackground={defaultIconBackground}\n >\n <StyledInternalButton\n element={element ?? \"button\"}\n {...rest}\n $hoverTextColor={hoverTextColor}\n $defaultTextColor={defaultTextColor}\n $disabledTextColor={disabledTextColor}\n $color={defaultTextColor}\n $position={\"relative\"}\n disabled={disabled || isLoading}\n >\n <OakFlex\n $flexDirection={\"row\"}\n $alignItems={\"center\"}\n $gap={children ? \"space-between-xs\" : \"space-between-none\"}\n $justifyContent=\"center\"\n >\n {!isTrailingIcon && iconLogic}\n <OakSpan $font={\"heading-7\"}>{children}</OakSpan>\n {isTrailingIcon && iconLogic}\n </OakFlex>\n </StyledInternalButton>\n </StyledButtonWrapper>\n );\n};\n","import React, { ElementType } from \"react\";\n\nimport { OakRoundIconProps } from \"../OakRoundIcon\";\nimport { InternalShadowRoundButton } from \"../InternalShadowRoundButton\";\n\nimport { OakIconName } from \"@/components/atoms\";\nimport { InternalButtonProps } from \"@/components/atoms/InternalButton\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\n\ntype OakTertiaryButtonProps = InternalButtonProps & {\n iconBackground?: OakRoundIconProps[\"$background\"];\n iconColorFilter?: OakRoundIconProps[\"$colorFilter\"];\n isTrailingIcon?: boolean;\n iconName?: OakIconName;\n};\n\n/**\n * An implementation of InternalShadowRoundButton, its a subtle button with no border and a round icon.\n */\nexport const OakTertiaryButton = <C extends ElementType = \"button\">({\n element,\n isTrailingIcon,\n iconName,\n children,\n ...props\n}: OakTertiaryButtonProps & PolymorphicPropsWithoutRef<C>) => {\n return (\n <InternalShadowRoundButton\n element={element ?? \"button\"}\n {...props}\n isTrailingIcon={isTrailingIcon}\n iconName={iconName}\n defaultIconColor={\"white\"}\n disabledIconColor=\"white\"\n disabledIconBackground=\"bg-btn-primary-disabled\"\n defaultIconBackground=\"black\"\n hoverIconBackground=\"bg-btn-primary-hover\"\n defaultTextColor=\"text-primary\"\n hoverTextColor=\"bg-btn-primary-hover\"\n disabledTextColor=\"text-disabled\"\n iconBackgroundSize={\"all-spacing-7\"}\n iconSize={\"all-spacing-6\"}\n >\n {children}\n </InternalShadowRoundButton>\n );\n};\n","import React, { createContext, useState } from \"react\";\n\nimport { TypographyStyleProps } from \"@/styles/utils/typographyStyle\";\nimport { ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport { OakFlex, OakLabel } from \"@/components/atoms\";\nimport { FlexStyleProps } from \"@/styles/utils/flexStyle\";\n\ntype RadioContextType = {\n currentValue: string;\n name: string;\n disabled?: boolean;\n onValueUpdated?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n};\n\nexport const RadioContext = createContext<RadioContextType>({\n currentValue: \"default\",\n name: \"default\",\n});\n\nexport type OakRadioGroupProps = {\n label?: string;\n name: string;\n disabled?: boolean;\n children: React.ReactNode;\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n /**\n * Sets the value of the radio group\n * for use as a controlled component\n */\n value?: string;\n /**\n * Sets the initial value of the radio group\n * for use as an uncontrolled component\n */\n defaultValue?: string;\n} & Pick<TypographyStyleProps, \"$font\"> &\n ColorStyleProps &\n Pick<FlexStyleProps, \"$flexDirection\" | \"$alignItems\" | \"$gap\">;\n\n/**\n *\n * OakRadioGroup allow users to select a single item from a list of mutually exclusive options .\n * OakRadioGroup consists of a set of OakRadioButtons, and a label. Each radio includes a label and a visual selection indicator. A single radio button within the group can be selected at a time. Users may click or touch a radio button to select it, or use the Tab key to navigate to the group, the arrow keys to navigate within the group, and the Space key to select an option.\n * ## Usage\n *\n * use the callback onChange to get the value of the selected radio button.\n *\n */\nexport const OakRadioGroup = (props: OakRadioGroupProps) => {\n const {\n name,\n children,\n label,\n onChange,\n $font = \"body-1-bold\",\n $gap = \"space-between-s\",\n disabled,\n value,\n defaultValue = \"\",\n ...rest\n } = props;\n\n const [currentValue, setValue] = useState(defaultValue);\n\n const handleValueUpdated = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (value === undefined) {\n setValue(event.target.value);\n }\n if (onChange) {\n onChange(event);\n }\n };\n\n return (\n <OakFlex role=\"radiogroup\" $gap={$gap} {...rest}>\n {label && <OakLabel $font={$font}>{label}</OakLabel>}\n <RadioContext.Provider\n value={{\n currentValue: value ?? currentValue,\n name,\n disabled: disabled,\n onValueUpdated: handleValueUpdated,\n }}\n >\n {children}\n </RadioContext.Provider>\n </OakFlex>\n );\n};\n","import React, { ReactNode, forwardRef, useContext } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { RadioContext } from \"@/components/molecules/OakRadioGroup/OakRadioGroup\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { parseBorder } from \"@/styles/helpers/parseBorder\";\nimport { FlexStyleProps } from \"@/styles/utils/flexStyle\";\nimport { responsiveStyle } from \"@/styles/utils/responsiveStyle\";\nimport {\n OakBox,\n OakBoxProps,\n OakFlex,\n OakFlexProps,\n OakLabel,\n OakLabelProps,\n} from \"@/components/atoms\";\nimport {\n OakAllSpacingToken,\n OakBorderWidthToken,\n OakCombinedColorToken,\n} from \"@/styles\";\n\ntype RadioButtonLabelProps = {\n $labelAlignItems?: FlexStyleProps[\"$alignItems\"];\n $labelGap?: FlexStyleProps[\"$gap\"];\n disabled?: boolean;\n} & OakLabelProps;\n\nconst RadioButtonLabel = styled(OakLabel)<RadioButtonLabelProps>`\n ${(props) =>\n !props.disabled &&\n css`\n cursor: pointer;\n `}\n\n display: flex;\n ${responsiveStyle(\"gap\", (props) => props.$labelGap, parseSpacing)}\n ${responsiveStyle(\"align-items\", (props) => props.$labelAlignItems)}\n`;\n\nconst HiddenRadioButtonInput = styled.input.attrs({\n type: \"radio\",\n})`\n position: absolute;\n opacity: 0;\n ${(props) =>\n !props.disabled &&\n css`\n cursor: pointer;\n `}\n`;\n\ntype VisibleRadioButtonInputProps = OakFlexProps & {\n $disableFocusRing: boolean;\n $radioInnerSize: OakAllSpacingToken;\n disabled?: boolean;\n};\n\nconst VisibleRadioButtonInput = styled(OakFlex)<VisibleRadioButtonInputProps>`\n border-radius: 50%;\n\n ${(props) =>\n !props.$disableFocusRing &&\n css`\n ${HiddenRadioButtonInput}:focus-visible ~ &::before {\n content: \"\";\n height: ${parseSpacing(\"all-spacing-7\")};\n width: ${parseSpacing(\"all-spacing-7\")};\n background: \"transparent\"\n display: block;\n position: absolute;\n border-radius: 50%;\n border: ${parseBorder(\"border-solid-m\")} ${parseColor(\"grey60\")};\n box-shadow: ${`inset 0 0 0 0.13rem ${parseColor(\"lemon\")}`};\n }`}\n\n ${HiddenRadioButtonInput}:checked ~ &::after {\n content: \"\";\n height: ${(props) => parseSpacing(props.$radioInnerSize)};\n width: ${(props) => parseSpacing(props.$radioInnerSize)};\n background: ${parseColor(\"black\")};\n position: absolute;\n border-radius: 50%;\n border: ${parseBorder(\"border-solid-m\")} ${parseColor(\"white\")};\n }\n`;\n\n// This is a hack to force React to rerender when the disabled prop is changed. Otherwise the pseudo element is not updated.\nconst DisabledVisibleRadioButtonInput = styled(VisibleRadioButtonInput)`\n ${HiddenRadioButtonInput}:checked ~ &::after {\n content: \"\";\n height: ${(props) => parseSpacing(props.$radioInnerSize)};\n width: ${(props) => parseSpacing(props.$radioInnerSize)};\n background: ${parseColor(\"bg-btn-primary-disabled\")};\n position: absolute;\n border-radius: 50%;\n border: ${parseBorder(\"border-solid-m\")} ${parseColor(\"white\")};\n }\n`;\n\nexport type OakRadioButtonProps = {\n id: string;\n label: ReactNode;\n value: string;\n tabIndex?: number;\n \"data-testid\"?: string;\n disabled?: boolean;\n /**\n * Allows the focus ring to be disabled. This is useful when focus is indicated\n * by other means, such as a border or background color change.\n */\n disableFocusRing?: boolean;\n /**\n * Allows the size of the radio button to be customized.\n */\n radioOuterSize?: OakAllSpacingToken;\n /**\n * Allows the size of the inner \"checked\" circle of the radio button to be customized.\n */\n radioInnerSize?: OakAllSpacingToken;\n /**\n * Allows the width of the radio button border to be customized.\n */\n radioBorderWidth?: OakBorderWidthToken;\n /**\n * Allows the background color of the radio button to be customized.\n */\n radioBackground?: OakCombinedColorToken;\n /**\n * Allows the width of the radio button border to be customized when the radio button is checked.\n */\n checkedRadioBorderWidth?: OakBorderWidthToken;\n} & OakBoxProps &\n RadioButtonLabelProps;\n\n/**\n * A radio button component.\n *\n * Use within `OakRadioGroup` component.\n */\nexport const OakRadioButton = forwardRef<HTMLInputElement, OakRadioButtonProps>(\n (props, ref) => {\n const radioContext = useContext(RadioContext);\n const { currentValue, name, onValueUpdated } = radioContext;\n const {\n id,\n label,\n value,\n tabIndex,\n disabled,\n $labelGap = \"space-between-ssx\",\n $labelAlignItems = \"center\",\n $font = \"body-1\",\n \"data-testid\": dataTestId,\n disableFocusRing = false,\n radioInnerSize = \"all-spacing-4\",\n radioOuterSize = \"all-spacing-6\",\n radioBorderWidth = \"border-solid-m\",\n radioBackground = \"bg-primary\",\n checkedRadioBorderWidth = \"border-solid-m\",\n ...rest\n } = props;\n const checked = value === currentValue;\n const anyDisabled = disabled || radioContext.disabled;\n const finalRadioBorderWidth = checked\n ? checkedRadioBorderWidth\n : radioBorderWidth;\n\n return (\n <OakBox {...rest}>\n <RadioButtonLabel\n htmlFor={id}\n $labelAlignItems={$labelAlignItems}\n $labelGap={$labelGap}\n $font={$font}\n data-testid={dataTestId}\n disabled={anyDisabled}\n >\n <HiddenRadioButtonInput\n name={name}\n id={id}\n value={value}\n onChange={onValueUpdated}\n checked={value === currentValue}\n tabIndex={tabIndex}\n disabled={anyDisabled}\n ref={ref}\n />\n {!anyDisabled ? (\n <VisibleRadioButtonInput\n $height={radioOuterSize}\n $width={radioOuterSize}\n $ba={finalRadioBorderWidth}\n $borderColor={\"black\"}\n $flexGrow={0}\n $flexShrink={0}\n $alignItems={\"center\"}\n $justifyContent={\"center\"}\n $background={radioBackground}\n $disableFocusRing={!!disableFocusRing}\n $radioInnerSize={radioInnerSize}\n />\n ) : (\n <DisabledVisibleRadioButtonInput\n $height={radioOuterSize}\n $width={radioOuterSize}\n $ba={finalRadioBorderWidth}\n $borderColor={\"bg-btn-primary-disabled\"}\n $flexGrow={0}\n $flexShrink={0}\n $alignItems={\"center\"}\n $justifyContent={\"center\"}\n $background={radioBackground}\n $disableFocusRing={!!disableFocusRing}\n $radioInnerSize={radioInnerSize}\n />\n )}\n {label}\n </RadioButtonLabel>\n </OakBox>\n );\n },\n);\n\nexport type OakRadioButtonType = typeof OakRadioButton;\n","import React, { forwardRef, useRef } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { OakBorderRadiusToken, OakCombinedColorToken } from \"@/styles\";\nimport { parseBorderRadius } from \"@/styles/helpers/parseBorderRadius\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { BorderStyleProps, borderStyle } from \"@/styles/utils/borderStyle\";\nimport { ColorStyleProps, colorStyle } from \"@/styles/utils/colorStyle\";\nimport { SizeStyleProps, sizeStyle } from \"@/styles/utils/sizeStyle\";\nimport { SpacingStyleProps, spacingStyle } from \"@/styles/utils/spacingStyle\";\n\n/**\n *\n * These components can be used with InternalCheckBoxWrapper which allows for customisable icons\n *\n * Several flavours of checkbox are created here:\n * - Default\n * - Hover decorations\n * - Focus decorations\n * - Hover + Focus decorations\n *\n * As they are styled components they can be further customised in implementation. Alternatively additional\n * components can be created here.\n *\n */\n\nexport type BaseCheckBoxProps = {\n id: string;\n disabled?: boolean;\n value: string;\n defaultChecked?: boolean;\n onHovered?: (value: string, id: string, duration: number) => void;\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;\n onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;\n \"data-testid\"?: string;\n};\n\nconst BaseCheckBox = forwardRef(\n (props: BaseCheckBoxProps, ref?: React.Ref<HTMLInputElement>) => {\n const { onHovered, ...rest } = props;\n\n const hoverStart = useRef(Date.now());\n\n const handleMouseEnter = () => {\n hoverStart.current = Date.now();\n };\n\n const handleMouseLeave = () => {\n const delta = Date.now() - hoverStart.current;\n if (onHovered) {\n onHovered(props.value, props.id, delta);\n }\n };\n\n return (\n <input\n ref={ref}\n type=\"checkbox\"\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n {...rest}\n name={props.id}\n />\n );\n },\n);\n\ntype StyledBaseCheckBoxProps = BaseCheckBoxProps &\n ColorStyleProps &\n SpacingStyleProps &\n BorderStyleProps &\n SizeStyleProps & {\n $checkedBackground?: OakCombinedColorToken | null;\n };\n\ntype HoverBaseCheckBoxProps = {\n $hoverBorderRadius: OakBorderRadiusToken;\n};\n\n/**\n *\n * These components can be used with InternalCheckBoxWrapper which allows for customisable icons\n *\n * Several flavours of checkbox are created here:\n * - Default\n * - Hover decorations\n * - Focus decorations\n * - Hover + Focus decorations\n *\n * NB. Hover decorations must be wrapped in a box with position relative to allow for the hover effect to work\n *\n * As they are styled components they can be further customised in implementation. Alternatively additional\n * components can be created here.\n *\n *\n * ## Events\n * The following callbacks are available for tracking focus events:\n *\n * ### onChange\n * onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n *\n * ### onFocus\n * onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;\n *\n * ### onBlur\n * onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;\n *\n * ### onHovered\n * `onHovered?: (id, value, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n *\n *\n */\nexport const InternalCheckBox = styled(BaseCheckBox)<StyledBaseCheckBoxProps>`\n /* removing default appearance */\n -webkit-appearance: none;\n appearance: none;\n cursor: pointer;\n margin: 0;\n outline: none;\n ${borderStyle}\n ${colorStyle}\n ${spacingStyle}\n ${sizeStyle}\n\n &:checked {\n ${(props) => css`\n background: ${parseColor(props.$checkedBackground)};\n `};\n }\n\n &:disabled {\n pointer-events: none;\n }\n`;\n\nInternalCheckBox.defaultProps = {\n $borderRadius: \"border-radius-xs\",\n $ba: \"border-solid-m\",\n $borderColor: \"text-primary\",\n $checkedBackground: \"text-primary\",\n};\n\nexport const InternalCheckBoxHover = styled(InternalCheckBox)<\n StyledBaseCheckBoxProps & HoverBaseCheckBoxProps\n>`\n /* @media wrapper is required to prevent hover effect on iOS Safari */\n\n @media (hover: hover) {\n &:hover:not(&:checked):not(&:disabled)::after {\n content: \"\";\n position: absolute;\n top: 50%;\n left: 50%;\n width: 60%;\n height: 60%;\n transform: translate(-50%, -50%);\n border-radius: ${(props) => css`\n ${parseBorderRadius(props.$hoverBorderRadius)}\n `};\n background: ${(props) => css`\n ${parseColor(props.$checkedBackground)}\n `};\n }\n }\n`;\n\nInternalCheckBoxHover.defaultProps = {\n $hoverBorderRadius: \"border-radius-xs\",\n};\n\nconst focusStyle = css`\n &:focus-visible {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")};\n }\n`;\n\nexport const InternalCheckBoxFocus = styled(\n InternalCheckBox,\n)<StyledBaseCheckBoxProps>`\n ${focusStyle}\n`;\n\nexport const InternalCheckBoxHoverFocus = styled(InternalCheckBoxHover)<\n StyledBaseCheckBoxProps & HoverBaseCheckBoxProps\n>`\n ${focusStyle}\n`;\n","import styled, { css } from \"styled-components\";\n\nimport { OakLabel, OakLabelProps } from \"@/components/atoms\";\nimport { responsiveStyle } from \"@/styles/utils/responsiveStyle\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { FlexStyleProps } from \"@/styles/utils/flexStyle\";\n\nexport type InternalCheckBoxLabelProps = {\n labelAlignItems?: FlexStyleProps[\"$alignItems\"];\n labelGap?: FlexStyleProps[\"$gap\"];\n disabled?: boolean;\n \"data-testid\"?: string;\n} & OakLabelProps;\n\n/**\n *\n * Specialised Label Component can be used and extended to create various different versions of CheckboxLabels\n *\n */\nexport const InternalCheckBoxLabel = styled(\n OakLabel,\n)<InternalCheckBoxLabelProps>`\n display: flex;\n align-items: center;\n ${responsiveStyle(\"gap\", (props) => props.labelGap, parseSpacing)}\n ${responsiveStyle(\"align-items\", (props) => props.labelAlignItems)}\n`;\n\nexport const InternalCheckBoxLabelHoverDecor = styled(InternalCheckBoxLabel)`\n ${(props) =>\n props.disabled\n ? css`\n pointer-events: none;\n `\n : css`\n cursor: pointer;\n `}\n @media (hover: hover) {\n &:hover {\n text-decoration: ${(props) => (props.disabled ? \"none\" : \"underline\")};\n }\n }\n`;\n","import React from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakBoxProps, OakIcon } from \"@/components/atoms\";\nimport { OakAllSpacingToken, OakInnerPaddingToken } from \"@/styles\";\nimport { ResponsiveValues } from \"@/styles/utils/responsiveStyle\";\n\nconst StyledIconContainer = styled(OakBox)<\n OakBoxProps & { disabled?: boolean }\n>`\n pointer-events: none;\n opacity: 0;\n\n input:checked + & {\n opacity: 1;\n }\n`;\n\nexport type InternalCheckBoxWrapperProps = {\n size?: ResponsiveValues<OakAllSpacingToken>;\n internalCheckbox: React.JSX.Element;\n iconPadding?: OakInnerPaddingToken;\n checkedIcon?: React.JSX.Element;\n};\n\n/**\n *\n * This component is a wrapper for the InternalCheckBox component. It allows for customisable icons.\n *\n * NB. size must have the same value as the InternalCheckBox width and height\n *\n *\n */\nexport const InternalCheckBoxWrapper = (\n props: InternalCheckBoxWrapperProps,\n) => {\n const {\n size = \"all-spacing-6\",\n iconPadding = \"inner-padding-none\",\n internalCheckbox,\n checkedIcon = (\n <OakIcon\n iconName=\"tick\"\n $width={\"100%\"}\n $height={\"100%\"}\n $colorFilter={\"white\"}\n />\n ),\n } = props;\n\n return (\n <OakBox $position=\"relative\" $width={size} $height={size}>\n {internalCheckbox}\n <StyledIconContainer\n $position={\"absolute\"}\n $top={\"all-spacing-0\"}\n $left={\"all-spacing-0\"}\n $pa={iconPadding}\n $width={size}\n $height={size}\n >\n {checkedIcon}\n </StyledIconContainer>\n </OakBox>\n );\n};\n","import React, {\n DetailedHTMLProps,\n InputHTMLAttributes,\n FocusEvent,\n useRef,\n} from \"react\";\nimport styled from \"styled-components\";\n\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { getBreakpoint } from \"@/styles/utils/responsiveStyle\";\nimport { SpacingStyleProps, spacingStyle } from \"@/styles/utils/spacingStyle\";\nimport { SizeStyleProps, sizeStyle } from \"@/styles/utils/sizeStyle\";\n\ntype StyledInputProps = Omit<\n DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,\n \"ref\"\n> &\n SpacingStyleProps &\n SizeStyleProps;\n\n/**\n * Using `appearance none !important;` here because many style resets will set this\n * value to textfield, causing some browsers to implement undesirable styles.\n * E.g. ios and rounded borders (which border-radius doesn't fix without\n * appearance: none)\n */\nconst StyledInput = styled.input`\n appearance: none !important;\n border: 0;\n border-radius: 0;\n border-color: transparent;\n box-shadow: none;\n font-family: inherit;\n background: transparent;\n outline: none;\n color: inherit;\n\n @media (max-width: ${getBreakpoint(\"small\")}px) {\n /* iOS zooms in on inputs with font sizes <16px on mobile */\n font-size: 16px;\n }\n\n ::placeholder {\n color: ${({ theme }) =>\n theme && theme.uiColors && parseColor(theme.uiColors[\"text-subdued\"])};\n }\n\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n appearance: none;\n }\n\n :disabled {\n cursor: not-allowed;\n }\n\n ${spacingStyle}\n ${sizeStyle}\n`;\n\nexport type InternalTextInputProps = Omit<StyledInputProps, \"placeholder\"> & {\n /**\n * A textual hint or example to display before a value has been entered\n */\n placeholder?: string;\n /**\n * Fired only when the input is focused for the first time\n */\n onInitialFocus?: (e: FocusEvent<HTMLInputElement>) => void;\n};\n\n/**\n *\n * An unstyled input to be used as a basis for UI input components.\n * Supports all the props of a regular `HTMLInputElement`\n *\n * 🚨 The CSS `outline` is disabled so a focus ring must be applied by the consuming component.\n *\n * The following callbacks are available for tracking focus events:\n *\n * ### onFocus\n * `(e: FocusEvent<HTMLInputElement>) => void;`\n * ### onBlur\n * `(e: FocusEvent<HTMLInputElement>) => void;`\n * ### onInitialFocus\n * `(e: FocusEvent<HTMLInputElement>) => void;`<br>\n * occurs only when the input is focused for the first time\n *\n */\nexport const InternalTextInput = (props: InternalTextInputProps) => {\n const { onInitialFocus, onFocus, ...rest } = props;\n\n const hadInitialFocused = useRef(false);\n\n const handleOnFocus = (e: FocusEvent<HTMLInputElement>) => {\n if (!hadInitialFocused.current && props.onInitialFocus) {\n props.onInitialFocus(e);\n hadInitialFocused.current = true;\n }\n\n if (props.onFocus) {\n props.onFocus(e);\n }\n };\n\n return <StyledInput {...rest} onFocus={handleOnFocus} />;\n};\n","import React, { ChangeEventHandler } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport {\n InternalTextInput,\n InternalTextInputProps,\n} from \"@/components/atoms/InternalTextInput\";\nimport { OakFlex, OakIcon, OakIconName } from \"@/components/atoms\";\nimport { OakCombinedColorToken, OakDropShadowToken } from \"@/styles\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { SizeStyleProps } from \"@/styles/utils/sizeStyle\";\n\ntype StyledTextInputWrapperProps = {\n $color: OakCombinedColorToken;\n $hoverBackground: OakCombinedColorToken;\n $background: OakCombinedColorToken;\n $borderColor: OakCombinedColorToken;\n $focusRingDropShadows: OakDropShadowToken[];\n $disabledBackgroundColor: OakCombinedColorToken;\n $readOnlyBorderColor: OakCombinedColorToken;\n $disabledColor: OakCombinedColorToken;\n $readOnlyColor: OakCombinedColorToken;\n $disabled: boolean;\n $readOnly: boolean;\n};\n\nexport type OakTextInputProps = {\n /**\n * Disables user input and updates the appearance accordingly.\n */\n disabled?: boolean;\n /**\n * Makes the input read-only. Preventing the user from changing the value.\n */\n readOnly?: boolean;\n /**\n * Sets the value. Use this in controlled components;\n */\n value?: string;\n /**\n * Sets the initial value. Use this for an uncontrolled component;\n */\n defaultValue?: string;\n /**\n * Used to target the input element in tests.\n */\n \"data-testid\"?: string;\n onChange?: ChangeEventHandler<HTMLInputElement>;\n /**\n * Alters the appearance of the input field to indicate whether the input is valid or invalid.\n */\n validity?: \"valid\" | \"invalid\";\n /**\n * Adds an icon to the input\n *\n * Defaults to the start of the input\n */\n iconName?: OakIconName;\n /**\n * Position the icon at the end of the input\n */\n isTrailingIcon?: boolean;\n /**\n * Give the field a highlight to draw attention to it\n */\n isHighlighted?: boolean;\n iconColor?: OakCombinedColorToken;\n validBorderColor?: OakCombinedColorToken;\n invalidBorderColor?: OakCombinedColorToken;\n validIconColor?: OakCombinedColorToken;\n invalidIconColor?: OakCombinedColorToken;\n color?: OakCombinedColorToken;\n hoverBackground?: OakCombinedColorToken;\n background?: OakCombinedColorToken;\n borderColor?: OakCombinedColorToken;\n focusRingDropShadows?: OakDropShadowToken[];\n disabledBackgroundColor?: OakCombinedColorToken;\n readOnlyBorderColor?: OakCombinedColorToken;\n disabledColor?: OakCombinedColorToken;\n readOnlyColor?: OakCombinedColorToken;\n highlightBackgroundColor?: OakCombinedColorToken;\n /**\n * The width of the surrounding div - the input and icon will fill this\n */\n wrapperWidth?: SizeStyleProps[\"$width\"];\n wrapperMaxWidth?: SizeStyleProps[\"$maxWidth\"];\n iconAlt?: string;\n} & InternalTextInputProps;\n\nconst StyledTextInputWrapper = styled(OakFlex)<StyledTextInputWrapperProps>`\n &:hover {\n cursor: text;\n }\n\n &:focus-within {\n box-shadow: ${(props) =>\n props.$focusRingDropShadows\n .map((dropShadow) => parseDropShadow(dropShadow))\n .join(\",\")};\n }\n\n background: ${(props) => parseColor(props.$background)};\n\n ${(props) =>\n !props.$readOnly &&\n css`\n @media (hover: hover) {\n &:hover:not(:focus-within) {\n background: ${parseColor(props.$hoverBackground)};\n }\n }\n `}\n\n ${(props) =>\n props.$readOnly &&\n css`\n border-color: ${parseColor(props.$readOnlyBorderColor)};\n color: ${parseColor(props.$readOnlyColor)};\n `}\n\n ${(props) =>\n props.$disabled &&\n css`\n background: ${parseColor(props.$disabledBackgroundColor)};\n color: ${parseColor(props.$disabledColor)};\n &:hover {\n cursor: not-allowed;\n }\n `}\n`;\n\n/**\n * Default input which can be extended to create specialised inputs.\n */\nexport const OakTextInput = ({\n type = \"text\",\n borderColor = \"border-primary\",\n readOnlyBorderColor = \"border-neutral\",\n focusRingDropShadows = [\n \"drop-shadow-centered-lemon\",\n \"drop-shadow-centered-grey\",\n ],\n background = \"bg-primary\",\n hoverBackground = \"bg-neutral\",\n disabledBackgroundColor = \"bg-neutral\",\n highlightBackgroundColor = \"bg-decorative5-main\",\n color = \"text-primary\",\n disabledColor = \"text-disabled\",\n readOnlyColor = \"text-subdued\",\n validity,\n iconColor = \"icon-inverted\",\n validBorderColor = \"border-success\",\n invalidBorderColor = \"border-error\",\n validIconColor = \"icon-success\",\n invalidIconColor = \"border-error\",\n iconName,\n iconAlt,\n isTrailingIcon = false,\n isHighlighted = false,\n wrapperWidth,\n wrapperMaxWidth,\n ...props\n}: OakTextInputProps) => {\n let finalBackgroundColor = background;\n let finalBorderColor = borderColor;\n let finalIconColor = iconColor;\n let finalReadOnlyBorderColor = readOnlyBorderColor;\n\n switch (true) {\n case validity === \"valid\":\n finalBorderColor = validBorderColor;\n finalIconColor = validIconColor;\n finalReadOnlyBorderColor = validBorderColor;\n break;\n case validity === \"invalid\":\n finalBorderColor = invalidBorderColor;\n finalIconColor = invalidIconColor;\n finalReadOnlyBorderColor = invalidBorderColor;\n break;\n case isHighlighted:\n finalBackgroundColor = highlightBackgroundColor;\n break;\n }\n\n return (\n <StyledTextInputWrapper\n $height=\"fit-content\"\n $width={wrapperWidth}\n $maxWidth={wrapperMaxWidth}\n $borderRadius=\"border-radius-s\"\n $ba=\"border-solid-m\"\n $borderColor={finalBorderColor}\n $focusRingDropShadows={focusRingDropShadows}\n $background={finalBackgroundColor}\n $hoverBackground={hoverBackground}\n $disabledBackgroundColor={disabledBackgroundColor}\n $readOnlyBorderColor={finalReadOnlyBorderColor}\n $disabledColor={disabledColor}\n $readOnlyColor={readOnlyColor}\n $color={color}\n $alignItems=\"center\"\n $position=\"relative\"\n $gap=\"space-between-s\"\n $ph=\"inner-padding-l\"\n $disabled={!!props.disabled}\n $readOnly={!!props.readOnly}\n onClick={(event) => {\n event.currentTarget.querySelector(\"input\")?.focus();\n }}\n >\n {!isTrailingIcon && iconName && (\n <OakIcon\n iconName={iconName}\n $colorFilter={finalIconColor}\n $pointerEvents=\"none\"\n $width={\"all-spacing-7\"}\n alt={iconAlt}\n />\n )}\n\n <OakFlex $flexGrow={1}>\n <InternalTextInput\n type={type}\n {...props}\n $width={\"100%\"}\n $pv=\"inner-padding-l\"\n $height=\"all-spacing-12\"\n />\n </OakFlex>\n {isTrailingIcon && iconName && (\n <OakIcon\n iconName={iconName}\n $colorFilter={finalIconColor}\n $pointerEvents=\"none\"\n $width={\"all-spacing-7\"}\n alt={iconAlt}\n />\n )}\n </StyledTextInputWrapper>\n );\n};\n","import React from \"react\";\n\nimport {\n OakBox,\n OakIcon,\n OakIconProps,\n OakImage,\n OakImageProps,\n} from \"@/components/atoms\";\n\ntype ImageProps = OakImageProps & {\n iconName?: undefined;\n};\n\ntype IconProps = OakIconProps & {\n src?: undefined;\n};\n\nexport type OakRoundIconProps = IconProps | ImageProps;\n\n/**\n * A wrapper around `OakIcon` which applies a rounded background.\n * Supports either an icon name or an image src\n */\nexport const OakRoundIcon = ({\n $background = \"bg-decorative5-main\",\n $borderRadius = \"border-radius-circle\",\n $width = \"all-spacing-9\",\n $height = \"all-spacing-9\",\n $pa = \"inner-padding-ssx\",\n className,\n ...rest\n}: OakRoundIconProps) => {\n const icon = rest.iconName ? (\n <OakIcon {...rest} $height=\"100%\" $width=\"100%\" />\n ) : (\n <OakImage {...rest} $height=\"100%\" $width=\"100%\" />\n );\n\n return (\n <OakBox\n className={className}\n $background={$background}\n $borderRadius={$borderRadius}\n $width={$width}\n $height={$height}\n $pa={$pa}\n >\n {icon}\n </OakBox>\n );\n};\n","import React, { ReactNode } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { OakFlex, OakFlexProps } from \"../OakFlex\";\n\nimport { OakCombinedColorToken } from \"@/styles\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { ColorStyleProps } from \"@/styles/utils/colorStyle\";\nimport { responsiveStyle } from \"@/styles/utils/responsiveStyle\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\nexport type InternalTooltipProps = OakFlexProps & {\n children?: ReactNode;\n tooltipPosition?: \"bottom-left\" | \"bottom-right\" | \"top-left\" | \"top-right\";\n};\n\nconst StyledFlex = styled(OakFlex)`\n width: max-content;\n pointer-events: none;\n`;\n\ntype StyledSvgProps = {\n $fill: ColorStyleProps[\"$background\"];\n $tooltipPosition?: InternalTooltipProps[\"tooltipPosition\"];\n};\n\nconst ARROW_SIZE = parseSpacing(\"all-spacing-4\");\n\nconst StyledSvg = styled.svg<StyledSvgProps>`\n position: absolute;\n ${({ $tooltipPosition }) => {\n switch ($tooltipPosition) {\n case \"bottom-right\":\n return css`\n top: -${ARROW_SIZE};\n right: ${parseSpacing(\"all-spacing-0\")};\n transform: scale(-1, -1);\n `;\n case \"top-right\":\n return css`\n bottom: -${ARROW_SIZE};\n right: ${parseSpacing(\"all-spacing-0\")};\n transform: scaleX(-1);\n `;\n case \"top-left\":\n return css`\n bottom: -${ARROW_SIZE};\n left: ${parseSpacing(\"all-spacing-0\")};\n `;\n default:\n return css`\n top: -${ARROW_SIZE};\n left: ${parseSpacing(\"all-spacing-0\")};\n transform: scaleY(-1);\n `;\n }\n }}\n ${responsiveStyle<StyledSvgProps, OakCombinedColorToken>(\n \"fill\",\n (props) => props.$fill,\n parseColor,\n )}\n`;\n\n/**\n * A primitive tooltip to be used as a basis for more opinionated UI components.\n */\nexport const InternalTooltip = ({\n children,\n $background = \"black\",\n $color = \"text-inverted\",\n tooltipPosition = \"bottom-left\",\n ...props\n}: InternalTooltipProps) => {\n return (\n <StyledFlex\n role=\"tooltip\"\n {...props}\n $position=\"relative\"\n $background={$background}\n $color={$color}\n $maxWidth={[\"all-spacing-20\", \"all-spacing-22\"]}\n >\n {children}\n <StyledSvg\n width={ARROW_SIZE}\n height={ARROW_SIZE}\n $fill={$background}\n $tooltipPosition={tooltipPosition}\n data-testid=\"tooltip-arrow\"\n >\n <path d=\"M0 0H16L8 8L0 16V0Z\" />\n </StyledSvg>\n </StyledFlex>\n );\n};\n","import React, {\n ReactElement,\n ReactNode,\n useLayoutEffect,\n useState,\n} from \"react\";\nimport { createPortal } from \"react-dom\";\n\nimport {\n InternalTooltip,\n InternalTooltipProps,\n} from \"@/components/atoms/InternalTooltip/InternalTooltip\";\nimport { OakBox, OakBoxProps } from \"@/components/atoms\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\nexport type OakTooltipProps = Pick<InternalTooltipProps, \"tooltipPosition\"> & {\n /**\n * The target element that triggers the tooltip\n */\n children: ReactElement;\n /**\n * The content of the tooltip\n */\n tooltip: ReactNode;\n /**\n * Whether the tooltip is open or not\n */\n isOpen?: boolean;\n /**\n * The DOM container to render the tooltip portal into\n *\n * @default document.body\n */\n domContainer?: Element;\n};\n\n/**\n * A tooltip with oven-ready styling and positioning.\n */\nexport const OakTooltip = ({\n tooltipPosition,\n children,\n tooltip,\n isOpen,\n domContainer = document.body,\n ...props\n}: OakTooltipProps) => {\n const [targetElement, setTargetElement] = useState<Element | null>(null);\n /**\n * The overlay is positioned on top of the target element in a portal.\n * It tracks the target's size and position.\n *\n * we use it to position the tooltip relative to the target element without interfering\n * with the page layout\n */\n const [overlayStyle, setOverlayStyle] = useState<{\n top: number;\n left: number;\n width: number;\n height: number;\n }>();\n const squaredCornerRadiusProp: keyof InternalTooltipProps = (() => {\n switch (tooltipPosition) {\n case \"bottom-right\":\n return \"$btrr\";\n case \"top-right\":\n return \"$bbrr\";\n case \"top-left\":\n return \"$bblr\";\n default:\n return \"$btlr\";\n }\n })();\n const borderRadiusProps: Partial<InternalTooltipProps> = {\n $borderRadius: \"border-radius-m\",\n [squaredCornerRadiusProp]: \"border-radius-square\",\n };\n\n useLayoutEffect(() => {\n if (!targetElement) {\n return;\n }\n\n const updateOverlayStyle = () => {\n const rect = targetElement.getBoundingClientRect();\n\n setOverlayStyle({\n top: rect.top,\n left: rect.left,\n width: rect.width,\n height: rect.height,\n });\n };\n\n const observer = new ResizeObserver(updateOverlayStyle);\n observer.observe(targetElement);\n observer.observe(document.documentElement);\n\n return () => {\n observer.disconnect();\n };\n }, [targetElement]);\n\n return (\n <>\n {createPortal(\n isOpen && (\n <OakBox\n $position=\"absolute\"\n style={overlayStyle}\n $pointerEvents=\"none\"\n $zIndex=\"modal-dialog\"\n >\n <OakBox\n $width=\"fit-content\"\n $height=\"fit-content\"\n $position=\"absolute\"\n {...getTooltipPositionProps(tooltipPosition)}\n >\n <InternalTooltip\n $background=\"bg-decorative5-main\"\n $color=\"text-primary\"\n $pv=\"inner-padding-m\"\n $ph=\"inner-padding-xl\"\n $font=\"heading-light-7\"\n tooltipPosition={tooltipPosition}\n {...props}\n {...borderRadiusProps}\n >\n {tooltip}\n </InternalTooltip>\n </OakBox>\n </OakBox>\n ),\n domContainer,\n )}\n <div\n ref={(domElement) => {\n setTargetElement(domElement?.firstElementChild ?? null);\n }}\n style={{ display: \"contents\" }}\n >\n {children}\n </div>\n </>\n );\n};\n\nfunction getTooltipPositionProps(\n tooltipPosition: OakTooltipProps[\"tooltipPosition\"],\n) {\n const props: Partial<OakBoxProps> = {};\n\n switch (tooltipPosition) {\n case \"top-left\":\n case \"top-right\":\n props.$top = \"space-between-none\";\n props.$transform = `translateY(calc(-100% - ${parseSpacing(\n \"space-between-s\",\n )}))`;\n break;\n default:\n props.$bottom = \"space-between-none\";\n props.$transform = `translateY(calc(100% + ${parseSpacing(\n \"space-between-s\",\n )}))`;\n break;\n }\n\n switch (tooltipPosition) {\n case \"top-left\":\n case \"bottom-left\":\n props.$left = \"space-between-none\";\n break;\n default:\n props.$right = \"space-between-none\";\n break;\n }\n\n return props;\n}\n","import React, { ElementType, ComponentPropsWithoutRef } from \"react\";\nimport styled from \"styled-components\";\n\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseColorFilter } from \"@/styles/helpers/parseColorFilter\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { OakIcon } from \"@/components/atoms\";\n\nexport type OakBackLinkProps<C extends ElementType> = {\n as?: C;\n label?: string;\n} & ComponentPropsWithoutRef<C>;\n\nconst StyledBackLink = styled.a`\n border-radius: 50%;\n display: flex;\n width: fit-content;\n height: fit-content;\n border: none;\n padding: 0;\n outline: none;\n\n img {\n pointer-events: none;\n }\n\n &:not(:disabled) {\n cursor: pointer;\n }\n\n &:active {\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")},\n ${parseDropShadow(\"drop-shadow-grey\")};\n }\n\n &:hover,\n &:focus-visible {\n background: ${parseColor(\"bg-btn-primary\")};\n\n img {\n filter: ${parseColorFilter(\"text-inverted\")};\n }\n }\n\n &:focus-visible {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n\n &:disabled {\n background: ${parseColor(\"bg-btn-primary-disabled\")};\n\n img {\n filter: ${parseColorFilter(\"text-inverted\")};\n }\n }\n`;\n\n/**\n * Used to navigate the user back to the previous page in the app.\n *\n * Polymorphic rendering as any HTML element or component using `as` — defaults to `a`.\n *\n * E.g.\n *\n * * Default (Anchor) `<OakBackLink href=\"https://www.thenational.academy/\" />`\n * * Button `<OakBackLink as=\"button\" onClick={() => goBack(-1)} />`\n */\nexport const OakBackLink = <C extends ElementType = \"a\">({\n as,\n label = \"Back\",\n ...props\n}: OakBackLinkProps<C>) => {\n return (\n <StyledBackLink as={as ?? \"a\"} aria-label={label} {...props}>\n <OakIcon\n alt=\"\"\n iconName=\"chevron-left\"\n $width=\"all-spacing-8\"\n $height=\"all-spacing-8\"\n />\n </StyledBackLink>\n );\n};\n","import styled from \"styled-components\";\n\nimport { OakFlex, OakFlexProps } from \"@/components/atoms/OakFlex\";\n\nexport type InternalCardProps = OakFlexProps;\n\n/**\n *\n * InternalCard extends OakFlex. It has all the props of OakFlex, but applies default styles for consistency.\n *\n */\nconst InternalCard = styled(OakFlex)``;\n\nInternalCard.defaultProps = {\n $pa: \"inner-padding-xl\",\n $flexDirection: \"column\",\n $flexGrow: 1,\n $position: \"relative\",\n};\n\nexport { InternalCard };\n","import React, { ReactElement } from \"react\";\nimport styled from \"styled-components\";\n\nimport { InternalCard, InternalCardProps } from \"../InternalCard/InternalCard\";\nimport { OakBox } from \"../OakBox\";\n\nexport type InternalCardWithBackgroundElementProps = InternalCardProps & {\n backgroundElement: ReactElement;\n};\n\n/**\n * The `backgroundElement` should be sized to fit the entire card\n */\nconst StyledBackgroundBox = styled(OakBox)`\n & > * {\n width: 100%;\n height: 100%;\n }\n`;\n\n/**\n * A flexed card with a presentational background element positioned behind the card contents.\n */\nexport const InternalCardWithBackgroundElement = ({\n backgroundElement,\n children,\n ...props\n}: InternalCardWithBackgroundElementProps) => {\n return (\n <InternalCard {...props}>\n <StyledBackgroundBox\n $position=\"absolute\"\n $inset=\"space-between-none\"\n aria-hidden\n >\n {backgroundElement}\n </StyledBackgroundBox>\n <OakBox $position=\"relative\">{children}</OakBox>\n </InternalCard>\n );\n};\n","import { OakBorderWidthToken, oakBorderWidthTokens } from \"../theme\";\n\nimport pxToRem from \"./pxToRem\";\n\nexport function parseBorderWidth(\n value: OakBorderWidthToken | null | undefined,\n) {\n if (!value) {\n return undefined;\n }\n\n if (value in oakBorderWidthTokens) {\n return `${pxToRem(oakBorderWidthTokens[value])}rem`;\n }\n}\n","import styled from \"styled-components\";\n\nimport { OakBorderWidthToken, OakCombinedColorToken } from \"@/styles\";\nimport {\n ResponsiveValues,\n responsiveStyle,\n} from \"@/styles/utils/responsiveStyle\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseBorderWidth } from \"@/styles/helpers/parseBorderWidth\";\n\nexport type InternalStyledSvgProps = {\n $fill?: ResponsiveValues<OakCombinedColorToken>;\n $stroke?: ResponsiveValues<OakCombinedColorToken>;\n $strokeWidth?: ResponsiveValues<OakBorderWidthToken>;\n};\n\n/**\n * A styled SVG element with props to apply design tokens to the fill and stroke.\n */\nexport const InternalStyledSvg = styled.svg<InternalStyledSvgProps>`\n ${responsiveStyle<InternalStyledSvgProps, OakCombinedColorToken>(\n \"fill\",\n (props) => props.$fill,\n parseColor,\n )}\n ${responsiveStyle<InternalStyledSvgProps, OakCombinedColorToken>(\n \"stroke\",\n (props) => props.$stroke,\n parseColor,\n )}\n ${responsiveStyle<InternalStyledSvgProps, OakBorderWidthToken>(\n \"stroke-width\",\n (props) => props.$strokeWidth,\n parseBorderWidth,\n )}\n`;\n","import React from \"react\";\n\nimport {\n InternalCardWithBackgroundElement,\n InternalCardWithBackgroundElementProps,\n} from \"@/components/atoms/InternalCardWithBackgroundElement/InternalCardWithBackgroundElement\";\nimport {\n InternalStyledSvg,\n InternalStyledSvgProps,\n} from \"@/components/atoms/InternalStyledSvg\";\n\nexport type OakHandDrawnCardProps = Omit<\n InternalCardWithBackgroundElementProps,\n \"backgroundElement\"\n> & {\n fill?: InternalStyledSvgProps[\"$fill\"];\n stroke?: InternalStyledSvgProps[\"$stroke\"];\n strokeWidth?: InternalStyledSvgProps[\"$strokeWidth\"];\n};\n\n/**\n * A flexed card with a hand-drawn filled background\n *\n * An optional `stroke` and `strokeWidth` can be applied to give the background a border\n */\nexport const OakHandDrawnCard = ({\n $pa = \"inner-padding-xl\",\n fill = \"bg-decorative1-main\",\n stroke,\n strokeWidth,\n $width = \"fit-content\",\n ...props\n}: OakHandDrawnCardProps) => {\n return (\n <InternalCardWithBackgroundElement\n $pa={$pa}\n $width={$width}\n backgroundElement={\n <InternalStyledSvg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 457 120\"\n preserveAspectRatio=\"none\"\n $fill={fill}\n $stroke={stroke}\n $strokeWidth={strokeWidth}\n >\n <path\n d=\"M27.442 2.59c5.262-.362 11.96-.656 18.624-.932 4.374-.19 8.748-.371 12.712-.578 1.367-.07 3.042-.087 4.716-.095C65.032.976 66.57.959 67.903.907 91.858-.017 115.164.268 139.325.57l6.22.078c20.333.12 40.768.086 61.033-.13 6.664-.025 13.294-.043 19.957-.06C243.656.415 260.777.363 277.83.234c8.85-.07 17.667-.052 26.518-.035 12.132.026 24.366.052 36.771-.147 8.475-.138 17.633.087 26.757.302 3.725.087 7.45.182 11.107.25 3.69.061 7.347.139 10.969.217 4.511.095 8.988.19 13.499.259 13.464.207 30.619 1.519 30.619 1.519 3.588.449 7.074 1.32 10.286 2.59 2.973 1.304 4.682 4.135 6.391 6.967.717 1.165 1.435 2.33 2.221 3.384.273.363.342.812.376 1.26.034.406.102.82.307 1.175 3.52 6.388 2.427 12.604 1.299 19.044a27.243 27.243 0 0 0-.273 1.658 70.082 70.082 0 0 0 .478 16.273l.205 5.31c.171 4.575.342 9.133.854 13.683.274 2.357.205 4.705.137 7.07-.102 3.238-.205 6.492.547 9.808.547 2.261-.308 4.705-1.162 7.13-.342.993-.684 1.986-.923 2.962-.239.984-.546 1.951-.82 2.926-.342 1.2-.718 2.392-.991 3.6-1.196 5.379-4.511 8.435-11.756 9.134-2.392.233-4.75.518-7.142.855h-6.937c-5.263.371-11.961.656-18.624.932-4.375.19-8.749.371-12.713.579-1.367.069-3.041.086-4.716.095-1.538.008-3.075.025-4.408.086-23.956.924-47.262.639-71.422.337l-6.186-.078a3693.945 3693.945 0 0 0-61.033.129c-6.664.026-13.294.044-19.958.061-17.121.043-34.241.095-51.294.224-8.851.069-17.667.052-26.518.035-12.132-.026-24.366-.052-36.771.147-8.475.138-17.633-.087-26.758-.303-3.725-.086-7.45-.181-11.106-.25-3.69-.06-7.313-.138-10.97-.216-4.51-.095-8.987-.19-13.498-.259-18.932-.293-30.175-1.079-33.66-2.754-1.47-.38-2.871-.837-4.238-1.355-3.076-1.304-4.887-4.135-6.664-6.967-.752-1.165-1.47-2.331-2.29-3.384-.273-.363-.341-.812-.376-1.261-.034-.405-.102-.82-.307-1.174C0 95.664 1.128 89.448 2.324 83.008l.308-1.658c.478-5.421.341-10.869-.513-16.273-.102-1.77-.17-3.548-.24-5.318-.17-4.567-.375-9.125-.888-13.675-.273-2.357-.205-4.705-.136-7.07.102-3.238.205-6.493-.581-9.808-.547-2.262.341-4.705 1.196-7.13.342-.994.717-1.986.99-2.962.24-.984.548-1.96.855-2.927.376-1.2.752-2.39 1.025-3.6C5.605 7.21 9.022 4.154 16.574 3.455c2.495-.233 10.936-.855 10.936-.855l-.069-.009Z\"\n vectorEffect=\"non-scaling-stroke\"\n />\n </InternalStyledSvg>\n }\n {...props}\n />\n );\n};\n","import React from \"react\";\n\nimport { OakHandDrawnCardProps, OakHandDrawnCard } from \"../OakHandDrawnCard\";\n\nimport { OakIcon, OakIconProps } from \"@/components/atoms\";\n\nexport type OakHandDrawnBoxWithIconProps = Omit<\n OakHandDrawnCardProps,\n \"children\"\n> & {\n iconName: OakIconProps[\"iconName\"];\n alt?: OakIconProps[\"alt\"];\n iconColor?: OakIconProps[\"$colorFilter\"];\n iconWidth?: OakIconProps[\"$width\"];\n iconHeight?: OakIconProps[\"$height\"];\n};\n\n/**\n * A hand-drawn card with an icon in the center\n */\nexport const OakHandDrawnCardWithIcon = ({\n iconName,\n iconColor = \"text-primary\",\n iconWidth = [\"all-spacing-11\", \"all-spacing-16\"],\n iconHeight = [\"all-spacing-11\", \"all-spacing-16\"],\n alt,\n $width = [\"all-spacing-13\", \"all-spacing-17\"],\n $height = [\"all-spacing-13\", \"all-spacing-17\"],\n $alignItems = \"center\",\n $justifyContent = \"center\",\n ...props\n}: OakHandDrawnBoxWithIconProps) => {\n return (\n <OakHandDrawnCard\n $width={$width}\n $height={$height}\n $alignItems={$alignItems}\n $justifyContent={$justifyContent}\n {...props}\n >\n <OakIcon\n iconName={iconName}\n alt={alt}\n $height={iconHeight}\n $width={iconWidth}\n $colorFilter={iconColor}\n />\n </OakHandDrawnCard>\n );\n};\n","import React from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakFlex, OakSpan } from \"@/components/atoms\";\nimport { InternalStyledSvg } from \"@/components/atoms/InternalStyledSvg\";\n\nconst StyledPromoTag = styled(OakFlex)`\n aspect-ratio: 2 / 1;\n`;\n\n/**\n * Renders a tag with the text \"New\"\n */\nexport const OakPromoTag = () => {\n return (\n <StyledPromoTag\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $position=\"relative\"\n $width={[\"all-spacing-8\", \"all-spacing-9\", \"all-spacing-10\"]}\n >\n <InternalStyledSvg\n height=\"100%\"\n width=\"100%\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 56 27\"\n $fill=\"bg-icon\"\n >\n <path d=\"M6.421 0c8.661.839 17.303.834 26.16.714a89.843 89.843 0 0 1 4.834-.013c6.333.32 12.39.317 18.506-.275 0 1.26.178 2.352 0 3.44-.276 1.38-.829 2.759-1.342 4.15-.138.354-.532.706-.808 1.06-.445.248-.63.5-.553.753 1.598 1.093-.256 2.185 0 3.277.276 1.529 1.322 3.058 1.204 4.572-.138 1.771-1.046 3.543-1.973 5.312-.288.4-1.065.792-2.309 1.169-2.288.755-4.103 1.67-11.206 1.965-9.936.417-20.953.385-30.678-.09-2.447-.12-4.38-.532-5.209-.853-1.035-.458-1.52-.929-1.44-1.4C.937 18.988-.109 14.194.01 9.4c0-2.645 1.973-5.29 3.413-7.933.237-.424 1.697-.839 3-1.468Z\" />\n </InternalStyledSvg>\n <OakFlex\n $position=\"absolute\"\n $inset=\"all-spacing-0\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <OakSpan\n $color=\"lemon\"\n $font={[\"body-3-bold\", \"body-3-bold\", \"heading-7\"]}\n >\n New\n </OakSpan>\n </OakFlex>\n </StyledPromoTag>\n );\n};\n","import React, { ComponentProps } from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex } from \"@/components/atoms\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { parseBorderRadius } from \"@/styles/helpers/parseBorderRadius\";\n\nexport type OakCollapsibleContentProps = ComponentProps<typeof OakFlex> & {\n /**\n * Whether the content is displayed or not\n */\n isOpen: boolean;\n};\n\nconst StyledScrollBox = styled(OakBox)`\n &::-webkit-scrollbar-thumb {\n border-radius: ${parseBorderRadius(\"border-radius-m\")};\n background-color: ${parseColor(\"grey50\")};\n }\n &::-webkit-scrollbar-track {\n border-radius: ${parseBorderRadius(\"border-radius-m\")};\n background-color: ${parseColor(\"white\")};\n }\n &::-webkit-scrollbar {\n width: ${parseSpacing(\"all-spacing-3\")};\n height: ${parseSpacing(\"all-spacing-3\")};\n border-radius: ${parseBorderRadius(\"border-radius-m\")};\n }\n`;\n\n/**\n * A filled scrollable box that can be hidden with the `isOpen` prop.\n * Useful for hiding content that is not immediately relevant\n */\nexport const OakCollapsibleContent = ({\n isOpen,\n children,\n id,\n ...rest\n}: OakCollapsibleContentProps) => {\n return (\n <OakBox $display={isOpen ? \"block\" : \"none\"} id={id}>\n <OakFlex\n $background=\"bg-neutral-stronger\"\n $ph=\"inner-padding-m\"\n $pv=\"inner-padding-xl\"\n $borderRadius=\"border-radius-m\"\n {...rest}\n >\n <StyledScrollBox\n $overflow=\"auto\"\n $maxHeight=\"100%\"\n $width=\"100%\"\n $pr=\"inner-padding-m\"\n >\n {children}\n </StyledScrollBox>\n </OakFlex>\n </OakBox>\n );\n};\n","import React, { ElementType, forwardRef } from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakLoadingSpinner } from \"../OakLoadingSpinner\";\n\nimport {\n PolymorphicPropsWithRef,\n PolymorphicRef,\n} from \"@/components/polymorphic\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { parseBorderRadius } from \"@/styles/helpers/parseBorderRadius\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { OakFlex, OakIcon, OakIconProps, OakSpan } from \"@/components/atoms\";\nimport { parseColorFilter } from \"@/styles/helpers/parseColorFilter\";\n\nconst StyledOakIcon = styled(OakIcon)`\n width: ${parseSpacing(\"all-spacing-6\")};\n height: ${parseSpacing(\"all-spacing-6\")};\n`;\n\nconst StyledLink = styled.a`\n display: inline-flex;\n align-items: center;\n gap: ${parseSpacing(\"space-between-sssx\")};\n outline: none;\n border-radius: ${parseBorderRadius(\"border-radius-m\")};\n padding: ${parseSpacing(\"inner-padding-ssx\")};\n margin: -${parseSpacing(\"inner-padding-ssx\")};\n appearance: none;\n font: inherit;\n background: none;\n border: none;\n text-decoration: underline;\n cursor: pointer;\n\n color: ${parseColor(\"text-link-active\")};\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"text-link-active\")};\n }\n\n &:focus-visible {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n\n &:visited {\n color: ${parseColor(\"text-link-visited\")};\n\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"text-link-visited\")};\n }\n }\n\n @media (hover: hover) {\n &:hover,\n &:visited:hover {\n color: ${parseColor(\"text-link-hover\")};\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"text-link-hover\")};\n }\n }\n }\n\n &:active {\n color: ${parseColor(\"text-link-pressed\")};\n\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"text-link-pressed\")};\n }\n }\n\n &[disabled] {\n cursor: not-allowed;\n color: ${parseColor(\"text-disabled\")};\n\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"icon-disabled\")};\n }\n }\n`;\n\nexport type OakLinkProps = {\n iconName?: OakIconProps[\"iconName\"];\n isTrailingIcon?: boolean;\n isLoading?: boolean;\n};\n\ntype OakLinkComponent = <C extends React.ElementType = \"a\">(\n props: PolymorphicPropsWithRef<C> & OakLinkProps,\n) => React.ReactNode;\n\n/**\n * A blue link with an optional icon and loading state.\n *\n * Defaulting to a `HTMLAnchorElement` this component is polymorphic and can be rendered as a button or any other element.\n */\nexport const OakLink: OakLinkComponent = forwardRef(\n <C extends ElementType = \"a\">(\n props: PolymorphicPropsWithRef<C> & OakLinkProps,\n ref: PolymorphicRef<C>,\n ) => {\n const {\n element = \"a\",\n iconName,\n isTrailingIcon,\n children,\n isLoading,\n ...rest\n } = props;\n const icon = (() => {\n switch (true) {\n case isLoading:\n return (\n <OakFlex\n $width=\"all-spacing-6\"\n $height=\"all-spacing-6\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <OakLoadingSpinner\n $width=\"all-spacing-4\"\n $color=\"icon-inverted\"\n />\n </OakFlex>\n );\n case !!iconName:\n return <StyledOakIcon iconName={iconName} />;\n default:\n return null;\n }\n })();\n const disabled = (() => {\n switch (true) {\n case \"disabled\" in rest:\n return rest.disabled;\n case isLoading:\n return true;\n default:\n return undefined;\n }\n })();\n\n return (\n <StyledLink as={element} ref={ref} disabled={disabled} {...rest}>\n {!isTrailingIcon && icon}\n <OakSpan>{children}</OakSpan>\n {isTrailingIcon && icon}\n </StyledLink>\n );\n },\n);\n","import React, { ComponentPropsWithoutRef } from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex, OakIcon, OakKbd } from \"@/components/atoms\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\n\n/**\n * Adds additional leading between each line of text to make room for the\n * keyboard instructions wrapped in `<OakKbd>`\n *\n * This might be a useful atom to extract\n */\nconst StyledLeadingTrim = styled(OakBox)`\n margin-block: calc(-${parseSpacing(\"space-between-ssx\")} / 2);\n line-height: calc(1.5rem + ${parseSpacing(\"space-between-ssx\")});\n`;\n\n/**\n * Displays instructions for drag and drop functionality\n */\nexport const OakDragAndDropInstructions = (\n props: ComponentPropsWithoutRef<typeof OakFlex>,\n) => {\n return (\n <OakFlex $gap=\"space-between-ssx\" {...props}>\n <OakFlex $flexGrow={0}>\n <OakIcon iconName=\"move-arrows\" />\n </OakFlex>\n <StyledLeadingTrim $font=\"body-2\">\n Click and drag answers to change the order, or select using{\" \"}\n <OakKbd>\n <span aria-hidden=\"true\">↹</span> Tab\n </OakKbd>{\" \"}\n then move by pressing <OakKbd>Space</OakKbd> and the <OakKbd>↑</OakKbd>{\" \"}\n <OakKbd>↓</OakKbd> arrows on your keyboard.\n </StyledLeadingTrim>\n </OakFlex>\n );\n};\n","import React, {\n ComponentPropsWithRef,\n ComponentPropsWithoutRef,\n FC,\n forwardRef,\n} from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex, OakIcon } from \"@/components/atoms\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseBorder } from \"@/styles/helpers/parseBorder\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { IconName } from \"@/image-map\";\nimport { OakCombinedColorToken } from \"@/styles/theme/color\";\nimport { parseBorderWidth } from \"@/styles/helpers/parseBorderWidth\";\nimport { parseColorFilter } from \"@/styles/helpers/parseColorFilter\";\n\ntype OakDraggableProps = {\n /**\n * Whether the item is currently being dragged\n */\n isDragging?: boolean;\n /**\n * Present the element in a subdued state with hover effects disabled\n */\n isDisabled?: boolean;\n /**\n * Read only\n *\n * Disables hover effects\n */\n isReadOnly?: boolean;\n /**\n * Icon to display\n */\n iconName?: IconName;\n /**\n * Icon color when not being dragged or hovered\n */\n iconColor?: OakCombinedColorToken;\n /**\n * The alt text for the icon\n */\n iconAlt?: string;\n /**\n * The background color of the draggable when not being dragged or hovered\n */\n background?: OakCombinedColorToken;\n /**\n * The color of the draggable when not being dragged or hovered\n */\n color?: OakCombinedColorToken;\n};\n\nconst StyledOakIcon = styled(OakIcon)``;\n\nconst StyledDraggable = styled(OakBox)<{ $iconColor: OakCombinedColorToken }>`\n cursor: grab;\n outline: none;\n user-select: none;\n\n ${StyledOakIcon} {\n filter: ${(props) => parseColorFilter(props.$iconColor)};\n }\n\n @media (hover: hover) {\n &:hover:not([data-dragging=\"true\"]):not([data-disabled=\"true\"]):not(\n [data-readonly=\"true\"]\n ) {\n background-color: ${parseColor(\"bg-decorative1-subdued\")};\n color: ${parseColor(\"text-primary\")};\n box-shadow: ${parseDropShadow(\"drop-shadow-standard\")};\n border-bottom: ${parseBorder(\"border-solid-xl\")}\n ${parseColor(\"border-primary\")};\n padding-bottom: ${parseSpacing(\"inner-padding-m\")};\n text-decoration: underline;\n\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"icon-inverted\")};\n }\n }\n }\n\n &:focus-visible:not([data-dragging=\"true\"]):not([data-disabled=\"true\"]) {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n\n &[data-dragging=\"true\"] {\n cursor: move;\n background-color: ${parseColor(\"bg-decorative1-main\")};\n color: ${parseColor(\"text-primary\")};\n outline: ${parseBorder(\"border-solid-xl\")} ${parseColor(\"border-primary\")};\n outline-offset: -${parseBorderWidth(\"border-solid-xl\")};\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")},\n ${parseDropShadow(\"drop-shadow-grey\")};\n text-decoration: underline;\n\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"icon-inverted\")};\n }\n }\n\n &[data-disabled=\"true\"] {\n cursor: default;\n background-color: ${parseColor(\"bg-neutral\")};\n color: ${parseColor(\"text-disabled\")};\n\n ${StyledOakIcon} {\n filter: ${parseColorFilter(\"icon-disabled\")};\n }\n }\n\n &[data-readonly=\"true\"] {\n cursor: default;\n }\n`;\n\nconst StyledFlex = styled(OakFlex)`\n margin-block: -${parseSpacing(\"space-between-ssx\")};\n`;\n\n/**\n * The component has no intrinsic draggable functionality.\n * It is intended to be used with `useDraggable` from `@dnd-kit/core`\n */\nexport const OakDraggable: FC<\n ComponentPropsWithRef<OakDraggableProps & typeof OakBox>\n> = forwardRef<\n HTMLDivElement,\n OakDraggableProps & ComponentPropsWithoutRef<typeof OakBox>\n>(\n (\n {\n children,\n iconName = \"move-arrows\",\n iconColor = \"icon-inverted\",\n iconAlt = \"\",\n color = \"text-primary\",\n background = \"bg-primary\",\n isDragging,\n isDisabled,\n isReadOnly,\n ...props\n },\n ref,\n ) => {\n return (\n <StyledDraggable\n ref={ref}\n $pv=\"inner-padding-l\"\n $pl=\"inner-padding-s\"\n $pr=\"inner-padding-m\"\n $background={background}\n $color={color}\n $borderRadius=\"border-radius-m2\"\n $minHeight=\"all-spacing-10\"\n data-dragging={isDragging}\n data-disabled={isDisabled}\n data-readonly={isReadOnly}\n $iconColor={iconColor}\n {...props}\n >\n <StyledFlex $gap=\"space-between-s\" $alignItems=\"center\">\n <StyledOakIcon\n iconName={iconName}\n $width=\"all-spacing-7\"\n $height=\"all-spacing-7\"\n alt={iconAlt}\n />\n <OakFlex $font=\"body-1-bold\">{children}</OakFlex>\n </StyledFlex>\n </StyledDraggable>\n );\n },\n);\n","import React, {\n ComponentPropsWithRef,\n ComponentPropsWithoutRef,\n FC,\n ReactNode,\n forwardRef,\n} from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex } from \"@/components/atoms\";\nimport { parseBorder } from \"@/styles/helpers/parseBorder\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\n\nexport type OakDroppableProps = {\n /**\n * Indicates whether a draggable is currently being dragged over the droppable\n */\n isOver?: boolean;\n /**\n * Present the element in a state making it clear that it can be dropped into\n */\n isDisabled?: boolean;\n /**\n * Give the droppable a highlight to draw attention to it\n */\n isHighlighted?: boolean;\n /**\n * A slot for a label to be displayed to the RHS of the droppable\n *\n * useful for giving the user a hint about what to drop\n */\n labelSlot?: ReactNode;\n /**\n * A slot for the draggable that is currently occupying the droppable\n */\n children?: ReactNode;\n};\n\nconst StyledFlex = styled(OakFlex)`\n outline: ${parseBorder(\"border-solid-l\")} ${parseColor(\"border-primary\")};\n outline-style: dashed;\n\n &[data-disabled=\"true\"] {\n outline-color: ${parseColor(\"border-neutral\")};\n }\n`;\n\n/**\n * A drop zone for a draggable\n *\n * Has no intrinsic drop functionality.\n * It is intended to be used with `useDraggable` from `@dnd-kit/core`\n */\nexport const OakDroppable: FC<\n OakDroppableProps & ComponentPropsWithRef<typeof OakFlex>\n> = forwardRef<\n HTMLDivElement,\n OakDroppableProps & ComponentPropsWithoutRef<typeof OakFlex>\n>(\n (\n { children, labelSlot, isOver, isHighlighted, isDisabled, ...props },\n ref,\n ) => {\n const slotBackground = (() => {\n switch (true) {\n case isOver:\n return \"bg-primary\";\n case isDisabled:\n return \"bg-decorative2-subdued\";\n default:\n return \"bg-neutral\";\n }\n })();\n const background = (() => {\n switch (true) {\n case isOver:\n return \"bg-decorative2-main\";\n case isHighlighted:\n return \"bg-decorative5-main\";\n default:\n return \"bg-decorative2-subdued\";\n }\n })();\n\n return (\n <OakFlex\n ref={ref}\n $background={background}\n $pa=\"inner-padding-m\"\n $borderRadius=\"border-radius-l\"\n $gap=\"space-between-s\"\n $flexDirection={[\"column\", \"row\", \"row\"]}\n {...props}\n >\n <StyledFlex\n $background={slotBackground}\n $pa=\"inner-padding-ssx\"\n $borderRadius=\"border-radius-m2\"\n $minHeight=\"all-spacing-11\"\n $flexBasis=\"100%\"\n data-disabled={isDisabled}\n >\n <OakBox $width=\"100%\">{children}</OakBox>\n </StyledFlex>\n {labelSlot && (\n <OakFlex\n $background={isOver ? \"bg-primary\" : \"bg-decorative2-very-subdued\"}\n $borderRadius=\"border-radius-m2\"\n $alignItems=\"center\"\n $font=\"body-1\"\n $ph=\"inner-padding-l\"\n $minHeight=\"all-spacing-10\"\n $pv=\"inner-padding-ssx\"\n $flexBasis=\"100%\"\n $width=\"100%\"\n $alignSelf=\"center\"\n data-testid=\"label\"\n >\n {labelSlot}\n </OakFlex>\n )}\n </OakFlex>\n );\n },\n);\n","import React, { useRef } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { OakBox, OakFlex, OakFlexProps, OakIcon } from \"@/components/atoms\";\nimport { InternalCheckBoxWrapper } from \"@/components/atoms/InternalCheckBoxWrapper\";\nimport { InternalCheckBoxLabelHoverDecor } from \"@/components/atoms/InternalCheckBoxLabel\";\nimport {\n BaseCheckBoxProps,\n InternalCheckBox,\n} from \"@/components/atoms/InternalCheckBox/InternalCheckBox\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseBorder } from \"@/styles/helpers/parseBorder\";\nimport { parseBorderRadius } from \"@/styles/helpers/parseBorderRadius\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { OakCombinedColorToken } from \"@/styles\";\n\nconst StyledInternalCheckBox = styled(InternalCheckBox)`\n &:checked:not(:disabled) {\n border: ${parseBorder(\"border-solid-l\")};\n border-color: ${parseColor(\"border-primary\")};\n }\n\n &:checked:disabled {\n border: ${parseBorder(\"border-solid-l\")};\n border-color: ${parseColor(\"text-disabled\")};\n }\n\n @media (hover: hover) {\n &:hover:not(:disabled) {\n background: ${parseColor(\"bg-primary\")};\n }\n }\n`;\n\nconst StyledInternalCheckBoxLabelHoverDecor = styled(\n InternalCheckBoxLabelHoverDecor,\n)`\n pointer-events: none; // To prevent the label from stealing the click event from the input\n`;\n\ntype StyledFlexBoxProps = OakFlexProps & {\n $overlayBorderColor: OakCombinedColorToken;\n $feedbackBgColor?: OakCombinedColorToken;\n $outlineColor: OakCombinedColorToken;\n};\n\nconst StyledFlexBox = styled(OakFlex)<StyledFlexBoxProps>`\n &:not(:focus-within) {\n ${(props) =>\n !!props.$outlineColor &&\n css`\n outline: ${parseBorder(\"border-solid-xl\")}\n ${parseColor(props.$outlineColor)};\n `}\n }\n\n &:has(input:not(:disabled)) {\n cursor: pointer;\n }\n\n &:has(input:disabled) {\n pointer-events: none;\n cursor: none;\n }\n\n &:focus-within {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n\n @media (hover: hover) {\n &:hover:has(input:not(:disabled)){\n background-color: ${parseColor(\"bg-decorative1-subdued\")};\n }\n\n &:hover input:not(:disabled) {\n background: ${parseColor(\"bg-primary\")};\n }\n\n &:hover:has(input:not(:disabled)) ${InternalCheckBoxLabelHoverDecor} {\n text-decoration: underline;\n }\n\n &:hover:has(\n ${InternalCheckBoxLabelHoverDecor} input:not(:focus-visible):not(:checked):not(:disabled)\n )::after {\n content: \"\";\n inset: 0;\n pointer-events: none;\n position: absolute;\n border-bottom: ${parseBorder(\"border-solid-xl\")};\n border-radius: ${parseBorderRadius(\"border-radius-m2\")};\n }\n\n &:focus-within {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n \n &:has(input:checked:not(:disabled)) {\n outline: ${parseBorder(\"border-solid-xl\")};\n }\n\n &:has(input:checked:disabled) {\n outline-color: ${(props) => css`\n ${parseColor(props.$overlayBorderColor)}\n `};\n }\n\n &:has(input:disabled:not(:checked)) {\n ${(props) =>\n props.$feedbackBgColor\n ? css`\n background-color: ${props.$feedbackBgColor};\n `\n : undefined}\n }\n\n &:has(input:disabled:checked) {\n ${(props) => css`\n background-color: ${parseColor(props.$feedbackBgColor)};\n `};\n }\n`;\n\nexport type OakQuizCheckBoxProps = Omit<BaseCheckBoxProps, \"defaultChecked\"> & {\n feedback?: \"correct\" | \"incorrect\" | null;\n image?: React.JSX.Element;\n innerRef?: React.RefObject<HTMLInputElement>;\n displayValue?: string;\n /**\n * Give the field a highlight to draw attention to it\n */\n isHighlighted?: boolean;\n};\n\n/**\n * A checkbox representing the options in a multiple choice question.\n */\nexport const OakQuizCheckBox = (props: OakQuizCheckBoxProps) => {\n const {\n id,\n value,\n feedback,\n image,\n disabled,\n innerRef,\n displayValue,\n isHighlighted,\n ...rest\n } = props;\n\n const isFeedback = !!feedback;\n\n const defaultRef = useRef<HTMLInputElement>(null);\n const inputRef = innerRef ?? defaultRef;\n const showTick =\n (feedback === \"correct\" && inputRef.current?.checked) ||\n (feedback === \"incorrect\" && !inputRef.current?.checked);\n const showCross = feedback === \"incorrect\" && inputRef.current?.checked;\n\n const handleContainerClick = (\n e:\n | React.MouseEvent<HTMLDivElement>\n | React.MouseEvent<HTMLInputElement>\n | React.MouseEvent<HTMLLabelElement>,\n ) => {\n const inputId = (e.target as HTMLInputElement).id;\n\n if (inputId !== id) {\n inputRef.current?.click();\n }\n };\n\n const imageContainer = (\n <OakFlex\n $flexDirection=\"column\"\n $minWidth={\"all-spacing-20\"}\n $gap={\"space-between-s\"}\n >\n <OakBox>{image}</OakBox>\n {displayValue}\n </OakFlex>\n );\n\n const feedbackBgColor = showTick ? \"bg-correct\" : \"bg-incorrect\";\n const feedbackBorderColor = showTick ? \"border-success\" : \"border-error\";\n\n const inputCheckbox = (\n <StyledFlexBox\n $pa=\"inner-padding-l\"\n $borderRadius={\"border-radius-m2\"}\n $borderColor={\n isHighlighted ? \"border-decorative5-stronger\" : \"border-primary\"\n }\n $background={\n disabled && !isFeedback ? \"bg-neutral-stronger\" : \"bg-primary\"\n }\n $flexGrow={1}\n onClick={handleContainerClick}\n $overlayBorderColor={isFeedback ? feedbackBorderColor : \"text-disabled\"}\n $feedbackBgColor={isFeedback ? feedbackBgColor : undefined}\n $outlineColor={\n isHighlighted ? \"border-decorative5-stronger\" : \"transparent\"\n }\n >\n <StyledInternalCheckBoxLabelHoverDecor\n htmlFor={id}\n labelGap={\"space-between-s\"}\n labelAlignItems={\"center\"}\n $color={disabled && !isFeedback ? \"text-disabled\" : \"text-primary\"}\n $font={\"body-1\"}\n disabled={disabled}\n >\n <InternalCheckBoxWrapper\n size={\"all-spacing-7\"}\n iconPadding=\"inner-padding-ssx\"\n checkedIcon={\n <OakBox\n $width=\"100%\"\n $height=\"100%\"\n $background={\n disabled || isFeedback ? \"text-disabled\" : \"text-primary\"\n }\n >\n <OakBox\n $ba={\"border-solid-m\"}\n $borderColor={\"white\"}\n $width={\"100%\"}\n $height={\"100%\"}\n />\n </OakBox>\n }\n internalCheckbox={\n <StyledInternalCheckBox\n id={id}\n value={value}\n disabled={disabled || isFeedback}\n {...rest}\n $width={\"all-spacing-7\"}\n $height={\"all-spacing-7\"}\n $ba={\"border-solid-m\"}\n $borderColor=\"border-neutral\"\n $borderRadius={\"border-radius-s\"}\n $background={isHighlighted ? \"bg-decorative5-main\" : \"bg-primary\"}\n $checkedBackground={null}\n ref={inputRef}\n />\n }\n />\n {image ? imageContainer : displayValue}\n </StyledInternalCheckBoxLabelHoverDecor>\n {isFeedback && (showTick || showCross) && (\n <OakFlex\n className=\"feedbackIconWrapper\"\n $flexGrow={1}\n $justifyContent={\"flex-end\"}\n $alignItems={\"flex-end\"}\n $height={\"100%\"}\n >\n {showTick && (\n <OakIcon\n iconName={\"tick\"}\n $colorFilter={\"icon-success\"}\n alt={\n feedback === \"correct\" ? \"Correct\" : \"Unselected correct choice\"\n }\n />\n )}\n {showCross && (\n <OakIcon\n iconName={\"cross\"}\n $colorFilter={\"icon-error\"}\n alt={\"Incorrect\"}\n />\n )}\n </OakFlex>\n )}\n </StyledFlexBox>\n );\n\n return (\n <OakFlex $width={\"100%\"} $position={\"relative\"}>\n {inputCheckbox}\n </OakFlex>\n );\n};\n","import React, { MouseEventHandler, useContext } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport { OakBox, OakFlex, OakIcon } from \"@/components/atoms\";\nimport {\n OakRadioButton,\n OakRadioButtonProps,\n} from \"@/components/molecules/OakRadioButton/OakRadioButton\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { parseBorder } from \"@/styles/helpers/parseBorder\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { parseBorderRadius } from \"@/styles/helpers/parseBorderRadius\";\nimport { RadioContext } from \"@/components/molecules/OakRadioGroup/OakRadioGroup\";\nimport { OakUiRoleToken } from \"@/styles\";\n\nexport type OakQuizRadioButtonProps = OakRadioButtonProps & {\n /**\n * Present the element with answer feedback\n */\n feedback?: \"correct\" | \"incorrect\" | null;\n /**\n * An image to display above the label\n */\n image?: JSX.Element;\n /**\n * Give the field a highlight to draw attention to it\n */\n isHighlighted?: boolean;\n};\n\ntype StyledOakFlexProps = {\n $disabled: boolean;\n $checked: boolean;\n $outlineColor?: OakUiRoleToken;\n};\n\nconst StyledOakFlex = styled(OakFlex)<StyledOakFlexProps>`\n &:not(:focus-within) {\n ${(props) =>\n !!props.$outlineColor &&\n css`\n outline: ${parseBorder(\"border-solid-xl\")}\n ${parseColor(props.$outlineColor)};\n `}\n }\n\n &:hover {\n cursor: ${(props) => (props.$disabled ? \"default\" : \"pointer\")};\n }\n\n &:focus-within {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n\n ${(props) =>\n !props.$disabled &&\n css`\n &:hover {\n background-color: ${parseColor(\"bg-decorative1-subdued\")};\n text-decoration: underline;\n }\n `}\n\n ${(props) =>\n !props.$disabled &&\n !props.$checked &&\n css`\n &:hover:not(:focus-within)::after {\n pointer-events: none;\n content: \"\";\n position: absolute;\n inset: 0;\n border-radius: ${parseBorderRadius(\"border-radius-m2\")};\n border-bottom: ${parseBorder(\"border-solid-l\")} ${parseColor(\"grey60\")};\n }\n `}\n`;\n\n/**\n * A radio button representing the options in a multiple choice question.\n *\n * Use with `OakRadioGroup` to create a group of radio buttons.\n */\nexport const OakQuizRadioButton = (props: OakQuizRadioButtonProps) => {\n const { value, feedback, image, disabled, isHighlighted, label, ...rest } =\n props;\n const showFeedback = !!feedback;\n // Give the input focus when the entire component is clicked\n const handleOnClick: MouseEventHandler<HTMLElement> = (event) => {\n event.currentTarget.querySelector(\"input\")?.click();\n };\n const checked = useContext(RadioContext).currentValue === value;\n let outlineColor: OakUiRoleToken | undefined;\n let backgroundColor: OakUiRoleToken = \"bg-primary\";\n let feedbackIcon: \"tick\" | \"cross\" | null = null;\n let feedbackAltText: string | undefined;\n let radioBackground: OakUiRoleToken = \"bg-primary\";\n\n switch (true) {\n case disabled && !showFeedback:\n backgroundColor = \"bg-neutral-stronger\";\n break;\n case feedback === \"correct\" && checked:\n outlineColor = \"border-success\";\n backgroundColor = \"bg-correct\";\n feedbackIcon = \"tick\";\n feedbackAltText = \"Correct\";\n break;\n case feedback === \"incorrect\" && checked:\n outlineColor = \"border-error\";\n backgroundColor = \"bg-incorrect\";\n feedbackIcon = \"cross\";\n feedbackAltText = \"Incorrect\";\n break;\n case feedback === \"incorrect\" && !checked:\n feedbackIcon = \"tick\";\n feedbackAltText = \"Unselected correct choice\";\n break;\n case isHighlighted:\n radioBackground = \"bg-decorative5-main\";\n outlineColor = \"border-decorative5-stronger\";\n break;\n case checked && !disabled:\n outlineColor = \"border-primary\";\n break;\n }\n\n return (\n <StyledOakFlex\n $pa=\"inner-padding-l\"\n $borderRadius=\"border-radius-m2\"\n $justifyContent=\"space-between\"\n $position=\"relative\"\n $alignContent=\"center\"\n onClick={handleOnClick}\n $disabled={disabled || showFeedback}\n $checked={checked}\n $outlineColor={outlineColor}\n $background={backgroundColor}\n >\n <OakRadioButton\n value={value}\n disabled={disabled || showFeedback}\n $labelGap=\"space-between-s\"\n disableFocusRing\n radioInnerSize=\"all-spacing-6\"\n radioOuterSize=\"all-spacing-7\"\n radioBackground={radioBackground}\n checkedRadioBorderWidth=\"border-solid-l\"\n label={\n image ? (\n <OakFlex\n $flexDirection=\"column\"\n $minWidth=\"all-spacing-20\"\n $gap=\"space-between-s\"\n >\n <OakBox>{image}</OakBox>\n {label}\n </OakFlex>\n ) : (\n label\n )\n }\n {...rest}\n />\n {showFeedback && feedbackIcon && (\n <OakFlex $alignSelf=\"flex-end\">\n <OakIcon\n iconName={feedbackIcon}\n $colorFilter={\n feedbackIcon === \"tick\" ? \"icon-success\" : \"icon-error\"\n }\n alt={feedbackAltText}\n />\n </OakFlex>\n )}\n </StyledOakFlex>\n );\n};\n","import React, { MouseEventHandler } from \"react\";\nimport styled from \"styled-components\";\n\nimport { InternalShadowRoundButton } from \"@/components/molecules/InternalShadowRoundButton\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\n\nexport type OakHintButtonProps = {\n isOpen: boolean;\n onClick?: MouseEventHandler;\n isLoading?: boolean;\n disabled?: boolean;\n};\n\nconst StyledInternalShadowRoundButton = styled(InternalShadowRoundButton)`\n &:hover .shadow {\n box-shadow: none !important;\n }\n &:active .shadow {\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")},\n ${parseDropShadow(\"drop-shadow-grey\")} !important;\n }\n`;\n\n/**\n *\n * A specific implementation of InternalShadowRoundButton\n *\n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n *\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n */\nexport const OakHintButton = (props: OakHintButtonProps) => {\n const { isOpen, disabled } = props;\n return (\n <StyledInternalShadowRoundButton\n iconName={isOpen && !disabled ? \"lightbulb-yellow\" : \"lightbulb\"}\n defaultIconBackground={isOpen ? \"black\" : \"bg-decorative5-main\"}\n hoverIconBackground={isOpen ? \"black\" : \"bg-decorative5-main\"}\n defaultTextColor={\"text-primary\"}\n hoverTextColor={\"text-primary\"}\n disabledIconBackground={\"bg-btn-primary-disabled\"}\n disabledTextColor={\"text-disabled\"}\n disabledIconColor={\"white\"}\n onClick={props.onClick}\n isLoading={props.isLoading}\n disabled={props.disabled}\n iconBackgroundSize={\"all-spacing-8\"}\n iconSize={\"all-spacing-6\"}\n >\n {!isOpen ? \"Need a hint?\" : \"Close hint\"}\n </StyledInternalShadowRoundButton>\n );\n};\n","import React, { MouseEventHandler, ReactNode, useState } from \"react\";\n\nimport { OakTooltip } from \"@/components/molecules\";\nimport { OakHintButton } from \"@/components/organisms/pupil/OakHintButton\";\n\nexport type OakQuizHintProps = {\n /**\n * Some content to give as a hint to answer a question\n */\n hint: ReactNode;\n};\n\n/**\n * Presents a button which will show a hint when clicked\n */\nexport const OakQuizHint = ({ hint }: OakQuizHintProps) => {\n const [isOpen, setIsOpen] = useState(false);\n const handleClick: MouseEventHandler = () => {\n setIsOpen(!isOpen);\n };\n\n return (\n <OakTooltip tooltip={hint} isOpen={isOpen}>\n <OakHintButton isOpen={isOpen} onClick={handleClick} />\n </OakTooltip>\n );\n};\n","import React, { ReactNode } from \"react\";\n\nimport { OakBox, OakFlex, OakSpan } from \"@/components/atoms\";\nimport { OakRoundIcon } from \"@/components/molecules\";\n\nexport type OakQuizFeedbackProps = {\n /**\n * Feedback for an answer\n * `partially-correct` can be used to feedback on a multi-answer MCQ where some\n * correct options were not selected and/or some incorrect answers were selected\n */\n feedback: \"correct\" | \"incorrect\" | \"partially-correct\";\n /**\n * Some additional content to present with the feedback.\n * This is likely the correct answer(s) to the question or some praise.\n *\n * Only displayed when `feedback` has been applied.\n */\n answerFeedback?: ReactNode;\n};\n\n/**\n * Gives feedback after a question has been answered\n */\nexport const OakQuizFeedback = ({\n feedback,\n answerFeedback,\n}: OakQuizFeedbackProps) => {\n let feedbackLabel: string;\n\n switch (feedback) {\n case \"correct\":\n feedbackLabel = \"Correct\";\n break;\n case \"incorrect\":\n feedbackLabel = \"Incorrect\";\n break;\n case \"partially-correct\":\n feedbackLabel = \"Almost correct\";\n break;\n }\n\n return (\n <OakBox aria-live=\"polite\">\n <OakFlex $gap=\"space-between-xs\">\n <OakRoundIcon\n iconName={feedback === \"correct\" ? \"tick\" : \"cross\"}\n alt=\"\"\n $pa=\"inner-padding-none\"\n $background={feedback === \"correct\" ? \"icon-success\" : \"icon-error\"}\n $colorFilter=\"text-inverted\"\n $width=\"all-spacing-6\"\n $height=\"all-spacing-6\"\n />\n <OakSpan\n $font=\"heading-6\"\n $color={feedback === \"correct\" ? \"text-success\" : \"text-error\"}\n >\n {feedbackLabel}\n </OakSpan>\n </OakFlex>\n {answerFeedback && (\n <OakSpan\n as=\"p\"\n $mt=\"space-between-xs\"\n $font={feedback === \"correct\" ? \"body-2-bold\" : \"body-2\"}\n >\n {answerFeedback}\n </OakSpan>\n )}\n </OakBox>\n );\n};\n","import React, { ReactNode } from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakQuizHint, OakQuizHintProps } from \"../OakQuizHint\";\nimport {\n OakQuizFeedback,\n OakQuizFeedbackProps,\n} from \"../OakQuizFeedback/OakQuizFeedback\";\n\nimport { OakFlex } from \"@/components/atoms\";\n\n/**\n * `content-box` ensures that the border is not subtracted from the height of the element\n */\nconst StyledOakFlex = styled(OakFlex)`\n box-sizing: content-box;\n`;\n\nexport type OakLessonBottomNavProps = {\n children?: ReactNode;\n feedback?: OakQuizFeedbackProps[\"feedback\"] | null;\n answerFeedback?: OakQuizFeedbackProps[\"answerFeedback\"];\n hint?: OakQuizHintProps[\"hint\"];\n};\n\n/**\n * Renders feedback for an answer and onward navigation buttons to continue the lesson\n */\nexport const OakLessonBottomNav = ({\n hint,\n feedback,\n answerFeedback,\n children,\n}: OakLessonBottomNavProps) => {\n let content: ReactNode;\n\n switch (true) {\n case !!feedback:\n content = (\n <OakQuizFeedback feedback={feedback} answerFeedback={answerFeedback} />\n );\n break;\n case !!hint:\n content = <OakQuizHint hint={hint} />;\n break;\n default:\n content = null;\n }\n\n return (\n <StyledOakFlex\n $flexDirection={[\"column\", \"row\"]}\n $pa=\"inner-padding-m\"\n $minHeight=\"all-spacing-9\"\n $gap=\"space-between-m\"\n >\n <OakFlex $alignItems=\"center\">{content}</OakFlex>\n <OakFlex\n $flexGrow=\"1\"\n $height=\"fit-content\"\n $alignSelf=\"flex-end\"\n $justifyContent={[\"initial\", \"flex-end\"]}\n $width={[\"100%\", \"auto\"]}\n >\n {children}\n </OakFlex>\n </StyledOakFlex>\n );\n};\n","import React, { ReactNode } from \"react\";\nimport styled from \"styled-components\";\n\nimport {\n OakBox,\n OakFlex,\n OakHeading,\n OakIconProps,\n OakSpan,\n} from \"@/components/atoms\";\nimport { OakRoundIcon } from \"@/components/molecules\";\nimport { getBreakpoint } from \"@/styles/utils/responsiveStyle\";\n\ntype LessonSectionName = \"intro\" | \"starter-quiz\" | \"video\" | \"exit-quiz\";\n\nconst StyledMobileSummary = styled(OakSpan)`\n @media (min-width: ${getBreakpoint(\"small\")}px) {\n display: none;\n }\n`;\n\nexport type OakLessonTopNavProps = {\n lessonSectionName: LessonSectionName;\n /**\n * Slot to render `OakBackLink` or similar\n */\n backLinkSlot: ReactNode;\n heading: ReactNode;\n /**\n * Displayed at the mobile breakpoint where the counter is not rendered.\n * Provides alternative content for the counter/progress in the lesson.\n */\n mobileSummary: ReactNode;\n /**\n * Slot to render `OakQuizCounter` or similar\n */\n counterSlot?: ReactNode;\n};\n\n/**\n * Controls for navigating back and displaying progress in a lesson\n */\nexport const OakLessonTopNav = ({\n lessonSectionName,\n backLinkSlot,\n counterSlot,\n heading,\n mobileSummary,\n}: OakLessonTopNavProps) => {\n return (\n <OakFlex $gap=\"space-between-m\" $alignItems=\"center\">\n <OakBox $pl={[\"inner-padding-none\", \"inner-padding-s\"]}>\n {backLinkSlot}\n </OakBox>\n <OakFlex $flexGrow=\"none\">\n <OakRoundIcon\n {...pickSectionIcon(lessonSectionName)}\n $width=\"all-spacing-8\"\n $height=\"all-spacing-8\"\n />\n </OakFlex>\n <OakBox>\n <OakHeading tag=\"h1\" $font={[\"heading-7\", \"heading-5\"]}>\n {heading}\n </OakHeading>\n <StyledMobileSummary $font=\"body-3\">\n {mobileSummary}\n </StyledMobileSummary>\n </OakBox>\n <OakFlex $flexGrow={1} $justifyContent=\"flex-end\">\n <OakBox $display={[\"none\", \"block\"]}>{counterSlot}</OakBox>\n </OakFlex>\n </OakFlex>\n );\n};\n\nfunction pickSectionIcon(\n sectionName: LessonSectionName,\n): Pick<OakIconProps, \"iconName\" | \"$background\"> {\n switch (sectionName) {\n case \"intro\":\n return {\n iconName: \"intro\",\n $background: \"aqua110\",\n };\n case \"starter-quiz\":\n return {\n iconName: \"quiz\",\n $background: \"mint110\",\n };\n case \"video\":\n return {\n iconName: \"video\",\n $background: \"pink110\",\n };\n case \"exit-quiz\":\n return {\n iconName: \"quiz\",\n $background: \"lemon110\",\n };\n }\n}\n","import React from \"react\";\n\nimport { OakSpan } from \"@/components/atoms\";\n\nexport type OakQuizCounterProps = {\n counter: number;\n total: number;\n};\n\n/**\n * A counter representing progress through the questions in a quiz\n */\nexport const OakQuizCounter = (props: OakQuizCounterProps) => {\n const { counter, total } = props;\n return (\n <OakSpan $font={\"heading-light-4\"} $color={\"text-disabled\"}>\n <OakSpan $font={\"heading-4\"} $color={\"text-primary\"}>\n {counter}{\" \"}\n </OakSpan>\n of {total}\n </OakSpan>\n );\n};\n","import React, { ReactNode } from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex } from \"@/components/atoms\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { getBreakpoint } from \"@/styles/utils/responsiveStyle\";\nimport { OakCombinedColorToken } from \"@/styles\";\n\ntype LessonSectionName =\n | \"overview\"\n | \"intro\"\n | \"starter-quiz\"\n | \"video\"\n | \"exit-quiz\"\n | \"review\";\n\nexport type OakLessonLayoutProps = {\n lessonSectionName: LessonSectionName;\n topNavSlot: ReactNode;\n bottomNavSlot: ReactNode;\n children: ReactNode;\n};\n\n/**\n * `OakBox` does not support space-between tokens on `padding` only `margin`, so we need to\n * set it here to apply appropriate padding to the top of the content.\n */\nconst StyledLayoutBox = styled(OakBox)`\n @media (min-width: ${getBreakpoint(\"small\")}px) {\n padding-top: ${parseSpacing(\"space-between-xl\")};\n }\n`;\n\nconst StickyFooter = styled(OakBox)`\n position: sticky;\n bottom: 0;\n z-index: 10;\n`;\n\n/**\n * Provides overall page layout and colours for the sections of a lesson.\n */\nexport const OakLessonLayout = ({\n lessonSectionName,\n topNavSlot,\n bottomNavSlot,\n children,\n}: OakLessonLayoutProps) => {\n const [\n pageBackgroundColor,\n contentBackgroundColor,\n contentBorderColor,\n mobileContentBackgroundColor,\n ] = pickSectionColours(lessonSectionName);\n\n return (\n <StyledLayoutBox\n $display={\"flex\"}\n $width=\"100%\"\n $minHeight={\"100%\"}\n $ph={[\"inner-padding-none\", \"inner-padding-xl\"]}\n $background={pageBackgroundColor}\n >\n <OakFlex\n $flexDirection=\"column\"\n $flexGrow={1}\n $background={[mobileContentBackgroundColor, contentBackgroundColor]}\n $btr={[null, \"border-radius-xl\"]}\n $bt={[null, \"border-solid-xl\"]}\n $bh={[null, \"border-solid-xl\"]}\n $borderColor={[null, contentBorderColor]}\n $maxWidth=\"all-spacing-24\"\n $minHeight=\"100%\"\n $mh=\"auto\"\n $pt={[\"inner-padding-none\", \"inner-padding-m\"]}\n $gap={[\"space-between-l\", \"space-between-xl\"]}\n >\n {topNavSlot && (\n <OakBox\n $pv=\"inner-padding-l\"\n $pl={[\"inner-padding-m\", \"inner-padding-xs\"]}\n $pr={[\"inner-padding-m\", \"inner-padding-none\"]}\n $mr={[\"space-between-none\", \"space-between-l\"]}\n $background={[\"bg-primary\", \"transparent\"]}\n >\n {topNavSlot}\n </OakBox>\n )}\n <OakFlex $flexGrow={1} $flexDirection=\"column\">\n {children}\n </OakFlex>\n {bottomNavSlot && (\n <StickyFooter\n $mh={[\n \"space-between-none\",\n \"space-between-none\",\n \"space-between-sssx\",\n ]}\n $borderColor={contentBorderColor}\n $bt={\"border-solid-xl\"}\n $background={[\"bg-primary\", contentBackgroundColor]}\n >\n {bottomNavSlot}\n </StickyFooter>\n )}\n </OakFlex>\n </StyledLayoutBox>\n );\n};\n\nfunction pickSectionColours(\n sectionName: LessonSectionName,\n): [\n pageBackgroundColor: OakCombinedColorToken,\n contentBackgroundColor: OakCombinedColorToken,\n contentBorderColor: OakCombinedColorToken,\n mobileContentBackgroundColor: OakCombinedColorToken,\n] {\n switch (sectionName) {\n case \"overview\":\n return [\n \"bg-decorative1-main\",\n \"bg-primary\",\n \"border-decorative1-stronger\",\n \"bg-primary\",\n ];\n case \"intro\":\n return [\n \"bg-decorative2-subdued\",\n \"bg-decorative2-very-subdued\",\n \"border-inverted\",\n \"bg-decorative2-subdued\",\n ];\n case \"starter-quiz\":\n return [\n \"bg-decorative1-main\",\n \"bg-decorative1-very-subdued\",\n \"border-inverted\",\n \"bg-decorative1-subdued\",\n ];\n case \"video\":\n return [\n \"bg-decorative4-subdued\",\n \"bg-primary\",\n \"border-decorative4\",\n \"bg-primary\",\n ];\n case \"exit-quiz\":\n return [\n \"bg-decorative5-main\",\n \"bg-decorative5-very-subdued\",\n \"border-inverted\",\n \"bg-decorative5-subdued\",\n ];\n case \"review\":\n return [\n \"bg-decorative1-main\",\n \"bg-primary\",\n \"border-decorative1-stronger\",\n \"bg-primary\",\n ];\n }\n}\n","import React, { ComponentPropsWithoutRef, ElementType } from \"react\";\nimport styled, { css } from \"styled-components\";\n\nimport {\n OakBox,\n OakFlex,\n OakIcon,\n OakIconName,\n OakSpan,\n} from \"@/components/atoms\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\nimport { OakRoundIcon } from \"@/components/molecules\";\nimport { parseColorFilter } from \"@/styles/helpers/parseColorFilter\";\nimport { parseSpacing } from \"@/styles/helpers/parseSpacing\";\nimport { parseDropShadow } from \"@/styles/helpers/parseDropShadow\";\nimport { OakCombinedColorToken } from \"@/styles\";\n\ntype LessonSectionName = \"intro\" | \"starter-quiz\" | \"video\" | \"exit-quiz\";\n\ntype BaseOakLessonNavItemProps<C extends ElementType> = {\n as?: C;\n /**\n * Disable the section preventing navigation to it.\n */\n disabled?: boolean;\n} & ComponentPropsWithoutRef<C>;\n\ntype QuizSectionProps = {\n lessonSectionName: \"starter-quiz\" | \"exit-quiz\";\n /**\n * The number of questions in the quiz\n */\n numQuestions: number;\n /**\n * The number of questions answered correctly\n */\n grade: number;\n};\n\ntype VideoSectionProps = {\n lessonSectionName: \"video\";\n};\n\ntype IntroSectionProps = {\n lessonSectionName: \"intro\";\n};\n\ntype SectionProps = {\n /**\n * Denotes the progress in the lesson section\n */\n progress: \"not-started\" | \"in-progress\" | \"complete\";\n} & (IntroSectionProps | QuizSectionProps | VideoSectionProps);\n\nexport type OakLessonNavItemProps<C extends ElementType> =\n BaseOakLessonNavItemProps<C> & SectionProps;\n\nconst StyledLabel = styled(OakBox)``;\n\nconst StyledRoundIcon = styled(OakRoundIcon)<{\n $disabled?: boolean;\n}>`\n width: ${parseSpacing(\"all-spacing-8\")};\n height: ${parseSpacing(\"all-spacing-8\")};\n padding: 0;\n\n background: transparent;\n\n img {\n filter: ${(props) =>\n parseColorFilter(props.$disabled ? \"icon-disabled\" : \"icon-inverted\")};\n }\n`;\n\nconst activeIconStyles = css`\n ${StyledRoundIcon} {\n background: ${parseColor(\"bg-btn-primary\")};\n\n img {\n filter: ${parseColorFilter(\"icon-main\")};\n }\n }\n`;\n\nconst StyledLessonNavItem = styled(OakFlex)<{ $disabled?: boolean }>`\n outline: none;\n text-align: initial;\n\n &:focus-visible {\n box-shadow: ${parseDropShadow(\"drop-shadow-centered-lemon\")},\n ${parseDropShadow(\"drop-shadow-centered-grey\")};\n }\n\n ${(props) => props.$disabled && \"cursor: default\"}\n\n ${(props) =>\n !props.$disabled &&\n css`\n cursor: pointer;\n\n /* Don't apply hover styles on touch devices */\n @media (hover: hover) {\n &:hover {\n ${StyledLabel} {\n text-decoration: underline;\n }\n\n ${activeIconStyles}\n }\n }\n\n &:active {\n box-shadow: ${parseDropShadow(\"drop-shadow-lemon\")},\n ${parseDropShadow(\"drop-shadow-grey\")};\n ${activeIconStyles}\n }\n `}\n`;\n\nconst FlexedOakBox = styled(OakBox)`\n flex: 1;\n`;\n\n/**\n * Enables navigation to the given section of a lesson as well as displaying current progress\n */\nexport const OakLessonNavItem = <C extends ElementType = \"a\">(\n props: OakLessonNavItemProps<C>,\n) => {\n const { as, lessonSectionName, progress, disabled, href, onClick, ...rest } =\n props;\n const [notStartedBackgroundColor, backgroundColor, borderColor] =\n pickColorsForSection(lessonSectionName);\n\n return (\n <StyledLessonNavItem\n as={disabled ? \"div\" : as ?? \"a\"}\n $gap=\"space-between-m\"\n $alignItems=\"center\"\n $background={\n progress === \"not-started\" ? notStartedBackgroundColor : backgroundColor\n }\n $ph={[\"inner-padding-m\", \"inner-padding-xl\"]}\n $pv=\"inner-padding-l\"\n $borderRadius=\"border-radius-l\"\n $borderColor={borderColor}\n $ba=\"border-solid-l\"\n $disabled={disabled}\n $color=\"text-primary\"\n href={disabled ? undefined : href}\n onClick={disabled ? undefined : onClick}\n {...rest}\n >\n <OakFlex $width=\"all-spacing-13\" $justifyContent=\"center\">\n <OakIcon\n iconName={pickIconForSection(lessonSectionName)}\n $width=\"all-spacing-10\"\n $height=\"all-spacing-10\"\n />\n </OakFlex>\n <FlexedOakBox>\n <StyledLabel\n as=\"strong\"\n $font={[\"heading-6\", \"heading-5\"]}\n $color={disabled ? \"text-disabled\" : \"text-primary\"}\n >\n {pickLabelForSection(lessonSectionName)}\n </StyledLabel>\n <OakBox $font={[\"body-2\", \"body-1\"]}>\n {pickSummaryForProgress(props)}\n </OakBox>\n </FlexedOakBox>\n {renderQuestionCounter(props)}\n <StyledRoundIcon iconName=\"chevron-right\" $disabled={disabled} />\n </StyledLessonNavItem>\n );\n};\n\nfunction renderQuestionCounter(props: SectionProps) {\n if (props.progress !== \"complete\") {\n return null;\n }\n\n /**\n * The large answer counter is only rendered when on a non-mobile screen\n */\n switch (props.lessonSectionName) {\n case \"exit-quiz\":\n case \"starter-quiz\":\n return (\n <OakBox $display={[\"none\", \"block\"]} $mr=\"space-between-m\">\n <OakSpan $font=\"heading-4\">{props.grade}</OakSpan>\n <OakSpan $font=\"heading-6\">&nbsp;/&nbsp;{props.numQuestions}</OakSpan>\n </OakBox>\n );\n default:\n return null;\n }\n}\n\nfunction pickIconForSection(sectionName: LessonSectionName): OakIconName {\n switch (sectionName) {\n case \"intro\":\n return \"intro\";\n case \"starter-quiz\":\n case \"exit-quiz\":\n return \"quiz\";\n case \"video\":\n return \"video\";\n }\n}\n\nfunction pickColorsForSection(\n sectionName: LessonSectionName,\n): [\n notStartedBackgroundColor: OakCombinedColorToken,\n backgroundColor: OakCombinedColorToken,\n borderColor: OakCombinedColorToken,\n] {\n switch (sectionName) {\n case \"intro\":\n return [\n \"bg-decorative2-very-subdued\",\n \"bg-decorative2-main\",\n \"border-decorative2-stronger\",\n ];\n case \"starter-quiz\":\n return [\n \"bg-decorative1-very-subdued\",\n \"bg-decorative1-main\",\n \"border-decorative1-stronger\",\n ];\n case \"video\":\n return [\n \"bg-decorative4-very-subdued\",\n \"bg-decorative4-main\",\n \"border-decorative4-stronger\",\n ];\n case \"exit-quiz\":\n return [\n \"bg-decorative5-very-subdued\",\n \"bg-decorative5-main\",\n \"border-decorative5-stronger\",\n ];\n }\n}\n\nfunction pickLabelForSection(sectionName: LessonSectionName): string {\n switch (sectionName) {\n case \"intro\":\n return \"Introduction\";\n case \"starter-quiz\":\n return \"Starter quiz\";\n case \"video\":\n return \"Lesson video\";\n case \"exit-quiz\":\n return \"Exit quiz\";\n }\n}\n\nfunction pickSummaryForProgress(props: SectionProps) {\n switch (props.progress) {\n case \"not-started\":\n return pickSummaryForNotStarted(props);\n case \"in-progress\":\n return \"In progress...\";\n case \"complete\":\n return (\n <OakFlex $gap=\"space-between-sssx\" $alignItems=\"center\">\n <OakIcon\n iconName=\"tick\"\n $width=\"all-spacing-6\"\n $height=\"all-spacing-6\"\n />\n {pickSummaryForComplete(props)}\n </OakFlex>\n );\n }\n}\n\nfunction pickSummaryForNotStarted(props: SectionProps) {\n switch (props.lessonSectionName) {\n case \"intro\":\n return \"Prepare\";\n case \"starter-quiz\":\n return `Activate - ${props.numQuestions} Questions`;\n case \"exit-quiz\":\n return `Check - ${props.numQuestions} questions`;\n case \"video\":\n return \"Learn\";\n }\n}\n\nfunction pickSummaryForComplete(props: SectionProps) {\n switch (props.lessonSectionName) {\n case \"intro\":\n case \"video\":\n return \"Completed\";\n case \"starter-quiz\":\n case \"exit-quiz\":\n // The counter is rendered as the summary next\n // when on a mobile device, so it is hidden on larger screens\n return (\n <>\n <OakBox $display={[\"none\", \"block\"]}>Completed</OakBox>\n <OakBox $display={[\"block\", \"none\"]}>\n {props.grade}/{props.numQuestions} correct\n </OakBox>\n </>\n );\n }\n}\n","import React from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex, OakIcon, OakSpan } from \"@/components/atoms\";\nimport { OakRoundIcon } from \"@/components/molecules\";\nimport { OakCombinedColorToken } from \"@/styles\";\n\ntype LessonSectionName = \"intro\" | \"starter-quiz\" | \"video\" | \"exit-quiz\";\ntype BaseOakLessonReviewItemProps = {\n completed: boolean;\n};\ntype QuizSectionProps = {\n lessonSectionName: \"starter-quiz\" | \"exit-quiz\";\n /**\n * The number of questions in the quiz\n */\n numQuestions: number;\n /**\n * The number of questions answered correctly\n */\n grade: number;\n};\n\ntype VideoSectionProps = {\n lessonSectionName: \"video\";\n};\ntype IntroSectionProps = {\n lessonSectionName: \"intro\";\n};\n\nexport type OakLessonReviewItemProps = BaseOakLessonReviewItemProps &\n (IntroSectionProps | QuizSectionProps | VideoSectionProps);\n\nconst StyledLessonReviewItem = styled(OakFlex)<{ completed: boolean }>`\n outline: none;\n text-align: initial;\n`;\n\nexport const OakLessonReviewItem = (props: OakLessonReviewItemProps) => {\n const { completed, lessonSectionName, ...rest } = props;\n const [completedBackgroundColor, borderColor, iconBackgroundColor] =\n pickColorsForSection(lessonSectionName);\n const lessonSectionNameToIconMap = new Map();\n\n lessonSectionNameToIconMap.set(\"intro\", \"intro\");\n lessonSectionNameToIconMap.set(\"starter-quiz\", \"quiz\");\n lessonSectionNameToIconMap.set(\"exit-quiz\", \"quiz\");\n lessonSectionNameToIconMap.set(\"video\", \"video\");\n\n return (\n <StyledLessonReviewItem\n completed={completed}\n $gap=\"space-between-m\"\n $alignItems=\"center\"\n $background={completed ? completedBackgroundColor : \"white\"}\n $ph={[\"inner-padding-m\", \"inner-padding-xl\"]}\n $pv=\"inner-padding-l\"\n $borderRadius=\"border-radius-l\"\n $borderColor={completed ? completedBackgroundColor : borderColor}\n $ba=\"border-solid-l\"\n {...rest}\n >\n <OakRoundIcon\n iconName={lessonSectionNameToIconMap.get(lessonSectionName)}\n $width=\"all-spacing-10\"\n $height=\"all-spacing-10\"\n $background={iconBackgroundColor}\n />\n <OakFlex $flexGrow={1} $flexShrink={1} $flexDirection={\"column\"}>\n <OakBox $font={[\"heading-6\", \"heading-5\"]} $color={\"text-primary\"}>\n {pickLabelForSection(lessonSectionName)}\n </OakBox>\n <OakBox $font={[\"body-2\", \"body-1\"]}>\n {pickSummaryForProgress(props)}\n </OakBox>\n </OakFlex>\n {renderQuestionCounter(props)}\n </StyledLessonReviewItem>\n );\n};\n\nconst pickSummaryForProgress = (props: OakLessonReviewItemProps) => {\n if (props.completed === false) {\n return pickSummaryForIncomplete(props);\n } else {\n return (\n <OakFlex $gap=\"space-between-sssx\" $alignItems=\"center\">\n <OakIcon\n iconName=\"tick\"\n $width=\"all-spacing-6\"\n $height=\"all-spacing-6\"\n />\n Completed\n </OakFlex>\n );\n }\n};\n\nconst pickSummaryForIncomplete = (props: OakLessonReviewItemProps) => {\n switch (props.lessonSectionName) {\n case \"intro\":\n return \"Prepare\";\n case \"starter-quiz\":\n return `Activate - ${props.numQuestions} questions`;\n case \"exit-quiz\":\n return `Check - ${props.numQuestions} questions`;\n case \"video\":\n return \"Learn\";\n }\n};\n\nconst pickLabelForSection = (sectionName: LessonSectionName): string => {\n switch (sectionName) {\n case \"intro\":\n return \"Introduction\";\n case \"starter-quiz\":\n return \"Starter quiz\";\n case \"video\":\n return \"Lesson video\";\n case \"exit-quiz\":\n return \"Exit quiz\";\n }\n};\n\nconst pickColorsForSection = (\n sectionName: LessonSectionName,\n): [\n completedBackgroundColor: OakCombinedColorToken,\n borderColor: OakCombinedColorToken,\n iconBackgroundColor: OakCombinedColorToken,\n] => {\n switch (sectionName) {\n case \"intro\":\n return [\"bg-decorative2-very-subdued\", \"border-decorative2\", \"aqua\"];\n case \"starter-quiz\":\n return [\"bg-decorative1-very-subdued\", \"border-decorative1\", \"mint\"];\n case \"video\":\n return [\"bg-decorative4-very-subdued\", \"border-decorative4\", \"pink\"];\n case \"exit-quiz\":\n return [\"bg-decorative5-very-subdued\", \"border-decorative5\", \"lemon\"];\n }\n};\n\nconst renderQuestionCounter = (props: OakLessonReviewItemProps) => {\n if (props.completed === false) {\n return null;\n }\n\n switch (props.lessonSectionName) {\n case \"exit-quiz\":\n case \"starter-quiz\":\n return (\n <OakBox>\n <OakSpan $font=\"heading-4\">{props.grade}</OakSpan>\n <OakSpan $font=\"heading-6\">&nbsp;/&nbsp;{props.numQuestions}</OakSpan>\n </OakBox>\n );\n default:\n return null;\n }\n};\n","import { useMemo, useLayoutEffect, useEffect, useRef, useCallback } from 'react';\n\nfunction useCombinedRefs() {\n for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n refs[_key] = arguments[_key];\n }\n\n return useMemo(() => node => {\n refs.forEach(ref => ref(node));\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n refs);\n}\n\n// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js\nconst canUseDOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\nfunction isWindow(element) {\n const elementString = Object.prototype.toString.call(element);\n return elementString === '[object Window]' || // In Electron context the Window object serializes to [object global]\n elementString === '[object global]';\n}\n\nfunction isNode(node) {\n return 'nodeType' in node;\n}\n\nfunction getWindow(target) {\n var _target$ownerDocument, _target$ownerDocument2;\n\n if (!target) {\n return window;\n }\n\n if (isWindow(target)) {\n return target;\n }\n\n if (!isNode(target)) {\n return window;\n }\n\n return (_target$ownerDocument = (_target$ownerDocument2 = target.ownerDocument) == null ? void 0 : _target$ownerDocument2.defaultView) != null ? _target$ownerDocument : window;\n}\n\nfunction isDocument(node) {\n const {\n Document\n } = getWindow(node);\n return node instanceof Document;\n}\n\nfunction isHTMLElement(node) {\n if (isWindow(node)) {\n return false;\n }\n\n return node instanceof getWindow(node).HTMLElement;\n}\n\nfunction isSVGElement(node) {\n return node instanceof getWindow(node).SVGElement;\n}\n\nfunction getOwnerDocument(target) {\n if (!target) {\n return document;\n }\n\n if (isWindow(target)) {\n return target.document;\n }\n\n if (!isNode(target)) {\n return document;\n }\n\n if (isDocument(target)) {\n return target;\n }\n\n if (isHTMLElement(target) || isSVGElement(target)) {\n return target.ownerDocument;\n }\n\n return document;\n}\n\n/**\r\n * A hook that resolves to useEffect on the server and useLayoutEffect on the client\r\n * @param callback {function} Callback function that is invoked when the dependencies of the hook change\r\n */\n\nconst useIsomorphicLayoutEffect = canUseDOM ? useLayoutEffect : useEffect;\n\nfunction useEvent(handler) {\n const handlerRef = useRef(handler);\n useIsomorphicLayoutEffect(() => {\n handlerRef.current = handler;\n });\n return useCallback(function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return handlerRef.current == null ? void 0 : handlerRef.current(...args);\n }, []);\n}\n\nfunction useInterval() {\n const intervalRef = useRef(null);\n const set = useCallback((listener, duration) => {\n intervalRef.current = setInterval(listener, duration);\n }, []);\n const clear = useCallback(() => {\n if (intervalRef.current !== null) {\n clearInterval(intervalRef.current);\n intervalRef.current = null;\n }\n }, []);\n return [set, clear];\n}\n\nfunction useLatestValue(value, dependencies) {\n if (dependencies === void 0) {\n dependencies = [value];\n }\n\n const valueRef = useRef(value);\n useIsomorphicLayoutEffect(() => {\n if (valueRef.current !== value) {\n valueRef.current = value;\n }\n }, dependencies);\n return valueRef;\n}\n\nfunction useLazyMemo(callback, dependencies) {\n const valueRef = useRef();\n return useMemo(() => {\n const newValue = callback(valueRef.current);\n valueRef.current = newValue;\n return newValue;\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [...dependencies]);\n}\n\nfunction useNodeRef(onChange) {\n const onChangeHandler = useEvent(onChange);\n const node = useRef(null);\n const setNodeRef = useCallback(element => {\n if (element !== node.current) {\n onChangeHandler == null ? void 0 : onChangeHandler(element, node.current);\n }\n\n node.current = element;\n }, //eslint-disable-next-line\n []);\n return [node, setNodeRef];\n}\n\nfunction usePrevious(value) {\n const ref = useRef();\n useEffect(() => {\n ref.current = value;\n }, [value]);\n return ref.current;\n}\n\nlet ids = {};\nfunction useUniqueId(prefix, value) {\n return useMemo(() => {\n if (value) {\n return value;\n }\n\n const id = ids[prefix] == null ? 0 : ids[prefix] + 1;\n ids[prefix] = id;\n return prefix + \"-\" + id;\n }, [prefix, value]);\n}\n\nfunction createAdjustmentFn(modifier) {\n return function (object) {\n for (var _len = arguments.length, adjustments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n adjustments[_key - 1] = arguments[_key];\n }\n\n return adjustments.reduce((accumulator, adjustment) => {\n const entries = Object.entries(adjustment);\n\n for (const [key, valueAdjustment] of entries) {\n const value = accumulator[key];\n\n if (value != null) {\n accumulator[key] = value + modifier * valueAdjustment;\n }\n }\n\n return accumulator;\n }, { ...object\n });\n };\n}\n\nconst add = /*#__PURE__*/createAdjustmentFn(1);\nconst subtract = /*#__PURE__*/createAdjustmentFn(-1);\n\nfunction hasViewportRelativeCoordinates(event) {\n return 'clientX' in event && 'clientY' in event;\n}\n\nfunction isKeyboardEvent(event) {\n if (!event) {\n return false;\n }\n\n const {\n KeyboardEvent\n } = getWindow(event.target);\n return KeyboardEvent && event instanceof KeyboardEvent;\n}\n\nfunction isTouchEvent(event) {\n if (!event) {\n return false;\n }\n\n const {\n TouchEvent\n } = getWindow(event.target);\n return TouchEvent && event instanceof TouchEvent;\n}\n\n/**\r\n * Returns the normalized x and y coordinates for mouse and touch events.\r\n */\n\nfunction getEventCoordinates(event) {\n if (isTouchEvent(event)) {\n if (event.touches && event.touches.length) {\n const {\n clientX: x,\n clientY: y\n } = event.touches[0];\n return {\n x,\n y\n };\n } else if (event.changedTouches && event.changedTouches.length) {\n const {\n clientX: x,\n clientY: y\n } = event.changedTouches[0];\n return {\n x,\n y\n };\n }\n }\n\n if (hasViewportRelativeCoordinates(event)) {\n return {\n x: event.clientX,\n y: event.clientY\n };\n }\n\n return null;\n}\n\nconst CSS = /*#__PURE__*/Object.freeze({\n Translate: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n const {\n x,\n y\n } = transform;\n return \"translate3d(\" + (x ? Math.round(x) : 0) + \"px, \" + (y ? Math.round(y) : 0) + \"px, 0)\";\n }\n\n },\n Scale: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n const {\n scaleX,\n scaleY\n } = transform;\n return \"scaleX(\" + scaleX + \") scaleY(\" + scaleY + \")\";\n }\n\n },\n Transform: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n return [CSS.Translate.toString(transform), CSS.Scale.toString(transform)].join(' ');\n }\n\n },\n Transition: {\n toString(_ref) {\n let {\n property,\n duration,\n easing\n } = _ref;\n return property + \" \" + duration + \"ms \" + easing;\n }\n\n }\n});\n\nconst SELECTOR = 'a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]';\nfunction findFirstFocusableNode(element) {\n if (element.matches(SELECTOR)) {\n return element;\n }\n\n return element.querySelector(SELECTOR);\n}\n\nexport { CSS, add, canUseDOM, findFirstFocusableNode, getEventCoordinates, getOwnerDocument, getWindow, hasViewportRelativeCoordinates, isDocument, isHTMLElement, isKeyboardEvent, isNode, isSVGElement, isTouchEvent, isWindow, subtract, useCombinedRefs, useEvent, useInterval, useIsomorphicLayoutEffect, useLatestValue, useLazyMemo, useNodeRef, usePrevious, useUniqueId };\n//# sourceMappingURL=utilities.esm.js.map\n","import React, { useState, useCallback } from 'react';\n\nconst hiddenStyles = {\n display: 'none'\n};\nfunction HiddenText(_ref) {\n let {\n id,\n value\n } = _ref;\n return React.createElement(\"div\", {\n id: id,\n style: hiddenStyles\n }, value);\n}\n\nfunction LiveRegion(_ref) {\n let {\n id,\n announcement,\n ariaLiveType = \"assertive\"\n } = _ref;\n // Hide element visually but keep it readable by screen readers\n const visuallyHidden = {\n position: 'fixed',\n width: 1,\n height: 1,\n margin: -1,\n border: 0,\n padding: 0,\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(100%)',\n whiteSpace: 'nowrap'\n };\n return React.createElement(\"div\", {\n id: id,\n style: visuallyHidden,\n role: \"status\",\n \"aria-live\": ariaLiveType,\n \"aria-atomic\": true\n }, announcement);\n}\n\nfunction useAnnouncement() {\n const [announcement, setAnnouncement] = useState('');\n const announce = useCallback(value => {\n if (value != null) {\n setAnnouncement(value);\n }\n }, []);\n return {\n announce,\n announcement\n };\n}\n\nexport { HiddenText, LiveRegion, useAnnouncement };\n//# sourceMappingURL=accessibility.esm.js.map\n","import React, { createContext, useContext, useEffect, useState, useCallback, useMemo, useRef, useReducer, memo, cloneElement, forwardRef } from 'react';\nimport { createPortal, unstable_batchedUpdates } from 'react-dom';\nimport { useUniqueId, getEventCoordinates, getWindow, isDocument, isHTMLElement, isSVGElement, canUseDOM, isWindow, isNode, getOwnerDocument, add, isKeyboardEvent, subtract, useLazyMemo, useInterval, usePrevious, useLatestValue, useEvent, useIsomorphicLayoutEffect, useNodeRef, findFirstFocusableNode, CSS } from '@dnd-kit/utilities';\nimport { useAnnouncement, HiddenText, LiveRegion } from '@dnd-kit/accessibility';\n\nconst DndMonitorContext = /*#__PURE__*/createContext(null);\n\nfunction useDndMonitor(listener) {\n const registerListener = useContext(DndMonitorContext);\n useEffect(() => {\n if (!registerListener) {\n throw new Error('useDndMonitor must be used within a children of <DndContext>');\n }\n\n const unsubscribe = registerListener(listener);\n return unsubscribe;\n }, [listener, registerListener]);\n}\n\nfunction useDndMonitorProvider() {\n const [listeners] = useState(() => new Set());\n const registerListener = useCallback(listener => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n }, [listeners]);\n const dispatch = useCallback(_ref => {\n let {\n type,\n event\n } = _ref;\n listeners.forEach(listener => {\n var _listener$type;\n\n return (_listener$type = listener[type]) == null ? void 0 : _listener$type.call(listener, event);\n });\n }, [listeners]);\n return [dispatch, registerListener];\n}\n\nconst defaultScreenReaderInstructions = {\n draggable: \"\\n To pick up a draggable item, press the space bar.\\n While dragging, use the arrow keys to move the item.\\n Press space again to drop the item in its new position, or press escape to cancel.\\n \"\n};\nconst defaultAnnouncements = {\n onDragStart(_ref) {\n let {\n active\n } = _ref;\n return \"Picked up draggable item \" + active.id + \".\";\n },\n\n onDragOver(_ref2) {\n let {\n active,\n over\n } = _ref2;\n\n if (over) {\n return \"Draggable item \" + active.id + \" was moved over droppable area \" + over.id + \".\";\n }\n\n return \"Draggable item \" + active.id + \" is no longer over a droppable area.\";\n },\n\n onDragEnd(_ref3) {\n let {\n active,\n over\n } = _ref3;\n\n if (over) {\n return \"Draggable item \" + active.id + \" was dropped over droppable area \" + over.id;\n }\n\n return \"Draggable item \" + active.id + \" was dropped.\";\n },\n\n onDragCancel(_ref4) {\n let {\n active\n } = _ref4;\n return \"Dragging was cancelled. Draggable item \" + active.id + \" was dropped.\";\n }\n\n};\n\nfunction Accessibility(_ref) {\n let {\n announcements = defaultAnnouncements,\n container,\n hiddenTextDescribedById,\n screenReaderInstructions = defaultScreenReaderInstructions\n } = _ref;\n const {\n announce,\n announcement\n } = useAnnouncement();\n const liveRegionId = useUniqueId(\"DndLiveRegion\");\n const [mounted, setMounted] = useState(false);\n useEffect(() => {\n setMounted(true);\n }, []);\n useDndMonitor(useMemo(() => ({\n onDragStart(_ref2) {\n let {\n active\n } = _ref2;\n announce(announcements.onDragStart({\n active\n }));\n },\n\n onDragMove(_ref3) {\n let {\n active,\n over\n } = _ref3;\n\n if (announcements.onDragMove) {\n announce(announcements.onDragMove({\n active,\n over\n }));\n }\n },\n\n onDragOver(_ref4) {\n let {\n active,\n over\n } = _ref4;\n announce(announcements.onDragOver({\n active,\n over\n }));\n },\n\n onDragEnd(_ref5) {\n let {\n active,\n over\n } = _ref5;\n announce(announcements.onDragEnd({\n active,\n over\n }));\n },\n\n onDragCancel(_ref6) {\n let {\n active,\n over\n } = _ref6;\n announce(announcements.onDragCancel({\n active,\n over\n }));\n }\n\n }), [announce, announcements]));\n\n if (!mounted) {\n return null;\n }\n\n const markup = React.createElement(React.Fragment, null, React.createElement(HiddenText, {\n id: hiddenTextDescribedById,\n value: screenReaderInstructions.draggable\n }), React.createElement(LiveRegion, {\n id: liveRegionId,\n announcement: announcement\n }));\n return container ? createPortal(markup, container) : markup;\n}\n\nvar Action;\n\n(function (Action) {\n Action[\"DragStart\"] = \"dragStart\";\n Action[\"DragMove\"] = \"dragMove\";\n Action[\"DragEnd\"] = \"dragEnd\";\n Action[\"DragCancel\"] = \"dragCancel\";\n Action[\"DragOver\"] = \"dragOver\";\n Action[\"RegisterDroppable\"] = \"registerDroppable\";\n Action[\"SetDroppableDisabled\"] = \"setDroppableDisabled\";\n Action[\"UnregisterDroppable\"] = \"unregisterDroppable\";\n})(Action || (Action = {}));\n\nfunction noop() {}\n\nfunction useSensor(sensor, options) {\n return useMemo(() => ({\n sensor,\n options: options != null ? options : {}\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [sensor, options]);\n}\n\nfunction useSensors() {\n for (var _len = arguments.length, sensors = new Array(_len), _key = 0; _key < _len; _key++) {\n sensors[_key] = arguments[_key];\n }\n\n return useMemo(() => [...sensors].filter(sensor => sensor != null), // eslint-disable-next-line react-hooks/exhaustive-deps\n [...sensors]);\n}\n\nconst defaultCoordinates = /*#__PURE__*/Object.freeze({\n x: 0,\n y: 0\n});\n\n/**\r\n * Returns the distance between two points\r\n */\nfunction distanceBetween(p1, p2) {\n return Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2));\n}\n\nfunction getRelativeTransformOrigin(event, rect) {\n const eventCoordinates = getEventCoordinates(event);\n\n if (!eventCoordinates) {\n return '0 0';\n }\n\n const transformOrigin = {\n x: (eventCoordinates.x - rect.left) / rect.width * 100,\n y: (eventCoordinates.y - rect.top) / rect.height * 100\n };\n return transformOrigin.x + \"% \" + transformOrigin.y + \"%\";\n}\n\n/**\r\n * Sort collisions from smallest to greatest value\r\n */\nfunction sortCollisionsAsc(_ref, _ref2) {\n let {\n data: {\n value: a\n }\n } = _ref;\n let {\n data: {\n value: b\n }\n } = _ref2;\n return a - b;\n}\n/**\r\n * Sort collisions from greatest to smallest value\r\n */\n\nfunction sortCollisionsDesc(_ref3, _ref4) {\n let {\n data: {\n value: a\n }\n } = _ref3;\n let {\n data: {\n value: b\n }\n } = _ref4;\n return b - a;\n}\n/**\r\n * Returns the coordinates of the corners of a given rectangle:\r\n * [TopLeft {x, y}, TopRight {x, y}, BottomLeft {x, y}, BottomRight {x, y}]\r\n */\n\nfunction cornersOfRectangle(_ref5) {\n let {\n left,\n top,\n height,\n width\n } = _ref5;\n return [{\n x: left,\n y: top\n }, {\n x: left + width,\n y: top\n }, {\n x: left,\n y: top + height\n }, {\n x: left + width,\n y: top + height\n }];\n}\nfunction getFirstCollision(collisions, property) {\n if (!collisions || collisions.length === 0) {\n return null;\n }\n\n const [firstCollision] = collisions;\n return property ? firstCollision[property] : firstCollision;\n}\n\n/**\r\n * Returns the coordinates of the center of a given ClientRect\r\n */\n\nfunction centerOfRectangle(rect, left, top) {\n if (left === void 0) {\n left = rect.left;\n }\n\n if (top === void 0) {\n top = rect.top;\n }\n\n return {\n x: left + rect.width * 0.5,\n y: top + rect.height * 0.5\n };\n}\n/**\r\n * Returns the closest rectangles from an array of rectangles to the center of a given\r\n * rectangle.\r\n */\n\n\nconst closestCenter = _ref => {\n let {\n collisionRect,\n droppableRects,\n droppableContainers\n } = _ref;\n const centerRect = centerOfRectangle(collisionRect, collisionRect.left, collisionRect.top);\n const collisions = [];\n\n for (const droppableContainer of droppableContainers) {\n const {\n id\n } = droppableContainer;\n const rect = droppableRects.get(id);\n\n if (rect) {\n const distBetween = distanceBetween(centerOfRectangle(rect), centerRect);\n collisions.push({\n id,\n data: {\n droppableContainer,\n value: distBetween\n }\n });\n }\n }\n\n return collisions.sort(sortCollisionsAsc);\n};\n\n/**\r\n * Returns the closest rectangles from an array of rectangles to the corners of\r\n * another rectangle.\r\n */\n\nconst closestCorners = _ref => {\n let {\n collisionRect,\n droppableRects,\n droppableContainers\n } = _ref;\n const corners = cornersOfRectangle(collisionRect);\n const collisions = [];\n\n for (const droppableContainer of droppableContainers) {\n const {\n id\n } = droppableContainer;\n const rect = droppableRects.get(id);\n\n if (rect) {\n const rectCorners = cornersOfRectangle(rect);\n const distances = corners.reduce((accumulator, corner, index) => {\n return accumulator + distanceBetween(rectCorners[index], corner);\n }, 0);\n const effectiveDistance = Number((distances / 4).toFixed(4));\n collisions.push({\n id,\n data: {\n droppableContainer,\n value: effectiveDistance\n }\n });\n }\n }\n\n return collisions.sort(sortCollisionsAsc);\n};\n\n/**\r\n * Returns the intersecting rectangle area between two rectangles\r\n */\n\nfunction getIntersectionRatio(entry, target) {\n const top = Math.max(target.top, entry.top);\n const left = Math.max(target.left, entry.left);\n const right = Math.min(target.left + target.width, entry.left + entry.width);\n const bottom = Math.min(target.top + target.height, entry.top + entry.height);\n const width = right - left;\n const height = bottom - top;\n\n if (left < right && top < bottom) {\n const targetArea = target.width * target.height;\n const entryArea = entry.width * entry.height;\n const intersectionArea = width * height;\n const intersectionRatio = intersectionArea / (targetArea + entryArea - intersectionArea);\n return Number(intersectionRatio.toFixed(4));\n } // Rectangles do not overlap, or overlap has an area of zero (edge/corner overlap)\n\n\n return 0;\n}\n/**\r\n * Returns the rectangles that has the greatest intersection area with a given\r\n * rectangle in an array of rectangles.\r\n */\n\nconst rectIntersection = _ref => {\n let {\n collisionRect,\n droppableRects,\n droppableContainers\n } = _ref;\n const collisions = [];\n\n for (const droppableContainer of droppableContainers) {\n const {\n id\n } = droppableContainer;\n const rect = droppableRects.get(id);\n\n if (rect) {\n const intersectionRatio = getIntersectionRatio(rect, collisionRect);\n\n if (intersectionRatio > 0) {\n collisions.push({\n id,\n data: {\n droppableContainer,\n value: intersectionRatio\n }\n });\n }\n }\n }\n\n return collisions.sort(sortCollisionsDesc);\n};\n\n/**\r\n * Check if a given point is contained within a bounding rectangle\r\n */\n\nfunction isPointWithinRect(point, rect) {\n const {\n top,\n left,\n bottom,\n right\n } = rect;\n return top <= point.y && point.y <= bottom && left <= point.x && point.x <= right;\n}\n/**\r\n * Returns the rectangles that the pointer is hovering over\r\n */\n\n\nconst pointerWithin = _ref => {\n let {\n droppableContainers,\n droppableRects,\n pointerCoordinates\n } = _ref;\n\n if (!pointerCoordinates) {\n return [];\n }\n\n const collisions = [];\n\n for (const droppableContainer of droppableContainers) {\n const {\n id\n } = droppableContainer;\n const rect = droppableRects.get(id);\n\n if (rect && isPointWithinRect(pointerCoordinates, rect)) {\n /* There may be more than a single rectangle intersecting\r\n * with the pointer coordinates. In order to sort the\r\n * colliding rectangles, we measure the distance between\r\n * the pointer and the corners of the intersecting rectangle\r\n */\n const corners = cornersOfRectangle(rect);\n const distances = corners.reduce((accumulator, corner) => {\n return accumulator + distanceBetween(pointerCoordinates, corner);\n }, 0);\n const effectiveDistance = Number((distances / 4).toFixed(4));\n collisions.push({\n id,\n data: {\n droppableContainer,\n value: effectiveDistance\n }\n });\n }\n }\n\n return collisions.sort(sortCollisionsAsc);\n};\n\nfunction adjustScale(transform, rect1, rect2) {\n return { ...transform,\n scaleX: rect1 && rect2 ? rect1.width / rect2.width : 1,\n scaleY: rect1 && rect2 ? rect1.height / rect2.height : 1\n };\n}\n\nfunction getRectDelta(rect1, rect2) {\n return rect1 && rect2 ? {\n x: rect1.left - rect2.left,\n y: rect1.top - rect2.top\n } : defaultCoordinates;\n}\n\nfunction createRectAdjustmentFn(modifier) {\n return function adjustClientRect(rect) {\n for (var _len = arguments.length, adjustments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n adjustments[_key - 1] = arguments[_key];\n }\n\n return adjustments.reduce((acc, adjustment) => ({ ...acc,\n top: acc.top + modifier * adjustment.y,\n bottom: acc.bottom + modifier * adjustment.y,\n left: acc.left + modifier * adjustment.x,\n right: acc.right + modifier * adjustment.x\n }), { ...rect\n });\n };\n}\nconst getAdjustedRect = /*#__PURE__*/createRectAdjustmentFn(1);\n\nfunction parseTransform(transform) {\n if (transform.startsWith('matrix3d(')) {\n const transformArray = transform.slice(9, -1).split(/, /);\n return {\n x: +transformArray[12],\n y: +transformArray[13],\n scaleX: +transformArray[0],\n scaleY: +transformArray[5]\n };\n } else if (transform.startsWith('matrix(')) {\n const transformArray = transform.slice(7, -1).split(/, /);\n return {\n x: +transformArray[4],\n y: +transformArray[5],\n scaleX: +transformArray[0],\n scaleY: +transformArray[3]\n };\n }\n\n return null;\n}\n\nfunction inverseTransform(rect, transform, transformOrigin) {\n const parsedTransform = parseTransform(transform);\n\n if (!parsedTransform) {\n return rect;\n }\n\n const {\n scaleX,\n scaleY,\n x: translateX,\n y: translateY\n } = parsedTransform;\n const x = rect.left - translateX - (1 - scaleX) * parseFloat(transformOrigin);\n const y = rect.top - translateY - (1 - scaleY) * parseFloat(transformOrigin.slice(transformOrigin.indexOf(' ') + 1));\n const w = scaleX ? rect.width / scaleX : rect.width;\n const h = scaleY ? rect.height / scaleY : rect.height;\n return {\n width: w,\n height: h,\n top: y,\n right: x + w,\n bottom: y + h,\n left: x\n };\n}\n\nconst defaultOptions = {\n ignoreTransform: false\n};\n/**\r\n * Returns the bounding client rect of an element relative to the viewport.\r\n */\n\nfunction getClientRect(element, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n let rect = element.getBoundingClientRect();\n\n if (options.ignoreTransform) {\n const {\n transform,\n transformOrigin\n } = getWindow(element).getComputedStyle(element);\n\n if (transform) {\n rect = inverseTransform(rect, transform, transformOrigin);\n }\n }\n\n const {\n top,\n left,\n width,\n height,\n bottom,\n right\n } = rect;\n return {\n top,\n left,\n width,\n height,\n bottom,\n right\n };\n}\n/**\r\n * Returns the bounding client rect of an element relative to the viewport.\r\n *\r\n * @remarks\r\n * The ClientRect returned by this method does not take into account transforms\r\n * applied to the element it measures.\r\n *\r\n */\n\nfunction getTransformAgnosticClientRect(element) {\n return getClientRect(element, {\n ignoreTransform: true\n });\n}\n\nfunction getWindowClientRect(element) {\n const width = element.innerWidth;\n const height = element.innerHeight;\n return {\n top: 0,\n left: 0,\n right: width,\n bottom: height,\n width,\n height\n };\n}\n\nfunction isFixed(node, computedStyle) {\n if (computedStyle === void 0) {\n computedStyle = getWindow(node).getComputedStyle(node);\n }\n\n return computedStyle.position === 'fixed';\n}\n\nfunction isScrollable(element, computedStyle) {\n if (computedStyle === void 0) {\n computedStyle = getWindow(element).getComputedStyle(element);\n }\n\n const overflowRegex = /(auto|scroll|overlay)/;\n const properties = ['overflow', 'overflowX', 'overflowY'];\n return properties.some(property => {\n const value = computedStyle[property];\n return typeof value === 'string' ? overflowRegex.test(value) : false;\n });\n}\n\nfunction getScrollableAncestors(element, limit) {\n const scrollParents = [];\n\n function findScrollableAncestors(node) {\n if (limit != null && scrollParents.length >= limit) {\n return scrollParents;\n }\n\n if (!node) {\n return scrollParents;\n }\n\n if (isDocument(node) && node.scrollingElement != null && !scrollParents.includes(node.scrollingElement)) {\n scrollParents.push(node.scrollingElement);\n return scrollParents;\n }\n\n if (!isHTMLElement(node) || isSVGElement(node)) {\n return scrollParents;\n }\n\n if (scrollParents.includes(node)) {\n return scrollParents;\n }\n\n const computedStyle = getWindow(element).getComputedStyle(node);\n\n if (node !== element) {\n if (isScrollable(node, computedStyle)) {\n scrollParents.push(node);\n }\n }\n\n if (isFixed(node, computedStyle)) {\n return scrollParents;\n }\n\n return findScrollableAncestors(node.parentNode);\n }\n\n if (!element) {\n return scrollParents;\n }\n\n return findScrollableAncestors(element);\n}\nfunction getFirstScrollableAncestor(node) {\n const [firstScrollableAncestor] = getScrollableAncestors(node, 1);\n return firstScrollableAncestor != null ? firstScrollableAncestor : null;\n}\n\nfunction getScrollableElement(element) {\n if (!canUseDOM || !element) {\n return null;\n }\n\n if (isWindow(element)) {\n return element;\n }\n\n if (!isNode(element)) {\n return null;\n }\n\n if (isDocument(element) || element === getOwnerDocument(element).scrollingElement) {\n return window;\n }\n\n if (isHTMLElement(element)) {\n return element;\n }\n\n return null;\n}\n\nfunction getScrollXCoordinate(element) {\n if (isWindow(element)) {\n return element.scrollX;\n }\n\n return element.scrollLeft;\n}\nfunction getScrollYCoordinate(element) {\n if (isWindow(element)) {\n return element.scrollY;\n }\n\n return element.scrollTop;\n}\nfunction getScrollCoordinates(element) {\n return {\n x: getScrollXCoordinate(element),\n y: getScrollYCoordinate(element)\n };\n}\n\nvar Direction;\n\n(function (Direction) {\n Direction[Direction[\"Forward\"] = 1] = \"Forward\";\n Direction[Direction[\"Backward\"] = -1] = \"Backward\";\n})(Direction || (Direction = {}));\n\nfunction isDocumentScrollingElement(element) {\n if (!canUseDOM || !element) {\n return false;\n }\n\n return element === document.scrollingElement;\n}\n\nfunction getScrollPosition(scrollingContainer) {\n const minScroll = {\n x: 0,\n y: 0\n };\n const dimensions = isDocumentScrollingElement(scrollingContainer) ? {\n height: window.innerHeight,\n width: window.innerWidth\n } : {\n height: scrollingContainer.clientHeight,\n width: scrollingContainer.clientWidth\n };\n const maxScroll = {\n x: scrollingContainer.scrollWidth - dimensions.width,\n y: scrollingContainer.scrollHeight - dimensions.height\n };\n const isTop = scrollingContainer.scrollTop <= minScroll.y;\n const isLeft = scrollingContainer.scrollLeft <= minScroll.x;\n const isBottom = scrollingContainer.scrollTop >= maxScroll.y;\n const isRight = scrollingContainer.scrollLeft >= maxScroll.x;\n return {\n isTop,\n isLeft,\n isBottom,\n isRight,\n maxScroll,\n minScroll\n };\n}\n\nconst defaultThreshold = {\n x: 0.2,\n y: 0.2\n};\nfunction getScrollDirectionAndSpeed(scrollContainer, scrollContainerRect, _ref, acceleration, thresholdPercentage) {\n let {\n top,\n left,\n right,\n bottom\n } = _ref;\n\n if (acceleration === void 0) {\n acceleration = 10;\n }\n\n if (thresholdPercentage === void 0) {\n thresholdPercentage = defaultThreshold;\n }\n\n const {\n isTop,\n isBottom,\n isLeft,\n isRight\n } = getScrollPosition(scrollContainer);\n const direction = {\n x: 0,\n y: 0\n };\n const speed = {\n x: 0,\n y: 0\n };\n const threshold = {\n height: scrollContainerRect.height * thresholdPercentage.y,\n width: scrollContainerRect.width * thresholdPercentage.x\n };\n\n if (!isTop && top <= scrollContainerRect.top + threshold.height) {\n // Scroll Up\n direction.y = Direction.Backward;\n speed.y = acceleration * Math.abs((scrollContainerRect.top + threshold.height - top) / threshold.height);\n } else if (!isBottom && bottom >= scrollContainerRect.bottom - threshold.height) {\n // Scroll Down\n direction.y = Direction.Forward;\n speed.y = acceleration * Math.abs((scrollContainerRect.bottom - threshold.height - bottom) / threshold.height);\n }\n\n if (!isRight && right >= scrollContainerRect.right - threshold.width) {\n // Scroll Right\n direction.x = Direction.Forward;\n speed.x = acceleration * Math.abs((scrollContainerRect.right - threshold.width - right) / threshold.width);\n } else if (!isLeft && left <= scrollContainerRect.left + threshold.width) {\n // Scroll Left\n direction.x = Direction.Backward;\n speed.x = acceleration * Math.abs((scrollContainerRect.left + threshold.width - left) / threshold.width);\n }\n\n return {\n direction,\n speed\n };\n}\n\nfunction getScrollElementRect(element) {\n if (element === document.scrollingElement) {\n const {\n innerWidth,\n innerHeight\n } = window;\n return {\n top: 0,\n left: 0,\n right: innerWidth,\n bottom: innerHeight,\n width: innerWidth,\n height: innerHeight\n };\n }\n\n const {\n top,\n left,\n right,\n bottom\n } = element.getBoundingClientRect();\n return {\n top,\n left,\n right,\n bottom,\n width: element.clientWidth,\n height: element.clientHeight\n };\n}\n\nfunction getScrollOffsets(scrollableAncestors) {\n return scrollableAncestors.reduce((acc, node) => {\n return add(acc, getScrollCoordinates(node));\n }, defaultCoordinates);\n}\nfunction getScrollXOffset(scrollableAncestors) {\n return scrollableAncestors.reduce((acc, node) => {\n return acc + getScrollXCoordinate(node);\n }, 0);\n}\nfunction getScrollYOffset(scrollableAncestors) {\n return scrollableAncestors.reduce((acc, node) => {\n return acc + getScrollYCoordinate(node);\n }, 0);\n}\n\nfunction scrollIntoViewIfNeeded(element, measure) {\n if (measure === void 0) {\n measure = getClientRect;\n }\n\n if (!element) {\n return;\n }\n\n const {\n top,\n left,\n bottom,\n right\n } = measure(element);\n const firstScrollableAncestor = getFirstScrollableAncestor(element);\n\n if (!firstScrollableAncestor) {\n return;\n }\n\n if (bottom <= 0 || right <= 0 || top >= window.innerHeight || left >= window.innerWidth) {\n element.scrollIntoView({\n block: 'center',\n inline: 'center'\n });\n }\n}\n\nconst properties = [['x', ['left', 'right'], getScrollXOffset], ['y', ['top', 'bottom'], getScrollYOffset]];\nclass Rect {\n constructor(rect, element) {\n this.rect = void 0;\n this.width = void 0;\n this.height = void 0;\n this.top = void 0;\n this.bottom = void 0;\n this.right = void 0;\n this.left = void 0;\n const scrollableAncestors = getScrollableAncestors(element);\n const scrollOffsets = getScrollOffsets(scrollableAncestors);\n this.rect = { ...rect\n };\n this.width = rect.width;\n this.height = rect.height;\n\n for (const [axis, keys, getScrollOffset] of properties) {\n for (const key of keys) {\n Object.defineProperty(this, key, {\n get: () => {\n const currentOffsets = getScrollOffset(scrollableAncestors);\n const scrollOffsetsDeltla = scrollOffsets[axis] - currentOffsets;\n return this.rect[key] + scrollOffsetsDeltla;\n },\n enumerable: true\n });\n }\n }\n\n Object.defineProperty(this, 'rect', {\n enumerable: false\n });\n }\n\n}\n\nclass Listeners {\n constructor(target) {\n this.target = void 0;\n this.listeners = [];\n\n this.removeAll = () => {\n this.listeners.forEach(listener => {\n var _this$target;\n\n return (_this$target = this.target) == null ? void 0 : _this$target.removeEventListener(...listener);\n });\n };\n\n this.target = target;\n }\n\n add(eventName, handler, options) {\n var _this$target2;\n\n (_this$target2 = this.target) == null ? void 0 : _this$target2.addEventListener(eventName, handler, options);\n this.listeners.push([eventName, handler, options]);\n }\n\n}\n\nfunction getEventListenerTarget(target) {\n // If the `event.target` element is removed from the document events will still be targeted\n // at it, and hence won't always bubble up to the window or document anymore.\n // If there is any risk of an element being removed while it is being dragged,\n // the best practice is to attach the event listeners directly to the target.\n // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget\n const {\n EventTarget\n } = getWindow(target);\n return target instanceof EventTarget ? target : getOwnerDocument(target);\n}\n\nfunction hasExceededDistance(delta, measurement) {\n const dx = Math.abs(delta.x);\n const dy = Math.abs(delta.y);\n\n if (typeof measurement === 'number') {\n return Math.sqrt(dx ** 2 + dy ** 2) > measurement;\n }\n\n if ('x' in measurement && 'y' in measurement) {\n return dx > measurement.x && dy > measurement.y;\n }\n\n if ('x' in measurement) {\n return dx > measurement.x;\n }\n\n if ('y' in measurement) {\n return dy > measurement.y;\n }\n\n return false;\n}\n\nvar EventName;\n\n(function (EventName) {\n EventName[\"Click\"] = \"click\";\n EventName[\"DragStart\"] = \"dragstart\";\n EventName[\"Keydown\"] = \"keydown\";\n EventName[\"ContextMenu\"] = \"contextmenu\";\n EventName[\"Resize\"] = \"resize\";\n EventName[\"SelectionChange\"] = \"selectionchange\";\n EventName[\"VisibilityChange\"] = \"visibilitychange\";\n})(EventName || (EventName = {}));\n\nfunction preventDefault(event) {\n event.preventDefault();\n}\nfunction stopPropagation(event) {\n event.stopPropagation();\n}\n\nvar KeyboardCode;\n\n(function (KeyboardCode) {\n KeyboardCode[\"Space\"] = \"Space\";\n KeyboardCode[\"Down\"] = \"ArrowDown\";\n KeyboardCode[\"Right\"] = \"ArrowRight\";\n KeyboardCode[\"Left\"] = \"ArrowLeft\";\n KeyboardCode[\"Up\"] = \"ArrowUp\";\n KeyboardCode[\"Esc\"] = \"Escape\";\n KeyboardCode[\"Enter\"] = \"Enter\";\n})(KeyboardCode || (KeyboardCode = {}));\n\nconst defaultKeyboardCodes = {\n start: [KeyboardCode.Space, KeyboardCode.Enter],\n cancel: [KeyboardCode.Esc],\n end: [KeyboardCode.Space, KeyboardCode.Enter]\n};\nconst defaultKeyboardCoordinateGetter = (event, _ref) => {\n let {\n currentCoordinates\n } = _ref;\n\n switch (event.code) {\n case KeyboardCode.Right:\n return { ...currentCoordinates,\n x: currentCoordinates.x + 25\n };\n\n case KeyboardCode.Left:\n return { ...currentCoordinates,\n x: currentCoordinates.x - 25\n };\n\n case KeyboardCode.Down:\n return { ...currentCoordinates,\n y: currentCoordinates.y + 25\n };\n\n case KeyboardCode.Up:\n return { ...currentCoordinates,\n y: currentCoordinates.y - 25\n };\n }\n\n return undefined;\n};\n\nclass KeyboardSensor {\n constructor(props) {\n this.props = void 0;\n this.autoScrollEnabled = false;\n this.referenceCoordinates = void 0;\n this.listeners = void 0;\n this.windowListeners = void 0;\n this.props = props;\n const {\n event: {\n target\n }\n } = props;\n this.props = props;\n this.listeners = new Listeners(getOwnerDocument(target));\n this.windowListeners = new Listeners(getWindow(target));\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.handleCancel = this.handleCancel.bind(this);\n this.attach();\n }\n\n attach() {\n this.handleStart();\n this.windowListeners.add(EventName.Resize, this.handleCancel);\n this.windowListeners.add(EventName.VisibilityChange, this.handleCancel);\n setTimeout(() => this.listeners.add(EventName.Keydown, this.handleKeyDown));\n }\n\n handleStart() {\n const {\n activeNode,\n onStart\n } = this.props;\n const node = activeNode.node.current;\n\n if (node) {\n scrollIntoViewIfNeeded(node);\n }\n\n onStart(defaultCoordinates);\n }\n\n handleKeyDown(event) {\n if (isKeyboardEvent(event)) {\n const {\n active,\n context,\n options\n } = this.props;\n const {\n keyboardCodes = defaultKeyboardCodes,\n coordinateGetter = defaultKeyboardCoordinateGetter,\n scrollBehavior = 'smooth'\n } = options;\n const {\n code\n } = event;\n\n if (keyboardCodes.end.includes(code)) {\n this.handleEnd(event);\n return;\n }\n\n if (keyboardCodes.cancel.includes(code)) {\n this.handleCancel(event);\n return;\n }\n\n const {\n collisionRect\n } = context.current;\n const currentCoordinates = collisionRect ? {\n x: collisionRect.left,\n y: collisionRect.top\n } : defaultCoordinates;\n\n if (!this.referenceCoordinates) {\n this.referenceCoordinates = currentCoordinates;\n }\n\n const newCoordinates = coordinateGetter(event, {\n active,\n context: context.current,\n currentCoordinates\n });\n\n if (newCoordinates) {\n const coordinatesDelta = subtract(newCoordinates, currentCoordinates);\n const scrollDelta = {\n x: 0,\n y: 0\n };\n const {\n scrollableAncestors\n } = context.current;\n\n for (const scrollContainer of scrollableAncestors) {\n const direction = event.code;\n const {\n isTop,\n isRight,\n isLeft,\n isBottom,\n maxScroll,\n minScroll\n } = getScrollPosition(scrollContainer);\n const scrollElementRect = getScrollElementRect(scrollContainer);\n const clampedCoordinates = {\n x: Math.min(direction === KeyboardCode.Right ? scrollElementRect.right - scrollElementRect.width / 2 : scrollElementRect.right, Math.max(direction === KeyboardCode.Right ? scrollElementRect.left : scrollElementRect.left + scrollElementRect.width / 2, newCoordinates.x)),\n y: Math.min(direction === KeyboardCode.Down ? scrollElementRect.bottom - scrollElementRect.height / 2 : scrollElementRect.bottom, Math.max(direction === KeyboardCode.Down ? scrollElementRect.top : scrollElementRect.top + scrollElementRect.height / 2, newCoordinates.y))\n };\n const canScrollX = direction === KeyboardCode.Right && !isRight || direction === KeyboardCode.Left && !isLeft;\n const canScrollY = direction === KeyboardCode.Down && !isBottom || direction === KeyboardCode.Up && !isTop;\n\n if (canScrollX && clampedCoordinates.x !== newCoordinates.x) {\n const newScrollCoordinates = scrollContainer.scrollLeft + coordinatesDelta.x;\n const canScrollToNewCoordinates = direction === KeyboardCode.Right && newScrollCoordinates <= maxScroll.x || direction === KeyboardCode.Left && newScrollCoordinates >= minScroll.x;\n\n if (canScrollToNewCoordinates && !coordinatesDelta.y) {\n // We don't need to update coordinates, the scroll adjustment alone will trigger\n // logic to auto-detect the new container we are over\n scrollContainer.scrollTo({\n left: newScrollCoordinates,\n behavior: scrollBehavior\n });\n return;\n }\n\n if (canScrollToNewCoordinates) {\n scrollDelta.x = scrollContainer.scrollLeft - newScrollCoordinates;\n } else {\n scrollDelta.x = direction === KeyboardCode.Right ? scrollContainer.scrollLeft - maxScroll.x : scrollContainer.scrollLeft - minScroll.x;\n }\n\n if (scrollDelta.x) {\n scrollContainer.scrollBy({\n left: -scrollDelta.x,\n behavior: scrollBehavior\n });\n }\n\n break;\n } else if (canScrollY && clampedCoordinates.y !== newCoordinates.y) {\n const newScrollCoordinates = scrollContainer.scrollTop + coordinatesDelta.y;\n const canScrollToNewCoordinates = direction === KeyboardCode.Down && newScrollCoordinates <= maxScroll.y || direction === KeyboardCode.Up && newScrollCoordinates >= minScroll.y;\n\n if (canScrollToNewCoordinates && !coordinatesDelta.x) {\n // We don't need to update coordinates, the scroll adjustment alone will trigger\n // logic to auto-detect the new container we are over\n scrollContainer.scrollTo({\n top: newScrollCoordinates,\n behavior: scrollBehavior\n });\n return;\n }\n\n if (canScrollToNewCoordinates) {\n scrollDelta.y = scrollContainer.scrollTop - newScrollCoordinates;\n } else {\n scrollDelta.y = direction === KeyboardCode.Down ? scrollContainer.scrollTop - maxScroll.y : scrollContainer.scrollTop - minScroll.y;\n }\n\n if (scrollDelta.y) {\n scrollContainer.scrollBy({\n top: -scrollDelta.y,\n behavior: scrollBehavior\n });\n }\n\n break;\n }\n }\n\n this.handleMove(event, add(subtract(newCoordinates, this.referenceCoordinates), scrollDelta));\n }\n }\n }\n\n handleMove(event, coordinates) {\n const {\n onMove\n } = this.props;\n event.preventDefault();\n onMove(coordinates);\n }\n\n handleEnd(event) {\n const {\n onEnd\n } = this.props;\n event.preventDefault();\n this.detach();\n onEnd();\n }\n\n handleCancel(event) {\n const {\n onCancel\n } = this.props;\n event.preventDefault();\n this.detach();\n onCancel();\n }\n\n detach() {\n this.listeners.removeAll();\n this.windowListeners.removeAll();\n }\n\n}\nKeyboardSensor.activators = [{\n eventName: 'onKeyDown',\n handler: (event, _ref, _ref2) => {\n let {\n keyboardCodes = defaultKeyboardCodes,\n onActivation\n } = _ref;\n let {\n active\n } = _ref2;\n const {\n code\n } = event.nativeEvent;\n\n if (keyboardCodes.start.includes(code)) {\n const activator = active.activatorNode.current;\n\n if (activator && event.target !== activator) {\n return false;\n }\n\n event.preventDefault();\n onActivation == null ? void 0 : onActivation({\n event: event.nativeEvent\n });\n return true;\n }\n\n return false;\n }\n}];\n\nfunction isDistanceConstraint(constraint) {\n return Boolean(constraint && 'distance' in constraint);\n}\n\nfunction isDelayConstraint(constraint) {\n return Boolean(constraint && 'delay' in constraint);\n}\n\nclass AbstractPointerSensor {\n constructor(props, events, listenerTarget) {\n var _getEventCoordinates;\n\n if (listenerTarget === void 0) {\n listenerTarget = getEventListenerTarget(props.event.target);\n }\n\n this.props = void 0;\n this.events = void 0;\n this.autoScrollEnabled = true;\n this.document = void 0;\n this.activated = false;\n this.initialCoordinates = void 0;\n this.timeoutId = null;\n this.listeners = void 0;\n this.documentListeners = void 0;\n this.windowListeners = void 0;\n this.props = props;\n this.events = events;\n const {\n event\n } = props;\n const {\n target\n } = event;\n this.props = props;\n this.events = events;\n this.document = getOwnerDocument(target);\n this.documentListeners = new Listeners(this.document);\n this.listeners = new Listeners(listenerTarget);\n this.windowListeners = new Listeners(getWindow(target));\n this.initialCoordinates = (_getEventCoordinates = getEventCoordinates(event)) != null ? _getEventCoordinates : defaultCoordinates;\n this.handleStart = this.handleStart.bind(this);\n this.handleMove = this.handleMove.bind(this);\n this.handleEnd = this.handleEnd.bind(this);\n this.handleCancel = this.handleCancel.bind(this);\n this.handleKeydown = this.handleKeydown.bind(this);\n this.removeTextSelection = this.removeTextSelection.bind(this);\n this.attach();\n }\n\n attach() {\n const {\n events,\n props: {\n options: {\n activationConstraint,\n bypassActivationConstraint\n }\n }\n } = this;\n this.listeners.add(events.move.name, this.handleMove, {\n passive: false\n });\n this.listeners.add(events.end.name, this.handleEnd);\n this.windowListeners.add(EventName.Resize, this.handleCancel);\n this.windowListeners.add(EventName.DragStart, preventDefault);\n this.windowListeners.add(EventName.VisibilityChange, this.handleCancel);\n this.windowListeners.add(EventName.ContextMenu, preventDefault);\n this.documentListeners.add(EventName.Keydown, this.handleKeydown);\n\n if (activationConstraint) {\n if (bypassActivationConstraint != null && bypassActivationConstraint({\n event: this.props.event,\n activeNode: this.props.activeNode,\n options: this.props.options\n })) {\n return this.handleStart();\n }\n\n if (isDelayConstraint(activationConstraint)) {\n this.timeoutId = setTimeout(this.handleStart, activationConstraint.delay);\n return;\n }\n\n if (isDistanceConstraint(activationConstraint)) {\n return;\n }\n }\n\n this.handleStart();\n }\n\n detach() {\n this.listeners.removeAll();\n this.windowListeners.removeAll(); // Wait until the next event loop before removing document listeners\n // This is necessary because we listen for `click` and `selection` events on the document\n\n setTimeout(this.documentListeners.removeAll, 50);\n\n if (this.timeoutId !== null) {\n clearTimeout(this.timeoutId);\n this.timeoutId = null;\n }\n }\n\n handleStart() {\n const {\n initialCoordinates\n } = this;\n const {\n onStart\n } = this.props;\n\n if (initialCoordinates) {\n this.activated = true; // Stop propagation of click events once activation constraints are met\n\n this.documentListeners.add(EventName.Click, stopPropagation, {\n capture: true\n }); // Remove any text selection from the document\n\n this.removeTextSelection(); // Prevent further text selection while dragging\n\n this.documentListeners.add(EventName.SelectionChange, this.removeTextSelection);\n onStart(initialCoordinates);\n }\n }\n\n handleMove(event) {\n var _getEventCoordinates2;\n\n const {\n activated,\n initialCoordinates,\n props\n } = this;\n const {\n onMove,\n options: {\n activationConstraint\n }\n } = props;\n\n if (!initialCoordinates) {\n return;\n }\n\n const coordinates = (_getEventCoordinates2 = getEventCoordinates(event)) != null ? _getEventCoordinates2 : defaultCoordinates;\n const delta = subtract(initialCoordinates, coordinates); // Constraint validation\n\n if (!activated && activationConstraint) {\n if (isDistanceConstraint(activationConstraint)) {\n if (activationConstraint.tolerance != null && hasExceededDistance(delta, activationConstraint.tolerance)) {\n return this.handleCancel();\n }\n\n if (hasExceededDistance(delta, activationConstraint.distance)) {\n return this.handleStart();\n }\n }\n\n if (isDelayConstraint(activationConstraint)) {\n if (hasExceededDistance(delta, activationConstraint.tolerance)) {\n return this.handleCancel();\n }\n }\n\n return;\n }\n\n if (event.cancelable) {\n event.preventDefault();\n }\n\n onMove(coordinates);\n }\n\n handleEnd() {\n const {\n onEnd\n } = this.props;\n this.detach();\n onEnd();\n }\n\n handleCancel() {\n const {\n onCancel\n } = this.props;\n this.detach();\n onCancel();\n }\n\n handleKeydown(event) {\n if (event.code === KeyboardCode.Esc) {\n this.handleCancel();\n }\n }\n\n removeTextSelection() {\n var _this$document$getSel;\n\n (_this$document$getSel = this.document.getSelection()) == null ? void 0 : _this$document$getSel.removeAllRanges();\n }\n\n}\n\nconst events = {\n move: {\n name: 'pointermove'\n },\n end: {\n name: 'pointerup'\n }\n};\nclass PointerSensor extends AbstractPointerSensor {\n constructor(props) {\n const {\n event\n } = props; // Pointer events stop firing if the target is unmounted while dragging\n // Therefore we attach listeners to the owner document instead\n\n const listenerTarget = getOwnerDocument(event.target);\n super(props, events, listenerTarget);\n }\n\n}\nPointerSensor.activators = [{\n eventName: 'onPointerDown',\n handler: (_ref, _ref2) => {\n let {\n nativeEvent: event\n } = _ref;\n let {\n onActivation\n } = _ref2;\n\n if (!event.isPrimary || event.button !== 0) {\n return false;\n }\n\n onActivation == null ? void 0 : onActivation({\n event\n });\n return true;\n }\n}];\n\nconst events$1 = {\n move: {\n name: 'mousemove'\n },\n end: {\n name: 'mouseup'\n }\n};\nvar MouseButton;\n\n(function (MouseButton) {\n MouseButton[MouseButton[\"RightClick\"] = 2] = \"RightClick\";\n})(MouseButton || (MouseButton = {}));\n\nclass MouseSensor extends AbstractPointerSensor {\n constructor(props) {\n super(props, events$1, getOwnerDocument(props.event.target));\n }\n\n}\nMouseSensor.activators = [{\n eventName: 'onMouseDown',\n handler: (_ref, _ref2) => {\n let {\n nativeEvent: event\n } = _ref;\n let {\n onActivation\n } = _ref2;\n\n if (event.button === MouseButton.RightClick) {\n return false;\n }\n\n onActivation == null ? void 0 : onActivation({\n event\n });\n return true;\n }\n}];\n\nconst events$2 = {\n move: {\n name: 'touchmove'\n },\n end: {\n name: 'touchend'\n }\n};\nclass TouchSensor extends AbstractPointerSensor {\n constructor(props) {\n super(props, events$2);\n }\n\n static setup() {\n // Adding a non-capture and non-passive `touchmove` listener in order\n // to force `event.preventDefault()` calls to work in dynamically added\n // touchmove event handlers. This is required for iOS Safari.\n window.addEventListener(events$2.move.name, noop, {\n capture: false,\n passive: false\n });\n return function teardown() {\n window.removeEventListener(events$2.move.name, noop);\n }; // We create a new handler because the teardown function of another sensor\n // could remove our event listener if we use a referentially equal listener.\n\n function noop() {}\n }\n\n}\nTouchSensor.activators = [{\n eventName: 'onTouchStart',\n handler: (_ref, _ref2) => {\n let {\n nativeEvent: event\n } = _ref;\n let {\n onActivation\n } = _ref2;\n const {\n touches\n } = event;\n\n if (touches.length > 1) {\n return false;\n }\n\n onActivation == null ? void 0 : onActivation({\n event\n });\n return true;\n }\n}];\n\nvar AutoScrollActivator;\n\n(function (AutoScrollActivator) {\n AutoScrollActivator[AutoScrollActivator[\"Pointer\"] = 0] = \"Pointer\";\n AutoScrollActivator[AutoScrollActivator[\"DraggableRect\"] = 1] = \"DraggableRect\";\n})(AutoScrollActivator || (AutoScrollActivator = {}));\n\nvar TraversalOrder;\n\n(function (TraversalOrder) {\n TraversalOrder[TraversalOrder[\"TreeOrder\"] = 0] = \"TreeOrder\";\n TraversalOrder[TraversalOrder[\"ReversedTreeOrder\"] = 1] = \"ReversedTreeOrder\";\n})(TraversalOrder || (TraversalOrder = {}));\n\nfunction useAutoScroller(_ref) {\n let {\n acceleration,\n activator = AutoScrollActivator.Pointer,\n canScroll,\n draggingRect,\n enabled,\n interval = 5,\n order = TraversalOrder.TreeOrder,\n pointerCoordinates,\n scrollableAncestors,\n scrollableAncestorRects,\n delta,\n threshold\n } = _ref;\n const scrollIntent = useScrollIntent({\n delta,\n disabled: !enabled\n });\n const [setAutoScrollInterval, clearAutoScrollInterval] = useInterval();\n const scrollSpeed = useRef({\n x: 0,\n y: 0\n });\n const scrollDirection = useRef({\n x: 0,\n y: 0\n });\n const rect = useMemo(() => {\n switch (activator) {\n case AutoScrollActivator.Pointer:\n return pointerCoordinates ? {\n top: pointerCoordinates.y,\n bottom: pointerCoordinates.y,\n left: pointerCoordinates.x,\n right: pointerCoordinates.x\n } : null;\n\n case AutoScrollActivator.DraggableRect:\n return draggingRect;\n }\n }, [activator, draggingRect, pointerCoordinates]);\n const scrollContainerRef = useRef(null);\n const autoScroll = useCallback(() => {\n const scrollContainer = scrollContainerRef.current;\n\n if (!scrollContainer) {\n return;\n }\n\n const scrollLeft = scrollSpeed.current.x * scrollDirection.current.x;\n const scrollTop = scrollSpeed.current.y * scrollDirection.current.y;\n scrollContainer.scrollBy(scrollLeft, scrollTop);\n }, []);\n const sortedScrollableAncestors = useMemo(() => order === TraversalOrder.TreeOrder ? [...scrollableAncestors].reverse() : scrollableAncestors, [order, scrollableAncestors]);\n useEffect(() => {\n if (!enabled || !scrollableAncestors.length || !rect) {\n clearAutoScrollInterval();\n return;\n }\n\n for (const scrollContainer of sortedScrollableAncestors) {\n if ((canScroll == null ? void 0 : canScroll(scrollContainer)) === false) {\n continue;\n }\n\n const index = scrollableAncestors.indexOf(scrollContainer);\n const scrollContainerRect = scrollableAncestorRects[index];\n\n if (!scrollContainerRect) {\n continue;\n }\n\n const {\n direction,\n speed\n } = getScrollDirectionAndSpeed(scrollContainer, scrollContainerRect, rect, acceleration, threshold);\n\n for (const axis of ['x', 'y']) {\n if (!scrollIntent[axis][direction[axis]]) {\n speed[axis] = 0;\n direction[axis] = 0;\n }\n }\n\n if (speed.x > 0 || speed.y > 0) {\n clearAutoScrollInterval();\n scrollContainerRef.current = scrollContainer;\n setAutoScrollInterval(autoScroll, interval);\n scrollSpeed.current = speed;\n scrollDirection.current = direction;\n return;\n }\n }\n\n scrollSpeed.current = {\n x: 0,\n y: 0\n };\n scrollDirection.current = {\n x: 0,\n y: 0\n };\n clearAutoScrollInterval();\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [acceleration, autoScroll, canScroll, clearAutoScrollInterval, enabled, interval, // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(rect), // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(scrollIntent), setAutoScrollInterval, scrollableAncestors, sortedScrollableAncestors, scrollableAncestorRects, // eslint-disable-next-line react-hooks/exhaustive-deps\n JSON.stringify(threshold)]);\n}\nconst defaultScrollIntent = {\n x: {\n [Direction.Backward]: false,\n [Direction.Forward]: false\n },\n y: {\n [Direction.Backward]: false,\n [Direction.Forward]: false\n }\n};\n\nfunction useScrollIntent(_ref2) {\n let {\n delta,\n disabled\n } = _ref2;\n const previousDelta = usePrevious(delta);\n return useLazyMemo(previousIntent => {\n if (disabled || !previousDelta || !previousIntent) {\n // Reset scroll intent tracking when auto-scrolling is disabled\n return defaultScrollIntent;\n }\n\n const direction = {\n x: Math.sign(delta.x - previousDelta.x),\n y: Math.sign(delta.y - previousDelta.y)\n }; // Keep track of the user intent to scroll in each direction for both axis\n\n return {\n x: {\n [Direction.Backward]: previousIntent.x[Direction.Backward] || direction.x === -1,\n [Direction.Forward]: previousIntent.x[Direction.Forward] || direction.x === 1\n },\n y: {\n [Direction.Backward]: previousIntent.y[Direction.Backward] || direction.y === -1,\n [Direction.Forward]: previousIntent.y[Direction.Forward] || direction.y === 1\n }\n };\n }, [disabled, delta, previousDelta]);\n}\n\nfunction useCachedNode(draggableNodes, id) {\n const draggableNode = id !== null ? draggableNodes.get(id) : undefined;\n const node = draggableNode ? draggableNode.node.current : null;\n return useLazyMemo(cachedNode => {\n var _ref;\n\n if (id === null) {\n return null;\n } // In some cases, the draggable node can unmount while dragging\n // This is the case for virtualized lists. In those situations,\n // we fall back to the last known value for that node.\n\n\n return (_ref = node != null ? node : cachedNode) != null ? _ref : null;\n }, [node, id]);\n}\n\nfunction useCombineActivators(sensors, getSyntheticHandler) {\n return useMemo(() => sensors.reduce((accumulator, sensor) => {\n const {\n sensor: Sensor\n } = sensor;\n const sensorActivators = Sensor.activators.map(activator => ({\n eventName: activator.eventName,\n handler: getSyntheticHandler(activator.handler, sensor)\n }));\n return [...accumulator, ...sensorActivators];\n }, []), [sensors, getSyntheticHandler]);\n}\n\nvar MeasuringStrategy;\n\n(function (MeasuringStrategy) {\n MeasuringStrategy[MeasuringStrategy[\"Always\"] = 0] = \"Always\";\n MeasuringStrategy[MeasuringStrategy[\"BeforeDragging\"] = 1] = \"BeforeDragging\";\n MeasuringStrategy[MeasuringStrategy[\"WhileDragging\"] = 2] = \"WhileDragging\";\n})(MeasuringStrategy || (MeasuringStrategy = {}));\n\nvar MeasuringFrequency;\n\n(function (MeasuringFrequency) {\n MeasuringFrequency[\"Optimized\"] = \"optimized\";\n})(MeasuringFrequency || (MeasuringFrequency = {}));\n\nconst defaultValue = /*#__PURE__*/new Map();\nfunction useDroppableMeasuring(containers, _ref) {\n let {\n dragging,\n dependencies,\n config\n } = _ref;\n const [queue, setQueue] = useState(null);\n const {\n frequency,\n measure,\n strategy\n } = config;\n const containersRef = useRef(containers);\n const disabled = isDisabled();\n const disabledRef = useLatestValue(disabled);\n const measureDroppableContainers = useCallback(function (ids) {\n if (ids === void 0) {\n ids = [];\n }\n\n if (disabledRef.current) {\n return;\n }\n\n setQueue(value => {\n if (value === null) {\n return ids;\n }\n\n return value.concat(ids.filter(id => !value.includes(id)));\n });\n }, [disabledRef]);\n const timeoutId = useRef(null);\n const droppableRects = useLazyMemo(previousValue => {\n if (disabled && !dragging) {\n return defaultValue;\n }\n\n if (!previousValue || previousValue === defaultValue || containersRef.current !== containers || queue != null) {\n const map = new Map();\n\n for (let container of containers) {\n if (!container) {\n continue;\n }\n\n if (queue && queue.length > 0 && !queue.includes(container.id) && container.rect.current) {\n // This container does not need to be re-measured\n map.set(container.id, container.rect.current);\n continue;\n }\n\n const node = container.node.current;\n const rect = node ? new Rect(measure(node), node) : null;\n container.rect.current = rect;\n\n if (rect) {\n map.set(container.id, rect);\n }\n }\n\n return map;\n }\n\n return previousValue;\n }, [containers, queue, dragging, disabled, measure]);\n useEffect(() => {\n containersRef.current = containers;\n }, [containers]);\n useEffect(() => {\n if (disabled) {\n return;\n }\n\n measureDroppableContainers();\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [dragging, disabled]);\n useEffect(() => {\n if (queue && queue.length > 0) {\n setQueue(null);\n }\n }, //eslint-disable-next-line react-hooks/exhaustive-deps\n [JSON.stringify(queue)]);\n useEffect(() => {\n if (disabled || typeof frequency !== 'number' || timeoutId.current !== null) {\n return;\n }\n\n timeoutId.current = setTimeout(() => {\n measureDroppableContainers();\n timeoutId.current = null;\n }, frequency);\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [frequency, disabled, measureDroppableContainers, ...dependencies]);\n return {\n droppableRects,\n measureDroppableContainers,\n measuringScheduled: queue != null\n };\n\n function isDisabled() {\n switch (strategy) {\n case MeasuringStrategy.Always:\n return false;\n\n case MeasuringStrategy.BeforeDragging:\n return dragging;\n\n default:\n return !dragging;\n }\n }\n}\n\nfunction useInitialValue(value, computeFn) {\n return useLazyMemo(previousValue => {\n if (!value) {\n return null;\n }\n\n if (previousValue) {\n return previousValue;\n }\n\n return typeof computeFn === 'function' ? computeFn(value) : value;\n }, [computeFn, value]);\n}\n\nfunction useInitialRect(node, measure) {\n return useInitialValue(node, measure);\n}\n\n/**\r\n * Returns a new MutationObserver instance.\r\n * If `MutationObserver` is undefined in the execution environment, returns `undefined`.\r\n */\n\nfunction useMutationObserver(_ref) {\n let {\n callback,\n disabled\n } = _ref;\n const handleMutations = useEvent(callback);\n const mutationObserver = useMemo(() => {\n if (disabled || typeof window === 'undefined' || typeof window.MutationObserver === 'undefined') {\n return undefined;\n }\n\n const {\n MutationObserver\n } = window;\n return new MutationObserver(handleMutations);\n }, [handleMutations, disabled]);\n useEffect(() => {\n return () => mutationObserver == null ? void 0 : mutationObserver.disconnect();\n }, [mutationObserver]);\n return mutationObserver;\n}\n\n/**\r\n * Returns a new ResizeObserver instance bound to the `onResize` callback.\r\n * If `ResizeObserver` is undefined in the execution environment, returns `undefined`.\r\n */\n\nfunction useResizeObserver(_ref) {\n let {\n callback,\n disabled\n } = _ref;\n const handleResize = useEvent(callback);\n const resizeObserver = useMemo(() => {\n if (disabled || typeof window === 'undefined' || typeof window.ResizeObserver === 'undefined') {\n return undefined;\n }\n\n const {\n ResizeObserver\n } = window;\n return new ResizeObserver(handleResize);\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [disabled]);\n useEffect(() => {\n return () => resizeObserver == null ? void 0 : resizeObserver.disconnect();\n }, [resizeObserver]);\n return resizeObserver;\n}\n\nfunction defaultMeasure(element) {\n return new Rect(getClientRect(element), element);\n}\n\nfunction useRect(element, measure, fallbackRect) {\n if (measure === void 0) {\n measure = defaultMeasure;\n }\n\n const [rect, measureRect] = useReducer(reducer, null);\n const mutationObserver = useMutationObserver({\n callback(records) {\n if (!element) {\n return;\n }\n\n for (const record of records) {\n const {\n type,\n target\n } = record;\n\n if (type === 'childList' && target instanceof HTMLElement && target.contains(element)) {\n measureRect();\n break;\n }\n }\n }\n\n });\n const resizeObserver = useResizeObserver({\n callback: measureRect\n });\n useIsomorphicLayoutEffect(() => {\n measureRect();\n\n if (element) {\n resizeObserver == null ? void 0 : resizeObserver.observe(element);\n mutationObserver == null ? void 0 : mutationObserver.observe(document.body, {\n childList: true,\n subtree: true\n });\n } else {\n resizeObserver == null ? void 0 : resizeObserver.disconnect();\n mutationObserver == null ? void 0 : mutationObserver.disconnect();\n }\n }, [element]);\n return rect;\n\n function reducer(currentRect) {\n if (!element) {\n return null;\n }\n\n if (element.isConnected === false) {\n var _ref;\n\n // Fall back to last rect we measured if the element is\n // no longer connected to the DOM.\n return (_ref = currentRect != null ? currentRect : fallbackRect) != null ? _ref : null;\n }\n\n const newRect = measure(element);\n\n if (JSON.stringify(currentRect) === JSON.stringify(newRect)) {\n return currentRect;\n }\n\n return newRect;\n }\n}\n\nfunction useRectDelta(rect) {\n const initialRect = useInitialValue(rect);\n return getRectDelta(rect, initialRect);\n}\n\nconst defaultValue$1 = [];\nfunction useScrollableAncestors(node) {\n const previousNode = useRef(node);\n const ancestors = useLazyMemo(previousValue => {\n if (!node) {\n return defaultValue$1;\n }\n\n if (previousValue && previousValue !== defaultValue$1 && node && previousNode.current && node.parentNode === previousNode.current.parentNode) {\n return previousValue;\n }\n\n return getScrollableAncestors(node);\n }, [node]);\n useEffect(() => {\n previousNode.current = node;\n }, [node]);\n return ancestors;\n}\n\nfunction useScrollOffsets(elements) {\n const [scrollCoordinates, setScrollCoordinates] = useState(null);\n const prevElements = useRef(elements); // To-do: Throttle the handleScroll callback\n\n const handleScroll = useCallback(event => {\n const scrollingElement = getScrollableElement(event.target);\n\n if (!scrollingElement) {\n return;\n }\n\n setScrollCoordinates(scrollCoordinates => {\n if (!scrollCoordinates) {\n return null;\n }\n\n scrollCoordinates.set(scrollingElement, getScrollCoordinates(scrollingElement));\n return new Map(scrollCoordinates);\n });\n }, []);\n useEffect(() => {\n const previousElements = prevElements.current;\n\n if (elements !== previousElements) {\n cleanup(previousElements);\n const entries = elements.map(element => {\n const scrollableElement = getScrollableElement(element);\n\n if (scrollableElement) {\n scrollableElement.addEventListener('scroll', handleScroll, {\n passive: true\n });\n return [scrollableElement, getScrollCoordinates(scrollableElement)];\n }\n\n return null;\n }).filter(entry => entry != null);\n setScrollCoordinates(entries.length ? new Map(entries) : null);\n prevElements.current = elements;\n }\n\n return () => {\n cleanup(elements);\n cleanup(previousElements);\n };\n\n function cleanup(elements) {\n elements.forEach(element => {\n const scrollableElement = getScrollableElement(element);\n scrollableElement == null ? void 0 : scrollableElement.removeEventListener('scroll', handleScroll);\n });\n }\n }, [handleScroll, elements]);\n return useMemo(() => {\n if (elements.length) {\n return scrollCoordinates ? Array.from(scrollCoordinates.values()).reduce((acc, coordinates) => add(acc, coordinates), defaultCoordinates) : getScrollOffsets(elements);\n }\n\n return defaultCoordinates;\n }, [elements, scrollCoordinates]);\n}\n\nfunction useScrollOffsetsDelta(scrollOffsets, dependencies) {\n if (dependencies === void 0) {\n dependencies = [];\n }\n\n const initialScrollOffsets = useRef(null);\n useEffect(() => {\n initialScrollOffsets.current = null;\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n dependencies);\n useEffect(() => {\n const hasScrollOffsets = scrollOffsets !== defaultCoordinates;\n\n if (hasScrollOffsets && !initialScrollOffsets.current) {\n initialScrollOffsets.current = scrollOffsets;\n }\n\n if (!hasScrollOffsets && initialScrollOffsets.current) {\n initialScrollOffsets.current = null;\n }\n }, [scrollOffsets]);\n return initialScrollOffsets.current ? subtract(scrollOffsets, initialScrollOffsets.current) : defaultCoordinates;\n}\n\nfunction useSensorSetup(sensors) {\n useEffect(() => {\n if (!canUseDOM) {\n return;\n }\n\n const teardownFns = sensors.map(_ref => {\n let {\n sensor\n } = _ref;\n return sensor.setup == null ? void 0 : sensor.setup();\n });\n return () => {\n for (const teardown of teardownFns) {\n teardown == null ? void 0 : teardown();\n }\n };\n }, // TO-DO: Sensors length could theoretically change which would not be a valid dependency\n // eslint-disable-next-line react-hooks/exhaustive-deps\n sensors.map(_ref2 => {\n let {\n sensor\n } = _ref2;\n return sensor;\n }));\n}\n\nfunction useSyntheticListeners(listeners, id) {\n return useMemo(() => {\n return listeners.reduce((acc, _ref) => {\n let {\n eventName,\n handler\n } = _ref;\n\n acc[eventName] = event => {\n handler(event, id);\n };\n\n return acc;\n }, {});\n }, [listeners, id]);\n}\n\nfunction useWindowRect(element) {\n return useMemo(() => element ? getWindowClientRect(element) : null, [element]);\n}\n\nconst defaultValue$2 = [];\nfunction useRects(elements, measure) {\n if (measure === void 0) {\n measure = getClientRect;\n }\n\n const [firstElement] = elements;\n const windowRect = useWindowRect(firstElement ? getWindow(firstElement) : null);\n const [rects, measureRects] = useReducer(reducer, defaultValue$2);\n const resizeObserver = useResizeObserver({\n callback: measureRects\n });\n\n if (elements.length > 0 && rects === defaultValue$2) {\n measureRects();\n }\n\n useIsomorphicLayoutEffect(() => {\n if (elements.length) {\n elements.forEach(element => resizeObserver == null ? void 0 : resizeObserver.observe(element));\n } else {\n resizeObserver == null ? void 0 : resizeObserver.disconnect();\n measureRects();\n }\n }, [elements]);\n return rects;\n\n function reducer() {\n if (!elements.length) {\n return defaultValue$2;\n }\n\n return elements.map(element => isDocumentScrollingElement(element) ? windowRect : new Rect(measure(element), element));\n }\n}\n\nfunction getMeasurableNode(node) {\n if (!node) {\n return null;\n }\n\n if (node.children.length > 1) {\n return node;\n }\n\n const firstChild = node.children[0];\n return isHTMLElement(firstChild) ? firstChild : node;\n}\n\nfunction useDragOverlayMeasuring(_ref) {\n let {\n measure\n } = _ref;\n const [rect, setRect] = useState(null);\n const handleResize = useCallback(entries => {\n for (const {\n target\n } of entries) {\n if (isHTMLElement(target)) {\n setRect(rect => {\n const newRect = measure(target);\n return rect ? { ...rect,\n width: newRect.width,\n height: newRect.height\n } : newRect;\n });\n break;\n }\n }\n }, [measure]);\n const resizeObserver = useResizeObserver({\n callback: handleResize\n });\n const handleNodeChange = useCallback(element => {\n const node = getMeasurableNode(element);\n resizeObserver == null ? void 0 : resizeObserver.disconnect();\n\n if (node) {\n resizeObserver == null ? void 0 : resizeObserver.observe(node);\n }\n\n setRect(node ? measure(node) : null);\n }, [measure, resizeObserver]);\n const [nodeRef, setRef] = useNodeRef(handleNodeChange);\n return useMemo(() => ({\n nodeRef,\n rect,\n setRef\n }), [rect, nodeRef, setRef]);\n}\n\nconst defaultSensors = [{\n sensor: PointerSensor,\n options: {}\n}, {\n sensor: KeyboardSensor,\n options: {}\n}];\nconst defaultData = {\n current: {}\n};\nconst defaultMeasuringConfiguration = {\n draggable: {\n measure: getTransformAgnosticClientRect\n },\n droppable: {\n measure: getTransformAgnosticClientRect,\n strategy: MeasuringStrategy.WhileDragging,\n frequency: MeasuringFrequency.Optimized\n },\n dragOverlay: {\n measure: getClientRect\n }\n};\n\nclass DroppableContainersMap extends Map {\n get(id) {\n var _super$get;\n\n return id != null ? (_super$get = super.get(id)) != null ? _super$get : undefined : undefined;\n }\n\n toArray() {\n return Array.from(this.values());\n }\n\n getEnabled() {\n return this.toArray().filter(_ref => {\n let {\n disabled\n } = _ref;\n return !disabled;\n });\n }\n\n getNodeFor(id) {\n var _this$get$node$curren, _this$get;\n\n return (_this$get$node$curren = (_this$get = this.get(id)) == null ? void 0 : _this$get.node.current) != null ? _this$get$node$curren : undefined;\n }\n\n}\n\nconst defaultPublicContext = {\n activatorEvent: null,\n active: null,\n activeNode: null,\n activeNodeRect: null,\n collisions: null,\n containerNodeRect: null,\n draggableNodes: /*#__PURE__*/new Map(),\n droppableRects: /*#__PURE__*/new Map(),\n droppableContainers: /*#__PURE__*/new DroppableContainersMap(),\n over: null,\n dragOverlay: {\n nodeRef: {\n current: null\n },\n rect: null,\n setRef: noop\n },\n scrollableAncestors: [],\n scrollableAncestorRects: [],\n measuringConfiguration: defaultMeasuringConfiguration,\n measureDroppableContainers: noop,\n windowRect: null,\n measuringScheduled: false\n};\nconst defaultInternalContext = {\n activatorEvent: null,\n activators: [],\n active: null,\n activeNodeRect: null,\n ariaDescribedById: {\n draggable: ''\n },\n dispatch: noop,\n draggableNodes: /*#__PURE__*/new Map(),\n over: null,\n measureDroppableContainers: noop\n};\nconst InternalContext = /*#__PURE__*/createContext(defaultInternalContext);\nconst PublicContext = /*#__PURE__*/createContext(defaultPublicContext);\n\nfunction getInitialState() {\n return {\n draggable: {\n active: null,\n initialCoordinates: {\n x: 0,\n y: 0\n },\n nodes: new Map(),\n translate: {\n x: 0,\n y: 0\n }\n },\n droppable: {\n containers: new DroppableContainersMap()\n }\n };\n}\nfunction reducer(state, action) {\n switch (action.type) {\n case Action.DragStart:\n return { ...state,\n draggable: { ...state.draggable,\n initialCoordinates: action.initialCoordinates,\n active: action.active\n }\n };\n\n case Action.DragMove:\n if (!state.draggable.active) {\n return state;\n }\n\n return { ...state,\n draggable: { ...state.draggable,\n translate: {\n x: action.coordinates.x - state.draggable.initialCoordinates.x,\n y: action.coordinates.y - state.draggable.initialCoordinates.y\n }\n }\n };\n\n case Action.DragEnd:\n case Action.DragCancel:\n return { ...state,\n draggable: { ...state.draggable,\n active: null,\n initialCoordinates: {\n x: 0,\n y: 0\n },\n translate: {\n x: 0,\n y: 0\n }\n }\n };\n\n case Action.RegisterDroppable:\n {\n const {\n element\n } = action;\n const {\n id\n } = element;\n const containers = new DroppableContainersMap(state.droppable.containers);\n containers.set(id, element);\n return { ...state,\n droppable: { ...state.droppable,\n containers\n }\n };\n }\n\n case Action.SetDroppableDisabled:\n {\n const {\n id,\n key,\n disabled\n } = action;\n const element = state.droppable.containers.get(id);\n\n if (!element || key !== element.key) {\n return state;\n }\n\n const containers = new DroppableContainersMap(state.droppable.containers);\n containers.set(id, { ...element,\n disabled\n });\n return { ...state,\n droppable: { ...state.droppable,\n containers\n }\n };\n }\n\n case Action.UnregisterDroppable:\n {\n const {\n id,\n key\n } = action;\n const element = state.droppable.containers.get(id);\n\n if (!element || key !== element.key) {\n return state;\n }\n\n const containers = new DroppableContainersMap(state.droppable.containers);\n containers.delete(id);\n return { ...state,\n droppable: { ...state.droppable,\n containers\n }\n };\n }\n\n default:\n {\n return state;\n }\n }\n}\n\nfunction RestoreFocus(_ref) {\n let {\n disabled\n } = _ref;\n const {\n active,\n activatorEvent,\n draggableNodes\n } = useContext(InternalContext);\n const previousActivatorEvent = usePrevious(activatorEvent);\n const previousActiveId = usePrevious(active == null ? void 0 : active.id); // Restore keyboard focus on the activator node\n\n useEffect(() => {\n if (disabled) {\n return;\n }\n\n if (!activatorEvent && previousActivatorEvent && previousActiveId != null) {\n if (!isKeyboardEvent(previousActivatorEvent)) {\n return;\n }\n\n if (document.activeElement === previousActivatorEvent.target) {\n // No need to restore focus\n return;\n }\n\n const draggableNode = draggableNodes.get(previousActiveId);\n\n if (!draggableNode) {\n return;\n }\n\n const {\n activatorNode,\n node\n } = draggableNode;\n\n if (!activatorNode.current && !node.current) {\n return;\n }\n\n requestAnimationFrame(() => {\n for (const element of [activatorNode.current, node.current]) {\n if (!element) {\n continue;\n }\n\n const focusableNode = findFirstFocusableNode(element);\n\n if (focusableNode) {\n focusableNode.focus();\n break;\n }\n }\n });\n }\n }, [activatorEvent, disabled, draggableNodes, previousActiveId, previousActivatorEvent]);\n return null;\n}\n\nfunction applyModifiers(modifiers, _ref) {\n let {\n transform,\n ...args\n } = _ref;\n return modifiers != null && modifiers.length ? modifiers.reduce((accumulator, modifier) => {\n return modifier({\n transform: accumulator,\n ...args\n });\n }, transform) : transform;\n}\n\nfunction useMeasuringConfiguration(config) {\n return useMemo(() => ({\n draggable: { ...defaultMeasuringConfiguration.draggable,\n ...(config == null ? void 0 : config.draggable)\n },\n droppable: { ...defaultMeasuringConfiguration.droppable,\n ...(config == null ? void 0 : config.droppable)\n },\n dragOverlay: { ...defaultMeasuringConfiguration.dragOverlay,\n ...(config == null ? void 0 : config.dragOverlay)\n }\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [config == null ? void 0 : config.draggable, config == null ? void 0 : config.droppable, config == null ? void 0 : config.dragOverlay]);\n}\n\nfunction useLayoutShiftScrollCompensation(_ref) {\n let {\n activeNode,\n measure,\n initialRect,\n config = true\n } = _ref;\n const initialized = useRef(false);\n const {\n x,\n y\n } = typeof config === 'boolean' ? {\n x: config,\n y: config\n } : config;\n useIsomorphicLayoutEffect(() => {\n const disabled = !x && !y;\n\n if (disabled || !activeNode) {\n initialized.current = false;\n return;\n }\n\n if (initialized.current || !initialRect) {\n // Return early if layout shift scroll compensation was already attempted\n // or if there is no initialRect to compare to.\n return;\n } // Get the most up to date node ref for the active draggable\n\n\n const node = activeNode == null ? void 0 : activeNode.node.current;\n\n if (!node || node.isConnected === false) {\n // Return early if there is no attached node ref or if the node is\n // disconnected from the document.\n return;\n }\n\n const rect = measure(node);\n const rectDelta = getRectDelta(rect, initialRect);\n\n if (!x) {\n rectDelta.x = 0;\n }\n\n if (!y) {\n rectDelta.y = 0;\n } // Only perform layout shift scroll compensation once\n\n\n initialized.current = true;\n\n if (Math.abs(rectDelta.x) > 0 || Math.abs(rectDelta.y) > 0) {\n const firstScrollableAncestor = getFirstScrollableAncestor(node);\n\n if (firstScrollableAncestor) {\n firstScrollableAncestor.scrollBy({\n top: rectDelta.y,\n left: rectDelta.x\n });\n }\n }\n }, [activeNode, x, y, initialRect, measure]);\n}\n\nconst ActiveDraggableContext = /*#__PURE__*/createContext({ ...defaultCoordinates,\n scaleX: 1,\n scaleY: 1\n});\nvar Status;\n\n(function (Status) {\n Status[Status[\"Uninitialized\"] = 0] = \"Uninitialized\";\n Status[Status[\"Initializing\"] = 1] = \"Initializing\";\n Status[Status[\"Initialized\"] = 2] = \"Initialized\";\n})(Status || (Status = {}));\n\nconst DndContext = /*#__PURE__*/memo(function DndContext(_ref) {\n var _sensorContext$curren, _dragOverlay$nodeRef$, _dragOverlay$rect, _over$rect;\n\n let {\n id,\n accessibility,\n autoScroll = true,\n children,\n sensors = defaultSensors,\n collisionDetection = rectIntersection,\n measuring,\n modifiers,\n ...props\n } = _ref;\n const store = useReducer(reducer, undefined, getInitialState);\n const [state, dispatch] = store;\n const [dispatchMonitorEvent, registerMonitorListener] = useDndMonitorProvider();\n const [status, setStatus] = useState(Status.Uninitialized);\n const isInitialized = status === Status.Initialized;\n const {\n draggable: {\n active: activeId,\n nodes: draggableNodes,\n translate\n },\n droppable: {\n containers: droppableContainers\n }\n } = state;\n const node = activeId ? draggableNodes.get(activeId) : null;\n const activeRects = useRef({\n initial: null,\n translated: null\n });\n const active = useMemo(() => {\n var _node$data;\n\n return activeId != null ? {\n id: activeId,\n // It's possible for the active node to unmount while dragging\n data: (_node$data = node == null ? void 0 : node.data) != null ? _node$data : defaultData,\n rect: activeRects\n } : null;\n }, [activeId, node]);\n const activeRef = useRef(null);\n const [activeSensor, setActiveSensor] = useState(null);\n const [activatorEvent, setActivatorEvent] = useState(null);\n const latestProps = useLatestValue(props, Object.values(props));\n const draggableDescribedById = useUniqueId(\"DndDescribedBy\", id);\n const enabledDroppableContainers = useMemo(() => droppableContainers.getEnabled(), [droppableContainers]);\n const measuringConfiguration = useMeasuringConfiguration(measuring);\n const {\n droppableRects,\n measureDroppableContainers,\n measuringScheduled\n } = useDroppableMeasuring(enabledDroppableContainers, {\n dragging: isInitialized,\n dependencies: [translate.x, translate.y],\n config: measuringConfiguration.droppable\n });\n const activeNode = useCachedNode(draggableNodes, activeId);\n const activationCoordinates = useMemo(() => activatorEvent ? getEventCoordinates(activatorEvent) : null, [activatorEvent]);\n const autoScrollOptions = getAutoScrollerOptions();\n const initialActiveNodeRect = useInitialRect(activeNode, measuringConfiguration.draggable.measure);\n useLayoutShiftScrollCompensation({\n activeNode: activeId ? draggableNodes.get(activeId) : null,\n config: autoScrollOptions.layoutShiftCompensation,\n initialRect: initialActiveNodeRect,\n measure: measuringConfiguration.draggable.measure\n });\n const activeNodeRect = useRect(activeNode, measuringConfiguration.draggable.measure, initialActiveNodeRect);\n const containerNodeRect = useRect(activeNode ? activeNode.parentElement : null);\n const sensorContext = useRef({\n activatorEvent: null,\n active: null,\n activeNode,\n collisionRect: null,\n collisions: null,\n droppableRects,\n draggableNodes,\n draggingNode: null,\n draggingNodeRect: null,\n droppableContainers,\n over: null,\n scrollableAncestors: [],\n scrollAdjustedTranslate: null\n });\n const overNode = droppableContainers.getNodeFor((_sensorContext$curren = sensorContext.current.over) == null ? void 0 : _sensorContext$curren.id);\n const dragOverlay = useDragOverlayMeasuring({\n measure: measuringConfiguration.dragOverlay.measure\n }); // Use the rect of the drag overlay if it is mounted\n\n const draggingNode = (_dragOverlay$nodeRef$ = dragOverlay.nodeRef.current) != null ? _dragOverlay$nodeRef$ : activeNode;\n const draggingNodeRect = isInitialized ? (_dragOverlay$rect = dragOverlay.rect) != null ? _dragOverlay$rect : activeNodeRect : null;\n const usesDragOverlay = Boolean(dragOverlay.nodeRef.current && dragOverlay.rect); // The delta between the previous and new position of the draggable node\n // is only relevant when there is no drag overlay\n\n const nodeRectDelta = useRectDelta(usesDragOverlay ? null : activeNodeRect); // Get the window rect of the dragging node\n\n const windowRect = useWindowRect(draggingNode ? getWindow(draggingNode) : null); // Get scrollable ancestors of the dragging node\n\n const scrollableAncestors = useScrollableAncestors(isInitialized ? overNode != null ? overNode : activeNode : null);\n const scrollableAncestorRects = useRects(scrollableAncestors); // Apply modifiers\n\n const modifiedTranslate = applyModifiers(modifiers, {\n transform: {\n x: translate.x - nodeRectDelta.x,\n y: translate.y - nodeRectDelta.y,\n scaleX: 1,\n scaleY: 1\n },\n activatorEvent,\n active,\n activeNodeRect,\n containerNodeRect,\n draggingNodeRect,\n over: sensorContext.current.over,\n overlayNodeRect: dragOverlay.rect,\n scrollableAncestors,\n scrollableAncestorRects,\n windowRect\n });\n const pointerCoordinates = activationCoordinates ? add(activationCoordinates, translate) : null;\n const scrollOffsets = useScrollOffsets(scrollableAncestors); // Represents the scroll delta since dragging was initiated\n\n const scrollAdjustment = useScrollOffsetsDelta(scrollOffsets); // Represents the scroll delta since the last time the active node rect was measured\n\n const activeNodeScrollDelta = useScrollOffsetsDelta(scrollOffsets, [activeNodeRect]);\n const scrollAdjustedTranslate = add(modifiedTranslate, scrollAdjustment);\n const collisionRect = draggingNodeRect ? getAdjustedRect(draggingNodeRect, modifiedTranslate) : null;\n const collisions = active && collisionRect ? collisionDetection({\n active,\n collisionRect,\n droppableRects,\n droppableContainers: enabledDroppableContainers,\n pointerCoordinates\n }) : null;\n const overId = getFirstCollision(collisions, 'id');\n const [over, setOver] = useState(null); // When there is no drag overlay used, we need to account for the\n // window scroll delta\n\n const appliedTranslate = usesDragOverlay ? modifiedTranslate : add(modifiedTranslate, activeNodeScrollDelta);\n const transform = adjustScale(appliedTranslate, (_over$rect = over == null ? void 0 : over.rect) != null ? _over$rect : null, activeNodeRect);\n const instantiateSensor = useCallback((event, _ref2) => {\n let {\n sensor: Sensor,\n options\n } = _ref2;\n\n if (activeRef.current == null) {\n return;\n }\n\n const activeNode = draggableNodes.get(activeRef.current);\n\n if (!activeNode) {\n return;\n }\n\n const activatorEvent = event.nativeEvent;\n const sensorInstance = new Sensor({\n active: activeRef.current,\n activeNode,\n event: activatorEvent,\n options,\n // Sensors need to be instantiated with refs for arguments that change over time\n // otherwise they are frozen in time with the stale arguments\n context: sensorContext,\n\n onStart(initialCoordinates) {\n const id = activeRef.current;\n\n if (id == null) {\n return;\n }\n\n const draggableNode = draggableNodes.get(id);\n\n if (!draggableNode) {\n return;\n }\n\n const {\n onDragStart\n } = latestProps.current;\n const event = {\n active: {\n id,\n data: draggableNode.data,\n rect: activeRects\n }\n };\n unstable_batchedUpdates(() => {\n onDragStart == null ? void 0 : onDragStart(event);\n setStatus(Status.Initializing);\n dispatch({\n type: Action.DragStart,\n initialCoordinates,\n active: id\n });\n dispatchMonitorEvent({\n type: 'onDragStart',\n event\n });\n });\n },\n\n onMove(coordinates) {\n dispatch({\n type: Action.DragMove,\n coordinates\n });\n },\n\n onEnd: createHandler(Action.DragEnd),\n onCancel: createHandler(Action.DragCancel)\n });\n unstable_batchedUpdates(() => {\n setActiveSensor(sensorInstance);\n setActivatorEvent(event.nativeEvent);\n });\n\n function createHandler(type) {\n return async function handler() {\n const {\n active,\n collisions,\n over,\n scrollAdjustedTranslate\n } = sensorContext.current;\n let event = null;\n\n if (active && scrollAdjustedTranslate) {\n const {\n cancelDrop\n } = latestProps.current;\n event = {\n activatorEvent,\n active: active,\n collisions,\n delta: scrollAdjustedTranslate,\n over\n };\n\n if (type === Action.DragEnd && typeof cancelDrop === 'function') {\n const shouldCancel = await Promise.resolve(cancelDrop(event));\n\n if (shouldCancel) {\n type = Action.DragCancel;\n }\n }\n }\n\n activeRef.current = null;\n unstable_batchedUpdates(() => {\n dispatch({\n type\n });\n setStatus(Status.Uninitialized);\n setOver(null);\n setActiveSensor(null);\n setActivatorEvent(null);\n const eventName = type === Action.DragEnd ? 'onDragEnd' : 'onDragCancel';\n\n if (event) {\n const handler = latestProps.current[eventName];\n handler == null ? void 0 : handler(event);\n dispatchMonitorEvent({\n type: eventName,\n event\n });\n }\n });\n };\n }\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [draggableNodes]);\n const bindActivatorToSensorInstantiator = useCallback((handler, sensor) => {\n return (event, active) => {\n const nativeEvent = event.nativeEvent;\n const activeDraggableNode = draggableNodes.get(active);\n\n if ( // Another sensor is already instantiating\n activeRef.current !== null || // No active draggable\n !activeDraggableNode || // Event has already been captured\n nativeEvent.dndKit || nativeEvent.defaultPrevented) {\n return;\n }\n\n const activationContext = {\n active: activeDraggableNode\n };\n const shouldActivate = handler(event, sensor.options, activationContext);\n\n if (shouldActivate === true) {\n nativeEvent.dndKit = {\n capturedBy: sensor.sensor\n };\n activeRef.current = active;\n instantiateSensor(event, sensor);\n }\n };\n }, [draggableNodes, instantiateSensor]);\n const activators = useCombineActivators(sensors, bindActivatorToSensorInstantiator);\n useSensorSetup(sensors);\n useIsomorphicLayoutEffect(() => {\n if (activeNodeRect && status === Status.Initializing) {\n setStatus(Status.Initialized);\n }\n }, [activeNodeRect, status]);\n useEffect(() => {\n const {\n onDragMove\n } = latestProps.current;\n const {\n active,\n activatorEvent,\n collisions,\n over\n } = sensorContext.current;\n\n if (!active || !activatorEvent) {\n return;\n }\n\n const event = {\n active,\n activatorEvent,\n collisions,\n delta: {\n x: scrollAdjustedTranslate.x,\n y: scrollAdjustedTranslate.y\n },\n over\n };\n unstable_batchedUpdates(() => {\n onDragMove == null ? void 0 : onDragMove(event);\n dispatchMonitorEvent({\n type: 'onDragMove',\n event\n });\n });\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [scrollAdjustedTranslate.x, scrollAdjustedTranslate.y]);\n useEffect(() => {\n const {\n active,\n activatorEvent,\n collisions,\n droppableContainers,\n scrollAdjustedTranslate\n } = sensorContext.current;\n\n if (!active || activeRef.current == null || !activatorEvent || !scrollAdjustedTranslate) {\n return;\n }\n\n const {\n onDragOver\n } = latestProps.current;\n const overContainer = droppableContainers.get(overId);\n const over = overContainer && overContainer.rect.current ? {\n id: overContainer.id,\n rect: overContainer.rect.current,\n data: overContainer.data,\n disabled: overContainer.disabled\n } : null;\n const event = {\n active,\n activatorEvent,\n collisions,\n delta: {\n x: scrollAdjustedTranslate.x,\n y: scrollAdjustedTranslate.y\n },\n over\n };\n unstable_batchedUpdates(() => {\n setOver(over);\n onDragOver == null ? void 0 : onDragOver(event);\n dispatchMonitorEvent({\n type: 'onDragOver',\n event\n });\n });\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [overId]);\n useIsomorphicLayoutEffect(() => {\n sensorContext.current = {\n activatorEvent,\n active,\n activeNode,\n collisionRect,\n collisions,\n droppableRects,\n draggableNodes,\n draggingNode,\n draggingNodeRect,\n droppableContainers,\n over,\n scrollableAncestors,\n scrollAdjustedTranslate\n };\n activeRects.current = {\n initial: draggingNodeRect,\n translated: collisionRect\n };\n }, [active, activeNode, collisions, collisionRect, draggableNodes, draggingNode, draggingNodeRect, droppableRects, droppableContainers, over, scrollableAncestors, scrollAdjustedTranslate]);\n useAutoScroller({ ...autoScrollOptions,\n delta: translate,\n draggingRect: collisionRect,\n pointerCoordinates,\n scrollableAncestors,\n scrollableAncestorRects\n });\n const publicContext = useMemo(() => {\n const context = {\n active,\n activeNode,\n activeNodeRect,\n activatorEvent,\n collisions,\n containerNodeRect,\n dragOverlay,\n draggableNodes,\n droppableContainers,\n droppableRects,\n over,\n measureDroppableContainers,\n scrollableAncestors,\n scrollableAncestorRects,\n measuringConfiguration,\n measuringScheduled,\n windowRect\n };\n return context;\n }, [active, activeNode, activeNodeRect, activatorEvent, collisions, containerNodeRect, dragOverlay, draggableNodes, droppableContainers, droppableRects, over, measureDroppableContainers, scrollableAncestors, scrollableAncestorRects, measuringConfiguration, measuringScheduled, windowRect]);\n const internalContext = useMemo(() => {\n const context = {\n activatorEvent,\n activators,\n active,\n activeNodeRect,\n ariaDescribedById: {\n draggable: draggableDescribedById\n },\n dispatch,\n draggableNodes,\n over,\n measureDroppableContainers\n };\n return context;\n }, [activatorEvent, activators, active, activeNodeRect, dispatch, draggableDescribedById, draggableNodes, over, measureDroppableContainers]);\n return React.createElement(DndMonitorContext.Provider, {\n value: registerMonitorListener\n }, React.createElement(InternalContext.Provider, {\n value: internalContext\n }, React.createElement(PublicContext.Provider, {\n value: publicContext\n }, React.createElement(ActiveDraggableContext.Provider, {\n value: transform\n }, children)), React.createElement(RestoreFocus, {\n disabled: (accessibility == null ? void 0 : accessibility.restoreFocus) === false\n })), React.createElement(Accessibility, { ...accessibility,\n hiddenTextDescribedById: draggableDescribedById\n }));\n\n function getAutoScrollerOptions() {\n const activeSensorDisablesAutoscroll = (activeSensor == null ? void 0 : activeSensor.autoScrollEnabled) === false;\n const autoScrollGloballyDisabled = typeof autoScroll === 'object' ? autoScroll.enabled === false : autoScroll === false;\n const enabled = isInitialized && !activeSensorDisablesAutoscroll && !autoScrollGloballyDisabled;\n\n if (typeof autoScroll === 'object') {\n return { ...autoScroll,\n enabled\n };\n }\n\n return {\n enabled\n };\n }\n});\n\nconst NullContext = /*#__PURE__*/createContext(null);\nconst defaultRole = 'button';\nconst ID_PREFIX = 'Droppable';\nfunction useDraggable(_ref) {\n let {\n id,\n data,\n disabled = false,\n attributes\n } = _ref;\n const key = useUniqueId(ID_PREFIX);\n const {\n activators,\n activatorEvent,\n active,\n activeNodeRect,\n ariaDescribedById,\n draggableNodes,\n over\n } = useContext(InternalContext);\n const {\n role = defaultRole,\n roleDescription = 'draggable',\n tabIndex = 0\n } = attributes != null ? attributes : {};\n const isDragging = (active == null ? void 0 : active.id) === id;\n const transform = useContext(isDragging ? ActiveDraggableContext : NullContext);\n const [node, setNodeRef] = useNodeRef();\n const [activatorNode, setActivatorNodeRef] = useNodeRef();\n const listeners = useSyntheticListeners(activators, id);\n const dataRef = useLatestValue(data);\n useIsomorphicLayoutEffect(() => {\n draggableNodes.set(id, {\n id,\n key,\n node,\n activatorNode,\n data: dataRef\n });\n return () => {\n const node = draggableNodes.get(id);\n\n if (node && node.key === key) {\n draggableNodes.delete(id);\n }\n };\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [draggableNodes, id]);\n const memoizedAttributes = useMemo(() => ({\n role,\n tabIndex,\n 'aria-disabled': disabled,\n 'aria-pressed': isDragging && role === defaultRole ? true : undefined,\n 'aria-roledescription': roleDescription,\n 'aria-describedby': ariaDescribedById.draggable\n }), [disabled, role, tabIndex, isDragging, roleDescription, ariaDescribedById.draggable]);\n return {\n active,\n activatorEvent,\n activeNodeRect,\n attributes: memoizedAttributes,\n isDragging,\n listeners: disabled ? undefined : listeners,\n node,\n over,\n setNodeRef,\n setActivatorNodeRef,\n transform\n };\n}\n\nfunction useDndContext() {\n return useContext(PublicContext);\n}\n\nconst ID_PREFIX$1 = 'Droppable';\nconst defaultResizeObserverConfig = {\n timeout: 25\n};\nfunction useDroppable(_ref) {\n let {\n data,\n disabled = false,\n id,\n resizeObserverConfig\n } = _ref;\n const key = useUniqueId(ID_PREFIX$1);\n const {\n active,\n dispatch,\n over,\n measureDroppableContainers\n } = useContext(InternalContext);\n const previous = useRef({\n disabled\n });\n const resizeObserverConnected = useRef(false);\n const rect = useRef(null);\n const callbackId = useRef(null);\n const {\n disabled: resizeObserverDisabled,\n updateMeasurementsFor,\n timeout: resizeObserverTimeout\n } = { ...defaultResizeObserverConfig,\n ...resizeObserverConfig\n };\n const ids = useLatestValue(updateMeasurementsFor != null ? updateMeasurementsFor : id);\n const handleResize = useCallback(() => {\n if (!resizeObserverConnected.current) {\n // ResizeObserver invokes the `handleResize` callback as soon as `observe` is called,\n // assuming the element is rendered and displayed.\n resizeObserverConnected.current = true;\n return;\n }\n\n if (callbackId.current != null) {\n clearTimeout(callbackId.current);\n }\n\n callbackId.current = setTimeout(() => {\n measureDroppableContainers(Array.isArray(ids.current) ? ids.current : [ids.current]);\n callbackId.current = null;\n }, resizeObserverTimeout);\n }, //eslint-disable-next-line react-hooks/exhaustive-deps\n [resizeObserverTimeout]);\n const resizeObserver = useResizeObserver({\n callback: handleResize,\n disabled: resizeObserverDisabled || !active\n });\n const handleNodeChange = useCallback((newElement, previousElement) => {\n if (!resizeObserver) {\n return;\n }\n\n if (previousElement) {\n resizeObserver.unobserve(previousElement);\n resizeObserverConnected.current = false;\n }\n\n if (newElement) {\n resizeObserver.observe(newElement);\n }\n }, [resizeObserver]);\n const [nodeRef, setNodeRef] = useNodeRef(handleNodeChange);\n const dataRef = useLatestValue(data);\n useEffect(() => {\n if (!resizeObserver || !nodeRef.current) {\n return;\n }\n\n resizeObserver.disconnect();\n resizeObserverConnected.current = false;\n resizeObserver.observe(nodeRef.current);\n }, [nodeRef, resizeObserver]);\n useIsomorphicLayoutEffect(() => {\n dispatch({\n type: Action.RegisterDroppable,\n element: {\n id,\n key,\n disabled,\n node: nodeRef,\n rect,\n data: dataRef\n }\n });\n return () => dispatch({\n type: Action.UnregisterDroppable,\n key,\n id\n });\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [id]);\n useEffect(() => {\n if (disabled !== previous.current.disabled) {\n dispatch({\n type: Action.SetDroppableDisabled,\n id,\n key,\n disabled\n });\n previous.current.disabled = disabled;\n }\n }, [id, key, disabled, dispatch]);\n return {\n active,\n rect,\n isOver: (over == null ? void 0 : over.id) === id,\n node: nodeRef,\n over,\n setNodeRef\n };\n}\n\nfunction AnimationManager(_ref) {\n let {\n animation,\n children\n } = _ref;\n const [clonedChildren, setClonedChildren] = useState(null);\n const [element, setElement] = useState(null);\n const previousChildren = usePrevious(children);\n\n if (!children && !clonedChildren && previousChildren) {\n setClonedChildren(previousChildren);\n }\n\n useIsomorphicLayoutEffect(() => {\n if (!element) {\n return;\n }\n\n const key = clonedChildren == null ? void 0 : clonedChildren.key;\n const id = clonedChildren == null ? void 0 : clonedChildren.props.id;\n\n if (key == null || id == null) {\n setClonedChildren(null);\n return;\n }\n\n Promise.resolve(animation(id, element)).then(() => {\n setClonedChildren(null);\n });\n }, [animation, clonedChildren, element]);\n return React.createElement(React.Fragment, null, children, clonedChildren ? cloneElement(clonedChildren, {\n ref: setElement\n }) : null);\n}\n\nconst defaultTransform = {\n x: 0,\n y: 0,\n scaleX: 1,\n scaleY: 1\n};\nfunction NullifiedContextProvider(_ref) {\n let {\n children\n } = _ref;\n return React.createElement(InternalContext.Provider, {\n value: defaultInternalContext\n }, React.createElement(ActiveDraggableContext.Provider, {\n value: defaultTransform\n }, children));\n}\n\nconst baseStyles = {\n position: 'fixed',\n touchAction: 'none'\n};\n\nconst defaultTransition = activatorEvent => {\n const isKeyboardActivator = isKeyboardEvent(activatorEvent);\n return isKeyboardActivator ? 'transform 250ms ease' : undefined;\n};\n\nconst PositionedOverlay = /*#__PURE__*/forwardRef((_ref, ref) => {\n let {\n as,\n activatorEvent,\n adjustScale,\n children,\n className,\n rect,\n style,\n transform,\n transition = defaultTransition\n } = _ref;\n\n if (!rect) {\n return null;\n }\n\n const scaleAdjustedTransform = adjustScale ? transform : { ...transform,\n scaleX: 1,\n scaleY: 1\n };\n const styles = { ...baseStyles,\n width: rect.width,\n height: rect.height,\n top: rect.top,\n left: rect.left,\n transform: CSS.Transform.toString(scaleAdjustedTransform),\n transformOrigin: adjustScale && activatorEvent ? getRelativeTransformOrigin(activatorEvent, rect) : undefined,\n transition: typeof transition === 'function' ? transition(activatorEvent) : transition,\n ...style\n };\n return React.createElement(as, {\n className,\n style: styles,\n ref\n }, children);\n});\n\nconst defaultDropAnimationSideEffects = options => _ref => {\n let {\n active,\n dragOverlay\n } = _ref;\n const originalStyles = {};\n const {\n styles,\n className\n } = options;\n\n if (styles != null && styles.active) {\n for (const [key, value] of Object.entries(styles.active)) {\n if (value === undefined) {\n continue;\n }\n\n originalStyles[key] = active.node.style.getPropertyValue(key);\n active.node.style.setProperty(key, value);\n }\n }\n\n if (styles != null && styles.dragOverlay) {\n for (const [key, value] of Object.entries(styles.dragOverlay)) {\n if (value === undefined) {\n continue;\n }\n\n dragOverlay.node.style.setProperty(key, value);\n }\n }\n\n if (className != null && className.active) {\n active.node.classList.add(className.active);\n }\n\n if (className != null && className.dragOverlay) {\n dragOverlay.node.classList.add(className.dragOverlay);\n }\n\n return function cleanup() {\n for (const [key, value] of Object.entries(originalStyles)) {\n active.node.style.setProperty(key, value);\n }\n\n if (className != null && className.active) {\n active.node.classList.remove(className.active);\n }\n };\n};\n\nconst defaultKeyframeResolver = _ref2 => {\n let {\n transform: {\n initial,\n final\n }\n } = _ref2;\n return [{\n transform: CSS.Transform.toString(initial)\n }, {\n transform: CSS.Transform.toString(final)\n }];\n};\n\nconst defaultDropAnimationConfiguration = {\n duration: 250,\n easing: 'ease',\n keyframes: defaultKeyframeResolver,\n sideEffects: /*#__PURE__*/defaultDropAnimationSideEffects({\n styles: {\n active: {\n opacity: '0'\n }\n }\n })\n};\nfunction useDropAnimation(_ref3) {\n let {\n config,\n draggableNodes,\n droppableContainers,\n measuringConfiguration\n } = _ref3;\n return useEvent((id, node) => {\n if (config === null) {\n return;\n }\n\n const activeDraggable = draggableNodes.get(id);\n\n if (!activeDraggable) {\n return;\n }\n\n const activeNode = activeDraggable.node.current;\n\n if (!activeNode) {\n return;\n }\n\n const measurableNode = getMeasurableNode(node);\n\n if (!measurableNode) {\n return;\n }\n\n const {\n transform\n } = getWindow(node).getComputedStyle(node);\n const parsedTransform = parseTransform(transform);\n\n if (!parsedTransform) {\n return;\n }\n\n const animation = typeof config === 'function' ? config : createDefaultDropAnimation(config);\n scrollIntoViewIfNeeded(activeNode, measuringConfiguration.draggable.measure);\n return animation({\n active: {\n id,\n data: activeDraggable.data,\n node: activeNode,\n rect: measuringConfiguration.draggable.measure(activeNode)\n },\n draggableNodes,\n dragOverlay: {\n node,\n rect: measuringConfiguration.dragOverlay.measure(measurableNode)\n },\n droppableContainers,\n measuringConfiguration,\n transform: parsedTransform\n });\n });\n}\n\nfunction createDefaultDropAnimation(options) {\n const {\n duration,\n easing,\n sideEffects,\n keyframes\n } = { ...defaultDropAnimationConfiguration,\n ...options\n };\n return _ref4 => {\n let {\n active,\n dragOverlay,\n transform,\n ...rest\n } = _ref4;\n\n if (!duration) {\n // Do not animate if animation duration is zero.\n return;\n }\n\n const delta = {\n x: dragOverlay.rect.left - active.rect.left,\n y: dragOverlay.rect.top - active.rect.top\n };\n const scale = {\n scaleX: transform.scaleX !== 1 ? active.rect.width * transform.scaleX / dragOverlay.rect.width : 1,\n scaleY: transform.scaleY !== 1 ? active.rect.height * transform.scaleY / dragOverlay.rect.height : 1\n };\n const finalTransform = {\n x: transform.x - delta.x,\n y: transform.y - delta.y,\n ...scale\n };\n const animationKeyframes = keyframes({ ...rest,\n active,\n dragOverlay,\n transform: {\n initial: transform,\n final: finalTransform\n }\n });\n const [firstKeyframe] = animationKeyframes;\n const lastKeyframe = animationKeyframes[animationKeyframes.length - 1];\n\n if (JSON.stringify(firstKeyframe) === JSON.stringify(lastKeyframe)) {\n // The start and end keyframes are the same, infer that there is no animation needed.\n return;\n }\n\n const cleanup = sideEffects == null ? void 0 : sideEffects({\n active,\n dragOverlay,\n ...rest\n });\n const animation = dragOverlay.node.animate(animationKeyframes, {\n duration,\n easing,\n fill: 'forwards'\n });\n return new Promise(resolve => {\n animation.onfinish = () => {\n cleanup == null ? void 0 : cleanup();\n resolve();\n };\n });\n };\n}\n\nlet key = 0;\nfunction useKey(id) {\n return useMemo(() => {\n if (id == null) {\n return;\n }\n\n key++;\n return key;\n }, [id]);\n}\n\nconst DragOverlay = /*#__PURE__*/React.memo(_ref => {\n let {\n adjustScale = false,\n children,\n dropAnimation: dropAnimationConfig,\n style,\n transition,\n modifiers,\n wrapperElement = 'div',\n className,\n zIndex = 999\n } = _ref;\n const {\n activatorEvent,\n active,\n activeNodeRect,\n containerNodeRect,\n draggableNodes,\n droppableContainers,\n dragOverlay,\n over,\n measuringConfiguration,\n scrollableAncestors,\n scrollableAncestorRects,\n windowRect\n } = useDndContext();\n const transform = useContext(ActiveDraggableContext);\n const key = useKey(active == null ? void 0 : active.id);\n const modifiedTransform = applyModifiers(modifiers, {\n activatorEvent,\n active,\n activeNodeRect,\n containerNodeRect,\n draggingNodeRect: dragOverlay.rect,\n over,\n overlayNodeRect: dragOverlay.rect,\n scrollableAncestors,\n scrollableAncestorRects,\n transform,\n windowRect\n });\n const initialRect = useInitialValue(activeNodeRect);\n const dropAnimation = useDropAnimation({\n config: dropAnimationConfig,\n draggableNodes,\n droppableContainers,\n measuringConfiguration\n }); // We need to wait for the active node to be measured before connecting the drag overlay ref\n // otherwise collisions can be computed against a mispositioned drag overlay\n\n const ref = initialRect ? dragOverlay.setRef : undefined;\n return React.createElement(NullifiedContextProvider, null, React.createElement(AnimationManager, {\n animation: dropAnimation\n }, active && key ? React.createElement(PositionedOverlay, {\n key: key,\n id: active.id,\n ref: ref,\n as: wrapperElement,\n activatorEvent: activatorEvent,\n adjustScale: adjustScale,\n className: className,\n transition: transition,\n rect: initialRect,\n style: {\n zIndex,\n ...style\n },\n transform: modifiedTransform\n }, children) : null));\n});\n\nexport { AutoScrollActivator, DndContext, DragOverlay, KeyboardCode, KeyboardSensor, MeasuringFrequency, MeasuringStrategy, MouseSensor, PointerSensor, TouchSensor, TraversalOrder, applyModifiers, closestCenter, closestCorners, defaultAnnouncements, defaultCoordinates, defaultDropAnimationConfiguration as defaultDropAnimation, defaultDropAnimationSideEffects, defaultScreenReaderInstructions, getClientRect, getFirstCollision, getScrollableAncestors, pointerWithin, rectIntersection, useDndContext, useDndMonitor, useDraggable, useDroppable, useSensor, useSensors };\n//# sourceMappingURL=core.esm.js.map\n","import React, { useMemo, useRef, useEffect, useState, useContext } from 'react';\nimport { useDndContext, getClientRect, useDroppable, useDraggable, closestCorners, getFirstCollision, getScrollableAncestors, KeyboardCode } from '@dnd-kit/core';\nimport { useUniqueId, useIsomorphicLayoutEffect, CSS, useCombinedRefs, isKeyboardEvent, subtract } from '@dnd-kit/utilities';\n\n/**\r\n * Move an array item to a different position. Returns a new array with the item moved to the new position.\r\n */\nfunction arrayMove(array, from, to) {\n const newArray = array.slice();\n newArray.splice(to < 0 ? newArray.length + to : to, 0, newArray.splice(from, 1)[0]);\n return newArray;\n}\n\n/**\r\n * Swap an array item to a different position. Returns a new array with the item swapped to the new position.\r\n */\nfunction arraySwap(array, from, to) {\n const newArray = array.slice();\n newArray[from] = array[to];\n newArray[to] = array[from];\n return newArray;\n}\n\nfunction getSortedRects(items, rects) {\n return items.reduce((accumulator, id, index) => {\n const rect = rects.get(id);\n\n if (rect) {\n accumulator[index] = rect;\n }\n\n return accumulator;\n }, Array(items.length));\n}\n\nfunction isValidIndex(index) {\n return index !== null && index >= 0;\n}\n\nfunction itemsEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (a.length !== b.length) {\n return false;\n }\n\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction normalizeDisabled(disabled) {\n if (typeof disabled === 'boolean') {\n return {\n draggable: disabled,\n droppable: disabled\n };\n }\n\n return disabled;\n}\n\n// To-do: We should be calculating scale transformation\nconst defaultScale = {\n scaleX: 1,\n scaleY: 1\n};\nconst horizontalListSortingStrategy = _ref => {\n var _rects$activeIndex;\n\n let {\n rects,\n activeNodeRect: fallbackActiveRect,\n activeIndex,\n overIndex,\n index\n } = _ref;\n const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;\n\n if (!activeNodeRect) {\n return null;\n }\n\n const itemGap = getItemGap(rects, index, activeIndex);\n\n if (index === activeIndex) {\n const newIndexRect = rects[overIndex];\n\n if (!newIndexRect) {\n return null;\n }\n\n return {\n x: activeIndex < overIndex ? newIndexRect.left + newIndexRect.width - (activeNodeRect.left + activeNodeRect.width) : newIndexRect.left - activeNodeRect.left,\n y: 0,\n ...defaultScale\n };\n }\n\n if (index > activeIndex && index <= overIndex) {\n return {\n x: -activeNodeRect.width - itemGap,\n y: 0,\n ...defaultScale\n };\n }\n\n if (index < activeIndex && index >= overIndex) {\n return {\n x: activeNodeRect.width + itemGap,\n y: 0,\n ...defaultScale\n };\n }\n\n return {\n x: 0,\n y: 0,\n ...defaultScale\n };\n};\n\nfunction getItemGap(rects, index, activeIndex) {\n const currentRect = rects[index];\n const previousRect = rects[index - 1];\n const nextRect = rects[index + 1];\n\n if (!currentRect || !previousRect && !nextRect) {\n return 0;\n }\n\n if (activeIndex < index) {\n return previousRect ? currentRect.left - (previousRect.left + previousRect.width) : nextRect.left - (currentRect.left + currentRect.width);\n }\n\n return nextRect ? nextRect.left - (currentRect.left + currentRect.width) : currentRect.left - (previousRect.left + previousRect.width);\n}\n\nconst rectSortingStrategy = _ref => {\n let {\n rects,\n activeIndex,\n overIndex,\n index\n } = _ref;\n const newRects = arrayMove(rects, overIndex, activeIndex);\n const oldRect = rects[index];\n const newRect = newRects[index];\n\n if (!newRect || !oldRect) {\n return null;\n }\n\n return {\n x: newRect.left - oldRect.left,\n y: newRect.top - oldRect.top,\n scaleX: newRect.width / oldRect.width,\n scaleY: newRect.height / oldRect.height\n };\n};\n\nconst rectSwappingStrategy = _ref => {\n let {\n activeIndex,\n index,\n rects,\n overIndex\n } = _ref;\n let oldRect;\n let newRect;\n\n if (index === activeIndex) {\n oldRect = rects[index];\n newRect = rects[overIndex];\n }\n\n if (index === overIndex) {\n oldRect = rects[index];\n newRect = rects[activeIndex];\n }\n\n if (!newRect || !oldRect) {\n return null;\n }\n\n return {\n x: newRect.left - oldRect.left,\n y: newRect.top - oldRect.top,\n scaleX: newRect.width / oldRect.width,\n scaleY: newRect.height / oldRect.height\n };\n};\n\n// To-do: We should be calculating scale transformation\nconst defaultScale$1 = {\n scaleX: 1,\n scaleY: 1\n};\nconst verticalListSortingStrategy = _ref => {\n var _rects$activeIndex;\n\n let {\n activeIndex,\n activeNodeRect: fallbackActiveRect,\n index,\n rects,\n overIndex\n } = _ref;\n const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;\n\n if (!activeNodeRect) {\n return null;\n }\n\n if (index === activeIndex) {\n const overIndexRect = rects[overIndex];\n\n if (!overIndexRect) {\n return null;\n }\n\n return {\n x: 0,\n y: activeIndex < overIndex ? overIndexRect.top + overIndexRect.height - (activeNodeRect.top + activeNodeRect.height) : overIndexRect.top - activeNodeRect.top,\n ...defaultScale$1\n };\n }\n\n const itemGap = getItemGap$1(rects, index, activeIndex);\n\n if (index > activeIndex && index <= overIndex) {\n return {\n x: 0,\n y: -activeNodeRect.height - itemGap,\n ...defaultScale$1\n };\n }\n\n if (index < activeIndex && index >= overIndex) {\n return {\n x: 0,\n y: activeNodeRect.height + itemGap,\n ...defaultScale$1\n };\n }\n\n return {\n x: 0,\n y: 0,\n ...defaultScale$1\n };\n};\n\nfunction getItemGap$1(clientRects, index, activeIndex) {\n const currentRect = clientRects[index];\n const previousRect = clientRects[index - 1];\n const nextRect = clientRects[index + 1];\n\n if (!currentRect) {\n return 0;\n }\n\n if (activeIndex < index) {\n return previousRect ? currentRect.top - (previousRect.top + previousRect.height) : nextRect ? nextRect.top - (currentRect.top + currentRect.height) : 0;\n }\n\n return nextRect ? nextRect.top - (currentRect.top + currentRect.height) : previousRect ? currentRect.top - (previousRect.top + previousRect.height) : 0;\n}\n\nconst ID_PREFIX = 'Sortable';\nconst Context = /*#__PURE__*/React.createContext({\n activeIndex: -1,\n containerId: ID_PREFIX,\n disableTransforms: false,\n items: [],\n overIndex: -1,\n useDragOverlay: false,\n sortedRects: [],\n strategy: rectSortingStrategy,\n disabled: {\n draggable: false,\n droppable: false\n }\n});\nfunction SortableContext(_ref) {\n let {\n children,\n id,\n items: userDefinedItems,\n strategy = rectSortingStrategy,\n disabled: disabledProp = false\n } = _ref;\n const {\n active,\n dragOverlay,\n droppableRects,\n over,\n measureDroppableContainers\n } = useDndContext();\n const containerId = useUniqueId(ID_PREFIX, id);\n const useDragOverlay = Boolean(dragOverlay.rect !== null);\n const items = useMemo(() => userDefinedItems.map(item => typeof item === 'object' && 'id' in item ? item.id : item), [userDefinedItems]);\n const isDragging = active != null;\n const activeIndex = active ? items.indexOf(active.id) : -1;\n const overIndex = over ? items.indexOf(over.id) : -1;\n const previousItemsRef = useRef(items);\n const itemsHaveChanged = !itemsEqual(items, previousItemsRef.current);\n const disableTransforms = overIndex !== -1 && activeIndex === -1 || itemsHaveChanged;\n const disabled = normalizeDisabled(disabledProp);\n useIsomorphicLayoutEffect(() => {\n if (itemsHaveChanged && isDragging) {\n measureDroppableContainers(items);\n }\n }, [itemsHaveChanged, items, isDragging, measureDroppableContainers]);\n useEffect(() => {\n previousItemsRef.current = items;\n }, [items]);\n const contextValue = useMemo(() => ({\n activeIndex,\n containerId,\n disabled,\n disableTransforms,\n items,\n overIndex,\n useDragOverlay,\n sortedRects: getSortedRects(items, droppableRects),\n strategy\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [activeIndex, containerId, disabled.draggable, disabled.droppable, disableTransforms, items, overIndex, droppableRects, useDragOverlay, strategy]);\n return React.createElement(Context.Provider, {\n value: contextValue\n }, children);\n}\n\nconst defaultNewIndexGetter = _ref => {\n let {\n id,\n items,\n activeIndex,\n overIndex\n } = _ref;\n return arrayMove(items, activeIndex, overIndex).indexOf(id);\n};\nconst defaultAnimateLayoutChanges = _ref2 => {\n let {\n containerId,\n isSorting,\n wasDragging,\n index,\n items,\n newIndex,\n previousItems,\n previousContainerId,\n transition\n } = _ref2;\n\n if (!transition || !wasDragging) {\n return false;\n }\n\n if (previousItems !== items && index === newIndex) {\n return false;\n }\n\n if (isSorting) {\n return true;\n }\n\n return newIndex !== index && containerId === previousContainerId;\n};\nconst defaultTransition = {\n duration: 200,\n easing: 'ease'\n};\nconst transitionProperty = 'transform';\nconst disabledTransition = /*#__PURE__*/CSS.Transition.toString({\n property: transitionProperty,\n duration: 0,\n easing: 'linear'\n});\nconst defaultAttributes = {\n roleDescription: 'sortable'\n};\n\n/*\r\n * When the index of an item changes while sorting,\r\n * we need to temporarily disable the transforms\r\n */\n\nfunction useDerivedTransform(_ref) {\n let {\n disabled,\n index,\n node,\n rect\n } = _ref;\n const [derivedTransform, setDerivedtransform] = useState(null);\n const previousIndex = useRef(index);\n useIsomorphicLayoutEffect(() => {\n if (!disabled && index !== previousIndex.current && node.current) {\n const initial = rect.current;\n\n if (initial) {\n const current = getClientRect(node.current, {\n ignoreTransform: true\n });\n const delta = {\n x: initial.left - current.left,\n y: initial.top - current.top,\n scaleX: initial.width / current.width,\n scaleY: initial.height / current.height\n };\n\n if (delta.x || delta.y) {\n setDerivedtransform(delta);\n }\n }\n }\n\n if (index !== previousIndex.current) {\n previousIndex.current = index;\n }\n }, [disabled, index, node, rect]);\n useEffect(() => {\n if (derivedTransform) {\n setDerivedtransform(null);\n }\n }, [derivedTransform]);\n return derivedTransform;\n}\n\nfunction useSortable(_ref) {\n let {\n animateLayoutChanges = defaultAnimateLayoutChanges,\n attributes: userDefinedAttributes,\n disabled: localDisabled,\n data: customData,\n getNewIndex = defaultNewIndexGetter,\n id,\n strategy: localStrategy,\n resizeObserverConfig,\n transition = defaultTransition\n } = _ref;\n const {\n items,\n containerId,\n activeIndex,\n disabled: globalDisabled,\n disableTransforms,\n sortedRects,\n overIndex,\n useDragOverlay,\n strategy: globalStrategy\n } = useContext(Context);\n const disabled = normalizeLocalDisabled(localDisabled, globalDisabled);\n const index = items.indexOf(id);\n const data = useMemo(() => ({\n sortable: {\n containerId,\n index,\n items\n },\n ...customData\n }), [containerId, customData, index, items]);\n const itemsAfterCurrentSortable = useMemo(() => items.slice(items.indexOf(id)), [items, id]);\n const {\n rect,\n node,\n isOver,\n setNodeRef: setDroppableNodeRef\n } = useDroppable({\n id,\n data,\n disabled: disabled.droppable,\n resizeObserverConfig: {\n updateMeasurementsFor: itemsAfterCurrentSortable,\n ...resizeObserverConfig\n }\n });\n const {\n active,\n activatorEvent,\n activeNodeRect,\n attributes,\n setNodeRef: setDraggableNodeRef,\n listeners,\n isDragging,\n over,\n setActivatorNodeRef,\n transform\n } = useDraggable({\n id,\n data,\n attributes: { ...defaultAttributes,\n ...userDefinedAttributes\n },\n disabled: disabled.draggable\n });\n const setNodeRef = useCombinedRefs(setDroppableNodeRef, setDraggableNodeRef);\n const isSorting = Boolean(active);\n const displaceItem = isSorting && !disableTransforms && isValidIndex(activeIndex) && isValidIndex(overIndex);\n const shouldDisplaceDragSource = !useDragOverlay && isDragging;\n const dragSourceDisplacement = shouldDisplaceDragSource && displaceItem ? transform : null;\n const strategy = localStrategy != null ? localStrategy : globalStrategy;\n const finalTransform = displaceItem ? dragSourceDisplacement != null ? dragSourceDisplacement : strategy({\n rects: sortedRects,\n activeNodeRect,\n activeIndex,\n overIndex,\n index\n }) : null;\n const newIndex = isValidIndex(activeIndex) && isValidIndex(overIndex) ? getNewIndex({\n id,\n items,\n activeIndex,\n overIndex\n }) : index;\n const activeId = active == null ? void 0 : active.id;\n const previous = useRef({\n activeId,\n items,\n newIndex,\n containerId\n });\n const itemsHaveChanged = items !== previous.current.items;\n const shouldAnimateLayoutChanges = animateLayoutChanges({\n active,\n containerId,\n isDragging,\n isSorting,\n id,\n index,\n items,\n newIndex: previous.current.newIndex,\n previousItems: previous.current.items,\n previousContainerId: previous.current.containerId,\n transition,\n wasDragging: previous.current.activeId != null\n });\n const derivedTransform = useDerivedTransform({\n disabled: !shouldAnimateLayoutChanges,\n index,\n node,\n rect\n });\n useEffect(() => {\n if (isSorting && previous.current.newIndex !== newIndex) {\n previous.current.newIndex = newIndex;\n }\n\n if (containerId !== previous.current.containerId) {\n previous.current.containerId = containerId;\n }\n\n if (items !== previous.current.items) {\n previous.current.items = items;\n }\n }, [isSorting, newIndex, containerId, items]);\n useEffect(() => {\n if (activeId === previous.current.activeId) {\n return;\n }\n\n if (activeId && !previous.current.activeId) {\n previous.current.activeId = activeId;\n return;\n }\n\n const timeoutId = setTimeout(() => {\n previous.current.activeId = activeId;\n }, 50);\n return () => clearTimeout(timeoutId);\n }, [activeId]);\n return {\n active,\n activeIndex,\n attributes,\n data,\n rect,\n index,\n newIndex,\n items,\n isOver,\n isSorting,\n isDragging,\n listeners,\n node,\n overIndex,\n over,\n setNodeRef,\n setActivatorNodeRef,\n setDroppableNodeRef,\n setDraggableNodeRef,\n transform: derivedTransform != null ? derivedTransform : finalTransform,\n transition: getTransition()\n };\n\n function getTransition() {\n if ( // Temporarily disable transitions for a single frame to set up derived transforms\n derivedTransform || // Or to prevent items jumping to back to their \"new\" position when items change\n itemsHaveChanged && previous.current.newIndex === index) {\n return disabledTransition;\n }\n\n if (shouldDisplaceDragSource && !isKeyboardEvent(activatorEvent) || !transition) {\n return undefined;\n }\n\n if (isSorting || shouldAnimateLayoutChanges) {\n return CSS.Transition.toString({ ...transition,\n property: transitionProperty\n });\n }\n\n return undefined;\n }\n}\n\nfunction normalizeLocalDisabled(localDisabled, globalDisabled) {\n var _localDisabled$dragga, _localDisabled$droppa;\n\n if (typeof localDisabled === 'boolean') {\n return {\n draggable: localDisabled,\n // Backwards compatibility\n droppable: false\n };\n }\n\n return {\n draggable: (_localDisabled$dragga = localDisabled == null ? void 0 : localDisabled.draggable) != null ? _localDisabled$dragga : globalDisabled.draggable,\n droppable: (_localDisabled$droppa = localDisabled == null ? void 0 : localDisabled.droppable) != null ? _localDisabled$droppa : globalDisabled.droppable\n };\n}\n\nfunction hasSortableData(entry) {\n if (!entry) {\n return false;\n }\n\n const data = entry.data.current;\n\n if (data && 'sortable' in data && typeof data.sortable === 'object' && 'containerId' in data.sortable && 'items' in data.sortable && 'index' in data.sortable) {\n return true;\n }\n\n return false;\n}\n\nconst directions = [KeyboardCode.Down, KeyboardCode.Right, KeyboardCode.Up, KeyboardCode.Left];\nconst sortableKeyboardCoordinates = (event, _ref) => {\n let {\n context: {\n active,\n collisionRect,\n droppableRects,\n droppableContainers,\n over,\n scrollableAncestors\n }\n } = _ref;\n\n if (directions.includes(event.code)) {\n event.preventDefault();\n\n if (!active || !collisionRect) {\n return;\n }\n\n const filteredContainers = [];\n droppableContainers.getEnabled().forEach(entry => {\n if (!entry || entry != null && entry.disabled) {\n return;\n }\n\n const rect = droppableRects.get(entry.id);\n\n if (!rect) {\n return;\n }\n\n switch (event.code) {\n case KeyboardCode.Down:\n if (collisionRect.top < rect.top) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Up:\n if (collisionRect.top > rect.top) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Left:\n if (collisionRect.left > rect.left) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Right:\n if (collisionRect.left < rect.left) {\n filteredContainers.push(entry);\n }\n\n break;\n }\n });\n const collisions = closestCorners({\n active,\n collisionRect: collisionRect,\n droppableRects,\n droppableContainers: filteredContainers,\n pointerCoordinates: null\n });\n let closestId = getFirstCollision(collisions, 'id');\n\n if (closestId === (over == null ? void 0 : over.id) && collisions.length > 1) {\n closestId = collisions[1].id;\n }\n\n if (closestId != null) {\n const activeDroppable = droppableContainers.get(active.id);\n const newDroppable = droppableContainers.get(closestId);\n const newRect = newDroppable ? droppableRects.get(newDroppable.id) : null;\n const newNode = newDroppable == null ? void 0 : newDroppable.node.current;\n\n if (newNode && newRect && activeDroppable && newDroppable) {\n const newScrollAncestors = getScrollableAncestors(newNode);\n const hasDifferentScrollAncestors = newScrollAncestors.some((element, index) => scrollableAncestors[index] !== element);\n const hasSameContainer = isSameContainer(activeDroppable, newDroppable);\n const isAfterActive = isAfter(activeDroppable, newDroppable);\n const offset = hasDifferentScrollAncestors || !hasSameContainer ? {\n x: 0,\n y: 0\n } : {\n x: isAfterActive ? collisionRect.width - newRect.width : 0,\n y: isAfterActive ? collisionRect.height - newRect.height : 0\n };\n const rectCoordinates = {\n x: newRect.left,\n y: newRect.top\n };\n const newCoordinates = offset.x && offset.y ? rectCoordinates : subtract(rectCoordinates, offset);\n return newCoordinates;\n }\n }\n }\n\n return undefined;\n};\n\nfunction isSameContainer(a, b) {\n if (!hasSortableData(a) || !hasSortableData(b)) {\n return false;\n }\n\n return a.data.current.sortable.containerId === b.data.current.sortable.containerId;\n}\n\nfunction isAfter(a, b) {\n if (!hasSortableData(a) || !hasSortableData(b)) {\n return false;\n }\n\n if (!isSameContainer(a, b)) {\n return false;\n }\n\n return a.data.current.sortable.index < b.data.current.sortable.index;\n}\n\nexport { SortableContext, arrayMove, arraySwap, defaultAnimateLayoutChanges, defaultNewIndexGetter, hasSortableData, horizontalListSortingStrategy, rectSortingStrategy, rectSwappingStrategy, sortableKeyboardCoordinates, useSortable, verticalListSortingStrategy };\n//# sourceMappingURL=sortable.esm.js.map\n","import { DndContext, DndContextProps } from \"@dnd-kit/core\";\nimport React, { FC, createContext, useContext, useEffect } from \"react\";\n\n/**\n * Facilitates DI for the DndContext\n */\nexport const injectDndContext = createContext<FC<DndContextProps>>(DndContext);\n\n/**\n * Wraps dnd-kit's `DndContext` to normalise scroll behaviour and enable dependency injection\n */\nexport const InternalDndContext = (props: DndContextProps) => {\n const DndContext = useContext(injectDndContext);\n\n /**\n * Disable smooth scrolling during drag to ensure that the dragged item is always visible\n */\n useEffect(() => {\n const originalScrollingBehaviour =\n document.documentElement.style.scrollBehavior;\n document.documentElement.style.scrollBehavior = \"auto\";\n\n return () => {\n document.documentElement.style.scrollBehavior =\n originalScrollingBehaviour;\n };\n });\n\n return <DndContext {...props} />;\n};\n","import { useEffect, useState } from \"react\";\n\n/**\n * Returns true if the user has requested that the system minimize the amount of non-essential motion it uses.\n */\nexport function usePrefersReducedMotion() {\n const [prefersReducedMotion, setPrefersReducedMotion] = useState(false);\n\n useEffect(() => {\n const mediaQuery = window.matchMedia(\"(prefers-reduced-motion: reduce)\");\n\n setPrefersReducedMotion(mediaQuery.matches);\n }, []);\n\n return prefersReducedMotion;\n}\n","import React, { useState } from \"react\";\nimport {\n closestCenter,\n KeyboardSensor,\n useSensor,\n useSensors,\n DragEndEvent,\n DragOverlay,\n DragStartEvent,\n UniqueIdentifier,\n Announcements,\n MouseSensor,\n TouchSensor,\n} from \"@dnd-kit/core\";\nimport {\n arrayMove,\n SortableContext,\n sortableKeyboardCoordinates,\n useSortable,\n verticalListSortingStrategy,\n} from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport { createPortal } from \"react-dom\";\n\nimport { OakFlex } from \"@/components/atoms\";\nimport {\n OakDragAndDropInstructions,\n OakDraggable,\n OakDroppable,\n} from \"@/components/molecules\";\nimport { InternalDndContext } from \"@/components/atoms/InternalDndContext/InternalDndContext\";\nimport { usePrefersReducedMotion } from \"@/animation/usePrefersReducedMotion\";\n\ntype OakQuizOrderItem = {\n id: string;\n label: string;\n};\n\nexport type OakQuizOrderProps = {\n /**\n * The initial order of items\n *\n * this cannot be updated on subsequent renders\n */\n initialItems: OakQuizOrderItem[];\n /**\n * Notified the consumer when the order of items has changed\n */\n onChange?: (items: OakQuizOrderItem[]) => void;\n /**\n * Highlight all items to indicate that they can be interacted with\n */\n isHighlighted?: boolean;\n};\n\nconst ConnectedDraggable = ({\n id,\n label,\n isHighlighted,\n}: OakQuizOrderItem & { isHighlighted?: boolean }) => {\n const {\n attributes,\n listeners,\n setNodeRef,\n transform,\n transition,\n isOver,\n isDragging,\n } = useSortable({ id });\n const style = {\n transform: CSS.Transform.toString(transform),\n transition,\n };\n\n return (\n <OakDroppable isOver={isOver} isHighlighted={isHighlighted}>\n <OakDraggable\n ref={setNodeRef}\n style={style}\n isDisabled={isDragging}\n {...attributes}\n {...listeners}\n aria-describedby={undefined}\n aria-roledescription=\"sortable item\"\n aria-pressed={undefined}\n aria-selected={!!attributes[\"aria-pressed\"]}\n role=\"option\"\n >\n {label}\n </OakDraggable>\n </OakDroppable>\n );\n};\n\n/**\n * A sortable list of items with drag and drop functionality. Items can be dragged over named slots to re-arrange them\n *\n * Keyboard navigation is supported with the `tab`, `space` and `arrow` keys\n */\nexport const OakQuizOrder = ({\n initialItems,\n onChange,\n isHighlighted,\n}: OakQuizOrderProps) => {\n const [items, setItems] = useState<OakQuizOrderItem[]>(initialItems);\n const [activeId, setActiveId] = useState<string | null>(null);\n const activeItem = items.find((item) => item.id === activeId);\n const sensors = useSensors(\n useSensor(MouseSensor),\n useSensor(TouchSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n scrollBehavior: usePrefersReducedMotion() ? \"instant\" : \"smooth\",\n }),\n );\n\n return (\n <>\n <OakDragAndDropInstructions $mb=\"space-between-m2\" />\n <InternalDndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={handleDragEnd}\n onDragStart={handleDragStart}\n accessibility={{\n announcements: createAccouncements(items),\n }}\n >\n <SortableContext items={items} strategy={verticalListSortingStrategy}>\n <OakFlex\n $gap=\"space-between-s\"\n $flexDirection=\"column\"\n role=\"listbox\"\n aria-label=\"Sortable items\"\n >\n {items.map((item) => (\n <ConnectedDraggable\n key={item.id}\n {...item}\n isHighlighted={isHighlighted}\n />\n ))}\n </OakFlex>\n {createPortal(\n <DragOverlay>\n {activeItem && (\n <OakDraggable isDragging>{activeItem.label}</OakDraggable>\n )}\n </DragOverlay>,\n document.body,\n )}\n </SortableContext>\n </InternalDndContext>\n </>\n );\n\n function handleDragStart(event: DragStartEvent) {\n const { active } = event;\n setActiveId(active.id.toString());\n }\n\n function handleDragEnd(event: DragEndEvent) {\n const { active, over } = event;\n\n if (active.id !== over?.id) {\n setItems((items) => {\n const oldIndex = items.findIndex((item) => item.id === active.id);\n const newIndex = items.findIndex((item) => item.id === over?.id);\n const newItems = arrayMove(items, oldIndex, newIndex);\n\n onChange?.(newItems);\n\n return newItems;\n });\n }\n\n setActiveId(null);\n }\n};\n\nfunction createAccouncements(items: OakQuizOrderItem[]): Announcements {\n const getPosition = (id: UniqueIdentifier) =>\n items.findIndex((item) => item.id === id) + 1;\n const getItemLabel = (id: UniqueIdentifier) =>\n items.find((item) => item.id === id)?.label;\n\n return {\n onDragStart() {\n return undefined;\n },\n onDragOver({ active, over }) {\n if (over) {\n return `Sortable item ${getItemLabel(\n active.id,\n )} is in position ${getPosition(over.id)} of ${items.length}`;\n }\n },\n onDragEnd({ active, over }) {\n if (over) {\n return `Sortable item ${getItemLabel(\n active.id,\n )} was dropped into position ${getPosition(over.id)} of ${\n items.length\n }`;\n }\n },\n onDragCancel({ active }) {\n return `Dragging was cancelled. Sortable item ${getItemLabel(\n active.id,\n )} was dropped.`;\n },\n };\n}\n","import React, {\n ComponentPropsWithRef,\n ComponentPropsWithoutRef,\n FC,\n forwardRef,\n useLayoutEffect,\n useState,\n} from \"react\";\nimport styled from \"styled-components\";\n\nimport { OakBox, OakFlex } from \"@/components/atoms\";\nimport { parseColor } from \"@/styles/helpers/parseColor\";\n\nconst StyledOakBox = styled(OakBox)`\n background-color: ${parseColor(\"grey20\")};\n background-color: color-mix(in lch, ${parseColor(\"black\")} 5%, transparent);\n\n &[data-over=\"true\"] {\n background-color: ${parseColor(\"white\")};\n background-color: color-mix(\n in lch,\n ${parseColor(\"white\")} 60%,\n transparent\n );\n }\n`;\n\ntype InternalDroppableHoldingPenProps = {\n /**\n * Indicates whether a draggable is currently being dragged over the droppable\n */\n isOver?: boolean;\n};\n\n/**\n * An internal holding pen for multiple draggable items\n *\n * Has no intrinsic drop functionally.\n * It is intended to be used with `useDroppable` from `@dnd-kit/core`\n */\nexport const InternalDroppableHoldingPen: FC<\n ComponentPropsWithRef<typeof OakFlex>\n> = forwardRef<\n HTMLDivElement,\n InternalDroppableHoldingPenProps & ComponentPropsWithoutRef<typeof OakFlex>\n>(({ isOver, children, ...props }, ref) => {\n const [domContent, setContentBox] = useState<HTMLDivElement | null>(null);\n const [minHeight, setMinHeight] = useState<number>(0);\n\n useLayoutEffect(() => {\n if (!domContent) {\n return;\n }\n\n // Prevents the holding area from shrinking when an item is removed\n // avoiding layout shift\n const observer = new ResizeObserver((entries) => {\n for (const entry of entries) {\n setMinHeight((currentHeight) =>\n Math.max(entry.borderBoxSize[0]?.blockSize ?? 0, currentHeight),\n );\n }\n });\n\n observer.observe(domContent);\n\n // Reset min height when the window is resized so that the holding pen can shrink\n function resetMinHeight() {\n setMinHeight(0);\n }\n window.addEventListener(\"resize\", resetMinHeight);\n\n return () => {\n observer.disconnect();\n window.removeEventListener(\"resize\", resetMinHeight);\n };\n }, [domContent]);\n\n return (\n <StyledOakBox\n ref={ref}\n $mb=\"space-between-m2\"\n $borderRadius=\"border-radius-l\"\n data-over={isOver}\n style={{ minHeight: minHeight === 0 ? \"auto\" : minHeight }}\n {...props}\n >\n <OakFlex\n $alignItems=\"flex-start\"\n $minHeight=\"all-spacing-13\"\n $pa=\"inner-padding-s\"\n $gap=\"space-between-xs\"\n $flexWrap=\"wrap\"\n ref={setContentBox}\n >\n {children}\n </OakFlex>\n </StyledOakBox>\n );\n});\n","import React, { ReactNode, useRef, useState } from \"react\";\nimport {\n closestCenter,\n KeyboardSensor,\n useSensor,\n useSensors,\n DragEndEvent,\n DragOverlay,\n DragStartEvent,\n Announcements,\n MouseSensor,\n TouchSensor,\n useDraggable,\n useDroppable,\n} from \"@dnd-kit/core\";\nimport { createPortal } from \"react-dom\";\nimport { sortableKeyboardCoordinates } from \"@dnd-kit/sortable\";\n\nimport { InternalDroppableHoldingPen } from \"../InternalDroppableHoldingPen\";\n\nimport { OakFlex } from \"@/components/atoms\";\nimport {\n OakDragAndDropInstructions,\n OakDraggable,\n OakDroppable,\n} from \"@/components/molecules\";\nimport { usePrefersReducedMotion } from \"@/animation/usePrefersReducedMotion\";\nimport { InternalDndContext } from \"@/components/atoms/InternalDndContext/InternalDndContext\";\n\ntype DraggableId = string;\ntype DroppableId = string;\ntype DraggableItem = {\n id: DraggableId;\n label: string;\n};\ntype DroppableItem = {\n id: DroppableId;\n label: string;\n};\ntype Matches = Record<DroppableId, DraggableItem>;\n\nexport type OakQuizMatchProps = {\n /**\n * The initial options\n *\n * these are the items that can be dragged into a slot to form a match\n *\n * this cannot be updated on subsequent renders\n */\n initialOptions: DraggableItem[];\n /**\n * The initial slots\n *\n * these are the slots into which an option can be dropped to form a match\n *\n * this cannot be updated on subsequent renders\n */\n initialSlots: DroppableItem[];\n /**\n * Notify the consumer when matches have changed\n */\n onChange?: (matches: Matches) => void;\n /**\n * Highlight the droppable slots\n */\n isHighlighted?: boolean;\n};\n\nconst ConnectedDraggable = ({\n id,\n label,\n isOver,\n}: DraggableItem & { isOver?: boolean }) => {\n const { attributes, listeners, setNodeRef, isDragging } = useDraggable({\n id,\n data: { id, label },\n });\n\n return (\n <OakDraggable\n ref={setNodeRef}\n isDisabled={isOver}\n color=\"text-inverted\"\n background=\"bg-btn-primary\"\n iconColor=\"icon-main\"\n {...attributes}\n {...listeners}\n role=\"option\"\n aria-describedby={undefined}\n aria-roledescription=\"draggable item\"\n aria-pressed={undefined}\n aria-selected={!!attributes[\"aria-pressed\"]}\n style={{ opacity: isDragging ? 0 : 1 }}\n >\n {label}\n </OakDraggable>\n );\n};\n\nconst ConnectedDroppableHoldingPen = ({\n children,\n}: {\n children?: ReactNode;\n}) => {\n const { setNodeRef, isOver } = useDroppable({\n id: \"holding-pen\",\n data: { label: \"holding pen\" },\n });\n\n return (\n <InternalDroppableHoldingPen\n ref={setNodeRef}\n isOver={isOver}\n aria-label=\"Available items\"\n data-testid=\"holding-pen\"\n role=\"listbox\"\n >\n {children}\n </InternalDroppableHoldingPen>\n );\n};\n\nconst ConnectedDroppable = ({\n id,\n label,\n match,\n isHighlighted,\n}: DroppableItem & { match?: DraggableItem; isHighlighted?: boolean }) => {\n const { setNodeRef, isOver, active } = useDroppable({\n id,\n data: { id, label },\n });\n\n return (\n <OakDroppable\n isOver={isOver}\n isDisabled={!active}\n ref={setNodeRef}\n id={id}\n labelSlot={label}\n data-testid=\"slot\"\n isHighlighted={isHighlighted}\n >\n {match && <ConnectedDraggable {...match} isOver={isOver} />}\n </OakDroppable>\n );\n};\n\n/**\n * A list of draggable items with matching slots to drop them into.\n *\n * Keyboard navigation is supported with the `tab`, `space` and `arrow` keys\n */\nexport const OakQuizMatch = ({\n initialOptions,\n initialSlots,\n isHighlighted,\n onChange,\n}: OakQuizMatchProps) => {\n const [matches, setMatches] = useState<Matches>({});\n const draggables = useRef(initialOptions).current;\n const droppables = useRef(initialSlots).current;\n const [activeId, setActiveId] = useState<DraggableId | null>(null);\n const activeDraggable = draggables.find((item) => item.id === activeId);\n const prefersReducedMotion = usePrefersReducedMotion();\n const sensors = useSensors(\n useSensor(MouseSensor),\n useSensor(TouchSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n scrollBehavior: prefersReducedMotion ? \"instant\" : \"smooth\",\n }),\n );\n const matchedDraggableIds = Object.values(matches).map((item) => item.id);\n const unmatchedDraggables = draggables.filter(\n (draggable) => !matchedDraggableIds.includes(draggable.id),\n );\n return (\n <>\n <OakDragAndDropInstructions $mb=\"space-between-m2\" />\n <InternalDndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={handleDragEnd}\n onDragStart={handleDragStart}\n accessibility={{ announcements }}\n >\n <ConnectedDroppableHoldingPen>\n {unmatchedDraggables.map((item) => (\n <ConnectedDraggable key={item.id} {...item} />\n ))}\n </ConnectedDroppableHoldingPen>\n <OakFlex\n $gap=\"space-between-s\"\n $flexDirection=\"column\"\n aria-label=\"Matched items\"\n role=\"listbox\"\n >\n {droppables.map((droppable) => (\n <ConnectedDroppable\n key={droppable.id}\n {...droppable}\n isHighlighted={isHighlighted}\n match={matches[droppable.id]}\n />\n ))}\n </OakFlex>\n {createPortal(\n <DragOverlay dropAnimation={prefersReducedMotion ? null : undefined}>\n {activeDraggable && (\n <OakDraggable isDragging>{activeDraggable.label}</OakDraggable>\n )}\n </DragOverlay>,\n document.body,\n )}\n </InternalDndContext>\n </>\n );\n\n function handleDragStart(event: DragStartEvent) {\n const { active } = event;\n setActiveId(active.id.toString());\n }\n\n function handleDragEnd(event: DragEndEvent) {\n const { active, over } = event;\n\n if (over) {\n setMatches((matches) => {\n // Remove the draggable from its current slot\n const entries = Object.entries(matches).filter(\n ([, draggable]) => draggable?.id !== active.id,\n );\n const newMatches = Object.fromEntries(entries);\n\n if (over.id !== \"holding-pen\") {\n // We've dropped the draggable into a slot so add it to the new slot\n newMatches[over.id] = active.data.current as DraggableItem;\n }\n\n onChange?.(newMatches);\n\n return newMatches;\n });\n }\n\n setActiveId(null);\n }\n};\n\nconst announcements: Announcements = {\n onDragStart() {\n return undefined;\n },\n onDragOver({ active, over }) {\n if (over?.data.current && active.data?.current) {\n return `Item ${active.data.current.label} is over ${over.data.current.label}`;\n }\n },\n onDragEnd({ active, over }) {\n if (over?.data.current && active.data?.current) {\n return `Item ${active.data.current.label} was dropped onto ${over.data.current.label}`;\n }\n },\n onDragCancel({ active }) {\n if (active.data?.current) {\n return `Dragging was cancelled. Item ${active.data.current.label} was dropped.`;\n }\n },\n};\n","import type { UrlObject } from \"url\";\n\nimport React, { ReactNode } from \"react\";\nimport Link from \"next/link\";\nimport styled from \"styled-components\";\n\nimport {\n OakPrimaryButton,\n OakPrimaryButtonProps,\n} from \"@/components/molecules/OakPrimaryButton\";\nimport {\n OakPrimaryInvertedButton,\n OakPrimaryInvertedButtonProps,\n} from \"@/components/molecules/OakPrimaryInvertedButton\";\n\ntype Url = string | UrlObject;\n\nexport type OakPrimaryNavItemProps = {\n href: Url;\n isCurrent?: boolean;\n shallow?: boolean;\n children: ReactNode;\n} & OakPrimaryButtonProps &\n OakPrimaryInvertedButtonProps;\n\nconst OakPrimaryButtonWithoutPointerEvents = styled(OakPrimaryButton)`\n pointer-events: none;\n`;\n\n/**\n *\n * A specific implementation of OakPrimaryButton and OakPrimaryInvertedButton rendering\n * relevant view depending on isCurrent prop\n *\n */\nexport const OakPrimaryNavItem = ({\n href,\n isCurrent = false,\n shallow = true,\n children,\n}: OakPrimaryNavItemProps) => {\n return isCurrent ? (\n <OakPrimaryButtonWithoutPointerEvents\n element={\"span\"}\n aria-current={\"page\"}\n >\n {children}\n </OakPrimaryButtonWithoutPointerEvents>\n ) : (\n <OakPrimaryInvertedButton\n element={Link}\n href={href}\n shallow={shallow}\n isTrailingIcon={true}\n >\n {children}\n </OakPrimaryInvertedButton>\n );\n};\n","import React from \"react\";\n\nimport { OakSpan, OakSpanProps } from \"@/components/atoms\";\n\nexport type OakBulletListProps = {\n listItems: string[];\n} & OakSpanProps;\n\n/**\n * An inline bulleted list\n */\nexport const OakBulletList = (props: OakBulletListProps) => {\n const { listItems, ...rest } = props;\n return (\n <OakSpan {...rest}>\n {listItems.map((item, i) => {\n return (\n <OakSpan key={i}>\n {i !== 0 && <OakSpan> • </OakSpan>}\n <OakSpan>{item}</OakSpan>\n </OakSpan>\n );\n })}\n </OakSpan>\n );\n};\n","import React from \"react\";\n\nimport {\n OakFlex,\n OakHeading,\n OakHeadingTag,\n OakIcon,\n OakIconName,\n} from \"@/components/atoms\";\nimport { OakHandDrawnCard } from \"@/components/molecules/OakHandDrawnCard\";\n\nexport type OakInfoCardProps = {\n children: React.ReactNode;\n};\n\nexport type OakCardHeaderprops = {\n iconName: OakIconName;\n tag: OakHeadingTag;\n children: string;\n};\n\nexport const OakCardHeader = (props: OakCardHeaderprops) => {\n const { iconName, tag, children } = props;\n\n return (\n <OakFlex $alignItems={\"center\"} $gap={\"space-between-ssx\"}>\n <OakIcon iconName={iconName} />\n <OakHeading $font={\"heading-6\"} tag={tag}>\n {children}\n </OakHeading>\n </OakFlex>\n );\n};\n\n/**\n *\n * OakLessonInfoCards are created using the custom card either oakLessoninfoCard or oakStaticMessageCard and the content is added as children. And use the oakCardHeader to create the header of the card.\n *\n */\nexport const OakLessonInfoCard = (props: OakInfoCardProps) => {\n const { children, ...rest } = props;\n\n return (\n <OakFlex\n $borderRadius={\"border-radius-l\"}\n $pa={\"inner-padding-xl\"}\n $flexDirection={\"column\"}\n $gap={\"space-between-s\"}\n $background={\"white\"}\n {...rest}\n >\n {children}\n </OakFlex>\n );\n};\n\nexport const OakStaticMessageCard = (props: OakInfoCardProps) => {\n const { children, ...rest } = props;\n\n return (\n <OakHandDrawnCard\n {...rest}\n fill={[\n \"bg-decorative2-very-subdued\",\n \"bg-decorative2-subdued\",\n \"bg-decorative2-subdued\",\n ]}\n >\n <OakFlex\n $pa={\"inner-padding-none\"}\n $flexDirection={\"column\"}\n $gap={\"space-between-s\"}\n >\n {children}\n </OakFlex>\n </OakHandDrawnCard>\n );\n};\n","import React, { useRef } from \"react\";\n\nimport {\n BaseCheckBoxProps,\n InternalCheckBoxHoverFocus,\n} from \"@/components/atoms/InternalCheckBox/InternalCheckBox\";\nimport {\n InternalCheckBoxLabel,\n InternalCheckBoxLabelProps,\n} from \"@/components/atoms/InternalCheckBoxLabel\";\nimport { InternalCheckBoxWrapper } from \"@/components/atoms/InternalCheckBoxWrapper\";\nimport {\n OakAllSpacingToken,\n OakBorderRadiusToken,\n OakBorderWidthToken,\n OakCombinedColorToken,\n OakInnerPaddingToken,\n} from \"@/styles\";\n\nexport type OakCheckBoxProps = BaseCheckBoxProps & {\n checkboxSize?: OakAllSpacingToken;\n checkboxBorder?: OakBorderWidthToken;\n checkboxBorderRadius?: OakBorderRadiusToken;\n checkedIcon?: React.JSX.Element;\n checkedBackgroundFill?: boolean;\n hoverBorderRadius?: OakBorderRadiusToken;\n iconPadding?: OakInnerPaddingToken;\n defaultColor?: OakCombinedColorToken;\n disabledColor?: OakCombinedColorToken;\n displayValue?: string;\n} & InternalCheckBoxLabelProps;\n\n/**\n *\n * Default checkbox which can be extended to create specialised checkboxes.\n * - if provided, displayValue is used to display a different value to the value prop.\n *\n *\n * ## Events\n * The following callbacks are available for tracking focus events:\n *\n * ### onChange\n * onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n *\n * ### onFocus\n * onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;\n *\n * ### onBlur\n * onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;\n *\n * ### onHovered\n * `onHovered?: (id, value, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n *\n *\n */\nexport const OakCheckBox = (props: OakCheckBoxProps) => {\n const {\n id,\n value,\n displayValue = value,\n disabled = false,\n defaultChecked = false,\n onChange,\n onFocus,\n onBlur,\n onHovered,\n iconPadding = \"inner-padding-none\",\n hoverBorderRadius = \"border-radius-xs\",\n checkboxSize = \"all-spacing-6\",\n checkboxBorder = \"border-solid-m\",\n checkboxBorderRadius = \"border-radius-xs\",\n defaultColor = \"text-primary\",\n disabledColor = \"text-disabled\",\n labelGap = \"space-between-s\",\n labelAlignItems = \"center\",\n checkedBackgroundFill = true,\n checkedIcon,\n } = props;\n\n const hoverStart = useRef(Date.now());\n\n const handleMouseEnter = () => {\n hoverStart.current = Date.now();\n };\n\n const handleMouseLeave = () => {\n const delta = Date.now() - hoverStart.current;\n if (onHovered) {\n onHovered(value, id, delta);\n }\n };\n\n const currentColor = disabled ? disabledColor : defaultColor;\n\n return (\n <InternalCheckBoxLabel\n htmlFor={id}\n labelGap={labelGap}\n labelAlignItems={labelAlignItems}\n $color={currentColor}\n disabled={disabled}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n data-testid={props[\"data-testid\"]}\n >\n <InternalCheckBoxWrapper\n size={checkboxSize}\n internalCheckbox={\n <InternalCheckBoxHoverFocus\n id={id}\n value={value}\n $width={checkboxSize}\n $height={checkboxSize}\n $ba={checkboxBorder}\n $borderRadius={checkboxBorderRadius}\n $borderColor={currentColor}\n $checkedBackground={checkedBackgroundFill ? currentColor : null}\n $hoverBorderRadius={hoverBorderRadius}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n defaultChecked={defaultChecked}\n disabled={disabled}\n />\n }\n checkedIcon={checkedIcon}\n iconPadding={iconPadding}\n />\n {displayValue}\n </InternalCheckBoxLabel>\n );\n};\n","import React, { ComponentPropsWithoutRef } from \"react\";\n\nimport { OakDraggable } from \"@/components/molecules/OakDraggable\";\n\ntype OakDraggableFeedbackProps = ComponentPropsWithoutRef<\n typeof OakDraggable\n> & {\n /**\n * Alters the appearance of the element to indicate whether or not it is in a correct state\n */\n feedback: \"correct\" | \"incorrect\";\n};\n\n/**\n * A draggable element that visually indicates whether or not its state is correct or not\n */\nexport const OakDraggableFeedback = ({\n feedback,\n ...props\n}: OakDraggableFeedbackProps) => {\n return (\n <OakDraggable\n {...props}\n iconName={feedback === \"correct\" ? \"tick\" : \"cross\"}\n iconColor={feedback === \"correct\" ? \"icon-success\" : \"icon-error\"}\n iconAlt={feedback === \"correct\" ? \"correct\" : \"incorrect\"}\n $ba=\"border-solid-xl\"\n $borderColor={feedback === \"correct\" ? \"border-success\" : \"border-error\"}\n $background={feedback === \"correct\" ? \"bg-correct\" : \"bg-incorrect\"}\n isReadOnly\n />\n );\n};\n","import React from \"react\";\n\nimport { OakFlex } from \"@/components/atoms/OakFlex\";\nimport { OakSpan } from \"@/components/atoms/OakSpan\";\nimport { OakIcon } from \"@/components/atoms/OakIcon\";\n\nexport type OakFieldErrorProps = {\n children?: React.ReactNode;\n};\n\n/**\n *\n * OakFieldError renders a error message when passed children.\n *\n */\nexport const OakFieldError = (props: OakFieldErrorProps) => {\n const { children } = props;\n if (!children) {\n /**\n * Return early to avoid unwanted whitespace when there's no error\n */\n return null;\n }\n return (\n <OakFlex $alignItems={\"center\"} $flexDirection={\"row\"}>\n <OakFlex $alignSelf={\"flex-start\"} $mr={\"space-between-s\"}>\n <OakIcon iconName=\"content-guidance\" $colorFilter={\"red\"} />\n </OakFlex>\n <OakSpan $color=\"red\">{children}</OakSpan>\n </OakFlex>\n );\n};\n","import React, { ReactNode, useState } from \"react\";\n\nimport { OakBox, OakFlex } from \"@/components/atoms\";\nimport {\n OakCollapsibleContent,\n OakTertiaryButton,\n} from \"@/components/molecules\";\n\ntype OakLessonVideoTranscriptProps = {\n /**\n * The transcript content\n */\n children: ReactNode;\n /**\n * The id of the collapsible content element. This is used to link the button to the content\n */\n id: string;\n /**\n * A control to toggle the video to display sign language\n */\n signLanguageControl?: ReactNode;\n};\n\n/**\n * Display a togglable video transcript with a slot to display a sign language control\n */\nexport const OakLessonVideoTranscript = ({\n children,\n id,\n signLanguageControl = null,\n}: OakLessonVideoTranscriptProps) => {\n const [showTranscript, setShowTranscript] = useState(false);\n\n return (\n <>\n <OakFlex\n $flexDirection={[\"column-reverse\", \"row\"]}\n $justifyContent=\"space-between\"\n >\n <OakBox>\n {children && (\n <OakTertiaryButton\n onClick={() => setShowTranscript(!showTranscript)}\n iconName={showTranscript ? \"chevron-up\" : \"chevron-down\"}\n isTrailingIcon\n aria-controls={id}\n aria-expanded={showTranscript}\n $mb=\"space-between-m\"\n >\n {showTranscript ? \"Hide transcript\" : \"Show transcript\"}\n </OakTertiaryButton>\n )}\n </OakBox>\n {signLanguageControl && (\n <OakBox $mb=\"space-between-m\">{signLanguageControl}</OakBox>\n )}\n </OakFlex>\n {children && (\n <OakCollapsibleContent\n id={id}\n $maxHeight=\"all-spacing-23\"\n isOpen={showTranscript}\n $font=\"body-1\"\n $color=\"text-primary\"\n >\n {children}\n </OakCollapsibleContent>\n )}\n </>\n );\n};\n","import React from \"react\";\n\nimport { OakFlex } from \"@/components/atoms/OakFlex\";\nimport { OakLI } from \"@/components/atoms\";\nimport {\n OakPrimaryNavItem,\n OakPrimaryNavItemProps,\n} from \"@/components/organisms/OakPrimaryNavItem\";\n\nexport type OakPrimaryNavProps = {\n ariaLabel?: string;\n navItems: OakPrimaryNavItemProps[];\n};\n\n/**\n * A row of buttons for navigating between different sections\n */\nexport const OakPrimaryNav = ({ ariaLabel, navItems }: OakPrimaryNavProps) => {\n return (\n <nav aria-label={ariaLabel}>\n <OakFlex\n as={\"ul\"}\n $flexDirection={[\"row\"]}\n $gap={\"space-between-m\"}\n $mh={\"space-between-none\"}\n $mv={\"space-between-none\"}\n $ph={\"inner-padding-none\"}\n >\n {navItems.map(\n (\n { href, isCurrent, children }: OakPrimaryNavItemProps,\n index: number,\n ) => (\n <OakLI $listStyle={\"none\"} key={index}>\n <OakPrimaryNavItem href={href} isCurrent={isCurrent}>\n {children}\n </OakPrimaryNavItem>\n </OakLI>\n ),\n )}\n </OakFlex>\n </nav>\n );\n};\n","import React from \"react\";\n\nimport { OakTextInput, OakTextInputProps } from \"@/components/molecules\";\n\ntype OakQuizTextInputProps = Omit<\n OakTextInputProps,\n \"validity\" | \"iconName\" | \"iconAlt\" | \"isTrailingIcon\"\n> & {\n /**\n * Alters the appearance of the input to indicate whether or not a correct answer was given.\n * Also sets the input to read-only.\n */\n feedback?: \"correct\" | \"incorrect\" | null;\n};\n\n/**\n * A text input for a free-text question in a quiz\n */\nexport const OakQuizTextInput = ({\n feedback,\n readOnly,\n ...props\n}: OakQuizTextInputProps) => {\n let validity: OakTextInputProps[\"validity\"];\n let iconName: OakTextInputProps[\"iconName\"];\n let iconAlt: OakTextInputProps[\"iconAlt\"] = undefined;\n\n switch (feedback) {\n case \"correct\":\n validity = \"valid\";\n iconName = \"tick\";\n iconAlt = \"Correct\";\n break;\n case \"incorrect\":\n validity = \"invalid\";\n iconName = \"cross\";\n iconAlt = \"Incorrect\";\n break;\n }\n\n return (\n <OakTextInput\n {...props}\n validity={validity}\n iconName={iconName}\n iconAlt={iconAlt}\n readOnly={readOnly || !!feedback}\n isTrailingIcon\n />\n );\n};\n","import React, { ElementType } from \"react\";\n\nimport {\n InternalShadowRectButton,\n InternalShadowRectButtonProps,\n} from \"@/components/molecules/InternalShadowRectButton\";\nimport { PolymorphicPropsWithoutRef } from \"@/components/polymorphic\";\n\nexport type OakSecondaryButtonProps = Omit<\n InternalShadowRectButtonProps,\n | \"defaultBorderColor\"\n | \"defaultBackground\"\n | \"defaultTextColor\"\n | \"hoverBackground\"\n | \"hoverBorderColor\"\n | \"hoverTextColor\"\n | \"disabledBackground\"\n | \"disabledBorderColor\"\n | \"disabledTextColor\"\n>;\n\n/**\n *\n * A specific implementation of InternalRectButton\n *\n * The following callbacks are available for tracking focus events:\n *\n * ### onClick\n * `onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;`\n *\n * ### onHovered\n * `onHovered?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, duration: number) => void;`<br>\n * called after a mouseEnter and mouseLeave event has happened\n */\nexport const OakSecondaryButton = <C extends ElementType = \"button\">({\n element,\n ...rest\n}: OakSecondaryButtonProps & PolymorphicPropsWithoutRef<C>) => {\n return (\n <InternalShadowRectButton\n element={element ?? \"button\"}\n defaultBorderColor=\"text-primary\"\n defaultBackground=\"bg-btn-secondary\"\n defaultTextColor=\"text-primary\"\n hoverBackground=\"bg-btn-secondary-hover\"\n hoverBorderColor=\"text-primary\"\n hoverTextColor=\"text-primary\"\n disabledBackground=\"bg-btn-secondary-disabled\"\n disabledBorderColor=\"text-disabled\"\n disabledTextColor=\"text-disabled\"\n {...rest}\n />\n );\n};\n","import React from \"react\";\n\nimport {\n OakHandDrawnBoxWithIconProps,\n OakHandDrawnCardWithIcon,\n OakPromoTag,\n} from \"@/components/molecules\";\nimport { OakBox } from \"@/components/atoms\";\n\nexport type OakSubjectIconProps = Pick<\n OakHandDrawnBoxWithIconProps,\n \"iconName\" | \"fill\" | \"iconColor\" | \"alt\"\n> & {\n iconName: `subject-${string}`;\n showPromoTag?: boolean;\n};\n\n/**\n * A large illuminated hand-drawn box with a subject icon in the center\n *\n * Accepts an optional `showPromoTag` prop to display a \"New\" tag in the top left corner\n */\nexport const OakSubjectIcon = ({\n showPromoTag,\n ...rest\n}: OakSubjectIconProps) => {\n return (\n <OakBox $width=\"fit-content\" $height=\"fit-content\" $position=\"relative\">\n <OakHandDrawnCardWithIcon {...rest} />\n {showPromoTag && (\n <OakBox\n $position=\"absolute\"\n $top={[\"all-spacing-0\", \"all-spacing-2\"]}\n $left={[\"all-spacing-0\", \"all-spacing-2\"]}\n >\n <OakPromoTag />\n </OakBox>\n )}\n </OakBox>\n );\n};\n","import React from \"react\";\nimport { ThemeProvider } from \"styled-components\";\n\nimport { OakTheme } from \"@/styles\";\n\nexport type OakThemeProviderProps = {\n theme: OakTheme;\n children: React.ReactNode;\n};\n\n/**\n *\n * OakThemeProvider wraps Styled Components ThemeProvider allowing the use of the custom type OakTheme.\n *\n */\nexport const OakThemeProvider = ({\n theme,\n children,\n}: OakThemeProviderProps) => {\n return <ThemeProvider theme={theme}>{children}</ThemeProvider>;\n};\n","import { OakTheme } from \"./theme\";\n\nexport const oakDefaultTheme: OakTheme = {\n name: \"default\",\n uiColors: {\n \"text-primary\": \"black\",\n \"text-subdued\": \"grey60\",\n \"text-error\": \"red\",\n \"text-disabled\": \"grey50\",\n \"text-link-active\": \"navy\",\n \"text-link-hover\": \"navy110\",\n \"text-link-pressed\": \"navy120\",\n \"text-link-visited\": \"navy120\",\n \"text-inverted\": \"white\",\n \"text-success\": \"oakGreen\",\n \"text-warning\": \"amber\",\n \"bg-primary\": \"white\",\n \"bg-neutral\": \"grey20\",\n \"bg-neutral-stronger\": \"grey30\",\n \"bg-btn-primary\": \"black\",\n \"bg-btn-primary-hover\": \"grey60\",\n \"bg-btn-primary-disabled\": \"grey50\",\n \"bg-btn-secondary\": \"white\",\n \"bg-btn-secondary-hover\": \"grey20\",\n \"bg-btn-secondary-disabled\": \"grey30\",\n \"bg-icon\": \"black\",\n \"bg-icon-hover\": \"grey60\",\n \"bg-decorative1-main\": \"mint\",\n \"bg-decorative1-subdued\": \"mint50\",\n \"bg-decorative1-very-subdued\": \"mint30\",\n \"bg-decorative2-main\": \"aqua\",\n \"bg-decorative2-subdued\": \"aqua50\",\n \"bg-decorative2-very-subdued\": \"aqua30\",\n \"bg-decorative3-main\": \"lavender\",\n \"bg-decorative3-subdued\": \"lavender50\",\n \"bg-decorative3-very-subdued\": \"lavender30\",\n \"bg-decorative4-main\": \"pink\",\n \"bg-decorative4-subdued\": \"pink50\",\n \"bg-decorative4-very-subdued\": \"pink30\",\n \"bg-decorative5-main\": \"lemon\",\n \"bg-decorative5-subdued\": \"lemon50\",\n \"bg-decorative5-very-subdued\": \"lemon30\",\n \"bg-correct\": \"mint50\",\n \"bg-incorrect\": \"red30\",\n \"icon-main\": \"white\",\n \"icon-inverted\": \"black\",\n \"icon-disabled\": \"grey50\",\n \"icon-brand\": \"oakGreen\",\n \"icon-success\": \"oakGreen\",\n \"icon-error\": \"red\",\n \"icon-warning\": \"amber\",\n \"border-primary\": \"black\",\n \"border-inverted\": \"white\",\n \"border-neutral\": \"grey50\",\n \"border-brand\": \"oakGreen\",\n \"border-success\": \"oakGreen\",\n \"border-error\": \"red\",\n \"border-warning\": \"amber\",\n \"border-decorative1\": \"mint\",\n \"border-decorative1-stronger\": \"mint110\",\n \"border-decorative2\": \"aqua\",\n \"border-decorative2-stronger\": \"aqua110\",\n \"border-decorative3\": \"lavender\",\n \"border-decorative3-stronger\": \"lavender110\",\n \"border-decorative4\": \"pink\",\n \"border-decorative4-stronger\": \"pink110\",\n \"border-decorative5\": \"lemon\",\n \"border-decorative5-stronger\": \"lemon110\",\n \"border-decorative6\": \"amber50\",\n \"border-decorative6-stronger\": \"amber\",\n transparent: \"transparent\",\n },\n};\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__rest","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","__read","o","m","Symbol","iterator","r","ar","next","done","push","value","error","__makeTemplateObject","cooked","raw","defineProperty","SuppressedError","oakColorTokens","white","grey10","grey20","grey30","grey40","grey50","grey60","grey70","black","oakGreen","mint","mint30","mint50","mint110","aqua","aqua30","aqua50","aqua110","lavender","lavender30","lavender50","lavender110","pink","pink30","pink50","pink110","lemon","lemon30","lemon50","lemon110","amber","amber30","amber50","red","red30","red50","navy","navy110","navy120","blue","magenta","purple","teal","transparent","oakColorFilterTokens","oakUiRoleTokens","parseColor","includes","_a","c","theme","uiColors","truthy","breakpointsByName","small","large","breakpoints","values","sort","a","b","getBreakpoint","breakpointName","responsiveStyle","attr","getValues","parse","x","props","attrCss","undefined","css","templateObject_1","Array","isArray","to","from","pack","l","slice","concat","__spreadArray","templateObject_3","map","breakpoint","templateObject_4","filter","templateObject_2","colorStyle","$color","$background","BASE_FONT_SIZE_PX","REM_DP","pxToRem","px","Number","toFixed","oakAllSpacingTokens","oakInnerPaddingTokens","oakSpaceBetweenTokens","parseSpacing","v","positionStyle","$position","$top","$right","$bottom","$left","$inset","$overflow","$overflowX","$overflowY","$objectFit","$pointerEvents","$visibility","sizeStyle","$width","$minWidth","$maxWidth","$height","$minHeight","$maxHeight","$aspectRatio","$boxSizing","paddingAll","$pa","paddingHorizontal","$ph","paddingVertical","$pv","paddingLeft","$pl","paddingRight","templateObject_5","$pr","paddingTop","templateObject_6","$pt","paddingBottom","templateObject_7","$pb","marginAll","templateObject_8","$ma","marginHorizontal","templateObject_9","$mh","marginVertical","templateObject_10","$mv","marginLeft","templateObject_11","$ml","marginRight","templateObject_12","$mr","marginTop","templateObject_13","$mt","marginBottom","templateObject_14","$mb","marginStyle","paddingStyle","spacingStyle","oakBorderWidthTokens","oakBorderRadiusTokens","parseBorder","parseBorderRadius","borderAll","$ba","borderTop","$bt","borderRight","$br","borderBottom","$bb","borderLeft","$bl","borderHorizontal","$bh","borderVertical","$bv","borderColor","$borderColor","borderRadius","$borderRadius","borderRadiusTopLeft","$btlr","borderRadiusTopRight","$btrr","borderRadiusBottomLeft","$bblr","borderRadiusBottomRight","$bbrr","borderRadiusTop","$btr","borderRadiusBottom","templateObject_15","$bbr","borderStrokeStyle","templateObject_16","$borderStyle","borderStyle","templateObject_17","displayStyle","$display","oakDropShadowTokens","parseDropShadow","variant","dropShadowStyle","$dropShadow","oakOpacityTokens","opaque","opacityStyle","$opacity","transformStyle","$transform","$transformOrigin","oakTransitionTokens","transitionStyle","$transition","oakFontSizeTokens","oakFontTokens","typographyStyle","$font","font","fontSize","lineHeight","$textAlign","$textDecoration","$whiteSpace","$wordWrap","$textOverflow","oakZIndexTokens","behind","neutral","zIndexStyle","$zIndex","oakBoxCss","onClick","OakBox","styled","div","flexStyle","$flexDirection","$flexWrap","$alignItems","$alignContent","$justifyContent","$alignSelf","$order","$flexGrow","$flexShrink","$flexBasis","$gap","$columnGap","$rowGap","OakFlex","default","OakSpan","span","OakForm","form","parseColorFilter","colorFilterStyle","$colorFilter","clickStyles","placeholderStyles","$showOakPlaceholder","StyledFillImage","Image","StyledResponsiveImage","OakImage","as","src","alt","width","height","sizes","_b","_c","_d","placeholder","unoptimized","imageProps","onLoad","onError","rest","finalPlaceholder","_e","useState","showPlaceholder","setShowPlaceholder","setImg","useCallback","img","complete","handleComplete","originalHandler","event","useShowPlaceholder","React","createElement","ref","fill","OakTypography","HeadingTagComponent","tag","ariaLabel","ariaHidden","otherProps","Tag","OakHeading","OakP","OakUL","ul","$reset","OakOL","ol","listStyle","$listStyle","OakLI","li","defaultProps","OakLabel","label","icons","home","send","rocket","edit","hamburger","cross","bell","twitter","worksheet","facebook","share","save","linkedin","books","external","download","search","go","copyright","project","tick","instagram","dot","warning","lightbulb","quiz","video","intro","oakIconNames","keys","OakIcon","iconName","process","env","NEXT_PUBLIC_OAK_ASSETS_HOST","NEXT_PUBLIC_OAK_ASSETS_PATH","gridStyle","$rg","$cg","$gridAutoRows","$gridTemplateAreas","$gridTemplateColumns","$gridTemplateRows","OakGrid","combineSpanStart","start","parseSpanStart","split","span_1","gridArea","$colSpan","index","$colStart","$rowSpan","$rowStart","$colEnd","OakGridArea","OakMaxWidth","getCloudinaryIdFromUrl","config","toString","replace","canaryUrl","URL","getCldImageUrl","origin","getCloudinaryRootUrl","cloudinaryConfigContext","createContext","OakCloudinaryConfigProvider","Provider","OakKbd","children","resetGlobalCss","oakGlobalCss","OakGlobalStyle","createGlobalStyle","screenReaderStyle","OakScreenReader","SpinnerKeyframe","keyframes","StyledLoadingSpinner","loaderColor","OakLoadingSpinner","internalButtonCss","InternalButton","onHovered","Component","hoverStart","useRef","Date","now","onMouseEnter","current","onMouseLeave","delta","StyledInternalButton","$hoverTextColor","$hoverBackground","$hoverBorderColor","$defaultBackground","$defaultBorderColor","$defaultTextColor","$disabledBackground","$disabledBorderColor","$disabledTextColor","StyledButtonWrapper","$hoverShadow","InternalShadowRectButton","element","isTrailingIcon","isLoading","disabled","maxWidth","defaultBackground","defaultBorderColor","defaultTextColor","disabledTextColor","hoverTextColor","hoverBackground","hoverBorderColor","disabledBackground","disabledBorderColor","className","hoverShadow","icon","Fragment","loader","iconLogic","OakPrimaryButton","OakPrimaryInvertedButton","$disabledIconBackground","$hoverIconBackground","$defaultIconBackground","InternalShadowRoundButton","iconBackgroundSize","iconSize","disabledIconBackground","defaultIconColor","hoverIconBackground","defaultIconBackground","disabledIconColor","OakTertiaryButton","RadioContext","currentValue","name","RadioButtonLabel","$labelGap","$labelAlignItems","HiddenRadioButtonInput","input","attrs","type","VisibleRadioButtonInput","$disableFocusRing","$radioInnerSize","DisabledVisibleRadioButtonInput","OakRadioButton","forwardRef","radioContext","useContext","onValueUpdated","id","tabIndex","dataTestId","disableFocusRing","radioInnerSize","_f","radioOuterSize","_g","radioBorderWidth","_h","radioBackground","_j","checkedRadioBorderWidth","checked","anyDisabled","finalRadioBorderWidth","htmlFor","onChange","BaseCheckBox","InternalCheckBox","$checkedBackground","InternalCheckBoxHover","$hoverBorderRadius","focusStyle","InternalCheckBoxHoverFocus","InternalCheckBoxLabel","labelGap","labelAlignItems","InternalCheckBoxLabelHoverDecor","StyledIconContainer","InternalCheckBoxWrapper","size","iconPadding","internalCheckbox","checkedIcon","StyledInput","InternalTextInput","onInitialFocus","onFocus","hadInitialFocused","StyledTextInputWrapper","$focusRingDropShadows","dropShadow","join","$readOnly","$readOnlyBorderColor","$readOnlyColor","$disabled","$disabledBackgroundColor","$disabledColor","OakTextInput","readOnlyBorderColor","focusRingDropShadows","background","disabledBackgroundColor","highlightBackgroundColor","_k","color","_l","disabledColor","_m","readOnlyColor","validity","_o","iconColor","_p","validBorderColor","_q","invalidBorderColor","_r","validIconColor","_s","invalidIconColor","iconAlt","_t","_u","isHighlighted","wrapperWidth","wrapperMaxWidth","finalBackgroundColor","finalBorderColor","finalIconColor","finalReadOnlyBorderColor","readOnly","currentTarget","querySelector","focus","OakRoundIcon","StyledFlex","ARROW_SIZE","StyledSvg","svg","$tooltipPosition","$fill","InternalTooltip","tooltipPosition","role","d","OakTooltip","tooltip","isOpen","domContainer","document","body","targetElement","setTargetElement","overlayStyle","setOverlayStyle","borderRadiusProps","useLayoutEffect","observer","ResizeObserver","rect","getBoundingClientRect","top","left","observe","documentElement","disconnect","createPortal","style","getTooltipPositionProps","domElement","firstElementChild","display","StyledBackLink","InternalCard","StyledBackgroundBox","InternalCardWithBackgroundElement","backgroundElement","parseBorderWidth","InternalStyledSvg","$stroke","$strokeWidth","OakHandDrawnCard","stroke","strokeWidth","xmlns","viewBox","preserveAspectRatio","vectorEffect","OakHandDrawnCardWithIcon","iconWidth","iconHeight","StyledPromoTag","OakPromoTag","StyledScrollBox","OakCollapsibleContent","StyledOakIcon","StyledLink","OakLink","StyledLeadingTrim","OakDragAndDropInstructions","StyledDraggable","$iconColor","OakDraggable","isDragging","isDisabled","isReadOnly","OakDroppable","labelSlot","isOver","slotBackground","StyledInternalCheckBox","StyledInternalCheckBoxLabelHoverDecor","StyledFlexBox","$outlineColor","$overlayBorderColor","$feedbackBgColor","StyledOakFlex","$checked","StyledInternalShadowRoundButton","OakHintButton","OakQuizHint","hint","setIsOpen","OakQuizFeedback","feedbackLabel","feedback","answerFeedback","StyledMobileSummary","StyledLayoutBox","StickyFooter","StyledLabel","StyledRoundIcon","activeIconStyles","StyledLessonNavItem","FlexedOakBox","pickIconForSection","sectionName","StyledLessonReviewItem","pickSummaryForProgress","completed","pickSummaryForIncomplete","lessonSectionName","numQuestions","pickLabelForSection","pickColorsForSection","renderQuestionCounter","grade","canUseDOM","window","isWindow","elementString","isNode","node","getWindow","target","_target$ownerDocument","_target$ownerDocument2","ownerDocument","defaultView","isDocument","Document","isHTMLElement","HTMLElement","isSVGElement","SVGElement","getOwnerDocument","useIsomorphicLayoutEffect","useEffect","useEvent","handler","handlerRef","_len","args","_key","useLatestValue","dependencies","valueRef","useLazyMemo","callback","useMemo","newValue","useNodeRef","onChangeHandler","setNodeRef","usePrevious","ids","useUniqueId","prefix","createAdjustmentFn","modifier","object","adjustments","reduce","accumulator","adjustment","entries","key","valueAdjustment","add","subtract","isKeyboardEvent","KeyboardEvent","getEventCoordinates","TouchEvent","isTouchEvent","touches","clientX","clientY","y","changedTouches","hasViewportRelativeCoordinates","CSS","freeze","Translate","transform","Math","round","Scale","scaleX","scaleY","Transform","Transition","_ref","property","duration","easing","SELECTOR","findFirstFocusableNode","matches","hiddenStyles","HiddenText","LiveRegion","announcement","ariaLiveType","position","margin","border","padding","overflow","clip","clipPath","whiteSpace","DndMonitorContext","defaultScreenReaderInstructions","draggable","defaultAnnouncements","onDragStart","active","onDragOver","_ref2","over","onDragEnd","_ref3","onDragCancel","_ref4","Accessibility","announcements","container","hiddenTextDescribedById","screenReaderInstructions","announce","setAnnouncement","useAnnouncement","liveRegionId","mounted","setMounted","listener","registerListener","Error","useDndMonitor","onDragMove","_ref5","_ref6","markup","Action","noop","useSensor","sensor","options","useSensors","sensors","defaultCoordinates","distanceBetween","p1","p2","sqrt","pow","getRelativeTransformOrigin","eventCoordinates","sortCollisionsAsc","data","sortCollisionsDesc","cornersOfRectangle","getFirstCollision","collisions","firstCollision","centerOfRectangle","closestCenter","collisionRect","droppableRects","droppableContainers","centerRect","droppableContainer","get","distBetween","getIntersectionRatio","entry","max","right","min","bottom","targetArea","entryArea","intersectionArea","rectIntersection","intersectionRatio","getRectDelta","rect1","rect2","createRectAdjustmentFn","acc","getAdjustedRect","parseTransform","startsWith","transformArray","defaultOptions","ignoreTransform","getClientRect","transformOrigin","getComputedStyle","parsedTransform","translateX","translateY","parseFloat","w","h","inverseTransform","getTransformAgnosticClientRect","getScrollableAncestors","limit","scrollParents","findScrollableAncestors","scrollingElement","computedStyle","overflowRegex","some","test","isScrollable","isFixed","parentNode","getFirstScrollableAncestor","firstScrollableAncestor","getScrollableElement","getScrollXCoordinate","scrollX","scrollLeft","getScrollYCoordinate","scrollY","scrollTop","getScrollCoordinates","Direction","isDocumentScrollingElement","getScrollPosition","scrollingContainer","minScroll","dimensions","innerHeight","innerWidth","clientHeight","clientWidth","maxScroll","scrollWidth","scrollHeight","isTop","isLeft","isBottom","isRight","defaultThreshold","getScrollDirectionAndSpeed","scrollContainer","scrollContainerRect","acceleration","thresholdPercentage","direction","speed","threshold","Backward","abs","Forward","getScrollElementRect","getScrollOffsets","scrollableAncestors","scrollIntoViewIfNeeded","measure","scrollIntoView","block","inline","properties","Rect","constructor","scrollOffsets","axis","getScrollOffset","currentOffsets","scrollOffsetsDeltla","enumerable","Listeners","listeners","removeAll","forEach","_this$target","removeEventListener","eventName","_this$target2","addEventListener","hasExceededDistance","measurement","dx","dy","EventName","KeyboardCode","preventDefault","stopPropagation","defaultKeyboardCodes","Space","Enter","cancel","Esc","end","defaultKeyboardCoordinateGetter","currentCoordinates","code","Right","Left","Down","Up","KeyboardSensor","autoScrollEnabled","referenceCoordinates","windowListeners","handleKeyDown","bind","handleCancel","attach","handleStart","Resize","VisibilityChange","setTimeout","Keydown","activeNode","onStart","context","keyboardCodes","coordinateGetter","scrollBehavior","handleEnd","newCoordinates","coordinatesDelta","scrollDelta","scrollElementRect","clampedCoordinates","canScrollX","canScrollY","newScrollCoordinates","canScrollToNewCoordinates","scrollTo","behavior","scrollBy","handleMove","coordinates","onMove","onEnd","detach","onCancel","isDistanceConstraint","constraint","Boolean","isDelayConstraint","activators","onActivation","nativeEvent","activator","activatorNode","AbstractPointerSensor","events","listenerTarget","_getEventCoordinates","EventTarget","getEventListenerTarget","activated","initialCoordinates","timeoutId","documentListeners","handleKeydown","removeTextSelection","activationConstraint","bypassActivationConstraint","move","passive","DragStart","ContextMenu","delay","clearTimeout","Click","capture","SelectionChange","_getEventCoordinates2","tolerance","distance","cancelable","_this$document$getSel","getSelection","removeAllRanges","PointerSensor","super","isPrimary","button","events$1","MouseButton","MouseSensor","RightClick","events$2","TouchSensor","setup","AutoScrollActivator","TraversalOrder","useAutoScroller","Pointer","canScroll","draggingRect","enabled","interval","order","TreeOrder","pointerCoordinates","scrollableAncestorRects","scrollIntent","previousDelta","previousIntent","defaultScrollIntent","sign","useScrollIntent","setAutoScrollInterval","clearAutoScrollInterval","intervalRef","setInterval","clearInterval","useInterval","scrollSpeed","scrollDirection","DraggableRect","scrollContainerRef","autoScroll","sortedScrollableAncestors","reverse","JSON","stringify","MeasuringStrategy","MeasuringFrequency","defaultValue","Map","useInitialValue","computeFn","previousValue","useResizeObserver","handleResize","resizeObserver","defaultMeasure","useRect","fallbackRect","measureRect","useReducer","currentRect","isConnected","newRect","mutationObserver","handleMutations","MutationObserver","useMutationObserver","records","record","contains","childList","subtree","defaultValue$1","useScrollOffsetsDelta","initialScrollOffsets","hasScrollOffsets","useWindowRect","getWindowClientRect","defaultValue$2","getMeasurableNode","firstChild","defaultSensors","defaultData","defaultMeasuringConfiguration","droppable","strategy","WhileDragging","frequency","Optimized","dragOverlay","DroppableContainersMap","_super$get","toArray","getEnabled","getNodeFor","_this$get$node$curren","_this$get","defaultPublicContext","activatorEvent","activeNodeRect","containerNodeRect","draggableNodes","nodeRef","setRef","measuringConfiguration","measureDroppableContainers","windowRect","measuringScheduled","defaultInternalContext","ariaDescribedById","dispatch","InternalContext","PublicContext","getInitialState","nodes","translate","containers","reducer","state","action","DragMove","DragEnd","DragCancel","RegisterDroppable","set","SetDroppableDisabled","UnregisterDroppable","delete","RestoreFocus","previousActivatorEvent","previousActiveId","activeElement","draggableNode","requestAnimationFrame","focusableNode","applyModifiers","modifiers","ActiveDraggableContext","Status","DndContext","memo","_sensorContext$curren","_dragOverlay$nodeRef$","_dragOverlay$rect","_over$rect","accessibility","collisionDetection","measuring","store","dispatchMonitorEvent","registerMonitorListener","Set","_listener$type","useDndMonitorProvider","status","setStatus","Uninitialized","isInitialized","Initialized","activeId","activeRects","initial","translated","_node$data","activeRef","activeSensor","setActiveSensor","setActivatorEvent","latestProps","draggableDescribedById","enabledDroppableContainers","dragging","queue","setQueue","containersRef","Always","BeforeDragging","disabledRef","useDroppableMeasuring","cachedNode","useCachedNode","activationCoordinates","autoScrollOptions","activeSensorDisablesAutoscroll","autoScrollGloballyDisabled","getAutoScrollerOptions","initialActiveNodeRect","useInitialRect","initialRect","initialized","rectDelta","useLayoutShiftScrollCompensation","layoutShiftCompensation","parentElement","sensorContext","draggingNode","draggingNodeRect","scrollAdjustedTranslate","overNode","setRect","handleNodeChange","useDragOverlayMeasuring","usesDragOverlay","nodeRectDelta","previousNode","ancestors","useScrollableAncestors","elements","firstElement","rects","measureRects","useRects","modifiedTranslate","overlayNodeRect","scrollCoordinates","setScrollCoordinates","prevElements","handleScroll","previousElements","cleanup","scrollableElement","useScrollOffsets","scrollAdjustment","activeNodeScrollDelta","overId","setOver","adjustScale","instantiateSensor","Sensor","sensorInstance","unstable_batchedUpdates","Initializing","createHandler","async","cancelDrop","Promise","resolve","bindActivatorToSensorInstantiator","activeDraggableNode","dndKit","defaultPrevented","activationContext","capturedBy","getSyntheticHandler","useCombineActivators","teardownFns","teardown","useSensorSetup","overContainer","publicContext","internalContext","restoreFocus","NullContext","defaultRole","ID_PREFIX","useDraggable","attributes","roleDescription","setActivatorNodeRef","useSyntheticListeners","dataRef","useDndContext","ID_PREFIX$1","defaultResizeObserverConfig","timeout","useDroppable","resizeObserverConfig","previous","resizeObserverConnected","callbackId","resizeObserverDisabled","updateMeasurementsFor","resizeObserverTimeout","newElement","previousElement","unobserve","AnimationManager","animation","clonedChildren","setClonedChildren","setElement","previousChildren","then","cloneElement","defaultTransform","NullifiedContextProvider","baseStyles","touchAction","defaultTransition","PositionedOverlay","transition","scaleAdjustedTransform","styles","defaultDropAnimationSideEffects","originalStyles","getPropertyValue","setProperty","classList","remove","defaultDropAnimationConfiguration","final","sideEffects","opacity","useDropAnimation","activeDraggable","measurableNode","scale","finalTransform","animationKeyframes","firstKeyframe","lastKeyframe","animate","onfinish","createDefaultDropAnimation","useKey","DragOverlay","dropAnimation","dropAnimationConfig","wrapperElement","zIndex","modifiedTransform","arrayMove","array","newArray","splice","getSortedRects","items","isValidIndex","rectSortingStrategy","activeIndex","overIndex","newRects","oldRect","defaultScale$1","verticalListSortingStrategy","_rects$activeIndex","fallbackActiveRect","overIndexRect","itemGap","clientRects","previousRect","nextRect","getItemGap$1","Context","containerId","disableTransforms","useDragOverlay","sortedRects","SortableContext","userDefinedItems","disabledProp","item","previousItemsRef","itemsHaveChanged","itemsEqual","normalizeDisabled","contextValue","defaultNewIndexGetter","defaultAnimateLayoutChanges","isSorting","wasDragging","newIndex","previousItems","previousContainerId","transitionProperty","disabledTransition","defaultAttributes","useSortable","animateLayoutChanges","userDefinedAttributes","localDisabled","customData","getNewIndex","localStrategy","globalDisabled","globalStrategy","_localDisabled$dragga","_localDisabled$droppa","normalizeLocalDisabled","sortable","itemsAfterCurrentSortable","setDroppableNodeRef","setDraggableNodeRef","refs","useCombinedRefs","displaceItem","shouldDisplaceDragSource","dragSourceDisplacement","shouldAnimateLayoutChanges","derivedTransform","setDerivedtransform","previousIndex","useDerivedTransform","getTransition","hasSortableData","directions","sortableKeyboardCoordinates","filteredContainers","corners","rectCorners","distances","corner","effectiveDistance","closestCorners","closestId","activeDroppable","newDroppable","newNode","hasDifferentScrollAncestors","hasSameContainer","isSameContainer","isAfterActive","isAfter","offset","rectCoordinates","injectDndContext","InternalDndContext","originalScrollingBehaviour","usePrefersReducedMotion","prefersReducedMotion","setPrefersReducedMotion","mediaQuery","matchMedia","ConnectedDraggable","createAccouncements","getPosition","findIndex","getItemLabel","find","StyledOakBox","InternalDroppableHoldingPen","domContent","setContentBox","minHeight","setMinHeight","currentHeight","borderBoxSize","blockSize","entries_1","TypeError","__values","entries_1_1","resetMinHeight","ConnectedDroppableHoldingPen","ConnectedDroppable","match","OakPrimaryButtonWithoutPointerEvents","OakPrimaryNavItem","href","isCurrent","shallow","Link","listItems","displayValue","defaultChecked","onBlur","hoverBorderRadius","checkboxSize","checkboxBorder","checkboxBorderRadius","defaultColor","checkedBackgroundFill","currentColor","cloudinaryId","endsWith","CldImage","flags","content","topNavSlot","bottomNavSlot","pickSectionColours","pageBackgroundColor","contentBackgroundColor","contentBorderColor","mobileContentBackgroundColor","progress","notStartedBackgroundColor","backgroundColor","pickSummaryForNotStarted","pickSummaryForComplete","completedBackgroundColor","iconBackgroundColor","lessonSectionNameToIconMap","backLinkSlot","counterSlot","heading","mobileSummary","pickSectionIcon","signLanguageControl","showTranscript","setShowTranscript","navItems","image","innerRef","isFeedback","defaultRef","inputRef","showTick","showCross","imageContainer","feedbackBgColor","feedbackBorderColor","inputCheckbox","click","counter","total","initialOptions","initialSlots","setMatches","draggables","droppables","setActiveId","matchedDraggableIds","unmatchedDraggables","newMatches","fromEntries","initialItems","setItems","activeItem","oldIndex","newItems","outlineColor","feedbackAltText","showFeedback","feedbackIcon","setValue","showPromoTag","ThemeProvider"],"mappings":"8QA+BWA,EAAW,WAQlB,OAPAA,EAAWC,OAAO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C,GAEzC,OADIjC,OAAOkC,eAAkBlC,OAAOkC,eAAeF,EAAQ,MAAO,CAAEH,MAAOI,IAAiBD,EAAOC,IAAMA,EAClGD,CACX,CA2DkD,mBAApBG,iBAAiCA,gBC3TlD,IAAAC,EAAiB,CAC5BC,MAAO,UACPC,OAAQ,UACRC,OAAQ,UACRC,OAAQ,UACRC,OAAQ,UACRC,OAAQ,UACRC,OAAQ,UACRC,OAAQ,UACRC,MAAO,UACPC,SAAU,UACVC,KAAM,UACNC,OAAQ,UACRC,OAAQ,UACRC,QAAS,UACTC,KAAM,UACNC,OAAQ,UACRC,OAAQ,UACRC,QAAS,UACTC,SAAU,UACVC,WAAY,UACZC,WAAY,UACZC,YAAa,UACbC,KAAM,UACNC,OAAQ,UACRC,OAAQ,UACRC,QAAS,UACTC,MAAO,UACPC,QAAS,UACTC,QAAS,UACTC,SAAU,UACVC,MAAO,UACPC,QAAS,UACTC,QAAS,UACTC,IAAK,UACLC,MAAO,UACPC,MAAO,UACPC,KAAM,UACNC,QAAS,UACTC,QAAS,UACTC,KAAM,UACNC,QAAS,UACTC,OAAQ,UACRC,KAAM,UACNC,YAAa,eAWFC,EAAuB,CAClCpC,MACE,wFACFyB,IAAK,2FACLxB,SACE,0FACFT,MACE,yFACFI,OACE,wFACFC,OACE,uFACF+B,KAAM,2FACNC,QACE,2FACFC,QACE,4FAKSO,EAAkB,CAC7B,eACA,eACA,aACA,gBACA,mBACA,kBACA,oBACA,oBACA,gBACA,eACA,eACA,aACA,aACA,sBACA,iBACA,uBACA,0BACA,mBACA,yBACA,4BACA,UACA,gBACA,sBACA,yBACA,8BACA,sBACA,yBACA,8BACA,sBACA,yBACA,8BACA,sBACA,yBACA,8BACA,sBACA,yBACA,8BACA,aACA,eACA,YACA,gBACA,gBACA,aACA,eACA,aACA,eACA,iBACA,kBACA,iBACA,eACA,iBACA,eACA,iBACA,qBACA,8BACA,qBACA,8BACA,qBACA,8BACA,qBACA,8BACA,qBACA,8BACA,qBACA,8B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