efficient-web-builder 67.6.0 → 67.8.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.
Files changed (59) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/editor/lib/document/blocks/general/HostPart/fields.d.ts +2 -0
  3. package/dist/editor/lib/document/blocks/general/HostPart/fields.js +1 -0
  4. package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
  5. package/dist/editor/lib/document/blocks/general/index.js +1 -1
  6. package/dist/editor/lib/document/blocks/shared-fields.js +1 -1
  7. package/dist/editor/lib/document/build-config.js +1 -1
  8. package/dist/editor/lib/document/choice-pictures.d.ts +2 -0
  9. package/dist/editor/lib/document/choice-pictures.js +1 -1
  10. package/dist/editor/lib/document/controls.d.ts +5 -2
  11. package/dist/editor/lib/document/controls.js +1 -1
  12. package/dist/editor/lib/sections/text-layouts.js +1 -1
  13. package/dist/format/lib/content/box-background.d.ts +1 -0
  14. package/dist/format/lib/content/box-background.js +1 -1
  15. package/dist/format/lib/content/button-icon.d.ts +1 -1
  16. package/dist/format/lib/content/button-icon.js +1 -1
  17. package/dist/format/lib/content/card-template.d.ts +1 -0
  18. package/dist/format/lib/content/card-template.js +1 -1
  19. package/dist/format/lib/content/count-numbers.js +1 -1
  20. package/dist/format/lib/content/gallery-layout.d.ts +11 -2
  21. package/dist/format/lib/content/gallery-layout.js +1 -1
  22. package/dist/format/lib/document/blocks/block-types.d.ts +4 -0
  23. package/dist/format/lib/document/blocks/general/HostPart/meta.d.ts +2 -0
  24. package/dist/format/lib/document/blocks/general/HostPart/meta.js +1 -0
  25. package/dist/format/lib/document/blocks/general/metas.d.ts +1 -0
  26. package/dist/format/lib/document/blocks/general/metas.js +1 -1
  27. package/dist/format/lib/document/cap-hero-groups.js +1 -1
  28. package/dist/format/lib/document/general-order.d.ts +1 -1
  29. package/dist/format/lib/document/general-order.js +1 -1
  30. package/dist/format/lib/document/list-search-scopes.js +1 -1
  31. package/dist/format/lib/document/node-lists.d.ts +9 -0
  32. package/dist/format/lib/document/node-lists.js +1 -0
  33. package/dist/format/lib/document/passes/types.d.ts +4 -0
  34. package/dist/format/lib/document/renamed-props.js +1 -1
  35. package/dist/format/lib/document/section-catalog.js +1 -1
  36. package/dist/format/lib/editor-words-catalogue.d.ts +5 -0
  37. package/dist/format/lib/editor-words-catalogue.js +3 -3
  38. package/dist/format/lib/source-rules/no-hard-coded-option-rows.js +1 -1
  39. package/dist/format/lib/source-rules/own-key-reads.d.ts +5 -0
  40. package/dist/format/lib/source-rules/own-key-reads.js +9 -7
  41. package/dist/format/lib/source-rules/support/ts-program.d.ts +1 -0
  42. package/dist/format/lib/source-rules/support/ts-program.js +2 -2
  43. package/dist/render/components/ButtonBlock.js +1 -1
  44. package/dist/render/components/CardRowContext.d.ts +9 -1
  45. package/dist/render/components/CardRowContext.js +1 -1
  46. package/dist/render/components/Flex.js +1 -1
  47. package/dist/render/lib/animation/entrance.js +1 -1
  48. package/dist/render/lib/content/page-contents.js +1 -1
  49. package/dist/render/lib/document/blocks/general/HostPart/render.d.ts +2 -0
  50. package/dist/render/lib/document/blocks/general/HostPart/render.js +1 -0
  51. package/dist/render/lib/document/blocks/general/renders.d.ts +1 -0
  52. package/dist/render/lib/document/blocks/general/renders.js +1 -1
  53. package/dist/render/lib/document/card-press-titles.js +1 -1
  54. package/dist/render/lib/document/head-core-boxes.js +1 -1
  55. package/dist/render/lib/document/passes/clickable-parts.js +1 -1
  56. package/dist/render/lib/document/passes/section-padding.d.ts +5 -2
  57. package/dist/render/lib/document/passes/section-padding.js +1 -1
  58. package/dist/render/lib/document/wall-labels.js +1 -1
  59. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,43 @@
1
1
  # Changelog
2
2
 
