@betterportal/docs-site 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +11 -0
  2. package/bsb-plugin.json +22 -0
  3. package/bsb-tests.json +14 -0
  4. package/lib/index.d.ts +2 -0
  5. package/lib/index.d.ts.map +1 -0
  6. package/lib/index.js +2 -0
  7. package/lib/index.js.map +1 -0
  8. package/lib/plugins/service-betterportal-docs-site/.bp-generated/registry.d.ts +3 -0
  9. package/lib/plugins/service-betterportal-docs-site/.bp-generated/registry.d.ts.map +1 -0
  10. package/lib/plugins/service-betterportal-docs-site/.bp-generated/registry.js +54 -0
  11. package/lib/plugins/service-betterportal-docs-site/.bp-generated/registry.js.map +1 -0
  12. package/lib/plugins/service-betterportal-docs-site/assets/doc-wave.svg +25 -0
  13. package/lib/plugins/service-betterportal-docs-site/assets/portal-map.svg +53 -0
  14. package/lib/plugins/service-betterportal-docs-site/bp-routes/docs/[section]/[page]/_theme.bootstrap1/index.d.ts +5 -0
  15. package/lib/plugins/service-betterportal-docs-site/bp-routes/docs/[section]/[page]/_theme.bootstrap1/index.d.ts.map +1 -0
  16. package/lib/plugins/service-betterportal-docs-site/bp-routes/docs/[section]/[page]/_theme.bootstrap1/index.js +96 -0
  17. package/lib/plugins/service-betterportal-docs-site/bp-routes/docs/[section]/[page]/_theme.bootstrap1/index.js.map +1 -0
  18. package/lib/plugins/service-betterportal-docs-site/bp-routes/docs/[section]/[page]/index.d.ts +44 -0
  19. package/lib/plugins/service-betterportal-docs-site/bp-routes/docs/[section]/[page]/index.d.ts.map +1 -0
  20. package/lib/plugins/service-betterportal-docs-site/bp-routes/docs/[section]/[page]/index.js +73 -0
  21. package/lib/plugins/service-betterportal-docs-site/bp-routes/docs/[section]/[page]/index.js.map +1 -0
  22. package/lib/plugins/service-betterportal-docs-site/bp-routes/docs/_theme.bootstrap1/index.d.ts +5 -0
  23. package/lib/plugins/service-betterportal-docs-site/bp-routes/docs/_theme.bootstrap1/index.d.ts.map +1 -0
  24. package/lib/plugins/service-betterportal-docs-site/bp-routes/docs/_theme.bootstrap1/index.js +95 -0
  25. package/lib/plugins/service-betterportal-docs-site/bp-routes/docs/_theme.bootstrap1/index.js.map +1 -0
  26. package/lib/plugins/service-betterportal-docs-site/bp-routes/docs/content.d.ts +15 -0
  27. package/lib/plugins/service-betterportal-docs-site/bp-routes/docs/content.d.ts.map +1 -0
  28. package/lib/plugins/service-betterportal-docs-site/bp-routes/docs/content.js +94 -0
  29. package/lib/plugins/service-betterportal-docs-site/bp-routes/docs/content.js.map +1 -0
  30. package/lib/plugins/service-betterportal-docs-site/bp-routes/docs/index.d.ts +36 -0
  31. package/lib/plugins/service-betterportal-docs-site/bp-routes/docs/index.d.ts.map +1 -0
  32. package/lib/plugins/service-betterportal-docs-site/bp-routes/docs/index.js +44 -0
  33. package/lib/plugins/service-betterportal-docs-site/bp-routes/docs/index.js.map +1 -0
  34. package/lib/plugins/service-betterportal-docs-site/bp-routes/docs/rendering/markdown.d.ts +4 -0
  35. package/lib/plugins/service-betterportal-docs-site/bp-routes/docs/rendering/markdown.d.ts.map +1 -0
  36. package/lib/plugins/service-betterportal-docs-site/bp-routes/docs/rendering/markdown.js +124 -0
  37. package/lib/plugins/service-betterportal-docs-site/bp-routes/docs/rendering/markdown.js.map +1 -0
  38. package/lib/plugins/service-betterportal-docs-site/index.d.ts +59 -0
  39. package/lib/plugins/service-betterportal-docs-site/index.d.ts.map +1 -0
  40. package/lib/plugins/service-betterportal-docs-site/index.js +67 -0
  41. package/lib/plugins/service-betterportal-docs-site/index.js.map +1 -0
  42. package/lib/schemas/service-betterportal-docs-site.json +109 -0
  43. package/lib/schemas/service-betterportal-docs-site.plugin.json +121 -0
  44. package/package.json +65 -0
