idea-react 2.3.5 → 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.
- package/AGENTS.md +253 -0
- package/ReadMe.md +81 -67
- package/dist/index.d.mts +419 -203
- package/dist/index.d.ts +419 -203
- package/dist/index.js +18 -18
- package/dist/index.mjs +17 -17
- package/dist/style.css +5 -1
- package/package.json +36 -35
- package/source/Avatar.tsx +65 -12
- package/source/Badge.tsx +34 -0
- package/source/Button.tsx +73 -0
- package/source/ButtonGroup.tsx +28 -0
- package/source/Card.tsx +26 -0
- package/source/ClickBoundary.tsx +6 -5
- package/source/CloseButton.tsx +23 -0
- package/source/CodeBlock.tsx +5 -3
- package/source/Countdown.tsx +2 -0
- package/source/Drawer.tsx +62 -0
- package/source/Editor.tsx +5 -8
- package/source/Grid.tsx +92 -0
- package/source/HorizontalMarquee/index.tsx +4 -10
- package/source/Image.tsx +15 -0
- package/source/ListGroup.tsx +103 -0
- package/source/LiveTSX.tsx +1 -1
- package/source/Loading.tsx +4 -3
- package/source/Menu.tsx +282 -0
- package/source/MonthCalendar.tsx +60 -22
- package/source/NativeDialog/index.tsx +139 -0
- package/source/NativeDialog/style.module.css +4 -0
- package/source/Nav.tsx +52 -0
- package/source/Navbar.tsx +64 -0
- package/source/Overlay.ts +22 -0
- package/source/OverlayBox.tsx +200 -32
- package/source/PageNav.tsx +56 -32
- package/source/Popover.tsx +36 -0
- package/source/ScrollNav/Scroller.tsx +107 -0
- package/source/ScrollNav/index.tsx +12 -99
- package/source/Select.tsx +66 -55
- package/source/ShareBox.tsx +5 -11
- package/source/Spinner.tsx +30 -0
- package/source/SpinnerButton.tsx +8 -10
- package/source/Table.tsx +59 -0
- package/source/TableSpinner.tsx +7 -5
- package/source/{TextTruncate.tsx → TextTruncate/Content.tsx} +24 -20
- package/source/TextTruncate/index.tsx +25 -0
- package/source/Time.tsx +7 -33
- package/source/TimeDistance.tsx +1 -1
- package/source/Timeline/index.tsx +7 -7
- package/source/Toast.tsx +114 -29
- package/source/ToggleButton.tsx +47 -0
- package/source/Tooltip.tsx +32 -0
- package/source/TypeEcho/Content.tsx +58 -0
- package/source/TypeEcho/index.tsx +14 -0
- package/source/UserRank/index.module.less +9 -20
- package/source/UserRank/index.tsx +35 -32
- package/source/VerticalMarquee/index.module.less +0 -1
- package/source/VerticalMarquee/index.tsx +3 -5
- package/source/ZodiacBar.tsx +1 -1
- package/source/animate.ts +4 -2
- package/source/color.ts +3 -5
- package/source/index.ts +18 -0
- package/source/types.d.ts +4 -0
- package/tsconfig.json +6 -2
- 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
|
|
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 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
|
|
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
|
-
`,pad:
|
|
11
|
-
`).replace(new RegExp(d.pad,`g`),
|
|
12
|
-
`?`\\n`:`\\r`}),u.singleQuotes?(e=e.replace(/\\?'/g,`\\'`),`'${e}'`):(e=e.replace(/"/g,`\\"`),`"${e}"`)}e.prettyPrint=
|
|
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
|
+
`).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})),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 Be(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}})),We
|
|
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
|
|
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
|
|
24
|
-
${
|
|
25
|
-
${
|
|
26
|
-
`);return l&&d===`{
|
|
27
|
-
`).map(function(e,t){return t===0?e:`${
|
|
28
|
-
`):t},Ot=function(e,t,n){return function(r){return Dt(r,
|
|
29
|
-
${
|
|
30
|
-
`,_+=
|
|
31
|
-
${
|
|
32
|
-
`,_+=N(C-1,g)),_+=`</${o}>`}else At(S,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},I=(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 I(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(F(e,y),y)};const Gt=ee({themes:[y],langs:[h,g,v,_],engine:b()}),Kt=i=>{let{className:a=``,language:o,children:c}=i,l=t(i,[`className`,`language`,`children`]),u=typeof c==`string`?c:Wt(m(c)?c:r(n,{children:c})),d=Gt.codeToHtml(u,{lang:o,theme:`github-light`,structure:`inline`});return r(`pre`,s(e({className:`m-0 language-${o} ${a}`},l),{children:r(`code`,{dangerouslySetInnerHTML:{__html:d},className:`language-${o}`})}))},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 L,Xt,Zt,Qt,$t,en=ne(e=>e.observedProps.endTime),tn,nn;let rn;new(Yt=(L=new WeakMap,Xt=class extends ($t=te){get rest(){return S(this,L)}set rest(e){w(this,L,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,ie)}componentWillUnmount(){super.componentWillUnmount(),this.stop()}render(){let n=this.props,{className:a=``,itemClassName:o=`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 r(`ol`,s(e({className:`list-unstyled m-0 ${a}`},d),{children:f.map(({value:e,label:t})=>i(`li`,{className:o,children:[r(`strong`,{children:(e+``).padStart(2,`0`)}),r(`span`,{children:t})]},t))}))}constructor(...e){super(...e),C(this,L,{writable:!0,value:(nn(this),tn(this,0))}),o(this,`timer`,0),o(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]}=x(Xt,[[D,1,`rest`],[E,3,`timeSections`],[en,2,`initTimer`]],[O],$t),Xt),Zt=class extends T{constructor(){super(rn),o(this,`displayName`,`Countdown`),Qt()}},o(Zt,Yt,void 0),Zt);var an,on,sn,cn=class extends Error{constructor(e=`Dialog closed`){super(e)}},ln=new WeakMap,un=new WeakMap,dn=class{get input(){return S(this,ln)}set input(e){w(this,ln,e)}get defer(){return S(this,un)}set defer(e){w(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(t){C(this,ln,{writable:!0,value:(sn(this),an(this,{}))}),C(this,un,{writable:!0,value:on(this)}),o(this,`Component`,void 0),this.Component=O(n=>r(t,s(e({},n,this.input),{defer:this.defer}))),this.Component.displayName=`DialogComponent`}};({e:[an,on,sn]}=x(dn,[[D,1,`input`],[D,1,`defer`]],[]));let fn;var R,pn,mn,hn,gn,_n,vn;const yn=he();let bn;new(fn=(R=new WeakMap,pn=class extends (gn=u){get innerValue(){return S(this,R)}set innerValue(e){w(this,R,e)}render(){let n=this.props,{name:a,required:o,children:c}=n,l=t(n,[`name`,`required`,`children`]),{innerValue:u}=this;return i(`div`,{className:`form-control`,tabIndex:-1,onBlur:this.save,children:[r(`input`,{hidden:!0,name:a,required:o,value:JSON.stringify(u)}),r(yn,s(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,o(this,`core`,void 0),C(this,R,{writable:!0,value:(vn(this),_n(this,this.props.defaultValue))}),o(this,`save`,()=>A(function*(){return t.core&&(t.innerValue=yield t.core.save())})())}},{e:[_n,vn],c:[bn,hn]}=x(pn,[[D,1,`innerValue`]],[O],gn),pn),mn=class extends T{constructor(){super(bn),o(this,`displayName`,`Editor`),hn()}},o(mn,fn,void 0),mn);const xn=ge({link:({data:{link:e}})=>`<a href="${e}">${e}</a>`}),Sn=n=>{let{data:i}=n,a=t(n,[`data`]);return r(`article`,s(e({},a),{dangerouslySetInnerHTML:{__html:xn.parse(i)}}))};Sn.displayName=`EditorHTML`;const z=n=>{let{className:i=``,children:a,maxWidth:o=`100%`,duration:c,height:l}=n,u=t(n,[`className`,`children`,`maxWidth`,`duration`,`height`]);return r(`div`,s(e({className:`overflow-hidden mw-100 ${i}`},u),{children:r(`div`,{className:`d-inline-block align-top text-nowrap lRDfma_scrollWrap`,style:{maxWidth:o,animationDuration:c,height:l,lineHeight:l},children:r(`div`,{className:`d-inline-block lRDfma_scrollItem`,style:{animationDuration:c},children:a})})}))},Cn=({children:e,maxWidth:t,duration:n,height:a})=>a?r(`div`,{className:`overflow-hidden lRDfma_scrollHeightWrap`,style:{maxWidth:t,"--scroll-height":a},children:i(`div`,{className:`d-inline-block overflow-hidden mw-100 lRDfma_scrollContainer`,children:[r(`div`,{className:`d-block overflow-hidden text-wrap text-break lRDfma_unScrollItem`,children:e}),r(z,{duration:n,children:e})]})}):r(z,{maxWidth:t,duration:n,height:a,children:e});z.displayName=`HorizontalMarquee`;const B=n=>{let{className:i,style:o,name:s,size:c}=n,l=t(n,[`className`,`style`,`name`,`size`]);return r(`span`,e({className:a(`bi-${s}`,i),style:e({fontSize:c&&`${c}rem`},o)},l))};B.displayName=`Icon`;const wn=({scope:e,children:t})=>{let a=typeof t==`string`?t:Wt(m(t)?t:r(n,{children:t}));return i(be,{code:a,scope:e,language:`tsx`,children:[r(ye,{className:`mb-3`}),r(_e,{}),r(ve,{className:`text-danger small p-2`})]})},Tn=n=>{let{className:a=``,children:o=`Loading...`}=n,c=t(n,[`className`,`children`]);return i(`div`,s(e({className:`fixed-top h-100 w-100 d-flex justify-content-center align-items-center opacity-25 bg-black ${a}`},c),{children:[r(Ae,{animation:`border`,variant:`success`}),r(`span`,{className:`ml-3 text-white`,children:o})]}))};Tn.displayName=`Loading`;const En=n=>{let{title:a,detail:o,children:c}=n,l=t(n,[`title`,`detail`,`children`]);return r(De,s(e({},l),{overlay:o?i(Oe,{children:[r(Oe.Header,{children:a}),r(Oe.Body,{children:o})]}):r(Pe,{children:a}),children:c}))};En.displayName=`OverlayBox`;let Dn;var V,On,kn,An,jn,Mn,Nn;let Pn;new(Dn=(V=new WeakMap,On=class extends (jn=te){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,V)}set currentDate(e){w(this,V,e)}get dateGrid(){let e=new Date(this.currentDate);e.setDate(1),e=new Date(+e-e.getDay()*re);let t=Array.from(Array(42),(t,n)=>new Date(+e+n*re));return fe(t,7)}changeMonth(e){var t,n;this.currentDate=se(this.currentDate,e),(t=(n=this.props).onChange)==null||t.call(n,this.currentDate)}render(){let{weekFormatter:n,currentDate:a,dateGrid:o}=this,c=this.observedProps,{style:l,variant:u=`primary`,onChange:d,onSelect:f}=c,p=t(c,[`style`,`variant`,`onChange`,`onSelect`]);return i(je,s(e({},p),{style:e({tableLayout:`fixed`},l),children:[r(`caption`,{children:i(`div`,{className:`d-flex justify-content-between align-items-center`,children:[r(Se,{variant:u,onClick:()=>this.changeMonth(-1),children:`<`}),k(a,`YYYY-MM`),r(Se,{variant:u,onClick:()=>this.changeMonth(1),children:`>`})]})}),r(`thead`,{children:r(`tr`,{children:o[0].map((e,t,{length:i})=>r(`td`,{className:`bg-${u} text-white`,style:{width:`calc(100% / ${i})`},children:n.format(e)},t))})}),r(`tbody`,{children:o.map(e=>r(`tr`,{children:e.map(this.renderDate)},e[0]+``))})]}))}constructor(...e){super(...e),C(this,V,{writable:!0,value:(Nn(this),Mn(this,new Date))}),o(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 i(`td`,{className:a({"opacity-50":e.getMonth()!==this.currentDate.getMonth(),"fw-bold":s===k(new Date,`YYYY-MM-DD`)}),children:[r(`time`,{className:`d-block`,dateTime:e.toJSON(),children:e.getDate()}),c==null?void 0:c.map(e=>typeof e.content==`object`?e.content:r(En,{title:e.content,children:r(xe,{as:`a`,className:`d-inline-block text-decoration-none w-100 text-truncate`,bg:Jt(e.content+``,[`light`]),href:e.link,onClick:()=>o==null?void 0:o(e),children:e.content})},e.date+``))]},e+``)})}},{e:[Mn,Nn],c:[Pn,An]}=x(On,[[E,3,`weekFormatter`],[D,1,`currentDate`],[E,3,`dateGrid`]],[O],jn),On),kn=class extends T{constructor(){super(Pn),o(this,`displayName`,`MonthCalendar`),An()}},o(kn,Dn,void 0),kn);const Fn=({avatar:e,name:t})=>i(n,{children:[r(Re,{size:2,style:{marginRight:`0.5rem`},src:e}),r(`span`,{className:`align-middle`,children:t})]});Fn.displayName=`Nameplate`;let In;var H,U,Ln,Rn,zn,Bn,Vn,Hn,Un;const Wn=Array.from([,,,,,,],(e,t)=>`h${++t}`)+``;let Gn;new(In=(H=new WeakMap,U=new WeakMap,Ln=class extends (Bn=u){get list(){return S(this,H)}set list(e){w(this,H,e)}get scrollY(){return S(this,U)}set scrollY(e){w(this,U,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(Wn),e=>{var t;(t=e).id||(t.id=pe());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:o=`underline`}=i,c=t(i,[`style`,`variant`]);return r(Ee,s(e({},c),{variant:o,style:e({flexDirection:`column`},a),children:n.map(this.renderLink)}))}constructor(...e){super(...e),C(this,H,{writable:!0,value:(Un(this),Vn(this,[]))}),C(this,U,{writable:!0,value:Hn(this,0)}),o(this,`updateScrollY`,()=>this.scrollY=window.scrollY),o(this,`scrollTo`,e=>()=>{var t,n;setTimeout(()=>ue(`[id="${e.id}"]`)),(t=(n=this.props).onItemClick)==null||t.call(n,e)}),o(this,`renderLink`,({id:e,level:t,text:n,top:i})=>{let{currentActiveId:a}=this,{depth:o=1/0}=this.props;return t<=o&&r(Ee.Item,{style:{textIndent:`${t-1}rem`},children:r(Ee.Link,{href:`#${e}`,active:a===e,onClick:this.scrollTo({id:e,level:t,text:n,top:i}),children:n})},e)})}},{e:[Vn,Hn,Un],c:[Gn,zn]}=x(Ln,[[D,1,`list`],[D,1,`scrollY`],[E,3,`currentActiveId`]],[O],Bn),Ln),Rn=class extends T{constructor(){super(Gn),o(this,`displayName`,`PageNav`),zn()}},o(Rn,In,void 0),Rn);let Kn;var W,G,K,qn,Jn,Yn,Xn,Zn,Qn,$n,er;let tr;new(Kn=(W=new WeakMap,G=new WeakMap,K=new WeakMap,qn=class extends (Xn=u){get scrollLeft(){return S(this,W)}set scrollLeft(e){w(this,W,e)}get scrollWidth(){return S(this,G)}set scrollWidth(e){w(this,G,e)}get clientWidth(){return S(this,K)}set clientWidth(e){w(this,K,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,o=this.props,{className:c=``,children:l}=o,u=t(o,[`className`,`children`]);return i(`div`,{className:`position-relative overflow-y-hidden ${c}`,children:[n&&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:r(B,{name:`caret-left-fill`})}),r(`div`,{ref:this.scrollerRef,className:`overflow-x-auto aEvBXq_scrollerInner`,children:r(Ee,s(e({},u),{className:`flex-nowrap`,children:l}))}),a&&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:r(B,{name:`caret-right-fill`})})]})}constructor(...e){super(...e),o(this,`scrollerRef`,(er(this),p())),C(this,W,{writable:!0,value:Zn(this,0)}),C(this,G,{writable:!0,value:Qn(this,0)}),C(this,K,{writable:!0,value:$n(this,0)}),o(this,`updateScroll`,()=>{let e=this.scrollerRef.current;return e&&(this.scrollLeft=e.scrollLeft,this.scrollWidth=e.scrollWidth,this.clientWidth=e.clientWidth),e}),o(this,`resizeObserver`,void 0),o(this,`scrollBy`,e=>()=>{let t=this.scrollerRef.current;t&&t.scrollBy({left:e*t.clientWidth*.8,behavior:`smooth`})})}},{e:[Zn,Qn,$n,er],c:[tr,Yn]}=x(qn,[[D,1,`scrollLeft`],[D,1,`scrollWidth`],[D,1,`clientWidth`],[E,3,`canScrollLeft`],[E,3,`canScrollRight`]],[O],Xn),qn),Jn=class extends T{constructor(){super(tr),o(this,`displayName`,`ScrollNav`),Yn()}},o(Jn,Kn,void 0),Jn);const nr=n=>{let{value:i,children:a}=n,o=t(n,[`value`,`children`]);return r(j.Item,s(e({},o),{"data-value":i,children:a}))};nr.displayName=`Option`;const rr=({className:e,style:t,variant:n,menuVariant:o,children:s,value:c,onChange:l,valueRender:u})=>{let d=le(s).flat(1/0).find(e=>m(e)&&e.type===nr&&e.props.value===c);return i(j,{onClick:({target:e})=>{let t=e.closest(`.dropdown-item`);if(!t)return;let{value:n}=t.dataset;l==null||l(n)},children:[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))||r(`div`,{className:d==null?void 0:d.props.className,children:d==null?void 0:d.props.children})}),r(j.Menu,{variant:o,children:s})]})};rr.displayName=`Select`;let ir;var q,J,ar,or,sr,cr,lr,ur,dr;function fr(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 pr;new(ir=(q=new WeakMap,J=new WeakMap,ar=class extends (cr=u){get loading(){return S(this,q)}set loading(e){w(this,q,e)}get imageURI(){return S(this,J)}set imageURI(e){w(this,J,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:o=``,children:c}=a,l=t(a,[`className`,`children`]),{loading:u,imageURI:d}=this;return i(n,{children:[u&&r(Tn,{}),i(`div`,s(e({},l),{ref:this.root,className:`position-relative ${o}`,onMouseEnter:d?void 0:this.generateImage,onTouchStart:d?void 0:this.generateImage,children:[c,d&&r(Te,{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,o(this,`root`,(dr(this),p())),C(this,q,{writable:!0,value:lr(this,!1)}),C(this,J,{writable:!0,value:ur(this,``)}),o(this,`generateImage`,()=>A(function*(){n.imageURI&&(URL.revokeObjectURL(n.imageURI),n.imageURI=``),n.loading=!0,n.imageURI=yield fr(n.root.current),n.loading=!1})()),o(this,`share`,t=>A(function*(){var r,i;t.stopPropagation();let a=yield oe(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:[lr,ur,dr],c:[pr,sr]}=x(ar,[[D,1,`loading`],[D,1,`imageURI`]],[O],cr),ar),or=class extends T{constructor(){super(pr),o(this,`displayName`,`ShareBox`),sr()}},o(or,ir,void 0),or);const mr=a=>{let{animation:o,loading:c,disabled:l,children:u}=a,d=t(a,[`animation`,`loading`,`disabled`,`children`]);return i(Se,s(e({},d),{disabled:c||l,children:[c&&i(n,{children:[r(Ae,{as:`span`,className:u?`me-2`:``,size:`sm`,animation:o,role:`status`,"aria-hidden":`true`}),!u&&r(`span`,{className:`visually-hidden`,children:`Loading...`})]}),u]}))};mr.displayName=`SpinnerButton`;const hr=n=>{let{animation:i=`border`,variant:a=`primary`,size:o,colSpan:c}=n,l=t(n,[`animation`,`variant`,`size`,`colSpan`]);return r(`tr`,s(e({},l),{children:r(`td`,{className:`text-center p-4`,colSpan:c,children:r(Ae,{animation:i,variant:a,size:o})})}))};hr.displayName=`TableSpinner`;let gr;var Y,X,_r,vr,yr,br,xr,Sr,Cr;let wr;new(gr=(Y=new WeakMap,X=new WeakMap,_r=class extends (br=u){get expanded(){return S(this,Y)}set expanded(e){w(this,Y,e)}get overflowed(){return S(this,X)}set overflowed(e){w(this,X,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:o=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:o};return i(`div`,s(e({},u),{children:[r(`p`,{ref:this.contentRef,style:d?void 0:p,children:a}),(f||d)&&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,Y,{writable:!0,value:(Cr(this),xr(this,!1))}),C(this,X,{writable:!0,value:Sr(this,!1)}),o(this,`contentRef`,p()),o(this,`checkOverflow`,()=>{let{current:e}=this.contentRef;e&&(this.overflowed=e.scrollHeight>e.clientHeight)}),o(this,`toggle`,()=>{this.expanded=!this.expanded,this.expanded||requestAnimationFrame(this.checkOverflow)})}},{e:[xr,Sr,Cr],c:[wr,yr]}=x(_r,[[D,1,`expanded`],[D,1,`overflowed`]],[O],br),_r),vr=class extends T{constructor(){super(wr),o(this,`displayName`,`TextTruncate`),yr()}},o(vr,gr,void 0),vr);let Tr;var Z,Er,Dr,Or,kr,Ar=ne(({observedProps:{dateTime:e,format:t}})=>e+t),jr,Mr;let Q;new(Tr=(Z=new WeakMap,Er=class extends (kr=te){updateText(){let{dateTime:e,format:t}=this.props;return k(e,t)}get timeText(){return S(this,Z)}set timeText(e){w(this,Z,e)}componentDidMount(){super.componentDidMount(),this.timeText=this.updateText()}render(){let n=this.props,{dateTime:i}=n,a=t(n,[`dateTime`]);return r(`time`,s(e({dateTime:new Date(i).toJSON()},a),{children:this.timeText}))}constructor(...e){super(...e),C(this,Z,{writable:!0,value:(Mr(this),jr(this,this.updateText()))})}},{e:[jr,Mr],c:[Q,Or]}=x(Er,[[Ar,2,`updateText`],[D,1,`timeText`]],[O],kr),Er),Dr=class extends T{constructor(){super(Q),o(this,`displayName`,`Time`),Or()}},o(Dr,Tr,void 0),Dr);const Nr={ms:`millisecond(s)`,s:`second(s)`,m:`minute(s)`,H:`hour(s)`,D:`day(s)`,W:`week(s)`,M:`month(s)`,Y:`year(s)`},Pr=n=>{let{date:r,unitWords:a=Nr,beforeWord:o=` before`,afterWord:c=` after`}=n,l=t(n,[`date`,`unitWords`,`beforeWord`,`afterWord`]);r=new Date(r);let{distance:u,unit:d}=ce(r);return i(`time`,s(e({},l),{dateTime:r.toJSON(),title:r.toLocaleString(),children:[Math.abs(u),` `,a[d],u<0?o:c]}))};Pr.displayName=`TimeDistance`;const Fr=n=>{let{className:a,events:o,timeFormat:c}=n,l=t(n,[`className`,`events`,`timeFormat`]);return r(`ol`,s(e({className:`list-unstyled hsu__a_timeline ${a}`},l),{children:o.map(({title:t,summary:n,time:a,link:o,people:s})=>r(`li`,{className:`position-relative hsu__a_timelineItem hsu__a_right`,children:r(Ce,{children:i(Ce.Body,{className:`p-4 d-flex flex-column gap-3 align-items-center`,children:[r(`h3`,{className:`h5 m-0`,children:r(`a`,{className:`text-decoration-none stretched-link`,href:o,children:t})}),i(`div`,{className:`small text-muted d-flex gap-2`,children:[`⏲️`,r(Q,{dateTime:a[0],format:c}),a[1]&&`~`,a[1]&&r(Q,{dateTime:a[1],format:c})]}),r(`ul`,{className:`list-unstyled m-0 d-flex gap-2 flex-wrap justify-content-around`,children:s==null?void 0:s.map(t=>r(`li`,{children:r(Fn,e({},t))},t.name))}),r(`p`,{className:`m-0`,children:n})]})})},t))}))};Fr.displayName=`Timeline`;var Ir,Lr;const Rr=new Set([`warning`,`info`,`light`]);var zr=new WeakMap,Br=class{get messages(){return S(this,zr)}set messages(e){w(this,zr,e)}open(t){let n=pe(),r=Date.now(),{promise:i,resolve:a}=Promise.withResolvers();return this.messages=[...this.messages,s(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(s(e({},a),{closedAt:Date.now()})),this.messages=this.messages.filter(e=>e.id!==n)}constructor(e=ae){o(this,`TimeScalar`,void 0),C(this,zr,{writable:!0,value:void 0}),o(this,`Component`,void 0),o(this,`renderMessage`,void 0),this.TimeScalar=e,w(this,zr,(Lr(this),Ir(this,[]))),this.Component=O(({position:e=`top-end`})=>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&&!Rr.has(o)?`text-white`:void 0,l=!!n||s===0,u=this.TimeScalar.distanceOf(Date.now(),t).toShortString();return i(Me,{bg:o,delay:s,autohide:s!==0,onClose:()=>this.close(e),children:[l&&i(Me.Header,{children:[r(`strong`,{className:`me-auto`,children:n}),r(`small`,{children:u})]}),r(Me.Body,{className:c,children:a})]},e)},this.Component.displayName=`ToastComponent`}};({e:[Ir,Lr]}=x(Br,[[D,1,`messages`]],[]));let Vr;var $,Hr,Ur,Wr,Gr,Kr,qr;let Jr;new(Vr=($=new WeakMap,Hr=class extends (Gr=u){get echoed(){return S(this,$)}set echoed(e){w(this,$,e)}render(){let n=this.props,{className:i,text:o}=n,c=t(n,[`className`,`text`]),{echoed:l}=this;return r(`pre`,s(e({},c),{ref:this.init,className:a(`text-wrap`,i),children:l+(l===o?``:`_`)}))}constructor(...e){var t;super(...e),t=this,C(this,$,{writable:!0,value:(qr(this),Kr(this,``))}),o(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 de(i/1e3),t.echoed+=e})()).observe(e))}},{e:[Kr,qr],c:[Jr,Wr]}=x(Hr,[[D,1,`echoed`]],[O],Gr),Hr),Ur=class extends T{constructor(){super(Jr),o(this,`displayName`,`TypeEcho`),Wr()}},o(Ur,Vr,void 0),Ur);const Yr=({email:e,website:t})=>i(`address`,{className:`mb-0 d-flex justify-content-around gap-2`,children:[e&&r(`a`,{rel:`noreferrer`,target:`_blank`,href:`mailto:`+e,children:r(B,{name:`envelope`})}),t&&r(`a`,{rel:`noreferrer`,target:`_blank`,href:t,children:r(B,{name:`globe2`})})]}),Xr=`X5DLia_image`;var Zr=class extends f{render(){let n=this.props,{className:a=``,title:o,rank:c=[],linkOf:l}=n,u=t(n,[`className`,`title`,`rank`,`linkOf`]);return i(ke,s(e({className:`X5DLia_rankBox ${a}`},u),{children:[i(we,{sm:12,xs:12,lg:7,children:[i(`div`,{className:`shadow rounded-3 X5DLia_title`,children:[i(`div`,{className:`X5DLia_medal`,children:[r(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),r(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),r(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`})]}),r(`h3`,{"data-text":o,className:`position-relative m-auto mb-0 fw-bold text-center`,children:o})]}),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)})]}),r(we,{xs:12,sm:12,lg:5,children:r(je,{className:`my-3 pt-2 X5DLia_restUsers`,responsive:!0,children:r(`tbody`,{children:c.slice(3,10).map(this.renderRow)})})})]}))}constructor(...t){super(...t),o(this,`renderMedal`,t=>{var n,a;return i(we,{as:`li`,children:[r(`div`,{className:`shadow-lg overflow-hidden rounded-circle m-auto ${Xr}`,children:r(Te,{src:t.avatar,alt:t.name,loading:`lazy`,fluid:!0})}),i(`div`,{className:`position-relative overflow-hidden X5DLia_topUser`,children:[i(`div`,{className:`position-relative`,children:[r(`i`,{className:`d-block overflow-hidden m-auto mb-1 rounded-circle`}),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}),r(`strong`,{children:t.score})]}),r(Yr,e({},t))]})]},t.id)}),o(this,`renderRow`,(t,n,{length:a})=>{var o,s;return i(`tr`,{className:`position-relative`,children:[r(`td`,{className:`align-middle`,children:r(xe,{className:`fw-bold fst-italic`,children:(n+4+``).padStart((a+``).length,`0`)})}),i(`td`,{className:`position-relative mw-50 text-truncate X5DLia_name`,children:[r(`div`,{className:`d-inline-block overflow-hidden align-middle rounded-circle ${Xr}`,children:r(Te,{src:t.avatar,alt:t.name,loading:`lazy`,fluid:!0})}),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})]}),r(`td`,{className:`align-middle`,children:t.score}),r(`td`,{className:`align-middle`,children:r(Yr,e({},t))})]},t.id)})}};o(Zr,`displayName`,`UserRankView`);const Qr=n=>{let{className:i=``,children:a,duration:o}=n,c=t(n,[`className`,`children`,`duration`]);return r(`div`,s(e({className:`overflow-hidden ${i}`},c),{children:r(`div`,{className:`d-inline-block mw-100 mh-100 QBd6SG_scrollWrap`,style:{"--duration":o},children:r(`div`,{className:`d-inline-block QBd6SG_scrollItem`,children:a})})}))};Qr.displayName=`VerticalMarquee`;const $r=[`🐵`,`🐔`,`🐶`,`🐷`,`🐭`,`🐮`,`🐯`,`🐰`,`🐲`,`🐍`,`🐴`,`🐐`],ei=e=>{let t=e<0?e+1:e;return $r[(t%12+12)%12]},ti=n=>{let{className:a=``,itemClassName:o=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,startYear:c,endYear:l=new Date().getFullYear(),itemOf:u}=n,d=t(n,[`className`,`itemClassName`,`startYear`,`endYear`,`itemOf`]);return r(`ol`,s(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=ei(n),{link:s=`#`,title:c}=(u==null?void 0:u(n,a))||{};return r(`li`,{className:o,children:i(`a`,{className:`d-inline-block p-3 text-decoration-none text-center`,href:s,children:[r(`div`,{className:`fs-1`,children:a}),c]})},n)})}))};ti.displayName=`ZodiacBar`;export{Re as Avatar,ze as ClickBoundary,Kt as CodeBlock,rn as Countdown,dn as Dialog,cn as DialogClose,bn as Editor,Sn as EditorHTML,z as HorizontalMarquee,Cn as HorizontalMarqueeBox,B as Icon,wn as LiveTSX,Tn as Loading,Pn as MonthCalendar,Fn as Nameplate,nr as Option,En as OverlayBox,Gn as PageNav,tr as ScrollNav,rr as Select,pr as ShareBox,mr as SpinnerButton,hr as TableSpinner,wr as TextTruncate,Q as Time,Pr as TimeDistance,Fr as Timeline,Br as Toast,Jr as TypeEcho,Zr as UserRankView,qt as VariantColors,Qr as VerticalMarquee,ti as ZodiacBar,$r as ZodiacSigns,Le as animate,fr as elementToImage,xn as parser,Jt as text2color,ei 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,`"`)},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);
|
|
@@ -354,6 +358,7 @@
|
|
|
354
358
|
}
|
|
355
359
|
|
|
356
360
|
.X5DLia_rankBox .X5DLia_restUsers td .X5DLia_name {
|
|
361
|
+
max-width: 50%;
|
|
357
362
|
font-size: 0;
|
|
358
363
|
}
|
|
359
364
|
|
|
@@ -384,7 +389,6 @@
|
|
|
384
389
|
--duration: 10s;
|
|
385
390
|
animation: QBd6SG_scrollWrap;
|
|
386
391
|
animation-duration: var(--duration);
|
|
387
|
-
font-size: 0;
|
|
388
392
|
animation-timing-function: linear;
|
|
389
393
|
animation-iteration-count: infinite;
|
|
390
394
|
animation-direction: alternate;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "idea-react",
|
|
3
|
-
"version": "
|
|
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.",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"require": "./dist/index.js"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@editorjs/editorjs": "^2.31.
|
|
31
|
+
"@editorjs/editorjs": "^2.31.7",
|
|
32
32
|
"@editorjs/paragraph": "^2.11.7",
|
|
33
33
|
"@react-editor-js/core": "^2.1.0",
|
|
34
|
-
"@shikijs/langs": "^4.
|
|
35
|
-
"@shikijs/themes": "^4.
|
|
34
|
+
"@shikijs/langs": "^4.5.0",
|
|
35
|
+
"@shikijs/themes": "^4.5.0",
|
|
36
36
|
"@swc/helpers": "^0.5.23",
|
|
37
37
|
"classnames": "^2.5.1",
|
|
38
38
|
"editorjs-html": "^4.0.5",
|
|
@@ -40,11 +40,10 @@
|
|
|
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
|
-
"react-live": "^
|
|
46
|
-
"shiki": "^4.
|
|
47
|
-
"web-utility": "^4.
|
|
44
|
+
"react-live": "^5.0.1",
|
|
45
|
+
"shiki": "^4.5.0",
|
|
46
|
+
"web-utility": "^4.8.1"
|
|
48
47
|
},
|
|
49
48
|
"peerDependencies": {
|
|
50
49
|
"mobx": ">=6",
|
|
@@ -54,7 +53,7 @@
|
|
|
54
53
|
"react-element-to-jsx-string": ">=15"
|
|
55
54
|
},
|
|
56
55
|
"devDependencies": {
|
|
57
|
-
"@cspell/eslint-plugin": "^10.0
|
|
56
|
+
"@cspell/eslint-plugin": "^10.4.0",
|
|
58
57
|
"@eslint/js": "^10.0.1",
|
|
59
58
|
"@parcel/config-default": "~2.16.4",
|
|
60
59
|
"@parcel/packager-ts": "~2.16.4",
|
|
@@ -62,41 +61,45 @@
|
|
|
62
61
|
"@parcel/transformer-typescript-tsc": "~2.16.4",
|
|
63
62
|
"@parcel/transformer-typescript-types": "~2.16.4",
|
|
64
63
|
"@softonus/prettier-plugin-duplicate-remover": "^1.1.2",
|
|
65
|
-
"@swc/core": "^1.
|
|
66
|
-
"@
|
|
67
|
-
"@
|
|
68
|
-
"@
|
|
69
|
-
"@types/
|
|
70
|
-
"@types/
|
|
64
|
+
"@swc/core": "^1.16.20",
|
|
65
|
+
"@testing-library/dom": "^10.4.2",
|
|
66
|
+
"@testing-library/react": "^16.3.3",
|
|
67
|
+
"@tsdown/css": "^0.23.4",
|
|
68
|
+
"@types/lodash": "^4.17.27",
|
|
69
|
+
"@types/node": "^26.6.6",
|
|
70
|
+
"@types/react": "^19.3.0",
|
|
71
|
+
"@types/react-dom": "^19.3.0",
|
|
71
72
|
"buffer": "^6.0.3",
|
|
72
|
-
"eslint": "^10.
|
|
73
|
+
"eslint": "^10.14.0",
|
|
73
74
|
"eslint-config-prettier": "^10.1.8",
|
|
74
75
|
"eslint-plugin-react": "^7.37.5",
|
|
75
76
|
"eslint-plugin-simple-import-sort": "^14.0.0",
|
|
76
|
-
"globals": "^17.
|
|
77
|
+
"globals": "^17.13.0",
|
|
78
|
+
"happy-dom": "^21.0.4",
|
|
77
79
|
"husky": "^9.1.7",
|
|
78
80
|
"jiti": "^2.7.0",
|
|
79
81
|
"koapache": "^3.0.0",
|
|
80
|
-
"less": "^4.
|
|
81
|
-
"lint-staged": "^17.
|
|
82
|
-
"mobx": "^7.
|
|
83
|
-
"mobx-react": "^10.0.
|
|
82
|
+
"less": "^4.9.1",
|
|
83
|
+
"lint-staged": "^17.6.0",
|
|
84
|
+
"mobx": "^7.1.3",
|
|
85
|
+
"mobx-react": "^10.0.3",
|
|
84
86
|
"parcel": "~2.16.4",
|
|
85
|
-
"postcss": "^8.5.
|
|
86
|
-
"prettier": "^3.9.
|
|
87
|
+
"postcss": "^8.5.32",
|
|
88
|
+
"prettier": "^3.9.10",
|
|
87
89
|
"prettier-plugin-css-order": "^2.2.0",
|
|
88
90
|
"process": "^0.11.10",
|
|
89
91
|
"prop-types": "15.8.1",
|
|
90
|
-
"react": "^19.
|
|
91
|
-
"react-dom": "^19.
|
|
92
|
-
"react-element-to-jsx-string": "^
|
|
92
|
+
"react": "^19.3.1",
|
|
93
|
+
"react-dom": "^19.3.1",
|
|
94
|
+
"react-element-to-jsx-string": "^18.0.0",
|
|
93
95
|
"rimraf": "^6.1.3",
|
|
94
|
-
"tsdown": "^0.
|
|
96
|
+
"tsdown": "^0.23.4",
|
|
95
97
|
"typedoc": "^0.28.20",
|
|
96
98
|
"typedoc-plugin-mdn-links": "^5.1.1",
|
|
97
99
|
"typescript": "~5.9.3",
|
|
98
|
-
"typescript-eslint": "^8.
|
|
99
|
-
"unplugin-swc": "^
|
|
100
|
+
"typescript-eslint": "^8.72.1",
|
|
101
|
+
"unplugin-swc": "^2.0.0",
|
|
102
|
+
"unrun": "^0.3.1"
|
|
100
103
|
},
|
|
101
104
|
"prettier": {
|
|
102
105
|
"singleQuote": true,
|
|
@@ -127,12 +130,10 @@
|
|
|
127
130
|
},
|
|
128
131
|
"scripts": {
|
|
129
132
|
"prepare": "husky",
|
|
130
|
-
"test": "lint-staged",
|
|
131
|
-
"pack-preview": "cd preview/ && rimraf ../.parcel-cache dist/ && parcel build --public-url=. --dist-dir=../docs/preview/",
|
|
133
|
+
"test": "lint-staged && node --import ./test/setup.mts --test --test-timeout=10000 test/*.test.tsx",
|
|
132
134
|
"pack-docs": "rimraf docs/ && typedoc source/",
|
|
133
|
-
"start": "npm run pack-docs &&
|
|
134
|
-
"build": "npm run pack-docs &&
|
|
135
|
-
"prepublishOnly": "npm test && npm run build"
|
|
136
|
-
"preview": "cd preview/ && rimraf ../.parcel-cache dist/ && parcel --open"
|
|
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"
|
|
137
138
|
}
|
|
138
139
|
}
|
package/source/Avatar.tsx
CHANGED
|
@@ -1,25 +1,78 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
|
-
import { FC,
|
|
2
|
+
import { CSSProperties, FC, HTMLAttributes } from 'react';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
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
|
|
26
|
+
size,
|
|
27
|
+
theme,
|
|
28
|
+
subtle,
|
|
29
|
+
src,
|
|
30
|
+
alt,
|
|
31
|
+
status,
|
|
32
|
+
statusLabel = status,
|
|
33
|
+
children,
|
|
12
34
|
...props
|
|
13
35
|
}) => (
|
|
14
|
-
<
|
|
15
|
-
className={classNames(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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/Badge.tsx
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import classNames from 'classnames';
|
|
2
|
+
import { ComponentPropsWithRef, FC } from 'react';
|
|
3
|
+
|
|
4
|
+
import type { ComponentTheme } from './Button';
|
|
5
|
+
|
|
6
|
+
interface BadgeStyleProps {
|
|
7
|
+
variant?: 'solid' | 'subtle' | 'outline';
|
|
8
|
+
theme?: ComponentTheme;
|
|
9
|
+
pill?: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type BadgeLinkAttributes = ComponentPropsWithRef<'a'> & { href: string };
|
|
13
|
+
type BadgeElementAttributes =
|
|
14
|
+
(ComponentPropsWithRef<'span'> & { href?: never }) | BadgeLinkAttributes;
|
|
15
|
+
export type BadgeProps = BadgeStyleProps & BadgeElementAttributes;
|
|
16
|
+
|
|
17
|
+
const isBadgeLink = (props: BadgeElementAttributes): props is BadgeLinkAttributes =>
|
|
18
|
+
typeof props.href === 'string';
|
|
19
|
+
|
|
20
|
+
export const Badge: FC<BadgeProps> = ({ variant = 'solid', theme, pill, className, ...props }) => {
|
|
21
|
+
const classes = classNames(
|
|
22
|
+
'badge',
|
|
23
|
+
variant !== 'solid' && `badge-${variant}`,
|
|
24
|
+
theme && `theme-${theme}`,
|
|
25
|
+
{ 'rounded-pill': pill },
|
|
26
|
+
className
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
return isBadgeLink(props) ? (
|
|
30
|
+
<a {...props} className={classes} />
|
|
31
|
+
) : (
|
|
32
|
+
<span {...props} className={classes} />
|
|
33
|
+
);
|
|
34
|
+
};
|