idea-react 3.0.0-alpha.0 → 3.0.0-alpha.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 (60) hide show
  1. package/AGENTS.md +31 -10
  2. package/ReadMe.md +42 -35
  3. package/dist/index.d.mts +301 -100
  4. package/dist/index.d.ts +301 -100
  5. package/dist/index.js +16 -16
  6. package/dist/index.mjs +15 -15
  7. package/dist/style.css +5 -5
  8. package/package.json +4 -7
  9. package/source/Avatar.tsx +65 -12
  10. package/source/Button.tsx +13 -4
  11. package/source/ButtonGroup.tsx +28 -0
  12. package/source/Card.tsx +26 -0
  13. package/source/ClickBoundary.tsx +6 -5
  14. package/source/CloseButton.tsx +23 -0
  15. package/source/CodeBlock.tsx +5 -3
  16. package/source/Countdown.tsx +2 -0
  17. package/source/Drawer.tsx +62 -0
  18. package/source/Editor.tsx +5 -8
  19. package/source/Grid.tsx +92 -0
  20. package/source/HorizontalMarquee/index.tsx +4 -10
  21. package/source/Image.tsx +15 -0
  22. package/source/ListGroup.tsx +103 -0
  23. package/source/LiveTSX.tsx +1 -1
  24. package/source/Loading.tsx +4 -3
  25. package/source/Menu.tsx +99 -1
  26. package/source/MonthCalendar.tsx +60 -22
  27. package/source/NativeDialog/index.tsx +37 -1
  28. package/source/Nav.tsx +52 -0
  29. package/source/Navbar.tsx +48 -1
  30. package/source/Overlay.ts +22 -0
  31. package/source/OverlayBox.tsx +200 -32
  32. package/source/PageNav.tsx +56 -32
  33. package/source/Popover.tsx +36 -0
  34. package/source/ScrollNav/Scroller.tsx +107 -0
  35. package/source/ScrollNav/index.tsx +12 -99
  36. package/source/Select.tsx +66 -55
  37. package/source/ShareBox.tsx +5 -11
  38. package/source/Spinner.tsx +30 -0
  39. package/source/SpinnerButton.tsx +8 -10
  40. package/source/Table.tsx +59 -0
  41. package/source/TableSpinner.tsx +7 -5
  42. package/source/{TextTruncate.tsx → TextTruncate/Content.tsx} +24 -20
  43. package/source/TextTruncate/index.tsx +25 -0
  44. package/source/Time.tsx +7 -33
  45. package/source/TimeDistance.tsx +1 -1
  46. package/source/Timeline/index.tsx +7 -7
  47. package/source/Toast.tsx +114 -29
  48. package/source/ToggleButton.tsx +47 -0
  49. package/source/Tooltip.tsx +32 -0
  50. package/source/TypeEcho/Content.tsx +58 -0
  51. package/source/TypeEcho/index.tsx +14 -0
  52. package/source/UserRank/index.module.less +9 -20
  53. package/source/UserRank/index.tsx +35 -32
  54. package/source/VerticalMarquee/index.module.less +0 -1
  55. package/source/VerticalMarquee/index.tsx +3 -5
  56. package/source/ZodiacBar.tsx +1 -1
  57. package/source/animate.ts +4 -2
  58. package/source/color.ts +3 -5
  59. package/source/index.ts +13 -0
  60. package/source/TypeEcho.tsx +0 -49
package/dist/index.mjs CHANGED
@@ -1,15 +1,15 @@
1
- import{_ as e}from"@swc/helpers/_/_object_spread";import{_ as t}from"@swc/helpers/_/_object_without_properties";import{Fragment as n,jsx as r,jsxs as i}from"react/jsx-runtime";import a from"classnames";import{_ as o}from"@swc/helpers/_/_object_spread_props";import{_ as s}from"@swc/helpers/_/_define_property";import*as c from"react";import l,{Component as u,Fragment as d,PureComponent as f,createRef as p,isValidElement as m}from"react";import h from"@shikijs/langs/javascript";import g from"@shikijs/langs/jsx";import _ from"@shikijs/langs/tsx";import v from"@shikijs/langs/typescript";import y from"@shikijs/themes/github-light";import{createHighlighterCoreSync as ee}from"shiki/core";import{createJavaScriptRegexEngine as b}from"shiki/engine/javascript";import{_ as x}from"@swc/helpers/_/_apply_decs_2203_r";import{_ as S}from"@swc/helpers/_/_class_private_field_get";import{_ as C}from"@swc/helpers/_/_class_private_field_init";import{_ as w}from"@swc/helpers/_/_class_private_field_set";import{_ as T}from"@swc/helpers/_/_identity";import{action as te,computed as E,observable as D}from"mobx";import{observer as O}from"mobx-react";import{ObservedComponent as ne,reaction as re}from"mobx-react-helper";import{Day as ie,Second as ae,Timestamp as oe,blobOf as se,changeMonth as ce,diffTime as le,formatDate as k,makeArray as ue,scrollTo as de,sleep as fe,splitArray as pe,uniqueID as me}from"web-utility";import{Defer as he}from"iterable-observer";import{_ as A}from"@swc/helpers/_/_async_to_generator";import{createReactEditorJS as ge}from"react-editor-js";import _e from"editorjs-html";import{LiveEditor as ve,LiveError as ye,LivePreview as be,LiveProvider as xe}from"react-live";import{Badge as Se,Button as Ce,Card as we,Col as Te,Dropdown as j,Image as Ee,Nav as M,OverlayTrigger as De,Popover as Oe,Row as ke,Spinner as Ae,Table as je,Toast as Me,ToastContainer as Ne,Tooltip as Pe}from"react-bootstrap";import Fe from"html2canvas";var Ie=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports);function Le(e){return t=>t&&new IntersectionObserver(([{isIntersecting:t,target:n}],r)=>{if(!t)return;let i=[`animate__animated`,`animate__${e}`];n.classList.add(...i),n.addEventListener(`animationend`,()=>n.classList.remove(...i),{once:!0}),r.disconnect()}).observe(t)}const Re=n=>{let{className:i,style:o,size:s=3}=n,c=t(n,[`className`,`style`,`size`]);return/*#__PURE__*/ r(`img`,e({className:a(`object-fit-cover rounded-circle`,i),style:e({width:`${s}rem`,height:`${s}rem`},o)},c))};Re.displayName=`Avatar`;const ze=e=>typeof e.href==`string`,Be=n=>{let{variant:i=`solid`,theme:s,pill:c,className:l}=n,u=t(n,[`variant`,`theme`,`pill`,`className`]),d=a(`badge`,i!==`solid`&&`badge-${i}`,s&&`theme-${s}`,{"rounded-pill":c},l);return ze(u)?/*#__PURE__*/ r(`a`,o(e({},u),{className:d})):/*#__PURE__*/ r(`span`,o(e({},u),{className:d}))},Ve=e=>typeof e.href==`string`,He=e=>e.preventDefault(),Ue=n=>{let{variant:i,theme:s,size:c,icon:l,styled:u,disabled:d,className:f}=n,p=t(n,[`variant`,`theme`,`size`,`icon`,`styled`,`disabled`,`className`]),m=a(i?`btn-${i}`:`btn`,s&&`theme-${s}`,c&&`btn-${c}`,{"btn-icon":l,"btn-styled":u,disabled:d},f);return Ve(p)?/*#__PURE__*/ r(`a`,o(e({},p),{className:m,href:d?void 0:p.href,"aria-disabled":d||void 0,tabIndex:d?-1:p.tabIndex,onClick:d?He:p.onClick})):/*#__PURE__*/ r(`button`,o(e({},p),{type:p.type||`button`,className:m,disabled:d}))};var We=class extends f{componentDidMount(){window.addEventListener(`click`,this.switchClick,!0)}componentWillUnmount(){window.removeEventListener(`click`,this.switchClick,!0)}render(){let n=this.props,{children:i,onInnerClick:a,onOuterClick:s}=n,c=t(n,[`children`,`onInnerClick`,`onOuterClick`]);return/*#__PURE__*/ r(`div`,o(e({ref:this.root},c),{children:i}))}constructor(...e){super(...e),s(this,`root`,/*#__PURE__*/ p()),s(this,`switchClick`,e=>{var t;let{onInnerClick:n,onOuterClick:r}=this.props;(t=this.root.current)!=null&&t.contains(e.target)?n==null||n(e):r==null||r(e)})}};
1
+ import{_ as e}from"@swc/helpers/_/_object_spread";import{_ as t}from"@swc/helpers/_/_object_spread_props";import{_ as n}from"@swc/helpers/_/_object_without_properties";import{Fragment as r,jsx as i,jsxs as a}from"react/jsx-runtime";import o from"classnames";import{_ as s}from"@swc/helpers/_/_define_property";import*as c from"react";import l,{Children as u,Component as d,Fragment as f,PureComponent as p,cloneElement as m,createRef as h,isValidElement as g}from"react";import _ from"@shikijs/langs/javascript";import v from"@shikijs/langs/jsx";import y from"@shikijs/langs/tsx";import ee from"@shikijs/langs/typescript";import b from"@shikijs/themes/github-dark";import te from"@shikijs/themes/github-light";import{createHighlighterCoreSync as x}from"shiki/core";import{createJavaScriptRegexEngine as S}from"shiki/engine/javascript";import{_ as C}from"@swc/helpers/_/_apply_decs_2203_r";import{_ as w}from"@swc/helpers/_/_class_private_field_get";import{_ as T}from"@swc/helpers/_/_class_private_field_init";import{_ as E}from"@swc/helpers/_/_class_private_field_set";import{_ as D}from"@swc/helpers/_/_identity";import{action as O,computed as k,observable as A}from"mobx";import{observer as j}from"mobx-react";import{ObservedComponent as ne,reaction as re}from"mobx-react-helper";import{Day as ie,Second as ae,Timestamp as oe,blobOf as se,changeMonth as ce,diffTime as le,formatDate as M,scrollTo as ue,sleep as de,splitArray as fe,uniqueID as pe}from"web-utility";import{Defer as me}from"iterable-observer";import{_ as N}from"@swc/helpers/_/_async_to_generator";import{createReactEditorJS as he}from"react-editor-js";import ge from"editorjs-html";import{LiveEditor as _e,LiveError as ve,LivePreview as ye,LiveProvider as be}from"react-live";import xe from"html2canvas";var Se=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports);function Ce(e){return t=>{t&&new IntersectionObserver(([{isIntersecting:t,target:n}],r)=>{if(!t)return;let i=[`animate__animated`,`animate__${e}`];n.classList.add(...i),n.addEventListener(`animationend`,()=>n.classList.remove(...i),{once:!0}),r.disconnect()}).observe(t)}}const we=r=>{let{className:s,style:c,size:l,theme:u,subtle:d,src:f,alt:p,status:m,statusLabel:h=m,children:g}=r,_=n(r,[`className`,`style`,`size`,`theme`,`subtle`,`src`,`alt`,`status`,`statusLabel`,`children`]);return/*#__PURE__*/ a(`span`,t(e({className:o(`avatar`,typeof l==`string`&&`avatar-${l}`,u&&`theme-${u}`,d&&`avatar-subtle`,s),style:typeof l==`number`?e({"--bs-avatar-size":`${l}rem`},c):c},_),{children:[f?/*#__PURE__*/ i(`img`,{className:`avatar-img`,src:f,alt:p}):g,m&&/*#__PURE__*/ i(`span`,{className:`avatar-status status-${m}`,role:`img`,"aria-label":h})]}))};we.displayName=`Avatar`;const Te=r=>{let{className:a,size:s,children:c}=r,l=n(r,[`className`,`size`,`children`]);return/*#__PURE__*/ i(`div`,t(e({className:o(`avatar-stack`,s&&`avatar-stack-${s}`,a)},l),{children:c}))};Te.displayName=`AvatarStack`;const Ee=e=>typeof e.href==`string`,De=r=>{let{variant:a=`solid`,theme:s,pill:c,className:l}=r,u=n(r,[`variant`,`theme`,`pill`,`className`]),d=o(`badge`,a!==`solid`&&`badge-${a}`,s&&`theme-${s}`,{"rounded-pill":c},l);return Ee(u)?/*#__PURE__*/ i(`a`,t(e({},u),{className:d})):/*#__PURE__*/ i(`span`,t(e({},u),{className:d}))},Oe=e=>typeof e.href==`string`,ke=e=>e.preventDefault(),P=r=>{let{variant:a,theme:s,size:c,icon:l,styled:u,disabled:d,className:f}=r,p=n(r,[`variant`,`theme`,`size`,`icon`,`styled`,`disabled`,`className`]),m=o(a?`btn-${a}`:l?void 0:`btn`,s&&`theme-${s}`,c&&`btn-${c}`,{"btn-icon":l,"btn-styled":u,disabled:d},f);return Oe(p)?/*#__PURE__*/ i(`a`,t(e({},p),{className:m,href:d?void 0:p.href,"aria-disabled":d||void 0,tabIndex:d?-1:p.tabIndex,onClick:d?ke:p.onClick})):/*#__PURE__*/ i(`button`,t(e({},p),{type:p.type||`button`,className:m,disabled:d}))},Ae=r=>{let{vertical:a,role:s=`group`,className:c}=r,l=n(r,[`vertical`,`role`,`className`]);return/*#__PURE__*/ i(`div`,t(e({role:s},l),{className:o(a?`btn-group-vertical`:`btn-group`,c)}))};Ae.displayName=`ButtonGroup`;const je=r=>{let{className:a,role:s=`toolbar`}=r,c=n(r,[`className`,`role`]);return/*#__PURE__*/ i(`div`,t(e({role:s},c),{className:o(`btn-toolbar`,a)}))};je.displayName=`ButtonToolbar`;const Me=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`card`,a)}))},Ne=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`card-header`,a)}))},Pe=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`card-body`,a)}))},Fe=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`card-footer`,a)}))},Ie=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`h3`,t(e({},s),{className:o(`card-title`,a)}))},Le=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`p`,t(e({},s),{className:o(`card-text`,a)}))};var Re=class extends p{componentDidMount(){window.addEventListener(`click`,this.switchClick,!0)}componentWillUnmount(){window.removeEventListener(`click`,this.switchClick,!0)}render(){let r=this.props,{children:a,onInnerClick:o,onOuterClick:s}=r,c=n(r,[`children`,`onInnerClick`,`onOuterClick`]);return/*#__PURE__*/ i(`div`,t(e({ref:this.root},c),{children:a}))}constructor(...e){super(...e),s(this,`root`,/*#__PURE__*/ h()),s(this,`switchClick`,e=>{var t;let{onInnerClick:n,onOuterClick:r}=this.props;(t=this.root.current)!=null&&t.contains(e.target)?n==null||n(e):r==null||r(e)})}};const ze=r=>{let{dismiss:a,className:s,type:c=`button`,"aria-label":l=`Close`}=r,u=n(r,[`dismiss`,`className`,`type`,`aria-label`]);return/*#__PURE__*/ i(`button`,t(e({},u),{type:c,className:o(`btn-close`,s),"data-bs-dismiss":a,"aria-label":l}))};ze.displayName=`CloseButton`;
2
2
  /*!
3
3
  * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
4
4
  *
5
5
  * Copyright (c) 2014-2017, Jon Schlinkert.
6
6
  * Released under the MIT License.
7
7
  */
