@patternfly/patternfly-doc-core 1.9.1 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/astro.config.mjs +3 -4
  2. package/cli/cli.ts +60 -19
  3. package/cli/convertToMDX.ts +77 -22
  4. package/dist/.assetsignore +2 -0
  5. package/dist/_astro/ClientRouter.astro_astro_type_script_index_0_lang.CtSceO8m.js +1 -0
  6. package/dist/{client/_astro/LiveExample.DZkxbJA_.js → _astro/LiveExample.DjPiO80i.js} +1 -1
  7. package/dist/_astro/client.DN8ES6L5.js +1 -0
  8. package/dist/_routes.json +20 -0
  9. package/dist/_worker.js/_@astrojs-ssr-adapter.mjs +2 -0
  10. package/dist/_worker.js/_astro-internal_middleware.mjs +21 -0
  11. package/dist/_worker.js/_noop-actions.mjs +4 -0
  12. package/dist/{server/chunks/AutoLinkHeader_C2GD0g-K.mjs → _worker.js/chunks/AutoLinkHeader_xh_mBOfs.mjs} +13 -14
  13. package/dist/{server/chunks/Button_BKhHR-ak.mjs → _worker.js/chunks/Button_ByndGYyw.mjs} +83 -13
  14. package/dist/{server/chunks/CSSTable_B8tlH3gz.mjs → _worker.js/chunks/CSSTable_DAbso55e.mjs} +3 -3
  15. package/dist/_worker.js/chunks/PropsTables_BZngJp47.mjs +6628 -0
  16. package/dist/_worker.js/chunks/_@astrojs-ssr-adapter_C9Nk07-M.mjs +1082 -0
  17. package/dist/_worker.js/chunks/angle-down-icon_yt3z9cvI.mjs +3686 -0
  18. package/dist/_worker.js/chunks/astro/server_BpfPtTmt.mjs +7278 -0
  19. package/dist/_worker.js/chunks/astro-designed-error-pages_4xWqsa9_.mjs +928 -0
  20. package/dist/_worker.js/chunks/cloudflare-kv-binding_DMly_2Gl.mjs +107 -0
  21. package/dist/_worker.js/chunks/index_Dc2aKkl4.mjs +57 -0
  22. package/dist/{server/chunks/_@astrojs-ssr-adapter_CbICuCdt.mjs → _worker.js/chunks/index_DlGha6WC.mjs} +1295 -1817
  23. package/dist/_worker.js/chunks/noop-middleware_Ct44Kk5Y.mjs +10 -0
  24. package/dist/_worker.js/chunks/parse_EttCPxrw.mjs +271 -0
  25. package/dist/{server/chunks/path_Cvt6sEOY.mjs → _worker.js/chunks/path_C-ZOwaTP.mjs} +2 -1
  26. package/dist/{server/entry.mjs → _worker.js/index.js} +12 -19
  27. package/dist/_worker.js/manifest_DcBPbZXQ.mjs +100 -0
  28. package/dist/_worker.js/pages/_image.astro.mjs +24 -0
  29. package/dist/_worker.js/pages/_section_/_page_/_---tab_.astro.mjs +1 -0
  30. package/dist/_worker.js/pages/index.astro.mjs +1 -0
  31. package/dist/{server → _worker.js}/pages/props.astro.mjs +3 -2
  32. package/dist/_worker.js/renderers.mjs +484 -0
  33. package/dist/cli/cli.js +46 -12
  34. package/dist/cli/convertToMDX.js +53 -16
  35. package/dist/components/accordion/index.html +60 -0
  36. package/dist/components/accordion/react/index.html +60 -0
  37. package/dist/components/all-components/index.html +47 -0
  38. package/dist/design-foundations/typography/index.html +198 -0
  39. package/dist/{client/design-foundations → design-foundations}/usage-and-behavior/index.html +4 -54
  40. package/dist/get-started/contribute/index.html +94 -0
  41. package/dist/index.html +43 -0
  42. package/package.json +12 -8
  43. package/public/.assetsignore +2 -0
  44. package/src/components/LiveExample.astro +2 -2
  45. package/src/components/LiveExample.tsx +38 -9
  46. package/src/pages/props.ts +2 -2
  47. package/wrangler.jsonc +14 -0
  48. package/dist/client/_astro/ClientRouter.astro_astro_type_script_index_0_lang.Cainpjm5.js +0 -1
  49. package/dist/client/_astro/client.zs76E0tG.js +0 -1
  50. package/dist/client/components/accordion/index.html +0 -110
  51. package/dist/client/components/accordion/react/index.html +0 -110
  52. package/dist/client/components/all-components/index.html +0 -97
  53. package/dist/client/design-foundations/typography/index.html +0 -248
  54. package/dist/client/get-started/contribute/index.html +0 -144
  55. package/dist/client/index.html +0 -43
  56. package/dist/server/_@astrojs-ssr-adapter.mjs +0 -1
  57. package/dist/server/_noop-middleware.mjs +0 -3
  58. package/dist/server/chunks/PropsTables_PVzRHJNB.mjs +0 -1750
  59. package/dist/server/chunks/_astro_assets_DaYumpRZ.mjs +0 -1507
  60. package/dist/server/chunks/angle-down-icon_BO1Ed-9Z.mjs +0 -3288
  61. package/dist/server/chunks/astro/server_Cl9jPh4p.mjs +0 -2859
  62. package/dist/server/chunks/astro-designed-error-pages_BFveJFnQ.mjs +0 -282
  63. package/dist/server/chunks/consts_BmVDRGlB.mjs +0 -32
  64. package/dist/server/chunks/sharp_CbOL3WDk.mjs +0 -88
  65. package/dist/server/manifest_DxJLmW-j.mjs +0 -102
  66. package/dist/server/pages/_image.astro.mjs +0 -132
  67. package/dist/server/renderers.mjs +0 -308
  68. /package/dist/{client/PF-HorizontalLogo-Color.svg → PF-HorizontalLogo-Color.svg} +0 -0
  69. /package/dist/{client/PF-HorizontalLogo-Reverse.svg → PF-HorizontalLogo-Reverse.svg} +0 -0
  70. /package/dist/{client/_astro → _astro}/Button.BQCwQ5pE.js +0 -0
  71. /package/dist/{client/_astro → _astro}/CSSTable.DC79W1Ct.js +0 -0
  72. /package/dist/{client/_astro → _astro}/Content.B4M2qzJY.js +0 -0
  73. /package/dist/{client/_astro → _astro}/DropdownList.cxp03sS4.js +0 -0
  74. /package/dist/{client/_astro → _astro}/LiveExample.CxJsMvEq.css +0 -0
  75. /package/dist/{client/_astro → _astro}/Navigation.kbLxctIo.js +0 -0
  76. /package/dist/{client/_astro → _astro}/PageContext.miTsIqVo.js +0 -0
  77. /package/dist/{client/_astro → _astro}/PageSidebarBody.B0AJe8Hg.js +0 -0
  78. /package/dist/{client/_astro → _astro}/PageToggle.CMZ3C1v1.js +0 -0
  79. /package/dist/{client/_astro → _astro}/RedHatDisplayVF-Italic.CRpusWc8.woff2 +0 -0
  80. /package/dist/{client/_astro → _astro}/RedHatDisplayVF.CYDHf1NI.woff2 +0 -0
  81. /package/dist/{client/_astro → _astro}/RedHatMonoVF-Italic.DGQo2ogW.woff2 +0 -0
  82. /package/dist/{client/_astro → _astro}/RedHatMonoVF.C4fMH6Vz.woff2 +0 -0
  83. /package/dist/{client/_astro → _astro}/RedHatTextVF-Italic.Dkj_WqbA.woff2 +0 -0
  84. /package/dist/{client/_astro → _astro}/RedHatTextVF.wYvZ7prR.woff2 +0 -0
  85. /package/dist/{client/_astro → _astro}/SearchInput.DhHo7yPx.js +0 -0
  86. /package/dist/{client/_astro → _astro}/SectionGallery.3ABpQwE4.js +0 -0
  87. /package/dist/{client/_astro → _astro}/Toolbar.CroDQcyv.js +0 -0
  88. /package/dist/{client/_astro → _astro}/ToolbarContent.UH3ZRlHp.js +0 -0
  89. /package/dist/{client/_astro → _astro}/_page_.Chv_bGyU.css +0 -0
  90. /package/dist/{client/_astro → _astro}/_page_.CtheD08_.css +0 -0
  91. /package/dist/{client/_astro → _astro}/_page_.D1z73Byz.css +0 -0
  92. /package/dist/{client/_astro → _astro}/_page_.DxJDkZPc.css +0 -0
  93. /package/dist/{client/_astro → _astro}/angle-left-icon.teo8GC0v.js +0 -0
  94. /package/dist/{client/_astro → _astro}/bars-icon.Dk6ua1rr.js +0 -0
  95. /package/dist/{client/_astro → _astro}/divider.tlrBPkzg.js +0 -0
  96. /package/dist/{client/_astro → _astro}/fa-solid-900.DguXoeIz.woff2 +0 -0
  97. /package/dist/{client/_astro → _astro}/github-icon.ByC5XEPt.js +0 -0
  98. /package/dist/{client/_astro → _astro}/index.BQFV5hT1.js +0 -0
  99. /package/dist/{client/_astro → _astro}/index.CAChmxYj.js +0 -0
  100. /package/dist/{client/_astro → _astro}/index.DYVB4vTo.js +0 -0
  101. /package/dist/{client/_astro → _astro}/index.eCxJ45ll.js +0 -0
  102. /package/dist/{client/_astro → _astro}/link-icon.BNHnRn73.js +0 -0
  103. /package/dist/{client/_astro → _astro}/page.BTC3Kf3x.js +0 -0
  104. /package/dist/{client/_astro → _astro}/pf-v6-pficon.Dy6oiu9u.woff2 +0 -0
  105. /package/dist/{server/chunks/Accordion_BJka4Qvb.mjs → _worker.js/chunks/Accordion_BNafbla6.mjs} +0 -0
  106. /package/dist/{server/chunks/Accordion_BQIphkaZ.mjs → _worker.js/chunks/Accordion_CZsuyu9E.mjs} +0 -0
  107. /package/dist/{server/chunks/AllComponents_CRhgTsiT.mjs → _worker.js/chunks/AllComponents_BrL9IHSc.mjs} +0 -0
  108. /package/dist/{server/chunks/AllComponents_CjOtwUH6.mjs → _worker.js/chunks/AllComponents_CI7S6uwA.mjs} +0 -0
  109. /package/dist/{server/chunks/_astro_data-layer-content_D4Ib_RjR.mjs → _worker.js/chunks/_astro_assets_vBCb4v6U.mjs} +0 -0
  110. /package/dist/{server/chunks/content-assets_DleWbedO.mjs → _worker.js/chunks/_astro_data-layer-content_CgXoS6Mm.mjs} +0 -0
  111. /package/dist/{server/chunks/content-modules_fX1c2JRG.mjs → _worker.js/chunks/content-assets_XqCgPAV2.mjs} +0 -0
  112. /package/dist/{server/pages/_section_/_---page_.astro.mjs → _worker.js/chunks/content-modules_CKq2j9RQ.mjs} +0 -0
  113. /package/dist/{server/pages/_section_/_page_/_---tab_.astro.mjs → _worker.js/chunks/sharp_CNjr3bU4.mjs} +0 -0
  114. /package/dist/{server/pages/index.astro.mjs → _worker.js/pages/_section_/_---page_.astro.mjs} +0 -0
  115. /package/dist/{client/avatarImg.svg → avatarImg.svg} +0 -0
  116. /package/dist/{client/avatarImgDark.svg → avatarImgDark.svg} +0 -0
  117. /package/dist/{client/content → content}/typography/line-height.png +0 -0
  118. /package/dist/{client/favicon.svg → favicon.svg} +0 -0
package/astro.config.mjs CHANGED
@@ -3,7 +3,7 @@ import { defineConfig } from 'astro/config';
3
3
  import react from '@astrojs/react';
4
4
  import mdx from '@astrojs/mdx';
5
5
 
6
- import node from '@astrojs/node';
6
+ import cloudflare from '@astrojs/cloudflare';
7
7
 
8
8
  // https://astro.build/config
