@xyd-js/atlas 0.1.0-xyd.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +6 -0
- package/.storybook/index.css +32 -0
- package/.storybook/main.ts +19 -0
- package/.storybook/preview.ts +18 -0
- package/.storybook/public/fonts/fustat-ext-500.woff2 +0 -0
- package/.storybook/public/fonts/fustat-ext-600.woff2 +0 -0
- package/.storybook/public/fonts/fustat-ext-700.woff2 +0 -0
- package/.storybook/public/fonts/fustat-regular.woff2 +0 -0
- package/README.md +3 -0
- package/declarations.d.ts +4 -0
- package/dist/index.css +58 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +1 -0
- package/index.ts +3 -0
- package/package.json +61 -0
- package/postcss.config.cjs +5 -0
- package/rollup.config.js +75 -0
- package/src/components/ApiRef/ApiRefItem/ApiRefItem.styles.tsx +70 -0
- package/src/components/ApiRef/ApiRefItem/ApiRefItem.tsx +97 -0
- package/src/components/ApiRef/ApiRefItem/index.ts +7 -0
- package/src/components/ApiRef/ApiRefProperties/ApiRefProperties.styles.tsx +154 -0
- package/src/components/ApiRef/ApiRefProperties/ApiRefProperties.tsx +134 -0
- package/src/components/ApiRef/ApiRefProperties/index.ts +7 -0
- package/src/components/ApiRef/ApiRefSamples/ApiRefSamples.styles.tsx +28 -0
- package/src/components/ApiRef/ApiRefSamples/ApiRefSamples.tsx +48 -0
- package/src/components/ApiRef/ApiRefSamples/index.ts +7 -0
- package/src/components/ApiRef/index.ts +5 -0
- package/src/components/Atlas/Atlas.styles.tsx +7 -0
- package/src/components/Atlas/Atlas.tsx +25 -0
- package/src/components/Atlas/AtlasLazy/AtlasLazy.styles.tsx +10 -0
- package/src/components/Atlas/AtlasLazy/AtlasLazy.tsx +45 -0
- package/src/components/Atlas/AtlasLazy/hooks.ts +29 -0
- package/src/components/Atlas/AtlasLazy/index.ts +7 -0
- package/src/components/Atlas/index.ts +3 -0
- package/src/components/Code/CodeCopy/CodeCopy.style.tsx +21 -0
- package/src/components/Code/CodeCopy/CodeCopy.tsx +32 -0
- package/src/components/Code/CodeCopy/index.ts +7 -0
- package/src/components/Code/CodeSample/CodeSample.styles.tsx +134 -0
- package/src/components/Code/CodeSample/CodeSample.tsx +149 -0
- package/src/components/Code/CodeSample/index.ts +8 -0
- package/src/components/Code/CodeSample/withLocalStored.tsx +52 -0
- package/src/components/Code/CodeSampleButtons/CodeSampleButtons.styles.tsx +67 -0
- package/src/components/Code/CodeSampleButtons/CodeSampleButtons.tsx +106 -0
- package/src/components/Code/CodeSampleButtons/index.ts +7 -0
- package/src/components/Code/default-theme.ts +266 -0
- package/src/components/Code/index.ts +6 -0
- package/src/docs/AtlasExample/AtlasExample.stories.tsx +47 -0
- package/src/docs/AtlasExample/todo-app.uniform.json +625 -0
- package/src/docs/AtlasExample/uniform-to-references.ts +101 -0
- package/src/utils/mdx.ts +31 -0
- package/tsconfig.json +44 -0
- package/vite.config.ts +25 -0
package/.babelrc
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: 'Fustat';
|
|
3
|
+
src: url('./public/fonts/fustat-regular.woff2') format('woff2');
|
|
4
|
+
font-weight: normal;
|
|
5
|
+
font-style: normal;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@font-face {
|
|
9
|
+
font-family: 'Fustat';
|
|
10
|
+
src: url('./public/fonts/fustat-ext-500.woff2') format('woff2');
|
|
11
|
+
font-weight: 500;
|
|
12
|
+
font-style: normal;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@font-face {
|
|
16
|
+
font-family: 'Fustat';
|
|
17
|
+
src: url('./public/fonts/fustat-ext-600.woff2') format('woff2');
|
|
18
|
+
font-weight: 600;
|
|
19
|
+
font-style: normal;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@font-face {
|
|
23
|
+
font-family: 'Fustat';
|
|
24
|
+
src: url('./public/fonts/fustat-ext-700.woff2') format('woff2');
|
|
25
|
+
font-weight: 700;
|
|
26
|
+
font-style: normal;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Example usage */
|
|
30
|
+
body {
|
|
31
|
+
font-family: 'Fustat', sans-serif;
|
|
32
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { StorybookConfig } from '@storybook/react-vite';
|
|
2
|
+
|
|
3
|
+
const config: StorybookConfig = {
|
|
4
|
+
stories: ['../src/**/*.stories.tsx'],
|
|
5
|
+
addons: ['@storybook/addon-essentials', '@chromatic-com/storybook'],
|
|
6
|
+
framework: {
|
|
7
|
+
name: '@storybook/react-vite',
|
|
8
|
+
options: {},
|
|
9
|
+
},
|
|
10
|
+
typescript: {
|
|
11
|
+
reactDocgen: 'react-docgen-typescript',
|
|
12
|
+
},
|
|
13
|
+
core: {
|
|
14
|
+
disableTelemetry: true, // 👈 Disables telemetry
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// eslint-disable-next-line import/no-default-export
|
|
19
|
+
export default config;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import "@xyd-js/fable-wiki/atlas.css"
|
|
2
|
+
|
|
3
|
+
import './index.css'
|
|
4
|
+
import '../dist/index.css'
|
|
5
|
+
|
|
6
|
+
/** @type { import('@storybook/react').Preview } */
|
|
7
|
+
const preview = {
|
|
8
|
+
parameters: {
|
|
9
|
+
controls: {
|
|
10
|
+
matchers: {
|
|
11
|
+
color: /(background|color)$/i,
|
|
12
|
+
date: /Date$/i,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default preview;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/README.md
ADDED
package/dist/index.css
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
.h9tkkeg{font-size:30px;font-weight:400;}
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
.c1q2rf33{background:linear-gradient(45deg, rgb(247, 247, 248) 0%, rgb(247, 247, 248) 100%);padding:8px;border:1px solid var(--atlas-comp-apiref-item-border-color);border-radius:8px;font-size:13px;}
|
|
5
|
+
.lhk53ap{color:var(--atlas-comp-apiref-item-navbar-color);margin-right:4px;}
|
|
6
|
+
.h1t46rpg{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;gap:16px;padding-bottom:25px;}
|
|
7
|
+
.gq5m3p7{display:-ms-grid;display:grid;-ms-grid-columns:repeat(2, minmax(0, 1fr));grid-template-columns:repeat(2, minmax(0, 1fr));-webkit-align-items:normal;-webkit-box-align:normal;-ms-flex-align:normal;align-items:normal;gap:100px;}
|
|
8
|
+
|
|
9
|
+
.i1lmmgv6{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;gap:25px;margin-bottom:25px;}
|
|
10
|
+
.hpmrvhc{font-size:15px;font-weight:600;}
|
|
11
|
+
.l8q9wny{-webkit-text-decoration:none;text-decoration:none;}
|
|
12
|
+
|
|
13
|
+
.h1b8wz9m{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex-wrap:wrap;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;gap:16px;padding:0;margin:0;list-style:none;border:none;}
|
|
14
|
+
.h1ayic9k{margin:0;padding:0;border-top:1px solid var(--atlas-comp-apiref-properties-border-color);}.h1ayic9k:first-child{padding-top:0;}.h1ayic9k:last-child{padding-bottom:0;}
|
|
15
|
+
.hkisad5{font-size:14px;line-height:22px;color:var(--atlas-comp-apiref-properties-description-color);}
|
|
16
|
+
.h159tzrk{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-box-flex-wrap:wrap;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:10px;margin:8px 0;}.h159tzrk dd{-webkit-margin-start:0px;margin-inline-start:0px;}
|
|
17
|
+
.ht6ukcw{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;padding:4px 0;font-weight:600;font-size:13px;color:var(--atlas-comp-apiref-properties-prop__name-color);}
|
|
18
|
+
.h1hhb1ak{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;padding:4px 0;border-radius:4px;font-size:10px;color:var(--atlas-comp-apiref-properties-prop__type-color);}
|
|
19
|
+
.h1ud1m37{padding:8px;border-style:none;display:none;}
|
|
20
|
+
.h1fjyrqx{display:unset;}
|
|
21
|
+
|
|
22
|
+
.u1hrqzjh{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex-wrap:wrap;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;gap:16px;padding:0;margin:0;list-style:none;border:none;}
|
|
23
|
+
.l1ofrsp8{padding:0 16px;border-top:1px solid var(--atlas-comp-apiref-properties-border-color);}
|
|
24
|
+
.hmjvvs5{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:0;margin-top:16px;background:none;outline:inherit;border:none;cursor:pointer;color:inherit;font-size:13px;}.hmjvvs5 svg{font-size:13px;}.hmjvvs5:hover svg{-webkit-transition:all ease-in .1s;transition:all ease-in .1s;color:var(--atlas-comp-apiref-properties-color--active);}
|
|
25
|
+
.l9u79h5{-webkit-text-decoration:none;text-decoration:none;cursor:pointer;margin-left:4px;}.l9u79h5:hover{-webkit-transition:all ease-in .1s;transition:all ease-in .1s;color:var(--atlas-comp-apiref-properties-color--active);}
|
|
26
|
+
|
|
27
|
+
.h47igvr{all:unset;cursor:pointer;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;border-radius:6px;padding:6px;}.h47igvr:hover{-webkit-transition:ease-in 0.1s;transition:ease-in 0.1s;background:var(--atlas-comp-code-copy-background--active);}
|
|
28
|
+
|
|
29
|
+
.h1ur68ey{-webkit-flex:1 1 0;-ms-flex:1 1 0;flex:1 1 0;overflow:hidden;min-width:0;max-width:512px;border:1px solid var(--atlas-comp-code-sample-border-color);border-radius:16px;}
|
|
30
|
+
.hp2fg9q{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1 1 0%;-ms-flex:1 1 0%;flex:1 1 0%;padding:8px 0px;background:linear-gradient(45deg, rgb(247, 247, 248) 0%, rgb(247, 247, 248) 100%)!important;border-top-right-radius:10px;border-top-left-radius:10px;border-bottom:0px;min-width:0;}
|
|
31
|
+
.l1u5q09{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;-webkit-box-pack:end;-ms-flex-pack:end;-webkit-justify-content:end;justify-content:end;gap:8px;padding:0 10px;}
|
|
32
|
+
.b1g5l43{all:unset;cursor:pointer;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;border-radius:6px;padding:6px;font-size:14px;color:var(--atlas-comp-code-sample-color);}.b1g5l43[data-state="active"]{color:var(--atlas-comp-code-sample-color--active);border-bottom:1px solid var(--atlas-comp-code-sample-color--active);border-bottom-left-radius:0px;border-bottom-right-radius:0px;}.b1g5l43:hover{-webkit-transition:ease-in 0.1s;transition:ease-in 0.1s;background:var(--atlas-comp-code-sample-background);}
|
|
33
|
+
.d1x4vxzj{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:4px;font-size:14px;color:var(--atlas-comp-code-sample-color);margin-left:4px;margin-right:4px;}
|
|
34
|
+
.d1n1kybx{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding-left:16px;padding-right:16px;-webkit-flex:1 1 0%;-ms-flex:1 1 0%;flex:1 1 0%;gap:16px;border-radius:4px;}
|
|
35
|
+
.c1qxxuld{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;padding-left:8px;padding-right:8px;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
|
36
|
+
.h1gfddng{max-height:400px;background:linear-gradient(45deg, rgb(247, 247, 248) 0%, rgb(247, 247, 248) 100%)!important;margin:0;padding:8px 16px;border-top:1px solid var(--atlas-comp-code-sample-border-color);border-bottom-left-radius:10px;border-bottom-right-radius:10px;font-size:14px;line-height:20px;white-space:pre-wrap;word-break:break-all;overflow-y:scroll;}
|
|
37
|
+
.h1h0n8u6{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;border-left-width:4px;border-color:transparent;margin:4px 0;}
|
|
38
|
+
.l12klvp{-webkit-flex:1 1 0%;-ms-flex:1 1 0%;flex:1 1 0%;}
|
|
39
|
+
._4uqa3m{border-color:var(--atlas-comp-code-sample-mark-border--active);background-color:var(--atlas-comp-code-sample-mark-background--active);}
|
|
40
|
+
.h18n51vi{margin:0 4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:0.5;}
|
|
41
|
+
|
|
42
|
+
.h1de1isv{position:relative;max-width:100%;}
|
|
43
|
+
.c174knag{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:8px;background-color:var(--atlas-comp-code-sample_buttons-container-background);}
|
|
44
|
+
.hdr58em{padding:8px;background-color:var(--atlas-comp-code-sample_buttons-background--active);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.05);}
|
|
45
|
+
.izmf263{width:16px;height:16px;}
|
|
46
|
+
.h1olbpn1{overflow-x:auto;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}
|
|
47
|
+
.c1dubejs{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;gap:4px;padding:4px;margin-left:4px;}
|
|
48
|
+
.he063xp{padding:0.5rem 1rem;border-radius:0.375rem;font-size:0.875rem;line-height:1.25rem;font-weight:500;white-space:nowrap;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms;color:var(--atlas-comp-code-sample_buttons-color);}.he063xp:hover{color:var(--atlas-comp-code-sample_buttons-color--active);}
|
|
49
|
+
._lt697q{color:var(--atlas-comp-code-sample_buttons-color--active);background-color:var(--atlas-comp-code-sample_buttons-background--active);box-shadow:0 1px 2px 0 rgba(0, 0, 0, 0.05);}
|
|
50
|
+
|
|
51
|
+
.hskauww{position:-webkit-sticky;position:sticky;top:6rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:32px;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}.hskauww:first-child{margin-top:0;}.hskauww:last-child{margin-bottom:0;}
|
|
52
|
+
.h1nkbfqz{gap:10px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}
|
|
53
|
+
|
|
54
|
+
.h5edgc7{width:100%;}
|
|
55
|
+
|
|
56
|
+
.h12vpet9{padding:16px 0;}
|
|
57
|
+
._18e99ku{padding:4px 0;}
|
|
58
|
+
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Reference } from '@xyd-js/uniform';
|
|
3
|
+
import { MDXReference } from '@/utils/mdx';
|
|
4
|
+
|
|
5
|
+
interface AtlasProps {
|
|
6
|
+
references: MDXReference<Reference[]> | [];
|
|
7
|
+
}
|
|
8
|
+
declare function Atlas(props: AtlasProps): React.JSX.Element;
|
|
9
|
+
|
|
10
|
+
interface AtlasLazyProps {
|
|
11
|
+
references: MDXReference<Reference>[];
|
|
12
|
+
urlPrefix: string;
|
|
13
|
+
slug: string;
|
|
14
|
+
onLoaded?: () => void;
|
|
15
|
+
}
|
|
16
|
+
declare function AtlasLazy(props: AtlasLazyProps): React.JSX.Element[];
|
|
17
|
+
|
|
18
|
+
export { Atlas, AtlasLazy, type AtlasLazyProps, type AtlasProps };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e,{useState as t,useRef as n,forwardRef as r,useEffect as o}from"react";import{ReferenceCategory as a}from"@xyd-js/uniform";import{CheckCheck as i,Copy as c,ChevronLeft as l,ChevronRight as u}from"lucide-react";import*as s from"@radix-ui/react-tabs";import{extractAnnotations as f,highlight as p,LANG_NAMES as d}from"@code-hike/lighter";var m="h9tkkeg",v="lz9sagk",h="he1ymcw",y="c1q2rf33",g="lhk53ap",b="h1t46rpg",E="gq5m3p7",k="hky03d0",w="i1lmmgv6",x="hpmrvhc",S="l8q9wny";function j(t){var n,r,o=t.reference;if((null===(n=null==o?void 0:o.category)||void 0===n?void 0:n.title)===a.REST){var i=o.context;r=e.createElement(O,{label:i.method.title,subtitle:"".concat(i.path.title)})}return e.createElement("div",{className:b},e.createElement(_,{title:o.title||""}),r,e.createElement("div",{className:E},e.createElement(N,{reference:o}),e.createElement(Ft,{examples:o.examples})))}function N(t){var n,r=t.reference;return e.createElement("div",{className:k},null===(n=null==r?void 0:r.definitions)||void 0===n?void 0:n.map((function(t,n){var r;return e.createElement("div",{key:n},(null===(r=t.properties)||void 0===r?void 0:r.length)&&e.createElement("div",{key:n,className:w},e.createElement(C,{title:t.title.title}),e.createElement(ne,{properties:t.properties})))})))}function O(t){var n=t.label,r=t.subtitle;return e.createElement(e.Fragment,null,e.createElement("div",{className:h},e.createElement("span",{className:y},e.createElement("span",{className:g},n.toUpperCase()),e.createElement("span",null,r))))}function _(t){var n=t.title;return e.createElement(e.Fragment,null,e.createElement("h1",{className:m},e.createElement("a",{className:v},n)))}function C(t){var n=t.title;return e.createElement(e.Fragment,null,e.createElement("h1",{className:x},e.createElement("a",{className:S},n)))}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function F(e){if(Array.isArray(e))return e}function L(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function P(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){L(a,r,o,i,c,"next",e)}function c(e){L(a,r,o,i,c,"throw",e)}i(void 0)}))}}function A(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=K(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw a}}}}function R(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function B(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function $(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 I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){R(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function q(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function z(){z=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),c=new D(r||[]);return o(i,"_invoke",{value:N(e,n,c)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",m="executing",v="completed",h={};function y(){}function g(){}function b(){}var E={};u(E,i,(function(){return this}));var k=Object.getPrototypeOf,w=k&&k(k(F([])));w&&w!==n&&r.call(w,i)&&(E=w);var x=b.prototype=y.prototype=Object.create(E);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(o,a,i,c){var l=f(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==typeof s&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function N(t,n,r){var o=p;return function(a,i){if(o===m)throw Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var l=O(c,r);if(l){if(l===h)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=m;var u=f(t,n,r);if("normal"===u.type){if(o=r.done?v:d,u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=v,r.method="throw",r.arg=u.arg)}}}function O(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var a=f(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,h;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function F(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(typeof t+" is not iterable")}return g.prototype=b,o(x,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=u(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},S(j.prototype),u(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new j(s(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},S(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=F,D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:F(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),h}},t}function W(e,t){return F(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||K(e,t)||B()}function G(e){return F(e)||T(e)||K(e)||B()}function M(e){return function(e){if(Array.isArray(e))return D(e)}(e)||T(e)||K(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(e){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U(e)}function K(e,t){if(e){if("string"==typeof e)return D(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}function V(e){return e?e.title?e.title:e:""}var Y={host:"h1b8wz9m"},H={host:"h1ayic9k"},J={host:"hkisad5"},X={host:"h159tzrk"},Z={host:"ht6ukcw"},Q={host:"h1hhb1ak"},ee={host:"h1ud1m37",host$$expanded:"h1fjyrqx",box:"b12sxrry",ul:"u1hrqzjh",li:"l1ofrsp8"},te={host:"hmjvvs5",link:"l9u79h5"};function ne(t){var n=t.properties;return e.createElement("ul",{className:Y.host},null==n?void 0:n.map((function(t,n){return e.createElement("li",{className:H.host,key:n},e.createElement("dl",{className:X.host},e.createElement(re,{name:"name",value:V(t.name)}),e.createElement(oe,{name:"type",value:V(t.type)})),e.createElement("div",{className:J.host},t.children),t.properties?e.createElement(ae,{properties:t.properties}):null)})))}function re(t){t.name;var n=t.value;return e.createElement(e.Fragment,null,e.createElement("dd",null,e.createElement("code",{className:Z.host},n)))}function oe(t){t.name;var n=t.value;return e.createElement(e.Fragment,null,e.createElement("dd",null,e.createElement("code",{className:Q.host},n)))}function ae(n){var r=n.properties,o=W(t(!1),2),a=o[0],i=o[1];return e.createElement(e.Fragment,null,e.createElement(ie,{onClick:function(){return i(!a)},isExpanded:a}),e.createElement("div",{className:"".concat(ee.host," ").concat(a&&ee.host$$expanded)},e.createElement("div",{className:ee.box},e.createElement("ul",{role:"list",className:ee.ul},null==r?void 0:r.map((function(t,n){return e.createElement("li",{className:ee.li,key:n},e.createElement("dl",{className:X.host},e.createElement(re,{name:"name",value:V(t.name)}),e.createElement(oe,{name:"type",value:V(t.type)})),e.createElement("div",{className:J.host},t.children),t.properties?e.createElement(ae,{properties:t.properties}):null)}))))))}function ie(t){return e.createElement("button",{"aria-expanded":t.isExpanded,"aria-controls":"chat/object-usage_table",onClick:t.onClick,className:te.host},e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 24 24"},e.createElement("path",{fillRule:"evenodd",d:t.isExpanded?"M12 8a1 1 0 0 1 .707.293l7 7a1 1 0 0 1-1.414 1.414L12 10.414l-6.293 6.293a1 1 0 0 1-1.414-1.414l7-7A1 1 0 0 1 12 8Z":"M4.293 8.293a1 1 0 0 1 1.414 0L12 14.586l6.293-6.293a1 1 0 1 1 1.414 1.414l-7 7a1 1 0 0 1-1.414 0l-7-7a1 1 0 0 1 0-1.414Z",clipRule:"evenodd"})),e.createElement("span",{className:te.link},t.isExpanded?"Hide properties":"Show properties"))}var ce={host:"h47igvr"};function le(n){var r=n.text,o=W(t(!1),2),a=o[0],l=o[1];return e.createElement("button",{"aria-label":"Copy to clipboard",onClick:function(){navigator.clipboard.writeText(r),l(!0),setTimeout((function(){l(!1)}),1200)},className:ce.host},a?e.createElement(i,{size:16}):e.createElement(c,{size:16}))}function ue(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function se(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{l(r.next(e))}catch(e){a(e)}}function c(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}l((r=r.apply(e,t||[])).next())}))}function fe(e,t,n){return pe.apply(this,arguments)}function pe(){return(pe=P(z().mark((function e(t,n,r){var o,a,i,c,l;return z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=[],a=t,e.next=4,de(a,n,r);case 4:return i=e.sent,c=i.code,l=i.annotations,o=[].concat(M(o),M(l)),a=c,e.abrupt("return",{code:a,annotations:o});case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function de(e,t){return me.apply(this,arguments)}function me(){return me=P(z().mark((function e(t,n){var r,o,a,i,c,l=arguments;return z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=l.length>2&&void 0!==l[2]?l[2]:"!",o=function(e){var t,n=new RegExp("\\s*(".concat(r,"?[\\w-]+)?(\\([^\\)]*\\)|\\[[^\\]]*\\])?(.*)$")),o=e.match(n);if(!o)return null;var a=o[1],i=o[2],c=null===(t=o[3])||void 0===t?void 0:t.trim();return a&&a.startsWith(r)?{name:a.slice(r.length),rangeString:i,query:c}:null},e.next=4,f(t,n,o);case 4:return a=e.sent,i=a.code,c=a.annotations,e.abrupt("return",{code:i,annotations:c});case 8:case"end":return e.stop()}}),e)}))),me.apply(this,arguments)}function ve(e){return!he(e)}function he(e){return e.hasOwnProperty("lineNumber")}function ye(e){return"string"==typeof e}"function"==typeof SuppressedError&&SuppressedError;var ge=["color"];function be(e,t){return Ee.apply(this,arguments)}function Ee(){return Ee=P(z().mark((function e(t,n){var r,o,a,i,c,l,u,s,f,m,v,h,y,g,b=arguments;return z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=b.length>2&&void 0!==b[2]?b[2]:{},o=t.value,a=t.lang,i=void 0===a?"txt":a,d.includes(i)||(console.warn('Code Hike warning: Unknown language "'.concat(i,'"')),i="txt"),e.next=5,fe(o,i,r.annotationPrefix||"!");case 5:return c=e.sent,l=c.code,u=c.annotations,e.next=10,p(l,i,n,{annotations:[],scopes:!1});case 10:return s=e.sent,f=s.lines,m=s.lang,v=s.style,h=we(f),y=xe(h),g=Se(y),e.abrupt("return",I(I({},t),{},{code:l,tokens:g,lang:m,annotations:ke(u),themeName:"string"==typeof n?n:(null==n?void 0:n.name)||"unknown",style:v}));case 18:case"end":return e.stop()}}),e)}))),Ee.apply(this,arguments)}function ke(e){var t,n=[],r=A(e);try{for(r.s();!(t=r.n()).done;){var o,a=t.value,i=a.name,c=a.query,l=A(a.ranges);try{for(l.s();!(o=l.n()).done;){var u=o.value;if(u.lineNumber){var s=u.lineNumber,f=u.fromColumn,p=u.toColumn;n.push({name:i,query:c,lineNumber:s,fromColumn:f,toColumn:p})}else{var d=u.fromLineNumber,m=u.toLineNumber;n.push({name:i,query:c,fromLineNumber:d,toLineNumber:m})}}}catch(e){l.e(e)}finally{l.f()}}}catch(e){r.e(e)}finally{r.f()}return n}function we(e){var t=[];return e.forEach((function(n,r){if("lines"in n)throw new Error("Shouldnt be groups");var o=function(e){return e.map((function(e){if("tokens"in e)throw new Error("Shouldnt be groups");var t=[e.content],n=e.style||{},r=n.color,o=q(n,ge);return t.push(r),Object.keys(o).length&&t.push(o),t}))}(n.tokens);t.push.apply(t,M(o)),r<e.length-1&&t.push("\n")})),t}function xe(e){var t=[];return e.forEach((function(e){if(ye(e))t.push(e);else{var n=function(e){var t=e.trim(),n=e.slice(0,e.indexOf(t)),r=e.slice(e.indexOf(t)+t.length);return[n,t,r]}(e[0]),r=W(n,3),o=r[0],a=r[1],i=r[2];if((null==o?void 0:o.length)&&t.push(o),a.length){var c=M(e);c[0]=a,t.push(c)}(null==i?void 0:i.length)&&t.push(i)}})),t}function Se(e){var t=[];return e.forEach((function(e){if(ye(e)){var n=t[t.length-1];n&&ye(n)?t[t.length-1]+=e:""!==e&&t.push(e)}else e[0].length>0&&t.push(e)})),t}var je,Ne={exports:{}},Oe={};var _e,Ce,De={};function Fe(){return _e||(_e=1,"production"!==process.env.NODE_ENV&&function(){var t=e,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),v=Symbol.iterator;var h=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];!function(e,t,n){var r=h.ReactDebugCurrentFrame,o=r.getStackAddendum();""!==o&&(t+="%s",n=n.concat([o]));var a=n.map((function(e){return String(e)}));a.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,a)}("error",e,n)}var g;function b(e){return e.displayName||"Context"}function E(e){if(null==e)return null;if("number"==typeof e.tag&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case o:return"Fragment";case r:return"Portal";case i:return"Profiler";case a:return"StrictMode";case s:return"Suspense";case f:return"SuspenseList"}if("object"===U(e))switch(e.$$typeof){case l:return b(e)+".Consumer";case c:return b(e._context)+".Provider";case u:return function(e,t,n){var r=e.displayName;if(r)return r;var o=t.displayName||t.name||"";return""!==o?n+"("+o+")":n}(e,e.render,"ForwardRef");case p:var t=e.displayName||null;return null!==t?t:E(e.type)||"Memo";case d:var n=e,m=n._payload,v=n._init;try{return E(v(m))}catch(e){return null}}return null}g=Symbol.for("react.module.reference");var k,w,x,S,j,N,O,_=Object.assign,C=0;function D(){}D.__reactDisabledLog=!0;var F,L=h.ReactCurrentDispatcher;function P(e,t,n){if(void 0===F)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);F=r&&r[1]||""}return"\n"+F+e}var A,R=!1,T="function"==typeof WeakMap?WeakMap:Map;function B(e,t){if(!e||R)return"";var n,r=A.get(e);if(void 0!==r)return r;R=!0;var o,a=Error.prepareStackTrace;Error.prepareStackTrace=void 0,o=L.current,L.current=null,function(){if(0===C){k=console.log,w=console.info,x=console.warn,S=console.error,j=console.group,N=console.groupCollapsed,O=console.groupEnd;var e={configurable:!0,enumerable:!0,value:D,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}C++}();try{if(t){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),"object"===("undefined"==typeof Reflect?"undefined":U(Reflect))&&Reflect.construct){try{Reflect.construct(i,[])}catch(e){n=e}Reflect.construct(e,[],i)}else{try{i.call()}catch(e){n=e}e.call(i.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var c=t.stack.split("\n"),l=n.stack.split("\n"),u=c.length-1,s=l.length-1;u>=1&&s>=0&&c[u]!==l[s];)s--;for(;u>=1&&s>=0;u--,s--)if(c[u]!==l[s]){if(1!==u||1!==s)do{if(u--,--s<0||c[u]!==l[s]){var f="\n"+c[u].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),"function"==typeof e&&A.set(e,f),f}}while(u>=1&&s>=0);break}}}finally{R=!1,L.current=o,function(){if(0==--C){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:_({},e,{value:k}),info:_({},e,{value:w}),warn:_({},e,{value:x}),error:_({},e,{value:S}),group:_({},e,{value:j}),groupCollapsed:_({},e,{value:N}),groupEnd:_({},e,{value:O})})}C<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=a}var p=e?e.displayName||e.name:"",d=p?P(p):"";return"function"==typeof e&&A.set(e,d),d}function $(e,t,n){if(null==e)return"";if("function"==typeof e)return B(e,!(!(r=e.prototype)||!r.isReactComponent));var r;if("string"==typeof e)return P(e);switch(e){case s:return P("Suspense");case f:return P("SuspenseList")}if("object"===U(e))switch(e.$$typeof){case u:return B(e.render,!1);case p:return $(e.type,t,n);case d:var o=e,a=o._payload,i=o._init;try{return $(i(a),t,n)}catch(e){}}return""}A=new T;var I=Object.prototype.hasOwnProperty,q={},z=h.ReactDebugCurrentFrame;function W(e){if(e){var t=e._owner,n=$(e.type,e._source,t?t.type:null);z.setExtraStackFrame(n)}else z.setExtraStackFrame(null)}var G=Array.isArray;function M(e){return G(e)}function K(e){return""+e}function V(e){if(function(e){try{return K(e),!1}catch(e){return!0}}(e))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),K(e)}var Y,H,J=h.ReactCurrentOwner,X={key:!0,ref:!0,__self:!0,__source:!0};function Z(e,t,r,o,a){var i,c={},l=null,u=null;for(i in void 0!==r&&(V(r),l=""+r),function(e){if(I.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(V(t.key),l=""+t.key),function(e){if(I.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(u=t.ref,function(e){"string"==typeof e.ref&&J.current}(t)),t)I.call(t,i)&&!X.hasOwnProperty(i)&&(c[i]=t[i]);if(e&&e.defaultProps){var s=e.defaultProps;for(i in s)void 0===c[i]&&(c[i]=s[i])}if(l||u){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;l&&function(e,t){var n=function(){Y||(Y=!0,y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(c,f),u&&function(e,t){var n=function(){H||(H=!0,y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(c,f)}return function(e,t,r,o,a,i,c){var l={$$typeof:n,type:e,key:t,ref:r,props:c,_owner:i,_store:{}};return Object.defineProperty(l._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(l,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(l,"_source",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.freeze&&(Object.freeze(l.props),Object.freeze(l)),l}(e,l,u,a,o,J.current,c)}var Q,ee=h.ReactCurrentOwner,te=h.ReactDebugCurrentFrame;function ne(e){if(e){var t=e._owner,n=$(e.type,e._source,t?t.type:null);te.setExtraStackFrame(n)}else te.setExtraStackFrame(null)}function re(e){return"object"===U(e)&&null!==e&&e.$$typeof===n}function oe(){if(ee.current){var e=E(ee.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}Q=!1;var ae={};function ie(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=oe();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!ae[n]){ae[n]=!0;var r="";e&&e._owner&&e._owner!==ee.current&&(r=" It was passed a child from "+E(e._owner.type)+"."),ne(e),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),ne(null)}}}function ce(e,t){if("object"===U(e))if(M(e))for(var n=0;n<e.length;n++){var r=e[n];re(r)&&ie(r,t)}else if(re(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!==U(e))return null;var t=v&&e[v]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var a,i=o.call(e);!(a=i.next()).done;)re(a.value)&&ie(a.value,t)}}function le(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!==U(n)||n.$$typeof!==u&&n.$$typeof!==p)return;t=n.propTypes}if(t){var r=E(n);!function(e,t,n,r,o){var a=Function.call.bind(I);for(var i in e)if(a(e,i)){var c=void 0;try{if("function"!=typeof e[i]){var l=Error((r||"React class")+": "+n+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+U(e[i])+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw l.name="Invariant Violation",l}c=e[i](t,i,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){c=e}!c||c instanceof Error||(W(o),y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,i,U(c)),W(null)),c instanceof Error&&!(c.message in q)&&(q[c.message]=!0,W(o),y("Failed %s type: %s",n,c.message),W(null))}}(t,e.props,"prop",r,e)}else if(void 0!==n.PropTypes&&!Q){Q=!0,y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",E(n)||"Unknown")}"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}var ue={};function se(e,t,r,v,h,b){var k=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===i||e===a||e===s||e===f||e===m||"object"===U(e)&&null!==e&&(e.$$typeof===d||e.$$typeof===p||e.$$typeof===c||e.$$typeof===l||e.$$typeof===u||e.$$typeof===g||void 0!==e.getModuleId)}(e);if(!k){var w="";(void 0===e||"object"===U(e)&&null!==e&&0===Object.keys(e).length)&&(w+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var x;w+=oe(),null===e?x="null":M(e)?x="array":void 0!==e&&e.$$typeof===n?(x="<"+(E(e.type)||"Unknown")+" />",w=" Did you accidentally export a JSX literal instead of a component?"):x=U(e),y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",x,w)}var S=Z(e,t,r,h,b);if(null==S)return S;if(k){var j=t.children;if(void 0!==j)if(v)if(M(j)){for(var N=0;N<j.length;N++)ce(j[N],e);Object.freeze&&Object.freeze(j)}else y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ce(j,e)}if(I.call(t,"key")){var O=E(e),_=Object.keys(t).filter((function(e){return"key"!==e})),C=_.length>0?"{key: someKey, "+_.join(": ..., ")+": ...}":"{key: someKey}";if(!ue[O+C])y('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',C,O,_.length>0?"{"+_.join(": ..., ")+": ...}":"{}",O),ue[O+C]=!0}return e===o?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){ne(e),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),ne(null);break}}null!==e.ref&&(ne(e),y("Invalid attribute `ref` supplied to `React.Fragment`."),ne(null))}(S):le(S),S}var fe=function(e,t,n){return se(e,t,n,!1)},pe=function(e,t,n){return se(e,t,n,!0)};De.Fragment=o,De.jsx=fe,De.jsxs=pe}()),De}var Le=(Ce||(Ce=1,"production"===process.env.NODE_ENV?Ne.exports=function(){if(je)return Oe;je=1;var t=e,n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,r){var c,l={},u=null,s=null;for(c in void 0!==r&&(u=""+r),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(s=t.ref),t)o.call(t,c)&&!i.hasOwnProperty(c)&&(l[c]=t[c]);if(e&&e.defaultProps)for(c in t=e.defaultProps)void 0===l[c]&&(l[c]=t[c]);return{$$typeof:n,type:e,key:u,ref:s,props:l,_owner:a.current}}return Oe.Fragment=r,Oe.jsx=c,Oe.jsxs=c,Oe}():Ne.exports=Fe()),Ne.exports);function Pe(e,t,n){if("children"===t)e.children=n||e.children;else if("_ref"===t)e._ref=n||e._ref;else if("data"===t)e.data=e.data?I(I({},e.data),n):n;else if("className"===t)e.className=[e.className,n].join(" ").trim();else if("style"===t)e.style=I(I({},e.style),n);else if("function"==typeof n){var r=e[t];e[t]=r?function(){r.apply(void 0,arguments),n.apply(void 0,arguments)}:n}else{if(void 0===n||"object"!==U(n)&&n===e[t])return;if(t in e)throw new Error("Didn’t know how to merge prop '".concat(t,"'. ")+"Only 'className', 'style', and event handlers are supported");e[t]=n}}function Ae(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 1===t.length?t[0]:t.reduce((function(e,t){for(var n in t)Pe(e,n,t[n]);return e}),{})}var Re=["merge"],Te=["_stack"],Be=["_ref","data","children"],$e=["merge"],Ie=["_stack"],qe=["lineNumber","totalLines","indentation","data","annotation"],ze=["merge"],We=["_stack"],Ge=["value","data"],Me=function(e){var t=Ae(e.merge,q(e,Re)),n=t._stack,r=q(t,Te),o=G(n),a=o[0],i=o.slice(1);if(a)return Le.jsx(a,I({_stack:i},r));var c=r._ref;r.data;var l=r.children,u=q(r,Be);return Le.jsx("pre",I(I({},u),{},{ref:c,"data-ch":!0,children:Le.jsx("div",{style:{minWidth:"fit-content"},children:l})}))},Ue=function(e){var t=Ae(e.merge,q(e,$e)),n=t._stack,r=q(t,Ie),o=G(n),a=o[0],i=o.slice(1);if(a){var c=a.Component,l=a.annotation;return Le.jsx(c,I(I({_stack:i},r),{},{annotation:l}))}r.lineNumber,r.totalLines,r.indentation,r.data,r.annotation;var u=q(r,qe);return Le.jsx("div",I({},u))},Ke=function(e){var t=Ae(e.merge,q(e,ze)),n=t._stack,r=q(t,We),o=G(n),a=o[0],i=o.slice(1);if(a){var c=a.Component,l=a.annotation;return Le.jsx(c,I(I({_stack:i},r),{},{annotation:l}))}var u=r.value;r.data;var s=q(r,Ge);return Le.jsx("span",I(I({},s),{},{children:u}))},Ve=function(e){var t=n(null),r=e._ref||t;return Le.jsx(Me,{merge:e,_ref:r})};function Ye(e,t){var n=[t.fromColumn,t.toColumn],r=He(e,n[0]);r=He(r,n[1]+1);var o=[],a=[],i=[];return r.forEach((function(e){e.range[1]<n[0]?o.push(e):e.range[0]>n[1]?i.push(e):a.push(e)})),[].concat(o,[{annotation:t,content:a,range:[a[0].range[0],a[a.length-1].range[1]]}],i)}function He(e,t){var n=e.findIndex((function(e){return e.range[0]<t&&t<=e.range[1]}));if(-1===n)return e;var r=e[n];if(Je(r)){var o,a=[],i=[],c=A(He(r.content,t));try{for(c.s();!(o=c.n()).done;){var l=o.value;l.range[1]<t?a.push(l):i.push(l)}}catch(e){c.e(e)}finally{c.f()}return[].concat(M(e.slice(0,n)),[I(I({},r),{},{content:a,range:[r.range[0],t-1]}),I(I({},r),{},{content:i,range:[t,r.range[1]]})],M(e.slice(n+1)))}return[].concat(M(e.slice(0,n)),[I(I({},r),{},{value:r.value.slice(0,t-r.range[0]),range:[r.range[0],t-1]}),I(I({},r),{},{value:r.value.slice(t-r.range[0]),range:[t,r.range[1]]})],M(e.slice(n+1)))}function Je(e){return void 0!==e.content}function Xe(e){var t=e.content,n=e.handlers,r=e.annotationStack;return t.map((function(e,t){return Je(e)?Le.jsx(Qe,{annotationStack:r,handlers:n,group:e},t):e.style?Le.jsx(Ze,{annotationStack:r,handlers:n,token:e},t):e.value}))}function Ze(e){var t=e.handlers,n=e.token,r=function(e,t){var n=[];return e.forEach((function(e){var r=e.name,o=e.Token,a=e.AnnotatedToken,i=t.filter((function(e){return e.name===r}));a&&i.forEach((function(e){return n.push({Component:a,annotation:e})})),o&&(i.length||n.push({Component:o}),i.forEach((function(e){return n.push({Component:o,annotation:e})})))})),n}(t,e.annotationStack);return Le.jsx(Ke,{merge:{_stack:r,style:n.style,value:n.value}})}function Qe(e){var t,n=e.group,r=e.handlers,o=e.annotationStack,a=n.annotation,i=n.content,c=a.name,l=Xe({content:i,handlers:r,annotationStack:[].concat(M(o),[a])}),u=null===(t=r.find((function(e){return e.name===c})))||void 0===t?void 0:t.Inline;return u?Le.jsx(u,{annotation:a,children:l}):l}function et(e,t){var n=[t.fromLineNumber,t.toLineNumber],r=tt(e,n[0]);r=tt(r,n[1]+1);var o=[],a=[],i=[];return r.forEach((function(e){e.range[1]<n[0]?o.push(e):e.range[0]>n[1]?i.push(e):a.push(e)})),[].concat(o,[{annotation:t,lines:a,range:[a[0].range[0],a[a.length-1].range[1]]}],i)}function tt(e,t){var n=e.findIndex((function(e){return nt(e)&&e.range[0]<t&&t<=e.range[1]}));if(-1===n)return e;var r=e[n],o=tt(r.lines,t),a=[],i=[];return o.forEach((function(e){e.range[1]<t?a.push(e):i.push(e)})),[].concat(M(e.slice(0,n)),[I(I({},r),{},{lines:a,range:[r.range[0],t-1]}),I(I({},r),{},{lines:i,range:[t,r.range[1]]})],M(e.slice(n+1)))}function nt(e){return void 0!==e.annotation}function rt(e){var t=e.linesOrGroups,n=e.handlers,r=e.inlineAnnotations,o=e.annotationStack,a=void 0===o?[]:o;return t.map((function(e){return nt(e)?Le.jsx(at,{group:e,handlers:n,inlineAnnotations:r,annotationStack:a},e.range[0]):Le.jsx(ot,{line:e,handlers:n,inlineAnnotations:r,annotationStack:a},e.lineNumber)}))}function ot(e){var t=e.line,n=e.handlers,r=e.inlineAnnotations,o=e.annotationStack,a=void 0===o?[]:o,i=t.lineNumber,c=t.totalLines,l=t.indentation,u=r.filter((function(e){return e.lineNumber===i})),s=function(e,t){for(var n=e,r=t.length-1;r>=0;r--)n=Ye(n,t[r]);return n}(t.tokens,u),f=function(e,t){var n=[];return e.forEach((function(e){var r=e.name,o=e.Line,a=e.AnnotatedLine,i=t.filter((function(e){return e.name===r}));a&&i.forEach((function(e){n.push({Component:a,annotation:e})})),o&&(i.length||n.push({Component:o}),i.forEach((function(e){n.push({Component:o,annotation:e})})))})),n}(n,a),p=Xe({content:s,handlers:n,annotationStack:a}),d={lineNumber:i,indentation:l,totalLines:c,_stack:f};return Le.jsx(Ue,{merge:d,children:p},i)}function at(e){var t,n=e.group,r=e.handlers,o=e.inlineAnnotations,a=e.annotationStack,i=n.annotation,c=n.lines,l=i.name,u=null===(t=r.find((function(e){return e.name===l})))||void 0===t?void 0:t.Block,s=rt({linesOrGroups:c,handlers:r,inlineAnnotations:o,annotationStack:[].concat(M(a),[i])});return u?Le.jsx(u,{annotation:i,children:s}):s}var it=["code","handlers"],ct=r((function(e,t){var n=e.code,r=e.handlers,o=void 0===r?[]:r,a=q(e,it),i=n.tokens,c=n.themeName,l=n.lang,u=n.annotations;if(!i)throw new Error("Missing tokens in code block. Use the `highlight` function to generate the tokens.");o.filter((function(e){return e.transform})).forEach((function(e){u=u.flatMap((function(t){return e.name!=t.name?t:e.transform(t)||[]}))}));var s=new Set(u.map((function(e){return e.name}))),f=o.filter((function(e){return!e.onlyIfAnnotated||s.has(e.name)})),p=function(e){var t=e.map((function(e){return e.Pre})).filter(Boolean),n=e.map((function(e){return e.PreWithRef})).filter(Boolean);n.length>0&&n.unshift(Ve);return[].concat(M(t),M(n))}(f),d={_stack:p,_ref:t};return Le.jsx(Me,I(I({merge:d,"data-theme":c,"data-lang":l},a),{},{children:Le.jsx(lt,{tokens:i,handlers:f,annotations:u})}))}));function lt(e){var t=e.tokens,n=e.handlers,r=e.annotations,o=function(e){for(var t=[[]],n=e.slice(),r=1;n.length;){var o=n.shift();if("string"==typeof o){var a=G(o.split("\n")),i=a[0],c=a.slice(1);if(i){var l=r;r+=i.length,t[t.length-1].push({value:i,range:[l,r]})}c.length&&(t[t.length-1].push({value:"\n",range:[r,r+1]}),t.push([]),r=1,n.unshift(c.join("\n")))}else{var u=W(o,3),s=u[0],f=u[1],p=u[2],d=void 0===p?{}:p,m=r;r+=s.length,t[t.length-1].push({value:s,style:I({color:f},d),range:[m,r]})}}var v=t.length;return t.map((function(e,t){var n,r,o;return{tokens:e,range:[t+1,t+1],lineNumber:t+1,indentation:(null===(o=null===(r=null===(n=e[0])||void 0===n?void 0:n.value)||void 0===r?void 0:r.replace(/\t/g," ").match(/^\s*/))||void 0===o?void 0:o[0].length)||0,totalLines:v}}))}(t),a=r.filter(ve),i=r.filter(he),c=function(e,t){for(var n=e,r=t.length-1;r>=0;r--)n=et(n,t[r]);return n}(o,a);return rt({linesOrGroups:c,handlers:n,inlineAnnotations:i})}var ut={type:"light",colors:{"list.focusForeground":"#FFFFFF","scrollbar.shadow":"#ffffff00","tab.activeBorder":"#ffffff","widget.shadow":"#ffffff00","activityBar.border":"#D9D7D5","editorGroup.border":"#D9D7D5","editorGroupHeader.tabsBorder":"#D9D7D5","editorWidget.border":"#D9D7D5","editorWidget.resizeBorder":"#D9D7D5","input.border":"#D9D7D5","notificationCenter.border":"#D9D7D5","notifications.border":"#D9D7D5","panel.border":"#D9D7D5","sideBar.border":"#D9D7D5","statusBar.border":"#D9D7D5","tab.border":"#D9D7D5","activityBar.background":"#ECECEC","statusBar.background":"#ECECEC","statusBar.noFolderBackground":"#ECECEC","statusBar.debuggingBackground":"#ECECEC","editorGroupHeader.tabsBackground":"#F5F5F5","editorWidget.background":"#F5F5F5","sideBar.background":"#F5F5F5","sideBarSectionHeader.background":"#F5F5F5","tab.inactiveBackground":"#F5F5F5","activityBarBadge.background":"#282828","activityBar.foreground":"#282828","statusBar.foreground":"#565456","input.placeholderForeground":"#C7C6C5","editorLineNumber.foreground":"#A6A6A6","editorLineNumber.activeForeground":"#282828",foreground:"#282828","panelTitle.activeForeground":"#282828","sideBarTitle.foreground":"#282828","sideBarSectionHeader.foreground":"#282828","panelTitle.inactiveForeground":"#242424","tab.inactiveForeground":"#242424","list.highlightForeground":"#242424","editor.lineHighlightBackground":"#EEF5FE",focusBorder:"#82ADF3","button.background":"#3C93FD","list.activeSelectionBackground":"#3C93FD","list.focusBackground":"#3C93FD","selection.background":"#B3D7FF","list.inactiveSelectionBackground":"#CECECE","terminal.ansiBlack":"#000000","terminal.ansiBrightBlack":"#000000","terminal.ansiRed":"#C41A16","terminal.ansiBrightRed":"#C41A16","terminal.ansiGreen":"#007400","terminal.ansiBrightGreen":"#007400","terminal.ansiYellow":"#643820","terminal.ansiBrightYellow":"#643820","terminal.ansiBlue":"#272AD8","terminal.ansiBrightBlue":"#272AD8","terminal.ansiMagenta":"#AA0D91","terminal.ansiBrightMagenta":"#AA0D91","terminal.ansiCyan":"#3F6E74","terminal.ansiBrightCyan":"#3F6E74"},tokenColors:[{scope:"new.expr entity.name",settings:{foreground:"#713DA9"}},{name:"Comments",scope:["comment","comment storage.type"],settings:{foreground:"#536579",fontStyle:"italic"}},{name:"CSS",scope:["entity.other.attribute-name.pseudo-class.css","entity.other.attribute-name.pseudo-class.scss","entity.other.attribute-name.pseudo-element.css","entity.other.attribute-name.pseudo-element.scss","support.function.calc.css","support.function.calc.scss","support.type.property-name.css","support.type.property-name.scss","support.type.vendored.property-name.css","support.type.vendored.property-name.scss","meta.property-value.css support.constant","meta.property-value.scss support.constant","meta.property-value.css support.constant.property-value","meta.property-value.scss support.constant.property-value","support.function.transform.css","support.function.transform.scss"],settings:{foreground:"#AA0D91"}},{name:"Decorator",scope:["meta.decorator","meta.decorator punctuation.decorator","meta.decorator variable.other.readwrite","meta.decorator meta.function-call entity.name.function"],settings:{foreground:"#643820"}},{name:"Doctype",scope:["meta.tag.sgml.html"],settings:{foreground:"#A6A6A6"}},{name:"Functions",scope:["entity.name.function","support.function"],settings:{foreground:"#7051d4"}},{name:"Keys",scope:["meta.property-list meta.property-name","support.type.property-name","support.type.map.key","entity.name.tag.yaml"],settings:{foreground:"#7051d4"}},{name:"Keywords",scope:["keyword.control","keyword.declaration","keyword.expressions-and-types","keyword.operator.new","keyword.reserved","keyword.statement","storage.type","storage.modifier","constant.language","variable.language.super","variable.language.this","text.html entity.name.tag","meta.tag entity.name.tag","meta.tag support.class","string.regexp keyword.other"],settings:{foreground:"#AD3DA4",fontStyle:"bold"}},{name:"Operators",scope:["storage.type.function.arrow","meta.template.expression punctuation","punctuation.separator.key-value","meta.object-literal.key meta.brace.square","meta.template.expression keyword.operator","keyword.operator.or.regexp","keyword.operator.quantifier","punctuation.definition.group.regexp","punctuation.definition.character-class"],settings:{foreground:"#000000"}},{scope:["meta.tag entity.other.attribute-name","constant.character.escape.backslash"],settings:{foreground:"#816927"}},{name:"Numbers",scope:["constant.numeric","keyword.other.unit","constant.other.color"],settings:{foreground:"#272AD8"}},{name:"Strings",scope:["string","variable.parameter.url.scss","markup.heading.markdown","beginning.punctuation.definition.list.markdown","meta.template.expression meta.embedded punctuation.definition.string.begin","meta.template.expression meta.embedded punctuation.definition.string.end"],settings:{foreground:"#D12F1B"}},{name:"Types",scope:["meta.type","meta.return.type","entity.name.type","support.type.primitive"],settings:{foreground:"#713DA9"}},{scope:["meta.objectliteral variable.other.object","entity.name.type.module","entity.other.inherited-class","variable.scss","variable.other.bracket.shell","entity.name.function.scss"],settings:{foreground:"#3F6E74"}},{scope:["keyword.control.at-rule","meta.import variable.other.readwrite","meta.definition.variable variable.other.readwrite","meta.definition.variable variable.other.constant","meta.template.expression variable.other.readwrite","meta.template.expression variable.other.constant","support.constant.property-value"],settings:{foreground:"#000000"}},{scope:["variable.other.property","variable.other.object.property","support.variable.property"],settings:{foreground:"#713DA9"}}]};var st,ft={host:"h1ur68ey"},pt={host:"hp2fg9q",list:"l1u5q09",button:"b1g5l43",description:"d1x4vxzj",description$item:"d1n1kybx",copy:"c1qxxuld"},dt={host:"h1gfddng"},mt="h1h0n8u6",vt="l12klvp",ht="_4uqa3m",yt="h18n51vi",gt=(st=s.Root,function(n){var r=W(t("undefined"!=typeof localStorage&&(null===localStorage||void 0===localStorage?void 0:localStorage.getItem(n.localStorageKey))||n.defaultValue),2),a=r[0],i=r[1];return o((function(){var e=function(e){e.key===n.localStorageKey&&i(e.newValue||n.defaultValue)};return window.addEventListener("storage",e),function(){window.removeEventListener("storage",e)}}),[n.localStorageKey]),e.createElement(st,{onValueChange:function(e){localStorage.setItem(n.localStorageKey,e),window.dispatchEvent(new StorageEvent("storage",{key:n.localStorageKey,newValue:e}))},value:a},n.children)});function bt(n){var r,a,i,c,l=W(t([]),2),u=l[0],f=l[1];return o((function(){!function(){se(this,void 0,void 0,z().mark((function e(){var t,r;return z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(null===(t=n.codeblocks)||void 0===t?void 0:t.map((function(e){return be(e,ut)})));case 2:r=e.sent,f(r);case 4:case"end":return e.stop()}}),e)})))}()}),[n.codeblocks]),0===u.length?e.createElement("div",null,"Loading"):u?e.createElement(gt,{className:ft.host,style:null===(r=u[0])||void 0===r?void 0:r.style,localStorageKey:"preferredLanguage[".concat(name,"]"),defaultValue:null===(a=u[0])||void 0===a?void 0:a.meta},e.createElement("div",{className:pt.host},e.createElement(Et,{description:n.description}),e.createElement(s.List,{className:pt.list},null===(i=n.codeblocks)||void 0===i?void 0:i.map((function(t,n){var r=t.meta;return e.createElement(s.Trigger,{value:r,key:n,className:pt.button},r)}))),e.createElement("div",{className:pt.copy},null===(c=n.codeblocks)||void 0===c?void 0:c.map((function(t,n){return e.createElement(s.Content,{value:t.meta,asChild:!0,key:n},e.createElement(le,{text:t.value}))})))),null==u?void 0:u.map((function(t,n){return e.createElement(s.Content,{value:t.meta,key:n},e.createElement(ct,{className:dt.host,style:(null==t?void 0:t.style)||(null==t?void 0:t.style),code:t,handlers:[kt,wt]}))}))):e.createElement("div",null,"Loading")}function Et(t){return e.createElement("div",{className:pt.description},e.createElement("div",{className:pt.description$item},t.description))}var kt={name:"Mark",Line:function(t){var n=t.annotation,r=ue(t,["annotation"]);return e.createElement("div",{className:"".concat(mt," ").concat(n&&ht)},e.createElement(Ue,{merge:r,className:vt}))}},wt={name:"LineNumber",Line:function(t){t.annotation;var n=ue(t,["annotation"]),r=n.totalLines.toString().length+1;return e.createElement(e.Fragment,null,e.createElement("span",{style:{minWidth:"".concat(r,"ch")},className:yt},n.lineNumber),e.createElement(Ue,{merge:n}))}},xt={host:"h1de1isv",container:"c174knag"},St={host:"hdr58em",icon:"izmf263"},jt={host:"h1olbpn1",container:"c1dubejs"},Nt={host:"he063xp",$$active:"_lt697q"};function Ot(r){var a=r.examples,i=r.activeExample,c=r.onClick,s=W(t(!1),2),f=s[0],p=s[1],d=W(t(!1),2),m=d[0],v=d[1],h=n(null),y=function(){if(h.current){var e=h.current,t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;p(t>0),v(t<n-r)}};o((function(){return y(),window.addEventListener("resize",y),function(){return window.removeEventListener("resize",y)}}),[]);var g=function(e){if(h.current){var t="left"===e?-200:200;h.current.scrollBy({left:t,behavior:"smooth"})}};return e.createElement("div",{className:xt.host},e.createElement("div",{className:xt.container},f&&e.createElement("button",{onClick:function(){return g("left")},className:St.host},e.createElement(l,{className:St.icon})),e.createElement("div",{ref:h,onScroll:y,className:jt.host},e.createElement("div",{className:jt.container},a.map((function(t){return e.createElement(_t,{key:t.codeblock.title,onClick:function(){return c(t)},example:t,activeExample:i},V(t.codeblock.title||null))})))),m&&e.createElement("button",{onClick:function(){return g("right")},className:St.host},e.createElement(u,{className:St.icon}))))}function _t(t){var n,r,o=t.onClick,a=t.children,i=t.activeExample,c=t.example,l=(null==i?void 0:i.description)&&(null==i?void 0:i.description)===(null==c?void 0:c.description)||(null===(n=null==i?void 0:i.codeblock)||void 0===n?void 0:n.title)&&(null===(r=null==i?void 0:i.codeblock)||void 0===r?void 0:r.title)===c.codeblock.title;return e.createElement("button",{onClick:o,className:"".concat(Nt.host," ").concat(l&&Nt.$$active)},a)}var Ct={host:"hskauww"},Dt={host:"h1nkbfqz"};function Ft(n){var r=n.examples;return e.createElement("div",{className:Ct.host},r.groups.map((function(n,r){var o,a,i=n.description,c=n.examples,l=W(t(null==c?void 0:c[0]),2),u=l[0],s=l[1],f=null===(a=null===(o=null==u?void 0:u.codeblock)||void 0===o?void 0:o.tabs)||void 0===a?void 0:a.map((function(e){return e.code}));return e.createElement("div",{key:r,className:Dt.host},(null==c?void 0:c.length)>1?e.createElement(Ot,{activeExample:u,examples:c,onClick:function(e){s(e)}}):null,e.createElement(bt,{name:String(r),description:(null==i?void 0:i.title)||"",codeblocks:f||[]}))})))}var Lt="h5edgc7";function Pt(t){return e.createElement("div",{className:Lt},t.references.map((function(t,n){return e.createElement("div",{key:n},e.createElement(j,{reference:t}))})))}var At="h12vpet9",Rt="_18e99ku";function Tt(t){return t.references.map((function(n,r){var o;return e.createElement(e.Fragment,null,e.createElement("div",{key:r,className:"".concat(At," ").concat(0===r&&Rt),"data-slug":"".concat(t.urlPrefix,"/").concat(null===(o=n.canonical)||void 0===o?void 0:o.title)},e.createElement(Bt,{reference:n,onLoad:r===t.references.length-1?t.onLoaded:null})))}))}function Bt(t){var n=t.reference,r=t.onLoad;return o((function(){r&&r()}),[]),e.createElement(e.Fragment,null,e.createElement(j,{reference:n}))}export{Pt as Atlas,Tt as AtlasLazy};
|
package/index.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@xyd-js/atlas",
|
|
3
|
+
"version": "0.1.0-xyd.1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
"./package.json": "./package.json",
|
|
10
|
+
"./index.css": "./dist/index.css",
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"clean": "rimraf build",
|
|
17
|
+
"prebuild": "pnpm clean",
|
|
18
|
+
"build": "rollup -c rollup.config.js",
|
|
19
|
+
"storybook": "storybook dev -p 6006",
|
|
20
|
+
"build-storybook": "storybook build"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@code-hike/lighter": "^1.0.0",
|
|
24
|
+
"@emotion/react": "^11.13.5",
|
|
25
|
+
"@linaria/atomic": "^6.2.0",
|
|
26
|
+
"@linaria/core": "^6.2.0",
|
|
27
|
+
"@radix-ui/react-tabs": "^1.1.1",
|
|
28
|
+
"@xyd-js/uniform": "workspace:*",
|
|
29
|
+
"codehike": "^1.0.2",
|
|
30
|
+
"lucide-react": "^0.447.0",
|
|
31
|
+
"react": "^18.3.1"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@babel/preset-env": "^7.26.0",
|
|
35
|
+
"@babel/preset-flow": "^7.25.9",
|
|
36
|
+
"@chromatic-com/storybook": "^3.2.2",
|
|
37
|
+
"@rollup/plugin-alias": "^5.1.1",
|
|
38
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
39
|
+
"@rollup/plugin-commonjs": "^28.0.1",
|
|
40
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
41
|
+
"@rollup/plugin-typescript": "^12.1.1",
|
|
42
|
+
"@storybook/addon-essentials": "^8.4.5",
|
|
43
|
+
"@storybook/addon-interactions": "^8.4.5",
|
|
44
|
+
"@storybook/addon-onboarding": "^8.4.5",
|
|
45
|
+
"@storybook/blocks": "^8.4.5",
|
|
46
|
+
"@storybook/react": "^8.4.5",
|
|
47
|
+
"@storybook/react-vite": "^8.4.5",
|
|
48
|
+
"@storybook/test": "^8.4.5",
|
|
49
|
+
"@wyw-in-js/rollup": "^0.5.5",
|
|
50
|
+
"@wyw-in-js/vite": "^0.5.5",
|
|
51
|
+
"@xyd-js/gql": "workspace:*",
|
|
52
|
+
"autoprefixer": "^10.4.20",
|
|
53
|
+
"postcss": "^8.4.47",
|
|
54
|
+
"prop-types": "^15.8.1",
|
|
55
|
+
"rollup": "^4.27.4",
|
|
56
|
+
"rollup-plugin-css-only": "^4.5.2",
|
|
57
|
+
"rollup-plugin-dts": "^6.1.1",
|
|
58
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
59
|
+
"storybook": "^8.4.5"
|
|
60
|
+
}
|
|
61
|
+
}
|
package/rollup.config.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import resolve from '@rollup/plugin-node-resolve';
|
|
2
|
+
import commonjs from '@rollup/plugin-commonjs';
|
|
3
|
+
import typescript from '@rollup/plugin-typescript';
|
|
4
|
+
import dts from 'rollup-plugin-dts';
|
|
5
|
+
import {terser} from 'rollup-plugin-terser';
|
|
6
|
+
import babel from '@rollup/plugin-babel';
|
|
7
|
+
import css from 'rollup-plugin-css-only';
|
|
8
|
+
import wyw from '@wyw-in-js/rollup';
|
|
9
|
+
import alias from '@rollup/plugin-alias';
|
|
10
|
+
import {fileURLToPath} from 'url';
|
|
11
|
+
import {dirname} from 'path';
|
|
12
|
+
|
|
13
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
14
|
+
const __dirname = dirname(__filename);
|
|
15
|
+
|
|
16
|
+
import {createRequire} from 'module';
|
|
17
|
+
|
|
18
|
+
const require = createRequire(import.meta.url);
|
|
19
|
+
const {dependencies} = require('./package.json', {assert: {type: 'json'}});
|
|
20
|
+
|
|
21
|
+
const external = Object.keys(dependencies);
|
|
22
|
+
|
|
23
|
+
export default [
|
|
24
|
+
{
|
|
25
|
+
input: 'index.ts',
|
|
26
|
+
output: {
|
|
27
|
+
dir: 'dist',
|
|
28
|
+
format: 'esm',
|
|
29
|
+
sourcemap: false,
|
|
30
|
+
},
|
|
31
|
+
plugins: [
|
|
32
|
+
// alias({ TODO: finish?
|
|
33
|
+
// entries: [
|
|
34
|
+
// {find: '@', replacement: resolve(__dirname, 'src')}
|
|
35
|
+
// ]
|
|
36
|
+
// }),
|
|
37
|
+
wyw({
|
|
38
|
+
include: ['**/*.{ts,tsx}'],
|
|
39
|
+
babelOptions: {
|
|
40
|
+
presets: [
|
|
41
|
+
'@babel/preset-typescript',
|
|
42
|
+
'@babel/preset-react'
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
}),
|
|
46
|
+
css({
|
|
47
|
+
output: 'index.css',
|
|
48
|
+
}),
|
|
49
|
+
resolve(),
|
|
50
|
+
commonjs(),
|
|
51
|
+
typescript({
|
|
52
|
+
tsconfig: './tsconfig.json',
|
|
53
|
+
}),
|
|
54
|
+
babel({
|
|
55
|
+
babelHelpers: 'bundled',
|
|
56
|
+
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
57
|
+
presets: [
|
|
58
|
+
'@babel/preset-env',
|
|
59
|
+
'@babel/preset-react'
|
|
60
|
+
],
|
|
61
|
+
}),
|
|
62
|
+
terser(),
|
|
63
|
+
],
|
|
64
|
+
external
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
input: 'index.ts',
|
|
68
|
+
output: {
|
|
69
|
+
dir: 'dist',
|
|
70
|
+
format: 'es',
|
|
71
|
+
},
|
|
72
|
+
plugins: [dts()],
|
|
73
|
+
external
|
|
74
|
+
},
|
|
75
|
+
];
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import {css} from "@linaria/core";
|
|
2
|
+
|
|
3
|
+
export const $title = {
|
|
4
|
+
host: css`
|
|
5
|
+
font-size: 30px;
|
|
6
|
+
font-weight: 400;
|
|
7
|
+
`,
|
|
8
|
+
link: css`
|
|
9
|
+
`,
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const $navbar = {
|
|
13
|
+
host: css`
|
|
14
|
+
`,
|
|
15
|
+
container: css`
|
|
16
|
+
background: linear-gradient(45deg, rgb(247, 247, 248) 0%, rgb(247, 247, 248) 100%);
|
|
17
|
+
|
|
18
|
+
padding: 8px;
|
|
19
|
+
|
|
20
|
+
border: 1px solid var(--atlas-comp-apiref-item-border-color);
|
|
21
|
+
border-radius: 8px;
|
|
22
|
+
|
|
23
|
+
font-size: 13px;
|
|
24
|
+
`,
|
|
25
|
+
label: css`
|
|
26
|
+
color: var(--atlas-comp-apiref-item-navbar-color);
|
|
27
|
+
|
|
28
|
+
margin-right: 4px;
|
|
29
|
+
`,
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const $refItem = {
|
|
33
|
+
host: css`
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
gap: 16px;
|
|
37
|
+
|
|
38
|
+
padding-bottom: 25px;
|
|
39
|
+
`,
|
|
40
|
+
grid: css`
|
|
41
|
+
display: grid;
|
|
42
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
43
|
+
align-items: normal;
|
|
44
|
+
gap: 100px;
|
|
45
|
+
`,
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export const $properties = {
|
|
49
|
+
host: css`
|
|
50
|
+
|
|
51
|
+
`,
|
|
52
|
+
item: css`
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
gap: 25px;
|
|
56
|
+
|
|
57
|
+
margin-bottom: 25px;
|
|
58
|
+
`,
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export const $subtitle = {
|
|
62
|
+
host: css`
|
|
63
|
+
font-size: 15px;
|
|
64
|
+
font-weight: 600;
|
|
65
|
+
`,
|
|
66
|
+
link: css`
|
|
67
|
+
text-decoration: none;
|
|
68
|
+
`,
|
|
69
|
+
}
|
|
70
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import {OpenAPIReferenceContext, Reference, ReferenceCategory} from "@xyd-js/uniform";
|
|
4
|
+
|
|
5
|
+
import {MDXReference} from "@/utils/mdx";
|
|
6
|
+
import {
|
|
7
|
+
ApiRefProperties,
|
|
8
|
+
ApiRefSamples
|
|
9
|
+
} from "@/components/ApiRef";
|
|
10
|
+
import {
|
|
11
|
+
$navbar,
|
|
12
|
+
$refItem,
|
|
13
|
+
$properties,
|
|
14
|
+
$subtitle,
|
|
15
|
+
$title
|
|
16
|
+
} from "@/components/ApiRef/ApiRefItem/ApiRefItem.styles";
|
|
17
|
+
|
|
18
|
+
export interface ApiRefItemProps {
|
|
19
|
+
reference: MDXReference<Reference>
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// TODO: context with current referene?
|
|
23
|
+
export function ApiRefItem({reference}: ApiRefItemProps) {
|
|
24
|
+
let topNavbar;
|
|
25
|
+
|
|
26
|
+
switch (reference?.category?.title) {
|
|
27
|
+
case ReferenceCategory.REST: {
|
|
28
|
+
const ctx = reference.context as MDXReference<OpenAPIReferenceContext>
|
|
29
|
+
|
|
30
|
+
// TODO: finish subitlte from ref
|
|
31
|
+
topNavbar = <$Navbar label={ctx.method.title} subtitle={`${ctx.path.title}`}/>
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return <div className={$refItem.host}>
|
|
37
|
+
<$Title title={reference.title || ""}/>
|
|
38
|
+
|
|
39
|
+
{topNavbar}
|
|
40
|
+
|
|
41
|
+
<div className={$refItem.grid}>
|
|
42
|
+
<$Properties reference={reference}/>
|
|
43
|
+
<ApiRefSamples examples={reference.examples}/>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
</div>
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function $Properties({reference}: ApiRefItemProps) {
|
|
50
|
+
return <div className={$properties.host}>
|
|
51
|
+
{reference?.definitions?.map((definition, i) => <div key={i}>
|
|
52
|
+
{
|
|
53
|
+
definition.properties?.length && <div key={i} className={$properties.item}>
|
|
54
|
+
<$Subtitle title={definition.title.title}/>
|
|
55
|
+
|
|
56
|
+
<ApiRefProperties properties={definition.properties}/>
|
|
57
|
+
</div>
|
|
58
|
+
}
|
|
59
|
+
</div>)}
|
|
60
|
+
</div>
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function $Navbar({label, subtitle}: { label: string, subtitle: string }) {
|
|
64
|
+
return <>
|
|
65
|
+
<div className={$navbar.host}>
|
|
66
|
+
<span className={$navbar.container}>
|
|
67
|
+
<span className={$navbar.label}>
|
|
68
|
+
{label.toUpperCase()}
|
|
69
|
+
</span>
|
|
70
|
+
<span>
|
|
71
|
+
{subtitle}
|
|
72
|
+
</span>
|
|
73
|
+
</span>
|
|
74
|
+
</div>
|
|
75
|
+
</>
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
function $Title({title}: { title: string }) {
|
|
80
|
+
return <>
|
|
81
|
+
<h1 className={$title.host}>
|
|
82
|
+
<a className={$title.link}>
|
|
83
|
+
{title}
|
|
84
|
+
</a>
|
|
85
|
+
</h1>
|
|
86
|
+
</>
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function $Subtitle({title}: { title: string }) {
|
|
90
|
+
return <>
|
|
91
|
+
<h1 className={$subtitle.host}>
|
|
92
|
+
<a className={$subtitle.link}>
|
|
93
|
+
{title}
|
|
94
|
+
</a>
|
|
95
|
+
</h1>
|
|
96
|
+
</>
|
|
97
|
+
}
|