3
+ ## 67.8.0 - 2026-11-12
4
+
5
+ From main at `1770c295`: #735. A minor: no `!`, no export is removed, the peers stay `efficient-easel` `^34.1.0` and `efficient-shell` `^12.33.0`. One new export only. No stored key or value moves.
6
+
7
+ **For hosts:**
8
+ - Nothing to change.
9
+
10
+ ### Added
11
+
12
+ - **Phone layout pictures draw in the one choice-picture frame** (#735): new export `galleryPhonePicture` (lib/document/choice-pictures).
13
+
14
+ ### Fixed
15
+
16
+ - **The gallery phone Layout row fits its cells** (#735): its words fit `LAYOUT_CELL`, its pictures share one height, and a One across tile spans two rows (`GALLERY_PHONE_LAYOUTS.oneAcross.phone` is now `[[6, 2]]`, was `[[6, 1]]`; same type `GalleryCell`).
17
+
18
+ ## 67.7.0 - 2026-11-12
19
+
20
+ From main at `2e8ecc58`: #727, #728, #725, #730, #731, #732, #733, #734. A minor: no `!`, no export is removed, the peers stay `efficient-easel` `^34.1.0` and `efficient-shell` `^12.33.0`. New exports, new icon values, one new block and optional fields, props and arguments only. No stored key or value moves.
21
+
22
+ **For hosts:**
23
+ - Nothing to change. A block that declares no inner padding keeps its old default (#728). Existing Button icons draw as before (#727).
24
+ - storefront-blocks: DetailRows, ProductGrid, Events and GalleryB can declare `innerPadding` (#728); `mapDocumentNodes` can move onto `node-lists` (#725).
25
+ - storefront-blocks: a lazy draw table keyed by `GeneralBlockType` (`src/render/lib/document/lazy-draws.tsx`) must add one line for `HostPart/render`, or `tsc` fails (#731). Do it in the PR that takes this release.
26
+
27
+ ### Added
28
+
29
+ - **Eight more Button icons** (#727): `BUTTON_ICONS` gains `phone`, `wheel`, `chat`, `chevron-left`, `package`, `truck`, `shield-check`, `receipt-refund`.
30
+ - **A block declares its inner padding default** (#728): optional `BlockRender.innerPadding` and `PassBlock.innerPadding`; new export `ownPairDefault`.
31
+ - **One node-list walker** (#725): new format module `lib/document/node-lists` with `mapEachNode`, `mapNodeLists`, `mapPageContent` and `ListNode`. The published passes walk node lists through it.
32
+ - **A card part inside a copy takes no hover lift** (#730): new export `CARD_NO_LIFT_CLASS` (lib/content/box-background).
33
+ - **A host part a host answers inside a copy** (#731): new block `HostPart` (type `HOST_PART_TYPE` in lib/content/card-template; not offered to a merchant); optional prop `CardTemplateRows.hostParts`. A host seeds `{ type: "HostPart", props: { name, label } }` in its template and passes `hostParts`. New exports `HostParts`, `HostPartsContext`, `HostPartDrawn`, `HostPartMeta`, `HostPartRender`, `HostPartFields`; `panelNote` and `PanelNoteLine` take optional word `values`; `GENERAL_REGISTRATION_ORDER` gains a last entry.
34
+ - **A gallery layout has a phone value** (#734): One across on a phone. New exports `GALLERY_PHONE_LAYOUTS`, `resolveGalleryPhoneLayout`, `galleryLayoutPhoneField`; `galleryLayoutClass` and `galleryLayoutCss` take an optional phone argument.
35
+ - **Source rules pin an own-key exemption to one function** (#733): `OwnKeyExemption` gains optional `within`, `OwnKeyPlace` optional `fn`; new export `enclosingFunctionName` (`support/ts-program`).
36
+
37
+ ### Fixed
38
+
39
+ - **A card template that names HostPart is refused when it registers** (#732), the same rule `buildConfig` applies. 0 hosts do this.
40
+
3
41
  ## 67.6.0 - 2026-11-11
4
42
 
5
43
  From main at `a2c1240e`: #721, #724, #722. A minor: no `!`, no export is removed, the peers stay `efficient-easel` `^34.1.0` and `efficient-shell` `^12.33.0`. New exports, one optional parameter and optional props only. No stored key or value moves.
@@ -0,0 +1,2 @@
1
+ import type { BlockFields } from "../../../../../../format/lib/document/blocks/block-types.js";
2
+ export declare const HostPartFields: BlockFields;
@@ -0,0 +1 @@
1
+ import{panelNote as r}from"../../../controls.js";function a(e){const t=typeof e?.label=="string"?e.label.trim():"",n=typeof e?.name=="string"?e.name.trim():"";return t||n}const s={fields:{},resolveFields:e=>({_nHostPart:r("The section draws {what} here, in every card.",{what:a(e.props)})})};export{s as HostPartFields};
@@ -1,2 +1,2 @@
1
- export declare const assembleGeneralBlocks: () => Record<"Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "Footprint" | "Cards" | "Stats" | "Chart" | "Mockup" | "Countdown" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "DocBody" | "FAQ" | "ContactLocations" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Logos" | "DocMasthead" | "DocTabs" | "Prose" | "ParagraphsA" | "TitleWithButtons" | "Banner" | "CategoryBar" | "Masthead" | "Grid" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "StatsParagraph" | "Testimonials" | "PaymentBadges" | "Heading" | "Text" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "Contents" | "ListSearch" | "ButtonBlock" | "CardList" | "PostCard" | "HeroSlide" | "HeroGroup" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
2
- export declare const generalBlocks: Record<"Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "Footprint" | "Cards" | "Stats" | "Chart" | "Mockup" | "Countdown" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "DocBody" | "FAQ" | "ContactLocations" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Logos" | "DocMasthead" | "DocTabs" | "Prose" | "ParagraphsA" | "TitleWithButtons" | "Banner" | "CategoryBar" | "Masthead" | "Grid" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "StatsParagraph" | "Testimonials" | "PaymentBadges" | "Heading" | "Text" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "Contents" | "ListSearch" | "ButtonBlock" | "CardList" | "PostCard" | "HeroSlide" | "HeroGroup" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
1
+ export declare const assembleGeneralBlocks: () => Record<"Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "Footprint" | "Cards" | "Stats" | "Chart" | "Mockup" | "Countdown" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "DocBody" | "FAQ" | "ContactLocations" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Logos" | "DocMasthead" | "DocTabs" | "Prose" | "ParagraphsA" | "TitleWithButtons" | "Banner" | "CategoryBar" | "Masthead" | "Grid" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "StatsParagraph" | "Testimonials" | "PaymentBadges" | "Heading" | "Text" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "Contents" | "ListSearch" | "ButtonBlock" | "CardList" | "HostPart" | "PostCard" | "HeroSlide" | "HeroGroup" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
2
+ export declare const generalBlocks: Record<"Hero" | "HeroSingle" | "IntroBleed" | "ProcessSteps" | "OrderSummary" | "Footprint" | "Cards" | "Stats" | "Chart" | "Mockup" | "Countdown" | "FeaturedCover" | "LongRead" | "Breadcrumb" | "DocBody" | "FAQ" | "ContactLocations" | "SectionHeader" | "Flex" | "Divider" | "CustomHTML" | "Manifesto" | "Split" | "Ticker" | "SpecStrip" | "TimelineTrack" | "Timeline" | "Logos" | "DocMasthead" | "DocTabs" | "Prose" | "ParagraphsA" | "TitleWithButtons" | "Banner" | "CategoryBar" | "Masthead" | "Grid" | "Spacer" | "KeyFeatures" | "Series" | "DocMetaCards" | "StatsParagraph" | "Testimonials" | "PaymentBadges" | "Heading" | "Text" | "Eyebrow" | "ImageBlock" | "LogoBlock" | "LocationMap" | "Contents" | "ListSearch" | "ButtonBlock" | "CardList" | "HostPart" | "PostCard" | "HeroSlide" | "HeroGroup" | "Integrations", import("efficient-easel/blocks").ComponentConfig<any, any, Omit<import("efficient-easel/blocks").ComponentData<any, string, Record<string, import("efficient-easel/blocks").DefaultComponentProps>>, "type">>>;
@@ -1 +1 @@
1
- import{assembleBlocks as o}from"../../../../../format/lib/document/blocks/block-types.js";import{registerGeneralSectionRows as r}from"../../../../../render/lib/document/blocks/general/section-to-box-rows.js";import{BannerFields as e}from"./Banner/fields.js";import{BreadcrumbFields as i}from"./Breadcrumb/fields.js";import{ButtonBlockFields as t}from"./ButtonBlock/fields.js";import{CardsFields as m}from"./Cards/fields.js";import{CategoryBarFields as s}from"./CategoryBar/fields.js";import{ChartFields as d}from"./Chart/fields.js";import{ContactLocationsFields as l}from"./ContactLocations/fields.js";import{CountdownFields as a}from"./Countdown/fields.js";import{CustomHTMLFields as p}from"../../../../../format/lib/document/blocks/general/CustomHTML/fields.js";import{DividerFields as F}from"./Divider/fields.js";import{ContentsFields as f}from"./Contents/fields.js";import{ListSearchFields as n}from"./ListSearch/fields.js";import{DocBodyFields as c}from"./DocBody/fields.js";import{DocMastheadFields as S}from"./DocMasthead/fields.js";import{DocMetaCardsFields as B}from"./DocMetaCards/fields.js";import{DocTabsFields as g}from"./DocTabs/fields.js";import{EyebrowFields as C}from"./Eyebrow/fields.js";import{FAQFields as u}from"./FAQ/fields.js";import{FeaturedCoverFields as L}from"./FeaturedCover/fields.js";import{FlexFields as T}from"./Flex/fields.js";import{FootprintFields as k}from"./Footprint/fields.js";import{GridFields as h}from"./Grid/fields.js";import{HeadingFields as H}from"./Heading/fields.js";import{HeroFields as M}from"./Hero/fields.js";import{HeroGroupFields as y}from"./HeroGroup/fields.js";import{HeroSingleFields as D}from"./HeroSingle/fields.js";import{HeroSlideFields as P}from"./HeroSlide/fields.js";import{ImageBlockFields as E}from"./ImageBlock/fields.js";import{IntegrationsFields as b}from"./Integrations/fields.js";import{IntroBleedFields as G}from"./IntroBleed/fields.js";import{KeyFeaturesFields as I}from"./KeyFeatures/fields.js";import{LocationMapFields as R}from"./LocationMap/fields.js";import{LogoBlockFields as x}from"./LogoBlock/fields.js";import{LogosFields as A}from"./Logos/fields.js";import{LongReadFields as w}from"./LongRead/fields.js";import{ManifestoFields as v}from"./Manifesto/fields.js";import{MastheadFields as N}from"./Masthead/fields.js";import{MockupFields as K}from"./Mockup/fields.js";import{OrderSummaryFields as O}from"./OrderSummary/fields.js";import{CardListFields as Q}from"./CardList/fields.js";import{ParagraphsAFields as W}from"./ParagraphsA/fields.js";import{PaymentBadgesFields as _}from"./PaymentBadges/fields.js";import{PostCardFields as j}from"./PostCard/fields.js";import{ProcessStepsFields as q}from"./ProcessSteps/fields.js";import{ProseFields as z}from"./Prose/fields.js";import{SectionHeaderFields as J}from"./SectionHeader/fields.js";import{SeriesFields as U}from"./Series/fields.js";import{SpacerFields as V}from"../../../../../format/lib/document/blocks/general/Spacer/fields.js";import{SpecStripFields as X}from"./SpecStrip/fields.js";import{SplitFields as Y}from"./Split/fields.js";import{StatsFields as Z}from"./Stats/fields.js";import{StatsParagraphFields as $}from"./StatsParagraph/fields.js";import{TestimonialsFields as oo}from"./Testimonials/fields.js";import{TextFields as ro}from"./Text/fields.js";import{TickerFields as eo}from"./Ticker/fields.js";import{TimelineFields as io}from"./Timeline/fields.js";import{TimelineTrackFields as to}from"./TimelineTrack/fields.js";import{TitleWithButtonsFields as mo}from"./TitleWithButtons/fields.js";import{GENERAL_RENDERS as so}from"../../../../../render/lib/document/blocks/general/renders.js";const lo={Banner:e,Breadcrumb:i,ButtonBlock:t,Cards:m,CategoryBar:s,Chart:d,ContactLocations:l,Countdown:a,CustomHTML:p,Divider:F,Contents:f,ListSearch:n,DocBody:c,DocMasthead:S,DocMetaCards:B,DocTabs:g,Eyebrow:C,FAQ:u,FeaturedCover:L,Flex:T,Footprint:k,Grid:h,Heading:H,Hero:M,HeroGroup:y,HeroSingle:D,HeroSlide:P,ImageBlock:E,Integrations:b,IntroBleed:G,KeyFeatures:I,LocationMap:R,LogoBlock:x,Logos:A,LongRead:w,Manifesto:v,Masthead:N,Mockup:K,OrderSummary:O,CardList:Q,ParagraphsA:W,PaymentBadges:_,PostCard:j,ProcessSteps:q,Prose:z,SectionHeader:J,Series:U,Spacer:V,SpecStrip:X,Split:Y,Stats:Z,StatsParagraph:$,Testimonials:oo,Text:ro,Ticker:eo,Timeline:io,TimelineTrack:to,TitleWithButtons:mo},ao=()=>(r(),o(so,lo)),gr=ao();export{ao as assembleGeneralBlocks,gr as generalBlocks};
1
+ import{assembleBlocks as o}from"../../../../../format/lib/document/blocks/block-types.js";import{registerGeneralSectionRows as r}from"../../../../../render/lib/document/blocks/general/section-to-box-rows.js";import{BannerFields as e}from"./Banner/fields.js";import{BreadcrumbFields as i}from"./Breadcrumb/fields.js";import{ButtonBlockFields as t}from"./ButtonBlock/fields.js";import{CardsFields as m}from"./Cards/fields.js";import{CategoryBarFields as s}from"./CategoryBar/fields.js";import{ChartFields as d}from"./Chart/fields.js";import{ContactLocationsFields as a}from"./ContactLocations/fields.js";import{CountdownFields as l}from"./Countdown/fields.js";import{CustomHTMLFields as p}from"../../../../../format/lib/document/blocks/general/CustomHTML/fields.js";import{DividerFields as F}from"./Divider/fields.js";import{ContentsFields as f}from"./Contents/fields.js";import{ListSearchFields as n}from"./ListSearch/fields.js";import{DocBodyFields as c}from"./DocBody/fields.js";import{DocMastheadFields as S}from"./DocMasthead/fields.js";import{DocMetaCardsFields as B}from"./DocMetaCards/fields.js";import{DocTabsFields as g}from"./DocTabs/fields.js";import{EyebrowFields as C}from"./Eyebrow/fields.js";import{FAQFields as u}from"./FAQ/fields.js";import{FeaturedCoverFields as L}from"./FeaturedCover/fields.js";import{FlexFields as T}from"./Flex/fields.js";import{FootprintFields as H}from"./Footprint/fields.js";import{GridFields as k}from"./Grid/fields.js";import{HeadingFields as h}from"./Heading/fields.js";import{HeroFields as M}from"./Hero/fields.js";import{HeroGroupFields as P}from"./HeroGroup/fields.js";import{HeroSingleFields as y}from"./HeroSingle/fields.js";import{HeroSlideFields as D}from"./HeroSlide/fields.js";import{ImageBlockFields as E}from"./ImageBlock/fields.js";import{IntegrationsFields as b}from"./Integrations/fields.js";import{IntroBleedFields as G}from"./IntroBleed/fields.js";import{KeyFeaturesFields as I}from"./KeyFeatures/fields.js";import{LocationMapFields as R}from"./LocationMap/fields.js";import{LogoBlockFields as x}from"./LogoBlock/fields.js";import{LogosFields as A}from"./Logos/fields.js";import{LongReadFields as w}from"./LongRead/fields.js";import{ManifestoFields as v}from"./Manifesto/fields.js";import{MastheadFields as N}from"./Masthead/fields.js";import{MockupFields as K}from"./Mockup/fields.js";import{OrderSummaryFields as O}from"./OrderSummary/fields.js";import{CardListFields as Q}from"./CardList/fields.js";import{HostPartFields as W}from"./HostPart/fields.js";import{ParagraphsAFields as _}from"./ParagraphsA/fields.js";import{PaymentBadgesFields as j}from"./PaymentBadges/fields.js";import{PostCardFields as q}from"./PostCard/fields.js";import{ProcessStepsFields as z}from"./ProcessSteps/fields.js";import{ProseFields as J}from"./Prose/fields.js";import{SectionHeaderFields as U}from"./SectionHeader/fields.js";import{SeriesFields as V}from"./Series/fields.js";import{SpacerFields as X}from"../../../../../format/lib/document/blocks/general/Spacer/fields.js";import{SpecStripFields as Y}from"./SpecStrip/fields.js";import{SplitFields as Z}from"./Split/fields.js";import{StatsFields as $}from"./Stats/fields.js";import{StatsParagraphFields as oo}from"./StatsParagraph/fields.js";import{TestimonialsFields as ro}from"./Testimonials/fields.js";import{TextFields as eo}from"./Text/fields.js";import{TickerFields as io}from"./Ticker/fields.js";import{TimelineFields as to}from"./Timeline/fields.js";import{TimelineTrackFields as mo}from"./TimelineTrack/fields.js";import{TitleWithButtonsFields as so}from"./TitleWithButtons/fields.js";import{GENERAL_RENDERS as ao}from"../../../../../render/lib/document/blocks/general/renders.js";const lo={Banner:e,Breadcrumb:i,ButtonBlock:t,Cards:m,CategoryBar:s,Chart:d,ContactLocations:a,Countdown:l,CustomHTML:p,Divider:F,Contents:f,ListSearch:n,DocBody:c,DocMasthead:S,DocMetaCards:B,DocTabs:g,Eyebrow:C,FAQ:u,FeaturedCover:L,Flex:T,Footprint:H,Grid:k,Heading:h,Hero:M,HeroGroup:P,HeroSingle:y,HeroSlide:D,ImageBlock:E,Integrations:b,IntroBleed:G,KeyFeatures:I,LocationMap:R,LogoBlock:x,Logos:A,LongRead:w,Manifesto:v,Masthead:N,Mockup:K,OrderSummary:O,CardList:Q,HostPart:W,ParagraphsA:_,PaymentBadges:j,PostCard:q,ProcessSteps:z,Prose:J,SectionHeader:U,Series:V,Spacer:X,SpecStrip:Y,Split:Z,Stats:$,StatsParagraph:oo,Testimonials:ro,Text:eo,Ticker:io,Timeline:to,TimelineTrack:mo,TitleWithButtons:so},po=()=>(r(),o(ao,lo)),ur=po();export{po as assembleGeneralBlocks,ur as generalBlocks};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{SECTION_PAD_INNER_DEFAULTS as i}from"../../../../render/lib/document/passes/section-padding.js";import n,{SlotNoticeField as p}from"../../../components/SlotChildRows.js";import{SECTION_HEIGHT as r}from"../../../../format/lib/content/section-height.js";import{usePreviewHeader as l}from"../../../../render/components/PreviewHeaderContext.js";import{IMAGE_GRAYSCALE_LABEL as m}from"../../../../format/lib/content/image-treatment.js";import{BlackAndWhiteIcon as d,ContrastIcon as s,HeightIcon as a,TypeIcon as c}from"efficient-easel/icons";import{linkField as f,spacingFields as u,text as g,toggle as h}from"../controls.js";import{segmented as x,slider as y}from"../box-fields.js";import{deviceField as F}from"efficient-easel/screen/lib/document/device-fields";import{FieldGlyph as T}from"../../../components/FieldGlyph.js";import{fieldNoun as E}from"../../../../format/lib/document/field-noun.js";import{CTA_PH as I}from"../../../../format/lib/document/blocks/placeholders.js";import{ownEntry as A}from"../../../../format/lib/own-entry.js";const H=o=>y("Height",t(a,{}),r.min,r.max,r.step,r.fallback,r.unit,o),M=o=>F(o,H());import{heroHeightFields as V}from"./hero-shared-fields.js";const O={ctaText:g("Button",I.text),ctaHref:f("Button link")},K=()=>x("Tone",t(s,{}),[{label:"Default",value:"default"},{label:"Muted",value:"dim"}],"default"),U=o=>u({...A(i,o),keys:{top:"padTop",bottom:"padBottom"},group:!1}),W=(o,e)=>({type:"custom",render:()=>t(n,{parentType:o,label:e})}),Y=o=>({type:"custom",render:()=>t(p,{parentType:o})});function _(o){const{photographyGrayscale:e}=l();return h(m,e===!0,t(d,{})).render(o)}function q(){return{type:"custom",render:o=>t(_,{...o})}}function z(o){const e=E(o);return e?t(T,{noun:e}):t(c,{})}export{O as ctaField,M as heightField,V as heroHeightFields,U as innerSpacingFields,q as photographyToggle,Y as slotNoticeField,W as slotRowsField,z as textKindGlyph,K as toneField};
1
+ import{jsx as o}from"react/jsx-runtime";import{ownPairDefault as i}from"../../../../render/lib/document/passes/section-padding.js";import n,{SlotNoticeField as p}from"../../../components/SlotChildRows.js";import{SECTION_HEIGHT as r}from"../../../../format/lib/content/section-height.js";import{usePreviewHeader as l}from"../../../../render/components/PreviewHeaderContext.js";import{IMAGE_GRAYSCALE_LABEL as m}from"../../../../format/lib/content/image-treatment.js";import{BlackAndWhiteIcon as a,ContrastIcon as d,HeightIcon as s,TypeIcon as c}from"efficient-easel/icons";import{linkField as f,spacingFields as u,text as g,toggle as h}from"../controls.js";import{segmented as x,slider as y}from"../box-fields.js";import{deviceField as F}from"efficient-easel/screen/lib/document/device-fields";import{FieldGlyph as T}from"../../../components/FieldGlyph.js";import{fieldNoun as H}from"../../../../format/lib/document/field-noun.js";import{CTA_PH as I}from"../../../../format/lib/document/blocks/placeholders.js";const w=t=>y("Height",o(s,{}),r.min,r.max,r.step,r.fallback,r.unit,t),j=t=>F(t,w());import{heroHeightFields as Q}from"./hero-shared-fields.js";const D={ctaText:g("Button",I.text),ctaHref:f("Button link")},M=()=>x("Tone",o(d,{}),[{label:"Default",value:"default"},{label:"Muted",value:"dim"}],"default"),K=t=>u({...i(t),keys:{top:"padTop",bottom:"padBottom"},group:!1}),O=(t,e)=>({type:"custom",render:()=>o(n,{parentType:t,label:e})}),W=t=>({type:"custom",render:()=>o(p,{parentType:t})});function A(t){const{photographyGrayscale:e}=l();return h(m,e===!0,o(a,{})).render(t)}function Y(){return{type:"custom",render:t=>o(A,{...t})}}function q(t){const e=H(t);return e?o(T,{noun:e}):o(c,{})}export{D as ctaField,j as heightField,Q as heroHeightFields,K as innerSpacingFields,Y as photographyToggle,W as slotNoticeField,O as slotRowsField,q as textKindGlyph,M as toneField};
@@ -1 +1 @@
1
- import{cardTemplateBlocks as w,hasCardTemplate as j,isCardTemplateBlock as O}from"../../../format/lib/content/card-template.js";import{resolveBlockOffer as $}from"./block-offer.js";import{applyBlockPasses as B,registryPassContext as C}from"../../../render/lib/document/passes/index.js";import{PASS_INSPECTOR as F}from"./passes/inspector.js";function k(n,a,c){if(!n)return n;let l=!1;const d={};for(const[s,e]of Object.entries(n)){let o=e;if(e&&typeof e=="object")if(e.type==="slot")if(e.allow){const r=e.allow.filter(a);r.length!==e.allow.length&&(o={...e,allow:r})}else{const r=new Set(e.disallow??[]),p=c.filter(m=>!r.has(m));p.length>0&&(o={...e,disallow:[...e.disallow??[],...p]})}else{const r=k(e.arrayFields,a,c),p=k(e.objectFields,a,c);(r!==e.arrayFields||p!==e.objectFields)&&(o={...e,...r?{arrayFields:r}:null,...p?{objectFields:p}:null})}o!==e&&(l=!0),d[s]=o}return l?d:n}function S(n,a,c){const l={};for(const[o,r]of Object.entries(a.fields??{}))l[o]=r&&typeof r=="object"&&r.type==="slot"?{...r}:r;const d={...a,...a.fields?{fields:l}:null},s=B(n,d,c),e=Object.keys(l).filter(o=>s.fields?.[o]!==l[o]);if(e.length>0)throw new Error(`efficient-web-builder: blocks.host["${n}"] declares ${e.map(o=>`"${o}"`).join(", ")}, ${e.length===1?"a name":"names"} the editor gives every section a setting under. Give the block's own field another name.`);return s}function v(n,a,c){const l=new Set([...Object.keys(n.components??{}),...a]),d=[...Object.entries(n.categories??{}).map(([s,e])=>({key:s,components:e?.components??[]})),...c];for(const s of d){const e=s.components.filter(O);if(e.length>0)throw new Error(`efficient-web-builder: the category "${s.key}" lists ${e.map(o=>`"${o}"`).join(", ")}, a block a card template declares. A card's block is added in its card only; take it out of the category.`)}for(const s of l){if(!j(s))continue;const e=w(s).filter(o=>!l.has(o.type)).map(o=>`"${o.type}"`);if(e.length>0)throw new Error(`efficient-web-builder: the card template of "${s}" declares ${e.join(", ")}, which the editor does not register. Register it in the registry or in blocks.host.`)}}function A(n,a){const c=Object.entries(a?.host??{}),l=a?.categories??[],d=$(a);if(v(n,c.map(([t])=>t),l),!d&&c.length===0&&l.length===0)return n;const s=n.components,e=c.map(([t])=>t).filter(t=>t in s);if(e.length>0)throw new Error(`efficient-web-builder: blocks.host registers ${e.map(t=>`"${t}"`).join(", ")}, which ${e.length===1?"is already a block":"are already blocks"} of the editor. Give a host's block a type of its own.`);const o=t=>d?d.offers(t):!0,r=Object.keys(s).filter(t=>!o(t)),p={};for(const[t,i]of Object.entries(s)){const h=d?k(i?.fields,o,r):i?.fields;p[t]=h===i?.fields?i:{...i,fields:h}}if(c.length>0){const t=new Set(c.map(([y])=>y)),i=n.categories?.structure?.components??[],g={...C(Object.keys(s),i,t),isHostBlock:y=>t.has(y),inspector:F};for(const[y,f]of c){const b=S(y,f,g),u=k(b.fields,o,r);p[y]=u===b.fields?b:{...b,fields:u}}}const m=[];for(const[t,i]of Object.entries(n.categories??{})){const h=i?.components??[],g=h.filter(o);g.length===h.length?m.push([t,i]):g.length>0&&m.push([t,{...i,components:g}])}for(const t of l){const i=t.components.filter(f=>f in p&&o(f));if(i.length===0)continue;const h=m.find(([f])=>f===t.key);if(h){const[,f]=h,b=new Set(f.components??[]);h[1]={...f,components:[...f.components??[],...i.filter(u=>!b.has(u))]};continue}const g=[t.key,{title:t.title,components:i}],y=t.before?m.findIndex(([f])=>f===t.before):-1;y===-1?m.push(g):m.splice(y,0,g)}return{...n,components:p,categories:Object.fromEntries(m)}}export{A as buildConfig};
1
+ import{HOST_PART_TYPE as k,cardTemplateBlocks as $,hasCardTemplate as O,isCardTemplateBlock as T}from"../../../format/lib/content/card-template.js";import{resolveBlockOffer as F}from"./block-offer.js";import{applyBlockPasses as E,registryPassContext as S}from"../../../render/lib/document/passes/index.js";import{PASS_INSPECTOR as v}from"./passes/inspector.js";function w(s,r,l){if(!s)return s;let i=!1;const a={};for(const[t,e]of Object.entries(s)){let o=e;if(e&&typeof e=="object")if(e.type==="slot")if(e.allow){const c=e.allow.filter(r);c.length!==e.allow.length&&(o={...e,allow:c})}else{const c=new Set(e.disallow??[]),p=l.filter(m=>!c.has(m));p.length>0&&(o={...e,disallow:[...e.disallow??[],...p]})}else{const c=w(e.arrayFields,r,l),p=w(e.objectFields,r,l);(c!==e.arrayFields||p!==e.objectFields)&&(o={...e,...c?{arrayFields:c}:null,...p?{objectFields:p}:null})}o!==e&&(i=!0),a[t]=o}return i?a:s}function C(s,r,l){const i={};for(const[o,c]of Object.entries(r.fields??{}))i[o]=c&&typeof c=="object"&&c.type==="slot"?{...c}:c;const a={...r,...r.fields?{fields:i}:null},t=E(s,a,l),e=Object.keys(i).filter(o=>t.fields?.[o]!==i[o]);if(e.length>0)throw new Error(`efficient-web-builder: blocks.host["${s}"] declares ${e.map(o=>`"${o}"`).join(", ")}, ${e.length===1?"a name":"names"} the editor gives every section a setting under. Give the block's own field another name.`);return t}function P(s,r,l){const i=new Set([...Object.keys(s.components??{}),...r.map(([t])=>t)]),a=[...Object.entries(s.categories??{}).map(([t,e])=>({key:t,components:e?.components??[]})),...l];x(s,r,a);for(const t of a){const e=t.components.filter(T);if(e.length>0)throw new Error(`efficient-web-builder: the category "${t.key}" lists ${e.map(o=>`"${o}"`).join(", ")}, a block a card template declares. A card's block is added in its card only; take it out of the category.`)}for(const t of i){if(!O(t))continue;const e=$(t).filter(o=>!i.has(o.type)).map(o=>`"${o.type}"`);if(e.length>0)throw new Error(`efficient-web-builder: the card template of "${t}" declares ${e.join(", ")}, which the editor does not register. Register it in the registry or in blocks.host.`)}}function j(s,r,l,i=""){const a=[];for(const[t,e]of Object.entries(l??{})){if(!e||typeof e!="object")continue;const o=`${i}${t}`;e.type==="slot"&&e.allow?.includes(s)&&a.push(`${r}.${o}`),a.push(...j(s,r,e.arrayFields,`${o}.`),...j(s,r,e.objectFields,`${o}.`))}return a}function x(s,r,l){const i=t=>{throw new Error(`efficient-web-builder: ${t} names "${k}". Only a host's seed puts a host part in a card template; a merchant never adds one. Take it out.`)};for(const t of l)t.components.includes(k)&&i(`the category "${t.key}"`);const a=[...Object.entries(s.components??{}),...r.map(([t,e])=>[t,e])];for(const[t,e]of a){const o=j(k,t,e?.fields);o.length>0&&i(`the slot ${o.map(c=>`"${c}"`).join(", ")}, whose allow list`)}}function _(s,r){const l=Object.entries(r?.host??{}),i=r?.categories??[],a=F(r);if(P(s,l,i),!a&&l.length===0&&i.length===0)return s;const t=s.components,e=l.map(([n])=>n).filter(n=>n in t);if(e.length>0)throw new Error(`efficient-web-builder: blocks.host registers ${e.map(n=>`"${n}"`).join(", ")}, which ${e.length===1?"is already a block":"are already blocks"} of the editor. Give a host's block a type of its own.`);const o=n=>a?a.offers(n):!0,c=Object.keys(t).filter(n=>!o(n)),p={};for(const[n,f]of Object.entries(t)){const h=a?w(f?.fields,o,c):f?.fields;p[n]=h===f?.fields?f:{...f,fields:h}}if(l.length>0){const n=new Set(l.map(([u])=>u)),f=s.categories?.structure?.components??[],y={...S(Object.keys(t),f,n),isHostBlock:u=>n.has(u),inspector:v};for(const[u,d]of l){const b=C(u,d,y),g=w(b.fields,o,c);p[u]=g===b.fields?b:{...b,fields:g}}}const m=[];for(const[n,f]of Object.entries(s.categories??{})){const h=f?.components??[],y=h.filter(o);y.length===h.length?m.push([n,f]):y.length>0&&m.push([n,{...f,components:y}])}for(const n of i){const f=n.components.filter(d=>d in p&&o(d));if(f.length===0)continue;const h=m.find(([d])=>d===n.key);if(h){const[,d]=h,b=new Set(d.components??[]);h[1]={...d,components:[...d.components??[],...f.filter(g=>!b.has(g))]};continue}const y=[n.key,{title:n.title,components:f}],u=n.before?m.findIndex(([d])=>d===n.before):-1;u===-1?m.push(y):m.splice(u,0,y)}return{...s,components:p,categories:Object.fromEntries(m)}}export{_ as buildConfig};
@@ -2,6 +2,8 @@ import { type ReactNode } from "react";
2
2
  import type { DividerStyle } from "../../../format/lib/sections/divider-style.js";
3
3
  import type { SectionHeadStyle } from "../../../format/lib/sections/section-head-style.js";
4
4
  import type { LogoLook } from "../../../format/lib/sections/logo-look.js";
5
+ import { type GalleryCell } from "../../../format/lib/content/gallery-layout.js";
6
+ export declare function galleryPhonePicture(cells: readonly GalleryCell[]): ReactNode;
5
7
  export declare const CHART_PICTURES: Record<"bars" | "line" | "donut", ReactNode>;
6
8
  export declare function dividerPicture(style: DividerStyle): ReactNode;
7
9
  export declare const TAB_SHAPE_PICTURES: Record<"tabs" | "largeTabs", ReactNode>;
@@ -1 +1 @@
1
- import{jsx as t,jsxs as e}from"react/jsx-runtime";import{NoSymbolIcon as u}from"efficient-easel/icons";import{useId as p}from"react";import{STRIPE_GEOMETRY as E}from"../../../format/lib/sections/divider-style.js";const s=44,f=28;function y({children:n}){return t("svg",{width:s,height:f,viewBox:`0 0 ${s} ${f}`,"aria-hidden":"true",fill:"currentColor",stroke:"currentColor",strokeWidth:1.25,children:n})}const x=({x:n,y:w,w:c,t:h=2,faint:l=!1})=>t("rect",{x:n,y:w,width:c,height:h,rx:h/2,stroke:"none",opacity:l?.45:1}),r=({x:n,y:w,w:c,h})=>t("rect",{x:n,y:w,width:c,height:h,rx:2,fill:"none"}),o=({x:n,y:w})=>t("circle",{cx:n,cy:w,r:1.75,stroke:"none"}),i=({x1:n,y1:w,x2:c,y2:h})=>t("line",{x1:n,y1:w,x2:c,y2:h}),I={bars:e(y,{children:[t(x,{x:8,y:14,w:5,t:10}),t(x,{x:16,y:8,w:5,t:16}),t(x,{x:24,y:18,w:5,t:6}),t(x,{x:32,y:11,w:5,t:13})]}),line:e(y,{children:[t("polyline",{points:"6,22 14,15 22,18 30,8 38,11",fill:"none",strokeWidth:1.75,strokeLinejoin:"round"}),t(i,{x1:6,y1:25,x2:38,y2:25})]}),donut:e(y,{children:[t("circle",{cx:22,cy:14,r:9,fill:"none",strokeWidth:5,opacity:.45}),t("circle",{cx:22,cy:14,r:9,fill:"none",strokeWidth:5,strokeDasharray:"34 57",transform:"rotate(-90 22 14)"})]})};function P(n){if(n==="none")return t("span",{style:{display:"flex",width:s,height:f,alignItems:"center",justifyContent:"center"},children:t(u,{size:20})});if(n==="line")return t(y,{children:t(i,{x1:4,y1:14,x2:40,y2:14})});const{ink:w,period:c}=E[n],h=.4,l=[];for(let a=-12;a<s;a+=c*h)l.push(t("polygon",{points:`${a},22 ${a+w*h},22 ${a+w*h+10},6 ${a+10},6`,stroke:"none"},a));return t(T,{children:l})}function T({children:n}){const w=`sf-div-${p().replace(/[^\w-]/g,"")}`;return e(y,{children:[t("clipPath",{id:w,children:t("rect",{x:4,y:6,width:36,height:16,rx:2})}),t("g",{clipPath:`url(#${w})`,children:n})]})}const d=({x:n,y:w,w:c,h})=>t("rect",{x:n,y:w,width:c,height:h,rx:2,stroke:"none",opacity:.3}),S={tabs:e(y,{children:[t(x,{x:5,y:10,w:9}),t(x,{x:18,y:10,w:9,faint:!0}),t(x,{x:31,y:10,w:9,faint:!0}),t(i,{x1:4,y1:17,x2:40,y2:17}),t(x,{x:4,y:16,w:11,t:2})]}),largeTabs:e(y,{children:[t(i,{x1:4,y1:5,x2:40,y2:5}),t(o,{x:7,y:10}),t(x,{x:11,y:9,w:16}),t(x,{x:31,y:9,w:9,faint:!0}),t(i,{x1:4,y1:14,x2:40,y2:14}),t(o,{x:7,y:19}),t(x,{x:11,y:18,w:13,faint:!0}),t(x,{x:31,y:18,w:9,faint:!0}),t(i,{x1:4,y1:23,x2:40,y2:23})]})},k={card:e(y,{children:[t(r,{x:10,y:3,w:24,h:22}),t(d,{x:12,y:5,w:20,h:10}),t(x,{x:13,y:18,w:16}),t(x,{x:13,y:21,w:11,t:1.5,faint:!0})]}),cover:e(y,{children:[t(d,{x:10,y:3,w:24,h:22}),t(r,{x:10,y:3,w:24,h:22}),t(x,{x:13,y:17,w:16}),t(x,{x:13,y:21,w:11,t:1.5})]})},g={cards:e(y,{children:[t(r,{x:3,y:5,w:11,h:18}),t(r,{x:17,y:5,w:11,h:18}),t(r,{x:31,y:5,w:11,h:18}),t(x,{x:5,y:9,w:7}),t(x,{x:19,y:9,w:7}),t(x,{x:33,y:9,w:7}),t(x,{x:5,y:13,w:5,t:1.5,faint:!0}),t(x,{x:19,y:13,w:5,t:1.5,faint:!0}),t(x,{x:33,y:13,w:5,t:1.5,faint:!0})]}),"label-only":e(y,{children:[t("path",{d:"M8.5 7l3 3-3 3-3-3zM22.5 7l3 3-3 3-3-3zM36.5 7l3 3-3 3-3-3z",stroke:"none"}),t(x,{x:5,y:18,w:7}),t(x,{x:19,y:18,w:7}),t(x,{x:33,y:18,w:7})]})},L={table:e(y,{children:[t(r,{x:3,y:5,w:38,h:18}),t(i,{x1:15.7,y1:5,x2:15.7,y2:23}),t(i,{x1:28.3,y1:5,x2:28.3,y2:23}),t("path",{d:"M15.7 5v18M28.3 5v18",fill:"none",strokeWidth:2.5}),t(x,{x:6,y:9,w:6,t:3}),t(x,{x:19,y:9,w:6,t:3}),t(x,{x:31,y:9,w:6,t:3}),t(x,{x:6,y:18,w:7,t:1.5,faint:!0}),t(x,{x:19,y:18,w:7,t:1.5,faint:!0}),t(x,{x:31,y:18,w:7,t:1.5,faint:!0})]}),list:e(y,{children:[t(i,{x1:3,y1:7,x2:13,y2:7}),t(i,{x1:17,y1:7,x2:27,y2:7}),t(i,{x1:31,y1:7,x2:41,y2:7}),t(x,{x:3,y:11,w:6,t:3}),t(x,{x:17,y:11,w:6,t:3}),t(x,{x:31,y:11,w:6,t:3}),t(x,{x:3,y:17,w:8,t:1.5,faint:!0}),t(x,{x:17,y:17,w:8,t:1.5,faint:!0}),t(x,{x:31,y:17,w:8,t:1.5,faint:!0})]})},U={plain:e(y,{children:[t(x,{x:5,y:12,w:9,t:4}),t(x,{x:18,y:12,w:9,t:4}),t(x,{x:31,y:12,w:9,t:4})]}),cards:e(y,{children:[t(r,{x:3,y:7,w:11,h:14}),t(r,{x:17,y:7,w:11,h:14}),t(r,{x:31,y:7,w:11,h:14}),t(x,{x:5,y:13,w:7}),t(x,{x:19,y:13,w:7}),t(x,{x:33,y:13,w:7})]}),marks:e(y,{children:[t(x,{x:8,y:12,w:6,t:4}),t(x,{x:17,y:12,w:6,t:4}),t(x,{x:26,y:12,w:6,t:4}),t(x,{x:35,y:12,w:3,t:4})]})},O={overlay:e(y,{children:[t(d,{x:4,y:3,w:36,h:22}),t(r,{x:4,y:3,w:36,h:22}),t(x,{x:8,y:15,w:18,t:3}),t(x,{x:8,y:20,w:12})]}),stacked:e(y,{children:[t(x,{x:4,y:3,w:18,t:3}),t(x,{x:4,y:8,w:12}),t(d,{x:4,y:13,w:36,h:12}),t(r,{x:4,y:13,w:36,h:12})]})},A={split:e(y,{children:[t(x,{x:4,y:6,w:12,t:3}),t(x,{x:4,y:11,w:9,faint:!0}),t(i,{x1:20,y1:4,x2:20,y2:24}),t(x,{x:24,y:6,w:16}),t(x,{x:24,y:10,w:11,faint:!0}),t(x,{x:24,y:17,w:16}),t(x,{x:24,y:21,w:11,faint:!0})]}),spine:e(y,{children:[t(i,{x1:9,y1:4,x2:9,y2:24}),t(o,{x:9,y:8}),t(x,{x:14,y:7,w:24}),t(o,{x:9,y:14}),t(x,{x:14,y:13,w:20}),t(o,{x:9,y:20}),t(x,{x:14,y:19,w:24})]}),alternating:e(y,{children:[t(i,{x1:22,y1:4,x2:22,y2:24}),t(o,{x:22,y:8}),t(x,{x:4,y:7,w:14}),t(o,{x:22,y:14}),t(x,{x:26,y:13,w:14}),t(o,{x:22,y:20}),t(x,{x:4,y:19,w:14})]}),track:e(y,{children:[t(i,{x1:4,y1:12,x2:40,y2:12}),t(o,{x:8,y:12}),t(o,{x:22,y:12}),t(o,{x:36,y:12}),t(x,{x:4,y:17,w:8}),t(x,{x:18,y:17,w:8}),t(x,{x:32,y:17,w:8}),t(x,{x:4,y:21,w:6,faint:!0}),t(x,{x:18,y:21,w:6,faint:!0}),t(x,{x:32,y:21,w:6,faint:!0})]})},M={standard:e(y,{children:[t(x,{x:4,y:5,w:10,t:1.5,faint:!0}),t(x,{x:4,y:10,w:28,t:4}),t(x,{x:4,y:18,w:34,faint:!0}),t(x,{x:4,y:22,w:24,faint:!0})]}),editorial:e(y,{children:[t(x,{x:4,y:5,w:5,t:1.5,faint:!0}),t(x,{x:4,y:10,w:20,t:5}),t(x,{x:28,y:11,w:12,faint:!0}),t(x,{x:28,y:15,w:9,faint:!0}),t(i,{x1:4,y1:22,x2:40,y2:22})]}),simple:e(y,{children:[t(x,{x:4,y:8,w:10,t:1.5,faint:!0}),t(x,{x:4,y:13,w:26,t:4})]}),statement:e(y,{children:[t(x,{x:4,y:6,w:36,t:7}),t(x,{x:4,y:16,w:24,t:7})]}),natural:e(y,{children:[t(x,{x:4,y:8,w:22,t:3}),t(x,{x:4,y:15,w:34,faint:!0}),t(x,{x:4,y:19,w:28,faint:!0})]}),essay:e(y,{children:[t(x,{x:4,y:5,w:24,t:4}),t(x,{x:4,y:13,w:36,faint:!0}),t(x,{x:4,y:17,w:36,faint:!0}),t(x,{x:4,y:21,w:30,faint:!0})]})},b={"spec-card":e(y,{children:[t(r,{x:4,y:3,w:36,h:22}),t(x,{x:8,y:7,w:14}),t(r,{x:8,y:12,w:8,h:9}),t(r,{x:18,y:12,w:8,h:9}),t(r,{x:28,y:12,w:8,h:9})]}),fitment:e(y,{children:[t(r,{x:4,y:4,w:10,h:5}),t(r,{x:16,y:4,w:10,h:5}),t(r,{x:28,y:4,w:10,h:5}),t(x,{x:4,y:14,w:34,faint:!0}),t(x,{x:4,y:18,w:34,faint:!0}),t(x,{x:4,y:22,w:34,faint:!0})]}),portal:e(y,{children:[t(r,{x:4,y:3,w:36,h:22}),t(x,{x:8,y:7,w:10,t:4}),t(x,{x:8,y:14,w:16,faint:!0}),t(x,{x:26,y:18,w:10,t:4})]}),kanban:e(y,{children:[t(r,{x:4,y:3,w:10,h:22}),t(r,{x:17,y:3,w:10,h:22}),t(r,{x:30,y:3,w:10,h:22}),t(x,{x:6,y:6,w:6,t:4}),t(x,{x:6,y:12,w:6,t:4}),t(x,{x:19,y:6,w:6,t:4}),t(x,{x:32,y:6,w:6,t:4}),t(x,{x:32,y:12,w:6,t:4})]}),claims:e(y,{children:[t(x,{x:4,y:5,w:12,faint:!0}),t(x,{x:20,y:4,w:18,t:4}),t(x,{x:4,y:12,w:12,faint:!0}),t(x,{x:20,y:11,w:10,t:4}),t(x,{x:4,y:19,w:12,faint:!0}),t(x,{x:20,y:18,w:14,t:4})]}),browser:e(y,{children:[t(r,{x:4,y:3,w:36,h:22}),t(i,{x1:4,y1:8,x2:40,y2:8}),t(x,{x:8,y:11,w:28,t:5,faint:!0}),t(r,{x:8,y:18,w:8,h:4}),t(r,{x:18,y:18,w:8,h:4}),t(r,{x:28,y:18,w:8,h:4})]}),terminal:e(y,{children:[t(r,{x:4,y:3,w:36,h:22}),t("polyline",{points:"8,9 11,11 8,13",fill:"none"}),t(x,{x:13,y:10,w:14}),t(x,{x:8,y:16,w:22,faint:!0}),t(x,{x:8,y:20,w:16,faint:!0})]})},v={width:"5.75rem",height:"3.75rem"},D={width:"8.5rem",height:"3.75rem"},$={columns:e(y,{children:[t(r,{x:3,y:4,w:11,h:8}),t(r,{x:17,y:4,w:11,h:8}),t(r,{x:31,y:4,w:11,h:8}),t(x,{x:3,y:16,w:9}),t(x,{x:17,y:16,w:9}),t(x,{x:31,y:16,w:9}),t(x,{x:3,y:20,w:7,t:1.5,faint:!0}),t(x,{x:17,y:20,w:7,t:1.5,faint:!0}),t(x,{x:31,y:20,w:7,t:1.5,faint:!0})]}),"rows-left":e(y,{children:[t(r,{x:6,y:3,w:14,h:9}),t(x,{x:24,y:5,w:14}),t(x,{x:24,y:9,w:10,t:1.5,faint:!0}),t(r,{x:24,y:16,w:14,h:9}),t(x,{x:6,y:18,w:14}),t(x,{x:6,y:22,w:10,t:1.5,faint:!0})]}),"rows-right":e(y,{children:[t(r,{x:24,y:3,w:14,h:9}),t(x,{x:6,y:5,w:14}),t(x,{x:6,y:9,w:10,t:1.5,faint:!0}),t(r,{x:6,y:16,w:14,h:9}),t(x,{x:24,y:18,w:14}),t(x,{x:24,y:22,w:10,t:1.5,faint:!0})]})};export{L as CARD_LIST_STYLE_PICTURES,g as CARD_STYLE_PICTURES,I as CHART_PICTURES,$ as IMAGE_TEXT_ARRANGEMENT_PICTURES,O as INTRO_BLEED_PICTURES,v as LAYOUT_CELL,U as LOGO_LOOK_PICTURES,D as LONG_WORD_CELL,b as MOCKUP_PICTURES,k as POST_CARD_PICTURES,M as SECTION_HEAD_PICTURES,S as TAB_SHAPE_PICTURES,A as TIMELINE_PICTURES,P as dividerPicture};
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";import{NoSymbolIcon as k}from"efficient-easel/icons";import{useId as I}from"react";import{STRIPE_GEOMETRY as S}from"../../../format/lib/sections/divider-style.js";import{GALLERY_COLUMNS_PHONE as C}from"../../../format/lib/content/gallery-layout.js";const p=44,E=28;function y({children:n}){return t("svg",{width:p,height:E,viewBox:`0 0 ${p} ${E}`,"aria-hidden":"true",fill:"currentColor",stroke:"currentColor",strokeWidth:1.25,children:n})}const x=({x:n,y:w,w:l,t:o=2,faint:a=!1})=>t("rect",{x:n,y:w,width:l,height:o,rx:o/2,stroke:"none",opacity:a?.45:1}),r=({x:n,y:w,w:l,h:o})=>t("rect",{x:n,y:w,width:l,height:o,rx:2,fill:"none"}),c=({x:n,y:w})=>t("circle",{cx:n,cy:w,r:1.75,stroke:"none"}),i=({x1:n,y1:w,x2:l,y2:o})=>t("line",{x1:n,y1:w,x2:l,y2:o});function N(n){const o=20/C,a=5,h=1,T=[];let u=0,m=0,d=0;for(const[s,f]of n)u+s>C&&(m+=d*(a+h),u=0,d=0),T.push({x:12+u*o,y:m,w:s*o-h,h:f*a+(f-1)*h}),u+=s,d=Math.max(d,f);const P=m+d*(a+h)-h,R=(E-P)/2;return t(y,{children:T.map((s,f)=>t("rect",{x:s.x,y:R+s.y,width:s.w,height:s.h,rx:1,stroke:"none",opacity:.6},f))})}const b={bars:e(y,{children:[t(x,{x:8,y:14,w:5,t:10}),t(x,{x:16,y:8,w:5,t:16}),t(x,{x:24,y:18,w:5,t:6}),t(x,{x:32,y:11,w:5,t:13})]}),line:e(y,{children:[t("polyline",{points:"6,22 14,15 22,18 30,8 38,11",fill:"none",strokeWidth:1.75,strokeLinejoin:"round"}),t(i,{x1:6,y1:25,x2:38,y2:25})]}),donut:e(y,{children:[t("circle",{cx:22,cy:14,r:9,fill:"none",strokeWidth:5,opacity:.45}),t("circle",{cx:22,cy:14,r:9,fill:"none",strokeWidth:5,strokeDasharray:"34 57",transform:"rotate(-90 22 14)"})]})};function v(n){if(n==="none")return t("span",{style:{display:"flex",width:p,height:E,alignItems:"center",justifyContent:"center"},children:t(k,{size:20})});if(n==="line")return t(y,{children:t(i,{x1:4,y1:14,x2:40,y2:14})});const{ink:w,period:l}=S[n],o=.4,a=[];for(let h=-12;h<p;h+=l*o)a.push(t("polygon",{points:`${h},22 ${h+w*o},22 ${h+w*o+10},6 ${h+10},6`,stroke:"none"},h));return t(g,{children:a})}function g({children:n}){const w=`sf-div-${I().replace(/[^\w-]/g,"")}`;return e(y,{children:[t("clipPath",{id:w,children:t("rect",{x:4,y:6,width:36,height:16,rx:2})}),t("g",{clipPath:`url(#${w})`,children:n})]})}const _=({x:n,y:w,w:l,h:o})=>t("rect",{x:n,y:w,width:l,height:o,rx:2,stroke:"none",opacity:.3}),D={tabs:e(y,{children:[t(x,{x:5,y:10,w:9}),t(x,{x:18,y:10,w:9,faint:!0}),t(x,{x:31,y:10,w:9,faint:!0}),t(i,{x1:4,y1:17,x2:40,y2:17}),t(x,{x:4,y:16,w:11,t:2})]}),largeTabs:e(y,{children:[t(i,{x1:4,y1:5,x2:40,y2:5}),t(c,{x:7,y:10}),t(x,{x:11,y:9,w:16}),t(x,{x:31,y:9,w:9,faint:!0}),t(i,{x1:4,y1:14,x2:40,y2:14}),t(c,{x:7,y:19}),t(x,{x:11,y:18,w:13,faint:!0}),t(x,{x:31,y:18,w:9,faint:!0}),t(i,{x1:4,y1:23,x2:40,y2:23})]})},$={card:e(y,{children:[t(r,{x:10,y:3,w:24,h:22}),t(_,{x:12,y:5,w:20,h:10}),t(x,{x:13,y:18,w:16}),t(x,{x:13,y:21,w:11,t:1.5,faint:!0})]}),cover:e(y,{children:[t(_,{x:10,y:3,w:24,h:22}),t(r,{x:10,y:3,w:24,h:22}),t(x,{x:13,y:17,w:16}),t(x,{x:13,y:21,w:11,t:1.5})]})},W={cards:e(y,{children:[t(r,{x:3,y:5,w:11,h:18}),t(r,{x:17,y:5,w:11,h:18}),t(r,{x:31,y:5,w:11,h:18}),t(x,{x:5,y:9,w:7}),t(x,{x:19,y:9,w:7}),t(x,{x:33,y:9,w:7}),t(x,{x:5,y:13,w:5,t:1.5,faint:!0}),t(x,{x:19,y:13,w:5,t:1.5,faint:!0}),t(x,{x:33,y:13,w:5,t:1.5,faint:!0})]}),"label-only":e(y,{children:[t("path",{d:"M8.5 7l3 3-3 3-3-3zM22.5 7l3 3-3 3-3-3zM36.5 7l3 3-3 3-3-3z",stroke:"none"}),t(x,{x:5,y:18,w:7}),t(x,{x:19,y:18,w:7}),t(x,{x:33,y:18,w:7})]})},j={table:e(y,{children:[t(r,{x:3,y:5,w:38,h:18}),t(i,{x1:15.7,y1:5,x2:15.7,y2:23}),t(i,{x1:28.3,y1:5,x2:28.3,y2:23}),t("path",{d:"M15.7 5v18M28.3 5v18",fill:"none",strokeWidth:2.5}),t(x,{x:6,y:9,w:6,t:3}),t(x,{x:19,y:9,w:6,t:3}),t(x,{x:31,y:9,w:6,t:3}),t(x,{x:6,y:18,w:7,t:1.5,faint:!0}),t(x,{x:19,y:18,w:7,t:1.5,faint:!0}),t(x,{x:31,y:18,w:7,t:1.5,faint:!0})]}),list:e(y,{children:[t(i,{x1:3,y1:7,x2:13,y2:7}),t(i,{x1:17,y1:7,x2:27,y2:7}),t(i,{x1:31,y1:7,x2:41,y2:7}),t(x,{x:3,y:11,w:6,t:3}),t(x,{x:17,y:11,w:6,t:3}),t(x,{x:31,y:11,w:6,t:3}),t(x,{x:3,y:17,w:8,t:1.5,faint:!0}),t(x,{x:17,y:17,w:8,t:1.5,faint:!0}),t(x,{x:31,y:17,w:8,t:1.5,faint:!0})]})},G={plain:e(y,{children:[t(x,{x:5,y:12,w:9,t:4}),t(x,{x:18,y:12,w:9,t:4}),t(x,{x:31,y:12,w:9,t:4})]}),cards:e(y,{children:[t(r,{x:3,y:7,w:11,h:14}),t(r,{x:17,y:7,w:11,h:14}),t(r,{x:31,y:7,w:11,h:14}),t(x,{x:5,y:13,w:7}),t(x,{x:19,y:13,w:7}),t(x,{x:33,y:13,w:7})]}),marks:e(y,{children:[t(x,{x:8,y:12,w:6,t:4}),t(x,{x:17,y:12,w:6,t:4}),t(x,{x:26,y:12,w:6,t:4}),t(x,{x:35,y:12,w:3,t:4})]})},H={overlay:e(y,{children:[t(_,{x:4,y:3,w:36,h:22}),t(r,{x:4,y:3,w:36,h:22}),t(x,{x:8,y:15,w:18,t:3}),t(x,{x:8,y:20,w:12})]}),stacked:e(y,{children:[t(x,{x:4,y:3,w:18,t:3}),t(x,{x:4,y:8,w:12}),t(_,{x:4,y:13,w:36,h:12}),t(r,{x:4,y:13,w:36,h:12})]})},Y={split:e(y,{children:[t(x,{x:4,y:6,w:12,t:3}),t(x,{x:4,y:11,w:9,faint:!0}),t(i,{x1:20,y1:4,x2:20,y2:24}),t(x,{x:24,y:6,w:16}),t(x,{x:24,y:10,w:11,faint:!0}),t(x,{x:24,y:17,w:16}),t(x,{x:24,y:21,w:11,faint:!0})]}),spine:e(y,{children:[t(i,{x1:9,y1:4,x2:9,y2:24}),t(c,{x:9,y:8}),t(x,{x:14,y:7,w:24}),t(c,{x:9,y:14}),t(x,{x:14,y:13,w:20}),t(c,{x:9,y:20}),t(x,{x:14,y:19,w:24})]}),alternating:e(y,{children:[t(i,{x1:22,y1:4,x2:22,y2:24}),t(c,{x:22,y:8}),t(x,{x:4,y:7,w:14}),t(c,{x:22,y:14}),t(x,{x:26,y:13,w:14}),t(c,{x:22,y:20}),t(x,{x:4,y:19,w:14})]}),track:e(y,{children:[t(i,{x1:4,y1:12,x2:40,y2:12}),t(c,{x:8,y:12}),t(c,{x:22,y:12}),t(c,{x:36,y:12}),t(x,{x:4,y:17,w:8}),t(x,{x:18,y:17,w:8}),t(x,{x:32,y:17,w:8}),t(x,{x:4,y:21,w:6,faint:!0}),t(x,{x:18,y:21,w:6,faint:!0}),t(x,{x:32,y:21,w:6,faint:!0})]})},z={standard:e(y,{children:[t(x,{x:4,y:5,w:10,t:1.5,faint:!0}),t(x,{x:4,y:10,w:28,t:4}),t(x,{x:4,y:18,w:34,faint:!0}),t(x,{x:4,y:22,w:24,faint:!0})]}),editorial:e(y,{children:[t(x,{x:4,y:5,w:5,t:1.5,faint:!0}),t(x,{x:4,y:10,w:20,t:5}),t(x,{x:28,y:11,w:12,faint:!0}),t(x,{x:28,y:15,w:9,faint:!0}),t(i,{x1:4,y1:22,x2:40,y2:22})]}),simple:e(y,{children:[t(x,{x:4,y:8,w:10,t:1.5,faint:!0}),t(x,{x:4,y:13,w:26,t:4})]}),statement:e(y,{children:[t(x,{x:4,y:6,w:36,t:7}),t(x,{x:4,y:16,w:24,t:7})]}),natural:e(y,{children:[t(x,{x:4,y:8,w:22,t:3}),t(x,{x:4,y:15,w:34,faint:!0}),t(x,{x:4,y:19,w:28,faint:!0})]}),essay:e(y,{children:[t(x,{x:4,y:5,w:24,t:4}),t(x,{x:4,y:13,w:36,faint:!0}),t(x,{x:4,y:17,w:36,faint:!0}),t(x,{x:4,y:21,w:30,faint:!0})]})},B={"spec-card":e(y,{children:[t(r,{x:4,y:3,w:36,h:22}),t(x,{x:8,y:7,w:14}),t(r,{x:8,y:12,w:8,h:9}),t(r,{x:18,y:12,w:8,h:9}),t(r,{x:28,y:12,w:8,h:9})]}),fitment:e(y,{children:[t(r,{x:4,y:4,w:10,h:5}),t(r,{x:16,y:4,w:10,h:5}),t(r,{x:28,y:4,w:10,h:5}),t(x,{x:4,y:14,w:34,faint:!0}),t(x,{x:4,y:18,w:34,faint:!0}),t(x,{x:4,y:22,w:34,faint:!0})]}),portal:e(y,{children:[t(r,{x:4,y:3,w:36,h:22}),t(x,{x:8,y:7,w:10,t:4}),t(x,{x:8,y:14,w:16,faint:!0}),t(x,{x:26,y:18,w:10,t:4})]}),kanban:e(y,{children:[t(r,{x:4,y:3,w:10,h:22}),t(r,{x:17,y:3,w:10,h:22}),t(r,{x:30,y:3,w:10,h:22}),t(x,{x:6,y:6,w:6,t:4}),t(x,{x:6,y:12,w:6,t:4}),t(x,{x:19,y:6,w:6,t:4}),t(x,{x:32,y:6,w:6,t:4}),t(x,{x:32,y:12,w:6,t:4})]}),claims:e(y,{children:[t(x,{x:4,y:5,w:12,faint:!0}),t(x,{x:20,y:4,w:18,t:4}),t(x,{x:4,y:12,w:12,faint:!0}),t(x,{x:20,y:11,w:10,t:4}),t(x,{x:4,y:19,w:12,faint:!0}),t(x,{x:20,y:18,w:14,t:4})]}),browser:e(y,{children:[t(r,{x:4,y:3,w:36,h:22}),t(i,{x1:4,y1:8,x2:40,y2:8}),t(x,{x:8,y:11,w:28,t:5,faint:!0}),t(r,{x:8,y:18,w:8,h:4}),t(r,{x:18,y:18,w:8,h:4}),t(r,{x:28,y:18,w:8,h:4})]}),terminal:e(y,{children:[t(r,{x:4,y:3,w:36,h:22}),t("polyline",{points:"8,9 11,11 8,13",fill:"none"}),t(x,{x:13,y:10,w:14}),t(x,{x:8,y:16,w:22,faint:!0}),t(x,{x:8,y:20,w:16,faint:!0})]})},K={width:"5.75rem",height:"3.75rem"},F={width:"8.5rem",height:"3.75rem"},X={columns:e(y,{children:[t(r,{x:3,y:4,w:11,h:8}),t(r,{x:17,y:4,w:11,h:8}),t(r,{x:31,y:4,w:11,h:8}),t(x,{x:3,y:16,w:9}),t(x,{x:17,y:16,w:9}),t(x,{x:31,y:16,w:9}),t(x,{x:3,y:20,w:7,t:1.5,faint:!0}),t(x,{x:17,y:20,w:7,t:1.5,faint:!0}),t(x,{x:31,y:20,w:7,t:1.5,faint:!0})]}),"rows-left":e(y,{children:[t(r,{x:6,y:3,w:14,h:9}),t(x,{x:24,y:5,w:14}),t(x,{x:24,y:9,w:10,t:1.5,faint:!0}),t(r,{x:24,y:16,w:14,h:9}),t(x,{x:6,y:18,w:14}),t(x,{x:6,y:22,w:10,t:1.5,faint:!0})]}),"rows-right":e(y,{children:[t(r,{x:24,y:3,w:14,h:9}),t(x,{x:6,y:5,w:14}),t(x,{x:6,y:9,w:10,t:1.5,faint:!0}),t(r,{x:6,y:16,w:14,h:9}),t(x,{x:24,y:18,w:14}),t(x,{x:24,y:22,w:10,t:1.5,faint:!0})]})};export{j as CARD_LIST_STYLE_PICTURES,W as CARD_STYLE_PICTURES,b as CHART_PICTURES,X as IMAGE_TEXT_ARRANGEMENT_PICTURES,H as INTRO_BLEED_PICTURES,K as LAYOUT_CELL,G as LOGO_LOOK_PICTURES,F as LONG_WORD_CELL,B as MOCKUP_PICTURES,$ as POST_CARD_PICTURES,z as SECTION_HEAD_PICTURES,D as TAB_SHAPE_PICTURES,Y as TIMELINE_PICTURES,v as dividerPicture,N as galleryPhonePicture};
@@ -1,5 +1,6 @@
1
1
  import { type ReactElement, type ReactNode } from "react";
2
2
  import { type FieldsPatch } from "efficient-easel/easel";
3
+ import { type WordValues } from "../../../format/lib/editor-words.js";
3
4
  import { type MediaValue } from "../../../format/lib/media-value.js";
4
5
  import { type KnownVideoFrame, type LoadingShows } from "../../../format/lib/hero-video.js";
5
6
  import { readHidable, hidableText, type HidableValue } from "efficient-easel/draw";
@@ -122,9 +123,10 @@ export declare function plainTextarea(label: string, placeholder?: string, hint?
122
123
  export declare const BUCKET_ICONS: Record<Bucket, (props: {
123
124
  size?: number;
124
125
  }) => ReactElement>;
125
- export declare function panelNote(text: string): CustomField<undefined>;
126
- export declare function PanelNoteLine({ text }: {
126
+ export declare function panelNote(text: string, values?: WordValues): CustomField<undefined>;
127
+ export declare function PanelNoteLine({ text, values }: {
127
128
  text: string;
129
+ values?: WordValues;
128
130
  }): import("react").JSX.Element;
129
131
  export declare function isBucketHeader(field: unknown): boolean;
130
132
  export declare function bucketHeader(bucket: Bucket, tabs: readonly Bucket[] | null): CustomField<undefined>;
@@ -409,3 +411,4 @@ export declare function cardImageField(row?: typeof CARD_IMAGE_RADIUS_ROW): Cust
409
411
  export declare function cardImageFields(): Record<string, CustomField<unknown>>;
410
412
  export declare function imageCornersField(): CustomField<number | null>;
411
413
  export declare function galleryLayoutField(): CustomField<string>;
414
+ export declare function galleryLayoutPhoneField(): CustomField<string>;
@@ -1 +1 @@
1
- "use client";import{jsx as i,jsxs as P,Fragment as F}from"react/jsx-runtime";import{cloneElement as _e,createContext as xn,useContext as nt,useEffect as On,useId as ot,useRef as J,useState as Z}from"react";import{useEasel as re,useSelectedHost as B}from"efficient-easel/easel";import{PIN_LENGTH as ie,toDateKey as In,fromDateKey as En}from"efficient-shell/format";import{say as a,editorEaselWords as y}from"../../../format/lib/editor-words.js";import{finiteNumber as $}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as rt,firstFrameHint as Tn,loadingShowsOf as Rn,loadingStillHint as Nn}from"../../../format/lib/hero-video.js";import{pageFramesFor as kn,usePageVideoFrames as Pn}from"../page-video-frames.js";import{ScreenDocumentContext as Fn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as it,hidableText as st}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Ce,LINK_FIELD_MARKER as lt,MEDIA_FIELD_MARKER as at,SCAFFOLD_FIELD_MARKER as ct,TEXT_FIELD_MARKER as N,foldMetaOf as ye,textFieldIdentifier as An}from"efficient-easel/draw";import Ln from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as ut}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as vn,CARD_IMAGE_RADIUS_ROW as dt,CARD_IMAGE_RADIUS_STEP as Bn,CORNER_RADIUS_MAX as xe,CORNER_RADIUS_MIN as A}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Dn,IMAGE_CORNERS_LABEL as Hn,IMAGE_CORNERS_ROW as Gn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Mn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Wn,GALLERY_LAYOUTS as Oe,GALLERY_LAYOUT_KEYS as Un,galleryChoices as pt,galleryLayoutRatio as Kn,galleryPictureCells as Xn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as $n}from"./shell-glyph.js";import{anchorSiblingsOf as Vn,placementPoints as jn}from"../../../format/lib/hero-group-placement.js";import zn from"../../components/AnchorField.js";import Yn from"../../components/SourceStatus.js";import{AdjustIcon as qn,EyeIcon as Jn,AnimationIcon as Zn,BackgroundIcon as ft,BorderAllIcon as Qn,BlockSectionIcon as eo,ColumnWidthsIcon as Ie,ColumnsIcon as ht,CornerIcon as mt,DirectionDownIcon as to,DirectionLeftIcon as no,DirectionRightIcon as oo,DirectionUpIcon as ro,EditIcon as io,GapIcon as so,GridIcon as lo,GroundIcon as Ee,HashIcon as ao,HeightIcon as gt,ImageIcon as co,ListIcon as uo,LocationIcon as bt,PaddingBottomIcon as wt,PaddingLeftIcon as St,PaddingRightIcon as _t,PaddingTopIcon as Te,PageIcon as po,StickyIcon as Ct,SearchIcon as fo,SquareIcon as ho,TypeIcon as mo,WidthIcon as go}from"efficient-easel/icons";import{FieldGlyph as yt}from"../../components/FieldGlyph.js";import{resolvePageBackground as bo}from"../../../format/lib/content/page-background.js";import{BOX_FILL_FADE_PROP as wo,BOX_FILL_FADES as So,BOX_SWATCH_PROP as _o,boxFillFadeOf as xt,boxFillOf as Co,boxFillSlot as Re,boxPaintOf as yo}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as Ot,CORNER_SIDE_POINTS as xo,SECTION_CORNERS_ROW as It,hasOwnSectionCorners as Oo,normalizeCornerSides as Et}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as Tt}from"../../../format/lib/content/card-corners.js";import{enclosingPath as Io,enclosingSection as Eo}from"./enclosing-section.js";import{SettingsDefaultReset as x,SettingsDrill as To,SettingsField as _,SettingsGroup as Ro,SettingsSegmented as No,SettingsBorder as ko,SettingsSidesEach as Po,SettingsSwitch as Ne,borderSides as Fo,borderStartEach as Ao}from"efficient-easel/panel";import{ListField as Lo}from"efficient-easel/fields";import{DisplayChips as vo}from"efficient-shell/ui";import{desktopDisplayChanged as Bo,partShownOnDesktop as Do,partShownOnPhone as Ho,phoneDisplayChanged as Go,withDesktopPart as Mo,withPhonePart as Wo}from"../../../format/lib/content/part-display.js";import{ColorSwatch as Uo,CornersInput as Ko,DatePicker as Xo,DateTimePicker as $o,FOCAL_DEFAULT as Vo,IconPicker as Rt,COLUMN_COUNT_MAX as Nt,COLUMN_SHARE_MIN as jo,COLUMN_SHARES_EQUAL as zo,resolveColumnShares as kt,WidthsBar as Yo,useShellStrings as qo,IconButton as Pt,InputNumber as Ft,Slider as Jo,Tooltip as ke}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as Zo}from"./geocode-resolve.js";import{ColourRow as se,InheritedColourRow as At}from"./ColourControl.js";import{fillThemeColors as Qo,slotFill as le}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as Pe}from"../../../format/lib/document/part-inks.js";import{keptByRow as Fe}from"efficient-easel/screen/lib/document/style-fields";import Lt from"./MarkupToolbar.js";import{deviceField as E}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as er,NoControlMark as tr,noControlField as vt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as nr}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as or,PANEL_ONLY_FIELD as rr}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as ir,resolvePhoneValue as Ae}from"../../../format/lib/document/phone-override.js";import{phoneKey as V,tabletKey as Le,viewKeyAt as ve}from"efficient-easel/draw";import{viewKey as O}from"../../../format/lib/animation/views.js";import{viewRows as D}from"../animation/view-rows.js";import{SuppressibleText as sr}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as lr,CARD_OUTLINE_OPTIONS as ar,DEFAULT_CARD_INDEX_FORMAT as cr,DEFAULT_CARD_OUTLINE as ur}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as dr,DEFAULT_COVER_INDEX as pr}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as fr}from"efficient-easel/draw";import hr from"../../components/MediaUploadField.js";import mr from"../../components/MultiSelectField.js";import gr from"../../components/SectionThemePicker.js";import br from"../../components/SearchSelectField.js";import wr from"../../components/StorefrontLinkField.js";import{UiIcon as Bt}from"efficient-easel/draw/client";import{SECTION_PADDING as k}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Sr}from"../../../render/lib/content/button-look.js";import{usePreviewParts as _r}from"efficient-easel/draw/client";import{encodePartId as Cr}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as yr,useEaselStrings as xr}from"efficient-easel/strings";import{hasPhoneHeight as Or,hasTabletHeight as Be,resolveSectionMinHeight as Ir,resolveTabletHeight as Er}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as Tr,SECTION_PIN_ABOVE_HINT as Rr,SECTION_PIN_ABOVE_KEY as Nr,SECTION_PIN_ABOVE_LABEL as kr,SECTION_PIN_GROUP as Pr,SECTION_PIN_LABEL as Dt,SECTION_PIN_SCREENS_KEY as De,SECTION_PIN_SCREENS_LABEL as Ht,SECTION_PIN_STOP_DEFAULT as Fr,SECTION_PIN_STOP_HINT as Ar,SECTION_PIN_STOP_KEY as Lr,SECTION_PIN_STOP_LABEL as vr,SECTION_PIN_STOP_OPTIONS as Br,SECTION_STICK_DISTANCE as H,SECTION_STICK_DISTANCE_ROW as He,SOME_VIEW_PINS as Gt,hasPhoneStick as Dr,hasTabletStick as Hr,resolveSectionStick as ae,sectionPinStopOf as Gr,sectionPinStopWrite as Mr}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as Wr}from"../../../format/lib/content/css-length.js";import{SECTION_HEIGHT_MODES as Ur,SECTION_MIN_HEIGHT as Kr,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as Xr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as $r,resolveContainerDirection as Mt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Vr,BOX_BLOCK_SPACING_POINTS as Wt,BOX_PHONE_ROW_LABEL as Ut,BOX_COLUMNS_MAX as jr,BOX_COLUMNS_MIN as Kt,BOX_PHONE_ROW_MAX as zr,BOX_PHONE_ROW_MIN as Ge,BOX_SHARE_CHOICES as Xt,BOX_SHARE_LABEL as j,boxShareChoiceOf as $t,boxShareWidthsOf as Me,BOX_SHARE_PHONE_DEFAULT as Yr,BOX_SHARE_PHONE_POINTS as qr}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as G}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Vt,BORDER_SIDES as Jr,SECTION_BORDER_ROW as jt,borderBySide as zt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as Zr,normalizeTheme as Yt,normalizeThemeColors as Qr,sectionBandTone as ei,surfaceTwoTone as ti}from"../../../format/lib/theme.js";import{CONTAINER_GAP as qt,CONTAINER_GAP_BUILT_IN as ni,CONTAINER_GAP_PHONE as We,GAP_FIELD_CONTAINER as Ue,followsSitePhoneGap as oi,hasOwnContainerGap as ri,hasOwnPhoneGap as Ke,resolveContainerGap as Jt,resolvePhoneContainerGap as Zt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as ii,CARD_IMAGE_BG_OFF as si,CARD_IMAGE_BG_SWATCH_NAMES as li,CARD_IMAGE_BG_SWATCHES as ai,isCardImageBackgroundInheriting as ci,cardImageBackgroundChoice as ui,THEME_CARD_IMAGE_BG as di}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as pi,SECTION_BG_NO_FILL as fi,sectionBackgroundChoice as hi,THEME_SECTION_BG as Xe,isSectionBackgroundEmpty as mi,sectionBackgroundHex as Qt}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as gi,nestedAccentValue as en,resolveSectionAccent as ce}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as bi,TYPE_SIZE_INHERIT as wi,isTypeSizeInheriting as Si}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as _i,WIDTH_CHOICE_LABEL as Ci,WIDTH_INHERIT as yi}from"../../../format/lib/content/section-width.js";import{useEaselSession as xi}from"efficient-easel/screen/lib/session-context";import{backendOf as Oi}from"../website-session.js";import{BOX_GAP as Ii,describedAs as L,group as T,iconOf as z,sharedStyleKinds as ee}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as tn,onDesktopWords as M,phoneTwinFields as $e,saidAlignmentGrid as Ei,useLengthUnit as Ti}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as Ri,directionField as Ni,gapField as Ve,iconPickerRow as ki,lengthUnitFields as ue,pickerCellIcon as Pi,pickerNoneIcon as Fi,Segmented as de,select as Y,slider as W}from"./box-fields.js";import{VIEW_ABOVE as je}from"efficient-easel/screen/lib/content/length-units";import{tierOfView as nn,viewOfTier as Ai}from"../../../format/lib/content/view-tier.js";import{ownEntry as Li}from"../../../format/lib/own-entry.js";function Ma({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function U(e,t){return a("{value} from {from}",{value:e,from:t})}function vi(){const{blockGap:e}=G();return e===null?a("this container's own spacing"):U(`${e}px`,a("Styles"))}function Bi({inherited:e,onReset:t,label:n}){return i(x,{words:y()?.panel,label:a(n),changed:!e,detail:vi(),onReset:t})}function Di(e){return Ve({...Ii,builtIn:ni[e],resolve:(t,n)=>Jt(e,t,n?.siteGap),action:(t,n)=>i(Bi,{inherited:!ri(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[Ue]:e}})}function Hi(e){return ut(E("mobile",{[Ue]:e,type:"custom",render:t=>i(Wi,{container:e,...t})}),on)}function Gi(e){return ut(E("tablet",{[Ue]:e,type:"custom",render:t=>i(Mi,{container:e,...t})}),on)}const on={not:{field:"gap",in:Array.from({length:-qt.min},(e,t)=>qt.min+t)}};function Wa(e){return{gap:E("desktop",Di(e)),[Le("gap")]:Gi(e),[V("gap")]:Hi(e)}}function Mi({container:e,...t}){const[n]=R("gap"),{siteGap:o}=t.field??{},r=Math.max(We.min,Jt(e,n,o));return Ve({...We,builtIn:r,resolve:l=>Ke(l)?l:r,action:(l,c)=>i(x,{words:y()?.panel,label:a("Gap"),changed:Ke(l),detail:M(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function Wi({container:e,...t}){const[n]=R("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=Zt(e,void 0,n,o,r);return Ve({...We,builtIn:s,resolve:c=>Zt(e,c,n,o,r),action:(c,u)=>i(x,{words:y()?.panel,label:a("Gap"),changed:Ke(c),detail:U(`${s}px`,oi(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function Ua(e){return Ni({offered:$r(e),fallback:Mt(e,void 0),resolve:t=>Mt(e,t)})}function Ka(e,t){return jn(t?Vn(e,t):[],t)}function Ui({inherited:e,onReset:t,label:n}){return i(x,{words:y()?.panel,label:a(n),changed:!e,detail:U(a("Full"),a("the page")),onReset:t})}function K({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:l=!0,markup:c=!0}){const{text:u,hidden:d}=it(e),h=J(null),p=J(null),f=C=>t(l?{text:C,hidden:d}:C),m=()=>t({text:u,hidden:!d}),g=l&&d,b=ot(),S=r?ji(r)?i("span",{className:"sf-hint-while-typing",children:a(r)}):a(r):void 0,w=d?a("Show {label} on the slide",{label:a(n)}):a("Hide {label} on the slide",{label:a(n)});return i(_,{label:a(n),icon:i(mo,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:S,action:l?i(ke,{content:w,children:i(Pt,{"aria-pressed":d,"aria-label":w,onClick:m,children:d?i(Bt,{name:"eye-off",size:14}):i(Bt,{name:"eye",size:14})})}):void 0,children:P("div",{className:"sf-copybox",children:[c&&i(Lt,{target:s?p:h,value:u,onChange:f}),s?i("textarea",{id:b,ref:p,value:u,placeholder:o===void 0?void 0:a(o),onChange:C=>f(C.target.value)}):i("input",{id:b,ref:h,type:"text",value:u,placeholder:o===void 0?void 0:a(o),onChange:C=>f(C.target.value)})]})})}function Xa(e,t){return{...e,[ct]:t}}function $a(e){const t=e[N];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[N]:{...t,offPage:!0}}}function Va(e){return!e||typeof e!="object"?!1:e[N]?.offPage===!0}function ja(e){if(!e[N])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[rr]:!0}}function za(e){return or(e)}function Ya(e){const t=e[N];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[N]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as iu,SCALAR_TEXT_CONTROLS as su}from"efficient-easel/draw";function qa(e,t){if(!e[N])throw new Error("inOwnBox: the field holds no authored text");const{[er]:o,...r}=e;return{...r,[nr]:!0,render:t}}const Ki=new Set(fr),pe={type:"radio",options:[{value:!0},{value:!1}]},rn={text:{type:"object",objectFields:{text:{type:"text"},hidden:pe}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:pe}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},X=(e,t)=>{const n=L({...t,[N]:e},{...rn[e.control],label:e.label});if(!Ki.has(e.control))return n;const o=t.render;return{...vt(n,"authored-copy"),render:r=>i(sr,{name:r.name,children:o(r)})}},Ja="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Xi={field:"source.slug",set:!0},Za={not:Xi},$i="Select a word, then press the highlighter.",Vi=new Set([$i]),ji=e=>Vi.has(e);function Qa(e,t,n){return X({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function ec(e,t,n){return X({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function tc(e,t,n){return X({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function nc(e,t,n){return X({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function oc(e){return{type:"custom",[lt]:{label:e},...L({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(wr,{value:st(t),onChange:n,label:e})}}function rc(e,t,n){return X({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const ic={Design:qn,Animation:Zn};function sc(e){return{type:"custom",render:()=>i(zi,{text:e})}}function zi({text:e}){return i("p",{className:"sf-note",children:a(e)})}function lc(e){return ye(e)!==null&&e?.tabs!==void 0}const sn=new Map;function ac(e,t){const n=`${e}\0${t?t.join(""):""}`,o=sn.get(n)??{type:"custom",tabs:t,[Ce]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(F,{})};return sn.set(n,o),o}const ln=new Map;function cc(e){const t=ln.get(e)??{type:"custom",[Ce]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(F,{})};return ln.set(e,t),t}function Yi(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function uc(e,t){return Yi(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(F,{})}}function dc(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(F,{})}}function pc({title:e,children:t}){const[n,o]=Z(()=>!ze.has(e));return i(Ro,{title:e,open:n,onToggle:r=>{o(r),r?ze.delete(e):ze.add(e)},children:t})}const ze=new Set;function qi({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),s=r?o?.[r]:void 0,l=s?a(s):t;return P("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?a(o[c]):c;return i(ke,{content:u,children:i(Uo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:l})]})}function fc(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(Ji,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function Ji({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const s=typeof o=="string"?o:void 0,{colors:l,n:c}=Qe(),u={background:l.background,surface:l.surface,surface2:ti(l),band:ei(l)},d=n?Xe:t,h=mi(s,t,d),p=Qt(void 0,d,u),f=n?pi:void 0,m=d===Xe?a("the theme's section background"):a("Theme {n} background",{n:c}),g=Zi(s,t,l,c,u,r),b=U(p.toUpperCase(),m),S=Pe(s),w=S?le(S,l,c):null;return w?i(se,{label:a(e),icon:i(ft,{}),value:w.hex,caption:w.words,onChange:r,changed:!0,onReset:()=>r(f),resetTo:b,choices:g}):i(At,{label:a(e),icon:i(ft,{}),value:h?"":Qt(s,t,u),inherited:p,resetTo:b,onChange:r,onReset:()=>r(f),choices:g})}function Zi(e,t,n,o,r,s){const l=hi(e,t);return[{label:a("No fill"),color:"",selected:l==="none",onPick:()=>s(fi)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:l==="band",onPick:()=>s(Xe)},...Ze(Pe(e)??"",n,o,s)]}function Qi(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=ci(r,t);return i(_,{label:a(e),icon:i(Ee,{}),changed:!s,action:i(x,{words:y()?.panel,label:a(e),changed:!s,detail:a("the theme's image stage"),onReset:()=>o(ii)}),children:qi({swatches:ai,current:s?di:ui(r,t),onPick:o,names:li})})}}}function hc(e=n=>n,t){return ee({_gSectionTheme:T(gi),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(gr,{value:e(n),onChange:o,followLabel:t})}})}function fe(e){const t=I(),n=nn(e?.view),o=l=>ve(e.valueKey,l),r=e.numbersIn??(l=>$(t[o(l)])!==void 0),s=e.followsView??hs(n,r);return Ti({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:Ri,label:a(e.label),grid:e.grid,hasOwn:r(n),view:{tier:n,numbersIn:r,followsView:s},convertTo:e.convertTo??(l=>{const c=$(t[o(n)]);return c===void 0?{}:{[o(n)]:l(c)}})})}function q({min:e,max:t,step:n,value:o,onChange:r,suffix:s="",readout:l=!0,notch:c,ariaLabel:u,disabled:d=!1,placeholder:h,placeholderWord:p,onClear:f,units:m}){const g=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:g?"sf-slider has-notch":"sf-slider",style:g?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(Jo,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...p?{emptyLabel:a(p)}:{},suffix:s||void 0,...m?{units:m}:{},showInput:l,label:u===void 0?void 0:a(u),disabled:d,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:b=>{b===null?f?.():b!==o&&r(b)}})})}function es(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:l,restTrack:c,unsetMark:u,icon:d,unit:h="px"}=t;return{type:"custom",render:({value:p,onChange:f})=>{const m=typeof p=="number"?p:null,g=m===null;return i(_,{label:a(e),icon:d?z(d):void 0,value:g?u||s===void 0?void 0:a(s):`${m}${h}`,changed:!g,action:u?_e(u,{changed:!g,onReset:()=>f(null)}):i(x,{words:y()?.panel,label:a(e),changed:!g,onReset:()=>f(null)}),hint:typeof l=="string"?a(l):l,children:c?c({min:n,max:o,step:r,px:m,label:e,onChange:f}):q({min:n,max:o,step:r,value:m??n,readout:!1,ariaLabel:e,onChange:f})})}}}const te="Corners",ts={kind:"radius"};function Ye(e){return{type:"custom",render:t=>{const{value:n,onChange:o}=t,r=typeof n=="number"&&Number.isFinite(n)?n:null,s=r!==null;return i(_,{label:a(te),icon:i(mt,{}),changed:s,action:_e(e.mark,{changed:s,onReset:()=>o(null)}),hint:e.hint,children:i(ns,{tier:e,px:r,name:t.name,onRadius:o})})}}}function R(e){const t=B();return[t?.values?.[e],n=>t?.onChange(e,n)]}function an(){return vt({type:"custom",render:()=>i(tr,{})},"always")}function he(){const e=B();return t=>e?.onChangeMany(t)}function ns({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[s,l]=R(e.sidesKey),c=he(),u=fe({row:e.row??ts,label:te,grid:{min:A,max:xe,step:e.step??1},valueKey:n??"",view:"desktop"}),d=Et(s)??[...Ot];return i(Ko,{label:a(te),value:d,corners:xo,onChange:h=>{const p=Et(h)??[];l(p.length===Ot.length?null:p)},radius:t,onRadiusChange:u&&n?h=>c({[n]:h,...u.unitPatch(h===null)}):o,radiusMin:u?.grid.min??A,radiusMax:u?.grid.max??xe,radiusStep:u?.grid.step??e.step??1,radiusPlaceholder:u&&u.unit!=="px"?"–":String(r),...u?{radiusUnit:u.unit,units:u.units}:{}})}function cn(e,t){return ue(e,t)}function un(){return an()}function os({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=G(),r=typeof o=="number"?`${o}px`:a("not set");return i(x,{words:y()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):U(r,a("Styles")),onReset:n})}function rs(){const{cornerRadiusPx:e}=G();return typeof e=="number"?e:A}function is(){return Ye({sidesKey:"sectionCornerSides",row:It,useFollowed:rs,mark:i(os,{label:te}),hint:ss})}const ss="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function mc(){return ee({_gShape:T("Shape"),sectionCorners:is(),...cn(It,"sectionCorners"),sectionCornerSides:un(),...D("sectionBorder",fs),...ue(jt,"sectionBorder",{tablet:!0,phone:!0})})}const ls=()=>({width:a("Border width"),sides:{top:a("Border top"),right:a("Border right"),bottom:a("Border bottom"),left:a("Border left")},style:a("Border style"),styles:{solid:a("Solid"),dashed:a("Dashed"),dotted:a("Dotted")},color:a("Border color"),unit:"px"});function as(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function cs(){let e;try{const t=Yt(G().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Zr.line}function us({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:s=!0,above:l={},length:c}){const u=e&&typeof e=="object"?e:{},[d,h]=Z(()=>r?Ao(u,l):!1),p=ls(),f=m=>as(r&&s?m:{width:m.width,color:m.color,...s?{style:m.style}:{}});return i(_,{label:a("Border"),icon:i(Qn,{}),action:r?i(Po,{each:d,label:a("Each side"),onChange:h}):void 0,children:i(ko,{label:a("Border"),value:u,each:d,onChange:m=>t(f(m)),placeholder:n,presets:o,words:c?{...p,unit:c.unit}:p,styles:s,max:c?.grid.max??Vt,...c?{step:c.grid.step,units:c.units}:{}})})}function ds({value:e,onChange:t,view:n}){const[o]=R("sectionBorder"),[r]=R(Le("sectionBorder")),s=cs(),l=f=>f&&typeof f=="object"?f:{},c=n==="phone"?{...zt(l(o)),...zt(l(r))}:n==="tablet"?l(o):{},u=I(),d=he(),h=O("sectionBorder",n),p=fe({row:jt,label:"Border",grid:{min:0,max:Vt,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>qe(u[ve("sectionBorder",f)]),convertTo:f=>{const m=l(u[h]);return qe(m)?{[h]:ps(m,f)}:{}}});return i(us,{value:e,length:p,onChange:p?f=>d({[h]:f,...p.unitPatch(!qe(f))}):t,placeholder:{sides:Fo(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}const dn=["width",...Jr];function qe(e){if(!e||typeof e!="object")return!1;const t=e;return dn.some(n=>$(t[n])!==void 0)}function ps(e,t){const n={...e};for(const o of dn){const r=$(n[o]);r!==void 0&&(n[o]=t(r))}return n}function fs(e){return{type:"custom",render:({value:t,onChange:n})=>i(ds,{value:t,onChange:n,view:e})}}function hs(e,t){let n=je[e];for(;n&&je[n]!==null&&!t(n);)n=je[n];return n??e}function gc(e){return{type:"custom",render:()=>i(ms,{partKey:e})}}function ms({partKey:e}){const[t]=R("id"),[n]=R("_partStyles"),{textStyles:o}=G(),r=xr();let s=null;try{s=_r().select}catch{s=null}const l=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(To,{name:a("Text"),preview:Sr(l,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??yr.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(Cr(t,e))}})}function pn(e){const{cornerRadiusPx:t}=G(),n=typeof t=="number"?t:e;let o=null;try{const{appState:s,selectedItem:l}=re(u=>u),c=l?.props?.id?String(l.props.id):void 0;o=c?Eo(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Oo(r)?r:n}function gs({label:e,changed:t=!1,onReset:n=()=>{}}){const o=pn(A);return i(x,{words:y()?.panel,label:a(e),changed:t,detail:U(`${o}px`,a("the section")),onReset:n})}function bs(){return i(F,{children:a("Follows the section's Corners until you set a number here.")})}function ws(){return Ye({sidesKey:"cardCornerSides",row:Tt,useFollowed:()=>pn(A),mark:i(gs,{label:te}),hint:i(bs,{})})}function Ss(){return{type:"custom",render:()=>i(Ln,{})}}function bc(){return{_gShape:T("Shape"),cardCorners:ws(),...cn(Tt,"cardCorners"),cardCornerSides:un(),cardCornersApplyAll:Ss()}}function _s(){return L({type:"custom",render:e=>i(ys,{...e})},{type:"select",label:j,options:[{value:"content",label:"Fit content"},{value:"equal",label:"Equal"},{value:[50],label:"Custom: the width of each block in %, the last block left out"}]})}function Cs(e,t){const n=$t(e);if(n!=="custom")return a(Xt.find(r=>r.value===n)?.label??"");const o=kt(Me(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):a("Custom")}function ys(e){const{value:t,onChange:n}=e,[o]=R("content"),r=Array.isArray(o)?o.length:0,s="follows"in e,l=t!=null,c=l?t:s?e.follows:void 0,u=$t(c),d=r>=2&&r<=Nt,h=()=>[...zo[r]??[]],p=J(null),f=w=>{const C=p.current;C&&JSON.stringify(w)===JSON.stringify(C.shares)?n(C.value):w&&n(w)},m=w=>{w===u||w==="custom"&&!d||n(w==="custom"?h():w)},g=a("The width bar works for 2 to {count} blocks.",{count:Nt}),b=l&&(s||t!=="content"),S=qo().widths.hint(r,jo);return i(_,{label:a(j),icon:i(Ie,{}),changed:b,hint:u!=="custom"?void 0:d?S:g,action:i(x,{words:y()?.panel,label:a(j),changed:b,disabled:e.readOnly===!0,detail:s?M(w=>a(w),Cs(e.follows,r),e.followsView):a("Fit content"),onReset:()=>n(void 0)}),children:P("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(Rt,{label:a(j),value:u,options:Xt.map(w=>({value:w.value,label:w.value==="custom"&&!d?g:a(w.label),icon:Pi(i("span",{className:"sf-gallery-pic sf-share-pic",children:fn(w.weights).map((C,v)=>i("i",{style:{gridColumn:`span ${C}`}},v))}),a(w.label),w.value==="custom"&&!d?g:a(w.label))})),onChange:m,columns:3,cell:hn,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&d?i("div",{onFocus:()=>{p.current={value:t,shares:kt(Me(c,r),r)}},onBlur:()=>{p.current=null},children:i(Yo,{label:a(j),count:r,value:Me(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function fn(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function wc(){return Y(Vr,i(so,{}),Wt,Wt[0].value)}function Sc(){return E("mobile",ki(j,i(Ie,{}),qr.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:fn(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),Yr,{columns:2,cell:hn}))}const hn={width:"5.75rem",height:"3.25rem"};function _c(){return $e("share",_s(),tn)[Le("share")]}function xs(){return E("mobile",W(Ut,i(ht,{}),Ge,zr,1,Ge,"",{clear:{phoneFollows:!1,hint:Ge}}))}const mn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Cc(){const e=W(Ut,i(ht,{}),Kt,jr,1,Kt,"",{clear:{emptyLabel:"Auto"}}),t=$e("columns",e,{...mn,tablet:tn.tablet}),n=$e("columns",e,mn,{phoneRow:xs()});return{...t,phoneRow:n.phoneRow}}function yc(e,t,n,o,r,s,l){return{type:"custom",render:({value:c,onChange:u,name:d})=>i(Os,{label:e,min:t,max:n,step:o,fallback:r,role:s,value:c,onChange:u,name:d??"",length:l})}}function Os({label:e,min:t,max:n,step:o,fallback:r,role:s,value:l,onChange:c,name:u,length:d}){const h=I(),p=he(),f=nn(d?.view),m=fe({row:d?.row??{kind:"fontSize"},label:e,grid:{min:t,max:n,step:o},valueKey:d?u:"",view:d?.view??"desktop",numbersIn:b=>b===f&&typeof h[u]=="number",followsView:f,convertTo:b=>typeof h[u]=="number"?{[u]:b(h[u])}:{}}),g=b=>m?p({[u]:b,...m.unitPatch(typeof b!="number")}):c(b);return i(_,{label:a(e),icon:i(yt,{noun:s}),action:i(x,{words:y()?.panel,label:a(e),changed:!Si(l),detail:a("the Text style in Styles"),onReset:()=>g(wi),defaultAction:{onPress:()=>g(bi),title:a("Keep this section's own built-in size"),icon:i(eo,{})}}),children:q({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof l=="number"?l:r,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:g})})}function xc(){return{_gCellWidth:T("Cell width"),gridSpan:Y("Positions",i(Ie,{}),[{label:"Auto",value:""},...Array.from({length:Mn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function I(){let e=null,t=null;try{e=nt(Is),t=re(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Is=xn(null);function Es({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:l,fallback:c}){const u=I()[l],d=Ae(void 0,u,c);return i(F,{children:q({min:e,max:t,step:n,value:Ae(o,u,c),readout:!1,ariaLabel:r,notch:d,onChange:s})})}function Ts({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const l=I()[t],c=Ae(void 0,l,n);return i(x,{words:y()?.panel,label:a(e),changed:r,detail:M(u=>a(u),`${c}${o}`),onReset:s})}function Rs(e){return es(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Ts,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Es,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Ns={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},ks={Top:Te,Bottom:wt,Left:St,Right:_t},Ps=e=>{const t=ks[e];return i(t,{})};function Oc(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>Ns[S],s=S=>W(r("Top"),i(Te,{}),k.min,k.max,k.step,S,"px"),l=(S,w,C,v=k)=>E("mobile",Rs({label:r(S),icon:Ps(S),desktopKey:w,min:v.min,max:v.max,step:v.step,fallback:C})),c=e.top??k.min,u=e.bottom??k.min,d="sectionPaddingLeft",h="sectionPaddingRight",p=e.sideBounds??k,f=e.side??p.min,m=e.sidePhone??f,g=e.phone===!0,b=S=>g?E("desktop",S):S;return ee({...o?{_gSpacing:T("Padding")}:{},[t]:b(s(c)),...g?{[V(t)]:l("Top",t,c)}:{},...e.only==="top"?{}:{[n]:b(W(r("Bottom"),i(wt,{}),k.min,k.max,k.step,u,"px")),...g?{[V(n)]:l("Bottom",n,u)}:{}},...e.sides?{[d]:b(W(r("Left"),i(St,{}),p.min,p.max,p.step,f,"px")),...g?{[V(d)]:l("Left",d,m,p)}:{},[h]:b(W(r("Right"),i(_t,{}),p.min,p.max,p.step,f,"px")),...g?{[V(h)]:l("Right",h,m,p)}:{}}:{}})}function Ic(e,t){const n=Object.fromEntries(Object.entries(t).map(([s,l])=>[s,s in e&&ye(l)?e[s]:l])),o={};let r=!1;for(const[s,l]of Object.entries(e)){if(s in t){r||Object.assign(o,n),r=!0;continue}o[s]=l}return r||Object.assign(o,n),o}const me="Width";function Ec(e,t=_i,n=!0){const o=t.map(r=>({label:Ci[r],value:r}));return ee({...n?{_gWidth:T(me)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(_,{label:a(me),icon:i(go,{}),action:n?i(Ui,{inherited:s?.inherited??!1,onReset:()=>r(yi),label:me}):void 0,children:de({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:me})})}})}function Tc({fill:e=!1}={}){const t=(r,s)=>({type:"custom",render:({value:l,onChange:c})=>i(Fs,{value:l,onChange:c,view:r,badge:s,fill:e})}),n=()=>Fe("sectionHeightMode"),o=()=>Fe("sectionHeightMode");return ee({_gHeight:T(Q),...D("sectionHeightMode",r=>r==="desktop"?t(r):t(r,s=>i(Bs,{view:r,onClear:()=>s(void 0)}))),...D("sectionHeightValue",n),...D("sectionHeightUnit",o)})}function Fs({value:e,onChange:t,view:n,badge:o,fill:r=!1}){const s=I(),{mode:l,number:c,unit:u}=As(n,s,e);return i(_,{label:Q,icon:z(i(gt,{})),action:o?o(t):void 0,children:P("div",{className:"es-width-stack",children:[de({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...r?[{label:"Fill",value:"fill"}]:[]],value:l,onChange:t,ariaLabel:Q}),c?i(vs,{view:n,mode:l,menu:u}):null]})})}function gn(e,t){return e==="phone"&&Be(t)?Er(t):Ir(t)}function ge(e,t){return e==="desktop"||(e==="tablet"?Be(t):Or(t))?null:gn(e,t)}function As(e,t,n){const r=(s=>Ur.includes(s))(n)?n:ge(e,t)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function Ls(e,t,n,o){const r=ge(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[O("sectionHeightMode",e)]:r.mode,...r.mode==="fixed"?{[O("sectionHeightUnit",e)]:r.unit}:{},...n==="sectionHeightUnit"?{[O("sectionHeightValue",e)]:r.value}:{},[O(n,e)]:o}}function bn(e,t,n){const o=B(),r=ge(e,I());return!o||!r?{followed:null,write:n}:{followed:r,write:l=>o.onChangeMany(c=>{const u=Ls(e,c,t,l);return u===null?{[O(t,e)]:l}:Object.keys(u).length?u:null})}}function vs({view:e,mode:t,menu:n}){const o=B(),r=I(),s=O("sectionHeightValue",e),l=O("sectionHeightUnit",e),c=S=>w=>o?.onChangeMany(()=>({[S]:w})),{followed:u,write:d}=bn(e,"sectionHeightValue",c(s)),{write:h}=bn(e,"sectionHeightUnit",c(l)),p=t==="screen"?"%":r[l],f=(u?u.unit:p)==="%"?"%":"px",m=f==="%"?Xr:Kr,g=r[s],b=n?{options:["px","%"],label:a("Unit"),onChange:S=>h(S)}:void 0;return q({min:m.min,max:m.max,step:m.step,value:u?null:typeof g=="number"?g:m.fallback,...u?{placeholder:u.value}:{},suffix:f,...b?{units:b}:{},ariaLabel:Q,onChange:d})}function Bs({view:e,onClear:t}){const n=I(),o=ge(e,n)===null,r=e==="phone"&&Be(n),s=gn(e,n),l=M(c=>a(c),s.mode==="auto"?a("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return i(x,{words:y()?.panel,label:a(Q),changed:o,detail:l,onReset:t})}function Rc(e={}){const t=e.intro===!0,n=s=>({type:"custom",render:({value:l,onChange:c,id:u,name:d})=>i(Ks,{value:l,onChange:c,labelId:`${u??d??"stickTop"}-label`,view:s,intro:t})}),o=s=>({type:"custom",render:({value:l,onChange:c})=>i(Ms,{value:l,onChange:c,view:s,intro:t})}),r=s=>({type:"custom",render:({value:l,onChange:c})=>i(Ws,{value:l,onChange:c,view:s,intro:t})});return{_gStick:T(Pr,{dot:t?Gs:Gt}),...D("stickTop",n),...D("stickTopDistance",o),...ue(He,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?D(De,r):{},...t?{}:{[Lr]:Ds()},...t||e.above===!1?{}:{[Nr]:Hs()}}}function Ds(){const e=Y(vr,i(Te,{}),Br,Fr);return E("desktop",{...e,render:t=>{const n=e.render({...t,value:Gr(t.value),onChange:o=>t.onChange(Mr(o))});return _e(n,{hint:a(Ar)})}})}function Hs(){const e=_n(kr,!1,i(Ct,{}),Rr);return E("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const Gs={any:[Gt,Tr]};function wn(e,t,n,o,r){const s=B(),l=I(),c=e==="desktop"||ne(e,l)?null:Je(e,ae(l,{intro:o}));return{followed:c,write:(c||r)&&s?d=>s.onChangeMany(h=>{const p=Us(e,h,d,t,o),f=p===null?{[O(t,e)]:d}:p;return Object.keys(f).length?{...f,...r?.(d)??{}}:null}):n}}function Ms({value:e,onChange:t,view:n,intro:o}){const r=I(),s=ae(r,{intro:o}),l=h=>{const p=Ai(h);return p==="desktop"||ne(p,r)},c=fe({row:He,label:"Distance from top",grid:{min:H.min,max:H.max,step:H.step},valueKey:"stickTopDistance",view:n,numbersIn:h=>l(h)&&$(r[ve("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&s.ownTablet?"tablet":"desktop"}),{followed:u,write:d}=wn(n,"stickTopDistance",t,o,c?h=>c.unitPatch(h===void 0):void 0);return i("div",{className:"sf-field",children:q({min:c?.grid.min??H.min,max:c?.grid.max??H.max,step:c?.grid.step??H.step,value:u?null:typeof e=="number"?e:H.fallback,...u?{placeholder:u.distance}:{},...c?{suffix:c.unit,units:c.units}:{suffix:"px"},ariaLabel:a("Distance from top"),onChange:d})})}function Ws({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:s}=wn(n,De,t,o);return i(_,{label:a(Ht),icon:z(i(gt,{})),children:q({min:ie.min,max:ie.max,step:ie.step,value:r?null:$(e)??ie.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Ht),onChange:s})})}function ne(e,t){return e==="tablet"?Hr(t):Dr(t)}function Je(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,unit:t.tabletUnit,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,unit:t.desktopUnit,screens:t.desktopScreens}}function Us(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ne(e,t))return null;if(n===void 0)return{};const s=Je(e,ae(t,{intro:r})),l=e==="phone"&&ne("tablet",t)?h=>O(h,"tablet"):h=>h,c=(h,p)=>t[l(h)]==null?{}:{[O(h,e)]:p},u=He.unitKey,d=t[l(u)]==null?{}:{[O(u,e)]:s.unit};return{[O("stickTop",e)]:!0,...c("stickTopDistance",s.distance),...d,...c(De,s.screens),[O(o,e)]:n}}function Ks({value:e,onChange:t,labelId:n,view:o,intro:r}){const s=I(),l=ae(s,{intro:r}),c=o==="phone"?l.phone:o==="tablet"?l.tablet:r?l.desktop:e===!0,u=o==="phone"&&l.ownTablet,d=o==="desktop"?null:Je(o,l),h=d?.on?Wr(d.distance,d.unit):a("Off");return i(_,{label:a(Dt),labelId:n,icon:z(i(Ct,{})),action:P(F,{children:[o!=="desktop"?i(x,{words:y()?.panel,label:a(Dt),changed:ne(o,s),detail:M(p=>a(p),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(Ne,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const Sn="e.g. about";function Nc(){return{_gAnchor:T("Anchor"),anchor:X({control:"plainText",label:"Name",placeholder:Sn},{type:"custom",render:({value:e,onChange:t})=>i(zn,{value:e,onChange:t,nameBox:(n,o)=>i(K,{value:n,onChange:o,label:"Name",placeholder:Sn,hideable:!1,markup:!1})})})}}function kc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i($o,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:d=>r(d?d.toISOString():"")})})}}}function Pc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-date`;return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(Xo,{id:c,value:En(typeof o=="string"?o:null),onChange:u=>r(u?In(u):"")})})}}}function _n(e,t,n,o){return{type:"custom",...L({},{...pe,label:e}),render:r=>{const{value:s,onChange:l,id:c,name:u}=r,d="follows"in r,h=r,p=typeof s=="boolean",f=typeof h.follows=="boolean"?h.follows:t,m=p?s:d?f:t,g=`${c??u??e}-label`,b=h.readOnly===!0,S=i(Ne,{checked:m,onChange:l,disabled:b,ariaLabelledBy:g});return i(_,{label:a(e),labelId:g,icon:n,hint:o===void 0?void 0:a(o),action:d?P(F,{children:[i(x,{words:y()?.panel,label:a(e),changed:p,detail:h.followsNoView?a(f?"On":"Off"):M(w=>a(w),a(f?"On":"Off"),h.followsView),disabled:b,onReset:()=>l(void 0)}),S]}):S})}}}function Fc(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(Xs,{label:"Background",icon:i(po,{}),id:r,value:e,shown:bo(e),onChange:t})}}}function Ac(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(se,{label:a(e),icon:n,value:o||t,onChange:r})}}function Xs({label:e,icon:t,id:n,value:o,shown:r,onChange:s}){const{colors:l,n:c}=Qe(),u=Pe(o),d=u?le(u,l,c):null;return i(se,{label:a(e),icon:t,id:n,value:d?d.hex:r,caption:d?.words,onChange:s,choices:Ze(u??"",l,c,s)})}function Lc(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i($s,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Ze(e,t,n,o){const r=Re(e);return Qo(t,n).map(s=>({label:s.label,color:s.value,selected:r===s.name,onPick:()=>o(s.name)}))}function $s({value:e,onChange:t,twin:n}){const{colors:o,n:r}=Qe(),s=o.background,l=U(s.toUpperCase(),a("Theme {n} background",{n:r})),[c,u]=R(wo),[d]=R(_o),h=typeof d=="string"&&d.trim()!=="",p=xt(c),f=oe=>u(xt(oe)||void 0),m=Re(e),g=m?le(m,o,r):null,b=Ze(e,o,r,t),S=n?()=>t(void 0):()=>t("");let w=s,C=l;if(n){const oe=Re(n.follows),we=Co(n.follows),Se=oe?le(oe,o,r):we?{hex:we,words:we.toUpperCase()}:null;w=Se?.hex??s,C=M(yn=>a(yn),Se?Se.words:l,n.view)}const v=!n&&(yo(e)||h)?i(Vs,{value:p,onChange:f}):null;return g?i(se,{label:a("Fill"),icon:i(Ee,{}),value:g.hex,caption:g.words,onChange:t,changed:!0,onReset:S,resetTo:C,choices:b,children:v}):i(At,{label:a("Fill"),icon:i(Ee,{}),value:e,inherited:w,resetTo:C,onChange:t,onReset:S,choices:b,children:v})}function Vs({value:e,onChange:t}){return de({options:So.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:a("Fill")})}function js(e,t,n){if((e?.content??[]).some(l=>l?.props?.id===t))return ce(n);const r=Io(e,t);if(r.length===0)return null;const s=ce(en(n));if(s!==null)return s;for(let l=r.length-1;l>0;l-=1){const c=ce(en(r[l].sectionAccent));if(c!==null)return c}return ce(r[0].sectionAccent)}function Qe(){const e=Yt(G().theme),[t]=R("sectionAccent");let n=null;try{const{appState:r,selectedItem:s}=re(c=>c),l=s?.props?.id?String(s.props.id):void 0;n=l?js(r?.data,l,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:Qr(e.themes[o]),n:o+1}}function vc(){return an()}const Bc={top:i(ro,{}),right:i(oo,{}),bottom:i(to,{}),left:i(no,{})};function Dc(e,t,n,o,r,s,l){const c=p=>t.find(f=>f.value===p),u=p=>({value:p,label:"",disabled:!0,title:o}),d=p=>{const f=t.find(g=>g.cell===p);if(!f)return u(`missing-${p}`);const m=s?.[p];return m?{value:f.value,label:f.label,icon:m}:{value:f.value,label:f.label}},h=[u("corner-top-left"),d("top"),u("corner-top-right"),d("left"),u("centre"),d("right"),u("corner-bottom-left"),d("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:f})=>{const m=t.some(g=>g.value===p)?p:n;return i(_,{label:a(e),icon:r,value:c(m)?.label?a(c(m).label):l?a(l):"",children:Ei(a,{label:e,value:m,onChange:f,points:h})})}}}function Hc(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:s})=>i(mr,{label:e,options:(s.options??t).map(l=>({...l,label:a(l.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:a(n)}:{}})}}function Gc(e,t,n,o){return{type:"custom",options:t,fallback:n,...L({},{type:"select",label:e}),render:({value:r,onChange:s,field:l})=>i(br,{label:e,options:(l.options??t).map(c=>({...c,label:a(c.label)})),fallback:l.fallback??n,value:r,onChange:s,placeholder:o===void 0?void 0:a(o)})}}function Mc(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const Wc=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Uc(e,t,n){const o=Object.keys(rt).map(r=>({label:rt[r],value:r,picture:n[r]}));return{type:"custom",...L({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(Ys,{label:e,icon:t,options:o,onChange:r})}}function zs(e,t,n){const o=Tn(e,t,n);if(o!==void 0)return o==="save-makes-frame"?a("A frame is made from this video when you save the page."):o==="starts-dark"?a("This video starts dark, so no frame was made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="outside"?a("This video is on another website, so no frame can be made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="unsupported"?a("This video's file type gives no frame. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="failed"?a("No frame could be made from this video. It is tried again the next time you save the page. The slide shows its background colour while the video loads."):o==="image-no-frame"?a("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=Nn(e);return r==="frame-missing-image"?a("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?a("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?a("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?a("No image yet. The slide shows its background colour until you choose one."):void 0}function Ys({label:e,icon:t,options:n,onChange:o}){const r=B(),s=r?.values??{},l=Rn(s),c=nt(Fn),u=Pn(c?.docId??null);let d=null;try{d=re(p=>p.appState.data)}catch{d=null}const h=kn(r?.id,d,u);return i(_,{label:a(e),icon:z(t),hint:zs(s,h,c?.hasUnsavedEdits??!1),children:de({options:n,value:l,onChange:o,ariaLabel:e})})}function Kc(e,t,n,o={}){const r={type:"custom",[at]:!0,render:({value:s,onChange:l,name:c})=>i(hr,{value:s||"",onChange:l,fieldKey:c,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?E("each",r):r}const Xc={HeroSingle:["imageFocal"],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function qs(e){const t=a(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function $c({value:e,onChange:t,label:n}){const o=e||{},r=B(),s=r?r.values!==r.node.props:!0,l=!!o.pending&&s,c=!!o.pending&&!s,u=!!Oi(xi()).geocode,d=ot(),h=(p,f)=>t({...o,[p]:f??void 0});return P(F,{children:[i(_,{label:a(n),icon:i(bt,{}),action:u?i(ke,{content:a("Find from the address (OpenStreetMap)"),children:i(Pt,{"aria-label":a("Find from the address"),"aria-busy":l||void 0,disabled:l,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(fo,{})})}):void 0,children:u&&o.status?i(Yn,{compact:!0,oneLine:!0,spaced:!1,status:l?"busy":o.ok&&!c?"found":"notfound",statusText:l?a("Finding…"):c?a(Zo):a(o.status),hint:qs(o)}):null}),i(_,{label:a("Enter by hand"),labelId:d,icon:i(io,{}),action:i(Ne,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:d})}),o.manual&&i(_,{label:a("Latitude, longitude"),icon:i(bt,{}),children:P("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(Ft,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>h("lat",p),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(Ft,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>h("lng",p),min:-180,max:180,step:1e-4,placeholder:a("Longitude")})]})})]})}function Js(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Zs(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,s)=>s===t?{text:n}:r)}function Vc(e,t){return e===null?null:t>e?e:null}function Qs(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}const jc={label:"Ticker items",icon:i(uo,{})};function zc(e,t,n,o){return{type:"custom",[N]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...L({},{...rn.textList,label:e}),render:({value:r,onChange:s})=>i(el,{label:e,icon:z(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function el({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const l=J(null),[c,u]=Z(null),d=p=>p.map(f=>({text:f?.text??""})),h=p=>{const f=Qs(n,p,c);f===null&&(l.current=null),u(f),r(d(p))};return i(Lo,{label:a(e),icon:t,noun:a("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?i(Lt,{target:l,value:Js(n,c),onChange:p=>r(Zs(n,c??-1,p)),disabled:c===null,label:c===null?a("Formatting — click a row first"):a("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,f,m)=>i("input",{type:"text",className:s&&c===f?"sf-list-marking":void 0,value:p?.text??"",placeholder:a(o),"aria-label":a("{label} {n}",{label:a(e),n:f+1}),onChange:g=>m({text:g.target.value}),onFocus:g=>{l.current=g.currentTarget,u(f)}})})}function Yc(e,t){const n=`${e.label} — row ${t+1}`;return X({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:a("{label} — row {n}",{label:a(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function qc(e){return{_gCards:T("Cards"),coverIndex:Y("Cover image",i(co,{}),dr,String(pr),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:Qi("Image background",si),cardImage:Cn()}}function Jc(){return{outline:Y("Card outline",i(ho,{}),ar,ur),indexBadge:Y("Card number",i(ao,{}),lr,cr),showBadge:_n("Product badge",!0,i(yt,{noun:"tag"}))}}function Zc(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...pe,label:be.find(s=>s.id===r).label}),o=r=>L(Fe(et),n(r));return{_gShowOnCard:T("Show on a card"),[et]:L({type:"custom",render:()=>i(tl,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(et)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const et="showCardPrice",be=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function tl({rest:e}){const t=I(),n=he(),o=l=>typeof t[l]=="boolean"?t[l]:void 0,r=l=>o(l)??e[l],s=be.some(({id:l})=>o(l)!==void 0&&o(l)!==e[l]);return i(tt,{parts:be,changed:s,shown:r,onPress:(l,c)=>n({[l]:c}),onReset:()=>n(Object.fromEntries(be.map(({id:l})=>[l,void 0])))})}function Qc(e,t="display"){const n=V(t);return{[t]:E("desktop",{type:"custom",render:({value:o,onChange:r})=>i(tt,{parts:e,changed:Bo(o),shown:s=>Do(o,s),onPress:(s,l)=>r(Mo(o,s,l)),onReset:()=>r(void 0)})}),[n]:E("mobile",{type:"custom",render:({value:o,onChange:r})=>i(nl,{parts:e,desktopKey:t,value:o,onChange:r})})}}function tt({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:l}){const c=a("Display");return i(_,{label:c,icon:i(Jn,{}),changed:t,action:i(x,{words:y()?.panel,label:c,changed:t,detail:s,onReset:r}),children:i(vo,{label:c,items:e.map(u=>({id:u.id,label:a(u.label),shown:n(u.id),...l?{disabled:!0,disabledReason:a(l)}:{}})),onChange:o})})}function nl({parts:e,desktopKey:t,value:n,onChange:o}){const r=I()[t];return i(tt,{parts:e,changed:Go(n),shown:s=>Ho(r,n,s),onPress:(s,l)=>o(Wo(n,s,l)),onReset:()=>o(ir),detail:a("the same as Desktop")})}function Cn(e=vn){return W("Card image",i(mt,{}),A,xe,Bn,A,e,{clear:{hint:A},hint:"Rounds the picture. The card's own corner is in Styles."})}function ol(){return ue(dt,"cardImage")}function eu(){return{cardImage:Cn(dt),...ol()}}function tu(){return Ye({sidesKey:"cornerSides",row:Gn,step:Dn,useFollowed:()=>A,mark:i(rl,{label:Hn}),hint:a("Rounds the picture. Left alone it stays square.")})}function rl({label:e,changed:t=!1,onReset:n=()=>{}}){return i(x,{words:y()?.panel,label:a(e),changed:t,onReset:n})}function nu(){return{type:"custom",render:({value:e,onChange:t})=>i(al,{value:typeof e=="string"?e:"",onChange:t})}}function il({layout:e,width:t}){const n=Kn(e),o=n?`${n[0]}/${n[1]}`:void 0;return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:o?"auto":6,gridAutoFlow:"row dense",gap:2},children:Xn(e).map(([r,s],l)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${s}`,aspectRatio:o}},l))})}const sl={width:"3.5rem",height:"2.5rem"},ll=200;function al({value:e,onChange:t}){const[n,o]=Z(null),[r,s]=Z(4),l=J(null);On(()=>{const m=l.current;if(!m||typeof ResizeObserver!="function")return;const g=()=>s(m.getBoundingClientRect().width>=ll?4:3);g();const b=new ResizeObserver(g);return b.observe(m),()=>b.disconnect()},[]);const c=e?Li(Oe,e):void 0,u=c?e:"",d=pt(n,u),h=pt(n,"").length,p=$n("no-symbol"),f=[{value:"",label:a("Not chosen"),icon:Fi(p,a("Not chosen"))},...d.map(m=>({value:m,label:a(Oe[m].label),icon:i(il,{layout:Oe[m],width:40})}))];return i(_,{label:a("Layout"),icon:i(lo,{}),value:c?a(c.label):void 0,children:i("div",{ref:l,style:{flex:"1 1 auto",minWidth:0},children:i(Rt,{label:a("Layout"),value:u,options:f,onChange:t,columns:r,cell:sl,header:P("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:a("Photos in a row")}),i(No,{options:[{id:"all",label:a("All")},...Wn.map(m=>({id:String(m),label:String(m)}))],value:n===null?"all":String(n),ariaLabel:a("Photos in a row"),onChange:m=>o(m==="all"?null:Number(m))}),i("span",{className:"text-2xs text-ink-faint",children:a("{n} of {total} layouts",{n:h,total:Un.length})})]})})})})}export{Xi as BOUND_TO_POST,Ja as BOUND_TO_POST_NOTE,ic as BUCKET_ICONS,Xc as CUSTOM_FIELD_MEDIA,$c as CoordsField,on as DESKTOP_GAP_NOT_OVERLAP,tt as DisplayRow,Bc as EDGE_ARROWS,Vo as FOCAL_DEFAULT,Ce as FOLD_FIELD_MARKER,$i as HIGHLIGHT_HINT,K as HidableTextField,lt as LINK_FIELD_MARKER,Ma as Label,at as MEDIA_FIELD_MARKER,Wc as MEDIA_TYPE_OPTIONS,Za as NOT_BOUND_TO_POST,pc as PanelBand,zi as PanelNoteLine,Is as RowPropsContext,ct as SCAFFOLD_FIELD_MARKER,su as SCALAR_TEXT_CONTROLS,Bi as SiteGapDefaultReset,q as Slider,qi as Swatches,iu as TEXT_CONTROL_KINDS,N as TEXT_FIELD_MARKER,jc as TICKER_ITEMS_ROW,el as TextListField,Xs as ThemeFillRow,me as WIDTH_LABEL,Ui as WidthDefaultReset,Qs as aimAfterListChange,Nc as anchorFields,U as backTo,fc as backgroundField,wc as boxBlockSpacingField,Cc as boxColumnsFields,Lc as boxFillField,xs as boxPhoneRowField,_s as boxShareField,Sc as boxSharePhoneField,_c as boxShareTabletField,js as boxThemeIndexOf,ac as bucketHeader,gc as buttonWordsEntryField,ws as cardCornersField,Qi as cardImageBackgroundField,Cn as cardImageField,eu as cardImageFields,qc as cardMediaFields,bc as cardShapeFields,Zc as cardShowFields,Jc as cardStyleFields,xc as cellWidthFields,Ac as colorInput,Ua as containerDirectionField,Di as containerGapField,Hi as containerGapPhoneField,Wa as containerGapRows,Gi as containerGapTabletField,qs as coordsResultTip,nc as copyText,un as cornerSidesField,Ye as cornersRowField,cn as cornersUnitFields,Pc as date,kc as dateTime,cc as designGroupHeader,Qc as displayFields,Dc as edgePad,Ze as fillSlotChoices,Vc as focusAfterRemove,vc as focusKeptField,uc as foldMarker,ye as foldMetaOf,Yi as foldTitleOf,Ls as followedHeightPatch,Us as followedStickPatch,nu as galleryLayoutField,Tc as heightFields,ge as heightFollowedBy,As as heightLayersAt,Ka as heroGroupPlacementPoints,st as hidableText,ji as hintIsWhileTyping,tu as imageCornersField,qa as inOwnBox,lc as isBucketHeader,an as keptBy,oc as linkField,zs as loadingRowHint,Uc as loadingShowsField,Hc as multiSelect,Fc as pageBackgroundField,sc as panelNote,Rs as phoneOverrideField,tc as plainText,rc as plainTextarea,es as pxField,dc as quietMarker,it as readHidable,Js as rowText,Gc as searchSelect,Zi as sectionBandChoices,is as sectionCornersField,mc as sectionShapeFields,hc as sectionThemeFields,Zs as setRowText,yc as sizeField,Mc as sourceField,Oc as spacingFields,Rc as stickFields,Ic as swapPadding,Qa as text,An as textFieldIdentifier,Va as textFieldOffPage,za as textFieldPanelOnly,zc as textList,Yc as textListRowField,ec as textarea,_n as toggle,Kc as upload,fe as useLengthRow,he as useSelectedPatch,I as useSelectedProps,R as useSelectedSibling,vi as useSiteGapDetail,Ec as widthField,Ya as withIdentifier,$a as withOffPage,ja as withPanelOnly,Xa as withScaffold};
1
+ "use client";import{jsx as i,jsxs as k,Fragment as L}from"react/jsx-runtime";import{cloneElement as _e,createContext as Tn,useContext as nt,useEffect as Rn,useId as ot,useRef as J,useState as Z}from"react";import{useEasel as re,useSelectedHost as B}from"efficient-easel/easel";import{PIN_LENGTH as ie,toDateKey as Nn,fromDateKey as Pn}from"efficient-shell/format";import{say as a,editorEaselWords as C}from"../../../format/lib/editor-words.js";import{finiteNumber as $}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as rt,firstFrameHint as kn,loadingShowsOf as Ln,loadingStillHint as An}from"../../../format/lib/hero-video.js";import{pageFramesFor as Fn,usePageVideoFrames as vn}from"../page-video-frames.js";import{ScreenDocumentContext as Bn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as it,hidableText as st}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as ye,LINK_FIELD_MARKER as lt,MEDIA_FIELD_MARKER as at,SCAFFOLD_FIELD_MARKER as ct,TEXT_FIELD_MARKER as N,foldMetaOf as Ce,textFieldIdentifier as Dn}from"efficient-easel/draw";import Hn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as ut}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as Gn,CARD_IMAGE_RADIUS_ROW as dt,CARD_IMAGE_RADIUS_STEP as Mn,CORNER_RADIUS_MAX as xe,CORNER_RADIUS_MIN as A}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Wn,IMAGE_CORNERS_LABEL as Un,IMAGE_CORNERS_ROW as Kn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Xn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as $n,GALLERY_LAYOUTS as Oe,GALLERY_LAYOUT_KEYS as Vn,GALLERY_PHONE_LAYOUTS as jn,galleryChoices as pt,galleryLayoutRatio as Yn,galleryPictureCells as zn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as qn}from"./shell-glyph.js";import{anchorSiblingsOf as Jn,placementPoints as Zn}from"../../../format/lib/hero-group-placement.js";import Qn from"../../components/AnchorField.js";import eo from"../../components/SourceStatus.js";import{AdjustIcon as to,EyeIcon as no,AnimationIcon as oo,BackgroundIcon as ft,BorderAllIcon as ro,BlockSectionIcon as io,ColumnWidthsIcon as Ie,ColumnsIcon as ht,CornerIcon as mt,DirectionDownIcon as so,DirectionLeftIcon as lo,DirectionRightIcon as ao,DirectionUpIcon as co,EditIcon as uo,GapIcon as po,GridIcon as gt,GroundIcon as Ee,HashIcon as fo,HeightIcon as bt,ImageIcon as ho,ListIcon as mo,LocationIcon as wt,PaddingBottomIcon as St,PaddingLeftIcon as _t,PaddingRightIcon as yt,PaddingTopIcon as Te,PageIcon as go,StickyIcon as Ct,SearchIcon as bo,SquareIcon as wo,TypeIcon as So,WidthIcon as _o}from"efficient-easel/icons";import{FieldGlyph as xt}from"../../components/FieldGlyph.js";import{resolvePageBackground as yo}from"../../../format/lib/content/page-background.js";import{BOX_FILL_FADE_PROP as Co,BOX_FILL_FADES as xo,BOX_SWATCH_PROP as Oo,boxFillFadeOf as Ot,boxFillOf as Io,boxFillSlot as Re,boxPaintOf as Eo}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as It,CORNER_SIDE_POINTS as To,SECTION_CORNERS_ROW as Et,hasOwnSectionCorners as Ro,normalizeCornerSides as Tt}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as Rt}from"../../../format/lib/content/card-corners.js";import{enclosingPath as No,enclosingSection as Po}from"./enclosing-section.js";import{SettingsDefaultReset as x,SettingsDrill as ko,SettingsField as _,SettingsGroup as Lo,SettingsSegmented as Ao,SettingsBorder as Fo,SettingsSidesEach as vo,SettingsSwitch as Ne,borderSides as Bo,borderStartEach as Do}from"efficient-easel/panel";import{ListField as Ho}from"efficient-easel/fields";import{DisplayChips as Go}from"efficient-shell/ui";import{desktopDisplayChanged as Mo,partShownOnDesktop as Wo,partShownOnPhone as Uo,phoneDisplayChanged as Ko,withDesktopPart as Xo,withPhonePart as $o}from"../../../format/lib/content/part-display.js";import{ColorSwatch as Vo,CornersInput as jo,DatePicker as Yo,DateTimePicker as zo,FOCAL_DEFAULT as qo,IconPicker as Nt,COLUMN_COUNT_MAX as Pt,COLUMN_SHARE_MIN as Jo,COLUMN_SHARES_EQUAL as Zo,resolveColumnShares as kt,WidthsBar as Qo,useShellStrings as er,IconButton as Lt,InputNumber as At,Slider as tr,Tooltip as Pe}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as nr}from"./geocode-resolve.js";import{ColourRow as se,InheritedColourRow as Ft}from"./ColourControl.js";import{fillThemeColors as or,slotFill as le}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as ke}from"../../../format/lib/document/part-inks.js";import{keptByRow as Le}from"efficient-easel/screen/lib/document/style-fields";import vt from"./MarkupToolbar.js";import{deviceField as E}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as rr,NoControlMark as ir,noControlField as Bt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as sr}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as lr,PANEL_ONLY_FIELD as ar}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as cr,resolvePhoneValue as Ae}from"../../../format/lib/document/phone-override.js";import{phoneKey as V,tabletKey as Fe,viewKeyAt as ve}from"efficient-easel/draw";import{viewKey as O}from"../../../format/lib/animation/views.js";import{viewRows as D}from"../animation/view-rows.js";import{SuppressibleText as ur}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as dr,CARD_OUTLINE_OPTIONS as pr,DEFAULT_CARD_INDEX_FORMAT as fr,DEFAULT_CARD_OUTLINE as hr}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as mr,DEFAULT_COVER_INDEX as gr}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as br}from"efficient-easel/draw";import wr from"../../components/MediaUploadField.js";import Sr from"../../components/MultiSelectField.js";import _r from"../../components/SectionThemePicker.js";import yr from"../../components/SearchSelectField.js";import Cr from"../../components/StorefrontLinkField.js";import{UiIcon as Dt}from"efficient-easel/draw/client";import{SECTION_PADDING as P}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as xr}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Or}from"efficient-easel/draw/client";import{encodePartId as Ir}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as Er,useEaselStrings as Tr}from"efficient-easel/strings";import{hasPhoneHeight as Rr,hasTabletHeight as Be,resolveSectionMinHeight as Nr,resolveTabletHeight as Pr}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as kr,SECTION_PIN_ABOVE_HINT as Lr,SECTION_PIN_ABOVE_KEY as Ar,SECTION_PIN_ABOVE_LABEL as Fr,SECTION_PIN_GROUP as vr,SECTION_PIN_LABEL as Ht,SECTION_PIN_SCREENS_KEY as De,SECTION_PIN_SCREENS_LABEL as Gt,SECTION_PIN_STOP_DEFAULT as Br,SECTION_PIN_STOP_HINT as Dr,SECTION_PIN_STOP_KEY as Hr,SECTION_PIN_STOP_LABEL as Gr,SECTION_PIN_STOP_OPTIONS as Mr,SECTION_STICK_DISTANCE as H,SECTION_STICK_DISTANCE_ROW as He,SOME_VIEW_PINS as Mt,hasPhoneStick as Wr,hasTabletStick as Ur,resolveSectionStick as ae,sectionPinStopOf as Kr,sectionPinStopWrite as Xr}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as $r}from"../../../format/lib/content/css-length.js";import{SECTION_HEIGHT_MODES as Vr,SECTION_MIN_HEIGHT as jr,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as Yr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as zr,resolveContainerDirection as Wt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as qr,BOX_BLOCK_SPACING_POINTS as Ut,BOX_PHONE_ROW_LABEL as Kt,BOX_COLUMNS_MAX as Jr,BOX_COLUMNS_MIN as Xt,BOX_PHONE_ROW_MAX as Zr,BOX_PHONE_ROW_MIN as Ge,BOX_SHARE_CHOICES as $t,BOX_SHARE_LABEL as j,boxShareChoiceOf as Vt,boxShareWidthsOf as Me,BOX_SHARE_PHONE_DEFAULT as Qr,BOX_SHARE_PHONE_POINTS as ei}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as G}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as jt,BORDER_SIDES as ti,SECTION_BORDER_ROW as Yt,borderBySide as zt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as ni,normalizeTheme as qt,normalizeThemeColors as oi,sectionBandTone as ri,surfaceTwoTone as ii}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Jt,CONTAINER_GAP_BUILT_IN as si,CONTAINER_GAP_PHONE as We,GAP_FIELD_CONTAINER as Ue,followsSitePhoneGap as li,hasOwnContainerGap as ai,hasOwnPhoneGap as Ke,resolveContainerGap as Zt,resolvePhoneContainerGap as Qt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as ci,CARD_IMAGE_BG_OFF as ui,CARD_IMAGE_BG_SWATCH_NAMES as di,CARD_IMAGE_BG_SWATCHES as pi,isCardImageBackgroundInheriting as fi,cardImageBackgroundChoice as hi,THEME_CARD_IMAGE_BG as mi}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as gi,SECTION_BG_NO_FILL as bi,sectionBackgroundChoice as wi,THEME_SECTION_BG as Xe,isSectionBackgroundEmpty as Si,sectionBackgroundHex as en}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as _i,nestedAccentValue as tn,resolveSectionAccent as ce}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as yi,TYPE_SIZE_INHERIT as Ci,isTypeSizeInheriting as xi}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Oi,WIDTH_CHOICE_LABEL as Ii,WIDTH_INHERIT as Ei}from"../../../format/lib/content/section-width.js";import{useEaselSession as Ti}from"efficient-easel/screen/lib/session-context";import{backendOf as Ri}from"../website-session.js";import{BOX_GAP as Ni,describedAs as F,group as T,iconOf as Y,sharedStyleKinds as ee}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as nn,onDesktopWords as M,phoneTwinFields as $e,saidAlignmentGrid as Pi,useLengthUnit as ki}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as Li,directionField as Ai,gapField as Ve,iconPickerRow as on,lengthUnitFields as ue,pickerCellIcon as Fi,pickerNoneIcon as vi,Segmented as de,select as z,slider as W}from"./box-fields.js";import{VIEW_ABOVE as je}from"efficient-easel/screen/lib/content/length-units";import{tierOfView as rn,viewOfTier as Bi}from"../../../format/lib/content/view-tier.js";import{ownEntry as Di}from"../../../format/lib/own-entry.js";import{LAYOUT_CELL as Hi,galleryPhonePicture as sn}from"./choice-pictures.js";function $a({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function U(e,t){return a("{value} from {from}",{value:e,from:t})}function Gi(){const{blockGap:e}=G();return e===null?a("this container's own spacing"):U(`${e}px`,a("Styles"))}function Mi({inherited:e,onReset:t,label:n}){return i(x,{words:C()?.panel,label:a(n),changed:!e,detail:Gi(),onReset:t})}function Wi(e){return Ve({...Ni,builtIn:si[e],resolve:(t,n)=>Zt(e,t,n?.siteGap),action:(t,n)=>i(Mi,{inherited:!ai(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[Ue]:e}})}function Ui(e){return ut(E("mobile",{[Ue]:e,type:"custom",render:t=>i($i,{container:e,...t})}),ln)}function Ki(e){return ut(E("tablet",{[Ue]:e,type:"custom",render:t=>i(Xi,{container:e,...t})}),ln)}const ln={not:{field:"gap",in:Array.from({length:-Jt.min},(e,t)=>Jt.min+t)}};function Va(e){return{gap:E("desktop",Wi(e)),[Fe("gap")]:Ki(e),[V("gap")]:Ui(e)}}function Xi({container:e,...t}){const[n]=R("gap"),{siteGap:o}=t.field??{},r=Math.max(We.min,Zt(e,n,o));return Ve({...We,builtIn:r,resolve:l=>Ke(l)?l:r,action:(l,c)=>i(x,{words:C()?.panel,label:a("Gap"),changed:Ke(l),detail:M(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function $i({container:e,...t}){const[n]=R("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=Qt(e,void 0,n,o,r);return Ve({...We,builtIn:s,resolve:c=>Qt(e,c,n,o,r),action:(c,u)=>i(x,{words:C()?.panel,label:a("Gap"),changed:Ke(c),detail:U(`${s}px`,li(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function ja(e){return Ai({offered:zr(e),fallback:Wt(e,void 0),resolve:t=>Wt(e,t)})}function Ya(e,t){return Zn(t?Jn(e,t):[],t)}function Vi({inherited:e,onReset:t,label:n}){return i(x,{words:C()?.panel,label:a(n),changed:!e,detail:U(a("Full"),a("the page")),onReset:t})}function K({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:l=!0,markup:c=!0}){const{text:u,hidden:d}=it(e),h=J(null),p=J(null),f=y=>t(l?{text:y,hidden:d}:y),m=()=>t({text:u,hidden:!d}),g=l&&d,b=ot(),S=r?Ji(r)?i("span",{className:"sf-hint-while-typing",children:a(r)}):a(r):void 0,w=d?a("Show {label} on the slide",{label:a(n)}):a("Hide {label} on the slide",{label:a(n)});return i(_,{label:a(n),icon:i(So,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:S,action:l?i(Pe,{content:w,children:i(Lt,{"aria-pressed":d,"aria-label":w,onClick:m,children:d?i(Dt,{name:"eye-off",size:14}):i(Dt,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[c&&i(vt,{target:s?p:h,value:u,onChange:f}),s?i("textarea",{id:b,ref:p,value:u,placeholder:o===void 0?void 0:a(o),onChange:y=>f(y.target.value)}):i("input",{id:b,ref:h,type:"text",value:u,placeholder:o===void 0?void 0:a(o),onChange:y=>f(y.target.value)})]})})}function za(e,t){return{...e,[ct]:t}}function qa(e){const t=e[N];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[N]:{...t,offPage:!0}}}function Ja(e){return!e||typeof e!="object"?!1:e[N]?.offPage===!0}function Za(e){if(!e[N])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[ar]:!0}}function Qa(e){return lr(e)}function ec(e){const t=e[N];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[N]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as du,SCALAR_TEXT_CONTROLS as pu}from"efficient-easel/draw";function tc(e,t){if(!e[N])throw new Error("inOwnBox: the field holds no authored text");const{[rr]:o,...r}=e;return{...r,[sr]:!0,render:t}}const ji=new Set(br),pe={type:"radio",options:[{value:!0},{value:!1}]},an={text:{type:"object",objectFields:{text:{type:"text"},hidden:pe}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:pe}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},X=(e,t)=>{const n=F({...t,[N]:e},{...an[e.control],label:e.label});if(!ji.has(e.control))return n;const o=t.render;return{...Bt(n,"authored-copy"),render:r=>i(ur,{name:r.name,children:o(r)})}},nc="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Yi={field:"source.slug",set:!0},oc={not:Yi},zi="Select a word, then press the highlighter.",qi=new Set([zi]),Ji=e=>qi.has(e);function rc(e,t,n){return X({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function ic(e,t,n){return X({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function sc(e,t,n){return X({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function lc(e,t,n){return X({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function ac(e){return{type:"custom",[lt]:{label:e},...F({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(Cr,{value:st(t),onChange:n,label:e})}}function cc(e,t,n){return X({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const uc={Design:to,Animation:oo};function dc(e,t){return{type:"custom",render:()=>i(Zi,{text:e,values:t})}}function Zi({text:e,values:t}){return i("p",{className:"sf-note",children:a(e,t)})}function pc(e){return Ce(e)!==null&&e?.tabs!==void 0}const cn=new Map;function fc(e,t){const n=`${e}\0${t?t.join(""):""}`,o=cn.get(n)??{type:"custom",tabs:t,[ye]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(L,{})};return cn.set(n,o),o}const un=new Map;function hc(e){const t=un.get(e)??{type:"custom",[ye]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(L,{})};return un.set(e,t),t}function Qi(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function mc(e,t){return Qi(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(L,{})}}function gc(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(L,{})}}function bc({title:e,children:t}){const[n,o]=Z(()=>!Ye.has(e));return i(Lo,{title:e,open:n,onToggle:r=>{o(r),r?Ye.delete(e):Ye.add(e)},children:t})}const Ye=new Set;function es({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),s=r?o?.[r]:void 0,l=s?a(s):t;return k("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?a(o[c]):c;return i(Pe,{content:u,children:i(Vo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:l})]})}function wc(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(ts,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function ts({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const s=typeof o=="string"?o:void 0,{colors:l,n:c}=Qe(),u={background:l.background,surface:l.surface,surface2:ii(l),band:ri(l)},d=n?Xe:t,h=Si(s,t,d),p=en(void 0,d,u),f=n?gi:void 0,m=d===Xe?a("the theme's section background"):a("Theme {n} background",{n:c}),g=ns(s,t,l,c,u,r),b=U(p.toUpperCase(),m),S=ke(s),w=S?le(S,l,c):null;return w?i(se,{label:a(e),icon:i(ft,{}),value:w.hex,caption:w.words,onChange:r,changed:!0,onReset:()=>r(f),resetTo:b,choices:g}):i(Ft,{label:a(e),icon:i(ft,{}),value:h?"":en(s,t,u),inherited:p,resetTo:b,onChange:r,onReset:()=>r(f),choices:g})}function ns(e,t,n,o,r,s){const l=wi(e,t);return[{label:a("No fill"),color:"",selected:l==="none",onPick:()=>s(bi)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:l==="band",onPick:()=>s(Xe)},...Ze(ke(e)??"",n,o,s)]}function os(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=fi(r,t);return i(_,{label:a(e),icon:i(Ee,{}),changed:!s,action:i(x,{words:C()?.panel,label:a(e),changed:!s,detail:a("the theme's image stage"),onReset:()=>o(ci)}),children:es({swatches:pi,current:s?mi:hi(r,t),onPick:o,names:di})})}}}function Sc(e=n=>n,t){return ee({_gSectionTheme:T(_i),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(_r,{value:e(n),onChange:o,followLabel:t})}})}function fe(e){const t=I(),n=rn(e?.view),o=l=>ve(e.valueKey,l),r=e.numbersIn??(l=>$(t[o(l)])!==void 0),s=e.followsView??ws(n,r);return ki({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:Li,label:a(e.label),grid:e.grid,hasOwn:r(n),view:{tier:n,numbersIn:r,followsView:s},convertTo:e.convertTo??(l=>{const c=$(t[o(n)]);return c===void 0?{}:{[o(n)]:l(c)}})})}function q({min:e,max:t,step:n,value:o,onChange:r,suffix:s="",readout:l=!0,notch:c,ariaLabel:u,disabled:d=!1,placeholder:h,placeholderWord:p,onClear:f,units:m}){const g=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:g?"sf-slider has-notch":"sf-slider",style:g?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(tr,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...p?{emptyLabel:a(p)}:{},suffix:s||void 0,...m?{units:m}:{},showInput:l,label:u===void 0?void 0:a(u),disabled:d,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:b=>{b===null?f?.():b!==o&&r(b)}})})}function rs(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:l,restTrack:c,unsetMark:u,icon:d,unit:h="px"}=t;return{type:"custom",render:({value:p,onChange:f})=>{const m=typeof p=="number"?p:null,g=m===null;return i(_,{label:a(e),icon:d?Y(d):void 0,value:g?u||s===void 0?void 0:a(s):`${m}${h}`,changed:!g,action:u?_e(u,{changed:!g,onReset:()=>f(null)}):i(x,{words:C()?.panel,label:a(e),changed:!g,onReset:()=>f(null)}),hint:typeof l=="string"?a(l):l,children:c?c({min:n,max:o,step:r,px:m,label:e,onChange:f}):q({min:n,max:o,step:r,value:m??n,readout:!1,ariaLabel:e,onChange:f})})}}}const te="Corners",is={kind:"radius"};function ze(e){return{type:"custom",render:t=>{const{value:n,onChange:o}=t,r=typeof n=="number"&&Number.isFinite(n)?n:null,s=r!==null;return i(_,{label:a(te),icon:i(mt,{}),changed:s,action:_e(e.mark,{changed:s,onReset:()=>o(null)}),hint:e.hint,children:i(ss,{tier:e,px:r,name:t.name,onRadius:o})})}}}function R(e){const t=B();return[t?.values?.[e],n=>t?.onChange(e,n)]}function dn(){return Bt({type:"custom",render:()=>i(ir,{})},"always")}function he(){const e=B();return t=>e?.onChangeMany(t)}function ss({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[s,l]=R(e.sidesKey),c=he(),u=fe({row:e.row??is,label:te,grid:{min:A,max:xe,step:e.step??1},valueKey:n??"",view:"desktop"}),d=Tt(s)??[...It];return i(jo,{label:a(te),value:d,corners:To,onChange:h=>{const p=Tt(h)??[];l(p.length===It.length?null:p)},radius:t,onRadiusChange:u&&n?h=>c({[n]:h,...u.unitPatch(h===null)}):o,radiusMin:u?.grid.min??A,radiusMax:u?.grid.max??xe,radiusStep:u?.grid.step??e.step??1,radiusPlaceholder:u&&u.unit!=="px"?"–":String(r),...u?{radiusUnit:u.unit,units:u.units}:{}})}function pn(e,t){return ue(e,t)}function fn(){return dn()}function ls({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=G(),r=typeof o=="number"?`${o}px`:a("not set");return i(x,{words:C()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):U(r,a("Styles")),onReset:n})}function as(){const{cornerRadiusPx:e}=G();return typeof e=="number"?e:A}function cs(){return ze({sidesKey:"sectionCornerSides",row:Et,useFollowed:as,mark:i(ls,{label:te}),hint:us})}const us="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function _c(){return ee({_gShape:T("Shape"),sectionCorners:cs(),...pn(Et,"sectionCorners"),sectionCornerSides:fn(),...D("sectionBorder",bs),...ue(Yt,"sectionBorder",{tablet:!0,phone:!0})})}const ds=()=>({width:a("Border width"),sides:{top:a("Border top"),right:a("Border right"),bottom:a("Border bottom"),left:a("Border left")},style:a("Border style"),styles:{solid:a("Solid"),dashed:a("Dashed"),dotted:a("Dotted")},color:a("Border color"),unit:"px"});function ps(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function fs(){let e;try{const t=qt(G().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||ni.line}function hs({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:s=!0,above:l={},length:c}){const u=e&&typeof e=="object"?e:{},[d,h]=Z(()=>r?Do(u,l):!1),p=ds(),f=m=>ps(r&&s?m:{width:m.width,color:m.color,...s?{style:m.style}:{}});return i(_,{label:a("Border"),icon:i(ro,{}),action:r?i(vo,{each:d,label:a("Each side"),onChange:h}):void 0,children:i(Fo,{label:a("Border"),value:u,each:d,onChange:m=>t(f(m)),placeholder:n,presets:o,words:c?{...p,unit:c.unit}:p,styles:s,max:c?.grid.max??jt,...c?{step:c.grid.step,units:c.units}:{}})})}function ms({value:e,onChange:t,view:n}){const[o]=R("sectionBorder"),[r]=R(Fe("sectionBorder")),s=fs(),l=f=>f&&typeof f=="object"?f:{},c=n==="phone"?{...zt(l(o)),...zt(l(r))}:n==="tablet"?l(o):{},u=I(),d=he(),h=O("sectionBorder",n),p=fe({row:Yt,label:"Border",grid:{min:0,max:jt,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>qe(u[ve("sectionBorder",f)]),convertTo:f=>{const m=l(u[h]);return qe(m)?{[h]:gs(m,f)}:{}}});return i(hs,{value:e,length:p,onChange:p?f=>d({[h]:f,...p.unitPatch(!qe(f))}):t,placeholder:{sides:Bo(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}const hn=["width",...ti];function qe(e){if(!e||typeof e!="object")return!1;const t=e;return hn.some(n=>$(t[n])!==void 0)}function gs(e,t){const n={...e};for(const o of hn){const r=$(n[o]);r!==void 0&&(n[o]=t(r))}return n}function bs(e){return{type:"custom",render:({value:t,onChange:n})=>i(ms,{value:t,onChange:n,view:e})}}function ws(e,t){let n=je[e];for(;n&&je[n]!==null&&!t(n);)n=je[n];return n??e}function yc(e){return{type:"custom",render:()=>i(Ss,{partKey:e})}}function Ss({partKey:e}){const[t]=R("id"),[n]=R("_partStyles"),{textStyles:o}=G(),r=Tr();let s=null;try{s=Or().select}catch{s=null}const l=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(ko,{name:a("Text"),preview:xr(l,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??Er.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(Ir(t,e))}})}function mn(e){const{cornerRadiusPx:t}=G(),n=typeof t=="number"?t:e;let o=null;try{const{appState:s,selectedItem:l}=re(u=>u),c=l?.props?.id?String(l.props.id):void 0;o=c?Po(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Ro(r)?r:n}function _s({label:e,changed:t=!1,onReset:n=()=>{}}){const o=mn(A);return i(x,{words:C()?.panel,label:a(e),changed:t,detail:U(`${o}px`,a("the section")),onReset:n})}function ys(){return i(L,{children:a("Follows the section's Corners until you set a number here.")})}function Cs(){return ze({sidesKey:"cardCornerSides",row:Rt,useFollowed:()=>mn(A),mark:i(_s,{label:te}),hint:i(ys,{})})}function xs(){return{type:"custom",render:()=>i(Hn,{})}}function Cc(){return{_gShape:T("Shape"),cardCorners:Cs(),...pn(Rt,"cardCorners"),cardCornerSides:fn(),cardCornersApplyAll:xs()}}function Os(){return F({type:"custom",render:e=>i(Es,{...e})},{type:"select",label:j,options:[{value:"content",label:"Fit content"},{value:"equal",label:"Equal"},{value:[50],label:"Custom: the width of each block in %, the last block left out"}]})}function Is(e,t){const n=Vt(e);if(n!=="custom")return a($t.find(r=>r.value===n)?.label??"");const o=kt(Me(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):a("Custom")}function Es(e){const{value:t,onChange:n}=e,[o]=R("content"),r=Array.isArray(o)?o.length:0,s="follows"in e,l=t!=null,c=l?t:s?e.follows:void 0,u=Vt(c),d=r>=2&&r<=Pt,h=()=>[...Zo[r]??[]],p=J(null),f=w=>{const y=p.current;y&&JSON.stringify(w)===JSON.stringify(y.shares)?n(y.value):w&&n(w)},m=w=>{w===u||w==="custom"&&!d||n(w==="custom"?h():w)},g=a("The width bar works for 2 to {count} blocks.",{count:Pt}),b=l&&(s||t!=="content"),S=er().widths.hint(r,Jo);return i(_,{label:a(j),icon:i(Ie,{}),changed:b,hint:u!=="custom"?void 0:d?S:g,action:i(x,{words:C()?.panel,label:a(j),changed:b,disabled:e.readOnly===!0,detail:s?M(w=>a(w),Is(e.follows,r),e.followsView):a("Fit content"),onReset:()=>n(void 0)}),children:k("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(Nt,{label:a(j),value:u,options:$t.map(w=>({value:w.value,label:w.value==="custom"&&!d?g:a(w.label),icon:Fi(i("span",{className:"sf-gallery-pic sf-share-pic",children:gn(w.weights).map((y,v)=>i("i",{style:{gridColumn:`span ${y}`}},v))}),a(w.label),w.value==="custom"&&!d?g:a(w.label))})),onChange:m,columns:3,cell:bn,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&d?i("div",{onFocus:()=>{p.current={value:t,shares:kt(Me(c,r),r)}},onBlur:()=>{p.current=null},children:i(Qo,{label:a(j),count:r,value:Me(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function gn(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function xc(){return z(qr,i(po,{}),Ut,Ut[0].value)}function Oc(){return E("mobile",on(j,i(Ie,{}),ei.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:gn(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),Qr,{columns:2,cell:bn}))}const bn={width:"5.75rem",height:"3.25rem"};function Ic(){return $e("share",Os(),nn)[Fe("share")]}function Ts(){return E("mobile",W(Kt,i(ht,{}),Ge,Zr,1,Ge,"",{clear:{phoneFollows:!1,hint:Ge}}))}const wn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Ec(){const e=W(Kt,i(ht,{}),Xt,Jr,1,Xt,"",{clear:{emptyLabel:"Auto"}}),t=$e("columns",e,{...wn,tablet:nn.tablet}),n=$e("columns",e,wn,{phoneRow:Ts()});return{...t,phoneRow:n.phoneRow}}function Tc(e,t,n,o,r,s,l){return{type:"custom",render:({value:c,onChange:u,name:d})=>i(Rs,{label:e,min:t,max:n,step:o,fallback:r,role:s,value:c,onChange:u,name:d??"",length:l})}}function Rs({label:e,min:t,max:n,step:o,fallback:r,role:s,value:l,onChange:c,name:u,length:d}){const h=I(),p=he(),f=rn(d?.view),m=fe({row:d?.row??{kind:"fontSize"},label:e,grid:{min:t,max:n,step:o},valueKey:d?u:"",view:d?.view??"desktop",numbersIn:b=>b===f&&typeof h[u]=="number",followsView:f,convertTo:b=>typeof h[u]=="number"?{[u]:b(h[u])}:{}}),g=b=>m?p({[u]:b,...m.unitPatch(typeof b!="number")}):c(b);return i(_,{label:a(e),icon:i(xt,{noun:s}),action:i(x,{words:C()?.panel,label:a(e),changed:!xi(l),detail:a("the Text style in Styles"),onReset:()=>g(Ci),defaultAction:{onPress:()=>g(yi),title:a("Keep this section's own built-in size"),icon:i(io,{})}}),children:q({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof l=="number"?l:r,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:g})})}function Rc(){return{_gCellWidth:T("Cell width"),gridSpan:z("Positions",i(Ie,{}),[{label:"Auto",value:""},...Array.from({length:Xn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function I(){let e=null,t=null;try{e=nt(Ns),t=re(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Ns=Tn(null);function Ps({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:l,fallback:c}){const u=I()[l],d=Ae(void 0,u,c);return i(L,{children:q({min:e,max:t,step:n,value:Ae(o,u,c),readout:!1,ariaLabel:r,notch:d,onChange:s})})}function ks({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const l=I()[t],c=Ae(void 0,l,n);return i(x,{words:C()?.panel,label:a(e),changed:r,detail:M(u=>a(u),`${c}${o}`),onReset:s})}function Ls(e){return rs(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(ks,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Ps,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const As={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Fs={Top:Te,Bottom:St,Left:_t,Right:yt},vs=e=>{const t=Fs[e];return i(t,{})};function Nc(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>As[S],s=S=>W(r("Top"),i(Te,{}),P.min,P.max,P.step,S,"px"),l=(S,w,y,v=P)=>E("mobile",Ls({label:r(S),icon:vs(S),desktopKey:w,min:v.min,max:v.max,step:v.step,fallback:y})),c=e.top??P.min,u=e.bottom??P.min,d="sectionPaddingLeft",h="sectionPaddingRight",p=e.sideBounds??P,f=e.side??p.min,m=e.sidePhone??f,g=e.phone===!0,b=S=>g?E("desktop",S):S;return ee({...o?{_gSpacing:T("Padding")}:{},[t]:b(s(c)),...g?{[V(t)]:l("Top",t,c)}:{},...e.only==="top"?{}:{[n]:b(W(r("Bottom"),i(St,{}),P.min,P.max,P.step,u,"px")),...g?{[V(n)]:l("Bottom",n,u)}:{}},...e.sides?{[d]:b(W(r("Left"),i(_t,{}),p.min,p.max,p.step,f,"px")),...g?{[V(d)]:l("Left",d,m,p)}:{},[h]:b(W(r("Right"),i(yt,{}),p.min,p.max,p.step,f,"px")),...g?{[V(h)]:l("Right",h,m,p)}:{}}:{}})}function Pc(e,t){const n=Object.fromEntries(Object.entries(t).map(([s,l])=>[s,s in e&&Ce(l)?e[s]:l])),o={};let r=!1;for(const[s,l]of Object.entries(e)){if(s in t){r||Object.assign(o,n),r=!0;continue}o[s]=l}return r||Object.assign(o,n),o}const me="Width";function kc(e,t=Oi,n=!0){const o=t.map(r=>({label:Ii[r],value:r}));return ee({...n?{_gWidth:T(me)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(_,{label:a(me),icon:i(_o,{}),action:n?i(Vi,{inherited:s?.inherited??!1,onReset:()=>r(Ei),label:me}):void 0,children:de({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:me})})}})}function Lc({fill:e=!1}={}){const t=(r,s)=>({type:"custom",render:({value:l,onChange:c})=>i(Bs,{value:l,onChange:c,view:r,badge:s,fill:e})}),n=()=>Le("sectionHeightMode"),o=()=>Le("sectionHeightMode");return ee({_gHeight:T(Q),...D("sectionHeightMode",r=>r==="desktop"?t(r):t(r,s=>i(Ms,{view:r,onClear:()=>s(void 0)}))),...D("sectionHeightValue",n),...D("sectionHeightUnit",o)})}function Bs({value:e,onChange:t,view:n,badge:o,fill:r=!1}){const s=I(),{mode:l,number:c,unit:u}=Ds(n,s,e);return i(_,{label:Q,icon:Y(i(bt,{})),action:o?o(t):void 0,children:k("div",{className:"es-width-stack",children:[de({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...r?[{label:"Fill",value:"fill"}]:[]],value:l,onChange:t,ariaLabel:Q}),c?i(Gs,{view:n,mode:l,menu:u}):null]})})}function Sn(e,t){return e==="phone"&&Be(t)?Pr(t):Nr(t)}function ge(e,t){return e==="desktop"||(e==="tablet"?Be(t):Rr(t))?null:Sn(e,t)}function Ds(e,t,n){const r=(s=>Vr.includes(s))(n)?n:ge(e,t)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function Hs(e,t,n,o){const r=ge(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[O("sectionHeightMode",e)]:r.mode,...r.mode==="fixed"?{[O("sectionHeightUnit",e)]:r.unit}:{},...n==="sectionHeightUnit"?{[O("sectionHeightValue",e)]:r.value}:{},[O(n,e)]:o}}function _n(e,t,n){const o=B(),r=ge(e,I());return!o||!r?{followed:null,write:n}:{followed:r,write:l=>o.onChangeMany(c=>{const u=Hs(e,c,t,l);return u===null?{[O(t,e)]:l}:Object.keys(u).length?u:null})}}function Gs({view:e,mode:t,menu:n}){const o=B(),r=I(),s=O("sectionHeightValue",e),l=O("sectionHeightUnit",e),c=S=>w=>o?.onChangeMany(()=>({[S]:w})),{followed:u,write:d}=_n(e,"sectionHeightValue",c(s)),{write:h}=_n(e,"sectionHeightUnit",c(l)),p=t==="screen"?"%":r[l],f=(u?u.unit:p)==="%"?"%":"px",m=f==="%"?Yr:jr,g=r[s],b=n?{options:["px","%"],label:a("Unit"),onChange:S=>h(S)}:void 0;return q({min:m.min,max:m.max,step:m.step,value:u?null:typeof g=="number"?g:m.fallback,...u?{placeholder:u.value}:{},suffix:f,...b?{units:b}:{},ariaLabel:Q,onChange:d})}function Ms({view:e,onClear:t}){const n=I(),o=ge(e,n)===null,r=e==="phone"&&Be(n),s=Sn(e,n),l=M(c=>a(c),s.mode==="auto"?a("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return i(x,{words:C()?.panel,label:a(Q),changed:o,detail:l,onReset:t})}function Ac(e={}){const t=e.intro===!0,n=s=>({type:"custom",render:({value:l,onChange:c,id:u,name:d})=>i(js,{value:l,onChange:c,labelId:`${u??d??"stickTop"}-label`,view:s,intro:t})}),o=s=>({type:"custom",render:({value:l,onChange:c})=>i(Xs,{value:l,onChange:c,view:s,intro:t})}),r=s=>({type:"custom",render:({value:l,onChange:c})=>i($s,{value:l,onChange:c,view:s,intro:t})});return{_gStick:T(vr,{dot:t?Ks:Mt}),...D("stickTop",n),...D("stickTopDistance",o),...ue(He,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?D(De,r):{},...t?{}:{[Hr]:Ws()},...t||e.above===!1?{}:{[Ar]:Us()}}}function Ws(){const e=z(Gr,i(Te,{}),Mr,Br);return E("desktop",{...e,render:t=>{const n=e.render({...t,value:Kr(t.value),onChange:o=>t.onChange(Xr(o))});return _e(n,{hint:a(Dr)})}})}function Us(){const e=xn(Fr,!1,i(Ct,{}),Lr);return E("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const Ks={any:[Mt,kr]};function yn(e,t,n,o,r){const s=B(),l=I(),c=e==="desktop"||ne(e,l)?null:Je(e,ae(l,{intro:o}));return{followed:c,write:(c||r)&&s?d=>s.onChangeMany(h=>{const p=Vs(e,h,d,t,o),f=p===null?{[O(t,e)]:d}:p;return Object.keys(f).length?{...f,...r?.(d)??{}}:null}):n}}function Xs({value:e,onChange:t,view:n,intro:o}){const r=I(),s=ae(r,{intro:o}),l=h=>{const p=Bi(h);return p==="desktop"||ne(p,r)},c=fe({row:He,label:"Distance from top",grid:{min:H.min,max:H.max,step:H.step},valueKey:"stickTopDistance",view:n,numbersIn:h=>l(h)&&$(r[ve("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&s.ownTablet?"tablet":"desktop"}),{followed:u,write:d}=yn(n,"stickTopDistance",t,o,c?h=>c.unitPatch(h===void 0):void 0);return i("div",{className:"sf-field",children:q({min:c?.grid.min??H.min,max:c?.grid.max??H.max,step:c?.grid.step??H.step,value:u?null:typeof e=="number"?e:H.fallback,...u?{placeholder:u.distance}:{},...c?{suffix:c.unit,units:c.units}:{suffix:"px"},ariaLabel:a("Distance from top"),onChange:d})})}function $s({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:s}=yn(n,De,t,o);return i(_,{label:a(Gt),icon:Y(i(bt,{})),children:q({min:ie.min,max:ie.max,step:ie.step,value:r?null:$(e)??ie.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Gt),onChange:s})})}function ne(e,t){return e==="tablet"?Ur(t):Wr(t)}function Je(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,unit:t.tabletUnit,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,unit:t.desktopUnit,screens:t.desktopScreens}}function Vs(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ne(e,t))return null;if(n===void 0)return{};const s=Je(e,ae(t,{intro:r})),l=e==="phone"&&ne("tablet",t)?h=>O(h,"tablet"):h=>h,c=(h,p)=>t[l(h)]==null?{}:{[O(h,e)]:p},u=He.unitKey,d=t[l(u)]==null?{}:{[O(u,e)]:s.unit};return{[O("stickTop",e)]:!0,...c("stickTopDistance",s.distance),...d,...c(De,s.screens),[O(o,e)]:n}}function js({value:e,onChange:t,labelId:n,view:o,intro:r}){const s=I(),l=ae(s,{intro:r}),c=o==="phone"?l.phone:o==="tablet"?l.tablet:r?l.desktop:e===!0,u=o==="phone"&&l.ownTablet,d=o==="desktop"?null:Je(o,l),h=d?.on?$r(d.distance,d.unit):a("Off");return i(_,{label:a(Ht),labelId:n,icon:Y(i(Ct,{})),action:k(L,{children:[o!=="desktop"?i(x,{words:C()?.panel,label:a(Ht),changed:ne(o,s),detail:M(p=>a(p),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(Ne,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const Cn="e.g. about";function Fc(){return{_gAnchor:T("Anchor"),anchor:X({control:"plainText",label:"Name",placeholder:Cn},{type:"custom",render:({value:e,onChange:t})=>i(Qn,{value:e,onChange:t,nameBox:(n,o)=>i(K,{value:n,onChange:o,label:"Name",placeholder:Cn,hideable:!1,markup:!1})})})}}function vc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(zo,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:d=>r(d?d.toISOString():"")})})}}}function Bc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-date`;return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(Yo,{id:c,value:Pn(typeof o=="string"?o:null),onChange:u=>r(u?Nn(u):"")})})}}}function xn(e,t,n,o){return{type:"custom",...F({},{...pe,label:e}),render:r=>{const{value:s,onChange:l,id:c,name:u}=r,d="follows"in r,h=r,p=typeof s=="boolean",f=typeof h.follows=="boolean"?h.follows:t,m=p?s:d?f:t,g=`${c??u??e}-label`,b=h.readOnly===!0,S=i(Ne,{checked:m,onChange:l,disabled:b,ariaLabelledBy:g});return i(_,{label:a(e),labelId:g,icon:n,hint:o===void 0?void 0:a(o),action:d?k(L,{children:[i(x,{words:C()?.panel,label:a(e),changed:p,detail:h.followsNoView?a(f?"On":"Off"):M(w=>a(w),a(f?"On":"Off"),h.followsView),disabled:b,onReset:()=>l(void 0)}),S]}):S})}}}function Dc(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(Ys,{label:"Background",icon:i(go,{}),id:r,value:e,shown:yo(e),onChange:t})}}}function Hc(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(se,{label:a(e),icon:n,value:o||t,onChange:r})}}function Ys({label:e,icon:t,id:n,value:o,shown:r,onChange:s}){const{colors:l,n:c}=Qe(),u=ke(o),d=u?le(u,l,c):null;return i(se,{label:a(e),icon:t,id:n,value:d?d.hex:r,caption:d?.words,onChange:s,choices:Ze(u??"",l,c,s)})}function Gc(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(zs,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Ze(e,t,n,o){const r=Re(e);return or(t,n).map(s=>({label:s.label,color:s.value,selected:r===s.name,onPick:()=>o(s.name)}))}function zs({value:e,onChange:t,twin:n}){const{colors:o,n:r}=Qe(),s=o.background,l=U(s.toUpperCase(),a("Theme {n} background",{n:r})),[c,u]=R(Co),[d]=R(Oo),h=typeof d=="string"&&d.trim()!=="",p=Ot(c),f=oe=>u(Ot(oe)||void 0),m=Re(e),g=m?le(m,o,r):null,b=Ze(e,o,r,t),S=n?()=>t(void 0):()=>t("");let w=s,y=l;if(n){const oe=Re(n.follows),we=Io(n.follows),Se=oe?le(oe,o,r):we?{hex:we,words:we.toUpperCase()}:null;w=Se?.hex??s,y=M(En=>a(En),Se?Se.words:l,n.view)}const v=!n&&(Eo(e)||h)?i(qs,{value:p,onChange:f}):null;return g?i(se,{label:a("Fill"),icon:i(Ee,{}),value:g.hex,caption:g.words,onChange:t,changed:!0,onReset:S,resetTo:y,choices:b,children:v}):i(Ft,{label:a("Fill"),icon:i(Ee,{}),value:e,inherited:w,resetTo:y,onChange:t,onReset:S,choices:b,children:v})}function qs({value:e,onChange:t}){return de({options:xo.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:a("Fill")})}function Js(e,t,n){if((e?.content??[]).some(l=>l?.props?.id===t))return ce(n);const r=No(e,t);if(r.length===0)return null;const s=ce(tn(n));if(s!==null)return s;for(let l=r.length-1;l>0;l-=1){const c=ce(tn(r[l].sectionAccent));if(c!==null)return c}return ce(r[0].sectionAccent)}function Qe(){const e=qt(G().theme),[t]=R("sectionAccent");let n=null;try{const{appState:r,selectedItem:s}=re(c=>c),l=s?.props?.id?String(s.props.id):void 0;n=l?Js(r?.data,l,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:oi(e.themes[o]),n:o+1}}function Mc(){return dn()}const Wc={top:i(co,{}),right:i(ao,{}),bottom:i(so,{}),left:i(lo,{})};function Uc(e,t,n,o,r,s,l){const c=p=>t.find(f=>f.value===p),u=p=>({value:p,label:"",disabled:!0,title:o}),d=p=>{const f=t.find(g=>g.cell===p);if(!f)return u(`missing-${p}`);const m=s?.[p];return m?{value:f.value,label:f.label,icon:m}:{value:f.value,label:f.label}},h=[u("corner-top-left"),d("top"),u("corner-top-right"),d("left"),u("centre"),d("right"),u("corner-bottom-left"),d("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:f})=>{const m=t.some(g=>g.value===p)?p:n;return i(_,{label:a(e),icon:r,value:c(m)?.label?a(c(m).label):l?a(l):"",children:Pi(a,{label:e,value:m,onChange:f,points:h})})}}}function Kc(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:s})=>i(Sr,{label:e,options:(s.options??t).map(l=>({...l,label:a(l.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:a(n)}:{}})}}function Xc(e,t,n,o){return{type:"custom",options:t,fallback:n,...F({},{type:"select",label:e}),render:({value:r,onChange:s,field:l})=>i(yr,{label:e,options:(l.options??t).map(c=>({...c,label:a(c.label)})),fallback:l.fallback??n,value:r,onChange:s,placeholder:o===void 0?void 0:a(o)})}}function $c(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const Vc=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function jc(e,t,n){const o=Object.keys(rt).map(r=>({label:rt[r],value:r,picture:n[r]}));return{type:"custom",...F({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(Qs,{label:e,icon:t,options:o,onChange:r})}}function Zs(e,t,n){const o=kn(e,t,n);if(o!==void 0)return o==="save-makes-frame"?a("A frame is made from this video when you save the page."):o==="starts-dark"?a("This video starts dark, so no frame was made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="outside"?a("This video is on another website, so no frame can be made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="unsupported"?a("This video's file type gives no frame. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="failed"?a("No frame could be made from this video. It is tried again the next time you save the page. The slide shows its background colour while the video loads."):o==="image-no-frame"?a("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=An(e);return r==="frame-missing-image"?a("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?a("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?a("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?a("No image yet. The slide shows its background colour until you choose one."):void 0}function Qs({label:e,icon:t,options:n,onChange:o}){const r=B(),s=r?.values??{},l=Ln(s),c=nt(Bn),u=vn(c?.docId??null);let d=null;try{d=re(p=>p.appState.data)}catch{d=null}const h=Fn(r?.id,d,u);return i(_,{label:a(e),icon:Y(t),hint:Zs(s,h,c?.hasUnsavedEdits??!1),children:de({options:n,value:l,onChange:o,ariaLabel:e})})}function Yc(e,t,n,o={}){const r={type:"custom",[at]:!0,render:({value:s,onChange:l,name:c})=>i(wr,{value:s||"",onChange:l,fieldKey:c,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?E("each",r):r}const zc={HeroSingle:["imageFocal"],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function el(e){const t=a(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function qc({value:e,onChange:t,label:n}){const o=e||{},r=B(),s=r?r.values!==r.node.props:!0,l=!!o.pending&&s,c=!!o.pending&&!s,u=!!Ri(Ti()).geocode,d=ot(),h=(p,f)=>t({...o,[p]:f??void 0});return k(L,{children:[i(_,{label:a(n),icon:i(wt,{}),action:u?i(Pe,{content:a("Find from the address (OpenStreetMap)"),children:i(Lt,{"aria-label":a("Find from the address"),"aria-busy":l||void 0,disabled:l,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(bo,{})})}):void 0,children:u&&o.status?i(eo,{compact:!0,oneLine:!0,spaced:!1,status:l?"busy":o.ok&&!c?"found":"notfound",statusText:l?a("Finding…"):c?a(nr):a(o.status),hint:el(o)}):null}),i(_,{label:a("Enter by hand"),labelId:d,icon:i(uo,{}),action:i(Ne,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:d})}),o.manual&&i(_,{label:a("Latitude, longitude"),icon:i(wt,{}),children:k("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(At,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>h("lat",p),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(At,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>h("lng",p),min:-180,max:180,step:1e-4,placeholder:a("Longitude")})]})})]})}function tl(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function nl(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,s)=>s===t?{text:n}:r)}function Jc(e,t){return e===null?null:t>e?e:null}function ol(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}const Zc={label:"Ticker items",icon:i(mo,{})};function Qc(e,t,n,o){return{type:"custom",[N]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...F({},{...an.textList,label:e}),render:({value:r,onChange:s})=>i(rl,{label:e,icon:Y(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function rl({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const l=J(null),[c,u]=Z(null),d=p=>p.map(f=>({text:f?.text??""})),h=p=>{const f=ol(n,p,c);f===null&&(l.current=null),u(f),r(d(p))};return i(Ho,{label:a(e),icon:t,noun:a("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?i(vt,{target:l,value:tl(n,c),onChange:p=>r(nl(n,c??-1,p)),disabled:c===null,label:c===null?a("Formatting — click a row first"):a("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,f,m)=>i("input",{type:"text",className:s&&c===f?"sf-list-marking":void 0,value:p?.text??"",placeholder:a(o),"aria-label":a("{label} {n}",{label:a(e),n:f+1}),onChange:g=>m({text:g.target.value}),onFocus:g=>{l.current=g.currentTarget,u(f)}})})}function eu(e,t){const n=`${e.label} — row ${t+1}`;return X({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:a("{label} — row {n}",{label:a(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function tu(e){return{_gCards:T("Cards"),coverIndex:z("Cover image",i(ho,{}),mr,String(gr),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:os("Image background",ui),cardImage:On()}}function nu(){return{outline:z("Card outline",i(wo,{}),pr,hr),indexBadge:z("Card number",i(fo,{}),dr,fr),showBadge:xn("Product badge",!0,i(xt,{noun:"tag"}))}}function ou(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...pe,label:be.find(s=>s.id===r).label}),o=r=>F(Le(et),n(r));return{_gShowOnCard:T("Show on a card"),[et]:F({type:"custom",render:()=>i(il,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(et)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const et="showCardPrice",be=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function il({rest:e}){const t=I(),n=he(),o=l=>typeof t[l]=="boolean"?t[l]:void 0,r=l=>o(l)??e[l],s=be.some(({id:l})=>o(l)!==void 0&&o(l)!==e[l]);return i(tt,{parts:be,changed:s,shown:r,onPress:(l,c)=>n({[l]:c}),onReset:()=>n(Object.fromEntries(be.map(({id:l})=>[l,void 0])))})}function ru(e,t="display"){const n=V(t);return{[t]:E("desktop",{type:"custom",render:({value:o,onChange:r})=>i(tt,{parts:e,changed:Mo(o),shown:s=>Wo(o,s),onPress:(s,l)=>r(Xo(o,s,l)),onReset:()=>r(void 0)})}),[n]:E("mobile",{type:"custom",render:({value:o,onChange:r})=>i(sl,{parts:e,desktopKey:t,value:o,onChange:r})})}}function tt({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:l}){const c=a("Display");return i(_,{label:c,icon:i(no,{}),changed:t,action:i(x,{words:C()?.panel,label:c,changed:t,detail:s,onReset:r}),children:i(Go,{label:c,items:e.map(u=>({id:u.id,label:a(u.label),shown:n(u.id),...l?{disabled:!0,disabledReason:a(l)}:{}})),onChange:o})})}function sl({parts:e,desktopKey:t,value:n,onChange:o}){const r=I()[t];return i(tt,{parts:e,changed:Ko(n),shown:s=>Uo(r,n,s),onPress:(s,l)=>o($o(n,s,l)),onReset:()=>o(cr),detail:a("the same as Desktop")})}function On(e=Gn){return W("Card image",i(mt,{}),A,xe,Mn,A,e,{clear:{hint:A},hint:"Rounds the picture. The card's own corner is in Styles."})}function ll(){return ue(dt,"cardImage")}function iu(){return{cardImage:On(dt),...ll()}}function su(){return ze({sidesKey:"cornerSides",row:Kn,step:Wn,useFollowed:()=>A,mark:i(al,{label:Un}),hint:a("Rounds the picture. Left alone it stays square.")})}function al({label:e,changed:t=!1,onReset:n=()=>{}}){return i(x,{words:C()?.panel,label:a(e),changed:t,onReset:n})}function lu(){return{type:"custom",render:({value:e,onChange:t})=>i(pl,{value:typeof e=="string"?e:"",onChange:t})}}const In="own";function au(){const e=[{value:In,label:"Layout's own",picture:sn(Array.from({length:8},()=>[3,1]))},...Object.entries(jn).map(([t,n])=>({value:t,label:n.label,picture:sn([...n.phone,...n.phone])}))];return E("mobile",on("Layout",i(gt,{}),e,In,{columns:2,cell:Hi}))}function cl({layout:e,width:t}){const n=Yn(e),o=n?`${n[0]}/${n[1]}`:void 0;return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:o?"auto":6,gridAutoFlow:"row dense",gap:2},children:zn(e).map(([r,s],l)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${s}`,aspectRatio:o}},l))})}const ul={width:"3.5rem",height:"2.5rem"},dl=200;function pl({value:e,onChange:t}){const[n,o]=Z(null),[r,s]=Z(4),l=J(null);Rn(()=>{const m=l.current;if(!m||typeof ResizeObserver!="function")return;const g=()=>s(m.getBoundingClientRect().width>=dl?4:3);g();const b=new ResizeObserver(g);return b.observe(m),()=>b.disconnect()},[]);const c=e?Di(Oe,e):void 0,u=c?e:"",d=pt(n,u),h=pt(n,"").length,p=qn("no-symbol"),f=[{value:"",label:a("Not chosen"),icon:vi(p,a("Not chosen"))},...d.map(m=>({value:m,label:a(Oe[m].label),icon:i(cl,{layout:Oe[m],width:40})}))];return i(_,{label:a("Layout"),icon:i(gt,{}),value:c?a(c.label):void 0,children:i("div",{ref:l,style:{flex:"1 1 auto",minWidth:0},children:i(Nt,{label:a("Layout"),value:u,options:f,onChange:t,columns:r,cell:ul,header:k("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:a("Photos in a row")}),i(Ao,{options:[{id:"all",label:a("All")},...$n.map(m=>({id:String(m),label:String(m)}))],value:n===null?"all":String(n),ariaLabel:a("Photos in a row"),onChange:m=>o(m==="all"?null:Number(m))}),i("span",{className:"text-2xs text-ink-faint",children:a("{n} of {total} layouts",{n:h,total:Vn.length})})]})})})})}export{Yi as BOUND_TO_POST,nc as BOUND_TO_POST_NOTE,uc as BUCKET_ICONS,zc as CUSTOM_FIELD_MEDIA,qc as CoordsField,ln as DESKTOP_GAP_NOT_OVERLAP,tt as DisplayRow,Wc as EDGE_ARROWS,qo as FOCAL_DEFAULT,ye as FOLD_FIELD_MARKER,zi as HIGHLIGHT_HINT,K as HidableTextField,lt as LINK_FIELD_MARKER,$a as Label,at as MEDIA_FIELD_MARKER,Vc as MEDIA_TYPE_OPTIONS,oc as NOT_BOUND_TO_POST,bc as PanelBand,Zi as PanelNoteLine,Ns as RowPropsContext,ct as SCAFFOLD_FIELD_MARKER,pu as SCALAR_TEXT_CONTROLS,Mi as SiteGapDefaultReset,q as Slider,es as Swatches,du as TEXT_CONTROL_KINDS,N as TEXT_FIELD_MARKER,Zc as TICKER_ITEMS_ROW,rl as TextListField,Ys as ThemeFillRow,me as WIDTH_LABEL,Vi as WidthDefaultReset,ol as aimAfterListChange,Fc as anchorFields,U as backTo,wc as backgroundField,xc as boxBlockSpacingField,Ec as boxColumnsFields,Gc as boxFillField,Ts as boxPhoneRowField,Os as boxShareField,Oc as boxSharePhoneField,Ic as boxShareTabletField,Js as boxThemeIndexOf,fc as bucketHeader,yc as buttonWordsEntryField,Cs as cardCornersField,os as cardImageBackgroundField,On as cardImageField,iu as cardImageFields,tu as cardMediaFields,Cc as cardShapeFields,ou as cardShowFields,nu as cardStyleFields,Rc as cellWidthFields,Hc as colorInput,ja as containerDirectionField,Wi as containerGapField,Ui as containerGapPhoneField,Va as containerGapRows,Ki as containerGapTabletField,el as coordsResultTip,lc as copyText,fn as cornerSidesField,ze as cornersRowField,pn as cornersUnitFields,Bc as date,vc as dateTime,hc as designGroupHeader,ru as displayFields,Uc as edgePad,Ze as fillSlotChoices,Jc as focusAfterRemove,Mc as focusKeptField,mc as foldMarker,Ce as foldMetaOf,Qi as foldTitleOf,Hs as followedHeightPatch,Vs as followedStickPatch,lu as galleryLayoutField,au as galleryLayoutPhoneField,Lc as heightFields,ge as heightFollowedBy,Ds as heightLayersAt,Ya as heroGroupPlacementPoints,st as hidableText,Ji as hintIsWhileTyping,su as imageCornersField,tc as inOwnBox,pc as isBucketHeader,dn as keptBy,ac as linkField,Zs as loadingRowHint,jc as loadingShowsField,Kc as multiSelect,Dc as pageBackgroundField,dc as panelNote,Ls as phoneOverrideField,sc as plainText,cc as plainTextarea,rs as pxField,gc as quietMarker,it as readHidable,tl as rowText,Xc as searchSelect,ns as sectionBandChoices,cs as sectionCornersField,_c as sectionShapeFields,Sc as sectionThemeFields,nl as setRowText,Tc as sizeField,$c as sourceField,Nc as spacingFields,Ac as stickFields,Pc as swapPadding,rc as text,Dn as textFieldIdentifier,Ja as textFieldOffPage,Qa as textFieldPanelOnly,Qc as textList,eu as textListRowField,ic as textarea,xn as toggle,Yc as upload,fe as useLengthRow,he as useSelectedPatch,I as useSelectedProps,R as useSelectedSibling,Gi as useSiteGapDetail,kc as widthField,ec as withIdentifier,qa as withOffPage,Za as withPanelOnly,za as withScaffold};
@@ -1 +1 @@
1
- import{convertSection as l,pressesAsBox as P,SECTION_TO_BOX_PRESS as k,sectionToBoxRow as T}from"../../../render/lib/sections/section-to-box.js";import{SECTION_PRESETS as x,presetFor as B}from"../../../format/lib/sections/section-presets.js";import{GENERAL_SECTION_TO_BOX as C,TEXT_PRESS_STARTERS as g}from"../../../render/lib/document/blocks/general/section-to-box-rows.js";import{SECTION_CATALOG as w}from"../../../format/lib/document/section-catalog.js";import{statsBoxSeed as E,statsPressSeed as L,statsSeedRows as N}from"../../../render/lib/document/blocks/general/section-to-box-rows-stats.js";import{footerPaymentPressStarter as A,logosPressStarter as j,paymentPressStarter as v}from"../../../render/lib/document/blocks/general/section-to-box-rows-logos.js";import{cardsPressStarter as X}from"../../../render/lib/document/blocks/general/section-to-box-rows-cards.js";import{pageHeaderPressStarter as D}from"../../../render/lib/document/blocks/general/section-to-box-rows-pageheader.js";import{tabBarPressStarter as G}from"../../../render/lib/document/blocks/general/section-to-box-rows-tabbar.js";import{milestoneTimelinePressStarter as I,storyTimelinePressStarter as U}from"../../../render/lib/document/blocks/general/section-to-box-rows-timeline.js";import{seedNodes as M}from"../../../format/lib/document/seed-parts.js";import{isNodeList as u}from"efficient-easel/data";import{ownEntry as S}from"../../../format/lib/own-entry.js";const W=Object.keys(C),O={Logos:j,DocMasthead:D,DocTabs:G,Timeline:U,TimelineTrack:I},Y={PaymentBadges:v,PaymentLogosBlock:A};function f(t,s,r){const o={};for(const n of Object.keys(s(t.type)))o[n]=void 0;for(const[n,e]of Object.entries(t.props))o[n]=u(e)?e.map(p=>f(p,s,r)):e;return o.id=r(t.type),{type:t.type,props:o}}const y=t=>({...t?.theme?{theme:t.theme}:{},...t?.site?{site:t.site}:{},press:!0});function b(t,s,r=0,o=()=>({})){return(n,e,p)=>{const{nodes:i}=l({type:t,props:{...n(t),...o(),id:e(t)}},s,y(p));return f(i[r],n,e)}}const $={Stats:q,Cards:H};function H(){const t=T("Cards");if(!t)return null;const s=b("Cards",t,0,X);return(r,o,n)=>{const e=s(r,o,n);return{...e,props:{...e.props,name:"Cards section"}}}}function q(){const t=T("StatsParagraph");return t?(s,r,o)=>{const{nodes:n}=l({type:"StatsParagraph",props:{...s("StatsParagraph"),...L(),id:r("StatsParagraph")}},t,y(o)),e=n[0],p=u(e.props.content)?e.props.content.filter(m=>m.props?.cardStyle===void 0):[],i=d(E(N(),"table")),a=p.map(h),c=f({...e,props:{...e.props,content:[...a,i]}},s,r);return{...c,props:{...c.props,name:"Stats section"}}}:null}function h(t){return t.props?.name==="Words"?{...t,props:{...t.props,widthFitPhone:"fill"}}:u(t.props?.content)?{...t,props:{...t.props,content:t.props.content.map(h)}}:t}const d=t=>M([t],(s,r)=>`${s}-seed-${r}`)[0];function z(t,s){if(!P(t,s))return null;const r=S($,t);if(r)return r();const o=T(t);return o?b(t,o,0,S(O,t)??S(g,t)??S(Y,t)):null}function J(t){return(s,r,o)=>{const n=e=>{if(e.type==="Stats"){const a=f(d(E([],"list")),s,r);return{...a,props:{...a.props,name:"Numbers"}}}let p=!1;const i={};for(const[a,c]of Object.entries(e.props))if(u(c)){const m=c.map(n);p||=m.some((R,_)=>R!==c[_]),i[a]=m}else i[a]=c;return p?{type:e.type,props:i}:e};return n(t(s,r,o))}}function ct(t,s=k){const r=B(t);return r?J(r):z(t,s)}const K=t=>w.some(s=>s.key==="structure"&&s.sections.some(r=>r.type===t));function mt(){return[...Object.keys(x),...W.filter(t=>P(t)&&!K(t)),...Object.keys(O).filter(t=>P(t))]}export{O as MERGE_LAYOUTS,W as TEXT_LAYOUTS,b as conversionPreset,ct as layoutPresetFor,mt as layoutTypes};
1
+ import{convertSection as P,pressesAsBox as m,SECTION_TO_BOX_PRESS as R,sectionToBoxRow as u}from"../../../render/lib/sections/section-to-box.js";import{SECTION_PRESETS as _,presetFor as k}from"../../../format/lib/sections/section-presets.js";import{GENERAL_SECTION_TO_BOX as N,TEXT_PRESS_STARTERS as w}from"../../../render/lib/document/blocks/general/section-to-box-rows.js";import{SECTION_CATALOG as x}from"../../../format/lib/document/section-catalog.js";import{statsBoxSeed as T,statsPressSeed as B,statsSeedRows as C}from"../../../render/lib/document/blocks/general/section-to-box-rows-stats.js";import{footerPaymentPressStarter as L,logosPressStarter as g,paymentPressStarter as A}from"../../../render/lib/document/blocks/general/section-to-box-rows-logos.js";import{cardsPressStarter as j}from"../../../render/lib/document/blocks/general/section-to-box-rows-cards.js";import{pageHeaderPressStarter as X}from"../../../render/lib/document/blocks/general/section-to-box-rows-pageheader.js";import{tabBarPressStarter as v}from"../../../render/lib/document/blocks/general/section-to-box-rows-tabbar.js";import{milestoneTimelinePressStarter as D,storyTimelinePressStarter as G}from"../../../render/lib/document/blocks/general/section-to-box-rows-timeline.js";import{seedNodes as I}from"../../../format/lib/document/seed-parts.js";import{isNodeList as S}from"efficient-easel/data";import{mapEachNode as U,mapNodeLists as M}from"../../../format/lib/document/node-lists.js";import{ownEntry as a}from"../../../format/lib/own-entry.js";const W=Object.keys(N),l={Logos:g,DocMasthead:X,DocTabs:v,Timeline:G,TimelineTrack:D},Y={PaymentBadges:A,PaymentLogosBlock:L};function c(t,s,r){const o={};for(const n of Object.keys(s(t.type)))o[n]=void 0;for(const[n,e]of Object.entries(t.props))o[n]=S(e)?e.map(p=>c(p,s,r)):e;return o.id=r(t.type),{type:t.type,props:o}}const E=t=>({...t?.theme?{theme:t.theme}:{},...t?.site?{site:t.site}:{},press:!0});function O(t,s,r=0,o=()=>({})){return(n,e,p)=>{const{nodes:i}=P({type:t,props:{...n(t),...o(),id:e(t)}},s,E(p));return c(i[r],n,e)}}const $={Stats:q,Cards:H};function H(){const t=u("Cards");if(!t)return null;const s=O("Cards",t,0,j);return(r,o,n)=>{const e=s(r,o,n);return{...e,props:{...e.props,name:"Cards section"}}}}function q(){const t=u("StatsParagraph");return t?(s,r,o)=>{const{nodes:n}=P({type:"StatsParagraph",props:{...s("StatsParagraph"),...B(),id:r("StatsParagraph")}},t,E(o)),e=n[0],p=S(e.props.content)?e.props.content.filter(b=>b.props?.cardStyle===void 0):[],i=d(T(C(),"table")),h=p.map(y),f=c({...e,props:{...e.props,content:[...h,i]}},s,r);return{...f,props:{...f.props,name:"Stats section"}}}:null}function y(t){return t.props?.name==="Words"?{...t,props:{...t.props,widthFitPhone:"fill"}}:S(t.props?.content)?{...t,props:{...t.props,content:t.props.content.map(y)}}:t}const d=t=>I([t],(s,r)=>`${s}-seed-${r}`)[0];function z(t,s){if(!m(t,s))return null;const r=a($,t);if(r)return r();const o=u(t);return o?O(t,o,0,a(l,t)??a(w,t)??a(Y,t)):null}function J(t){return(s,r,o)=>{const n=e=>{if(e.type==="Stats"){const i=c(d(T([],"list")),s,r);return{...i,props:{...i.props,name:"Numbers"}}}const p=M(e,i=>U(i,n));return p===e?e:{type:e.type,props:p.props}};return n(t(s,r,o))}}function mt(t,s=R){const r=k(t);return r?J(r):z(t,s)}const K=t=>x.some(s=>s.key==="structure"&&s.sections.some(r=>r.type===t));function ut(){return[...Object.keys(_),...W.filter(t=>m(t)&&!K(t)),...Object.keys(l).filter(t=>m(t))]}export{l as MERGE_LAYOUTS,W as TEXT_LAYOUTS,O as conversionPreset,mt as layoutPresetFor,ut as layoutTypes};
@@ -4,6 +4,7 @@ import type { SourceRow } from "./block-sources.js";
4
4
  import { BOX_ROW_IMAGE_PROP } from "./box-card-rule.js";
5
5
  import { type ViewVarNames } from "./view-var-split.js";
6
6
  export declare const CARD_SHADOW_CLASS = "sf-card";
7
+ export declare const CARD_NO_LIFT_CLASS = "[--sf-card-lift:none] [--sf-card-shadow-hover:var(--sf-card-shadow,none)]";
7
8
  export declare const BOX_DARKEN: {
8
9
  readonly min: 0;
9
10
  readonly max: 100;