9
9
  export default defineConfig({
@@ -11,6 +11,7 @@ export default defineConfig({
11
11
  vite: {
12
12
  ssr: {
13
13
  noExternal: ["@patternfly/*", "react-dropzone"],
14
+ external: ["node:fs", "node:path"]
14
15
  },
15
16
  server: {
16
17
  fs: {
@@ -19,7 +20,5 @@ export default defineConfig({
19
20
  }
20
21
  },
21
22
 
22
- adapter: node({
23
- mode: 'standalone'
24
- })
23
+ adapter: cloudflare()
25
24
  });
package/cli/cli.ts CHANGED
@@ -7,7 +7,7 @@ import { createCollectionContent } from './createCollectionContent.js'
7
7
  import { setFsRootDir } from './setFsRootDir.js'
8
8
  import { createConfigFile } from './createConfigFile.js'
9
9
  import { updatePackageFile } from './updatePackageFile.js'
10
- import { getConfig } from './getConfig.js'
10
+ import { DocsConfig, getConfig } from './getConfig.js'
11
11
  import { symLinkConfig } from './symLinkConfig.js'
12
12
  import { buildPropsData } from './buildPropsData.js'
13
13
  import { hasFile } from './hasFile.js'
@@ -45,6 +45,60 @@ async function generateProps(program: Command, forceProps: boolean = false) {
45
45
  verbose,
46
46
  )
47
47
  }
48
+ async function buildProject(): Promise<DocsConfig | undefined> {
49
+ updateContent(program)
50
+ await generateProps(program, true)
51
+ const config = await getConfig(`${currentDir}/pf-docs.config.mjs`)
52
+ if (!config) {
53
+ console.error(
54
+ 'No config found, please run the `setup` command or manually create a pf-docs.config.mjs file',
55
+ )
56
+ return config;
57
+ }
58
+
59
+ if (!config.outputDir) {
60
+ console.error(
61
+ "No outputDir found in config file, an output directory must be defined in your config file e.g. 'dist'",
62
+ )
63
+ return config;
64
+ }
65
+
66
+ build({ root: astroRoot, outDir: join(currentDir, config.outputDir) })
67
+
68
+ return config;
69
+ }
70
+
71
+ async function deploy() {
72
+ const { verbose } = program.opts()
73
+
74
+ if (verbose) {
75
+ console.log('Starting Cloudflare deployment...')
76
+ }
77
+
78
+ try {
79
+ // First build the project
80
+ const config = await buildProject();
81
+ if (config) {
82
+ if (verbose) {
83
+ console.log('Build complete, deploying to Cloudflare...')
84
+ }
85
+
86
+ // Deploy using Wrangler
87
+ const { execSync } = await import('child_process')
88
+ const outputPath = join(currentDir, config.outputDir)
89
+
90
+ execSync(`npx wrangler pages deploy ${outputPath}`, {
91
+ stdio: 'inherit',
92
+ cwd: currentDir
93
+ })
94
+
95
+ console.log('Successfully deployed to Cloudflare Pages!')
96
+ }
97
+ } catch (error) {
98
+ console.error('Deployment failed:', error)
99
+ process.exit(1)
100
+ }
101
+ }
48
102
 
49
103
  let astroRoot = ''
50
104
 
@@ -99,24 +153,7 @@ program.command('start').action(async () => {
99
153
  })
100
154
 
101
155
  program.command('build').action(async () => {
102
- updateContent(program)
103
- await generateProps(program, true)
104
- const config = await getConfig(`${currentDir}/pf-docs.config.mjs`)
105
- if (!config) {
106
- console.error(
107
- 'No config found, please run the `setup` command or manually create a pf-docs.config.mjs file',
108
- )
109
- return
110
- }
111
-
112
- if (!config.outputDir) {
113
- console.error(
114
- "No outputDir found in config file, an output directory must be defined in your config file e.g. 'dist'",
115
- )
116
- return
117
- }
118
-
119
- build({ root: astroRoot, outDir: join(currentDir, config.outputDir) })
156
+ await buildProject();
120
157
  })
121
158
 
122
159
  program.command('generate-props').action(async () => {
@@ -140,4 +177,8 @@ program
140
177
  await convertToMDX(globPath)
141
178
  })
142
179
 
180
+ program.command('deploy').action(async () => {
181
+ await deploy()
182
+ })
183
+
143
184
  program.parse(process.argv)
@@ -1,32 +1,87 @@
1
- import { readFile, writeFile } from 'fs/promises'
1
+ import { readFile, writeFile, unlink } from 'fs/promises'
2
2
  import { glob } from 'glob'
3
+ import path from 'path'
3
4
 
4
- export async function convertToMDX(globPath: string) {
5
- const files = await glob(globPath)
5
+ function handleTsExamples(content: string): string {
6
+ //regex link: https://regexr.com/8f0bu
7
+ const ExampleBlockRegex = /```[tj]s file=['"]\.?\/?(\w*)\.(\w*)['"]\s*\n```/g
8
+
9
+ //the first capture group is the example file name without the extension or path, the second is the extension
10
+ const replacementString = `\nimport $1 from "./$1.$2?raw"\n\n<LiveExample src={$1} />`
11
+ return content.replace(ExampleBlockRegex, replacementString)
12
+ }
13
+
14
+ async function handleHTMLExamples(
15
+ content: string,
16
+ fileDir: string,
17
+ ): Promise<string> {
18
+ const htmlCodeFenceRegex = /```html\n([\s\S]*?)\n```/g
19
+ const matches = Array.from(content.matchAll(htmlCodeFenceRegex))
6
20
 
7
- files.forEach(async (file) => {
8
- const fileContent = await readFile(file, 'utf-8')
21
+ const replacements = await Promise.all(
22
+ matches.map(async (match, index) => {
23
+ const htmlContent = match[1]
24
+ const exampleName = `Example${index + 1}`
25
+ const htmlFilePath = path.join(fileDir, `${exampleName}.html`)
9
26
 
10
- //regex link: https://regexr.com/8f0er
11
- const importRegex = /(?<!```no[lL]ive\n)import {?[\w\s,\n]*}?.*\n/g
27
+ await writeFile(htmlFilePath, htmlContent)
12
28
 
13
- //removes all top level imports from the md file that the old docs framework used to determine what imports are needed
14
- const withoutImports = fileContent.replace(importRegex, '')
29
+ return {
30
+ original: match[0],
31
+ replacement: `\nimport ${exampleName} from './${exampleName}.html?raw'\n\n<LiveExample html={${exampleName}} />`,
32
+ }
33
+ }),
34
+ )
15
35
 
16
- //regex link: https://regexr.com/8f0bu
17
- const ExampleBlockRegex =
18
- /```[tj]s file=['"]\.?\/?(\w*)\.(\w*)['"]\s*\n```/g
36
+ return replacements.reduce(
37
+ (result, { original, replacement }) =>
38
+ result.replace(original, replacement),
39
+ content,
40
+ )
41
+ }
19
42
 
20
- //the first capture group is the example file name without the extension or path, the second is the extension
21
- const replacementString = `\nimport $1 from "./$1.$2?raw"\n\n<LiveExample src={$1} />`
22
- const examplesConvertedToMDX = withoutImports.replace(
23
- ExampleBlockRegex,
24
- replacementString,
25
- )
43
+ function removeNoLiveTags(content: string): string {
44
+ return content.replace(/```no[lL]ive/g, '```')
45
+ }
26
46
 
27
- //we want to strip the nolive/noLive tags from codeblocks as that was custom to the old docs framework
28
- const noLiveRemoved = examplesConvertedToMDX.replace(/```no[lL]ive/g, '```')
47
+ function removeExistingImports(content: string): string {
48
+ // Remove imports that don't end in .css
49
+ const importRegex = /^import {?[\w\s,\n]*}? from ['"](?!.*\.css['"])[^'"]*['"]\n/gm
50
+ return content.replace(importRegex, '')
51
+ }
29
52
 
30
- await writeFile(file + 'x', noLiveRemoved)
31
- })
53
+ function convertCommentsToMDX(content: string): string {
54
+ return content.replace(
55
+ /<!--([\s\S]*?)-->/g,
56
+ (_, comment) => `{/*${comment}*/}`,
57
+ )
58
+ }
59
+
60
+ async function processFile(file: string): Promise<void> {
61
+ const fileContent = await readFile(file, 'utf-8')
62
+ const fileDir = path.dirname(file)
63
+
64
+ const transformations = [
65
+ removeNoLiveTags,
66
+ removeExistingImports,
67
+ (content: string) => handleHTMLExamples(content, fileDir),
68
+ handleTsExamples,
69
+ convertCommentsToMDX,
70
+ ]
71
+
72
+ const processedContent = await transformations.reduce(
73
+ async (contentPromise, transform) => {
74
+ const content = await contentPromise
75
+ return transform(content)
76
+ },
77
+ Promise.resolve(fileContent),
78
+ )
79
+
80
+ await writeFile(file + 'x', processedContent)
81
+ await unlink(file)
82
+ }
83
+
84
+ export async function convertToMDX(globPath: string): Promise<void> {
85
+ const files = await glob(globPath)
86
+ await Promise.all(files.map(processFile))
32
87
  }
@@ -0,0 +1,2 @@
1
+ _worker.js
2
+ _routes.json
@@ -0,0 +1 @@
1
+ const b="data-astro-transition-persist",ee=["data-astro-transition","data-astro-transition-fallback"],M=new Set;function U(e){const t=e.src?new URL(e.src,location.href).href:e.textContent;return M.has(t)?!0:(M.add(t),!1)}function te(e){for(const t of e.scripts)!t.hasAttribute("data-astro-rerun")&&U(t)&&(t.dataset.astroExec="")}function ne(e){const t=document.documentElement,n=[...t.attributes].filter(({name:o})=>(t.removeAttribute(o),ee.includes(o)));[...e.documentElement.attributes,...n].forEach(({name:o,value:r})=>t.setAttribute(o,r))}function oe(e){for(const t of Array.from(document.head.children)){const n=se(t,e);n?n.remove():t.remove()}document.head.append(...e.head.children)}function re(e,t){t.replaceWith(e);for(const n of t.querySelectorAll(`[${b}]`)){const o=n.getAttribute(b),r=e.querySelector(`[${b}="${o}"]`);r&&(r.replaceWith(n),r.localName==="astro-island"&&ae(n)&&!ce(n,r)&&(n.setAttribute("ssr",""),n.setAttribute("props",r.getAttribute("props"))))}}const ie=()=>{const e=document.activeElement;if(e?.closest(`[${b}]`)){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement){const t=e.selectionStart,n=e.selectionEnd;return()=>k({activeElement:e,start:t,end:n})}return()=>k({activeElement:e})}else return()=>k({activeElement:null})},k=({activeElement:e,start:t,end:n})=>{e&&(e.focus(),(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&(typeof t=="number"&&(e.selectionStart=t),typeof n=="number"&&(e.selectionEnd=n)))},se=(e,t)=>{const n=e.getAttribute(b),o=n&&t.head.querySelector(`[${b}="${n}"]`);if(o)return o;if(e.matches("link[rel=stylesheet]")){const r=e.getAttribute("href");return t.head.querySelector(`link[rel=stylesheet][href="${r}"]`)}return null},ae=e=>{const t=e.dataset.astroTransitionPersistProps;return t==null||t==="false"},ce=(e,t)=>e.getAttribute("props")===t.getAttribute("props"),le=e=>{te(e),ne(e),oe(e);const t=ie();re(e.body,document.body),t()},ue="astro:before-preparation",fe="astro:after-preparation",de="astro:before-swap",me="astro:after-swap",he=e=>document.dispatchEvent(new Event(e));class q extends Event{from;to;direction;navigationType;sourceElement;info;newDocument;signal;constructor(t,n,o,r,i,u,a,c,f,l){super(t,n),this.from=o,this.to=r,this.direction=i,this.navigationType=u,this.sourceElement=a,this.info=c,this.newDocument=f,this.signal=l,Object.defineProperties(this,{from:{enumerable:!0},to:{enumerable:!0,writable:!0},direction:{enumerable:!0,writable:!0},navigationType:{enumerable:!0},sourceElement:{enumerable:!0},info:{enumerable:!0},newDocument:{enumerable:!0,writable:!0},signal:{enumerable:!0}})}}class pe extends q{formData;loader;constructor(t,n,o,r,i,u,a,c,f,l){super(ue,{cancelable:!0},t,n,o,r,i,u,a,c),this.formData=f,this.loader=l.bind(this,this),Object.defineProperties(this,{formData:{enumerable:!0},loader:{enumerable:!0,writable:!0}})}}class ge extends q{direction;viewTransition;swap;constructor(t,n){super(de,void 0,t.from,t.to,t.direction,t.navigationType,t.sourceElement,t.info,t.newDocument,t.signal),this.direction=t.direction,this.viewTransition=n,this.swap=()=>le(this.newDocument),Object.defineProperties(this,{direction:{enumerable:!0},viewTransition:{enumerable:!0},swap:{enumerable:!0,writable:!0}})}}async function we(e,t,n,o,r,i,u,a,c){const f=new pe(e,t,n,o,r,i,window.document,u,a,c);return document.dispatchEvent(f)&&(await f.loader(),f.defaultPrevented||(he(fe),f.navigationType!=="traverse"&&x({scrollX,scrollY}))),f}function be(e,t){const n=new ge(e,t);return document.dispatchEvent(n),n.swap(),n}const ye=history.pushState.bind(history),A=history.replaceState.bind(history),x=e=>{history.state&&(history.scrollRestoration="manual",A({...history.state,...e},""))},I=!!document.startViewTransition,N=()=>!!document.querySelector('[name="astro-view-transitions-enabled"]'),W=(e,t)=>e.pathname===t.pathname&&e.search===t.search;let m,g,S;const V=e=>document.dispatchEvent(new Event(e)),j=()=>V("astro:page-load"),ve=()=>{let e=document.createElement("div");e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),e.className="astro-route-announcer",document.body.append(e),setTimeout(()=>{let t=document.title||document.querySelector("h1")?.textContent||location.pathname;e.textContent=t},60)},H="data-astro-transition-persist",F="data-astro-transition",P="data-astro-transition-fallback";let C,y=0;history.state?(y=history.state.index,scrollTo({left:history.state.scrollX,top:history.state.scrollY})):N()&&(A({index:y,scrollX,scrollY},""),history.scrollRestoration="manual");async function Te(e,t){try{const n=await fetch(e,t),r=(n.headers.get("content-type")??"").split(";",1)[0].trim();return r!=="text/html"&&r!=="application/xhtml+xml"?null:{html:await n.text(),redirected:n.redirected?n.url:void 0,mediaType:r}}catch{return null}}function K(){const e=document.querySelector('[name="astro-view-transitions-fallback"]');return e?e.getAttribute("content"):"animate"}function Ae(){let e=Promise.resolve(),t=!1;for(const n of document.getElementsByTagName("script"))n.dataset.astroExec===void 0&&n.getAttribute("type")==="module"&&(t=n.getAttribute("src")===null);t&&document.body.insertAdjacentHTML("beforeend",'<script type="module" src="data:application/javascript,"/>');for(const n of document.getElementsByTagName("script")){if(n.dataset.astroExec==="")continue;const o=n.getAttribute("type");if(o&&o!=="module"&&o!=="text/javascript")continue;const r=document.createElement("script");r.innerHTML=n.innerHTML;for(const i of n.attributes){if(i.name==="src"){const u=new Promise(a=>{r.onload=r.onerror=a});e=e.then(()=>u)}r.setAttribute(i.name,i.value)}r.dataset.astroExec="",n.replaceWith(r)}return e}const G=(e,t,n,o,r)=>{const i=W(t,e),u=document.title;document.title=o;let a=!1;if(e.href!==location.href&&!r)if(n.history==="replace"){const c=history.state;A({...n.state,index:c.index,scrollX:c.scrollX,scrollY:c.scrollY},"",e.href)}else ye({...n.state,index:++y,scrollX:0,scrollY:0},"",e.href);if(document.title=u,S=e,i||(scrollTo({left:0,top:0,behavior:"instant"}),a=!0),r)scrollTo(r.scrollX,r.scrollY);else{if(e.hash){history.scrollRestoration="auto";const c=history.state;location.href=e.href,history.state||(A(c,""),i&&window.dispatchEvent(new PopStateEvent("popstate")))}else a||scrollTo({left:0,top:0,behavior:"instant"});history.scrollRestoration="manual"}};function Ee(e){const t=[];for(const n of e.querySelectorAll("head link[rel=stylesheet]"))if(!document.querySelector(`[${H}="${n.getAttribute(H)}"], link[rel=stylesheet][href="${n.getAttribute("href")}"]`)){const o=document.createElement("link");o.setAttribute("rel","preload"),o.setAttribute("as","style"),o.setAttribute("href",n.getAttribute("href")),t.push(new Promise(r=>{["load","error"].forEach(i=>o.addEventListener(i,r)),document.head.append(o)}))}return t}async function _(e,t,n,o,r){async function i(c){function f(p){const h=p.effect;return!h||!(h instanceof KeyframeEffect)||!h.target?!1:window.getComputedStyle(h.target,h.pseudoElement).animationIterationCount==="infinite"}const l=document.getAnimations();document.documentElement.setAttribute(P,c);const d=document.getAnimations().filter(p=>!l.includes(p)&&!f(p));return Promise.allSettled(d.map(p=>p.finished))}if(r==="animate"&&!n.transitionSkipped&&!e.signal.aborted)try{await i("old")}catch{}const u=document.title,a=be(e,n.viewTransition);G(a.to,a.from,t,u,o),V(me),r==="animate"&&(!n.transitionSkipped&&!a.signal.aborted?i("new").finally(()=>n.viewTransitionFinished()):n.viewTransitionFinished())}function Se(){return m?.controller.abort(),m={controller:new AbortController}}async function z(e,t,n,o,r){const i=Se();if(!N()||location.origin!==n.origin){i===m&&(m=void 0),location.href=n.href;return}const u=r?"traverse":o.history==="replace"?"replace":"push";if(u!=="traverse"&&x({scrollX,scrollY}),W(t,n)&&(e!=="back"&&n.hash||e==="back"&&t.hash)){G(n,t,o,document.title,r),i===m&&(m=void 0);return}const a=await we(t,n,e,u,o.sourceElement,o.info,i.controller.signal,o.formData,c);if(a.defaultPrevented||a.signal.aborted){i===m&&(m=void 0),a.signal.aborted||(location.href=n.href);return}async function c(s){const d=s.to.href,p={signal:s.signal};if(s.formData){p.method="POST";const w=s.sourceElement instanceof HTMLFormElement?s.sourceElement:s.sourceElement instanceof HTMLElement&&"form"in s.sourceElement?s.sourceElement.form:s.sourceElement?.closest("form");p.body=t!==void 0&&Reflect.get(HTMLFormElement.prototype,"attributes",w).getNamedItem("enctype")?.value==="application/x-www-form-urlencoded"?new URLSearchParams(s.formData):s.formData}const h=await Te(d,p);if(h===null){s.preventDefault();return}if(h.redirected){const w=new URL(h.redirected);if(w.origin!==s.to.origin){s.preventDefault();return}s.to=w}if(C??=new DOMParser,s.newDocument=C.parseFromString(h.html,h.mediaType),s.newDocument.querySelectorAll("noscript").forEach(w=>w.remove()),!s.newDocument.querySelector('[name="astro-view-transitions-enabled"]')&&!s.formData){s.preventDefault();return}const L=Ee(s.newDocument);L.length&&!s.signal.aborted&&await Promise.all(L)}async function f(){if(g&&g.viewTransition){try{g.viewTransition.skipTransition()}catch{}try{await g.viewTransition.updateCallbackDone}catch{}}return g={transitionSkipped:!1}}const l=await f();if(a.signal.aborted){i===m&&(m=void 0);return}if(document.documentElement.setAttribute(F,a.direction),I)l.viewTransition=document.startViewTransition(async()=>await _(a,o,l,r));else{const s=(async()=>{await Promise.resolve(),await _(a,o,l,r,K())})();l.viewTransition={updateCallbackDone:s,ready:s,finished:new Promise(d=>l.viewTransitionFinished=d),skipTransition:()=>{l.transitionSkipped=!0,document.documentElement.removeAttribute(P)},types:new Set}}l.viewTransition?.updateCallbackDone.finally(async()=>{await Ae(),j(),ve()}),l.viewTransition?.finished.finally(()=>{l.viewTransition=void 0,l===g&&(g=void 0),i===m&&(m=void 0),document.documentElement.removeAttribute(F),document.documentElement.removeAttribute(P)});try{await l.viewTransition?.updateCallbackDone}catch(s){const d=s;console.log("[astro]",d.name,d.message,d.stack)}}async function X(e,t){await z("forward",S,new URL(e,location.href),t??{})}function Re(e){if(!N()&&e.state){location.reload();return}if(e.state===null)return;const t=history.state,n=t.index,o=n>y?"forward":"back";y=n,z(o,S,new URL(location.href),{},t)}const Y=()=>{history.state&&(scrollX!==history.state.scrollX||scrollY!==history.state.scrollY)&&x({scrollX,scrollY})};{if(I||K()!=="none")if(S=new URL(location.href),addEventListener("popstate",Re),addEventListener("load",j),"onscrollend"in window)addEventListener("scrollend",Y);else{let e,t,n,o;const r=()=>{if(o!==history.state?.index){clearInterval(e),e=void 0;return}if(t===scrollY&&n===scrollX){clearInterval(e),e=void 0,Y();return}else t=scrollY,n=scrollX};addEventListener("scroll",()=>{e===void 0&&(o=history.state?.index,t=scrollY,n=scrollX,e=window.setInterval(r,50))},{passive:!0})}for(const e of document.getElementsByTagName("script"))U(e),e.dataset.astroExec=""}const J=new Set,E=new WeakSet;let D,Q,B=!1;function Le(e){B||(B=!0,D??=e?.prefetchAll,Q??=e?.defaultStrategy??"hover",ke(),Pe(),De(),Ie())}function ke(){for(const e of["touchstart","mousedown"])document.body.addEventListener(e,t=>{v(t.target,"tap")&&R(t.target.href,{ignoreSlowConnection:!0})},{passive:!0})}function Pe(){let e;document.body.addEventListener("focusin",o=>{v(o.target,"hover")&&t(o)},{passive:!0}),document.body.addEventListener("focusout",n,{passive:!0}),O(()=>{for(const o of document.getElementsByTagName("a"))E.has(o)||v(o,"hover")&&(E.add(o),o.addEventListener("mouseenter",t,{passive:!0}),o.addEventListener("mouseleave",n,{passive:!0}))});function t(o){const r=o.target.href;e&&clearTimeout(e),e=setTimeout(()=>{R(r)},80)}function n(){e&&(clearTimeout(e),e=0)}}function De(){let e;O(()=>{for(const t of document.getElementsByTagName("a"))E.has(t)||v(t,"viewport")&&(E.add(t),e??=xe(),e.observe(t))})}function xe(){const e=new WeakMap;return new IntersectionObserver((t,n)=>{for(const o of t){const r=o.target,i=e.get(r);o.isIntersecting?(i&&clearTimeout(i),e.set(r,setTimeout(()=>{n.unobserve(r),e.delete(r),R(r.href)},300))):i&&(clearTimeout(i),e.delete(r))}})}function Ie(){O(()=>{for(const e of document.getElementsByTagName("a"))v(e,"load")&&R(e.href)})}function R(e,t){e=e.replace(/#.*/,"");const n=t?.ignoreSlowConnection??!1;if(Ne(e,n))if(J.add(e),document.createElement("link").relList?.supports?.("prefetch")&&t?.with!=="fetch"){const o=document.createElement("link");o.rel="prefetch",o.setAttribute("href",e),document.head.append(o)}else fetch(e,{priority:"low"})}function Ne(e,t){if(!navigator.onLine||!t&&Z())return!1;try{const n=new URL(e,location.href);return location.origin===n.origin&&(location.pathname!==n.pathname||location.search!==n.search)&&!J.has(e)}catch{}return!1}function v(e,t){if(e?.tagName!=="A")return!1;const n=e.dataset.astroPrefetch;return n==="false"?!1:t==="tap"&&(n!=null||D)&&Z()?!0:n==null&&D||n===""?t===Q:n===t}function Z(){if("connection"in navigator){const e=navigator.connection;return e.saveData||/2g/.test(e.effectiveType)}return!1}function O(e){e();let t=!1;document.addEventListener("astro:page-load",()=>{if(!t){t=!0;return}e()})}let T=null;function Oe(){const e=document.querySelector('[name="astro-view-transitions-fallback"]');return e?e.getAttribute("content"):"animate"}function $(e){return e.dataset.astroReload!==void 0}const Me=e=>e.button&&e.button!==0||e.metaKey||e.ctrlKey||e.altKey||e.shiftKey;(I||Oe()!=="none")&&(document.addEventListener("click",e=>{let t=e.target;if(T=Me(e)?t:null,e.composed&&(t=e.composedPath()[0]),t instanceof Element&&(t=t.closest("a, area")),!(t instanceof HTMLAnchorElement)&&!(t instanceof SVGAElement)&&!(t instanceof HTMLAreaElement))return;const n=t instanceof HTMLElement?t.target:t.target.baseVal,o=t instanceof HTMLElement?t.href:t.href.baseVal,r=new URL(o,location.href).origin;$(t)||t.hasAttribute("download")||!t.href||n&&n!=="_self"||r!==location.origin||T||e.defaultPrevented||(e.preventDefault(),X(o,{history:t.dataset.astroHistory==="replace"?"replace":"auto",sourceElement:t}))}),document.addEventListener("submit",e=>{let t=e.target;const n=e.submitter,o=n&&n===T;if(T=null,t.tagName!=="FORM"||e.defaultPrevented||$(t)||o)return;const r=t,i=new FormData(r,n),u=typeof r.action=="string"?r.action:r.getAttribute("action"),a=typeof r.method=="string"?r.method:r.getAttribute("method");let c=n?.getAttribute("formaction")??u??location.pathname;const f=n?.getAttribute("formmethod")??a??"get";if(f==="dialog"||location.origin!==new URL(c,location.href).origin)return;const l={sourceElement:n??r};if(f==="get"){const s=new URLSearchParams(i),d=new URL(c);d.search=s.toString(),c=d.toString()}else l.formData=i;e.preventDefault(),X(c,l)}),Le({prefetchAll:!0}));
@@ -256,4 +256,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
256
256
  monaco.config({ paths: { vs: '...' } })
257
257
 
258
258
  For more please check the link https://github.com/suren-atoyan/monaco-loader#config
259
- `},oo=SG2(OG2)(LH),PG2={config:BG2},HG2=function(){for(var t=arguments.length,o=new Array(t),c=0;c<t;c++)o[c]=arguments[c];return function(l){return o.reduceRight(function(r,i){return i(r)},l)}};function BH(a,t){return Object.keys(t).forEach(function(o){t[o]instanceof Object&&a[o]&&Object.assign(t[o],BH(a[o],t[o]))}),Q4(Q4({},a),t)}var EG2={type:"cancelation",msg:"operation is manually canceled"};function ka(a){var t=!1,o=new Promise(function(c,l){a.then(function(r){return t?l(EG2):c(r)}),a.catch(l)});return o.cancel=function(){return t=!0},o}var VG2=wG2.create({config:yG2,isInitialized:!1,resolve:null,reject:null,monaco:null}),MH=lG2(VG2,2),p6=MH[0],sa=MH[1];function TG2(a){var t=PG2.config(a),o=t.monaco,c=cG2(t,["monaco"]);sa(function(l){return{config:BH(l.config,c),monaco:o}})}function AG2(){var a=p6(function(t){var o=t.monaco,c=t.isInitialized,l=t.resolve;return{monaco:o,isInitialized:c,resolve:l}});if(!a.isInitialized){if(sa({isInitialized:!0}),a.monaco)return a.resolve(a.monaco),ka(wa);if(window.monaco&&window.monaco.editor)return OH(window.monaco),a.resolve(window.monaco),ka(wa);HG2(FG2,WG2)(NG2)}return ka(wa)}function FG2(a){return document.body.appendChild(a)}function jG2(a){var t=document.createElement("script");return a&&(t.src=a),t}function WG2(a){var t=p6(function(c){var l=c.config,r=c.reject;return{config:l,reject:r}}),o=jG2("".concat(t.config.paths.vs,"/loader.js"));return o.onload=function(){return a()},o.onerror=t.reject,o}function NG2(){var a=p6(function(o){var c=o.config,l=o.resolve,r=o.reject;return{config:c,resolve:l,reject:r}}),t=window.require;t.config(a.config),t(["vs/editor/editor.main"],function(o){OH(o),a.resolve(o)},function(o){a.reject(o)})}function OH(a){p6().monaco||sa({monaco:a})}function DG2(){return p6(function(a){var t=a.monaco;return t})}var wa=new Promise(function(a,t){return sa({resolve:a,reject:t})}),PH={config:TG2,init:AG2,__getMonacoInstance:DG2},RG2={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},ya=RG2,GG2={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},ZG2=GG2;function UG2({children:a}){return i2.createElement("div",{style:ZG2.container},a)}var qG2=UG2,XG2=qG2;function $G2({width:a,height:t,isEditorReady:o,loading:c,_ref:l,className:r,wrapperProps:i}){return i2.createElement("section",{style:{...ya.wrapper,width:a,height:t},...i},!o&&i2.createElement(XG2,null,c),i2.createElement("div",{ref:l,style:{...ya.fullWidth,...!o&&ya.hide},className:r}))}var KG2=$G2,HH=m.memo(KG2);function YG2(a){m.useEffect(a,[])}var EH=YG2;function JG2(a,t,o=!0){let c=m.useRef(!0);m.useEffect(c.current||!o?()=>{c.current=!1}:a,t)}var r2=JG2;function De(){}function ie(a,t,o,c){return QG2(a,c)||eZ2(a,t,o,c)}function QG2(a,t){return a.editor.getModel(VH(a,t))}function eZ2(a,t,o,c){return a.editor.createModel(t,o,c?VH(a,c):void 0)}function VH(a,t){return a.Uri.parse(t)}function aZ2({original:a,modified:t,language:o,originalLanguage:c,modifiedLanguage:l,originalModelPath:r,modifiedModelPath:i,keepCurrentOriginalModel:s=!1,keepCurrentModifiedModel:p=!1,theme:v="light",loading:d="Loading...",options:f={},height:g="100%",width:h="100%",className:u,wrapperProps:x={},beforeMount:C=De,onMount:z=De}){let[w,I]=m.useState(!1),[k,S]=m.useState(!0),T=m.useRef(null),P=m.useRef(null),V=m.useRef(null),L=m.useRef(z),M=m.useRef(C),y=m.useRef(!1);EH(()=>{let E=PH.init();return E.then(F=>(P.current=F)&&S(!1)).catch(F=>F?.type!=="cancelation"&&console.error("Monaco initialization: error:",F)),()=>T.current?O():E.cancel()}),r2(()=>{if(T.current&&P.current){let E=T.current.getOriginalEditor(),F=ie(P.current,a||"",c||o||"text",r||"");F!==E.getModel()&&E.setModel(F)}},[r],w),r2(()=>{if(T.current&&P.current){let E=T.current.getModifiedEditor(),F=ie(P.current,t||"",l||o||"text",i||"");F!==E.getModel()&&E.setModel(F)}},[i],w),r2(()=>{let E=T.current.getModifiedEditor();E.getOption(P.current.editor.EditorOption.readOnly)?E.setValue(t||""):t!==E.getValue()&&(E.executeEdits("",[{range:E.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),E.pushUndoStop())},[t],w),r2(()=>{T.current?.getModel()?.original.setValue(a||"")},[a],w),r2(()=>{let{original:E,modified:F}=T.current.getModel();P.current.editor.setModelLanguage(E,c||o||"text"),P.current.editor.setModelLanguage(F,l||o||"text")},[o,c,l],w),r2(()=>{P.current?.editor.setTheme(v)},[v],w),r2(()=>{T.current?.updateOptions(f)},[f],w);let B=m.useCallback(()=>{if(!P.current)return;M.current(P.current);let E=ie(P.current,a||"",c||o||"text",r||""),F=ie(P.current,t||"",l||o||"text",i||"");T.current?.setModel({original:E,modified:F})},[o,t,l,a,c,r,i]),A=m.useCallback(()=>{!y.current&&V.current&&(T.current=P.current.editor.createDiffEditor(V.current,{automaticLayout:!0,...f}),B(),P.current?.editor.setTheme(v),I(!0),y.current=!0)},[f,v,B]);m.useEffect(()=>{w&&L.current(T.current,P.current)},[w]),m.useEffect(()=>{!k&&!w&&A()},[k,w,A]);function O(){let E=T.current?.getModel();s||E?.original?.dispose(),p||E?.modified?.dispose(),T.current?.dispose()}return i2.createElement(HH,{width:h,height:g,isEditorReady:w,loading:d,_ref:V,className:u,wrapperProps:x})}var tZ2=aZ2;m.memo(tZ2);function oZ2(a){let t=m.useRef();return m.useEffect(()=>{t.current=a},[a]),t.current}var nZ2=oZ2,z6=new Map;function cZ2({defaultValue:a,defaultLanguage:t,defaultPath:o,value:c,language:l,path:r,theme:i="light",line:s,loading:p="Loading...",options:v={},overrideServices:d={},saveViewState:f=!0,keepCurrentModel:g=!1,width:h="100%",height:u="100%",className:x,wrapperProps:C={},beforeMount:z=De,onMount:w=De,onChange:I,onValidate:k=De}){let[S,T]=m.useState(!1),[P,V]=m.useState(!0),L=m.useRef(null),M=m.useRef(null),y=m.useRef(null),B=m.useRef(w),A=m.useRef(z),O=m.useRef(),E=m.useRef(c),F=nZ2(r),X=m.useRef(!1),N=m.useRef(!1);EH(()=>{let q=PH.init();return q.then($=>(L.current=$)&&V(!1)).catch($=>$?.type!=="cancelation"&&console.error("Monaco initialization: error:",$)),()=>M.current?U():q.cancel()}),r2(()=>{let q=ie(L.current,a||c||"",t||l||"",r||o||"");q!==M.current?.getModel()&&(f&&z6.set(F,M.current?.saveViewState()),M.current?.setModel(q),f&&M.current?.restoreViewState(z6.get(r)))},[r],S),r2(()=>{M.current?.updateOptions(v)},[v],S),r2(()=>{!M.current||c===void 0||(M.current.getOption(L.current.editor.EditorOption.readOnly)?M.current.setValue(c):c!==M.current.getValue()&&(N.current=!0,M.current.executeEdits("",[{range:M.current.getModel().getFullModelRange(),text:c,forceMoveMarkers:!0}]),M.current.pushUndoStop(),N.current=!1))},[c],S),r2(()=>{let q=M.current?.getModel();q&&l&&L.current?.editor.setModelLanguage(q,l)},[l],S),r2(()=>{s!==void 0&&M.current?.revealLine(s)},[s],S),r2(()=>{L.current?.editor.setTheme(i)},[i],S);let R=m.useCallback(()=>{if(!(!y.current||!L.current)&&!X.current){A.current(L.current);let q=r||o,$=ie(L.current,c||a||"",t||l||"",q||"");M.current=L.current?.editor.create(y.current,{model:$,automaticLayout:!0,...v},d),f&&M.current.restoreViewState(z6.get(q)),L.current.editor.setTheme(i),s!==void 0&&M.current.revealLine(s),T(!0),X.current=!0}},[a,t,o,c,l,r,v,d,f,i,s]);m.useEffect(()=>{S&&B.current(M.current,L.current)},[S]),m.useEffect(()=>{!P&&!S&&R()},[P,S,R]),E.current=c,m.useEffect(()=>{S&&I&&(O.current?.dispose(),O.current=M.current?.onDidChangeModelContent(q=>{N.current||I(M.current.getValue(),q)}))},[S,I]),m.useEffect(()=>{if(S){let q=L.current.editor.onDidChangeMarkers($=>{let J=M.current.getModel()?.uri;if(J&&$.find(a1=>a1.path===J.path)){let a1=L.current.editor.getModelMarkers({resource:J});k?.(a1)}});return()=>{q?.dispose()}}return()=>{}},[S,k]);function U(){O.current?.dispose(),g?f&&z6.set(r,M.current.saveViewState()):M.current.getModel()?.dispose(),M.current.dispose()}return i2.createElement(HH,{width:h,height:u,isEditorReady:S,loading:p,_ref:y,className:x,wrapperProps:C})}var lZ2=cZ2,rZ2=m.memo(lZ2),iZ2=rZ2;const TH=m.createContext(null),W2=a=>{var{icon:t,className:o,"aria-label":c,onClick:l=()=>{},isVisible:r=!0,tooltipProps:i={}}=a,s=b(a,["icon","className","aria-label","onClick","isVisible","tooltipProps"]);const p=m.useContext(TH),v=d=>{l(p.code,d)};return r?n.jsx(G1,Object.assign({},i,{children:n.jsx(Y,Object.assign({className:o,onClick:v,variant:"plain","aria-label":c},s,{icon:t}))})):null};W2.displayName="CodeEditorControl";var o2;(function(a){a.abap="abap",a.aes="aes",a.apex="apex",a.azcli="azcli",a.bat="bat",a.bicep="bicep",a.c="c",a.cameligo="cameligo",a.clojure="clojure",a.coffeescript="coffeescript",a.cpp="cpp",a.csharp="csharp",a.csp="csp",a.css="css",a.dart="dart",a.dockerfile="dockerfile",a.ecl="ecl",a.elixir="elixir",a.fsharp="fsharp",a.go="go",a.graphql="graphql",a.handlebars="handlebars",a.hcl="hcl",a.html="html",a.ini="ini",a.java="java",a.javascript="javascript",a.json="json",a.julia="julia",a.kotlin="kotlin",a.less="less",a.lexon="lexon",a.liquid="liquid",a.lua="lua",a.m3="m3",a.markdown="markdown",a.mips="mips",a.msdax="msdax",a.mysql="mysql",a["objective-c"]="objective-c",a.pascal="pascal",a.pascaligo="pascaligo",a.perl="perl",a.pgsql="pgsql",a.php="php",a.plaintext="plaintext",a.postiats="postiats",a.powerquery="powerquery",a.powershell="powershell",a.pug="pug",a.python="python",a.r="r",a.razor="razor",a.redis="redis",a.redshift="redshift",a.restructuredtext="restructuredtext",a.ruby="ruby",a.rust="rust",a.sb="sb",a.scala="scala",a.scheme="scheme",a.scss="scss",a.shell="shell",a.sol="sol",a.sql="sql",a.st="st",a.swift="swift",a.systemverilog="systemverilog",a.tcl="tcl",a.twig="twig",a.typescript="typescript",a.vb="vb",a.verilog="verilog",a.xml="xml",a.yaml="yaml"})(o2||(o2={}));const sZ2=a=>{switch(a){case o2.shell:return"sh";case o2.ruby:return"rb";case o2.perl:return"pl";case o2.python:return"py";case o2.mysql:return"sql";case o2.javascript:return"js";case o2.typescript:return"ts";case o2.markdown:return"md";case o2.plaintext:return"txt";default:return a.toString()}},_Z2=(a,t)=>{const o=document.createElement("a");o.href=URL.createObjectURL(new Blob([a],{type:"text"})),o.download=t,o.click()},AH=({className:a="",code:t="",copyButtonAriaLabel:o="Copy code to clipboard",copyButtonSuccessTooltipText:c="Content added to clipboard",copyButtonToolTipText:l="Copy to clipboard",customControls:r=null,downloadButtonAriaLabel:i="Download code",downloadButtonToolTipText:s="Download",downloadFileName:p=Date.now().toString(),editorProps:v,emptyState:d="",emptyStateBody:f="Drag and drop a file or upload one.",emptyStateButton:g="Browse",emptyStateLink:h="Start from scratch",emptyStateTitle:u="Start editing",headerMainContent:x="",height:C,isCopyEnabled:z=!1,isDarkTheme:w=!1,isDownloadEnabled:I=!1,isFullHeight:k=!1,isHeaderPlain:S=!1,isLanguageLabelVisible:T=!1,isLineNumbersVisible:P=!0,isMinimapVisible:V=!1,isReadOnly:L=!1,isUploadEnabled:M=!1,language:y=o2.plaintext,loading:B="",onChange:A=()=>{},onCodeChange:O=()=>{},onDownload:E=_Z2,onEditorDidMount:F=()=>{},options:X={},overrideServices:N={},shortcutsPopoverButtonText:R="View Shortcuts",shortcutsPopoverProps:U={bodyContent:"","aria-label":"Keyboard Shortcuts"},showEditor:q=!0,toolTipCopyExitDelay:$=1600,toolTipDelay:J=300,toolTipMaxWidth:a1="100px",toolTipPosition:o1="top",uploadButtonAriaLabel:s1="Upload code",uploadButtonToolTipText:I1="Upload",width:m1=""})=>{const[u1,k1]=m.useState(t),[w1,v1]=m.useState(!1),[C1,x1]=m.useState(!0),[b1,B1]=m.useState(!1),i1=m.useRef(null),e1=m.useRef(null),G=m.useRef(null),W=m.useRef(()=>{}),H=()=>{var _1,y1,W1;const d2=(_1=i1.current)===null||_1===void 0?void 0:_1.getContentHeight(),Ee=(y1=i1.current)===null||y1===void 0?void 0:y1.getLayoutInfo();(W1=i1.current)===null||W1===void 0||W1.layout({width:Ee.width,height:d2})},Z=(_1,y1)=>{C==="sizeToFit"&&H(),A&&A(_1,y1),k1(_1),O(_1)},D=()=>{i1.current&&(i1.current.layout({width:0,height:0}),i1.current.layout())},j=_1=>{var y1;e1.current===document.activeElement&&(_1.key==="ArrowDown"||_1.key===" ")&&((y1=i1.current)===null||y1===void 0||y1.focus(),_1.preventDefault())};m.useEffect(()=>k1(t),[t]),m.useEffect(()=>(document.addEventListener("keydown",j),W.current=G2(G.current,D,!0),D(),()=>{document.removeEventListener("keydown",j),W.current()}),[]);const K=(_1,y1)=>{_1.addCommand(y1.KeyMod.Shift|y1.KeyCode.Tab,()=>e1.current.focus()),Array.from(document.getElementsByClassName("monaco-editor")).forEach(W1=>W1.removeAttribute("role")),F(_1,y1),i1.current=_1,C==="sizeToFit"&&H()},n1=_1=>{k1(_1),O(_1)},p1=()=>v1(!0),z1=()=>v1(!1),Z1=_1=>new Promise((y1,W1)=>{const d2=new FileReader;d2.onload=()=>y1(d2.result),d2.onerror=()=>W1(d2.error),d2.readAsText(_1)}),K1=_1=>{if(_1.length>0){const y1=_1[0];n1(""),p1(),Z1(y1).then(W1=>{z1(),x1(!1),n1(W1)}).catch(W1=>{console.error("error",W1),z1(),n1("")})}},k2=_1=>{_1.length>0&&console.error("There was an error accepting that dropped file")},C2=()=>{navigator.clipboard.writeText(u1),B1(!0)},l2=Object.assign({scrollBeyondLastLine:C!=="sizeToFit",readOnly:L,cursorStyle:"line",lineNumbers:P?"on":"off",tabIndex:-1,minimap:{enabled:V}},X),P2={position:o1,exitDelay:J,entryDelay:J,maxWidth:a1,trigger:"mouseenter focus"},He=(z||I)&&(!C1||!!u1)||M||r||x||!!U.bodyContent;return n.jsx(ea,{multiple:!1,onDropAccepted:K1,onDropRejected:k2,children:({getRootProps:_1,getInputProps:y1,isDragActive:W1,open:d2})=>{const Ee=n.jsx("input",Object.assign({},y1(),{hidden:!0})),FH=d||(M?n.jsxs(T6,{variant:ue.sm,titleText:u,icon:Ne,headingLevel:"h4",children:[n.jsx(Ft,{children:f}),!L&&n.jsxs(A6,{children:[n.jsx(We,{children:n.jsx(Y,{variant:"primary",onClick:d2,children:g})}),n.jsx(We,{children:n.jsx(Y,{variant:"link",onClick:()=>x1(!1),children:h})})]})]}):n.jsx(T6,{variant:ue.sm,titleText:u,icon:Ne,headingLevel:"h4",children:!L&&n.jsx(A6,{children:n.jsx(We,{children:n.jsx(Y,{variant:"primary",onClick:()=>x1(!1),children:h})})})})),jH=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:_(T1.codeEditorControls),children:n.jsxs(TH.Provider,{value:{code:u1},children:[z&&(!C1||!!u1)&&n.jsx(W2,{icon:n.jsx(K6,{}),"aria-label":o,tooltipProps:Object.assign(Object.assign({},P2),{"aria-live":"polite",content:n.jsx("div",{children:b1?c:l}),exitDelay:b1?$:J,onTooltipHidden:()=>B1(!1)}),onClick:C2}),M&&n.jsx(W2,{icon:n.jsx(lO,{}),"aria-label":s1,tooltipProps:Object.assign({content:n.jsx("div",{children:I1})},P2),onClick:d2}),I&&(!C1||!!u1)&&n.jsx(W2,{icon:n.jsx(ks,{}),"aria-label":i,tooltipProps:Object.assign({content:n.jsx("div",{children:s})},P2),onClick:()=>{E(u1,`${p}.${sZ2(y)}`)}}),r&&r]})}),x&&n.jsx("div",{className:_(T1.codeEditorHeaderMain),children:x}),!!U.bodyContent&&n.jsx("div",{className:`${T1.codeEditor}__keyboard-shortcuts`,children:n.jsx(tt,Object.assign({},U,{children:n.jsx(Y,{variant:H1.link,icon:n.jsx(Lo,{}),children:R})}))})]}),C4=n.jsxs("div",{className:_(T1.codeEditorHeader,S&&T1.modifiers.plain),children:[He&&n.jsx("div",{className:_(T1.codeEditorHeaderContent),children:jH}),T&&n.jsxs("div",{className:_(T1.codeEditorTab),children:[n.jsx("span",{className:_(T1.codeEditorTabIcon),children:n.jsx(Ne,{})}),n.jsx("span",{className:_(T1.codeEditorTabText),children:y.toUpperCase()})]})]}),x4=n.jsx("div",{className:_(T1.codeEditorCode),ref:e1,tabIndex:0,dir:"ltr",children:n.jsx(iZ2,Object.assign({height:C==="100%"?void 0:C,width:m1,language:y,value:u1,options:l2,overrideServices:N,onChange:Z,onMount:K,loading:B,theme:w?"vs-dark":"vs-light"},v))});return n.jsx("div",{className:_(T1.codeEditor,L&&T1.modifiers.readOnly,(C==="100%"?!0:k)&&T1.modifiers.fullHeight,a),ref:G,children:(M||d)&&!u1?n.jsxs("div",Object.assign({},_1({onClick:WH=>WH.stopPropagation()}),{className:_(T1.codeEditorContainer,w1&&V2.modifiers.loading),children:[C4,n.jsx("div",{className:_(T1.codeEditorMain,W1&&T1.modifiers.dragHover),children:(C1||d)&&!u1?n.jsxs("div",{className:_(T1.codeEditorUpload),children:[Ee,FH]}):n.jsxs(n.Fragment,{children:[Ee,x4]})})]})):n.jsxs(n.Fragment,{children:[C4,q&&n.jsxs("div",{className:_(T1.codeEditorMain),children:[Ee,x4]})]})})}})};AH.displayName="CodeEditor";const dZ2=a=>{navigator.clipboard.writeText(a)},no=window,ne=(a,t,o,c)=>{c||=0,no?.gtag&&no?.gtag("event",a,{event_category:t,event_label:o,...c>=0&&{value:c}})};function vZ2(a){return a==="js"?o2.javascript:a==="ts"?o2.typescript:a}const mZ2=({fullscreenLink:a,codeBoxParams:t,lang:o,isFullscreen:c,originalCode:l,code:r,setCode:i,exampleTitle:s})=>{const[p,v]=i2.useState(!1),[d,f]=i2.useState(!1),g="Copy code to clipboard",h=`Toggle ${o.toUpperCase()} code`,u="Open example in CodeSandbox",x="Open example in new window",C="Convert example from Typescript to JavaScript",z="Undo all changes",w=`Copy ${s} example code to clipboard`,I=`Toggle ${o.toUpperCase()} code in ${s} example`,k=`Open ${s} example in CodeSandbox`,S=`Open ${s} example in new window`,T=`Convert ${s} example from Typescript to JavaScript`,P=`Undo all changes to ${s}`,V={className:"ws-code-editor-control"},L={exitDelay:300,maxWidth:"var(--ws-code-editor--tooltip--MaxWidth)"},M=()=>{dZ2(r),f(!0)},y=n.jsxs(i2.Fragment,{children:[n.jsx(W2,{icon:n.jsxs(i2.Fragment,{children:[n.jsx(Ne,{})," "+o.toUpperCase()]}),onClick:()=>{v(!p),ne("code_editor_control_click","click_event","TOGGLE_CODE",p?0:1)},tooltipProps:{content:h,...L},"aria-label":I,"aria-expanded":p,...V}),n.jsx(G1,{content:n.jsx("div",{children:d?"Code copied":g}),maxWidth:V?.maxWidth,exitDelay:d?300:1600,onTooltipHidden:()=>f(!1),children:n.jsx(Y,{onClick:()=>{M(),ne("code_editor_control_click","click_event","COPY_CODE")},variant:"plain","aria-label":w,className:V.className,children:n.jsx(K6,{})})}),t&&n.jsxs(Ja,{"aria-label":`${k} form`,action:"https://codesandbox.io/api/v1/sandboxes/define",method:"POST",target:"_blank",style:{display:"inline-block"},children:[n.jsx(G1,{content:u,maxWidth:V.maxWidth,children:n.jsx(Y,{"aria-label":k,variant:"plain",type:"submit",onClick:()=>{ne("code_editor_control_click","click_event","CODESANDBOX_LINK")},className:V.className,children:n.jsx(pi,{})})}),n.jsx("input",{type:"hidden",name:"parameters",value:t})]}),a&&n.jsx(W2,{component:"a",icon:n.jsx(Mo,{}),href:a,target:"_blank",rel:"noopener noreferrer","aria-label":S,tooltipProps:{content:x,...L},onClick:()=>{ne("code_editor_control_click","click_event","FULLSCREEN_LINK")},...V}),p&&o==="ts"&&n.jsx(W2,{icon:n.jsxs(i2.Fragment,{children:["TS ",n.jsx(o4,{})," JS"]}),"aria-label":T,tooltipProps:{content:C,...L},onClick:()=>{i(ho.convertToJSX(r).code),ne("code_editor_control_click","click_event","TS_TO_JS")},...V}),r!==l&&n.jsx(W2,{icon:n.jsx(Kk,{}),"aria-label":P,tooltipProps:{content:z,...L},onClick:()=>{i(l),ne("code_editor_control_click","click_event","RESET_CODE")},...V})]}),B=(A,O)=>{O.languages.typescript.typescriptDefaults.setCompilerOptions({jsx:!0,...O.languages.typescript.typescriptDefaults.getCompilerOptions()}),O.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0,noSuggestionDiagnostics:!0,onlyVisible:!0})};return n.jsx(AH,{customControls:y,showEditor:p,language:vZ2(o),height:"400px",code:r,onChange:A=>i(A),onEditorDidMount:B,isReadOnly:c,className:`${p?"ws-example-code-expanded ":""}ws-code-editor`,isHeaderPlain:!0})};function pZ2({error:a}){return n.jsxs("div",{role:"alert",children:[n.jsx("p",{children:"Something went wrong:"}),n.jsx("pre",{style:{color:"red"},children:a.message})]})}function fZ2(a){const t={...fW,...Ni1,styles:Di1,...tG2,useState:m.useState,Fragment:m.Fragment,useRef:m.useRef,useEffect:m.useEffect,createRef:m.createRef,useReducer:m.useReducer},{code:o}=ho.convertToReactComponent(a),c=Object.keys(t),l=Object.values(t),i=new Function("React",...c,o)(i2,...l);return n.jsx(i,{})}const HZ2=({src:a})=>{const[t,o]=m.useState(a),c=fZ2(t);return n.jsxs(uW,{fallbackRender:pZ2,children:[c,n.jsx(mZ2,{originalCode:a,code:t,setCode:o,lang:"ts",isFullscreen:!1})]})};export{HZ2 as LiveExample};
259
+ `},oo=SG2(OG2)(LH),PG2={config:BG2},HG2=function(){for(var t=arguments.length,o=new Array(t),c=0;c<t;c++)o[c]=arguments[c];return function(l){return o.reduceRight(function(r,i){return i(r)},l)}};function BH(a,t){return Object.keys(t).forEach(function(o){t[o]instanceof Object&&a[o]&&Object.assign(t[o],BH(a[o],t[o]))}),Q4(Q4({},a),t)}var EG2={type:"cancelation",msg:"operation is manually canceled"};function ka(a){var t=!1,o=new Promise(function(c,l){a.then(function(r){return t?l(EG2):c(r)}),a.catch(l)});return o.cancel=function(){return t=!0},o}var VG2=wG2.create({config:yG2,isInitialized:!1,resolve:null,reject:null,monaco:null}),MH=lG2(VG2,2),p6=MH[0],sa=MH[1];function TG2(a){var t=PG2.config(a),o=t.monaco,c=cG2(t,["monaco"]);sa(function(l){return{config:BH(l.config,c),monaco:o}})}function AG2(){var a=p6(function(t){var o=t.monaco,c=t.isInitialized,l=t.resolve;return{monaco:o,isInitialized:c,resolve:l}});if(!a.isInitialized){if(sa({isInitialized:!0}),a.monaco)return a.resolve(a.monaco),ka(wa);if(window.monaco&&window.monaco.editor)return OH(window.monaco),a.resolve(window.monaco),ka(wa);HG2(FG2,WG2)(NG2)}return ka(wa)}function FG2(a){return document.body.appendChild(a)}function jG2(a){var t=document.createElement("script");return a&&(t.src=a),t}function WG2(a){var t=p6(function(c){var l=c.config,r=c.reject;return{config:l,reject:r}}),o=jG2("".concat(t.config.paths.vs,"/loader.js"));return o.onload=function(){return a()},o.onerror=t.reject,o}function NG2(){var a=p6(function(o){var c=o.config,l=o.resolve,r=o.reject;return{config:c,resolve:l,reject:r}}),t=window.require;t.config(a.config),t(["vs/editor/editor.main"],function(o){OH(o),a.resolve(o)},function(o){a.reject(o)})}function OH(a){p6().monaco||sa({monaco:a})}function DG2(){return p6(function(a){var t=a.monaco;return t})}var wa=new Promise(function(a,t){return sa({resolve:a,reject:t})}),PH={config:TG2,init:AG2,__getMonacoInstance:DG2},RG2={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},ya=RG2,GG2={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},ZG2=GG2;function UG2({children:a}){return i2.createElement("div",{style:ZG2.container},a)}var qG2=UG2,XG2=qG2;function $G2({width:a,height:t,isEditorReady:o,loading:c,_ref:l,className:r,wrapperProps:i}){return i2.createElement("section",{style:{...ya.wrapper,width:a,height:t},...i},!o&&i2.createElement(XG2,null,c),i2.createElement("div",{ref:l,style:{...ya.fullWidth,...!o&&ya.hide},className:r}))}var KG2=$G2,HH=m.memo(KG2);function YG2(a){m.useEffect(a,[])}var EH=YG2;function JG2(a,t,o=!0){let c=m.useRef(!0);m.useEffect(c.current||!o?()=>{c.current=!1}:a,t)}var r2=JG2;function De(){}function ie(a,t,o,c){return QG2(a,c)||eZ2(a,t,o,c)}function QG2(a,t){return a.editor.getModel(VH(a,t))}function eZ2(a,t,o,c){return a.editor.createModel(t,o,c?VH(a,c):void 0)}function VH(a,t){return a.Uri.parse(t)}function aZ2({original:a,modified:t,language:o,originalLanguage:c,modifiedLanguage:l,originalModelPath:r,modifiedModelPath:i,keepCurrentOriginalModel:s=!1,keepCurrentModifiedModel:p=!1,theme:v="light",loading:d="Loading...",options:f={},height:g="100%",width:h="100%",className:u,wrapperProps:x={},beforeMount:C=De,onMount:z=De}){let[w,I]=m.useState(!1),[k,S]=m.useState(!0),T=m.useRef(null),P=m.useRef(null),V=m.useRef(null),L=m.useRef(z),M=m.useRef(C),y=m.useRef(!1);EH(()=>{let E=PH.init();return E.then(F=>(P.current=F)&&S(!1)).catch(F=>F?.type!=="cancelation"&&console.error("Monaco initialization: error:",F)),()=>T.current?O():E.cancel()}),r2(()=>{if(T.current&&P.current){let E=T.current.getOriginalEditor(),F=ie(P.current,a||"",c||o||"text",r||"");F!==E.getModel()&&E.setModel(F)}},[r],w),r2(()=>{if(T.current&&P.current){let E=T.current.getModifiedEditor(),F=ie(P.current,t||"",l||o||"text",i||"");F!==E.getModel()&&E.setModel(F)}},[i],w),r2(()=>{let E=T.current.getModifiedEditor();E.getOption(P.current.editor.EditorOption.readOnly)?E.setValue(t||""):t!==E.getValue()&&(E.executeEdits("",[{range:E.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),E.pushUndoStop())},[t],w),r2(()=>{T.current?.getModel()?.original.setValue(a||"")},[a],w),r2(()=>{let{original:E,modified:F}=T.current.getModel();P.current.editor.setModelLanguage(E,c||o||"text"),P.current.editor.setModelLanguage(F,l||o||"text")},[o,c,l],w),r2(()=>{P.current?.editor.setTheme(v)},[v],w),r2(()=>{T.current?.updateOptions(f)},[f],w);let B=m.useCallback(()=>{if(!P.current)return;M.current(P.current);let E=ie(P.current,a||"",c||o||"text",r||""),F=ie(P.current,t||"",l||o||"text",i||"");T.current?.setModel({original:E,modified:F})},[o,t,l,a,c,r,i]),A=m.useCallback(()=>{!y.current&&V.current&&(T.current=P.current.editor.createDiffEditor(V.current,{automaticLayout:!0,...f}),B(),P.current?.editor.setTheme(v),I(!0),y.current=!0)},[f,v,B]);m.useEffect(()=>{w&&L.current(T.current,P.current)},[w]),m.useEffect(()=>{!k&&!w&&A()},[k,w,A]);function O(){let E=T.current?.getModel();s||E?.original?.dispose(),p||E?.modified?.dispose(),T.current?.dispose()}return i2.createElement(HH,{width:h,height:g,isEditorReady:w,loading:d,_ref:V,className:u,wrapperProps:x})}var tZ2=aZ2;m.memo(tZ2);function oZ2(a){let t=m.useRef();return m.useEffect(()=>{t.current=a},[a]),t.current}var nZ2=oZ2,z6=new Map;function cZ2({defaultValue:a,defaultLanguage:t,defaultPath:o,value:c,language:l,path:r,theme:i="light",line:s,loading:p="Loading...",options:v={},overrideServices:d={},saveViewState:f=!0,keepCurrentModel:g=!1,width:h="100%",height:u="100%",className:x,wrapperProps:C={},beforeMount:z=De,onMount:w=De,onChange:I,onValidate:k=De}){let[S,T]=m.useState(!1),[P,V]=m.useState(!0),L=m.useRef(null),M=m.useRef(null),y=m.useRef(null),B=m.useRef(w),A=m.useRef(z),O=m.useRef(),E=m.useRef(c),F=nZ2(r),X=m.useRef(!1),N=m.useRef(!1);EH(()=>{let q=PH.init();return q.then($=>(L.current=$)&&V(!1)).catch($=>$?.type!=="cancelation"&&console.error("Monaco initialization: error:",$)),()=>M.current?U():q.cancel()}),r2(()=>{let q=ie(L.current,a||c||"",t||l||"",r||o||"");q!==M.current?.getModel()&&(f&&z6.set(F,M.current?.saveViewState()),M.current?.setModel(q),f&&M.current?.restoreViewState(z6.get(r)))},[r],S),r2(()=>{M.current?.updateOptions(v)},[v],S),r2(()=>{!M.current||c===void 0||(M.current.getOption(L.current.editor.EditorOption.readOnly)?M.current.setValue(c):c!==M.current.getValue()&&(N.current=!0,M.current.executeEdits("",[{range:M.current.getModel().getFullModelRange(),text:c,forceMoveMarkers:!0}]),M.current.pushUndoStop(),N.current=!1))},[c],S),r2(()=>{let q=M.current?.getModel();q&&l&&L.current?.editor.setModelLanguage(q,l)},[l],S),r2(()=>{s!==void 0&&M.current?.revealLine(s)},[s],S),r2(()=>{L.current?.editor.setTheme(i)},[i],S);let R=m.useCallback(()=>{if(!(!y.current||!L.current)&&!X.current){A.current(L.current);let q=r||o,$=ie(L.current,c||a||"",t||l||"",q||"");M.current=L.current?.editor.create(y.current,{model:$,automaticLayout:!0,...v},d),f&&M.current.restoreViewState(z6.get(q)),L.current.editor.setTheme(i),s!==void 0&&M.current.revealLine(s),T(!0),X.current=!0}},[a,t,o,c,l,r,v,d,f,i,s]);m.useEffect(()=>{S&&B.current(M.current,L.current)},[S]),m.useEffect(()=>{!P&&!S&&R()},[P,S,R]),E.current=c,m.useEffect(()=>{S&&I&&(O.current?.dispose(),O.current=M.current?.onDidChangeModelContent(q=>{N.current||I(M.current.getValue(),q)}))},[S,I]),m.useEffect(()=>{if(S){let q=L.current.editor.onDidChangeMarkers($=>{let J=M.current.getModel()?.uri;if(J&&$.find(a1=>a1.path===J.path)){let a1=L.current.editor.getModelMarkers({resource:J});k?.(a1)}});return()=>{q?.dispose()}}return()=>{}},[S,k]);function U(){O.current?.dispose(),g?f&&z6.set(r,M.current.saveViewState()):M.current.getModel()?.dispose(),M.current.dispose()}return i2.createElement(HH,{width:h,height:u,isEditorReady:S,loading:p,_ref:y,className:x,wrapperProps:C})}var lZ2=cZ2,rZ2=m.memo(lZ2),iZ2=rZ2;const TH=m.createContext(null),W2=a=>{var{icon:t,className:o,"aria-label":c,onClick:l=()=>{},isVisible:r=!0,tooltipProps:i={}}=a,s=b(a,["icon","className","aria-label","onClick","isVisible","tooltipProps"]);const p=m.useContext(TH),v=d=>{l(p.code,d)};return r?n.jsx(G1,Object.assign({},i,{children:n.jsx(Y,Object.assign({className:o,onClick:v,variant:"plain","aria-label":c},s,{icon:t}))})):null};W2.displayName="CodeEditorControl";var o2;(function(a){a.abap="abap",a.aes="aes",a.apex="apex",a.azcli="azcli",a.bat="bat",a.bicep="bicep",a.c="c",a.cameligo="cameligo",a.clojure="clojure",a.coffeescript="coffeescript",a.cpp="cpp",a.csharp="csharp",a.csp="csp",a.css="css",a.dart="dart",a.dockerfile="dockerfile",a.ecl="ecl",a.elixir="elixir",a.fsharp="fsharp",a.go="go",a.graphql="graphql",a.handlebars="handlebars",a.hcl="hcl",a.html="html",a.ini="ini",a.java="java",a.javascript="javascript",a.json="json",a.julia="julia",a.kotlin="kotlin",a.less="less",a.lexon="lexon",a.liquid="liquid",a.lua="lua",a.m3="m3",a.markdown="markdown",a.mips="mips",a.msdax="msdax",a.mysql="mysql",a["objective-c"]="objective-c",a.pascal="pascal",a.pascaligo="pascaligo",a.perl="perl",a.pgsql="pgsql",a.php="php",a.plaintext="plaintext",a.postiats="postiats",a.powerquery="powerquery",a.powershell="powershell",a.pug="pug",a.python="python",a.r="r",a.razor="razor",a.redis="redis",a.redshift="redshift",a.restructuredtext="restructuredtext",a.ruby="ruby",a.rust="rust",a.sb="sb",a.scala="scala",a.scheme="scheme",a.scss="scss",a.shell="shell",a.sol="sol",a.sql="sql",a.st="st",a.swift="swift",a.systemverilog="systemverilog",a.tcl="tcl",a.twig="twig",a.typescript="typescript",a.vb="vb",a.verilog="verilog",a.xml="xml",a.yaml="yaml"})(o2||(o2={}));const sZ2=a=>{switch(a){case o2.shell:return"sh";case o2.ruby:return"rb";case o2.perl:return"pl";case o2.python:return"py";case o2.mysql:return"sql";case o2.javascript:return"js";case o2.typescript:return"ts";case o2.markdown:return"md";case o2.plaintext:return"txt";default:return a.toString()}},_Z2=(a,t)=>{const o=document.createElement("a");o.href=URL.createObjectURL(new Blob([a],{type:"text"})),o.download=t,o.click()},AH=({className:a="",code:t="",copyButtonAriaLabel:o="Copy code to clipboard",copyButtonSuccessTooltipText:c="Content added to clipboard",copyButtonToolTipText:l="Copy to clipboard",customControls:r=null,downloadButtonAriaLabel:i="Download code",downloadButtonToolTipText:s="Download",downloadFileName:p=Date.now().toString(),editorProps:v,emptyState:d="",emptyStateBody:f="Drag and drop a file or upload one.",emptyStateButton:g="Browse",emptyStateLink:h="Start from scratch",emptyStateTitle:u="Start editing",headerMainContent:x="",height:C,isCopyEnabled:z=!1,isDarkTheme:w=!1,isDownloadEnabled:I=!1,isFullHeight:k=!1,isHeaderPlain:S=!1,isLanguageLabelVisible:T=!1,isLineNumbersVisible:P=!0,isMinimapVisible:V=!1,isReadOnly:L=!1,isUploadEnabled:M=!1,language:y=o2.plaintext,loading:B="",onChange:A=()=>{},onCodeChange:O=()=>{},onDownload:E=_Z2,onEditorDidMount:F=()=>{},options:X={},overrideServices:N={},shortcutsPopoverButtonText:R="View Shortcuts",shortcutsPopoverProps:U={bodyContent:"","aria-label":"Keyboard Shortcuts"},showEditor:q=!0,toolTipCopyExitDelay:$=1600,toolTipDelay:J=300,toolTipMaxWidth:a1="100px",toolTipPosition:o1="top",uploadButtonAriaLabel:s1="Upload code",uploadButtonToolTipText:I1="Upload",width:m1=""})=>{const[u1,k1]=m.useState(t),[w1,v1]=m.useState(!1),[C1,x1]=m.useState(!0),[b1,B1]=m.useState(!1),i1=m.useRef(null),e1=m.useRef(null),G=m.useRef(null),W=m.useRef(()=>{}),H=()=>{var _1,y1,W1;const d2=(_1=i1.current)===null||_1===void 0?void 0:_1.getContentHeight(),Ee=(y1=i1.current)===null||y1===void 0?void 0:y1.getLayoutInfo();(W1=i1.current)===null||W1===void 0||W1.layout({width:Ee.width,height:d2})},Z=(_1,y1)=>{C==="sizeToFit"&&H(),A&&A(_1,y1),k1(_1),O(_1)},D=()=>{i1.current&&(i1.current.layout({width:0,height:0}),i1.current.layout())},j=_1=>{var y1;e1.current===document.activeElement&&(_1.key==="ArrowDown"||_1.key===" ")&&((y1=i1.current)===null||y1===void 0||y1.focus(),_1.preventDefault())};m.useEffect(()=>k1(t),[t]),m.useEffect(()=>(document.addEventListener("keydown",j),W.current=G2(G.current,D,!0),D(),()=>{document.removeEventListener("keydown",j),W.current()}),[]);const K=(_1,y1)=>{_1.addCommand(y1.KeyMod.Shift|y1.KeyCode.Tab,()=>e1.current.focus()),Array.from(document.getElementsByClassName("monaco-editor")).forEach(W1=>W1.removeAttribute("role")),F(_1,y1),i1.current=_1,C==="sizeToFit"&&H()},n1=_1=>{k1(_1),O(_1)},p1=()=>v1(!0),z1=()=>v1(!1),Z1=_1=>new Promise((y1,W1)=>{const d2=new FileReader;d2.onload=()=>y1(d2.result),d2.onerror=()=>W1(d2.error),d2.readAsText(_1)}),K1=_1=>{if(_1.length>0){const y1=_1[0];n1(""),p1(),Z1(y1).then(W1=>{z1(),x1(!1),n1(W1)}).catch(W1=>{console.error("error",W1),z1(),n1("")})}},k2=_1=>{_1.length>0&&console.error("There was an error accepting that dropped file")},C2=()=>{navigator.clipboard.writeText(u1),B1(!0)},l2=Object.assign({scrollBeyondLastLine:C!=="sizeToFit",readOnly:L,cursorStyle:"line",lineNumbers:P?"on":"off",tabIndex:-1,minimap:{enabled:V}},X),P2={position:o1,exitDelay:J,entryDelay:J,maxWidth:a1,trigger:"mouseenter focus"},He=(z||I)&&(!C1||!!u1)||M||r||x||!!U.bodyContent;return n.jsx(ea,{multiple:!1,onDropAccepted:K1,onDropRejected:k2,children:({getRootProps:_1,getInputProps:y1,isDragActive:W1,open:d2})=>{const Ee=n.jsx("input",Object.assign({},y1(),{hidden:!0})),FH=d||(M?n.jsxs(T6,{variant:ue.sm,titleText:u,icon:Ne,headingLevel:"h4",children:[n.jsx(Ft,{children:f}),!L&&n.jsxs(A6,{children:[n.jsx(We,{children:n.jsx(Y,{variant:"primary",onClick:d2,children:g})}),n.jsx(We,{children:n.jsx(Y,{variant:"link",onClick:()=>x1(!1),children:h})})]})]}):n.jsx(T6,{variant:ue.sm,titleText:u,icon:Ne,headingLevel:"h4",children:!L&&n.jsx(A6,{children:n.jsx(We,{children:n.jsx(Y,{variant:"primary",onClick:()=>x1(!1),children:h})})})})),jH=n.jsxs(n.Fragment,{children:[n.jsx("div",{className:_(T1.codeEditorControls),children:n.jsxs(TH.Provider,{value:{code:u1},children:[z&&(!C1||!!u1)&&n.jsx(W2,{icon:n.jsx(K6,{}),"aria-label":o,tooltipProps:Object.assign(Object.assign({},P2),{"aria-live":"polite",content:n.jsx("div",{children:b1?c:l}),exitDelay:b1?$:J,onTooltipHidden:()=>B1(!1)}),onClick:C2}),M&&n.jsx(W2,{icon:n.jsx(lO,{}),"aria-label":s1,tooltipProps:Object.assign({content:n.jsx("div",{children:I1})},P2),onClick:d2}),I&&(!C1||!!u1)&&n.jsx(W2,{icon:n.jsx(ks,{}),"aria-label":i,tooltipProps:Object.assign({content:n.jsx("div",{children:s})},P2),onClick:()=>{E(u1,`${p}.${sZ2(y)}`)}}),r&&r]})}),x&&n.jsx("div",{className:_(T1.codeEditorHeaderMain),children:x}),!!U.bodyContent&&n.jsx("div",{className:`${T1.codeEditor}__keyboard-shortcuts`,children:n.jsx(tt,Object.assign({},U,{children:n.jsx(Y,{variant:H1.link,icon:n.jsx(Lo,{}),children:R})}))})]}),C4=n.jsxs("div",{className:_(T1.codeEditorHeader,S&&T1.modifiers.plain),children:[He&&n.jsx("div",{className:_(T1.codeEditorHeaderContent),children:jH}),T&&n.jsxs("div",{className:_(T1.codeEditorTab),children:[n.jsx("span",{className:_(T1.codeEditorTabIcon),children:n.jsx(Ne,{})}),n.jsx("span",{className:_(T1.codeEditorTabText),children:y.toUpperCase()})]})]}),x4=n.jsx("div",{className:_(T1.codeEditorCode),ref:e1,tabIndex:0,dir:"ltr",children:n.jsx(iZ2,Object.assign({height:C==="100%"?void 0:C,width:m1,language:y,value:u1,options:l2,overrideServices:N,onChange:Z,onMount:K,loading:B,theme:w?"vs-dark":"vs-light"},v))});return n.jsx("div",{className:_(T1.codeEditor,L&&T1.modifiers.readOnly,(C==="100%"?!0:k)&&T1.modifiers.fullHeight,a),ref:G,children:(M||d)&&!u1?n.jsxs("div",Object.assign({},_1({onClick:WH=>WH.stopPropagation()}),{className:_(T1.codeEditorContainer,w1&&V2.modifiers.loading),children:[C4,n.jsx("div",{className:_(T1.codeEditorMain,W1&&T1.modifiers.dragHover),children:(C1||d)&&!u1?n.jsxs("div",{className:_(T1.codeEditorUpload),children:[Ee,FH]}):n.jsxs(n.Fragment,{children:[Ee,x4]})})]})):n.jsxs(n.Fragment,{children:[C4,q&&n.jsxs("div",{className:_(T1.codeEditorMain),children:[Ee,x4]})]})})}})};AH.displayName="CodeEditor";const dZ2=a=>{navigator.clipboard.writeText(a)},no=window,ne=(a,t,o,c)=>{c||=0,no?.gtag&&no?.gtag("event",a,{event_category:t,event_label:o,...c>=0&&{value:c}})};function vZ2(a){return a==="js"?o2.javascript:a==="ts"?o2.typescript:a}const mZ2=({fullscreenLink:a,codeBoxParams:t,lang:o,isFullscreen:c,originalCode:l,code:r,setCode:i,exampleTitle:s})=>{const[p,v]=i2.useState(!1),[d,f]=i2.useState(!1),g="Copy code to clipboard",h=`Toggle ${o.toUpperCase()} code`,u="Open example in CodeSandbox",x="Open example in new window",C="Convert example from Typescript to JavaScript",z="Undo all changes",w=`Copy ${s} example code to clipboard`,I=`Toggle ${o.toUpperCase()} code in ${s} example`,k=`Open ${s} example in CodeSandbox`,S=`Open ${s} example in new window`,T=`Convert ${s} example from Typescript to JavaScript`,P=`Undo all changes to ${s}`,V={className:"ws-code-editor-control"},L={exitDelay:300,maxWidth:"var(--ws-code-editor--tooltip--MaxWidth)"},M=()=>{dZ2(r),f(!0)},y=n.jsxs(i2.Fragment,{children:[n.jsx(W2,{icon:n.jsxs(i2.Fragment,{children:[n.jsx(Ne,{})," "+o.toUpperCase()]}),onClick:()=>{v(!p),ne("code_editor_control_click","click_event","TOGGLE_CODE",p?0:1)},tooltipProps:{content:h,...L},"aria-label":I,"aria-expanded":p,...V}),n.jsx(G1,{content:n.jsx("div",{children:d?"Code copied":g}),maxWidth:V?.maxWidth,exitDelay:d?300:1600,onTooltipHidden:()=>f(!1),children:n.jsx(Y,{onClick:()=>{M(),ne("code_editor_control_click","click_event","COPY_CODE")},variant:"plain","aria-label":w,className:V.className,children:n.jsx(K6,{})})}),t&&n.jsxs(Ja,{"aria-label":`${k} form`,action:"https://codesandbox.io/api/v1/sandboxes/define",method:"POST",target:"_blank",style:{display:"inline-block"},children:[n.jsx(G1,{content:u,maxWidth:V.maxWidth,children:n.jsx(Y,{"aria-label":k,variant:"plain",type:"submit",onClick:()=>{ne("code_editor_control_click","click_event","CODESANDBOX_LINK")},className:V.className,children:n.jsx(pi,{})})}),n.jsx("input",{type:"hidden",name:"parameters",value:t})]}),a&&n.jsx(W2,{component:"a",icon:n.jsx(Mo,{}),href:a,target:"_blank",rel:"noopener noreferrer","aria-label":S,tooltipProps:{content:x,...L},onClick:()=>{ne("code_editor_control_click","click_event","FULLSCREEN_LINK")},...V}),p&&o==="ts"&&n.jsx(W2,{icon:n.jsxs(i2.Fragment,{children:["TS ",n.jsx(o4,{})," JS"]}),"aria-label":T,tooltipProps:{content:C,...L},onClick:()=>{i(ho.convertToJSX(r).code),ne("code_editor_control_click","click_event","TS_TO_JS")},...V}),r!==l&&n.jsx(W2,{icon:n.jsx(Kk,{}),"aria-label":P,tooltipProps:{content:z,...L},onClick:()=>{i(l),ne("code_editor_control_click","click_event","RESET_CODE")},...V})]}),B=(A,O)=>{O.languages.typescript.typescriptDefaults.setCompilerOptions({jsx:!0,...O.languages.typescript.typescriptDefaults.getCompilerOptions()}),O.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0,noSuggestionDiagnostics:!0,onlyVisible:!0})};return n.jsx(AH,{customControls:y,showEditor:p,language:vZ2(o),height:"400px",code:r,onChange:A=>i(A),onEditorDidMount:B,isReadOnly:c,className:`${p?"ws-example-code-expanded ":""}ws-code-editor`,isHeaderPlain:!0})};function pZ2({error:a}){return n.jsxs("div",{role:"alert",children:[n.jsx("p",{children:"Something went wrong:"}),n.jsx("pre",{style:{color:"red"},children:a.message})]})}function fZ2(a){const t={...fW,...Ni1,styles:Di1,...tG2,useState:m.useState,Fragment:m.Fragment,useRef:m.useRef,useEffect:m.useEffect,createRef:m.createRef,useReducer:m.useReducer},{code:o}=ho.convertToReactComponent(a),c=Object.keys(t),l=Object.values(t),i=new Function("React",...c,o)(i2,...l);return n.jsx(i,{})}const HZ2=({src:a,html:t,isFullscreenPreview:o})=>{const c=a||t||"",[l,r]=m.useState(c);let i=null,s="ts";return t?(i=n.jsx("div",{className:`ws-preview-html ${o&&"pf-v6-u-h-100"}`,dangerouslySetInnerHTML:{__html:l}}),s="html"):(i=fZ2(l),s="ts"),n.jsxs(uW,{fallbackRender:pZ2,children:[i,n.jsx(mZ2,{originalCode:c,code:l,setCode:r,lang:s,isFullscreen:!1})]})};export{HZ2 as LiveExample};
@@ -0,0 +1 @@
1
+ import{r as o}from"./index.eCxJ45ll.js";import{r as b}from"./index.BQFV5hT1.js";var s={},E;function g(){if(E)return s;E=1;var t=b();return s.createRoot=t.createRoot,s.hydrateRoot=t.hydrateRoot,s}var p=g();const v=({value:t,name:e,hydrate:r=!0})=>{if(!t)return null;const a=r?"astro-slot":"astro-static-slot";return o.createElement(a,{name:e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}})};v.shouldComponentUpdate=()=>!1;var N=v;function C(t){for(const e in t)if(e.startsWith("__reactContainer"))return e}function R(t){let e={};for(const r of t.attributes)e[r.name]=r.value;return t.firstChild===null?o.createElement(t.localName,e):o.createElement(t.localName,e,Array.from(t.childNodes).map(r=>r.nodeType===Node.TEXT_NODE?r.data:r.nodeType===Node.ELEMENT_NODE?R(r):void 0).filter(r=>!!r))}function O(t,e){if(e&&t){let r=[],a=document.createElement("template");a.innerHTML=t;for(let u of a.content.children)r.push(R(u));return r}else return t?o.createElement(N,{value:t}):void 0}let y=new WeakMap;const h=(t,e)=>{let r=y.get(t);return r||(r=e(),y.set(t,r)),r};var H=t=>(e,r,{default:a,...u},{client:A})=>{if(!t.hasAttribute("ssr"))return;const d=t.getAttribute("data-action-key"),l=t.getAttribute("data-action-name"),f=t.getAttribute("data-action-result"),T=d&&l&&f?[JSON.parse(f),d,l]:void 0,_={identifierPrefix:t.getAttribute("prefix"),formState:T};for(const[i,n]of Object.entries(u))r[i]=o.createElement(N,{value:n,name:i});const c=o.createElement(e,r,O(a,t.hasAttribute("data-react-children"))),m=C(t);if(m&&delete t[m],A==="only")return o.startTransition(()=>{h(t,()=>{const n=p.createRoot(t);return t.addEventListener("astro:unmount",()=>n.unmount(),{once:!0}),n}).render(c)});o.startTransition(()=>{h(t,()=>{const n=p.hydrateRoot(t,c,_);return t.addEventListener("astro:unmount",()=>n.unmount(),{once:!0}),n}).render(c)})};export{H as default};
@@ -0,0 +1,20 @@
1
+ {
2
+ "version": 1,
3
+ "include": [
4
+ "/*"
5
+ ],
6
+ "exclude": [
7
+ "/",
8
+ "/_astro/*",
9
+ "/.assetsignore",
10
+ "/PF-HorizontalLogo-Color.svg",
11
+ "/PF-HorizontalLogo-Reverse.svg",
12
+ "/avatarImg.svg",
13
+ "/avatarImgDark.svg",
14
+ "/favicon.svg",
15
+ "/content/*",
16
+ "/components/*",
17
+ "/get-started/*",
18
+ "/design-foundations/*"
19
+ ]
20
+ }
@@ -0,0 +1,2 @@
1
+ globalThis.process ??= {}; globalThis.process.env ??= {};
2
+ export { c as createExports } from './chunks/_@astrojs-ssr-adapter_C9Nk07-M.mjs';
@@ -0,0 +1,21 @@
1
+ globalThis.process ??= {}; globalThis.process.env ??= {};
2
+ import './chunks/astro-designed-error-pages_4xWqsa9_.mjs';
3
+ import './chunks/astro/server_BpfPtTmt.mjs';
4
+ import { s as sequence } from './chunks/index_DlGha6WC.mjs';
5
+
6
+ const onRequest$1 = (context, next) => {
7
+ if (context.isPrerendered) {
8
+ context.locals.runtime ??= {
9
+ env: process.env
10
+ };
11
+ }
12
+ return next();
13
+ };
14
+
15
+ const onRequest = sequence(
16
+ onRequest$1,
17
+
18
+
19
+ );
20
+
21
+ export { onRequest };
@@ -0,0 +1,4 @@
1
+ globalThis.process ??= {}; globalThis.process.env ??= {};
2
+ const server = {};
3
+
4
+ export { server };
@@ -1,8 +1,7 @@
1
- import { __rest } from 'tslib';
2
- import { jsx, jsxs } from 'react/jsx-runtime';
3
- import { u as useOUIAProps, c as css, s as setBreakpointCssVars, l as formatBreakpointMods, b as createIcon, B as Button } from './Button_BKhHR-ak.mjs';
1
+ globalThis.process ??= {}; globalThis.process.env ??= {};
2
+ import { _ as __rest, u as useOUIAProps, j as jsxRuntimeExports, c as css, s as setBreakpointCssVars, m as formatBreakpointMods, b as createIcon, B as Button } from './Button_ByndGYyw.mjs';
4
3
  /* empty css */
5
- import React from 'react';
4
+ import { R as React } from './index_Dc2aKkl4.mjs';
6
5
 
7
6
  const styles$2 = {
8
7
  "content": "pf-v6-c-content",
@@ -79,7 +78,7 @@ const Content = (_a) => {
79
78
  const Component = wrappingComponent;
80
79
  const ouiaProps = useOUIAProps(Content.displayName, ouiaId, ouiaSafe);
81
80
  const isList = ['ul', 'ol', 'dl'].includes(wrappingComponent);
82
- return (jsx(Component, Object.assign({}, ouiaProps, props, { "data-pf-content": true, className: css(componentStyles[wrappingComponent], isList && isPlainList && styles$2.modifiers.plain, isVisitedLink && styles$2.modifiers.visited, isEditorial && styles$2.modifiers.editorial, className), children: children })));
81
+ return (jsxRuntimeExports.jsx(Component, Object.assign({}, ouiaProps, props, { "data-pf-content": true, className: css(componentStyles[wrappingComponent], isList && isPlainList && styles$2.modifiers.plain, isVisitedLink && styles$2.modifiers.visited, isEditorial && styles$2.modifiers.editorial, className), children: children })));
83
82
  };
84
83
  Content.displayName = 'Content';
85
84
 
@@ -635,14 +634,14 @@ const l_flex_item_Order = {
635
634
  const Flex = (_a) => {
636
635
  var { children = null, className = '', component = 'div', spacer, spaceItems, gap, rowGap, columnGap, grow, shrink, flex, direction, alignItems, alignContent, alignSelf, align, justifyContent, display, fullWidth, flexWrap, order, style } = _a, props = __rest(_a, ["children", "className", "component", "spacer", "spaceItems", "gap", "rowGap", "columnGap", "grow", "shrink", "flex", "direction", "alignItems", "alignContent", "alignSelf", "align", "justifyContent", "display", "fullWidth", "flexWrap", "order", "style"]);
637
636
  const Component = component;
638
- return (jsx(Component, Object.assign({ className: css(styles$1.flex, formatBreakpointMods(spacer, styles$1), formatBreakpointMods(spaceItems, styles$1), formatBreakpointMods(grow, styles$1), formatBreakpointMods(shrink, styles$1), formatBreakpointMods(flex, styles$1), formatBreakpointMods(direction, styles$1), formatBreakpointMods(alignItems, styles$1), formatBreakpointMods(alignContent, styles$1), formatBreakpointMods(alignSelf, styles$1), formatBreakpointMods(align, styles$1), formatBreakpointMods(justifyContent, styles$1), formatBreakpointMods(display, styles$1), formatBreakpointMods(fullWidth, styles$1), formatBreakpointMods(flexWrap, styles$1), formatBreakpointMods(gap, styles$1), formatBreakpointMods(rowGap, styles$1), formatBreakpointMods(columnGap, styles$1), className), style: style || order ? Object.assign(Object.assign({}, style), setBreakpointCssVars(order, l_flex_item_Order.name)) : undefined }, props, { children: children })));
637
+ return (jsxRuntimeExports.jsx(Component, Object.assign({ className: css(styles$1.flex, formatBreakpointMods(spacer, styles$1), formatBreakpointMods(spaceItems, styles$1), formatBreakpointMods(grow, styles$1), formatBreakpointMods(shrink, styles$1), formatBreakpointMods(flex, styles$1), formatBreakpointMods(direction, styles$1), formatBreakpointMods(alignItems, styles$1), formatBreakpointMods(alignContent, styles$1), formatBreakpointMods(alignSelf, styles$1), formatBreakpointMods(align, styles$1), formatBreakpointMods(justifyContent, styles$1), formatBreakpointMods(display, styles$1), formatBreakpointMods(fullWidth, styles$1), formatBreakpointMods(flexWrap, styles$1), formatBreakpointMods(gap, styles$1), formatBreakpointMods(rowGap, styles$1), formatBreakpointMods(columnGap, styles$1), className), style: style || order ? Object.assign(Object.assign({}, style), setBreakpointCssVars(order, l_flex_item_Order.name)) : undefined }, props, { children: children })));
639
638
  };
640
639
  Flex.displayName = 'Flex';
641
640
 
642
641
  const FlexItem = (_a) => {
643
642
  var { children = null, className = '', component = 'div', spacer, grow, shrink, flex, alignSelf, align, fullWidth, order, style } = _a, props = __rest(_a, ["children", "className", "component", "spacer", "grow", "shrink", "flex", "alignSelf", "align", "fullWidth", "order", "style"]);
644
643
  const Component = component;
645
- return (jsx(Component, Object.assign({}, props, { className: css(formatBreakpointMods(spacer, styles$1), formatBreakpointMods(grow, styles$1), formatBreakpointMods(shrink, styles$1), formatBreakpointMods(flex, styles$1), formatBreakpointMods(alignSelf, styles$1), formatBreakpointMods(align, styles$1), formatBreakpointMods(fullWidth, styles$1), className), style: style || order ? Object.assign(Object.assign({}, style), setBreakpointCssVars(order, l_flex_item_Order.name)) : undefined, children: children })));
644
+ return (jsxRuntimeExports.jsx(Component, Object.assign({}, props, { className: css(formatBreakpointMods(spacer, styles$1), formatBreakpointMods(grow, styles$1), formatBreakpointMods(shrink, styles$1), formatBreakpointMods(flex, styles$1), formatBreakpointMods(alignSelf, styles$1), formatBreakpointMods(align, styles$1), formatBreakpointMods(fullWidth, styles$1), className), style: style || order ? Object.assign(Object.assign({}, style), setBreakpointCssVars(order, l_flex_item_Order.name)) : undefined, children: children })));
646
645
  };
647
646
  FlexItem.displayName = 'FlexItem';
648
647
 
@@ -658,14 +657,14 @@ const styles = {
658
657
  const Stack = (_a) => {
659
658
  var { hasGutter = false, className = '', children = null, component = 'div' } = _a, props = __rest(_a, ["hasGutter", "className", "children", "component"]);
660
659
  const Component = component;
661
- return (jsx(Component, Object.assign({}, props, { className: css(styles.stack, hasGutter && styles.modifiers.gutter, className), children: children })));
660
+ return (jsxRuntimeExports.jsx(Component, Object.assign({}, props, { className: css(styles.stack, hasGutter && styles.modifiers.gutter, className), children: children })));
662
661
  };
663
662
  Stack.displayName = 'Stack';
664
663
 
665
664
  const StackItem = (_a) => {
666
665
  var { isFilled = false, className = '', children = null, component = 'div' } = _a, props = __rest(_a, ["isFilled", "className", "children", "component"]);
667
666
  const Component = component;
668
- return (jsx(Component, Object.assign({}, props, { className: css(styles.stackItem, isFilled && styles.modifiers.fill, className), children: children })));
667
+ return (jsxRuntimeExports.jsx(Component, Object.assign({}, props, { className: css(styles.stackItem, isFilled && styles.modifiers.fill, className), children: children })));
669
668
  };
670
669
  StackItem.displayName = 'StackItem';
671
670
 
@@ -693,13 +692,13 @@ const AutoLinkHeader = ({
693
692
  className
694
693
  }) => {
695
694
  const slug = id || slugger(children);
696
- return /* @__PURE__ */ jsxs(
695
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
697
696
  Flex,
698
697
  {
699
698
  alignItems: { default: "alignItemsCenter" },
700
699
  spaceItems: { default: "spaceItemsSm" },
701
700
  children: [
702
- /* @__PURE__ */ jsx(FlexItem, { children: /* @__PURE__ */ jsxs(
701
+ /* @__PURE__ */ jsxRuntimeExports.jsx(FlexItem, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
703
702
  Content,
704
703
  {
705
704
  id: slug,
@@ -708,7 +707,7 @@ const AutoLinkHeader = ({
708
707
  tabIndex: -1,
709
708
  isEditorial: true,
710
709
  children: [
711
- /* @__PURE__ */ jsx(
710
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
712
711
  Button,
713
712
  {
714
713
  href: `#${slug}`,
@@ -718,7 +717,7 @@ const AutoLinkHeader = ({
718
717
  "aria-hidden": true,
719
718
  variant: "plain",
720
719
  isInline: true,
721
- children: /* @__PURE__ */ jsx(
720
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
722
721
  LinkIcon,
723
722
  {
724
723
  className: "ws-heading-anchor-icon",
@@ -731,7 +730,7 @@ const AutoLinkHeader = ({
731
730
  ]
732
731
  }
733
732
  ) }),
734
- metaText && /* @__PURE__ */ jsx(FlexItem, { children: metaText })
733
+ metaText && /* @__PURE__ */ jsxRuntimeExports.jsx(FlexItem, { children: metaText })
735
734
  ]
736
735
  }
737
736
  );