idea-react 2.3.2 → 2.3.4
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/dist/index.js +41 -1
- package/dist/index.mjs +32 -1
- package/package.json +3 -3
- package/source/CodeBlock.tsx +1 -0
- package/tsdown.config.mts +1 -0
package/dist/index.js
CHANGED
|
@@ -1 +1,41 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));let c=require("@swc/helpers/_/_object_spread"),l=require("@swc/helpers/_/_object_without_properties"),u=require("react/jsx-runtime"),d=require("classnames");d=s(d);let f=require("@swc/helpers/_/_define_property"),p=require("@swc/helpers/_/_object_spread_props"),m=require("react"),ee=require("@shikijs/langs/javascript");ee=s(ee);let h=require("@shikijs/langs/jsx");h=s(h);let te=require("@shikijs/langs/tsx");te=s(te);let ne=require("@shikijs/langs/typescript");ne=s(ne);let re=require("@shikijs/themes/github-light");re=s(re);let g=require("react-element-to-jsx-string");g=s(g);let ie=require("shiki/core"),ae=require("shiki/engine/javascript"),_=require("@swc/helpers/_/_apply_decs_2203_r"),v=require("@swc/helpers/_/_class_private_field_get"),y=require("@swc/helpers/_/_class_private_field_init"),b=require("@swc/helpers/_/_class_private_field_set"),x=require("@swc/helpers/_/_identity"),S=require("mobx"),C=require("mobx-react"),w=require("mobx-react-helper"),T=require("web-utility"),oe=require("iterable-observer"),E=require("@swc/helpers/_/_async_to_generator"),se=require("react-editor-js"),ce=require("editorjs-html");ce=s(ce);let D=require("react-live"),O=require("react-bootstrap"),le=require("html2canvas");le=s(le);function ue(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 de=e=>{let{className:t,style:n,size:r=3}=e,i=(0,l._)(e,[`className`,`style`,`size`]);return(0,u.jsx)(`img`,(0,c._)({className:(0,d.default)(`object-fit-cover rounded-circle`,t),style:(0,c._)({width:`${r}rem`,height:`${r}rem`},n)},i))};de.displayName=`Avatar`;var fe=class extends m.PureComponent{componentDidMount(){window.addEventListener(`click`,this.switchClick,!0)}componentWillUnmount(){window.removeEventListener(`click`,this.switchClick,!0)}render(){let e=this.props,{children:t,onInnerClick:n,onOuterClick:r}=e,i=(0,l._)(e,[`children`,`onInnerClick`,`onOuterClick`]);return(0,u.jsx)(`div`,(0,p._)((0,c._)({ref:this.root},i),{children:t}))}constructor(...e){super(...e),(0,f._)(this,`root`,(0,m.createRef)()),(0,f._)(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 pe=(0,ie.createHighlighterCoreSync)({themes:[re.default],langs:[ee.default,h.default,ne.default,te.default],engine:(0,ae.createJavaScriptRegexEngine)()}),me=e=>{let{className:t=``,language:n,children:r}=e,i=(0,l._)(e,[`className`,`language`,`children`]),a=typeof r==`string`?r:(0,g.default)((0,m.isValidElement)(r)?r:(0,u.jsx)(u.Fragment,{children:r})),o=pe.codeToHtml(a,{lang:n,theme:`github-light`,structure:`inline`});return(0,u.jsx)(`pre`,(0,p._)((0,c._)({className:`m-0 language-${n} ${t}`},i),{children:(0,u.jsx)(`code`,{dangerouslySetInnerHTML:{__html:o},className:`language-${n}`})}))},he=[`primary`,`secondary`,`success`,`danger`,`warning`,`info`,`dark`,`light`];function ge(e,t=[]){let n=t[0]?he.filter(e=>!t.find(t=>t===e)):he;return n[[...e].reduce((e,t)=>e+t.charCodeAt(0),0)%n.length]}let _e;var k,ve,ye,be,xe,Se=(0,w.reaction)(e=>e.observedProps.endTime),Ce,we;let Te;new(_e=(k=new WeakMap,ve=class extends (xe=w.ObservedComponent){get rest(){return(0,v._)(this,k)}set rest(e){(0,b._)(this,k,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,T.Second)}componentWillUnmount(){super.componentWillUnmount(),this.stop()}render(){let e=this.props,{className:t=``,itemClassName:n=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,units:r,endTime:i,onEnd:a}=e,o=(0,l._)(e,[`className`,`itemClassName`,`units`,`endTime`,`onEnd`]),{timeSections:s}=this;return(0,u.jsx)(`ol`,(0,p._)((0,c._)({className:`list-unstyled m-0 ${t}`},o),{children:s.map(({value:e,label:t})=>(0,u.jsxs)(`li`,{className:n,children:[(0,u.jsx)(`strong`,{children:(e+``).padStart(2,`0`)}),(0,u.jsx)(`span`,{children:t})]},t))}))}constructor(...e){super(...e),(0,y._)(this,k,{writable:!0,value:(we(this),Ce(this,0))}),(0,f._)(this,`timer`,0),(0,f._)(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:[Ce,we],c:[Te,be]}=(0,_._)(ve,[[S.observable,1,`rest`],[S.computed,3,`timeSections`],[Se,2,`initTimer`]],[C.observer],xe),ve),ye=class extends x._{constructor(){super(Te),(0,f._)(this,`displayName`,`Countdown`),be()}},(0,f._)(ye,_e,void 0),ye);var Ee,De,Oe,ke=class extends Error{constructor(e=`Dialog closed`){super(e)}},Ae=new WeakMap,je=new WeakMap,Me=class{get input(){return(0,v._)(this,Ae)}set input(e){(0,b._)(this,Ae,e)}get defer(){return(0,v._)(this,je)}set defer(e){(0,b._)(this,je,e)}open(e){return e&&(this.input=e),this.defer=new oe.Defer,this.defer.promise.finally(()=>this.defer=void 0),this.defer.promise}constructor(e){(0,y._)(this,Ae,{writable:!0,value:(Oe(this),Ee(this,{}))}),(0,y._)(this,je,{writable:!0,value:De(this)}),(0,f._)(this,`Component`,void 0),this.Component=(0,C.observer)(t=>(0,u.jsx)(e,(0,p._)((0,c._)({},t,this.input),{defer:this.defer}))),this.Component.displayName=`DialogComponent`}};({e:[Ee,De,Oe]}=(0,_._)(Me,[[S.observable,1,`input`],[S.observable,1,`defer`]],[]));let Ne;var A,Pe,Fe,Ie,Le,Re,ze;const Be=(0,se.createReactEditorJS)();let Ve;new(Ne=(A=new WeakMap,Pe=class extends (Le=m.Component){get innerValue(){return(0,v._)(this,A)}set innerValue(e){(0,b._)(this,A,e)}render(){let e=this.props,{name:t,required:n,children:r}=e,i=(0,l._)(e,[`name`,`required`,`children`]),{innerValue:a}=this;return(0,u.jsxs)(`div`,{className:`form-control`,tabIndex:-1,onBlur:this.save,children:[(0,u.jsx)(`input`,{hidden:!0,name:t,required:n,value:JSON.stringify(a)}),(0,u.jsx)(Be,(0,p._)((0,c._)({},i),{onInitialize:e=>{var t;this.core=e,(t=i.onInitialize)==null||t.call(i,e)}}))]})}constructor(...e){var t;super(...e),t=this,(0,f._)(this,`core`,void 0),(0,y._)(this,A,{writable:!0,value:(ze(this),Re(this,this.props.defaultValue))}),(0,f._)(this,`save`,()=>(0,E._)(function*(){return t.core&&(t.innerValue=yield t.core.save())})())}},{e:[Re,ze],c:[Ve,Ie]}=(0,_._)(Pe,[[S.observable,1,`innerValue`]],[C.observer],Le),Pe),Fe=class extends x._{constructor(){super(Ve),(0,f._)(this,`displayName`,`Editor`),Ie()}},(0,f._)(Fe,Ne,void 0),Fe);const He=(0,ce.default)({link:({data:{link:e}})=>`<a href="${e}">${e}</a>`}),Ue=e=>{let{data:t}=e,n=(0,l._)(e,[`data`]);return(0,u.jsx)(`article`,(0,p._)((0,c._)({},n),{dangerouslySetInnerHTML:{__html:He.parse(t)}}))};Ue.displayName=`EditorHTML`;const j=e=>{let{className:t=``,children:n,maxWidth:r=`100%`,duration:i,height:a}=e,o=(0,l._)(e,[`className`,`children`,`maxWidth`,`duration`,`height`]);return(0,u.jsx)(`div`,(0,p._)((0,c._)({className:`overflow-hidden mw-100 ${t}`},o),{children:(0,u.jsx)(`div`,{className:`d-inline-block align-top text-nowrap lRDfma_scrollWrap`,style:{maxWidth:r,animationDuration:i,height:a,lineHeight:a},children:(0,u.jsx)(`div`,{className:`d-inline-block lRDfma_scrollItem`,style:{animationDuration:i},children:n})})}))},We=({children:e,maxWidth:t,duration:n,height:r})=>r?(0,u.jsx)(`div`,{className:`overflow-hidden lRDfma_scrollHeightWrap`,style:{maxWidth:t,"--scroll-height":r},children:(0,u.jsxs)(`div`,{className:`d-inline-block overflow-hidden mw-100 lRDfma_scrollContainer`,children:[(0,u.jsx)(`div`,{className:`d-block overflow-hidden text-wrap text-break lRDfma_unScrollItem`,children:e}),(0,u.jsx)(j,{duration:n,children:e})]})}):(0,u.jsx)(j,{maxWidth:t,duration:n,height:r,children:e});j.displayName=`HorizontalMarquee`;const M=e=>{let{className:t,style:n,name:r,size:i}=e,a=(0,l._)(e,[`className`,`style`,`name`,`size`]);return(0,u.jsx)(`span`,(0,c._)({className:(0,d.default)(`bi-${r}`,t),style:(0,c._)({fontSize:i&&`${i}rem`},n)},a))};M.displayName=`Icon`;const Ge=({scope:e,children:t})=>{let n=typeof t==`string`?t:(0,g.default)((0,m.isValidElement)(t)?t:(0,u.jsx)(u.Fragment,{children:t}));return(0,u.jsxs)(D.LiveProvider,{code:n,scope:e,language:`tsx`,children:[(0,u.jsx)(D.LivePreview,{className:`mb-3`}),(0,u.jsx)(D.LiveEditor,{}),(0,u.jsx)(D.LiveError,{className:`text-danger small p-2`})]})},N=e=>{let{className:t=``,children:n=`Loading...`}=e,r=(0,l._)(e,[`className`,`children`]);return(0,u.jsxs)(`div`,(0,p._)((0,c._)({className:`fixed-top h-100 w-100 d-flex justify-content-center align-items-center opacity-25 bg-black ${t}`},r),{children:[(0,u.jsx)(O.Spinner,{animation:`border`,variant:`success`}),(0,u.jsx)(`span`,{className:`ml-3 text-white`,children:n})]}))};N.displayName=`Loading`;const P=e=>{let{title:t,detail:n,children:r}=e,i=(0,l._)(e,[`title`,`detail`,`children`]);return(0,u.jsx)(O.OverlayTrigger,(0,p._)((0,c._)({},i),{overlay:n?(0,u.jsxs)(O.Popover,{children:[(0,u.jsx)(O.Popover.Header,{children:t}),(0,u.jsx)(O.Popover.Body,{children:n})]}):(0,u.jsx)(O.Tooltip,{children:t}),children:r}))};P.displayName=`OverlayBox`;let Ke;var F,I,L,qe,Je,Ye,Xe;let R;new(Ke=(F=new WeakMap,I=class extends (Je=w.ObservedComponent){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(0,v._)(this,F)}set currentDate(e){(0,b._)(this,F,e)}get dateGrid(){let e=new Date(this.currentDate);e.setDate(1),e=new Date(+e-e.getDay()*T.Day);let t=Array.from(Array(42),(t,n)=>new Date(+e+n*T.Day));return(0,T.splitArray)(t,7)}changeMonth(e){var t,n;this.currentDate=(0,T.changeMonth)(this.currentDate,e),(t=(n=this.props).onChange)==null||t.call(n,this.currentDate)}render(){let{weekFormatter:e,currentDate:t,dateGrid:n}=this,r=this.observedProps,{style:i,variant:a=`primary`,onChange:o,onSelect:s}=r,d=(0,l._)(r,[`style`,`variant`,`onChange`,`onSelect`]);return(0,u.jsxs)(O.Table,(0,p._)((0,c._)({},d),{style:(0,c._)({tableLayout:`fixed`},i),children:[(0,u.jsx)(`caption`,{children:(0,u.jsxs)(`div`,{className:`d-flex justify-content-between align-items-center`,children:[(0,u.jsx)(O.Button,{variant:a,onClick:()=>this.changeMonth(-1),children:`<`}),(0,T.formatDate)(t,`YYYY-MM`),(0,u.jsx)(O.Button,{variant:a,onClick:()=>this.changeMonth(1),children:`>`})]})}),(0,u.jsx)(`thead`,{children:(0,u.jsx)(`tr`,{children:n[0].map((t,n,{length:r})=>(0,u.jsx)(`td`,{className:`bg-${a} text-white`,style:{width:`calc(100% / ${r})`},children:e.format(t)},n))})}),(0,u.jsx)(`tbody`,{children:n.map(e=>(0,u.jsx)(`tr`,{children:e.map(this.renderDate)},e[0]+``))})]}))}constructor(...e){super(...e),(0,y._)(this,F,{writable:!0,value:(Xe(this),Ye(this,new Date))}),(0,f._)(this,`renderDate`,e=>{let{variant:t=`primary`,value:n,onSelect:r}=this.observedProps,i=(0,T.formatDate)(e,`YYYY-MM-DD`),a=n==null?void 0:n.filter(({date:e})=>(0,T.formatDate)(e,`YYYY-MM-DD`)===i);return(0,u.jsxs)(`td`,{className:(0,d.default)({"opacity-50":e.getMonth()!==this.currentDate.getMonth(),"fw-bold":i===(0,T.formatDate)(new Date,`YYYY-MM-DD`)}),children:[(0,u.jsx)(`time`,{className:`d-block`,dateTime:e.toJSON(),children:e.getDate()}),a==null?void 0:a.map(e=>typeof e.content==`object`?e.content:(0,u.jsx)(P,{title:e.content,children:(0,u.jsx)(O.Badge,{as:`a`,className:`d-inline-block text-decoration-none w-100 text-truncate`,bg:ge(e.content+``,[`light`]),href:e.link,onClick:()=>r==null?void 0:r(e),children:e.content})},e.date+``))]},e+``)})}},{e:[Ye,Xe],c:[R,qe]}=(0,_._)(I,[[S.computed,3,`weekFormatter`],[S.observable,1,`currentDate`],[S.computed,3,`dateGrid`]],[C.observer],Je),I),L=class extends x._{constructor(){super(R),(0,f._)(this,`displayName`,`MonthCalendar`),qe()}},(0,f._)(L,Ke,void 0),L);const z=({avatar:e,name:t})=>(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(de,{size:2,style:{marginRight:`0.5rem`},src:e}),(0,u.jsx)(`span`,{className:`align-middle`,children:t})]});z.displayName=`Nameplate`;let Ze;var B,V,Qe,$e,et,tt,nt,rt,it;const at=Array.from([,,,,,,],(e,t)=>`h${++t}`)+``;let ot;new(Ze=(B=new WeakMap,V=new WeakMap,Qe=class extends (tt=m.Component){get list(){return(0,v._)(this,B)}set list(e){(0,b._)(this,B,e)}get scrollY(){return(0,v._)(this,V)}set scrollY(e){(0,b._)(this,V,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(at),e=>{var t;(t=e).id||(t.id=(0,T.uniqueID)());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:e}=this,t=this.props,{style:n,variant:r=`underline`}=t,i=(0,l._)(t,[`style`,`variant`]);return(0,u.jsx)(O.Nav,(0,p._)((0,c._)({},i),{variant:r,style:(0,c._)({flexDirection:`column`},n),children:e.map(this.renderLink)}))}constructor(...e){super(...e),(0,y._)(this,B,{writable:!0,value:(it(this),nt(this,[]))}),(0,y._)(this,V,{writable:!0,value:rt(this,0)}),(0,f._)(this,`updateScrollY`,()=>this.scrollY=window.scrollY),(0,f._)(this,`scrollTo`,e=>()=>{var t,n;setTimeout(()=>(0,T.scrollTo)(`[id="${e.id}"]`)),(t=(n=this.props).onItemClick)==null||t.call(n,e)}),(0,f._)(this,`renderLink`,({id:e,level:t,text:n,top:r})=>{let{currentActiveId:i}=this,{depth:a=1/0}=this.props;return t<=a&&(0,u.jsx)(O.Nav.Item,{style:{textIndent:`${t-1}rem`},children:(0,u.jsx)(O.Nav.Link,{href:`#${e}`,active:i===e,onClick:this.scrollTo({id:e,level:t,text:n,top:r}),children:n})},e)})}},{e:[nt,rt,it],c:[ot,et]}=(0,_._)(Qe,[[S.observable,1,`list`],[S.observable,1,`scrollY`],[S.computed,3,`currentActiveId`]],[C.observer],tt),Qe),$e=class extends x._{constructor(){super(ot),(0,f._)(this,`displayName`,`PageNav`),et()}},(0,f._)($e,Ze,void 0),$e);let st;var H,U,W,ct,lt,ut,dt,ft,pt,mt,ht;let gt;new(st=(H=new WeakMap,U=new WeakMap,W=new WeakMap,ct=class extends (dt=m.Component){get scrollLeft(){return(0,v._)(this,H)}set scrollLeft(e){(0,b._)(this,H,e)}get scrollWidth(){return(0,v._)(this,U)}set scrollWidth(e){(0,b._)(this,U,e)}get clientWidth(){return(0,v._)(this,W)}set clientWidth(e){(0,b._)(this,W,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,n=this.props,{className:r=``,children:i}=n,a=(0,l._)(n,[`className`,`children`]);return(0,u.jsxs)(`div`,{className:`position-relative overflow-y-hidden ${r}`,children:[e&&(0,u.jsx)(`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:(0,u.jsx)(M,{name:`caret-left-fill`})}),(0,u.jsx)(`div`,{ref:this.scrollerRef,className:`overflow-x-auto aEvBXq_scrollerInner`,children:(0,u.jsx)(O.Nav,(0,p._)((0,c._)({},a),{className:`flex-nowrap`,children:i}))}),t&&(0,u.jsx)(`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:(0,u.jsx)(M,{name:`caret-right-fill`})})]})}constructor(...e){super(...e),(0,f._)(this,`scrollerRef`,(ht(this),(0,m.createRef)())),(0,y._)(this,H,{writable:!0,value:ft(this,0)}),(0,y._)(this,U,{writable:!0,value:pt(this,0)}),(0,y._)(this,W,{writable:!0,value:mt(this,0)}),(0,f._)(this,`updateScroll`,()=>{let e=this.scrollerRef.current;return e&&(this.scrollLeft=e.scrollLeft,this.scrollWidth=e.scrollWidth,this.clientWidth=e.clientWidth),e}),(0,f._)(this,`resizeObserver`,void 0),(0,f._)(this,`scrollBy`,e=>()=>{let t=this.scrollerRef.current;t&&t.scrollBy({left:e*t.clientWidth*.8,behavior:`smooth`})})}},{e:[ft,pt,mt,ht],c:[gt,ut]}=(0,_._)(ct,[[S.observable,1,`scrollLeft`],[S.observable,1,`scrollWidth`],[S.observable,1,`clientWidth`],[S.computed,3,`canScrollLeft`],[S.computed,3,`canScrollRight`]],[C.observer],dt),ct),lt=class extends x._{constructor(){super(gt),(0,f._)(this,`displayName`,`ScrollNav`),ut()}},(0,f._)(lt,st,void 0),lt);const _t=e=>{let{value:t,children:n}=e,r=(0,l._)(e,[`value`,`children`]);return(0,u.jsx)(O.Dropdown.Item,(0,p._)((0,c._)({},r),{"data-value":t,children:n}))};_t.displayName=`Option`;const vt=({className:e,style:t,variant:n,menuVariant:r,children:i,value:a,onChange:o,valueRender:s})=>{let c=(0,T.makeArray)(i).flat(1/0).find(e=>(0,m.isValidElement)(e)&&e.type===_t&&e.props.value===a);return(0,u.jsxs)(O.Dropdown,{onClick:({target:e})=>{let t=e.closest(`.dropdown-item`);if(!t)return;let{value:n}=t.dataset;o==null||o(n)},children:[(0,u.jsx)(O.Dropdown.Toggle,{className:(0,d.default)(`w-100`,`d-flex`,`justify-content-between`,`align-items-center`,!n&&`bg-white text-dark`,e),style:t,variant:n,children:(s==null?void 0:s(a))||(0,u.jsx)(`div`,{className:c==null?void 0:c.props.className,children:c==null?void 0:c.props.children})}),(0,u.jsx)(O.Dropdown.Menu,{variant:r,children:i})]})};vt.displayName=`Select`;let yt;var G,K,bt,xt,St,Ct,wt,Tt,Et;function Dt(e,t,n){return(0,E._)(function*(){let r=yield(0,le.default)(e,{useCORS:!0});return new Promise((e,i)=>r.toBlob(t=>t?e(URL.createObjectURL(t)):i(),t,n))})()}let Ot;new(yt=(G=new WeakMap,K=new WeakMap,bt=class extends (Ct=m.Component){get loading(){return(0,v._)(this,G)}set loading(e){(0,b._)(this,G,e)}get imageURI(){return(0,v._)(this,K)}set imageURI(e){(0,b._)(this,K,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 e=this.props,{className:t=``,children:n}=e,r=(0,l._)(e,[`className`,`children`]),{loading:i,imageURI:a}=this;return(0,u.jsxs)(u.Fragment,{children:[i&&(0,u.jsx)(N,{}),(0,u.jsxs)(`div`,(0,p._)((0,c._)({},r),{ref:this.root,className:`position-relative ${t}`,onMouseEnter:a?void 0:this.generateImage,onTouchStart:a?void 0:this.generateImage,children:[n,a&&(0,u.jsx)(O.Image,{className:`position-absolute start-0 top-0 w-100 h-100`,src:a,alt:`Share Image`,fluid:!0,onClick:this.share})]}))]})}constructor(...e){var t;super(...e),t=this,(0,f._)(this,`root`,(Et(this),(0,m.createRef)())),(0,y._)(this,G,{writable:!0,value:wt(this,!1)}),(0,y._)(this,K,{writable:!0,value:Tt(this,``)}),(0,f._)(this,`generateImage`,()=>(0,E._)(function*(){t.imageURI&&(URL.revokeObjectURL(t.imageURI),t.imageURI=``),t.loading=!0,t.imageURI=yield Dt(t.root.current),t.loading=!1})()),(0,f._)(this,`share`,e=>(0,E._)(function*(){var n,r;e.stopPropagation();let i=yield(0,T.blobOf)(t.imageURI),a=new File([i],`${t.props.title}.png`,{type:i.type});yield(n=(r=navigator).share)==null?void 0:n.call(r,(0,c._)({files:[a]},t.props))})())}},{e:[wt,Tt,Et],c:[Ot,St]}=(0,_._)(bt,[[S.observable,1,`loading`],[S.observable,1,`imageURI`]],[C.observer],Ct),bt),xt=class extends x._{constructor(){super(Ot),(0,f._)(this,`displayName`,`ShareBox`),St()}},(0,f._)(xt,yt,void 0),xt);const kt=e=>{let{animation:t,loading:n,disabled:r,children:i}=e,a=(0,l._)(e,[`animation`,`loading`,`disabled`,`children`]);return(0,u.jsxs)(O.Button,(0,p._)((0,c._)({},a),{disabled:n||r,children:[n&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(O.Spinner,{as:`span`,className:i?`me-2`:``,size:`sm`,animation:t,role:`status`,"aria-hidden":`true`}),!i&&(0,u.jsx)(`span`,{className:`visually-hidden`,children:`Loading...`})]}),i]}))};kt.displayName=`SpinnerButton`;const At=e=>{let{animation:t=`border`,variant:n=`primary`,size:r,colSpan:i}=e,a=(0,l._)(e,[`animation`,`variant`,`size`,`colSpan`]);return(0,u.jsx)(`tr`,(0,p._)((0,c._)({},a),{children:(0,u.jsx)(`td`,{className:`text-center p-4`,colSpan:i,children:(0,u.jsx)(O.Spinner,{animation:t,variant:n,size:r})})}))};At.displayName=`TableSpinner`;let jt;var q,J,Y,Mt,Nt,Pt,Ft,It,Lt;let Rt;new(jt=(q=new WeakMap,J=new WeakMap,Y=class extends (Pt=m.Component){get expanded(){return(0,v._)(this,q)}set expanded(e){(0,b._)(this,q,e)}get overflowed(){return(0,v._)(this,J)}set overflowed(e){(0,b._)(this,J,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 e=this.props,{children:t,rows:n=3,expandText:r=`⏬`,collapseText:i=`⏫`}=e,a=(0,l._)(e,[`children`,`rows`,`expandText`,`collapseText`]),{expanded:o,overflowed:s}=this,d={overflow:`hidden`,display:`-webkit-box`,WebkitBoxOrient:`vertical`,WebkitLineClamp:n};return(0,u.jsxs)(`div`,(0,p._)((0,c._)({},a),{children:[(0,u.jsx)(`p`,{ref:this.contentRef,style:o?void 0:d,children:t}),(s||o)&&(0,u.jsx)(`button`,{type:`button`,className:`bg-transparent border-0 p-0`,"aria-expanded":o,onClick:this.toggle,children:o?i:r})]}))}constructor(...e){super(...e),(0,y._)(this,q,{writable:!0,value:(Lt(this),Ft(this,!1))}),(0,y._)(this,J,{writable:!0,value:It(this,!1)}),(0,f._)(this,`contentRef`,(0,m.createRef)()),(0,f._)(this,`checkOverflow`,()=>{let{current:e}=this.contentRef;e&&(this.overflowed=e.scrollHeight>e.clientHeight)}),(0,f._)(this,`toggle`,()=>{this.expanded=!this.expanded,this.expanded||requestAnimationFrame(this.checkOverflow)})}},{e:[Ft,It,Lt],c:[Rt,Nt]}=(0,_._)(Y,[[S.observable,1,`expanded`],[S.observable,1,`overflowed`]],[C.observer],Pt),Y),Mt=class extends x._{constructor(){super(Rt),(0,f._)(this,`displayName`,`TextTruncate`),Nt()}},(0,f._)(Mt,jt,void 0),Mt);let zt;var X,Bt,Vt,Ht,Ut,Wt=(0,w.reaction)(({observedProps:{dateTime:e,format:t}})=>e+t),Gt,Kt;let Z;new(zt=(X=new WeakMap,Bt=class extends (Ut=w.ObservedComponent){updateText(){let{dateTime:e,format:t}=this.props;return(0,T.formatDate)(e,t)}get timeText(){return(0,v._)(this,X)}set timeText(e){(0,b._)(this,X,e)}componentDidMount(){super.componentDidMount(),this.timeText=this.updateText()}render(){let e=this.props,{dateTime:t}=e,n=(0,l._)(e,[`dateTime`]);return(0,u.jsx)(`time`,(0,p._)((0,c._)({dateTime:new Date(t).toJSON()},n),{children:this.timeText}))}constructor(...e){super(...e),(0,y._)(this,X,{writable:!0,value:(Kt(this),Gt(this,this.updateText()))})}},{e:[Gt,Kt],c:[Z,Ht]}=(0,_._)(Bt,[[Wt,2,`updateText`],[S.observable,1,`timeText`]],[C.observer],Ut),Bt),Vt=class extends x._{constructor(){super(Z),(0,f._)(this,`displayName`,`Time`),Ht()}},(0,f._)(Vt,zt,void 0),Vt);const qt={ms:`millisecond(s)`,s:`second(s)`,m:`minute(s)`,H:`hour(s)`,D:`day(s)`,W:`week(s)`,M:`month(s)`,Y:`year(s)`},Jt=e=>{let{date:t,unitWords:n=qt,beforeWord:r=` before`,afterWord:i=` after`}=e,a=(0,l._)(e,[`date`,`unitWords`,`beforeWord`,`afterWord`]);t=new Date(t);let{distance:o,unit:s}=(0,T.diffTime)(t);return(0,u.jsxs)(`time`,(0,p._)((0,c._)({},a),{dateTime:t.toJSON(),title:t.toLocaleString(),children:[Math.abs(o),` `,n[s],o<0?r:i]}))};Jt.displayName=`TimeDistance`;const Yt=e=>{let{className:t,events:n,timeFormat:r}=e,i=(0,l._)(e,[`className`,`events`,`timeFormat`]);return(0,u.jsx)(`ol`,(0,p._)((0,c._)({className:`list-unstyled hsu__a_timeline ${t}`},i),{children:n.map(({title:e,summary:t,time:n,link:i,people:a})=>(0,u.jsx)(`li`,{className:`position-relative hsu__a_timelineItem hsu__a_right`,children:(0,u.jsx)(O.Card,{children:(0,u.jsxs)(O.Card.Body,{className:`p-4 d-flex flex-column gap-3 align-items-center`,children:[(0,u.jsx)(`h3`,{className:`h5 m-0`,children:(0,u.jsx)(`a`,{className:`text-decoration-none stretched-link`,href:i,children:e})}),(0,u.jsxs)(`div`,{className:`small text-muted d-flex gap-2`,children:[`⏲️`,(0,u.jsx)(Z,{dateTime:n[0],format:r}),n[1]&&`~`,n[1]&&(0,u.jsx)(Z,{dateTime:n[1],format:r})]}),(0,u.jsx)(`ul`,{className:`list-unstyled m-0 d-flex gap-2 flex-wrap justify-content-around`,children:a==null?void 0:a.map(e=>(0,u.jsx)(`li`,{children:(0,u.jsx)(z,(0,c._)({},e))},e.name))}),(0,u.jsx)(`p`,{className:`m-0`,children:t})]})})},e))}))};Yt.displayName=`Timeline`;var Xt,Zt;const Qt=new Set([`warning`,`info`,`light`]);var Q=new WeakMap,$t=class{get messages(){return(0,v._)(this,Q)}set messages(e){(0,b._)(this,Q,e)}open(e){let t=(0,T.uniqueID)(),n=Date.now(),{promise:r,resolve:i}=Promise.withResolvers();return this.messages=[...this.messages,(0,p._)((0,c._)({id:t},e),{openedAt:n,resolve:i})],r}close(e){let t=this.messages.find(t=>t.id===e)||{},{resolve:n}=t,r=(0,l._)(t,[`resolve`]);n==null||n((0,p._)((0,c._)({},r),{closedAt:Date.now()})),this.messages=this.messages.filter(t=>t.id!==e)}constructor(e=T.Timestamp){(0,f._)(this,`TimeScalar`,void 0),(0,y._)(this,Q,{writable:!0,value:void 0}),(0,f._)(this,`Component`,void 0),(0,f._)(this,`renderMessage`,void 0),this.TimeScalar=e,(0,b._)(this,Q,(Zt(this),Xt(this,[]))),this.Component=(0,C.observer)(({position:e=`top-end`})=>(0,u.jsx)(O.ToastContainer,{position:e,className:`position-fixed p-3`,children:this.messages.map(this.renderMessage)})),this.renderMessage=({id:e,openedAt:t,title:n,body:r,variant:i,delay:a=3e3})=>{let o=i&&!Qt.has(i)?`text-white`:void 0,s=!!n||a===0,c=this.TimeScalar.distanceOf(Date.now(),t).toShortString();return(0,u.jsxs)(O.Toast,{bg:i,delay:a,autohide:a!==0,onClose:()=>this.close(e),children:[s&&(0,u.jsxs)(O.Toast.Header,{children:[(0,u.jsx)(`strong`,{className:`me-auto`,children:n}),(0,u.jsx)(`small`,{children:c})]}),(0,u.jsx)(O.Toast.Body,{className:o,children:r})]},e)},this.Component.displayName=`ToastComponent`}};({e:[Xt,Zt]}=(0,_._)($t,[[S.observable,1,`messages`]],[]));let en;var $,tn,nn,rn,an,on,sn;let cn;new(en=($=new WeakMap,tn=class extends (an=m.Component){get echoed(){return(0,v._)(this,$)}set echoed(e){(0,b._)(this,$,e)}render(){let e=this.props,{className:t,text:n}=e,r=(0,l._)(e,[`className`,`text`]),{echoed:i}=this;return(0,u.jsx)(`pre`,(0,p._)((0,c._)({},r),{ref:this.init,className:(0,d.default)(`text-wrap`,t),children:i+(i===n?``:`_`)}))}constructor(...e){var t;super(...e),t=this,(0,y._)(this,$,{writable:!0,value:(sn(this),on(this,``))}),(0,f._)(this,`init`,e=>e&&new IntersectionObserver(([{isIntersecting:e}],n)=>(0,E._)(function*(){if(!e)return;n.disconnect();let{text:r,intervals:i=150}=t.props;for(let e of r)yield(0,T.sleep)(i/1e3),t.echoed+=e})()).observe(e))}},{e:[on,sn],c:[cn,rn]}=(0,_._)(tn,[[S.observable,1,`echoed`]],[C.observer],an),tn),nn=class extends x._{constructor(){super(cn),(0,f._)(this,`displayName`,`TypeEcho`),rn()}},(0,f._)(nn,en,void 0),nn);const ln=({email:e,website:t})=>(0,u.jsxs)(`address`,{className:`mb-0 d-flex justify-content-around gap-2`,children:[e&&(0,u.jsx)(`a`,{rel:`noreferrer`,target:`_blank`,href:`mailto:`+e,children:(0,u.jsx)(M,{name:`envelope`})}),t&&(0,u.jsx)(`a`,{rel:`noreferrer`,target:`_blank`,href:t,children:(0,u.jsx)(M,{name:`globe2`})})]}),un=`X5DLia_image`;var dn=class extends m.PureComponent{render(){let e=this.props,{className:t=``,title:n,rank:r=[],linkOf:i}=e,a=(0,l._)(e,[`className`,`title`,`rank`,`linkOf`]);return(0,u.jsxs)(O.Row,(0,p._)((0,c._)({className:`X5DLia_rankBox ${t}`},a),{children:[(0,u.jsxs)(O.Col,{sm:12,xs:12,lg:7,children:[(0,u.jsxs)(`div`,{className:`shadow rounded-3 X5DLia_title`,children:[(0,u.jsxs)(`div`,{className:`X5DLia_medal`,children:[(0,u.jsx)(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),(0,u.jsx)(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),(0,u.jsx)(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`})]}),(0,u.jsx)(`h3`,{"data-text":n,className:`position-relative m-auto mb-0 fw-bold text-center`,children:n})]}),(0,u.jsx)(O.Row,{as:`ul`,className:`mt-2 g-0 align-items-end text-center ps-0 pt-2 list-unstyled X5DLia_topUsers`,children:r.slice(0,3).map(this.renderMedal)})]}),(0,u.jsx)(O.Col,{xs:12,sm:12,lg:5,children:(0,u.jsx)(O.Table,{className:`my-3 pt-2 X5DLia_restUsers`,responsive:!0,children:(0,u.jsx)(`tbody`,{children:r.slice(3,10).map(this.renderRow)})})})]}))}constructor(...e){super(...e),(0,f._)(this,`renderMedal`,e=>{var t,n;return(0,u.jsxs)(O.Col,{as:`li`,children:[(0,u.jsx)(`div`,{className:`shadow-lg overflow-hidden rounded-circle m-auto ${un}`,children:(0,u.jsx)(O.Image,{src:e.avatar,alt:e.name,loading:`lazy`,fluid:!0})}),(0,u.jsxs)(`div`,{className:`position-relative overflow-hidden X5DLia_topUser`,children:[(0,u.jsxs)(`div`,{className:`position-relative`,children:[(0,u.jsx)(`i`,{className:`d-block overflow-hidden m-auto mb-1 rounded-circle`}),(0,u.jsx)(`a`,{className:`d-block mb-0 stretched-link`,href:((t=(n=this.props).linkOf)==null?void 0:t.call(n,e))||`#`,children:e.name}),(0,u.jsx)(`strong`,{children:e.score})]}),(0,u.jsx)(ln,(0,c._)({},e))]})]},e.id)}),(0,f._)(this,`renderRow`,(e,t,{length:n})=>{var r,i;return(0,u.jsxs)(`tr`,{className:`position-relative`,children:[(0,u.jsx)(`td`,{className:`align-middle`,children:(0,u.jsx)(O.Badge,{className:`fw-bold fst-italic`,children:(t+4+``).padStart((n+``).length,`0`)})}),(0,u.jsxs)(`td`,{className:`position-relative mw-50 text-truncate X5DLia_name`,children:[(0,u.jsx)(`div`,{className:`d-inline-block overflow-hidden align-middle rounded-circle ${un}`,children:(0,u.jsx)(O.Image,{src:e.avatar,alt:e.name,loading:`lazy`,fluid:!0})}),(0,u.jsx)(`a`,{className:`ms-2 d-inline-block align-middle stretched-link`,style:{color:`rgb(248, ${(t+2)*15}, ${(t+2)*35})`},href:((r=(i=this.props).linkOf)==null?void 0:r.call(i,e))||`#`,children:e.name})]}),(0,u.jsx)(`td`,{className:`align-middle`,children:e.score}),(0,u.jsx)(`td`,{className:`align-middle`,children:(0,u.jsx)(ln,(0,c._)({},e))})]},e.id)})}};(0,f._)(dn,`displayName`,`UserRankView`);const fn=e=>{let{className:t=``,children:n,duration:r}=e,i=(0,l._)(e,[`className`,`children`,`duration`]);return(0,u.jsx)(`div`,(0,p._)((0,c._)({className:`overflow-hidden ${t}`},i),{children:(0,u.jsx)(`div`,{className:`d-inline-block mw-100 mh-100 QBd6SG_scrollWrap`,style:{"--duration":r},children:(0,u.jsx)(`div`,{className:`d-inline-block QBd6SG_scrollItem`,children:n})})}))};fn.displayName=`VerticalMarquee`;const pn=[`🐵`,`🐔`,`🐶`,`🐷`,`🐭`,`🐮`,`🐯`,`🐰`,`🐲`,`🐍`,`🐴`,`🐐`],mn=e=>{let t=e<0?e+1:e;return pn[(t%12+12)%12]},hn=e=>{let{className:t=``,itemClassName:n=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,startYear:r,endYear:i=new Date().getFullYear(),itemOf:a}=e,o=(0,l._)(e,[`className`,`itemClassName`,`startYear`,`endYear`,`itemOf`]);return(0,u.jsx)(`ol`,(0,p._)((0,c._)({className:`list-unstyled m-0 d-flex flex-wrap justify-content-center gap-3 ${t}`},o),{children:Array.from({length:i-r+1},(e,t)=>{let r=i-t;if(r===0)return null;let o=mn(r),{link:s=`#`,title:c}=(a==null?void 0:a(r,o))||{};return(0,u.jsx)(`li`,{className:n,children:(0,u.jsxs)(`a`,{className:`d-inline-block p-3 text-decoration-none text-center`,href:s,children:[(0,u.jsx)(`div`,{className:`fs-1`,children:o}),c]})},r)})}))};hn.displayName=`ZodiacBar`,exports.Avatar=de,exports.ClickBoundary=fe,exports.CodeBlock=me,Object.defineProperty(exports,"Countdown",{enumerable:!0,get:function(){return Te}}),exports.Dialog=Me,exports.DialogClose=ke,Object.defineProperty(exports,"Editor",{enumerable:!0,get:function(){return Ve}}),exports.EditorHTML=Ue,exports.HorizontalMarquee=j,exports.HorizontalMarqueeBox=We,exports.Icon=M,exports.LiveTSX=Ge,exports.Loading=N,Object.defineProperty(exports,"MonthCalendar",{enumerable:!0,get:function(){return R}}),exports.Nameplate=z,exports.Option=_t,exports.OverlayBox=P,Object.defineProperty(exports,"PageNav",{enumerable:!0,get:function(){return ot}}),Object.defineProperty(exports,"ScrollNav",{enumerable:!0,get:function(){return gt}}),exports.Select=vt,Object.defineProperty(exports,"ShareBox",{enumerable:!0,get:function(){return Ot}}),exports.SpinnerButton=kt,exports.TableSpinner=At,Object.defineProperty(exports,"TextTruncate",{enumerable:!0,get:function(){return Rt}}),Object.defineProperty(exports,"Time",{enumerable:!0,get:function(){return Z}}),exports.TimeDistance=Jt,exports.Timeline=Yt,exports.Toast=$t,Object.defineProperty(exports,"TypeEcho",{enumerable:!0,get:function(){return cn}}),exports.UserRankView=dn,exports.VariantColors=he,exports.VerticalMarquee=fn,exports.ZodiacBar=hn,exports.ZodiacSigns=pn,exports.animate=ue,exports.elementToImage=Dt,exports.parser=He,exports.text2color=ge,exports.zodiacOf=mn;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));let l=require("@swc/helpers/_/_object_spread"),u=require("@swc/helpers/_/_object_without_properties"),d=require("react/jsx-runtime"),f=require("classnames");f=c(f);let p=require("@swc/helpers/_/_define_property"),m=require("@swc/helpers/_/_object_spread_props"),h=require("react"),g=require("@shikijs/langs/javascript");g=c(g);let _=require("@shikijs/langs/jsx");_=c(_);let v=require("@shikijs/langs/tsx");v=c(v);let y=require("@shikijs/langs/typescript");y=c(y);let b=require("@shikijs/themes/github-light");b=c(b);let x=require("shiki/core"),S=require("shiki/engine/javascript"),C=require("@swc/helpers/_/_apply_decs_2203_r"),w=require("@swc/helpers/_/_class_private_field_get"),T=require("@swc/helpers/_/_class_private_field_init"),E=require("@swc/helpers/_/_class_private_field_set"),D=require("@swc/helpers/_/_identity"),O=require("mobx"),k=require("mobx-react"),A=require("mobx-react-helper"),j=require("web-utility"),ee=require("iterable-observer"),M=require("@swc/helpers/_/_async_to_generator"),N=require("react-editor-js"),P=require("editorjs-html");P=c(P);let F=require("react-live"),I=require("react-bootstrap"),L=require("html2canvas");L=c(L);function R(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 z=e=>{let{className:t,style:n,size:r=3}=e,i=(0,u._)(e,[`className`,`style`,`size`]);return(0,d.jsx)(`img`,(0,l._)({className:(0,f.default)(`object-fit-cover rounded-circle`,t),style:(0,l._)({width:`${r}rem`,height:`${r}rem`},n)},i))};z.displayName=`Avatar`;var te=class extends h.PureComponent{componentDidMount(){window.addEventListener(`click`,this.switchClick,!0)}componentWillUnmount(){window.removeEventListener(`click`,this.switchClick,!0)}render(){let e=this.props,{children:t,onInnerClick:n,onOuterClick:r}=e,i=(0,u._)(e,[`children`,`onInnerClick`,`onOuterClick`]);return(0,d.jsx)(`div`,(0,m._)((0,l._)({ref:this.root},i),{children:t}))}constructor(...e){super(...e),(0,p._)(this,`root`,(0,h.createRef)()),(0,p._)(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)})}},ne=o((e=>{Object.defineProperty(e,"__esModule",{value:!0});
|
|
2
|
+
/*!
|
|
3
|
+
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
6
|
+
* Released under the MIT License.
|
|
7
|
+
*/
|
|
8
|
+
function t(e){return Object.prototype.toString.call(e)===`[object Object]`}function n(e){var n,r;return t(e)!==!1&&(n=e.constructor,n===void 0||(r=n.prototype,t(r)!==!1&&r.hasOwnProperty(`isPrototypeOf`)!==!1))}e.isPlainObject=n})),re=o((e=>{var t=e&&e.__assign||function(){return t=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},t.apply(this,arguments)},n=e&&e.__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 r=[];function i(e){var t=typeof e;return e!==null&&(t===`object`||t===`function`)}function a(e){return Object.prototype.toString.call(e)===`[object RegExp]`}function o(e){return Object.getOwnPropertySymbols(e).filter(function(t){return Object.prototype.propertyIsEnumerable.call(e,t)})}function s(e,c,l){l===void 0&&(l=``);var u=t(t({},{indent:` `,singleQuotes:!0}),c),d=u.inlineCharacterLimit===void 0?{newLine:`
|
|
9
|
+
`,newLineOrSpace:`
|
|
10
|
+
`,pad:l,indent:l+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`),l).replace(new RegExp(d.indent,`g`),l+u.indent)};if(r.indexOf(e)!==-1)return`"[Circular]"`;if(e==null||typeof e==`number`||typeof e==`boolean`||typeof e==`function`||typeof e==`symbol`||a(e))return String(e);if(e instanceof Date)return`new Date('${e.toISOString()}')`;if(Array.isArray(e)){if(e.length===0)return`[]`;r.push(e);var p=`[`+d.newLine+e.map(function(t,n){var r=e.length-1===n?d.newLine:`,`+d.newLineOrSpace,i=s(t,u,l+u.indent);return u.transform&&(i=u.transform(e,n,i)),d.indent+i+r}).join(``)+d.pad+`]`;return r.pop(),f(p)}if(i(e)){var m=n(n([],Object.keys(e),!0),o(e),!0);if(u.filter&&(m=m.filter(function(t){return u.filter&&u.filter(e,t)})),m.length===0)return`{}`;r.push(e);var p=`{`+d.newLine+m.map(function(t,n){var r=m.length-1===n?d.newLine:`,`+d.newLineOrSpace,i=typeof t==`symbol`,a=!i&&/^[a-z$_][a-z$_0-9]*$/i.test(t.toString()),o=i||a?t:s(t,u),c=s(e[t],u,l+u.indent);return u.transform&&(c=u.transform(e,t,c)),d.indent+String(o)+`: `+c+r}).join(``)+d.pad+`}`;return r.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=s})),ie=o((e=>{
|
|
13
|
+
/** @license React v16.13.1
|
|
14
|
+
* react-is.production.min.js
|
|
15
|
+
*
|
|
16
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
17
|
+
*
|
|
18
|
+
* This source code is licensed under the MIT license found in the
|
|
19
|
+
* LICENSE file in the root directory of this source tree.
|
|
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.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(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 h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),ae=o((e=>{
|
|
22
|
+
/** @license React v16.13.1
|
|
23
|
+
* react-is.development.js
|
|
24
|
+
*
|
|
25
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
26
|
+
*
|
|
27
|
+
* This source code is licensed under the MIT license found in the
|
|
28
|
+
* LICENSE file in the root directory of this source tree.
|
|
29
|
+
*/
|
|
30
|
+
process.env.NODE_ENV!==`production`&&(function(){"use strict";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.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)}function x(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:var p=e.type;switch(p){case l:case u:case i:case o:case a:case f:return p;default:var g=p&&p.$$typeof;switch(g){case c:case d:case h:case m:case s:return g;default:return t}}case r:return t}}}var S=l,C=u,w=c,T=s,E=n,D=d,O=i,k=h,A=m,j=r,ee=o,M=a,N=f,P=!1;function F(e){return P||(P=!0,console.warn(`The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.`)),I(e)||x(e)===l}function I(e){return x(e)===u}function L(e){return x(e)===c}function R(e){return x(e)===s}function z(e){return typeof e==`object`&&!!e&&e.$$typeof===n}function te(e){return x(e)===d}function ne(e){return x(e)===i}function re(e){return x(e)===h}function ie(e){return x(e)===m}function ae(e){return x(e)===r}function oe(e){return x(e)===o}function se(e){return x(e)===a}function ce(e){return x(e)===f}e.AsyncMode=S,e.ConcurrentMode=C,e.ContextConsumer=w,e.ContextProvider=T,e.Element=E,e.ForwardRef=D,e.Fragment=O,e.Lazy=k,e.Memo=A,e.Portal=j,e.Profiler=ee,e.StrictMode=M,e.Suspense=N,e.isAsyncMode=F,e.isConcurrentMode=I,e.isContextConsumer=L,e.isContextProvider=R,e.isElement=z,e.isForwardRef=te,e.isFragment=ne,e.isLazy=re,e.isMemo=ie,e.isPortal=ae,e.isProfiler=oe,e.isStrictMode=se,e.isSuspense=ce,e.isValidElementType=b,e.typeOf=x})()})),oe=o(((e,t)=>{t.exports=process.env.NODE_ENV===`production`?ie():ae()})),se=c(o((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=ne(),n=require("react"),r=re(),i=oe();function a(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}function o(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if(n!=="default"){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var s=o(n),c=a(n),l=(function(e,t){return e===0?``:Array(e*t).fill(` `).join(``)});function u(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 d(e){if(Array.isArray(e))return u(e)}function f(e,t,n){return(t=y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function m(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
31
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h(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 g(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?h(Object(n),!0).forEach(function(t){f(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _(e){return d(e)||p(e)||x(e)||m()}function v(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 y(e){var t=v(e,`string`);return typeof t==`symbol`?t:t+``}function b(e){"@babel/helpers - typeof";return b=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},b(e)}function x(e,t){if(e){if(typeof e==`string`)return u(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)?u(e,t):void 0}}function S(e,t){if(e===null||b(e)!==`object`||e instanceof Date||e instanceof RegExp)return e;if(s.isValidElement(e)){var n=g({},e);return delete n._owner,n}return t.add(e),Array.isArray(e)?e.map(function(e){return S(e,t)}):Object.keys(e).sort().reduce(function(n,r){return n[r]=r===`current`||t.has(e[r])?`[Circular]`:S(e[r],t),n},{})}function C(e){return S(e,new WeakSet)}var w=function(e){return{type:`string`,value:e}},T=function(e){return{type:`number`,value:e}},E=function(e,t,n,r){return{type:`ReactElement`,displayName:e,props:t,defaultProps:n,childrens:r}},D=function(e,t){return{type:`ReactFragment`,key:e,childrens:t}},O=!!n.Fragment,k=function(e){return!e.name||e.name===`_default`?`No Display Name`:e.name},A=function(e){switch(!0){case!!e.displayName:return e.displayName;case e.$$typeof===i.Memo:return A(e.type);case e.$$typeof===i.ForwardRef:return A(e.render);default:return k(e)}},j=function(e){switch(!0){case typeof e.type==`string`:return e.type;case typeof e.type==`function`:return e.type.displayName?e.type.displayName:k(e.type);case i.isForwardRef(e):case i.isMemo(e):return A(e.type);case i.isContextConsumer(e):return`${e.type._context.displayName||`Context`}.Consumer`;case i.isContextProvider(e):return`${e.type.displayName||`Context`}.Provider`;case i.isLazy(e):return`Lazy`;case i.isProfiler(e):return`Profiler`;case i.isStrictMode(e):return`StrictMode`;case i.isSuspense(e):return`Suspense`;default:return`UnknownElementType`}},ee=function(e,t){return t!==`children`},M=function(e){return e!==!0&&e!==!1&&e!==null&&e!==``},N=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},P=function(e,t){var r=t.displayName,i=r===void 0?j:r;if(typeof e==`string`)return w(e);if(typeof e==`number`)return T(e);if(!c.default.isValidElement(e))throw Error(`react-element-to-jsx-string: Expected a React.Element, got \`${b(e)}\``);var a=i(e),o=N(e.props,ee),s=e.key;typeof s==`string`&&s.search(/^\./)&&(o.key=s);var l=N(e.type.defaultProps||{},ee),u=c.default.Children.toArray(e.props.children).filter(M).map(function(e){return P(e,t)});return O&&e.type===n.Fragment?D(s,u):E(a,o,l,u)};function F(){}var I=function(e){return e.toString().split(`
|
|
32
|
+
`).map(function(e){return e.trim()}).join(``)},L=function(e){return e.toString()},R=I,z=(function(e,t){var n=t.functionValue,r=n===void 0?R:n;return!t.showFunctions&&r===R?r(F):r(e)}),te=(function(e,t,i,a){var o=C(e),s=r.prettyPrint(o,{transform:function(e,t,r){var o=e[t];return o&&n.isValidElement(o)?J(P(o,a),!0,i,a):typeof o==`function`?z(o,a):r}});return t?s.replace(/\s+/g,` `).replace(/{ /g,`{`).replace(/ }/g,`}`).replace(/\[ /g,`[`).replace(/ ]/g,`]`):s.replace(/\t/g,l(1,a.tabStop)).replace(/\n([^$])/g,`
|
|
33
|
+
${l(i+1,a.tabStop)}\$1`)}),ie=function(e){return e.replace(/"/g,`"`)},ae=function(e,r,i,a){if(typeof e==`number`)return`{${String(e)}}`;if(typeof e==`string`)return`"${ie(e)}"`;if(b(e)===`symbol`){var o=e.valueOf().toString().replace(/Symbol\((.*)\)/,`$1`);return o?`{Symbol('${o}')}`:`{Symbol()}`}return typeof e==`function`?`{${z(e,a)}}`:n.isValidElement(e)?`{${J(P(e,a),!0,i,a)}}`:e instanceof Date?isNaN(e.valueOf())?`{new Date(NaN)}`:`{new Date("${e.toISOString()}")}`:t.isPlainObject(e)||Array.isArray(e)?`{${te(e,r,i,a)}}`:`{${String(e)}}`},se=(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,u=s.useBooleanShorthandSyntax,d=s.tabStop,f=ae(c,a,o,s),p=` `,m=`
|
|
34
|
+
${l(o+1,d)}`,h=f.includes(`
|
|
35
|
+
`);return u&&f===`{false}`&&!r?(p=``,m=``):u&&f===`{true}`?(p+=`${e}`,m+=`${e}`):(p+=`${e}=${f}`,m+=`${e}=${f}`),{attributeFormattedInline:p,attributeFormattedMultiline:m,isMultilineAttribute:h}}),ce=(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(w(String(r.value)+String(t.value))):(r&&n.push(r),n.push(t)),n}),le=function(e){return[`key`,`ref`].includes(e)},B=(function(e){return function(t){var n=t.includes(`key`),r=t.includes(`ref`),i=t.filter(function(e){return!le(e)}),a=_(e?i.sort():i);return r&&a.unshift(`ref`),n&&a.unshift(`key`),a}});function ue(e,t){return Array.isArray(t)?function(e){return t.indexOf(e)===-1}:function(n){return t(e[n],n)}}var de=function(e,t,n,r,i){var a=i.tabStop;return e.type===`string`?t.split(`
|
|
36
|
+
`).map(function(e,t){return t===0?e:`${l(r,a)}${e}`}).join(`
|
|
37
|
+
`):t},V=function(e,t,n){return function(r){return de(r,J(r,e,t,n),e,t,n)}},fe=function(e,t){return function(n){var r=Object.keys(e).includes(n);return!r||r&&e[n]!==t[n]}},H=function(e,t,n,r,i){return i?l(n,r).length+t.length>i:e.length>1},pe=function(e,t,n,r,i,a,o){return(H(e,t,i,a,o)||n)&&!r},U=(function(e,t,n,r){var i=e.type,a=e.displayName,o=a===void 0?``:a,s=e.childrens,c=e.props,u=c===void 0?{}:c,d=e.defaultProps,f=d===void 0?{}:d;if(i!==`ReactElement`)throw Error(`The "formatReactElementNode" function could only format node of type "ReactElement". Given: ${i}`);var p=r.filterProps,m=r.maxInlineAttributesLineLength,h=r.showDefaultProps,g=r.sortProps,_=r.tabStop,v=`<${o}`,y=v,b=v,x=!1,S=[],C=ue(u,p);Object.keys(u).filter(C).filter(fe(f,u)).forEach(function(e){return S.push(e)}),Object.keys(f).filter(C).filter(function(){return h}).filter(function(e){return!S.includes(e)}).forEach(function(e){return S.push(e)});var w=B(g)(S);if(w.forEach(function(e){var i=se(e,Object.keys(u).includes(e),u[e],Object.keys(f).includes(e),f[e],t,n,r),a=i.attributeFormattedInline,o=i.attributeFormattedMultiline;i.isMultilineAttribute&&(x=!0),y+=a,b+=o}),b+=`
|
|
38
|
+
${l(n,_)}`,v=pe(w,y,x,t,n,_,m)?b:y,s&&s.length>0){var T=n+1;v+=`>`,t||(v+=`
|
|
39
|
+
`,v+=l(T,_)),v+=s.reduce(ce,[]).map(V(t,T,r)).join(t?``:`
|
|
40
|
+
${l(T,_)}`),t||(v+=`
|
|
41
|
+
`,v+=l(T-1,_)),v+=`</${o}>`}else H(w,y,n,_,m)||(v+=` `),v+=`/>`;return v}),me=``,W=`React.Fragment`,he=function(e,t,n){var r={};return t&&(r={key:t}),{type:`ReactElement`,displayName:e,props:r,defaultProps:{},childrens:n}},G=function(e){return!!e.key},ge=function(e){return e.childrens.length===0},_e=(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 U(he(r.useFragmentShortSyntax?ge(e)||G(e)?W:me:W,a,o),t,n,r)}),ve=[`<`,`>`,`{`,`}`],ye=function(e){return ve.some(function(t){return e.includes(t)})},K=function(e){return ye(e)?`{\`${e}\`}`:e},q=function(e){var t=e;return t.endsWith(` `)&&(t=t.replace(/^(.*?)(\s+)$/,`$1{'$2'}`)),t.startsWith(` `)&&(t=t.replace(/^(\s+)(.*)$/,`{'$1'}$2`)),t},J=(function(e,t,n,r){if(e.type===`number`)return String(e.value);if(e.type===`string`)return e.value?`${q(K(String(e.value)))}`:``;if(e.type===`ReactElement`)return U(e,t,n,r);if(e.type===`ReactFragment`)return _e(e,t,n,r);throw TypeError(`Unknow format type "${e.type}"`)}),be=(function(e,t){return J(e,!1,0,t)});e.default=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 be(P(e,y),y)},e.inlineFunction=I,e.preserveFunctionLineBreak=L}))());const ce=(0,x.createHighlighterCoreSync)({themes:[b.default],langs:[g.default,_.default,y.default,v.default],engine:(0,S.createJavaScriptRegexEngine)()}),le=e=>{let{className:t=``,language:n,children:r}=e,i=(0,u._)(e,[`className`,`language`,`children`]),a=typeof r==`string`?r:(0,se.default)((0,h.isValidElement)(r)?r:(0,d.jsx)(d.Fragment,{children:r})),o=ce.codeToHtml(a,{lang:n,theme:`github-light`,structure:`inline`});return(0,d.jsx)(`pre`,(0,m._)((0,l._)({className:`m-0 language-${n} ${t}`},i),{children:(0,d.jsx)(`code`,{dangerouslySetInnerHTML:{__html:o},className:`language-${n}`})}))},B=[`primary`,`secondary`,`success`,`danger`,`warning`,`info`,`dark`,`light`];function ue(e,t=[]){let n=t[0]?B.filter(e=>!t.find(t=>t===e)):B;return n[[...e].reduce((e,t)=>e+t.charCodeAt(0),0)%n.length]}let de;var V,fe,H,pe,U,me=(0,A.reaction)(e=>e.observedProps.endTime),W,he;let G;new(de=(V=new WeakMap,fe=class extends (U=A.ObservedComponent){get rest(){return(0,w._)(this,V)}set rest(e){(0,E._)(this,V,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,j.Second)}componentWillUnmount(){super.componentWillUnmount(),this.stop()}render(){let e=this.props,{className:t=``,itemClassName:n=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,units:r,endTime:i,onEnd:a}=e,o=(0,u._)(e,[`className`,`itemClassName`,`units`,`endTime`,`onEnd`]),{timeSections:s}=this;return(0,d.jsx)(`ol`,(0,m._)((0,l._)({className:`list-unstyled m-0 ${t}`},o),{children:s.map(({value:e,label:t})=>(0,d.jsxs)(`li`,{className:n,children:[(0,d.jsx)(`strong`,{children:(e+``).padStart(2,`0`)}),(0,d.jsx)(`span`,{children:t})]},t))}))}constructor(...e){super(...e),(0,T._)(this,V,{writable:!0,value:(he(this),W(this,0))}),(0,p._)(this,`timer`,0),(0,p._)(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:[W,he],c:[G,pe]}=(0,C._)(fe,[[O.observable,1,`rest`],[O.computed,3,`timeSections`],[me,2,`initTimer`]],[k.observer],U),fe),H=class extends D._{constructor(){super(G),(0,p._)(this,`displayName`,`Countdown`),pe()}},(0,p._)(H,de,void 0),H);var ge,_e,ve,ye=class extends Error{constructor(e=`Dialog closed`){super(e)}},K=new WeakMap,q=new WeakMap,J=class{get input(){return(0,w._)(this,K)}set input(e){(0,E._)(this,K,e)}get defer(){return(0,w._)(this,q)}set defer(e){(0,E._)(this,q,e)}open(e){return e&&(this.input=e),this.defer=new ee.Defer,this.defer.promise.finally(()=>this.defer=void 0),this.defer.promise}constructor(e){(0,T._)(this,K,{writable:!0,value:(ve(this),ge(this,{}))}),(0,T._)(this,q,{writable:!0,value:_e(this)}),(0,p._)(this,`Component`,void 0),this.Component=(0,k.observer)(t=>(0,d.jsx)(e,(0,m._)((0,l._)({},t,this.input),{defer:this.defer}))),this.Component.displayName=`DialogComponent`}};({e:[ge,_e,ve]}=(0,C._)(J,[[O.observable,1,`input`],[O.observable,1,`defer`]],[]));let be;var Y,xe,Se,Ce,we,Te,Ee;const De=(0,N.createReactEditorJS)();let Oe;new(be=(Y=new WeakMap,xe=class extends (we=h.Component){get innerValue(){return(0,w._)(this,Y)}set innerValue(e){(0,E._)(this,Y,e)}render(){let e=this.props,{name:t,required:n,children:r}=e,i=(0,u._)(e,[`name`,`required`,`children`]),{innerValue:a}=this;return(0,d.jsxs)(`div`,{className:`form-control`,tabIndex:-1,onBlur:this.save,children:[(0,d.jsx)(`input`,{hidden:!0,name:t,required:n,value:JSON.stringify(a)}),(0,d.jsx)(De,(0,m._)((0,l._)({},i),{onInitialize:e=>{var t;this.core=e,(t=i.onInitialize)==null||t.call(i,e)}}))]})}constructor(...e){var t;super(...e),t=this,(0,p._)(this,`core`,void 0),(0,T._)(this,Y,{writable:!0,value:(Ee(this),Te(this,this.props.defaultValue))}),(0,p._)(this,`save`,()=>(0,M._)(function*(){return t.core&&(t.innerValue=yield t.core.save())})())}},{e:[Te,Ee],c:[Oe,Ce]}=(0,C._)(xe,[[O.observable,1,`innerValue`]],[k.observer],we),xe),Se=class extends D._{constructor(){super(Oe),(0,p._)(this,`displayName`,`Editor`),Ce()}},(0,p._)(Se,be,void 0),Se);const ke=(0,P.default)({link:({data:{link:e}})=>`<a href="${e}">${e}</a>`}),Ae=e=>{let{data:t}=e,n=(0,u._)(e,[`data`]);return(0,d.jsx)(`article`,(0,m._)((0,l._)({},n),{dangerouslySetInnerHTML:{__html:ke.parse(t)}}))};Ae.displayName=`EditorHTML`;const X=e=>{let{className:t=``,children:n,maxWidth:r=`100%`,duration:i,height:a}=e,o=(0,u._)(e,[`className`,`children`,`maxWidth`,`duration`,`height`]);return(0,d.jsx)(`div`,(0,m._)((0,l._)({className:`overflow-hidden mw-100 ${t}`},o),{children:(0,d.jsx)(`div`,{className:`d-inline-block align-top text-nowrap lRDfma_scrollWrap`,style:{maxWidth:r,animationDuration:i,height:a,lineHeight:a},children:(0,d.jsx)(`div`,{className:`d-inline-block lRDfma_scrollItem`,style:{animationDuration:i},children:n})})}))},je=({children:e,maxWidth:t,duration:n,height:r})=>r?(0,d.jsx)(`div`,{className:`overflow-hidden lRDfma_scrollHeightWrap`,style:{maxWidth:t,"--scroll-height":r},children:(0,d.jsxs)(`div`,{className:`d-inline-block overflow-hidden mw-100 lRDfma_scrollContainer`,children:[(0,d.jsx)(`div`,{className:`d-block overflow-hidden text-wrap text-break lRDfma_unScrollItem`,children:e}),(0,d.jsx)(X,{duration:n,children:e})]})}):(0,d.jsx)(X,{maxWidth:t,duration:n,height:r,children:e});X.displayName=`HorizontalMarquee`;const Z=e=>{let{className:t,style:n,name:r,size:i}=e,a=(0,u._)(e,[`className`,`style`,`name`,`size`]);return(0,d.jsx)(`span`,(0,l._)({className:(0,f.default)(`bi-${r}`,t),style:(0,l._)({fontSize:i&&`${i}rem`},n)},a))};Z.displayName=`Icon`;const Me=({scope:e,children:t})=>{let n=typeof t==`string`?t:(0,se.default)((0,h.isValidElement)(t)?t:(0,d.jsx)(d.Fragment,{children:t}));return(0,d.jsxs)(F.LiveProvider,{code:n,scope:e,language:`tsx`,children:[(0,d.jsx)(F.LivePreview,{className:`mb-3`}),(0,d.jsx)(F.LiveEditor,{}),(0,d.jsx)(F.LiveError,{className:`text-danger small p-2`})]})},Ne=e=>{let{className:t=``,children:n=`Loading...`}=e,r=(0,u._)(e,[`className`,`children`]);return(0,d.jsxs)(`div`,(0,m._)((0,l._)({className:`fixed-top h-100 w-100 d-flex justify-content-center align-items-center opacity-25 bg-black ${t}`},r),{children:[(0,d.jsx)(I.Spinner,{animation:`border`,variant:`success`}),(0,d.jsx)(`span`,{className:`ml-3 text-white`,children:n})]}))};Ne.displayName=`Loading`;const Pe=e=>{let{title:t,detail:n,children:r}=e,i=(0,u._)(e,[`title`,`detail`,`children`]);return(0,d.jsx)(I.OverlayTrigger,(0,m._)((0,l._)({},i),{overlay:n?(0,d.jsxs)(I.Popover,{children:[(0,d.jsx)(I.Popover.Header,{children:t}),(0,d.jsx)(I.Popover.Body,{children:n})]}):(0,d.jsx)(I.Tooltip,{children:t}),children:r}))};Pe.displayName=`OverlayBox`;let Fe;var Ie,Le,Re,ze,Be,Ve,He;let Ue;new(Fe=(Ie=new WeakMap,Le=class extends (Be=A.ObservedComponent){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(0,w._)(this,Ie)}set currentDate(e){(0,E._)(this,Ie,e)}get dateGrid(){let e=new Date(this.currentDate);e.setDate(1),e=new Date(+e-e.getDay()*j.Day);let t=Array.from(Array(42),(t,n)=>new Date(+e+n*j.Day));return(0,j.splitArray)(t,7)}changeMonth(e){var t,n;this.currentDate=(0,j.changeMonth)(this.currentDate,e),(t=(n=this.props).onChange)==null||t.call(n,this.currentDate)}render(){let{weekFormatter:e,currentDate:t,dateGrid:n}=this,r=this.observedProps,{style:i,variant:a=`primary`,onChange:o,onSelect:s}=r,c=(0,u._)(r,[`style`,`variant`,`onChange`,`onSelect`]);return(0,d.jsxs)(I.Table,(0,m._)((0,l._)({},c),{style:(0,l._)({tableLayout:`fixed`},i),children:[(0,d.jsx)(`caption`,{children:(0,d.jsxs)(`div`,{className:`d-flex justify-content-between align-items-center`,children:[(0,d.jsx)(I.Button,{variant:a,onClick:()=>this.changeMonth(-1),children:`<`}),(0,j.formatDate)(t,`YYYY-MM`),(0,d.jsx)(I.Button,{variant:a,onClick:()=>this.changeMonth(1),children:`>`})]})}),(0,d.jsx)(`thead`,{children:(0,d.jsx)(`tr`,{children:n[0].map((t,n,{length:r})=>(0,d.jsx)(`td`,{className:`bg-${a} text-white`,style:{width:`calc(100% / ${r})`},children:e.format(t)},n))})}),(0,d.jsx)(`tbody`,{children:n.map(e=>(0,d.jsx)(`tr`,{children:e.map(this.renderDate)},e[0]+``))})]}))}constructor(...e){super(...e),(0,T._)(this,Ie,{writable:!0,value:(He(this),Ve(this,new Date))}),(0,p._)(this,`renderDate`,e=>{let{variant:t=`primary`,value:n,onSelect:r}=this.observedProps,i=(0,j.formatDate)(e,`YYYY-MM-DD`),a=n==null?void 0:n.filter(({date:e})=>(0,j.formatDate)(e,`YYYY-MM-DD`)===i);return(0,d.jsxs)(`td`,{className:(0,f.default)({"opacity-50":e.getMonth()!==this.currentDate.getMonth(),"fw-bold":i===(0,j.formatDate)(new Date,`YYYY-MM-DD`)}),children:[(0,d.jsx)(`time`,{className:`d-block`,dateTime:e.toJSON(),children:e.getDate()}),a==null?void 0:a.map(e=>typeof e.content==`object`?e.content:(0,d.jsx)(Pe,{title:e.content,children:(0,d.jsx)(I.Badge,{as:`a`,className:`d-inline-block text-decoration-none w-100 text-truncate`,bg:ue(e.content+``,[`light`]),href:e.link,onClick:()=>r==null?void 0:r(e),children:e.content})},e.date+``))]},e+``)})}},{e:[Ve,He],c:[Ue,ze]}=(0,C._)(Le,[[O.computed,3,`weekFormatter`],[O.observable,1,`currentDate`],[O.computed,3,`dateGrid`]],[k.observer],Be),Le),Re=class extends D._{constructor(){super(Ue),(0,p._)(this,`displayName`,`MonthCalendar`),ze()}},(0,p._)(Re,Fe,void 0),Re);const We=({avatar:e,name:t})=>(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(z,{size:2,style:{marginRight:`0.5rem`},src:e}),(0,d.jsx)(`span`,{className:`align-middle`,children:t})]});We.displayName=`Nameplate`;let Ge;var Ke,qe,Je,Ye,Xe,Ze,Qe,$e,et;const tt=Array.from([,,,,,,],(e,t)=>`h${++t}`)+``;let nt;new(Ge=(Ke=new WeakMap,qe=new WeakMap,Je=class extends (Ze=h.Component){get list(){return(0,w._)(this,Ke)}set list(e){(0,E._)(this,Ke,e)}get scrollY(){return(0,w._)(this,qe)}set scrollY(e){(0,E._)(this,qe,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(tt),e=>{var t;(t=e).id||(t.id=(0,j.uniqueID)());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:e}=this,t=this.props,{style:n,variant:r=`underline`}=t,i=(0,u._)(t,[`style`,`variant`]);return(0,d.jsx)(I.Nav,(0,m._)((0,l._)({},i),{variant:r,style:(0,l._)({flexDirection:`column`},n),children:e.map(this.renderLink)}))}constructor(...e){super(...e),(0,T._)(this,Ke,{writable:!0,value:(et(this),Qe(this,[]))}),(0,T._)(this,qe,{writable:!0,value:$e(this,0)}),(0,p._)(this,`updateScrollY`,()=>this.scrollY=window.scrollY),(0,p._)(this,`scrollTo`,e=>()=>{var t,n;setTimeout(()=>(0,j.scrollTo)(`[id="${e.id}"]`)),(t=(n=this.props).onItemClick)==null||t.call(n,e)}),(0,p._)(this,`renderLink`,({id:e,level:t,text:n,top:r})=>{let{currentActiveId:i}=this,{depth:a=1/0}=this.props;return t<=a&&(0,d.jsx)(I.Nav.Item,{style:{textIndent:`${t-1}rem`},children:(0,d.jsx)(I.Nav.Link,{href:`#${e}`,active:i===e,onClick:this.scrollTo({id:e,level:t,text:n,top:r}),children:n})},e)})}},{e:[Qe,$e,et],c:[nt,Xe]}=(0,C._)(Je,[[O.observable,1,`list`],[O.observable,1,`scrollY`],[O.computed,3,`currentActiveId`]],[k.observer],Ze),Je),Ye=class extends D._{constructor(){super(nt),(0,p._)(this,`displayName`,`PageNav`),Xe()}},(0,p._)(Ye,Ge,void 0),Ye);let rt;var it,at,ot,st,ct,lt,ut,dt,ft,pt,mt;let ht;new(rt=(it=new WeakMap,at=new WeakMap,ot=new WeakMap,st=class extends (ut=h.Component){get scrollLeft(){return(0,w._)(this,it)}set scrollLeft(e){(0,E._)(this,it,e)}get scrollWidth(){return(0,w._)(this,at)}set scrollWidth(e){(0,E._)(this,at,e)}get clientWidth(){return(0,w._)(this,ot)}set clientWidth(e){(0,E._)(this,ot,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,n=this.props,{className:r=``,children:i}=n,a=(0,u._)(n,[`className`,`children`]);return(0,d.jsxs)(`div`,{className:`position-relative overflow-y-hidden ${r}`,children:[e&&(0,d.jsx)(`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:(0,d.jsx)(Z,{name:`caret-left-fill`})}),(0,d.jsx)(`div`,{ref:this.scrollerRef,className:`overflow-x-auto aEvBXq_scrollerInner`,children:(0,d.jsx)(I.Nav,(0,m._)((0,l._)({},a),{className:`flex-nowrap`,children:i}))}),t&&(0,d.jsx)(`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:(0,d.jsx)(Z,{name:`caret-right-fill`})})]})}constructor(...e){super(...e),(0,p._)(this,`scrollerRef`,(mt(this),(0,h.createRef)())),(0,T._)(this,it,{writable:!0,value:dt(this,0)}),(0,T._)(this,at,{writable:!0,value:ft(this,0)}),(0,T._)(this,ot,{writable:!0,value:pt(this,0)}),(0,p._)(this,`updateScroll`,()=>{let e=this.scrollerRef.current;return e&&(this.scrollLeft=e.scrollLeft,this.scrollWidth=e.scrollWidth,this.clientWidth=e.clientWidth),e}),(0,p._)(this,`resizeObserver`,void 0),(0,p._)(this,`scrollBy`,e=>()=>{let t=this.scrollerRef.current;t&&t.scrollBy({left:e*t.clientWidth*.8,behavior:`smooth`})})}},{e:[dt,ft,pt,mt],c:[ht,lt]}=(0,C._)(st,[[O.observable,1,`scrollLeft`],[O.observable,1,`scrollWidth`],[O.observable,1,`clientWidth`],[O.computed,3,`canScrollLeft`],[O.computed,3,`canScrollRight`]],[k.observer],ut),st),ct=class extends D._{constructor(){super(ht),(0,p._)(this,`displayName`,`ScrollNav`),lt()}},(0,p._)(ct,rt,void 0),ct);const gt=e=>{let{value:t,children:n}=e,r=(0,u._)(e,[`value`,`children`]);return(0,d.jsx)(I.Dropdown.Item,(0,m._)((0,l._)({},r),{"data-value":t,children:n}))};gt.displayName=`Option`;const _t=({className:e,style:t,variant:n,menuVariant:r,children:i,value:a,onChange:o,valueRender:s})=>{let c=(0,j.makeArray)(i).flat(1/0).find(e=>(0,h.isValidElement)(e)&&e.type===gt&&e.props.value===a);return(0,d.jsxs)(I.Dropdown,{onClick:({target:e})=>{let t=e.closest(`.dropdown-item`);if(!t)return;let{value:n}=t.dataset;o==null||o(n)},children:[(0,d.jsx)(I.Dropdown.Toggle,{className:(0,f.default)(`w-100`,`d-flex`,`justify-content-between`,`align-items-center`,!n&&`bg-white text-dark`,e),style:t,variant:n,children:(s==null?void 0:s(a))||(0,d.jsx)(`div`,{className:c==null?void 0:c.props.className,children:c==null?void 0:c.props.children})}),(0,d.jsx)(I.Dropdown.Menu,{variant:r,children:i})]})};_t.displayName=`Select`;let vt;var yt,bt,xt,St,Ct,wt,Tt,Et,Dt;function Ot(e,t,n){return(0,M._)(function*(){let r=yield(0,L.default)(e,{useCORS:!0});return new Promise((e,i)=>r.toBlob(t=>t?e(URL.createObjectURL(t)):i(),t,n))})()}let kt;new(vt=(yt=new WeakMap,bt=new WeakMap,xt=class extends (wt=h.Component){get loading(){return(0,w._)(this,yt)}set loading(e){(0,E._)(this,yt,e)}get imageURI(){return(0,w._)(this,bt)}set imageURI(e){(0,E._)(this,bt,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 e=this.props,{className:t=``,children:n}=e,r=(0,u._)(e,[`className`,`children`]),{loading:i,imageURI:a}=this;return(0,d.jsxs)(d.Fragment,{children:[i&&(0,d.jsx)(Ne,{}),(0,d.jsxs)(`div`,(0,m._)((0,l._)({},r),{ref:this.root,className:`position-relative ${t}`,onMouseEnter:a?void 0:this.generateImage,onTouchStart:a?void 0:this.generateImage,children:[n,a&&(0,d.jsx)(I.Image,{className:`position-absolute start-0 top-0 w-100 h-100`,src:a,alt:`Share Image`,fluid:!0,onClick:this.share})]}))]})}constructor(...e){var t;super(...e),t=this,(0,p._)(this,`root`,(Dt(this),(0,h.createRef)())),(0,T._)(this,yt,{writable:!0,value:Tt(this,!1)}),(0,T._)(this,bt,{writable:!0,value:Et(this,``)}),(0,p._)(this,`generateImage`,()=>(0,M._)(function*(){t.imageURI&&(URL.revokeObjectURL(t.imageURI),t.imageURI=``),t.loading=!0,t.imageURI=yield Ot(t.root.current),t.loading=!1})()),(0,p._)(this,`share`,e=>(0,M._)(function*(){var n,r;e.stopPropagation();let i=yield(0,j.blobOf)(t.imageURI),a=new File([i],`${t.props.title}.png`,{type:i.type});yield(n=(r=navigator).share)==null?void 0:n.call(r,(0,l._)({files:[a]},t.props))})())}},{e:[Tt,Et,Dt],c:[kt,Ct]}=(0,C._)(xt,[[O.observable,1,`loading`],[O.observable,1,`imageURI`]],[k.observer],wt),xt),St=class extends D._{constructor(){super(kt),(0,p._)(this,`displayName`,`ShareBox`),Ct()}},(0,p._)(St,vt,void 0),St);const At=e=>{let{animation:t,loading:n,disabled:r,children:i}=e,a=(0,u._)(e,[`animation`,`loading`,`disabled`,`children`]);return(0,d.jsxs)(I.Button,(0,m._)((0,l._)({},a),{disabled:n||r,children:[n&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(I.Spinner,{as:`span`,className:i?`me-2`:``,size:`sm`,animation:t,role:`status`,"aria-hidden":`true`}),!i&&(0,d.jsx)(`span`,{className:`visually-hidden`,children:`Loading...`})]}),i]}))};At.displayName=`SpinnerButton`;const jt=e=>{let{animation:t=`border`,variant:n=`primary`,size:r,colSpan:i}=e,a=(0,u._)(e,[`animation`,`variant`,`size`,`colSpan`]);return(0,d.jsx)(`tr`,(0,m._)((0,l._)({},a),{children:(0,d.jsx)(`td`,{className:`text-center p-4`,colSpan:i,children:(0,d.jsx)(I.Spinner,{animation:t,variant:n,size:r})})}))};jt.displayName=`TableSpinner`;let Mt;var Q,Nt,Pt,Ft,It,Lt,Rt,zt,Bt;let Vt;new(Mt=(Q=new WeakMap,Nt=new WeakMap,Pt=class extends (Lt=h.Component){get expanded(){return(0,w._)(this,Q)}set expanded(e){(0,E._)(this,Q,e)}get overflowed(){return(0,w._)(this,Nt)}set overflowed(e){(0,E._)(this,Nt,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 e=this.props,{children:t,rows:n=3,expandText:r=`⏬`,collapseText:i=`⏫`}=e,a=(0,u._)(e,[`children`,`rows`,`expandText`,`collapseText`]),{expanded:o,overflowed:s}=this,c={overflow:`hidden`,display:`-webkit-box`,WebkitBoxOrient:`vertical`,WebkitLineClamp:n};return(0,d.jsxs)(`div`,(0,m._)((0,l._)({},a),{children:[(0,d.jsx)(`p`,{ref:this.contentRef,style:o?void 0:c,children:t}),(s||o)&&(0,d.jsx)(`button`,{type:`button`,className:`bg-transparent border-0 p-0`,"aria-expanded":o,onClick:this.toggle,children:o?i:r})]}))}constructor(...e){super(...e),(0,T._)(this,Q,{writable:!0,value:(Bt(this),Rt(this,!1))}),(0,T._)(this,Nt,{writable:!0,value:zt(this,!1)}),(0,p._)(this,`contentRef`,(0,h.createRef)()),(0,p._)(this,`checkOverflow`,()=>{let{current:e}=this.contentRef;e&&(this.overflowed=e.scrollHeight>e.clientHeight)}),(0,p._)(this,`toggle`,()=>{this.expanded=!this.expanded,this.expanded||requestAnimationFrame(this.checkOverflow)})}},{e:[Rt,zt,Bt],c:[Vt,It]}=(0,C._)(Pt,[[O.observable,1,`expanded`],[O.observable,1,`overflowed`]],[k.observer],Lt),Pt),Ft=class extends D._{constructor(){super(Vt),(0,p._)(this,`displayName`,`TextTruncate`),It()}},(0,p._)(Ft,Mt,void 0),Ft);let Ht;var Ut,Wt,Gt,Kt,qt,Jt=(0,A.reaction)(({observedProps:{dateTime:e,format:t}})=>e+t),Yt,Xt;let $;new(Ht=(Ut=new WeakMap,Wt=class extends (qt=A.ObservedComponent){updateText(){let{dateTime:e,format:t}=this.props;return(0,j.formatDate)(e,t)}get timeText(){return(0,w._)(this,Ut)}set timeText(e){(0,E._)(this,Ut,e)}componentDidMount(){super.componentDidMount(),this.timeText=this.updateText()}render(){let e=this.props,{dateTime:t}=e,n=(0,u._)(e,[`dateTime`]);return(0,d.jsx)(`time`,(0,m._)((0,l._)({dateTime:new Date(t).toJSON()},n),{children:this.timeText}))}constructor(...e){super(...e),(0,T._)(this,Ut,{writable:!0,value:(Xt(this),Yt(this,this.updateText()))})}},{e:[Yt,Xt],c:[$,Kt]}=(0,C._)(Wt,[[Jt,2,`updateText`],[O.observable,1,`timeText`]],[k.observer],qt),Wt),Gt=class extends D._{constructor(){super($),(0,p._)(this,`displayName`,`Time`),Kt()}},(0,p._)(Gt,Ht,void 0),Gt);const Zt={ms:`millisecond(s)`,s:`second(s)`,m:`minute(s)`,H:`hour(s)`,D:`day(s)`,W:`week(s)`,M:`month(s)`,Y:`year(s)`},Qt=e=>{let{date:t,unitWords:n=Zt,beforeWord:r=` before`,afterWord:i=` after`}=e,a=(0,u._)(e,[`date`,`unitWords`,`beforeWord`,`afterWord`]);t=new Date(t);let{distance:o,unit:s}=(0,j.diffTime)(t);return(0,d.jsxs)(`time`,(0,m._)((0,l._)({},a),{dateTime:t.toJSON(),title:t.toLocaleString(),children:[Math.abs(o),` `,n[s],o<0?r:i]}))};Qt.displayName=`TimeDistance`;const $t=e=>{let{className:t,events:n,timeFormat:r}=e,i=(0,u._)(e,[`className`,`events`,`timeFormat`]);return(0,d.jsx)(`ol`,(0,m._)((0,l._)({className:`list-unstyled hsu__a_timeline ${t}`},i),{children:n.map(({title:e,summary:t,time:n,link:i,people:a})=>(0,d.jsx)(`li`,{className:`position-relative hsu__a_timelineItem hsu__a_right`,children:(0,d.jsx)(I.Card,{children:(0,d.jsxs)(I.Card.Body,{className:`p-4 d-flex flex-column gap-3 align-items-center`,children:[(0,d.jsx)(`h3`,{className:`h5 m-0`,children:(0,d.jsx)(`a`,{className:`text-decoration-none stretched-link`,href:i,children:e})}),(0,d.jsxs)(`div`,{className:`small text-muted d-flex gap-2`,children:[`⏲️`,(0,d.jsx)($,{dateTime:n[0],format:r}),n[1]&&`~`,n[1]&&(0,d.jsx)($,{dateTime:n[1],format:r})]}),(0,d.jsx)(`ul`,{className:`list-unstyled m-0 d-flex gap-2 flex-wrap justify-content-around`,children:a==null?void 0:a.map(e=>(0,d.jsx)(`li`,{children:(0,d.jsx)(We,(0,l._)({},e))},e.name))}),(0,d.jsx)(`p`,{className:`m-0`,children:t})]})})},e))}))};$t.displayName=`Timeline`;var en,tn;const nn=new Set([`warning`,`info`,`light`]);var rn=new WeakMap,an=class{get messages(){return(0,w._)(this,rn)}set messages(e){(0,E._)(this,rn,e)}open(e){let t=(0,j.uniqueID)(),n=Date.now(),{promise:r,resolve:i}=Promise.withResolvers();return this.messages=[...this.messages,(0,m._)((0,l._)({id:t},e),{openedAt:n,resolve:i})],r}close(e){let t=this.messages.find(t=>t.id===e)||{},{resolve:n}=t,r=(0,u._)(t,[`resolve`]);n==null||n((0,m._)((0,l._)({},r),{closedAt:Date.now()})),this.messages=this.messages.filter(t=>t.id!==e)}constructor(e=j.Timestamp){(0,p._)(this,`TimeScalar`,void 0),(0,T._)(this,rn,{writable:!0,value:void 0}),(0,p._)(this,`Component`,void 0),(0,p._)(this,`renderMessage`,void 0),this.TimeScalar=e,(0,E._)(this,rn,(tn(this),en(this,[]))),this.Component=(0,k.observer)(({position:e=`top-end`})=>(0,d.jsx)(I.ToastContainer,{position:e,className:`position-fixed p-3`,children:this.messages.map(this.renderMessage)})),this.renderMessage=({id:e,openedAt:t,title:n,body:r,variant:i,delay:a=3e3})=>{let o=i&&!nn.has(i)?`text-white`:void 0,s=!!n||a===0,c=this.TimeScalar.distanceOf(Date.now(),t).toShortString();return(0,d.jsxs)(I.Toast,{bg:i,delay:a,autohide:a!==0,onClose:()=>this.close(e),children:[s&&(0,d.jsxs)(I.Toast.Header,{children:[(0,d.jsx)(`strong`,{className:`me-auto`,children:n}),(0,d.jsx)(`small`,{children:c})]}),(0,d.jsx)(I.Toast.Body,{className:o,children:r})]},e)},this.Component.displayName=`ToastComponent`}};({e:[en,tn]}=(0,C._)(an,[[O.observable,1,`messages`]],[]));let on;var sn,cn,ln,un,dn,fn,pn;let mn;new(on=(sn=new WeakMap,cn=class extends (dn=h.Component){get echoed(){return(0,w._)(this,sn)}set echoed(e){(0,E._)(this,sn,e)}render(){let e=this.props,{className:t,text:n}=e,r=(0,u._)(e,[`className`,`text`]),{echoed:i}=this;return(0,d.jsx)(`pre`,(0,m._)((0,l._)({},r),{ref:this.init,className:(0,f.default)(`text-wrap`,t),children:i+(i===n?``:`_`)}))}constructor(...e){var t;super(...e),t=this,(0,T._)(this,sn,{writable:!0,value:(pn(this),fn(this,``))}),(0,p._)(this,`init`,e=>e&&new IntersectionObserver(([{isIntersecting:e}],n)=>(0,M._)(function*(){if(!e)return;n.disconnect();let{text:r,intervals:i=150}=t.props;for(let e of r)yield(0,j.sleep)(i/1e3),t.echoed+=e})()).observe(e))}},{e:[fn,pn],c:[mn,un]}=(0,C._)(cn,[[O.observable,1,`echoed`]],[k.observer],dn),cn),ln=class extends D._{constructor(){super(mn),(0,p._)(this,`displayName`,`TypeEcho`),un()}},(0,p._)(ln,on,void 0),ln);const hn=({email:e,website:t})=>(0,d.jsxs)(`address`,{className:`mb-0 d-flex justify-content-around gap-2`,children:[e&&(0,d.jsx)(`a`,{rel:`noreferrer`,target:`_blank`,href:`mailto:`+e,children:(0,d.jsx)(Z,{name:`envelope`})}),t&&(0,d.jsx)(`a`,{rel:`noreferrer`,target:`_blank`,href:t,children:(0,d.jsx)(Z,{name:`globe2`})})]}),gn=`X5DLia_image`;var _n=class extends h.PureComponent{render(){let e=this.props,{className:t=``,title:n,rank:r=[],linkOf:i}=e,a=(0,u._)(e,[`className`,`title`,`rank`,`linkOf`]);return(0,d.jsxs)(I.Row,(0,m._)((0,l._)({className:`X5DLia_rankBox ${t}`},a),{children:[(0,d.jsxs)(I.Col,{sm:12,xs:12,lg:7,children:[(0,d.jsxs)(`div`,{className:`shadow rounded-3 X5DLia_title`,children:[(0,d.jsxs)(`div`,{className:`X5DLia_medal`,children:[(0,d.jsx)(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),(0,d.jsx)(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`}),(0,d.jsx)(`i`,{className:`d-inline-block ms-1 overflow-hidden rounded-circle`})]}),(0,d.jsx)(`h3`,{"data-text":n,className:`position-relative m-auto mb-0 fw-bold text-center`,children:n})]}),(0,d.jsx)(I.Row,{as:`ul`,className:`mt-2 g-0 align-items-end text-center ps-0 pt-2 list-unstyled X5DLia_topUsers`,children:r.slice(0,3).map(this.renderMedal)})]}),(0,d.jsx)(I.Col,{xs:12,sm:12,lg:5,children:(0,d.jsx)(I.Table,{className:`my-3 pt-2 X5DLia_restUsers`,responsive:!0,children:(0,d.jsx)(`tbody`,{children:r.slice(3,10).map(this.renderRow)})})})]}))}constructor(...e){super(...e),(0,p._)(this,`renderMedal`,e=>{var t,n;return(0,d.jsxs)(I.Col,{as:`li`,children:[(0,d.jsx)(`div`,{className:`shadow-lg overflow-hidden rounded-circle m-auto ${gn}`,children:(0,d.jsx)(I.Image,{src:e.avatar,alt:e.name,loading:`lazy`,fluid:!0})}),(0,d.jsxs)(`div`,{className:`position-relative overflow-hidden X5DLia_topUser`,children:[(0,d.jsxs)(`div`,{className:`position-relative`,children:[(0,d.jsx)(`i`,{className:`d-block overflow-hidden m-auto mb-1 rounded-circle`}),(0,d.jsx)(`a`,{className:`d-block mb-0 stretched-link`,href:((t=(n=this.props).linkOf)==null?void 0:t.call(n,e))||`#`,children:e.name}),(0,d.jsx)(`strong`,{children:e.score})]}),(0,d.jsx)(hn,(0,l._)({},e))]})]},e.id)}),(0,p._)(this,`renderRow`,(e,t,{length:n})=>{var r,i;return(0,d.jsxs)(`tr`,{className:`position-relative`,children:[(0,d.jsx)(`td`,{className:`align-middle`,children:(0,d.jsx)(I.Badge,{className:`fw-bold fst-italic`,children:(t+4+``).padStart((n+``).length,`0`)})}),(0,d.jsxs)(`td`,{className:`position-relative mw-50 text-truncate X5DLia_name`,children:[(0,d.jsx)(`div`,{className:`d-inline-block overflow-hidden align-middle rounded-circle ${gn}`,children:(0,d.jsx)(I.Image,{src:e.avatar,alt:e.name,loading:`lazy`,fluid:!0})}),(0,d.jsx)(`a`,{className:`ms-2 d-inline-block align-middle stretched-link`,style:{color:`rgb(248, ${(t+2)*15}, ${(t+2)*35})`},href:((r=(i=this.props).linkOf)==null?void 0:r.call(i,e))||`#`,children:e.name})]}),(0,d.jsx)(`td`,{className:`align-middle`,children:e.score}),(0,d.jsx)(`td`,{className:`align-middle`,children:(0,d.jsx)(hn,(0,l._)({},e))})]},e.id)})}};(0,p._)(_n,`displayName`,`UserRankView`);const vn=e=>{let{className:t=``,children:n,duration:r}=e,i=(0,u._)(e,[`className`,`children`,`duration`]);return(0,d.jsx)(`div`,(0,m._)((0,l._)({className:`overflow-hidden ${t}`},i),{children:(0,d.jsx)(`div`,{className:`d-inline-block mw-100 mh-100 QBd6SG_scrollWrap`,style:{"--duration":r},children:(0,d.jsx)(`div`,{className:`d-inline-block QBd6SG_scrollItem`,children:n})})}))};vn.displayName=`VerticalMarquee`;const yn=[`🐵`,`🐔`,`🐶`,`🐷`,`🐭`,`🐮`,`🐯`,`🐰`,`🐲`,`🐍`,`🐴`,`🐐`],bn=e=>{let t=e<0?e+1:e;return yn[(t%12+12)%12]},xn=e=>{let{className:t=``,itemClassName:n=`border rounded px-4 py-3 d-flex flex-column justify-content-center align-items-center`,startYear:r,endYear:i=new Date().getFullYear(),itemOf:a}=e,o=(0,u._)(e,[`className`,`itemClassName`,`startYear`,`endYear`,`itemOf`]);return(0,d.jsx)(`ol`,(0,m._)((0,l._)({className:`list-unstyled m-0 d-flex flex-wrap justify-content-center gap-3 ${t}`},o),{children:Array.from({length:i-r+1},(e,t)=>{let r=i-t;if(r===0)return null;let o=bn(r),{link:s=`#`,title:c}=(a==null?void 0:a(r,o))||{};return(0,d.jsx)(`li`,{className:n,children:(0,d.jsxs)(`a`,{className:`d-inline-block p-3 text-decoration-none text-center`,href:s,children:[(0,d.jsx)(`div`,{className:`fs-1`,children:o}),c]})},r)})}))};xn.displayName=`ZodiacBar`,exports.Avatar=z,exports.ClickBoundary=te,exports.CodeBlock=le,Object.defineProperty(exports,"Countdown",{enumerable:!0,get:function(){return G}}),exports.Dialog=J,exports.DialogClose=ye,Object.defineProperty(exports,"Editor",{enumerable:!0,get:function(){return Oe}}),exports.EditorHTML=Ae,exports.HorizontalMarquee=X,exports.HorizontalMarqueeBox=je,exports.Icon=Z,exports.LiveTSX=Me,exports.Loading=Ne,Object.defineProperty(exports,"MonthCalendar",{enumerable:!0,get:function(){return Ue}}),exports.Nameplate=We,exports.Option=gt,exports.OverlayBox=Pe,Object.defineProperty(exports,"PageNav",{enumerable:!0,get:function(){return nt}}),Object.defineProperty(exports,"ScrollNav",{enumerable:!0,get:function(){return ht}}),exports.Select=_t,Object.defineProperty(exports,"ShareBox",{enumerable:!0,get:function(){return kt}}),exports.SpinnerButton=At,exports.TableSpinner=jt,Object.defineProperty(exports,"TextTruncate",{enumerable:!0,get:function(){return Vt}}),Object.defineProperty(exports,"Time",{enumerable:!0,get:function(){return $}}),exports.TimeDistance=Qt,exports.Timeline=$t,exports.Toast=an,Object.defineProperty(exports,"TypeEcho",{enumerable:!0,get:function(){return mn}}),exports.UserRankView=_n,exports.VariantColors=B,exports.VerticalMarquee=vn,exports.ZodiacBar=xn,exports.ZodiacSigns=yn,exports.animate=R,exports.elementToImage=Ot,exports.parser=ke,exports.text2color=ue,exports.zodiacOf=bn;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1,32 @@
|
|
|
1
|
-
import{_ as e}from"@swc/helpers/_/_object_spread";import{_ as t}from"@swc/helpers/_/_object_without_properties";import{Fragment as n,jsx as r,jsxs as i}from"react/jsx-runtime";import a from"classnames";import{_ as o}from"@swc/helpers/_/_define_property";import{_ as s}from"@swc/helpers/_/_object_spread_props";import{Component as c,PureComponent as l,createRef as u,isValidElement as d}from"react";import f from"@shikijs/langs/javascript";import ee from"@shikijs/langs/jsx";import te from"@shikijs/langs/tsx";import ne from"@shikijs/langs/typescript";import re from"@shikijs/themes/github-light";import ie from"react-element-to-jsx-string";import{createHighlighterCoreSync as ae}from"shiki/core";import{createJavaScriptRegexEngine as oe}from"shiki/engine/javascript";import{_ as p}from"@swc/helpers/_/_apply_decs_2203_r";import{_ as m}from"@swc/helpers/_/_class_private_field_get";import{_ as h}from"@swc/helpers/_/_class_private_field_init";import{_ as g}from"@swc/helpers/_/_class_private_field_set";import{_}from"@swc/helpers/_/_identity";import{computed as v,observable as y}from"mobx";import{observer as b}from"mobx-react";import{ObservedComponent as x,reaction as se}from"mobx-react-helper";import{Day as ce,Second as le,Timestamp as ue,blobOf as de,changeMonth as fe,diffTime as pe,formatDate as S,makeArray as me,scrollTo as he,sleep as ge,splitArray as _e,uniqueID as ve}from"web-utility";import{Defer as ye}from"iterable-observer";import{_ as C}from"@swc/helpers/_/_async_to_generator";import{createReactEditorJS as be}from"react-editor-js";import xe from"editorjs-html";import{LiveEditor as Se,LiveError as Ce,LivePreview as we,LiveProvider as Te}from"react-live";import{Badge as Ee,Button as De,Card as Oe,Col as ke,Dropdown as w,Image as Ae,Nav as T,OverlayTrigger as je,Popover as Me,Row as Ne,Spinner as Pe,Table as Fe,Toast as E,ToastContainer as Ie,Tooltip as Le}from"react-bootstrap";import Re from"html2canvas";function ze(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 D=n=>{let{className:i,style:o,size:s=3}=n,c=t(n,[`className`,`style`,`size`]);return r(`img`,e({className:a(`object-fit-cover rounded-circle`,i),style:e({width:`${s}rem`,height:`${s}rem`},o)},c))};D.displayName=`Avatar`;var Be=class extends l{componentDidMount(){window.addEventListener(`click`,this.switchClick,!0)}componentWillUnmount(){window.removeEventListener(`click`,this.switchClick,!0)}render(){let n=this.props,{children:i,onInnerClick:a,onOuterClick:o}=n,c=t(n,[`children`,`onInnerClick`,`onOuterClick`]);return r(`div`,s(e({ref:this.root},c),{children:i}))}constructor(...e){super(...e),o(this,`root`,u()),o(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 Ve=ae({themes:[re],langs:[f,ee,ne,te],engine:oe()}),He=i=>{let{className:a=``,language:o,children:c}=i,l=t(i,[`className`,`language`,`children`]),u=typeof c==`string`?c:ie(d(c)?c:r(n,{children:c})),f=Ve.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:f},className:`language-${o}`})}))},O=[`primary`,`secondary`,`success`,`danger`,`warning`,`info`,`dark`,`light`];function Ue(e,t=[]){let n=t[0]?O.filter(e=>!t.find(t=>t===e)):O;return n[[...e].reduce((e,t)=>e+t.charCodeAt(0),0)%n.length]}let We;var k,Ge,Ke,qe,Je,Ye=se(e=>e.observedProps.endTime),Xe,Ze;let Qe;new(We=(k=new WeakMap,Ge=class extends (Je=x){get rest(){return m(this,k)}set rest(e){g(this,k,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,le)}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),h(this,k,{writable:!0,value:(Ze(this),Xe(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:[Xe,Ze],c:[Qe,qe]}=p(Ge,[[y,1,`rest`],[v,3,`timeSections`],[Ye,2,`initTimer`]],[b],Je),Ge),Ke=class extends _{constructor(){super(Qe),o(this,`displayName`,`Countdown`),qe()}},o(Ke,We,void 0),Ke);var $e,et,tt,nt=class extends Error{constructor(e=`Dialog closed`){super(e)}},rt=new WeakMap,it=new WeakMap,at=class{get input(){return m(this,rt)}set input(e){g(this,rt,e)}get defer(){return m(this,it)}set defer(e){g(this,it,e)}open(e){return e&&(this.input=e),this.defer=new ye,this.defer.promise.finally(()=>this.defer=void 0),this.defer.promise}constructor(t){h(this,rt,{writable:!0,value:(tt(this),$e(this,{}))}),h(this,it,{writable:!0,value:et(this)}),o(this,`Component`,void 0),this.Component=b(n=>r(t,s(e({},n,this.input),{defer:this.defer}))),this.Component.displayName=`DialogComponent`}};({e:[$e,et,tt]}=p(at,[[y,1,`input`],[y,1,`defer`]],[]));let ot;var A,st,ct,lt,ut,dt,ft;const pt=be();let mt;new(ot=(A=new WeakMap,st=class extends (ut=c){get innerValue(){return m(this,A)}set innerValue(e){g(this,A,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(pt,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),h(this,A,{writable:!0,value:(ft(this),dt(this,this.props.defaultValue))}),o(this,`save`,()=>C(function*(){return t.core&&(t.innerValue=yield t.core.save())})())}},{e:[dt,ft],c:[mt,lt]}=p(st,[[y,1,`innerValue`]],[b],ut),st),ct=class extends _{constructor(){super(mt),o(this,`displayName`,`Editor`),lt()}},o(ct,ot,void 0),ct);const ht=xe({link:({data:{link:e}})=>`<a href="${e}">${e}</a>`}),gt=n=>{let{data:i}=n,a=t(n,[`data`]);return r(`article`,s(e({},a),{dangerouslySetInnerHTML:{__html:ht.parse(i)}}))};gt.displayName=`EditorHTML`;const j=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})})}))},_t=({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(j,{duration:n,children:e})]})}):r(j,{maxWidth:t,duration:n,height:a,children:e});j.displayName=`HorizontalMarquee`;const M=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))};M.displayName=`Icon`;const vt=({scope:e,children:t})=>{let a=typeof t==`string`?t:ie(d(t)?t:r(n,{children:t}));return i(Te,{code:a,scope:e,language:`tsx`,children:[r(we,{className:`mb-3`}),r(Se,{}),r(Ce,{className:`text-danger small p-2`})]})},N=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(Pe,{animation:`border`,variant:`success`}),r(`span`,{className:`ml-3 text-white`,children:o})]}))};N.displayName=`Loading`;const P=n=>{let{title:a,detail:o,children:c}=n,l=t(n,[`title`,`detail`,`children`]);return r(je,s(e({},l),{overlay:o?i(Me,{children:[r(Me.Header,{children:a}),r(Me.Body,{children:o})]}):r(Le,{children:a}),children:c}))};P.displayName=`OverlayBox`;let yt;var F,I,L,bt,xt,St,Ct;let R;new(yt=(F=new WeakMap,I=class extends (xt=x){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 m(this,F)}set currentDate(e){g(this,F,e)}get dateGrid(){let e=new Date(this.currentDate);e.setDate(1),e=new Date(+e-e.getDay()*ce);let t=Array.from(Array(42),(t,n)=>new Date(+e+n*ce));return _e(t,7)}changeMonth(e){var t,n;this.currentDate=fe(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,ee=t(c,[`style`,`variant`,`onChange`,`onSelect`]);return i(Fe,s(e({},ee),{style:e({tableLayout:`fixed`},l),children:[r(`caption`,{children:i(`div`,{className:`d-flex justify-content-between align-items-center`,children:[r(De,{variant:u,onClick:()=>this.changeMonth(-1),children:`<`}),S(a,`YYYY-MM`),r(De,{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),h(this,F,{writable:!0,value:(Ct(this),St(this,new Date))}),o(this,`renderDate`,e=>{let{variant:t=`primary`,value:n,onSelect:o}=this.observedProps,s=S(e,`YYYY-MM-DD`),c=n==null?void 0:n.filter(({date:e})=>S(e,`YYYY-MM-DD`)===s);return i(`td`,{className:a({"opacity-50":e.getMonth()!==this.currentDate.getMonth(),"fw-bold":s===S(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(P,{title:e.content,children:r(Ee,{as:`a`,className:`d-inline-block text-decoration-none w-100 text-truncate`,bg:Ue(e.content+``,[`light`]),href:e.link,onClick:()=>o==null?void 0:o(e),children:e.content})},e.date+``))]},e+``)})}},{e:[St,Ct],c:[R,bt]}=p(I,[[v,3,`weekFormatter`],[y,1,`currentDate`],[v,3,`dateGrid`]],[b],xt),I),L=class extends _{constructor(){super(R),o(this,`displayName`,`MonthCalendar`),bt()}},o(L,yt,void 0),L);const z=({avatar:e,name:t})=>i(n,{children:[r(D,{size:2,style:{marginRight:`0.5rem`},src:e}),r(`span`,{className:`align-middle`,children:t})]});z.displayName=`Nameplate`;let wt;var B,V,Tt,Et,Dt,Ot,kt,At,jt;const Mt=Array.from([,,,,,,],(e,t)=>`h${++t}`)+``;let Nt;new(wt=(B=new WeakMap,V=new WeakMap,Tt=class extends (Ot=c){get list(){return m(this,B)}set list(e){g(this,B,e)}get scrollY(){return m(this,V)}set scrollY(e){g(this,V,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(Mt),e=>{var t;(t=e).id||(t.id=ve());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(T,s(e({},c),{variant:o,style:e({flexDirection:`column`},a),children:n.map(this.renderLink)}))}constructor(...e){super(...e),h(this,B,{writable:!0,value:(jt(this),kt(this,[]))}),h(this,V,{writable:!0,value:At(this,0)}),o(this,`updateScrollY`,()=>this.scrollY=window.scrollY),o(this,`scrollTo`,e=>()=>{var t,n;setTimeout(()=>he(`[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(T.Item,{style:{textIndent:`${t-1}rem`},children:r(T.Link,{href:`#${e}`,active:a===e,onClick:this.scrollTo({id:e,level:t,text:n,top:i}),children:n})},e)})}},{e:[kt,At,jt],c:[Nt,Dt]}=p(Tt,[[y,1,`list`],[y,1,`scrollY`],[v,3,`currentActiveId`]],[b],Ot),Tt),Et=class extends _{constructor(){super(Nt),o(this,`displayName`,`PageNav`),Dt()}},o(Et,wt,void 0),Et);let Pt;var H,U,W,Ft,It,Lt,Rt,zt,Bt,Vt,Ht;let G;new(Pt=(H=new WeakMap,U=new WeakMap,W=new WeakMap,Ft=class extends (Rt=c){get scrollLeft(){return m(this,H)}set scrollLeft(e){g(this,H,e)}get scrollWidth(){return m(this,U)}set scrollWidth(e){g(this,U,e)}get clientWidth(){return m(this,W)}set clientWidth(e){g(this,W,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(M,{name:`caret-left-fill`})}),r(`div`,{ref:this.scrollerRef,className:`overflow-x-auto aEvBXq_scrollerInner`,children:r(T,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(M,{name:`caret-right-fill`})})]})}constructor(...e){super(...e),o(this,`scrollerRef`,(Ht(this),u())),h(this,H,{writable:!0,value:zt(this,0)}),h(this,U,{writable:!0,value:Bt(this,0)}),h(this,W,{writable:!0,value:Vt(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:[zt,Bt,Vt,Ht],c:[G,Lt]}=p(Ft,[[y,1,`scrollLeft`],[y,1,`scrollWidth`],[y,1,`clientWidth`],[v,3,`canScrollLeft`],[v,3,`canScrollRight`]],[b],Rt),Ft),It=class extends _{constructor(){super(G),o(this,`displayName`,`ScrollNav`),Lt()}},o(It,Pt,void 0),It);const Ut=n=>{let{value:i,children:a}=n,o=t(n,[`value`,`children`]);return r(w.Item,s(e({},o),{"data-value":i,children:a}))};Ut.displayName=`Option`;const Wt=({className:e,style:t,variant:n,menuVariant:o,children:s,value:c,onChange:l,valueRender:u})=>{let f=me(s).flat(1/0).find(e=>d(e)&&e.type===Ut&&e.props.value===c);return i(w,{onClick:({target:e})=>{let t=e.closest(`.dropdown-item`);if(!t)return;let{value:n}=t.dataset;l==null||l(n)},children:[r(w.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:f==null?void 0:f.props.className,children:f==null?void 0:f.props.children})}),r(w.Menu,{variant:o,children:s})]})};Wt.displayName=`Select`;let Gt;var K,q,Kt,qt,Jt,Yt,Xt,Zt,Qt;function $t(e,t,n){return C(function*(){let r=yield Re(e,{useCORS:!0});return new Promise((e,i)=>r.toBlob(t=>t?e(URL.createObjectURL(t)):i(),t,n))})()}let en;new(Gt=(K=new WeakMap,q=new WeakMap,Kt=class extends (Yt=c){get loading(){return m(this,K)}set loading(e){g(this,K,e)}get imageURI(){return m(this,q)}set imageURI(e){g(this,q,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(N,{}),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(Ae,{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`,(Qt(this),u())),h(this,K,{writable:!0,value:Xt(this,!1)}),h(this,q,{writable:!0,value:Zt(this,``)}),o(this,`generateImage`,()=>C(function*(){n.imageURI&&(URL.revokeObjectURL(n.imageURI),n.imageURI=``),n.loading=!0,n.imageURI=yield $t(n.root.current),n.loading=!1})()),o(this,`share`,t=>C(function*(){var r,i;t.stopPropagation();let a=yield de(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:[Xt,Zt,Qt],c:[en,Jt]}=p(Kt,[[y,1,`loading`],[y,1,`imageURI`]],[b],Yt),Kt),qt=class extends _{constructor(){super(en),o(this,`displayName`,`ShareBox`),Jt()}},o(qt,Gt,void 0),qt);const tn=a=>{let{animation:o,loading:c,disabled:l,children:u}=a,d=t(a,[`animation`,`loading`,`disabled`,`children`]);return i(De,s(e({},d),{disabled:c||l,children:[c&&i(n,{children:[r(Pe,{as:`span`,className:u?`me-2`:``,size:`sm`,animation:o,role:`status`,"aria-hidden":`true`}),!u&&r(`span`,{className:`visually-hidden`,children:`Loading...`})]}),u]}))};tn.displayName=`SpinnerButton`;const nn=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(Pe,{animation:i,variant:a,size:o})})}))};nn.displayName=`TableSpinner`;let rn;var J,Y,an,on,sn,cn,ln,un,dn;let fn;new(rn=(J=new WeakMap,Y=new WeakMap,an=class extends (cn=c){get expanded(){return m(this,J)}set expanded(e){g(this,J,e)}get overflowed(){return m(this,Y)}set overflowed(e){g(this,Y,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,ee={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:ee,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),h(this,J,{writable:!0,value:(dn(this),ln(this,!1))}),h(this,Y,{writable:!0,value:un(this,!1)}),o(this,`contentRef`,u()),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:[ln,un,dn],c:[fn,sn]}=p(an,[[y,1,`expanded`],[y,1,`overflowed`]],[b],cn),an),on=class extends _{constructor(){super(fn),o(this,`displayName`,`TextTruncate`),sn()}},o(on,rn,void 0),on);let pn;var X,mn,hn,gn,_n,vn=se(({observedProps:{dateTime:e,format:t}})=>e+t),yn,bn;let Z;new(pn=(X=new WeakMap,mn=class extends (_n=x){updateText(){let{dateTime:e,format:t}=this.props;return S(e,t)}get timeText(){return m(this,X)}set timeText(e){g(this,X,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),h(this,X,{writable:!0,value:(bn(this),yn(this,this.updateText()))})}},{e:[yn,bn],c:[Z,gn]}=p(mn,[[vn,2,`updateText`],[y,1,`timeText`]],[b],_n),mn),hn=class extends _{constructor(){super(Z),o(this,`displayName`,`Time`),gn()}},o(hn,pn,void 0),hn);const xn={ms:`millisecond(s)`,s:`second(s)`,m:`minute(s)`,H:`hour(s)`,D:`day(s)`,W:`week(s)`,M:`month(s)`,Y:`year(s)`},Sn=n=>{let{date:r,unitWords:a=xn,beforeWord:o=` before`,afterWord:c=` after`}=n,l=t(n,[`date`,`unitWords`,`beforeWord`,`afterWord`]);r=new Date(r);let{distance:u,unit:d}=pe(r);return i(`time`,s(e({},l),{dateTime:r.toJSON(),title:r.toLocaleString(),children:[Math.abs(u),` `,a[d],u<0?o:c]}))};Sn.displayName=`TimeDistance`;const Cn=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(Oe,{children:i(Oe.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(Z,{dateTime:a[0],format:c}),a[1]&&`~`,a[1]&&r(Z,{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(z,e({},t))},t.name))}),r(`p`,{className:`m-0`,children:n})]})})},t))}))};Cn.displayName=`Timeline`;var wn,Tn;const En=new Set([`warning`,`info`,`light`]);var Q=new WeakMap,Dn=class{get messages(){return m(this,Q)}set messages(e){g(this,Q,e)}open(t){let n=ve(),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=ue){o(this,`TimeScalar`,void 0),h(this,Q,{writable:!0,value:void 0}),o(this,`Component`,void 0),o(this,`renderMessage`,void 0),this.TimeScalar=e,g(this,Q,(Tn(this),wn(this,[]))),this.Component=b(({position:e=`top-end`})=>r(Ie,{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&&!En.has(o)?`text-white`:void 0,l=!!n||s===0,u=this.TimeScalar.distanceOf(Date.now(),t).toShortString();return i(E,{bg:o,delay:s,autohide:s!==0,onClose:()=>this.close(e),children:[l&&i(E.Header,{children:[r(`strong`,{className:`me-auto`,children:n}),r(`small`,{children:u})]}),r(E.Body,{className:c,children:a})]},e)},this.Component.displayName=`ToastComponent`}};({e:[wn,Tn]}=p(Dn,[[y,1,`messages`]],[]));let On;var $,kn,An,jn,Mn,Nn,Pn;let Fn;new(On=($=new WeakMap,kn=class extends (Mn=c){get echoed(){return m(this,$)}set echoed(e){g(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,h(this,$,{writable:!0,value:(Pn(this),Nn(this,``))}),o(this,`init`,e=>e&&new IntersectionObserver(([{isIntersecting:e}],n)=>C(function*(){if(!e)return;n.disconnect();let{text:r,intervals:i=150}=t.props;for(let e of r)yield ge(i/1e3),t.echoed+=e})()).observe(e))}},{e:[Nn,Pn],c:[Fn,jn]}=p(kn,[[y,1,`echoed`]],[b],Mn),kn),An=class extends _{constructor(){super(Fn),o(this,`displayName`,`TypeEcho`),jn()}},o(An,On,void 0),An);const In=({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(M,{name:`envelope`})}),t&&r(`a`,{rel:`noreferrer`,target:`_blank`,href:t,children:r(M,{name:`globe2`})})]}),Ln=`X5DLia_image`;var Rn=class extends l{render(){let n=this.props,{className:a=``,title:o,rank:c=[],linkOf:l}=n,u=t(n,[`className`,`title`,`rank`,`linkOf`]);return i(Ne,s(e({className:`X5DLia_rankBox ${a}`},u),{children:[i(ke,{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(Ne,{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(ke,{xs:12,sm:12,lg:5,children:r(Fe,{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(ke,{as:`li`,children:[r(`div`,{className:`shadow-lg overflow-hidden rounded-circle m-auto ${Ln}`,children:r(Ae,{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(In,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(Ee,{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 ${Ln}`,children:r(Ae,{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(In,e({},t))})]},t.id)})}};o(Rn,`displayName`,`UserRankView`);const zn=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})})}))};zn.displayName=`VerticalMarquee`;const Bn=[`🐵`,`🐔`,`🐶`,`🐷`,`🐭`,`🐮`,`🐯`,`🐰`,`🐲`,`🐍`,`🐴`,`🐐`],Vn=e=>{let t=e<0?e+1:e;return Bn[(t%12+12)%12]},Hn=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=Vn(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)})}))};Hn.displayName=`ZodiacBar`;export{D as Avatar,Be as ClickBoundary,He as CodeBlock,Qe as Countdown,at as Dialog,nt as DialogClose,mt as Editor,gt as EditorHTML,j as HorizontalMarquee,_t as HorizontalMarqueeBox,M as Icon,vt as LiveTSX,N as Loading,R as MonthCalendar,z as Nameplate,Ut as Option,P as OverlayBox,Nt as PageNav,G as ScrollNav,Wt as Select,en as ShareBox,tn as SpinnerButton,nn as TableSpinner,fn as TextTruncate,Z as Time,Sn as TimeDistance,Cn as Timeline,Dn as Toast,Fn as TypeEcho,Rn as UserRankView,O as VariantColors,zn as VerticalMarquee,Hn as ZodiacBar,Bn as ZodiacSigns,ze as animate,$t as elementToImage,ht as parser,Ue as text2color,Vn as zodiacOf};
|
|
1
|
+
import{_ as e}from"@swc/helpers/_/_object_spread";import{_ as t}from"@swc/helpers/_/_object_without_properties";import{Fragment as n,jsx as r,jsxs as i}from"react/jsx-runtime";import a from"classnames";import{_ as o}from"@swc/helpers/_/_define_property";import{_ as s}from"@swc/helpers/_/_object_spread_props";import{Component as c,PureComponent as l,createRef as u,isValidElement as d}from"react";import f from"@shikijs/langs/javascript";import p from"@shikijs/langs/jsx";import m from"@shikijs/langs/tsx";import h from"@shikijs/langs/typescript";import g from"@shikijs/themes/github-light";import{createHighlighterCoreSync as _}from"shiki/core";import{createJavaScriptRegexEngine as v}from"shiki/engine/javascript";import{_ as y}from"@swc/helpers/_/_apply_decs_2203_r";import{_ as b}from"@swc/helpers/_/_class_private_field_get";import{_ as x}from"@swc/helpers/_/_class_private_field_init";import{_ as S}from"@swc/helpers/_/_class_private_field_set";import{_ as C}from"@swc/helpers/_/_identity";import{computed as w,observable as T}from"mobx";import{observer as E}from"mobx-react";import{ObservedComponent as ee,reaction as te}from"mobx-react-helper";import{Day as ne,Second as D,Timestamp as re,blobOf as ie,changeMonth as ae,diffTime as oe,formatDate as O,makeArray as se,scrollTo as ce,sleep as le,splitArray as ue,uniqueID as k}from"web-utility";import{Defer as de}from"iterable-observer";import{_ as A}from"@swc/helpers/_/_async_to_generator";import{createReactEditorJS as fe}from"react-editor-js";import pe from"editorjs-html";import{LiveEditor as me,LiveError as he,LivePreview as ge,LiveProvider as _e}from"react-live";import{Badge as ve,Button as j,Card as ye,Col as M,Dropdown as N,Image as P,Nav as F,OverlayTrigger as be,Popover as I,Row as xe,Spinner as Se,Table as Ce,Toast as L,ToastContainer as we,Tooltip as Te}from"react-bootstrap";import Ee from"html2canvas";var R=Object.create,De=Object.defineProperty,Oe=Object.getOwnPropertyDescriptor,ke=Object.getOwnPropertyNames,Ae=Object.getPrototypeOf,je=Object.prototype.hasOwnProperty,z=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),Me=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=ke(t),a=0,o=i.length,s;a<o;a++)s=i[a],!je.call(e,s)&&s!==n&&De(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Oe(t,s))||r.enumerable});return e},Ne=(e,t,n)=>(n=e==null?{}:R(Ae(e)),Me(t||!e||!e.__esModule||!je.call(e,`default`)?De(n,`default`,{value:e,enumerable:!0}):n,e)),Pe=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});function Fe(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 Ie=n=>{let{className:i,style:o,size:s=3}=n,c=t(n,[`className`,`style`,`size`]);return r(`img`,e({className:a(`object-fit-cover rounded-circle`,i),style:e({width:`${s}rem`,height:`${s}rem`},o)},c))};Ie.displayName=`Avatar`;var Le=class extends l{componentDidMount(){window.addEventListener(`click`,this.switchClick,!0)}componentWillUnmount(){window.removeEventListener(`click`,this.switchClick,!0)}render(){let n=this.props,{children:i,onInnerClick:a,onOuterClick:o}=n,c=t(n,[`children`,`onInnerClick`,`onOuterClick`]);return r(`div`,s(e({ref:this.root},c),{children:i}))}constructor(...e){super(...e),o(this,`root`,u()),o(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)})}},Re=z((e=>{Object.defineProperty(e,"__esModule",{value:!0});
|
|
2
|
+
/*!
|
|
3
|
+
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
6
|
+
* Released under the MIT License.
|
|
7
|
+
*/
|
|
8
|
+
function t(e){return Object.prototype.toString.call(e)===`[object Object]`}function n(e){var n,r;return t(e)!==!1&&(n=e.constructor,n===void 0||(r=n.prototype,t(r)!==!1&&r.hasOwnProperty(`isPrototypeOf`)!==!1))}e.isPlainObject=n})),ze=z((e=>{var t=e&&e.__assign||function(){return t=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},t.apply(this,arguments)},n=e&&e.__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 r=[];function i(e){var t=typeof e;return e!==null&&(t===`object`||t===`function`)}function a(e){return Object.prototype.toString.call(e)===`[object RegExp]`}function o(e){return Object.getOwnPropertySymbols(e).filter(function(t){return Object.prototype.propertyIsEnumerable.call(e,t)})}function s(e,c,l){l===void 0&&(l=``);var u=t(t({},{indent:` `,singleQuotes:!0}),c),d=u.inlineCharacterLimit===void 0?{newLine:`
|
|
9
|
+
`,newLineOrSpace:`
|
|
10
|
+
`,pad:l,indent:l+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`),l).replace(new RegExp(d.indent,`g`),l+u.indent)};if(r.indexOf(e)!==-1)return`"[Circular]"`;if(e==null||typeof e==`number`||typeof e==`boolean`||typeof e==`function`||typeof e==`symbol`||a(e))return String(e);if(e instanceof Date)return`new Date('${e.toISOString()}')`;if(Array.isArray(e)){if(e.length===0)return`[]`;r.push(e);var p=`[`+d.newLine+e.map(function(t,n){var r=e.length-1===n?d.newLine:`,`+d.newLineOrSpace,i=s(t,u,l+u.indent);return u.transform&&(i=u.transform(e,n,i)),d.indent+i+r}).join(``)+d.pad+`]`;return r.pop(),f(p)}if(i(e)){var m=n(n([],Object.keys(e),!0),o(e),!0);if(u.filter&&(m=m.filter(function(t){return u.filter&&u.filter(e,t)})),m.length===0)return`{}`;r.push(e);var p=`{`+d.newLine+m.map(function(t,n){var r=m.length-1===n?d.newLine:`,`+d.newLineOrSpace,i=typeof t==`symbol`,a=!i&&/^[a-z$_][a-z$_0-9]*$/i.test(t.toString()),o=i||a?t:s(t,u),c=s(e[t],u,l+u.indent);return u.transform&&(c=u.transform(e,t,c)),d.indent+String(o)+`: `+c+r}).join(``)+d.pad+`}`;return r.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=s})),Be=z((e=>{
|
|
13
|
+
/** @license React v16.13.1
|
|
14
|
+
* react-is.production.min.js
|
|
15
|
+
*
|
|
16
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
17
|
+
*
|
|
18
|
+
* This source code is licensed under the MIT license found in the
|
|
19
|
+
* LICENSE file in the root directory of this source tree.
|
|
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.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(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 h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),Ve=z(((e,t)=>{t.exports=Be()})),He=Ne(z((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Re(),n=Pe(`react`),r=ze(),i=Ve();function a(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}function o(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if(n!=="default"){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var s=o(n),c=a(n),l=(function(e,t){return e===0?``:Array(e*t).fill(` `).join(``)});function u(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 d(e){if(Array.isArray(e))return u(e)}function f(e,t,n){return(t=y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function m(){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 h(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 g(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?h(Object(n),!0).forEach(function(t){f(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _(e){return d(e)||p(e)||x(e)||m()}function v(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 y(e){var t=v(e,`string`);return typeof t==`symbol`?t:t+``}function b(e){"@babel/helpers - typeof";return b=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},b(e)}function x(e,t){if(e){if(typeof e==`string`)return u(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)?u(e,t):void 0}}function S(e,t){if(e===null||b(e)!==`object`||e instanceof Date||e instanceof RegExp)return e;if(s.isValidElement(e)){var n=g({},e);return delete n._owner,n}return t.add(e),Array.isArray(e)?e.map(function(e){return S(e,t)}):Object.keys(e).sort().reduce(function(n,r){return n[r]=r===`current`||t.has(e[r])?`[Circular]`:S(e[r],t),n},{})}function C(e){return S(e,new WeakSet)}var w=function(e){return{type:`string`,value:e}},T=function(e){return{type:`number`,value:e}},E=function(e,t,n,r){return{type:`ReactElement`,displayName:e,props:t,defaultProps:n,childrens:r}},ee=function(e,t){return{type:`ReactFragment`,key:e,childrens:t}},te=!!n.Fragment,ne=function(e){return!e.name||e.name===`_default`?`No Display Name`:e.name},D=function(e){switch(!0){case!!e.displayName:return e.displayName;case e.$$typeof===i.Memo:return D(e.type);case e.$$typeof===i.ForwardRef:return D(e.render);default:return ne(e)}},re=function(e){switch(!0){case typeof e.type==`string`:return e.type;case typeof e.type==`function`:return e.type.displayName?e.type.displayName:ne(e.type);case i.isForwardRef(e):case i.isMemo(e):return D(e.type);case i.isContextConsumer(e):return`${e.type._context.displayName||`Context`}.Consumer`;case i.isContextProvider(e):return`${e.type.displayName||`Context`}.Provider`;case i.isLazy(e):return`Lazy`;case i.isProfiler(e):return`Profiler`;case i.isStrictMode(e):return`StrictMode`;case i.isSuspense(e):return`Suspense`;default:return`UnknownElementType`}},ie=function(e,t){return t!==`children`},ae=function(e){return e!==!0&&e!==!1&&e!==null&&e!==``},oe=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},O=function(e,t){var r=t.displayName,i=r===void 0?re:r;if(typeof e==`string`)return w(e);if(typeof e==`number`)return T(e);if(!c.default.isValidElement(e))throw Error(`react-element-to-jsx-string: Expected a React.Element, got \`${b(e)}\``);var a=i(e),o=oe(e.props,ie),s=e.key;typeof s==`string`&&s.search(/^\./)&&(o.key=s);var l=oe(e.type.defaultProps||{},ie),u=c.default.Children.toArray(e.props.children).filter(ae).map(function(e){return O(e,t)});return te&&e.type===n.Fragment?ee(s,u):E(a,o,l,u)};function se(){}var ce=function(e){return e.toString().split(`
|
|
23
|
+
`).map(function(e){return e.trim()}).join(``)},le=function(e){return e.toString()},ue=ce,k=(function(e,t){var n=t.functionValue,r=n===void 0?ue:n;return!t.showFunctions&&r===ue?r(se):r(e)}),de=(function(e,t,i,a){var o=C(e),s=r.prettyPrint(o,{transform:function(e,t,r){var o=e[t];return o&&n.isValidElement(o)?R(O(o,a),!0,i,a):typeof o==`function`?k(o,a):r}});return t?s.replace(/\s+/g,` `).replace(/{ /g,`{`).replace(/ }/g,`}`).replace(/\[ /g,`[`).replace(/ ]/g,`]`):s.replace(/\t/g,l(1,a.tabStop)).replace(/\n([^$])/g,`
|
|
24
|
+
${l(i+1,a.tabStop)}\$1`)}),A=function(e){return e.replace(/"/g,`"`)},fe=function(e,r,i,a){if(typeof e==`number`)return`{${String(e)}}`;if(typeof e==`string`)return`"${A(e)}"`;if(b(e)===`symbol`){var o=e.valueOf().toString().replace(/Symbol\((.*)\)/,`$1`);return o?`{Symbol('${o}')}`:`{Symbol()}`}return typeof e==`function`?`{${k(e,a)}}`:n.isValidElement(e)?`{${R(O(e,a),!0,i,a)}}`:e instanceof Date?isNaN(e.valueOf())?`{new Date(NaN)}`:`{new Date("${e.toISOString()}")}`:t.isPlainObject(e)||Array.isArray(e)?`{${de(e,r,i,a)}}`:`{${String(e)}}`},pe=(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,u=s.useBooleanShorthandSyntax,d=s.tabStop,f=fe(c,a,o,s),p=` `,m=`
|
|
25
|
+
${l(o+1,d)}`,h=f.includes(`
|
|
26
|
+
`);return u&&f===`{false}`&&!r?(p=``,m=``):u&&f===`{true}`?(p+=`${e}`,m+=`${e}`):(p+=`${e}=${f}`,m+=`${e}=${f}`),{attributeFormattedInline:p,attributeFormattedMultiline:m,isMultilineAttribute:h}}),me=(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(w(String(r.value)+String(t.value))):(r&&n.push(r),n.push(t)),n}),he=function(e){return[`key`,`ref`].includes(e)},ge=(function(e){return function(t){var n=t.includes(`key`),r=t.includes(`ref`),i=t.filter(function(e){return!he(e)}),a=_(e?i.sort():i);return r&&a.unshift(`ref`),n&&a.unshift(`key`),a}});function _e(e,t){return Array.isArray(t)?function(e){return t.indexOf(e)===-1}:function(n){return t(e[n],n)}}var ve=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:`${l(r,a)}${e}`}).join(`
|
|
28
|
+
`):t},j=function(e,t,n){return function(r){return ve(r,R(r,e,t,n),e,t,n)}},ye=function(e,t){return function(n){var r=Object.keys(e).includes(n);return!r||r&&e[n]!==t[n]}},M=function(e,t,n,r,i){return i?l(n,r).length+t.length>i:e.length>1},N=function(e,t,n,r,i,a,o){return(M(e,t,i,a,o)||n)&&!r},P=(function(e,t,n,r){var i=e.type,a=e.displayName,o=a===void 0?``:a,s=e.childrens,c=e.props,u=c===void 0?{}:c,d=e.defaultProps,f=d===void 0?{}:d;if(i!==`ReactElement`)throw Error(`The "formatReactElementNode" function could only format node of type "ReactElement". Given: ${i}`);var p=r.filterProps,m=r.maxInlineAttributesLineLength,h=r.showDefaultProps,g=r.sortProps,_=r.tabStop,v=`<${o}`,y=v,b=v,x=!1,S=[],C=_e(u,p);Object.keys(u).filter(C).filter(ye(f,u)).forEach(function(e){return S.push(e)}),Object.keys(f).filter(C).filter(function(){return h}).filter(function(e){return!S.includes(e)}).forEach(function(e){return S.push(e)});var w=ge(g)(S);if(w.forEach(function(e){var i=pe(e,Object.keys(u).includes(e),u[e],Object.keys(f).includes(e),f[e],t,n,r),a=i.attributeFormattedInline,o=i.attributeFormattedMultiline;i.isMultilineAttribute&&(x=!0),y+=a,b+=o}),b+=`
|
|
29
|
+
${l(n,_)}`,v=N(w,y,x,t,n,_,m)?b:y,s&&s.length>0){var T=n+1;v+=`>`,t||(v+=`
|
|
30
|
+
`,v+=l(T,_)),v+=s.reduce(me,[]).map(j(t,T,r)).join(t?``:`
|
|
31
|
+
${l(T,_)}`),t||(v+=`
|
|
32
|
+
`,v+=l(T-1,_)),v+=`</${o}>`}else M(w,y,n,_,m)||(v+=` `),v+=`/>`;return v}),F=``,be=`React.Fragment`,I=function(e,t,n){var r={};return t&&(r={key:t}),{type:`ReactElement`,displayName:e,props:r,defaultProps:{},childrens:n}},xe=function(e){return!!e.key},Se=function(e){return e.childrens.length===0},Ce=(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 P(I(r.useFragmentShortSyntax?Se(e)||xe(e)?be:F:be,a,o),t,n,r)}),L=[`<`,`>`,`{`,`}`],we=function(e){return L.some(function(t){return e.includes(t)})},Te=function(e){return we(e)?`{\`${e}\`}`:e},Ee=function(e){var t=e;return t.endsWith(` `)&&(t=t.replace(/^(.*?)(\s+)$/,`$1{'$2'}`)),t.startsWith(` `)&&(t=t.replace(/^(\s+)(.*)$/,`{'$1'}$2`)),t},R=(function(e,t,n,r){if(e.type===`number`)return String(e.value);if(e.type===`string`)return e.value?`${Ee(Te(String(e.value)))}`:``;if(e.type===`ReactElement`)return P(e,t,n,r);if(e.type===`ReactFragment`)return Ce(e,t,n,r);throw TypeError(`Unknow format type "${e.type}"`)}),De=(function(e,t){return R(e,!1,0,t)});e.default=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 De(O(e,y),y)},e.inlineFunction=ce,e.preserveFunctionLineBreak=le}))());const Ue=_({themes:[g],langs:[f,p,h,m],engine:v()}),We=i=>{let{className:a=``,language:o,children:c}=i,l=t(i,[`className`,`language`,`children`]),u=typeof c==`string`?c:(0,He.default)(d(c)?c:r(n,{children:c})),f=Ue.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:f},className:`language-${o}`})}))},Ge=[`primary`,`secondary`,`success`,`danger`,`warning`,`info`,`dark`,`light`];function Ke(e,t=[]){let n=t[0]?Ge.filter(e=>!t.find(t=>t===e)):Ge;return n[[...e].reduce((e,t)=>e+t.charCodeAt(0),0)%n.length]}let qe;var B,Je,Ye,Xe,Ze,Qe=te(e=>e.observedProps.endTime),$e,et;let tt;new(qe=(B=new WeakMap,Je=class extends (Ze=ee){get rest(){return b(this,B)}set rest(e){S(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,D)}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),x(this,B,{writable:!0,value:(et(this),$e(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:[$e,et],c:[tt,Xe]}=y(Je,[[T,1,`rest`],[w,3,`timeSections`],[Qe,2,`initTimer`]],[E],Ze),Je),Ye=class extends C{constructor(){super(tt),o(this,`displayName`,`Countdown`),Xe()}},o(Ye,qe,void 0),Ye);var nt,rt,it,at=class extends Error{constructor(e=`Dialog closed`){super(e)}},ot=new WeakMap,st=new WeakMap,ct=class{get input(){return b(this,ot)}set input(e){S(this,ot,e)}get defer(){return b(this,st)}set defer(e){S(this,st,e)}open(e){return e&&(this.input=e),this.defer=new de,this.defer.promise.finally(()=>this.defer=void 0),this.defer.promise}constructor(t){x(this,ot,{writable:!0,value:(it(this),nt(this,{}))}),x(this,st,{writable:!0,value:rt(this)}),o(this,`Component`,void 0),this.Component=E(n=>r(t,s(e({},n,this.input),{defer:this.defer}))),this.Component.displayName=`DialogComponent`}};({e:[nt,rt,it]}=y(ct,[[T,1,`input`],[T,1,`defer`]],[]));let lt;var V,ut,dt,ft,pt,mt,ht;const gt=fe();let _t;new(lt=(V=new WeakMap,ut=class extends (pt=c){get innerValue(){return b(this,V)}set innerValue(e){S(this,V,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(gt,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),x(this,V,{writable:!0,value:(ht(this),mt(this,this.props.defaultValue))}),o(this,`save`,()=>A(function*(){return t.core&&(t.innerValue=yield t.core.save())})())}},{e:[mt,ht],c:[_t,ft]}=y(ut,[[T,1,`innerValue`]],[E],pt),ut),dt=class extends C{constructor(){super(_t),o(this,`displayName`,`Editor`),ft()}},o(dt,lt,void 0),dt);const vt=pe({link:({data:{link:e}})=>`<a href="${e}">${e}</a>`}),yt=n=>{let{data:i}=n,a=t(n,[`data`]);return r(`article`,s(e({},a),{dangerouslySetInnerHTML:{__html:vt.parse(i)}}))};yt.displayName=`EditorHTML`;const H=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})})}))},bt=({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(H,{duration:n,children:e})]})}):r(H,{maxWidth:t,duration:n,height:a,children:e});H.displayName=`HorizontalMarquee`;const U=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))};U.displayName=`Icon`;const xt=({scope:e,children:t})=>{let a=typeof t==`string`?t:(0,He.default)(d(t)?t:r(n,{children:t}));return i(_e,{code:a,scope:e,language:`tsx`,children:[r(ge,{className:`mb-3`}),r(me,{}),r(he,{className:`text-danger small p-2`})]})},St=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(Se,{animation:`border`,variant:`success`}),r(`span`,{className:`ml-3 text-white`,children:o})]}))};St.displayName=`Loading`;const Ct=n=>{let{title:a,detail:o,children:c}=n,l=t(n,[`title`,`detail`,`children`]);return r(be,s(e({},l),{overlay:o?i(I,{children:[r(I.Header,{children:a}),r(I.Body,{children:o})]}):r(Te,{children:a}),children:c}))};Ct.displayName=`OverlayBox`;let wt;var W,Tt,Et,Dt,Ot,kt,At;let jt;new(wt=(W=new WeakMap,Tt=class extends (Ot=ee){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 b(this,W)}set currentDate(e){S(this,W,e)}get dateGrid(){let e=new Date(this.currentDate);e.setDate(1),e=new Date(+e-e.getDay()*ne);let t=Array.from(Array(42),(t,n)=>new Date(+e+n*ne));return ue(t,7)}changeMonth(e){var t,n;this.currentDate=ae(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(Ce,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(j,{variant:u,onClick:()=>this.changeMonth(-1),children:`<`}),O(a,`YYYY-MM`),r(j,{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),x(this,W,{writable:!0,value:(At(this),kt(this,new Date))}),o(this,`renderDate`,e=>{let{variant:t=`primary`,value:n,onSelect:o}=this.observedProps,s=O(e,`YYYY-MM-DD`),c=n==null?void 0:n.filter(({date:e})=>O(e,`YYYY-MM-DD`)===s);return i(`td`,{className:a({"opacity-50":e.getMonth()!==this.currentDate.getMonth(),"fw-bold":s===O(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(Ct,{title:e.content,children:r(ve,{as:`a`,className:`d-inline-block text-decoration-none w-100 text-truncate`,bg:Ke(e.content+``,[`light`]),href:e.link,onClick:()=>o==null?void 0:o(e),children:e.content})},e.date+``))]},e+``)})}},{e:[kt,At],c:[jt,Dt]}=y(Tt,[[w,3,`weekFormatter`],[T,1,`currentDate`],[w,3,`dateGrid`]],[E],Ot),Tt),Et=class extends C{constructor(){super(jt),o(this,`displayName`,`MonthCalendar`),Dt()}},o(Et,wt,void 0),Et);const Mt=({avatar:e,name:t})=>i(n,{children:[r(Ie,{size:2,style:{marginRight:`0.5rem`},src:e}),r(`span`,{className:`align-middle`,children:t})]});Mt.displayName=`Nameplate`;let Nt;var G,K,Pt,Ft,It,Lt,Rt,zt,Bt;const Vt=Array.from([,,,,,,],(e,t)=>`h${++t}`)+``;let Ht;new(Nt=(G=new WeakMap,K=new WeakMap,Pt=class extends (Lt=c){get list(){return b(this,G)}set list(e){S(this,G,e)}get scrollY(){return b(this,K)}set scrollY(e){S(this,K,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(Vt),e=>{var t;(t=e).id||(t.id=k());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(F,s(e({},c),{variant:o,style:e({flexDirection:`column`},a),children:n.map(this.renderLink)}))}constructor(...e){super(...e),x(this,G,{writable:!0,value:(Bt(this),Rt(this,[]))}),x(this,K,{writable:!0,value:zt(this,0)}),o(this,`updateScrollY`,()=>this.scrollY=window.scrollY),o(this,`scrollTo`,e=>()=>{var t,n;setTimeout(()=>ce(`[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(F.Item,{style:{textIndent:`${t-1}rem`},children:r(F.Link,{href:`#${e}`,active:a===e,onClick:this.scrollTo({id:e,level:t,text:n,top:i}),children:n})},e)})}},{e:[Rt,zt,Bt],c:[Ht,It]}=y(Pt,[[T,1,`list`],[T,1,`scrollY`],[w,3,`currentActiveId`]],[E],Lt),Pt),Ft=class extends C{constructor(){super(Ht),o(this,`displayName`,`PageNav`),It()}},o(Ft,Nt,void 0),Ft);let Ut;var q,J,Y,Wt,Gt,Kt,qt,Jt,Yt,Xt,Zt;let Qt;new(Ut=(q=new WeakMap,J=new WeakMap,Y=new WeakMap,Wt=class extends (qt=c){get scrollLeft(){return b(this,q)}set scrollLeft(e){S(this,q,e)}get scrollWidth(){return b(this,J)}set scrollWidth(e){S(this,J,e)}get clientWidth(){return b(this,Y)}set clientWidth(e){S(this,Y,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(U,{name:`caret-left-fill`})}),r(`div`,{ref:this.scrollerRef,className:`overflow-x-auto aEvBXq_scrollerInner`,children:r(F,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(U,{name:`caret-right-fill`})})]})}constructor(...e){super(...e),o(this,`scrollerRef`,(Zt(this),u())),x(this,q,{writable:!0,value:Jt(this,0)}),x(this,J,{writable:!0,value:Yt(this,0)}),x(this,Y,{writable:!0,value:Xt(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:[Jt,Yt,Xt,Zt],c:[Qt,Kt]}=y(Wt,[[T,1,`scrollLeft`],[T,1,`scrollWidth`],[T,1,`clientWidth`],[w,3,`canScrollLeft`],[w,3,`canScrollRight`]],[E],qt),Wt),Gt=class extends C{constructor(){super(Qt),o(this,`displayName`,`ScrollNav`),Kt()}},o(Gt,Ut,void 0),Gt);const $t=n=>{let{value:i,children:a}=n,o=t(n,[`value`,`children`]);return r(N.Item,s(e({},o),{"data-value":i,children:a}))};$t.displayName=`Option`;const en=({className:e,style:t,variant:n,menuVariant:o,children:s,value:c,onChange:l,valueRender:u})=>{let f=se(s).flat(1/0).find(e=>d(e)&&e.type===$t&&e.props.value===c);return i(N,{onClick:({target:e})=>{let t=e.closest(`.dropdown-item`);if(!t)return;let{value:n}=t.dataset;l==null||l(n)},children:[r(N.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:f==null?void 0:f.props.className,children:f==null?void 0:f.props.children})}),r(N.Menu,{variant:o,children:s})]})};en.displayName=`Select`;let tn;var X,Z,nn,rn,an,on,sn,cn,ln;function un(e,t,n){return A(function*(){let r=yield Ee(e,{useCORS:!0});return new Promise((e,i)=>r.toBlob(t=>t?e(URL.createObjectURL(t)):i(),t,n))})()}let dn;new(tn=(X=new WeakMap,Z=new WeakMap,nn=class extends (on=c){get loading(){return b(this,X)}set loading(e){S(this,X,e)}get imageURI(){return b(this,Z)}set imageURI(e){S(this,Z,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(St,{}),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(P,{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`,(ln(this),u())),x(this,X,{writable:!0,value:sn(this,!1)}),x(this,Z,{writable:!0,value:cn(this,``)}),o(this,`generateImage`,()=>A(function*(){n.imageURI&&(URL.revokeObjectURL(n.imageURI),n.imageURI=``),n.loading=!0,n.imageURI=yield un(n.root.current),n.loading=!1})()),o(this,`share`,t=>A(function*(){var r,i;t.stopPropagation();let a=yield ie(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:[sn,cn,ln],c:[dn,an]}=y(nn,[[T,1,`loading`],[T,1,`imageURI`]],[E],on),nn),rn=class extends C{constructor(){super(dn),o(this,`displayName`,`ShareBox`),an()}},o(rn,tn,void 0),rn);const fn=a=>{let{animation:o,loading:c,disabled:l,children:u}=a,d=t(a,[`animation`,`loading`,`disabled`,`children`]);return i(j,s(e({},d),{disabled:c||l,children:[c&&i(n,{children:[r(Se,{as:`span`,className:u?`me-2`:``,size:`sm`,animation:o,role:`status`,"aria-hidden":`true`}),!u&&r(`span`,{className:`visually-hidden`,children:`Loading...`})]}),u]}))};fn.displayName=`SpinnerButton`;const pn=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(Se,{animation:i,variant:a,size:o})})}))};pn.displayName=`TableSpinner`;let mn;var Q,hn,gn,_n,vn,yn,bn,xn,Sn;let Cn;new(mn=(Q=new WeakMap,hn=new WeakMap,gn=class extends (yn=c){get expanded(){return b(this,Q)}set expanded(e){S(this,Q,e)}get overflowed(){return b(this,hn)}set overflowed(e){S(this,hn,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),x(this,Q,{writable:!0,value:(Sn(this),bn(this,!1))}),x(this,hn,{writable:!0,value:xn(this,!1)}),o(this,`contentRef`,u()),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:[bn,xn,Sn],c:[Cn,vn]}=y(gn,[[T,1,`expanded`],[T,1,`overflowed`]],[E],yn),gn),_n=class extends C{constructor(){super(Cn),o(this,`displayName`,`TextTruncate`),vn()}},o(_n,mn,void 0),_n);let wn;var Tn,En,Dn,On,kn,An=te(({observedProps:{dateTime:e,format:t}})=>e+t),jn,Mn;let $;new(wn=(Tn=new WeakMap,En=class extends (kn=ee){updateText(){let{dateTime:e,format:t}=this.props;return O(e,t)}get timeText(){return b(this,Tn)}set timeText(e){S(this,Tn,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),x(this,Tn,{writable:!0,value:(Mn(this),jn(this,this.updateText()))})}},{e:[jn,Mn],c:[$,On]}=y(En,[[An,2,`updateText`],[T,1,`timeText`]],[E],kn),En),Dn=class extends C{constructor(){super($),o(this,`displayName`,`Time`),On()}},o(Dn,wn,void 0),Dn);const Nn={ms:`millisecond(s)`,s:`second(s)`,m:`minute(s)`,H:`hour(s)`,D:`day(s)`,W:`week(s)`,M:`month(s)`,Y:`year(s)`},Pn=n=>{let{date:r,unitWords:a=Nn,beforeWord:o=` before`,afterWord:c=` after`}=n,l=t(n,[`date`,`unitWords`,`beforeWord`,`afterWord`]);r=new Date(r);let{distance:u,unit:d}=oe(r);return i(`time`,s(e({},l),{dateTime:r.toJSON(),title:r.toLocaleString(),children:[Math.abs(u),` `,a[d],u<0?o:c]}))};Pn.displayName=`TimeDistance`;const Fn=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(ye,{children:i(ye.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($,{dateTime:a[0],format:c}),a[1]&&`~`,a[1]&&r($,{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(Mt,e({},t))},t.name))}),r(`p`,{className:`m-0`,children:n})]})})},t))}))};Fn.displayName=`Timeline`;var In,Ln;const Rn=new Set([`warning`,`info`,`light`]);var zn=new WeakMap,Bn=class{get messages(){return b(this,zn)}set messages(e){S(this,zn,e)}open(t){let n=k(),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=re){o(this,`TimeScalar`,void 0),x(this,zn,{writable:!0,value:void 0}),o(this,`Component`,void 0),o(this,`renderMessage`,void 0),this.TimeScalar=e,S(this,zn,(Ln(this),In(this,[]))),this.Component=E(({position:e=`top-end`})=>r(we,{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&&!Rn.has(o)?`text-white`:void 0,l=!!n||s===0,u=this.TimeScalar.distanceOf(Date.now(),t).toShortString();return i(L,{bg:o,delay:s,autohide:s!==0,onClose:()=>this.close(e),children:[l&&i(L.Header,{children:[r(`strong`,{className:`me-auto`,children:n}),r(`small`,{children:u})]}),r(L.Body,{className:c,children:a})]},e)},this.Component.displayName=`ToastComponent`}};({e:[In,Ln]}=y(Bn,[[T,1,`messages`]],[]));let Vn;var Hn,Un,Wn,Gn,Kn,qn,Jn;let Yn;new(Vn=(Hn=new WeakMap,Un=class extends (Kn=c){get echoed(){return b(this,Hn)}set echoed(e){S(this,Hn,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,x(this,Hn,{writable:!0,value:(Jn(this),qn(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 le(i/1e3),t.echoed+=e})()).observe(e))}},{e:[qn,Jn],c:[Yn,Gn]}=y(Un,[[T,1,`echoed`]],[E],Kn),Un),Wn=class extends C{constructor(){super(Yn),o(this,`displayName`,`TypeEcho`),Gn()}},o(Wn,Vn,void 0),Wn);const Xn=({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(U,{name:`envelope`})}),t&&r(`a`,{rel:`noreferrer`,target:`_blank`,href:t,children:r(U,{name:`globe2`})})]}),Zn=`X5DLia_image`;var Qn=class extends l{render(){let n=this.props,{className:a=``,title:o,rank:c=[],linkOf:l}=n,u=t(n,[`className`,`title`,`rank`,`linkOf`]);return i(xe,s(e({className:`X5DLia_rankBox ${a}`},u),{children:[i(M,{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(xe,{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(M,{xs:12,sm:12,lg:5,children:r(Ce,{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(M,{as:`li`,children:[r(`div`,{className:`shadow-lg overflow-hidden rounded-circle m-auto ${Zn}`,children:r(P,{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(Xn,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(ve,{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 ${Zn}`,children:r(P,{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(Xn,e({},t))})]},t.id)})}};o(Qn,`displayName`,`UserRankView`);const $n=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})})}))};$n.displayName=`VerticalMarquee`;const er=[`🐵`,`🐔`,`🐶`,`🐷`,`🐭`,`🐮`,`🐯`,`🐰`,`🐲`,`🐍`,`🐴`,`🐐`],tr=e=>{let t=e<0?e+1:e;return er[(t%12+12)%12]},nr=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=tr(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)})}))};nr.displayName=`ZodiacBar`;export{Ie as Avatar,Le as ClickBoundary,We as CodeBlock,tt as Countdown,ct as Dialog,at as DialogClose,_t as Editor,yt as EditorHTML,H as HorizontalMarquee,bt as HorizontalMarqueeBox,U as Icon,xt as LiveTSX,St as Loading,jt as MonthCalendar,Mt as Nameplate,$t as Option,Ct as OverlayBox,Ht as PageNav,Qt as ScrollNav,en as Select,dn as ShareBox,fn as SpinnerButton,pn as TableSpinner,Cn as TextTruncate,$ as Time,Pn as TimeDistance,Fn as Timeline,Bn as Toast,Yn as TypeEcho,Qn as UserRankView,Ge as VariantColors,$n as VerticalMarquee,nr as ZodiacBar,er as ZodiacSigns,Fe as animate,un as elementToImage,vt as parser,Ke as text2color,tr as zodiacOf};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "idea-react",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.4",
|
|
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.",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"classnames": "^2.5.1",
|
|
38
38
|
"editorjs-html": "^4.0.5",
|
|
39
39
|
"html2canvas": "^1.4.1",
|
|
40
|
-
"iterable-observer": "^1.1.
|
|
40
|
+
"iterable-observer": "^1.1.1",
|
|
41
41
|
"lodash": "^4.18.1",
|
|
42
|
-
"mobx-react-helper": "^0.5.
|
|
42
|
+
"mobx-react-helper": "^0.5.4",
|
|
43
43
|
"react-bootstrap": "^2.10.10",
|
|
44
44
|
"react-editor-js": "^2.1.0",
|
|
45
45
|
"react-live": "^4.1.8",
|
package/source/CodeBlock.tsx
CHANGED
|
@@ -23,6 +23,7 @@ export const CodeBlock: FC<CodeBlockProps> = ({ className = '', language, childr
|
|
|
23
23
|
typeof children === 'string'
|
|
24
24
|
? children
|
|
25
25
|
: reactElementToJSXString(isValidElement(children) ? children : <>{children}</>);
|
|
26
|
+
|
|
26
27
|
const __html = highlighter.codeToHtml(sourceCode, {
|
|
27
28
|
lang: language,
|
|
28
29
|
theme: 'github-light',
|