@telia-ace/knowledge-widget-components-guide 1.0.24-next.1 → 1.0.24-next.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.
@@ -1,810 +0,0 @@
1
- var be = Object.defineProperty, fe = Object.defineProperties;
2
- var ye = Object.getOwnPropertyDescriptors;
3
- var W = Object.getOwnPropertySymbols;
4
- var ee = Object.prototype.hasOwnProperty, te = Object.prototype.propertyIsEnumerable;
5
- var _ = (t, e, a) => e in t ? be(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a, S = (t, e) => {
6
- for (var a in e || (e = {}))
7
- ee.call(e, a) && _(t, a, e[a]);
8
- if (W)
9
- for (var a of W(e))
10
- te.call(e, a) && _(t, a, e[a]);
11
- return t;
12
- }, D = (t, e) => fe(t, ye(e));
13
- var F = (t, e) => {
14
- var a = {};
15
- for (var o in t)
16
- ee.call(t, o) && e.indexOf(o) < 0 && (a[o] = t[o]);
17
- if (t != null && W)
18
- for (var o of W(t))
19
- e.indexOf(o) < 0 && te.call(t, o) && (a[o] = t[o]);
20
- return a;
21
- };
22
- import { ContactList as oe, contactLink as pe } from "@telia-ace/knowledge-widget-adapters";
23
- import { NotFound as $e, Component as Ee } from "@telia-ace/knowledge-widget-types-grid";
24
- import { List as ke, TextLink as le, paddedBorderTabStyle as re, useRouteData as G, Feedback as we, StyledHeaderText as xe, useDispatch as se, useProperties as q, Text as J, SymbolBadge as T, useContainer as ie, Tooltip as ze, StyledListButton as O, DropdownList as ce, useFavorites as Le, StyledText as ae, FavoriteButton as Se, DrawerList as me, DrawerAnimationType as de, useChildren as Be, Lightbox as Ne, DialogLink as Ce, embeddedLinkMapper as ve, createEmptyComponent as De, Loader as Re, loadingOpacity as Fe, Paragraph as Oe, genericHtml as Te, headingElement as Ie, DialogList as We, contentBox as He, Metadata as Me, Button as Pe, linkTabStyle as je } from "@telia-ace/knowledge-widget-ui";
25
- import { appendClassNames as H, buildCategoryTrail as Ae, createParams as Ve } from "@telia-ace/widget-utilities";
26
- import n, { useMemo as M, useState as Ge, useEffect as qe, useCallback as V, forwardRef as Je } from "react";
27
- import r, { css as K } from "styled-components";
28
- import { PickerTypes as p } from "@telia-ace/knowledge-widget-core";
29
- const Ke = ({
30
- className: t,
31
- defaultAnswerVersionLabel: e,
32
- guide: { perspective: a, perspectives: o },
33
- availablePerspectives: u = []
34
- }) => {
35
- const { name: c, params: l } = G(), h = M(() => !o || !u.length ? [] : u.filter(({ name: m }) => !!o[m]).map(({ name: m, title: d }) => ({ label: d, connection: o[m] })), [o, u]);
36
- return /* @__PURE__ */ n.createElement(Qe, {
37
- className: H(t, "humany-guide-answer-version-picker"),
38
- items: h,
39
- renderItem: (m) => {
40
- const d = m.label === "Default" ? e : m.label, g = a === m.connection, b = g && (!l.connection || a === l.connection);
41
- return /* @__PURE__ */ n.createElement("li", {
42
- key: m.connection,
43
- "data-version": m.connection
44
- }, /* @__PURE__ */ n.createElement(Ue, {
45
- key: m.connection,
46
- forwardedAs: b ? "span" : void 0,
47
- text: d,
48
- routeName: c,
49
- selected: g,
50
- "aria-label": d,
51
- title: d,
52
- params: D(S({}, l), {
53
- connection: m.connection
54
- })
55
- }));
56
- }
57
- });
58
- }, Qe = r(ke)`
59
- display: flex;
60
- align-items: center;
61
- flex-wrap: wrap;
62
-
63
- list-style: none;
64
- padding: 0;
65
- margin: 0;
66
-
67
- li:not(:last-child) {
68
- margin: 0 calc(${(t) => {
69
- var e;
70
- return (e = t.theme.sizes) == null ? void 0 : e.small;
71
- }} * 2) 0 0;
72
- }
73
-
74
- li > span {
75
- cursor: default;
76
- }
77
- `, Ue = r(le)`
78
- font-weight: 300;
79
- color: ${(t) => {
80
- var e;
81
- return (e = t.theme.colors) == null ? void 0 : e.text;
82
- }};
83
- text-decoration: none;
84
-
85
- ${(t) => t.selected && K`
86
- font-weight: bold;
87
- text-decoration: underline;
88
- `}
89
-
90
- &:focus-visible {
91
- ${re};
92
- }
93
- `, Xe = r(oe)`
94
- border-top: ${(t) => t.theme.border};
95
- ${(t) => t.backButtonShown === "true" && `border-bottom: ${t.theme.border};`}
96
- `, Ye = r(we)`
97
- ${(t) => {
98
- var e, a;
99
- return `padding: ${(e = t.theme.sizes) == null ? void 0 : e.large} ${(a = t.theme.sizes) == null ? void 0 : a.large};`;
100
- }}
101
- `, Ze = r(xe)`
102
- ${(t) => {
103
- var e, a;
104
- return `padding: ${(e = t.theme.sizes) == null ? void 0 : e.large} ${(a = t.theme.sizes) == null ? void 0 : a.large};`;
105
- }}
106
-
107
- display: block;
108
- font-size: ${(t) => {
109
- var e;
110
- return (e = t.theme.fonts) == null ? void 0 : e.normal;
111
- }};
112
- font-weight: bold;
113
- `, _e = ({ backButtonShown: t = !1, accordion: e = !1 }) => {
114
- const a = se(), {
115
- loading: o = !1,
116
- dialog: u = [],
117
- guide: c,
118
- handoverContactMethods: l = [],
119
- contactHeader: h,
120
- showFeedback: m,
121
- feedbackDirection: d = "horizontal",
122
- feedbackRecognitionLabel: g,
123
- feedbackGiven: b,
124
- feedbackHeader: $,
125
- positiveFeedbackLabel: E,
126
- negativeFeedbackLabel: f,
127
- contactFeedbackLabel: s
128
- } = q();
129
- return !m || !c || !c.allowFeedback || o && !b || u.length ? null : b && g && !l.length ? /* @__PURE__ */ n.createElement(Ze, {
130
- accordion: e ? "true" : "false"
131
- }, g) : c.hasHandover && l.length ? /* @__PURE__ */ n.createElement(Xe, {
132
- backButtonShown: t ? "true" : "false",
133
- accordion: e ? "true" : "false",
134
- header: h,
135
- contactMethods: l,
136
- dispatch: a
137
- }) : /* @__PURE__ */ n.createElement(Ye, {
138
- accordion: e ? "true" : "false",
139
- positive: E,
140
- negative: c.hasHandover ? s : f,
141
- header: $,
142
- selected: b,
143
- onFeedback: (k) => a("feedback", k),
144
- direction: d
145
- });
146
- }, et = ({
147
- guide: { categories: t = [] },
148
- toolbar: { picker: e = p.NONE }
149
- }) => {
150
- const [a, o] = Ge([]), u = ie();
151
- return qe(() => {
152
- Ae(
153
- "index",
154
- t.map((c) => c.toString()),
155
- u
156
- ).then((c) => {
157
- o(c);
158
- });
159
- }, [t]), a.length ? /* @__PURE__ */ n.createElement(ze, {
160
- className: "humany-guide-category-tooltip",
161
- sticky: e === p.DRAWER,
162
- content: /* @__PURE__ */ n.createElement(n.Fragment, null, a.map((c) => /* @__PURE__ */ n.createElement(tt, {
163
- className: "humany-guide-category-trail",
164
- key: c.map((l) => l.id).join(".")
165
- }, c.map((l, h) => /* @__PURE__ */ n.createElement(J, {
166
- className: "humany-guide-category-trail-segment",
167
- key: l.id
168
- }, l.symbol && h === 0 && /* @__PURE__ */ n.createElement(T, {
169
- size: 14,
170
- symbol: l.symbol
171
- }), l.title, h !== c.length - 1 && /* @__PURE__ */ n.createElement(at, {
172
- className: "humany-category-separator"
173
- }, "/"))))))
174
- }, e === p.DRAWER ? /* @__PURE__ */ n.createElement(O, {
175
- className: "humany-guide-category-tooltip-button",
176
- "data-has-label": "false",
177
- "data-has-symbol": "true"
178
- }, /* @__PURE__ */ n.createElement(ne, {
179
- size: 19,
180
- symbol: { type: "Svg", content: "information" }
181
- })) : /* @__PURE__ */ n.createElement(ne, {
182
- size: 19,
183
- symbol: { type: "Svg", content: "information" }
184
- })) : null;
185
- }, tt = r.div`
186
- i,
187
- svg {
188
- margin: 0 ${(t) => {
189
- var e;
190
- return (e = t.theme.sizes) == null ? void 0 : e.small;
191
- }} 0 0;
192
- }
193
-
194
- &:not(:last-child) {
195
- margin: 0 0 ${(t) => {
196
- var e;
197
- return (e = t.theme.sizes) == null ? void 0 : e.small;
198
- }};
199
- }
200
- `, at = r(J)`
201
- margin: 0 ${(t) => {
202
- var e;
203
- return (e = t.theme.sizes) == null ? void 0 : e.small;
204
- }};
205
- `, ne = r(T)`
206
- display: block;
207
- `, nt = ({
208
- header: t,
209
- tooltip: e,
210
- printActionLabel: a,
211
- copyActionLabel: o,
212
- addFavoriteTooltip: u,
213
- removeFavoriteCancelLabel: c,
214
- removeFavoriteConfirmLabel: l,
215
- removeFavoriteHeader: h,
216
- removeFavoriteLabel: m,
217
- removeFavoriteTooltip: d,
218
- toolbarFunctionsCloseButtonAriaLabel: g,
219
- allowCopy: b = !1,
220
- allowPrint: $ = !1,
221
- showFavoriteToggle: E = !1,
222
- picker: f = p.NONE,
223
- guide: s,
224
- dispatch: k
225
- }) => {
226
- const [B, C] = Le(), i = V(
227
- (y) => {
228
- s && k("copy", s);
229
- },
230
- [s, k]
231
- ), z = V(() => {
232
- s && k("print");
233
- }, [s, k]), L = M(() => {
234
- const { id: y, title: R } = s, v = [];
235
- if (b && v.push({
236
- type: "copy",
237
- child: /* @__PURE__ */ n.createElement(O, {
238
- "data-has-label": o ? "true" : "false",
239
- "data-has-symbol": "true",
240
- title: o,
241
- "aria-label": a,
242
- onClick: i
243
- }, /* @__PURE__ */ n.createElement(A, {
244
- size: 16,
245
- symbol: { type: "Svg", content: "copy" }
246
- }), o && /* @__PURE__ */ n.createElement(ae, null, o))
247
- }), $ && v.push({
248
- type: "print",
249
- child: /* @__PURE__ */ n.createElement(O, {
250
- "data-has-label": a ? "true" : "false",
251
- "data-has-symbol": "true",
252
- title: a,
253
- "aria-label": a,
254
- onClick: z
255
- }, /* @__PURE__ */ n.createElement(A, {
256
- size: 16,
257
- symbol: { type: "Svg", content: "print" }
258
- }), a && /* @__PURE__ */ n.createElement(ae, null, a))
259
- }), E) {
260
- const I = B.indexOf(y) > -1;
261
- v.push({
262
- type: "favorite",
263
- child: /* @__PURE__ */ n.createElement(Se, {
264
- id: y,
265
- guideTitle: R,
266
- isFavorite: I,
267
- buttonLabel: I ? d : u,
268
- addFavoriteTooltip: u,
269
- removeFavoriteCancelLabel: c,
270
- removeFavoriteConfirmLabel: l,
271
- removeFavoriteHeader: h,
272
- removeFavoriteLabel: m,
273
- removeFavoriteTooltip: d,
274
- actions: C
275
- })
276
- });
277
- }
278
- return v;
279
- }, [
280
- B,
281
- s,
282
- b,
283
- $,
284
- E,
285
- a,
286
- o,
287
- u,
288
- c,
289
- l,
290
- h,
291
- m,
292
- d
293
- ]);
294
- if (!L.length)
295
- return null;
296
- const w = /* @__PURE__ */ n.createElement(lt, {
297
- tabIndex: 0,
298
- title: e,
299
- "data-has-symbol": "true",
300
- "data-has-label": "false"
301
- }, /* @__PURE__ */ n.createElement(A, {
302
- symbol: { type: "Svg", content: "options" },
303
- size: 18
304
- })), N = ({ type: y, child: R }) => /* @__PURE__ */ n.createElement("li", {
305
- key: y,
306
- "data-function-type": y
307
- }, R);
308
- return f === p.DROPDOWN ? /* @__PURE__ */ n.createElement(ot, {
309
- className: "humany-guide-functions-dropdown-list",
310
- header: t,
311
- items: L,
312
- trigger: w,
313
- renderItem: N,
314
- closeButtonAriaLabel: g
315
- }) : f === p.DRAWER ? /* @__PURE__ */ n.createElement(me, {
316
- className: "humany-guide-functions-drawer-list",
317
- animation: { type: de.SlideInBottom },
318
- header: t,
319
- items: L,
320
- trigger: w,
321
- renderItem: N,
322
- closeButtonAriaLabel: g
323
- }) : null;
324
- }, A = r(T)`
325
- circle {
326
- fill: ${(t) => {
327
- var e;
328
- return (e = t.theme.colors) == null ? void 0 : e.text;
329
- }};
330
- }
331
-
332
- line,
333
- path,
334
- rect {
335
- stroke: ${(t) => {
336
- var e;
337
- return (e = t.theme.colors) == null ? void 0 : e.text;
338
- }};
339
- }
340
- `, ot = r(ce)`
341
- display: block;
342
- min-height: auto;
343
- `, lt = r(O)`
344
- padding: calc(${(t) => {
345
- var e;
346
- return (e = t.theme.sizes) == null ? void 0 : e.small;
347
- }} * 2) 0;
348
- `, rt = (t, e) => {
349
- var a;
350
- return ((a = e.find((o) => o.id === t.id)) == null ? void 0 : a.label) || "";
351
- }, st = (c) => {
352
- var l = c, {
353
- header: t,
354
- tooltip: e,
355
- picker: a = p.NONE,
356
- guide: o
357
- } = l, u = F(l, [
358
- "header",
359
- "tooltip",
360
- "picker",
361
- "guide"
362
- ]);
363
- const { name: h, params: m } = G(), d = M(() => Object.keys(o.translations || {}).reduce((E, f) => {
364
- const s = {};
365
- return s.key = f, s.id = (o.translations || {})[f], s.label = u[`${f}LanguageLabel`], (s.id || s.label) && E.push(s), E;
366
- }, []), [o, u]);
367
- if (!d.length)
368
- return null;
369
- const g = rt(o, d), b = /* @__PURE__ */ n.createElement(it, {
370
- tabIndex: 0,
371
- title: e,
372
- "data-has-symbol": "true",
373
- "data-has-label": a === p.DROPDOWN && g ? "true" : "false"
374
- }, a === p.DROPDOWN && /* @__PURE__ */ n.createElement(n.Fragment, null, g && /* @__PURE__ */ n.createElement(mt, null, g), /* @__PURE__ */ n.createElement(dt, {
375
- symbol: { type: "Svg", content: "caret-down" },
376
- size: 11
377
- })), a === p.DRAWER && /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(ct, {
378
- symbol: { type: "Svg", content: "language" },
379
- size: 20
380
- }))), $ = ({ label: E, key: f, id: s }) => /* @__PURE__ */ n.createElement("li", {
381
- key: f,
382
- "data-language": f
383
- }, /* @__PURE__ */ n.createElement(ht, {
384
- tabIndex: 0,
385
- text: E,
386
- routeName: h,
387
- selected: o.id === s,
388
- params: Ve(D(S({}, m), {
389
- connection: void 0,
390
- guide: s
391
- }))
392
- }));
393
- return a === p.DROPDOWN ? /* @__PURE__ */ n.createElement(ut, {
394
- className: "humany-guide-languages-dropdown-list",
395
- header: t,
396
- items: d,
397
- trigger: b,
398
- renderItem: $
399
- }) : a === p.DRAWER ? /* @__PURE__ */ n.createElement(me, {
400
- className: "humany-guide-languages-drawer-list",
401
- animation: { type: de.SlideInBottom },
402
- header: t,
403
- items: d,
404
- trigger: b,
405
- renderItem: $
406
- }) : null;
407
- }, it = r(O)`
408
- &&& {
409
- margin: 0 ${(t) => {
410
- var e;
411
- return `calc(${(e = t.theme.sizes) == null ? void 0 : e.small} * 2)`;
412
- }} 0 0;
413
- }
414
- `, ct = r(T)`
415
- circle {
416
- fill: ${(t) => {
417
- var e;
418
- return (e = t.theme.colors) == null ? void 0 : e.text;
419
- }};
420
- }
421
-
422
- line,
423
- path,
424
- rect {
425
- stroke: ${(t) => {
426
- var e;
427
- return (e = t.theme.colors) == null ? void 0 : e.text;
428
- }};
429
- }
430
- `, mt = r(J)`
431
- margin: 0 ${(t) => {
432
- var e;
433
- return (e = t.theme.sizes) == null ? void 0 : e.small;
434
- }} 0 0;
435
- font-size: ${(t) => {
436
- var e;
437
- return (e = t.theme.fonts) == null ? void 0 : e.normal;
438
- }};
439
- `, dt = r(T)`
440
- align-self: flex-end;
441
- stroke-width: 2px;
442
- stroke-linecap: round;
443
-
444
- && {
445
- width: 0.6em;
446
- height: 1em;
447
- }
448
- line {
449
- stroke: ${(t) => {
450
- var e;
451
- return (e = t.theme.colors) == null ? void 0 : e.text;
452
- }};
453
- }
454
- `, ut = r(ce)`
455
- display: block;
456
- min-height: auto;
457
- `, ht = r(le)`
458
- color: ${(t) => {
459
- var e, a;
460
- return t.selected ? (e = t.theme.colors) == null ? void 0 : e.primary : (a = t.theme.colors) == null ? void 0 : a.text;
461
- }};
462
- ${(t) => t.selected && "font-weight: bold;"}
463
-
464
- outline: none;
465
- &:focus-visible {
466
- ${re}
467
- text-decoration: underline;
468
- }
469
- `, gt = (t) => {
470
- const {
471
- allowCopy: e = !1,
472
- allowPrint: a = !1,
473
- guideCategories: o = !1,
474
- language: u = !1,
475
- showFavoriteToggle: c = !1,
476
- picker: l = p.NONE
477
- } = t;
478
- return !e && !a && !u && !c && !o || l === p.NONE;
479
- }, bt = ({ className: t = "", dispatch: e }) => {
480
- const y = q(), {
481
- toolbarLanguageHeader: a,
482
- toolbarFunctionsHeader: o,
483
- toolbarLanguageTooltip: u,
484
- toolbarFunctionsTooltip: c,
485
- toolbarFunctionsCloseButtonAriaLabel: l,
486
- printActionLabel: h,
487
- copyActionLabel: m,
488
- addFavoriteTooltip: d,
489
- removeFavoriteCancelLabel: g,
490
- removeFavoriteConfirmLabel: b,
491
- removeFavoriteHeader: $,
492
- removeFavoriteLabel: E,
493
- removeFavoriteTooltip: f,
494
- guide: s,
495
- toolbar: k
496
- } = y, B = F(y, [
497
- "toolbarLanguageHeader",
498
- "toolbarFunctionsHeader",
499
- "toolbarLanguageTooltip",
500
- "toolbarFunctionsTooltip",
501
- "toolbarFunctionsCloseButtonAriaLabel",
502
- "printActionLabel",
503
- "copyActionLabel",
504
- "addFavoriteTooltip",
505
- "removeFavoriteCancelLabel",
506
- "removeFavoriteConfirmLabel",
507
- "removeFavoriteHeader",
508
- "removeFavoriteLabel",
509
- "removeFavoriteTooltip",
510
- "guide",
511
- "toolbar"
512
- ]);
513
- if (!s || !k || gt(k))
514
- return null;
515
- const { language: C, guideCategories: i, allowCopy: z, allowPrint: L, showFavoriteToggle: w, picker: N } = k;
516
- return /* @__PURE__ */ n.createElement(ft, {
517
- className: H("humany-guide-toolbar", t)
518
- }, C && Object.keys(s.translations || {}).length > 1 && /* @__PURE__ */ n.createElement(st, S({
519
- guide: s,
520
- header: a,
521
- tooltip: u,
522
- picker: N
523
- }, B)), i && /* @__PURE__ */ n.createElement(et, {
524
- guide: s,
525
- toolbar: k
526
- }), (z || L || w) && /* @__PURE__ */ n.createElement(nt, {
527
- guide: s,
528
- header: o,
529
- tooltip: c,
530
- printActionLabel: h,
531
- copyActionLabel: m,
532
- addFavoriteTooltip: d,
533
- removeFavoriteCancelLabel: g,
534
- removeFavoriteConfirmLabel: b,
535
- removeFavoriteHeader: $,
536
- removeFavoriteLabel: E,
537
- removeFavoriteTooltip: f,
538
- toolbarFunctionsCloseButtonAriaLabel: l,
539
- allowCopy: z,
540
- allowPrint: L,
541
- showFavoriteToggle: w,
542
- picker: N,
543
- dispatch: e
544
- }));
545
- }, ft = r.div`
546
- display: flex;
547
- align-items: center;
548
- justify-content: space-between;
549
- margin: 0 0 0 auto;
550
-
551
- > :not(:last-child) {
552
- margin: 0 calc(${(t) => {
553
- var e;
554
- return (e = t.theme.sizes) == null ? void 0 : e.small;
555
- }} * 2) 0 0;
556
- }
557
- `, Wt = Je(
558
- (u, o) => {
559
- var c = u, { className: t, accordion: e = !1 } = c, a = F(c, ["className", "accordion"]);
560
- const {
561
- loading: l = !1,
562
- dialog: h = [],
563
- contactMethods: m = [],
564
- showHeader: d = !0,
565
- showAnswerVersions: g = !1,
566
- defaultAnswerVersionLabel: b = "Default",
567
- backButtonLabel: $,
568
- metadataByLabel: E,
569
- metadataModifiedLabel: f,
570
- metadataPublishedLabel: s,
571
- availablePerspectives: k,
572
- metadata: B,
573
- toolbar: C,
574
- guide: i,
575
- error: z
576
- } = q(), {
577
- params: { connection: L }
578
- } = G(), w = ie(), N = Be(), y = se(), R = M(() => ({
579
- transform: {
580
- img: (x) => /* @__PURE__ */ n.createElement(Ne, {
581
- attrs: x,
582
- htmlBody: (i == null ? void 0 : i.body) || ""
583
- }),
584
- a: (x) => {
585
- const Y = x, { children: he } = Y, X = F(Y, ["children"])["data-target"];
586
- if (X && h.length) {
587
- const Z = h.find(
588
- ({ connection: ge }) => ge === X
589
- );
590
- if (Z)
591
- return /* @__PURE__ */ n.createElement(Ce, S({}, Z), he);
592
- }
593
- return ve(w)(x);
594
- }
595
- }
596
- }), [i, w, h]), v = V(() => {
597
- y("back");
598
- }, [y]);
599
- if (!i && !z && !l)
600
- return De(w, D(S({}, a), {
601
- className: H(t, "humany-guide")
602
- }));
603
- const { id: I = "", title: Q = "", body: P = "", translations: U = {} } = i || {};
604
- if (z && z.status === 404)
605
- return /* @__PURE__ */ n.createElement($e, {
606
- showSearch: !1
607
- });
608
- const j = !!e && !!L, ue = Object.keys(U).find((x) => U[x] === `${I}`);
609
- return /* @__PURE__ */ n.createElement(yt, D(S({
610
- ref: o
611
- }, a), {
612
- "data-loading": l,
613
- className: H(t, "humany-guide")
614
- }), /* @__PURE__ */ n.createElement(wt, {
615
- "data-loading": l,
616
- accordion: e ? "true" : "false",
617
- className: "humany-guide-content"
618
- }, (g && i || !!C) && /* @__PURE__ */ n.createElement(kt, {
619
- className: "humany-guide-top"
620
- }, g && i && /* @__PURE__ */ n.createElement(Ke, {
621
- defaultAnswerVersionLabel: b,
622
- availablePerspectives: k,
623
- guide: i
624
- }), !!C && /* @__PURE__ */ n.createElement(bt, {
625
- dispatch: y
626
- })), !!(Q || P) && /* @__PURE__ */ n.createElement(pt, {
627
- className: "humany-guide-body",
628
- accordion: e ? "true" : "false",
629
- header: d && Q || void 0,
630
- html: P,
631
- htmlParseInstruction: R,
632
- lang: ue
633
- }), h && P.indexOf("h-option-link") === -1 && /* @__PURE__ */ n.createElement(Et, {
634
- dialog: h
635
- }), /* @__PURE__ */ n.createElement($t, {
636
- backButtonShown: j ? "true" : "false",
637
- contactMethods: m,
638
- dispatch: y,
639
- guideId: i && i.id
640
- }), !m.length && /* @__PURE__ */ n.createElement(_e, {
641
- backButtonShown: j,
642
- accordion: e
643
- }), j && /* @__PURE__ */ n.createElement(Lt, {
644
- "aria-label": $,
645
- onClick: v
646
- }, /* @__PURE__ */ n.createElement(St, {
647
- width: "7",
648
- height: "13",
649
- viewBox: "0 0 7 13",
650
- fill: "none",
651
- xmlns: "http://www.w3.org/2000/svg"
652
- }, /* @__PURE__ */ n.createElement("line", {
653
- x1: "6.64645",
654
- y1: "12.5513",
655
- x2: "0.648357",
656
- y2: "6.55319"
657
- }), /* @__PURE__ */ n.createElement("line", {
658
- x1: "0.646447",
659
- y1: "6.64455",
660
- x2: "6.64454",
661
- y2: "0.646465"
662
- })), $ && /* @__PURE__ */ n.createElement("span", null, $)), B && /* @__PURE__ */ n.createElement(xt, D(S({}, B), {
663
- modified: i == null ? void 0 : i.modified,
664
- published: i == null ? void 0 : i.published,
665
- modifiedBy: i == null ? void 0 : i.modifiedBy,
666
- publishedBy: i == null ? void 0 : i.publishedBy,
667
- byLabel: E,
668
- modifiedLabel: f,
669
- publishedLabel: s
670
- })), N.map((x) => /* @__PURE__ */ n.createElement(zt, {
671
- key: x.id,
672
- id: x.id,
673
- branch: "default",
674
- embedded: !0
675
- }))), /* @__PURE__ */ n.createElement(Re, {
676
- loading: l
677
- }));
678
- }
679
- ), yt = r.div`
680
- ${Fe}
681
- min-width: 0;
682
- `, pt = r(Oe)`
683
- ${Te}
684
- ${(t) => {
685
- var e;
686
- return `padding: ${(e = t.theme.sizes) == null ? void 0 : e.large};`;
687
- }}
688
- display: block;
689
- line-height: 1.6em;
690
- ${Ie(
691
- "h1",
692
- K`
693
- font-size: ${(t) => {
694
- var e;
695
- return (e = t.theme.fonts) == null ? void 0 : e.large;
696
- }};
697
- font-weight: normal;
698
- line-height: 1.6em;
699
- line-height: 1.6em;
700
- margin: 0 0 ${(t) => {
701
- var e;
702
- return (e = t.theme.sizes) == null ? void 0 : e.small;
703
- }};
704
- `
705
- )}
706
-
707
- p {
708
- font-weight: 300;
709
- font-size: ${(t) => {
710
- var e;
711
- return (e = t.theme.fonts) == null ? void 0 : e.normal;
712
- }};
713
- color: ${(t) => {
714
- var e;
715
- return (e = t.theme.colors) == null ? void 0 : e.text;
716
- }};
717
- a {
718
- display: inline;
719
- }
720
- }
721
- `, $t = r(oe)`
722
- border-top: ${(t) => t.theme.border};
723
- ${(t) => t.backButtonShown === "true" && `border-bottom: ${t.theme.border};`}
724
- `, Et = r(We)`
725
- ${(t) => {
726
- var e, a;
727
- return `padding: 0 ${(e = t.theme.sizes) == null ? void 0 : e.large} ${(a = t.theme.sizes) == null ? void 0 : a.large};`;
728
- }}
729
- display: block;
730
- `, kt = r.div`
731
- ${(t) => {
732
- var e, a;
733
- return `padding: calc(${(e = t.theme.sizes) == null ? void 0 : e.normal}*2) ${(a = t.theme.sizes) == null ? void 0 : a.large};`;
734
- }}
735
- display: flex;
736
- justify-content: space-between;
737
- align-items: center;
738
- border-bottom: ${(t) => t.theme.border};
739
- border-radius: ${(t) => `${t.theme.borderRadius} ${t.theme.borderRadius}`} 0 0;
740
- background-color: #ffffff;
741
- `, wt = r.div`
742
- ${He}
743
- display: block;
744
- > a {
745
- ${pe}
746
- }
747
-
748
- ${(t) => t.accordion === "true" && K`
749
- white-space: normal;
750
- box-shadow: none;
751
- background-color: #fafafa;
752
- `}
753
- `, xt = r(Me)`
754
- display: block;
755
- ${(t) => {
756
- var e, a;
757
- return `padding: calc(${(e = t.theme.sizes) == null ? void 0 : e.normal}*2) ${(a = t.theme.sizes) == null ? void 0 : a.large};`;
758
- }}
759
- font-weight: 300;
760
- font-size: ${(t) => {
761
- var e;
762
- return (e = t.theme.fonts) == null ? void 0 : e.normal;
763
- }};
764
- color: ${(t) => {
765
- var e;
766
- return (e = t.theme.colors) == null ? void 0 : e.text;
767
- }};
768
- border-top: ${(t) => t.theme.border};
769
- `, zt = r(Ee)`
770
- border-top: ${(t) => t.theme.border};
771
- `, Lt = r(Pe)`
772
- ${(t) => {
773
- var e, a;
774
- return `padding: ${(e = t.theme.sizes) == null ? void 0 : e.normal} calc(${(a = t.theme.sizes) == null ? void 0 : a.normal} * 2);`;
775
- }}
776
- color: ${(t) => {
777
- var e;
778
- return (e = t.theme.colors) == null ? void 0 : e.primary;
779
- }};
780
- text-decoration: underline;
781
- font-size: ${(t) => {
782
- var e;
783
- return (e = t.theme.fonts) == null ? void 0 : e.normal;
784
- }};
785
- span {
786
- font-weight: 300;
787
- }
788
- &:focus-visible {
789
- ${je}
790
- padding: ${(t) => {
791
- var e, a;
792
- return `calc(${(e = t.theme.sizes) == null ? void 0 : e.small} / 2) ${(a = t.theme.sizes) == null ? void 0 : a.small}`;
793
- }};
794
- }
795
- `, St = r.svg`
796
- margin-right: ${(t) => {
797
- var e;
798
- return (e = t.theme.sizes) == null ? void 0 : e.small;
799
- }};
800
- line {
801
- stroke: ${(t) => {
802
- var e;
803
- return (e = t.theme.colors) == null ? void 0 : e.primary;
804
- }};
805
- }
806
- `;
807
- export {
808
- Wt as default
809
- };
810
- //# sourceMappingURL=guide.19e7d4a1.js.map