@raspberrypifoundation/design-system-react 2.7.3 → 2.9.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.
Files changed (49) hide show
  1. package/README.md +16 -7
  2. package/dist/design-system-react.css +1 -1
  3. package/dist/design-system-react.js +3284 -830
  4. package/dist/design-system-react.umd.cjs +16 -13
  5. package/dist/scss/components/switch.scss +179 -0
  6. package/dist/scss/design-system-core.scss +3 -2
  7. package/dist/scss/properties/colors/_greys.scss +1 -0
  8. package/dist/scss/utility/_visually-hidden.scss +11 -0
  9. package/dist/types/lib/main.d.ts +10 -0
  10. package/dist/types/lib/main.d.ts.map +1 -1
  11. package/dist/types/src/components/Accordion/index.d.ts +1 -1
  12. package/dist/types/src/components/Accordion/index.d.ts.map +1 -1
  13. package/dist/types/src/components/Button/index.d.ts.map +1 -1
  14. package/dist/types/src/components/Form/Switch/Switch.spec.d.ts +2 -0
  15. package/dist/types/src/components/Form/Switch/Switch.spec.d.ts.map +1 -0
  16. package/dist/types/src/components/Form/Switch/Switch.types.d.ts +24 -0
  17. package/dist/types/src/components/Form/Switch/Switch.types.d.ts.map +1 -0
  18. package/dist/types/src/components/Form/Switch/index.d.ts +16 -0
  19. package/dist/types/src/components/Form/Switch/index.d.ts.map +1 -0
  20. package/dist/types/src/components/Menu/Menu.types.d.ts +6 -0
  21. package/dist/types/src/components/Menu/Menu.types.d.ts.map +1 -0
  22. package/dist/types/src/components/Menu/MenuButton/MenuButton.types.d.ts +7 -0
  23. package/dist/types/src/components/Menu/MenuButton/MenuButton.types.d.ts.map +1 -0
  24. package/dist/types/src/components/Menu/MenuButton/index.d.ts +4 -0
  25. package/dist/types/src/components/Menu/MenuButton/index.d.ts.map +1 -0
  26. package/dist/types/src/components/Menu/MenuItem/MenuItem.types.d.ts +11 -0
  27. package/dist/types/src/components/Menu/MenuItem/MenuItem.types.d.ts.map +1 -0
  28. package/dist/types/src/components/Menu/MenuItem/index.d.ts +6 -0
  29. package/dist/types/src/components/Menu/MenuItem/index.d.ts.map +1 -0
  30. package/dist/types/src/components/Menu/MenuTitle/MenuTitle.types.d.ts +4 -0
  31. package/dist/types/src/components/Menu/MenuTitle/MenuTitle.types.d.ts.map +1 -0
  32. package/dist/types/src/components/Menu/MenuTitle/index.d.ts +5 -0
  33. package/dist/types/src/components/Menu/MenuTitle/index.d.ts.map +1 -0
  34. package/dist/types/src/components/Menu/index.d.ts +5 -0
  35. package/dist/types/src/components/Menu/index.d.ts.map +1 -0
  36. package/dist/types/src/stories/Accordion.stories.d.ts +17 -0
  37. package/dist/types/src/stories/Accordion.stories.d.ts.map +1 -1
  38. package/dist/types/src/stories/Menu/Menu.stories.d.ts +8 -0
  39. package/dist/types/src/stories/Menu/Menu.stories.d.ts.map +1 -0
  40. package/dist/types/src/stories/Menu/MenuButton.stories.d.ts +7 -0
  41. package/dist/types/src/stories/Menu/MenuButton.stories.d.ts.map +1 -0
  42. package/dist/types/src/stories/Menu/MenuItem.stories.d.ts +9 -0
  43. package/dist/types/src/stories/Menu/MenuItem.stories.d.ts.map +1 -0
  44. package/dist/types/src/stories/Menu/MenuTitle.stories.d.ts +7 -0
  45. package/dist/types/src/stories/Menu/MenuTitle.stories.d.ts.map +1 -0
  46. package/dist/types/src/stories/forms/Switch.stories.d.ts +54 -0
  47. package/dist/types/src/stories/forms/Switch.stories.d.ts.map +1 -0
  48. package/package.json +18 -13
  49. package/CHANGELOG.md +0 -334