8
- function Ge(e){return Object.prototype.toString.call(e)===`[object Object]`}function Ke(e){var t,n;return Ge(e)!==!1&&(t=e.constructor,t===void 0||(n=t.prototype,Ge(n)!==!1&&n.hasOwnProperty(`isPrototypeOf`)!==!1))}var qe=/* @__PURE__ */ Ie(((e,t,n)=>{var r=n&&n.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},i=n&&n.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(e,"__esModule",{value:!0}),e.prettyPrint=void 0;var a=[];function o(e){var t=typeof e;return e!==null&&(t===`object`||t===`function`)}function s(e){return Object.prototype.toString.call(e)===`[object RegExp]`}function c(e){return Object.getOwnPropertySymbols(e).filter(function(t){return Object.prototype.propertyIsEnumerable.call(e,t)})}function l(e,t,n){n===void 0&&(n=``);var u=r(r({},{indent:` `,singleQuotes:!0}),t),d=u.inlineCharacterLimit===void 0?{newLine:`
8
+ function Be(e){return Object.prototype.toString.call(e)===`[object Object]`}function Ve(e){var t,n;return Be(e)!==!1&&(t=e.constructor,t===void 0||(n=t.prototype,Be(n)!==!1&&n.hasOwnProperty(`isPrototypeOf`)!==!1))}var He=/* @__PURE__ */ Se(((e,t,n)=>{var r=n&&n.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},i=n&&n.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(e,"__esModule",{value:!0}),e.prettyPrint=void 0;var a=[];function o(e){var t=typeof e;return e!==null&&(t===`object`||t===`function`)}function s(e){return Object.prototype.toString.call(e)===`[object RegExp]`}function c(e){return Object.getOwnPropertySymbols(e).filter(function(t){return Object.prototype.propertyIsEnumerable.call(e,t)})}function l(e,t,n){n===void 0&&(n=``);var u=r(r({},{indent:` `,singleQuotes:!0}),t),d=u.inlineCharacterLimit===void 0?{newLine:`
9
9
  `,newLineOrSpace:`
10
10
  `,pad:n,indent:n+u.indent}:{newLine:`@@__PRETTY_PRINT_NEW_LINE__@@`,newLineOrSpace:`@@__PRETTY_PRINT_NEW_LINE_OR_SPACE__@@`,pad:`@@__PRETTY_PRINT_PAD__@@`,indent:`@@__PRETTY_PRINT_INDENT__@@`},f=function(e){if(u.inlineCharacterLimit===void 0)return e;var t=e.replace(new RegExp(d.newLine,`g`),``).replace(new RegExp(d.newLineOrSpace,`g`),` `).replace(RegExp(d.pad+`|`+d.indent,`g`),``);return t.length<=u.inlineCharacterLimit?t:e.replace(RegExp(d.newLine+`|`+d.newLineOrSpace,`g`),`
11
11
  `).replace(new RegExp(d.pad,`g`),n).replace(new RegExp(d.indent,`g`),n+u.indent)};if(a.indexOf(e)!==-1)return`"[Circular]"`;if(e==null||typeof e==`number`||typeof e==`boolean`||typeof e==`function`||typeof e==`symbol`||s(e))return String(e);if(e instanceof Date)return`new Date('${e.toISOString()}')`;if(Array.isArray(e)){if(e.length===0)return`[]`;a.push(e);var p=`[`+d.newLine+e.map(function(t,r){var i=e.length-1===r?d.newLine:`,`+d.newLineOrSpace,a=l(t,u,n+u.indent);return u.transform&&(a=u.transform(e,r,a)),d.indent+a+i}).join(``)+d.pad+`]`;return a.pop(),f(p)}if(o(e)){var m=i(i([],Object.keys(e),!0),c(e),!0);if(u.filter&&(m=m.filter(function(t){return u.filter&&u.filter(e,t)})),m.length===0)return`{}`;a.push(e);var p=`{`+d.newLine+m.map(function(t,r){var i=m.length-1===r?d.newLine:`,`+d.newLineOrSpace,a=typeof t==`symbol`,o=!a&&/^[a-z$_][a-z$_0-9]*$/i.test(t.toString()),s=a||o?t:l(t,u),c=l(e[t],u,n+u.indent);return u.transform&&(c=u.transform(e,t,c)),d.indent+String(s)+`: `+c+i}).join(``)+d.pad+`}`;return a.pop(),f(p)}return e=String(e).replace(/[\r\n]/g,function(e){return e===`
12
- `?`\\n`:`\\r`}),u.singleQuotes?(e=e.replace(/\\?'/g,`\\'`),`'${e}'`):(e=e.replace(/"/g,`\\"`),`"${e}"`)}e.prettyPrint=l})),Je=/* @__PURE__ */ Ie((e=>{
12
+ `?`\\n`:`\\r`}),u.singleQuotes?(e=e.replace(/\\?'/g,`\\'`),`'${e}'`):(e=e.replace(/"/g,`\\"`),`"${e}"`)}e.prettyPrint=l})),Ue=/* @__PURE__ */ Se((e=>{
13
13
  /** @license React v16.13.1
14
14
  * react-is.production.min.js
15
15
  *
@@ -18,15 +18,15 @@ function Ge(e){return Object.prototype.toString.call(e)===`[object Object]`}func
18
18
  * This source code is licensed under the MIT license found in the
19
19
  * LICENSE file in the root directory of this source tree.
20
20
  */
21
- var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.memo`):60115,m=t?Symbol.for(`react.lazy`):60116;function h(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e=e&&e.$$typeof,e){case c:case d:case m:case p:case s:return e;default:return t}}case r:return t}}}e.ForwardRef=d,e.Memo=p,e.isContextConsumer=function(e){return h(e)===c},e.isContextProvider=function(e){return h(e)===s},e.isForwardRef=function(e){return h(e)===d},e.isLazy=function(e){return h(e)===m},e.isMemo=function(e){return h(e)===p},e.isProfiler=function(e){return h(e)===o},e.isStrictMode=function(e){return h(e)===a},e.isSuspense=function(e){return h(e)===f}})),Ye=/* @__PURE__ */ Ie(((e,t)=>{t.exports=Je()})),Xe=qe(),N=Ye(),P=(function(e,t){return e===0?``:Array(e*t).fill(` `).join(``)});function Ze(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Qe(e){if(Array.isArray(e))return Ze(e)}function $e(e,t,n){return(t=ot(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function et(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function tt(){throw TypeError(`Invalid attempt to spread non-iterable instance.
22
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?nt(Object(n),!0).forEach(function(t){$e(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function it(e){return Qe(e)||et(e)||st(e)||tt()}function at(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ot(e){var t=at(e,`string`);return typeof t==`symbol`?t:t+``}function F(e){"@babel/helpers - typeof";return F=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},F(e)}function st(e,t){if(e){if(typeof e==`string`)return Ze(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ze(e,t):void 0}}function ct(e,t){if(e===null||F(e)!==`object`||e instanceof Date||e instanceof RegExp)return e;if(/*#__PURE__*/ c.isValidElement(e)){var n=rt({},e);return delete n._owner,n}return t.add(e),Array.isArray(e)?e.map(function(e){return ct(e,t)}):Object.keys(e).sort().reduce(function(n,r){return n[r]=r===`current`||t.has(e[r])?`[Circular]`:ct(e[r],t),n},{})}function lt(e){return ct(e,/* @__PURE__ */ new WeakSet)}var ut=function(e){return{type:`string`,value:e}},dt=function(e){return{type:`number`,value:e}},ft=function(e,t,n,r){return{type:`ReactElement`,displayName:e,props:t,defaultProps:n,childrens:r}},pt=function(e,t){return{type:`ReactFragment`,key:e,childrens:t}},mt=!!d,ht=function(e){return!e.name||e.name===`_default`?`No Display Name`:e.name},gt=function(e){switch(!0){case!!e.displayName:return e.displayName;case e.$$typeof===N.Memo:return gt(e.type);case e.$$typeof===N.ForwardRef:return gt(e.render);default:return ht(e)}},_t=function(e){switch(!0){case typeof e.type==`string`:return e.type;case typeof e.type==`function`:return e.type.displayName?e.type.displayName:ht(e.type);case(0,N.isForwardRef)(e):case(0,N.isMemo)(e):return gt(e.type);case(0,N.isContextConsumer)(e):return`${e.type._context.displayName||`Context`}.Consumer`;case(0,N.isContextProvider)(e):return`${e.type.displayName||`Context`}.Provider`;case(0,N.isLazy)(e):return`Lazy`;case(0,N.isProfiler)(e):return`Profiler`;case(0,N.isStrictMode)(e):return`StrictMode`;case(0,N.isSuspense)(e):return`Suspense`;default:return`UnknownElementType`}},vt=function(e,t){return t!==`children`},yt=function(e){return e!==!0&&e!==!1&&e!==null&&e!==``},bt=function(e,t){var n={};return Object.keys(e).filter(function(n){return t(e[n],n)}).forEach(function(t){return n[t]=e[t]}),n},I=function(e,t){var n=t.displayName,r=n===void 0?_t:n;if(typeof e==`string`)return ut(e);if(typeof e==`number`)return dt(e);if(!/*#__PURE__*/ l.isValidElement(e))throw Error(`react-element-to-jsx-string: Expected a React.Element, got \`${F(e)}\``);var i=r(e),a=bt(e.props,vt),o=e.key;typeof o==`string`&&o.search(/^\./)&&(a.key=o);var s=bt(e.type.defaultProps||{},vt),c=l.Children.toArray(e.props.children).filter(yt).map(function(e){return I(e,t)});return mt&&e.type===d?pt(o,c):ft(i,a,s,c)};function xt(){}var St=function(e){return e.toString().split(`
23
- `).map(function(e){return e.trim()}).join(``)},Ct=(function(e,t){var n=t.functionValue,r=n===void 0?St:n;return!t.showFunctions&&r===St?r(xt):r(e)}),wt=(function(e,t,n,r){var i=lt(e),a=(0,Xe.prettyPrint)(i,{transform:function(e,t,i){var a=e[t];return a&&/*#__PURE__*/ m(a)?L(I(a,r),!0,n,r):typeof a==`function`?Ct(a,r):i}});return t?a.replace(/\s+/g,` `).replace(/{ /g,`{`).replace(/ }/g,`}`).replace(/\[ /g,`[`).replace(/ ]/g,`]`):a.replace(/\t/g,P(1,r.tabStop)).replace(/\n([^$])/g,`
24
- ${P(n+1,r.tabStop)}$1`)}),Tt=function(e){return e.replace(/"/g,`&quot;`)},Et=function(e,t,n,r){if(typeof e==`number`)return`{${String(e)}}`;if(typeof e==`string`)return`"${Tt(e)}"`;if(F(e)===`symbol`){var i=e.valueOf().toString().replace(/Symbol\((.*)\)/,`$1`);return i?`{Symbol('${i}')}`:`{Symbol()}`}return typeof e==`function`?`{${Ct(e,r)}}`:/*#__PURE__*/ m(e)?`{${L(I(e,r),!0,n,r)}}`:e instanceof Date?isNaN(e.valueOf())?`{new Date(NaN)}`:`{new Date("${e.toISOString()}")}`:Ke(e)||Array.isArray(e)?`{${wt(e,t,n,r)}}`:`{${String(e)}}`},Dt=(function(e,t,n,r,i,a,o,s){if(!t&&!r)throw Error(`The prop "${e}" has no value and no default: could not be formatted`);var c=t?n:i,l=s.useBooleanShorthandSyntax,u=s.tabStop,d=Et(c,a,o,s),f=` `,p=`
25
- ${P(o+1,u)}`,m=d.includes(`
26
- `);return l&&d===`{true}`?(f+=`${e}`,p+=`${e}`):(f+=`${e}=${d}`,p+=`${e}=${d}`),{attributeFormattedInline:f,attributeFormattedMultiline:p,isMultilineAttribute:m}}),Ot=(function(e,t){var n=e.slice(0,e.length>0?e.length-1:0),r=e[e.length-1];return r&&(t.type===`string`||t.type===`number`)&&(r.type===`string`||r.type===`number`)?n.push(ut(String(r.value)+String(t.value))):(r&&n.push(r),n.push(t)),n}),kt=function(e){return[`key`,`ref`].includes(e)},At=(function(e){return function(t){var n=t.includes(`key`),r=t.includes(`ref`),i=t.filter(function(e){return!kt(e)}),a=it(e?i.sort():i);return r&&a.unshift(`ref`),n&&a.unshift(`key`),a}});function jt(e,t){return Array.isArray(t)?function(e){return t.indexOf(e)===-1}:function(n){return t(e[n],n)}}var Mt=function(e,t,n,r,i){var a=i.tabStop;return e.type===`string`?t.split(`
27
- `).map(function(e,t){return t===0?e:`${P(r,a)}${e}`}).join(`
28
- `):t},Nt=function(e,t,n){return function(r){return Mt(r,L(r,e,t,n),e,t,n)}},Pt=function(e,t){return function(n){var r=Object.keys(e).includes(n);return!r||r&&e[n]!==t[n]}},Ft=function(e,t,n,r,i){return i?P(n,r).length+t.length>i:e.length>1},It=function(e,t,n,r,i,a,o){return(Ft(e,t,i,a,o)||n)&&!r},Lt=(function(e,t,n,r){var i=e.type,a=e.displayName,o=a===void 0?``:a,s=e.childrens,c=e.props,l=c===void 0?{}:c,u=e.defaultProps,d=u===void 0?{}:u;if(i!==`ReactElement`)throw Error(`The "formatReactElementNode" function could only format node of type "ReactElement". Given: ${i}`);var f=r.filterProps,p=r.maxInlineAttributesLineLength,m=r.showDefaultProps,h=r.sortProps,g=r.tabStop,_=`<${o}`,v=_,y=_,ee=!1,b=[],x=jt(l,f);Object.keys(l).filter(x).filter(Pt(d,l)).forEach(function(e){return b.push(e)}),Object.keys(d).filter(x).filter(function(){return m}).filter(function(e){return!b.includes(e)}).forEach(function(e){return b.push(e)});var S=At(h)(b);if(S.forEach(function(e){var i=Dt(e,Object.keys(l).includes(e),l[e],Object.keys(d).includes(e),d[e],t,n,r),a=i.attributeFormattedInline,o=i.attributeFormattedMultiline;i.isMultilineAttribute&&(ee=!0),v+=a,y+=o}),y+=`
29
- ${P(n,g)}`,_=It(S,v,ee,t,n,g,p)?y:v,s&&s.length>0){var C=n+1;_+=`>`,t||(_+=`
30
- `,_+=P(C,g)),_+=s.reduce(Ot,[]).map(Nt(t,C,r)).join(t?``:`
31
- ${P(C,g)}`),t||(_+=`
32
- `,_+=P(C-1,g)),_+=`</${o}>`}else Ft(S,v,n,g,p)||(_+=` `),_+=`/>`;return _}),Rt=``,zt=`React.Fragment`,Bt=function(e,t,n){var r={};return t&&(r={key:t}),{type:`ReactElement`,displayName:e,props:r,defaultProps:{},childrens:n}},Vt=function(e){return!!e.key},Ht=function(e){return e.childrens.length===0},Ut=(function(e,t,n,r){var i=e.type,a=e.key,o=e.childrens;if(i!==`ReactFragment`)throw Error(`The "formatReactFragmentNode" function could only format node of type "ReactFragment". Given: ${i}`);return Lt(Bt(r.useFragmentShortSyntax?Ht(e)||Vt(e)?zt:Rt:zt,a,o),t,n,r)}),Wt=[`<`,`>`,`{`,`}`],Gt=function(e){return Wt.some(function(t){return e.includes(t)})},Kt=function(e){return Gt(e)?`{\`${e}\`}`:e},qt=function(e){var t=e;return t.endsWith(` `)&&(t=t.replace(/^(.*?)(\s+)$/,`$1{'$2'}`)),t.startsWith(` `)&&(t=t.replace(/^(\s+)(.*)$/,`{'$1'}$2`)),t},L=(function(e,t,n,r){if(e.type===`number`)return String(e.value);if(e.type===`string`)return e.value?`${qt(Kt(String(e.value)))}`:``;if(e.type===`ReactElement`)return Lt(e,t,n,r);if(e.type===`ReactFragment`)return Ut(e,t,n,r);throw TypeError(`Unknow format type "${e.type}"`)}),Jt=(function(e,t){return L(e,!1,0,t)}),Yt=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.filterProps,r=n===void 0?[]:n,i=t.showDefaultProps,a=i===void 0||i,o=t.showFunctions,s=o!==void 0&&o,c=t.functionValue,l=t.tabStop,u=l===void 0?2:l,d=t.useBooleanShorthandSyntax,f=d===void 0||d,p=t.useFragmentShortSyntax,m=p===void 0||p,h=t.sortProps,g=h===void 0||h,_=t.maxInlineAttributesLineLength,v=t.displayName;if(!e)throw Error(`react-element-to-jsx-string: Expected a ReactElement`);var y={filterProps:r,showDefaultProps:a,showFunctions:s,functionValue:c,tabStop:u,useBooleanShorthandSyntax:f,useFragmentShortSyntax:m,sortProps:g,maxInlineAttributesLineLength:_,displayName:v};return Jt(I(e,y),y)};const Xt=ee({themes:[y],langs:[h,g,v,_],engine:b()}),Zt=i=>{let{className:a=``,language:s,children:c}=i,l=t(i,[`className`,`language`,`children`]),u=typeof c==`string`?c:Yt(/*#__PURE__*/ m(c)?c:/*#__PURE__*/ r(n,{children:c})),d=Xt.codeToHtml(u,{lang:s,theme:`github-light`,structure:`inline`});return/*#__PURE__*/ r(`pre`,o(e({className:`m-0 language-${s} ${a}`},l),{children:/*#__PURE__*/ r(`code`,{dangerouslySetInnerHTML:{__html:d},className:`language-${s}`})}))},Qt=[`primary`,`secondary`,`success`,`danger`,`warning`,`info`,`dark`,`light`];function $t(e,t=[]){let n=t[0]?Qt.filter(e=>!t.find(t=>t===e)):Qt;return n[[...e].reduce((e,t)=>e+t.charCodeAt(0),0)%n.length]}let en;var R,tn,nn,rn,an,on=re(e=>e.observedProps.endTime),sn,cn;let ln;new(en=(R=/*#__PURE__*/ new WeakMap,tn=class extends (an=ne){get rest(){return S(this,R)}set rest(e){w(this,R,e)}get endTimestamp(){return+new Date(this.props.endTime||Date.now())}get timeSections(){let{units:e}=this.observedProps,{rest:t}=this;return e.reduce((n,{label:r},i)=>{let a=e.slice(i).map(({scale:e})=>e).reduce((e,t)=>e*t,1),o=~~(t/a);return t-=o*a,n.push({value:o,label:r}),n},[])}stop(){this.timer&&(window.clearInterval(this.timer),this.timer=0)}componentDidMount(){super.componentDidMount(),this.initTimer()}initTimer(){this.stop(),this.tick(),this.timer=window.setInterval(this.tick,ae)}componentWillUnmount(){super.componentWillUnmount(),this.stop()}render(){let n=this.props,{className:a=``,itemClassName:s=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,units:c,endTime:l,onEnd:u}=n,d=t(n,[`className`,`itemClassName`,`units`,`endTime`,`onEnd`]),{timeSections:f}=this;return/*#__PURE__*/ r(`ol`,o(e({className:`list-unstyled m-0 ${a}`},d),{children:f.map(({value:e,label:t})=>/*#__PURE__*/ i(`li`,{className:s,children:[/*#__PURE__*/ r(`strong`,{children:(e+``).padStart(2,`0`)}),/*#__PURE__*/ r(`span`,{children:t})]},t))}))}constructor(...e){super(...e),C(this,R,{writable:!0,value:(cn(this),sn(this,0))}),s(this,`timer`,0),s(this,`tick`,()=>{let{onEnd:e,endTime:t}=this.props,n=this.endTimestamp-Date.now();n>0?this.rest=n:(this.rest=0,this.stop(),e==null||e(t))})}},{e:[sn,cn],c:[ln,rn]}=x(tn,[[D,1,`rest`],[E,3,`timeSections`],[on,2,`initTimer`]],[O],an),tn),nn=class extends T{constructor(){super(ln),s(this,`displayName`,`Countdown`),rn()}},s(nn,en,void 0),nn);var un,dn,fn,pn=class extends Error{constructor(e=`Dialog closed`){super(e)}},mn=/*#__PURE__*/ new WeakMap,hn=/*#__PURE__*/ new WeakMap,gn=class{get input(){return S(this,mn)}set input(e){w(this,mn,e)}get defer(){return S(this,hn)}set defer(e){w(this,hn,e)}open(e){return e&&(this.input=e),this.defer=new he,this.defer.promise.finally(()=>this.defer=void 0),this.defer.promise}constructor(t){C(this,mn,{writable:!0,value:(fn(this),un(this,{}))}),C(this,hn,{writable:!0,value:dn(this)}),s(this,`Component`,void 0),this.Component=O(n=>/*#__PURE__*/ r(t,o(e({},n,this.input),{defer:this.defer}))),this.Component.displayName=`DialogComponent`}};({e:[un,dn,fn]}=x(gn,[[D,1,`input`],[D,1,`defer`]],[]));let _n;var z,vn,yn,bn,xn,Sn,Cn;const wn=ge();let Tn;new(_n=(z=/*#__PURE__*/ new WeakMap,vn=class extends (xn=u){get innerValue(){return S(this,z)}set innerValue(e){w(this,z,e)}render(){let n=this.props,{name:a,required:s,children:c}=n,l=t(n,[`name`,`required`,`children`]),{innerValue:u}=this;return/*#__PURE__*/ i(`div`,{className:`form-control`,tabIndex:-1,onBlur:this.save,children:[/*#__PURE__*/ r(`input`,{hidden:!0,name:a,required:s,value:JSON.stringify(u)}),/*#__PURE__*/ r(wn,o(e({},l),{onInitialize:e=>{var t;this.core=e,(t=l.onInitialize)==null||t.call(l,e)}}))]})}constructor(...e){var t;super(...e),t=this,s(this,`core`,void 0),C(this,z,{writable:!0,value:(Cn(this),Sn(this,this.props.defaultValue))}),s(this,`save`,()=>A(function*(){return t.core&&(t.innerValue=yield t.core.save())})())}},{e:[Sn,Cn],c:[Tn,bn]}=x(vn,[[D,1,`innerValue`]],[O],xn),vn),yn=class extends T{constructor(){super(Tn),s(this,`displayName`,`Editor`),bn()}},s(yn,_n,void 0),yn);const En=_e({link:({data:{link:e}})=>`<a href="${e}">${e}</a>`}),Dn=n=>{let{data:i}=n,a=t(n,[`data`]);return/*#__PURE__*/ r(`article`,o(e({},a),{dangerouslySetInnerHTML:{__html:En.parse(i)}}))};Dn.displayName=`EditorHTML`;const B=n=>{let{className:i=``,children:a,maxWidth:s=`100%`,duration:c,height:l}=n,u=t(n,[`className`,`children`,`maxWidth`,`duration`,`height`]);return/*#__PURE__*/ r(`div`,o(e({className:`overflow-hidden mw-100 ${i}`},u),{children:/*#__PURE__*/ r(`div`,{className:`d-inline-block align-top text-nowrap lRDfma_scrollWrap`,style:{maxWidth:s,animationDuration:c,height:l,lineHeight:l},children:/*#__PURE__*/ r(`div`,{className:`d-inline-block lRDfma_scrollItem`,style:{animationDuration:c},children:a})})}))},On=({children:e,maxWidth:t,duration:n,height:a})=>a?/*#__PURE__*/ r(`div`,{className:`overflow-hidden lRDfma_scrollHeightWrap`,style:{maxWidth:t,"--scroll-height":a},children:/*#__PURE__*/ i(`div`,{className:`d-inline-block overflow-hidden mw-100 lRDfma_scrollContainer`,children:[/*#__PURE__*/ r(`div`,{className:`d-block overflow-hidden text-wrap text-break lRDfma_unScrollItem`,children:e}),/*#__PURE__*/ r(B,{duration:n,children:e})]})}):/*#__PURE__*/ r(B,{maxWidth:t,duration:n,height:a,children:e});B.displayName=`HorizontalMarquee`;const V=n=>{let{className:i,style:o,name:s,size:c}=n,l=t(n,[`className`,`style`,`name`,`size`]);return/*#__PURE__*/ r(`span`,e({className:a(`bi-${s}`,i),style:e({fontSize:c&&`${c}rem`},o)},l))};V.displayName=`Icon`;const kn=({scope:e,children:t})=>{let a=typeof t==`string`?t:Yt(/*#__PURE__*/ m(t)?t:/*#__PURE__*/ r(n,{children:t}));return/*#__PURE__*/ i(xe,{code:a,scope:e,language:`tsx`,children:[/*#__PURE__*/ r(be,{className:`mb-3`}),/*#__PURE__*/ r(ve,{}),/*#__PURE__*/ r(ye,{className:`text-danger small p-2`})]})},An=n=>{let{className:a=``,children:s=`Loading...`}=n,c=t(n,[`className`,`children`]);return/*#__PURE__*/ i(`div`,o(e({className:`fixed-top h-100 w-100 d-flex justify-content-center align-items-center opacity-25 bg-black ${a}`},c),{children:[/*#__PURE__*/ r(Ae,{animation:`border`,variant:`success`}),/*#__PURE__*/ r(`span`,{className:`ml-3 text-white`,children:s})]}))};An.displayName=`Loading`;var jn,Mn,Nn,Pn,Fn;const In=n=>{let{className:i}=n,s=t(n,[`className`]);return/*#__PURE__*/ r(Ue,o(e({},s),{className:a(`menu-item`,i)}))};let Ln;var Rn=/*#__PURE__*/ new WeakMap,zn=class extends (Mn=u){get open(){return S(this,Rn)}set open(e){w(this,Rn,e)}componentDidMount(){document.addEventListener(`pointerdown`,this.handleOutside)}componentWillUnmount(){document.removeEventListener(`pointerdown`,this.handleOutside)}items(){var e,t;return[...(e=(t=this.panel.current)==null?void 0:t.querySelectorAll(`a[href]:not([aria-disabled="true"]), button:not(:disabled):not([aria-disabled="true"])`))==null?[]:e].filter(e=>!e.closest(`[hidden]`))}render(){let n=this.props,{label:s,autoClose:c,align:l=`end`,menuClassName:u,toggleProps:d,onOpenChange:f,onKeyDown:p,onBlur:m,children:h,className:g,id:_}=n,v=t(n,[`label`,`autoClose`,`align`,`menuClassName`,`toggleProps`,`onOpenChange`,`onKeyDown`,`onBlur`,`children`,`className`,`id`]),{open:y}=this;return/*#__PURE__*/ i(`div`,o(e({},v),{ref:this.root,id:_,className:a(`position-relative`,g),onKeyDown:this.handleKeyDown,onBlur:this.handleBlur,children:[/*#__PURE__*/ r(Ue,o(e({},d),{ref:this.trigger,"aria-expanded":y,"aria-controls":_?`${_}-menu`:void 0,onClick:this.handleToggle,children:s})),/*#__PURE__*/ r(`div`,{ref:this.panel,id:_?`${_}-menu`:void 0,className:a(`menu top-100`,l===`end`?`end-0`:`start-0`,{show:y},u),hidden:!y,onClick:this.handleSelect,children:h})]}))}constructor(...e){super(...e),C(this,Rn,{writable:!0,value:(Fn(this),Nn(this,!1))}),s(this,`root`,/*#__PURE__*/ p()),s(this,`trigger`,/*#__PURE__*/ p()),s(this,`panel`,/*#__PURE__*/ p()),s(this,`setOpen`,Pn(this,e=>{var t,n;this.open!==e&&(this.open=e,(t=(n=this.props).onOpenChange)==null||t.call(n,e))})),s(this,`handleOutside`,({target:e})=>{var t;let{autoClose:n=!0}=this.props;n!==!1&&n!==`inside`&&e instanceof Node&&!((t=this.root.current)!=null&&t.contains(e))&&this.setOpen(!1)}),s(this,`handleKeyDown`,e=>{var t,n;(t=(n=this.props).onKeyDown)==null||t.call(n,e);let{key:r,defaultPrevented:i}=e;if(!i){if(r===`Escape`&&this.open){var a;return e.preventDefault(),this.setOpen(!1),(a=this.trigger.current)==null?void 0:a.focus()}if(r===`Tab`)return this.setOpen(!1);[`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(r)&&(e.preventDefault(),this.setOpen(!0),queueMicrotask(()=>{var e;let t=this.items(),n=t.findIndex(e=>e===document.activeElement),i=r===`Home`?0:t.length-1;r===`ArrowDown`&&(i=(n+1)%t.length),r===`ArrowUp`&&(i=n<=0?t.length-1:n-1),(e=t[i])==null||e.focus()}))}}),s(this,`handleBlur`,e=>{let{onBlur:t,autoClose:n=!0}=this.props;t==null||t(e);let{defaultPrevented:r,currentTarget:i,relatedTarget:a}=e;!r&&n!==!1&&n!==`inside`&&!i.contains(a)&&this.setOpen(!1)}),s(this,`handleToggle`,()=>this.setOpen(!this.open)),s(this,`handleSelect`,({target:e})=>{let{autoClose:t=!0}=this.props;t&&t!==`outside`&&e instanceof Element&&e.closest(`a[href], button:not(:disabled)`)&&this.setOpen(!1)})}};({e:[Nn,Pn,Fn],c:[Ln,jn]}=x(zn,[[D,1,`open`],[te,0,`setOpen`]],[O],Mn)),jn();const Bn=n=>{let{title:a,detail:s,children:c}=n,l=t(n,[`title`,`detail`,`children`]);return/*#__PURE__*/ r(De,o(e({},l),{overlay:s?/*#__PURE__*/ i(Oe,{children:[/*#__PURE__*/ r(Oe.Header,{children:a}),/*#__PURE__*/ r(Oe.Body,{children:s})]}):/*#__PURE__*/ r(Pe,{children:a}),children:c}))};Bn.displayName=`OverlayBox`;let Vn;var H,Hn,Un,Wn,Gn,Kn,qn;let Jn;new(Vn=(H=/*#__PURE__*/ new WeakMap,Hn=class extends (Gn=ne){get weekFormatter(){var e;let{locale:t=(e=globalThis.navigator)==null?void 0:e.language}=this.observedProps;return new Intl.DateTimeFormat(t,{weekday:`long`})}get currentDate(){return S(this,H)}set currentDate(e){w(this,H,e)}get dateGrid(){let e=new Date(this.currentDate);e.setDate(1),e=/* @__PURE__ */ new Date(+e-e.getDay()*ie);let t=Array.from(Array(42),(t,n)=>new Date(+e+n*ie));return pe(t,7)}changeMonth(e){var t,n;this.currentDate=ce(this.currentDate,e),(t=(n=this.props).onChange)==null||t.call(n,this.currentDate)}render(){let{weekFormatter:n,currentDate:a,dateGrid:s}=this,c=this.observedProps,{style:l,variant:u=`primary`,onChange:d,onSelect:f}=c,p=t(c,[`style`,`variant`,`onChange`,`onSelect`]);return/*#__PURE__*/ i(je,o(e({},p),{style:e({tableLayout:`fixed`},l),children:[/*#__PURE__*/ r(`caption`,{children:/*#__PURE__*/ i(`div`,{className:`d-flex justify-content-between align-items-center`,children:[/*#__PURE__*/ r(Ce,{variant:u,onClick:()=>this.changeMonth(-1),children:`<`}),k(a,`YYYY-MM`),/*#__PURE__*/ r(Ce,{variant:u,onClick:()=>this.changeMonth(1),children:`>`})]})}),/*#__PURE__*/ r(`thead`,{children:/*#__PURE__*/ r(`tr`,{children:s[0].map((e,t,{length:i})=>/*#__PURE__*/ r(`td`,{className:`bg-${u} text-white`,style:{width:`calc(100% / ${i})`},children:n.format(e)},t))})}),/*#__PURE__*/ r(`tbody`,{children:s.map(e=>/*#__PURE__*/ r(`tr`,{children:e.map(this.renderDate)},e[0]+``))})]}))}constructor(...e){super(...e),C(this,H,{writable:!0,value:(qn(this),Kn(this,/* @__PURE__ */ new Date))}),s(this,`renderDate`,e=>{let{variant:t=`primary`,value:n,onSelect:o}=this.observedProps,s=k(e,`YYYY-MM-DD`),c=n==null?void 0:n.filter(({date:e})=>k(e,`YYYY-MM-DD`)===s);return/*#__PURE__*/ i(`td`,{className:a({"opacity-50":e.getMonth()!==this.currentDate.getMonth(),"fw-bold":s===k(/* @__PURE__ */ new Date,`YYYY-MM-DD`)}),children:[/*#__PURE__*/ r(`time`,{className:`d-block`,dateTime:e.toJSON(),children:e.getDate()}),c==null?void 0:c.map(e=>typeof e.content==`object`?e.content:/*#__PURE__*/ r(Bn,{title:e.content,children:/*#__PURE__*/ r(Se,{as:`a`,className:`d-inline-block text-decoration-none w-100 text-truncate`,bg:$t(e.content+``,[`light`]),href:e.link,onClick:()=>o==null?void 0:o(e),children:e.content})},e.date+``))]},e+``)})}},{e:[Kn,qn],c:[Jn,Wn]}=x(Hn,[[E,3,`weekFormatter`],[D,1,`currentDate`],[E,3,`dateGrid`]],[O],Gn),Hn),Un=class extends T{constructor(){super(Jn),s(this,`displayName`,`MonthCalendar`),Wn()}},s(Un,Vn,void 0),Un);const Yn=({avatar:e,name:t})=>/*#__PURE__*/ i(n,{children:[/*#__PURE__*/ r(Re,{size:2,style:{marginRight:`0.5rem`},src:e}),/*#__PURE__*/ r(`span`,{className:`align-middle`,children:t})]});Yn.displayName=`Nameplate`;var Xn={hiddenBackdrop:`Ocw1GG_hiddenBackdrop`},Zn=class extends u{get open(){var e,t;return(e=(t=this.element.current)==null?void 0:t.open)!=null&&e}componentWillUnmount(){this.close()}render(){let n=this.props,{modal:i,keyboard:s,backdrop:c=!0,className:l,onCancel:u,onClick:d,onKeyDown:f}=n,p=t(n,[`modal`,`keyboard`,`backdrop`,`className`,`onCancel`,`onClick`,`onKeyDown`]);return/*#__PURE__*/ r(`dialog`,o(e({},p),{ref:this.element,className:a(`dialog`,c===!1&&Xn.hiddenBackdrop,l),"data-backdrop":c===!1?`false`:void 0,onCancel:this.handleCancel,onKeyDown:this.handleKeyDown,onClick:this.handleClick}))}constructor(...e){super(...e),s(this,`element`,/*#__PURE__*/ p()),s(this,`returnFocus`,void 0),s(this,`show`,()=>{if(this.open)return;let e=this.element.current;e&&(document.activeElement instanceof HTMLElement&&(this.returnFocus=document.activeElement),this.props.modal===!1?e.show():e.showModal())}),s(this,`close`,()=>{var e,t;this.open&&((e=this.element.current)==null||e.close(),(t=this.returnFocus)==null||t.focus())}),s(this,`handleCancel`,e=>{let{onCancel:t,keyboard:n=!0}=this.props;t==null||t(e);let{defaultPrevented:r}=e;e.preventDefault(),n&&!r&&this.close()}),s(this,`handleKeyDown`,e=>{let{onKeyDown:t,keyboard:n=!0}=this.props;t==null||t(e);let{key:r,defaultPrevented:i}=e;r===`Escape`&&n&&!i&&(e.preventDefault(),this.close())}),s(this,`handleClick`,e=>{let{onClick:t,backdrop:n=!0}=this.props;t==null||t(e);let{defaultPrevented:r,target:i,currentTarget:a,clientX:o,clientY:s}=e;if(n!==!0||r||i!==a)return;let{left:c,right:l,top:u,bottom:d}=a.getBoundingClientRect();(o<c||o>l||s<u||s>d)&&this.close()})}};const Qn=n=>{let{expand:i,className:s}=n,c=t(n,[`expand`,`className`]);return/*#__PURE__*/ r(`nav`,o(e({},c),{className:a(`navbar`,i&&(i===!0?`navbar-expand`:`${i}:navbar-expand`),s)}))};let $n;var U,W,er,tr,nr,rr,ir,ar,or;const sr=Array.from([,,,,,,],(e,t)=>`h${++t}`)+``;let cr;new($n=(U=/*#__PURE__*/ new WeakMap,W=/*#__PURE__*/ new WeakMap,er=class extends (rr=u){get list(){return S(this,U)}set list(e){w(this,U,e)}get scrollY(){return S(this,W)}set scrollY(e){w(this,W,e)}get currentActiveId(){var e;let{list:t,scrollY:n}=this;return(e=t[t.findIndex(({top:e})=>e>n)-1])==null?void 0:e.id}componentDidMount(){globalThis.document&&(window.addEventListener(`scroll`,this.updateScrollY),this.list=Array.from(document.querySelectorAll(sr),e=>{var t;(t=e).id||(t.id=me());let{id:n,tagName:r,textContent:i,offsetTop:a}=e;return{id:n,level:+r[1],text:i.trim(),top:a}}))}componentWillUnmount(){var e,t;(e=(t=globalThis).removeEventListener)==null||e.call(t,`scroll`,this.updateScrollY)}render(){let{list:n}=this,i=this.props,{style:a,variant:s=`underline`}=i,c=t(i,[`style`,`variant`]);return/*#__PURE__*/ r(M,o(e({},c),{variant:s,style:e({flexDirection:`column`},a),children:n.map(this.renderLink)}))}constructor(...e){super(...e),C(this,U,{writable:!0,value:(or(this),ir(this,[]))}),C(this,W,{writable:!0,value:ar(this,0)}),s(this,`updateScrollY`,()=>this.scrollY=window.scrollY),s(this,`scrollTo`,e=>()=>{var t,n;setTimeout(()=>de(`[id="${e.id}"]`)),(t=(n=this.props).onItemClick)==null||t.call(n,e)}),s(this,`renderLink`,({id:e,level:t,text:n,top:i})=>{let{currentActiveId:a}=this,{depth:o=1/0}=this.props;return t<=o&&/*#__PURE__*/ r(M.Item,{style:{textIndent:`${t-1}rem`},children:/*#__PURE__*/ r(M.Link,{href:`#${e}`,active:a===e,onClick:this.scrollTo({id:e,level:t,text:n,top:i}),children:n})},e)})}},{e:[ir,ar,or],c:[cr,nr]}=x(er,[[D,1,`list`],[D,1,`scrollY`],[E,3,`currentActiveId`]],[O],rr),er),tr=class extends T{constructor(){super(cr),s(this,`displayName`,`PageNav`),nr()}},s(tr,$n,void 0),tr);let lr;var G,K,q,ur,dr,fr,pr,mr,hr,gr,_r;let vr;new(lr=(G=/*#__PURE__*/ new WeakMap,K=/*#__PURE__*/ new WeakMap,q=/*#__PURE__*/ new WeakMap,ur=class extends (pr=u){get scrollLeft(){return S(this,G)}set scrollLeft(e){w(this,G,e)}get scrollWidth(){return S(this,K)}set scrollWidth(e){w(this,K,e)}get clientWidth(){return S(this,q)}set clientWidth(e){w(this,q,e)}get canScrollLeft(){return this.scrollLeft>0}get canScrollRight(){return this.scrollLeft+this.clientWidth<this.scrollWidth}componentDidMount(){let e=this.updateScroll();e&&(e.addEventListener(`scroll`,this.updateScroll),this.resizeObserver=new ResizeObserver(this.updateScroll),this.resizeObserver.observe(e))}componentWillUnmount(){var e,t;(e=this.resizeObserver)==null||e.disconnect(),(t=this.scrollerRef.current)==null||t.removeEventListener(`scroll`,this.updateScroll)}render(){let{canScrollLeft:n,canScrollRight:a}=this,s=this.props,{className:c=``,children:l}=s,u=t(s,[`className`,`children`]);return/*#__PURE__*/ i(`div`,{className:`position-relative overflow-y-hidden ${c}`,children:[n&&/*#__PURE__*/ r(`button`,{type:`button`,className:`position-absolute top-0 bottom-0 start-0 z-1 border-0 px-2 aEvBXq_scrollButtonLeft`,"aria-label":`Scroll left`,onClick:this.scrollBy(-1),children:/*#__PURE__*/ r(V,{name:`caret-left-fill`})}),/*#__PURE__*/ r(`div`,{ref:this.scrollerRef,className:`overflow-x-auto aEvBXq_scrollerInner`,children:/*#__PURE__*/ r(M,o(e({},u),{className:`flex-nowrap`,children:l}))}),a&&/*#__PURE__*/ r(`button`,{type:`button`,className:`position-absolute top-0 bottom-0 end-0 z-1 border-0 px-2 aEvBXq_scrollButtonRight`,"aria-label":`Scroll right`,onClick:this.scrollBy(1),children:/*#__PURE__*/ r(V,{name:`caret-right-fill`})})]})}constructor(...e){super(...e),s(this,`scrollerRef`,(_r(this),/*#__PURE__*/ p())),C(this,G,{writable:!0,value:mr(this,0)}),C(this,K,{writable:!0,value:hr(this,0)}),C(this,q,{writable:!0,value:gr(this,0)}),s(this,`updateScroll`,()=>{let e=this.scrollerRef.current;return e&&(this.scrollLeft=e.scrollLeft,this.scrollWidth=e.scrollWidth,this.clientWidth=e.clientWidth),e}),s(this,`resizeObserver`,void 0),s(this,`scrollBy`,e=>()=>{let t=this.scrollerRef.current;t&&t.scrollBy({left:e*t.clientWidth*.8,behavior:`smooth`})})}},{e:[mr,hr,gr,_r],c:[vr,fr]}=x(ur,[[D,1,`scrollLeft`],[D,1,`scrollWidth`],[D,1,`clientWidth`],[E,3,`canScrollLeft`],[E,3,`canScrollRight`]],[O],pr),ur),dr=class extends T{constructor(){super(vr),s(this,`displayName`,`ScrollNav`),fr()}},s(dr,lr,void 0),dr);const yr=n=>{let{value:i,children:a}=n,s=t(n,[`value`,`children`]);return/*#__PURE__*/ r(j.Item,o(e({},s),{"data-value":i,children:a}))};yr.displayName=`Option`;const br=({className:e,style:t,variant:n,menuVariant:o,children:s,value:c,onChange:l,valueRender:u})=>{let d=ue(s).flat(1/0).find(e=>/*#__PURE__*/ m(e)&&e.type===yr&&e.props.value===c);return/*#__PURE__*/ i(j,{onClick:({target:e})=>{let t=e.closest(`.dropdown-item`);if(!t)return;let{value:n}=t.dataset;l==null||l(n)},children:[/*#__PURE__*/ r(j.Toggle,{className:a(`w-100`,`d-flex`,`justify-content-between`,`align-items-center`,!n&&`bg-white text-dark`,e),style:t,variant:n,children:(u==null?void 0:u(c))||/*#__PURE__*/ r(`div`,{className:d==null?void 0:d.props.className,children:d==null?void 0:d.props.children})}),/*#__PURE__*/ r(j.Menu,{variant:o,children:s})]})};br.displayName=`Select`;let xr;var J,Y,Sr,Cr,wr,Tr,Er,Dr,Or;function kr(e,t,n){return A(function*(){let r=yield Fe(e,{useCORS:!0});return new Promise((e,i)=>r.toBlob(t=>t?e(URL.createObjectURL(t)):i(),t,n))})()}let Ar;new(xr=(J=/*#__PURE__*/ new WeakMap,Y=/*#__PURE__*/ new WeakMap,Sr=class extends (Tr=u){get loading(){return S(this,J)}set loading(e){w(this,J,e)}get imageURI(){return S(this,Y)}set imageURI(e){w(this,Y,e)}componentDidMount(){var e,t;(e=(t=globalThis).addEventListener)==null||e.call(t,`resize`,this.generateImage)}componentWillUnmount(){var e,t;(e=(t=globalThis).removeEventListener)==null||e.call(t,`resize`,this.generateImage)}render(){let a=this.props,{className:s=``,children:c}=a,l=t(a,[`className`,`children`]),{loading:u,imageURI:d}=this;return/*#__PURE__*/ i(n,{children:[u&&/*#__PURE__*/ r(An,{}),/*#__PURE__*/ i(`div`,o(e({},l),{ref:this.root,className:`position-relative ${s}`,onMouseEnter:d?void 0:this.generateImage,onTouchStart:d?void 0:this.generateImage,children:[c,d&&/*#__PURE__*/ r(Ee,{className:`position-absolute start-0 top-0 w-100 h-100`,src:d,alt:`Share Image`,fluid:!0,onClick:this.share})]}))]})}constructor(...t){var n;super(...t),n=this,s(this,`root`,(Or(this),/*#__PURE__*/ p())),C(this,J,{writable:!0,value:Er(this,!1)}),C(this,Y,{writable:!0,value:Dr(this,``)}),s(this,`generateImage`,()=>A(function*(){n.imageURI&&(URL.revokeObjectURL(n.imageURI),n.imageURI=``),n.loading=!0,n.imageURI=yield kr(n.root.current),n.loading=!1})()),s(this,`share`,t=>A(function*(){var r,i;t.stopPropagation();let a=yield se(n.imageURI),o=new File([a],`${n.props.title}.png`,{type:a.type});yield(r=(i=navigator).share)==null?void 0:r.call(i,e({files:[o]},n.props))})())}},{e:[Er,Dr,Or],c:[Ar,wr]}=x(Sr,[[D,1,`loading`],[D,1,`imageURI`]],[O],Tr),Sr),Cr=class extends T{constructor(){super(Ar),s(this,`displayName`,`ShareBox`),wr()}},s(Cr,xr,void 0),Cr);const jr=a=>{let{animation:s,loading:c,disabled:l,children:u}=a,d=t(a,[`animation`,`loading`,`disabled`,`children`]);return/*#__PURE__*/ i(Ce,o(e({},d),{disabled:c||l,children:[c&&/*#__PURE__*/ i(n,{children:[/*#__PURE__*/ r(Ae,{as:`span`,className:u?`me-2`:``,size:`sm`,animation:s,role:`status`,"aria-hidden":`true`}),!u&&/*#__PURE__*/ r(`span`,{className:`visually-hidden`,children:`Loading...`})]}),u]}))};jr.displayName=`SpinnerButton`;const Mr=n=>{let{animation:i=`border`,variant:a=`primary`,size:s,colSpan:c}=n,l=t(n,[`animation`,`variant`,`size`,`colSpan`]);return/*#__PURE__*/ r(`tr`,o(e({},l),{children:/*#__PURE__*/ r(`td`,{className:`text-center p-4`,colSpan:c,children:/*#__PURE__*/ r(Ae,{animation:i,variant:a,size:s})})}))};Mr.displayName=`TableSpinner`;let Nr;var X,Z,Pr,Fr,Ir,Lr,Rr,zr,Br;let Vr;new(Nr=(X=/*#__PURE__*/ new WeakMap,Z=/*#__PURE__*/ new WeakMap,Pr=class extends (Lr=u){get expanded(){return S(this,X)}set expanded(e){w(this,X,e)}get overflowed(){return S(this,Z)}set overflowed(e){w(this,Z,e)}componentDidMount(){this.checkOverflow(),window.addEventListener(`resize`,this.checkOverflow)}componentDidUpdate({rows:e,children:t}){this.expanded||t===this.props.children&&e===this.props.rows||this.checkOverflow()}componentWillUnmount(){window.removeEventListener(`resize`,this.checkOverflow)}render(){let n=this.props,{children:a,rows:s=3,expandText:c=`⏬`,collapseText:l=`⏫`}=n,u=t(n,[`children`,`rows`,`expandText`,`collapseText`]),{expanded:d,overflowed:f}=this,p={overflow:`hidden`,display:`-webkit-box`,WebkitBoxOrient:`vertical`,WebkitLineClamp:s};return/*#__PURE__*/ i(`div`,o(e({},u),{children:[/*#__PURE__*/ r(`p`,{ref:this.contentRef,style:d?void 0:p,children:a}),(f||d)&&/*#__PURE__*/ r(`button`,{type:`button`,className:`bg-transparent border-0 p-0`,"aria-expanded":d,onClick:this.toggle,children:d?l:c})]}))}constructor(...e){super(...e),C(this,X,{writable:!0,value:(Br(this),Rr(this,!1))}),C(this,Z,{writable:!0,value:zr(this,!1)}),s(this,`contentRef`,/*#__PURE__*/ p()),s(this,`checkOverflow`,()=>{let{current:e}=this.contentRef;e&&(this.overflowed=e.scrollHeight>e.clientHeight)}),s(this,`toggle`,()=>{this.expanded=!this.expanded,this.expanded||requestAnimationFrame(this.checkOverflow)})}},{e:[Rr,zr,Br],c:[Vr,Ir]}=x(Pr,[[D,1,`expanded`],[D,1,`overflowed`]],[O],Lr),Pr),Fr=class extends T{constructor(){super(Vr),s(this,`displayName`,`TextTruncate`),Ir()}},s(Fr,Nr,void 0),Fr);let Hr;var Q,Ur,Wr,Gr,Kr,qr=re(({observedProps:{dateTime:e,format:t}})=>e+t),Jr,Yr;let $;new(Hr=(Q=/*#__PURE__*/ new WeakMap,Ur=class extends (Kr=ne){updateText(){let{dateTime:e,format:t}=this.props;return k(e,t)}get timeText(){return S(this,Q)}set timeText(e){w(this,Q,e)}componentDidMount(){super.componentDidMount(),this.timeText=this.updateText()}render(){let n=this.props,{dateTime:i}=n,a=t(n,[`dateTime`]);return/*#__PURE__*/ r(`time`,o(e({dateTime:new Date(i).toJSON()},a),{children:this.timeText}))}constructor(...e){super(...e),C(this,Q,{writable:!0,value:(Yr(this),Jr(this,this.updateText()))})}},{e:[Jr,Yr],c:[$,Gr]}=x(Ur,[[qr,2,`updateText`],[D,1,`timeText`]],[O],Kr),Ur),Wr=class extends T{constructor(){super($),s(this,`displayName`,`Time`),Gr()}},s(Wr,Hr,void 0),Wr);const Xr={ms:`millisecond(s)`,s:`second(s)`,m:`minute(s)`,H:`hour(s)`,D:`day(s)`,W:`week(s)`,M:`month(s)`,Y:`year(s)`},Zr=n=>{let{date:r,unitWords:a=Xr,beforeWord:s=` before`,afterWord:c=` after`}=n,l=t(n,[`date`,`unitWords`,`beforeWord`,`afterWord`]);r=new Date(r);let{distance:u,unit:d}=le(r);return/*#__PURE__*/ i(`time`,o(e({},l),{dateTime:r.toJSON(),title:r.toLocaleString(),children:[Math.abs(u),` `,a[d],u<0?s:c]}))};Zr.displayName=`TimeDistance`;const Qr=n=>{let{className:a,events:s,timeFormat:c}=n,l=t(n,[`className`,`events`,`timeFormat`]);return/*#__PURE__*/ r(`ol`,o(e({className:`list-unstyled hsu__a_timeline ${a}`},l),{children:s.map(({title:t,summary:n,time:a,link:o,people:s})=>/*#__PURE__*/ r(`li`,{className:`position-relative hsu__a_timelineItem hsu__a_right`,children:/*#__PURE__*/ r(we,{children:/*#__PURE__*/ i(we.Body,{className:`p-4 d-flex flex-column gap-3 align-items-center`,children:[/*#__PURE__*/ r(`h3`,{className:`h5 m-0`,children:/*#__PURE__*/ r(`a`,{className:`text-decoration-none stretched-link`,href:o,children:t})}),/*#__PURE__*/ i(`div`,{className:`small text-muted d-flex gap-2`,children:[`⏲️`,/*#__PURE__*/ r($,{dateTime:a[0],format:c}),a[1]&&`~`,a[1]&&/*#__PURE__*/ r($,{dateTime:a[1],format:c})]}),/*#__PURE__*/ r(`ul`,{className:`list-unstyled m-0 d-flex gap-2 flex-wrap justify-content-around`,children:s==null?void 0:s.map(t=>/*#__PURE__*/ r(`li`,{children:/*#__PURE__*/ r(Yn,e({},t))},t.name))}),/*#__PURE__*/ r(`p`,{className:`m-0`,children:n})]})})},t))}))};Qr.displayName=`Timeline`;var $r,ei;const ti=/* @__PURE__ */ new Set([`warning`,`info`,`light`]);var ni=/*#__PURE__*/ new WeakMap,ri=class{get messages(){return S(this,ni)}set messages(e){w(this,ni,e)}open(t){let n=me(),r=Date.now(),{promise:i,resolve:a}=Promise.withResolvers();return this.messages=[...this.messages,o(e({id:n},t),{openedAt:r,resolve:a})],i}close(n){let r=this.messages.find(e=>e.id===n)||{},{resolve:i}=r,a=t(r,[`resolve`]);i==null||i(o(e({},a),{closedAt:Date.now()})),this.messages=this.messages.filter(e=>e.id!==n)}constructor(e=oe){s(this,`TimeScalar`,void 0),C(this,ni,{writable:!0,value:void 0}),s(this,`Component`,void 0),s(this,`renderMessage`,void 0),this.TimeScalar=e,w(this,ni,(ei(this),$r(this,[]))),this.Component=O(({position:e=`top-end`})=>/*#__PURE__*/ r(Ne,{position:e,className:`position-fixed p-3`,children:this.messages.map(this.renderMessage)})),this.renderMessage=({id:e,openedAt:t,title:n,body:a,variant:o,delay:s=3e3})=>{let c=o&&!ti.has(o)?`text-white`:void 0,l=!!n||s===0,u=this.TimeScalar.distanceOf(Date.now(),t).toShortString();return/*#__PURE__*/ i(Me,{bg:o,delay:s,autohide:s!==0,onClose:()=>this.close(e),children:[l&&/*#__PURE__*/ i(Me.Header,{children:[/*#__PURE__*/ r(`strong`,{className:`me-auto`,children:n}),/*#__PURE__*/ r(`small`,{children:u})]}),/*#__PURE__*/ r(Me.Body,{className:c,children:a})]},e)},this.Component.displayName=`ToastComponent`}};({e:[$r,ei]}=x(ri,[[D,1,`messages`]],[]));let ii;var ai,oi,si,ci,li,ui,di;let fi;new(ii=(ai=/*#__PURE__*/ new WeakMap,oi=class extends (li=u){get echoed(){return S(this,ai)}set echoed(e){w(this,ai,e)}render(){let n=this.props,{className:i,text:s}=n,c=t(n,[`className`,`text`]),{echoed:l}=this;return/*#__PURE__*/ r(`pre`,o(e({},c),{ref:this.init,className:a(`text-wrap`,i),children:l+(l===s?``:`_`)}))}constructor(...e){var t;super(...e),t=this,C(this,ai,{writable:!0,value:(di(this),ui(this,``))}),s(this,`init`,e=>e&&new IntersectionObserver(([{isIntersecting:e}],n)=>A(function*(){if(!e)return;n.disconnect();let{text:r,intervals:i=150}=t.props;for(let e of r)yield fe(i/1e3),t.echoed+=e})()).observe(e))}},{e:[ui,di],c:[fi,ci]}=x(oi,[[D,1,`echoed`]],[O],li),oi),si=class extends T{constructor(){super(fi),s(this,`displayName`,`TypeEcho`),ci()}},s(si,ii,void 0),si);const pi=({email:e,website:t})=>/*#__PURE__*/ i(`address`,{className:`mb-0 d-flex justify-content-around gap-2`,children:[e&&/*#__PURE__*/ r(`a`,{rel:`noreferrer`,target:`_blank`,href:`mailto:`+e,children:/*#__PURE__*/ r(V,{name:`envelope`})}),t&&/*#__PURE__*/ r(`a`,{rel:`noreferrer`,target:`_blank`,href:t,children:/*#__PURE__*/ r(V,{name:`globe2`})})]}),mi=`X5DLia_image`;var hi=class extends f{render(){let n=this.props,{className:a=``,title:s,rank:c=[],linkOf:l}=n,u=t(n,[`className`,`title`,`rank`,`linkOf`]);return/*#__PURE__*/ i(ke,o(e({className:`X5DLia_rankBox ${a}`},u),{children:[/*#__PURE__*/ i(Te,{sm:12,xs:12,lg:7,children:[/*#__PURE__*/ i(`div`,{className:`shadow rounded-3 X5DLia_title`,children:[/*#__PURE__*/ i(`div`,{className:`X5DLia_medal`,children:[/*#__PURE__*/ r(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),/*#__PURE__*/ r(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),/*#__PURE__*/ r(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`})]}),/*#__PURE__*/ r(`h3`,{"data-text":s,className:`position-relative m-auto mb-0 fw-bold text-center`,children:s})]}),/*#__PURE__*/ r(ke,{as:`ul`,className:`mt-2 g-0 align-items-end text-center ps-0 pt-2 list-unstyled X5DLia_topUsers`,children:c.slice(0,3).map(this.renderMedal)})]}),/*#__PURE__*/ r(Te,{xs:12,sm:12,lg:5,children:/*#__PURE__*/ r(je,{className:`my-3 pt-2 X5DLia_restUsers`,responsive:!0,children:/*#__PURE__*/ r(`tbody`,{children:c.slice(3,10).map(this.renderRow)})})})]}))}constructor(...t){super(...t),s(this,`renderMedal`,t=>{var n,a;return/*#__PURE__*/ i(Te,{as:`li`,children:[/*#__PURE__*/ r(`div`,{className:`shadow-lg overflow-hidden rounded-circle m-auto ${mi}`,children:/*#__PURE__*/ r(Ee,{src:t.avatar,alt:t.name,loading:`lazy`,fluid:!0})}),/*#__PURE__*/ i(`div`,{className:`position-relative overflow-hidden X5DLia_topUser`,children:[/*#__PURE__*/ i(`div`,{className:`position-relative`,children:[/*#__PURE__*/ r(`i`,{className:`d-block overflow-hidden m-auto mb-1 rounded-circle`}),/*#__PURE__*/ r(`a`,{className:`d-block mb-0 stretched-link`,href:((n=(a=this.props).linkOf)==null?void 0:n.call(a,t))||`#`,children:t.name}),/*#__PURE__*/ r(`strong`,{children:t.score})]}),/*#__PURE__*/ r(pi,e({},t))]})]},t.id)}),s(this,`renderRow`,(t,n,{length:a})=>{var o,s;return/*#__PURE__*/ i(`tr`,{className:`position-relative`,children:[/*#__PURE__*/ r(`td`,{className:`align-middle`,children:/*#__PURE__*/ r(Se,{className:`fw-bold fst-italic`,children:(n+4+``).padStart((a+``).length,`0`)})}),/*#__PURE__*/ i(`td`,{className:`position-relative mw-50 text-truncate X5DLia_name`,children:[/*#__PURE__*/ r(`div`,{className:`d-inline-block overflow-hidden align-middle rounded-circle ${mi}`,children:/*#__PURE__*/ r(Ee,{src:t.avatar,alt:t.name,loading:`lazy`,fluid:!0})}),/*#__PURE__*/ r(`a`,{className:`ms-2 d-inline-block align-middle stretched-link`,style:{color:`rgb(248, ${(n+2)*15}, ${(n+2)*35})`},href:((o=(s=this.props).linkOf)==null?void 0:o.call(s,t))||`#`,children:t.name})]}),/*#__PURE__*/ r(`td`,{className:`align-middle`,children:t.score}),/*#__PURE__*/ r(`td`,{className:`align-middle`,children:/*#__PURE__*/ r(pi,e({},t))})]},t.id)})}};s(hi,`displayName`,`UserRankView`);const gi=n=>{let{className:i=``,children:a,duration:s}=n,c=t(n,[`className`,`children`,`duration`]);return/*#__PURE__*/ r(`div`,o(e({className:`overflow-hidden ${i}`},c),{children:/*#__PURE__*/ r(`div`,{className:`d-inline-block mw-100 mh-100 QBd6SG_scrollWrap`,style:{"--duration":s},children:/*#__PURE__*/ r(`div`,{className:`d-inline-block QBd6SG_scrollItem`,children:a})})}))};gi.displayName=`VerticalMarquee`;const _i=[`🐵`,`🐔`,`🐶`,`🐷`,`🐭`,`🐮`,`🐯`,`🐰`,`🐲`,`🐍`,`🐴`,`🐐`],vi=e=>{let t=e<0?e+1:e;return _i[(t%12+12)%12]},yi=n=>{let{className:a=``,itemClassName:s=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,startYear:c,endYear:l=(/* @__PURE__ */ new Date()).getFullYear(),itemOf:u}=n,d=t(n,[`className`,`itemClassName`,`startYear`,`endYear`,`itemOf`]);return/*#__PURE__*/ r(`ol`,o(e({className:`list-unstyled m-0 d-flex flex-wrap justify-content-center gap-3 ${a}`},d),{children:Array.from({length:l-c+1},(e,t)=>{let n=l-t;if(n===0)return null;let a=vi(n),{link:o=`#`,title:c}=(u==null?void 0:u(n,a))||{};return/*#__PURE__*/ r(`li`,{className:s,children:/*#__PURE__*/ i(`a`,{className:`d-inline-block p-3 text-decoration-none text-center`,href:o,children:[/*#__PURE__*/ r(`div`,{className:`fs-1`,children:a}),c]})},n)})}))};yi.displayName=`ZodiacBar`;export{Re as Avatar,Be as Badge,Ue as Button,We as ClickBoundary,Zt as CodeBlock,ln as Countdown,gn as Dialog,pn as DialogClose,Tn as Editor,Dn as EditorHTML,B as HorizontalMarquee,On as HorizontalMarqueeBox,V as Icon,kn as LiveTSX,An as Loading,Ln as Menu,In as MenuItem,Jn as MonthCalendar,Yn as Nameplate,Zn as NativeDialog,Qn as Navbar,yr as Option,Bn as OverlayBox,cr as PageNav,vr as ScrollNav,br as Select,Ar as ShareBox,jr as SpinnerButton,Mr as TableSpinner,Vr as TextTruncate,$ as Time,Zr as TimeDistance,Qr as Timeline,ri as Toast,fi as TypeEcho,hi as UserRankView,Qt as VariantColors,gi as VerticalMarquee,yi as ZodiacBar,_i as ZodiacSigns,Le as animate,kr as elementToImage,En as parser,$t as text2color,vi as zodiacOf};
21
+ var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.memo`):60115,m=t?Symbol.for(`react.lazy`):60116;function h(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e=e&&e.$$typeof,e){case c:case d:case m:case p:case s:return e;default:return t}}case r:return t}}}e.ForwardRef=d,e.Memo=p,e.isContextConsumer=function(e){return h(e)===c},e.isContextProvider=function(e){return h(e)===s},e.isForwardRef=function(e){return h(e)===d},e.isLazy=function(e){return h(e)===m},e.isMemo=function(e){return h(e)===p},e.isProfiler=function(e){return h(e)===o},e.isStrictMode=function(e){return h(e)===a},e.isSuspense=function(e){return h(e)===f}})),We=/* @__PURE__ */ Se(((e,t)=>{t.exports=Ue()})),Ge=He(),F=We(),I=(function(e,t){return e===0?``:Array(e*t).fill(` `).join(``)});function Ke(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function qe(e){if(Array.isArray(e))return Ke(e)}function Je(e,t,n){return(t=tt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ye(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function Xe(){throw TypeError(`Invalid attempt to spread non-iterable instance.
22
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Ze(Object(n),!0).forEach(function(t){Je(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ze(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function $e(e){return qe(e)||Ye(e)||nt(e)||Xe()}function et(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function tt(e){var t=et(e,`string`);return typeof t==`symbol`?t:t+``}function L(e){"@babel/helpers - typeof";return L=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},L(e)}function nt(e,t){if(e){if(typeof e==`string`)return Ke(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ke(e,t):void 0}}function rt(e,t){if(e===null||L(e)!==`object`||e instanceof Date||e instanceof RegExp)return e;if(/*#__PURE__*/ c.isValidElement(e)){var n=Qe({},e);return delete n._owner,n}return t.add(e),Array.isArray(e)?e.map(function(e){return rt(e,t)}):Object.keys(e).sort().reduce(function(n,r){return n[r]=r===`current`||t.has(e[r])?`[Circular]`:rt(e[r],t),n},{})}function it(e){return rt(e,/* @__PURE__ */ new WeakSet)}var at=function(e){return{type:`string`,value:e}},ot=function(e){return{type:`number`,value:e}},st=function(e,t,n,r){return{type:`ReactElement`,displayName:e,props:t,defaultProps:n,childrens:r}},ct=function(e,t){return{type:`ReactFragment`,key:e,childrens:t}},lt=!!f,ut=function(e){return!e.name||e.name===`_default`?`No Display Name`:e.name},dt=function(e){switch(!0){case!!e.displayName:return e.displayName;case e.$$typeof===F.Memo:return dt(e.type);case e.$$typeof===F.ForwardRef:return dt(e.render);default:return ut(e)}},ft=function(e){switch(!0){case typeof e.type==`string`:return e.type;case typeof e.type==`function`:return e.type.displayName?e.type.displayName:ut(e.type);case(0,F.isForwardRef)(e):case(0,F.isMemo)(e):return dt(e.type);case(0,F.isContextConsumer)(e):return`${e.type._context.displayName||`Context`}.Consumer`;case(0,F.isContextProvider)(e):return`${e.type.displayName||`Context`}.Provider`;case(0,F.isLazy)(e):return`Lazy`;case(0,F.isProfiler)(e):return`Profiler`;case(0,F.isStrictMode)(e):return`StrictMode`;case(0,F.isSuspense)(e):return`Suspense`;default:return`UnknownElementType`}},pt=function(e,t){return t!==`children`},mt=function(e){return e!==!0&&e!==!1&&e!==null&&e!==``},ht=function(e,t){var n={};return Object.keys(e).filter(function(n){return t(e[n],n)}).forEach(function(t){return n[t]=e[t]}),n},R=function(e,t){var n=t.displayName,r=n===void 0?ft:n;if(typeof e==`string`)return at(e);if(typeof e==`number`)return ot(e);if(!/*#__PURE__*/ l.isValidElement(e))throw Error(`react-element-to-jsx-string: Expected a React.Element, got \`${L(e)}\``);var i=r(e),a=ht(e.props,pt),o=e.key;typeof o==`string`&&o.search(/^\./)&&(a.key=o);var s=ht(e.type.defaultProps||{},pt),c=l.Children.toArray(e.props.children).filter(mt).map(function(e){return R(e,t)});return lt&&e.type===f?ct(o,c):st(i,a,s,c)};function gt(){}var _t=function(e){return e.toString().split(`
23
+ `).map(function(e){return e.trim()}).join(``)},vt=(function(e,t){var n=t.functionValue,r=n===void 0?_t:n;return!t.showFunctions&&r===_t?r(gt):r(e)}),yt=(function(e,t,n,r){var i=it(e),a=(0,Ge.prettyPrint)(i,{transform:function(e,t,i){var a=e[t];return a&&/*#__PURE__*/ g(a)?z(R(a,r),!0,n,r):typeof a==`function`?vt(a,r):i}});return t?a.replace(/\s+/g,` `).replace(/{ /g,`{`).replace(/ }/g,`}`).replace(/\[ /g,`[`).replace(/ ]/g,`]`):a.replace(/\t/g,I(1,r.tabStop)).replace(/\n([^$])/g,`
24
+ ${I(n+1,r.tabStop)}$1`)}),bt=function(e){return e.replace(/"/g,`&quot;`)},xt=function(e,t,n,r){if(typeof e==`number`)return`{${String(e)}}`;if(typeof e==`string`)return`"${bt(e)}"`;if(L(e)===`symbol`){var i=e.valueOf().toString().replace(/Symbol\((.*)\)/,`$1`);return i?`{Symbol('${i}')}`:`{Symbol()}`}return typeof e==`function`?`{${vt(e,r)}}`:/*#__PURE__*/ g(e)?`{${z(R(e,r),!0,n,r)}}`:e instanceof Date?isNaN(e.valueOf())?`{new Date(NaN)}`:`{new Date("${e.toISOString()}")}`:Ve(e)||Array.isArray(e)?`{${yt(e,t,n,r)}}`:`{${String(e)}}`},St=(function(e,t,n,r,i,a,o,s){if(!t&&!r)throw Error(`The prop "${e}" has no value and no default: could not be formatted`);var c=t?n:i,l=s.useBooleanShorthandSyntax,u=s.tabStop,d=xt(c,a,o,s),f=` `,p=`
25
+ ${I(o+1,u)}`,m=d.includes(`
26
+ `);return l&&d===`{true}`?(f+=`${e}`,p+=`${e}`):(f+=`${e}=${d}`,p+=`${e}=${d}`),{attributeFormattedInline:f,attributeFormattedMultiline:p,isMultilineAttribute:m}}),Ct=(function(e,t){var n=e.slice(0,e.length>0?e.length-1:0),r=e[e.length-1];return r&&(t.type===`string`||t.type===`number`)&&(r.type===`string`||r.type===`number`)?n.push(at(String(r.value)+String(t.value))):(r&&n.push(r),n.push(t)),n}),wt=function(e){return[`key`,`ref`].includes(e)},Tt=(function(e){return function(t){var n=t.includes(`key`),r=t.includes(`ref`),i=t.filter(function(e){return!wt(e)}),a=$e(e?i.sort():i);return r&&a.unshift(`ref`),n&&a.unshift(`key`),a}});function Et(e,t){return Array.isArray(t)?function(e){return t.indexOf(e)===-1}:function(n){return t(e[n],n)}}var Dt=function(e,t,n,r,i){var a=i.tabStop;return e.type===`string`?t.split(`
27
+ `).map(function(e,t){return t===0?e:`${I(r,a)}${e}`}).join(`
28
+ `):t},Ot=function(e,t,n){return function(r){return Dt(r,z(r,e,t,n),e,t,n)}},kt=function(e,t){return function(n){var r=Object.keys(e).includes(n);return!r||r&&e[n]!==t[n]}},At=function(e,t,n,r,i){return i?I(n,r).length+t.length>i:e.length>1},jt=function(e,t,n,r,i,a,o){return(At(e,t,i,a,o)||n)&&!r},Mt=(function(e,t,n,r){var i=e.type,a=e.displayName,o=a===void 0?``:a,s=e.childrens,c=e.props,l=c===void 0?{}:c,u=e.defaultProps,d=u===void 0?{}:u;if(i!==`ReactElement`)throw Error(`The "formatReactElementNode" function could only format node of type "ReactElement". Given: ${i}`);var f=r.filterProps,p=r.maxInlineAttributesLineLength,m=r.showDefaultProps,h=r.sortProps,g=r.tabStop,_=`<${o}`,v=_,y=_,ee=!1,b=[],te=Et(l,f);Object.keys(l).filter(te).filter(kt(d,l)).forEach(function(e){return b.push(e)}),Object.keys(d).filter(te).filter(function(){return m}).filter(function(e){return!b.includes(e)}).forEach(function(e){return b.push(e)});var x=Tt(h)(b);if(x.forEach(function(e){var i=St(e,Object.keys(l).includes(e),l[e],Object.keys(d).includes(e),d[e],t,n,r),a=i.attributeFormattedInline,o=i.attributeFormattedMultiline;i.isMultilineAttribute&&(ee=!0),v+=a,y+=o}),y+=`
29
+ ${I(n,g)}`,_=jt(x,v,ee,t,n,g,p)?y:v,s&&s.length>0){var S=n+1;_+=`>`,t||(_+=`
30
+ `,_+=I(S,g)),_+=s.reduce(Ct,[]).map(Ot(t,S,r)).join(t?``:`
31
+ ${I(S,g)}`),t||(_+=`
32
+ `,_+=I(S-1,g)),_+=`</${o}>`}else At(x,v,n,g,p)||(_+=` `),_+=`/>`;return _}),Nt=``,Pt=`React.Fragment`,Ft=function(e,t,n){var r={};return t&&(r={key:t}),{type:`ReactElement`,displayName:e,props:r,defaultProps:{},childrens:n}},It=function(e){return!!e.key},Lt=function(e){return e.childrens.length===0},Rt=(function(e,t,n,r){var i=e.type,a=e.key,o=e.childrens;if(i!==`ReactFragment`)throw Error(`The "formatReactFragmentNode" function could only format node of type "ReactFragment". Given: ${i}`);return Mt(Ft(r.useFragmentShortSyntax?Lt(e)||It(e)?Pt:Nt:Pt,a,o),t,n,r)}),zt=[`<`,`>`,`{`,`}`],Bt=function(e){return zt.some(function(t){return e.includes(t)})},Vt=function(e){return Bt(e)?`{\`${e}\`}`:e},Ht=function(e){var t=e;return t.endsWith(` `)&&(t=t.replace(/^(.*?)(\s+)$/,`$1{'$2'}`)),t.startsWith(` `)&&(t=t.replace(/^(\s+)(.*)$/,`{'$1'}$2`)),t},z=(function(e,t,n,r){if(e.type===`number`)return String(e.value);if(e.type===`string`)return e.value?`${Ht(Vt(String(e.value)))}`:``;if(e.type===`ReactElement`)return Mt(e,t,n,r);if(e.type===`ReactFragment`)return Rt(e,t,n,r);throw TypeError(`Unknow format type "${e.type}"`)}),Ut=(function(e,t){return z(e,!1,0,t)}),Wt=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.filterProps,r=n===void 0?[]:n,i=t.showDefaultProps,a=i===void 0||i,o=t.showFunctions,s=o!==void 0&&o,c=t.functionValue,l=t.tabStop,u=l===void 0?2:l,d=t.useBooleanShorthandSyntax,f=d===void 0||d,p=t.useFragmentShortSyntax,m=p===void 0||p,h=t.sortProps,g=h===void 0||h,_=t.maxInlineAttributesLineLength,v=t.displayName;if(!e)throw Error(`react-element-to-jsx-string: Expected a ReactElement`);var y={filterProps:r,showDefaultProps:a,showFunctions:s,functionValue:c,tabStop:u,useBooleanShorthandSyntax:f,useFragmentShortSyntax:m,sortProps:g,maxInlineAttributesLineLength:_,displayName:v};return Ut(R(e,y),y)};const Gt=x({themes:[te,b],langs:[_,v,ee,y],engine:S()}),Kt=a=>{let{className:o=``,language:s,children:c}=a,l=n(a,[`className`,`language`,`children`]),u=typeof c==`string`?c:Wt(/*#__PURE__*/ g(c)?c:/*#__PURE__*/ i(r,{children:c})),d=Gt.codeToHtml(u,{lang:s,themes:{light:`github-light`,dark:`github-dark`},defaultColor:`light`,structure:`inline`});return/*#__PURE__*/ i(`pre`,t(e({className:`m-0 shiki language-${s} ${o}`},l),{children:/*#__PURE__*/ i(`code`,{dangerouslySetInnerHTML:{__html:d},className:`language-${s}`})}))},qt=[`primary`,`secondary`,`success`,`danger`,`warning`,`info`,`dark`,`light`];function Jt(e,t=[]){let n=t[0]?qt.filter(e=>!t.find(t=>t===e)):qt;return n[[...e].reduce((e,t)=>e+t.charCodeAt(0),0)%n.length]}let Yt;var B,Xt,Zt,Qt,$t,en=re(e=>e.observedProps.endTime),tn,nn;let rn;new(Yt=(B=/*#__PURE__*/ new WeakMap,Xt=class extends ($t=ne){get rest(){return w(this,B)}set rest(e){E(this,B,e)}get endTimestamp(){return+new Date(this.props.endTime||Date.now())}get timeSections(){let{units:e}=this.observedProps,{rest:t}=this;return e.reduce((n,{label:r},i)=>{let a=e.slice(i).map(({scale:e})=>e).reduce((e,t)=>e*t,1),o=~~(t/a);return t-=o*a,n.push({value:o,label:r}),n},[])}stop(){this.timer&&(window.clearInterval(this.timer),this.timer=0)}componentDidMount(){super.componentDidMount(),this.initTimer()}initTimer(){this.stop(),this.tick(),this.timer=window.setInterval(this.tick,ae)}componentWillUnmount(){super.componentWillUnmount(),this.stop()}render(){let r=this.props,{className:o=``,itemClassName:s=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,units:c,endTime:l,onEnd:u}=r,d=n(r,[`className`,`itemClassName`,`units`,`endTime`,`onEnd`]),{timeSections:f}=this;return/*#__PURE__*/ i(`ol`,t(e({className:`list-unstyled m-0 ${o}`},d),{children:f.map(({value:e,label:t})=>/*#__PURE__*/ a(`li`,{className:s,children:[/*#__PURE__*/ i(`strong`,{children:(e+``).padStart(2,`0`)}),/*#__PURE__*/ i(`span`,{children:t})]},t))}))}constructor(...e){super(...e),T(this,B,{writable:!0,value:(nn(this),tn(this,0))}),s(this,`timer`,0),s(this,`tick`,()=>{let{onEnd:e,endTime:t}=this.props,n=this.endTimestamp-Date.now();n>0?this.rest=n:(this.rest=0,this.stop(),e==null||e(t))})}},{e:[tn,nn],c:[rn,Qt]}=C(Xt,[[A,1,`rest`],[k,3,`timeSections`],[en,2,`initTimer`]],[j],$t),Xt),Zt=class extends D{constructor(){super(rn),s(this,`displayName`,`Countdown`),Qt()}},s(Zt,Yt,void 0),Zt);var an,on,sn,cn=class extends Error{constructor(e=`Dialog closed`){super(e)}},ln=/*#__PURE__*/ new WeakMap,un=/*#__PURE__*/ new WeakMap,dn=class{get input(){return w(this,ln)}set input(e){E(this,ln,e)}get defer(){return w(this,un)}set defer(e){E(this,un,e)}open(e){return e&&(this.input=e),this.defer=new me,this.defer.promise.finally(()=>this.defer=void 0),this.defer.promise}constructor(n){T(this,ln,{writable:!0,value:(sn(this),an(this,{}))}),T(this,un,{writable:!0,value:on(this)}),s(this,`Component`,void 0),this.Component=j(r=>/*#__PURE__*/ i(n,t(e({},r,this.input),{defer:this.defer}))),this.Component.displayName=`DialogComponent`}};({e:[an,on,sn]}=C(dn,[[A,1,`input`],[A,1,`defer`]],[]));var fn={hiddenBackdrop:`Ocw1GG_hiddenBackdrop`};const pn=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`dialog-header`,a)}))},mn=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`h1`,t(e({},s),{className:o(`dialog-title`,a)}))},hn=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`dialog-body`,a)}))},gn=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`dialog-footer`,a)}))};var _n=class extends d{get open(){var e,t;return(e=(t=this.element.current)==null?void 0:t.open)!=null&&e}componentDidMount(){this.props.open&&this.show()}componentDidUpdate({open:e}){this.props.open!==e&&(this.props.open?this.show():this.close())}componentWillUnmount(){this.close()}render(){let r=this.props,{open:a,modal:s,keyboard:c,backdrop:l=!0,theme:u,dialog:d=!0,className:f,onCancel:p,onClick:m,onKeyDown:h}=r,g=n(r,[`open`,`modal`,`keyboard`,`backdrop`,`theme`,`dialog`,`className`,`onCancel`,`onClick`,`onKeyDown`]);return/*#__PURE__*/ i(`dialog`,t(e({},g),{ref:this.element,className:o(d&&`dialog`,l===!1&&fn.hiddenBackdrop,f),"data-backdrop":l===!1?`false`:void 0,"data-bs-theme":u,onCancel:this.handleCancel,onKeyDown:this.handleKeyDown,onClick:this.handleClick}))}constructor(...e){super(...e),s(this,`element`,/*#__PURE__*/ h()),s(this,`returnFocus`,void 0),s(this,`show`,()=>{if(this.open)return;let e=this.element.current;e&&(document.activeElement instanceof HTMLElement&&(this.returnFocus=document.activeElement),this.props.modal===!1?e.show():e.showModal())}),s(this,`close`,()=>{var e,t;this.open&&((e=this.element.current)==null||e.close(),(t=this.returnFocus)==null||t.focus())}),s(this,`handleCancel`,e=>{let{onCancel:t,keyboard:n=!0}=this.props;t==null||t(e);let{defaultPrevented:r}=e;e.preventDefault(),n&&!r&&this.close()}),s(this,`handleKeyDown`,e=>{let{onKeyDown:t,keyboard:n=!0}=this.props;t==null||t(e);let{key:r,defaultPrevented:i}=e;r===`Escape`&&n&&!i&&(e.preventDefault(),this.close())}),s(this,`handleClick`,e=>{let{onClick:t,backdrop:n=!0}=this.props;t==null||t(e);let{defaultPrevented:r,target:i,currentTarget:a,clientX:o,clientY:s}=e;if(n!==!0||r||i!==a)return;let{left:c,right:l,top:u,bottom:d}=a.getBoundingClientRect();(o<c||o>l||s<u||s>d)&&this.close()})}};const vn=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`drawer-header`,a)}))},yn=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`h5`,t(e({},s),{className:o(`drawer-title`,a)}))},bn=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`drawer-body`,a)}))},xn=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`drawer-footer`,a)}))},Sn=r=>{let{title:s,placement:c=`end`,footer:l,bodyClassName:u,onDismiss:d,className:f,children:p}=r,m=n(r,[`title`,`placement`,`footer`,`bodyClassName`,`onDismiss`,`className`,`children`]);return/*#__PURE__*/ a(_n,t(e({},m),{dialog:!1,tabIndex:-1,"aria-label":typeof s==`string`?s:m[`aria-label`],className:o(`drawer`,`drawer-${c}`,f),onClose:d,children:[/*#__PURE__*/ a(vn,{children:[/*#__PURE__*/ i(yn,{children:s}),/*#__PURE__*/ i(ze,{onClick:d})]}),/*#__PURE__*/ i(bn,{className:u,children:p}),l&&/*#__PURE__*/ i(xn,{children:l})]}))};Sn.displayName=`Drawer`;let Cn;var V,wn,Tn,En,Dn,On,kn;const An=he();let jn;new(Cn=(V=/*#__PURE__*/ new WeakMap,wn=class extends (Dn=d){get innerValue(){return w(this,V)}set innerValue(e){E(this,V,e)}render(){let r=this.props,{name:o,required:s,children:c}=r,l=n(r,[`name`,`required`,`children`]),{innerValue:u}=this;return/*#__PURE__*/ a(`div`,{className:`form-control`,tabIndex:-1,onBlur:this.save,children:[/*#__PURE__*/ i(`input`,{hidden:!0,name:o,required:s,value:JSON.stringify(u)}),/*#__PURE__*/ i(An,t(e({},l),{onInitialize:e=>{var t;this.core=e,(t=l.onInitialize)==null||t.call(l,e)}}))]})}constructor(...e){var t;super(...e),t=this,s(this,`core`,void 0),T(this,V,{writable:!0,value:(kn(this),On(this,this.props.defaultValue))}),s(this,`save`,()=>N(function*(){return t.core&&(t.innerValue=yield t.core.save())})())}},{e:[On,kn],c:[jn,En]}=C(wn,[[A,1,`innerValue`]],[j],Dn),wn),Tn=class extends D{constructor(){super(jn),s(this,`displayName`,`Editor`),En()}},s(Tn,Cn,void 0),Tn);const Mn=ge({link:({data:{link:e}})=>`<a href="${e}">${e}</a>`}),Nn=r=>{let{data:a}=r,o=n(r,[`data`]);return/*#__PURE__*/ i(`article`,t(e({},o),{dangerouslySetInnerHTML:{__html:Mn.parse(a)}}))};Nn.displayName=`EditorHTML`;const Pn=r=>{let{fluid:a,breakpoint:s,className:c}=r,l=n(r,[`fluid`,`breakpoint`,`className`]);return/*#__PURE__*/ i(`div`,t(e({},l),{className:o(s?`${s}:container`:a?`container-fluid`:`container`,c)}))},Fn=r=>{let{cols:a,sm:s,md:c,lg:l,xl:u,"2xl":d,className:f}=r,p=n(r,[`cols`,`sm`,`md`,`lg`,`xl`,`2xl`,`className`]),m=[[`sm`,s],[`md`,c],[`lg`,l],[`xl`,u],[`2xl`,d]];return/*#__PURE__*/ i(`div`,t(e({},p),{className:o(`row`,a!==void 0&&`row-cols-${a}`,m.map(([e,t])=>t!==void 0&&`${e}:row-cols-${t}`),f)}))},In=r=>{let{span:a,sm:s,md:c,lg:l,xl:u,"2xl":d,className:f}=r,p=n(r,[`span`,`sm`,`md`,`lg`,`xl`,`2xl`,`className`]),m=[[`sm`,s],[`md`,c],[`lg`,l],[`xl`,u],[`2xl`,d]],h=m.some(([,e])=>e!==void 0);return/*#__PURE__*/ i(`div`,t(e({},p),{className:o(!a&&!h&&`col`,a!==void 0&&`col-${a}`,m.map(([e,t])=>t!==void 0&&(t===!0?`${e}:col`:`${e}:col-${t}`)),f)}))},H=r=>{let{className:a=``,children:o,maxWidth:s=`100%`,duration:c,height:l}=r,u=n(r,[`className`,`children`,`maxWidth`,`duration`,`height`]);return/*#__PURE__*/ i(`div`,t(e({className:`overflow-hidden max-w-100 ${a}`},u),{children:/*#__PURE__*/ i(`div`,{className:`d-inline-block align-top text-nowrap lRDfma_scrollWrap`,style:{maxWidth:s,animationDuration:c,height:l,lineHeight:l},children:/*#__PURE__*/ i(`div`,{className:`d-inline-block lRDfma_scrollItem`,style:{animationDuration:c},children:o})})}))},Ln=({children:e,maxWidth:t,duration:n,height:r})=>r?/*#__PURE__*/ i(`div`,{className:`overflow-hidden lRDfma_scrollHeightWrap`,style:{maxWidth:t,"--scroll-height":r},children:/*#__PURE__*/ a(`div`,{className:`d-inline-block overflow-hidden max-w-100 lRDfma_scrollContainer`,children:[/*#__PURE__*/ i(`div`,{className:`d-block overflow-hidden text-wrap text-break lRDfma_unScrollItem`,children:e}),/*#__PURE__*/ i(H,{duration:n,children:e})]})}):/*#__PURE__*/ i(H,{maxWidth:t,duration:n,height:r,children:e});H.displayName=`HorizontalMarquee`;const U=t=>{let{className:r,style:a,name:s,size:c}=t,l=n(t,[`className`,`style`,`name`,`size`]);return/*#__PURE__*/ i(`span`,e({className:o(`bi-${s}`,r),style:e({fontSize:c&&`${c}rem`},a)},l))};U.displayName=`Icon`;const W=r=>{let{fluid:a,thumbnail:s,className:c}=r,l=n(r,[`fluid`,`thumbnail`,`className`]);return/*#__PURE__*/ i(`img`,t(e({},l),{className:o({"img-fluid":a,"img-thumbnail":s},c)}))};W.displayName=`Image`;const Rn=r=>{let{flush:a,numbered:s,horizontal:c,className:l}=r,u=n(r,[`flush`,`numbered`,`horizontal`,`className`]);return/*#__PURE__*/ i(`ul`,t(e({},u),{className:o(`list-group`,{"list-group-flush":a,"list-group-numbered":s},c&&(c===!0?`list-group-horizontal`:`${c}:list-group-horizontal`),l)}))},zn=e=>typeof e.href==`string`,Bn=e=>typeof e.type==`string`,Vn=r=>{let{theme:a,action:s,active:c,disabled:l,className:u}=r,d=n(r,[`theme`,`action`,`active`,`disabled`,`className`]),f=o(`list-group-item`,a&&`theme-${a}`,s&&`list-group-item-action`,{active:c,disabled:l},l&&`pe-none`,u);return zn(d)?/*#__PURE__*/ i(`a`,t(e({},d),{className:f,href:l?void 0:d.href,"aria-current":c?`true`:void 0,"aria-disabled":l||void 0,tabIndex:l?-1:d.tabIndex,onClick:l?void 0:d.onClick})):Bn(d)?/*#__PURE__*/ i(`button`,t(e({},d),{type:d.type||`button`,className:f,"aria-current":c?`true`:void 0,disabled:l})):/*#__PURE__*/ i(`li`,t(e({},d),{className:f,"aria-current":c?`true`:void 0,"aria-disabled":l||void 0}))};Rn.displayName=`ListGroup`,Vn.displayName=`ListGroupItem`;const Hn=({scope:e,children:t})=>{let n=typeof t==`string`?t:Wt(/*#__PURE__*/ g(t)?t:/*#__PURE__*/ i(r,{children:t}));return/*#__PURE__*/ a(be,{code:n,scope:e,language:`tsx`,children:[/*#__PURE__*/ i(ye,{className:`mb-3`}),/*#__PURE__*/ i(_e,{}),/*#__PURE__*/ i(ve,{className:`fg-danger small p-2`})]})},G=r=>{let{animation:a=`border`,size:s,theme:c,className:l}=r,u=n(r,[`animation`,`size`,`theme`,`className`]);return/*#__PURE__*/ i(`span`,t(e({},u),{className:o(`spinner-${a}`,s&&`spinner-${s}`,c&&`theme-${c}`,l)}))},Un=r=>{let{className:o=``,children:s=`Loading...`}=r,c=n(r,[`className`,`children`]);return/*#__PURE__*/ a(`div`,t(e({className:`fixed-top h-100 w-100 d-flex justify-content-center align-items-center opacity-25 bg-black ${o}`},c),{children:[/*#__PURE__*/ i(G,{theme:`success`}),/*#__PURE__*/ i(`span`,{className:`ms-3 fg-white`,children:s})]}))};Un.displayName=`Loading`;var Wn,Gn,Kn,qn,Jn,Yn,Xn,Zn,Qn,$n;const er=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(P,t(e({},s),{className:o(`menu-item`,a)}))},tr=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`menu`,a)}))},nr=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`span`,t(e({},s),{className:o(`menu-text`,a)}))},rr=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`h6`,t(e({},s),{className:o(`menu-header`,a)}))},ir=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`hr`,t(e({},s),{className:o(`menu-divider`,a)}))},ar=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`span`,t(e({},s),{className:o(`menu-item-content`,a)}))},or=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`small`,t(e({},s),{className:o(`menu-item-description`,a)}))};let sr;var cr=/*#__PURE__*/ new WeakMap,lr=class extends (Gn=d){get open(){return w(this,cr)}set open(e){E(this,cr,e)}render(){let{label:e,className:t,children:n}=this.props,{open:r}=this;return/*#__PURE__*/ a(`div`,{className:o(`submenu`,{show:r},t),onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onKeyDown:this.handleKeyDown,children:[/*#__PURE__*/ i(P,{className:`menu-item`,"aria-haspopup":`true`,"aria-expanded":r,onClick:this.handleClick,children:e}),/*#__PURE__*/ i(`div`,{ref:this.panel,className:o(`menu start-100 top-0`,{show:r}),hidden:!r,children:n})]})}constructor(...e){super(...e),T(this,cr,{writable:!0,value:(Jn(this),Kn(this,!1))}),s(this,`panel`,/*#__PURE__*/ h()),s(this,`setOpen`,qn(this,e=>{this.open=e})),s(this,`handleClick`,()=>this.setOpen(!this.open)),s(this,`handleMouseEnter`,()=>this.setOpen(!0)),s(this,`handleMouseLeave`,()=>this.setOpen(!1)),s(this,`handleKeyDown`,e=>{let{key:t}=e;t===`ArrowRight`&&(e.preventDefault(),this.setOpen(!0),queueMicrotask(()=>{var e,t;return(t=this.panel.current)==null||(e=t.querySelector(`a[href], button:not(:disabled)`))==null?void 0:e.focus()})),t===`ArrowLeft`&&this.open&&(e.preventDefault(),this.setOpen(!1))})}};({e:[Kn,qn,Jn],c:[sr,Wn]}=C(lr,[[A,1,`open`],[O,0,`setOpen`]],[j],Gn)),Wn();let ur;var dr=/*#__PURE__*/ new WeakMap,fr=class extends (Xn=d){get open(){return w(this,dr)}set open(e){E(this,dr,e)}componentDidMount(){document.addEventListener(`pointerdown`,this.handleOutside)}componentWillUnmount(){document.removeEventListener(`pointerdown`,this.handleOutside)}items(){var e,t;return[...(e=(t=this.panel.current)==null?void 0:t.querySelectorAll(`a[href]:not([aria-disabled="true"]), button:not(:disabled):not([aria-disabled="true"])`))==null?[]:e].filter(e=>!e.closest(`[hidden]`))}render(){let r=this.props,{label:s,autoClose:c,align:l=`end`,menuClassName:u,toggleProps:d,onOpenChange:f,onKeyDown:p,onBlur:m,children:h,className:g,id:_}=r,v=n(r,[`label`,`autoClose`,`align`,`menuClassName`,`toggleProps`,`onOpenChange`,`onKeyDown`,`onBlur`,`children`,`className`,`id`]),{open:y}=this;return/*#__PURE__*/ a(`div`,t(e({},v),{ref:this.root,id:_,className:o(`d-inline-block position-relative`,g),onKeyDown:this.handleKeyDown,onBlur:this.handleBlur,children:[/*#__PURE__*/ i(P,t(e({},d),{ref:this.trigger,"aria-expanded":y,"aria-controls":_?`${_}-menu`:void 0,onClick:this.handleToggle,children:s})),/*#__PURE__*/ i(`div`,{ref:this.panel,id:_?`${_}-menu`:void 0,className:o(`menu top-100`,l===`end`?`end-0`:`start-0`,{show:y},u),hidden:!y,onClick:this.handleSelect,children:h})]}))}constructor(...e){super(...e),T(this,dr,{writable:!0,value:($n(this),Zn(this,!1))}),s(this,`root`,/*#__PURE__*/ h()),s(this,`trigger`,/*#__PURE__*/ h()),s(this,`panel`,/*#__PURE__*/ h()),s(this,`setOpen`,Qn(this,e=>{var t,n;this.open!==e&&(this.open=e,(t=(n=this.props).onOpenChange)==null||t.call(n,e))})),s(this,`handleOutside`,({target:e})=>{var t;let{autoClose:n=!0}=this.props;n!==!1&&n!==`inside`&&e instanceof Node&&!((t=this.root.current)!=null&&t.contains(e))&&this.setOpen(!1)}),s(this,`handleKeyDown`,e=>{var t,n;(t=(n=this.props).onKeyDown)==null||t.call(n,e);let{key:r,defaultPrevented:i}=e;if(!i){if(r===`Escape`&&this.open){var a;return e.preventDefault(),this.setOpen(!1),(a=this.trigger.current)==null?void 0:a.focus()}if(r===`Tab`)return this.setOpen(!1);[`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(r)&&(e.preventDefault(),this.setOpen(!0),queueMicrotask(()=>{var e;let t=this.items(),n=t.findIndex(e=>e===document.activeElement),i=r===`Home`?0:t.length-1;r===`ArrowDown`&&(i=(n+1)%t.length),r===`ArrowUp`&&(i=n<=0?t.length-1:n-1),(e=t[i])==null||e.focus()}))}}),s(this,`handleBlur`,e=>{let{onBlur:t,autoClose:n=!0}=this.props;t==null||t(e);let{defaultPrevented:r,currentTarget:i,relatedTarget:a}=e;!r&&n!==!1&&n!==`inside`&&!i.contains(a)&&this.setOpen(!1)}),s(this,`handleToggle`,()=>this.setOpen(!this.open)),s(this,`handleSelect`,({target:e})=>{let{autoClose:t=!0}=this.props;t&&t!==`outside`&&e instanceof Element&&!e.closest(`.submenu > .menu-item`)&&e.closest(`a[href], button:not(:disabled)`)&&this.setOpen(!1)})}};({e:[Zn,Qn,$n],c:[ur,Yn]}=C(fr,[[A,1,`open`],[O,0,`setOpen`]],[j],Xn)),Yn();const pr={top:`top`,right:`end`,bottom:`bottom`,left:`start`},mr={top:`position-absolute start-50 translate-middle-x`,right:`position-absolute top-50 translate-middle-y`,bottom:`position-absolute start-50 translate-middle-x`,left:`position-absolute top-50 translate-middle-y`},hr=r=>{let{title:s,placement:c=`top`,show:l=!0,role:u=`tooltip`,className:d,children:f}=r,p=n(r,[`title`,`placement`,`show`,`role`,`className`,`children`]);return/*#__PURE__*/ a(`div`,t(e({},p),{className:o(`popover`,{show:l},`bs-popover-${pr[c]}`,d),role:u,"data-bs-placement":c,children:[/*#__PURE__*/ i(`div`,{className:o(`popover-arrow`,mr[c])}),/*#__PURE__*/ i(`h3`,{className:`popover-header`,children:s}),/*#__PURE__*/ i(`div`,{className:`popover-body`,children:f})]}))};hr.displayName=`Popover`;const gr=r=>{let{placement:s=`top`,show:c=!0,role:l=`tooltip`,className:u,children:d}=r,f=n(r,[`placement`,`show`,`role`,`className`,`children`]);return/*#__PURE__*/ a(`div`,t(e({},f),{className:o(`tooltip`,{show:c},`bs-tooltip-${pr[s]}`,u),role:l,"data-bs-placement":s,children:[/*#__PURE__*/ i(`div`,{className:o(`tooltip-arrow`,mr[s])}),/*#__PURE__*/ i(`div`,{className:`tooltip-inner`,children:d})]}))};gr.displayName=`Tooltip`;let _r;var K,vr,yr,br,xr,Sr,Cr,wr;const Tr={top:`bottom-100 start-50 translate-middle-x`,right:`top-50 start-100 translate-middle-y`,bottom:`top-100 start-50 translate-middle-x`,left:`top-50 end-100 translate-middle-y`},Er={top:{popover:`mb-3`,tooltip:`mb-2`},right:{popover:`ms-3`,tooltip:`ms-2`},bottom:{popover:`mt-3`,tooltip:`mt-2`},left:{popover:`me-3`,tooltip:`me-2`}};let q;new(_r=(K=/*#__PURE__*/ new WeakMap,vr=class extends (xr=d){get open(){return w(this,K)}set open(e){E(this,K,e)}componentWillUnmount(){document.removeEventListener(`pointerdown`,this.handleOutside),clearTimeout(this.timer)}componentDidMount(){document.addEventListener(`pointerdown`,this.handleOutside)}render(){let r=this.props,{title:s,detail:c,placement:l=`top`,trigger:u,delay:d,overlayClassName:f,children:p,className:h=``,onMouseEnter:_,onMouseLeave:v,onFocus:y,onBlur:ee,onClick:b,onKeyDown:te}=r,x=n(r,[`title`,`detail`,`placement`,`trigger`,`delay`,`overlayClassName`,`children`,`className`,`onMouseEnter`,`onMouseLeave`,`onFocus`,`onBlur`,`onClick`,`onKeyDown`]),S=this.open?this.id:void 0,C=Tr[l],w=Er[l][c?`popover`:`tooltip`],T=o(`position-absolute w-max`,C,w,f),E=/*#__PURE__*/ g(p)?/*#__PURE__*/ m(p,{"aria-describedby":[p.props[`aria-describedby`],S].filter(Boolean).join(` `)||void 0}):p;return/*#__PURE__*/ a(`span`,t(e({},x),{ref:this.root,className:`position-relative d-inline-block ${h}`,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onFocus:this.handleFocus,onBlur:this.handleBlur,onClick:this.handleClick,onKeyDown:this.handleKeyDown,children:[E,this.open&&(c?/*#__PURE__*/ i(hr,{id:S,className:T,title:s,placement:l,children:c}):/*#__PURE__*/ i(gr,{id:S,className:T,placement:l,children:s}))]}))}constructor(...e){super(...e),T(this,K,{writable:!0,value:(wr(this),Sr(this,!1))}),s(this,`id`,pe()),s(this,`root`,/*#__PURE__*/ h()),s(this,`timer`,void 0),s(this,`setOpen`,Cr(this,e=>this.open=e)),s(this,`hide`,()=>{clearTimeout(this.timer),this.setOpen(!1)}),s(this,`setOpenAfterDelay`,e=>{clearTimeout(this.timer);let{delay:t}=this.props,n=typeof t==`number`?t:t==null?void 0:t[e?`show`:`hide`];if(!n)return this.setOpen(e);this.timer=setTimeout(()=>this.setOpen(e),n)}),s(this,`hasTrigger`,e=>(this.props.trigger?Array.isArray(this.props.trigger)?this.props.trigger:[this.props.trigger]:[`hover`,`focus`]).includes(e)),s(this,`handleMouseEnter`,e=>{var t,n;(t=(n=this.props).onMouseEnter)==null||t.call(n,e),this.hasTrigger(`hover`)&&this.setOpenAfterDelay(!0)}),s(this,`handleMouseLeave`,e=>{var t,n,r;(t=(n=this.props).onMouseLeave)==null||t.call(n,e),this.hasTrigger(`hover`)&&!((r=this.root.current)!=null&&r.contains(document.activeElement))&&this.setOpenAfterDelay(!1)}),s(this,`handleFocus`,e=>{var t,n;(t=(n=this.props).onFocus)==null||t.call(n,e),this.hasTrigger(`focus`)&&this.setOpenAfterDelay(!0)}),s(this,`handleBlur`,e=>{var t,n;(t=(n=this.props).onBlur)==null||t.call(n,e),this.hasTrigger(`focus`)&&!e.currentTarget.contains(e.relatedTarget)&&this.setOpenAfterDelay(!1)}),s(this,`handleClick`,e=>{var t,n;(t=(n=this.props).onClick)==null||t.call(n,e),!e.defaultPrevented&&this.hasTrigger(`click`)&&this.setOpenAfterDelay(!this.open)}),s(this,`handleOutside`,({target:e})=>{var t;e instanceof Node&&!((t=this.root.current)!=null&&t.contains(e))&&this.hide()}),s(this,`handleKeyDown`,e=>{var t,n;(t=(n=this.props).onKeyDown)==null||t.call(n,e),e.key===`Escape`&&this.open&&(e.preventDefault(),this.hide())})}},{e:[Sr,Cr,wr],c:[q,br]}=C(vr,[[A,1,`open`],[O,0,`setOpen`]],[j],xr),vr),yr=class extends D{constructor(){super(q),s(this,`displayName`,`OverlayBox`),br()}},s(yr,_r,void 0),yr);let Dr;var J,Or,kr,Ar,jr,Mr,Nr;let Pr;new(Dr=(J=/*#__PURE__*/ new WeakMap,Or=class extends (jr=ne){get weekFormatter(){var e;let{locale:t=(e=globalThis.navigator)==null?void 0:e.language}=this.observedProps;return new Intl.DateTimeFormat(t,{weekday:`long`})}get currentDate(){return w(this,J)}set currentDate(e){E(this,J,e)}get dateGrid(){let e=new Date(this.currentDate);e.setDate(1),e=/* @__PURE__ */ new Date(+e-e.getDay()*ie);let t=Array.from(Array(42),(t,n)=>new Date(+e+n*ie));return fe(t,7)}changeMonth(e){var t,n;this.currentDate=ce(this.currentDate,e),(t=(n=this.props).onChange)==null||t.call(n,this.currentDate)}render(){let{weekFormatter:r,currentDate:o,dateGrid:s}=this,c=this.observedProps,{className:l=``,style:u,theme:d=`primary`,onChange:f,onSelect:p}=c,m=n(c,[`className`,`style`,`theme`,`onChange`,`onSelect`]);return/*#__PURE__*/ a(`table`,t(e({},m),{className:`table ${l}`,style:e({tableLayout:`fixed`},u),children:[/*#__PURE__*/ i(`caption`,{children:/*#__PURE__*/ a(`div`,{className:`d-flex justify-content-between align-items-center`,children:[/*#__PURE__*/ i(P,{theme:d,onClick:this.changePreviousMonth,children:`<`}),M(o,`YYYY-MM`),/*#__PURE__*/ i(P,{theme:d,onClick:this.changeNextMonth,children:`>`})]})}),/*#__PURE__*/ i(`thead`,{children:/*#__PURE__*/ i(`tr`,{children:s[0].map((e,t,{length:n})=>/*#__PURE__*/ i(`th`,{className:`theme-${d} theme-contrast`,style:{width:`calc(100% / ${n})`},scope:`col`,children:r.format(e)},t))})}),/*#__PURE__*/ i(`tbody`,{children:s.map(e=>/*#__PURE__*/ i(`tr`,{children:e.map(this.renderDate)},e[0]+``))})]}))}constructor(...e){super(...e),T(this,J,{writable:!0,value:(Nr(this),Mr(this,/* @__PURE__ */ new Date))}),s(this,`changePreviousMonth`,()=>this.changeMonth(-1)),s(this,`changeNextMonth`,()=>this.changeMonth(1)),s(this,`handleCellClick`,({target:e,currentTarget:t})=>{var n,r,i;if(!(e instanceof Element))return;let a=e.closest(`[data-calendar-index]`);if(!a||!t.contains(a))return;let o=a.dataset.calendarDate,s=Number(a.dataset.calendarIndex),c=(n=this.props.value)==null?void 0:n.filter(({date:e})=>M(e,`YYYY-MM-DD`)===o),l=c==null?void 0:c[s];l&&((r=(i=this.props).onSelect)==null||r.call(i,l))}),s(this,`renderDate`,e=>{let{value:t}=this.observedProps,n=M(e,`YYYY-MM-DD`),r=t==null?void 0:t.filter(({date:e})=>M(e,`YYYY-MM-DD`)===n);return/*#__PURE__*/ a(`td`,{className:o({"opacity-50":e.getMonth()!==this.currentDate.getMonth(),"fw-bold":n===M(/* @__PURE__ */ new Date,`YYYY-MM-DD`)}),onClick:this.handleCellClick,children:[/*#__PURE__*/ i(`time`,{className:`d-block`,dateTime:e.toJSON(),children:e.getDate()}),r==null?void 0:r.map((e,t)=>typeof e.content==`object`?e.content:/*#__PURE__*/ i(q,{title:e.content,children:/*#__PURE__*/ i(De,{className:`d-inline-block text-decoration-none w-100 text-truncate`,theme:Jt(e.content+``,[`light`]),"data-calendar-date":n,"data-calendar-index":t,href:e.link,children:e.content})},`${n}-${t}`))]},e+``)})}},{e:[Mr,Nr],c:[Pr,Ar]}=C(Or,[[k,3,`weekFormatter`],[A,1,`currentDate`],[k,3,`dateGrid`],[O,2,`changeMonth`]],[j],jr),Or),kr=class extends D{constructor(){super(Pr),s(this,`displayName`,`MonthCalendar`),Ar()}},s(kr,Dr,void 0),kr);const Fr=({avatar:e,name:t})=>/*#__PURE__*/ a(r,{children:[/*#__PURE__*/ i(we,{size:2,style:{marginRight:`0.5rem`},src:e}),/*#__PURE__*/ i(`span`,{className:`align-middle`,children:t})]});Fr.displayName=`Nameplate`;const Y=r=>{let{variant:a,vertical:s,fill:c,justified:l,className:u}=r,d=n(r,[`variant`,`vertical`,`fill`,`justified`,`className`]);return/*#__PURE__*/ i(`nav`,t(e({},d),{className:o(`nav`,a&&`nav-${a}`,s&&(a===`pills`?`nav-pills-vertical`:`flex-column`),{"nav-fill":c,"nav-justified":l},u)}))},Ir=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`li`,t(e({},s),{className:o(`nav-item`,a)}))},Lr=r=>{let{disabled:a,className:s,href:c,onClick:l,tabIndex:u}=r,d=n(r,[`disabled`,`className`,`href`,`onClick`,`tabIndex`]);return/*#__PURE__*/ i(`a`,t(e({},d),{href:a?void 0:c,tabIndex:a?-1:u,"aria-disabled":a||void 0,className:o(`nav-link`,{disabled:a,"pe-none":a},s),onClick:a?void 0:l}))};Y.displayName=`Nav`,Ir.displayName=`NavItem`,Lr.displayName=`NavLink`;const Rr=r=>{let{expand:a,theme:s,className:c}=r,l=n(r,[`expand`,`theme`,`className`]);return/*#__PURE__*/ i(`nav`,t(e({},l),{className:o(`navbar`,a&&(a===!0?`navbar-expand`:`${a}:navbar-expand`),c),"data-bs-theme":s}))},zr=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`a`,t(e({},s),{className:o(`navbar-brand`,a)}))},Br=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`ul`,t(e({},s),{className:o(`navbar-nav`,a)}))},Vr=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`span`,t(e({},s),{className:o(`navbar-text`,a)}))},Hr=r=>{let{expanded:a,className:s,"aria-label":c=`Toggle navigation`}=r,l=n(r,[`expanded`,`className`,`aria-label`]);return/*#__PURE__*/ i(P,t(e({},l),{type:`button`,className:o(`navbar-toggler`,s),"aria-label":c,"aria-expanded":a,icon:!0,children:/*#__PURE__*/ i(`span`,{className:`navbar-toggler-icon`,"aria-hidden":`true`})}))};Rr.displayName=`Navbar`,zr.displayName=`NavbarBrand`,Br.displayName=`NavbarNav`,Vr.displayName=`NavbarText`,Hr.displayName=`NavbarToggler`;let Ur;var X,Z,Wr,Gr,Kr,qr,Jr,Yr,Xr;const Zr=Array.from({length:6},(e,t)=>`h${t+1}`).join(`,`);let Q;new(Ur=(X=/*#__PURE__*/ new WeakMap,Z=/*#__PURE__*/ new WeakMap,Wr=class extends (qr=d){get list(){return w(this,X)}set list(e){E(this,X,e)}get scrollY(){return w(this,Z)}set scrollY(e){E(this,Z,e)}get currentActiveId(){var e;let{list:t,scrollY:n}=this;return(e=t[t.findIndex(({top:e})=>e>n)-1])==null?void 0:e.id}componentDidMount(){globalThis.document&&(window.addEventListener(`scroll`,this.updateScrollY),this.initList())}static slugOf(e){let t=e.toLowerCase().replace(/\W+/g,`-`).replace(/^-+|-+$/g,``);return!t||document.getElementById(t)?pe():t}initList(){let{rootSelector:e}=this.props,t=e?document.querySelector(e):document;t&&(this.list=Array.from(t.querySelectorAll(Zr),e=>{var t;let n=e.textContent.trim();(t=e).id||(t.id=Q.slugOf(n));let{id:r,tagName:i,offsetTop:a}=e;return{id:r,level:+i[1],text:n,top:a}}))}componentWillUnmount(){var e,t;(e=(t=globalThis).removeEventListener)==null||e.call(t,`scroll`,this.updateScrollY)}render(){let{list:r}=this,a=this.props,{depth:o,minDepth:s,rootSelector:c,onItemClick:l}=a,u=n(a,[`depth`,`minDepth`,`rootSelector`,`onItemClick`]);return/*#__PURE__*/ i(Y,t(e({},u),{variant:`underline`,vertical:!0,children:r.map(this.renderLink)}))}constructor(...e){super(...e),T(this,X,{writable:!0,value:(Xr(this),Jr(this,[]))}),T(this,Z,{writable:!0,value:Yr(this,0)}),s(this,`updateScrollY`,O(()=>this.scrollY=window.scrollY)),s(this,`scrollTo`,e=>()=>{var t,n;setTimeout(()=>ue(`[id="${e.id}"]`)),(t=(n=this.props).onItemClick)==null||t.call(n,e)}),s(this,`renderLink`,({id:e,level:t,text:n,top:r})=>{let{currentActiveId:a}=this,{depth:o=1/0,minDepth:s=1}=this.props;return s<=t&&t<=o&&/*#__PURE__*/ i(Lr,{className:a===e?` active`:``,style:{textIndent:`${t-s}rem`},href:`#${e}`,"aria-current":a===e?`location`:void 0,onClick:this.scrollTo({id:e,level:t,text:n,top:r}),children:n},e)})}},{e:[Jr,Yr,Xr],c:[Q,Kr]}=C(Wr,[[A,1,`list`],[A,1,`scrollY`],[k,3,`currentActiveId`],[O,2,`initList`]],[j],qr),Wr),Gr=class extends D{constructor(){super(Q),s(this,`displayName`,`PageNav`),Kr()}},s(Gr,Ur,void 0),Gr);var Qr,$r,ei,ti,ni,ri,ii;let ai;var oi=/*#__PURE__*/ new WeakMap,si=/*#__PURE__*/ new WeakMap,ci=/*#__PURE__*/ new WeakMap,li=class extends ($r=d){get scrollLeft(){return w(this,oi)}set scrollLeft(e){E(this,oi,e)}get scrollWidth(){return w(this,si)}set scrollWidth(e){E(this,si,e)}get clientWidth(){return w(this,ci)}set clientWidth(e){E(this,ci,e)}get canScrollLeft(){return this.scrollLeft>0}get canScrollRight(){return this.scrollLeft+this.clientWidth<this.scrollWidth}componentDidMount(){let e=this.updateScroll();e&&(e.addEventListener(`scroll`,this.updateScroll),this.resizeObserver=new ResizeObserver(this.updateScroll),this.resizeObserver.observe(e))}componentWillUnmount(){var e,t;(e=this.resizeObserver)==null||e.disconnect(),(t=this.scrollerRef.current)==null||t.removeEventListener(`scroll`,this.updateScroll)}render(){let{canScrollLeft:e,canScrollRight:t}=this,{className:n=``,children:r}=this.props;return/*#__PURE__*/ a(`div`,{className:`position-relative overflow-y-hidden ${n}`,children:[e&&/*#__PURE__*/ i(`button`,{type:`button`,className:`position-absolute top-0 bottom-0 start-0 z-1 border-0 px-2 aEvBXq_scrollButtonLeft`,"aria-label":`Scroll left`,onClick:this.scrollBackward,children:/*#__PURE__*/ i(U,{name:`caret-left-fill`})}),/*#__PURE__*/ i(`div`,{ref:this.scrollerRef,className:`overflow-x-auto aEvBXq_scrollerInner`,children:r}),t&&/*#__PURE__*/ i(`button`,{type:`button`,className:`position-absolute top-0 bottom-0 end-0 z-1 border-0 px-2 aEvBXq_scrollButtonRight`,"aria-label":`Scroll right`,onClick:this.scrollForward,children:/*#__PURE__*/ i(U,{name:`caret-right-fill`})})]})}constructor(...e){super(...e),s(this,`scrollerRef`,(ii(this),/*#__PURE__*/ h())),T(this,oi,{writable:!0,value:ei(this,0)}),T(this,si,{writable:!0,value:ti(this,0)}),T(this,ci,{writable:!0,value:ni(this,0)}),s(this,`updateScroll`,ri(this,()=>{let e=this.scrollerRef.current;return e&&(this.scrollLeft=e.scrollLeft,this.scrollWidth=e.scrollWidth,this.clientWidth=e.clientWidth),e})),s(this,`resizeObserver`,void 0),s(this,`scrollBy`,e=>{let t=this.scrollerRef.current;t==null||t.scrollBy({left:e*t.clientWidth*.8,behavior:`smooth`})}),s(this,`scrollBackward`,()=>this.scrollBy(-1)),s(this,`scrollForward`,()=>this.scrollBy(1))}};({e:[ei,ti,ni,ri,ii],c:[ai,Qr]}=C(li,[[A,1,`scrollLeft`],[A,1,`scrollWidth`],[A,1,`clientWidth`],[k,3,`canScrollLeft`],[k,3,`canScrollRight`],[O,0,`updateScroll`]],[j],$r)),Qr();const ui=r=>{let{className:a=``,children:o}=r,s=n(r,[`className`,`children`]);return/*#__PURE__*/ i(ai,{className:a,children:/*#__PURE__*/ i(Y,t(e({},s),{className:`flex-nowrap`,children:o}))})};ui.displayName=`ScrollNav`;const di=r=>{let{value:a,className:s,children:c}=r,l=n(r,[`value`,`className`,`children`]);return/*#__PURE__*/ i(`button`,t(e({},l),{type:`button`,className:o(`menu-item`,s),"data-value":a,children:c}))};di.displayName=`Option`;const fi=({align:e,className:t,menuClassName:n,children:r,theme:a=`primary`,variant:s=`solid`,size:c,disabled:l,style:d,value:f,onChange:p,valueRender:m})=>{var h;let _=u.toArray(r).find(e=>/*#__PURE__*/ g(e)&&e.type===di&&e.props.value===f);return/*#__PURE__*/ i(ur,{align:e,className:`w-100`,menuClassName:n,label:(h=m==null?void 0:m(f==null?``:f))==null?_==null?void 0:_.props.children:h,toggleProps:{className:o(`w-100 d-flex justify-content-between align-items-center`,t),theme:a,variant:s,size:c,disabled:l,style:d},onClick:({target:e})=>{if(!(e instanceof Element))return;let t=e.closest(`[data-value]`);t&&(p==null||p(t.dataset.value||``))},children:r})};fi.displayName=`Select`;let pi;var $,mi,hi,gi,_i,vi,yi,bi,xi;function Si(e,t,n){return N(function*(){let r=yield xe(e,{useCORS:!0});return new Promise((e,i)=>r.toBlob(t=>t?e(URL.createObjectURL(t)):i(),t,n))})()}let Ci;new(pi=($=/*#__PURE__*/ new WeakMap,mi=/*#__PURE__*/ new WeakMap,hi=class extends (vi=d){get loading(){return w(this,$)}set loading(e){E(this,$,e)}get imageURI(){return w(this,mi)}set imageURI(e){E(this,mi,e)}componentDidMount(){var e,t;(e=(t=globalThis).addEventListener)==null||e.call(t,`resize`,this.generateImage)}componentWillUnmount(){var e,t;(e=(t=globalThis).removeEventListener)==null||e.call(t,`resize`,this.generateImage)}render(){let o=this.props,{className:s=``,children:c}=o,l=n(o,[`className`,`children`]),{loading:u,imageURI:d}=this;return/*#__PURE__*/ a(r,{children:[u&&/*#__PURE__*/ i(Un,{}),/*#__PURE__*/ a(`div`,t(e({},l),{ref:this.root,className:`position-relative ${s}`,onMouseEnter:d?void 0:this.generateImage,onTouchStart:d?void 0:this.generateImage,children:[c,d&&/*#__PURE__*/ i(W,{className:`position-absolute start-0 top-0 w-100 h-100`,src:d,alt:`Share Image`,fluid:!0,onClick:this.share})]}))]})}constructor(...t){var n;super(...t),n=this,s(this,`root`,(xi(this),/*#__PURE__*/ h())),T(this,$,{writable:!0,value:yi(this,!1)}),T(this,mi,{writable:!0,value:bi(this,``)}),s(this,`generateImage`,()=>N(function*(){n.imageURI&&(URL.revokeObjectURL(n.imageURI),n.imageURI=``),n.loading=!0,n.imageURI=yield Si(n.root.current),n.loading=!1})()),s(this,`share`,t=>N(function*(){var r,i;t.stopPropagation();let a=yield se(n.imageURI),o=new File([a],`${n.props.title}.png`,{type:a.type});yield(r=(i=navigator).share)==null?void 0:r.call(i,e({files:[o]},n.props))})())}},{e:[yi,bi,xi],c:[Ci,_i]}=C(hi,[[A,1,`loading`],[A,1,`imageURI`]],[j],vi),hi),gi=class extends D{constructor(){super(Ci),s(this,`displayName`,`ShareBox`),_i()}},s(gi,pi,void 0),gi);const wi=o=>{let{animation:s,loading:c,disabled:l,children:u}=o,d=n(o,[`animation`,`loading`,`disabled`,`children`]);return/*#__PURE__*/ a(P,t(e({},d),{disabled:c||l,children:[c&&/*#__PURE__*/ a(r,{children:[/*#__PURE__*/ i(G,{className:u?`me-2`:``,size:`sm`,animation:s,role:`status`,"aria-hidden":`true`}),!u&&/*#__PURE__*/ i(`span`,{className:`visually-hidden`,children:`Loading...`})]}),u]}))};wi.displayName=`SpinnerButton`;const Ti=r=>{let{striped:a,stripedColumns:s,hover:c,bordered:l,borderless:u,small:d,responsive:f,className:p}=r,m=n(r,[`striped`,`stripedColumns`,`hover`,`bordered`,`borderless`,`small`,`responsive`,`className`]),h=/*#__PURE__*/ i(`table`,t(e({},m),{className:o(`table`,{"table-striped":a,"table-striped-columns":s,"table-hover":c,"table-bordered":l,"table-borderless":u,"table-sm":d},p)}));return f?/*#__PURE__*/ i(`div`,{className:o(`table-responsive`,f!==!0&&`${f}:table-responsive`),children:h}):h};Ti.displayName=`Table`;const Ei=r=>{let{animation:a=`border`,theme:o=`primary`,size:s,colSpan:c}=r,l=n(r,[`animation`,`theme`,`size`,`colSpan`]);return/*#__PURE__*/ i(`tr`,t(e({},l),{children:/*#__PURE__*/ i(`td`,{className:`text-center p-4`,colSpan:c,children:/*#__PURE__*/ i(G,{animation:a,theme:o,size:s,role:`status`,"aria-label":`Loading`})})}))};Ei.displayName=`TableSpinner`;let Di;var Oi,ki,Ai,ji,Mi,Ni,Pi,Fi,Ii;let Li;new(Di=(Oi=/*#__PURE__*/ new WeakMap,ki=/*#__PURE__*/ new WeakMap,Ai=class extends (Ni=d){get expanded(){return w(this,Oi)}set expanded(e){E(this,Oi,e)}get overflowed(){return w(this,ki)}set overflowed(e){E(this,ki,e)}componentDidMount(){this.checkOverflow(),window.addEventListener(`resize`,this.checkOverflow)}componentDidUpdate({rows:e,children:t}){this.expanded||t===this.props.children&&e===this.props.rows||this.checkOverflow()}componentWillUnmount(){window.removeEventListener(`resize`,this.checkOverflow)}render(){let{children:e,rows:t=3,expandText:n=`⏬`,collapseText:o}=this.props,{expanded:s,overflowed:c}=this,l={overflow:`hidden`,display:`-webkit-box`,WebkitBoxOrient:`vertical`,WebkitLineClamp:t};return/*#__PURE__*/ a(r,{children:[/*#__PURE__*/ i(`div`,{ref:this.contentRef,style:s?void 0:l,children:e}),(c||s)&&/*#__PURE__*/ i(`button`,{type:`button`,className:`bg-transparent border-0 p-0`,"aria-expanded":s,onClick:this.toggle,children:s?o:n})]})}constructor(...e){super(...e),T(this,Oi,{writable:!0,value:(Ii(this),Pi(this,!1))}),T(this,ki,{writable:!0,value:Fi(this,!1)}),s(this,`contentRef`,/*#__PURE__*/ h()),s(this,`checkOverflow`,O(()=>{let{current:e}=this.contentRef;e&&(this.overflowed=e.scrollHeight>e.clientHeight)})),s(this,`toggle`,O(()=>{this.expanded=!this.expanded,this.expanded||requestAnimationFrame(this.checkOverflow)}))}},{e:[Pi,Fi,Ii],c:[Li,Mi]}=C(Ai,[[A,1,`expanded`],[A,1,`overflowed`]],[j],Ni),Ai),ji=class extends D{constructor(){super(Li),s(this,`displayName`,`TextTruncateContent`),Mi()}},s(ji,Di,void 0),ji);const Ri=r=>{let{rows:a=3,expandText:o=`⏬`,collapseText:s=`⏫`,children:c}=r,l=n(r,[`rows`,`expandText`,`collapseText`,`children`]);return/*#__PURE__*/ i(`div`,t(e({},l),{children:/*#__PURE__*/ i(Li,{rows:a,expandText:o,collapseText:s,children:c})}))};Ri.displayName=`TextTruncate`;const zi=r=>{let{dateTime:a,format:o}=r,s=n(r,[`dateTime`,`format`]);return/*#__PURE__*/ i(`time`,t(e({dateTime:new Date(a).toJSON()},s),{children:M(a,o)}))};zi.displayName=`Time`;const Bi={ms:`millisecond(s)`,s:`second(s)`,m:`minute(s)`,H:`hour(s)`,D:`day(s)`,W:`week(s)`,M:`month(s)`,Y:`year(s)`},Vi=r=>{let{date:i,unitWords:o=Bi,beforeWord:s=` before`,afterWord:c=` after`}=r,l=n(r,[`date`,`unitWords`,`beforeWord`,`afterWord`]);i=new Date(i);let{distance:u,unit:d}=le(i);return/*#__PURE__*/ a(`time`,t(e({},l),{dateTime:i.toJSON(),title:i.toLocaleString(),children:[Math.abs(u),` `,o[d],u<0?s:c]}))};Vi.displayName=`TimeDistance`;const Hi=r=>{let{className:o,events:s,timeFormat:c}=r,l=n(r,[`className`,`events`,`timeFormat`]);return/*#__PURE__*/ i(`ol`,t(e({className:`list-unstyled hsu__a_timeline ${o}`},l),{children:s.map(({title:t,summary:n,time:r,link:o,people:s})=>/*#__PURE__*/ i(`li`,{className:`position-relative hsu__a_timelineItem hsu__a_right`,children:/*#__PURE__*/ i(Me,{children:/*#__PURE__*/ a(Pe,{className:`p-4 d-flex flex-column gap-3 align-items-center`,children:[/*#__PURE__*/ i(Ie,{className:`h5 m-0`,children:/*#__PURE__*/ i(`a`,{className:`text-decoration-none stretched-link`,href:o,children:t})}),/*#__PURE__*/ a(`div`,{className:`small fg-3 d-flex gap-2`,children:[`⏲️`,/*#__PURE__*/ i(zi,{dateTime:r[0],format:c}),r[1]&&`~`,r[1]&&/*#__PURE__*/ i(zi,{dateTime:r[1],format:c})]}),/*#__PURE__*/ i(`ul`,{className:`list-unstyled m-0 d-flex gap-2 flex-wrap justify-content-around`,children:s==null?void 0:s.map(t=>/*#__PURE__*/ i(`li`,{children:/*#__PURE__*/ i(Fr,e({},t))},t.name))}),/*#__PURE__*/ i(Le,{className:`m-0`,children:n})]})})},t))}))};Hi.displayName=`Timeline`;var Ui,Wi;const Gi={"top-start":`top-0 start-0`,"top-center":`top-0 start-50 translate-middle-x`,"top-end":`top-0 end-0`,"middle-start":`top-50 start-0 translate-middle-y`,"middle-center":`top-50 start-50 translate-middle`,"middle-end":`top-50 end-0 translate-middle-y`,"bottom-start":`bottom-0 start-0`,"bottom-center":`bottom-0 start-50 translate-middle-x`,"bottom-end":`bottom-0 end-0`},Ki=r=>{let{position:a=`top-end`,className:s,"aria-live":c=`polite`,"aria-atomic":l=!0}=r,u=n(r,[`position`,`className`,`aria-live`,`aria-atomic`]);return/*#__PURE__*/ i(`div`,t(e({},u),{className:o(`toast-container position-fixed p-3`,Gi[a],s),"aria-live":c,"aria-atomic":l}))},qi=r=>{let{theme:a,role:s=`status`,className:c}=r,l=n(r,[`theme`,`role`,`className`]);return/*#__PURE__*/ i(`div`,t(e({},l),{className:o(`toast show`,a&&`theme-${a}`,c),role:s}))},Ji=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`toast-header`,a)}))},Yi=r=>{let{className:a}=r,s=n(r,[`className`]);return/*#__PURE__*/ i(`div`,t(e({},s),{className:o(`toast-body`,a)}))};var Xi=/*#__PURE__*/ new WeakMap,Zi=class{get messages(){return w(this,Xi)}set messages(e){E(this,Xi,e)}open(n){var r;let i=pe(),a=Date.now(),{promise:o,resolve:s}=Promise.withResolvers(),c=n.delay===0?void 0:setTimeout(()=>this.close(i),(r=n.delay)==null?3e3:r),l=t(e({id:i},n),{openedAt:a,resolve:s,timer:c});return this.messages=[...this.messages,l],o}close(r){let i=this.messages.find(e=>e.id===r);if(!i)return;let{resolve:a,timer:o}=i,s=n(i,[`resolve`,`timer`]);clearTimeout(o),a==null||a(t(e({},s),{closedAt:Date.now()})),this.messages=this.messages.filter(e=>e.id!==r)}constructor(e=oe){s(this,`TimeScalar`,void 0),T(this,Xi,{writable:!0,value:void 0}),s(this,`Component`,void 0),s(this,`renderMessage`,void 0),s(this,`handleDismiss`,void 0),this.TimeScalar=e,E(this,Xi,(Wi(this),Ui(this,[]))),this.Component=j(({position:e})=>/*#__PURE__*/ i(Ki,{position:e,onClick:this.handleDismiss,children:this.messages.map(this.renderMessage)})),this.renderMessage=({id:e,openedAt:t,title:n,body:r,theme:o,delay:s=3e3})=>{let c=!!n||s===0,l=this.TimeScalar.distanceOf(Date.now(),t).toShortString();return/*#__PURE__*/ a(qi,{theme:o,children:[c&&/*#__PURE__*/ a(Ji,{children:[/*#__PURE__*/ i(`strong`,{className:`me-auto`,children:n}),/*#__PURE__*/ i(`small`,{children:l}),/*#__PURE__*/ i(`button`,{type:`button`,className:`btn-close`,"aria-label":`Close`,"data-toast-dismiss":e})]}),/*#__PURE__*/ i(Yi,{children:r})]},e)},this.handleDismiss=({target:e})=>{var t;if(!(e instanceof Element))return;let n=(t=e.closest(`[data-toast-dismiss]`))==null?void 0:t.dataset.toastDismiss;n&&this.close(n)},this.Component.displayName=`ToastComponent`}};({e:[Ui,Wi]}=C(Zi,[[A,1,`messages`],[O,2,`open`],[O,2,`close`]],[]));const Qi=r=>{let{type:s=`checkbox`,variant:c=`solid`,theme:l,name:u,value:d,checked:f,defaultChecked:p,disabled:m,className:h,children:g}=r,_=n(r,[`type`,`variant`,`theme`,`name`,`value`,`checked`,`defaultChecked`,`disabled`,`className`,`children`]);return/*#__PURE__*/ a(`label`,t(e({},_),{className:o(`btn-check`,`btn-${c}`,l&&`theme-${l}`,h),children:[/*#__PURE__*/ i(`input`,{type:s,name:u,value:d,checked:f,defaultChecked:p,disabled:m,autoComplete:`off`}),g]}))};Qi.displayName=`ToggleButton`;var $i,ea,ta,na,ra;let ia;var aa=/*#__PURE__*/ new WeakMap,oa=/*#__PURE__*/ new WeakMap,sa=class extends (ea=d){get echoed(){return w(this,aa)}set echoed(e){E(this,aa,e)}get started(){return w(this,oa)}set started(e){E(this,oa,e)}componentDidMount(){this.start()}render(){let r=this.props,{className:a,text:s,intervals:c}=r,l=n(r,[`className`,`text`,`intervals`]),{started:u,echoed:d}=this;return/*#__PURE__*/ i(`pre`,t(e({},l),{ref:this.init,className:o(`text-wrap`,a),children:u?d+(d===s?``:`_`):s}))}constructor(...e){var t;super(...e),t=this,T(this,aa,{writable:!0,value:(ra(this),ta(this,``))}),T(this,oa,{writable:!0,value:na(this,!1)}),s(this,`start`,O(()=>this.started=!0)),s(this,`echo`,O(e=>this.echoed+=e)),s(this,`init`,e=>{e&&new IntersectionObserver(([{isIntersecting:e}],n)=>N(function*(){if(!e)return;n.disconnect();let{text:r,intervals:i=150}=t.props;for(let e of r)yield de(i/1e3),t.echo(e)})()).observe(e)})}};({e:[ta,na,ra],c:[ia,$i]}=C(sa,[[A,1,`echoed`],[A,1,`started`]],[j],ea)),$i();const ca=r=>{let{text:a,intervals:o}=r,s=n(r,[`text`,`intervals`]);return/*#__PURE__*/ i(ia,t(e({},s),{text:a,intervals:o}))};ca.displayName=`TypeEcho`;const la=({email:e,website:t})=>/*#__PURE__*/ a(`address`,{className:`mb-0 d-flex justify-content-around gap-2`,children:[e&&/*#__PURE__*/ i(`a`,{rel:`noreferrer`,target:`_blank`,href:`mailto:`+e,children:/*#__PURE__*/ i(U,{name:`envelope`})}),t&&/*#__PURE__*/ i(`a`,{rel:`noreferrer`,target:`_blank`,href:t,children:/*#__PURE__*/ i(U,{name:`globe2`})})]}),ua=`X5DLia_image`,da=r=>{let{className:o=``,title:s,rank:c=[],linkOf:l}=r,u=n(r,[`className`,`title`,`rank`,`linkOf`]);return/*#__PURE__*/ i(Pn,t(e({className:o},u),{children:/*#__PURE__*/ a(Fn,{className:`X5DLia_rankBox`,children:[/*#__PURE__*/ a(In,{span:12,lg:7,children:[/*#__PURE__*/ a(`div`,{className:`shadow rounded-3 X5DLia_title`,children:[/*#__PURE__*/ a(`div`,{className:`X5DLia_medal`,children:[/*#__PURE__*/ i(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),/*#__PURE__*/ i(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),/*#__PURE__*/ i(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`})]}),/*#__PURE__*/ i(`h3`,{"data-text":s,className:`position-relative m-auto mb-0 fw-bold text-center`,children:s})]}),/*#__PURE__*/ i(`ul`,{className:`row mt-2 g-0 align-items-end text-center ps-0 pt-2 list-unstyled X5DLia_topUsers`,children:c.slice(0,3).map(t=>/*#__PURE__*/ a(`li`,{className:`col`,children:[/*#__PURE__*/ i(`div`,{className:`shadow-lg overflow-hidden rounded-circle m-auto ${ua}`,children:/*#__PURE__*/ i(W,{src:t.avatar,alt:t.name,loading:`lazy`,fluid:!0})}),/*#__PURE__*/ a(`div`,{className:`position-relative overflow-hidden X5DLia_topUser`,children:[/*#__PURE__*/ a(`div`,{className:`position-relative`,children:[/*#__PURE__*/ i(`i`,{className:`d-block overflow-hidden m-auto mb-1 rounded-circle`}),/*#__PURE__*/ i(`a`,{className:`d-block mb-0 stretched-link`,href:(l==null?void 0:l(t))||`#`,children:t.name}),/*#__PURE__*/ i(`strong`,{children:t.score})]}),/*#__PURE__*/ i(la,e({},t))]})]},t.id))})]}),/*#__PURE__*/ i(In,{span:12,lg:5,children:/*#__PURE__*/ i(Ti,{className:`my-3 pt-2 X5DLia_restUsers`,responsive:!0,children:/*#__PURE__*/ i(`tbody`,{children:c.slice(3,10).map((t,n,{length:r})=>/*#__PURE__*/ a(`tr`,{className:`position-relative`,children:[/*#__PURE__*/ i(`td`,{className:`align-middle`,children:/*#__PURE__*/ i(De,{className:`fw-bold fst-italic`,children:(n+4+``).padStart((r+``).length,`0`)})}),/*#__PURE__*/ a(`td`,{className:`position-relative text-truncate X5DLia_name`,children:[/*#__PURE__*/ i(`div`,{className:`d-inline-block overflow-hidden align-middle rounded-circle ${ua}`,children:/*#__PURE__*/ i(W,{src:t.avatar,alt:t.name,loading:`lazy`,fluid:!0})}),/*#__PURE__*/ i(`a`,{className:`ms-2 d-inline-block align-middle stretched-link`,style:{color:`rgb(248, ${(n+2)*15}, ${(n+2)*35})`},href:(l==null?void 0:l(t))||`#`,children:t.name})]}),/*#__PURE__*/ i(`td`,{className:`align-middle`,children:t.score}),/*#__PURE__*/ i(`td`,{className:`align-middle`,children:/*#__PURE__*/ i(la,e({},t))})]},t.id))})})})]})}))};da.displayName=`UserRankView`;const fa=r=>{let{className:a=``,children:o,duration:s}=r,c=n(r,[`className`,`children`,`duration`]);return/*#__PURE__*/ i(`div`,t(e({className:`overflow-hidden h-100 ${a}`},c),{children:/*#__PURE__*/ i(`div`,{className:`d-inline-block max-w-100 max-h-100 QBd6SG_scrollWrap`,style:{"--duration":s},children:/*#__PURE__*/ i(`div`,{className:`d-inline-block QBd6SG_scrollItem`,children:o})})}))};fa.displayName=`VerticalMarquee`;const pa=[`🐵`,`🐔`,`🐶`,`🐷`,`🐭`,`🐮`,`🐯`,`🐰`,`🐲`,`🐍`,`🐴`,`🐐`],ma=e=>{let t=e<0?e+1:e;return pa[(t%12+12)%12]},ha=r=>{let{className:o=``,itemClassName:s=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,startYear:c,endYear:l=(/* @__PURE__ */ new Date()).getFullYear(),itemOf:u}=r,d=n(r,[`className`,`itemClassName`,`startYear`,`endYear`,`itemOf`]);return/*#__PURE__*/ i(`ol`,t(e({className:`list-unstyled m-0 d-flex flex-wrap justify-content-center gap-3 ${o}`},d),{children:Array.from({length:l-c+1},(e,t)=>{let n=l-t;if(n===0)return null;let r=ma(n),{link:o=`#`,title:c}=(u==null?void 0:u(n,r))||{};return/*#__PURE__*/ i(`li`,{className:s,children:/*#__PURE__*/ a(`a`,{className:`d-inline-block p-3 text-decoration-none text-center`,href:o,children:[/*#__PURE__*/ i(`div`,{className:`fs-3xl`,children:r}),c]})},n)})}))};ha.displayName=`ZodiacBar`;export{we as Avatar,Te as AvatarStack,De as Badge,P as Button,Ae as ButtonGroup,je as ButtonToolbar,Me as Card,Pe as CardBody,Fe as CardFooter,Ne as CardHeader,Le as CardText,Ie as CardTitle,Re as ClickBoundary,ze as CloseButton,Kt as CodeBlock,In as Col,Pn as Container,rn as Countdown,dn as Dialog,hn as DialogBody,cn as DialogClose,gn as DialogFooter,pn as DialogHeader,mn as DialogTitle,Sn as Drawer,bn as DrawerBody,xn as DrawerFooter,vn as DrawerHeader,yn as DrawerTitle,jn as Editor,Nn as EditorHTML,H as HorizontalMarquee,Ln as HorizontalMarqueeBox,U as Icon,W as Image,Rn as ListGroup,Vn as ListGroupItem,Hn as LiveTSX,Un as Loading,ur as Menu,ir as MenuDivider,rr as MenuHeader,er as MenuItem,ar as MenuItemContent,or as MenuItemDescription,tr as MenuPanel,sr as MenuSubmenu,nr as MenuText,Pr as MonthCalendar,Fr as Nameplate,_n as NativeDialog,Y as Nav,Ir as NavItem,Lr as NavLink,Rr as Navbar,zr as NavbarBrand,Br as NavbarNav,Vr as NavbarText,Hr as NavbarToggler,di as Option,q as OverlayBox,Q as PageNav,hr as Popover,Fn as Row,ui as ScrollNav,fi as Select,Ci as ShareBox,G as Spinner,wi as SpinnerButton,Ti as Table,Ei as TableSpinner,Ri as TextTruncate,zi as Time,Vi as TimeDistance,Hi as Timeline,Zi as Toast,Yi as ToastBody,Ki as ToastContainer,Ji as ToastHeader,qi as ToastItem,Qi as ToggleButton,gr as Tooltip,ca as TypeEcho,da as UserRankView,qt as VariantColors,fa as VerticalMarquee,ha as ZodiacBar,pa as ZodiacSigns,Ce as animate,Si as elementToImage,Mn as parser,Jt as text2color,ma as zodiacOf};
package/dist/style.css CHANGED
@@ -1,3 +1,7 @@
1
+ .Ocw1GG_hiddenBackdrop {
2
+ --bs-dialog-backdrop-bg: transparent;
3
+ --bs-dialog-backdrop-blur: 0;
4
+ }
1
5
  @keyframes lRDfma_scrollItem {
2
6
  0%, 10% {
3
7
  transform: translateX(0);
@@ -49,10 +53,6 @@
49
53
  height: var(--scroll-height);
50
54
  line-height: var(--scroll-height);
51
55
  }
52
- .Ocw1GG_hiddenBackdrop {
53
- --bs-dialog-backdrop-bg: transparent;
54
- --bs-dialog-backdrop-blur: 0;
55
- }
56
56
  .aEvBXq_scrollerInner {
57
57
  -webkit-overflow-scrolling: touch;
58
58
  scrollbar-width: none;
@@ -358,6 +358,7 @@
358
358
  }
359
359
 
360
360
  .X5DLia_rankBox .X5DLia_restUsers td .X5DLia_name {
361
+ max-width: 50%;
361
362
  font-size: 0;
362
363
  }
363
364
 
@@ -388,7 +389,6 @@
388
389
  --duration: 10s;
389
390
  animation: QBd6SG_scrollWrap;
390
391
  animation-duration: var(--duration);
391
- font-size: 0;
392
392
  animation-timing-function: linear;
393
393
  animation-iteration-count: infinite;
394
394
  animation-direction: alternate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "idea-react",
3
- "version": "3.0.0-alpha.0",
3
+ "version": "3.0.0-alpha.1",
4
4
  "license": "LGPL-3.0-or-later",
5
5
  "author": "shiy2008@gmail.com",
6
6
  "description": "A React advanced components library based on TypeScript & Bootstrap, built by idea2app remote developers team.",
@@ -40,7 +40,6 @@
40
40
  "iterable-observer": "^1.1.1",
41
41
  "lodash": "^4.18.1",
42
42
  "mobx-react-helper": "^0.5.4",
43
- "react-bootstrap": "^2.10.10",
44
43
  "react-editor-js": "^2.1.0",
45
44
  "react-live": "^5.0.1",
46
45
  "shiki": "^4.5.0",
@@ -132,11 +131,9 @@
132
131
  "scripts": {
133
132
  "prepare": "husky",
134
133
  "test": "lint-staged && node --import ./test/setup.mts --test --test-timeout=10000 test/*.test.tsx",
135
- "pack-preview": "cd preview/ && rimraf ../.parcel-cache dist/ && parcel build --public-url=. --dist-dir=../docs/preview/ --no-source-maps",
136
134
  "pack-docs": "rimraf docs/ && typedoc source/",
137
- "start": "npm run pack-docs && npm run pack-preview && web-server docs/ -p 8080 -o",
138
- "build": "npm run pack-docs && npm run pack-preview && tsdown",
139
- "prepublishOnly": "npm test && npm run build",
140
- "preview": "cd preview/ && rimraf ../.parcel-cache dist/ && parcel"
135
+ "start": "npm run pack-docs && web-server docs/ -p 8080 -o",
136
+ "build": "npm run pack-docs && tsdown",
137
+ "prepublishOnly": "npm test && npm run build"
141
138
  }
142
139
  }
package/source/Avatar.tsx CHANGED
@@ -1,25 +1,78 @@
1
1
  import classNames from 'classnames';
2
- import { FC, ImgHTMLAttributes } from 'react';
2
+ import { CSSProperties, FC, HTMLAttributes } from 'react';
3
3
 
4
- export interface AvatarProps extends ImgHTMLAttributes<HTMLImageElement> {
5
- size?: number;
4
+ import type { ComponentTheme } from './Button';
5
+
6
+ export type AvatarSize = 'xs' | 'sm' | 'lg' | 'xl';
7
+ export type AvatarStatus = 'online' | 'offline' | 'busy' | 'away';
8
+
9
+ export interface AvatarProps extends HTMLAttributes<HTMLSpanElement> {
10
+ /**
11
+ * Official size class name suffix, or a custom size in `rem`
12
+ * applied through the `--bs-avatar-size` CSS variable
13
+ */
14
+ size?: AvatarSize | number;
15
+ theme?: ComponentTheme;
16
+ subtle?: boolean;
17
+ src?: string;
18
+ alt?: string;
19
+ status?: AvatarStatus;
20
+ statusLabel?: string;
6
21
  }
7
22
 
8
23
  export const Avatar: FC<AvatarProps> = ({
9
24
  className,
10
25
  style,
11
- size = 3,
26
+ size,
27
+ theme,
28
+ subtle,
29
+ src,
30
+ alt,
31
+ status,
32
+ statusLabel = status,
33
+ children,
12
34
  ...props
13
35
  }) => (
14
- <img
15
- className={classNames('object-fit-cover rounded-circle', className)}
16
- style={{
17
- width: `${size}rem`,
18
- height: `${size}rem`,
19
- ...style
20
- }}
36
+ <span
37
+ className={classNames(
38
+ 'avatar',
39
+ typeof size === 'string' && `avatar-${size}`,
40
+ theme && `theme-${theme}`,
41
+ subtle && 'avatar-subtle',
42
+ className
43
+ )}
44
+ style={
45
+ typeof size === 'number'
46
+ ? ({ '--bs-avatar-size': `${size}rem`, ...style } as CSSProperties)
47
+ : style
48
+ }
21
49
  {...props}
22
- />
50
+ >
51
+ {src ? <img className="avatar-img" src={src} alt={alt} /> : children}
52
+
53
+ {status && (
54
+ <span
55
+ className={`avatar-status status-${status}`}
56
+ role="img"
57
+ aria-label={statusLabel}
58
+ />
59
+ )}
60
+ </span>
23
61
  );
24
62
 
25
63
  Avatar.displayName = 'Avatar';
64
+
65
+ export interface AvatarStackProps extends HTMLAttributes<HTMLDivElement> {
66
+ size?: AvatarSize;
67
+ }
68
+
69
+ export const AvatarStack: FC<AvatarStackProps> = ({ className, size, children, ...props }) => (
70
+ <div
71
+ className={classNames('avatar-stack', size && `avatar-stack-${size}`, className)}
72
+ {...props}
73
+ >
74
+ {children}
75
+ </div>
76
+ );
77
+
78
+ AvatarStack.displayName = 'AvatarStack';
package/source/Button.tsx CHANGED
@@ -4,12 +4,21 @@ import classNames from 'classnames';
4
4
  import { ComponentPropsWithRef, FC, MouseEvent } from 'react';
5
5
 
6
6
  export type ComponentTheme =
7
- 'primary' | 'accent' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'inverse';
7
+ | 'primary'
8
+ | 'accent'
9
+ | 'secondary'
10
+ | 'success'
11
+ | 'danger'
12
+ | 'warning'
13
+ | 'info'
14
+ | 'dark'
15
+ | 'light'
16
+ | 'inverse';
8
17
 
9
18
  interface ButtonStyleProps {
10
- variant?: 'solid' | 'outline' | 'subtle' | 'text';
19
+ variant?: 'solid' | 'outline' | 'subtle' | 'text' | 'link';
11
20
  theme?: ComponentTheme;
12
- size?: 'sm' | 'lg';
21
+ size?: 'xs' | 'sm' | 'lg';
13
22
  icon?: boolean;
14
23
  styled?: boolean;
15
24
  disabled?: boolean;
@@ -37,7 +46,7 @@ export const Button: FC<ButtonProps> = ({
37
46
  }) => {
38
47
  const attributes: ButtonElementAttributes = props;
39
48
  const classes = classNames(
40
- variant ? `btn-${variant}` : 'btn',
49
+ variant ? `btn-${variant}` : icon ? undefined : 'btn',
41
50
  theme && `theme-${theme}`,
42
51
  size && `btn-${size}`,
43
52
  { 'btn-icon': icon, 'btn-styled': styled, disabled },
@@ -0,0 +1,28 @@
1
+ import classNames from 'classnames';
2
+ import { ComponentPropsWithRef, FC } from 'react';
3
+
4
+ export interface ButtonGroupProps extends ComponentPropsWithRef<'div'> {
5
+ vertical?: boolean;
6
+ }
7
+
8
+ export const ButtonGroup: FC<ButtonGroupProps> = ({
9
+ vertical,
10
+ role = 'group',
11
+ className,
12
+ ...props
13
+ }) => (
14
+ <div
15
+ role={role}
16
+ {...props}
17
+ className={classNames(vertical ? 'btn-group-vertical' : 'btn-group', className)}
18
+ />
19
+ );
20
+ ButtonGroup.displayName = 'ButtonGroup';
21
+
22
+ export const ButtonToolbar: FC<ComponentPropsWithRef<'div'>> = ({
23
+ className,
24
+ role = 'toolbar',
25
+ ...props
26
+ }) => <div role={role} {...props} className={classNames('btn-toolbar', className)} />;
27
+
28
+ ButtonToolbar.displayName = 'ButtonToolbar';
@@ -0,0 +1,26 @@
1
+ import classNames from 'classnames';
2
+ import { ComponentPropsWithRef, FC } from 'react';
3
+
4
+ export const Card: FC<ComponentPropsWithRef<'div'>> = ({ className, ...props }) => (
5
+ <div {...props} className={classNames('card', className)} />
6
+ );
7
+
8
+ export const CardHeader: FC<ComponentPropsWithRef<'div'>> = ({ className, ...props }) => (
9
+ <div {...props} className={classNames('card-header', className)} />
10
+ );
11
+
12
+ export const CardBody: FC<ComponentPropsWithRef<'div'>> = ({ className, ...props }) => (
13
+ <div {...props} className={classNames('card-body', className)} />
14
+ );
15
+
16
+ export const CardFooter: FC<ComponentPropsWithRef<'div'>> = ({ className, ...props }) => (
17
+ <div {...props} className={classNames('card-footer', className)} />
18
+ );
19
+
20
+ export const CardTitle: FC<ComponentPropsWithRef<'h3'>> = ({ className, ...props }) => (
21
+ <h3 {...props} className={classNames('card-title', className)} />
22
+ );
23
+
24
+ export const CardText: FC<ComponentPropsWithRef<'p'>> = ({ className, ...props }) => (
25
+ <p {...props} className={classNames('card-text', className)} />
26
+ );