package/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # BetterPortal Docs Site
2
+
3
+ BetterPortal service that renders Markdown files from the repository-level `docs/` directory as a BetterPortal documentation site.
4
+
5
+ ```bash
6
+ npm install
7
+ npm run build
8
+ npm start
9
+ ```
10
+
11
+ The service runs on `http://localhost:3400` by default and is mounted in `bp-config.yaml` at `/docs`.
@@ -0,0 +1,22 @@
1
+ {
2
+ "nodejs": [
3
+ {
4
+ "id": "service-betterportal-docs-site",
5
+ "name": "service-betterportal-docs-site",
6
+ "basePath": "./",
7
+ "description": "Documentation site service for BetterPortal",
8
+ "tags": [
9
+ "betterportal",
10
+ "service",
11
+ "docs"
12
+ ],
13
+ "documentation": [
14
+ "./README.md"
15
+ ],
16
+ "pluginPath": "src/plugins/service-betterportal-docs-site/",
17
+ "links": {
18
+ "github": "git+https://github.com/BetterCorp/BetterPortal.git"
19
+ }
20
+ }
21
+ ]
22
+ }
package/bsb-tests.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "nodejs": [
3
+ {
4
+ "id": "service-betterportal-docs-site",
5
+ "skip": true,
6
+ "default": {
7
+ "config": {},
8
+ "setup": null,
9
+ "dispose": null
10
+ },
11
+ "tests": []
12
+ }
13
+ ]
14
+ }
package/lib/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./plugins/service-betterportal-docs-site/index.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mDAAmD,CAAC"}
package/lib/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./plugins/service-betterportal-docs-site/index.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mDAAmD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { BetterPortalRegistry } from "@betterportal/framework";
2
+ export declare const registry: BetterPortalRegistry;
3
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/plugins/service-betterportal-docs-site/.bp-generated/registry.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAEpE,eAAO,MAAM,QAAQ,EAAE,oBA+CtB,CAAC"}
@@ -0,0 +1,54 @@
1
+ // AUTO-GENERATED by BetterPortal codegen - DO NOT EDIT
2
+ import * as docsRoute from "../bp-routes/docs/index.js";
3
+ import * as docsBootstrap1Page from "../bp-routes/docs/_theme.bootstrap1/index.js";
4
+ import * as docsSectionPageRoute from "../bp-routes/docs/[section]/[page]/index.js";
5
+ import * as docsSectionPageBootstrap1Page from "../bp-routes/docs/[section]/[page]/_theme.bootstrap1/index.js";
6
+ export const registry = {
7
+ routes: [
8
+ {
9
+ viewId: "docs.index",
10
+ path: "/docs",
11
+ methods: ["GET"],
12
+ paramNames: [],
13
+ schemas: {
14
+ response: docsRoute.ResponseSchema
15
+ },
16
+ handlers: { GET: docsRoute.handleGet },
17
+ title: docsRoute.title,
18
+ description: docsRoute.description,
19
+ auth: docsRoute.auth,
20
+ cacheHints: docsRoute.cacheHints,
21
+ demoScenarios: docsRoute.demoScenarios,
22
+ themeRenderers: {
23
+ "bootstrap1": {
24
+ pages: [{ rendererId: "default", type: "page", render: docsBootstrap1Page.render }],
25
+ components: [],
26
+ fragments: []
27
+ }
28
+ }
29
+ },
30
+ {
31
+ viewId: "docs.$section.$page.index",
32
+ path: "/docs/:section/:page",
33
+ methods: ["GET"],
34
+ paramNames: ["section", "page"],
35
+ schemas: {
36
+ response: docsSectionPageRoute.ResponseSchema
37
+ },
38
+ handlers: { GET: docsSectionPageRoute.handleGet },
39
+ title: docsSectionPageRoute.title,
40
+ description: docsSectionPageRoute.description,
41
+ auth: docsSectionPageRoute.auth,
42
+ cacheHints: docsSectionPageRoute.cacheHints,
43
+ demoScenarios: docsSectionPageRoute.demoScenarios,
44
+ themeRenderers: {
45
+ "bootstrap1": {
46
+ pages: [{ rendererId: "default", type: "page", render: docsSectionPageBootstrap1Page.render }],
47
+ components: [],
48
+ fragments: []
49
+ }
50
+ }
51
+ }
52
+ ]
53
+ };
54
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/plugins/service-betterportal-docs-site/.bp-generated/registry.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,OAAO,KAAK,SAAS,MAAM,4BAA4B,CAAC;AACxD,OAAO,KAAK,kBAAkB,MAAM,8CAA8C,CAAC;AACnF,OAAO,KAAK,oBAAoB,MAAM,6CAA6C,CAAC;AACpF,OAAO,KAAK,6BAA6B,MAAM,+DAA+D,CAAC;AAG/G,MAAM,CAAC,MAAM,QAAQ,GAAyB;IAC5C,MAAM,EAAE;QACN;YACE,MAAM,EAAE,YAAY;YACpB,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,CAAC,KAAK,CAAC;YAChB,UAAU,EAAE,EAAE;YACd,OAAO,EAAE;gBACP,QAAQ,EAAE,SAAS,CAAC,cAAc;aACnC;YACD,QAAQ,EAAE,EAAE,GAAG,EAAE,SAAS,CAAC,SAAS,EAAE;YACtC,KAAK,EAAE,SAAS,CAAC,KAAK;YACtB,WAAW,EAAE,SAAS,CAAC,WAAW;YAClC,IAAI,EAAE,SAAS,CAAC,IAAI;YACpB,UAAU,EAAE,SAAS,CAAC,UAAU;YAChC,aAAa,EAAE,SAAS,CAAC,aAAa;YACtC,cAAc,EAAE;gBACd,YAAY,EAAE;oBACZ,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,CAAC,MAAM,EAAE,CAAC;oBACnF,UAAU,EAAE,EAAE;oBACd,SAAS,EAAE,EAAE;iBACd;aACF;SACF;QACD;YACE,MAAM,EAAE,2BAA2B;YACnC,IAAI,EAAE,sBAAsB;YAC5B,OAAO,EAAE,CAAC,KAAK,CAAC;YAChB,UAAU,EAAE,CAAC,SAAS,EAAC,MAAM,CAAC;YAC9B,OAAO,EAAE;gBACP,QAAQ,EAAE,oBAAoB,CAAC,cAAc;aAC9C;YACD,QAAQ,EAAE,EAAE,GAAG,EAAE,oBAAoB,CAAC,SAAS,EAAE;YACjD,KAAK,EAAE,oBAAoB,CAAC,KAAK;YACjC,WAAW,EAAE,oBAAoB,CAAC,WAAW;YAC7C,IAAI,EAAE,oBAAoB,CAAC,IAAI;YAC/B,UAAU,EAAE,oBAAoB,CAAC,UAAU;YAC3C,aAAa,EAAE,oBAAoB,CAAC,aAAa;YACjD,cAAc,EAAE;gBACd,YAAY,EAAE;oBACZ,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,6BAA6B,CAAC,MAAM,EAAE,CAAC;oBAC9F,UAAU,EAAE,EAAE;oBACd,SAAS,EAAE,EAAE;iBACd;aACF;SACF;KACF;CACF,CAAC"}
@@ -0,0 +1,25 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 360" role="img" aria-labelledby="title desc">
2
+ <title id="title">BetterPortal documentation header image</title>
3
+ <desc id="desc">Layered waves and route cards used as a documentation page header accent.</desc>
4
+ <defs>
5
+ <linearGradient id="g1" x1="0" x2="1" y1="0" y2="1">
6
+ <stop offset="0" stop-color="#dbeafe"/>
7
+ <stop offset=".45" stop-color="#dcfce7"/>
8
+ <stop offset="1" stop-color="#fef3c7"/>
9
+ </linearGradient>
10
+ <linearGradient id="g2" x1="0" x2="1">
11
+ <stop offset="0" stop-color="#3b82f6"/>
12
+ <stop offset=".5" stop-color="#22c55e"/>
13
+ <stop offset="1" stop-color="#f59e0b"/>
14
+ </linearGradient>
15
+ </defs>
16
+ <rect width="1200" height="360" rx="24" fill="url(#g1)"/>
17
+ <path d="M0 246c170-76 314-40 460-12 180 34 360 52 560-38 68-30 132-48 180-54v218H0z" fill="#ffffff" opacity=".54"/>
18
+ <path d="M0 286c170-54 314-28 470-8 190 24 400 20 590-74 58-28 108-44 140-48v204H0z" fill="#ffffff" opacity=".72"/>
19
+ <path d="M104 108h236M104 154h150M104 200h190" stroke="url(#g2)" stroke-width="18" stroke-linecap="round" opacity=".7"/>
20
+ <g fill="#ffffff" opacity=".9">
21
+ <rect x="670" y="78" width="248" height="76" rx="18"/>
22
+ <rect x="742" y="182" width="304" height="76" rx="18"/>
23
+ <rect x="820" y="286" width="176" height="42" rx="18"/>
24
+ </g>
25
+ </svg>
@@ -0,0 +1,53 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 960 520" role="img" aria-labelledby="title desc">
2
+ <title id="title">BetterPortal service composition map</title>
3
+ <desc id="desc">A visual map showing a theme shell connected to independent services and platform configuration.</desc>
4
+ <defs>
5
+ <linearGradient id="bg" x1="0" x2="1" y1="0" y2="1">
6
+ <stop offset="0" stop-color="#eff6ff"/>
7
+ <stop offset=".54" stop-color="#ecfdf5"/>
8
+ <stop offset="1" stop-color="#fffbeb"/>
9
+ </linearGradient>
10
+ <linearGradient id="blue" x1="0" x2="1">
11
+ <stop offset="0" stop-color="#3b82f6"/>
12
+ <stop offset="1" stop-color="#38bdf8"/>
13
+ </linearGradient>
14
+ <linearGradient id="green" x1="0" x2="1">
15
+ <stop offset="0" stop-color="#22c55e"/>
16
+ <stop offset="1" stop-color="#14b8a6"/>
17
+ </linearGradient>
18
+ <filter id="shadow" x="-20%" y="-20%" width="140%" height="140%">
19
+ <feDropShadow dx="0" dy="12" stdDeviation="18" flood-color="#0f172a" flood-opacity=".14"/>
20
+ </filter>
21
+ </defs>
22
+ <rect width="960" height="520" rx="28" fill="url(#bg)"/>
23
+ <path d="M138 264h164M480 152v88M480 320v78M660 264h164" stroke="#64748b" stroke-width="10" stroke-linecap="round" opacity=".32"/>
24
+ <path d="M302 264c58 0 82-64 178-64s120 64 178 64" fill="none" stroke="url(#blue)" stroke-width="8" stroke-linecap="round"/>
25
+ <path d="M302 264c58 0 82 64 178 64s120-64 178-64" fill="none" stroke="url(#green)" stroke-width="8" stroke-linecap="round"/>
26
+ <g filter="url(#shadow)">
27
+ <rect x="72" y="180" width="230" height="168" rx="20" fill="#ffffff"/>
28
+ <rect x="118" y="220" width="138" height="16" rx="8" fill="#bfdbfe"/>
29
+ <rect x="118" y="252" width="88" height="12" rx="6" fill="#cbd5e1"/>
30
+ <rect x="118" y="280" width="138" height="12" rx="6" fill="#cbd5e1"/>
31
+ <text x="187" y="324" text-anchor="middle" font-family="Inter, Arial, sans-serif" font-size="22" font-weight="700" fill="#0f172a">Theme shell</text>
32
+ </g>
33
+ <g filter="url(#shadow)">
34
+ <rect x="365" y="80" width="270" height="170" rx="22" fill="#ffffff"/>
35
+ <circle cx="416" cy="132" r="20" fill="#dbeafe"/>
36
+ <rect x="450" y="116" width="116" height="14" rx="7" fill="#93c5fd"/>
37
+ <rect x="450" y="146" width="76" height="12" rx="6" fill="#cbd5e1"/>
38
+ <text x="500" y="210" text-anchor="middle" font-family="Inter, Arial, sans-serif" font-size="22" font-weight="700" fill="#0f172a">Service views</text>
39
+ </g>
40
+ <g filter="url(#shadow)">
41
+ <rect x="365" y="306" width="270" height="154" rx="22" fill="#ffffff"/>
42
+ <rect x="414" y="350" width="170" height="16" rx="8" fill="#bbf7d0"/>
43
+ <rect x="414" y="383" width="112" height="12" rx="6" fill="#cbd5e1"/>
44
+ <text x="500" y="424" text-anchor="middle" font-family="Inter, Arial, sans-serif" font-size="22" font-weight="700" fill="#0f172a">Validated HTML</text>
45
+ </g>
46
+ <g filter="url(#shadow)">
47
+ <rect x="660" y="180" width="248" height="168" rx="22" fill="#ffffff"/>
48
+ <rect x="706" y="220" width="164" height="16" rx="8" fill="#fde68a"/>
49
+ <rect x="706" y="252" width="112" height="12" rx="6" fill="#cbd5e1"/>
50
+ <rect x="706" y="280" width="144" height="12" rx="6" fill="#cbd5e1"/>
51
+ <text x="784" y="324" text-anchor="middle" font-family="Inter, Arial, sans-serif" font-size="22" font-weight="700" fill="#0f172a">bp-config</text>
52
+ </g>
53
+ </svg>
@@ -0,0 +1,5 @@
1
+ /** @jsxImportSource jsx-htmx */
2
+ import type { HtmlRenderable } from "@betterportal/framework";
3
+ import type { ResponseData } from "../index.js";
4
+ export declare function render(data: ResponseData): HtmlRenderable;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/plugins/service-betterportal-docs-site/bp-routes/docs/[section]/[page]/_theme.bootstrap1/index.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AA0HhD,wBAAgB,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,cAAc,CAqCzD"}
@@ -0,0 +1,96 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "jsx-htmx/jsx-runtime";
2
+ import { renderMarkdown } from "../../../rendering/markdown.js";
3
+ function sectionLabel(section) {
4
+ return section
5
+ .split(/[-_]/)
6
+ .filter(Boolean)
7
+ .map((part) => part[0]?.toUpperCase() + part.slice(1))
8
+ .join(" ");
9
+ }
10
+ function pageStyles() {
11
+ return (_jsx("style", { children: `
12
+ .bp-doc-page {
13
+ --bp-doc-page-blue: rgba(59,130,246,.14);
14
+ --bp-doc-page-green: rgba(34,197,94,.12);
15
+ --bp-doc-page-amber: rgba(245,158,11,.14);
16
+ }
17
+ .bp-doc-page-hero {
18
+ border: 1px solid var(--bs-border-color);
19
+ background: linear-gradient(135deg, var(--bp-doc-page-blue), var(--bp-doc-page-green) 55%, var(--bp-doc-page-amber));
20
+ overflow: hidden;
21
+ }
22
+ .bp-doc-page-art {
23
+ width: 100%;
24
+ height: 160px;
25
+ object-fit: cover;
26
+ border: 1px solid rgba(255,255,255,.55);
27
+ }
28
+ .bp-doc-page-source {
29
+ width: fit-content;
30
+ border: 1px solid var(--bs-border-color);
31
+ background: rgba(255,255,255,.48);
32
+ }
33
+ [data-bs-theme="dark"] .bp-doc-page-source { background: rgba(15,23,42,.32); }
34
+ .bp-doc-article {
35
+ max-width: 920px;
36
+ }
37
+ .bp-doc-article h1 {
38
+ margin-bottom: 1rem;
39
+ font-weight: 650;
40
+ }
41
+ .bp-doc-article h2 {
42
+ padding-top: 1rem;
43
+ border-top: 1px solid var(--bs-border-color);
44
+ font-weight: 650;
45
+ }
46
+ .bp-doc-article p {
47
+ max-width: 78ch;
48
+ }
49
+ .bp-doc-article ul {
50
+ padding-left: 1.25rem;
51
+ }
52
+ .bp-doc-article li {
53
+ margin-bottom: .4rem;
54
+ }
55
+ .bp-doc-article code {
56
+ border: 1px solid var(--bs-border-color);
57
+ border-radius: .25rem;
58
+ padding: .08rem .28rem;
59
+ background: var(--bs-tertiary-bg);
60
+ }
61
+ .bp-doc-article pre code {
62
+ border: 0;
63
+ padding: 0;
64
+ background: transparent;
65
+ }
66
+ .bp-doc-article table {
67
+ background: var(--bs-body-bg);
68
+ }
69
+ .bp-doc-related {
70
+ border: 1px solid var(--bs-border-color);
71
+ background: linear-gradient(180deg, var(--bs-body-bg), var(--bs-tertiary-bg));
72
+ }
73
+ .bp-doc-related a {
74
+ transition: transform .12s ease, border-color .12s ease;
75
+ }
76
+ .bp-doc-related a:hover {
77
+ transform: translateY(-2px);
78
+ border-color: rgba(59,130,246,.45) !important;
79
+ }
80
+ ` }));
81
+ }
82
+ function relatedDocs(data) {
83
+ const related = data.docs
84
+ .filter((doc) => doc.section === data.section && doc.page !== data.page)
85
+ .slice(0, 3);
86
+ if (related.length === 0)
87
+ return "";
88
+ return (_jsxs("div", { class: "bp-doc-related rounded-2 p-4 mt-5", children: [_jsxs("div", { class: "small text-body-secondary text-uppercase fw-semibold mb-3", children: ["Related in ", sectionLabel(data.section)] }), _jsx("div", { class: "row row-cols-1 row-cols-md-3 g-3", children: related.map((doc) => (_jsx("div", { class: "col", children: _jsxs("a", { class: "d-block h-100 text-decoration-none text-body border rounded-2 bg-body p-3", href: doc.href, "hx-get": doc.href, "hx-target": "#bp-main", "hx-swap": "innerHTML", "hx-push-url": doc.href, "data-bp-service": "docs-site", children: [_jsx("div", { class: "fw-semibold mb-2", children: doc.title }), _jsx("div", { class: "small text-body-secondary", children: doc.excerpt })] }) }))) })] }));
89
+ }
90
+ function markdownWithoutTitle(markdown) {
91
+ return markdown.replace(/^# .*(\r?\n)+/, "");
92
+ }
93
+ export function render(data) {
94
+ return (_jsxs("section", { class: "bp-doc-page container-fluid px-0", "data-bp-service": "docs-site", children: [pageStyles(), data.notFound ? (_jsxs("div", { class: "alert alert-warning", children: [_jsx("h1", { class: "h5 alert-heading mb-2", children: "Doc not found" }), _jsxs("p", { class: "mb-0", children: ["No Markdown file exists at ", _jsx("code", { children: data.sourcePath }), "."] })] })) : (_jsxs(_Fragment, { children: [_jsx("div", { class: "bp-doc-page-hero rounded-2 p-4 p-lg-5 mb-4", children: _jsxs("div", { class: "row align-items-center g-4", children: [_jsxs("div", { class: "col-lg-8", children: [_jsxs("div", { class: "d-flex flex-wrap align-items-center gap-2 mb-3", children: [_jsx("span", { class: "badge text-bg-primary", children: sectionLabel(data.section) }), _jsx("span", { class: "bp-doc-page-source small text-body-secondary rounded-pill px-3 py-1 font-monospace", children: data.sourcePath })] }), _jsx("div", { class: "small text-body-secondary text-uppercase fw-semibold", children: "BetterPortal guide" })] }), _jsx("div", { class: "col-lg-4", children: _jsx("img", { class: "bp-doc-page-art rounded-2", src: "/docs-assets/doc-wave.svg", alt: "BetterPortal documentation visual accent" }) })] }) }), _jsx("article", { class: "bp-doc-article lh-lg", children: renderMarkdown(markdownWithoutTitle(data.markdown)) }), relatedDocs(data)] }))] }));
95
+ }
96
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../src/plugins/service-betterportal-docs-site/bp-routes/docs/[section]/[page]/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AC5C,EACT,WAAW,CAAC,IAAI,CAAC,IACjB,CACJ,IACO,CACX,CAAC;AACJ,CAAC"}
@@ -0,0 +1,44 @@
1
+ import * as av from "anyvali";
2
+ import type { Infer } from "anyvali";
3
+ import { type CacheHints, type DemoScenario, type ApiAuthRequirement } from "@betterportal/framework";
4
+ export declare const ResponseSchema: av.ObjectSchema<{
5
+ title: av.StringSchema;
6
+ section: av.StringSchema;
7
+ page: av.StringSchema;
8
+ sourcePath: av.StringSchema;
9
+ markdown: av.StringSchema;
10
+ docs: av.ArraySchema<av.ObjectSchema<{
11
+ id: av.StringSchema;
12
+ section: av.StringSchema;
13
+ page: av.StringSchema;
14
+ title: av.StringSchema;
15
+ href: av.StringSchema;
16
+ sourcePath: av.StringSchema;
17
+ excerpt: av.StringSchema;
18
+ }>>;
19
+ notFound: av.BoolSchema;
20
+ }>;
21
+ export type ResponseData = Infer<typeof ResponseSchema>;
22
+ export declare const title = "BetterPortal Doc Page";
23
+ export declare const description = "Markdown-backed BetterPortal documentation page.";
24
+ export declare const auth: ApiAuthRequirement;
25
+ export declare const cacheHints: CacheHints;
26
+ export declare const demoScenarios: DemoScenario<ResponseData>[];
27
+ export declare const handleGet: import("@betterportal/framework").RouteHandler<Record<string, string>, Record<string, unknown>, Record<string, string>, Record<string, unknown>, {
28
+ title: string;
29
+ section: string;
30
+ page: string;
31
+ sourcePath: string;
32
+ markdown: string;
33
+ docs: {
34
+ id: string;
35
+ section: string;
36
+ page: string;
37
+ title: string;
38
+ href: string;
39
+ sourcePath: string;
40
+ excerpt: string;
41
+ }[];
42
+ notFound: boolean;
43
+ }, unknown, Record<string, unknown>>;
44
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/plugins/service-betterportal-docs-site/bp-routes/docs/[section]/[page]/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACxB,MAAM,yBAAyB,CAAC;AAajC,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;EAQC,CAAC;AAC7B,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAExD,eAAO,MAAM,KAAK,0BAA0B,CAAC;AAC7C,eAAO,MAAM,WAAW,qDAAqD,CAAC;AAE9E,eAAO,MAAM,IAAI,EAAE,kBAGlB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAGxB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,YAAY,CAAC,YAAY,CAAC,EAcrD,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;oCA8BrB,CAAC"}
@@ -0,0 +1,73 @@
1
+ import * as av from "anyvali";
2
+ import { createHandler } from "@betterportal/framework";
3
+ import { getDoc, listDocs } from "../../content.js";
4
+ const DocSummarySchema = av.object({
5
+ id: av.string().minLength(1),
6
+ section: av.string().minLength(1),
7
+ page: av.string().minLength(1),
8
+ title: av.string().minLength(1),
9
+ href: av.string().minLength(1),
10
+ sourcePath: av.string().minLength(1),
11
+ excerpt: av.string()
12
+ }, { unknownKeys: "strip" });
13
+ export const ResponseSchema = av.object({
14
+ title: av.string().minLength(1),
15
+ section: av.string().minLength(1),
16
+ page: av.string().minLength(1),
17
+ sourcePath: av.string().minLength(1),
18
+ markdown: av.string(),
19
+ docs: av.array(DocSummarySchema),
20
+ notFound: av.bool()
21
+ }, { unknownKeys: "strip" });
22
+ export const title = "BetterPortal Doc Page";
23
+ export const description = "Markdown-backed BetterPortal documentation page.";
24
+ export const auth = {
25
+ required: false,
26
+ permissions: []
27
+ };
28
+ export const cacheHints = {
29
+ ttlSeconds: 15,
30
+ varyBy: ["accept", "origin", "referer", ":origin", ":referer"]
31
+ };
32
+ export const demoScenarios = [
33
+ {
34
+ id: "default",
35
+ title: "Quick Start",
36
+ response: {
37
+ title: "Quick Start",
38
+ section: "getting-started",
39
+ page: "quick-start",
40
+ sourcePath: "getting-started/quick-start.md",
41
+ markdown: "# Quick Start\n\nBetterPortal documentation.",
42
+ docs: [],
43
+ notFound: false
44
+ }
45
+ }
46
+ ];
47
+ export const handleGet = createHandler({ response: ResponseSchema }, async (ctx) => {
48
+ const params = ctx.params;
49
+ const section = params.section ?? "";
50
+ const page = params.page ?? "";
51
+ const [doc, docs] = await Promise.all([getDoc(section, page), listDocs()]);
52
+ if (!doc) {
53
+ return {
54
+ title: "Doc not found",
55
+ section,
56
+ page,
57
+ sourcePath: `${section}/${page}.md`,
58
+ markdown: "# Doc not found\n\nThe requested documentation page does not exist.",
59
+ docs,
60
+ notFound: true
61
+ };
62
+ }
63
+ return {
64
+ title: doc.title,
65
+ section: doc.section,
66
+ page: doc.page,
67
+ sourcePath: doc.sourcePath,
68
+ markdown: doc.markdown,
69
+ docs,
70
+ notFound: false
71
+ };
72
+ });
73
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/plugins/service-betterportal-docs-site/bp-routes/docs/[section]/[page]/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAE9B,OAAO,EACL,aAAa,EAId,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,gBAAgB,GAAG,EAAE,CAAC,MAAM,CAAC;IACjC,EAAE,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAC5B,OAAO,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IACjC,IAAI,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAC9B,K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AC"}
@@ -0,0 +1,5 @@
1
+ /** @jsxImportSource jsx-htmx */
2
+ import type { HtmlRenderable } from "@betterportal/framework";
3
+ import type { ResponseData } from "../index.js";
4
+ export declare function render(data: ResponseData): HtmlRenderable;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/plugins/service-betterportal-docs-site/bp-routes/docs/_theme.bootstrap1/index.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AA+IhD,wBAAgB,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,cAAc,CAqEzD"}
@@ -0,0 +1,95 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "jsx-htmx/jsx-runtime";
2
+ function docById(data, id) {
3
+ return data.docs.find((doc) => doc.id === id);
4
+ }
5
+ function docLink(doc, label, variant = "primary") {
6
+ if (!doc)
7
+ return "";
8
+ return (_jsx("a", { class: `btn btn-${variant} px-3`, href: doc.href, "hx-get": doc.href, "hx-target": "#bp-main", "hx-swap": "innerHTML", "hx-push-url": doc.href, "data-bp-service": "docs-site", children: label }));
9
+ }
10
+ function homeStyles() {
11
+ return (_jsx("style", { children: `
12
+ .bp-docs-home {
13
+ --bp-docs-ink: var(--bs-body-color);
14
+ --bp-docs-soft: rgba(59, 130, 246, .10);
15
+ --bp-docs-green: rgba(34, 197, 94, .12);
16
+ --bp-docs-amber: rgba(245, 158, 11, .14);
17
+ --bp-docs-pink: rgba(236, 72, 153, .10);
18
+ }
19
+ .bp-docs-hero {
20
+ border: 1px solid var(--bs-border-color);
21
+ background:
22
+ linear-gradient(135deg, rgba(59,130,246,.16), rgba(34,197,94,.08) 42%, rgba(245,158,11,.10));
23
+ overflow: hidden;
24
+ }
25
+ .bp-docs-hero-art {
26
+ width: 100%;
27
+ display: block;
28
+ border: 1px solid rgba(255,255,255,.52);
29
+ box-shadow: 0 1rem 2.5rem rgba(15,23,42,.16);
30
+ }
31
+ .bp-docs-hero h1 { letter-spacing: 0; }
32
+ .bp-docs-kicker {
33
+ width: fit-content;
34
+ border: 1px solid rgba(59,130,246,.28);
35
+ background: rgba(255,255,255,.45);
36
+ }
37
+ [data-bs-theme="dark"] .bp-docs-kicker { background: rgba(15,23,42,.32); }
38
+ .bp-docs-node {
39
+ border: 1px solid var(--bs-border-color);
40
+ background: var(--bs-body-bg);
41
+ }
42
+ .bp-docs-node.is-theme { background: var(--bp-docs-soft); }
43
+ .bp-docs-node.is-service { background: var(--bp-docs-green); }
44
+ .bp-docs-node.is-config { background: var(--bp-docs-amber); }
45
+ .bp-docs-line {
46
+ height: 2px;
47
+ background: linear-gradient(90deg, rgba(59,130,246,.45), rgba(34,197,94,.45));
48
+ }
49
+ .bp-docs-feature {
50
+ border: 1px solid var(--bs-border-color);
51
+ background: var(--bs-body-bg);
52
+ box-shadow: 0 .5rem 1.5rem rgba(15,23,42,.06);
53
+ }
54
+ .bp-docs-feature-mark {
55
+ width: .5rem;
56
+ min-height: 100%;
57
+ border-radius: .25rem;
58
+ }
59
+ .bp-docs-path {
60
+ border: 1px solid var(--bs-border-color);
61
+ background: linear-gradient(180deg, var(--bs-body-bg), var(--bs-tertiary-bg));
62
+ }
63
+ .bp-docs-list .list-group-item {
64
+ border-left: 0;
65
+ border-right: 0;
66
+ }
67
+ .bp-docs-list .list-group-item:first-child { border-top: 0; }
68
+ .bp-docs-list .list-group-item:last-child { border-bottom: 0; }
69
+ ` }));
70
+ }
71
+ function feature(title, copy, tone) {
72
+ const toneClass = {
73
+ blue: "bg-primary",
74
+ green: "bg-success",
75
+ amber: "bg-warning",
76
+ pink: "bg-danger"
77
+ }[tone];
78
+ return (_jsx("div", { class: "col", children: _jsxs("div", { class: "bp-docs-feature h-100 rounded-2 d-flex overflow-hidden", children: [_jsx("div", { class: `bp-docs-feature-mark ${toneClass}` }), _jsxs("div", { class: "p-3", children: [_jsx("h2", { class: "h5 mb-2", children: title }), _jsx("p", { class: "text-body-secondary mb-0", children: copy })] })] }) }));
79
+ }
80
+ function sectionDocs(data, section) {
81
+ return data.docs.filter((doc) => doc.section === section);
82
+ }
83
+ function docsList(title, subtitle, docs) {
84
+ if (docs.length === 0)
85
+ return "";
86
+ return (_jsxs("div", { class: "bp-docs-list", children: [_jsxs("div", { class: "d-flex flex-column gap-1 mb-3", children: [_jsx("h2", { class: "h5 mb-0", children: title }), _jsx("p", { class: "small text-body-secondary mb-0", children: subtitle })] }), _jsx("div", { class: "list-group list-group-flush border rounded-2 overflow-hidden bg-body", children: docs.map((doc) => (_jsx("a", { class: "list-group-item list-group-item-action py-3", href: doc.href, "hx-get": doc.href, "hx-target": "#bp-main", "hx-swap": "innerHTML", "hx-push-url": doc.href, "data-bp-service": "docs-site", children: _jsxs("div", { class: "d-flex align-items-start justify-content-between gap-3", children: [_jsxs("div", { class: "d-flex flex-column gap-1", children: [_jsx("span", { class: "fw-semibold", children: doc.title }), _jsx("span", { class: "small text-body-secondary", children: doc.excerpt })] }), _jsx("span", { class: "badge text-bg-light border font-monospace", children: doc.section })] }) }))) })] }));
87
+ }
88
+ export function render(data) {
89
+ const startDoc = docById(data, "getting-started/quick-start");
90
+ const conceptDoc = docById(data, "getting-started/what-is-betterportal");
91
+ const buildDoc = docById(data, "building/services");
92
+ const operationDoc = docById(data, "operations/configuration");
93
+ return (_jsxs("section", { class: "bp-docs-home container-fluid px-0", "data-bp-service": "docs-site", children: [homeStyles(), _jsx("div", { class: "bp-docs-hero rounded-2 p-4 p-lg-5 mb-4", children: _jsxs("div", { class: "row align-items-center g-5", children: [_jsxs("div", { class: "col-xl-7", children: [_jsx("div", { class: "bp-docs-kicker small text-primary fw-semibold text-uppercase rounded-pill px-3 py-2 mb-3", children: "BetterPortal v10 docs" }), _jsx("h1", { class: "display-4 fw-semibold mb-3", children: data.title }), _jsx("p", { class: "lead text-body-secondary mb-4 col-lg-10", children: data.description }), _jsxs("div", { class: "d-flex flex-wrap gap-2", children: [docLink(startDoc, "Start building"), docLink(conceptDoc, "Learn the platform", "outline-primary")] })] }), _jsx("div", { class: "col-xl-5", children: _jsx("img", { class: "bp-docs-hero-art rounded-2", src: "/docs-assets/portal-map.svg", alt: "BetterPortal theme shell connected to services and platform configuration" }) })] }) }), _jsxs("div", { class: "row row-cols-1 row-cols-md-2 row-cols-xl-4 g-3 mb-5", children: [feature("One portal, many services", "Compose independently deployed services into one app shell without iframes or SPA routing.", "blue"), feature("HTML as the API", "Services return validated data and theme-specific HTML fragments that HTMX swaps into place.", "green"), feature("Tenant-aware by default", "Apps, services, routes, menus, fragments, and branding are driven from platform config.", "amber"), feature("Built for ownership", "Each team can own a service boundary while the user experiences a single product.", "pink")] }), _jsxs("div", { class: "row g-4 mb-5", children: [_jsx("div", { class: "col-lg-6", children: _jsxs("div", { class: "bp-docs-path rounded-2 p-4 h-100", children: [_jsx("div", { class: "small text-primary text-uppercase fw-semibold mb-2", children: "Build path" }), _jsx("h2", { class: "h4 mb-3", children: "Ship a feature as a service" }), _jsx("p", { class: "text-body-secondary", children: "Create typed views, add Bootstrap renderers, expose a manifest, and bind the service into the shell through BP routes." }), docLink(buildDoc, "Build a service", "outline-primary")] }) }), _jsx("div", { class: "col-lg-6", children: _jsxs("div", { class: "bp-docs-path rounded-2 p-4 h-100", children: [_jsx("div", { class: "small text-success text-uppercase fw-semibold mb-2", children: "Operate path" }), _jsx("h2", { class: "h4 mb-3", children: "Run the portal from config" }), _jsx("p", { class: "text-body-secondary", children: "Manage tenants, app routes, menus, theme settings, service bindings, and deployment checks from one platform model." }), docLink(operationDoc, "Configure the platform", "outline-primary")] }) })] }), data.docs.length === 0 ? (_jsx("div", { class: "alert alert-secondary", children: "No Markdown docs were found." })) : (_jsxs("div", { class: "row g-4", children: [_jsx("div", { class: "col-lg-6", children: docsList("Get started", "Understand the platform and get a local portal running.", sectionDocs(data, "getting-started")) }), _jsx("div", { class: "col-lg-6", children: docsList("Platform", "Architecture, service boundaries, security, and auth.", sectionDocs(data, "platform")) }), _jsx("div", { class: "col-lg-6", children: docsList("Build", "Create BetterPortal services, routes, views, and themes.", sectionDocs(data, "building")) }), _jsx("div", { class: "col-lg-6", children: docsList("Operate", "Configure, deploy, administer, and troubleshoot BP.", [...sectionDocs(data, "operations"), ...sectionDocs(data, "admin"), ...sectionDocs(data, "reference")]) })] }))] }));
94
+ }
95
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/plugins/service-betterportal-docs-site/bp-routes/docs/_theme.bootstrap1/index.tsx"],"names":[],"mappings":";AAIA,SAAS,OAAO,CAAC,IAAkB,EAAE,EAAU;IAC7C,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AAChD,CAAC;AAED,SAAS,OAAO,CAAC,GAA6C,EAAE,KAAa,EAAE,OAAO,GAAG,SAAS;IAChG,IAAI,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC;IACpB,OAAO,CACL,YACE,KAAK,EAAE,WAAW,OAAO,OAAO,EAChC,IAAI,EAAE,GAAG,CAAC,IAAI,YACN,GAAG,CAAC,IAAI,eACN,UAAU,aACZ,WAAW,iBACN,GAAG,CAAC,IAAI,qBACL,WAAW,YAC3B,KAAK,GAAK,CACb,CAAC;AACJ,CAAC;AAED,SAAS,UAAU;IACjB,OAAO,CACL,0BAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA0DP,GAAS,CACX,CAAC;AACJ,CAAC;AAED,SAAS,OAAO,CAAC,KAAa,EAAE,IAAY,EAAE,IAAyC;IACrF,MAAM,SAAS,GAAG;QAChB,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,YAAY;QACnB,K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AC1I,cAAK,KAAK,EAAC,UAAU,YAAE,QAAQ,CAAC,SAAS,EAAE,qDAAqD,EAAE,CAAC,GAAG,WAAW,CAAC,IAAI,EAAE,YAAY,CAAC,EAAE,GAAG,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,GAAG,WAAW,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,GAAO,IAC5M,CACP,IACO,CACX,CAAC;AACJ,CAAC"}
@@ -0,0 +1,15 @@
1
+ export interface DocSummary {
2
+ id: string;
3
+ section: string;
4
+ page: string;
5
+ title: string;
6
+ href: string;
7
+ sourcePath: string;
8
+ excerpt: string;
9
+ }
10
+ export interface DocPage extends DocSummary {
11
+ markdown: string;
12
+ }
13
+ export declare function listDocs(): Promise<DocSummary[]>;
14
+ export declare function getDoc(section: string, page: string): Promise<DocPage | null>;
15
+ //# sourceMappingURL=content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-docs-site/bp-routes/docs/content.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,OAAQ,SAAQ,UAAU;IACzC,QAAQ,EAAE,MAAM,CAAC;CAClB;AA8CD,wBAAsB,QAAQ,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAgCtD;AAED,wBAAsB,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAoBnF"}