efficient-web-builder 48.2.0 → 49.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/dist/editor/components/HoverEffectField.js +1 -1
- package/dist/editor/components/WebsiteScreenParts.js +1 -1
- package/dist/editor/lib/animation/AnimationDurationRow.d.ts +3 -0
- package/dist/editor/lib/animation/AnimationDurationRow.js +1 -1
- package/dist/editor/lib/animation/fields.d.ts +2 -2
- package/dist/editor/lib/animation/fields.js +1 -1
- package/dist/editor/lib/animation/hover-fields.d.ts +2 -0
- package/dist/editor/lib/animation/hover-fields.js +1 -1
- package/dist/editor/lib/document/add-target.d.ts +1 -1
- package/dist/editor/lib/document/add-target.js +1 -1
- package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSlide/fields.js +1 -1
- package/dist/editor/lib/document/blocks/hero-shared-fields.d.ts +15 -0
- package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -0
- package/dist/editor/lib/document/controls.d.ts +1 -1
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/sections/hero-ticker-to-strip.d.ts +7 -0
- package/dist/editor/lib/sections/hero-ticker-to-strip.js +1 -0
- package/dist/editor/lib/sections/section-dry-run.d.ts +5 -0
- package/dist/editor/lib/sections/section-dry-run.js +2 -2
- package/dist/format/lib/animation/hover.d.ts +32 -2
- package/dist/format/lib/animation/hover.js +1 -1
- package/dist/format/lib/content/block-align.js +1 -1
- package/dist/format/lib/content/block-sources.js +1 -1
- package/dist/format/lib/content/box-layout.js +1 -1
- package/dist/format/lib/content/box-separator.js +1 -1
- package/dist/format/lib/content/box-shape.js +1 -1
- package/dist/format/lib/content/button-icon.js +1 -1
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/container-gap.d.ts +1 -1
- package/dist/format/lib/content/container-gap.js +1 -1
- package/dist/format/lib/content/page-width.d.ts +3 -3
- package/dist/format/lib/content/page-width.js +1 -1
- package/dist/format/lib/content/part-display.js +1 -1
- package/dist/format/lib/content/section-min-height.d.ts +1 -1
- package/dist/format/lib/content/section-min-height.js +1 -1
- package/dist/format/lib/content/view-lines.d.ts +11 -0
- package/dist/format/lib/content/view-lines.js +1 -0
- package/dist/format/lib/document/blocks/general/Hero/meta.d.ts +4 -0
- package/dist/format/lib/document/blocks/general/Hero/meta.js +1 -1
- package/dist/format/lib/document/passes/types.d.ts +1 -1
- package/dist/format/lib/editor-words-catalogue.d.ts +5 -1
- package/dist/format/lib/editor-words-catalogue.js +4 -4
- package/dist/format/lib/global-registry.d.ts +1 -0
- package/dist/format/lib/global-registry.js +1 -0
- package/dist/format/lib/hero-ticker.d.ts +6 -0
- package/dist/format/lib/hero-ticker.js +1 -1
- package/dist/format/lib/links/link-href-rewrites.d.ts +10 -0
- package/dist/format/lib/links/link-href-rewrites.js +1 -0
- package/dist/format/lib/sections/collection-card-text-regions.d.ts +1 -1
- package/dist/format/lib/sections/collection-card-text-regions.js +1 -1
- package/dist/format/lib/sections/hero-overlay.d.ts +8 -0
- package/dist/format/lib/sections/hero-overlay.js +1 -1
- package/dist/format/lib/sections/hero-single-to-hero.d.ts +8 -0
- package/dist/format/lib/sections/hero-single-to-hero.js +1 -0
- package/dist/format/lib/sections/ticker-style.js +1 -1
- package/dist/format/lib/source-rules/heading-ceiling-sweep.js +7 -7
- package/dist/format/lib/source-rules/view-breakpoint-names.d.ts +6 -0
- package/dist/format/lib/source-rules/view-breakpoint-names.js +4 -0
- package/dist/render/components/Banner.js +1 -1
- package/dist/render/components/Breadcrumb.js +1 -1
- package/dist/render/components/Btn.d.ts +2 -0
- package/dist/render/components/Btn.js +1 -1
- package/dist/render/components/ButtonBlock.d.ts +1 -0
- package/dist/render/components/ButtonBlock.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +2 -1
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/Cards.js +1 -1
- package/dist/render/components/CategoryBar.js +1 -1
- package/dist/render/components/ChartSection.js +1 -1
- package/dist/render/components/ContactLocations.js +1 -1
- package/dist/render/components/DealerFinder.js +1 -1
- package/dist/render/components/Divider.js +1 -1
- package/dist/render/components/FAQ.js +1 -1
- package/dist/render/components/FeaturedCover.js +1 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/Footprint.js +1 -1
- package/dist/render/components/Heading.js +1 -1
- package/dist/render/components/HeroPictures.d.ts +63 -0
- package/dist/render/components/HeroPictures.js +1 -0
- package/dist/render/components/HeroSection.d.ts +2 -1
- package/dist/render/components/HeroSection.js +1 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/HeroSlide.d.ts +16 -1
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/components/IntegrationsSection.js +1 -1
- package/dist/render/components/IntroBleed.js +1 -1
- package/dist/render/components/KeyFeatures.js +1 -1
- package/dist/render/components/LocationMap.d.ts +1 -1
- package/dist/render/components/LocationMap.js +1 -1
- package/dist/render/components/LongRead.js +1 -1
- package/dist/render/components/Manifesto.js +1 -1
- package/dist/render/components/Masthead.js +1 -1
- package/dist/render/components/MockupSection.js +1 -1
- package/dist/render/components/OrderSummary.js +1 -1
- package/dist/render/components/ParagraphsA.js +1 -1
- package/dist/render/components/PostCard.js +1 -1
- package/dist/render/components/ProcessSteps.js +1 -1
- package/dist/render/components/Prose.js +1 -1
- package/dist/render/components/Reel.js +1 -1
- package/dist/render/components/SectionEyebrow.js +1 -1
- package/dist/render/components/SectionHeader.d.ts +4 -4
- package/dist/render/components/SectionHeader.js +1 -1
- package/dist/render/components/Series.js +1 -1
- package/dist/render/components/SpecStrip.js +1 -1
- package/dist/render/components/Split.js +1 -1
- package/dist/render/components/Stats.js +1 -1
- package/dist/render/components/StatsParagraph.js +1 -1
- package/dist/render/components/Testimonials.js +1 -1
- package/dist/render/components/Text.js +1 -1
- package/dist/render/components/Ticker.js +1 -1
- package/dist/render/components/TickerSection.js +1 -1
- package/dist/render/components/Timeline.js +1 -1
- package/dist/render/components/TimelineRail.d.ts +4 -4
- package/dist/render/components/TimelineRail.js +1 -1
- package/dist/render/components/TimelineTrack.js +1 -1
- package/dist/render/components/TitleWithButtons.js +1 -1
- package/dist/render/lib/animation/LoopTrack.d.ts +2 -2
- package/dist/render/lib/animation/LoopTrack.js +1 -1
- package/dist/render/lib/content/block-size.js +1 -1
- package/dist/render/lib/content/section-edge.js +1 -1
- package/dist/render/lib/content/view-values.d.ts +2 -1
- package/dist/render/lib/content/view-values.js +1 -1
- package/dist/render/lib/document/blocks/general/ButtonBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
- package/dist/render/lib/document/blocks/general/LocationMap/render.js +1 -1
- package/dist/render/lib/document/blocks/general/SectionHeader/render.js +1 -1
- package/dist/render/lib/document/passes/section-animation.js +1 -1
- package/dist/render/lib/document/passes/section-width.d.ts +2 -2
- package/dist/render/lib/document/passes/section-width.js +1 -1
- package/dist/render/lib/document/slot-specs.d.ts +3 -0
- package/dist/render/lib/document/slot-specs.js +1 -1
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/dist/render/lib/site-runtime.d.ts +3 -1
- package/dist/render/lib/site-runtime.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{ruleChecks as x}from"./rule.js";const m=/(?<![\w@-])(?:max|min)-\[(?:720|800|1100)px\]:/g,d=/(?<![\w@-])(?:max-)?view-(?:tablet|desktop|wide):/g,t=(s,n)=>s.match(n)?.length??0;function f(s,n){const{check:a,report:c}=x("view breakpoint names");{const e=['"max-[800px]:flex-col min-[720px]:max-[1100px]:grow-[2]! [&>*]:min-[800px]:basis-0"','"max-[719px]:px-5 min-[801px]:flex max-[8000px]:hidden"','"@max-[720px]:flex-col @min-[800px]:grid @max-view-tablet:hidden"','"max-view-wide:flex-col view-tablet:max-view-desktop:grow-[2]! [&>*]:view-wide:basis-0"'].join(`
|
|
2
|
+
`);a("the reader finds the 4 numbered view classes, none of the near lines and no container query",t(e,m)===4,`found ${t(e,m)}`),a("the reader finds the 4 named view classes",t(e,d)===4,`found ${t(e,d)}`)}const i=s.filter(e=>/\.(tsx?|css)$/.test(e.path));a(`read the source (${i.length} TS/TSX/CSS files, at least ${n.minFiles})`,i.length>=n.minFiles,"fewer means the walk broke, and the check below is vacuous");let o=0;const r=[];for(const e of i){o+=t(e.text,d);const l=t(e.text,m);l>0&&r.push(`${e.path}: ${l}`)}return a(`found >= ${n.namedFloor} named view classes (found ${o})`,o>=n.namedFloor,"fewer means the classes went back to a number, or the reader broke"),a("no class or comment writes a view line by its number (720, 800, 1100)",r.length===0,`write view-tablet: / view-desktop: / view-wide: (and max-…) instead:
|
|
3
|
+
${r.join(`
|
|
4
|
+
`)}`),c()}export{f as viewBreakpointNames};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as s}from"react/jsx-runtime";import
|
|
1
|
+
import{jsx as e,jsxs as s}from"react/jsx-runtime";import x from"./BlockFrame.js";import g from"./Btn.js";import{media as u}from"../lib/media.js";import{CONTENT_SIZES as v,sizedImage as N}from"../../format/lib/sized-image.js";import w from"./SectionEyebrow.js";import{renderGold as t,renderHeadline as b,splitParagraphs as y}from"./goldPhrases.js";import{ON_MEDIA_INK_STYLE as M}from"../../format/lib/content/ink.js";import{scrim as z}from"../../format/lib/content/scrim.js";const n={headingMediumUpTo800:"max-view-wide:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",headingMedium:"text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))]",body:"text-[length:var(--size-body,16px)]"};function E({eyebrow:i,title:a,body:d,ctaText:m,ctaHref:o,imageSrc:r,contained:l,overlay:c=60}){const p=Math.min(Math.max(c,0),100)/100;return e(x,{contained:l,className:"py-6",children:s("div",{className:"sf-card relative overflow-hidden border border-line bg-surface px-10 py-16 max-view-wide:px-6 max-view-wide:py-10",children:[r&&s("div",{className:"absolute inset-0","aria-hidden":!0,children:[e(_,{src:u(r)}),e("div",{className:"absolute inset-0",style:{background:z(p)}})]}),s("div",{className:"relative z-[1] flex max-w-[680px] flex-col gap-5",style:r?M:void 0,children:[i&&e(w,{text:i}),a&&e("h2",{className:`font-heading2 ${n.headingMedium} font-medium leading-[1.05] tracking-[-0.03em] ${n.headingMediumUpTo800}`,children:b(a,!1)}),d&&y(d).map((h,f)=>e("p",{className:`${n.body} leading-[1.6] opacity-85`,children:t(h)},f)),m&&e("div",{className:"mt-2 self-start",children:e(g,{href:o||"#",variant:"primary",children:t(m)})})]})]})})}function _({src:i}){const a=N(i);return e("img",{src:a.src,...a.srcSet?{srcSet:a.srcSet,sizes:v}:{},alt:"",className:"h-full w-full object-cover"})}export{E as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r,jsxs as s,Fragment as
|
|
1
|
+
import{jsx as r,jsxs as s,Fragment as p}from"react/jsx-runtime";import{Fragment as f}from"react";import{SiteLink as d}from"../lib/site-runtime.js";import{renderChrome as m,renderGold as x}from"./goldPhrases.js";import{say as h}from"../../format/lib/editor-words.js";function u({items:o,meta:a,editing:c=!1}){const l=(o??[]).filter(e=>e?.label?.trim()),t=l.length>0?l:c?[{label:h("Breadcrumb")}]:[];return t.length===0&&!a?null:r("nav",{className:"border-b border-line px-[var(--sf-site-gutter,40px)] py-6 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim max-view-tablet:px-[min(20px,var(--sf-site-gutter,40px))] max-view-tablet:py-4",children:s("div",{className:"mx-auto flex max-w-[var(--sf-content-cap,none)] items-center gap-4",children:[t.map((e,n)=>{const i=n===t.length-1;return s(f,{children:[n>0&&r("span",{className:"opacity-40",children:"/"}),e.href&&!i?r(d,{href:e.href,className:"hover:text-fg",children:m(e.label)}):r("span",{className:i?"text-fg":void 0,children:m(e.label)})]},n)}),a&&s(p,{children:[r("span",{className:"opacity-40",children:"·"}),r("span",{children:x(a)})]})]})})}export{u as default};
|
|
@@ -12,12 +12,14 @@ interface CommonProps {
|
|
|
12
12
|
interface LinkProps extends CommonProps {
|
|
13
13
|
href: string;
|
|
14
14
|
newTab?: boolean;
|
|
15
|
+
hrefRewrite?: string;
|
|
15
16
|
type?: never;
|
|
16
17
|
onClick?: never;
|
|
17
18
|
}
|
|
18
19
|
interface ButtonProps extends CommonProps, Omit<ComponentPropsWithoutRef<"button">, keyof CommonProps> {
|
|
19
20
|
href?: undefined;
|
|
20
21
|
newTab?: undefined;
|
|
22
|
+
hrefRewrite?: undefined;
|
|
21
23
|
}
|
|
22
24
|
type Props = LinkProps | ButtonProps;
|
|
23
25
|
export default function Btn(props: Props): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r,Fragment as
|
|
1
|
+
import{jsx as r,Fragment as l,jsxs as c}from"react/jsx-runtime";import{SiteLink as y}from"../lib/site-runtime.js";import{BUTTON_PAD_CLASSES as j}from"../lib/content/button-look.js";const p=`sf-button group inline-flex items-center justify-center gap-2.5 border ${j} font-mono text-[length:var(--size-label,14px)] uppercase tracking-[0.2em] transition-colors`,b={primary:"border-btn bg-btn text-btn-ink hover:border-btn-2 hover:bg-btn-2",ghost:"border-current bg-transparent hover:bg-white/10"};function N(h){const{variant:m="primary",arrow:e,glyphBefore:f,spread:u,className:d,style:t,children:n,href:a,newTab:g,hrefRewrite:s,...x}=h,i=`${u?p.replace("justify-center","justify-between").replace("gap-2.5","gap-6"):p} ${b[m]??b.primary} ${d??""}`,o=f?c(l,{children:[e!==null&&r("span",{"aria-hidden":!0,className:"inline-flex",children:e??"→"}),n]}):c(l,{children:[n,e!==null&&r("span",{"aria-hidden":!0,className:"transition-transform group-hover:translate-x-[3px]",children:e??"→"})]});return a?r(y,{href:a,className:i,style:t,...g?{target:"_blank",rel:"noopener noreferrer"}:{},...s?{hrefRewrite:s}:{},children:o}):r("button",{type:"button",className:i,style:t,...x,children:o})}export{N as default};
|
|
@@ -28,6 +28,7 @@ interface ButtonBlockProps {
|
|
|
28
28
|
buttonPaddingLeftPhone?: number;
|
|
29
29
|
buttonCorners?: number;
|
|
30
30
|
buttonCornerSides?: string[];
|
|
31
|
+
hrefRewrite?: string;
|
|
31
32
|
}
|
|
32
33
|
export default function ButtonBlock(props: ButtonBlockProps): import("react").JSX.Element;
|
|
33
34
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import{buttonArrowShown as
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{buttonArrowShown as L}from"../../format/lib/content/button-arrow.js";import{buttonIconAtEnd as N,buttonIconSide as T,buttonWidthClass as j,storedButtonIcon as _}from"../../format/lib/content/button-icon.js";import{buttonCornersStyle as v,buttonPadAttrs as O,buttonPaint as R}from"../lib/content/button-look.js";import{ArrowLongRightIcon as F,ArrowRightIcon as G,ArrowUpRightIcon as U,BagIcon as $,CarIcon as E,CartIcon as K,ChevronRightIcon as Y,DownloadIcon as z,EmailIcon as D,ExternalIcon as H,LocationIcon as J,PlayIcon as W,SearchIcon as q,TagIcon as M}from"efficient-shell/icons/efficient";import Q from"./BlockFrame.js";import V from"./Btn.js";import{renderGold as X}from"./goldPhrases.js";import{alignPhoneClass as b,BLOCK_ALIGN_JUSTIFY as Z}from"../../format/lib/content/block-align.js";const oo="sf-button-block",to={"arrow-right":G,"arrow-long-right":F,"arrow-up-right":U,"chevron-right":Y,external:H,cart:K,bag:$,tag:M,email:D,location:J,play:W,download:z,search:q,car:E};function no(o){const{label:p,href:c,variant:i,align:a,alignPhone:s,contained:I,arrow:C,icon:y,iconPosition:l,widthFit:d,widthFitPhone:B,buttonColor:t,buttonTextColor:h,hrefRewrite:m}=o,n=_(y),u=n&&n!=="none"?to[n]:void 0,P=n===void 0?L(C)?{}:{arrow:null}:u?{arrow:r(u,{size:16}),...T(l)==="before"?{glyphBefore:!0}:{}}:{arrow:null},f=O(o),g=[j(d,B),f?.className??""].filter(Boolean).join(" "),x=g?{className:g}:{},A=N(l,d)?{spread:!0}:{},e=R(o),S=e?e.background==="transparent"?"ghost":"primary":i,w={...e??(t?i==="ghost"?{borderColor:t}:{background:t,borderColor:t}:{}),...h?{color:h}:{},...f?.style??{},...v(o)??{}},k=Object.keys(w).length?{style:w}:{};return r(Q,{contained:I,className:`${oo} py-4`,children:r("div",{className:`flex ${Z[a]}${b("justify",a,s)?` ${b("justify",a,s)}`:""}`,children:r(V,{href:c||"#",variant:S,...x,...A,...P,...k,...c&&m?{hrefRewrite:m}:{},children:X(p)})})})}export{oo as BUTTON_BLOCK_CLASS,no as default};
|
|
@@ -21,7 +21,8 @@ type CardTemplateRowsProps = {
|
|
|
21
21
|
rows: readonly SourceRow[];
|
|
22
22
|
items?: readonly unknown[];
|
|
23
23
|
fallback: ReactNode;
|
|
24
|
+
wrapCopy?: (copy: ReactNode, row: CardRow) => ReactNode;
|
|
24
25
|
children: (cards: ReactNode) => ReactNode;
|
|
25
26
|
};
|
|
26
|
-
export declare function CardTemplateRows({ ownerId, ownerType, Template, rows, items, fallback, children }: CardTemplateRowsProps): import("react").JSX.Element;
|
|
27
|
+
export declare function CardTemplateRows({ ownerId, ownerType, Template, rows, items, fallback, wrapCopy, children }: CardTemplateRowsProps): import("react").JSX.Element;
|
|
27
28
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as i,jsx as r}from"react/jsx-runtime";import{createContext as p,useContext as
|
|
1
|
+
"use client";import{Fragment as i,jsx as r}from"react/jsx-runtime";import{createContext as p,useContext as m}from"react";import{REPEAT_ATTRIBUTE as C,REPEAT_INDEX_ATTRIBUTE as _}from"efficient-easel/draw";import{CARD_TEMPLATE_SLOT as w,rowFilledProps as x}from"../../format/lib/content/card-template.js";const s=p(null);function D(){return m(s)}function F({type:e,props:c,children:t}){const o=m(s);return r(i,{children:t(x(e,c,o?.row),o)})}function I({ownerId:e,ownerType:c,Template:t,rows:o,items:d,fallback:T,wrapCopy:u,children:E}){if(!t||(t.blockCount??0)<=0)return r(i,{children:T});const R=o.map((f,n)=>{const a={row:f,index:n,ownerType:c,item:d?.[n]},l=r("div",{[C]:`${e}:${w}`,[_]:n,children:r(t,{})});return r(s.Provider,{value:a,children:u?u(l,a):l},n)});return r(i,{children:E(R)})}export{s as CardRowContext,F as CardRowDrawn,I as CardTemplateRows,D as useCardRow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as b,jsxs as d}from"react/jsx-runtime";import N from"./SectionEyebrow.js";import{renderGold as p,renderHeadline as
|
|
1
|
+
import{jsx as e,Fragment as b,jsxs as d}from"react/jsx-runtime";import N from"./SectionEyebrow.js";import{renderGold as p,renderHeadline as w}from"./goldPhrases.js";import{say as c}from"../../format/lib/editor-words.js";const i={headingMediumUpTo800:"max-view-wide:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",headingMedium:"text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))]",body:"text-[length:var(--size-body,15px)]",headingSmall:"text-[length:var(--size-headingSmall,20px)]"},M="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] py-[72px] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",y="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-0 pb-[72px] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]";function _(r){return Math.min(4,Math.max(2,r??3))}function E({look:r,eyebrow:n,title:s,items:g,columns:h,omitHead:l=!1,editing:t=!1}={}){const f=_(h),m=(g??[]).filter(a=>t||(a.title??"").trim()||(a.body??"").trim()),u=!!(n??"").trim()||!!(s??"").trim();return!t&&!u&&m.length===0?null:e("section",{className:"relative z-[2] bg-surface",children:d("div",{className:l?y:M,children:[l?null:d(b,{children:[(n??"").trim()&&e(N,{text:n??"",look:r,className:"mb-4 block"}),(s??"").trim()&&e("h2",{className:`mb-9 font-heading2 ${i.headingMedium} font-medium uppercase leading-none tracking-[-0.02em] text-fg max-view-wide:mb-7 ${i.headingMediumUpTo800}`,children:w(s??"",!1)})]}),m.length>0&&e("div",{className:"sf-card grid grid-cols-1 gap-px border border-line bg-line min-[700px]:[grid-template-columns:repeat(var(--cd-cols),minmax(0,1fr))]",style:{"--cd-cols":String(f)},children:m.map((a,v)=>{const x=(a.title??"").trim()||(t?c("Card title"):""),o=(a.body??"").trim()||(t?c("A short line about this card."):"");return d("div",{className:"bg-bg p-8 max-view-wide:p-7",children:[x&&e("div",{className:`mb-3 font-heading3 ${i.headingSmall} font-medium uppercase tracking-[0.02em] text-fg`,children:p(x)}),o&&e("p",{className:`${i.body} leading-[1.6] text-fg-dim`,children:p(o)})]},v)})})]})})}export{_ as cardColumns,E as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r,jsxs as s}from"react/jsx-runtime";import{SiteLink as u}from"../lib/site-runtime.js";import{renderChrome as l}from"./goldPhrases.js";import{STICKY_UNDERHEADER_CLASS as v}from"../lib/document/header-clearance.js";import{say as k}from"../../format/lib/editor-words.js";const n={body:"text-[length:var(--size-body,12px)]",label:"text-[length:var(--size-label,13px)]"};function w({tabs:d,activeTab:i,links:b,sticky:f=!0,editing:h=!1}){const c=(d??[]).filter(e=>e?.label?.trim()),a=c.length>0?c:h?[{label:k("Tab")}]:[],o=(b??[]).filter(e=>e?.label?.trim());if(a.length===0&&o.length===0)return null;const p=i?a.findIndex(e=>e.label.toLowerCase()===i.toLowerCase()):-1,g=p===-1?0:p;return r("nav",{className:`${f?`${v} sticky top-[var(--sf-header-h,88px)] z-40 `:""}border-b border-line px-[var(--sf-site-gutter,40px)] backdrop-blur-md max-
|
|
1
|
+
import{jsx as r,jsxs as s}from"react/jsx-runtime";import{SiteLink as u}from"../lib/site-runtime.js";import{renderChrome as l}from"./goldPhrases.js";import{STICKY_UNDERHEADER_CLASS as v}from"../lib/document/header-clearance.js";import{say as k}from"../../format/lib/editor-words.js";const n={body:"text-[length:var(--size-body,12px)]",label:"text-[length:var(--size-label,13px)]"};function w({tabs:d,activeTab:i,links:b,sticky:f=!0,editing:h=!1}){const c=(d??[]).filter(e=>e?.label?.trim()),a=c.length>0?c:h?[{label:k("Tab")}]:[],o=(b??[]).filter(e=>e?.label?.trim());if(a.length===0&&o.length===0)return null;const p=i?a.findIndex(e=>e.label.toLowerCase()===i.toLowerCase()):-1,g=p===-1?0:p;return r("nav",{className:`${f?`${v} sticky top-[var(--sf-header-h,88px)] z-40 `:""}border-b border-line px-[var(--sf-site-gutter,40px)] backdrop-blur-md max-view-desktop:px-[min(16px,var(--sf-site-gutter,40px))]`,style:{background:"color-mix(in oklab, var(--bg) 92%, transparent)"},children:s("div",{className:"mx-auto flex max-w-[calc(var(--sf-site-width,1600px)_-_var(--sf-site-gutter,40px)*2)] items-stretch gap-0 overflow-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[a.map((e,t)=>{const m=t===g,x=e.count?.trim()?e.count:"";return s("span",{className:[`relative whitespace-nowrap border-r border-line px-[22px] py-[18px] font-mono ${n.label} uppercase tracking-[0.22em] transition-colors`,t===0?"border-l border-line":"",m?"text-fg":"text-fg-dim hover:text-fg"].join(" "),children:[l(e.label),x&&r("span",{className:`ml-2 ${n.body} text-accent opacity-70`,children:l(x)}),m&&r("span",{className:"absolute inset-x-0 -bottom-px h-[2px] bg-accent"})]},t)}),o.length>0&&r("div",{className:"ml-auto flex border-l border-line",children:o.map((e,t)=>s(u,{href:e.href||"#",className:`flex items-center gap-2.5 px-[22px] py-[18px] font-mono ${n.label} uppercase tracking-[0.22em] text-fg-dim hover:text-fg`,children:[l(e.label)," ",r("span",{className:"text-accent",children:"↗"})]},t))})]})})}export{w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as o}from"react/jsx-runtime";import{renderGold as g,renderHeadline as N}from"./goldPhrases.js";const d={headingMediumUpTo800:"max-
|
|
1
|
+
import{jsx as t,jsxs as o}from"react/jsx-runtime";import{renderGold as g,renderHeadline as N}from"./goldPhrases.js";const d={headingMediumUpTo800:"max-view-wide:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",headingMedium:"text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))]",bodySmall:"text-[length:var(--size-body,15px)]",bodyLarge:"text-[length:var(--size-body,16px)]",labelSmall:"text-[length:var(--size-label,10px)]",label:"text-[length:var(--size-label,11px)]",labelLarge:"text-[length:var(--size-label,12px)]"};function v(e){return Number.isInteger(e)?String(e):String(Math.round(e*10)/10)}const b=[100,70,46,30,19,12];function y(e){return`color-mix(in srgb, var(--accent) ${b[e%b.length]}%, var(--bg))`}function $({data:e,suffix:x}){const h=Math.max(...e.map(m=>m.value),0)||1;return t("div",{className:"flex w-full flex-col gap-6",children:e.map((m,a)=>o("div",{children:[o("div",{className:"mb-2 flex items-baseline justify-between gap-4",children:[t("span",{className:`font-mono ${d.label} uppercase tracking-[0.14em] text-fg/60`,children:g(m.label)}),o("span",{className:`font-display ${d.bodyLarge} font-medium text-fg`,children:[v(m.value),x]})]}),t("div",{className:"h-[10px] border border-line bg-bg",children:t("div",{className:"h-full bg-accent",style:{width:`${Math.max(m.value/h*100,m.value===0?0:2)}%`}})})]},a))})}function k({data:e,suffix:x}){const a={l:42,r:42,t:36,b:38},f=640-a.l-a.r,c=300-a.t-a.b,n=Math.max(...e.map(l=>l.value),0)||1,s=e.length>1?f/(e.length-1):0,i=e.map((l,r)=>({x:a.l+(e.length>1?r*s:f/2),y:a.t+c-l.value/n*c})),p=i.map((l,r)=>`${r===0?"M":"L"}${l.x},${l.y}`).join(" "),u=`${p} L${i[i.length-1].x},${a.t+c} L${i[0].x},${a.t+c} Z`;return o("svg",{viewBox:"0 0 640 300",className:"w-full",role:"img","aria-hidden":!0,children:[[.25,.5,.75,1].map(l=>t("line",{x1:a.l,x2:640-a.r,y1:a.t+c*(1-l),y2:a.t+c*(1-l),stroke:"var(--site-line)",strokeWidth:"1"},l)),t("line",{x1:a.l,x2:640-a.r,y1:a.t+c,y2:a.t+c,stroke:"var(--site-line)",strokeWidth:"1.5"}),t("path",{d:u,fill:"var(--accent)",opacity:"0.13"}),t("path",{d:p,fill:"none",stroke:"var(--accent)",strokeWidth:"2.5"}),i.map((l,r)=>o("g",{children:[t("circle",{cx:l.x,cy:l.y,r:"4",fill:"var(--accent)"}),o("text",{x:l.x,y:l.y-12,textAnchor:"middle",className:"font-display",fontSize:"14",fill:"var(--fg)",children:[v(e[r].value),x]}),t("text",{x:l.x,y:288,textAnchor:"middle",className:"font-mono",fontSize:"10",letterSpacing:"0.1em",fill:"var(--fg)",opacity:"0.55",children:e[r].label.toUpperCase()})]},r))]})}function w({data:e,suffix:x}){const h=e.reduce((n,s)=>n+s.value,0)||1,m=80,a=2*Math.PI*m;let f=0;const c=e.map((n,s)=>{const i=n.value/h,p={frac:i,dash:Math.max(i*a-3,0),off:f,ink:y(s)};return f+=i*a,p});return o("div",{className:"flex w-full flex-wrap items-center justify-center gap-10",children:[t("svg",{viewBox:"0 0 200 200",className:"w-[220px] max-w-full -rotate-90",role:"img","aria-hidden":!0,children:c.map((n,s)=>t("circle",{cx:"100",cy:"100",r:m,fill:"none",stroke:n.ink,strokeWidth:"34",strokeDasharray:`${n.dash} ${a-n.dash}`,strokeDashoffset:-n.off},s))}),t("ul",{className:"flex min-w-[200px] flex-1 flex-col gap-3",children:e.map((n,s)=>o("li",{className:"flex items-baseline gap-3",children:[t("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] flex-shrink-0 rotate-45",style:{background:y(s)}}),t("span",{className:`flex-1 font-mono ${d.label} uppercase tracking-[0.12em] text-fg/60`,children:g(n.label)}),t("span",{className:`font-display ${d.bodySmall} font-medium text-fg`,children:x?`${v(n.value)}${x}`:`${Math.round(n.value/h*100)}%`})]},s))})]})}function M({eyebrow:e,title:x,body:h,chartStyle:m,items:a,valueSuffix:f,caption:c,editing:n=!1}={}){const s=(f??"").trim()===""?"":f??"",i=(a??[]).map(r=>({label:(r.label??"").trim(),value:parseFloat(r.value??"")})).filter(r=>n?!0:r.label&&Number.isFinite(r.value)).map(r=>({label:r.label||"—",value:Number.isFinite(r.value)?r.value:0})),p=!!(e??"").trim()||!!(x??"").trim();if(!n&&!p&&i.length===0)return null;const u=m??"bars",l=i.length===0?null:u==="line"&&i.length>1?t(k,{data:i,suffix:s}):u==="donut"?t(w,{data:i,suffix:s}):t($,{data:i,suffix:s});return t("section",{className:"relative z-[2] border-y border-line bg-surface",children:o("div",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] items-center gap-14 px-[var(--sf-site-gutter,40px)] py-[76px] min-[960px]:[grid-template-columns:minmax(0,5fr)_minmax(0,7fr)] max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",children:[o("div",{children:[(e??"").trim()&&t("span",{className:`inline-block bg-accent px-3.5 py-1.5 font-mono ${d.labelLarge} font-semibold uppercase tracking-[0.16em] text-bg`,children:g(e??"")}),(x??"").trim()&&t("h2",{className:`mt-5 font-heading2 ${d.headingMedium} font-medium uppercase leading-[1.04] tracking-[-0.02em] text-fg ${d.headingMediumUpTo800}`,children:N(x??"",!1)}),(h??"").trim()&&t("p",{className:`mt-5 max-w-[46ch] ${d.bodySmall} leading-relaxed text-fg/65`,children:h})]}),o("div",{children:[l,(c??"").trim()&&t("p",{className:`mt-4 font-mono ${d.labelSmall} uppercase tracking-[0.14em] text-fg/40`,children:c})]})]})})}export{M as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";import{jsx as t,jsxs as r,Fragment as j}from"react/jsx-runtime";import{EDITORIAL_COLUMN as H}from"../../format/lib/content/page-width.js";import{SiteImage as D}from"../lib/site-runtime.js";import{useEffect as U,useState as R}from"react";import{stripMarkup as F}from"../../format/lib/markup.js";import P from"./EditorialSectionHead.js";import G from"./SectionEyebrow.js";import{scrollBehavior as T}from"./useReducedMotion.js";import{renderGold as z,renderHeadline as V}from"./goldPhrases.js";import{CONTACT_LOCATIONS_CARDS_PLACEHOLDER as q,CONTACT_LOCATIONS_DEFAULTS as h,parseLocationTileShape as J,splitLegacyRegion as W}from"../../format/lib/content/contact.js";import{galleryCardRatioClass as K}from"../../format/lib/content/gallery-card-layout.js";import{jumpHighlightCss as Q}from"../../format/lib/content/box-link.js";import{hasMapCoords as A}from"../../format/lib/map-styles.js";import{useRootIsDark as X}from"efficient-shell/theme";import{bucketByGroup as Y,groupColsClass as _}from"../../format/lib/locations-grid.js";import{LocationGroupHeader as Z}from"./LocationGroupHeader.js";import ee,{DirectionsLink as te,directionsHref as ne}from"./LocationMap.js";import{phoneHref as re}from"../../format/lib/links/phone-href.js";import{scrim as ie}from"../../format/lib/content/scrim.js";const oe=Q({box:".contact-loc",lit:['.contact-loc[data-active="true"]'],first:i=>[`${i} > div:first-child`]});function M({value:i}){if(typeof i=="string"){const n=i.split(`
|
|
2
|
-
`);return t(j,{children:n.map((l,o)=>r("span",{children:[l,o<n.length-1?t("br",{}):null]},o))})}return t(j,{children:i})}function ae(){return t("div",{className:"absolute inset-0 flex items-center justify-center",style:{background:"repeating-linear-gradient(45deg, rgba(201,164,97,.05) 0 1px, transparent 1px 14px), linear-gradient(135deg, var(--site-surface-2), var(--site-surface))"},children:r("svg",{width:"34",height:"34",viewBox:"0 0 24 24",fill:"none",stroke:"var(--fg-dim)",strokeWidth:1.4,"aria-hidden":"true",style:{opacity:.4},children:[t("rect",{x:"3",y:"4",width:"18",height:"16",rx:"1.5"}),t("circle",{cx:"8.5",cy:"9.5",r:"1.6"}),t("path",{d:"M21 16l-5-5-4 4-2-2-7 7"})]})})}function se({sectionNumber:i=h.sectionNumber,heading:n=h.heading,tagline:l=h.tagline,galleryKicker:o=h.galleryKicker,galleryHint:d=h.galleryHint,locations:m=q,mapTheme:f="auto",imageShape:y,editing:c,nodeId:u}){const g=!X({whenUnset:!0}),[x,
|
|
2
|
+
`);return t(j,{children:n.map((l,o)=>r("span",{children:[l,o<n.length-1?t("br",{}):null]},o))})}return t(j,{children:i})}function ae(){return t("div",{className:"absolute inset-0 flex items-center justify-center",style:{background:"repeating-linear-gradient(45deg, rgba(201,164,97,.05) 0 1px, transparent 1px 14px), linear-gradient(135deg, var(--site-surface-2), var(--site-surface))"},children:r("svg",{width:"34",height:"34",viewBox:"0 0 24 24",fill:"none",stroke:"var(--fg-dim)",strokeWidth:1.4,"aria-hidden":"true",style:{opacity:.4},children:[t("rect",{x:"3",y:"4",width:"18",height:"16",rx:"1.5"}),t("circle",{cx:"8.5",cy:"9.5",r:"1.6"}),t("path",{d:"M21 16l-5-5-4 4-2-2-7 7"})]})})}function se({sectionNumber:i=h.sectionNumber,heading:n=h.heading,tagline:l=h.tagline,galleryKicker:o=h.galleryKicker,galleryHint:d=h.galleryHint,locations:m=q,mapTheme:f="auto",imageShape:y,editing:c,nodeId:u}){const g=!X({whenUnset:!0}),[x,k]=R(null),a=e=>`loc-${e}`,b=e=>{k(e),typeof document<"u"&&document.getElementById(e)?.scrollIntoView({behavior:T(),block:"start"}),!c&&typeof window<"u"&&window.history?.replaceState&&window.history.replaceState(null,"",`#${e}`)};U(()=>{if(typeof window>"u")return;const e=window.location.hash.replace(/^#/,"");!e||!document.getElementById(e)||(k(e),requestAnimationFrame(()=>{document.getElementById(e)?.scrollIntoView({behavior:T(),block:"start"})}))},[]);const O=K(J(y)),N=(e,p)=>c&&u?`${e}:${p}`:void 0,$=m.length>0&&(c||m.some(e=>String(e?.photo??"").trim())),E=m.some(e=>A(Number(e?.lat),Number(e?.lng))),C=Y(m,e=>String(e.group??""),e=>String(e.groupName??""));return t("section",{id:"studios",className:"scroll-mt-24 border-b border-line py-[100px] max-view-desktop:py-[60px]",style:g?void 0:{background:"var(--section-bg)"},children:r("div",{className:H,children:[t("style",{dangerouslySetInnerHTML:{__html:oe}}),(i||n||l)&&t(P,{num:i,title:n?V(n,!0):void 0,desc:l?z(l):void 0,spaceBelow:"mb-10"}),$&&r("div",{className:"mb-12",children:[(o||d)&&r("div",{className:"mb-5 flex items-baseline justify-between gap-6 border-b border-line pb-4",children:[o&&t(G,{text:o,size:12}),d&&t("span",{className:"font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.22em] text-fg-dim",children:z(d)})]}),t("div",{className:"flex flex-col gap-6",children:C.map((e,p)=>{const v=e.items.length===1;return r("div",{children:[e.key&&t("div",{className:"mb-2.5 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.3em] text-accent",children:e.key}),t("div",{className:["grid gap-[2px] border border-line bg-line",_(e.items.length),e.items.length>1?"max-[700px]:grid-cols-2":""].join(" "),children:e.items.map(({item:s,index:w})=>{const S=String(s?.name??""),L=String(s?.photo??""),I=a(w);return r("a",{href:`#${I}`,"aria-label":`Jump to ${S||"location"} map`,onClick:B=>{B.preventDefault(),b(I)},"data-loc-pick":N(w,"image"),className:["group relative block",O,"overflow-hidden bg-bg outline-none focus-visible:ring-2 focus-visible:ring-accent",v?"max-h-[440px]":""].join(" "),children:[L?t(D,{src:L,alt:F(S||"Location"),fill:!0,sizes:v?"100vw":"(max-width: 700px) 50vw, 33vw",className:"object-cover grayscale transition-[filter] duration-500 group-hover:grayscale-0"}):t(ae,{}),t("div",{className:"pointer-events-none absolute inset-0",style:{background:`linear-gradient(180deg, transparent 50%, ${ie(.85)} 100%)`}}),t("figcaption",{className:"absolute inset-x-0 bottom-0 z-[1] flex items-center justify-start gap-2 px-3 py-3 font-mono text-[length:var(--size-label,11px)] uppercase tracking-[0.22em] text-overlay-fg/85",children:t("span",{children:S})})]},w)})})]},e.key?`g:${e.key}`:`ungrouped:${p}`)})})]}),C.map((e,p)=>r("div",{className:p===0?"":"mt-10",children:[e.key&&t(Z,{groupKey:e.key,name:e.name,count:e.items.length}),t("div",{className:["grid gap-[2px] border border-line bg-line",_(e.items.length),e.items.length>1?"max-view-desktop:grid-cols-1":""].join(" "),children:e.items.map(({item:v,index:s})=>t(le,{id:a(s),card:v,active:x===a(s),mapTheme:f,mapPick:N(s,"map"),cityPick:N(s,"city"),editing:c},s))})]},e.key?`g:${e.key}`:`ungrouped:${p}`)),E&&r("p",{className:"mt-8 text-right font-mono text-[10px] uppercase tracking-[0.25em] text-fg-dim/50",children:["Location coordinates ©"," ",t("a",{href:"https://www.openstreetmap.org/copyright",target:"_blank",rel:"noopener noreferrer",className:"hover:text-accent",children:"OpenStreetMap contributors"})]})]})})}function le({id:i,card:n,active:l,mapTheme:o,mapPick:d,cityPick:m,editing:f}){const y=re(n.phone),c=W(n.region),u=String(n.state??"").trim()||c.state,g=String(n.country??"").trim()||c.country,x=[u,g].filter(Boolean).join(" · "),a=A(Number(n.lat),Number(n.lng))||!!f,b=ne(String(n.mapsUrl??""),String(n.name??""),u,g);return r("article",{id:i,"data-active":l?"true":void 0,"data-loc-pick":m,className:a?"contact-loc grid min-h-[840px] scroll-mt-[120px] grid-rows-[auto_1fr] bg-bg max-view-desktop:min-h-0":"contact-loc grid scroll-mt-[120px] bg-bg",children:[r("div",{className:a?"flex min-h-[280px] flex-col gap-3 border-b border-line px-7 py-7":"flex flex-col gap-3 px-7 py-7",children:[r("div",{className:"flex items-start justify-between gap-3.5",children:[r("div",{children:[n.name&&t("div",{className:"font-heading3 text-[length:var(--size-headingSmall,30px)] font-medium uppercase leading-none tracking-[-0.02em]",children:n.name}),x&&t("div",{className:"mt-1.5 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.24em] text-accent",children:x})]}),n.timezone&&t("span",{className:"whitespace-nowrap border border-line px-2.5 py-1.5 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.22em] text-fg-dim",children:n.timezone})]}),n.address!=null&&n.address!==""&&t("div",{className:"mt-1.5 font-display text-[length:var(--size-body,14px)] leading-[1.5] text-fg-dim",children:t(M,{value:n.address})}),n.phone&&t("div",{children:t("a",{href:y,className:"font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.18em] text-fg hover:text-accent",children:n.phone})}),n.hours!=null&&n.hours!==""&&t("div",{className:"font-mono text-[length:var(--size-label,12px)] uppercase leading-[1.7] tracking-[0.18em] text-fg-dim",children:t(M,{value:n.hours})}),!a&&b&&t("div",{children:t(te,{href:b})})]}),a&&t(ee,{name:String(n.name??""),state:u,country:g,lat:Number(n.lat),lng:Number(n.lng),mapsUrl:String(n.mapsUrl??""),mapTheme:o,pick:d,editing:f})]})}export{se as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as
|
|
1
|
+
"use client";import{jsx as t,jsxs as s}from"react/jsx-runtime";import{useEffect as F,useMemo as w,useRef as K,useState as p}from"react";import{dealerDistanceLabel as V,dealerPins as W,parseDealerListPosition as O,useDealerSource as Q}from"../lib/dealer-source.js";import{groupColsClass as Y}from"../../format/lib/locations-grid.js";import{say as G}from"../../format/lib/editor-words.js";import J from"./SiteMap.js";const D={near:null,dealers:[]},U="max-h-[480px] overflow-y-auto overscroll-contain",X=5,Z="h-[480px] max-view-wide:h-[320px]";function H({mapLabel:n,mapTheme:m,search:x,searchHint:r,noMatchText:f,listPosition:u,showDistance:L,editing:z}){const i=Q(),[a,h]=p(D),[y,M]=p(""),[E,N]=p(!1),[S,g]=p(null),[I,B]=p(null),b=K(null);F(()=>{if(!i)return;let e=!0;return i({}).then(l=>e&&h(l)).catch(()=>e&&h(D)),()=>{e=!1}},[i]);const o=w(()=>W(a.dealers),[a.dealers]),T=w(()=>new Set(o.map(e=>e.key)),[o]),A=w(()=>a.near==="found"?o.slice(0,X).map(e=>e.key):null,[a.near,o]),P=e=>{g(e),T.has(e)&&B(l=>({key:e,n:(l?.n??0)+1}))},R=e=>{g(e),b.current?.querySelector(`[data-dealer="${CSS.escape(e)}"]`)?.scrollIntoView({block:"nearest"})};if(!i)return z?t("p",{"data-dealers-unavailable":!0,className:"font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.24em] text-fg-dim",children:G("Dealers are not available on this website")}):null;const $=e=>{e.preventDefault();const l=y.trim();N(!0),g(null),i(l?{near:l}:{}).then(h).catch(()=>h(q=>({...q,near:"try_again"}))).finally(()=>N(!1))},c=O(u),k=c!=="below",v=a.near==="not_found"||a.near==="try_again",j=x?s("form",{role:"search",onSubmit:$,className:"mb-4 flex gap-2",children:[t("input",{type:"search",value:y,onChange:e=>M(e.target.value),placeholder:r,"aria-label":r,"aria-invalid":v||void 0,className:["min-w-0 flex-1 border bg-bg px-3 py-2 text-[length:var(--size-body,14px)] text-fg outline-none",v?"border-accent":"border-line focus:border-fg"].join(" ")}),t("button",{type:"submit","aria-label":r,disabled:E,className:"grid w-10 shrink-0 place-items-center bg-fg text-bg disabled:opacity-50",children:s("svg",{"aria-hidden":!0,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[t("circle",{cx:"11",cy:"11",r:"7"}),t("path",{d:"M20 20l-3.5-3.5"})]})})]}):null,_=v&&f?t("p",{role:"status",className:"mb-3 text-[length:var(--size-body,14px)] text-fg-dim",children:f}):null,d=a.dealers.map(e=>t(ee,{dealer:e,active:S===e.id,onSelect:()=>P(e.id),distance:L?V(e.distanceKm):"",tile:!k},e.id)),C=t(J,{pins:o,mapTheme:m,selectedKey:S,focus:I,onSelect:R,ariaLabel:n,className:Z,groupCrowded:!0,fitTo:A});return k?s("div",{"data-dealer-finder":c,className:["grid items-start gap-6 max-view-wide:grid-cols-1",c==="left"?"grid-cols-[minmax(260px,360px)_1fr]":"grid-cols-[1fr_minmax(260px,360px)]"].join(" "),children:[s("div",{className:["min-w-0",c==="right"?"order-2":"","max-view-wide:order-2"].join(" "),children:[j,_,t("div",{ref:b,className:[U,"max-view-wide:max-h-none"].join(" "),children:d})]}),t("div",{className:["min-w-0",c==="right"?"order-1":"","max-view-wide:order-1"].join(" "),children:C})]}):s("div",{"data-dealer-finder":"below",children:[j,_,C,d.length>0&&t("div",{ref:b,className:["mt-12 grid gap-[2px] bg-bg",Y(d.length),d.length>2?"max-view-desktop:grid-cols-2 max-[700px]:grid-cols-1":"max-[700px]:grid-cols-1"].join(" "),children:d})]})}function ee({dealer:n,active:m,onSelect:x,distance:r,tile:f}){const u=[n.city,[n.state,n.postcode].filter(Boolean).join(" ")].filter(Boolean).join(" ");return s("div",{"data-dealer":n.id,className:["flex gap-3 bg-bg text-left outline outline-1 -outline-offset-1",f?"px-6 py-5":"border-b border-line px-1 py-4",m?"outline-accent":"outline-transparent hover:outline-line"].join(" "),children:[s("button",{type:"button",onClick:x,"aria-pressed":m,className:"min-w-0 flex-1 text-left",children:[t("span",{className:"block font-display text-[length:var(--size-body,16px)] font-medium leading-[1.25] text-fg",children:n.name}),n.address&&t("span",{className:"mt-1 block text-[length:var(--size-body,14px)] text-fg-dim",children:n.address}),u&&t("span",{className:"block text-[length:var(--size-body,14px)] text-fg-dim",children:u})]}),s("span",{className:"flex shrink-0 flex-col items-end gap-1 text-[length:var(--size-body,14px)]",children:[r&&t("span",{className:"text-fg-dim",children:r}),n.phone&&t("a",{href:`tel:${n.phone.replace(/[^\d+]/g,"")}`,className:"text-fg underline underline-offset-2",children:n.phone}),n.website&&t("a",{href:n.website,target:"_blank",rel:"noopener noreferrer",className:"text-fg underline underline-offset-2",children:n.website.replace(/^https?:\/\//,"").replace(/\/$/,"")})]})]})}export{H as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as b}from"react/jsx-runtime";import h from"./BlockFrame.js";import{sectionPadAttrs as y}from"../lib/content/section-padding.js";import{finiteNumber as a}from"../../format/lib/finite-number.js";import{DEFAULT_DIVIDER_STYLE as
|
|
1
|
+
import{jsx as b}from"react/jsx-runtime";import h from"./BlockFrame.js";import{sectionPadAttrs as y}from"../lib/content/section-padding.js";import{finiteNumber as a}from"../../format/lib/finite-number.js";import{DEFAULT_DIVIDER_STYLE as P,DIVIDER_SPACE_PX as p,STRIPE_BAND_HEIGHT_PX as N,parseDividerSpacing as _,parseDividerStyle as g,stripeBackground as I}from"../../format/lib/sections/divider-style.js";const D=1,E=100;function B(t,e,s){const o={};return!s&&typeof t=="number"&&t!==D&&(o.borderTopWidth=t),typeof e=="number"&&e<E&&(o.width=`${e}%`),Object.keys(o).length?o:void 0}const S={sm:"my-6",md:"my-12",lg:"my-20"},u=(...t)=>t.some(e=>a(e)!==void 0);function w(t,e,s){const o=s||u(e.top,e.topTablet,e.topPhone),n=s||u(e.bottom,e.bottomTablet,e.bottomPhone),m=u(e.left,e.right,e.leftTablet,e.rightTablet,e.leftPhone,e.rightPhone);if(!o&&!n&&!m)return null;const r=p[t],i=y({...e,top:o?a(e.top)??r:void 0,bottom:n?a(e.bottom)??r:void 0,topTablet:o?e.topTablet:void 0,bottomTablet:n?e.bottomTablet:void 0,topPhone:o?e.topPhone:void 0,bottomPhone:n?e.bottomPhone:void 0}),l={...i?.style};return o||(l.marginTop=r),n||(l.marginBottom=r),{className:i?.className??"",style:l}}function x({spacing:t,contained:e,style:s=P,thickness:o,lengthPct:n,hideOnMobile:m=!1,pad:r={}}){const i=g(s),l=_(t),c=I(i),d=B(o,n,!!c),f=w(l,r,i==="none"),T=[f?f.className:S[l],m?"max-view-wide:hidden":""].filter(Boolean).join(" ");return b(h,{contained:e,className:T,style:f?.style,children:i==="none"?null:c?b("hr",{className:"border-x-0 border-y border-line",style:{height:N,backgroundImage:c,...d}}):b("hr",{className:"border-0 border-t border-line",style:d})})}export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as
|
|
1
|
+
import{Fragment as q,jsx as e,jsxs as a}from"react/jsx-runtime";import{stripMarkup as E}from"../../format/lib/markup.js";import{renderGold as o,renderHeadline as A}from"./goldPhrases.js";import F from"./SectionHeader.js";import{SectionTextParts as T}from"../lib/document/editing-bridges.js";import{TEXT_REGION_ATTR as I,regionStyle as O,textRegionPartKey as R}from"../../format/lib/sections/text-regions.js";import{FAQ_REGIONS as S}from"../../format/lib/sections/faq-text-regions.js";import{SIZE_STEP_OF_ROLE as z}from"../../format/lib/fonts.js";import{say as l}from"../../format/lib/editor-words.js";import{SITE_COLUMN as j}from"../../format/lib/content/page-width.js";import{listNumber as L}from"../../format/lib/content/list-number.js";function g(t){return E(t).trim()}function p(t,r){return t?{[I]:r}:{}}function f(t,r){const i=t?.[R(r)]?.role;return O(i,S[r],z)}function M({editing:t,nodeId:r,children:i}){return!t||!r?e(q,{children:i}):e(T,{nodeId:r,sectionType:"FAQ",children:i})}const Q="relative z-[2] bg-bg py-[120px] max-view-wide:py-[70px]",k="relative z-[2] bg-bg pt-0 pb-[120px] max-view-wide:pt-0 max-view-wide:pb-[70px]";function P({num:t,title:r,link:i,items:y,defaultOpen:_=!0,editing:s=!1,omitHead:u=!1,nodeId:b,partStyles:m}){const c=(y??[]).filter(n=>(n.question??"").trim()!==""),v=s&&c.length===0;if(c.length===0&&!s)return null;const x=v?[{question:l("Add your first question"),answer:l("Write the answer here.")},{question:l("Add another question"),answer:l("Write the answer here.")}]:c,h=x.filter(n=>(n.answer??"").trim()!=="").map(n=>({"@type":"Question",name:g(n.question??""),acceptedAnswer:{"@type":"Answer",text:g(n.answer??"")}})),w=!s&&h.length>0?JSON.stringify({"@context":"https://schema.org","@type":"FAQPage",mainEntity:h}).replace(/</g,"\\u003c"):null,N=r?A(r,!0):void 0;return a("section",{className:u?k:Q,children:[e("style",{children:".faq-acc__ico{transition:transform .2s ease}details[open]>summary .faq-acc__ico{transform:rotate(45deg)}"}),w&&e("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:w}}),a("div",{className:j,children:[u?null:e(F,{num:t!==void 0?o(t):void 0,title:N,link:i?{text:o(i.text),href:i.href}:void 0,accent:!0}),e(M,{editing:s,nodeId:b,children:e("div",{children:x.map((n,d)=>a("details",{open:d===0&&_,className:"border-b border-line",children:[a("summary",{className:"flex cursor-pointer list-none items-center gap-6 py-7 [&::-webkit-details-marker]:hidden max-view-wide:gap-4 max-view-wide:py-5",children:[e("span",{className:"font-mono text-[length:var(--size-label,14px)] tracking-[0.2em] text-accent",...p(s,"number"),style:f(m,"number"),children:L(d)}),e("span",{className:"flex-1 font-display text-[length:var(--size-body,18px)] font-medium uppercase tracking-[0.02em] text-fg max-view-wide:text-[length:var(--size-body,15px)]",...p(s,"question"),style:f(m,"question"),children:o(n.question??"")}),e("span",{"aria-hidden":!0,className:"faq-acc__ico shrink-0 text-[length:var(--size-body,22px)] leading-none text-fg-dim",children:"+"})]}),n.answer&&e("div",{className:"pb-8 pl-11 pr-8 max-view-wide:pl-0 max-view-wide:pr-0",children:e("p",{className:"max-w-[760px] text-[length:var(--size-body,15px)] leading-[1.7] text-fg-dim",...p(s,"answer"),style:f(m,"answer"),children:o(n.answer)})})]},d))})})]})]})}export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{EDITORIAL_COLUMN as
|
|
1
|
+
import{jsx as e,jsxs as a}from"react/jsx-runtime";import{EDITORIAL_COLUMN as v}from"../../format/lib/content/page-width.js";import{Fragment as u}from"react";import{SiteLink as N}from"../lib/site-runtime.js";import{stripMarkup as k}from"../../format/lib/markup.js";import w from"./Placeholder.js";import{renderGold as r,renderHeadline as y,splitParagraphs as z}from"./goldPhrases.js";import{scrim as g}from"../../format/lib/content/scrim.js";const l={body:"text-[length:var(--size-body,20px)]",labelSmall:"text-[length:var(--size-label,12px)]",labelLarge:"text-[length:var(--size-label,13px)]"};function $({image:h,badge:i,imageDate:o,category:p,readLabel:c,date:m,title:t,dek:d,ctaText:x,ctaHref:b}){const f=[p?e("span",{className:"text-accent",children:r(p)}):null,c?e("span",{children:r(c)}):null,m?e("span",{children:r(m)}):null].filter(Boolean);return e("section",{className:"border-b border-line py-20 max-view-desktop:py-[60px]",children:e("div",{className:v,children:a("article",{className:"sf-card relative grid grid-cols-[1.3fr_1fr] border border-line bg-[var(--card-bg)] max-view-desktop:grid-cols-1",children:[a("div",{className:"relative aspect-[5/4] overflow-hidden border-r border-line bg-surface-2 max-view-desktop:border-r-0 max-view-desktop:border-b",children:[e(w,{label:"featured-cover",src:h||void 0,alt:k(t||"Cover"),sizes:"(max-width: 1100px) 100vw, 56vw"}),e("div",{className:"pointer-events-none absolute inset-0 z-[1]",style:{background:`linear-gradient(180deg, ${g(.45)} 0%, transparent 30%, transparent 70%, ${g(.55)} 100%)`}}),i&&e("span",{className:`absolute left-6 top-6 z-[2] bg-accent px-3 py-2 font-mono ${l.labelSmall} uppercase tracking-[0.3em] text-bg`,children:r(i)}),o&&e("span",{className:`absolute right-6 bottom-6 z-[2] font-mono ${l.labelSmall} uppercase tracking-[0.24em] text-overlay-fg`,children:r(o)})]}),a("div",{className:"flex flex-col justify-between gap-6 px-12 py-14 max-view-desktop:px-7 max-view-desktop:py-9",children:[f.length>0&&e("div",{className:`flex items-center gap-4 font-mono ${l.labelSmall} uppercase tracking-[0.28em] text-fg-dim`,children:f.map((s,n)=>a(u,{children:[n>0&&e("span",{className:"opacity-40",children:"·"}),s]},n))}),t&&e("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(34px,3.5vw,58px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-none tracking-[-0.03em]",children:y(t,!0)}),d&&z(d).map((s,n)=>e("p",{className:`max-w-[520px] font-serif ${l.body} italic leading-[1.5] text-fg-dim`,children:r(s,!0)},n)),x&&e("div",{children:a(N,{href:b||"#",className:`group inline-flex items-center gap-3.5 py-3.5 font-mono ${l.labelLarge} uppercase tracking-[0.3em] text-accent`,children:[r(x)," ",e("span",{className:"transition-transform group-hover:translate-x-[6px]",children:"→"})]})})]})]})})})}export{$ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as X,jsx as e,jsxs as Po}from"react/jsx-runtime";import{useId as fs}from"react";import{parseHexColor as ds}from"efficient-shell/format";import bs from"./BoxTabs.js";import{BoxTabPaneContext as
|
|
1
|
+
import{Fragment as X,jsx as e,jsxs as Po}from"react/jsx-runtime";import{useId as fs}from"react";import{parseHexColor as ds}from"efficient-shell/format";import bs from"./BoxTabs.js";import{BoxTabPaneContext as Ss,useIsTabPane as ps}from"./BoxTabPaneContext.js";import{CellFillContext as Cs,InBoxContext as xs,useCellOfStretchedRow as $s,useFillsCell as hs}from"./InBoxContext.js";import _s,{InsideSiteColumn as Lo,useSectionRoot as Ps}from"./SiteGutterFrame.js";import{BoxSurfaceProvider as Ls}from"./BoxSurfaceContext.js";import{BoxCellWidthContext as ys}from"./BoxCellWidthContext.js";import{useInSiteHeader as As}from"./PhoneMenuTools.js";import{FRAME_BASE as j,FRAME_GUTTER as M}from"./BlockFrame.js";import{containerGapProps as Bs}from"../../format/lib/content/container-gap.js";import{boxLayoutClasses as Ts,boxBlockSpacingClass as Rs,boxFitContentClass as gs,boxRowColumnsClass as Os,boxRowTabletColumnsClass as vs,boxPhoneRowClasses as C,boxPhoneRowFits as ws,boxShareClasses as z,boxWrapClass as Es}from"../../format/lib/content/box-layout.js";import{boxSeparatorClasses as Ns,boxSeparatorSeamClass as Fs,boxSeparatorStyle as ks,isStripBox as Ds}from"../../format/lib/content/box-separator.js";import{DEFAULT_LOOP_DELAY as Is,DEFAULT_LOOP_DIRECTION as Us,DEFAULT_LOOP_SECONDS as Ws,isVerticalLoop as Xs}from"../../format/lib/animation/index.js";import{LoopTrack as js}from"../lib/animation/LoopTrack.js";import{BOX_CARD_PAD as r,BOX_OWNS_SIDES_CLASS as Ms,boxDarkenStyle as zs,boxPlacementClasses as Gs,CARD_SHADOW_CLASS as Hs,isBackgroundBox as yo}from"../../format/lib/content/box-background.js";import{boxShadowAttrs as Js}from"../../format/lib/content/box-shadow.js";import{boxRunsEdgeToEdge as Ks}from"../../format/lib/content/site-gutter.js";import{boxShapeClass as Ys,boxShapeClasses as Vs}from"../../format/lib/content/box-shape.js";import{BOX_JUMP_ATTR as qs,BOX_LINK_ATTR as Ao,BOX_LINK_CLASS as Bo,BOX_LINKED_CLASS as Qs,boxJumpBlocksClass as Zs,boxJumpCss as oe,boxJumpSlug as se,boxLinkOf as ee}from"../../format/lib/content/box-link.js";import{SiteLink as te}from"../lib/site-runtime.js";import{sectionBorderStyle as ne}from"../../format/lib/content/borders.js";import{finiteNumber as a}from"../../format/lib/finite-number.js";import{sectionPadAttrs as le}from"../lib/content/section-padding.js";import{SECTION_FILL_CLASS as T}from"../../format/lib/content/section-min-height.js";import{ON_MEDIA_INK_STYLE as re}from"../../format/lib/content/ink.js";import{sizedBackground as G}from"../../format/lib/sized-image.js";import{BoxRail as ae,BoxRailStop as ce,RAIL_STOPS_CLASS as me,useTimelineRail as ie}from"./TimelineRail.js";const H={"--sf-site-gutter":"0px"},ue="bg-cover bg-center bg-[image:var(--sf-box-bg)] max-view-tablet:bg-[image:var(--sf-box-bg-p)]";function fe({children:s}){return e(X,{children:s(fs())})}function de({direction:s,label:To,tabShape:Ro,gap:go,gapPhone:Oo,gapTablet:vo,justify:R,align:d,wrap:wo,share:x,sharePhone:g,wrapPhone:Eo,phoneRow:$,columns:J,columnsTablet:No,separator:i,blockSpacing:Fo,bgImage:h,bgImagePhone:K,darken:ko,darkenStyle:Do,placement:Io,padV2:Uo=!1,border:Wo,borderPhone:Xo,pad:n={},contained:Y=!0,fillHeight:u=!1,shadow:jo,loop:_,scrollDirection:O=Us,loopSeconds:Mo=Ws,loopDelay:zo=Is,editing:V=!1,fillColor:q,line:v,upcoming:Go,link:Ho,boxShape:Q,boxShapePhone:Jo,jumpHighlight:Ko,anchor:Yo,boxId:Z,content:w}){const b=V?"":ee(Ho),c=u?"":Vs(Q,Jo),Vo=!u&&Ys(Q)!=="",f=se(Ko,Yo),oo=typeof q=="string"?ds(q.trim()):null,so=oo?{backgroundColor:oo}:void 0,eo=ie(),E=v===!0&&s!=="tabs",t=yo(h),P=As(),qo=Ps(),to=ps(),N=hs(),Qo=$s(),L=Ds(s,i),m=_==="scroll"&&s!=="tabs",y=Os({direction:s,separator:i,loop:_,line:v,columns:J}),F=vs({direction:s,separator:i,loop:_,line:v,columnsTablet:No}),no=[z(x),s==="row"?gs(x):"",y,F,Rs(Fo),Ns(s,i)].filter(Boolean).join(" "),Zo=no?` ${no}`:"",lo=["flex",s==="row"?L||m?"flex-row":`flex-row ${C($,g,Eo)}`:"flex-col",Es(m?!1:wo),t?Gs(Io??"center",s):Ts(m?void 0:R,d)].join(" ")+Zo,S=u||t||c||N?` ${T}`:"",k=Vo?` ${c}`:c?`${S} ${c}`:S,ro=Qo&&s==="column"&&!t&&!m&&z(x)===""&&typeof R=="string"&&R!=="start",ao=S||(ro?` ${T}`:""),D=b?` ${Qs}`:"",I=t||P||Uo?"":" py-6",os=`${j}${I} ${M}${k}${D}`,ss=P?`${k}${D}`.trim():`w-full${I}${k}${D}`,p=Bs("Flex",go,s==="row"?"inline":"block",Oo,L||m?void 0:vo),es=L?{...p.style,...ks(s,i)}:p.style,co=(o="")=>e(w,{className:`${lo}${p.className}${ao}${o?` ${o}`:""}${E?` ${me}`:""}${f?` ${Zs(f)}`:""}`,style:es,minEmptyHeight:120}),mo=Xs(O)?"":Fs(s,i),io=m?e(js,{direction:O,seconds:Mo,delay:zo,editing:V,copy:o=>co(o&&mo?`${o} ${mo}`:o)}):co(),uo=s==="tabs"?e(bs,{className:`${lo}${p.className}${N&&!u&&!t&&!c?"":S}`,style:p.style,shape:Ro,children:io}):io,ts=to?e(Ss.Provider,{value:!1,children:uo}):uo,ns={stretchedRow:s==="row"&&!t&&(d===void 0||d==="stretch"),fillingColumn:s==="column"&&(N||ro),columnsRow:y!==""||F!=="",...Z?{id:Z}:null},fo=e(xs.Provider,{value:ns,children:e(Cs.Provider,{value:!1,children:ts})}),U=E?e(ae,{row:s==="row",stops:w.blockCount??0,children:fo}):fo,ls=To?.trim()||(to?"":void 0),rs={values:n,frame:I?24:0},as=o=>eo?e(ce,{on:eo,future:Go===!0,children:o}):o,cs=o=>b.startsWith("/")?e(te,{href:b,className:Bo,"aria-labelledby":o,[Ao]:""}):e("a",{href:b,className:Bo,"aria-labelledby":o,[Ao]:""}),bo=f?e("style",{dangerouslySetInnerHTML:{__html:oe(f)}}):null,ms=o=>({...t?null:Js(jo),...f?{[qs]:f}:null,...o?{id:o}:null}),So=y!==""?Number(J):0,is=C($,g)===C(void 0),us=(s==="column"||s==="row"&&!L&&!m&&(So===1&&is||So===0&&w.blockCount===1))&&!t&&!E&&!P,A=Ks({loop:_,direction:s,scrollDirection:O,bgImage:h}),po=t&&qo&&!P,Co=(o,l)=>as(e(_s,{contained:Y&&!A,style:A?H:void 0,framedClass:os,fillClass:ss,columnClass:`${j} ${M}${ao}`,tabLabel:ls,pad:t?void 0:rs,border:ne(Wo,Xo),outerAttrs:ms(l),box:!0,edge:us,outerStyle:t?void 0:so,bleed:po,children:bo||l?Po(X,{children:[bo,l?cs(l):null,A?e(Lo,{children:o}):o]}):A?e(Lo,{children:o}):o})),xo=o=>b?e(fe,{children:l=>Co(o,l)}):Co(o);if(!t){const o=d===void 0||d==="stretch",l=(z(x)!==""||y!==""||F!=="")&&!ws($,g)&&(o||C($)!==C(void 0));return xo((s==="row"?l:s==="column"&&o)?e(ys.Provider,{value:!0,children:U}):U)}const B=zs(ko,Do),$o=yo(K),W=le({...n,top:a(n.top)??r.desktop,bottom:a(n.bottom)??r.desktop,topPhone:a(n.topPhone)??r.phone,bottomPhone:a(n.bottomPhone)??r.phone,left:a(n.left)??r.side,right:a(n.right)??r.side,leftPhone:a(n.leftPhone)??r.sidePhone,rightPhone:a(n.rightPhone)??r.sidePhone}),ho=e("div",{className:`relative z-[1] ${Ms} ${W?.className??""}${u||c?` ${T}`:""}`.trimEnd(),style:B?{...W?.style,...H,...re}:{...W?.style,...H},children:U}),_o=po&&Y?e("div",{className:`${j} ${M}${u||c?` ${T}`:""}`,children:ho}):ho;return xo(e(X,{children:Po("div",{className:`relative isolate overflow-hidden ${Hs}${S}${$o?` ${ue}`:""}`,style:{...so,...$o?{"--sf-box-bg":G(h??""),"--sf-box-bg-p":G(K??"")}:{backgroundImage:G(h??""),backgroundSize:"cover",backgroundPosition:"center"}},children:[B&&e("div",{className:"absolute inset-0 z-0",style:B,"aria-hidden":!0}),B?e(Ls,{children:_o}):_o]})}))}export{de as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useEffect as L,useMemo as F,useState as M}from"react";import{footprintPins as A}from"../../format/lib/content/footprint.js";import{bucketByGroup as B,groupColsClass as G}from"../../format/lib/locations-grid.js";import K from"./EditorialSectionHead.js";import{LocationGroupHeader as P}from"./LocationGroupHeader.js";import{renderGold as q,renderHeadline as D}from"./goldPhrases.js";import Q from"./PartStyledText.js";import{say as j}from"../../format/lib/editor-words.js";import{parseFootprintSource as I}from"../lib/dealer-source.js";import O from"./DealerFinder.js";import W from"./SiteMap.js";const n={bodySmall:"text-[length:var(--size-body,10px)]",bodyLarge:"text-[length:var(--size-body,18px)]",labelSmall:"text-[length:var(--size-label,11px)]",labelLarge:"text-[length:var(--size-label,12px)]"};function X({sectionNumber:c="",heading:i="",tagline:f="",offices:a=[],mapTheme:x="auto",padTop:
|
|
1
|
+
"use client";import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useEffect as L,useMemo as F,useState as M}from"react";import{footprintPins as A}from"../../format/lib/content/footprint.js";import{bucketByGroup as B,groupColsClass as G}from"../../format/lib/locations-grid.js";import K from"./EditorialSectionHead.js";import{LocationGroupHeader as P}from"./LocationGroupHeader.js";import{renderGold as q,renderHeadline as D}from"./goldPhrases.js";import Q from"./PartStyledText.js";import{say as j}from"../../format/lib/editor-words.js";import{parseFootprintSource as I}from"../lib/dealer-source.js";import O from"./DealerFinder.js";import W from"./SiteMap.js";const n={bodySmall:"text-[length:var(--size-body,10px)]",bodyLarge:"text-[length:var(--size-body,18px)]",labelSmall:"text-[length:var(--size-label,11px)]",labelLarge:"text-[length:var(--size-label,12px)]"};function X({sectionNumber:c="",heading:i="",tagline:f="",offices:a=[],mapTheme:x="auto",padTop:g,padBottom:d,editing:p,omitHead:v=!1,source:s,search:u=!1,searchHint:r="",noMatchText:k="",listPosition:m="below",showDistance:C=!0}){const h=I(s)==="dealers",H=typeof g=="number"?g:120,T=typeof d=="number"?d:120,[w,N]=M(null),_=a.length===0&&!h&&!c&&!i&&!f;if(L(()=>{N(t=>t!==null&&t>=a.length?null:t)},[a]),_&&!p)return null;const z=B(a,t=>String(t.group??""),()=>"");return e("section",{className:"relative z-[2] bg-bg",children:o("div",{className:"mx-auto max-w-[var(--sf-site-width,1600px)] border-b border-line px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))] max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]",style:{paddingTop:H,paddingBottom:T},children:[!v&&(c||i||f)&&e(K,{num:c,title:i?D(i):void 0,desc:f||void 0,spaceBelow:"mb-12"}),h?e(O,{mapLabel:i.replace(/[=*]/g,"").replace(/\s+/g," ").trim(),mapTheme:x,search:u,searchHint:r,noMatchText:k,listPosition:m,showDistance:C,editing:p}):e(Z,{offices:a,mapLabel:i.replace(/[=*]/g,"").replace(/\s+/g," ").trim(),mapTheme:x,activeIndex:w,onSelect:N,editing:p}),!h&&a.length>0&&e("div",{className:"mt-12 flex flex-col gap-8",children:z.map((t,E)=>o("div",{children:[t.key&&e(P,{groupKey:t.key,count:t.items.length}),e("div",{className:["grid gap-[2px] bg-bg",G(t.items.length),t.items.length>2?"max-view-desktop:grid-cols-2 max-[700px]:grid-cols-1":t.items.length===2?"max-[700px]:grid-cols-1":""].join(" "),children:t.items.map(({item:l,index:y})=>{const S=w===y,b=l.href&&l.linkLabel?{href:l.href,label:l.linkLabel}:null,$=o("button",{type:"button",onClick:()=>N(y),"aria-pressed":S,className:["flex flex-col gap-1.5 bg-bg px-6 py-5 text-left transition-colors outline outline-1 -outline-offset-1",S?"outline-accent":"outline-transparent hover:outline-line",b?"w-full pb-11":""].filter(Boolean).join(" "),children:[o("span",{className:`flex items-center gap-2.5 font-mono ${n.labelSmall} uppercase tracking-[0.28em]`,children:[l.hq&&e("span",{className:`border border-accent bg-accent px-1.5 py-0.5 ${n.bodySmall} text-bg`,children:"HQ"}),l.role&&e("span",{className:"text-accent",children:l.role})]}),l.city&&e("span",{className:`font-display ${n.bodyLarge} font-medium leading-[1.2] tracking-[-0.01em] text-fg`,children:e(Q,{value:l.city,children:l.city})}),l.country&&e("span",{className:`font-mono ${n.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:l.country}),l.address&&e("span",{className:`font-mono ${n.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:q(l.address)})]},b?void 0:y);return b?o("div",{className:"relative flex",children:[$,e("a",{href:b.href,className:`absolute bottom-5 left-6 font-mono ${n.labelSmall} uppercase tracking-[0.24em] text-accent hover:underline`,children:`→ ${b.label}`})]},y):$})})]},t.key?`g:${t.key}`:`ungrouped:${E}`))}),!h&&a.length===0&&p&&e("p",{className:`mt-8 font-mono ${n.labelLarge} uppercase tracking-[0.24em] text-fg-dim`,children:j("Add an office in the inspector")})]})})}function Z({offices:c,mapLabel:i,mapTheme:f,activeIndex:a,onSelect:x,editing:g}){const d=F(()=>A(c),[c]),[p,v]=M(null),s=a===null?null:String(a),u=s!==null&&d.some(m=>m.key===s);if(L(()=>{s!==null&&u&&v(m=>({key:s,n:(m?.n??0)+1}))},[s,u]),d.length===0)return g?e("div",{className:"relative flex aspect-[16/9] w-full items-center justify-center overflow-hidden border border-line bg-bg px-6 text-center max-view-tablet:aspect-[4/5]",children:e("span",{className:`font-mono ${n.labelLarge} uppercase tracking-[0.24em] text-fg-dim`,children:j("Add office coordinates to plot the map")})}):null;const r=u&&a!==null?c[a]:null,k=r?o("div",{className:"flex items-start gap-3 border border-line bg-bg px-3.5 py-2.5 text-fg shadow-[0_8px_24px_rgba(0,0,0,.4)]",children:[o("div",{className:"min-w-0 flex-1",children:[o("div",{className:`flex items-center gap-2 font-mono ${n.labelSmall} uppercase tracking-[0.28em]`,children:[r.hq&&e("span",{className:`bg-accent px-1.5 py-px ${n.bodySmall} text-bg`,children:"HQ"}),r.role&&e("span",{className:"text-accent",children:r.role})]}),r.city&&e("div",{className:`mt-1.5 font-display ${n.bodyLarge} font-medium leading-[1.2] text-fg`,children:r.city}),r.country&&e("div",{className:`mt-1 font-mono ${n.labelSmall} uppercase tracking-[0.2em] text-fg-dim`,children:r.country})]}),e("button",{type:"button",onClick:()=>x(null),"aria-label":"Close",className:"-mr-1 grid h-6 w-6 shrink-0 place-items-center text-fg-dim hover:text-fg",children:e("svg",{"aria-hidden":!0,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:e("path",{d:"M2 2l8 8M10 2l-8 8"})})})]}):null;return e(W,{pins:d,mapTheme:f,ariaLabel:i||"Offices",className:"sf-card relative aspect-[16/9] w-full overflow-hidden border border-line max-view-tablet:aspect-[4/5]",selectedKey:u?s:null,focus:p,onSelect:m=>x(Number(m)),card:k})}export{X as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as l}from"react/jsx-runtime";import{resolveTypeSize as r}from"../../format/lib/content/section-type-size.js";import
|
|
1
|
+
import{jsx as l}from"react/jsx-runtime";import{resolveTypeSize as r}from"../../format/lib/content/section-type-size.js";import m from"./BlockFrame.js";import{renderHeadline as o}from"./goldPhrases.js";const g={1:{size:"clamp(48px,7vw,96px)",role:"heading",step:"headingLarge",leading:"leading-[0.95]"},2:{size:"64px",sizeMobile:"36px",role:"heading",step:"headingMedium",rank:2,leading:"leading-none"},3:{size:"40px",sizeMobile:"28px",role:"heading",step:"headingSmall",rank:3,leading:"leading-[1.05]"},4:{size:"28px",role:"heading",step:"headingSmall",rank:3,leading:"leading-[1.1]"},5:{size:"22px",role:"body",step:"body",leading:"leading-[1.2]"},6:{size:"18px",role:"body",step:"body",leading:"leading-[1.3]"}};function w(a,n=1440){const e=g[a].size,i=/^clamp\((\d+(?:\.\d+)?)px,(\d+(?:\.\d+)?)vw,(\d+(?:\.\d+)?)px\)$/.exec(e);return i?Math.min(Number(i[3]),Math.max(Number(i[1]),Number(i[2])*n/100)):Number.parseFloat(e)}const p="font-display font-medium leading-[0.92] tracking-[-0.04em] text-[length:min(var(--size-headingLarge,clamp(64px,9vw,144px)),var(--sf-heading-max,9999px))] max-view-wide:text-[length:min(var(--size-headingMedium,clamp(48px,12vw,76px)),var(--sf-heading-max,9999px))] max-view-wide:leading-[0.95]";function f(a,n="font-display"){const e=g[a],i=r(void 0,e.size,e.role,e.step),s=e.sizeMobile?r(void 0,e.sizeMobile,e.role,e.step):void 0,d={"--heading-size":i,...s?{"--heading-size-m":s}:{}},t=e.rank===2?"[font-weight:var(--sf-heading-2-weight,var(--sf-heading-weight,500))]":e.rank===3?"[font-weight:var(--sf-heading-3-weight,var(--sf-heading-weight,500))]":"[font-weight:var(--sf-heading-weight,500)]",h=["text-[length:var(--heading-size)]",e.leading,s?"max-view-wide:text-[length:var(--heading-size-m)]":""].filter(Boolean).join(" ");return{className:`${n} ${t} tracking-[-0.03em] text-fg ${h} text-left`,style:d}}function x({level:a,text:n,contained:e,hero:i=!1,pad:s}){if(i)return l("h1",{className:p,children:o(n,!1)});const d=`h${a}`,t=f(a);return l(m,{contained:e,className:"py-6",pad:s?{values:s,frame:24}:void 0,children:l(d,{className:t.className,style:t.style,children:o(n,!1)})})}export{x as default,w as headingDefaultPx,f as headingLook};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type HeroMediaPart } from "../lib/document/hero-media-parts.js";
|
|
3
|
+
import { entranceDrawn } from "../lib/animation/entrance.js";
|
|
4
|
+
import { type MediaLayout } from "../../format/lib/hero-media-layout.js";
|
|
5
|
+
export declare function heroMediaReading(p: {
|
|
6
|
+
isVideo: boolean;
|
|
7
|
+
videoSource?: unknown;
|
|
8
|
+
videoPlayback?: unknown;
|
|
9
|
+
youtubeUrl?: unknown;
|
|
10
|
+
mediaLayout?: unknown;
|
|
11
|
+
mediaLayoutPhone?: unknown;
|
|
12
|
+
}): {
|
|
13
|
+
fromYouTube: boolean;
|
|
14
|
+
onClick: boolean;
|
|
15
|
+
youTubeId: string | null;
|
|
16
|
+
backgroundFile: boolean;
|
|
17
|
+
desktopLayout: "side" | "one" | "stacked";
|
|
18
|
+
phoneLayout: "side" | "one" | "stacked";
|
|
19
|
+
twoPictures: boolean;
|
|
20
|
+
};
|
|
21
|
+
export declare function heroPartEntrance(partMotion: Record<string, unknown> | undefined, part: HeroMediaPart): {
|
|
22
|
+
desktop: import("efficient-shell/ui").EntranceValue;
|
|
23
|
+
phone: import("efficient-shell/ui").EntranceValue;
|
|
24
|
+
} | null;
|
|
25
|
+
export declare function HeroTint({ color, opacity, passClicks }: {
|
|
26
|
+
color: string;
|
|
27
|
+
opacity: number;
|
|
28
|
+
passClicks?: boolean;
|
|
29
|
+
}): import("react").JSX.Element | null;
|
|
30
|
+
export declare function HeroPickArea({ part, editing, marked, entrance, className, children, }: {
|
|
31
|
+
part: HeroMediaPart;
|
|
32
|
+
editing: boolean;
|
|
33
|
+
marked?: boolean;
|
|
34
|
+
entrance: ReturnType<typeof entranceDrawn>;
|
|
35
|
+
className: string;
|
|
36
|
+
children: ReactNode;
|
|
37
|
+
}): import("react").JSX.Element;
|
|
38
|
+
export declare function HeroMediaLayer({ partMotion, editing, children, }: {
|
|
39
|
+
partMotion: Record<string, unknown> | undefined;
|
|
40
|
+
editing: boolean;
|
|
41
|
+
children: ReactNode;
|
|
42
|
+
}): import("react").JSX.Element;
|
|
43
|
+
export declare function HeroTwoPictures({ desktopLayout, phoneLayout, editing, marked, partMotion, first, second, }: {
|
|
44
|
+
desktopLayout: MediaLayout;
|
|
45
|
+
phoneLayout: MediaLayout;
|
|
46
|
+
editing: boolean;
|
|
47
|
+
marked?: boolean;
|
|
48
|
+
partMotion: Record<string, unknown> | undefined;
|
|
49
|
+
first: {
|
|
50
|
+
src?: string;
|
|
51
|
+
objectPosition?: string;
|
|
52
|
+
objectPositionPhone?: string;
|
|
53
|
+
tintColor: string;
|
|
54
|
+
tintOpacity: number;
|
|
55
|
+
};
|
|
56
|
+
second: {
|
|
57
|
+
src?: string;
|
|
58
|
+
objectPosition?: string;
|
|
59
|
+
objectPositionPhone?: string;
|
|
60
|
+
tintColor: string;
|
|
61
|
+
tintOpacity: number;
|
|
62
|
+
};
|
|
63
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{jsx as r,Fragment as h,jsxs as d}from"react/jsx-runtime";import l from"./HeroPoster.js";import{SectionAnimation as m}from"./SectionAnimation.js";import{resolveMedia as u}from"../lib/media.js";import{HERO_PART_ATTR as x}from"../lib/document/hero-media-parts.js";import{entranceDrawn as P}from"../lib/animation/entrance.js";import{readPartMotion as g}from"../lib/animation/part-motion.js";import{heroPictureCount as f,normaliseMediaLayout as w,resolvePhoneLayout as v}from"../../format/lib/hero-media-layout.js";import{normaliseVideoPlayback as y,normaliseVideoSource as k,parseYouTubeId as j}from"../../format/lib/hero-video.js";import{hidableText as T}from"efficient-easel/draw";const V={one:"max-[719px]:grid-cols-1 max-[719px]:grid-rows-1",side:"max-[719px]:grid-cols-2 max-[719px]:grid-rows-1",stacked:"max-[719px]:grid-cols-1 max-[719px]:grid-rows-2"},_={one:"view-tablet:grid-cols-1 view-tablet:grid-rows-1",side:"view-tablet:grid-cols-2 view-tablet:grid-rows-1",stacked:"view-tablet:grid-cols-1 view-tablet:grid-rows-2"};function E(e){const o=e.isVideo&&k(e.videoSource)==="youtube",t=e.isVideo&&y(e.videoPlayback)==="click",i=o?j(T(e.youtubeUrl)):null,n=w(e.mediaLayout);return{fromYouTube:o,onClick:t,youTubeId:i,backgroundFile:e.isVideo&&!o&&!t,desktopLayout:n,phoneLayout:v(e.mediaLayoutPhone,n),twoPictures:!e.isVideo&&f(e)>1}}function c(e,o){return P(g({_partMotion:e},o))}function b({color:e,opacity:o,passClicks:t=!0}){return o>0?r("div",{className:t?"pointer-events-none absolute inset-0 z-[2]":"absolute inset-0 z-[2]",style:{background:e,opacity:Math.min(Math.max(o,0),100)/100}}):null}function p({part:e,editing:o,marked:t=!0,entrance:i,className:n,children:a}){const s=o&&t?{[x]:e}:void 0;return i?r(m,{desktop:i.desktop,phone:i.phone,editing:o,boxClass:n,boxAttrs:s,children:a}):r("div",{className:n,...s,children:a})}function I({partMotion:e,editing:o,children:t}){const i=c(e,"media");return i?r(m,{desktop:i.desktop,phone:i.phone,editing:o,boxClass:"absolute inset-0 z-[1]",children:t}):r(h,{children:t})}function $({desktopLayout:e,phoneLayout:o,editing:t,marked:i=!0,partMotion:n,first:a,second:s}){return d("div",{className:`absolute inset-0 z-[1] grid ${V[o]} ${_[e]}`,"data-hero-layout":e,"data-hero-layout-phone":o,children:[d(p,{part:"image",editing:t,marked:i,entrance:c(n,"image"),className:"relative overflow-hidden",children:[r(l,{posterSrc:u(a.src),showVideo:!1,objectPosition:a.objectPosition,objectPositionPhone:a.objectPositionPhone}),r(b,{color:a.tintColor,opacity:a.tintOpacity})]}),d(p,{part:"image2",editing:t,marked:i,entrance:c(n,"image2"),className:`relative overflow-hidden${o==="one"?" max-[719px]:hidden":""}${e==="one"?" view-tablet:hidden":""}`,children:[r(l,{posterSrc:u(s.src),showVideo:!1,objectPosition:s.objectPosition,objectPositionPhone:s.objectPositionPhone}),r(b,{color:s.tintColor,opacity:s.tintOpacity})]})]})}export{I as HeroMediaLayer,p as HeroPickArea,b as HeroTint,$ as HeroTwoPictures,E as heroMediaReading,c as heroPartEntrance};
|
|
@@ -9,6 +9,7 @@ export { HERO_SLIDER_GOTO_EVENT, type HeroSliderGotoDetail };
|
|
|
9
9
|
export declare function subscribeSliderGoto(host: Element | null | undefined, handler: (event: Event) => void): (() => void) | undefined;
|
|
10
10
|
interface Props {
|
|
11
11
|
slides: SlotComponent;
|
|
12
|
+
strip?: SlotComponent;
|
|
12
13
|
alignment?: HeroCopyAlignment;
|
|
13
14
|
textureOpacity?: number;
|
|
14
15
|
showTexture?: boolean;
|
|
@@ -32,4 +33,4 @@ interface Props {
|
|
|
32
33
|
editing?: boolean;
|
|
33
34
|
partMotion?: Record<string, unknown>;
|
|
34
35
|
}
|
|
35
|
-
export default function HeroSection({ slides: Slides, alignment, textureOpacity, showTexture, textureColor, phoneUpDown, phoneSideways, autoplay, autoplayInterval, showTicker, tickerItems, heightDesktop, heightMobile, showPicker, pickerShape, pickerPlacement, showArrows, arrowsShape, arrowsPlacement, editing, partMotion, }: Props): import("react").JSX.Element;
|
|
36
|
+
export default function HeroSection({ slides: Slides, strip: Strip, alignment, textureOpacity, showTexture, textureColor, phoneUpDown, phoneSideways, autoplay, autoplayInterval, showTicker, tickerItems, heightDesktop, heightMobile, showPicker, pickerShape, pickerPlacement, showArrows, arrowsShape, arrowsPlacement, editing, partMotion, }: Props): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as n,jsxs as
|
|
1
|
+
"use client";import{jsx as n,jsxs as P}from"react/jsx-runtime";import{useCallback as v,useEffect as w,useId as Ae,useRef as d,useState as k}from"react";import{markOverlayPortal as te}from"../../format/lib/document/overlay-portal.js";import Ne from"./Ticker.js";import{HeroSlideStyleContext as Le}from"./HeroSlide.js";import Me from"./HeroArrows.js";import Ce from"./Reel.js";import{TICKER_PART_ATTR as Pe}from"./PreviewTickerContext.js";import{useReducedMotion as De}from"./useReducedMotion.js";import{hasSectionHeight as Ie,resolveSectionHeight as re}from"../../format/lib/content/section-height.js";import{HEADER_HEIGHT_CSS as Ve}from"../lib/document/header-clearance.js";import{nextReel as ze,normaliseHeroReelShape as $e,reelShown as Xe}from"../../format/lib/reel.js";import{arrowsShown as Ge,arrowStep as Ye}from"../../format/lib/hero-arrows.js";import{swipeEnabled as je,swipeStep as Be}from"../../format/lib/hero-swipe.js";import{videoControlShown as qe,videoHeld as Ke}from"../../format/lib/hero-video-control.js";import{HERO_SLIDER_GOTO_EVENT as D}from"efficient-easel/draw";import{say as oe}from"../../format/lib/editor-words.js";import{markedChildren as ne}from"../../format/lib/marked-children.js";import{legacyTickerDrawn as Fe,TICKER_MOTION_PART as Je}from"../../format/lib/hero-ticker.js";import{ON_MEDIA_INK_STYLE as Qe}from"../../format/lib/content/ink.js";import{SectionAnimation as Ue}from"./SectionAnimation.js";import{entranceDrawn as We}from"../lib/animation/entrance.js";import{readPartMotion as Ze}from"../lib/animation/part-motion.js";import{scrim as se}from"../../format/lib/content/scrim.js";const et="Play video",tt="Hold video",rt="flex h-7 cursor-pointer items-center gap-1.5 rounded-full border border-overlay-chrome/25 bg-overlay-scrim/80 px-[11px] font-mono text-[11px] leading-none tracking-[0.05em] text-overlay-fg",ot=()=>oe("item"),ce=new Map;function nt(m,a){const i=m?.ownerDocument?.defaultView;if(i)return i.addEventListener(D,a),()=>i.removeEventListener(D,a)}function st({slides:m,strip:a,alignment:i,textureOpacity:y,showTexture:E,textureColor:g,phoneUpDown:ae,phoneSideways:ie,autoplay:I,autoplayInterval:O,showTicker:le,tickerItems:V,heightDesktop:z,heightMobile:$,showPicker:ue,pickerShape:de,pickerPlacement:me,showArrows:fe,arrowsShape:he,arrowsPlacement:pe,editing:s,partMotion:ve}){const X=Ie(z,$),be=X?"h-[var(--sf-hero-h-m)] view-tablet:h-[var(--sf-hero-h-d)]":"h-screen min-h-[680px]",xe=X?{"--sf-hero-h-d":re(z),"--sf-hero-h-m":re($)}:void 0,G=(a?.blockCount??0)>0,we=!G&&Fe({showTicker:le,tickerItems:V}),Y=(V??[]).map(e=>e?.text?.trim()?e.text:s?ot():"").filter(Boolean),ke=We(Ze({_partMotion:ve},Je)),f=d(null),j=d(null),B=d(null),q=d(null),K=Ae(),H=d(K),[_,ye]=k([]),[Ee,F]=k(0),b=d(0),[J,Q]=k(!1),[ge,U]=k(null),[R,_e]=k(!1),A=De(),S=v(()=>f.current?.querySelector(".hero-track")??null,[]),l=v((e,t=!1)=>{F(e),U(o=>o===e?o:null),b.current=e,ce.set(H.current,e);const r=f.current?.querySelector(".hero-track");if(r)if(t){const o=r.style.transition;r.style.transition="none",r.style.transform=`translateX(-${Math.max(0,e)*100}%)`,r.offsetHeight,r.style.transition=o}else r.style.transform=`translateX(-${Math.max(0,e)*100}%)`},[]);w(()=>{const e=f.current,t=e?.getAttribute("data-easel-block")||e?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||K;H.current=t;const r=ce.get(t);typeof r=="number"&&(F(r),b.current=r)},[]),w(()=>{const e=S();if(!e)return;const t=()=>{ye(o=>ze(o,ne(e,"data-slide-name")))};t();const r=new MutationObserver(t);return r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-slide-name","data-slide-process","data-slide-media"]}),()=>{r.disconnect()}},[S]),w(()=>{if(!s)return;const e=t=>{const r=t.detail;if(!r||typeof r.index!="number")return;const o=f.current,p=o?.getAttribute("data-easel-block")||o?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||H.current;r.id&&r.id!==p||l(r.index,!0)};return nt(f.current,e)},[s,l]);const c=_.length,u=Math.min(Math.max(Ee,0),Math.max(0,c-1)),N=ge===u,L=Xe({shown:ue,count:c}),W=Ge({shown:fe,count:c}),Z=qe({editing:s,shown:u,slides:_}),Re=Ke({editing:s,playing:R,controlShown:Z}),T=je({count:c,editing:s}),h=d(null),x=d(null),Se=v(e=>{if(h.current=null,x.current=null,!T||e.touches.length!==1)return;const t=e.touches[0];h.current={x:t.clientX,y:t.clientY},x.current={x:t.clientX,y:t.clientY}},[T]),Te=v(e=>{if(!h.current)return;if(e.touches.length!==1){h.current=null;return}const t=e.touches[0];x.current={x:t.clientX,y:t.clientY}},[]),Oe=v(()=>{const e=h.current,t=x.current;if(h.current=null,x.current=null,!T||!e||!t)return;const r=Be(t.x-e.x,t.y-e.y,b.current,c);r!==b.current&&l(r)},[T,c,l]);w(()=>{if(s||!I||J||N||A||c<=1)return;const t=Math.max(1,typeof O=="number"?O:6)*1e3,r=window.setTimeout(()=>l((u+1)%c),t);return()=>window.clearTimeout(r)},[s,I,O,J,N,A,c,u,l]),w(()=>{const e=[j.current,B.current,q.current].filter(Boolean),t=e.map(o=>te(o)),r=o=>{const p=o.target,M=p.closest("[data-hero-nav]"),ee=M??p.closest("[data-idx]");if(!ee)return;o.stopPropagation(),o.preventDefault();const C=M?Ye(M.dataset.heroNav,b.current,c):Number(ee.dataset.idx);Number.isNaN(C)||(l(C,s),ne(S(),"data-slide-name")[C]?.click())};return e.forEach(o=>o.addEventListener("click",r,{capture:!0})),()=>{t.forEach(o=>o?.()),e.forEach(o=>o.removeEventListener("click",r,{capture:!0}))}},[c,l,S,s]);const He=v(e=>{if(!e)return;const t=te(e),r=o=>{o.stopPropagation(),o.preventDefault(),_e(p=>!p)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[]);return n(Le.Provider,{value:{alignment:i,textureOpacity:y,textureOn:E,textureColor:g,quietVideo:Re,phoneUpDown:ae,phoneSideways:ie,holdReel:()=>U(u),reelHeld:N},children:P("div",{ref:f,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${be} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:xe,onMouseEnter:()=>Q(!0),onMouseLeave:()=>Q(!1),onTouchStart:Se,onTouchMove:Te,onTouchEnd:Oe,children:[n(m,{className:"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${u*100}%)`,transition:A?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),Z&&n("div",{ref:He,"data-hero-video-control":R?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${Ve} + 16px)`},children:P("button",{type:"button",className:rt,children:[n("span",{"aria-hidden":"true",children:R?"❚❚":"▶"}),oe(R?tt:et)]})}),(L||W)&&P("div",{className:"pointer-events-none absolute inset-y-0 left-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] right-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] z-[6] mx-auto max-w-[var(--sf-hero-chrome-cap,calc(var(--sf-site-width,1600px)_-_var(--sf-site-gutter,40px)*2))]",children:[L&&n(Ce,{ref:j,slides:_,active:u,shape:$e(de),placement:me}),W&&n(Me,{ref:q,shape:he,placement:pe})]}),L&&n("div",{ref:B,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",children:_.map((e,t)=>n("button",{type:"button","data-idx":t,"aria-label":`Go to slide ${t+1}`,className:`h-2 rounded-full transition-all motion-reduce:transition-none ${t===u?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`},t))}),G&&a&&n("div",{className:"sf-hero-strip absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10",style:{background:se(.55),...Qe},children:n(a,{})}),we&&Y.length>0&&n(ct,{editing:!!s,entrance:ke,children:n(Ne,{items:Y,backdrop:"dark-media"})})]})})}function ct({editing:m,entrance:a,children:i}){const y="sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5",E=m?{[Pe]:""}:void 0,g={background:se(.55)};return a?n(Ue,{desktop:a.desktop,phone:a.phone,editing:m,boxClass:y,boxAttrs:E,boxStyle:g,children:i}):n("div",{className:y,...E,style:g,children:i})}export{D as HERO_SLIDER_GOTO_EVENT,tt as HERO_VIDEO_HOLD_LABEL,et as HERO_VIDEO_PLAY_LABEL,st as default,nt as subscribeSliderGoto};
|