quirk-ui 0.0.506 → 0.0.507
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,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index67.css');const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index67.css');const e=require("react/jsx-runtime"),b=require("react"),U=require("./HeroContext.cjs"),c=require("../../ui/PortableTextRenderer/index.cjs"),p=require("../../ui/CallToActions/index.cjs"),k=require("next/image"),N=require("../../ui/LocaleLink/index.cjs"),H=require("../../hooks/usePrefersReducedMotion.cjs"),S=require("../../../createLucideIcon-DpotSgUx.cjs"),W=require("../../../play-CQBnZgNa.cjs");/**
|
|
2
2
|
* @license lucide-react v0.488.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const
|
|
6
|
+
*/const z=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],E=S.createLucideIcon("pause",z),M="_hero_vho5i_1",V="_container_vho5i_7",Y="_eyebrow_vho5i_24",g="_disclaimer_vho5i_28",G="_text_vho5i_33",J="_articleDetails_vho5i_40",K="_articleType_vho5i_53",Q="_articleCategories_vho5i_67",X="_category_vho5i_73",Z="_number_vho5i_89",A="_blog_vho5i_116",D="_overlay_vho5i_140",O="_fullBleed_vho5i_210",ee="_split_vho5i_304",se="_image_vho5i_309",te="_videoControl_vho5i_332",re="_videoWrapper_vho5i_353",le="_videoBackground_vho5i_373",oe="_iframe_vho5i_374",s={hero:M,container:V,eyebrow:Y,disclaimer:g,text:G,articleDetails:J,articleType:K,articleCategories:Q,category:X,number:Z,default:"_default_vho5i_112",blog:A,overlay:D,fullBleed:O,split:ee,image:se,videoControl:te,videoWrapper:re,videoBackground:le,iframe:oe};function ce({heading:l,image:t,video:r,callToAction:i,pageData:a,styleOptions:u}){var L,P,q;const d=H.usePrefersReducedMotion(),[C,R]=b.useState(!d),{setIsFullbleedHeroAtTop:$}=U.useHeroContext(),_=b.useRef(null),h=(u==null?void 0:u.layout)??"default",F=((L=u==null?void 0:u.padding)==null?void 0:L.join(" "))??"",f={default:s.default,split:s.split,"full-bleed":s.fullBleed,blog:s.blog}[h],T=((P=a==null?void 0:a.categories)==null?void 0:P.filter(o=>{var n,y;return!((y=(n=o.slug)==null?void 0:n.current)!=null&&y.startsWith("library/type"))}))??[],m=T[0]??null,x=T[1]??null,j=((q=a==null?void 0:a.categories)==null?void 0:q.find(o=>{var n,y;return(y=(n=o.slug)==null?void 0:n.current)==null?void 0:y.startsWith("library/type")}))??null;b.useEffect(()=>{const o=()=>{$(window.scrollY===0)};if(h==="full-bleed"&&typeof window<"u")return $(!0),window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)},[h]),b.useEffect(()=>{const o=_.current;o&&(d?o.pause():o.play())},[d]);const v=()=>e.jsx("button",{title:`${C?"Pause the video":"Play the video"}`,className:s.videoControl,onClick:()=>{const o=_.current;o&&(o.paused?(o.play().catch(()=>{}),R(!0)):(o.pause(),R(!1)))},children:C?e.jsx(E,{size:18}):e.jsx(W.Play,{size:18})}),B=()=>{if(!r)return null;const o=r.includes("vimeo.com"),n=r.includes("youtube.com")||r.includes("youtu.be");return o||n?e.jsx("div",{className:s.videoWrapper,children:e.jsx("iframe",{src:o?`${r}?autoplay=1&muted=1&loop=1&background=1`:`${r}?autoplay=1&mute=1&loop=1&playlist=${w(r)}`,allow:"autoplay; fullscreen",allowFullScreen:!0})}):e.jsxs("div",{className:s.videoWrapper,children:[e.jsx(v,{}),e.jsx("video",{ref:_,src:r,autoPlay:!d,loop:!0,muted:!0,playsInline:!0,poster:(t==null?void 0:t.imageUrl)||void 0,preload:"metadata"})]})};function w(o){const n=o.match(/(?:youtube\.com\/.*v=|youtu\.be\/)([^&?/]+)/);return(n==null?void 0:n[1])||""}const I=()=>t&&t.imageUrl?e.jsx("div",{className:s.image,children:e.jsx(k,{src:t.imageUrl,alt:t.asset.altText||t.asset.description||"Hero image",width:600,height:658,priority:!0})}):null;switch(h){case"split":return e.jsx("section",{className:`${s.hero} ${s.split}`,children:e.jsxs("article",{className:`${F} ${s.container}`,children:[e.jsxs("div",{className:s.text,children:[e.jsxs("div",{children:[l.eyebrow&&e.jsx(c.RichText,{className:s.eyebrow,blocks:l.eyebrow}),e.jsx(c.RichText,{blocks:l.title})]}),l.description&&e.jsx(c.RichText,{blocks:l.description}),i&&e.jsx(p.CallToActions,{items:i.items,alignment:i.alignment}),l.disclaimer&&e.jsx(c.RichText,{className:s.disclaimer,blocks:l.disclaimer})]}),r?e.jsx(B,{}):e.jsx(I,{})]})});case"default":return e.jsx("section",{className:`${s.hero} ${f}`,children:e.jsxs("article",{className:s.container,children:[r?e.jsx(B,{}):e.jsx(I,{}),e.jsxs("div",{className:s.text,children:[e.jsxs("div",{children:[l.eyebrow&&e.jsx(c.RichText,{className:s.eyebrow,blocks:l.eyebrow}),e.jsx(c.RichText,{blocks:l.title})]}),l.description&&e.jsx(c.RichText,{blocks:l.description}),i&&e.jsx(p.CallToActions,{items:i.items,alignment:i.alignment})]})]})});case"full-bleed":return e.jsx("section",{className:`${s.hero} ${f} heroFullBleed`,children:e.jsxs("article",{className:s.container,children:[r?r.includes("vimeo.com")||r.includes("youtube.com")||r.includes("youtu.be")?e.jsx("div",{className:s.videoBackground,children:e.jsx("iframe",{src:r.includes("vimeo.com")?`${r}?autoplay=1&muted=1&loop=1&background=1`:`${r}?autoplay=1&mute=1&loop=1&playlist=${w(r)}`,className:s.iframe,allow:"autoplay; fullscreen",allowFullScreen:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(v,{}),e.jsx("video",{ref:_,className:s.videoBackground,src:r,autoPlay:!d,loop:!0,muted:!0,playsInline:!0,poster:(t==null?void 0:t.imageUrl)||void 0})]}):e.jsx(k,{src:(t==null?void 0:t.imageUrl)??"",alt:(t==null?void 0:t.asset.altText)||(t==null?void 0:t.asset.description)||"Card image",fill:!0,priority:!0,style:{objectFit:"cover"},draggable:!1,sizes:"(min-width: 500px) 500px, 100vw"}),e.jsx("div",{className:s.overlay,children:e.jsxs("div",{className:s.text,children:[e.jsxs("div",{children:[l.eyebrow&&e.jsx(c.RichText,{className:s.eyebrow,blocks:l.eyebrow}),e.jsx(c.RichText,{blocks:l.title})]}),l.description&&e.jsx(c.RichText,{blocks:l.description}),i&&e.jsx(p.CallToActions,{items:i.items,alignment:i.alignment})]})})]})});case"blog":return e.jsx("section",{className:`${s.hero} ${f}`,children:e.jsxs("article",{className:s.container,children:[r?r.includes("vimeo.com")||r.includes("youtube.com")||r.includes("youtu.be")?e.jsx("div",{className:s.videoBackground,children:e.jsx("iframe",{src:r.includes("vimeo.com")?`${r}?autoplay=1&muted=1&loop=1&background=1`:`${r}?autoplay=1&mute=1&loop=1&playlist=${w(r)}`,className:s.iframe,allow:"autoplay; fullscreen",allowFullScreen:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(v,{}),e.jsx("video",{ref:_,className:s.videoBackground,src:r,autoPlay:!d,loop:!0,muted:!0,playsInline:!0,poster:(t==null?void 0:t.imageUrl)||void 0})]}):e.jsx(k,{src:(t==null?void 0:t.imageUrl)??"",alt:(t==null?void 0:t.asset.altText)||(t==null?void 0:t.asset.description)||"Card image",fill:!0,priority:!0,style:{objectFit:"cover"},draggable:!1,sizes:"(min-width: 500px) 500px, 100vw"}),e.jsx("div",{className:s.overlay,children:e.jsxs("div",{className:s.text,children:[e.jsxs("div",{children:[l.eyebrow&&e.jsx(c.RichText,{className:s.eyebrow,blocks:l.eyebrow}),a&&e.jsxs("div",{className:s.articleDetails,children:[j&&e.jsx(N.LocaleLink,{href:`/blog/search?categories=${encodeURIComponent(j._id)}`,className:s.articleType,children:j.title},j._id),e.jsxs("div",{className:s.articleCategories,children:[m&&e.jsx(N.LocaleLink,{href:`/blog/search?categories=${encodeURIComponent(m._id)}`,className:s.category,children:m.title},m._id),x&&x.title.toLowerCase()!=="library"&&!x.slug.current.includes("keywords")&&e.jsx(N.LocaleLink,{href:`/blog/search?categories=${encodeURIComponent(x._id)}`,className:s.category,children:x.title},x._id)]}),a.timeToRead&&e.jsx(e.Fragment,{children:e.jsxs("span",{children:[e.jsx("span",{className:s.number,children:a.timeToRead}),"min read"]})})]}),e.jsx(c.RichText,{blocks:l.title})]}),l.description&&e.jsx(c.RichText,{blocks:l.description}),i&&e.jsx(p.CallToActions,{items:i.items,alignment:i.alignment})]})})]})})}}exports.HeroBlock=ce;
|
|
@@ -1,99 +1,99 @@
|
|
|
1
1
|
import { jsx as e, jsxs as c, Fragment as x } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useHeroContext as
|
|
2
|
+
import { useState as H, useRef as T, useEffect as j } from "react";
|
|
3
|
+
import { useHeroContext as V } from "./HeroContext.mjs";
|
|
4
4
|
import { RichText as i } from "../../ui/PortableTextRenderer/index.mjs";
|
|
5
|
-
import { CallToActions as
|
|
5
|
+
import { CallToActions as v } from "../../ui/CallToActions/index.mjs";
|
|
6
6
|
import C from "next/image";
|
|
7
7
|
import { LocaleLink as $ } from "../../ui/LocaleLink/index.mjs";
|
|
8
|
-
import { usePrefersReducedMotion as
|
|
9
|
-
import { c as
|
|
10
|
-
import { P as
|
|
8
|
+
import { usePrefersReducedMotion as E } from "../../hooks/usePrefersReducedMotion.mjs";
|
|
9
|
+
import { c as Y } from "../../../createLucideIcon-C8GTh_Qx.js";
|
|
10
|
+
import { P as M } from "../../../play-DYgKiSaf.js";
|
|
11
11
|
import '../../../assets/index67.css';/**
|
|
12
12
|
* @license lucide-react v0.488.0 - ISC
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
16
|
*/
|
|
17
|
-
const
|
|
17
|
+
const q = [
|
|
18
18
|
["rect", { x: "14", y: "4", width: "4", height: "16", rx: "1", key: "zuxfzm" }],
|
|
19
19
|
["rect", { x: "6", y: "4", width: "4", height: "16", rx: "1", key: "1okwgv" }]
|
|
20
|
-
],
|
|
21
|
-
hero:
|
|
22
|
-
container:
|
|
23
|
-
eyebrow:
|
|
24
|
-
disclaimer:
|
|
25
|
-
text:
|
|
26
|
-
articleDetails:
|
|
27
|
-
articleType:
|
|
28
|
-
articleCategories:
|
|
29
|
-
category:
|
|
30
|
-
number:
|
|
20
|
+
], G = Y("pause", q), J = "_hero_vho5i_1", K = "_container_vho5i_7", Q = "_eyebrow_vho5i_24", X = "_disclaimer_vho5i_28", Z = "_text_vho5i_33", g = "_articleDetails_vho5i_40", D = "_articleType_vho5i_53", A = "_articleCategories_vho5i_67", O = "_category_vho5i_73", ee = "_number_vho5i_89", re = "_blog_vho5i_116", le = "_overlay_vho5i_140", oe = "_fullBleed_vho5i_210", te = "_split_vho5i_304", se = "_image_vho5i_309", ce = "_videoControl_vho5i_332", ie = "_videoWrapper_vho5i_353", ne = "_videoBackground_vho5i_373", ae = "_iframe_vho5i_374", r = {
|
|
21
|
+
hero: J,
|
|
22
|
+
container: K,
|
|
23
|
+
eyebrow: Q,
|
|
24
|
+
disclaimer: X,
|
|
25
|
+
text: Z,
|
|
26
|
+
articleDetails: g,
|
|
27
|
+
articleType: D,
|
|
28
|
+
articleCategories: A,
|
|
29
|
+
category: O,
|
|
30
|
+
number: ee,
|
|
31
31
|
default: "_default_vho5i_112",
|
|
32
|
-
blog:
|
|
33
|
-
overlay:
|
|
34
|
-
fullBleed:
|
|
32
|
+
blog: re,
|
|
33
|
+
overlay: le,
|
|
34
|
+
fullBleed: oe,
|
|
35
35
|
split: te,
|
|
36
|
-
image:
|
|
37
|
-
videoControl:
|
|
38
|
-
videoWrapper:
|
|
39
|
-
videoBackground:
|
|
40
|
-
iframe:
|
|
36
|
+
image: se,
|
|
37
|
+
videoControl: ce,
|
|
38
|
+
videoWrapper: ie,
|
|
39
|
+
videoBackground: ne,
|
|
40
|
+
iframe: ae
|
|
41
41
|
};
|
|
42
|
-
function
|
|
43
|
-
heading:
|
|
44
|
-
image:
|
|
45
|
-
video:
|
|
42
|
+
function we({
|
|
43
|
+
heading: t,
|
|
44
|
+
image: l,
|
|
45
|
+
video: o,
|
|
46
46
|
callToAction: n,
|
|
47
47
|
pageData: u,
|
|
48
|
-
styleOptions:
|
|
48
|
+
styleOptions: d
|
|
49
49
|
}) {
|
|
50
|
-
var W, z;
|
|
51
|
-
const
|
|
50
|
+
var W, z, L;
|
|
51
|
+
const m = E(), [B, I] = H(!m), { setIsFullbleedHeroAtTop: P } = V(), p = T(null), b = (d == null ? void 0 : d.layout) ?? "default", S = ((W = d == null ? void 0 : d.padding) == null ? void 0 : W.join(" ")) ?? "", w = {
|
|
52
52
|
default: r.default,
|
|
53
53
|
split: r.split,
|
|
54
54
|
"full-bleed": r.fullBleed,
|
|
55
55
|
blog: r.blog
|
|
56
|
-
}[
|
|
56
|
+
}[b], R = ((z = u == null ? void 0 : u.categories) == null ? void 0 : z.filter(
|
|
57
57
|
(s) => {
|
|
58
|
-
var a,
|
|
59
|
-
return !((
|
|
58
|
+
var a, _;
|
|
59
|
+
return !((_ = (a = s.slug) == null ? void 0 : a.current) != null && _.startsWith("library/type"));
|
|
60
60
|
}
|
|
61
|
-
)) ?? [],
|
|
61
|
+
)) ?? [], f = R[0] ?? null, y = R[1] ?? null, h = ((L = u == null ? void 0 : u.categories) == null ? void 0 : L.find(
|
|
62
62
|
(s) => {
|
|
63
|
-
var a,
|
|
64
|
-
return (
|
|
63
|
+
var a, _;
|
|
64
|
+
return (_ = (a = s.slug) == null ? void 0 : a.current) == null ? void 0 : _.startsWith("library/type");
|
|
65
65
|
}
|
|
66
66
|
)) ?? null;
|
|
67
|
-
|
|
67
|
+
j(() => {
|
|
68
68
|
const s = () => {
|
|
69
69
|
P(window.scrollY === 0);
|
|
70
70
|
};
|
|
71
|
-
if (
|
|
71
|
+
if (b === "full-bleed" && typeof window < "u")
|
|
72
72
|
return P(!0), window.addEventListener("scroll", s), () => window.removeEventListener("scroll", s);
|
|
73
|
-
}, [
|
|
74
|
-
const s =
|
|
75
|
-
s && (
|
|
76
|
-
}, [
|
|
73
|
+
}, [b]), j(() => {
|
|
74
|
+
const s = p.current;
|
|
75
|
+
s && (m ? s.pause() : s.play());
|
|
76
|
+
}, [m]);
|
|
77
77
|
const N = () => /* @__PURE__ */ e(
|
|
78
78
|
"button",
|
|
79
79
|
{
|
|
80
80
|
title: `${B ? "Pause the video" : "Play the video"}`,
|
|
81
81
|
className: r.videoControl,
|
|
82
82
|
onClick: () => {
|
|
83
|
-
const s =
|
|
83
|
+
const s = p.current;
|
|
84
84
|
s && (s.paused ? (s.play().catch(() => {
|
|
85
85
|
}), I(!0)) : (s.pause(), I(!1)));
|
|
86
86
|
},
|
|
87
|
-
children: B ? /* @__PURE__ */ e(
|
|
87
|
+
children: B ? /* @__PURE__ */ e(G, { size: 18 }) : /* @__PURE__ */ e(M, { size: 18 })
|
|
88
88
|
}
|
|
89
89
|
), U = () => {
|
|
90
|
-
if (!
|
|
91
|
-
const s =
|
|
90
|
+
if (!o) return null;
|
|
91
|
+
const s = o.includes("vimeo.com"), a = o.includes("youtube.com") || o.includes("youtu.be");
|
|
92
92
|
return s || a ? /* @__PURE__ */ e("div", { className: r.videoWrapper, children: /* @__PURE__ */ e(
|
|
93
93
|
"iframe",
|
|
94
94
|
{
|
|
95
|
-
src: s ? `${
|
|
96
|
-
|
|
95
|
+
src: s ? `${o}?autoplay=1&muted=1&loop=1&background=1` : `${o}?autoplay=1&mute=1&loop=1&playlist=${k(
|
|
96
|
+
o
|
|
97
97
|
)}`,
|
|
98
98
|
allow: "autoplay; fullscreen",
|
|
99
99
|
allowFullScreen: !0
|
|
@@ -103,13 +103,13 @@ function he({
|
|
|
103
103
|
/* @__PURE__ */ e(
|
|
104
104
|
"video",
|
|
105
105
|
{
|
|
106
|
-
ref:
|
|
107
|
-
src:
|
|
108
|
-
autoPlay: !
|
|
106
|
+
ref: p,
|
|
107
|
+
src: o,
|
|
108
|
+
autoPlay: !m,
|
|
109
109
|
loop: !0,
|
|
110
110
|
muted: !0,
|
|
111
111
|
playsInline: !0,
|
|
112
|
-
poster: (
|
|
112
|
+
poster: (l == null ? void 0 : l.imageUrl) || void 0,
|
|
113
113
|
preload: "metadata"
|
|
114
114
|
}
|
|
115
115
|
)
|
|
@@ -119,65 +119,65 @@ function he({
|
|
|
119
119
|
const a = s.match(/(?:youtube\.com\/.*v=|youtu\.be\/)([^&?/]+)/);
|
|
120
120
|
return (a == null ? void 0 : a[1]) || "";
|
|
121
121
|
}
|
|
122
|
-
const F = () =>
|
|
122
|
+
const F = () => l && l.imageUrl ? /* @__PURE__ */ e("div", { className: r.image, children: /* @__PURE__ */ e(
|
|
123
123
|
C,
|
|
124
124
|
{
|
|
125
|
-
src:
|
|
126
|
-
alt:
|
|
125
|
+
src: l.imageUrl,
|
|
126
|
+
alt: l.asset.altText || l.asset.description || "Hero image",
|
|
127
127
|
width: 600,
|
|
128
128
|
height: 658,
|
|
129
129
|
priority: !0
|
|
130
130
|
}
|
|
131
131
|
) }) : null;
|
|
132
|
-
switch (
|
|
132
|
+
switch (b) {
|
|
133
133
|
case "split":
|
|
134
|
-
return /* @__PURE__ */ e("section", { className: `${r.hero} ${r.split}`, children: /* @__PURE__ */ c("article", { className: r.container
|
|
134
|
+
return /* @__PURE__ */ e("section", { className: `${r.hero} ${r.split}`, children: /* @__PURE__ */ c("article", { className: `${S} ${r.container}`, children: [
|
|
135
135
|
/* @__PURE__ */ c("div", { className: r.text, children: [
|
|
136
136
|
/* @__PURE__ */ c("div", { children: [
|
|
137
|
-
|
|
137
|
+
t.eyebrow && /* @__PURE__ */ e(
|
|
138
138
|
i,
|
|
139
139
|
{
|
|
140
140
|
className: r.eyebrow,
|
|
141
|
-
blocks:
|
|
141
|
+
blocks: t.eyebrow
|
|
142
142
|
}
|
|
143
143
|
),
|
|
144
|
-
/* @__PURE__ */ e(i, { blocks:
|
|
144
|
+
/* @__PURE__ */ e(i, { blocks: t.title })
|
|
145
145
|
] }),
|
|
146
|
-
|
|
146
|
+
t.description && /* @__PURE__ */ e(i, { blocks: t.description }),
|
|
147
147
|
n && /* @__PURE__ */ e(
|
|
148
|
-
|
|
148
|
+
v,
|
|
149
149
|
{
|
|
150
150
|
items: n.items,
|
|
151
151
|
alignment: n.alignment
|
|
152
152
|
}
|
|
153
153
|
),
|
|
154
|
-
|
|
154
|
+
t.disclaimer && /* @__PURE__ */ e(
|
|
155
155
|
i,
|
|
156
156
|
{
|
|
157
157
|
className: r.disclaimer,
|
|
158
|
-
blocks:
|
|
158
|
+
blocks: t.disclaimer
|
|
159
159
|
}
|
|
160
160
|
)
|
|
161
161
|
] }),
|
|
162
|
-
|
|
162
|
+
o ? /* @__PURE__ */ e(U, {}) : /* @__PURE__ */ e(F, {})
|
|
163
163
|
] }) });
|
|
164
164
|
case "default":
|
|
165
165
|
return /* @__PURE__ */ e("section", { className: `${r.hero} ${w}`, children: /* @__PURE__ */ c("article", { className: r.container, children: [
|
|
166
|
-
|
|
166
|
+
o ? /* @__PURE__ */ e(U, {}) : /* @__PURE__ */ e(F, {}),
|
|
167
167
|
/* @__PURE__ */ c("div", { className: r.text, children: [
|
|
168
168
|
/* @__PURE__ */ c("div", { children: [
|
|
169
|
-
|
|
169
|
+
t.eyebrow && /* @__PURE__ */ e(
|
|
170
170
|
i,
|
|
171
171
|
{
|
|
172
172
|
className: r.eyebrow,
|
|
173
|
-
blocks:
|
|
173
|
+
blocks: t.eyebrow
|
|
174
174
|
}
|
|
175
175
|
),
|
|
176
|
-
/* @__PURE__ */ e(i, { blocks:
|
|
176
|
+
/* @__PURE__ */ e(i, { blocks: t.title })
|
|
177
177
|
] }),
|
|
178
|
-
|
|
178
|
+
t.description && /* @__PURE__ */ e(i, { blocks: t.description }),
|
|
179
179
|
n && /* @__PURE__ */ e(
|
|
180
|
-
|
|
180
|
+
v,
|
|
181
181
|
{
|
|
182
182
|
items: n.items,
|
|
183
183
|
alignment: n.alignment
|
|
@@ -187,11 +187,11 @@ function he({
|
|
|
187
187
|
] }) });
|
|
188
188
|
case "full-bleed":
|
|
189
189
|
return /* @__PURE__ */ e("section", { className: `${r.hero} ${w} heroFullBleed`, children: /* @__PURE__ */ c("article", { className: r.container, children: [
|
|
190
|
-
|
|
190
|
+
o ? o.includes("vimeo.com") || o.includes("youtube.com") || o.includes("youtu.be") ? /* @__PURE__ */ e("div", { className: r.videoBackground, children: /* @__PURE__ */ e(
|
|
191
191
|
"iframe",
|
|
192
192
|
{
|
|
193
|
-
src:
|
|
194
|
-
|
|
193
|
+
src: o.includes("vimeo.com") ? `${o}?autoplay=1&muted=1&loop=1&background=1` : `${o}?autoplay=1&mute=1&loop=1&playlist=${k(
|
|
194
|
+
o
|
|
195
195
|
)}`,
|
|
196
196
|
className: r.iframe,
|
|
197
197
|
allow: "autoplay; fullscreen",
|
|
@@ -202,21 +202,21 @@ function he({
|
|
|
202
202
|
/* @__PURE__ */ e(
|
|
203
203
|
"video",
|
|
204
204
|
{
|
|
205
|
-
ref:
|
|
205
|
+
ref: p,
|
|
206
206
|
className: r.videoBackground,
|
|
207
|
-
src:
|
|
208
|
-
autoPlay: !
|
|
207
|
+
src: o,
|
|
208
|
+
autoPlay: !m,
|
|
209
209
|
loop: !0,
|
|
210
210
|
muted: !0,
|
|
211
211
|
playsInline: !0,
|
|
212
|
-
poster: (
|
|
212
|
+
poster: (l == null ? void 0 : l.imageUrl) || void 0
|
|
213
213
|
}
|
|
214
214
|
)
|
|
215
215
|
] }) : /* @__PURE__ */ e(
|
|
216
216
|
C,
|
|
217
217
|
{
|
|
218
|
-
src: (
|
|
219
|
-
alt: (
|
|
218
|
+
src: (l == null ? void 0 : l.imageUrl) ?? "",
|
|
219
|
+
alt: (l == null ? void 0 : l.asset.altText) || (l == null ? void 0 : l.asset.description) || "Card image",
|
|
220
220
|
fill: !0,
|
|
221
221
|
priority: !0,
|
|
222
222
|
style: { objectFit: "cover" },
|
|
@@ -226,18 +226,18 @@ function he({
|
|
|
226
226
|
),
|
|
227
227
|
/* @__PURE__ */ e("div", { className: r.overlay, children: /* @__PURE__ */ c("div", { className: r.text, children: [
|
|
228
228
|
/* @__PURE__ */ c("div", { children: [
|
|
229
|
-
|
|
229
|
+
t.eyebrow && /* @__PURE__ */ e(
|
|
230
230
|
i,
|
|
231
231
|
{
|
|
232
232
|
className: r.eyebrow,
|
|
233
|
-
blocks:
|
|
233
|
+
blocks: t.eyebrow
|
|
234
234
|
}
|
|
235
235
|
),
|
|
236
|
-
/* @__PURE__ */ e(i, { blocks:
|
|
236
|
+
/* @__PURE__ */ e(i, { blocks: t.title })
|
|
237
237
|
] }),
|
|
238
|
-
|
|
238
|
+
t.description && /* @__PURE__ */ e(i, { blocks: t.description }),
|
|
239
239
|
n && /* @__PURE__ */ e(
|
|
240
|
-
|
|
240
|
+
v,
|
|
241
241
|
{
|
|
242
242
|
items: n.items,
|
|
243
243
|
alignment: n.alignment
|
|
@@ -247,11 +247,11 @@ function he({
|
|
|
247
247
|
] }) });
|
|
248
248
|
case "blog":
|
|
249
249
|
return /* @__PURE__ */ e("section", { className: `${r.hero} ${w}`, children: /* @__PURE__ */ c("article", { className: r.container, children: [
|
|
250
|
-
|
|
250
|
+
o ? o.includes("vimeo.com") || o.includes("youtube.com") || o.includes("youtu.be") ? /* @__PURE__ */ e("div", { className: r.videoBackground, children: /* @__PURE__ */ e(
|
|
251
251
|
"iframe",
|
|
252
252
|
{
|
|
253
|
-
src:
|
|
254
|
-
|
|
253
|
+
src: o.includes("vimeo.com") ? `${o}?autoplay=1&muted=1&loop=1&background=1` : `${o}?autoplay=1&mute=1&loop=1&playlist=${k(
|
|
254
|
+
o
|
|
255
255
|
)}`,
|
|
256
256
|
className: r.iframe,
|
|
257
257
|
allow: "autoplay; fullscreen",
|
|
@@ -262,21 +262,21 @@ function he({
|
|
|
262
262
|
/* @__PURE__ */ e(
|
|
263
263
|
"video",
|
|
264
264
|
{
|
|
265
|
-
ref:
|
|
265
|
+
ref: p,
|
|
266
266
|
className: r.videoBackground,
|
|
267
|
-
src:
|
|
268
|
-
autoPlay: !
|
|
267
|
+
src: o,
|
|
268
|
+
autoPlay: !m,
|
|
269
269
|
loop: !0,
|
|
270
270
|
muted: !0,
|
|
271
271
|
playsInline: !0,
|
|
272
|
-
poster: (
|
|
272
|
+
poster: (l == null ? void 0 : l.imageUrl) || void 0
|
|
273
273
|
}
|
|
274
274
|
)
|
|
275
275
|
] }) : /* @__PURE__ */ e(
|
|
276
276
|
C,
|
|
277
277
|
{
|
|
278
|
-
src: (
|
|
279
|
-
alt: (
|
|
278
|
+
src: (l == null ? void 0 : l.imageUrl) ?? "",
|
|
279
|
+
alt: (l == null ? void 0 : l.asset.altText) || (l == null ? void 0 : l.asset.description) || "Card image",
|
|
280
280
|
fill: !0,
|
|
281
281
|
priority: !0,
|
|
282
282
|
style: { objectFit: "cover" },
|
|
@@ -286,49 +286,49 @@ function he({
|
|
|
286
286
|
),
|
|
287
287
|
/* @__PURE__ */ e("div", { className: r.overlay, children: /* @__PURE__ */ c("div", { className: r.text, children: [
|
|
288
288
|
/* @__PURE__ */ c("div", { children: [
|
|
289
|
-
|
|
289
|
+
t.eyebrow && /* @__PURE__ */ e(
|
|
290
290
|
i,
|
|
291
291
|
{
|
|
292
292
|
className: r.eyebrow,
|
|
293
|
-
blocks:
|
|
293
|
+
blocks: t.eyebrow
|
|
294
294
|
}
|
|
295
295
|
),
|
|
296
296
|
u && /* @__PURE__ */ c("div", { className: r.articleDetails, children: [
|
|
297
|
-
|
|
297
|
+
h && /* @__PURE__ */ e(
|
|
298
298
|
$,
|
|
299
299
|
{
|
|
300
300
|
href: `/blog/search?categories=${encodeURIComponent(
|
|
301
|
-
|
|
301
|
+
h._id
|
|
302
302
|
)}`,
|
|
303
303
|
className: r.articleType,
|
|
304
|
-
children:
|
|
304
|
+
children: h.title
|
|
305
305
|
},
|
|
306
|
-
|
|
306
|
+
h._id
|
|
307
307
|
),
|
|
308
308
|
/* @__PURE__ */ c("div", { className: r.articleCategories, children: [
|
|
309
|
-
|
|
309
|
+
f && /* @__PURE__ */ e(
|
|
310
310
|
$,
|
|
311
311
|
{
|
|
312
312
|
href: `/blog/search?categories=${encodeURIComponent(
|
|
313
|
-
|
|
313
|
+
f._id
|
|
314
314
|
)}`,
|
|
315
315
|
className: r.category,
|
|
316
|
-
children:
|
|
316
|
+
children: f.title
|
|
317
317
|
},
|
|
318
|
-
|
|
318
|
+
f._id
|
|
319
319
|
),
|
|
320
|
-
|
|
320
|
+
y && y.title.toLowerCase() !== "library" && !y.slug.current.includes(
|
|
321
321
|
"keywords"
|
|
322
322
|
) && /* @__PURE__ */ e(
|
|
323
323
|
$,
|
|
324
324
|
{
|
|
325
325
|
href: `/blog/search?categories=${encodeURIComponent(
|
|
326
|
-
|
|
326
|
+
y._id
|
|
327
327
|
)}`,
|
|
328
328
|
className: r.category,
|
|
329
|
-
children:
|
|
329
|
+
children: y.title
|
|
330
330
|
},
|
|
331
|
-
|
|
331
|
+
y._id
|
|
332
332
|
)
|
|
333
333
|
] }),
|
|
334
334
|
u.timeToRead && /* @__PURE__ */ e(x, { children: /* @__PURE__ */ c("span", { children: [
|
|
@@ -336,11 +336,11 @@ function he({
|
|
|
336
336
|
"min read"
|
|
337
337
|
] }) })
|
|
338
338
|
] }),
|
|
339
|
-
/* @__PURE__ */ e(i, { blocks:
|
|
339
|
+
/* @__PURE__ */ e(i, { blocks: t.title })
|
|
340
340
|
] }),
|
|
341
|
-
|
|
341
|
+
t.description && /* @__PURE__ */ e(i, { blocks: t.description }),
|
|
342
342
|
n && /* @__PURE__ */ e(
|
|
343
|
-
|
|
343
|
+
v,
|
|
344
344
|
{
|
|
345
345
|
items: n.items,
|
|
346
346
|
alignment: n.alignment
|
|
@@ -351,5 +351,5 @@ function he({
|
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
export {
|
|
354
|
-
|
|
354
|
+
we as HeroBlock
|
|
355
355
|
};
|