@@ -1,59 +1,62 @@
1
- (function(A,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],t):(A=typeof globalThis<"u"?globalThis:A||self,t(A["RPF Design System React"]={},A.jsxRuntime,A.React))})(this,function(A,t,F){"use strict";function be(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ee={exports:{}};/*!
1
+ (function(V,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],p):(V=typeof globalThis<"u"?globalThis:V||self,p(V["RPF Design System React"]={},V.jsxRuntime,V.React,V.ReactDOM))})(this,(function(V,p,te,nr){"use strict";function $t(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const x=$t(te),rr=$t(nr);function jt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var st={exports:{}};/*!
2
2
  Copyright (c) 2018 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
5
- */var me;function ke(){return me||(me=1,function(e){(function(){var n={}.hasOwnProperty;function i(){for(var r="",u=0;u<arguments.length;u++){var c=arguments[u];c&&(r=o(r,a(c)))}return r}function a(r){if(typeof r=="string"||typeof r=="number")return r;if(typeof r!="object")return"";if(Array.isArray(r))return i.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var u="";for(var c in r)n.call(r,c)&&r[c]&&(u=o(u,c));return u}function o(r,u){return u?r?r+" "+u:r+u:r}e.exports?(i.default=i,e.exports=i):window.classNames=i})()}(ee)),ee.exports}var qe=ke();const q=be(qe);var J={exports:{}},R={exports:{}},C={};/** @license React v16.13.1
5
+ */var Wt;function or(){return Wt||(Wt=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var i="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(i=o(i,n(a)))}return i}function n(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return r.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var s="";for(var a in i)t.call(i,a)&&i[a]&&(s=o(s,a));return s}function o(i,s){return s?i?i+" "+s:i+s:i}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(st)),st.exports}var ir=or();const J=jt(ir);var ke={exports:{}},De={exports:{}},Y={};/** @license React v16.13.1
6
6
  * react-is.production.min.js
7
7
  *
8
8
  * Copyright (c) Facebook, Inc. and its affiliates.
9
9
  *
10
10
  * This source code is licensed under the MIT license found in the
11
11
  * LICENSE file in the root directory of this source tree.
12
- */var _e;function Le(){if(_e)return C;_e=1;var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,r=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,h=e?Symbol.for("react.async_mode"):60111,v=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,E=e?Symbol.for("react.suspense"):60113,N=e?Symbol.for("react.suspense_list"):60120,I=e?Symbol.for("react.memo"):60115,k=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,$=e?Symbol.for("react.fundamental"):60117,L=e?Symbol.for("react.responder"):60118,z=e?Symbol.for("react.scope"):60119;function M(l){if(typeof l=="object"&&l!==null){var D=l.$$typeof;switch(D){case n:switch(l=l.type,l){case h:case v:case a:case r:case o:case E:return l;default:switch(l=l&&l.$$typeof,l){case c:case p:case k:case I:case u:return l;default:return D}}case i:return D}}}function j(l){return M(l)===v}return C.AsyncMode=h,C.ConcurrentMode=v,C.ContextConsumer=c,C.ContextProvider=u,C.Element=n,C.ForwardRef=p,C.Fragment=a,C.Lazy=k,C.Memo=I,C.Portal=i,C.Profiler=r,C.StrictMode=o,C.Suspense=E,C.isAsyncMode=function(l){return j(l)||M(l)===h},C.isConcurrentMode=j,C.isContextConsumer=function(l){return M(l)===c},C.isContextProvider=function(l){return M(l)===u},C.isElement=function(l){return typeof l=="object"&&l!==null&&l.$$typeof===n},C.isForwardRef=function(l){return M(l)===p},C.isFragment=function(l){return M(l)===a},C.isLazy=function(l){return M(l)===k},C.isMemo=function(l){return M(l)===I},C.isPortal=function(l){return M(l)===i},C.isProfiler=function(l){return M(l)===r},C.isStrictMode=function(l){return M(l)===o},C.isSuspense=function(l){return M(l)===E},C.isValidElementType=function(l){return typeof l=="string"||typeof l=="function"||l===a||l===v||l===r||l===o||l===E||l===N||typeof l=="object"&&l!==null&&(l.$$typeof===k||l.$$typeof===I||l.$$typeof===u||l.$$typeof===c||l.$$typeof===p||l.$$typeof===$||l.$$typeof===L||l.$$typeof===z||l.$$typeof===x)},C.typeOf=M,C}var P={};/** @license React v16.13.1
12
+ */var Bt;function sr(){if(Bt)return Y;Bt=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,v=e?Symbol.for("react.suspense_list"):60120,u=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,A=e?Symbol.for("react.fundamental"):60117,R=e?Symbol.for("react.responder"):60118,M=e?Symbol.for("react.scope"):60119;function g(y){if(typeof y=="object"&&y!==null){var I=y.$$typeof;switch(I){case t:switch(y=y.type,y){case l:case c:case n:case i:case o:case d:return y;default:switch(y=y&&y.$$typeof,y){case a:case f:case b:case u:case s:return y;default:return I}}case r:return I}}}function S(y){return g(y)===c}return Y.AsyncMode=l,Y.ConcurrentMode=c,Y.ContextConsumer=a,Y.ContextProvider=s,Y.Element=t,Y.ForwardRef=f,Y.Fragment=n,Y.Lazy=b,Y.Memo=u,Y.Portal=r,Y.Profiler=i,Y.StrictMode=o,Y.Suspense=d,Y.isAsyncMode=function(y){return S(y)||g(y)===l},Y.isConcurrentMode=S,Y.isContextConsumer=function(y){return g(y)===a},Y.isContextProvider=function(y){return g(y)===s},Y.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===t},Y.isForwardRef=function(y){return g(y)===f},Y.isFragment=function(y){return g(y)===n},Y.isLazy=function(y){return g(y)===b},Y.isMemo=function(y){return g(y)===u},Y.isPortal=function(y){return g(y)===r},Y.isProfiler=function(y){return g(y)===i},Y.isStrictMode=function(y){return g(y)===o},Y.isSuspense=function(y){return g(y)===d},Y.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===n||y===c||y===i||y===o||y===d||y===v||typeof y=="object"&&y!==null&&(y.$$typeof===b||y.$$typeof===u||y.$$typeof===s||y.$$typeof===a||y.$$typeof===f||y.$$typeof===A||y.$$typeof===R||y.$$typeof===M||y.$$typeof===h)},Y.typeOf=g,Y}var U={};/** @license React v16.13.1
13
13
  * react-is.development.js
14
14
  *
15
15
  * Copyright (c) Facebook, Inc. and its affiliates.
16
16
  *
17
17
  * This source code is licensed under the MIT license found in the
18
18
  * LICENSE file in the root directory of this source tree.
19
- */var ge;function De(){return ge||(ge=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,r=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,h=e?Symbol.for("react.async_mode"):60111,v=e?Symbol.for("react.concurrent_mode"):60111,p=e?Symbol.for("react.forward_ref"):60112,E=e?Symbol.for("react.suspense"):60113,N=e?Symbol.for("react.suspense_list"):60120,I=e?Symbol.for("react.memo"):60115,k=e?Symbol.for("react.lazy"):60116,x=e?Symbol.for("react.block"):60121,$=e?Symbol.for("react.fundamental"):60117,L=e?Symbol.for("react.responder"):60118,z=e?Symbol.for("react.scope"):60119;function M(f){return typeof f=="string"||typeof f=="function"||f===a||f===v||f===r||f===o||f===E||f===N||typeof f=="object"&&f!==null&&(f.$$typeof===k||f.$$typeof===I||f.$$typeof===u||f.$$typeof===c||f.$$typeof===p||f.$$typeof===$||f.$$typeof===L||f.$$typeof===z||f.$$typeof===x)}function j(f){if(typeof f=="object"&&f!==null){var U=f.$$typeof;switch(U){case n:var Q=f.type;switch(Q){case h:case v:case a:case r:case o:case E:return Q;default:var Me=Q&&Q.$$typeof;switch(Me){case c:case p:case k:case I:case u:return Me;default:return U}}case i:return U}}}var l=h,D=v,le=c,fe=u,ue=n,de=p,X=a,pe=k,ye=I,H=i,he=r,W=o,V=E,G=!1;function ve(f){return G||(G=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),s(f)||j(f)===h}function s(f){return j(f)===v}function d(f){return j(f)===c}function g(f){return j(f)===u}function m(f){return typeof f=="object"&&f!==null&&f.$$typeof===n}function y(f){return j(f)===p}function T(f){return j(f)===a}function b(f){return j(f)===k}function _(f){return j(f)===I}function w(f){return j(f)===i}function O(f){return j(f)===r}function S(f){return j(f)===o}function Y(f){return j(f)===E}P.AsyncMode=l,P.ConcurrentMode=D,P.ContextConsumer=le,P.ContextProvider=fe,P.Element=ue,P.ForwardRef=de,P.Fragment=X,P.Lazy=pe,P.Memo=ye,P.Portal=H,P.Profiler=he,P.StrictMode=W,P.Suspense=V,P.isAsyncMode=ve,P.isConcurrentMode=s,P.isContextConsumer=d,P.isContextProvider=g,P.isElement=m,P.isForwardRef=y,P.isFragment=T,P.isLazy=b,P.isMemo=_,P.isPortal=w,P.isProfiler=O,P.isStrictMode=S,P.isSuspense=Y,P.isValidElementType=M,P.typeOf=j}()),P}var Ee;function Te(){return Ee||(Ee=1,process.env.NODE_ENV==="production"?R.exports=Le():R.exports=De()),R.exports}/*
19
+ */var qt;function ar(){return qt||(qt=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,v=e?Symbol.for("react.suspense_list"):60120,u=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,A=e?Symbol.for("react.fundamental"):60117,R=e?Symbol.for("react.responder"):60118,M=e?Symbol.for("react.scope"):60119;function g(_){return typeof _=="string"||typeof _=="function"||_===n||_===c||_===i||_===o||_===d||_===v||typeof _=="object"&&_!==null&&(_.$$typeof===b||_.$$typeof===u||_.$$typeof===s||_.$$typeof===a||_.$$typeof===f||_.$$typeof===A||_.$$typeof===R||_.$$typeof===M||_.$$typeof===h)}function S(_){if(typeof _=="object"&&_!==null){var oe=_.$$typeof;switch(oe){case t:var he=_.type;switch(he){case l:case c:case n:case i:case o:case d:return he;default:var le=he&&he.$$typeof;switch(le){case a:case f:case b:case u:case s:return le;default:return oe}}case r:return oe}}}var y=l,I=c,H=a,K=s,ee=t,Z=f,G=n,B=b,ne=u,z=r,L=i,j=o,q=d,k=!1;function T(_){return k||(k=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),m(_)||S(_)===l}function m(_){return S(_)===c}function E(_){return S(_)===a}function F(_){return S(_)===s}function W(_){return typeof _=="object"&&_!==null&&_.$$typeof===t}function C(_){return S(_)===f}function P(_){return S(_)===n}function w(_){return S(_)===b}function O(_){return S(_)===u}function N(_){return S(_)===r}function $(_){return S(_)===i}function D(_){return S(_)===o}function X(_){return S(_)===d}U.AsyncMode=y,U.ConcurrentMode=I,U.ContextConsumer=H,U.ContextProvider=K,U.Element=ee,U.ForwardRef=Z,U.Fragment=G,U.Lazy=B,U.Memo=ne,U.Portal=z,U.Profiler=L,U.StrictMode=j,U.Suspense=q,U.isAsyncMode=T,U.isConcurrentMode=m,U.isContextConsumer=E,U.isContextProvider=F,U.isElement=W,U.isForwardRef=C,U.isFragment=P,U.isLazy=w,U.isMemo=O,U.isPortal=N,U.isProfiler=$,U.isStrictMode=D,U.isSuspense=X,U.isValidElementType=g,U.typeOf=S})()),U}var Vt;function Yt(){return Vt||(Vt=1,process.env.NODE_ENV==="production"?De.exports=sr():De.exports=ar()),De.exports}/*
20
20
  object-assign
21
21
  (c) Sindre Sorhus
22
22
  @license MIT
23
- */var re,we;function Ye(){if(we)return re;we=1;var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(r){if(r==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}function o(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de",Object.getOwnPropertyNames(r)[0]==="5")return!1;for(var u={},c=0;c<10;c++)u["_"+String.fromCharCode(c)]=c;var h=Object.getOwnPropertyNames(u).map(function(p){return u[p]});if(h.join("")!=="0123456789")return!1;var v={};return"abcdefghijklmnopqrst".split("").forEach(function(p){v[p]=p}),Object.keys(Object.assign({},v)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return re=o()?Object.assign:function(r,u){for(var c,h=a(r),v,p=1;p<arguments.length;p++){c=Object(arguments[p]);for(var E in c)n.call(c,E)&&(h[E]=c[E]);if(e){v=e(c);for(var N=0;N<v.length;N++)i.call(c,v[N])&&(h[v[N]]=c[v[N]])}}return h},re}var te,Se;function ne(){if(Se)return te;Se=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return te=e,te}var ae,Ce;function Pe(){return Ce||(Ce=1,ae=Function.call.bind(Object.prototype.hasOwnProperty)),ae}var oe,Oe;function Fe(){if(Oe)return oe;Oe=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var n=ne(),i={},a=Pe();e=function(r){var u="Warning: "+r;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}}}function o(r,u,c,h,v){if(process.env.NODE_ENV!=="production"){for(var p in r)if(a(r,p)){var E;try{if(typeof r[p]!="function"){var N=Error((h||"React class")+": "+c+" type `"+p+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[p]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw N.name="Invariant Violation",N}E=r[p](u,p,h,c,null,n)}catch(k){E=k}if(E&&!(E instanceof Error)&&e((h||"React class")+": type specification of "+c+" `"+p+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof E+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),E instanceof Error&&!(E.message in i)){i[E.message]=!0;var I=v?v():"";e("Failed "+c+" type: "+E.message+(I??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(i={})},oe=o,oe}var se,Ne;function We(){if(Ne)return se;Ne=1;var e=Te(),n=Ye(),i=ne(),a=Pe(),o=Fe(),r=function(){};process.env.NODE_ENV!=="production"&&(r=function(c){var h="Warning: "+c;typeof console<"u"&&console.error(h);try{throw new Error(h)}catch{}});function u(){return null}return se=function(c,h){var v=typeof Symbol=="function"&&Symbol.iterator,p="@@iterator";function E(s){var d=s&&(v&&s[v]||s[p]);if(typeof d=="function")return d}var N="<<anonymous>>",I={array:L("array"),bigint:L("bigint"),bool:L("boolean"),func:L("function"),number:L("number"),object:L("object"),string:L("string"),symbol:L("symbol"),any:z(),arrayOf:M,element:j(),elementType:l(),instanceOf:D,node:de(),objectOf:fe,oneOf:le,oneOfType:ue,shape:pe,exact:ye};function k(s,d){return s===d?s!==0||1/s===1/d:s!==s&&d!==d}function x(s,d){this.message=s,this.data=d&&typeof d=="object"?d:{},this.stack=""}x.prototype=Error.prototype;function $(s){if(process.env.NODE_ENV!=="production")var d={},g=0;function m(T,b,_,w,O,S,Y){if(w=w||N,S=S||_,Y!==i){if(h){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var U=w+":"+_;!d[U]&&g<3&&(r("You are manually calling a React.PropTypes validation function for the `"+S+"` prop on `"+w+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),d[U]=!0,g++)}}return b[_]==null?T?b[_]===null?new x("The "+O+" `"+S+"` is marked as required "+("in `"+w+"`, but its value is `null`.")):new x("The "+O+" `"+S+"` is marked as required in "+("`"+w+"`, but its value is `undefined`.")):null:s(b,_,w,O,S)}var y=m.bind(null,!1);return y.isRequired=m.bind(null,!0),y}function L(s){function d(g,m,y,T,b,_){var w=g[m],O=W(w);if(O!==s){var S=V(w);return new x("Invalid "+T+" `"+b+"` of type "+("`"+S+"` supplied to `"+y+"`, expected ")+("`"+s+"`."),{expectedType:s})}return null}return $(d)}function z(){return $(u)}function M(s){function d(g,m,y,T,b){if(typeof s!="function")return new x("Property `"+b+"` of component `"+y+"` has invalid PropType notation inside arrayOf.");var _=g[m];if(!Array.isArray(_)){var w=W(_);return new x("Invalid "+T+" `"+b+"` of type "+("`"+w+"` supplied to `"+y+"`, expected an array."))}for(var O=0;O<_.length;O++){var S=s(_,O,y,T,b+"["+O+"]",i);if(S instanceof Error)return S}return null}return $(d)}function j(){function s(d,g,m,y,T){var b=d[g];if(!c(b)){var _=W(b);return new x("Invalid "+y+" `"+T+"` of type "+("`"+_+"` supplied to `"+m+"`, expected a single ReactElement."))}return null}return $(s)}function l(){function s(d,g,m,y,T){var b=d[g];if(!e.isValidElementType(b)){var _=W(b);return new x("Invalid "+y+" `"+T+"` of type "+("`"+_+"` supplied to `"+m+"`, expected a single ReactElement type."))}return null}return $(s)}function D(s){function d(g,m,y,T,b){if(!(g[m]instanceof s)){var _=s.name||N,w=ve(g[m]);return new x("Invalid "+T+" `"+b+"` of type "+("`"+w+"` supplied to `"+y+"`, expected ")+("instance of `"+_+"`."))}return null}return $(d)}function le(s){if(!Array.isArray(s))return process.env.NODE_ENV!=="production"&&(arguments.length>1?r("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):r("Invalid argument supplied to oneOf, expected an array.")),u;function d(g,m,y,T,b){for(var _=g[m],w=0;w<s.length;w++)if(k(_,s[w]))return null;var O=JSON.stringify(s,function(Y,f){var U=V(f);return U==="symbol"?String(f):f});return new x("Invalid "+T+" `"+b+"` of value `"+String(_)+"` "+("supplied to `"+y+"`, expected one of "+O+"."))}return $(d)}function fe(s){function d(g,m,y,T,b){if(typeof s!="function")return new x("Property `"+b+"` of component `"+y+"` has invalid PropType notation inside objectOf.");var _=g[m],w=W(_);if(w!=="object")return new x("Invalid "+T+" `"+b+"` of type "+("`"+w+"` supplied to `"+y+"`, expected an object."));for(var O in _)if(a(_,O)){var S=s(_,O,y,T,b+"."+O,i);if(S instanceof Error)return S}return null}return $(d)}function ue(s){if(!Array.isArray(s))return process.env.NODE_ENV!=="production"&&r("Invalid argument supplied to oneOfType, expected an instance of array."),u;for(var d=0;d<s.length;d++){var g=s[d];if(typeof g!="function")return r("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+G(g)+" at index "+d+"."),u}function m(y,T,b,_,w){for(var O=[],S=0;S<s.length;S++){var Y=s[S],f=Y(y,T,b,_,w,i);if(f==null)return null;f.data&&a(f.data,"expectedType")&&O.push(f.data.expectedType)}var U=O.length>0?", expected one of type ["+O.join(", ")+"]":"";return new x("Invalid "+_+" `"+w+"` supplied to "+("`"+b+"`"+U+"."))}return $(m)}function de(){function s(d,g,m,y,T){return H(d[g])?null:new x("Invalid "+y+" `"+T+"` supplied to "+("`"+m+"`, expected a ReactNode."))}return $(s)}function X(s,d,g,m,y){return new x((s||"React class")+": "+d+" type `"+g+"."+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+y+"`.")}function pe(s){function d(g,m,y,T,b){var _=g[m],w=W(_);if(w!=="object")return new x("Invalid "+T+" `"+b+"` of type `"+w+"` "+("supplied to `"+y+"`, expected `object`."));for(var O in s){var S=s[O];if(typeof S!="function")return X(y,T,b,O,V(S));var Y=S(_,O,y,T,b+"."+O,i);if(Y)return Y}return null}return $(d)}function ye(s){function d(g,m,y,T,b){var _=g[m],w=W(_);if(w!=="object")return new x("Invalid "+T+" `"+b+"` of type `"+w+"` "+("supplied to `"+y+"`, expected `object`."));var O=n({},g[m],s);for(var S in O){var Y=s[S];if(a(s,S)&&typeof Y!="function")return X(y,T,b,S,V(Y));if(!Y)return new x("Invalid "+T+" `"+b+"` key `"+S+"` supplied to `"+y+"`.\nBad object: "+JSON.stringify(g[m],null," ")+`
24
- Valid keys: `+JSON.stringify(Object.keys(s),null," "));var f=Y(_,S,y,T,b+"."+S,i);if(f)return f}return null}return $(d)}function H(s){switch(typeof s){case"number":case"string":case"undefined":return!0;case"boolean":return!s;case"object":if(Array.isArray(s))return s.every(H);if(s===null||c(s))return!0;var d=E(s);if(d){var g=d.call(s),m;if(d!==s.entries){for(;!(m=g.next()).done;)if(!H(m.value))return!1}else for(;!(m=g.next()).done;){var y=m.value;if(y&&!H(y[1]))return!1}}else return!1;return!0;default:return!1}}function he(s,d){return s==="symbol"?!0:d?d["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&d instanceof Symbol:!1}function W(s){var d=typeof s;return Array.isArray(s)?"array":s instanceof RegExp?"object":he(d,s)?"symbol":d}function V(s){if(typeof s>"u"||s===null)return""+s;var d=W(s);if(d==="object"){if(s instanceof Date)return"date";if(s instanceof RegExp)return"regexp"}return d}function G(s){var d=V(s);switch(d){case"array":case"object":return"an "+d;case"boolean":case"date":case"regexp":return"a "+d;default:return d}}function ve(s){return!s.constructor||!s.constructor.name?N:s.constructor.name}return I.checkPropTypes=o,I.resetWarningCache=o.resetWarningCache,I.PropTypes=I,I},se}var ie,xe;function Ue(){if(xe)return ie;xe=1;var e=ne();function n(){}function i(){}return i.resetWarningCache=n,ie=function(){function a(u,c,h,v,p,E){if(E!==e){var N=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw N.name="Invariant Violation",N}}a.isRequired=a;function o(){return a}var r={array:a,bigint:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:o,element:a,elementType:a,instanceOf:o,node:a,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:i,resetWarningCache:n};return r.PropTypes=r,r},ie}var Ae;function ze(){if(Ae)return J.exports;if(Ae=1,process.env.NODE_ENV!=="production"){var e=Te(),n=!0;J.exports=We()(e.isElement,n)}else J.exports=Ue()();return J.exports}var Be=ze();const Z=be(Be),Ie=({content:e,title:n,className:i,id:a="accordion"})=>{const o=q("rpf-accordion",i);return t.jsxs("details",{className:o,id:`${a}`,children:[t.jsxs("summary",{className:"rpf-accordion__title",role:"button",children:[n,t.jsx("span",{className:"rpf-accordion__icon"})]}),t.jsx("p",{className:"rpf-accordion__text",children:e})]})};Ie.propTypes={content:Z.string.isRequired,title:Z.string.isRequired,id:Z.string,className:Z.string};const B=({text:e,href:n,title:i,className:a,type:o="primary",variant:r="",size:u="default",icon:c="",iconOnly:h=!1,iconPosition:v="left",fullWidth:p=!1,disabled:E=!1,onClick:N=()=>{},"aria-label":I="",linkComponent:k})=>{const x=c&&h,$=q("rpf-button",{[`rpf-button--${o}`]:o,"rpf-button--danger":r==="danger","rpf-button--sm":u==="small","rpf-button--icon-only":x,"rpf-button--full-width":p,disabled:E},a);let L="rpf-button__icon";F.isValidElement(c)?(L+=" icon",console.warn("DEPRECATED: icons as React elements will not be supported in future releases")):L+=" material-symbols-sharp";const z=(l,D)=>!D||v!==l?null:typeof D=="string"?t.jsx("span",{className:L,children:D}):D,M=()=>e&&!x&&t.jsx("span",{className:"text",children:e}),j=t.jsxs(t.Fragment,{children:[z("left",c),M(),z("right",c)]});if(n){const l=k||"a",D=k?{to:n}:{href:n,role:"button"};return t.jsx(l,{className:$,...D,onClick:N,"aria-label":I,children:j})}return t.jsx("button",{className:$,title:i,onClick:N,disabled:E,"aria-label":I,children:j})},Ve=({title:e,text:n,titleChildren:i,children:a,type:o,actions:r,onClose:u})=>t.jsxs("div",{className:`rpf-alert rpf-alert--${o}`,children:[t.jsxs("div",{className:"rpf-alert__header",children:[t.jsx("span",{className:"rpf-alert__icon material-symbols-sharp"}),i?t.jsx("div",{className:"rpf-alert__title",children:i}):e?t.jsx("p",{className:"rpf-alert__title",children:e}):null,!!u&&t.jsx("div",{className:"rpf-alert__close",children:t.jsx(B,{type:"tertiary",icon:"close",size:"small",iconOnly:!0,onClick:u})})]}),(n||a||r)&&t.jsxs("div",{className:"rpf-alert__body",children:[n?t.jsx("p",{children:n}):a?t.jsx("div",{children:a}):null,r&&r.length>0&&t.jsx("div",{className:"rpf-alert__actions",children:r.map((c,h)=>t.jsx(B,{text:c.label,size:"small",type:"tertiary",href:c.href,onClick:c.onClick},h))})]})]}),He=({label:e,id:n,name:i,error:a="",...o})=>{const{className:r,...u}=o;return t.jsxs(t.Fragment,{children:[t.jsxs("label",{className:q("rpf-input-checkbox",{"rpf-input-checkbox--error":a,className:r}),children:[t.jsx("input",{id:n,name:i,type:"checkbox",...u}),e]}),a&&t.jsxs("div",{className:"rpf-error-message",children:[t.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),a]})]})},Je=({disabled:e=!1,errorText:n="",fullWidth:i=!1,legendText:a,legendHintText:o="",children:r})=>t.jsxs("fieldset",{className:q("rpf-fieldset",{"rpf-fieldset--disabled":e,"rpf-fieldset--full-width":i,"rpf-fieldset--error":n}),disabled:e,children:[t.jsxs("legend",{className:"rpf-label",children:[a,o.length>0?t.jsx("small",{className:"rpf-label__hint",children:o}):null]}),t.jsx("div",{className:"rpf-fieldset__inputs",children:r}),n.length>0?t.jsxs("div",{className:"rpf-error-message",children:[t.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),n]}):null]}),K=({id:e,label:n,children:i,disabled:a=!1,error:o="",hint:r=""})=>t.jsxs("div",{className:"rpf-input-field",children:[(n||r)&&t.jsxs("label",{htmlFor:e,className:q("rpf-label",{"rpf-label--disabled":a}),children:[n,t.jsx("small",{className:"rpf-label__hint",children:r})]}),i,o&&t.jsxs("div",{className:"rpf-error-message",children:[t.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),o]})]}),Re=({label:e,inputFieldId:n,disabled:i=!1,hint:a=""})=>t.jsx("div",{className:"rpf-label",children:t.jsxs("label",{htmlFor:n,className:q("rpf-label",{"rpf-label--disabled":i}),children:[e,a&&t.jsx("div",{className:"rpf-label__hint",children:a})]})}),Ze=({label:e,id:n,name:i,fullWidth:a=!1,...o})=>t.jsxs("label",{className:q("rpf-input-radio",{"rpf-input-radio--disabled":o.disabled,"rpf-input--full-width":a}),children:[t.jsx("input",{type:"radio",id:n,name:i,...o}),e]}),Ke=({label:e,inputFieldId:n,disabled:i=!1,error:a="",hint:o="",placeholder:r="",defaultValue:u="",onClick:c=()=>{},onChange:h=()=>{}})=>t.jsx("search",{children:t.jsxs("form",{className:"rpf-input-field",onSubmit:c,children:[t.jsxs("label",{htmlFor:n,className:q("rpf-label",{"rpf-label--disabled":i}),children:[e,o&&t.jsx("small",{className:"rpf-label__hint",children:o})]}),t.jsxs("div",{className:"rpf-input-search-container",children:[t.jsx("input",{className:q("rpf-input rpf-input-search",{"rpf-input--disabled":i,"rpf-input--error":a}),disabled:i,id:n,name:"search",type:"search","aria-label":"Search",defaultValue:u,placeholder:r,onChange:h}),t.jsx("button",{type:"submit",className:q("rpf-button rpf-button-search",{"rpf-button--disabled":i,"rpf-button--error":a}),disabled:i,onClick:c,children:t.jsx("span",{className:"rpf-button__icon material-symbols-sharp",children:"search"})})]}),a&&t.jsxs("div",{className:"rpf-error-message",children:[t.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"info"}),a]})]})}),Xe=({id:e,label:n,name:i,options:a,disabled:o=!1,error:r="",fullWidth:u=!1,hint:c="",onChange:h=()=>{},placeholder:v="",value:p="",...E})=>t.jsx(K,{id:e,disabled:o,error:r,hint:c,label:n,children:t.jsxs("select",{className:q("rpf-input rpf-input-select",{"rpf-input--error":r,"rpf-input--full-width":u}),disabled:o,id:e,name:i,onChange:h,value:p,...E,children:[!p&&!!v&&t.jsx("option",{value:"",disabled:!0,children:v}),a.map(N=>t.jsx("option",{value:N.key,children:N.value},N.key))]})}),Ge=({id:e,label:n,name:i,value:a,disabled:o=!1,readOnly:r=!1,error:u="",fullWidth:c=!1,hint:h="",onChange:v=()=>{}})=>t.jsx(K,{id:e,disabled:o,error:u,hint:h,label:n,children:t.jsx("textarea",{className:q("rpf-input rpf-input-textarea",{"rpf-input--error":u,"rpf-input--full-width":c,"rpf-input--disabled":o}),disabled:o,readOnly:r,id:e,name:i,onChange:v,value:a})}),Qe=({id:e,name:n,label:i,error:a="",fullWidth:o=!1,hint:r="",type:u="text",...c})=>t.jsx(K,{id:e,disabled:c.disabled,error:a,hint:r,label:i,children:t.jsx("input",{className:q("rpf-input rpf-input-text",{"rpf-input--error":a,"rpf-input--full-width":o}),id:e,name:n,type:u,...c})});function er(e,n){const i=F.useRef(null),a=F.useRef(null);return F.useEffect(()=>{const o=i.current;o&&(e&&!o.open?o.showModal():!e&&o.open&&o.close())},[e]),F.useEffect(()=>{const o=i.current;if(!o)return;const r=()=>n(!1),u=c=>{c.preventDefault(),n(!1)};return o.addEventListener("close",r),o.addEventListener("cancel",u),()=>{o.removeEventListener("close",r),o.removeEventListener("cancel",u)}},[n]),F.useEffect(()=>{const o=i.current,r=a.current;if(!o||!r)return;const u=c=>{e&&!r.contains(c.target)&&n(!1)};return o.addEventListener("mousedown",u),()=>o.removeEventListener("mousedown",u)},[e,n]),{dialogRef:i,contentRef:a}}const rr=({isOpen:e,setIsOpen:n,heading:i,children:a,primaryButtonLink:o,primaryButtonText:r,onClickPrimaryButton:u,secondaryButtonText:c,secondaryButtonLink:h,onClickSecondaryButton:v,tertiaryButtonText:p,tertiaryButtonLink:E,onClickTertiaryButton:N,showCloseButton:I=!0})=>{const{dialogRef:k,contentRef:x}=er(e,n);return t.jsx("dialog",{ref:k,className:"rpf-modal","aria-labelledby":"modal-heading","aria-describedby":"modal-description",children:t.jsxs("div",{ref:x,className:"rpf-modal__wrapper",children:[t.jsxs("div",{className:"rpf-modal__header",children:[t.jsx("h2",{className:"rpf-modal__title",id:"modal-heading",children:i}),I&&t.jsx(B,{icon:"close",iconOnly:!0,"aria-label":"Close modal",type:"tertiary",onClick:()=>n(!1)})]}),t.jsx("div",{id:"modal-description",className:"rpf-modal__content",tabIndex:0,children:a}),t.jsxs("div",{className:"rpf-modal__buttons",children:[t.jsx(B,{text:r,href:o,onClick:u,type:"primary"}),c&&t.jsx(B,{text:c,href:h,onClick:v,type:"secondary"}),p&&t.jsx(B,{text:p,href:E,onClick:N,type:"tertiary"})]})]})})},tr=({text:e="",percent:n,complete:i=!1,className:a})=>t.jsx("div",{className:q("rpf-progress-bar",{"rpf-progress-bar--complete":i,className:a}),children:t.jsxs("label",{className:"rpf-progress-bar__label",children:[t.jsx("span",{children:e}),t.jsx("progress",{className:"rpf-progress-bar__bar",value:n,max:"100",children:`${n}%`})]})}),nr=({children:e})=>t.jsx("td",{className:"rpf-table-cell rpf-table-cell--body",children:t.jsx("div",{className:"rpf-table-cell__content",children:e})});/**
23
+ */var at,Ut;function cr(){if(Ut)return at;Ut=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(f){return s[f]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(f){c[f]=f}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return at=o()?Object.assign:function(i,s){for(var a,l=n(i),c,f=1;f<arguments.length;f++){a=Object(arguments[f]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var v=0;v<c.length;v++)r.call(a,c[v])&&(l[c[v]]=a[c[v]])}}return l},at}var ct,Ht;function lt(){if(Ht)return ct;Ht=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ct=e,ct}var ut,Kt;function zt(){return Kt||(Kt=1,ut=Function.call.bind(Object.prototype.hasOwnProperty)),ut}var ft,Xt;function lr(){if(Xt)return ft;Xt=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=lt(),r={},n=zt();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,l,c){if(process.env.NODE_ENV!=="production"){for(var f in i)if(n(i,f)){var d;try{if(typeof i[f]!="function"){var v=Error((l||"React class")+": "+a+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw v.name="Invariant Violation",v}d=i[f](s,f,l,a,null,t)}catch(b){d=b}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in r)){r[d.message]=!0;var u=c?c():"";e("Failed "+a+" type: "+d.message+(u??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},ft=o,ft}var dt,Gt;function ur(){if(Gt)return dt;Gt=1;var e=Yt(),t=cr(),r=lt(),n=zt(),o=lr(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return dt=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function d(m){var E=m&&(c&&m[c]||m[f]);if(typeof E=="function")return E}var v="<<anonymous>>",u={array:R("array"),bigint:R("bigint"),bool:R("boolean"),func:R("function"),number:R("number"),object:R("object"),string:R("string"),symbol:R("symbol"),any:M(),arrayOf:g,element:S(),elementType:y(),instanceOf:I,node:Z(),objectOf:K,oneOf:H,oneOfType:ee,shape:B,exact:ne};function b(m,E){return m===E?m!==0||1/m===1/E:m!==m&&E!==E}function h(m,E){this.message=m,this.data=E&&typeof E=="object"?E:{},this.stack=""}h.prototype=Error.prototype;function A(m){if(process.env.NODE_ENV!=="production")var E={},F=0;function W(P,w,O,N,$,D,X){if(N=N||v,D=D||O,X!==r){if(l){var _=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw _.name="Invariant Violation",_}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var oe=N+":"+O;!E[oe]&&F<3&&(i("You are manually calling a React.PropTypes validation function for the `"+D+"` prop on `"+N+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),E[oe]=!0,F++)}}return w[O]==null?P?w[O]===null?new h("The "+$+" `"+D+"` is marked as required "+("in `"+N+"`, but its value is `null`.")):new h("The "+$+" `"+D+"` is marked as required in "+("`"+N+"`, but its value is `undefined`.")):null:m(w,O,N,$,D)}var C=W.bind(null,!1);return C.isRequired=W.bind(null,!0),C}function R(m){function E(F,W,C,P,w,O){var N=F[W],$=j(N);if($!==m){var D=q(N);return new h("Invalid "+P+" `"+w+"` of type "+("`"+D+"` supplied to `"+C+"`, expected ")+("`"+m+"`."),{expectedType:m})}return null}return A(E)}function M(){return A(s)}function g(m){function E(F,W,C,P,w){if(typeof m!="function")return new h("Property `"+w+"` of component `"+C+"` has invalid PropType notation inside arrayOf.");var O=F[W];if(!Array.isArray(O)){var N=j(O);return new h("Invalid "+P+" `"+w+"` of type "+("`"+N+"` supplied to `"+C+"`, expected an array."))}for(var $=0;$<O.length;$++){var D=m(O,$,C,P,w+"["+$+"]",r);if(D instanceof Error)return D}return null}return A(E)}function S(){function m(E,F,W,C,P){var w=E[F];if(!a(w)){var O=j(w);return new h("Invalid "+C+" `"+P+"` of type "+("`"+O+"` supplied to `"+W+"`, expected a single ReactElement."))}return null}return A(m)}function y(){function m(E,F,W,C,P){var w=E[F];if(!e.isValidElementType(w)){var O=j(w);return new h("Invalid "+C+" `"+P+"` of type "+("`"+O+"` supplied to `"+W+"`, expected a single ReactElement type."))}return null}return A(m)}function I(m){function E(F,W,C,P,w){if(!(F[W]instanceof m)){var O=m.name||v,N=T(F[W]);return new h("Invalid "+P+" `"+w+"` of type "+("`"+N+"` supplied to `"+C+"`, expected ")+("instance of `"+O+"`."))}return null}return A(E)}function H(m){if(!Array.isArray(m))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function E(F,W,C,P,w){for(var O=F[W],N=0;N<m.length;N++)if(b(O,m[N]))return null;var $=JSON.stringify(m,function(X,_){var oe=q(_);return oe==="symbol"?String(_):_});return new h("Invalid "+P+" `"+w+"` of value `"+String(O)+"` "+("supplied to `"+C+"`, expected one of "+$+"."))}return A(E)}function K(m){function E(F,W,C,P,w){if(typeof m!="function")return new h("Property `"+w+"` of component `"+C+"` has invalid PropType notation inside objectOf.");var O=F[W],N=j(O);if(N!=="object")return new h("Invalid "+P+" `"+w+"` of type "+("`"+N+"` supplied to `"+C+"`, expected an object."));for(var $ in O)if(n(O,$)){var D=m(O,$,C,P,w+"."+$,r);if(D instanceof Error)return D}return null}return A(E)}function ee(m){if(!Array.isArray(m))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var E=0;E<m.length;E++){var F=m[E];if(typeof F!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+k(F)+" at index "+E+"."),s}function W(C,P,w,O,N){for(var $=[],D=0;D<m.length;D++){var X=m[D],_=X(C,P,w,O,N,r);if(_==null)return null;_.data&&n(_.data,"expectedType")&&$.push(_.data.expectedType)}var oe=$.length>0?", expected one of type ["+$.join(", ")+"]":"";return new h("Invalid "+O+" `"+N+"` supplied to "+("`"+w+"`"+oe+"."))}return A(W)}function Z(){function m(E,F,W,C,P){return z(E[F])?null:new h("Invalid "+C+" `"+P+"` supplied to "+("`"+W+"`, expected a ReactNode."))}return A(m)}function G(m,E,F,W,C){return new h((m||"React class")+": "+E+" type `"+F+"."+W+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+C+"`.")}function B(m){function E(F,W,C,P,w){var O=F[W],N=j(O);if(N!=="object")return new h("Invalid "+P+" `"+w+"` of type `"+N+"` "+("supplied to `"+C+"`, expected `object`."));for(var $ in m){var D=m[$];if(typeof D!="function")return G(C,P,w,$,q(D));var X=D(O,$,C,P,w+"."+$,r);if(X)return X}return null}return A(E)}function ne(m){function E(F,W,C,P,w){var O=F[W],N=j(O);if(N!=="object")return new h("Invalid "+P+" `"+w+"` of type `"+N+"` "+("supplied to `"+C+"`, expected `object`."));var $=t({},F[W],m);for(var D in $){var X=m[D];if(n(m,D)&&typeof X!="function")return G(C,P,w,D,q(X));if(!X)return new h("Invalid "+P+" `"+w+"` key `"+D+"` supplied to `"+C+"`.\nBad object: "+JSON.stringify(F[W],null," ")+`
24
+ Valid keys: `+JSON.stringify(Object.keys(m),null," "));var _=X(O,D,C,P,w+"."+D,r);if(_)return _}return null}return A(E)}function z(m){switch(typeof m){case"number":case"string":case"undefined":return!0;case"boolean":return!m;case"object":if(Array.isArray(m))return m.every(z);if(m===null||a(m))return!0;var E=d(m);if(E){var F=E.call(m),W;if(E!==m.entries){for(;!(W=F.next()).done;)if(!z(W.value))return!1}else for(;!(W=F.next()).done;){var C=W.value;if(C&&!z(C[1]))return!1}}else return!1;return!0;default:return!1}}function L(m,E){return m==="symbol"?!0:E?E["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&E instanceof Symbol:!1}function j(m){var E=typeof m;return Array.isArray(m)?"array":m instanceof RegExp?"object":L(E,m)?"symbol":E}function q(m){if(typeof m>"u"||m===null)return""+m;var E=j(m);if(E==="object"){if(m instanceof Date)return"date";if(m instanceof RegExp)return"regexp"}return E}function k(m){var E=q(m);switch(E){case"array":case"object":return"an "+E;case"boolean":case"date":case"regexp":return"a "+E;default:return E}}function T(m){return!m.constructor||!m.constructor.name?v:m.constructor.name}return u.checkPropTypes=o,u.resetWarningCache=o.resetWarningCache,u.PropTypes=u,u},dt}var pt,Zt;function fr(){if(Zt)return pt;Zt=1;var e=lt();function t(){}function r(){}return r.resetWarningCache=t,pt=function(){function n(s,a,l,c,f,d){if(d!==e){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}}n.isRequired=n;function o(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i},pt}var Jt;function dr(){if(Jt)return ke.exports;if(Jt=1,process.env.NODE_ENV!=="production"){var e=Yt(),t=!0;ke.exports=ur()(e.isElement,t)}else ke.exports=fr()();return ke.exports}var pr=dr();const Le=jt(pr),Qt=({content:e,title:t,className:r,id:n="accordion"})=>{const o=J("rpf-accordion",r),i=typeof e=="string"?"p":"div";return p.jsxs("details",{className:o,id:`${n}`,children:[p.jsxs("summary",{className:"rpf-accordion__title",role:"button",children:[t,p.jsx("span",{className:"rpf-accordion__icon"})]}),p.jsx(i,{className:"rpf-accordion__text",children:e})]})};Qt.propTypes={content:Le.node.isRequired,title:Le.string.isRequired,id:Le.string,className:Le.string};const me=({text:e,href:t,title:r,className:n,type:o="primary",variant:i="",size:s="default",icon:a="",iconOnly:l=!1,iconPosition:c="left",fullWidth:f=!1,disabled:d=!1,onClick:v=()=>{},"aria-label":u="",linkComponent:b})=>{const h=a&&l,A=J("rpf-button",{[`rpf-button--${o}`]:o,"rpf-button--danger":i==="danger","rpf-button--sm":s==="small","rpf-button--icon-only":h,"rpf-button--full-width":f,disabled:d},n);let R="rpf-button__icon";te.isValidElement(a)?R+=" icon":R+=" material-symbols-sharp";const M=(y,I)=>!I||c!==y?null:typeof I=="string"?p.jsx("span",{className:R,children:I}):I,g=()=>e&&!h&&p.jsx("span",{className:"text",children:e}),S=p.jsxs(p.Fragment,{children:[M("left",a),g(),M("right",a)]});if(t){const y=b||"a",I=b?{to:t}:{href:t,role:"button"};return p.jsx(y,{className:A,...I,onClick:v,"aria-label":u,children:S})}return p.jsx("button",{className:A,title:r,onClick:v,disabled:d,"aria-label":u,children:S})},hr=({title:e,text:t,titleChildren:r,children:n,type:o,actions:i,onClose:s})=>p.jsxs("div",{className:`rpf-alert rpf-alert--${o}`,children:[p.jsxs("div",{className:"rpf-alert__header",children:[p.jsx("span",{className:"rpf-alert__icon material-symbols-sharp"}),r?p.jsx("div",{className:"rpf-alert__title",children:r}):e?p.jsx("p",{className:"rpf-alert__title",children:e}):null,!!s&&p.jsx("div",{className:"rpf-alert__close",children:p.jsx(me,{type:"tertiary",icon:"close",size:"small",iconOnly:!0,onClick:s})})]}),(t||n||i)&&p.jsxs("div",{className:"rpf-alert__body",children:[t?p.jsx("p",{children:t}):n?p.jsx("div",{children:n}):null,i&&i.length>0&&p.jsx("div",{className:"rpf-alert__actions",children:i.map((a,l)=>p.jsx(me,{text:a.label,size:"small",type:"tertiary",href:a.href,onClick:a.onClick},l))})]})]}),mr=({label:e,id:t,name:r,error:n="",...o})=>{const{className:i,...s}=o;return p.jsxs(p.Fragment,{children:[p.jsxs("label",{className:J("rpf-input-checkbox",{"rpf-input-checkbox--error":n,className:i}),children:[p.jsx("input",{id:t,name:r,type:"checkbox",...s}),e]}),n&&p.jsxs("div",{className:"rpf-error-message",children:[p.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),n]})]})},vr=({disabled:e=!1,errorText:t="",fullWidth:r=!1,legendText:n,legendHintText:o="",children:i})=>p.jsxs("fieldset",{className:J("rpf-fieldset",{"rpf-fieldset--disabled":e,"rpf-fieldset--full-width":r,"rpf-fieldset--error":t}),disabled:e,children:[p.jsxs("legend",{className:"rpf-label",children:[n,o.length>0?p.jsx("small",{className:"rpf-label__hint",children:o}):null]}),p.jsx("div",{className:"rpf-fieldset__inputs",children:i}),t.length>0?p.jsxs("div",{className:"rpf-error-message",children:[p.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),t]}):null]}),Fe=({id:e,label:t,children:r,disabled:n=!1,error:o="",hint:i=""})=>p.jsxs("div",{className:"rpf-input-field",children:[(t||i)&&p.jsxs("label",{htmlFor:e,className:J("rpf-label",{"rpf-label--disabled":n}),children:[t,p.jsx("small",{className:"rpf-label__hint",children:i})]}),r,o&&p.jsxs("div",{className:"rpf-error-message",children:[p.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),o]})]}),br=({label:e,inputFieldId:t,disabled:r=!1,hint:n=""})=>p.jsx("div",{className:"rpf-label",children:p.jsxs("label",{htmlFor:t,className:J("rpf-label",{"rpf-label--disabled":r}),children:[e,n&&p.jsx("div",{className:"rpf-label__hint",children:n})]})}),yr=({label:e,id:t,name:r,fullWidth:n=!1,...o})=>p.jsxs("label",{className:J("rpf-input-radio",{"rpf-input-radio--disabled":o.disabled,"rpf-input--full-width":n}),children:[p.jsx("input",{type:"radio",id:t,name:r,...o}),e]}),gr=({label:e,inputFieldId:t,disabled:r=!1,error:n="",hint:o="",placeholder:i="",defaultValue:s="",onClick:a=()=>{},onChange:l=()=>{}})=>p.jsx("search",{children:p.jsxs("form",{className:"rpf-input-field",onSubmit:a,children:[p.jsxs("label",{htmlFor:t,className:J("rpf-label",{"rpf-label--disabled":r}),children:[e,o&&p.jsx("small",{className:"rpf-label__hint",children:o})]}),p.jsxs("div",{className:"rpf-input-search-container",children:[p.jsx("input",{className:J("rpf-input rpf-input-search",{"rpf-input--disabled":r,"rpf-input--error":n}),disabled:r,id:t,name:"search",type:"search","aria-label":"Search",defaultValue:s,placeholder:i,onChange:l}),p.jsx("button",{type:"submit",className:J("rpf-button rpf-button-search",{"rpf-button--disabled":r,"rpf-button--error":n}),disabled:r,onClick:a,children:p.jsx("span",{className:"rpf-button__icon material-symbols-sharp",children:"search"})})]}),n&&p.jsxs("div",{className:"rpf-error-message",children:[p.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"info"}),n]})]})}),wr=({id:e,label:t,name:r,options:n,disabled:o=!1,error:i="",fullWidth:s=!1,hint:a="",onChange:l=()=>{},placeholder:c="",value:f="",...d})=>p.jsx(Fe,{id:e,disabled:o,error:i,hint:a,label:t,children:p.jsxs("select",{className:J("rpf-input rpf-input-select",{"rpf-input--error":i,"rpf-input--full-width":s}),disabled:o,id:e,name:r,onChange:l,value:f,...d,children:[!f&&!!c&&p.jsx("option",{value:"",disabled:!0,children:c}),n.map(v=>p.jsx("option",{value:v.key,children:v.value},v.key))]})}),en=te.forwardRef(({label:e,id:t,name:r,error:n="",fullWidth:o=!1,reverse:i=!1,hint:s="",alignStart:a=!1,hideLabel:l=!1,icon:c=!1,className:f,disabled:d=!1,"aria-describedby":v,...u},b)=>{const h=n?`${t}-error`:void 0,A=[v,h].filter(Boolean).join(" ")||void 0;return p.jsxs("div",{className:"rpf-input-field",children:[p.jsxs("label",{className:J("rpf-switch",{"rpf-switch--full-width":o,"rpf-switch--reverse":i,"rpf-switch--align-start":a,"rpf-switch--icon":c,"rpf-switch--disabled":d,"rpf-switch--error":n},f),children:[p.jsxs("span",{className:"rpf-switch__track",children:[p.jsx("input",{ref:b,id:t,name:r,type:"checkbox",role:"switch",className:"rpf-switch__checkbox",disabled:d,"aria-invalid":n?!0:void 0,"aria-describedby":A,...u}),p.jsx("span",{className:"rpf-switch__handle",children:c?p.jsx("span",{className:"rpf-switch__icon","aria-hidden":"true"}):null})]}),p.jsxs("span",{className:J("rpf-label","rpf-switch__label",{"rpf-label--disabled":d,"rpf-visually-hidden":l}),children:[p.jsx("span",{children:e}),s?p.jsx("span",{className:"rpf-label__hint",children:s}):null]})]}),n?p.jsxs("div",{id:h,className:"rpf-error-message",children:[p.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),n]}):null]})});en.displayName="Switch";const Er=({id:e,label:t,name:r,value:n,disabled:o=!1,readOnly:i=!1,error:s="",fullWidth:a=!1,hint:l="",onChange:c=()=>{}})=>p.jsx(Fe,{id:e,disabled:o,error:s,hint:l,label:t,children:p.jsx("textarea",{className:J("rpf-input rpf-input-textarea",{"rpf-input--error":s,"rpf-input--full-width":a,"rpf-input--disabled":o}),disabled:o,readOnly:i,id:e,name:r,onChange:c,value:n})}),xr=({id:e,name:t,label:r,error:n="",fullWidth:o=!1,hint:i="",type:s="text",...a})=>p.jsx(Fe,{id:e,disabled:a.disabled,error:n,hint:i,label:r,children:p.jsx("input",{className:J("rpf-input rpf-input-text",{"rpf-input--error":n,"rpf-input--full-width":o}),id:e,name:t,type:s,...a})});function Tr(e,t){const r=te.useRef(null),n=te.useRef(null);return te.useEffect(()=>{const o=r.current;o&&(e&&!o.open?o.showModal():!e&&o.open&&o.close())},[e]),te.useEffect(()=>{const o=r.current;if(!o)return;const i=()=>t(!1),s=a=>{a.preventDefault(),t(!1)};return o.addEventListener("close",i),o.addEventListener("cancel",s),()=>{o.removeEventListener("close",i),o.removeEventListener("cancel",s)}},[t]),te.useEffect(()=>{const o=r.current,i=n.current;if(!o||!i)return;const s=a=>{e&&!i.contains(a.target)&&t(!1)};return o.addEventListener("mousedown",s),()=>o.removeEventListener("mousedown",s)},[e,t]),{dialogRef:r,contentRef:n}}const Sr=({isOpen:e,setIsOpen:t,heading:r,children:n,primaryButtonLink:o,primaryButtonText:i,onClickPrimaryButton:s,secondaryButtonText:a,secondaryButtonLink:l,onClickSecondaryButton:c,tertiaryButtonText:f,tertiaryButtonLink:d,onClickTertiaryButton:v,showCloseButton:u=!0})=>{const{dialogRef:b,contentRef:h}=Tr(e,t);return p.jsx("dialog",{ref:b,className:"rpf-modal","aria-labelledby":"modal-heading","aria-describedby":"modal-description",children:p.jsxs("div",{ref:h,className:"rpf-modal__wrapper",children:[p.jsxs("div",{className:"rpf-modal__header",children:[p.jsx("h2",{className:"rpf-modal__title",id:"modal-heading",children:r}),u&&p.jsx(me,{icon:"close",iconOnly:!0,"aria-label":"Close modal",type:"tertiary",onClick:()=>t(!1)})]}),p.jsx("div",{id:"modal-description",className:"rpf-modal__content",tabIndex:0,children:n}),p.jsxs("div",{className:"rpf-modal__buttons",children:[p.jsx(me,{text:i,href:o,onClick:s,type:"primary"}),a&&p.jsx(me,{text:a,href:l,onClick:c,type:"secondary"}),f&&p.jsx(me,{text:f,href:d,onClick:v,type:"tertiary"})]})]})})},tn=({className:e,children:t})=>{const r=J("rpf-menu",e);return p.jsx("ul",{className:r,children:t})};function $e(){return typeof window<"u"}function ve(e){return nn(e)?(e.nodeName||"").toLowerCase():"#document"}function ie(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ue(e){var t;return(t=(nn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function nn(e){return $e()?e instanceof Node||e instanceof ie(e).Node:!1}function Q(e){return $e()?e instanceof Element||e instanceof ie(e).Element:!1}function re(e){return $e()?e instanceof HTMLElement||e instanceof ie(e).HTMLElement:!1}function ht(e){return!$e()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ie(e).ShadowRoot}function Ie(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=ae(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&o!=="inline"&&o!=="contents"}function Cr(e){return/^(table|td|th)$/.test(ve(e))}function je(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const _r=/transform|translate|scale|rotate|perspective|filter/,Or=/paint|layout|strict|content/,Ee=e=>!!e&&e!=="none";let mt;function vt(e){const t=Q(e)?ae(e):e;return Ee(t.transform)||Ee(t.translate)||Ee(t.scale)||Ee(t.rotate)||Ee(t.perspective)||!We()&&(Ee(t.backdropFilter)||Ee(t.filter))||_r.test(t.willChange||"")||Or.test(t.contain||"")}function Ar(e){let t=de(e);for(;re(t)&&!be(t);){if(vt(t))return t;if(je(t))return null;t=de(t)}return null}function We(){return mt==null&&(mt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),mt}function be(e){return/^(html|body|#document)$/.test(ve(e))}function ae(e){return ie(e).getComputedStyle(e)}function Be(e){return Q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function de(e){if(ve(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ht(e)&&e.host||ue(e);return ht(t)?t.host:t}function rn(e){const t=de(e);return be(t)?e.ownerDocument?e.ownerDocument.body:e.body:re(t)&&Ie(t)?t:rn(t)}function ye(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=rn(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),s=ie(o);if(i){const a=bt(s);return t.concat(s,s.visualViewport||[],Ie(o)?o:[],a&&r?ye(a):[])}else return t.concat(o,ye(o,[],r))}function bt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xe(e){let t=e.activeElement;for(;((r=t)==null||(r=r.shadowRoot)==null?void 0:r.activeElement)!=null;){var r;t=t.shadowRoot.activeElement}return t}function se(e,t){if(!e||!t)return!1;const r=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&ht(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Rr(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function on(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}function Pr(e){return e.mozInputSource===0&&e.isTrusted?!0:yt()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Nr(e){return Mr()?!1:!yt()&&e.width===0&&e.height===0||yt()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Ir(){return/apple/i.test(navigator.vendor)}function yt(){const e=/android/i;return e.test(Rr())||e.test(on())}function Mr(){return on().includes("jsdom/")}function sn(e,t){return["mouse","pen"].includes(e)}function kr(e){return"nativeEvent"in e}function Dr(e){return e.matches("html,body")}function ce(e){return(e==null?void 0:e.ownerDocument)||document}function gt(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const r=e;return r.target!=null&&t.contains(r.target)}function Te(e){return"composedPath"in e?e.composedPath()[0]:e.target}const Lr="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function an(e){return re(e)&&e.matches(Lr)}function wt(e){e.preventDefault(),e.stopPropagation()}function Fr(e){return e?e.getAttribute("role")==="combobox"&&an(e):!1}const qe=Math.min,Se=Math.max,Ve=Math.round,Ye=Math.floor,fe=e=>({x:e,y:e}),$r={left:"right",right:"left",bottom:"top",top:"bottom"};function cn(e,t,r){return Se(e,qe(t,r))}function Ue(e,t){return typeof e=="function"?e(t):e}function Ce(e){return e.split("-")[0]}function He(e){return e.split("-")[1]}function ln(e){return e==="x"?"y":"x"}function un(e){return e==="y"?"height":"width"}function ge(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function fn(e){return ln(ge(e))}function jr(e,t,r){r===void 0&&(r=!1);const n=He(e),o=fn(e),i=un(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Ke(s)),[s,Ke(s)]}function Wr(e){const t=Ke(e);return[Et(e),t,Et(t)]}function Et(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const dn=["left","right"],pn=["right","left"],Br=["top","bottom"],qr=["bottom","top"];function Vr(e,t,r){switch(e){case"top":case"bottom":return r?t?pn:dn:t?dn:pn;case"left":case"right":return t?Br:qr;default:return[]}}function Yr(e,t,r,n){const o=He(e);let i=Vr(Ce(e),r==="start",n);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Et)))),i}function Ke(e){const t=Ce(e);return $r[t]+e.slice(t.length)}function Ur(e){return{top:0,right:0,bottom:0,left:0,...e}}function Hr(e){return typeof e!="number"?Ur(e):{top:e,right:e,bottom:e,left:e}}function ze(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}/*!
25
+ * tabbable 6.4.0
26
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
27
+ */var Kr=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Xe=Kr.join(","),hn=typeof Element>"u",Ae=hn?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ge=!hn&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Ze=function(t,r){var n;r===void 0&&(r=!0);var o=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),i=o===""||o==="true",s=i||r&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Ze(t.parentNode));return s},zr=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},Xr=function(t,r,n){if(Ze(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Xe));return r&&Ae.call(t,Xe)&&o.unshift(t),o=o.filter(n),o},xt=function(t,r,n){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!Ze(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=xt(l,!0,n);n.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var f=Ae.call(s,Xe);f&&n.filter(s)&&(r||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(s),v=!Ze(d,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(s));if(d&&v){var u=xt(d===!0?s.children:d.children,!0,n);n.flatten?o.push.apply(o,u):o.push({scopeParent:s,candidates:u})}else i.unshift.apply(i,s.children)}}return o},mn=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},vn=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||zr(t))&&!mn(t)?0:t.tabIndex},Gr=function(t,r){var n=vn(t);return n<0&&r&&!mn(t)?0:n},Zr=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},bn=function(t){return t.tagName==="INPUT"},Jr=function(t){return bn(t)&&t.type==="hidden"},Qr=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},eo=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},to=function(t){if(!t.name)return!0;var r=t.form||Ge(t),n=function(a){return r.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=n(window.CSS.escape(t.name));else try{o=n(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=eo(o,t.form);return!i||i===t},no=function(t){return bn(t)&&t.type==="radio"},ro=function(t){return no(t)&&!to(t)},oo=function(t){var r,n=t&&Ge(t),o=(r=n)===null||r===void 0?void 0:r.host,i=!1;if(n&&n!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,f,d;n=Ge(o),o=(c=n)===null||c===void 0?void 0:c.host,i=!!((f=o)!==null&&f!==void 0&&(d=f.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},yn=function(t){var r=t.getBoundingClientRect(),n=r.width,o=r.height;return n===0&&o===0},io=function(t,r){var n=r.displayCheck,o=r.getShadowRoot;if(n==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var s=Ae.call(t,"details>summary:first-of-type"),a=s?t.parentElement:t;if(Ae.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var c=t.parentElement,f=Ge(t);if(c&&!c.shadowRoot&&o(c)===!0)return yn(t);t.assignedSlot?t=t.assignedSlot:!c&&f!==t.ownerDocument?t=f.host:t=c}t=l}if(oo(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return yn(t);return!1},so=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var o=r.children.item(n);if(o.tagName==="LEGEND")return Ae.call(r,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}r=r.parentElement}return!1},ao=function(t,r){return!(r.disabled||Jr(r)||io(r,t)||Qr(r)||so(r))},Tt=function(t,r){return!(ro(r)||vn(r)<0||!ao(t,r))},co=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},gn=function(t){var r=[],n=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=Gr(a,s),c=s?gn(o.candidates):a;l===0?s?r.push.apply(r,c):r.push(a):n.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),n.sort(Zr).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(r)},St=function(t,r){r=r||{};var n;return r.getShadowRoot?n=xt([t],r.includeContainer,{filter:Tt.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:co}):n=Xr(t,r.includeContainer,Tt.bind(null,r)),gn(n)},lo=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return Ae.call(t,Xe)===!1?!1:Tt(r,t)};function wn(e,t,r){let{reference:n,floating:o}=e;const i=ge(t),s=fn(t),a=un(s),l=Ce(t),c=i==="y",f=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,v=n[a]/2-o[a]/2;let u;switch(l){case"top":u={x:f,y:n.y-o.height};break;case"bottom":u={x:f,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:d};break;case"left":u={x:n.x-o.width,y:d};break;default:u={x:n.x,y:n.y}}switch(He(t)){case"start":u[s]-=v*(r&&c?-1:1);break;case"end":u[s]+=v*(r&&c?-1:1);break}return u}async function uo(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:v=!1,padding:u=0}=Ue(t,e),b=Hr(u),A=a[v?d==="floating"?"reference":"floating":d],R=ze(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(A)))==null||r?A:A.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:f,strategy:l})),M=d==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,g=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(g))?await(i.getScale==null?void 0:i.getScale(g))||{x:1,y:1}:{x:1,y:1},y=ze(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:M,offsetParent:g,strategy:l}):M);return{top:(R.top-y.top+b.top)/S.y,bottom:(y.bottom-R.bottom+b.bottom)/S.y,left:(R.left-y.left+b.left)/S.x,right:(y.right-R.right+b.right)/S.x}}const fo=50,po=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:s}=r,a=s.detectOverflow?s:{...s,detectOverflow:uo},l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=wn(c,n,l),v=n,u=0;const b={};for(let h=0;h<i.length;h++){const A=i[h];if(!A)continue;const{name:R,fn:M}=A,{x:g,y:S,data:y,reset:I}=await M({x:f,y:d,initialPlacement:n,placement:v,strategy:o,middlewareData:b,rects:c,platform:a,elements:{reference:e,floating:t}});f=g??f,d=S??d,b[R]={...b[R],...y},I&&u<fo&&(u++,typeof I=="object"&&(I.placement&&(v=I.placement),I.rects&&(c=I.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):I.rects),{x:f,y:d}=wn(c,v,l)),h=-1)}return{x:f,y:d,placement:v,strategy:o,middlewareData:b}},ho=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:v,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:h=!0,...A}=Ue(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const R=Ce(o),M=ge(a),g=Ce(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),y=v||(g||!h?[Ke(a)]:Wr(a)),I=b!=="none";!v&&I&&y.push(...Yr(a,h,b,S));const H=[a,...y],K=await l.detectOverflow(t,A),ee=[];let Z=((n=i.flip)==null?void 0:n.overflows)||[];if(f&&ee.push(K[R]),d){const z=jr(o,s,S);ee.push(K[z[0]],K[z[1]])}if(Z=[...Z,{placement:o,overflows:ee}],!ee.every(z=>z<=0)){var G,B;const z=(((G=i.flip)==null?void 0:G.index)||0)+1,L=H[z];if(L&&(!(d==="alignment"?M!==ge(L):!1)||Z.every(k=>ge(k.placement)===M?k.overflows[0]>0:!0)))return{data:{index:z,overflows:Z},reset:{placement:L}};let j=(B=Z.filter(q=>q.overflows[0]<=0).sort((q,k)=>q.overflows[1]-k.overflows[1])[0])==null?void 0:B.placement;if(!j)switch(u){case"bestFit":{var ne;const q=(ne=Z.filter(k=>{if(I){const T=ge(k.placement);return T===M||T==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(T=>T>0).reduce((T,m)=>T+m,0)]).sort((k,T)=>k[1]-T[1])[0])==null?void 0:ne[0];q&&(j=q);break}case"initialPlacement":j=a;break}if(o!==j)return{reset:{placement:j}}}return{}}}},mo=new Set(["left","top"]);async function vo(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=Ce(r),a=He(r),l=ge(r)==="y",c=mo.has(s)?-1:1,f=i&&l?-1:1,d=Ue(t,e);let{mainAxis:v,crossAxis:u,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof b=="number"&&(u=a==="end"?b*-1:b),l?{x:u*f,y:v*c}:{x:v*c,y:u*f}}const bo=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await vo(t,e);return s===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},yo=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:R=>{let{x:M,y:g}=R;return{x:M,y:g}}},...c}=Ue(e,t),f={x:r,y:n},d=await i.detectOverflow(t,c),v=ge(Ce(o)),u=ln(v);let b=f[u],h=f[v];if(s){const R=u==="y"?"top":"left",M=u==="y"?"bottom":"right",g=b+d[R],S=b-d[M];b=cn(g,b,S)}if(a){const R=v==="y"?"top":"left",M=v==="y"?"bottom":"right",g=h+d[R],S=h-d[M];h=cn(g,h,S)}const A=l.fn({...t,[u]:b,[v]:h});return{...A,data:{x:A.x-r,y:A.y-n,enabled:{[u]:s,[v]:a}}}}}};function En(e){const t=ae(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=re(e),i=o?e.offsetWidth:r,s=o?e.offsetHeight:n,a=Ve(r)!==i||Ve(n)!==s;return a&&(r=i,n=s),{width:r,height:n,$:a}}function Ct(e){return Q(e)?e:e.contextElement}function Re(e){const t=Ct(e);if(!re(t))return fe(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=En(t);let s=(i?Ve(r.width):r.width)/n,a=(i?Ve(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const go=fe(0);function xn(e){const t=ie(e);return!We()||!t.visualViewport?go:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wo(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ie(e)?!1:t}function _e(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=Ct(e);let s=fe(1);t&&(n?Q(n)&&(s=Re(n)):s=Re(e));const a=wo(i,r,n)?xn(i):fe(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,f=o.width/s.x,d=o.height/s.y;if(i){const v=ie(i),u=n&&Q(n)?ie(n):n;let b=v,h=bt(b);for(;h&&n&&u!==b;){const A=Re(h),R=h.getBoundingClientRect(),M=ae(h),g=R.left+(h.clientLeft+parseFloat(M.paddingLeft))*A.x,S=R.top+(h.clientTop+parseFloat(M.paddingTop))*A.y;l*=A.x,c*=A.y,f*=A.x,d*=A.y,l+=g,c+=S,b=ie(h),h=bt(b)}}return ze({width:f,height:d,x:l,y:c})}function Je(e,t){const r=Be(e).scrollLeft;return t?t.left+r:_e(ue(e)).left+r}function Tn(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-Je(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function Eo(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i=o==="fixed",s=ue(n),a=t?je(t.floating):!1;if(n===s||a&&i)return r;let l={scrollLeft:0,scrollTop:0},c=fe(1);const f=fe(0),d=re(n);if((d||!d&&!i)&&((ve(n)!=="body"||Ie(s))&&(l=Be(n)),d)){const u=_e(n);c=Re(n),f.x=u.x+n.clientLeft,f.y=u.y+n.clientTop}const v=s&&!d&&!i?Tn(s,l):fe(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+f.x+v.x,y:r.y*c.y-l.scrollTop*c.y+f.y+v.y}}function xo(e){return Array.from(e.getClientRects())}function To(e){const t=ue(e),r=Be(e),n=e.ownerDocument.body,o=Se(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Se(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+Je(e);const a=-r.scrollTop;return ae(n).direction==="rtl"&&(s+=Se(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Sn=25;function So(e,t){const r=ie(e),n=ue(e),o=r.visualViewport;let i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const f=We();(!f||f&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=Je(n);if(c<=0){const f=n.ownerDocument,d=f.body,v=getComputedStyle(d),u=f.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,b=Math.abs(n.clientWidth-d.clientWidth-u);b<=Sn&&(i-=b)}else c<=Sn&&(i+=c);return{width:i,height:s,x:a,y:l}}function Co(e,t){const r=_e(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=re(e)?Re(e):fe(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=n*i.y;return{width:s,height:a,x:l,y:c}}function Cn(e,t,r){let n;if(t==="viewport")n=So(e,r);else if(t==="document")n=To(ue(e));else if(Q(t))n=Co(t,r);else{const o=xn(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ze(n)}function _n(e,t){const r=de(e);return r===t||!Q(r)||be(r)?!1:ae(r).position==="fixed"||_n(r,t)}function _o(e,t){const r=t.get(e);if(r)return r;let n=ye(e,[],!1).filter(a=>Q(a)&&ve(a)!=="body"),o=null;const i=ae(e).position==="fixed";let s=i?de(e):e;for(;Q(s)&&!be(s);){const a=ae(s),l=vt(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Ie(s)&&!l&&_n(e,s))?n=n.filter(f=>f!==s):o=a,s=de(s)}return t.set(e,n),n}function Oo(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?je(t)?[]:_o(t,this._c):[].concat(r),n],a=Cn(t,s[0],o);let l=a.top,c=a.right,f=a.bottom,d=a.left;for(let v=1;v<s.length;v++){const u=Cn(t,s[v],o);l=Se(u.top,l),c=qe(u.right,c),f=qe(u.bottom,f),d=Se(u.left,d)}return{width:c-d,height:f-l,x:d,y:l}}function Ao(e){const{width:t,height:r}=En(e);return{width:t,height:r}}function Ro(e,t,r){const n=re(t),o=ue(t),i=r==="fixed",s=_e(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=fe(0);function c(){l.x=Je(o)}if(n||!n&&!i)if((ve(t)!=="body"||Ie(o))&&(a=Be(t)),n){const u=_e(t,!0,i,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else o&&c();i&&!n&&o&&c();const f=o&&!n&&!i?Tn(o,a):fe(0),d=s.left+a.scrollLeft-l.x-f.x,v=s.top+a.scrollTop-l.y-f.y;return{x:d,y:v,width:s.width,height:s.height}}function _t(e){return ae(e).position==="static"}function On(e,t){if(!re(e)||ae(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ue(e)===r&&(r=r.ownerDocument.body),r}function An(e,t){const r=ie(e);if(je(e))return r;if(!re(e)){let o=de(e);for(;o&&!be(o);){if(Q(o)&&!_t(o))return o;o=de(o)}return r}let n=On(e,t);for(;n&&Cr(n)&&_t(n);)n=On(n,t);return n&&be(n)&&_t(n)&&!vt(n)?r:n||Ar(e)||r}const Po=async function(e){const t=this.getOffsetParent||An,r=this.getDimensions,n=await r(e.floating);return{reference:Ro(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function No(e){return ae(e).direction==="rtl"}const Io={convertOffsetParentRelativeRectToViewportRelativeRect:Eo,getDocumentElement:ue,getClippingRect:Oo,getOffsetParent:An,getElementRects:Po,getClientRects:xo,getDimensions:Ao,getScale:Re,isElement:Q,isRTL:No};function Rn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Mo(e,t){let r=null,n;const o=ue(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:f,top:d,width:v,height:u}=c;if(a||t(),!v||!u)return;const b=Ye(d),h=Ye(o.clientWidth-(f+v)),A=Ye(o.clientHeight-(d+u)),R=Ye(f),g={rootMargin:-b+"px "+-h+"px "+-A+"px "+-R+"px",threshold:Se(0,qe(1,l))||1};let S=!0;function y(I){const H=I[0].intersectionRatio;if(H!==l){if(!S)return s();H?s(!1,H):n=setTimeout(()=>{s(!1,1e-7)},1e3)}H===1&&!Rn(c,e.getBoundingClientRect())&&s(),S=!1}try{r=new IntersectionObserver(y,{...g,root:o.ownerDocument})}catch{r=new IntersectionObserver(y,g)}r.observe(e)}return s(!0),i}function ko(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Ct(e),f=o||i?[...c?ye(c):[],...t?ye(t):[]]:[];f.forEach(R=>{o&&R.addEventListener("scroll",r,{passive:!0}),i&&R.addEventListener("resize",r)});const d=c&&a?Mo(c,r):null;let v=-1,u=null;s&&(u=new ResizeObserver(R=>{let[M]=R;M&&M.target===c&&u&&t&&(u.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var g;(g=u)==null||g.observe(t)})),r()}),c&&!l&&u.observe(c),t&&u.observe(t));let b,h=l?_e(e):null;l&&A();function A(){const R=_e(e);h&&!Rn(h,R)&&r(),h=R,b=requestAnimationFrame(A)}return r(),()=>{var R;f.forEach(M=>{o&&M.removeEventListener("scroll",r),i&&M.removeEventListener("resize",r)}),d==null||d(),(R=u)==null||R.disconnect(),u=null,l&&cancelAnimationFrame(b)}}const Do=bo,Lo=yo,Fo=ho,$o=(e,t,r)=>{const n=new Map,o={platform:Io,...r},i={...o.platform,_c:n};return po(e,t,{...o,platform:i})};var jo=typeof document<"u",Wo=function(){},Qe=jo?te.useLayoutEffect:Wo;function et(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!et(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!et(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Pn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Nn(e,t){const r=Pn(e);return Math.round(t*r)/r}function Ot(e){const t=x.useRef(e);return Qe(()=>{t.current=e}),t}function Bo(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[f,d]=x.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[v,u]=x.useState(n);et(v,n)||u(n);const[b,h]=x.useState(null),[A,R]=x.useState(null),M=x.useCallback(k=>{k!==I.current&&(I.current=k,h(k))},[]),g=x.useCallback(k=>{k!==H.current&&(H.current=k,R(k))},[]),S=i||b,y=s||A,I=x.useRef(null),H=x.useRef(null),K=x.useRef(f),ee=l!=null,Z=Ot(l),G=Ot(o),B=Ot(c),ne=x.useCallback(()=>{if(!I.current||!H.current)return;const k={placement:t,strategy:r,middleware:v};G.current&&(k.platform=G.current),$o(I.current,H.current,k).then(T=>{const m={...T,isPositioned:B.current!==!1};z.current&&!et(K.current,m)&&(K.current=m,rr.flushSync(()=>{d(m)}))})},[v,t,r,G,B]);Qe(()=>{c===!1&&K.current.isPositioned&&(K.current.isPositioned=!1,d(k=>({...k,isPositioned:!1})))},[c]);const z=x.useRef(!1);Qe(()=>(z.current=!0,()=>{z.current=!1}),[]),Qe(()=>{if(S&&(I.current=S),y&&(H.current=y),S&&y){if(Z.current)return Z.current(S,y,ne);ne()}},[S,y,ne,Z,ee]);const L=x.useMemo(()=>({reference:I,floating:H,setReference:M,setFloating:g}),[M,g]),j=x.useMemo(()=>({reference:S,floating:y}),[S,y]),q=x.useMemo(()=>{const k={position:r,left:0,top:0};if(!j.floating)return k;const T=Nn(j.floating,f.x),m=Nn(j.floating,f.y);return a?{...k,transform:"translate("+T+"px, "+m+"px)",...Pn(j.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:T,top:m}},[r,a,j.floating,f.x,f.y]);return x.useMemo(()=>({...f,update:ne,refs:L,elements:j,floatingStyles:q}),[f,ne,L,j,q])}const qo=(e,t)=>{const r=Do(e);return{name:r.name,fn:r.fn,options:[e,t]}},Vo=(e,t)=>{const r=Lo(e);return{name:r.name,fn:r.fn,options:[e,t]}},Yo=(e,t)=>{const r=Fo(e);return{name:r.name,fn:r.fn,options:[e,t]}},In={...x},Uo=In.useInsertionEffect||(e=>e());function we(e){const t=x.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return Uo(()=>{t.current=e}),x.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}var pe=typeof document<"u"?te.useLayoutEffect:te.useEffect;function tt(){return tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tt.apply(this,arguments)}let Mn=!1,Ho=0;const kn=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Ho++;function Ko(){const[e,t]=x.useState(()=>Mn?kn():void 0);return pe(()=>{e==null&&t(kn())},[]),x.useEffect(()=>{Mn=!0},[]),e}const Dn=In.useId||Ko;let At;process.env.NODE_ENV!=="production"&&(At=new Set);function zo(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];const o="Floating UI: "+r.join(" ");if(!((e=At)!=null&&e.has(o))){var i;(i=At)==null||i.add(o),console.error(o)}}function Xo(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(o=>o!==r))||[])}}}const Go=x.createContext(null),Zo=x.createContext(null),Ln=()=>{var e;return((e=x.useContext(Go))==null?void 0:e.id)||null},Rt=()=>x.useContext(Zo);function nt(e){return"data-floating-ui-"+e}function Pt(e){const t=te.useRef(e);return pe(()=>{t.current=e}),t}let Fn=0;function Pe(e,t){t===void 0&&(t={});const{preventScroll:r=!1,cancelPrevious:n=!0,sync:o=!1}=t;n&&cancelAnimationFrame(Fn);const i=()=>e==null?void 0:e.focus({preventScroll:r});o?i():Fn=requestAnimationFrame(i)}function Jo(e,t){var r;let n=[],o=(r=e.find(i=>i.id===t))==null?void 0:r.parentId;for(;o;){const i=e.find(s=>s.id===o);o=i==null?void 0:i.parentId,i&&(n=n.concat(i))}return n}function Me(e,t){let r=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),n=r;for(;n.length;)n=e.filter(o=>{var i;return(i=n)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})}),r=r.concat(n);return r}let Ne=new WeakMap,rt=new WeakSet,ot={},Nt=0;const Qo=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,$n=e=>e&&(e.host||$n(e.parentNode)),ei=(e,t)=>t.map(r=>{if(e.contains(r))return r;const n=$n(r);return e.contains(n)?n:null}).filter(r=>r!=null);function ti(e,t,r,n){const o="data-floating-ui-inert",i=n?"inert":r?"aria-hidden":null,s=ei(t,e),a=new Set,l=new Set(s),c=[];ot[o]||(ot[o]=new WeakMap);const f=ot[o];s.forEach(d),v(t),a.clear();function d(u){!u||a.has(u)||(a.add(u),u.parentNode&&d(u.parentNode))}function v(u){!u||l.has(u)||[].forEach.call(u.children,b=>{if(ve(b)!=="script")if(a.has(b))v(b);else{const h=i?b.getAttribute(i):null,A=h!==null&&h!=="false",R=(Ne.get(b)||0)+1,M=(f.get(b)||0)+1;Ne.set(b,R),f.set(b,M),c.push(b),R===1&&A&&rt.add(b),M===1&&b.setAttribute(o,""),!A&&i&&b.setAttribute(i,"true")}})}return Nt++,()=>{c.forEach(u=>{const b=(Ne.get(u)||0)-1,h=(f.get(u)||0)-1;Ne.set(u,b),f.set(u,h),b||(!rt.has(u)&&i&&u.removeAttribute(i),rt.delete(u)),h||u.removeAttribute(o)}),Nt--,Nt||(Ne=new WeakMap,Ne=new WeakMap,rt=new WeakSet,ot={})}}function jn(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);const n=ce(e[0]).body;return ti(e.concat(Array.from(n.querySelectorAll("[aria-live]"))),n,t,r)}const it=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Wn(e,t){const r=St(e,it());t==="prev"&&r.reverse();const n=r.indexOf(xe(ce(e)));return r.slice(n+1)[0]}function ni(){return Wn(document.body,"next")}function ri(){return Wn(document.body,"prev")}function Bn(e,t){const r=t||e.currentTarget,n=e.relatedTarget;return!n||!se(r,n)}const It={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let oi;function qn(e){e.key==="Tab"&&(e.target,clearTimeout(oi))}const Vn=x.forwardRef(function(t,r){const[n,o]=x.useState();pe(()=>(Ir()&&o("button"),document.addEventListener("keydown",qn),()=>{document.removeEventListener("keydown",qn)}),[]);const i={ref:r,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[nt("focus-guard")]:"",style:It};return x.createElement("span",tt({},t,i))}),ii=x.createContext(null),si=()=>x.useContext(ii),Mt="data-floating-ui-focusable";function ai(e){return e?e.hasAttribute(Mt)?e:e.querySelector("["+Mt+"]")||e:null}const Yn=20;let Oe=[];function kt(e){Oe=Oe.filter(r=>r.isConnected);let t=e;if(!(!t||ve(t)==="body")){if(!lo(t,it())){const r=St(t,it())[0];r&&(t=r)}Oe.push(t),Oe.length>Yn&&(Oe=Oe.slice(-Yn))}}function Un(){return Oe.slice().reverse().find(e=>e.isConnected)}const ci=x.forwardRef(function(t,r){return x.createElement("button",tt({},t,{type:"button",ref:r,tabIndex:-1,style:It}))});function li(e){const{context:t,children:r,disabled:n=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:f=!1,closeOnFocusOut:d=!0}=e,{open:v,refs:u,nodeId:b,onOpenChange:h,events:A,dataRef:R,floatingId:M,elements:{domReference:g,floating:S}}=t,y=typeof s=="number"&&s<0,I=Fr(g)&&y,H=Qo()?i:!0,K=Pt(o),ee=Pt(s),Z=Pt(a),G=Rt(),B=si(),ne=x.useRef(null),z=x.useRef(null),L=x.useRef(!1),j=x.useRef(!1),q=x.useRef(-1),k=B!=null,T=ai(S),m=we(function(C){return C===void 0&&(C=T),C?St(C,it()):[]}),E=we(C=>{const P=m(C);return K.current.map(w=>g&&w==="reference"?g:T&&w==="floating"?T:P).filter(Boolean).flat()});x.useEffect(()=>{if(n||!c)return;function C(w){if(w.key==="Tab"){se(T,xe(ce(T)))&&m().length===0&&!I&&wt(w);const O=E(),N=Te(w);K.current[0]==="reference"&&N===g&&(wt(w),w.shiftKey?Pe(O[O.length-1]):Pe(O[1])),K.current[1]==="floating"&&N===T&&w.shiftKey&&(wt(w),Pe(O[0]))}}const P=ce(T);return P.addEventListener("keydown",C),()=>{P.removeEventListener("keydown",C)}},[n,g,T,c,K,I,m,E]),x.useEffect(()=>{if(n||!S)return;function C(P){const w=Te(P),N=m().indexOf(w);N!==-1&&(q.current=N)}return S.addEventListener("focusin",C),()=>{S.removeEventListener("focusin",C)}},[n,S,m]),x.useEffect(()=>{if(n||!d)return;function C(){j.current=!0,setTimeout(()=>{j.current=!1})}function P(w){const O=w.relatedTarget;queueMicrotask(()=>{const N=!(se(g,O)||se(S,O)||se(O,S)||se(B==null?void 0:B.portalNode,O)||O!=null&&O.hasAttribute(nt("focus-guard"))||G&&(Me(G.nodesRef.current,b).find($=>{var D,X;return se((D=$.context)==null?void 0:D.elements.floating,O)||se((X=$.context)==null?void 0:X.elements.domReference,O)})||Jo(G.nodesRef.current,b).find($=>{var D,X;return((D=$.context)==null?void 0:D.elements.floating)===O||((X=$.context)==null?void 0:X.elements.domReference)===O})));if(l&&N&&xe(ce(T))===ce(T).body){re(T)&&T.focus();const $=q.current,D=m(),X=D[$]||D[D.length-1]||T;re(X)&&X.focus()}(I||!c)&&O&&N&&!j.current&&O!==Un()&&(L.current=!0,h(!1,w,"focus-out"))})}if(S&&re(g))return g.addEventListener("focusout",P),g.addEventListener("pointerdown",C),S.addEventListener("focusout",P),()=>{g.removeEventListener("focusout",P),g.removeEventListener("pointerdown",C),S.removeEventListener("focusout",P)}},[n,g,S,T,c,b,G,B,h,d,l,m,I]),x.useEffect(()=>{var C;if(n)return;const P=Array.from((B==null||(C=B.portalNode)==null?void 0:C.querySelectorAll("["+nt("portal")+"]"))||[]);if(S){const w=[S,...P,ne.current,z.current,K.current.includes("reference")||I?g:null].filter(N=>N!=null),O=c||I?jn(w,H,!H):jn(w);return()=>{O()}}},[n,g,S,c,K,B,I,H]),pe(()=>{if(n||!re(T))return;const C=ce(T),P=xe(C);queueMicrotask(()=>{const w=E(T),O=ee.current,N=(typeof O=="number"?w[O]:O.current)||T,$=se(T,P);!y&&!$&&v&&Pe(N,{preventScroll:N===T})})},[n,v,T,y,E,ee]),pe(()=>{if(n||!T)return;let C=!1;const P=ce(T),w=xe(P);let N=R.current.openEvent;kt(w);function $(_){let{open:oe,reason:he,event:le,nested:Ft}=_;oe&&(N=le),he==="escape-key"&&u.domReference.current&&kt(u.domReference.current),he==="hover"&&le.type==="mouseleave"&&(L.current=!0),he==="outside-press"&&(Ft?(L.current=!1,C=!0):L.current=!(Pr(le)||Nr(le)))}A.on("openchange",$);const D=P.createElement("span");D.setAttribute("tabindex","-1"),D.setAttribute("aria-hidden","true"),Object.assign(D.style,It),k&&g&&g.insertAdjacentElement("afterend",D);function X(){return typeof Z.current=="boolean"?Un()||D:Z.current.current||D}return()=>{A.off("openchange",$);const _=xe(P),oe=se(S,_)||G&&Me(G.nodesRef.current,b).some(Ft=>{var tr;return se((tr=Ft.context)==null?void 0:tr.elements.floating,_)});(oe||N&&["click","mousedown"].includes(N.type))&&u.domReference.current&&kt(u.domReference.current);const le=X();queueMicrotask(()=>{Z.current&&!L.current&&re(le)&&(!(le!==_&&_!==P.body)||oe)&&le.focus({preventScroll:C}),D.remove()})}},[n,S,T,Z,R,u,A,G,b,k,g]),x.useEffect(()=>{queueMicrotask(()=>{L.current=!1})},[n]),pe(()=>{if(!n&&B)return B.setFocusManagerState({modal:c,closeOnFocusOut:d,open:v,onOpenChange:h,refs:u}),()=>{B.setFocusManagerState(null)}},[n,B,c,v,h,u,d]),pe(()=>{if(n||!T||typeof MutationObserver!="function"||y)return;const C=()=>{const w=T.getAttribute("tabindex"),O=m(),N=xe(ce(S)),$=O.indexOf(N);$!==-1&&(q.current=$),K.current.includes("floating")||N!==u.domReference.current&&O.length===0?w!=="0"&&T.setAttribute("tabindex","0"):w!=="-1"&&T.setAttribute("tabindex","-1")};C();const P=new MutationObserver(C);return P.observe(T,{childList:!0,subtree:!0,attributes:!0}),()=>{P.disconnect()}},[n,S,T,u,K,m,y]);function F(C){return n||!f||!c?null:x.createElement(ci,{ref:C==="start"?ne:z,onClick:P=>h(!1,P.nativeEvent)},typeof f=="string"?f:"Dismiss")}const W=!n&&H&&(c?!I:!0)&&(k||c);return x.createElement(x.Fragment,null,W&&x.createElement(Vn,{"data-type":"inside",ref:B==null?void 0:B.beforeInsideRef,onFocus:C=>{if(c){const w=E();Pe(o[0]==="reference"?w[0]:w[w.length-1])}else if(B!=null&&B.preserveTabOrder&&B.portalNode)if(L.current=!1,Bn(C,B.portalNode)){const w=ni()||g;w==null||w.focus()}else{var P;(P=B.beforeOutsideRef.current)==null||P.focus()}}}),!I&&F("start"),r,F("end"),W&&x.createElement(Vn,{"data-type":"inside",ref:B==null?void 0:B.afterInsideRef,onFocus:C=>{if(c)Pe(E()[0]);else if(B!=null&&B.preserveTabOrder&&B.portalNode)if(d&&(L.current=!0),Bn(C,B.portalNode)){const w=ri()||g;w==null||w.focus()}else{var P;(P=B.afterOutsideRef.current)==null||P.focus()}}}))}function Hn(e){return re(e.target)&&e.target.tagName==="BUTTON"}function Kn(e){return an(e)}function ui(e,t){t===void 0&&(t={});const{open:r,onOpenChange:n,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:f=!0,stickIfOpen:d=!0}=t,v=x.useRef(),u=x.useRef(!1),b=x.useMemo(()=>({onPointerDown(h){v.current=h.pointerType},onMouseDown(h){const A=v.current;h.button===0&&a!=="click"&&(sn(A)&&c||(r&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?n(!1,h.nativeEvent,"click"):(h.preventDefault(),n(!0,h.nativeEvent,"click"))))},onClick(h){const A=v.current;if(a==="mousedown"&&v.current){v.current=void 0;return}sn(A)&&c||(r&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?n(!1,h.nativeEvent,"click"):n(!0,h.nativeEvent,"click"))},onKeyDown(h){v.current=void 0,!(h.defaultPrevented||!f||Hn(h))&&(h.key===" "&&!Kn(i)&&(h.preventDefault(),u.current=!0),h.key==="Enter"&&n(!(r&&l),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!f||Hn(h)||Kn(i)||h.key===" "&&u.current&&(u.current=!1,n(!(r&&l),h.nativeEvent,"click"))}}),[o,i,a,c,f,n,r,d,l]);return x.useMemo(()=>s?{reference:b}:{},[s,b])}const fi={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},di={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},zn=e=>{var t,r;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(r=e==null?void 0:e.outsidePress)!=null?r:!0}};function pi(e,t){t===void 0&&(t={});const{open:r,onOpenChange:n,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:f=!1,referencePressEvent:d="pointerdown",ancestorScroll:v=!1,bubbles:u,capture:b}=t,h=Rt(),A=we(typeof l=="function"?l:()=>!1),R=typeof l=="function"?A:l,M=x.useRef(!1),g=x.useRef(!1),{escapeKey:S,outsidePress:y}=zn(u),{escapeKey:I,outsidePress:H}=zn(b),K=x.useRef(!1),ee=we(L=>{var j;if(!r||!s||!a||L.key!=="Escape"||K.current)return;const q=(j=i.current.floatingContext)==null?void 0:j.nodeId,k=h?Me(h.nodesRef.current,q):[];if(!S&&(L.stopPropagation(),k.length>0)){let T=!0;if(k.forEach(m=>{var E;if((E=m.context)!=null&&E.open&&!m.context.dataRef.current.__escapeKeyBubbles){T=!1;return}}),!T)return}n(!1,kr(L)?L.nativeEvent:L,"escape-key")}),Z=we(L=>{var j;const q=()=>{var k;ee(L),(k=Te(L))==null||k.removeEventListener("keydown",q)};(j=Te(L))==null||j.addEventListener("keydown",q)}),G=we(L=>{var j;const q=M.current;M.current=!1;const k=g.current;if(g.current=!1,c==="click"&&k||q||typeof R=="function"&&!R(L))return;const T=Te(L),m="["+nt("inert")+"]",E=ce(o.floating).querySelectorAll(m);let F=Q(T)?T:null;for(;F&&!be(F);){const w=de(F);if(be(w)||!Q(w))break;F=w}if(E.length&&Q(T)&&!Dr(T)&&!se(T,o.floating)&&Array.from(E).every(w=>!se(F,w)))return;if(re(T)&&z){const w=T.clientWidth>0&&T.scrollWidth>T.clientWidth,O=T.clientHeight>0&&T.scrollHeight>T.clientHeight;let N=O&&L.offsetX>T.clientWidth;if(O&&ae(T).direction==="rtl"&&(N=L.offsetX<=T.offsetWidth-T.clientWidth),N||w&&L.offsetY>T.clientHeight)return}const W=(j=i.current.floatingContext)==null?void 0:j.nodeId,C=h&&Me(h.nodesRef.current,W).some(w=>{var O;return gt(L,(O=w.context)==null?void 0:O.elements.floating)});if(gt(L,o.floating)||gt(L,o.domReference)||C)return;const P=h?Me(h.nodesRef.current,W):[];if(P.length>0){let w=!0;if(P.forEach(O=>{var N;if((N=O.context)!=null&&N.open&&!O.context.dataRef.current.__outsidePressBubbles){w=!1;return}}),!w)return}n(!1,L,"outside-press")}),B=we(L=>{var j;const q=()=>{var k;G(L),(k=Te(L))==null||k.removeEventListener(c,q)};(j=Te(L))==null||j.addEventListener(c,q)});x.useEffect(()=>{if(!r||!s)return;i.current.__escapeKeyBubbles=S,i.current.__outsidePressBubbles=y;let L=-1;function j(E){n(!1,E,"ancestor-scroll")}function q(){window.clearTimeout(L),K.current=!0}function k(){L=window.setTimeout(()=>{K.current=!1},We()?5:0)}const T=ce(o.floating);a&&(T.addEventListener("keydown",I?Z:ee,I),T.addEventListener("compositionstart",q),T.addEventListener("compositionend",k)),R&&T.addEventListener(c,H?B:G,H);let m=[];return v&&(Q(o.domReference)&&(m=ye(o.domReference)),Q(o.floating)&&(m=m.concat(ye(o.floating))),!Q(o.reference)&&o.reference&&o.reference.contextElement&&(m=m.concat(ye(o.reference.contextElement)))),m=m.filter(E=>{var F;return E!==((F=T.defaultView)==null?void 0:F.visualViewport)}),m.forEach(E=>{E.addEventListener("scroll",j,{passive:!0})}),()=>{a&&(T.removeEventListener("keydown",I?Z:ee,I),T.removeEventListener("compositionstart",q),T.removeEventListener("compositionend",k)),R&&T.removeEventListener(c,H?B:G,H),m.forEach(E=>{E.removeEventListener("scroll",j)}),window.clearTimeout(L)}},[i,o,a,R,c,r,n,v,s,S,y,ee,I,Z,G,H,B]),x.useEffect(()=>{M.current=!1},[R,c]);const ne=x.useMemo(()=>({onKeyDown:ee,[fi[d]]:L=>{f&&n(!1,L.nativeEvent,"reference-press")}}),[ee,n,f,d]),z=x.useMemo(()=>({onKeyDown:ee,onMouseDown(){g.current=!0},onMouseUp(){g.current=!0},[di[c]]:()=>{M.current=!0}}),[ee,c]);return x.useMemo(()=>s?{reference:ne,floating:z}:{},[s,ne,z])}function hi(e){const{open:t=!1,onOpenChange:r,elements:n}=e,o=Dn(),i=x.useRef({}),[s]=x.useState(()=>Xo()),a=Ln()!=null;if(process.env.NODE_ENV!=="production"){const u=n.reference;u&&!Q(u)&&zo("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=x.useState(n.reference),f=we((u,b,h)=>{i.current.openEvent=u?b:void 0,s.emit("openchange",{open:u,event:b,reason:h,nested:a}),r==null||r(u,b,h)}),d=x.useMemo(()=>({setPositionReference:c}),[]),v=x.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return x.useMemo(()=>({dataRef:i,open:t,onOpenChange:f,elements:v,events:s,floatingId:o,refs:d}),[t,f,v,s,o,d])}function mi(e){e===void 0&&(e={});const{nodeId:t}=e,r=hi({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,o=n.elements,[i,s]=x.useState(null),[a,l]=x.useState(null),f=(o==null?void 0:o.domReference)||i,d=x.useRef(null),v=Rt();pe(()=>{f&&(d.current=f)},[f]);const u=Bo({...e,elements:{...o,...a&&{reference:a}}}),b=x.useCallback(g=>{const S=Q(g)?{getBoundingClientRect:()=>g.getBoundingClientRect(),contextElement:g}:g;l(S),u.refs.setReference(S)},[u.refs]),h=x.useCallback(g=>{(Q(g)||g===null)&&(d.current=g,s(g)),(Q(u.refs.reference.current)||u.refs.reference.current===null||g!==null&&!Q(g))&&u.refs.setReference(g)},[u.refs]),A=x.useMemo(()=>({...u.refs,setReference:h,setPositionReference:b,domReference:d}),[u.refs,h,b]),R=x.useMemo(()=>({...u.elements,domReference:f}),[u.elements,f]),M=x.useMemo(()=>({...u,...n,refs:A,elements:R,nodeId:t}),[u,A,R,t,n]);return pe(()=>{n.dataRef.current.floatingContext=M;const g=v==null?void 0:v.nodesRef.current.find(S=>S.id===t);g&&(g.context=M)}),x.useMemo(()=>({...u,context:M,refs:A,elements:R}),[u,A,R,M])}const Xn="active",Gn="selected";function Dt(e,t,r){const n=new Map,o=r==="item";let i=e;if(o&&e){const{[Xn]:s,[Gn]:a,...l}=e;i=l}return{...r==="floating"&&{tabIndex:-1,[Mt]:""},...i,...t.map(s=>{const a=s?s[r]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,f]=l;if(!(o&&[Xn,Gn].includes(c)))if(c.indexOf("on")===0){if(n.has(c)||n.set(c,[]),typeof f=="function"){var d;(d=n.get(c))==null||d.push(f),s[c]=function(){for(var v,u=arguments.length,b=new Array(u),h=0;h<u;h++)b[h]=arguments[h];return(v=n.get(c))==null?void 0:v.map(A=>A(...b)).find(A=>A!==void 0)}}}else s[c]=f}),s),{})}}function vi(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),r=e.map(a=>a==null?void 0:a.floating),n=e.map(a=>a==null?void 0:a.item),o=x.useCallback(a=>Dt(a,e,"reference"),t),i=x.useCallback(a=>Dt(a,e,"floating"),r),s=x.useCallback(a=>Dt(a,e,"item"),n);return x.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}const bi=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function yi(e,t){var r;t===void 0&&(t={});const{open:n,floatingId:o}=e,{enabled:i=!0,role:s="dialog"}=t,a=(r=bi.get(s))!=null?r:s,l=Dn(),f=Ln()!=null,d=x.useMemo(()=>a==="tooltip"||s==="label"?{["aria-"+(s==="label"?"labelledby":"describedby")]:n?o:void 0}:{"aria-expanded":n?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":n?o:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:l},...a==="menu"&&f&&{role:"menuitem"},...s==="select"&&{"aria-autocomplete":"none"},...s==="combobox"&&{"aria-autocomplete":"list"}},[a,o,f,n,l,s]),v=x.useMemo(()=>{const b={id:o,...a&&{role:a}};return a==="tooltip"||s==="label"?b:{...b,...a==="menu"&&{"aria-labelledby":l}}},[a,o,l,s]),u=x.useCallback(b=>{let{active:h,selected:A}=b;const R={role:"option",...h&&{id:o+"-option"}};switch(s){case"select":return{...R,"aria-selected":h&&A};case"combobox":return{...R,...h&&{"aria-selected":!0}}}return{}},[o,s]);return x.useMemo(()=>i?{reference:d,floating:v,item:u}:{},[i,d,v,u])}function gi({className:e,children:t,buttonText:r}){const[n,o]=te.useState(!1),{refs:i,floatingStyles:s,context:a}=mi({open:n,onOpenChange:o,middleware:[qo(16),Yo(),Vo()],whileElementsMounted:ko,placement:"right"}),l=ui(a),c=pi(a),f=yi(a),{getReferenceProps:d,getFloatingProps:v}=vi([l,c,f]);return p.jsxs(p.Fragment,{children:[p.jsx("span",{ref:i.setReference,className:e,...d(),children:p.jsx(me,{text:r})}),n&&p.jsx(li,{context:a,modal:!1,children:p.jsx("div",{ref:i.setFloating,style:s,...v(),children:p.jsx(tn,{children:t})})})]})}const wi=({className:e,children:t,buttonText:r="Menu button"})=>{const n=J("rpf-menu-button",e);return p.jsx(gi,{className:n,buttonText:r,children:t})},Zn=e=>e?p.jsx("span",{className:"rpf-button__icon material-symbols-sharp",children:e}):null,Jn=({text:e,iconPosition:t,icon:r})=>p.jsxs(p.Fragment,{children:[t==="left"&&r!==""?Zn(r):null,e,t==="right"&&r!==""?Zn(r):null]}),Ei=({text:e,href:t,icon:r="",iconPosition:n="left",danger:o,className:i,onClick:s})=>{const a=J("rpf-menu__item",{"rpf-menu__item--danger":o},i);return p.jsx("li",{className:a,children:t?p.jsx("a",{href:t,children:p.jsx(Jn,{text:e,iconPosition:n,icon:r})}):p.jsx("button",{type:"button",onClick:s,children:p.jsx(Jn,{text:e,iconPosition:n,icon:r})})})},xi=({text:e})=>p.jsx("li",{className:"rpf-menu__title",children:p.jsx("span",{children:e})}),Ti=({text:e="",percent:t,complete:r=!1,className:n})=>p.jsx("div",{className:J("rpf-progress-bar",{"rpf-progress-bar--complete":r,className:n}),children:p.jsxs("label",{className:"rpf-progress-bar__label",children:[p.jsx("span",{children:e}),p.jsx("progress",{className:"rpf-progress-bar__bar",value:t,max:"100",children:`${t}%`})]})}),Si=({children:e})=>p.jsx("td",{className:"rpf-table-cell rpf-table-cell--body",children:p.jsx("div",{className:"rpf-table-cell__content",children:e})});/**
25
28
  * @license lucide-react v0.553.0 - ISC
26
29
  *
27
30
  * This source code is licensed under the ISC license.
28
31
  * See the LICENSE file in the root directory of this source tree.
29
- */const ar=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),or=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,i,a)=>a?a.toUpperCase():i.toLowerCase()),je=e=>{const n=or(e);return n.charAt(0).toUpperCase()+n.slice(1)},$e=(...e)=>e.filter((n,i,a)=>!!n&&n.trim()!==""&&a.indexOf(n)===i).join(" ").trim(),sr=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};/**
32
+ */const Ci=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_i=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),Qn=e=>{const t=_i(e);return t.charAt(0).toUpperCase()+t.slice(1)},er=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Oi=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
30
33
  * @license lucide-react v0.553.0 - ISC
31
34
  *
32
35
  * This source code is licensed under the ISC license.
33
36
  * See the LICENSE file in the root directory of this source tree.
34
- */var ir={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
37
+ */var Ai={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
35
38
  * @license lucide-react v0.553.0 - ISC
36
39
  *
37
40
  * This source code is licensed under the ISC license.
38
41
  * See the LICENSE file in the root directory of this source tree.
39
- */const cr=F.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:i=2,absoluteStrokeWidth:a,className:o="",children:r,iconNode:u,...c},h)=>F.createElement("svg",{ref:h,...ir,width:n,height:n,stroke:e,strokeWidth:a?Number(i)*24/Number(n):i,className:$e("lucide",o),...!r&&!sr(c)&&{"aria-hidden":"true"},...c},[...u.map(([v,p])=>F.createElement(v,p)),...Array.isArray(r)?r:[r]]));/**
42
+ */const Ri=te.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:i,iconNode:s,...a},l)=>te.createElement("svg",{ref:l,...Ai,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:er("lucide",o),...!i&&!Oi(a)&&{"aria-hidden":"true"},...a},[...s.map(([c,f])=>te.createElement(c,f)),...Array.isArray(i)?i:[i]]));/**
40
43
  * @license lucide-react v0.553.0 - ISC
41
44
  *
42
45
  * This source code is licensed under the ISC license.
43
46
  * See the LICENSE file in the root directory of this source tree.
44
- */const ce=(e,n)=>{const i=F.forwardRef(({className:a,...o},r)=>F.createElement(cr,{ref:r,iconNode:n,className:$e(`lucide-${ar(je(e))}`,`lucide-${e}`,a),...o}));return i.displayName=je(e),i};/**
47
+ */const Lt=(e,t)=>{const r=te.forwardRef(({className:n,...o},i)=>te.createElement(Ri,{ref:i,iconNode:t,className:er(`lucide-${Ci(Qn(e))}`,`lucide-${e}`,n),...o}));return r.displayName=Qn(e),r};/**
45
48
  * @license lucide-react v0.553.0 - ISC
46
49
  *
47
50
  * This source code is licensed under the ISC license.
48
51
  * See the LICENSE file in the root directory of this source tree.
49
- */const lr=ce("arrow-down-up",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]]);/**
52
+ */const Pi=Lt("arrow-down-up",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]]);/**
50
53
  * @license lucide-react v0.553.0 - ISC
51
54
  *
52
55
  * This source code is licensed under the ISC license.
53
56
  * See the LICENSE file in the root directory of this source tree.
54
- */const fr=ce("arrow-down-wide-narrow",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h10",key:"1w87gc"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h4",key:"q8tih4"}]]);/**
57
+ */const Ni=Lt("arrow-down-wide-narrow",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h10",key:"1w87gc"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h4",key:"q8tih4"}]]);/**
55
58
  * @license lucide-react v0.553.0 - ISC
56
59
  *
57
60
  * This source code is licensed under the ISC license.
58
61
  * See the LICENSE file in the root directory of this source tree.
59
- */const ur=ce("arrow-up-narrow-wide",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M11 12h4",key:"q8tih4"}],["path",{d:"M11 16h7",key:"uosisv"}],["path",{d:"M11 20h10",key:"jvxblo"}]]),dr=(e,n)=>{if(e)return n==="up"?"ascending":n==="down"?"descending":"none"},pr=({sortDirection:e,children:n,onClick:i})=>{const a=!!i,o=e==="up"?ur:e==="down"?fr:lr,r=dr(a,e),u=a?"rpf-table-cell--sortable-header":"rpf-table-cell--header";return t.jsx("th",{className:`rpf-table-cell ${u}`,"aria-sort":r,children:t.jsx("div",{className:"rpf-table-cell__content",children:a?t.jsxs("button",{className:"rpf-table-cell__sort-header",onClick:i,children:[n,t.jsx(o,{size:20})]}):t.jsx(t.Fragment,{children:n})})})},yr=({headerRow:e,bodyRows:n,fullWidth:i})=>t.jsx("div",{"data-testid":"table-container",className:q("rpf-table",{"rpf-table--full-width":i}),children:t.jsxs("table",{className:q("rpf-table__table",{"rpf-table__table--full-width":i}),children:[t.jsx("thead",{children:t.jsx("tr",{className:"rpf-table-row",children:e})}),t.jsx("tbody",{children:n.map((a,o)=>t.jsx("tr",{className:"rpf-table-row",children:a},o))})]})}),hr=({text:e,variant:n,secondary:i,icon:a,iconPosition:o})=>{const r=a?t.jsx("span",{className:"rpf-tag__icon material-symbols-sharp",children:a}):null;a&&!o&&(o="left");const u=n&&n!=="default"?`rpf-tag--${n}`:null;return t.jsxs("span",{className:q("rpf-tag",u,{"rpf-tag--secondary":i}),children:[o==="left"&&r,e,o==="right"&&r]})};A.Accordion=Ie,A.Alert=Ve,A.Button=B,A.CheckboxInput=He,A.Fieldset=Je,A.InputField=K,A.InputLabel=Re,A.Modal=rr,A.ProgressBar=tr,A.RadioInput=Ze,A.SearchInput=Ke,A.SelectInput=Xe,A.Table=yr,A.TableBodyCell=nr,A.TableHeaderCell=pr,A.Tag=hr,A.TextInput=Qe,A.TextareaInput=Ge,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
62
+ */const Ii=Lt("arrow-up-narrow-wide",[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M11 12h4",key:"q8tih4"}],["path",{d:"M11 16h7",key:"uosisv"}],["path",{d:"M11 20h10",key:"jvxblo"}]]),Mi=(e,t)=>{if(e)return t==="up"?"ascending":t==="down"?"descending":"none"},ki=({sortDirection:e,children:t,onClick:r})=>{const n=!!r,o=e==="up"?Ii:e==="down"?Ni:Pi,i=Mi(n,e),s=n?"rpf-table-cell--sortable-header":"rpf-table-cell--header";return p.jsx("th",{className:`rpf-table-cell ${s}`,"aria-sort":i,children:p.jsx("div",{className:"rpf-table-cell__content",children:n?p.jsxs("button",{className:"rpf-table-cell__sort-header",onClick:r,children:[t,p.jsx(o,{size:20})]}):p.jsx(p.Fragment,{children:t})})})},Di=({headerRow:e,bodyRows:t,fullWidth:r})=>p.jsx("div",{"data-testid":"table-container",className:J("rpf-table",{"rpf-table--full-width":r}),children:p.jsxs("table",{className:J("rpf-table__table",{"rpf-table__table--full-width":r}),children:[p.jsx("thead",{children:p.jsx("tr",{className:"rpf-table-row",children:e})}),p.jsx("tbody",{children:t.map((n,o)=>p.jsx("tr",{className:"rpf-table-row",children:n},o))})]})}),Li=({text:e,variant:t,secondary:r,icon:n,iconPosition:o})=>{const i=n?p.jsx("span",{className:"rpf-tag__icon material-symbols-sharp",children:n}):null;n&&!o&&(o="left");const s=t&&t!=="default"?`rpf-tag--${t}`:null;return p.jsxs("span",{className:J("rpf-tag",s,{"rpf-tag--secondary":r}),children:[o==="left"&&i,e,o==="right"&&i]})};V.Accordion=Qt,V.Alert=hr,V.Button=me,V.CheckboxInput=mr,V.Fieldset=vr,V.InputField=Fe,V.InputLabel=br,V.Menu=tn,V.MenuButton=wi,V.MenuItem=Ei,V.MenuTitle=xi,V.Modal=Sr,V.ProgressBar=Ti,V.RadioInput=yr,V.SearchInput=gr,V.SelectInput=wr,V.Switch=en,V.Table=Di,V.TableBodyCell=Si,V.TableHeaderCell=ki,V.Tag=Li,V.TextInput=xr,V.TextareaInput=Er,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})}));
@@ -0,0 +1,179 @@
1
+ @forward '../properties/colors/brand';
2
+ @forward '../properties/colors/decorative';
3
+ @forward '../properties/colors/greys';
4
+ @forward '../properties/colors/alert';
5
+ @forward '../properties/font-size';
6
+ @forward '../properties/font-weight';
7
+ @forward '../properties/border';
8
+ @forward '../properties/spacing';
9
+ @forward '../properties/sizing';
10
+
11
+ .rpf-switch {
12
+ // Visually hide the checkbox but keep it accessible
13
+
14
+ .rpf-label {
15
+ padding: 0;
16
+ }
17
+
18
+ .rpf-switch__checkbox {
19
+ position: absolute;
20
+ opacity: 0;
21
+ inline-size: 1px;
22
+ block-size: 1px;
23
+ overflow: hidden;
24
+ clip: rect(0, 0, 0, 0);
25
+ white-space: nowrap;
26
+ }
27
+
28
+ // Sizing properties
29
+ --rpf-switch-width: 52px;
30
+ --rpf-switch-height: 32px;
31
+ --rpf-switch-handle-size: calc(var(--rpf-switch-height) * 0.75); // 24px
32
+ --rpf-switch-border-width: 2px;
33
+ --rpf-switch-border-radius: calc(var(--rpf-switch-height) / 2);
34
+ --rpf-switch-handle-border-radius: 50%;
35
+
36
+ // Color properties
37
+ --rpf-switch-off-color: var(--rpf-grey-500);
38
+ --rpf-switch-on-color: var(--rpf-navy-800);
39
+ --rpf-switch-icon-off-color: var(--rpf-white);
40
+ --rpf-switch-icon-on-color: var(--rpf-switch-on-color);
41
+ --rpf-switch-track-off-color: var(--rpf-grey-50);
42
+ --rpf-switch-track-on-color: var(--rpf-switch-on-color);
43
+ --rpf-switch-handle-off-color: var(--rpf-switch-off-color);
44
+ --rpf-switch-handle-on-color: var(--rpf-white);
45
+
46
+ // Base layout
47
+ box-sizing: border-box;
48
+ display: inline-flex;
49
+ align-items: center;
50
+ gap: var(--space-1-5);
51
+ min-block-size: var(--min-target-size);
52
+ cursor: pointer;
53
+ font-weight: var(--font-weight-bold);
54
+
55
+ // Track styles
56
+ .rpf-switch__track {
57
+ box-sizing: border-box;
58
+ display: flex;
59
+ align-items: center;
60
+ flex-shrink: 0;
61
+ inline-size: var(--rpf-switch-width);
62
+ block-size: var(--rpf-switch-height);
63
+ padding-block: 0.375rem;
64
+ padding-inline: 0.5rem;
65
+ border-radius: var(--rpf-switch-border-radius);
66
+ border: var(--rpf-switch-border-width) solid var(--rpf-switch-off-color);
67
+ background: var(--rpf-switch-track-color);
68
+ transition:
69
+ background-color 0.2s ease-out,
70
+ border-color 0.2s ease-out;
71
+ }
72
+
73
+ // Handle styles
74
+ .rpf-switch__handle {
75
+ block-size: calc(var(--rpf-switch-handle-size) / 1.5);
76
+ aspect-ratio: 1/1;
77
+ margin-inline-start: 0;
78
+ background-color: var(--rpf-switch-off-color);
79
+ border-radius: var(--rpf-switch-handle-border-radius);
80
+ transition:
81
+ margin-inline-start 0.2s ease-out,
82
+ background-color 0.2s ease-out,
83
+ box-shadow 0.2s ease-out,
84
+ block-size 0.2s ease-out;
85
+ transition-behavior: allow-discrete;
86
+ }
87
+ }
88
+
89
+ // Icon modifier
90
+ .rpf-switch--icon {
91
+ .rpf-switch__track {
92
+ padding-inline: 0.125rem;
93
+ }
94
+
95
+ .rpf-switch__handle {
96
+ block-size: var(--rpf-switch-handle-size);
97
+ display: grid;
98
+ place-items: center;
99
+ }
100
+
101
+ .rpf-switch__icon {
102
+ background-color: var(--rpf-switch-icon-off-color);
103
+ inline-size: 1rem;
104
+ block-size: 1rem;
105
+ display: inline-block;
106
+ mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="%231f1f1f"><path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/></svg>');
107
+ mask-size: 1rem;
108
+ }
109
+ }
110
+
111
+ .rpf-switch:has(.rpf-switch__checkbox:disabled),
112
+ .rpf-switch--disabled {
113
+ cursor: default;
114
+ opacity: 50%;
115
+ }
116
+
117
+ // Focus state (specificity: 0,2,1)
118
+ .rpf-switch__track:has(.rpf-switch__checkbox:focus-visible) {
119
+ outline: 3px solid var(--rpf-input-outline-color);
120
+ outline-offset: 0;
121
+ }
122
+
123
+ // Base hover states (specificity: 0,1,1)
124
+ .rpf-switch:hover .rpf-switch__handle {
125
+ box-shadow: 0px 0px 0px 14px color-mix(in srgb, var(--rpf-switch-off-color), transparent 90%);
126
+ }
127
+
128
+ // Layout modifiers (specificity: 0,1,0)
129
+ .rpf-switch--full-width {
130
+ inline-size: 100%;
131
+ max-inline-size: none;
132
+ justify-content: space-between;
133
+ }
134
+
135
+ .rpf-switch--reverse {
136
+ flex-direction: row-reverse;
137
+ }
138
+
139
+ .rpf-switch--align-start {
140
+ align-items: start;
141
+ }
142
+
143
+ // Disabled hover states (specificity: 0,2,1)
144
+ .rpf-switch--disabled:hover .rpf-switch__handle {
145
+ box-shadow: none;
146
+ }
147
+
148
+ // Checked states (specificity: 0,2,1)
149
+ .rpf-switch:has(.rpf-switch__checkbox:checked) {
150
+ .rpf-switch__track {
151
+ background-color: var(--rpf-switch-track-on-color);
152
+ border: 2px solid var(--rpf-switch-track-on-color);
153
+ padding-inline: 0.125rem;
154
+ }
155
+
156
+ .rpf-switch__handle {
157
+ block-size: var(--rpf-switch-handle-size);
158
+ margin-inline-start: calc(100% - var(--rpf-switch-handle-size) - calc(var(--rpf-switch-border-width) * 0.5));
159
+ background-color: var(--rpf-switch-handle-on-color);
160
+ }
161
+
162
+ &:hover .rpf-switch__handle {
163
+ box-shadow: 0px 0px 0px 10px color-mix(in srgb, var(--rpf-switch-on-color), transparent 90%);
164
+ }
165
+
166
+ .rpf-switch__icon {
167
+ background-color: var(--rpf-switch-icon-on-color);
168
+ inline-size: 1rem;
169
+ block-size: 1rem;
170
+ display: inline-block;
171
+ mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="%231f1f1f"><path d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"/></svg>');
172
+ mask-size: 1rem;
173
+ }
174
+ }
175
+
176
+ // Checked disabled hover state (specificity: 0,3,1)
177
+ .rpf-switch:has(.rpf-switch__checkbox:disabled):hover .rpf-switch__handle {
178
+ box-shadow: none;
179
+ }