@redocly/realm 0.124.2 → 0.124.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/client/runtime/generated/browser-plugins.js +12 -0
- package/dist/client/runtime/generated/package.json +1 -0
- package/dist/client/runtime/generated/routes.js +6 -0
- package/dist/client/runtime/generated/templates.js +27 -0
- package/dist/server/esbuild/cache/server/api-request-handlers-entry.js +13 -0
- package/dist/server/esbuild/cache/server/chunks/403-QNUJFFYN.js +21 -0
- package/dist/server/esbuild/cache/server/chunks/403OIDC-XVNN4OKQ.js +20 -0
- package/dist/server/esbuild/cache/server/chunks/404-TJA4JKKM.js +22 -0
- package/dist/server/esbuild/cache/server/chunks/AsyncApiDocs-DO2XADGJ.js +5012 -0
- package/dist/server/esbuild/cache/server/chunks/AsyncApiDocs-LWZY6WLJ.css +228 -0
- package/dist/server/esbuild/cache/server/chunks/CatalogClassic-62FIL6VX.js +27 -0
- package/dist/server/esbuild/cache/server/chunks/CompilationError-3AK7S6GQ.js +28 -0
- package/dist/server/esbuild/cache/server/chunks/ErrorDetails-NOXCZVSO.css +228 -0
- package/dist/server/esbuild/cache/server/chunks/ErrorDetails-Z6XTH26B.js +32 -0
- package/dist/server/esbuild/cache/server/chunks/GraphQLDocs-R7GIPOHX.js +14517 -0
- package/dist/server/esbuild/cache/server/chunks/GraphQLDocs-XWEZKQTJ.css +228 -0
- package/dist/server/esbuild/cache/server/chunks/Invite-JG7HOKGB.js +72 -0
- package/dist/server/esbuild/cache/server/chunks/Markdown-U5QMVBIW.js +90 -0
- package/dist/server/esbuild/cache/server/chunks/OpenAPIDocs-33NUY4VY.js +93 -0
- package/dist/server/esbuild/cache/server/chunks/OpenAPIDocs-QNK5DFJC.css +228 -0
- package/dist/server/esbuild/cache/server/chunks/ar-QYSYPAAE.js +9 -0
- package/dist/server/esbuild/cache/server/chunks/changelog.page-P7J4MWQX.js +9133 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-27G3BZUU.js +6053 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-37VWTTWG.js +112 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-3F23673J.js +63 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-5Q7CA7UT.js +3610 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-5RECXZNE.js +23042 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-5WWZZ3I5.js +148 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-65DJDEU7.js +21923 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-6TWMFDXM.js +50 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-6ZPXNRVV.js +72349 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-72YI47PJ.js +61 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-AOEKZ7MP.js +1653 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-ARMFCOWJ.js +58 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-CEMEM3CC.js +1201 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-CYRM4SZM.js +200 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-CZ4WUWHR.js +145 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-EPDKKVDX.js +49 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-F2FIOV3B.js +3564 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-FN46NAFA.js +880 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-FWP7SBRO.js +40 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-HH6YBD7K.js +39 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-HMCVWUH5.js +21734 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-IPLOR6BM.js +39 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-IU4AXQIQ.js +20 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-OFZF52DH.js +367 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-ORVLLFH3.js +34 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-PLCILU3C.js +189 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-PP5BCTYO.js +481 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-PS2DM6W4.js +233 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-PX5DFLJN.js +6418 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-QD5LMSMC.js +39 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-R2ATFYSQ.js +18 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-RAOSTGG5.js +68 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-RD675JLY.js +63 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-RP4GABLB.js +104 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-TSM7ATHM.js +63 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-UNPSJPQX.js +421 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-UOJU7UCE.js +117 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-VQWN4DGI.js +117 -0
- package/dist/server/esbuild/cache/server/chunks/chunk-ZTN3K75A.js +17085 -0
- package/dist/server/esbuild/cache/server/chunks/de-NFTIOJWS.js +9 -0
- package/dist/server/esbuild/cache/server/chunks/en-MHWJMBVA.js +9 -0
- package/dist/server/esbuild/cache/server/chunks/es-FNU5GYZ3.js +9 -0
- package/dist/server/esbuild/cache/server/chunks/fr-26CHXVGL.js +9 -0
- package/dist/server/esbuild/cache/server/chunks/get-server-props-6AZWGXNL.js +23 -0
- package/dist/server/esbuild/cache/server/chunks/get-server-props-7QLMUENA.js +35 -0
- package/dist/server/esbuild/cache/server/chunks/get-server-props-CBKOAQ63.js +23 -0
- package/dist/server/esbuild/cache/server/chunks/get-server-props-UVJ7E655.js +257 -0
- package/dist/server/esbuild/cache/server/chunks/get-server-props-custom-fields-3L6PMPKS.js +30 -0
- package/dist/server/esbuild/cache/server/chunks/getMachineId-bsd-XBQCAKER.js +41 -0
- package/dist/server/esbuild/cache/server/chunks/getMachineId-darwin-75TDDERU.js +41 -0
- package/dist/server/esbuild/cache/server/chunks/getMachineId-linux-ZVY3HPZF.js +33 -0
- package/dist/server/esbuild/cache/server/chunks/getMachineId-unsupported-Z55ZGKX4.js +24 -0
- package/dist/server/esbuild/cache/server/chunks/getMachineId-win-XFRAFDV7.js +43 -0
- package/dist/server/esbuild/cache/server/chunks/hi-LMIMTEVV.js +9 -0
- package/dist/server/esbuild/cache/server/chunks/it-KQBB6UHC.js +9 -0
- package/dist/server/esbuild/cache/server/chunks/ja-M4G7SWOW.js +9 -0
- package/dist/server/esbuild/cache/server/chunks/ko-UMCYPTNU.js +9 -0
- package/dist/server/esbuild/cache/server/chunks/lib-7OVRXOGN.js +9738 -0
- package/dist/server/esbuild/cache/server/chunks/mock-server-request-handler-EPNUNSB4.js +19760 -0
- package/dist/server/esbuild/cache/server/chunks/openapi-PYAD6YIG.js +211 -0
- package/dist/server/esbuild/cache/server/chunks/openapi-SWJOOCDZ.css +228 -0
- package/dist/server/esbuild/cache/server/chunks/pl-WFS4SBNZ.js +9 -0
- package/dist/server/esbuild/cache/server/chunks/pt-BR-6UMAIW4R.js +9 -0
- package/dist/server/esbuild/cache/server/chunks/pt-H3U3OOD6.js +9 -0
- package/dist/server/esbuild/cache/server/chunks/replay-SG7SV62B.js +44 -0
- package/dist/server/esbuild/cache/server/chunks/replay-tauri-path-CUezwea2-PVNYM2NO.js +51 -0
- package/dist/server/esbuild/cache/server/chunks/ru-XWABYCCX.js +9 -0
- package/dist/server/esbuild/cache/server/chunks/schema-OQNNVD4I.js +9 -0
- package/dist/server/esbuild/cache/server/chunks/spec-download.api-224C7JPA.js +2678 -0
- package/dist/server/esbuild/cache/server/chunks/spec-download.api-456PUG54.js +36 -0
- package/dist/server/esbuild/cache/server/chunks/template-NMUEV3UV.css +228 -0
- package/dist/server/esbuild/cache/server/chunks/template-TMZOF26J.js +6490 -0
- package/dist/server/esbuild/cache/server/chunks/uk-SANI42KH.js +9 -0
- package/dist/server/esbuild/cache/server/chunks/zh-FC3S2NSG.js +9 -0
- package/dist/server/esbuild/cache/server/middleware-entry.js +9 -0
- package/dist/server/esbuild/cache/server/migrations/catalog-sqlite/0000_initial_migration.sql +46 -0
- package/dist/server/esbuild/cache/server/migrations/catalog-sqlite/meta/0000_snapshot.json +307 -0
- package/dist/server/esbuild/cache/server/migrations/catalog-sqlite/meta/_journal.json +13 -0
- package/dist/server/esbuild/cache/server/migrations/main-sqlite/0000_initial_migration.sql +11 -0
- package/dist/server/esbuild/cache/server/migrations/main-sqlite/meta/0000_snapshot.json +82 -0
- package/dist/server/esbuild/cache/server/migrations/main-sqlite/meta/_journal.json +13 -0
- package/dist/server/esbuild/cache/server/package.json +1 -0
- package/dist/server/esbuild/cache/server/server-entry.css +294 -0
- package/dist/server/esbuild/cache/server/server-entry.js +1716 -0
- package/dist/server/esbuild/cache/server/server-props-entry.js +15 -0
- package/dist/server/esbuild/cache/server/user-tags-entry.js +9 -0
- package/package.json +5 -5
|
@@ -0,0 +1,1716 @@
|
|
|
1
|
+
import { createRequire as topLevelCreateRequire } from 'module';
|
|
2
|
+
const require = topLevelCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
c,
|
|
5
|
+
c2
|
|
6
|
+
} from "./chunks/chunk-EPDKKVDX.js";
|
|
7
|
+
import {
|
|
8
|
+
A,
|
|
9
|
+
components,
|
|
10
|
+
custom_components_exports,
|
|
11
|
+
x
|
|
12
|
+
} from "./chunks/chunk-UOJU7UCE.js";
|
|
13
|
+
import {
|
|
14
|
+
o as o2
|
|
15
|
+
} from "./chunks/chunk-R2ATFYSQ.js";
|
|
16
|
+
import {
|
|
17
|
+
G as G2
|
|
18
|
+
} from "./chunks/chunk-FWP7SBRO.js";
|
|
19
|
+
import {
|
|
20
|
+
B,
|
|
21
|
+
C,
|
|
22
|
+
D,
|
|
23
|
+
E,
|
|
24
|
+
E2,
|
|
25
|
+
E3,
|
|
26
|
+
F,
|
|
27
|
+
F2,
|
|
28
|
+
Jr,
|
|
29
|
+
L,
|
|
30
|
+
L2,
|
|
31
|
+
O,
|
|
32
|
+
O2,
|
|
33
|
+
Q,
|
|
34
|
+
R,
|
|
35
|
+
S as S2,
|
|
36
|
+
S2 as S3,
|
|
37
|
+
U,
|
|
38
|
+
b as b2,
|
|
39
|
+
b2 as b3,
|
|
40
|
+
c as c3,
|
|
41
|
+
e as e2,
|
|
42
|
+
f,
|
|
43
|
+
f2,
|
|
44
|
+
g as g2,
|
|
45
|
+
h,
|
|
46
|
+
i as i2,
|
|
47
|
+
m,
|
|
48
|
+
n2 as n,
|
|
49
|
+
o,
|
|
50
|
+
p,
|
|
51
|
+
r as r2,
|
|
52
|
+
s as s2,
|
|
53
|
+
s2 as s3,
|
|
54
|
+
se,
|
|
55
|
+
t,
|
|
56
|
+
t2,
|
|
57
|
+
w,
|
|
58
|
+
w2,
|
|
59
|
+
w3,
|
|
60
|
+
x as x2
|
|
61
|
+
} from "./chunks/chunk-HMCVWUH5.js";
|
|
62
|
+
import {
|
|
63
|
+
S,
|
|
64
|
+
e,
|
|
65
|
+
g
|
|
66
|
+
} from "./chunks/chunk-VQWN4DGI.js";
|
|
67
|
+
import "./chunks/chunk-5Q7CA7UT.js";
|
|
68
|
+
import {
|
|
69
|
+
G,
|
|
70
|
+
_,
|
|
71
|
+
b,
|
|
72
|
+
i,
|
|
73
|
+
r,
|
|
74
|
+
s,
|
|
75
|
+
u
|
|
76
|
+
} from "./chunks/chunk-72YI47PJ.js";
|
|
77
|
+
import {
|
|
78
|
+
Admonition2 as Admonition,
|
|
79
|
+
GlobalStyle,
|
|
80
|
+
InternalServerErrorLayout,
|
|
81
|
+
Menu,
|
|
82
|
+
PageLayout,
|
|
83
|
+
RootLayout,
|
|
84
|
+
SidebarActions,
|
|
85
|
+
VersionPicker,
|
|
86
|
+
WarningFilledIcon,
|
|
87
|
+
default_exports,
|
|
88
|
+
init_Admonition,
|
|
89
|
+
init_Menu,
|
|
90
|
+
init_PageLayout,
|
|
91
|
+
init_RootLayout,
|
|
92
|
+
init_SidebarActions,
|
|
93
|
+
init_VersionPicker,
|
|
94
|
+
init_WarningFilledIcon,
|
|
95
|
+
init_default,
|
|
96
|
+
init_src,
|
|
97
|
+
init_styles
|
|
98
|
+
} from "./chunks/chunk-65DJDEU7.js";
|
|
99
|
+
import "./chunks/chunk-3F23673J.js";
|
|
100
|
+
import "./chunks/chunk-RAOSTGG5.js";
|
|
101
|
+
import "./chunks/chunk-ARMFCOWJ.js";
|
|
102
|
+
import "./chunks/chunk-CEMEM3CC.js";
|
|
103
|
+
import "./chunks/chunk-ORVLLFH3.js";
|
|
104
|
+
import "./chunks/chunk-UNPSJPQX.js";
|
|
105
|
+
import "./chunks/chunk-PS2DM6W4.js";
|
|
106
|
+
import {
|
|
107
|
+
ArrowLeftIcon,
|
|
108
|
+
init_ArrowLeftIcon
|
|
109
|
+
} from "./chunks/chunk-QD5LMSMC.js";
|
|
110
|
+
import {
|
|
111
|
+
Sidebar,
|
|
112
|
+
Tag,
|
|
113
|
+
init_Sidebar
|
|
114
|
+
} from "./chunks/chunk-PX5DFLJN.js";
|
|
115
|
+
import "./chunks/chunk-PP5BCTYO.js";
|
|
116
|
+
import "./chunks/chunk-HH6YBD7K.js";
|
|
117
|
+
import {
|
|
118
|
+
init_hooks,
|
|
119
|
+
useColorSwitcher,
|
|
120
|
+
useOutsideClick,
|
|
121
|
+
useThemeConfig
|
|
122
|
+
} from "./chunks/chunk-F2FIOV3B.js";
|
|
123
|
+
import {
|
|
124
|
+
Button,
|
|
125
|
+
init_Button
|
|
126
|
+
} from "./chunks/chunk-5WWZZ3I5.js";
|
|
127
|
+
import {
|
|
128
|
+
ThemeDataContext
|
|
129
|
+
} from "./chunks/chunk-RD675JLY.js";
|
|
130
|
+
import {
|
|
131
|
+
SEARCH_DEBOUNCE_TIME_MS,
|
|
132
|
+
Ue,
|
|
133
|
+
combineUrls,
|
|
134
|
+
fe,
|
|
135
|
+
init_constants,
|
|
136
|
+
init_styled_components_esm,
|
|
137
|
+
init_utils,
|
|
138
|
+
styled_components_esm_default,
|
|
139
|
+
withPathPrefix
|
|
140
|
+
} from "./chunks/chunk-27G3BZUU.js";
|
|
141
|
+
import "./chunks/chunk-AOEKZ7MP.js";
|
|
142
|
+
import {
|
|
143
|
+
__commonJS,
|
|
144
|
+
__toESM
|
|
145
|
+
} from "./chunks/chunk-6TWMFDXM.js";
|
|
146
|
+
|
|
147
|
+
// ../../node_modules/.pnpm/anser@2.3.2/node_modules/anser/lib/index.js
|
|
148
|
+
var require_lib = __commonJS({
|
|
149
|
+
"../../node_modules/.pnpm/anser@2.3.2/node_modules/anser/lib/index.js"(exports, module) {
|
|
150
|
+
"use strict";
|
|
151
|
+
var _createClass = /* @__PURE__ */ function() {
|
|
152
|
+
function defineProperties(target, props) {
|
|
153
|
+
for (var i5 = 0; i5 < props.length; i5++) {
|
|
154
|
+
var descriptor = props[i5];
|
|
155
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
156
|
+
descriptor.configurable = true;
|
|
157
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
158
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return function(Constructor, protoProps, staticProps) {
|
|
162
|
+
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
|
163
|
+
if (staticProps) defineProperties(Constructor, staticProps);
|
|
164
|
+
return Constructor;
|
|
165
|
+
};
|
|
166
|
+
}();
|
|
167
|
+
function _classCallCheck(instance, Constructor) {
|
|
168
|
+
if (!(instance instanceof Constructor)) {
|
|
169
|
+
throw new TypeError("Cannot call a class as a function");
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
var ANSI_COLORS = [[{ color: "0, 0, 0", "class": "ansi-black" }, { color: "187, 0, 0", "class": "ansi-red" }, { color: "0, 187, 0", "class": "ansi-green" }, { color: "187, 187, 0", "class": "ansi-yellow" }, { color: "0, 0, 187", "class": "ansi-blue" }, { color: "187, 0, 187", "class": "ansi-magenta" }, { color: "0, 187, 187", "class": "ansi-cyan" }, { color: "255,255,255", "class": "ansi-white" }], [{ color: "85, 85, 85", "class": "ansi-bright-black" }, { color: "255, 85, 85", "class": "ansi-bright-red" }, { color: "0, 255, 0", "class": "ansi-bright-green" }, { color: "255, 255, 85", "class": "ansi-bright-yellow" }, { color: "85, 85, 255", "class": "ansi-bright-blue" }, { color: "255, 85, 255", "class": "ansi-bright-magenta" }, { color: "85, 255, 255", "class": "ansi-bright-cyan" }, { color: "255, 255, 255", "class": "ansi-bright-white" }]];
|
|
173
|
+
var linkRegex = /(https?:\/\/(?:[A-Za-z0-9#;/?:@=+$',_.!~*()[\]-]|&|%[A-Fa-f0-9]{2})+)/gm;
|
|
174
|
+
var Anser = function() {
|
|
175
|
+
_createClass(Anser2, null, [{
|
|
176
|
+
key: "escapeForHtml",
|
|
177
|
+
/**
|
|
178
|
+
* Anser.escapeForHtml
|
|
179
|
+
* Escape the input HTML.
|
|
180
|
+
*
|
|
181
|
+
* This does the minimum escaping of text to make it compliant with HTML.
|
|
182
|
+
* In particular, the '&','<', and '>' characters are escaped. This should
|
|
183
|
+
* be run prior to `ansiToHtml`.
|
|
184
|
+
*
|
|
185
|
+
* @name Anser.escapeForHtml
|
|
186
|
+
* @function
|
|
187
|
+
* @param {String} txt The input text (containing the ANSI snippets).
|
|
188
|
+
* @returns {String} The escaped html.
|
|
189
|
+
*/
|
|
190
|
+
value: function escapeForHtml(txt) {
|
|
191
|
+
return new Anser2().escapeForHtml(txt);
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Anser.linkify
|
|
195
|
+
* Adds the links in the HTML.
|
|
196
|
+
*
|
|
197
|
+
* This replaces any links in the text with anchor tags that display the
|
|
198
|
+
* link. You should apply this after you have run `ansiToHtml` on the text.
|
|
199
|
+
*
|
|
200
|
+
* @name Anser.linkify
|
|
201
|
+
* @function
|
|
202
|
+
* @param {String} txt The input text.
|
|
203
|
+
* @returns {String} The HTML containing the <a> tags (unescaped).
|
|
204
|
+
*/
|
|
205
|
+
}, {
|
|
206
|
+
key: "linkify",
|
|
207
|
+
value: function linkify(txt) {
|
|
208
|
+
return new Anser2().linkify(txt);
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Anser.ansiToHtml
|
|
212
|
+
* This replaces ANSI terminal escape codes with SPAN tags that wrap the
|
|
213
|
+
* content.
|
|
214
|
+
*
|
|
215
|
+
* This function only interprets ANSI SGR (Select Graphic Rendition) codes
|
|
216
|
+
* that can be represented in HTML.
|
|
217
|
+
* For example, cursor movement codes are ignored and hidden from output.
|
|
218
|
+
* The default style uses colors that are very close to the prescribed
|
|
219
|
+
* standard. The standard assumes that the text will have a black
|
|
220
|
+
* background. These colors are set as inline styles on the SPAN tags.
|
|
221
|
+
*
|
|
222
|
+
* Another option is to set `use_classes: true` in the options argument.
|
|
223
|
+
* This will instead set classes on the spans so the colors can be set via
|
|
224
|
+
* CSS. The class names used are of the format `ansi-*-fg/bg` and
|
|
225
|
+
* `ansi-bright-*-fg/bg` where `*` is the color name,
|
|
226
|
+
* i.e black/red/green/yellow/blue/magenta/cyan/white.
|
|
227
|
+
*
|
|
228
|
+
* @name Anser.ansiToHtml
|
|
229
|
+
* @function
|
|
230
|
+
* @param {String} txt The input text.
|
|
231
|
+
* @param {Object} options The options passed to the ansiToHTML method.
|
|
232
|
+
* @returns {String} The HTML output.
|
|
233
|
+
*/
|
|
234
|
+
}, {
|
|
235
|
+
key: "ansiToHtml",
|
|
236
|
+
value: function ansiToHtml(txt, options) {
|
|
237
|
+
return new Anser2().ansiToHtml(txt, options);
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Anser.ansiToJson
|
|
241
|
+
* Converts ANSI input into JSON output.
|
|
242
|
+
*
|
|
243
|
+
* @name Anser.ansiToJson
|
|
244
|
+
* @function
|
|
245
|
+
* @param {String} txt The input text.
|
|
246
|
+
* @param {Object} options The options passed to the ansiToHTML method.
|
|
247
|
+
* @returns {String} The HTML output.
|
|
248
|
+
*/
|
|
249
|
+
}, {
|
|
250
|
+
key: "ansiToJson",
|
|
251
|
+
value: function ansiToJson(txt, options) {
|
|
252
|
+
return new Anser2().ansiToJson(txt, options);
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Anser.ansiToText
|
|
256
|
+
* Converts ANSI input into text output.
|
|
257
|
+
*
|
|
258
|
+
* @name Anser.ansiToText
|
|
259
|
+
* @function
|
|
260
|
+
* @param {String} txt The input text.
|
|
261
|
+
* @returns {String} The text output.
|
|
262
|
+
*/
|
|
263
|
+
}, {
|
|
264
|
+
key: "ansiToText",
|
|
265
|
+
value: function ansiToText(txt) {
|
|
266
|
+
return new Anser2().ansiToText(txt);
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* Anser
|
|
270
|
+
* The `Anser` class.
|
|
271
|
+
*
|
|
272
|
+
* @name Anser
|
|
273
|
+
* @function
|
|
274
|
+
* @returns {Anser}
|
|
275
|
+
*/
|
|
276
|
+
}]);
|
|
277
|
+
function Anser2() {
|
|
278
|
+
_classCallCheck(this, Anser2);
|
|
279
|
+
this.fg = this.bg = this.fg_truecolor = this.bg_truecolor = null;
|
|
280
|
+
this.bright = 0;
|
|
281
|
+
this.decorations = [];
|
|
282
|
+
}
|
|
283
|
+
_createClass(Anser2, [{
|
|
284
|
+
key: "setupPalette",
|
|
285
|
+
value: function setupPalette() {
|
|
286
|
+
this.PALETTE_COLORS = [];
|
|
287
|
+
for (var i5 = 0; i5 < 2; ++i5) {
|
|
288
|
+
for (var j = 0; j < 8; ++j) {
|
|
289
|
+
this.PALETTE_COLORS.push(ANSI_COLORS[i5][j].color);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
var levels = [0, 95, 135, 175, 215, 255];
|
|
293
|
+
var format = function format2(r8, g9, b7) {
|
|
294
|
+
return levels[r8] + ", " + levels[g9] + ", " + levels[b7];
|
|
295
|
+
};
|
|
296
|
+
var r7 = void 0, g8 = void 0, b6 = void 0;
|
|
297
|
+
for (var _r = 0; _r < 6; ++_r) {
|
|
298
|
+
for (var _g = 0; _g < 6; ++_g) {
|
|
299
|
+
for (var _b = 0; _b < 6; ++_b) {
|
|
300
|
+
this.PALETTE_COLORS.push(format(_r, _g, _b));
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
var level = 8;
|
|
305
|
+
for (var _i = 0; _i < 24; ++_i, level += 10) {
|
|
306
|
+
this.PALETTE_COLORS.push(format(level, level, level));
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* escapeForHtml
|
|
311
|
+
* Escapes the input text.
|
|
312
|
+
*
|
|
313
|
+
* @name escapeForHtml
|
|
314
|
+
* @function
|
|
315
|
+
* @param {String} txt The input text.
|
|
316
|
+
* @returns {String} The escpaed HTML output.
|
|
317
|
+
*/
|
|
318
|
+
}, {
|
|
319
|
+
key: "escapeForHtml",
|
|
320
|
+
value: function escapeForHtml(txt) {
|
|
321
|
+
return txt.replace(/[&<>\"]/gm, function(str) {
|
|
322
|
+
return str == "&" ? "&" : str == '"' ? """ : str == "<" ? "<" : str == ">" ? ">" : "";
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* linkify
|
|
327
|
+
* Adds HTML link elements.
|
|
328
|
+
*
|
|
329
|
+
* @name linkify
|
|
330
|
+
* @function
|
|
331
|
+
* @param {String} txt The input text.
|
|
332
|
+
* @returns {String} The HTML output containing link elements.
|
|
333
|
+
*/
|
|
334
|
+
}, {
|
|
335
|
+
key: "linkify",
|
|
336
|
+
value: function linkify(txt) {
|
|
337
|
+
return txt.replace(linkRegex, function(str) {
|
|
338
|
+
return '<a href="' + str + '">' + str + "</a>";
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* ansiToHtml
|
|
343
|
+
* Converts ANSI input into HTML output.
|
|
344
|
+
*
|
|
345
|
+
* @name ansiToHtml
|
|
346
|
+
* @function
|
|
347
|
+
* @param {String} txt The input text.
|
|
348
|
+
* @param {Object} options The options passed ot the `process` method.
|
|
349
|
+
* @returns {String} The HTML output.
|
|
350
|
+
*/
|
|
351
|
+
}, {
|
|
352
|
+
key: "ansiToHtml",
|
|
353
|
+
value: function ansiToHtml(txt, options) {
|
|
354
|
+
return this.process(txt, options, true);
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* ansiToJson
|
|
358
|
+
* Converts ANSI input into HTML output.
|
|
359
|
+
*
|
|
360
|
+
* @name ansiToJson
|
|
361
|
+
* @function
|
|
362
|
+
* @param {String} txt The input text.
|
|
363
|
+
* @param {Object} options The options passed ot the `process` method.
|
|
364
|
+
* @returns {String} The JSON output.
|
|
365
|
+
*/
|
|
366
|
+
}, {
|
|
367
|
+
key: "ansiToJson",
|
|
368
|
+
value: function ansiToJson(txt, options) {
|
|
369
|
+
options = options || {};
|
|
370
|
+
options.json = true;
|
|
371
|
+
options.clearLine = false;
|
|
372
|
+
return this.process(txt, options, true);
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* ansiToText
|
|
376
|
+
* Converts ANSI input into HTML output.
|
|
377
|
+
*
|
|
378
|
+
* @name ansiToText
|
|
379
|
+
* @function
|
|
380
|
+
* @param {String} txt The input text.
|
|
381
|
+
* @returns {String} The text output.
|
|
382
|
+
*/
|
|
383
|
+
}, {
|
|
384
|
+
key: "ansiToText",
|
|
385
|
+
value: function ansiToText(txt) {
|
|
386
|
+
return this.process(txt, {}, false);
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* process
|
|
390
|
+
* Processes the input.
|
|
391
|
+
*
|
|
392
|
+
* @name process
|
|
393
|
+
* @function
|
|
394
|
+
* @param {String} txt The input text.
|
|
395
|
+
* @param {Object} options An object passed to `processChunk` method, extended with:
|
|
396
|
+
*
|
|
397
|
+
* - `json` (Boolean): If `true`, the result will be an object.
|
|
398
|
+
* - `use_classes` (Boolean): If `true`, HTML classes will be appended to the HTML output.
|
|
399
|
+
*
|
|
400
|
+
* @param {Boolean} markup
|
|
401
|
+
*/
|
|
402
|
+
}, {
|
|
403
|
+
key: "process",
|
|
404
|
+
value: function process2(txt, options, markup) {
|
|
405
|
+
var _this = this;
|
|
406
|
+
var self = this;
|
|
407
|
+
var raw_text_chunks = txt.split(/\033\[/);
|
|
408
|
+
var first_chunk = raw_text_chunks.shift();
|
|
409
|
+
if (options === void 0 || options === null) {
|
|
410
|
+
options = {};
|
|
411
|
+
}
|
|
412
|
+
options.clearLine = /\r/.test(txt);
|
|
413
|
+
var color_chunks = raw_text_chunks.map(function(chunk) {
|
|
414
|
+
return _this.processChunk(chunk, options, markup);
|
|
415
|
+
});
|
|
416
|
+
if (options && options.json) {
|
|
417
|
+
var first = self.processChunkJson("");
|
|
418
|
+
first.content = first_chunk;
|
|
419
|
+
first.clearLine = options.clearLine;
|
|
420
|
+
color_chunks.unshift(first);
|
|
421
|
+
if (options.remove_empty) {
|
|
422
|
+
color_chunks = color_chunks.filter(function(c11) {
|
|
423
|
+
return !c11.isEmpty();
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
return color_chunks;
|
|
427
|
+
} else {
|
|
428
|
+
color_chunks.unshift(first_chunk);
|
|
429
|
+
}
|
|
430
|
+
return color_chunks.join("");
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* processChunkJson
|
|
434
|
+
* Processes the current chunk into json output.
|
|
435
|
+
*
|
|
436
|
+
* @name processChunkJson
|
|
437
|
+
* @function
|
|
438
|
+
* @param {String} text The input text.
|
|
439
|
+
* @param {Object} options An object containing the following fields:
|
|
440
|
+
*
|
|
441
|
+
* - `json` (Boolean): If `true`, the result will be an object.
|
|
442
|
+
* - `use_classes` (Boolean): If `true`, HTML classes will be appended to the HTML output.
|
|
443
|
+
*
|
|
444
|
+
* @param {Boolean} markup If false, the colors will not be parsed.
|
|
445
|
+
* @return {Object} The result object:
|
|
446
|
+
*
|
|
447
|
+
* - `content` (String): The text.
|
|
448
|
+
* - `fg` (String|null): The foreground color.
|
|
449
|
+
* - `bg` (String|null): The background color.
|
|
450
|
+
* - `fg_truecolor` (String|null): The foreground true color (if 16m color is enabled).
|
|
451
|
+
* - `bg_truecolor` (String|null): The background true color (if 16m color is enabled).
|
|
452
|
+
* - `clearLine` (Boolean): `true` if a carriageReturn \r was fount at end of line.
|
|
453
|
+
* - `was_processed` (Bolean): `true` if the colors were processed, `false` otherwise.
|
|
454
|
+
* - `isEmpty` (Function): A function returning `true` if the content is empty, or `false` otherwise.
|
|
455
|
+
*
|
|
456
|
+
*/
|
|
457
|
+
}, {
|
|
458
|
+
key: "processChunkJson",
|
|
459
|
+
value: function processChunkJson(text, options, markup) {
|
|
460
|
+
options = typeof options == "undefined" ? {} : options;
|
|
461
|
+
var use_classes = options.use_classes = typeof options.use_classes != "undefined" && options.use_classes;
|
|
462
|
+
var key = options.key = use_classes ? "class" : "color";
|
|
463
|
+
var result = {
|
|
464
|
+
content: text,
|
|
465
|
+
fg: null,
|
|
466
|
+
bg: null,
|
|
467
|
+
fg_truecolor: null,
|
|
468
|
+
bg_truecolor: null,
|
|
469
|
+
isInverted: false,
|
|
470
|
+
clearLine: options.clearLine,
|
|
471
|
+
decoration: null,
|
|
472
|
+
decorations: [],
|
|
473
|
+
was_processed: false,
|
|
474
|
+
isEmpty: function isEmpty() {
|
|
475
|
+
return !result.content;
|
|
476
|
+
}
|
|
477
|
+
};
|
|
478
|
+
var matches = text.match(/^([!\x3c-\x3f]*)([\d;]*)([\x20-\x2c]*[\x40-\x7e])([\s\S]*)/m);
|
|
479
|
+
if (!matches) return result;
|
|
480
|
+
var orig_txt = result.content = matches[4];
|
|
481
|
+
var nums = matches[2].split(";");
|
|
482
|
+
if (matches[1] !== "" || matches[3] !== "m") {
|
|
483
|
+
return result;
|
|
484
|
+
}
|
|
485
|
+
if (!markup) {
|
|
486
|
+
return result;
|
|
487
|
+
}
|
|
488
|
+
var self = this;
|
|
489
|
+
while (nums.length > 0) {
|
|
490
|
+
var num_str = nums.shift();
|
|
491
|
+
var num = parseInt(num_str);
|
|
492
|
+
if (isNaN(num) || num === 0) {
|
|
493
|
+
self.fg = self.bg = null;
|
|
494
|
+
self.decorations = [];
|
|
495
|
+
} else if (num === 1) {
|
|
496
|
+
self.decorations.push("bold");
|
|
497
|
+
} else if (num === 2) {
|
|
498
|
+
self.decorations.push("dim");
|
|
499
|
+
} else if (num === 3) {
|
|
500
|
+
self.decorations.push("italic");
|
|
501
|
+
} else if (num === 4) {
|
|
502
|
+
self.decorations.push("underline");
|
|
503
|
+
} else if (num === 5) {
|
|
504
|
+
self.decorations.push("blink");
|
|
505
|
+
} else if (num === 7) {
|
|
506
|
+
self.decorations.push("reverse");
|
|
507
|
+
} else if (num === 8) {
|
|
508
|
+
self.decorations.push("hidden");
|
|
509
|
+
} else if (num === 9) {
|
|
510
|
+
self.decorations.push("strikethrough");
|
|
511
|
+
} else if (num === 21) {
|
|
512
|
+
self.removeDecoration("bold");
|
|
513
|
+
} else if (num === 22) {
|
|
514
|
+
self.removeDecoration("bold");
|
|
515
|
+
self.removeDecoration("dim");
|
|
516
|
+
} else if (num === 23) {
|
|
517
|
+
self.removeDecoration("italic");
|
|
518
|
+
} else if (num === 24) {
|
|
519
|
+
self.removeDecoration("underline");
|
|
520
|
+
} else if (num === 25) {
|
|
521
|
+
self.removeDecoration("blink");
|
|
522
|
+
} else if (num === 27) {
|
|
523
|
+
self.removeDecoration("reverse");
|
|
524
|
+
} else if (num === 28) {
|
|
525
|
+
self.removeDecoration("hidden");
|
|
526
|
+
} else if (num === 29) {
|
|
527
|
+
self.removeDecoration("strikethrough");
|
|
528
|
+
} else if (num === 39) {
|
|
529
|
+
self.fg = null;
|
|
530
|
+
} else if (num === 49) {
|
|
531
|
+
self.bg = null;
|
|
532
|
+
} else if (num >= 30 && num < 38) {
|
|
533
|
+
self.fg = ANSI_COLORS[0][num % 10][key];
|
|
534
|
+
} else if (num >= 90 && num < 98) {
|
|
535
|
+
self.fg = ANSI_COLORS[1][num % 10][key];
|
|
536
|
+
} else if (num >= 40 && num < 48) {
|
|
537
|
+
self.bg = ANSI_COLORS[0][num % 10][key];
|
|
538
|
+
} else if (num >= 100 && num < 108) {
|
|
539
|
+
self.bg = ANSI_COLORS[1][num % 10][key];
|
|
540
|
+
} else if (num === 38 || num === 48) {
|
|
541
|
+
var is_foreground = num === 38;
|
|
542
|
+
if (nums.length >= 1) {
|
|
543
|
+
var mode = nums.shift();
|
|
544
|
+
if (mode === "5" && nums.length >= 1) {
|
|
545
|
+
var palette_index = parseInt(nums.shift());
|
|
546
|
+
if (palette_index >= 0 && palette_index <= 255) {
|
|
547
|
+
if (!use_classes) {
|
|
548
|
+
if (!this.PALETTE_COLORS) {
|
|
549
|
+
self.setupPalette();
|
|
550
|
+
}
|
|
551
|
+
if (is_foreground) {
|
|
552
|
+
self.fg = this.PALETTE_COLORS[palette_index];
|
|
553
|
+
} else {
|
|
554
|
+
self.bg = this.PALETTE_COLORS[palette_index];
|
|
555
|
+
}
|
|
556
|
+
} else {
|
|
557
|
+
var klass = palette_index >= 16 ? "ansi-palette-" + palette_index : ANSI_COLORS[palette_index > 7 ? 1 : 0][palette_index % 8]["class"];
|
|
558
|
+
if (is_foreground) {
|
|
559
|
+
self.fg = klass;
|
|
560
|
+
} else {
|
|
561
|
+
self.bg = klass;
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
} else if (mode === "2" && nums.length >= 3) {
|
|
566
|
+
var r7 = parseInt(nums.shift());
|
|
567
|
+
var g8 = parseInt(nums.shift());
|
|
568
|
+
var b6 = parseInt(nums.shift());
|
|
569
|
+
if (r7 >= 0 && r7 <= 255 && g8 >= 0 && g8 <= 255 && b6 >= 0 && b6 <= 255) {
|
|
570
|
+
var color = r7 + ", " + g8 + ", " + b6;
|
|
571
|
+
if (!use_classes) {
|
|
572
|
+
if (is_foreground) {
|
|
573
|
+
self.fg = color;
|
|
574
|
+
} else {
|
|
575
|
+
self.bg = color;
|
|
576
|
+
}
|
|
577
|
+
} else {
|
|
578
|
+
if (is_foreground) {
|
|
579
|
+
self.fg = "ansi-truecolor";
|
|
580
|
+
self.fg_truecolor = color;
|
|
581
|
+
} else {
|
|
582
|
+
self.bg = "ansi-truecolor";
|
|
583
|
+
self.bg_truecolor = color;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
if (self.fg === null && self.bg === null && self.decorations.length === 0) {
|
|
592
|
+
return result;
|
|
593
|
+
} else {
|
|
594
|
+
var styles = [];
|
|
595
|
+
var classes = [];
|
|
596
|
+
var data = {};
|
|
597
|
+
result.fg = self.fg;
|
|
598
|
+
result.bg = self.bg;
|
|
599
|
+
result.fg_truecolor = self.fg_truecolor;
|
|
600
|
+
result.bg_truecolor = self.bg_truecolor;
|
|
601
|
+
result.decorations = self.decorations;
|
|
602
|
+
result.decoration = self.decorations.slice(-1).pop() || null;
|
|
603
|
+
result.was_processed = true;
|
|
604
|
+
return result;
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
/**
|
|
608
|
+
* processChunk
|
|
609
|
+
* Processes the current chunk of text.
|
|
610
|
+
*
|
|
611
|
+
* @name processChunk
|
|
612
|
+
* @function
|
|
613
|
+
* @param {String} text The input text.
|
|
614
|
+
* @param {Object} options An object containing the following fields:
|
|
615
|
+
*
|
|
616
|
+
* - `json` (Boolean): If `true`, the result will be an object.
|
|
617
|
+
* - `use_classes` (Boolean): If `true`, HTML classes will be appended to the HTML output.
|
|
618
|
+
*
|
|
619
|
+
* @param {Boolean} markup If false, the colors will not be parsed.
|
|
620
|
+
* @return {Object|String} The result (object if `json` is wanted back or string otherwise).
|
|
621
|
+
*/
|
|
622
|
+
}, {
|
|
623
|
+
key: "processChunk",
|
|
624
|
+
value: function processChunk(text, options, markup) {
|
|
625
|
+
var _this2 = this;
|
|
626
|
+
options = options || {};
|
|
627
|
+
var jsonChunk = this.processChunkJson(text, options, markup);
|
|
628
|
+
var use_classes = options.use_classes;
|
|
629
|
+
jsonChunk.decorations = jsonChunk.decorations.filter(function(decoration) {
|
|
630
|
+
if (decoration === "reverse") {
|
|
631
|
+
if (!jsonChunk.fg) {
|
|
632
|
+
jsonChunk.fg = ANSI_COLORS[0][7][use_classes ? "class" : "color"];
|
|
633
|
+
}
|
|
634
|
+
if (!jsonChunk.bg) {
|
|
635
|
+
jsonChunk.bg = ANSI_COLORS[0][0][use_classes ? "class" : "color"];
|
|
636
|
+
}
|
|
637
|
+
var tmpFg = jsonChunk.fg;
|
|
638
|
+
jsonChunk.fg = jsonChunk.bg;
|
|
639
|
+
jsonChunk.bg = tmpFg;
|
|
640
|
+
var tmpFgTrue = jsonChunk.fg_truecolor;
|
|
641
|
+
jsonChunk.fg_truecolor = jsonChunk.bg_truecolor;
|
|
642
|
+
jsonChunk.bg_truecolor = tmpFgTrue;
|
|
643
|
+
jsonChunk.isInverted = true;
|
|
644
|
+
return false;
|
|
645
|
+
}
|
|
646
|
+
return true;
|
|
647
|
+
});
|
|
648
|
+
if (options.json) {
|
|
649
|
+
return jsonChunk;
|
|
650
|
+
}
|
|
651
|
+
if (jsonChunk.isEmpty()) {
|
|
652
|
+
return "";
|
|
653
|
+
}
|
|
654
|
+
if (!jsonChunk.was_processed) {
|
|
655
|
+
return jsonChunk.content;
|
|
656
|
+
}
|
|
657
|
+
var colors = [];
|
|
658
|
+
var decorations = [];
|
|
659
|
+
var textDecorations = [];
|
|
660
|
+
var data = {};
|
|
661
|
+
var render_data = function render_data2(data2) {
|
|
662
|
+
var fragments = [];
|
|
663
|
+
var key = void 0;
|
|
664
|
+
for (key in data2) {
|
|
665
|
+
if (data2.hasOwnProperty(key)) {
|
|
666
|
+
fragments.push("data-" + key + '="' + _this2.escapeForHtml(data2[key]) + '"');
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
return fragments.length > 0 ? " " + fragments.join(" ") : "";
|
|
670
|
+
};
|
|
671
|
+
if (jsonChunk.isInverted) {
|
|
672
|
+
data["ansi-is-inverted"] = "true";
|
|
673
|
+
}
|
|
674
|
+
if (jsonChunk.fg) {
|
|
675
|
+
if (use_classes) {
|
|
676
|
+
colors.push(jsonChunk.fg + "-fg");
|
|
677
|
+
if (jsonChunk.fg_truecolor !== null) {
|
|
678
|
+
data["ansi-truecolor-fg"] = jsonChunk.fg_truecolor;
|
|
679
|
+
jsonChunk.fg_truecolor = null;
|
|
680
|
+
}
|
|
681
|
+
} else {
|
|
682
|
+
colors.push("color:rgb(" + jsonChunk.fg + ")");
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
if (jsonChunk.bg) {
|
|
686
|
+
if (use_classes) {
|
|
687
|
+
colors.push(jsonChunk.bg + "-bg");
|
|
688
|
+
if (jsonChunk.bg_truecolor !== null) {
|
|
689
|
+
data["ansi-truecolor-bg"] = jsonChunk.bg_truecolor;
|
|
690
|
+
jsonChunk.bg_truecolor = null;
|
|
691
|
+
}
|
|
692
|
+
} else {
|
|
693
|
+
colors.push("background-color:rgb(" + jsonChunk.bg + ")");
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
jsonChunk.decorations.forEach(function(decoration) {
|
|
697
|
+
if (use_classes) {
|
|
698
|
+
decorations.push("ansi-" + decoration);
|
|
699
|
+
return;
|
|
700
|
+
}
|
|
701
|
+
if (decoration === "bold") {
|
|
702
|
+
decorations.push("font-weight:bold");
|
|
703
|
+
} else if (decoration === "dim") {
|
|
704
|
+
decorations.push("opacity:0.5");
|
|
705
|
+
} else if (decoration === "italic") {
|
|
706
|
+
decorations.push("font-style:italic");
|
|
707
|
+
} else if (decoration === "hidden") {
|
|
708
|
+
decorations.push("visibility:hidden");
|
|
709
|
+
} else if (decoration === "strikethrough") {
|
|
710
|
+
textDecorations.push("line-through");
|
|
711
|
+
} else {
|
|
712
|
+
textDecorations.push(decoration);
|
|
713
|
+
}
|
|
714
|
+
});
|
|
715
|
+
if (textDecorations.length) {
|
|
716
|
+
decorations.push("text-decoration:" + textDecorations.join(" "));
|
|
717
|
+
}
|
|
718
|
+
if (use_classes) {
|
|
719
|
+
return '<span class="' + colors.concat(decorations).join(" ") + '"' + render_data(data) + ">" + jsonChunk.content + "</span>";
|
|
720
|
+
} else {
|
|
721
|
+
return '<span style="' + colors.concat(decorations).join(";") + '"' + render_data(data) + ">" + jsonChunk.content + "</span>";
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
}, {
|
|
725
|
+
key: "removeDecoration",
|
|
726
|
+
value: function removeDecoration(decoration) {
|
|
727
|
+
var index = this.decorations.indexOf(decoration);
|
|
728
|
+
if (index >= 0) {
|
|
729
|
+
this.decorations.splice(index, 1);
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
}]);
|
|
733
|
+
return Anser2;
|
|
734
|
+
}();
|
|
735
|
+
module.exports = Anser;
|
|
736
|
+
}
|
|
737
|
+
});
|
|
738
|
+
|
|
739
|
+
// ../../node_modules/.pnpm/escape-carriage@1.3.1/node_modules/escape-carriage/index.js
|
|
740
|
+
var require_escape_carriage = __commonJS({
|
|
741
|
+
"../../node_modules/.pnpm/escape-carriage@1.3.1/node_modules/escape-carriage/index.js"(exports, module) {
|
|
742
|
+
function escapeCarriageReturn(txt) {
|
|
743
|
+
if (!txt) return "";
|
|
744
|
+
if (!/\r/.test(txt)) return txt;
|
|
745
|
+
txt = txt.replace(/\r+\n/gm, "\n");
|
|
746
|
+
while (/\r./.test(txt)) {
|
|
747
|
+
txt = txt.replace(/^([^\r\n]*)\r+([^\r\n]+)/gm, function(_3, base, insert) {
|
|
748
|
+
return insert + base.slice(insert.length);
|
|
749
|
+
});
|
|
750
|
+
}
|
|
751
|
+
return txt;
|
|
752
|
+
}
|
|
753
|
+
function findLongestString(arr) {
|
|
754
|
+
var longest = 0;
|
|
755
|
+
for (var i5 = 0; i5 < arr.length; i5++) {
|
|
756
|
+
if (arr[longest].length <= arr[i5].length) {
|
|
757
|
+
longest = i5;
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
return longest;
|
|
761
|
+
}
|
|
762
|
+
function escapeSingleLineSafe(txt) {
|
|
763
|
+
if (!/\r/.test(txt)) return txt;
|
|
764
|
+
var arr = txt.split("\r");
|
|
765
|
+
var res = [];
|
|
766
|
+
while (arr.length > 0) {
|
|
767
|
+
var longest = findLongestString(arr);
|
|
768
|
+
res.push(arr[longest]);
|
|
769
|
+
arr = arr.slice(longest + 1);
|
|
770
|
+
}
|
|
771
|
+
return res.join("\r");
|
|
772
|
+
}
|
|
773
|
+
function escapeCarriageReturnSafe(txt) {
|
|
774
|
+
if (!txt) return "";
|
|
775
|
+
if (!/\r/.test(txt)) return txt;
|
|
776
|
+
if (!/\n/.test(txt)) return escapeSingleLineSafe(txt);
|
|
777
|
+
txt = txt.replace(/\r+\n/gm, "\n");
|
|
778
|
+
var idx = txt.lastIndexOf("\n");
|
|
779
|
+
return escapeCarriageReturn(txt.slice(0, idx)) + "\n" + escapeSingleLineSafe(txt.slice(idx + 1));
|
|
780
|
+
}
|
|
781
|
+
module.exports = escapeCarriageReturn;
|
|
782
|
+
module.exports.escapeCarriageReturn = escapeCarriageReturn;
|
|
783
|
+
module.exports.escapeCarriageReturnSafe = escapeCarriageReturnSafe;
|
|
784
|
+
}
|
|
785
|
+
});
|
|
786
|
+
|
|
787
|
+
// ../../packages/portal/products/realm/dist/client/App.js
|
|
788
|
+
import * as o3 from "react";
|
|
789
|
+
import { useEffect as p9 } from "react";
|
|
790
|
+
import { Outlet as E8, useLocation as f5, useNavigate as g7 } from "react-router-dom";
|
|
791
|
+
|
|
792
|
+
// ../../node_modules/.pnpm/@markdoc+markdoc@0.5.2_@types+react@19.1.4_react@19.1.0/node_modules/@markdoc/markdoc/dist/react.js
|
|
793
|
+
var Tag2 = class {
|
|
794
|
+
constructor(name = "div", attributes = {}, children = []) {
|
|
795
|
+
this.$$mdtype = "Tag";
|
|
796
|
+
this.name = name;
|
|
797
|
+
this.attributes = attributes;
|
|
798
|
+
this.children = children;
|
|
799
|
+
}
|
|
800
|
+
};
|
|
801
|
+
Tag2.isTag = (tag) => {
|
|
802
|
+
return !!(tag?.$$mdtype === "Tag");
|
|
803
|
+
};
|
|
804
|
+
function tagName(name, components2) {
|
|
805
|
+
return typeof name !== "string" ? name : name[0] !== name[0].toUpperCase() ? name : components2 instanceof Function ? components2(name) : components2[name];
|
|
806
|
+
}
|
|
807
|
+
function dynamic(node, React, { components: components2 = {}, resolveTagName = tagName } = {}) {
|
|
808
|
+
function deepRender(value) {
|
|
809
|
+
if (value == null || typeof value !== "object")
|
|
810
|
+
return value;
|
|
811
|
+
if (Array.isArray(value))
|
|
812
|
+
return value.map((item) => deepRender(item));
|
|
813
|
+
if (value.$$mdtype === "Tag")
|
|
814
|
+
return render(value);
|
|
815
|
+
if (typeof value !== "object")
|
|
816
|
+
return value;
|
|
817
|
+
const output = {};
|
|
818
|
+
for (const [k4, v5] of Object.entries(value))
|
|
819
|
+
output[k4] = deepRender(v5);
|
|
820
|
+
return output;
|
|
821
|
+
}
|
|
822
|
+
function render(node2) {
|
|
823
|
+
if (Array.isArray(node2))
|
|
824
|
+
return React.createElement(React.Fragment, null, ...node2.map(render));
|
|
825
|
+
if (node2 === null || typeof node2 !== "object" || !Tag2.isTag(node2))
|
|
826
|
+
return node2;
|
|
827
|
+
const {
|
|
828
|
+
name,
|
|
829
|
+
attributes: { class: className, ...attrs } = {},
|
|
830
|
+
children = []
|
|
831
|
+
} = node2;
|
|
832
|
+
if (className)
|
|
833
|
+
attrs.className = className;
|
|
834
|
+
return React.createElement(resolveTagName(name, components2), Object.keys(attrs).length == 0 ? null : deepRender(attrs), ...children.map(render));
|
|
835
|
+
}
|
|
836
|
+
return render(node);
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
// ../../packages/portal/products/realm/dist/client/App.js
|
|
840
|
+
init_src();
|
|
841
|
+
init_RootLayout();
|
|
842
|
+
init_PageLayout();
|
|
843
|
+
init_default();
|
|
844
|
+
|
|
845
|
+
// ../../packages/portal/products/realm/dist/client/app/Sidebar/Sidebar.js
|
|
846
|
+
init_styled_components_esm();
|
|
847
|
+
init_Menu();
|
|
848
|
+
init_SidebarActions();
|
|
849
|
+
init_Sidebar();
|
|
850
|
+
init_VersionPicker();
|
|
851
|
+
init_Button();
|
|
852
|
+
init_ArrowLeftIcon();
|
|
853
|
+
import e3, { useEffect as S4, useState as u2 } from "react";
|
|
854
|
+
|
|
855
|
+
// ../../packages/portal/products/realm/dist/client/app/Sidebar/RequestAccessButton.js
|
|
856
|
+
init_styled_components_esm();
|
|
857
|
+
init_Button();
|
|
858
|
+
init_Admonition();
|
|
859
|
+
import r3, { useEffect as D2, useState as c4 } from "react";
|
|
860
|
+
import { useLocation as N } from "react-router-dom";
|
|
861
|
+
var O3 = (e6) => {
|
|
862
|
+
const {
|
|
863
|
+
apiId: s7,
|
|
864
|
+
status: t7,
|
|
865
|
+
setStatus: o4
|
|
866
|
+
} = e6, u6 = m(), {
|
|
867
|
+
userData: n5
|
|
868
|
+
} = s3("userData") || {}, h5 = N(), i5 = U(), [l5, p10] = c4(), [E9, g8] = c4(), [m5, A6] = c4(true);
|
|
869
|
+
D2(() => {
|
|
870
|
+
n5?.isAuthenticated && fetch(`/api/api-keys/api-products/${s7}/access`).then((d4) => d4.json().then((a3) => {
|
|
871
|
+
d4.ok ? (o4(a3.status), g8(a3.appId)) : p10(a3.message);
|
|
872
|
+
}).catch(() => p10("Something went wrong")).finally(() => A6(false)));
|
|
873
|
+
}, [n5?.isAuthenticated, s7, o4]);
|
|
874
|
+
const P2 = () => {
|
|
875
|
+
!n5?.isAuthenticated && i5 ? window.location.href = `${i5}${i5.includes("?") ? "&" : "?"}redirectTo=${h5.pathname}` : t7 === "ACCEPTED" ? u6.push("/apps/" + E9 || "") : t7 === "NONE" && u6.push("/apps/?createApp&apiId=" + s7), F.send({
|
|
876
|
+
type: "request_api_access_button.clicked",
|
|
877
|
+
payload: {
|
|
878
|
+
action: "click"
|
|
879
|
+
}
|
|
880
|
+
});
|
|
881
|
+
}, y5 = (t7 === "PENDING" || m5 || l5 != null) && n5?.isAuthenticated;
|
|
882
|
+
return r3.createElement(r3.Fragment, null, r3.createElement(Button, {
|
|
883
|
+
disabled: y5,
|
|
884
|
+
onClick: P2,
|
|
885
|
+
fullWidth: true,
|
|
886
|
+
size: "small"
|
|
887
|
+
}, x3(t7, m5, l5, !!n5?.isAuthenticated)));
|
|
888
|
+
};
|
|
889
|
+
var x3 = (e6, s7, t7, o4) => {
|
|
890
|
+
if (!o4) return "Request access";
|
|
891
|
+
if (s7) return "Loading...";
|
|
892
|
+
if (t7) return "Failed to check access";
|
|
893
|
+
switch (e6) {
|
|
894
|
+
case "NONE":
|
|
895
|
+
return "Request access";
|
|
896
|
+
case "ACCEPTED":
|
|
897
|
+
return "Credentials";
|
|
898
|
+
case "PENDING":
|
|
899
|
+
return "Pending access...";
|
|
900
|
+
}
|
|
901
|
+
return null;
|
|
902
|
+
};
|
|
903
|
+
var U2 = (e6) => e6 === "ACCEPTED" ? r3.createElement(f3, {
|
|
904
|
+
type: "success",
|
|
905
|
+
name: "You have access to this API"
|
|
906
|
+
}) : e6 === "PENDING" ? r3.createElement(f3, {
|
|
907
|
+
type: "info",
|
|
908
|
+
name: "You have requested access to this API"
|
|
909
|
+
}) : null;
|
|
910
|
+
var f3 = styled_components_esm_default(Admonition).withConfig({
|
|
911
|
+
displayName: "RequestAccessButton__f",
|
|
912
|
+
componentId: "sc-i9zdry-0"
|
|
913
|
+
})(["margin-top:0px;margin-bottom:var(--spacing-sm);"]);
|
|
914
|
+
|
|
915
|
+
// ../../packages/portal/products/realm/dist/client/app/Sidebar/Sidebar.js
|
|
916
|
+
function Y({
|
|
917
|
+
layoutControls: r7
|
|
918
|
+
}) {
|
|
919
|
+
const {
|
|
920
|
+
versions: s7 = []
|
|
921
|
+
} = S3() || {}, f6 = s7.find((t7) => t7?.active), {
|
|
922
|
+
translate: a3
|
|
923
|
+
} = c3(), {
|
|
924
|
+
currentItems: b6,
|
|
925
|
+
backLink: n5,
|
|
926
|
+
pushDrilldownState: h5,
|
|
927
|
+
popDrilldownState: k4
|
|
928
|
+
} = C(f6), [m5, v5] = u2(), {
|
|
929
|
+
collapsedSidebar: o4
|
|
930
|
+
} = r7, c11 = n("openAPIDocsStore")?.definition.info?.["x-metadata"]?.apiId, g8 = m(), [l5, i5] = u2(void 0);
|
|
931
|
+
return S4(() => {
|
|
932
|
+
const t7 = setTimeout(() => i5(void 0), 350);
|
|
933
|
+
return () => clearTimeout(t7);
|
|
934
|
+
}, [l5]), e3.createElement(e3.Fragment, null, e3.createElement(Sidebar, {
|
|
935
|
+
collapsed: o4,
|
|
936
|
+
menuItemsAnimation: l5,
|
|
937
|
+
versions: e3.createElement(VersionPicker, {
|
|
938
|
+
versions: s7,
|
|
939
|
+
onChange: (t7) => {
|
|
940
|
+
F.send({
|
|
941
|
+
type: "version_picker_selection.change",
|
|
942
|
+
payload: {
|
|
943
|
+
action: "change"
|
|
944
|
+
}
|
|
945
|
+
});
|
|
946
|
+
const d4 = location.hash ? t7?.link + location.hash : t7?.link;
|
|
947
|
+
d4 && g8.push(d4);
|
|
948
|
+
}
|
|
949
|
+
}),
|
|
950
|
+
menu: e3.createElement(Menu, {
|
|
951
|
+
items: b6,
|
|
952
|
+
onDrilldownOpen: (t7) => {
|
|
953
|
+
i5("slideInRight"), h5(t7);
|
|
954
|
+
}
|
|
955
|
+
}),
|
|
956
|
+
footer: e3.createElement("div", {
|
|
957
|
+
style: {
|
|
958
|
+
width: "100%"
|
|
959
|
+
}
|
|
960
|
+
}, !o4 && U2(m5), e3.createElement(SidebarActions, {
|
|
961
|
+
...r7,
|
|
962
|
+
requestAccessButton: c11 ? e3.createElement(O3, {
|
|
963
|
+
apiId: c11,
|
|
964
|
+
status: m5,
|
|
965
|
+
setStatus: v5
|
|
966
|
+
}) : null
|
|
967
|
+
})),
|
|
968
|
+
header: n5 && e3.createElement(J, {
|
|
969
|
+
icon: e3.createElement(ArrowLeftIcon, null),
|
|
970
|
+
iconPosition: "left",
|
|
971
|
+
variant: "ghost",
|
|
972
|
+
size: "medium",
|
|
973
|
+
"data-component-name": "Sidebar/BackButton",
|
|
974
|
+
to: n5.slug,
|
|
975
|
+
onClick: () => {
|
|
976
|
+
i5("slideInLeft"), k4(), F.send({
|
|
977
|
+
type: n5.event,
|
|
978
|
+
payload: {
|
|
979
|
+
action: "click"
|
|
980
|
+
}
|
|
981
|
+
});
|
|
982
|
+
}
|
|
983
|
+
}, o4 ? "" : n5.label ? e3.createElement("div", {
|
|
984
|
+
"data-translation-key": "sidebar.menu.backToLabel"
|
|
985
|
+
}, a3("sidebar.menu.backToLabel", {
|
|
986
|
+
value: a3(n5.labelTranslationKey, n5.label)
|
|
987
|
+
})) : e3.createElement("div", {
|
|
988
|
+
"data-translation-key": "sidebar.menu.backLabel"
|
|
989
|
+
}, a3("sidebar.menu.backLabel")))
|
|
990
|
+
}));
|
|
991
|
+
}
|
|
992
|
+
var J = styled_components_esm_default(Button).withConfig({
|
|
993
|
+
displayName: "Sidebar__J",
|
|
994
|
+
componentId: "sc-vhzy19-0"
|
|
995
|
+
})(["padding:var(--menu-item-padding-vertical) 0;height:calc(var(--line-height-base) + var(--menu-item-padding-vertical) * 2);justify-content:flex-start;width:100%;"]);
|
|
996
|
+
|
|
997
|
+
// ../../packages/portal/products/realm/dist/client/app/hooks/useScrollTracker.js
|
|
998
|
+
import { useCallback as c5, useEffect as d, useRef as w4 } from "react";
|
|
999
|
+
|
|
1000
|
+
// ../../packages/portal/products/realm/dist/client/app/utils/getBlocksHeight.js
|
|
1001
|
+
function f4(t7) {
|
|
1002
|
+
const o4 = window.getComputedStyle(t7);
|
|
1003
|
+
return { marginTop: parseFloat(o4.getPropertyValue("margin-top")) || 0, marginBottom: parseFloat(o4.getPropertyValue("margin-bottom")) || 0 };
|
|
1004
|
+
}
|
|
1005
|
+
var s4 = (t7) => !!t7 && (t7 instanceof HTMLHeadingElement || /^H[1-6]$/.test(t7.tagName));
|
|
1006
|
+
function p2() {
|
|
1007
|
+
const t7 = [], o4 = Array.from(document.querySelectorAll("article > *") ?? []);
|
|
1008
|
+
let e6 = 0, r7 = l(o4[0]), a3 = 0;
|
|
1009
|
+
return o4.forEach((n5) => {
|
|
1010
|
+
const { marginTop: i5, marginBottom: c11 } = f4(n5);
|
|
1011
|
+
s4(n5) && e6 && (t7.push({ height: e6, offset: r7 }), r7 = n5.offsetTop - Math.max(a3, i5), e6 = 0), e6 += n5.offsetHeight, e6 += Math.max(a3, i5), a3 = c11;
|
|
1012
|
+
}), e6 !== 0 && t7.push({ height: e6, offset: r7 }), t7;
|
|
1013
|
+
}
|
|
1014
|
+
var m2 = () => {
|
|
1015
|
+
const t7 = document.querySelector("article")?.offsetTop ?? 0, o4 = g3();
|
|
1016
|
+
return t7 - o4;
|
|
1017
|
+
};
|
|
1018
|
+
var g3 = () => document.querySelector("nav")?.offsetHeight ?? 0;
|
|
1019
|
+
function l(t7) {
|
|
1020
|
+
if (!t7) return 0;
|
|
1021
|
+
const o4 = window.getComputedStyle(t7), e6 = parseFloat(o4.getPropertyValue("margin-top")) || 0;
|
|
1022
|
+
return t7.offsetTop - e6;
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
// ../../packages/portal/products/realm/dist/client/app/utils/syncScrollWithEditor.js
|
|
1026
|
+
function g4(t7, e6 = 0) {
|
|
1027
|
+
if (typeof t7 > "u") {
|
|
1028
|
+
window.scrollTo({ top: 0, behavior: "smooth" });
|
|
1029
|
+
return;
|
|
1030
|
+
}
|
|
1031
|
+
const o4 = p2(), n5 = g3();
|
|
1032
|
+
if (!o4[e6]) return;
|
|
1033
|
+
const { height: r7, offset: c11 } = o4[e6], i5 = Math.round(c11 - n5 + r7 * (Math.round(t7) / 100));
|
|
1034
|
+
window.scrollTo({ top: i5, behavior: "smooth" });
|
|
1035
|
+
}
|
|
1036
|
+
var p3 = (t7) => {
|
|
1037
|
+
const e6 = m2(), o4 = g3();
|
|
1038
|
+
if (t7 < e6) return { percentScrolled: 0, sequenceNumber: -1 };
|
|
1039
|
+
const n5 = p2(), r7 = l2(t7 + o4, n5), { height: c11, offset: i5 } = n5[r7];
|
|
1040
|
+
return { percentScrolled: Math.round((t7 + o4 - i5) / c11 * 100), sequenceNumber: r7 };
|
|
1041
|
+
};
|
|
1042
|
+
function l2(t7, e6) {
|
|
1043
|
+
return e6.findIndex(({ offset: o4, height: n5 }) => t7 >= o4 && t7 < o4 + n5);
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
// ../../packages/portal/products/realm/dist/client/providers/post-message/use-post-message.js
|
|
1047
|
+
import { useContext as t3 } from "react";
|
|
1048
|
+
|
|
1049
|
+
// ../../packages/portal/products/realm/dist/client/providers/post-message/PostMessageProvider.js
|
|
1050
|
+
init_hooks();
|
|
1051
|
+
init_utils();
|
|
1052
|
+
import a, { createContext as R2, useEffect as v } from "react";
|
|
1053
|
+
import { useLocation as M, useNavigate as E4 } from "react-router-dom";
|
|
1054
|
+
|
|
1055
|
+
// ../../packages/portal/products/realm/dist/client/providers/post-message/PostMessageConnection.js
|
|
1056
|
+
var e4 = class {
|
|
1057
|
+
source;
|
|
1058
|
+
origin;
|
|
1059
|
+
constructor(s7, o4) {
|
|
1060
|
+
this.source = s7, this.origin = o4;
|
|
1061
|
+
}
|
|
1062
|
+
send(s7) {
|
|
1063
|
+
this.source.postMessage(s7, this.origin);
|
|
1064
|
+
}
|
|
1065
|
+
};
|
|
1066
|
+
|
|
1067
|
+
// ../../packages/portal/products/realm/dist/client/providers/post-message/PostMessageProvider.js
|
|
1068
|
+
var A2 = R2({ sendMessage: () => {
|
|
1069
|
+
} });
|
|
1070
|
+
function G3({ children: i5, enabled: o4 }) {
|
|
1071
|
+
const C4 = E4(), l5 = M(), n5 = a.useRef(null), { switchColorMode: m5 } = useColorSwitcher(), u6 = a.useCallback((e6) => {
|
|
1072
|
+
n5.current?.send(e6);
|
|
1073
|
+
}, []), h5 = a.useCallback((e6) => {
|
|
1074
|
+
console.info("[PM] connection initialized."), n5.current = new e4(e6.source, e6.origin), u6({ type: "initialized" });
|
|
1075
|
+
}, [u6]), p10 = a.useCallback(async (e6) => {
|
|
1076
|
+
const { path: s7 = "/", line: t7 = 1, url: g8 } = e6;
|
|
1077
|
+
let r7 = g8;
|
|
1078
|
+
if (!g8) try {
|
|
1079
|
+
const d4 = await fetch(withPathPrefix(_.RESOLVE_ROUTE_BY_PATH), { method: "POST", body: JSON.stringify(s7 + (t7 ? `:${t7}` : "")) }), { route: k4 } = await d4.json();
|
|
1080
|
+
r7 = k4?.slug ?? k4?.url ?? void 0;
|
|
1081
|
+
} catch (d4) {
|
|
1082
|
+
console.error(d4);
|
|
1083
|
+
}
|
|
1084
|
+
if (!r7) return;
|
|
1085
|
+
r7 = r7 === "/" ? "/" : e(r7);
|
|
1086
|
+
const [P2, S5] = r7.split("#");
|
|
1087
|
+
S(P2) === S(l5.pathname) && (S5 ?? "") === l5.hash.substring(1) || (console.info("[PM] Update route to: ", r7), await L({ navigate: C4, to: r7, origin: "pm" }));
|
|
1088
|
+
}, [l5]), f6 = a.useCallback(async (e6) => {
|
|
1089
|
+
const { action: s7 } = e6;
|
|
1090
|
+
switch (s7) {
|
|
1091
|
+
case "back":
|
|
1092
|
+
window.history.back();
|
|
1093
|
+
break;
|
|
1094
|
+
case "forward":
|
|
1095
|
+
window.history.forward();
|
|
1096
|
+
break;
|
|
1097
|
+
case "reload":
|
|
1098
|
+
window.location.reload();
|
|
1099
|
+
break;
|
|
1100
|
+
}
|
|
1101
|
+
}, []), w8 = a.useCallback((e6) => {
|
|
1102
|
+
window.scrollTo({ top: e6.position.absolute, behavior: "instant" });
|
|
1103
|
+
}, []), b6 = a.useCallback((e6) => {
|
|
1104
|
+
m5(e6.colorSchema);
|
|
1105
|
+
}, [m5]);
|
|
1106
|
+
return v(() => {
|
|
1107
|
+
if (!o4) return;
|
|
1108
|
+
const e6 = async (s7) => {
|
|
1109
|
+
if (!_2(s7.origin)) return;
|
|
1110
|
+
const t7 = s7.data;
|
|
1111
|
+
switch (t7.type) {
|
|
1112
|
+
case "initialize":
|
|
1113
|
+
h5(s7);
|
|
1114
|
+
break;
|
|
1115
|
+
case "route-update":
|
|
1116
|
+
if (!n5.current) return;
|
|
1117
|
+
p10(t7);
|
|
1118
|
+
break;
|
|
1119
|
+
case "location-update":
|
|
1120
|
+
if (!n5.current) return;
|
|
1121
|
+
f6(t7);
|
|
1122
|
+
break;
|
|
1123
|
+
case "scroll-update":
|
|
1124
|
+
if (!n5.current) return;
|
|
1125
|
+
w8(t7);
|
|
1126
|
+
break;
|
|
1127
|
+
case "editor-scroll-update":
|
|
1128
|
+
if (!n5.current) return;
|
|
1129
|
+
g4(t7.percentScrolled, t7.sequenceNumber);
|
|
1130
|
+
break;
|
|
1131
|
+
case "color-schema-update":
|
|
1132
|
+
if (!n5.current) return;
|
|
1133
|
+
b6(t7);
|
|
1134
|
+
break;
|
|
1135
|
+
}
|
|
1136
|
+
};
|
|
1137
|
+
return window.addEventListener("message", e6), () => {
|
|
1138
|
+
window.removeEventListener("message", e6);
|
|
1139
|
+
};
|
|
1140
|
+
}, [o4, h5, p10, f6, w8, b6]), a.createElement(A2.Provider, { value: { sendMessage: u6 } }, i5);
|
|
1141
|
+
}
|
|
1142
|
+
function _2(i5) {
|
|
1143
|
+
const o4 = new URL(i5);
|
|
1144
|
+
return i2(o4.hostname, "localhost") || i2(o4.hostname, "127.0.0.1") || i2(o4.hostname, "blueharvest.cloud") || i2(o4.hostname, "bhstage.cloud") || i2(o4.hostname, "cloud.redocly.com") || i2(o4.hostname, "cloud.eu.redocly.com") || i2(o4.hostname, "cba.au.redocly.com");
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
// ../../packages/portal/products/realm/dist/client/providers/post-message/use-post-message.js
|
|
1148
|
+
function r4() {
|
|
1149
|
+
return t3(A2);
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
// ../../packages/portal/products/realm/dist/client/app/hooks/useScrollTracker.js
|
|
1153
|
+
var h2 = () => {
|
|
1154
|
+
const { sendMessage: t7 } = r4(), o4 = w4(0), n5 = c5(() => {
|
|
1155
|
+
const e6 = window.document.querySelector(":hover"), r7 = Date.now() - o4.current < 30;
|
|
1156
|
+
if (!e6 || !r7) return;
|
|
1157
|
+
const { percentScrolled: s7, sequenceNumber: i5 } = p3(window.scrollY);
|
|
1158
|
+
t7({ type: "editor-scroll-updated", percentScrolled: s7, sequenceNumber: i5 }), t7({ type: "scroll-updated", position: { absolute: window.scrollY, relative: Math.round(window.scrollY / (window.document.body.clientHeight - window.innerHeight) * 100) } });
|
|
1159
|
+
}, [t7]);
|
|
1160
|
+
d(() => {
|
|
1161
|
+
if (!S2()) return;
|
|
1162
|
+
const e6 = () => {
|
|
1163
|
+
o4.current = Date.now();
|
|
1164
|
+
};
|
|
1165
|
+
return window.addEventListener("wheel", e6), window.addEventListener("touchstart", e6), window.addEventListener("keydown", e6), window.addEventListener("scroll", n5, { passive: true }), () => {
|
|
1166
|
+
window.removeEventListener("wheel", e6), window.removeEventListener("touchstart", e6), window.removeEventListener("keydown", e6), window.removeEventListener("scroll", n5);
|
|
1167
|
+
};
|
|
1168
|
+
}, [n5]);
|
|
1169
|
+
};
|
|
1170
|
+
|
|
1171
|
+
// ../../packages/portal/products/realm/dist/client/app/ErrorBubble/index.js
|
|
1172
|
+
init_styled_components_esm();
|
|
1173
|
+
init_WarningFilledIcon();
|
|
1174
|
+
init_Button();
|
|
1175
|
+
import r5 from "react";
|
|
1176
|
+
|
|
1177
|
+
// ../../packages/portal/products/realm/dist/client/app/ErrorBubble/DetailedErrors.js
|
|
1178
|
+
init_styled_components_esm();
|
|
1179
|
+
init_src();
|
|
1180
|
+
init_Button();
|
|
1181
|
+
init_hooks();
|
|
1182
|
+
import e5, { useRef as s5 } from "react";
|
|
1183
|
+
|
|
1184
|
+
// ../../packages/portal/products/realm/dist/client/app/utils/ansi-to-react.js
|
|
1185
|
+
var import_anser = __toESM(require_lib(), 1);
|
|
1186
|
+
var import_escape_carriage = __toESM(require_escape_carriage(), 1);
|
|
1187
|
+
import c6 from "react";
|
|
1188
|
+
function w5(t7, e6 = false) {
|
|
1189
|
+
return t7 = (0, import_escape_carriage.escapeCarriageReturn)($(t7)), import_anser.default.ansiToJson(t7, { json: true, remove_empty: true, use_classes: e6 });
|
|
1190
|
+
}
|
|
1191
|
+
function b4(t7) {
|
|
1192
|
+
let e6 = "";
|
|
1193
|
+
return t7.bg && (e6 += `${t7.bg}-bg `), t7.fg && (e6 += `${t7.fg}-fg `), t7.decoration && (e6 += `ansi-${t7.decoration} `), e6 === "" ? null : (e6 = e6.substring(0, e6.length - 1), e6);
|
|
1194
|
+
}
|
|
1195
|
+
function d2(t7) {
|
|
1196
|
+
const e6 = {};
|
|
1197
|
+
switch (t7.bg && (e6.backgroundColor = `rgb(${t7.bg})`), t7.fg && (e6.color = `rgb(${t7.fg})`), t7.decoration) {
|
|
1198
|
+
case "bold":
|
|
1199
|
+
e6.fontWeight = "bold";
|
|
1200
|
+
break;
|
|
1201
|
+
case "dim":
|
|
1202
|
+
e6.opacity = "0.5";
|
|
1203
|
+
break;
|
|
1204
|
+
case "italic":
|
|
1205
|
+
e6.fontStyle = "italic";
|
|
1206
|
+
break;
|
|
1207
|
+
case "hidden":
|
|
1208
|
+
e6.visibility = "hidden";
|
|
1209
|
+
break;
|
|
1210
|
+
case "strikethrough":
|
|
1211
|
+
e6.textDecoration = "line-through";
|
|
1212
|
+
break;
|
|
1213
|
+
case "underline":
|
|
1214
|
+
e6.textDecoration = "underline";
|
|
1215
|
+
break;
|
|
1216
|
+
case "blink":
|
|
1217
|
+
e6.textDecoration = "blink";
|
|
1218
|
+
break;
|
|
1219
|
+
default:
|
|
1220
|
+
break;
|
|
1221
|
+
}
|
|
1222
|
+
return e6;
|
|
1223
|
+
}
|
|
1224
|
+
function x4(t7, e6, n5, a3) {
|
|
1225
|
+
const s7 = e6 ? null : d2(n5), f6 = e6 ? b4(n5) : null;
|
|
1226
|
+
if (!t7) return c6.createElement("span", { style: s7, key: a3, className: f6 }, n5.content);
|
|
1227
|
+
const i5 = [], g8 = /(\s|^)(https?:\/\/(?:www\.|(?!www))[^\s.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/g;
|
|
1228
|
+
let r7 = 0, l5;
|
|
1229
|
+
for (; (l5 = g8.exec(n5.content)) !== null; ) {
|
|
1230
|
+
const [, m5, o4] = l5, h5 = l5.index + m5.length;
|
|
1231
|
+
h5 > r7 && i5.push(n5.content.substring(r7, h5));
|
|
1232
|
+
const u6 = o4.startsWith("www.") ? `http://${o4}` : o4;
|
|
1233
|
+
i5.push(c6.createElement("a", { key: r7, href: u6, target: "_blank" }, `${o4}`)), r7 = g8.lastIndex;
|
|
1234
|
+
}
|
|
1235
|
+
return r7 < n5.content.length && i5.push(n5.content.substring(r7)), c6.createElement("span", { style: s7, key: a3, className: f6 }, i5);
|
|
1236
|
+
}
|
|
1237
|
+
function y(t7) {
|
|
1238
|
+
const { className: e6, useClasses: n5, children: a3, linkify: s7 } = t7;
|
|
1239
|
+
return c6.createElement("code", { className: e6 }, w5(a3 ?? "", n5 ?? false).map(x4.bind(null, s7 ?? false, n5 ?? false)));
|
|
1240
|
+
}
|
|
1241
|
+
function $(t7) {
|
|
1242
|
+
let e6 = t7;
|
|
1243
|
+
do
|
|
1244
|
+
t7 = e6, e6 = t7.replace(/[^\n]\x08/gm, "");
|
|
1245
|
+
while (e6.length < t7.length);
|
|
1246
|
+
return t7;
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
// ../../packages/portal/products/realm/dist/client/app/ErrorBubble/DetailedErrors.js
|
|
1250
|
+
var u3 = y?.default || y;
|
|
1251
|
+
var A3 = ({
|
|
1252
|
+
onHide: a3,
|
|
1253
|
+
problems: t7
|
|
1254
|
+
}) => {
|
|
1255
|
+
const l5 = s5(null);
|
|
1256
|
+
return useOutsideClick(l5, a3), e5.createElement(e5.Fragment, null, e5.createElement(h3, null), e5.createElement(w6, {
|
|
1257
|
+
ref: l5
|
|
1258
|
+
}, e5.createElement(x5, null, e5.createElement(k2, {
|
|
1259
|
+
onClick: () => a3()
|
|
1260
|
+
}, "Close")), e5.createElement(y2, null, e5.createElement(E5, null, t7.map((o4, n5) => {
|
|
1261
|
+
const d4 = o4.message.split(`
|
|
1262
|
+
`)[0];
|
|
1263
|
+
return e5.createElement(p5, {
|
|
1264
|
+
key: n5
|
|
1265
|
+
}, e5.createElement(R3, null, e5.createElement("span", null, e5.createElement(v2, null, n5 + 1, "."), " ", e5.createElement(i3, null, d4)), e5.createElement(Tag, {
|
|
1266
|
+
color: "purple",
|
|
1267
|
+
className: "tag"
|
|
1268
|
+
}, o4.type || "ERROR")), o4.sourceFileRelativePath && e5.createElement(b5, null, "at", " ", [o4.sourceFileRelativePath || "", o4.sourceFileLocation?.line || ""].join(":")), e5.createElement(C2, {
|
|
1269
|
+
message: [o4.message.slice(d4.length + 1).trim(), o4.codeframe].join(`
|
|
1270
|
+
`)
|
|
1271
|
+
}));
|
|
1272
|
+
})))));
|
|
1273
|
+
};
|
|
1274
|
+
var b5 = styled_components_esm_default.div.withConfig({
|
|
1275
|
+
displayName: "DetailedErrors__b",
|
|
1276
|
+
componentId: "sc-1nq7neo-0"
|
|
1277
|
+
})(["word-break:break-all;"]);
|
|
1278
|
+
var v2 = styled_components_esm_default.span.withConfig({
|
|
1279
|
+
displayName: "DetailedErrors__v",
|
|
1280
|
+
componentId: "sc-1nq7neo-1"
|
|
1281
|
+
})(["font-weight:bold;display:inline-block;width:16px;"]);
|
|
1282
|
+
var p5 = styled_components_esm_default.div.withConfig({
|
|
1283
|
+
displayName: "DetailedErrors__p",
|
|
1284
|
+
componentId: "sc-1nq7neo-2"
|
|
1285
|
+
})(["display:flex;flex-direction:column;gap:var(--spacing-sm);padding:var(--spacing-md);border-radius:var(--border-radius-md);background:var(--detailed-error-message-bg-color);position:relative;"]);
|
|
1286
|
+
var h3 = styled_components_esm_default.div.withConfig({
|
|
1287
|
+
displayName: "DetailedErrors__h",
|
|
1288
|
+
componentId: "sc-1nq7neo-3"
|
|
1289
|
+
})(["position:fixed;top:0;left:0;width:100vw;height:100vh;background:var(--detailed-error-overlay-bg-color);opacity:var(--detailed-error-overlay-opacity);z-index:var(--detailed-error-overlay-z-index);"]);
|
|
1290
|
+
var w6 = styled_components_esm_default.div.withConfig({
|
|
1291
|
+
displayName: "DetailedErrors__w",
|
|
1292
|
+
componentId: "sc-1nq7neo-4"
|
|
1293
|
+
})(["position:fixed;width:var(--detailed-error-modal-width);max-width:1000px;height:var(--detailed-error-modal-height);top:var(--detailed-error-modal-top);left:50%;transform:translateX(-50%);border-radius:var(--detailed-error-modal-border-radius);background:var(--detailed-error-modal-bg-color);color:var(--detailed-error-modal-color);box-shadow:var(--detailed-error-modal-box-shadow);z-index:var(--detailed-error-modal-z-index);font-family:var(--detailed-error-modal-font-family);overflow:hidden;padding:var(--detailed-error-modal-padding);"]);
|
|
1294
|
+
var y2 = styled_components_esm_default.div.withConfig({
|
|
1295
|
+
displayName: "DetailedErrors__y",
|
|
1296
|
+
componentId: "sc-1nq7neo-5"
|
|
1297
|
+
})(["position:relative;overflow:auto;display:flex;flex-direction:column;height:var(--detailed-error-content-height);"]);
|
|
1298
|
+
var x5 = styled_components_esm_default.div.withConfig({
|
|
1299
|
+
displayName: "DetailedErrors__x",
|
|
1300
|
+
componentId: "sc-1nq7neo-6"
|
|
1301
|
+
})(["text-align:var(--detailed-error-modal-wapper-text-align);"]);
|
|
1302
|
+
var k2 = styled_components_esm_default.button.withConfig({
|
|
1303
|
+
displayName: "DetailedErrors__k",
|
|
1304
|
+
componentId: "sc-1nq7neo-7"
|
|
1305
|
+
})(["border:none;background:none;color:var(--detailed-error-close-button-color);text-transform:var(--detailed-error-close-button-text-transform);cursor:pointer;"]);
|
|
1306
|
+
var E5 = styled_components_esm_default.div.withConfig({
|
|
1307
|
+
displayName: "DetailedErrors__E",
|
|
1308
|
+
componentId: "sc-1nq7neo-8"
|
|
1309
|
+
})(["margin:var(--detailed-error-message-margin);display:flex;flex-direction:column;border-radius:var(--detailed-error-message-border-radius);color:var(--detailed-error-message-color);width:var(--detailed-error-message-width);font-size:var(--detailed-error-message-font-size);font-family:var(--detailed-error-message-font-family);overflow-x:auto;gap:var(--spacing-sm);"]);
|
|
1310
|
+
function C2({
|
|
1311
|
+
message: a3
|
|
1312
|
+
}) {
|
|
1313
|
+
const [t7, l5] = e5.useState(false), o4 = a3.split(`
|
|
1314
|
+
`), n5 = t7 ? a3 : o4.slice(0, 10).join(`
|
|
1315
|
+
`);
|
|
1316
|
+
return e5.createElement(e5.Fragment, null, e5.createElement(i3, {
|
|
1317
|
+
useClasses: true
|
|
1318
|
+
}, n5), o4.length > 10 ? e5.createElement(Button, {
|
|
1319
|
+
variant: "link",
|
|
1320
|
+
onClick: () => l5(!t7)
|
|
1321
|
+
}, t7 ? "Show less" : "Show more") : null);
|
|
1322
|
+
}
|
|
1323
|
+
var i3 = styled_components_esm_default(u3).withConfig({
|
|
1324
|
+
displayName: "DetailedErrors__i",
|
|
1325
|
+
componentId: "sc-1nq7neo-9"
|
|
1326
|
+
})(["display:block;white-space:pre;overflow:auto;text-wrap:wrap;.ansi-black-fg{color:#000;}.ansi-bright-black-fg{color:#888;}.ansi-red-fg{color:#ff5554;}.ansi-green-fg{color:#19cb00;}.ansi-yellow-fg{color:#cecb00;}.ansi-blue-fg{color:#4f67ff;}.ansi-magenta-fg{color:#cb1ed1;}.ansi-cyan-fg{color:#0dcdcd;}.ansi-white-fg{color:#e5e5e5;}.ansi-bright-white-fg{color:#fff;}.ansi-bright-red-fg{color:#3e0605;}.ansi-bright-green-fg{color:#23fd00;}.ansi-bright-yellow-fg{color:#fffd00;}.ansi-bright-blue-fg{color:#0026ff;}.ansi-bright-magenta-fg{color:#fd28ff;}.ansi-bright-cyan-fg{color:#14ffff;}.ansi-black-bg{background-color:#000;}.ansi-red-bg{background-color:#cc0403;}.ansi-green-bg{background-color:#19cb00;}.ansi-yellow-bg{background-color:#cecb00;}.ansi-blue-bg{background-color:#001cd1;}.ansi-magenta-bg{background-color:#cb1ed1;}.ansi-cyan-bg{background-color:#0dcdcd;}.ansi-white-bg{background-color:#e5e5e5;}"]);
|
|
1327
|
+
var R3 = styled_components_esm_default.div.withConfig({
|
|
1328
|
+
displayName: "DetailedErrors__R",
|
|
1329
|
+
componentId: "sc-1nq7neo-10"
|
|
1330
|
+
})(["font-size:1.2em;display:flex;flex-direction:row;justify-content:space-between;align-items:center;", "{font-family:var(--font-family-base);display:inline;}"], i3);
|
|
1331
|
+
|
|
1332
|
+
// ../../packages/portal/products/realm/dist/client/app/ErrorBubble/index.js
|
|
1333
|
+
var E6 = "errors-updated";
|
|
1334
|
+
var k3 = 99;
|
|
1335
|
+
var N2 = () => {
|
|
1336
|
+
const [e6, s7] = r5.useState([]), [i5, a3] = r5.useState(false);
|
|
1337
|
+
c(E6, (n5) => s7(n5.errors));
|
|
1338
|
+
const o4 = r5.useMemo(() => {
|
|
1339
|
+
const n5 = e6.filter((t7) => t7.type === "BROKEN_LINK"), p10 = e6.filter((t7) => t7.type === "MARKDOC"), g8 = e6.filter((t7) => t7.type !== "BROKEN_LINK" && t7.type !== "MARKDOC");
|
|
1340
|
+
return {
|
|
1341
|
+
brokenLinks: n5,
|
|
1342
|
+
markdocErrors: p10,
|
|
1343
|
+
otherErrors: g8
|
|
1344
|
+
};
|
|
1345
|
+
}, [e6]);
|
|
1346
|
+
if (!e6.length) return null;
|
|
1347
|
+
const c11 = o4.markdocErrors.length ? r5.createElement("span", null, "(", o4.markdocErrors.length, " markdoc)") : null, b6 = o4.brokenLinks.length ? r5.createElement("span", null, "(", o4.brokenLinks.length, " broken links) ") : null, u6 = o4.otherErrors.length ? r5.createElement("span", null, "(", o4.otherErrors.length, " other) ") : null;
|
|
1348
|
+
if (i5) return r5.createElement(A3, {
|
|
1349
|
+
onHide: () => a3(false),
|
|
1350
|
+
problems: e6
|
|
1351
|
+
});
|
|
1352
|
+
const d4 = e6.length > k3 ? r5.createElement(WarningFilledIcon, {
|
|
1353
|
+
color: "currentColor"
|
|
1354
|
+
}) : r5.createElement(x6, null, r5.createElement("span", null, e6.length));
|
|
1355
|
+
return r5.createElement(w7, null, r5.createElement(Button, {
|
|
1356
|
+
tone: "danger",
|
|
1357
|
+
variant: "primary",
|
|
1358
|
+
size: "large",
|
|
1359
|
+
"aria-label": "Show detailed error message",
|
|
1360
|
+
icon: d4,
|
|
1361
|
+
onClick: () => a3(true)
|
|
1362
|
+
}, r5.createElement(y3, null, "Problems:", c11, b6, u6)));
|
|
1363
|
+
};
|
|
1364
|
+
var x6 = styled_components_esm_default.div.withConfig({
|
|
1365
|
+
displayName: "ErrorBubble__x",
|
|
1366
|
+
componentId: "sc-q7mbm9-0"
|
|
1367
|
+
})(["display:flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;background-color:currentcolor;font-size:16px;font-weight:bold;> span{color:var(--text-color-on-color);}"]);
|
|
1368
|
+
var y3 = styled_components_esm_default.div.withConfig({
|
|
1369
|
+
displayName: "ErrorBubble__y",
|
|
1370
|
+
componentId: "sc-q7mbm9-1"
|
|
1371
|
+
})(["display:flex;gap:var(--error-bubble-gap);white-space:nowrap;padding:0;font-size:var(--error-card-font-size);color:var(--text-color-on-color);"]);
|
|
1372
|
+
var w7 = styled_components_esm_default.div.withConfig({
|
|
1373
|
+
displayName: "ErrorBubble__w",
|
|
1374
|
+
componentId: "sc-q7mbm9-2"
|
|
1375
|
+
})(["display:flex;flex-direction:row;align-items:center;position:fixed;top:calc(var(--navbar-height) + 20px);right:0;transition:transform 0.2s ease-in-out,opacity 0.2s ease-in-out;transform:translateX(calc(100% - (24px + var(--spacing-sm) + var(--button-gap))));width:fit-content;&:hover{transform:translateX(0);opacity:1;}text-overflow:var(--error-bubble-text-overflow);font-family:var(--error-bubble-font-family);z-index:var(--error-bubble-z-index);&& button{--button-icon-size:24px;--button-font-size:var(--error-bubble-font-size);--button-icon-left-padding:var(--error-bubble-padding);--button-bg-color-primary-danger:var(--error-bubble-bg-color);--button-bg-color-primary-danger-hover:var(--error-bubble-bg-color-hover);--button-bg-color-primary-danger-pressed:var(--error-bubble-bg-colorpressed);--button-content-color-danger:var(--error-bubble-content-color);--button-content-color-danger-hover:var(--error-bubble-content-color-hover);--button-content-color-danger-pressed:var(--error-bubble-content-color-pressed);border-top-right-radius:0;border-bottom-right-radius:0;}"]);
|
|
1376
|
+
|
|
1377
|
+
// ../../packages/portal/products/realm/dist/client/styling/default-styles.js
|
|
1378
|
+
init_styles();
|
|
1379
|
+
|
|
1380
|
+
// ../../packages/portal/products/realm/dist/client/providers/theme/ThemeDataProvider.js
|
|
1381
|
+
init_src();
|
|
1382
|
+
import a2 from "react";
|
|
1383
|
+
|
|
1384
|
+
// ../../packages/portal/products/realm/dist/client/app/search/useSearch.js
|
|
1385
|
+
init_constants();
|
|
1386
|
+
init_utils();
|
|
1387
|
+
import { useCallback as C3, useEffect as I, useState as F3, useRef as T } from "react";
|
|
1388
|
+
|
|
1389
|
+
// ../../packages/portal/products/realm/dist/utils/time/debounce.js
|
|
1390
|
+
function c7(e6, i5 = 50, l5 = false) {
|
|
1391
|
+
let t7;
|
|
1392
|
+
return function(...o4) {
|
|
1393
|
+
let n5 = () => {
|
|
1394
|
+
t7 = void 0, l5 || e6.apply(this, o4);
|
|
1395
|
+
};
|
|
1396
|
+
const u6 = l5 && !t7;
|
|
1397
|
+
clearTimeout(t7), t7 = setTimeout(n5, i5), u6 && e6.apply(this, o4);
|
|
1398
|
+
};
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
// ../../packages/portal/products/realm/dist/client/app/search/useFacets.js
|
|
1402
|
+
init_utils();
|
|
1403
|
+
import { useCallback as y4, useEffect as u4, useState as n2 } from "react";
|
|
1404
|
+
function h4(e6) {
|
|
1405
|
+
const [o4, c11] = n2([]), [s7, a3] = n2(null), [t7, r7] = n2(null), [p10, i5] = n2(false), { currentLocale: f6 } = E2();
|
|
1406
|
+
u4(() => {
|
|
1407
|
+
i5(true), m5();
|
|
1408
|
+
}, [t7]);
|
|
1409
|
+
const m5 = y4(async () => {
|
|
1410
|
+
if (e6 && t7 === null) {
|
|
1411
|
+
i5(false);
|
|
1412
|
+
return;
|
|
1413
|
+
}
|
|
1414
|
+
let l5 = { locale: f6, field: e6 };
|
|
1415
|
+
t7 && (l5 = { ...l5, ...t7 });
|
|
1416
|
+
const F4 = await (await fetch(withPathPrefix(_.SEARCH_FACETS), { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify(l5) })).json();
|
|
1417
|
+
e6 ? a3(F4) : c11(F4), i5(false);
|
|
1418
|
+
}, [f6, t7, e6]);
|
|
1419
|
+
return { initialFacets: o4, searchFacets: s7, isFacetsLoading: p10, setSearchFacetQuery: r7 };
|
|
1420
|
+
}
|
|
1421
|
+
function E7(e6) {
|
|
1422
|
+
const [o4, c11] = n2(null), { searchFacets: s7, setSearchFacetQuery: a3 } = h4(e6);
|
|
1423
|
+
return u4(() => {
|
|
1424
|
+
const t7 = s7 ? s7.find((r7) => r7.field === e6) ?? null : null;
|
|
1425
|
+
c11(t7);
|
|
1426
|
+
}, [s7, e6]), { searchFacet: o4, setSearchFacet: c11, setSearchFacetQuery: a3 };
|
|
1427
|
+
}
|
|
1428
|
+
var L3 = (e6) => {
|
|
1429
|
+
const [o4, c11] = n2([]), { initialFacets: s7 } = h4();
|
|
1430
|
+
return u4(() => {
|
|
1431
|
+
if (e6 && Object.keys(e6).length) {
|
|
1432
|
+
const a3 = [];
|
|
1433
|
+
for (const t7 of s7) a3.push({ ...t7, values: e6[t7.field]?.map((r7) => ({ ...r7, isCounterVisible: true })) || [] });
|
|
1434
|
+
c11(a3);
|
|
1435
|
+
} else c11(s7);
|
|
1436
|
+
}, [s7, e6]), { facets: o4 };
|
|
1437
|
+
};
|
|
1438
|
+
|
|
1439
|
+
// ../../packages/portal/products/realm/dist/client/app/search/useSearch.js
|
|
1440
|
+
var B2 = (t7, n5, e6, o4, c11, r7, i5, l5) => {
|
|
1441
|
+
const { currentLocale: d4 } = E2(), h5 = T(""), m5 = C3(c7(async (a3, f6, S5, u6) => {
|
|
1442
|
+
if (!a3.trim().length && !f6.length) {
|
|
1443
|
+
e6({}), o4({}), c11(false);
|
|
1444
|
+
return;
|
|
1445
|
+
}
|
|
1446
|
+
const E9 = { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ query: a3, filter: A4(f6, u6, r7), locale: S5 }) };
|
|
1447
|
+
try {
|
|
1448
|
+
const p10 = await fetch(withPathPrefix(_.SEARCH), E9);
|
|
1449
|
+
if (h5.current === a3) {
|
|
1450
|
+
const s7 = await p10.json();
|
|
1451
|
+
o4(s7.facets), e6(s7.documents), a3.trim().length > 1 && F.send({ type: "search.query", payload: { query: a3, resultCount: Object.keys(s7.documents).length.toString() } });
|
|
1452
|
+
}
|
|
1453
|
+
c11(false);
|
|
1454
|
+
} catch (p10) {
|
|
1455
|
+
e6({}), console.log(p10);
|
|
1456
|
+
}
|
|
1457
|
+
}, SEARCH_DEBOUNCE_TIME_MS), [r7?.version, r7?.folderId, i5]);
|
|
1458
|
+
return I(() => {
|
|
1459
|
+
l5 || (c11(true), m5(t7, n5, d4, i5), h5.current = t7);
|
|
1460
|
+
}, [l5, n5, d4, i5, t7, m5, c11]), {};
|
|
1461
|
+
};
|
|
1462
|
+
var K = (t7, n5, e6, o4, c11, r7, i5, l5) => {
|
|
1463
|
+
const { currentLocale: d4 } = E2();
|
|
1464
|
+
I(() => {
|
|
1465
|
+
h5(e6, t7, n5, d4, o4, c11, l5);
|
|
1466
|
+
}, [o4, l5]);
|
|
1467
|
+
const h5 = C3(async (m5, a3, f6, S5, u6, E9, p10) => {
|
|
1468
|
+
if (u6) {
|
|
1469
|
+
const { groupKey: s7 } = u6;
|
|
1470
|
+
i5(true);
|
|
1471
|
+
const v5 = { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ query: a3, filter: (() => {
|
|
1472
|
+
const R4 = E9.find((y5) => y5.field === u);
|
|
1473
|
+
return R4 && !f6.find((L4) => L4.field === R4?.field) ? [...f6, { field: R4.field, values: [s7] }] : A4(f6, p10);
|
|
1474
|
+
})(), loadMore: u6, locale: S5 }) }, D3 = await (await fetch(withPathPrefix(_.SEARCH), v5)).json(), H = m5[s7] || [], j = D3.documents[s7], w8 = { ...m5, [s7]: [...H, ...j] };
|
|
1475
|
+
r7(w8), i5(false);
|
|
1476
|
+
}
|
|
1477
|
+
}, []);
|
|
1478
|
+
return {};
|
|
1479
|
+
};
|
|
1480
|
+
function se2(t7, n5) {
|
|
1481
|
+
const { searchFeatures: e6 } = s2(), [o4, c11] = F3(""), [r7, i5] = F3([]), [l5, d4] = F3({}), [h5, m5] = F3({}), [a3, f6] = F3(), [S5, u6] = F3(false), { facets: E9 } = L3(h5), { versions: p10 = [] } = S3() || {}, s7 = p10.find((g8) => g8?.active);
|
|
1482
|
+
return B2(o4, r7, d4, m5, u6, s7, t7, n5), K(o4, r7, l5, a3, E9, d4, u6, t7), { query: o4, setQuery: c11, filter: r7, setFilter: i5, items: l5, isSearchLoading: S5, facets: E9, groupField: u, setLoadMore: f6, advancedSearch: e6?.advanced?.enabled, askAi: e6?.ai?.enabled };
|
|
1483
|
+
}
|
|
1484
|
+
function A4(t7, n5, e6) {
|
|
1485
|
+
return [...t7, ...n5 ? [{ field: b, values: [n5] }] : [], ...e6 ? [{ field: G, values: [...e6.default ? ["default"] : [e6.folderId, e6.version]] }] : []];
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
// ../../packages/portal/products/realm/dist/client/app/search/useAiSearch.js
|
|
1489
|
+
init_constants();
|
|
1490
|
+
init_utils();
|
|
1491
|
+
import { useCallback as A5, useState as s6 } from "react";
|
|
1492
|
+
function Z(C4) {
|
|
1493
|
+
const [v5, u6] = s6(), [g8, f6] = s6([]), [w8, k4] = s6(""), [x7, d4] = s6([]), [E9, o4] = s6(false), [P2, e6] = s6(null), [R4, a3] = s6(null), { currentLocale: O4 } = E2(), I2 = x2(), { versions: F4 = [] } = S3() || {}, m5 = F4.find((t7) => t7?.active), h5 = A5(() => {
|
|
1494
|
+
u6(""), f6([]), o4(false), e6(null);
|
|
1495
|
+
}, [u6, f6, e6]), J2 = A5(() => {
|
|
1496
|
+
h5(), d4([]);
|
|
1497
|
+
}, [h5, d4]);
|
|
1498
|
+
return { askQuestion: async (t7, M2) => {
|
|
1499
|
+
if (!t7) return;
|
|
1500
|
+
R4 && R4.abort();
|
|
1501
|
+
const b6 = new AbortController();
|
|
1502
|
+
a3(b6), h5(), o4(true), k4(t7), fetch(withPathPrefix(_.ASK_AI), { method: "POST", body: JSON.stringify({ text: t7, history: M2 || [], locale: O4, product: I2?.name, filter: C4?.filter, version: m5 && { folder: m5.folderId, label: m5.label } }), signal: b6.signal }).then((r7) => {
|
|
1503
|
+
if (!r7.ok) {
|
|
1504
|
+
o4(false), r7.status === 401 ? e6("ai_search_unauthorized" /* Unauthorized */) : r7.status === 403 ? e6("ai_search_forbidden" /* Forbidden */) : e6("http_request_in_failed_status" /* HttpRequestFailed */);
|
|
1505
|
+
return;
|
|
1506
|
+
}
|
|
1507
|
+
let c11 = "";
|
|
1508
|
+
const S5 = r7.body;
|
|
1509
|
+
if (!S5) return;
|
|
1510
|
+
const N3 = S5.getReader(), y5 = () => {
|
|
1511
|
+
N3.read().then(({ value: i5, done: Q3 }) => {
|
|
1512
|
+
if (Q3) {
|
|
1513
|
+
o4(false), a3(null), c11 || e6("empty_response" /* EmptyResponse */), t7.trim().length > 1 && F.send({ type: "search.ai.query", payload: { question: t7, answer: c11, resources: JSON.stringify(g8) } });
|
|
1514
|
+
return;
|
|
1515
|
+
}
|
|
1516
|
+
const G4 = new TextDecoder().decode(i5), H = /data: (.*)/g;
|
|
1517
|
+
let p10;
|
|
1518
|
+
for (; (p10 = H.exec(G4)) !== null; ) {
|
|
1519
|
+
if (!p10[1]) continue;
|
|
1520
|
+
const l5 = JSON.parse(p10[1]);
|
|
1521
|
+
if (l5.answer) c11 += l5.answer, u6(c11);
|
|
1522
|
+
else if (l5.sources) {
|
|
1523
|
+
const T2 = Math.floor(Math.random() * 3) + 4;
|
|
1524
|
+
f6(l5.sources.slice(0, T2));
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
y5();
|
|
1528
|
+
}).catch((i5) => {
|
|
1529
|
+
i5.name !== "AbortError" && (console.error(i5), o4(false), a3(null), e6("error_processing_response" /* ErrorProcessingResponse */));
|
|
1530
|
+
});
|
|
1531
|
+
};
|
|
1532
|
+
y5();
|
|
1533
|
+
}).catch((r7) => {
|
|
1534
|
+
r7.name !== "AbortError" && (console.error(r7), o4(false), a3(null), e6("http_request_in_failed_status" /* HttpRequestFailed */));
|
|
1535
|
+
});
|
|
1536
|
+
}, isGeneratingResponse: E9, response: v5, resources: g8, question: w8, error: P2, clearConversation: J2, conversation: x7, setConversation: d4 };
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
// ../../packages/portal/products/realm/dist/utils/object/deep-merge.js
|
|
1540
|
+
function p6(...y5) {
|
|
1541
|
+
return y5.reduce((i5, e6 = {}) => {
|
|
1542
|
+
for (const o4 of Object.keys(e6)) ["__proto__", "constructor", "prototype"].includes(o4) || (Array.isArray(i5[o4]) && Array.isArray(e6[o4]) ? i5[o4] = e6[o4] : o2(i5[o4]) && o2(e6[o4]) ? i5[o4] = p6(i5[o4], e6[o4]) : i5[o4] = e6[o4]);
|
|
1543
|
+
return i5;
|
|
1544
|
+
}, {});
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
// ../../packages/portal/products/realm/dist/client/providers/theme/ThemeDataProvider.js
|
|
1548
|
+
var Q2 = /* @__PURE__ */ new Set(["title", "description", "seo", "sidebar", "excludeFromSearch", "template", "redirects", "rbac", "metadata", "slug", "codeSnippet", "breadcrumbs", "markdown", "seo", "navbar", "footer", "colorMode", "feedback", "navigation"]);
|
|
1549
|
+
var V = { useBreadcrumbs: L2, useCatalog: E3, useCatalogSort: h, useCatalogSearch: Q, useFetchCatalogEntities: O, useFetchCatalogEntitiesRelations: O2, useCatalogClassic: se, useCurrentProduct: x2, useGlobalData: s2, useSearch: se2, useAiSearch: Z, useFacetQuery: E7, useI18n: e2, useI18nConfig: E2, useL10n: e2, useL10nConfig: E2, usePageData: F2, usePageSharedData: n, usePageVersions: S3, usePreloadHistory: m, useProducts: f, useUserMenu: f2, useSidebarItems: C, useSidebarSiblingsData: w, useSubmitFeedback: w3, useTranslate: c3, useUserTeams: r2, usePageProps: R, useMarkdownText: B, useCodeHighlight: Jr, useLoadAndNavigate: t2, useTelemetry: t, useOtelTelemetry: t };
|
|
1550
|
+
var W = { LinkComponent: G2 };
|
|
1551
|
+
function $2({ children: n5 }) {
|
|
1552
|
+
const { props: e6 } = F2() || {}, t7 = s2() || {}, u6 = a2.useMemo(() => {
|
|
1553
|
+
const c11 = Object.fromEntries(Object.entries(e6?.frontmatter || {}).filter(([m5]) => Q2.has(m5)));
|
|
1554
|
+
return p6(t7, c11);
|
|
1555
|
+
}, [t7, e6?.frontmatter]), i5 = { hooks: V, components: W, config: u6 };
|
|
1556
|
+
return a2.createElement(ThemeDataContext.Provider, { value: i5 }, n5);
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
// ../../packages/portal/products/realm/dist/client/app/seo/SeoTags.js
|
|
1560
|
+
init_utils();
|
|
1561
|
+
import t5 from "react";
|
|
1562
|
+
import { Helmet as m3 } from "@dr.pogodin/react-helmet";
|
|
1563
|
+
|
|
1564
|
+
// ../../packages/portal/products/realm/dist/utils/guards/is-truthy.js
|
|
1565
|
+
function t4(r7) {
|
|
1566
|
+
return !!r7;
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
// ../../packages/portal/products/realm/dist/client/app/utils/get-meta-tags-attributes.js
|
|
1570
|
+
function i4(t7) {
|
|
1571
|
+
const { name: e6, property: n5, content: r7 } = t7;
|
|
1572
|
+
if (e6 && n5) return { name: e6, property: n5, content: r7 };
|
|
1573
|
+
if (e6) return { name: e6, content: r7 };
|
|
1574
|
+
if (n5) return { property: n5, content: r7 };
|
|
1575
|
+
}
|
|
1576
|
+
function c8(t7) {
|
|
1577
|
+
const e6 = [];
|
|
1578
|
+
if (t7.title && (e6.push(i4({ name: "title", content: t7.title })), e6.push(i4({ property: "og:title", content: t7.title })), e6.push(i4({ name: "twitter:title", property: "twitter:title", content: t7.title }))), t7.description && (e6.push(i4({ name: "description", content: t7.description })), e6.push(i4({ property: "og:description", content: t7.description })), e6.push(i4({ name: "twitter:description", property: "twitter:description", content: t7.description }))), t7.image && (e6.push(i4({ name: "image", content: t7.image })), e6.push(i4({ property: "og:image", content: t7.image })), e6.push(i4({ name: "twitter:image", property: "twitter:image", content: t7.image }))), t7.keywords && e6.push(i4({ name: "keywords", content: Array.isArray(t7.keywords) ? t7.keywords.join(", ") : t7.keywords })), t7.meta) for (const { name: n5, content: r7 } of t7.meta) n5.includes("og:") ? e6.push(i4({ property: n5, content: r7 })) : e6.push(i4({ name: n5, content: r7 }));
|
|
1579
|
+
return e6.filter(t4);
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
// ../../packages/portal/products/realm/dist/client/app/seo/SeoTags.js
|
|
1583
|
+
function g5(l5) {
|
|
1584
|
+
const { seo: e6, slug: r7 } = l5;
|
|
1585
|
+
if (!e6) return null;
|
|
1586
|
+
const n5 = c8(e6);
|
|
1587
|
+
return t5.createElement(m3, null, t5.createElement("title", null, e6.title), e6.siteUrl ? t5.createElement("link", { rel: "canonical", href: combineUrls(e6.siteUrl, r7) }) : null, e6.jsonLd ? t5.createElement("script", { type: "application/ld+json" }, JSON.stringify(e6.jsonLd)) : null, n5.map((i5, o4) => t5.createElement("meta", { key: o4, ...i5 })));
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
// ../../packages/portal/products/realm/dist/client/ErrorBoundary.js
|
|
1591
|
+
import * as n3 from "react";
|
|
1592
|
+
var m4 = class extends n3.Component {
|
|
1593
|
+
constructor(r7) {
|
|
1594
|
+
super(r7), this.state = { error: void 0 };
|
|
1595
|
+
}
|
|
1596
|
+
componentDidCatch(r7, c11) {
|
|
1597
|
+
const { name: e6, message: t7 } = r7, o4 = { name: e6, message: t7, stack: c11.componentStack ?? void 0 };
|
|
1598
|
+
this.setState({ error: o4 }), F.send({ type: "client.error", payload: { message: `${e6}: ${t7}`, url: location.href } }), F.sendError(o4, "ReactErrorBoundary"), console.log(r7);
|
|
1599
|
+
}
|
|
1600
|
+
render() {
|
|
1601
|
+
return this.state.error && true ? n3.createElement(c2, { error: this.state.error }) : this.props.children;
|
|
1602
|
+
}
|
|
1603
|
+
};
|
|
1604
|
+
|
|
1605
|
+
// ../../packages/portal/products/realm/dist/client/app/hooks/useRouteChangeTracker.js
|
|
1606
|
+
init_src();
|
|
1607
|
+
import { useLocation as u5, useNavigate as d3, useNavigationType as l3 } from "react-router-dom";
|
|
1608
|
+
import { useEffect as v3, useState as P } from "react";
|
|
1609
|
+
|
|
1610
|
+
// ../../packages/portal/products/realm/dist/client/runtime/generated/browser-plugins.js
|
|
1611
|
+
var onRouteChange = (context, themeConfig) => {
|
|
1612
|
+
for (const hookCallback of __onRouteChangeHooks) {
|
|
1613
|
+
typeof hookCallback === "function" && hookCallback(context, themeConfig);
|
|
1614
|
+
}
|
|
1615
|
+
};
|
|
1616
|
+
|
|
1617
|
+
// ../../packages/portal/products/realm/dist/client/app/utils/resolveRouteBySlug.js
|
|
1618
|
+
init_utils();
|
|
1619
|
+
async function p7(r7, t7) {
|
|
1620
|
+
const e6 = await fetch(withPathPrefix(_.RESOLVE_ROUTE_BY_SLUG), { method: "POST", body: JSON.stringify(r7) }), { route: o4 } = await e6.json();
|
|
1621
|
+
let i5 = t7;
|
|
1622
|
+
return (t7 === "markdown" || t7 === i) && (i5 = o4.fsPath), { file: i5.replace(/^\//g, ""), url: r7, pointer: o4.pointer, position: o4.position };
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
// ../../packages/portal/products/realm/dist/client/app/hooks/useRouteChangeTracker.js
|
|
1626
|
+
var W2 = () => {
|
|
1627
|
+
const e6 = u5(), n5 = d3(), a3 = l3(), r7 = s3(), [t7, i5] = P(), m5 = useThemeConfig(), { sendMessage: h5 } = r4();
|
|
1628
|
+
v3(() => {
|
|
1629
|
+
x().then(() => {
|
|
1630
|
+
if (e6.pathname !== t7?.pathname || e6.search !== t7.search) {
|
|
1631
|
+
onRouteChange({ location: e6, prevLocation: t7 }, m5);
|
|
1632
|
+
const o4 = `${window.origin}${e6.pathname + e6.search + e6.hash}`, s7 = t7 ? `${window.origin}${t7.pathname + t7.search + t7.hash}` : void 0;
|
|
1633
|
+
F.send({ type: "page.viewed", payload: { uri: o4, referrer: s7 || document.referrer || void 0 } });
|
|
1634
|
+
}
|
|
1635
|
+
});
|
|
1636
|
+
const p10 = !!t7;
|
|
1637
|
+
i5(e6);
|
|
1638
|
+
const { pathname: c11, hash: g8, state: f6 } = e6;
|
|
1639
|
+
if (e6?.pathname.endsWith("/") && e6?.pathname !== "/") {
|
|
1640
|
+
const o4 = e(e6.pathname);
|
|
1641
|
+
n5({ pathname: o4, search: e6.search, hash: e6.hash }, { replace: true });
|
|
1642
|
+
}
|
|
1643
|
+
p10 && p7(c11 + g8, r7?.templateId).then((o4) => {
|
|
1644
|
+
const s7 = a3 === "POP" ? "browser" : f6?.origin;
|
|
1645
|
+
s7 && h5({ type: "route-updated", origin: s7, ...o4 });
|
|
1646
|
+
}).catch((o4) => console.log("Resolve route by slug failed with error: ", o4.message));
|
|
1647
|
+
}, [e6, a3]);
|
|
1648
|
+
};
|
|
1649
|
+
|
|
1650
|
+
// ../../packages/portal/products/realm/dist/client/runtime/generated/routes.js
|
|
1651
|
+
var clientRoutes = [
|
|
1652
|
+
"/openapi-files/redocly-museum",
|
|
1653
|
+
"/scout/agent-api/openapi",
|
|
1654
|
+
"/scout/api/openapi"
|
|
1655
|
+
];
|
|
1656
|
+
|
|
1657
|
+
// ../../packages/portal/products/realm/dist/client/app/PageCounter/index.js
|
|
1658
|
+
init_styled_components_esm();
|
|
1659
|
+
import t6 from "react";
|
|
1660
|
+
var l4 = "pages-updated";
|
|
1661
|
+
function v4() {
|
|
1662
|
+
const [a3, o4] = t6.useState(0);
|
|
1663
|
+
return c(l4, (i5) => o4(i5.pages)), a3 ? t6.createElement(g6, null, t6.createElement(c9, {
|
|
1664
|
+
title: "Total number of pages in documentation"
|
|
1665
|
+
}, t6.createElement(n4, null, "pages"), t6.createElement(p8, null, a3), t6.createElement(r6, null, "pages"))) : null;
|
|
1666
|
+
}
|
|
1667
|
+
var r6 = styled_components_esm_default.span.withConfig({
|
|
1668
|
+
displayName: "PageCounter__r",
|
|
1669
|
+
componentId: "sc-225gxo-0"
|
|
1670
|
+
})(["font-weight:var(--font-weight-regular);font-size:var(--font-size-sm);opacity:0;transition:opacity 0.2s ease-in-out;margin-left:var(--spacing-xxs);"]);
|
|
1671
|
+
var p8 = styled_components_esm_default.span.withConfig({
|
|
1672
|
+
displayName: "PageCounter__p",
|
|
1673
|
+
componentId: "sc-225gxo-1"
|
|
1674
|
+
})(["font-weight:var(--font-weight-bold);font-size:var(--font-size-lg);margin-left:var(--spacing-base);"]);
|
|
1675
|
+
var n4 = styled_components_esm_default.span.withConfig({
|
|
1676
|
+
displayName: "PageCounter__n",
|
|
1677
|
+
componentId: "sc-225gxo-2"
|
|
1678
|
+
})(["font-size:0.7em;writing-mode:vertical-rl;text-orientation:mixed;transform:rotate(180deg);text-transform:uppercase;letter-spacing:0.5px;opacity:0.9;margin-bottom:var(--spacing-xxs);position:absolute;left:var(--spacing-xxs);top:50%;transform:translateY(-50%) rotate(180deg);"]);
|
|
1679
|
+
var c9 = styled_components_esm_default.div.withConfig({
|
|
1680
|
+
displayName: "PageCounter__c",
|
|
1681
|
+
componentId: "sc-225gxo-3"
|
|
1682
|
+
})(["display:flex;align-items:center;gap:var(--spacing-xs);background:var(--color-blue-6);color:var(--text-color-on-color);padding:var(--spacing-sm) var(--spacing-lg) var(--spacing-sm) var(--spacing-sm);border-radius:var(--border-radius) 0 0 var(--border-radius);font-size:var(--font-size-base);box-shadow:var(--bg-raised-shadow);min-height:48px;width:100%;min-width:120px;&:hover{filter:brightness(0.85);}"]);
|
|
1683
|
+
var g6 = styled_components_esm_default.div.withConfig({
|
|
1684
|
+
displayName: "PageCounter__g",
|
|
1685
|
+
componentId: "sc-225gxo-4"
|
|
1686
|
+
})(["display:flex;flex-direction:row;align-items:center;position:fixed;top:calc(var(--navbar-height) + 70px);right:0;transform:translateX(calc(100% - 18px));transition:all 0.3s ease-in-out;z-index:var(--z-index-popover);min-width:120px;&:hover{transform:translateX(0);", "{opacity:1;}", "{opacity:0;}}"], r6, n4);
|
|
1687
|
+
|
|
1688
|
+
// ../../packages/portal/products/realm/dist/client/App.js
|
|
1689
|
+
globalThis.__LOADER.markdocComponents = { ...custom_components_exports, ...default_exports };
|
|
1690
|
+
function Oe() {
|
|
1691
|
+
const e6 = E(), [t7, a3] = o3.useState(e6), r7 = f5(), m5 = g7();
|
|
1692
|
+
b2(), p9(() => {
|
|
1693
|
+
e6 ? a3(e6) : L({ navigate: m5, to: r7.pathname + r7.search + r7.hash }).then(() => a3(p.loadSync(r7.pathname)));
|
|
1694
|
+
}, [r7, m5]), w2();
|
|
1695
|
+
const n5 = D();
|
|
1696
|
+
return n5 ? (console.log(n5), o3.createElement(c2, { error: { message: n5, name: "" } })) : t7 ? o3.createElement(m4, null, o3.createElement(GlobalStyle, null), o3.createElement(o.Provider, { value: e6 || t7 }, o3.createElement($2, null, o3.createElement(G3, { enabled: true }, o3.createElement(E8, null))))) : null;
|
|
1697
|
+
}
|
|
1698
|
+
function c10() {
|
|
1699
|
+
W2(), h2();
|
|
1700
|
+
const e6 = F2(), t7 = g2(), { layout: a3 } = t7, r7 = { layout: a3 }, m5 = b3(), n5 = true, s7 = e6?.props.ast && g(e6.props.ast) ? dynamic(e6.props.ast, o3, { components: { ...globalThis.__LOADER.markdocComponents, ...default_exports, ...components } }) : null, u6 = e(e6?.slug || "");
|
|
1701
|
+
return p9(() => {
|
|
1702
|
+
document.documentElement.classList.add("ready");
|
|
1703
|
+
}, []), e6?.props.pagePropGetterError?.message ? n5 ? o3.createElement(c2, { error: { ...e6?.props?.pagePropGetterError } }) : o3.createElement(InternalServerErrorLayout, null) : e6?.props?.compilationErrors?.length ? e6?.Template ? o3.createElement(e6.Template, { pageProps: e6?.props, children: s7 }) : null : o3.createElement(o3.Suspense, null, o3.createElement(RootLayout, null, o3.createElement(PageLayout, { sidebar: m5.length > 0 && o3.createElement(Y, { layoutControls: t7 }) }, o3.createElement(g5, { seo: e6?.props.seo, slug: u6 }), e6?.Template ? o3.createElement(e6.Template, { pageProps: [i, s, r].includes(e6.templateId) ? { ...e6.props, apiOptions: r7 } : e6?.props, children: s7 }) : null), o3.createElement(N2, null), o3.createElement(v4, null), o3.createElement(A, null)));
|
|
1704
|
+
}
|
|
1705
|
+
var be = [...clientRoutes.map((e6) => ({ Component: c10, path: e6.substring(1) + "/*" })), { Component: c10, path: "*" }];
|
|
1706
|
+
|
|
1707
|
+
// ../../packages/portal/products/realm/dist/client/server-entry.js
|
|
1708
|
+
init_styled_components_esm();
|
|
1709
|
+
export {
|
|
1710
|
+
Oe as App,
|
|
1711
|
+
c2 as ErrorDetails,
|
|
1712
|
+
p as Loader,
|
|
1713
|
+
Ue as ServerStyleSheet,
|
|
1714
|
+
fe as StyleSheetManager,
|
|
1715
|
+
be as routes
|
|
1716
|
+
};
|