efficient-web-builder 67.5.0 → 67.7.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 (84) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/editor/components/storefront-editor.css +3 -1
  3. package/dist/editor/lib/document/ColourControl.d.ts +2 -1
  4. package/dist/editor/lib/document/ColourControl.js +1 -1
  5. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  6. package/dist/editor/lib/document/blocks/general/HeroSlide/fields.js +1 -1
  7. package/dist/editor/lib/document/blocks/general/HostPart/fields.d.ts +2 -0
  8. package/dist/editor/lib/document/blocks/general/HostPart/fields.js +1 -0
  9. package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
  10. package/dist/editor/lib/document/blocks/general/index.js +1 -1
  11. package/dist/editor/lib/document/blocks/shared-fields.js +1 -1
  12. package/dist/editor/lib/document/build-config.js +1 -1
  13. package/dist/editor/lib/document/controls.d.ts +5 -2
  14. package/dist/editor/lib/document/controls.js +1 -1
  15. package/dist/editor/lib/sections/text-layouts.js +1 -1
  16. package/dist/format/lib/content/box-background.d.ts +13 -0
  17. package/dist/format/lib/content/box-background.js +1 -1
  18. package/dist/format/lib/content/button-icon.d.ts +1 -1
  19. package/dist/format/lib/content/button-icon.js +1 -1
  20. package/dist/format/lib/content/card-template.d.ts +1 -0
  21. package/dist/format/lib/content/card-template.js +1 -1
  22. package/dist/format/lib/content/count-numbers.js +1 -1
  23. package/dist/format/lib/content/gallery-layout.d.ts +11 -2
  24. package/dist/format/lib/content/gallery-layout.js +1 -1
  25. package/dist/format/lib/content/image-treatment.js +1 -1
  26. package/dist/format/lib/content/view-lines.d.ts +1 -0
  27. package/dist/format/lib/content/view-lines.js +1 -1
  28. package/dist/format/lib/document/blocks/block-types.d.ts +4 -0
  29. package/dist/format/lib/document/blocks/general/HostPart/meta.d.ts +2 -0
  30. package/dist/format/lib/document/blocks/general/HostPart/meta.js +1 -0
  31. package/dist/format/lib/document/blocks/general/metas.d.ts +1 -0
  32. package/dist/format/lib/document/blocks/general/metas.js +1 -1
  33. package/dist/format/lib/document/cap-hero-groups.js +1 -1
  34. package/dist/format/lib/document/general-order.d.ts +1 -1
  35. package/dist/format/lib/document/general-order.js +1 -1
  36. package/dist/format/lib/document/list-search-scopes.js +1 -1
  37. package/dist/format/lib/document/node-lists.d.ts +9 -0
  38. package/dist/format/lib/document/node-lists.js +1 -0
  39. package/dist/format/lib/document/passes/types.d.ts +4 -0
  40. package/dist/format/lib/document/renamed-props.js +1 -1
  41. package/dist/format/lib/document/section-catalog.js +1 -1
  42. package/dist/format/lib/document/seed-parts.d.ts +1 -1
  43. package/dist/format/lib/document/seed-parts.js +1 -1
  44. package/dist/format/lib/editor-words-catalogue.d.ts +9 -0
  45. package/dist/format/lib/editor-words-catalogue.js +3 -3
  46. package/dist/format/lib/hero-video.d.ts +1 -1
  47. package/dist/format/lib/hero-video.js +1 -1
  48. package/dist/format/lib/source-rules/no-hard-coded-option-rows.js +1 -1
  49. package/dist/format/lib/source-rules/own-key-reads.d.ts +5 -0
  50. package/dist/format/lib/source-rules/own-key-reads.js +9 -7
  51. package/dist/format/lib/source-rules/support/ts-program.d.ts +1 -0
  52. package/dist/format/lib/source-rules/support/ts-program.js +2 -2
  53. package/dist/render/components/ButtonBlock.js +1 -1
  54. package/dist/render/components/CardRowContext.d.ts +9 -1
  55. package/dist/render/components/CardRowContext.js +1 -1
  56. package/dist/render/components/Flex.d.ts +2 -1
  57. package/dist/render/components/Flex.js +1 -1
  58. package/dist/render/components/HeroPoster.d.ts +5 -1
  59. package/dist/render/components/HeroPoster.js +1 -1
  60. package/dist/render/components/HeroSlide.d.ts +5 -1
  61. package/dist/render/components/HeroSlide.js +1 -1
  62. package/dist/render/components/HeroVideoPlay.d.ts +4 -1
  63. package/dist/render/components/HeroVideoPlay.js +1 -1
  64. package/dist/render/components/SectionAnimation.d.ts +3 -0
  65. package/dist/render/components/SectionAnimation.js +1 -1
  66. package/dist/render/lib/animation/entrance.js +1 -1
  67. package/dist/render/lib/content/page-contents.js +1 -1
  68. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  69. package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
  70. package/dist/render/lib/document/blocks/general/HostPart/render.d.ts +2 -0
  71. package/dist/render/lib/document/blocks/general/HostPart/render.js +1 -0
  72. package/dist/render/lib/document/blocks/general/renders.d.ts +1 -0
  73. package/dist/render/lib/document/blocks/general/renders.js +1 -1
  74. package/dist/render/lib/document/card-press-titles.js +1 -1
  75. package/dist/render/lib/document/head-core-boxes.js +1 -1
  76. package/dist/render/lib/document/hero-media-parts.d.ts +2 -0
  77. package/dist/render/lib/document/hero-media-parts.js +1 -1
  78. package/dist/render/lib/document/passes/clickable-parts.js +1 -1
  79. package/dist/render/lib/document/passes/section-padding.d.ts +5 -2
  80. package/dist/render/lib/document/passes/section-padding.js +1 -1
  81. package/dist/render/lib/document/wall-labels.js +1 -1
  82. package/dist/render/lib/media.d.ts +15 -0
  83. package/dist/render/lib/media.js +1 -1
  84. package/package.json +1 -1
@@ -1 +1 @@
1
- "use client";import{jsx as i,jsxs as k,Fragment as P}from"react/jsx-runtime";import{cloneElement as ge,createContext as wn,useContext as Qe,useEffect as Sn,useId as et,useRef as J,useState as Z}from"react";import{useEasel as oe,useSelectedHost as v}from"efficient-easel/easel";import{PIN_LENGTH as re,toDateKey as _n,fromDateKey as Cn}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 tt,firstFrameHint as yn,loadingShowsOf as xn,loadingStillHint as In}from"../../../format/lib/hero-video.js";import{pageFramesFor as On,usePageVideoFrames as Tn}from"../page-video-frames.js";import{ScreenDocumentContext as En}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as nt,hidableText as ot}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as be,LINK_FIELD_MARKER as rt,MEDIA_FIELD_MARKER as it,SCAFFOLD_FIELD_MARKER as st,TEXT_FIELD_MARKER as R,foldMetaOf as we,textFieldIdentifier as Rn}from"efficient-easel/draw";import Nn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as lt}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as kn,CARD_IMAGE_RADIUS_ROW as at,CARD_IMAGE_RADIUS_STEP as Pn,CORNER_RADIUS_MAX as Se,CORNER_RADIUS_MIN as A}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as An,IMAGE_CORNERS_LABEL as Ln,IMAGE_CORNERS_ROW as Fn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as vn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Bn,GALLERY_LAYOUTS as _e,GALLERY_LAYOUT_KEYS as Dn,galleryChoices as ct,galleryLayoutRatio as Hn,galleryPictureCells as Gn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as Mn}from"./shell-glyph.js";import{anchorSiblingsOf as Wn,placementPoints as Un}from"../../../format/lib/hero-group-placement.js";import Kn from"../../components/AnchorField.js";import $n from"../../components/SourceStatus.js";import{AdjustIcon as Xn,EyeIcon as Vn,AnimationIcon as jn,BackgroundIcon as ut,BorderAllIcon as zn,BlockSectionIcon as Yn,ColumnWidthsIcon as Ce,ColumnsIcon as dt,CornerIcon as pt,DirectionDownIcon as qn,DirectionLeftIcon as Jn,DirectionRightIcon as Zn,DirectionUpIcon as Qn,EditIcon as eo,GapIcon as to,GridIcon as no,GroundIcon as ye,HashIcon as oo,HeightIcon as ft,ImageIcon as ro,ListIcon as io,LocationIcon as ht,PaddingBottomIcon as mt,PaddingLeftIcon as gt,PaddingRightIcon as bt,PaddingTopIcon as xe,PageIcon as so,StickyIcon as wt,SearchIcon as lo,SquareIcon as ao,TypeIcon as co,WidthIcon as uo}from"efficient-easel/icons";import{FieldGlyph as St}from"../../components/FieldGlyph.js";import{resolvePageBackground as po}from"../../../format/lib/content/page-background.js";import{boxFillOf as fo,boxFillSlot as Ie}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as _t,CORNER_SIDE_POINTS as ho,SECTION_CORNERS_ROW as Ct,hasOwnSectionCorners as mo,normalizeCornerSides as yt}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as xt}from"../../../format/lib/content/card-corners.js";import{enclosingPath as go,enclosingSection as bo}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsDrill as wo,SettingsField as _,SettingsGroup as So,SettingsSegmented as _o,SettingsBorder as Co,SettingsSidesEach as yo,SettingsSwitch as Oe,borderSides as xo,borderStartEach as Io}from"efficient-easel/panel";import{ListField as Oo}from"efficient-easel/fields";import{DisplayChips as To}from"efficient-shell/ui";import{desktopDisplayChanged as Eo,partShownOnDesktop as Ro,partShownOnPhone as No,phoneDisplayChanged as ko,withDesktopPart as Po,withPhonePart as Ao}from"../../../format/lib/content/part-display.js";import{ColorSwatch as Lo,CornersInput as Fo,DatePicker as vo,DateTimePicker as Bo,FOCAL_DEFAULT as Do,IconPicker as It,COLUMN_COUNT_MAX as Ot,COLUMN_SHARE_MIN as Ho,COLUMN_SHARES_EQUAL as Go,resolveColumnShares as Tt,WidthsBar as Mo,useShellStrings as Wo,IconButton as Et,InputNumber as Rt,Slider as Uo,Tooltip as Te}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as Ko}from"./geocode-resolve.js";import{ColourRow as ie,InheritedColourRow as Nt}from"./ColourControl.js";import{fillThemeColors as $o,slotFill as se}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as Ee}from"../../../format/lib/document/part-inks.js";import{keptByRow as Re}from"efficient-easel/screen/lib/document/style-fields";import kt from"./MarkupToolbar.js";import{deviceField as T}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as Xo,NoControlMark as Vo,noControlField as Pt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as jo}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as zo,PANEL_ONLY_FIELD as Yo}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as qo,resolvePhoneValue as Ne}from"../../../format/lib/document/phone-override.js";import{phoneKey as X,tabletKey as ke,viewKeyAt as Pe}from"efficient-easel/draw";import{viewKey as I}from"../../../format/lib/animation/views.js";import{viewRows as B}from"../animation/view-rows.js";import{SuppressibleText as Jo}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Zo,CARD_OUTLINE_OPTIONS as Qo,DEFAULT_CARD_INDEX_FORMAT as er,DEFAULT_CARD_OUTLINE as tr}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as nr,DEFAULT_COVER_INDEX as or}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as rr}from"efficient-easel/draw";import ir from"../../components/MediaUploadField.js";import sr from"../../components/MultiSelectField.js";import lr from"../../components/SectionThemePicker.js";import ar from"../../components/SearchSelectField.js";import cr from"../../components/StorefrontLinkField.js";import{UiIcon as At}from"efficient-easel/draw/client";import{SECTION_PADDING as N}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as ur}from"../../../render/lib/content/button-look.js";import{usePreviewParts as dr}from"efficient-easel/draw/client";import{encodePartId as pr}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as fr,useEaselStrings as hr}from"efficient-easel/strings";import{hasPhoneHeight as mr,hasTabletHeight as Ae,resolveSectionMinHeight as gr,resolveTabletHeight as br}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as wr,SECTION_PIN_ABOVE_HINT as Sr,SECTION_PIN_ABOVE_KEY as _r,SECTION_PIN_ABOVE_LABEL as Cr,SECTION_PIN_GROUP as yr,SECTION_PIN_LABEL as Lt,SECTION_PIN_SCREENS_KEY as Le,SECTION_PIN_SCREENS_LABEL as Ft,SECTION_PIN_STOP_DEFAULT as xr,SECTION_PIN_STOP_HINT as Ir,SECTION_PIN_STOP_KEY as Or,SECTION_PIN_STOP_LABEL as Tr,SECTION_PIN_STOP_OPTIONS as Er,SECTION_STICK_DISTANCE as D,SECTION_STICK_DISTANCE_ROW as Fe,SOME_VIEW_PINS as vt,hasPhoneStick as Rr,hasTabletStick as Nr,resolveSectionStick as le,sectionPinStopOf as kr,sectionPinStopWrite as Pr}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as Ar}from"../../../format/lib/content/css-length.js";import{SECTION_HEIGHT_MODES as Lr,SECTION_MIN_HEIGHT as Fr,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as vr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as Br,resolveContainerDirection as Bt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Dr,BOX_BLOCK_SPACING_POINTS as Dt,BOX_PHONE_ROW_LABEL as Ht,BOX_COLUMNS_MAX as Hr,BOX_COLUMNS_MIN as Gt,BOX_PHONE_ROW_MAX as Gr,BOX_PHONE_ROW_MIN as ve,BOX_SHARE_CHOICES as Mt,BOX_SHARE_LABEL as V,boxShareChoiceOf as Wt,boxShareWidthsOf as Be,BOX_SHARE_PHONE_DEFAULT as Mr,BOX_SHARE_PHONE_POINTS as Wr}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as H}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Ut,BORDER_SIDES as Ur,SECTION_BORDER_ROW as Kt,borderBySide as $t}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as Kr,normalizeTheme as Xt,normalizeThemeColors as $r,sectionBandTone as Xr,surfaceTwoTone as Vr}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Vt,CONTAINER_GAP_BUILT_IN as jr,CONTAINER_GAP_PHONE as De,GAP_FIELD_CONTAINER as He,followsSitePhoneGap as zr,hasOwnContainerGap as Yr,hasOwnPhoneGap as Ge,resolveContainerGap as jt,resolvePhoneContainerGap as zt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as qr,CARD_IMAGE_BG_OFF as Jr,CARD_IMAGE_BG_SWATCH_NAMES as Zr,CARD_IMAGE_BG_SWATCHES as Qr,isCardImageBackgroundInheriting as ei,cardImageBackgroundChoice as ti,THEME_CARD_IMAGE_BG as ni}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as oi,SECTION_BG_NO_FILL as ri,sectionBackgroundChoice as ii,THEME_SECTION_BG as Me,isSectionBackgroundEmpty as si,sectionBackgroundHex as Yt}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as li,nestedAccentValue as qt,resolveSectionAccent as ae}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as ai,TYPE_SIZE_INHERIT as ci,isTypeSizeInheriting as ui}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as di,WIDTH_CHOICE_LABEL as pi,WIDTH_INHERIT as fi}from"../../../format/lib/content/section-width.js";import{useEaselSession as hi}from"efficient-easel/screen/lib/session-context";import{backendOf as mi}from"../website-session.js";import{BOX_GAP as gi,describedAs as L,group as E,iconOf as j,sharedStyleKinds as ee}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as Jt,onDesktopWords as G,phoneTwinFields as We,saidAlignmentGrid as bi,useLengthUnit as wi}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as Si,directionField as _i,gapField as Ue,iconPickerRow as Ci,lengthUnitFields as ce,pickerCellIcon as yi,pickerNoneIcon as xi,Segmented as Ke,select as z,slider as M}from"./box-fields.js";import{VIEW_ABOVE as $e}from"efficient-easel/screen/lib/content/length-units";import{tierOfView as Zt,viewOfTier as Ii}from"../../../format/lib/content/view-tier.js";import{ownEntry as Oi}from"../../../format/lib/own-entry.js";function ka({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function W(e,t){return a("{value} from {from}",{value:e,from:t})}function Ti(){const{blockGap:e}=H();return e===null?a("this container's own spacing"):W(`${e}px`,a("Styles"))}function Ei({inherited:e,onReset:t,label:n}){return i(y,{words:C()?.panel,label:a(n),changed:!e,detail:Ti(),onReset:t})}function Ri(e){return Ue({...gi,builtIn:jr[e],resolve:(t,n)=>jt(e,t,n?.siteGap),action:(t,n)=>i(Ei,{inherited:!Yr(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[He]:e}})}function Ni(e){return lt(T("mobile",{[He]:e,type:"custom",render:t=>i(Ai,{container:e,...t})}),Qt)}function ki(e){return lt(T("tablet",{[He]:e,type:"custom",render:t=>i(Pi,{container:e,...t})}),Qt)}const Qt={not:{field:"gap",in:Array.from({length:-Vt.min},(e,t)=>Vt.min+t)}};function Pa(e){return{gap:T("desktop",Ri(e)),[ke("gap")]:ki(e),[X("gap")]:Ni(e)}}function Pi({container:e,...t}){const[n]=F("gap"),{siteGap:o}=t.field??{},r=Math.max(De.min,jt(e,n,o));return Ue({...De,builtIn:r,resolve:l=>Ge(l)?l:r,action:(l,c)=>i(y,{words:C()?.panel,label:a("Gap"),changed:Ge(l),detail:G(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function Ai({container:e,...t}){const[n]=F("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=zt(e,void 0,n,o,r);return Ue({...De,builtIn:s,resolve:c=>zt(e,c,n,o,r),action:(c,u)=>i(y,{words:C()?.panel,label:a("Gap"),changed:Ge(c),detail:W(`${s}px`,zr(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function Aa(e){return _i({offered:Br(e),fallback:Bt(e,void 0),resolve:t=>Bt(e,t)})}function La(e,t){return Un(t?Wn(e,t):[],t)}function Li({inherited:e,onReset:t,label:n}){return i(y,{words:C()?.panel,label:a(n),changed:!e,detail:W(a("Full"),a("the page")),onReset:t})}function U({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:l=!0,markup:c=!0}){const{text:u,hidden:p}=nt(e),h=J(null),d=J(null),f=x=>t(l?{text:x,hidden:p}:x),m=()=>t({text:u,hidden:!p}),g=l&&p,b=et(),S=r?Hi(r)?i("span",{className:"sf-hint-while-typing",children:a(r)}):a(r):void 0,w=p?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(co,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:S,action:l?i(Te,{content:w,children:i(Et,{"aria-pressed":p,"aria-label":w,onClick:m,children:p?i(At,{name:"eye-off",size:14}):i(At,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[c&&i(kt,{target:s?d:h,value:u,onChange:f}),s?i("textarea",{id:b,ref:d,value:u,placeholder:o===void 0?void 0:a(o),onChange:x=>f(x.target.value)}):i("input",{id:b,ref:h,type:"text",value:u,placeholder:o===void 0?void 0:a(o),onChange:x=>f(x.target.value)})]})})}function Fa(e,t){return{...e,[st]:t}}function va(e){const t=e[R];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[R]:{...t,offPage:!0}}}function Ba(e){return!e||typeof e!="object"?!1:e[R]?.offPage===!0}function Da(e){if(!e[R])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Yo]:!0}}function Ha(e){return zo(e)}function Ga(e){const t=e[R];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[R]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as Yc,SCALAR_TEXT_CONTROLS as qc}from"efficient-easel/draw";function Ma(e,t){if(!e[R])throw new Error("inOwnBox: the field holds no authored text");const{[Xo]:o,...r}=e;return{...r,[jo]:!0,render:t}}const Fi=new Set(rr),ue={type:"radio",options:[{value:!0},{value:!1}]},en={text:{type:"object",objectFields:{text:{type:"text"},hidden:ue}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:ue}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},K=(e,t)=>{const n=L({...t,[R]:e},{...en[e.control],label:e.label});if(!Fi.has(e.control))return n;const o=t.render;return{...Pt(n,"authored-copy"),render:r=>i(Jo,{name:r.name,children:o(r)})}},Wa="Everything else on this block comes from the linked post. Unlink it to edit by hand.",vi={field:"source.slug",set:!0},Ua={not:vi},Bi="Select a word, then press the highlighter.",Di=new Set([Bi]),Hi=e=>Di.has(e);function Ka(e,t,n){return K({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function $a(e,t,n){return K({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function Xa(e,t,n){return K({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Va(e,t,n){return K({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function ja(e){return{type:"custom",[rt]:{label:e},...L({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(cr,{value:ot(t),onChange:n,label:e})}}function za(e,t,n){return K({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const Ya={Design:Xn,Animation:jn};function qa(e){return{type:"custom",render:()=>i(Gi,{text:e})}}function Gi({text:e}){return i("p",{className:"sf-note",children:a(e)})}function Ja(e){return we(e)!==null&&e?.tabs!==void 0}const tn=new Map;function Za(e,t){const n=`${e}\0${t?t.join(""):""}`,o=tn.get(n)??{type:"custom",tabs:t,[be]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(P,{})};return tn.set(n,o),o}const nn=new Map;function Qa(e){const t=nn.get(e)??{type:"custom",[be]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(P,{})};return nn.set(e,t),t}function Mi(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function ec(e,t){return Mi(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(P,{})}}function tc(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(P,{})}}function nc({title:e,children:t}){const[n,o]=Z(()=>!Xe.has(e));return i(So,{title:e,open:n,onToggle:r=>{o(r),r?Xe.delete(e):Xe.add(e)},children:t})}const Xe=new Set;function Wi({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(Te,{content:u,children:i(Lo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:l})]})}function oc(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(Ui,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function Ui({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:Vr(l),band:Xr(l)},p=n?Me:t,h=si(s,t,p),d=Yt(void 0,p,u),f=n?oi:void 0,m=p===Me?a("the theme's section background"):a("Theme {n} background",{n:c}),g=Ki(s,t,l,c,u,r),b=W(d.toUpperCase(),m),S=Ee(s),w=S?se(S,l,c):null;return w?i(ie,{label:a(e),icon:i(ut,{}),value:w.hex,caption:w.words,onChange:r,changed:!0,onReset:()=>r(f),resetTo:b,choices:g}):i(Nt,{label:a(e),icon:i(ut,{}),value:h?"":Yt(s,t,u),inherited:d,resetTo:b,onChange:r,onReset:()=>r(f),choices:g})}function Ki(e,t,n,o,r,s){const l=ii(e,t);return[{label:a("No fill"),color:"",selected:l==="none",onPick:()=>s(ri)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:l==="band",onPick:()=>s(Me)},...Ye(Ee(e)??"",n,o,s)]}function $i(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=ei(r,t);return i(_,{label:a(e),icon:i(ye,{}),changed:!s,action:i(y,{words:C()?.panel,label:a(e),changed:!s,detail:a("the theme's image stage"),onReset:()=>o(qr)}),children:Wi({swatches:Qr,current:s?ni:ti(r,t),onPick:o,names:Zr})})}}}function rc(e=n=>n,t){return ee({_gSectionTheme:E(li),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(lr,{value:e(n),onChange:o,followLabel:t})}})}function de(e){const t=O(),n=Zt(e?.view),o=l=>Pe(e.valueKey,l),r=e.numbersIn??(l=>$(t[o(l)])!==void 0),s=e.followsView??is(n,r);return wi({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:Si,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 Y({min:e,max:t,step:n,value:o,onChange:r,suffix:s="",readout:l=!0,notch:c,ariaLabel:u,disabled:p=!1,placeholder:h,placeholderWord:d,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(Uo,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...d?{emptyLabel:a(d)}:{},suffix:s||void 0,...m?{units:m}:{},showInput:l,label:u===void 0?void 0:a(u),disabled:p,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:b=>{b===null?f?.():b!==o&&r(b)}})})}function Xi(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:l,restTrack:c,unsetMark:u,icon:p,unit:h="px"}=t;return{type:"custom",render:({value:d,onChange:f})=>{const m=typeof d=="number"?d:null,g=m===null;return i(_,{label:a(e),icon:p?j(p):void 0,value:g?u||s===void 0?void 0:a(s):`${m}${h}`,changed:!g,action:u?ge(u,{changed:!g,onReset:()=>f(null)}):i(y,{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}):Y({min:n,max:o,step:r,value:m??n,readout:!1,ariaLabel:e,onChange:f})})}}}const te="Corners",Vi={kind:"radius"};function Ve(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(pt,{}),changed:s,action:ge(e.mark,{changed:s,onReset:()=>o(null)}),hint:e.hint,children:i(ji,{tier:e,px:r,name:t.name,onRadius:o})})}}}function F(e){const t=v();return[t?.values?.[e],n=>t?.onChange(e,n)]}function on(){return Pt({type:"custom",render:()=>i(Vo,{})},"always")}function pe(){const e=v();return t=>e?.onChangeMany(t)}function ji({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[s,l]=F(e.sidesKey),c=pe(),u=de({row:e.row??Vi,label:te,grid:{min:A,max:Se,step:e.step??1},valueKey:n??"",view:"desktop"}),p=yt(s)??[..._t];return i(Fo,{label:a(te),value:p,corners:ho,onChange:h=>{const d=yt(h)??[];l(d.length===_t.length?null:d)},radius:t,onRadiusChange:u&&n?h=>c({[n]:h,...u.unitPatch(h===null)}):o,radiusMin:u?.grid.min??A,radiusMax:u?.grid.max??Se,radiusStep:u?.grid.step??e.step??1,radiusPlaceholder:u&&u.unit!=="px"?"–":String(r),...u?{radiusUnit:u.unit,units:u.units}:{}})}function rn(e,t){return ce(e,t)}function sn(){return on()}function zi({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=H(),r=typeof o=="number"?`${o}px`:a("not set");return i(y,{words:C()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):W(r,a("Styles")),onReset:n})}function Yi(){const{cornerRadiusPx:e}=H();return typeof e=="number"?e:A}function qi(){return Ve({sidesKey:"sectionCornerSides",row:Ct,useFollowed:Yi,mark:i(zi,{label:te}),hint:Ji})}const Ji="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function ic(){return ee({_gShape:E("Shape"),sectionCorners:qi(),...rn(Ct,"sectionCorners"),sectionCornerSides:sn(),...B("sectionBorder",rs),...ce(Kt,"sectionBorder",{tablet:!0,phone:!0})})}const Zi=()=>({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 Qi(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function es(){let e;try{const t=Xt(H().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Kr.line}function ts({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:{},[p,h]=Z(()=>r?Io(u,l):!1),d=Zi(),f=m=>Qi(r&&s?m:{width:m.width,color:m.color,...s?{style:m.style}:{}});return i(_,{label:a("Border"),icon:i(zn,{}),action:r?i(yo,{each:p,label:a("Each side"),onChange:h}):void 0,children:i(Co,{label:a("Border"),value:u,each:p,onChange:m=>t(f(m)),placeholder:n,presets:o,words:c?{...d,unit:c.unit}:d,styles:s,max:c?.grid.max??Ut,...c?{step:c.grid.step,units:c.units}:{}})})}function ns({value:e,onChange:t,view:n}){const[o]=F("sectionBorder"),[r]=F(ke("sectionBorder")),s=es(),l=f=>f&&typeof f=="object"?f:{},c=n==="phone"?{...$t(l(o)),...$t(l(r))}:n==="tablet"?l(o):{},u=O(),p=pe(),h=I("sectionBorder",n),d=de({row:Kt,label:"Border",grid:{min:0,max:Ut,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>je(u[Pe("sectionBorder",f)]),convertTo:f=>{const m=l(u[h]);return je(m)?{[h]:os(m,f)}:{}}});return i(ts,{value:e,length:d,onChange:d?f=>p({[h]:f,...d.unitPatch(!je(f))}):t,placeholder:{sides:xo(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}const ln=["width",...Ur];function je(e){if(!e||typeof e!="object")return!1;const t=e;return ln.some(n=>$(t[n])!==void 0)}function os(e,t){const n={...e};for(const o of ln){const r=$(n[o]);r!==void 0&&(n[o]=t(r))}return n}function rs(e){return{type:"custom",render:({value:t,onChange:n})=>i(ns,{value:t,onChange:n,view:e})}}function is(e,t){let n=$e[e];for(;n&&$e[n]!==null&&!t(n);)n=$e[n];return n??e}function sc(e){return{type:"custom",render:()=>i(ss,{partKey:e})}}function ss({partKey:e}){const[t]=F("id"),[n]=F("_partStyles"),{textStyles:o}=H(),r=hr();let s=null;try{s=dr().select}catch{s=null}const l=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(wo,{name:a("Text"),preview:ur(l,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??fr.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(pr(t,e))}})}function an(e){const{cornerRadiusPx:t}=H(),n=typeof t=="number"?t:e;let o=null;try{const{appState:s,selectedItem:l}=oe(u=>u),c=l?.props?.id?String(l.props.id):void 0;o=c?bo(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return mo(r)?r:n}function ls({label:e,changed:t=!1,onReset:n=()=>{}}){const o=an(A);return i(y,{words:C()?.panel,label:a(e),changed:t,detail:W(`${o}px`,a("the section")),onReset:n})}function as(){return i(P,{children:a("Follows the section's Corners until you set a number here.")})}function cs(){return Ve({sidesKey:"cardCornerSides",row:xt,useFollowed:()=>an(A),mark:i(ls,{label:te}),hint:i(as,{})})}function us(){return{type:"custom",render:()=>i(Nn,{})}}function lc(){return{_gShape:E("Shape"),cardCorners:cs(),...rn(xt,"cardCorners"),cardCornerSides:sn(),cardCornersApplyAll:us()}}function ds(){return L({type:"custom",render:e=>i(fs,{...e})},{type:"select",label:V,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 ps(e,t){const n=Wt(e);if(n!=="custom")return a(Mt.find(r=>r.value===n)?.label??"");const o=Tt(Be(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):a("Custom")}function fs(e){const{value:t,onChange:n}=e,[o]=F("content"),r=Array.isArray(o)?o.length:0,s="follows"in e,l=t!=null,c=l?t:s?e.follows:void 0,u=Wt(c),p=r>=2&&r<=Ot,h=()=>[...Go[r]??[]],d=J(null),f=w=>{const x=d.current;x&&JSON.stringify(w)===JSON.stringify(x.shares)?n(x.value):w&&n(w)},m=w=>{w===u||w==="custom"&&!p||n(w==="custom"?h():w)},g=a("The width bar works for 2 to {count} blocks.",{count:Ot}),b=l&&(s||t!=="content"),S=Wo().widths.hint(r,Ho);return i(_,{label:a(V),icon:i(Ce,{}),changed:b,hint:u!=="custom"?void 0:p?S:g,action:i(y,{words:C()?.panel,label:a(V),changed:b,disabled:e.readOnly===!0,detail:s?G(w=>a(w),ps(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(It,{label:a(V),value:u,options:Mt.map(w=>({value:w.value,label:w.value==="custom"&&!p?g:a(w.label),icon:yi(i("span",{className:"sf-gallery-pic sf-share-pic",children:cn(w.weights).map((x,q)=>i("i",{style:{gridColumn:`span ${x}`}},q))}),a(w.label),w.value==="custom"&&!p?g:a(w.label))})),onChange:m,columns:3,cell:un,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&p?i("div",{onFocus:()=>{d.current={value:t,shares:Tt(Be(c,r),r)}},onBlur:()=>{d.current=null},children:i(Mo,{label:a(V),count:r,value:Be(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function cn(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 ac(){return z(Dr,i(to,{}),Dt,Dt[0].value)}function cc(){return T("mobile",Ci(V,i(Ce,{}),Wr.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:cn(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),Mr,{columns:2,cell:un}))}const un={width:"5.75rem",height:"3.25rem"};function uc(){return We("share",ds(),Jt)[ke("share")]}function hs(){return T("mobile",M(Ht,i(dt,{}),ve,Gr,1,ve,"",{clear:{phoneFollows:!1,hint:ve}}))}const dn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function dc(){const e=M(Ht,i(dt,{}),Gt,Hr,1,Gt,"",{clear:{emptyLabel:"Auto"}}),t=We("columns",e,{...dn,tablet:Jt.tablet}),n=We("columns",e,dn,{phoneRow:hs()});return{...t,phoneRow:n.phoneRow}}function pc(e,t,n,o,r,s,l){return{type:"custom",render:({value:c,onChange:u,name:p})=>i(ms,{label:e,min:t,max:n,step:o,fallback:r,role:s,value:c,onChange:u,name:p??"",length:l})}}function ms({label:e,min:t,max:n,step:o,fallback:r,role:s,value:l,onChange:c,name:u,length:p}){const h=O(),d=pe(),f=Zt(p?.view),m=de({row:p?.row??{kind:"fontSize"},label:e,grid:{min:t,max:n,step:o},valueKey:p?u:"",view:p?.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?d({[u]:b,...m.unitPatch(typeof b!="number")}):c(b);return i(_,{label:a(e),icon:i(St,{noun:s}),action:i(y,{words:C()?.panel,label:a(e),changed:!ui(l),detail:a("the Text style in Styles"),onReset:()=>g(ci),defaultAction:{onPress:()=>g(ai),title:a("Keep this section's own built-in size"),icon:i(Yn,{})}}),children:Y({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 fc(){return{_gCellWidth:E("Cell width"),gridSpan:z("Positions",i(Ce,{}),[{label:"Auto",value:""},...Array.from({length:vn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function O(){let e=null,t=null;try{e=Qe(gs),t=oe(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const gs=wn(null);function bs({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:l,fallback:c}){const u=O()[l],p=Ne(void 0,u,c);return i(P,{children:Y({min:e,max:t,step:n,value:Ne(o,u,c),readout:!1,ariaLabel:r,notch:p,onChange:s})})}function ws({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const l=O()[t],c=Ne(void 0,l,n);return i(y,{words:C()?.panel,label:a(e),changed:r,detail:G(u=>a(u),`${c}${o}`),onReset:s})}function Ss(e){return Xi(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(ws,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(bs,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const _s={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Cs={Top:xe,Bottom:mt,Left:gt,Right:bt},ys=e=>{const t=Cs[e];return i(t,{})};function hc(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>_s[S],s=S=>M(r("Top"),i(xe,{}),N.min,N.max,N.step,S,"px"),l=(S,w,x,q=N)=>T("mobile",Ss({label:r(S),icon:ys(S),desktopKey:w,min:q.min,max:q.max,step:q.step,fallback:x})),c=e.top??N.min,u=e.bottom??N.min,p="sectionPaddingLeft",h="sectionPaddingRight",d=e.sideBounds??N,f=e.side??d.min,m=e.sidePhone??f,g=e.phone===!0,b=S=>g?T("desktop",S):S;return ee({...o?{_gSpacing:E("Padding")}:{},[t]:b(s(c)),...g?{[X(t)]:l("Top",t,c)}:{},...e.only==="top"?{}:{[n]:b(M(r("Bottom"),i(mt,{}),N.min,N.max,N.step,u,"px")),...g?{[X(n)]:l("Bottom",n,u)}:{}},...e.sides?{[p]:b(M(r("Left"),i(gt,{}),d.min,d.max,d.step,f,"px")),...g?{[X(p)]:l("Left",p,m,d)}:{},[h]:b(M(r("Right"),i(bt,{}),d.min,d.max,d.step,f,"px")),...g?{[X(h)]:l("Right",h,m,d)}:{}}:{}})}function mc(e,t){const n=Object.fromEntries(Object.entries(t).map(([s,l])=>[s,s in e&&we(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 fe="Width";function gc(e,t=di,n=!0){const o=t.map(r=>({label:pi[r],value:r}));return ee({...n?{_gWidth:E(fe)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(_,{label:a(fe),icon:i(uo,{}),action:n?i(Li,{inherited:s?.inherited??!1,onReset:()=>r(fi),label:fe}):void 0,children:Ke({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:fe})})}})}function bc({fill:e=!1}={}){const t=(r,s)=>({type:"custom",render:({value:l,onChange:c})=>i(xs,{value:l,onChange:c,view:r,badge:s,fill:e})}),n=()=>Re("sectionHeightMode"),o=()=>Re("sectionHeightMode");return ee({_gHeight:E(Q),...B("sectionHeightMode",r=>r==="desktop"?t(r):t(r,s=>i(Es,{view:r,onClear:()=>s(void 0)}))),...B("sectionHeightValue",n),...B("sectionHeightUnit",o)})}function xs({value:e,onChange:t,view:n,badge:o,fill:r=!1}){const s=O(),{mode:l,number:c,unit:u}=Is(n,s,e);return i(_,{label:Q,icon:j(i(ft,{})),action:o?o(t):void 0,children:k("div",{className:"es-width-stack",children:[Ke({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(Ts,{view:n,mode:l,menu:u}):null]})})}function pn(e,t){return e==="phone"&&Ae(t)?br(t):gr(t)}function he(e,t){return e==="desktop"||(e==="tablet"?Ae(t):mr(t))?null:pn(e,t)}function Is(e,t,n){const r=(s=>Lr.includes(s))(n)?n:he(e,t)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function Os(e,t,n,o){const r=he(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[I("sectionHeightMode",e)]:r.mode,...r.mode==="fixed"?{[I("sectionHeightUnit",e)]:r.unit}:{},...n==="sectionHeightUnit"?{[I("sectionHeightValue",e)]:r.value}:{},[I(n,e)]:o}}function fn(e,t,n){const o=v(),r=he(e,O());return!o||!r?{followed:null,write:n}:{followed:r,write:l=>o.onChangeMany(c=>{const u=Os(e,c,t,l);return u===null?{[I(t,e)]:l}:Object.keys(u).length?u:null})}}function Ts({view:e,mode:t,menu:n}){const o=v(),r=O(),s=I("sectionHeightValue",e),l=I("sectionHeightUnit",e),c=S=>w=>o?.onChangeMany(()=>({[S]:w})),{followed:u,write:p}=fn(e,"sectionHeightValue",c(s)),{write:h}=fn(e,"sectionHeightUnit",c(l)),d=t==="screen"?"%":r[l],f=(u?u.unit:d)==="%"?"%":"px",m=f==="%"?vr:Fr,g=r[s],b=n?{options:["px","%"],label:a("Unit"),onChange:S=>h(S)}:void 0;return Y({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:p})}function Es({view:e,onClear:t}){const n=O(),o=he(e,n)===null,r=e==="phone"&&Ae(n),s=pn(e,n),l=G(c=>a(c),s.mode==="auto"?a("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return i(y,{words:C()?.panel,label:a(Q),changed:o,detail:l,onReset:t})}function wc(e={}){const t=e.intro===!0,n=s=>({type:"custom",render:({value:l,onChange:c,id:u,name:p})=>i(Fs,{value:l,onChange:c,labelId:`${u??p??"stickTop"}-label`,view:s,intro:t})}),o=s=>({type:"custom",render:({value:l,onChange:c})=>i(Ps,{value:l,onChange:c,view:s,intro:t})}),r=s=>({type:"custom",render:({value:l,onChange:c})=>i(As,{value:l,onChange:c,view:s,intro:t})});return{_gStick:E(yr,{dot:t?ks:vt}),...B("stickTop",n),...B("stickTopDistance",o),...ce(Fe,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?B(Le,r):{},...t?{}:{[Or]:Rs()},...t||e.above===!1?{}:{[_r]:Ns()}}}function Rs(){const e=z(Tr,i(xe,{}),Er,xr);return T("desktop",{...e,render:t=>{const n=e.render({...t,value:kr(t.value),onChange:o=>t.onChange(Pr(o))});return ge(n,{hint:a(Ir)})}})}function Ns(){const e=gn(Cr,!1,i(wt,{}),Sr);return T("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const ks={any:[vt,wr]};function hn(e,t,n,o,r){const s=v(),l=O(),c=e==="desktop"||ne(e,l)?null:ze(e,le(l,{intro:o}));return{followed:c,write:(c||r)&&s?p=>s.onChangeMany(h=>{const d=Ls(e,h,p,t,o),f=d===null?{[I(t,e)]:p}:d;return Object.keys(f).length?{...f,...r?.(p)??{}}:null}):n}}function Ps({value:e,onChange:t,view:n,intro:o}){const r=O(),s=le(r,{intro:o}),l=h=>{const d=Ii(h);return d==="desktop"||ne(d,r)},c=de({row:Fe,label:"Distance from top",grid:{min:D.min,max:D.max,step:D.step},valueKey:"stickTopDistance",view:n,numbersIn:h=>l(h)&&$(r[Pe("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&s.ownTablet?"tablet":"desktop"}),{followed:u,write:p}=hn(n,"stickTopDistance",t,o,c?h=>c.unitPatch(h===void 0):void 0);return i("div",{className:"sf-field",children:Y({min:c?.grid.min??D.min,max:c?.grid.max??D.max,step:c?.grid.step??D.step,value:u?null:typeof e=="number"?e:D.fallback,...u?{placeholder:u.distance}:{},...c?{suffix:c.unit,units:c.units}:{suffix:"px"},ariaLabel:a("Distance from top"),onChange:p})})}function As({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:s}=hn(n,Le,t,o);return i(_,{label:a(Ft),icon:j(i(ft,{})),children:Y({min:re.min,max:re.max,step:re.step,value:r?null:$(e)??re.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Ft),onChange:s})})}function ne(e,t){return e==="tablet"?Nr(t):Rr(t)}function ze(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 Ls(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ne(e,t))return null;if(n===void 0)return{};const s=ze(e,le(t,{intro:r})),l=e==="phone"&&ne("tablet",t)?h=>I(h,"tablet"):h=>h,c=(h,d)=>t[l(h)]==null?{}:{[I(h,e)]:d},u=Fe.unitKey,p=t[l(u)]==null?{}:{[I(u,e)]:s.unit};return{[I("stickTop",e)]:!0,...c("stickTopDistance",s.distance),...p,...c(Le,s.screens),[I(o,e)]:n}}function Fs({value:e,onChange:t,labelId:n,view:o,intro:r}){const s=O(),l=le(s,{intro:r}),c=o==="phone"?l.phone:o==="tablet"?l.tablet:r?l.desktop:e===!0,u=o==="phone"&&l.ownTablet,p=o==="desktop"?null:ze(o,l),h=p?.on?Ar(p.distance,p.unit):a("Off");return i(_,{label:a(Lt),labelId:n,icon:j(i(wt,{})),action:k(P,{children:[o!=="desktop"?i(y,{words:C()?.panel,label:a(Lt),changed:ne(o,s),detail:G(d=>a(d),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(Oe,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const mn="e.g. about";function Sc(){return{_gAnchor:E("Anchor"),anchor:K({control:"plainText",label:"Name",placeholder:mn},{type:"custom",render:({value:e,onChange:t})=>i(Kn,{value:e,onChange:t,nameBox:(n,o)=>i(U,{value:n,onChange:o,label:"Name",placeholder:mn,hideable:!1,markup:!1})})})}}function _c(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(Bo,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:p=>r(p?p.toISOString():"")})})}}}function Cc(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(vo,{id:c,value:Cn(typeof o=="string"?o:null),onChange:u=>r(u?_n(u):"")})})}}}function gn(e,t,n,o){return{type:"custom",...L({},{...ue,label:e}),render:r=>{const{value:s,onChange:l,id:c,name:u}=r,p="follows"in r,h=r,d=typeof s=="boolean",f=typeof h.follows=="boolean"?h.follows:t,m=d?s:p?f:t,g=`${c??u??e}-label`,b=h.readOnly===!0,S=i(Oe,{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:p?k(P,{children:[i(y,{words:C()?.panel,label:a(e),changed:d,detail:h.followsNoView?a(f?"On":"Off"):G(w=>a(w),a(f?"On":"Off"),h.followsView),disabled:b,onReset:()=>l(void 0)}),S]}):S})}}}function yc(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(vs,{label:"Background",icon:i(so,{}),id:r,value:e,shown:po(e),onChange:t})}}}function xc(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(ie,{label:a(e),icon:n,value:o||t,onChange:r})}}function vs({label:e,icon:t,id:n,value:o,shown:r,onChange:s}){const{colors:l,n:c}=qe(),u=Ee(o),p=u?se(u,l,c):null;return i(ie,{label:a(e),icon:t,id:n,value:p?p.hex:r,caption:p?.words,onChange:s,choices:Ye(u??"",l,c,s)})}function Ic(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(Bs,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Ye(e,t,n,o){const r=Ie(e);return $o(t,n).map(s=>({label:s.label,color:s.value,selected:r===s.name,onPick:()=>o(s.name)}))}function Bs({value:e,onChange:t,twin:n}){const{colors:o,n:r}=qe(),s=o.background,l=W(s.toUpperCase(),a("Theme {n} background",{n:r})),c=Ie(e),u=c?se(c,o,r):null,p=Ye(e,o,r,t),h=n?()=>t(void 0):()=>t("");let d=s,f=l;if(n){const m=Ie(n.follows),g=fo(n.follows),b=m?se(m,o,r):g?{hex:g,words:g.toUpperCase()}:null;d=b?.hex??s,f=G(S=>a(S),b?b.words:l,n.view)}return u?i(ie,{label:a("Fill"),icon:i(ye,{}),value:u.hex,caption:u.words,onChange:t,changed:!0,onReset:h,resetTo:f,choices:p}):i(Nt,{label:a("Fill"),icon:i(ye,{}),value:e,inherited:d,resetTo:f,onChange:t,onReset:h,choices:p})}function Ds(e,t,n){if((e?.content??[]).some(l=>l?.props?.id===t))return ae(n);const r=go(e,t);if(r.length===0)return null;const s=ae(qt(n));if(s!==null)return s;for(let l=r.length-1;l>0;l-=1){const c=ae(qt(r[l].sectionAccent));if(c!==null)return c}return ae(r[0].sectionAccent)}function qe(){const e=Xt(H().theme),[t]=F("sectionAccent");let n=null;try{const{appState:r,selectedItem:s}=oe(c=>c),l=s?.props?.id?String(s.props.id):void 0;n=l?Ds(r?.data,l,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:$r(e.themes[o]),n:o+1}}function Oc(){return on()}const Tc={top:i(Qn,{}),right:i(Zn,{}),bottom:i(qn,{}),left:i(Jn,{})};function Ec(e,t,n,o,r,s,l){const c=d=>t.find(f=>f.value===d),u=d=>({value:d,label:"",disabled:!0,title:o}),p=d=>{const f=t.find(g=>g.cell===d);if(!f)return u(`missing-${d}`);const m=s?.[d];return m?{value:f.value,label:f.label,icon:m}:{value:f.value,label:f.label}},h=[u("corner-top-left"),p("top"),u("corner-top-right"),p("left"),u("centre"),p("right"),u("corner-bottom-left"),p("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:d,onChange:f})=>{const m=t.some(g=>g.value===d)?d:n;return i(_,{label:a(e),icon:r,value:c(m)?.label?a(c(m).label):l?a(l):"",children:bi(a,{label:e,value:m,onChange:f,points:h})})}}}function Rc(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 Nc(e,t,n,o){return{type:"custom",options:t,fallback:n,...L({},{type:"select",label:e}),render:({value:r,onChange:s,field:l})=>i(ar,{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 kc(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const Pc=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Ac(e,t,n){const o=Object.keys(tt).map(r=>({label:tt[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(Gs,{label:e,icon:t,options:o,onChange:r})}}function Hs(e,t,n){const o=yn(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=In(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 Gs({label:e,icon:t,options:n,onChange:o}){const r=v(),s=r?.values??{},l=xn(s),c=Qe(En),u=Tn(c?.docId??null);let p=null;try{p=oe(d=>d.appState.data)}catch{p=null}const h=On(r?.id,p,u);return i(_,{label:a(e),icon:j(t),hint:Hs(s,h,c?.hasUnsavedEdits??!1),children:Ke({options:n,value:l,onChange:o,ariaLabel:e})})}function Lc(e,t,n,o={}){const r={type:"custom",[it]:!0,render:({value:s,onChange:l,name:c})=>i(ir,{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?T("each",r):r}const Fc={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Ms(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 vc({value:e,onChange:t,label:n}){const o=e||{},r=v(),s=r?r.values!==r.node.props:!0,l=!!o.pending&&s,c=!!o.pending&&!s,u=!!mi(hi()).geocode,p=et(),h=(d,f)=>t({...o,[d]:f??void 0});return k(P,{children:[i(_,{label:a(n),icon:i(ht,{}),action:u?i(Te,{content:a("Find from the address (OpenStreetMap)"),children:i(Et,{"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(lo,{})})}):void 0,children:u&&o.status?i($n,{compact:!0,oneLine:!0,spaced:!1,status:l?"busy":o.ok&&!c?"found":"notfound",statusText:l?a("Finding…"):c?a(Ko):a(o.status),hint:Ms(o)}):null}),i(_,{label:a("Enter by hand"),labelId:p,icon:i(eo,{}),action:i(Oe,{checked:!!o.manual,onChange:d=>t({...o,manual:d}),ariaLabelledBy:p})}),o.manual&&i(_,{label:a("Latitude, longitude"),icon:i(ht,{}),children:k("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(Rt,{value:typeof o.lat=="number"?o.lat:null,onChange:d=>h("lat",d),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(Rt,{value:typeof o.lng=="number"?o.lng:null,onChange:d=>h("lng",d),min:-180,max:180,step:1e-4,placeholder:a("Longitude")})]})})]})}function Ws(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Us(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 Bc(e,t){return e===null?null:t>e?e:null}function Ks(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 Dc={label:"Ticker items",icon:i(io,{})};function Hc(e,t,n,o){return{type:"custom",[R]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...L({},{...en.textList,label:e}),render:({value:r,onChange:s})=>i($s,{label:e,icon:j(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function $s({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const l=J(null),[c,u]=Z(null),p=d=>d.map(f=>({text:f?.text??""})),h=d=>{const f=Ks(n,d,c);f===null&&(l.current=null),u(f),r(p(d))};return i(Oo,{label:a(e),icon:t,noun:a("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?i(kt,{target:l,value:Ws(n,c),onChange:d=>r(Us(n,c??-1,d)),disabled:c===null,label:c===null?a("Formatting — click a row first"):a("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(d,f,m)=>i("input",{type:"text",className:s&&c===f?"sf-list-marking":void 0,value:d?.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 Gc(e,t){const n=`${e.label} — row ${t+1}`;return K({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(U,{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 Mc(e){return{_gCards:E("Cards"),coverIndex:z("Cover image",i(ro,{}),nr,String(or),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:$i("Image background",Jr),cardImage:bn()}}function Wc(){return{outline:z("Card outline",i(ao,{}),Qo,tr),indexBadge:z("Card number",i(oo,{}),Zo,er),showBadge:gn("Product badge",!0,i(St,{noun:"tag"}))}}function Uc(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...ue,label:me.find(s=>s.id===r).label}),o=r=>L(Re(Je),n(r));return{_gShowOnCard:E("Show on a card"),[Je]:L({type:"custom",render:()=>i(Xs,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(Je)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const Je="showCardPrice",me=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function Xs({rest:e}){const t=O(),n=pe(),o=l=>typeof t[l]=="boolean"?t[l]:void 0,r=l=>o(l)??e[l],s=me.some(({id:l})=>o(l)!==void 0&&o(l)!==e[l]);return i(Ze,{parts:me,changed:s,shown:r,onPress:(l,c)=>n({[l]:c}),onReset:()=>n(Object.fromEntries(me.map(({id:l})=>[l,void 0])))})}function Kc(e,t="display"){const n=X(t);return{[t]:T("desktop",{type:"custom",render:({value:o,onChange:r})=>i(Ze,{parts:e,changed:Eo(o),shown:s=>Ro(o,s),onPress:(s,l)=>r(Po(o,s,l)),onReset:()=>r(void 0)})}),[n]:T("mobile",{type:"custom",render:({value:o,onChange:r})=>i(Vs,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Ze({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:l}){const c=a("Display");return i(_,{label:c,icon:i(Vn,{}),changed:t,action:i(y,{words:C()?.panel,label:c,changed:t,detail:s,onReset:r}),children:i(To,{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 Vs({parts:e,desktopKey:t,value:n,onChange:o}){const r=O()[t];return i(Ze,{parts:e,changed:ko(n),shown:s=>No(r,n,s),onPress:(s,l)=>o(Ao(n,s,l)),onReset:()=>o(qo),detail:a("the same as Desktop")})}function bn(e=kn){return M("Card image",i(pt,{}),A,Se,Pn,A,e,{clear:{hint:A},hint:"Rounds the picture. The card's own corner is in Styles."})}function js(){return ce(at,"cardImage")}function $c(){return{cardImage:bn(at),...js()}}function Xc(){return Ve({sidesKey:"cornerSides",row:Fn,step:An,useFollowed:()=>A,mark:i(zs,{label:Ln}),hint:a("Rounds the picture. Left alone it stays square.")})}function zs({label:e,changed:t=!1,onReset:n=()=>{}}){return i(y,{words:C()?.panel,label:a(e),changed:t,onReset:n})}function Vc(){return{type:"custom",render:({value:e,onChange:t})=>i(Zs,{value:typeof e=="string"?e:"",onChange:t})}}function Ys({layout:e,width:t}){const n=Hn(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:Gn(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 qs={width:"3.5rem",height:"2.5rem"},Js=200;function Zs({value:e,onChange:t}){const[n,o]=Z(null),[r,s]=Z(4),l=J(null);Sn(()=>{const m=l.current;if(!m||typeof ResizeObserver!="function")return;const g=()=>s(m.getBoundingClientRect().width>=Js?4:3);g();const b=new ResizeObserver(g);return b.observe(m),()=>b.disconnect()},[]);const c=e?Oi(_e,e):void 0,u=c?e:"",p=ct(n,u),h=ct(n,"").length,d=Mn("no-symbol"),f=[{value:"",label:a("Not chosen"),icon:xi(d,a("Not chosen"))},...p.map(m=>({value:m,label:a(_e[m].label),icon:i(Ys,{layout:_e[m],width:40})}))];return i(_,{label:a("Layout"),icon:i(no,{}),value:c?a(c.label):void 0,children:i("div",{ref:l,style:{flex:"1 1 auto",minWidth:0},children:i(It,{label:a("Layout"),value:u,options:f,onChange:t,columns:r,cell:qs,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(_o,{options:[{id:"all",label:a("All")},...Bn.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:Dn.length})})]})})})})}export{vi as BOUND_TO_POST,Wa as BOUND_TO_POST_NOTE,Ya as BUCKET_ICONS,Fc as CUSTOM_FIELD_MEDIA,vc as CoordsField,Qt as DESKTOP_GAP_NOT_OVERLAP,Ze as DisplayRow,Tc as EDGE_ARROWS,Do as FOCAL_DEFAULT,be as FOLD_FIELD_MARKER,Bi as HIGHLIGHT_HINT,U as HidableTextField,rt as LINK_FIELD_MARKER,ka as Label,it as MEDIA_FIELD_MARKER,Pc as MEDIA_TYPE_OPTIONS,Ua as NOT_BOUND_TO_POST,nc as PanelBand,Gi as PanelNoteLine,gs as RowPropsContext,st as SCAFFOLD_FIELD_MARKER,qc as SCALAR_TEXT_CONTROLS,Ei as SiteGapDefaultReset,Y as Slider,Wi as Swatches,Yc as TEXT_CONTROL_KINDS,R as TEXT_FIELD_MARKER,Dc as TICKER_ITEMS_ROW,$s as TextListField,vs as ThemeFillRow,fe as WIDTH_LABEL,Li as WidthDefaultReset,Ks as aimAfterListChange,Sc as anchorFields,W as backTo,oc as backgroundField,ac as boxBlockSpacingField,dc as boxColumnsFields,Ic as boxFillField,hs as boxPhoneRowField,ds as boxShareField,cc as boxSharePhoneField,uc as boxShareTabletField,Ds as boxThemeIndexOf,Za as bucketHeader,sc as buttonWordsEntryField,cs as cardCornersField,$i as cardImageBackgroundField,bn as cardImageField,$c as cardImageFields,Mc as cardMediaFields,lc as cardShapeFields,Uc as cardShowFields,Wc as cardStyleFields,fc as cellWidthFields,xc as colorInput,Aa as containerDirectionField,Ri as containerGapField,Ni as containerGapPhoneField,Pa as containerGapRows,ki as containerGapTabletField,Ms as coordsResultTip,Va as copyText,sn as cornerSidesField,Ve as cornersRowField,rn as cornersUnitFields,Cc as date,_c as dateTime,Qa as designGroupHeader,Kc as displayFields,Ec as edgePad,Ye as fillSlotChoices,Bc as focusAfterRemove,Oc as focusKeptField,ec as foldMarker,we as foldMetaOf,Mi as foldTitleOf,Os as followedHeightPatch,Ls as followedStickPatch,Vc as galleryLayoutField,bc as heightFields,he as heightFollowedBy,Is as heightLayersAt,La as heroGroupPlacementPoints,ot as hidableText,Hi as hintIsWhileTyping,Xc as imageCornersField,Ma as inOwnBox,Ja as isBucketHeader,on as keptBy,ja as linkField,Hs as loadingRowHint,Ac as loadingShowsField,Rc as multiSelect,yc as pageBackgroundField,qa as panelNote,Ss as phoneOverrideField,Xa as plainText,za as plainTextarea,Xi as pxField,tc as quietMarker,nt as readHidable,Ws as rowText,Nc as searchSelect,Ki as sectionBandChoices,qi as sectionCornersField,ic as sectionShapeFields,rc as sectionThemeFields,Us as setRowText,pc as sizeField,kc as sourceField,hc as spacingFields,wc as stickFields,mc as swapPadding,Ka as text,Rn as textFieldIdentifier,Ba as textFieldOffPage,Ha as textFieldPanelOnly,Hc as textList,Gc as textListRowField,$a as textarea,gn as toggle,Lc as upload,de as useLengthRow,pe as useSelectedPatch,O as useSelectedProps,F as useSelectedSibling,Ti as useSiteGapDetail,gc as widthField,Ga as withIdentifier,va as withOffPage,Da as withPanelOnly,Fa 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 Nn,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 Pn,fromDateKey as kn}from"efficient-shell/format";import{say as a,editorEaselWords as C}from"../../../format/lib/editor-words.js";import{finiteNumber as X}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as rt,firstFrameHint as Ln,loadingShowsOf as An,loadingStillHint as Fn}from"../../../format/lib/hero-video.js";import{pageFramesFor as vn,usePageVideoFrames as Bn}from"../page-video-frames.js";import{ScreenDocumentContext as Dn}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 Hn}from"efficient-easel/draw";import Gn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as ut}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as Mn,CARD_IMAGE_RADIUS_ROW as dt,CARD_IMAGE_RADIUS_STEP as Wn,CORNER_RADIUS_MAX as xe,CORNER_RADIUS_MIN as A}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Un,IMAGE_CORNERS_LABEL as Kn,IMAGE_CORNERS_ROW as $n}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 Vn,GALLERY_COLUMNS_PHONE as jn,GALLERY_LAYOUTS as Oe,GALLERY_LAYOUT_KEYS as Yn,GALLERY_PHONE_LAYOUTS as zn,galleryChoices as pt,galleryLayoutRatio as qn,galleryPictureCells as Jn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as Zn}from"./shell-glyph.js";import{anchorSiblingsOf as Qn,placementPoints as eo}from"../../../format/lib/hero-group-placement.js";import to from"../../components/AnchorField.js";import no from"../../components/SourceStatus.js";import{AdjustIcon as oo,EyeIcon as ro,AnimationIcon as io,BackgroundIcon as ft,BorderAllIcon as so,BlockSectionIcon as lo,ColumnWidthsIcon as Ie,ColumnsIcon as ht,CornerIcon as mt,DirectionDownIcon as ao,DirectionLeftIcon as co,DirectionRightIcon as uo,DirectionUpIcon as po,EditIcon as fo,GapIcon as ho,GridIcon as gt,GroundIcon as Ee,HashIcon as mo,HeightIcon as bt,ImageIcon as go,ListIcon as bo,LocationIcon as wt,PaddingBottomIcon as St,PaddingLeftIcon as _t,PaddingRightIcon as yt,PaddingTopIcon as Re,PageIcon as wo,StickyIcon as Ct,SearchIcon as So,SquareIcon as _o,TypeIcon as yo,WidthIcon as Co}from"efficient-easel/icons";import{FieldGlyph as xt}from"../../components/FieldGlyph.js";import{resolvePageBackground as xo}from"../../../format/lib/content/page-background.js";import{BOX_FILL_FADE_PROP as Oo,BOX_FILL_FADES as Io,BOX_SWATCH_PROP as Eo,boxFillFadeOf as Ot,boxFillOf as Ro,boxFillSlot as Te,boxPaintOf as To}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as It,CORNER_SIDE_POINTS as No,SECTION_CORNERS_ROW as Et,hasOwnSectionCorners as Po,normalizeCornerSides as Rt}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as Tt}from"../../../format/lib/content/card-corners.js";import{enclosingPath as ko,enclosingSection as Lo}from"./enclosing-section.js";import{SettingsDefaultReset as x,SettingsDrill as Ao,SettingsField as _,SettingsGroup as Fo,SettingsSegmented as vo,SettingsBorder as Bo,SettingsSidesEach as Do,SettingsSwitch as Ne,borderSides as Ho,borderStartEach as Go}from"efficient-easel/panel";import{ListField as Mo}from"efficient-easel/fields";import{DisplayChips as Wo}from"efficient-shell/ui";import{desktopDisplayChanged as Uo,partShownOnDesktop as Ko,partShownOnPhone as $o,phoneDisplayChanged as Xo,withDesktopPart as Vo,withPhonePart as jo}from"../../../format/lib/content/part-display.js";import{ColorSwatch as Yo,CornersInput as zo,DatePicker as qo,DateTimePicker as Jo,FOCAL_DEFAULT as Zo,IconPicker as Nt,COLUMN_COUNT_MAX as Pt,COLUMN_SHARE_MIN as Qo,COLUMN_SHARES_EQUAL as er,resolveColumnShares as kt,WidthsBar as tr,useShellStrings as nr,IconButton as Lt,InputNumber as At,Slider as or,Tooltip as Pe}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as rr}from"./geocode-resolve.js";import{ColourRow as se,InheritedColourRow as Ft}from"./ColourControl.js";import{fillThemeColors as ir,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 sr,NoControlMark as lr,noControlField as Bt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as ar}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as cr,PANEL_ONLY_FIELD as ur}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as dr,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 pr}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as fr,CARD_OUTLINE_OPTIONS as hr,DEFAULT_CARD_INDEX_FORMAT as mr,DEFAULT_CARD_OUTLINE as gr}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as br,DEFAULT_COVER_INDEX as wr}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Sr}from"efficient-easel/draw";import _r from"../../components/MediaUploadField.js";import yr from"../../components/MultiSelectField.js";import Cr from"../../components/SectionThemePicker.js";import xr from"../../components/SearchSelectField.js";import Or 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 Ir}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Er}from"efficient-easel/draw/client";import{encodePartId as Rr}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as Tr,useEaselStrings as Nr}from"efficient-easel/strings";import{hasPhoneHeight as Pr,hasTabletHeight as Be,resolveSectionMinHeight as kr,resolveTabletHeight as Lr}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as Ar,SECTION_PIN_ABOVE_HINT as Fr,SECTION_PIN_ABOVE_KEY as vr,SECTION_PIN_ABOVE_LABEL as Br,SECTION_PIN_GROUP as Dr,SECTION_PIN_LABEL as Ht,SECTION_PIN_SCREENS_KEY as De,SECTION_PIN_SCREENS_LABEL as Gt,SECTION_PIN_STOP_DEFAULT as Hr,SECTION_PIN_STOP_HINT as Gr,SECTION_PIN_STOP_KEY as Mr,SECTION_PIN_STOP_LABEL as Wr,SECTION_PIN_STOP_OPTIONS as Ur,SECTION_STICK_DISTANCE as H,SECTION_STICK_DISTANCE_ROW as He,SOME_VIEW_PINS as Mt,hasPhoneStick as Kr,hasTabletStick as $r,resolveSectionStick as ae,sectionPinStopOf as Xr,sectionPinStopWrite as Vr}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as jr}from"../../../format/lib/content/css-length.js";import{SECTION_HEIGHT_MODES as Yr,SECTION_MIN_HEIGHT as zr,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as qr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as Jr,resolveContainerDirection as Wt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Zr,BOX_BLOCK_SPACING_POINTS as Ut,BOX_PHONE_ROW_LABEL as Kt,BOX_COLUMNS_MAX as Qr,BOX_COLUMNS_MIN as $t,BOX_PHONE_ROW_MAX as ei,BOX_PHONE_ROW_MIN as Ge,BOX_SHARE_CHOICES as Xt,BOX_SHARE_LABEL as j,boxShareChoiceOf as Vt,boxShareWidthsOf as Me,BOX_SHARE_PHONE_DEFAULT as ti,BOX_SHARE_PHONE_POINTS as ni}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as G}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as jt,BORDER_SIDES as oi,SECTION_BORDER_ROW as Yt,borderBySide as zt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as ri,normalizeTheme as qt,normalizeThemeColors as ii,sectionBandTone as si,surfaceTwoTone as li}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Jt,CONTAINER_GAP_BUILT_IN as ai,CONTAINER_GAP_PHONE as We,GAP_FIELD_CONTAINER as Ue,followsSitePhoneGap as ci,hasOwnContainerGap as ui,hasOwnPhoneGap as Ke,resolveContainerGap as Zt,resolvePhoneContainerGap as Qt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as di,CARD_IMAGE_BG_OFF as pi,CARD_IMAGE_BG_SWATCH_NAMES as fi,CARD_IMAGE_BG_SWATCHES as hi,isCardImageBackgroundInheriting as mi,cardImageBackgroundChoice as gi,THEME_CARD_IMAGE_BG as bi}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as wi,SECTION_BG_NO_FILL as Si,sectionBackgroundChoice as _i,THEME_SECTION_BG as $e,isSectionBackgroundEmpty as yi,sectionBackgroundHex as en}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Ci,nestedAccentValue as tn,resolveSectionAccent as ce}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as xi,TYPE_SIZE_INHERIT as Oi,isTypeSizeInheriting as Ii}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Ei,WIDTH_CHOICE_LABEL as Ri,WIDTH_INHERIT as Ti}from"../../../format/lib/content/section-width.js";import{useEaselSession as Ni}from"efficient-easel/screen/lib/session-context";import{backendOf as Pi}from"../website-session.js";import{BOX_GAP as ki,describedAs as F,group as R,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 Xe,saidAlignmentGrid as Li,useLengthUnit as Ai}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as Fi,directionField as vi,gapField as Ve,iconPickerRow as on,lengthUnitFields as ue,pickerCellIcon as Bi,pickerNoneIcon as Di,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 Hi}from"../../../format/lib/content/view-tier.js";import{ownEntry as Gi}from"../../../format/lib/own-entry.js";function Xa({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 Mi(){const{blockGap:e}=G();return e===null?a("this container's own spacing"):U(`${e}px`,a("Styles"))}function Wi({inherited:e,onReset:t,label:n}){return i(x,{words:C()?.panel,label:a(n),changed:!e,detail:Mi(),onReset:t})}function Ui(e){return Ve({...ki,builtIn:ai[e],resolve:(t,n)=>Zt(e,t,n?.siteGap),action:(t,n)=>i(Wi,{inherited:!ui(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[Ue]:e}})}function Ki(e){return ut(E("mobile",{[Ue]:e,type:"custom",render:t=>i(Vi,{container:e,...t})}),sn)}function $i(e){return ut(E("tablet",{[Ue]:e,type:"custom",render:t=>i(Xi,{container:e,...t})}),sn)}const sn={not:{field:"gap",in:Array.from({length:-Jt.min},(e,t)=>Jt.min+t)}};function Va(e){return{gap:E("desktop",Ui(e)),[Fe("gap")]:$i(e),[V("gap")]:Ki(e)}}function Xi({container:e,...t}){const[n]=T("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 Vi({container:e,...t}){const[n]=T("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`,ci(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function ja(e){return vi({offered:Jr(e),fallback:Wt(e,void 0),resolve:t=>Wt(e,t)})}function Ya(e,t){return eo(t?Qn(e,t):[],t)}function ji({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?Zi(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(yo,{}),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,[ur]:!0}}function Qa(e){return cr(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{[sr]:o,...r}=e;return{...r,[ar]:!0,render:t}}const Yi=new Set(Sr),pe={type:"radio",options:[{value:!0},{value:!1}]},ln={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"}}}},$=(e,t)=>{const n=F({...t,[N]:e},{...ln[e.control],label:e.label});if(!Yi.has(e.control))return n;const o=t.render;return{...Bt(n,"authored-copy"),render:r=>i(pr,{name:r.name,children:o(r)})}},nc="Everything else on this block comes from the linked post. Unlink it to edit by hand.",zi={field:"source.slug",set:!0},oc={not:zi},qi="Select a word, then press the highlighter.",Ji=new Set([qi]),Zi=e=>Ji.has(e);function rc(e,t,n){return $({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 $({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 $({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 $({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(Or,{value:st(t),onChange:n,label:e})}}function cc(e,t,n){return $({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:oo,Animation:io};function dc(e,t){return{type:"custom",render:()=>i(Qi,{text:e,values:t})}}function Qi({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 an=new Map;function fc(e,t){const n=`${e}\0${t?t.join(""):""}`,o=an.get(n)??{type:"custom",tabs:t,[ye]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(L,{})};return an.set(n,o),o}const cn=new Map;function hc(e){const t=cn.get(e)??{type:"custom",[ye]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(L,{})};return cn.set(e,t),t}function es(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function mc(e,t){return es(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(Fo,{title:e,open:n,onToggle:r=>{o(r),r?Ye.delete(e):Ye.add(e)},children:t})}const Ye=new Set;function ts({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(Yo,{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(ns,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function ns({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:li(l),band:si(l)},d=n?$e:t,h=yi(s,t,d),p=en(void 0,d,u),f=n?wi:void 0,m=d===$e?a("the theme's section background"):a("Theme {n} background",{n:c}),g=os(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 os(e,t,n,o,r,s){const l=_i(e,t);return[{label:a("No fill"),color:"",selected:l==="none",onPick:()=>s(Si)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:l==="band",onPick:()=>s($e)},...Ze(ke(e)??"",n,o,s)]}function rs(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=mi(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(di)}),children:ts({swatches:hi,current:s?bi:gi(r,t),onPick:o,names:fi})})}}}function Sc(e=n=>n,t){return ee({_gSectionTheme:R(Ci),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(Cr,{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=>X(t[o(l)])!==void 0),s=e.followsView??Ss(n,r);return Ai({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:Fi,label:a(e.label),grid:e.grid,hasOwn:r(n),view:{tier:n,numbersIn:r,followsView:s},convertTo:e.convertTo??(l=>{const c=X(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(or,{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 is(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",ss={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(ls,{tier:e,px:r,name:t.name,onRadius:o})})}}}function T(e){const t=B();return[t?.values?.[e],n=>t?.onChange(e,n)]}function un(){return Bt({type:"custom",render:()=>i(lr,{})},"always")}function he(){const e=B();return t=>e?.onChangeMany(t)}function ls({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[s,l]=T(e.sidesKey),c=he(),u=fe({row:e.row??ss,label:te,grid:{min:A,max:xe,step:e.step??1},valueKey:n??"",view:"desktop"}),d=Rt(s)??[...It];return i(zo,{label:a(te),value:d,corners:No,onChange:h=>{const p=Rt(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 dn(e,t){return ue(e,t)}function pn(){return un()}function as({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 cs(){const{cornerRadiusPx:e}=G();return typeof e=="number"?e:A}function us(){return ze({sidesKey:"sectionCornerSides",row:Et,useFollowed:cs,mark:i(as,{label:te}),hint:ds})}const ds="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function _c(){return ee({_gShape:R("Shape"),sectionCorners:us(),...dn(Et,"sectionCorners"),sectionCornerSides:pn(),...D("sectionBorder",ws),...ue(Yt,"sectionBorder",{tablet:!0,phone:!0})})}const ps=()=>({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 fs(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function hs(){let e;try{const t=qt(G().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||ri.line}function ms({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?Go(u,l):!1),p=ps(),f=m=>fs(r&&s?m:{width:m.width,color:m.color,...s?{style:m.style}:{}});return i(_,{label:a("Border"),icon:i(so,{}),action:r?i(Do,{each:d,label:a("Each side"),onChange:h}):void 0,children:i(Bo,{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 gs({value:e,onChange:t,view:n}){const[o]=T("sectionBorder"),[r]=T(Fe("sectionBorder")),s=hs(),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]:bs(m,f)}:{}}});return i(ms,{value:e,length:p,onChange:p?f=>d({[h]:f,...p.unitPatch(!qe(f))}):t,placeholder:{sides:Ho(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}const fn=["width",...oi];function qe(e){if(!e||typeof e!="object")return!1;const t=e;return fn.some(n=>X(t[n])!==void 0)}function bs(e,t){const n={...e};for(const o of fn){const r=X(n[o]);r!==void 0&&(n[o]=t(r))}return n}function ws(e){return{type:"custom",render:({value:t,onChange:n})=>i(gs,{value:t,onChange:n,view:e})}}function Ss(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(_s,{partKey:e})}}function _s({partKey:e}){const[t]=T("id"),[n]=T("_partStyles"),{textStyles:o}=G(),r=Nr();let s=null;try{s=Er().select}catch{s=null}const l=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(Ao,{name:a("Text"),preview:Ir(l,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??Tr.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(Rr(t,e))}})}function hn(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?Lo(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Po(r)?r:n}function ys({label:e,changed:t=!1,onReset:n=()=>{}}){const o=hn(A);return i(x,{words:C()?.panel,label:a(e),changed:t,detail:U(`${o}px`,a("the section")),onReset:n})}function Cs(){return i(L,{children:a("Follows the section's Corners until you set a number here.")})}function xs(){return ze({sidesKey:"cardCornerSides",row:Tt,useFollowed:()=>hn(A),mark:i(ys,{label:te}),hint:i(Cs,{})})}function Os(){return{type:"custom",render:()=>i(Gn,{})}}function Cc(){return{_gShape:R("Shape"),cardCorners:xs(),...dn(Tt,"cardCorners"),cardCornerSides:pn(),cardCornersApplyAll:Os()}}function Is(){return F({type:"custom",render:e=>i(Rs,{...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 Es(e,t){const n=Vt(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 Rs(e){const{value:t,onChange:n}=e,[o]=T("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=()=>[...er[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=nr().widths.hint(r,Qo);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),Es(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:Xt.map(w=>({value:w.value,label:w.value==="custom"&&!d?g:a(w.label),icon:Bi(i("span",{className:"sf-gallery-pic sf-share-pic",children:mn(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:gn,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(tr,{label:a(j),count:r,value:Me(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function mn(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(Zr,i(ho,{}),Ut,Ut[0].value)}function Oc(){return E("mobile",on(j,i(Ie,{}),ni.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:mn(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),ti,{columns:2,cell:gn}))}const gn={width:"5.75rem",height:"3.25rem"};function Ic(){return Xe("share",Is(),nn)[Fe("share")]}function Ts(){return E("mobile",W(Kt,i(ht,{}),Ge,ei,1,Ge,"",{clear:{phoneFollows:!1,hint:Ge}}))}const bn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Ec(){const e=W(Kt,i(ht,{}),$t,Qr,1,$t,"",{clear:{emptyLabel:"Auto"}}),t=Xe("columns",e,{...bn,tablet:nn.tablet}),n=Xe("columns",e,bn,{phoneRow:Ts()});return{...t,phoneRow:n.phoneRow}}function Rc(e,t,n,o,r,s,l){return{type:"custom",render:({value:c,onChange:u,name:d})=>i(Ns,{label:e,min:t,max:n,step:o,fallback:r,role:s,value:c,onChange:u,name:d??"",length:l})}}function Ns({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:!Ii(l),detail:a("the Text style in Styles"),onReset:()=>g(Oi),defaultAction:{onPress:()=>g(xi),title:a("Keep this section's own built-in size"),icon:i(lo,{})}}),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 Tc(){return{_gCellWidth:R("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(Ps),t=re(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Ps=Tn(null);function ks({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 Ls({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 As(e){return is(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Ls,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(ks,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Fs={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},vs={Top:Re,Bottom:St,Left:_t,Right:yt},Bs=e=>{const t=vs[e];return i(t,{})};function Nc(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>Fs[S],s=S=>W(r("Top"),i(Re,{}),P.min,P.max,P.step,S,"px"),l=(S,w,y,v=P)=>E("mobile",As({label:r(S),icon:Bs(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:R("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=Ei,n=!0){const o=t.map(r=>({label:Ri[r],value:r}));return ee({...n?{_gWidth:R(me)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(_,{label:a(me),icon:i(Co,{}),action:n?i(ji,{inherited:s?.inherited??!1,onReset:()=>r(Ti),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(Ds,{value:l,onChange:c,view:r,badge:s,fill:e})}),n=()=>Le("sectionHeightMode"),o=()=>Le("sectionHeightMode");return ee({_gHeight:R(Q),...D("sectionHeightMode",r=>r==="desktop"?t(r):t(r,s=>i(Ws,{view:r,onClear:()=>s(void 0)}))),...D("sectionHeightValue",n),...D("sectionHeightUnit",o)})}function Ds({value:e,onChange:t,view:n,badge:o,fill:r=!1}){const s=I(),{mode:l,number:c,unit:u}=Hs(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(Ms,{view:n,mode:l,menu:u}):null]})})}function wn(e,t){return e==="phone"&&Be(t)?Lr(t):kr(t)}function ge(e,t){return e==="desktop"||(e==="tablet"?Be(t):Pr(t))?null:wn(e,t)}function Hs(e,t,n){const r=(s=>Yr.includes(s))(n)?n:ge(e,t)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function Gs(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 Sn(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=Gs(e,c,t,l);return u===null?{[O(t,e)]:l}:Object.keys(u).length?u:null})}}function Ms({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}=Sn(e,"sectionHeightValue",c(s)),{write:h}=Sn(e,"sectionHeightUnit",c(l)),p=t==="screen"?"%":r[l],f=(u?u.unit:p)==="%"?"%":"px",m=f==="%"?qr:zr,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 Ws({view:e,onClear:t}){const n=I(),o=ge(e,n)===null,r=e==="phone"&&Be(n),s=wn(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(Ys,{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(Vs,{value:l,onChange:c,view:s,intro:t})});return{_gStick:R(Dr,{dot:t?$s:Mt}),...D("stickTop",n),...D("stickTopDistance",o),...ue(He,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?D(De,r):{},...t?{}:{[Mr]:Us()},...t||e.above===!1?{}:{[vr]:Ks()}}}function Us(){const e=z(Wr,i(Re,{}),Ur,Hr);return E("desktop",{...e,render:t=>{const n=e.render({...t,value:Xr(t.value),onChange:o=>t.onChange(Vr(o))});return _e(n,{hint:a(Gr)})}})}function Ks(){const e=Cn(Br,!1,i(Ct,{}),Fr);return E("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const $s={any:[Mt,Ar]};function _n(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=js(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=Hi(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)&&X(r[ve("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&s.ownTablet?"tablet":"desktop"}),{followed:u,write:d}=_n(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 Vs({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:s}=_n(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:X(e)??ie.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Gt),onChange:s})})}function ne(e,t){return e==="tablet"?$r(t):Kr(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 js(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 Ys({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?jr(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 yn="e.g. about";function Fc(){return{_gAnchor:R("Anchor"),anchor:$({control:"plainText",label:"Name",placeholder:yn},{type:"custom",render:({value:e,onChange:t})=>i(to,{value:e,onChange:t,nameBox:(n,o)=>i(K,{value:n,onChange:o,label:"Name",placeholder:yn,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(Jo,{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(qo,{id:c,value:kn(typeof o=="string"?o:null),onChange:u=>r(u?Pn(u):"")})})}}}function Cn(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(zs,{label:"Background",icon:i(wo,{}),id:r,value:e,shown:xo(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 zs({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(qs,{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=Te(e);return ir(t,n).map(s=>({label:s.label,color:s.value,selected:r===s.name,onPick:()=>o(s.name)}))}function qs({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]=T(Oo),[d]=T(Eo),h=typeof d=="string"&&d.trim()!=="",p=Ot(c),f=oe=>u(Ot(oe)||void 0),m=Te(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=Te(n.follows),we=Ro(n.follows),Se=oe?le(oe,o,r):we?{hex:we,words:we.toUpperCase()}:null;w=Se?.hex??s,y=M(Rn=>a(Rn),Se?Se.words:l,n.view)}const v=!n&&(To(e)||h)?i(Js,{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 Js({value:e,onChange:t}){return de({options:Io.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:a("Fill")})}function Zs(e,t,n){if((e?.content??[]).some(l=>l?.props?.id===t))return ce(n);const r=ko(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]=T("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?Zs(r?.data,l,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:ii(e.themes[o]),n:o+1}}function Mc(){return un()}const Wc={top:i(po,{}),right:i(uo,{}),bottom:i(ao,{}),left:i(co,{})};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:Li(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(yr,{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 $c(e,t,n,o){return{type:"custom",options:t,fallback:n,...F({},{type:"select",label:e}),render:({value:r,onChange:s,field:l})=>i(xr,{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 Xc(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(el,{label:e,icon:t,options:o,onChange:r})}}function Qs(e,t,n){const o=Ln(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=Fn(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 el({label:e,icon:t,options:n,onChange:o}){const r=B(),s=r?.values??{},l=An(s),c=nt(Dn),u=Bn(c?.docId??null);let d=null;try{d=re(p=>p.appState.data)}catch{d=null}const h=vn(r?.id,d,u);return i(_,{label:a(e),icon:Y(t),hint:Qs(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(_r,{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 tl(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=!!Pi(Ni()).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(So,{})})}):void 0,children:u&&o.status?i(no,{compact:!0,oneLine:!0,spaced:!1,status:l?"busy":o.ok&&!c?"found":"notfound",statusText:l?a("Finding…"):c?a(rr):a(o.status),hint:tl(o)}):null}),i(_,{label:a("Enter by hand"),labelId:d,icon:i(fo,{}),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 nl(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function ol(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 rl(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(bo,{})};function Qc(e,t,n,o){return{type:"custom",[N]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...F({},{...ln.textList,label:e}),render:({value:r,onChange:s})=>i(il,{label:e,icon:Y(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function il({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=rl(n,p,c);f===null&&(l.current=null),u(f),r(d(p))};return i(Mo,{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:nl(n,c),onChange:p=>r(ol(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 $({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:R("Cards"),coverIndex:z("Cover image",i(go,{}),br,String(wr),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:rs("Image background",pi),cardImage:xn()}}function nu(){return{outline:z("Card outline",i(_o,{}),hr,gr),indexBadge:z("Card number",i(mo,{}),fr,mr),showBadge:Cn("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:R("Show on a card"),[et]:F({type:"custom",render:()=>i(sl,{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 sl({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:Uo(o),shown:s=>Ko(o,s),onPress:(s,l)=>r(Vo(o,s,l)),onReset:()=>r(void 0)})}),[n]:E("mobile",{type:"custom",render:({value:o,onChange:r})=>i(ll,{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(ro,{}),changed:t,action:i(x,{words:C()?.panel,label:c,changed:t,detail:s,onReset:r}),children:i(Wo,{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 ll({parts:e,desktopKey:t,value:n,onChange:o}){const r=I()[t];return i(tt,{parts:e,changed:Xo(n),shown:s=>$o(r,n,s),onPress:(s,l)=>o(jo(n,s,l)),onReset:()=>o(dr),detail:a("the same as Desktop")})}function xn(e=Mn){return W("Card image",i(mt,{}),A,xe,Wn,A,e,{clear:{hint:A},hint:"Rounds the picture. The card's own corner is in Styles."})}function al(){return ue(dt,"cardImage")}function iu(){return{cardImage:xn(dt),...al()}}function su(){return ze({sidesKey:"cornerSides",row:$n,step:Un,useFollowed:()=>A,mark:i(cl,{label:Kn}),hint:a("Rounds the picture. Left alone it stays square.")})}function cl({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(fl,{value:typeof e=="string"?e:"",onChange:t})}}const On="own";function au(){const e=[{value:On,label:"Layout's own",picture:i(In,{cells:ul})},...Object.entries(zn).map(([t,n])=>({value:t,label:n.label,picture:i(In,{cells:[...n.phone,...n.phone,...n.phone]})}))];return E("mobile",on("Layout",i(gt,{}),e,On,{columns:2,cell:En}))}const ul=[[3,1],[3,1],[3,1],[3,1]];function In({cells:e}){return i("span",{"aria-hidden":"true",style:{display:"grid",width:24,gridTemplateColumns:`repeat(${jn}, minmax(0, 1fr))`,gridAutoRows:6,gap:2},children:e.map(([t,n],o)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${t}`,gridRow:`span ${n}`}},o))})}function dl({layout:e,width:t}){const n=qn(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:Jn(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 En={width:"3.5rem",height:"2.5rem"},pl=200;function fl({value:e,onChange:t}){const[n,o]=Z(null),[r,s]=Z(4),l=J(null);Nn(()=>{const m=l.current;if(!m||typeof ResizeObserver!="function")return;const g=()=>s(m.getBoundingClientRect().width>=pl?4:3);g();const b=new ResizeObserver(g);return b.observe(m),()=>b.disconnect()},[]);const c=e?Gi(Oe,e):void 0,u=c?e:"",d=pt(n,u),h=pt(n,"").length,p=Zn("no-symbol"),f=[{value:"",label:a("Not chosen"),icon:Di(p,a("Not chosen"))},...d.map(m=>({value:m,label:a(Oe[m].label),icon:i(dl,{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:En,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(vo,{options:[{id:"all",label:a("All")},...Vn.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:Yn.length})})]})})})})}export{zi as BOUND_TO_POST,nc as BOUND_TO_POST_NOTE,uc as BUCKET_ICONS,zc as CUSTOM_FIELD_MEDIA,qc as CoordsField,sn as DESKTOP_GAP_NOT_OVERLAP,tt as DisplayRow,Wc as EDGE_ARROWS,Zo as FOCAL_DEFAULT,ye as FOLD_FIELD_MARKER,qi as HIGHLIGHT_HINT,K as HidableTextField,lt as LINK_FIELD_MARKER,Xa as Label,at as MEDIA_FIELD_MARKER,Vc as MEDIA_TYPE_OPTIONS,oc as NOT_BOUND_TO_POST,bc as PanelBand,Qi as PanelNoteLine,Ps as RowPropsContext,ct as SCAFFOLD_FIELD_MARKER,pu as SCALAR_TEXT_CONTROLS,Wi as SiteGapDefaultReset,q as Slider,ts as Swatches,du as TEXT_CONTROL_KINDS,N as TEXT_FIELD_MARKER,Zc as TICKER_ITEMS_ROW,il as TextListField,zs as ThemeFillRow,me as WIDTH_LABEL,ji as WidthDefaultReset,rl as aimAfterListChange,Fc as anchorFields,U as backTo,wc as backgroundField,xc as boxBlockSpacingField,Ec as boxColumnsFields,Gc as boxFillField,Ts as boxPhoneRowField,Is as boxShareField,Oc as boxSharePhoneField,Ic as boxShareTabletField,Zs as boxThemeIndexOf,fc as bucketHeader,yc as buttonWordsEntryField,xs as cardCornersField,rs as cardImageBackgroundField,xn as cardImageField,iu as cardImageFields,tu as cardMediaFields,Cc as cardShapeFields,ou as cardShowFields,nu as cardStyleFields,Tc as cellWidthFields,Hc as colorInput,ja as containerDirectionField,Ui as containerGapField,Ki as containerGapPhoneField,Va as containerGapRows,$i as containerGapTabletField,tl as coordsResultTip,lc as copyText,pn as cornerSidesField,ze as cornersRowField,dn 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,es as foldTitleOf,Gs as followedHeightPatch,js as followedStickPatch,lu as galleryLayoutField,au as galleryLayoutPhoneField,Lc as heightFields,ge as heightFollowedBy,Hs as heightLayersAt,Ya as heroGroupPlacementPoints,st as hidableText,Zi as hintIsWhileTyping,su as imageCornersField,tc as inOwnBox,pc as isBucketHeader,un as keptBy,ac as linkField,Qs as loadingRowHint,jc as loadingShowsField,Kc as multiSelect,Dc as pageBackgroundField,dc as panelNote,As as phoneOverrideField,sc as plainText,cc as plainTextarea,is as pxField,gc as quietMarker,it as readHidable,nl as rowText,$c as searchSelect,os as sectionBandChoices,us as sectionCornersField,_c as sectionShapeFields,Sc as sectionThemeFields,ol as setRowText,Rc as sizeField,Xc as sourceField,Nc as spacingFields,Ac as stickFields,Pc as swapPadding,rc as text,Hn as textFieldIdentifier,Ja as textFieldOffPage,Qa as textFieldPanelOnly,Qc as textList,eu as textListRowField,ic as textarea,Cn as toggle,Yc as upload,fe as useLengthRow,he as useSelectedPatch,I as useSelectedProps,T as useSelectedSibling,Mi 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;
@@ -39,6 +40,18 @@ export declare function boxNamesRowPicture(props: object | null | undefined): bo
39
40
  export declare function boxCardProps<P extends object>(props: P, inCopy: boolean): P;
40
41
  export declare function boxRowPicture(props: Record<string, unknown> | null | undefined, row: SourceRow | null | undefined): string | null;
41
42
  export declare function boxDarkenStyle(darken: unknown, style?: unknown): CSSProperties | null;
43
+ export declare const BOX_FILL_FADES: readonly [{
44
+ readonly label: "Flat";
45
+ readonly value: "";
46
+ readonly hint: "One colour from top to bottom";
47
+ }, {
48
+ readonly label: "Fade";
49
+ readonly value: "down";
50
+ readonly hint: "The colour fades into the page colour at the bottom";
51
+ }];
52
+ export declare const BOX_FILL_FADE_PROP = "fillFade";
53
+ export declare const boxFillFadeOf: (value: unknown) => (typeof BOX_FILL_FADES)[number]["value"];
54
+ export declare function boxFillFadeStyle(fade: unknown): CSSProperties | null;
42
55
  export declare const boxFillOf: (value: unknown) => string | null;
43
56
  export declare const boxPaintOf: (value: unknown) => string | null;
44
57
  export declare const boxFillSlot: (value: unknown) => FillColorSlot | null;
@@ -1 +1 @@
1
- import{parseHexColor as y}from"efficient-shell/format";import{fillColorRole as C}from"efficient-shell/markup";import{BOX_ROW_IMAGE_PROP as f}from"./box-card-rule.js";import{namedRowField as m,rowFieldText as S}from"./card-template.js";import{fillInkCss as P,fillSlotNamed as A,inkTokenOf as F,partColourName as N}from"../document/part-inks.js";import{scrim as p}from"./scrim.js";import{viewVarSplit as h}from"./view-var-split.js";const H="sf-card",g={min:0,max:100,step:5,fallback:0,unit:"%"},T=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}],B="68%",j={desktop:20,phone:20,side:40,sidePhone:24},K="sf-box-sides",Y={min:0,max:200,step:10};function D(t){return typeof t=="string"&&t.trim()!==""}function z(t){return D(typeof t?.bgImage=="string"?t.bgImage:null)||_(t)}function _(t){return m(t,f)!==""}function G(t,e){return e||!_(t)?t:{...t,[f]:""}}function J(t,e){const o=S(e,m(t,f))?.trim();return o||null}function k(t,e){const n=typeof t=="number"?t:Number.parseFloat(String(t??""));if(!Number.isFinite(n)||n<=0)return null;const s=(Math.min(g.max,Math.max(g.min,n))/100).toFixed(2);return e!=="bottom"?{background:p(Number(s))}:{background:`linear-gradient(0deg, ${p(Number(s))} 0%, ${p(0)} ${B})`}}const O=t=>typeof t=="string"?y(t.trim()):null,d=t=>{const e=O(t);if(e!==null||typeof t!="string")return e;const n=t.trim();return n&&!n.startsWith("#")&&P(n)||null},U=t=>{if(typeof t!="string")return null;const e=C(N(t.trim()));return e?.kind==="slot"?e.slot:null},E="swatch";function q(t,e){if(!e)return null;const n=S(e,m(t,E)),o=A(n);return O(n)??(o&&F(o)||null)}const I={tabletClass:"sf-fill-tablet",tabletVar:"--sf-fill-tablet",phoneClass:"sf-fill-phone",phoneVar:"--sf-fill-phone"};function Q(t,e,n){return h(I,d(t),d(e),d(n))}const R={tabletClass:"sf-wash-tablet",tabletVar:"--sf-wash-tablet",phoneClass:"sf-wash-phone",phoneVar:"--sf-wash-phone"};function Z(t){const e=k(t.darken,t.darkenStyle);if(!e)return{className:"",style:{}};const n=(r,u)=>String(k(r,u)?.background??"none"),o=r=>(typeof r=="number"||typeof r=="string"&&r.trim()!=="")&&Number.isFinite(Number(r))?r:void 0,s=r=>T.some(u=>u.value===r)?r:void 0,[l,i,a,c]=[o(t.darkenTablet),s(t.darkenStyleTablet),o(t.darkenPhone),s(t.darkenStylePhone)],b=l??t.darken,x=i??t.darkenStyle;return h(R,String(e.background),l!==void 0||i!==void 0?n(b,x):null,a!==void 0||c!==void 0?n(a??b,c??x):null)}function v(t,e){const n={"top-left":["start","start"],"top-center":["center","start"],"top-right":["end","start"],left:["start","center"],center:["center","center"],right:["end","center"],"bottom-left":["start","end"],"bottom-center":["center","end"],"bottom-right":["end","end"]},[o,s]=n[t]??n.center,[l,i]=e==="column"?[s,o]:[o,s],a={start:"justify-start",center:"justify-center",end:"justify-end"},c={start:"items-start",center:"items-center",end:"items-end"};return`${a[l]} ${c[i]}`}export{j as BOX_CARD_PAD,Y as BOX_CARD_SIDE,g as BOX_DARKEN,T as BOX_DARKEN_STYLES,I as BOX_FILL_VIEWS,K as BOX_OWNS_SIDES_CLASS,E as BOX_SWATCH_PROP,R as BOX_WASH_VIEWS,H as CARD_SHADOW_CLASS,G as boxCardProps,k as boxDarkenStyle,O as boxFillOf,U as boxFillSlot,Q as boxFillViews,z as boxIsCard,_ as boxNamesRowPicture,d as boxPaintOf,v as boxPlacementClasses,J as boxRowPicture,q as boxSwatchFill,Z as boxWashViews,D as isBackgroundBox};
1
+ import{parseHexColor as y}from"efficient-shell/format";import{fillColorRole as C}from"efficient-shell/markup";import{BOX_ROW_IMAGE_PROP as f}from"./box-card-rule.js";import{namedRowField as m,rowFieldText as S}from"./card-template.js";import{fillInkCss as P,fillSlotNamed as D,inkTokenOf as I,partColourName as E}from"../document/part-inks.js";import{scrim as p}from"./scrim.js";import{viewVarSplit as _}from"./view-var-split.js";const z="sf-card",G="[--sf-card-lift:none] [--sf-card-shadow-hover:var(--sf-card-shadow,none)]",F={min:0,max:100,step:5,fallback:0,unit:"%"},T=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}],L="68%",J={desktop:20,phone:20,side:40,sidePhone:24},U="sf-box-sides",q={min:0,max:200,step:10};function N(t){return typeof t=="string"&&t.trim()!==""}function Q(t){return N(typeof t?.bgImage=="string"?t.bgImage:null)||g(t)}function g(t){return m(t,f)!==""}function Z(t,e){return e||!g(t)?t:{...t,[f]:""}}function v(t,e){const o=S(e,m(t,f))?.trim();return o||null}function O(t,e){const n=typeof t=="number"?t:Number.parseFloat(String(t??""));if(!Number.isFinite(n)||n<=0)return null;const l=(Math.min(F.max,Math.max(F.min,n))/100).toFixed(2);return e!=="bottom"?{background:p(Number(l))}:{background:`linear-gradient(0deg, ${p(Number(l))} 0%, ${p(0)} ${L})`}}const k=[{label:"Flat",value:"",hint:"One colour from top to bottom"},{label:"Fade",value:"down",hint:"The colour fades into the page colour at the bottom"}],tt="fillFade",d=k[1].value,B=t=>t===d?d:k[0].value,R=[{mix:"12%",at:"50%"},{mix:"19%",at:"70%"},{mix:"50%",at:"95%"}];function et(t){return B(t)!==d?null:{backgroundImage:`linear-gradient(to bottom, transparent, ${R.map(n=>`color-mix(in srgb, var(--bg) ${n.mix}, transparent) ${n.at}`).join(", ")})`}}const A=t=>typeof t=="string"?y(t.trim()):null,x=t=>{const e=A(t);if(e!==null||typeof t!="string")return e;const n=t.trim();return n&&!n.startsWith("#")&&P(n)||null},nt=t=>{if(typeof t!="string")return null;const e=C(E(t.trim()));return e?.kind==="slot"?e.slot:null},X="swatch";function ot(t,e){if(!e)return null;const n=S(e,m(t,X)),o=D(n);return A(n)??(o&&I(o)||null)}const W={tabletClass:"sf-fill-tablet",tabletVar:"--sf-fill-tablet",phoneClass:"sf-fill-phone",phoneVar:"--sf-fill-phone"};function rt(t,e,n){return _(W,x(t),x(e),x(n))}const V={tabletClass:"sf-wash-tablet",tabletVar:"--sf-wash-tablet",phoneClass:"sf-wash-phone",phoneVar:"--sf-wash-phone"};function lt(t){const e=O(t.darken,t.darkenStyle);if(!e)return{className:"",style:{}};const n=(r,u)=>String(O(r,u)?.background??"none"),o=r=>(typeof r=="number"||typeof r=="string"&&r.trim()!=="")&&Number.isFinite(Number(r))?r:void 0,l=r=>T.some(u=>u.value===r)?r:void 0,[s,a,i,c]=[o(t.darkenTablet),l(t.darkenStyleTablet),o(t.darkenPhone),l(t.darkenStylePhone)],b=s??t.darken,h=a??t.darkenStyle;return _(V,String(e.background),s!==void 0||a!==void 0?n(b,h):null,i!==void 0||c!==void 0?n(i??b,c??h):null)}function st(t,e){const n={"top-left":["start","start"],"top-center":["center","start"],"top-right":["end","start"],left:["start","center"],center:["center","center"],right:["end","center"],"bottom-left":["start","end"],"bottom-center":["center","end"],"bottom-right":["end","end"]},[o,l]=n[t]??n.center,[s,a]=e==="column"?[l,o]:[o,l],i={start:"justify-start",center:"justify-center",end:"justify-end"},c={start:"items-start",center:"items-center",end:"items-end"};return`${i[s]} ${c[a]}`}export{J as BOX_CARD_PAD,q as BOX_CARD_SIDE,F as BOX_DARKEN,T as BOX_DARKEN_STYLES,k as BOX_FILL_FADES,tt as BOX_FILL_FADE_PROP,W as BOX_FILL_VIEWS,U as BOX_OWNS_SIDES_CLASS,X as BOX_SWATCH_PROP,V as BOX_WASH_VIEWS,G as CARD_NO_LIFT_CLASS,z as CARD_SHADOW_CLASS,Z as boxCardProps,O as boxDarkenStyle,B as boxFillFadeOf,et as boxFillFadeStyle,A as boxFillOf,nt as boxFillSlot,rt as boxFillViews,Q as boxIsCard,g as boxNamesRowPicture,x as boxPaintOf,st as boxPlacementClasses,v as boxRowPicture,ot as boxSwatchFill,lt as boxWashViews,N as isBackgroundBox};
@@ -1,4 +1,4 @@
1
- export declare const BUTTON_ICONS: readonly ["none", "arrow-right", "arrow-long-right", "arrow-up-right", "chevron-right", "external", "cart", "bag", "tag", "email", "location", "play", "download", "search", "car"];
1
+ export declare const BUTTON_ICONS: readonly ["none", "arrow-right", "arrow-long-right", "arrow-up-right", "chevron-right", "external", "cart", "bag", "tag", "email", "location", "play", "download", "search", "car", "phone", "wheel", "chat", "chevron-left", "package", "truck", "shield-check", "receipt-refund"];
2
2
  export type ButtonIconChoice = (typeof BUTTON_ICONS)[number];
3
3
  export type ButtonIconGlyph = Exclude<ButtonIconChoice, "none">;
4
4
  export type ButtonIconSide = "before" | "after" | "end";
@@ -1 +1 @@
1
- import{buttonArrowShown as a}from"./button-arrow.js";import{nonEmptyString as r}from"../non-empty-string.js";const d=["none","arrow-right","arrow-long-right","arrow-up-right","chevron-right","external","cart","bag","tag","email","location","play","download","search","car"];function c(t){return typeof t=="string"&&d.includes(t)?t:void 0}function m(t,o){return c(t)??(a(o)?"arrow-right":"none")}function s(t){return t==="before"?"before":t==="end"?"end":"after"}function v(t,o){return s(t)==="end"&&i(o)==="fill"}function i(t){return t==="fill"||t==="fixed"?"fill":"fit"}function b(t,o,l,{atSectionLine:u=!1}={}){const n=i(t);if(r(l)){const e=i(l),f=r(o)?i(o):e;return u?[n==="fill"?"view-desktop:w-full":"view-desktop:w-auto",e==="fill"?"view-tablet:max-view-desktop:w-full":"view-tablet:max-view-desktop:w-auto",f==="fill"?"max-view-tablet:w-full":"max-view-tablet:w-auto"].join(" "):[n==="fill"?"view-desktop:w-full":"view-desktop:w-auto",e==="fill"?"view-wide:max-view-desktop:w-full":"view-wide:max-view-desktop:w-auto",f==="fill"?"max-view-wide:w-full":"max-view-wide:w-auto"].join(" ")}const w=n==="fill"?["w-full"]:[];if(r(o)){const e=i(o);e!==n&&w.push(e==="fill"?"max-view-wide:w-full":"max-view-wide:w-auto")}return w.join(" ")}export{d as BUTTON_ICONS,v as buttonIconAtEnd,m as buttonIconChoice,s as buttonIconSide,i as buttonWidth,b as buttonWidthClass,c as storedButtonIcon};
1
+ import{buttonArrowShown as a}from"./button-arrow.js";import{nonEmptyString as r}from"../non-empty-string.js";const c=["none","arrow-right","arrow-long-right","arrow-up-right","chevron-right","external","cart","bag","tag","email","location","play","download","search","car","phone","wheel","chat","chevron-left","package","truck","shield-check","receipt-refund"];function d(t){return typeof t=="string"&&c.includes(t)?t:void 0}function h(t,e){return d(t)??(a(e)?"arrow-right":"none")}function s(t){return t==="before"?"before":t==="end"?"end":"after"}function m(t,e){return s(t)==="end"&&i(e)==="fill"}function i(t){return t==="fill"||t==="fixed"?"fill":"fit"}function v(t,e,l,{atSectionLine:u=!1}={}){const n=i(t);if(r(l)){const o=i(l),f=r(e)?i(e):o;return u?[n==="fill"?"view-desktop:w-full":"view-desktop:w-auto",o==="fill"?"view-tablet:max-view-desktop:w-full":"view-tablet:max-view-desktop:w-auto",f==="fill"?"max-view-tablet:w-full":"max-view-tablet:w-auto"].join(" "):[n==="fill"?"view-desktop:w-full":"view-desktop:w-auto",o==="fill"?"view-wide:max-view-desktop:w-full":"view-wide:max-view-desktop:w-auto",f==="fill"?"max-view-wide:w-full":"max-view-wide:w-auto"].join(" ")}const w=n==="fill"?["w-full"]:[];if(r(e)){const o=i(e);o!==n&&w.push(o==="fill"?"max-view-wide:w-full":"max-view-wide:w-auto")}return w.join(" ")}export{c as BUTTON_ICONS,m as buttonIconAtEnd,h as buttonIconChoice,s as buttonIconSide,i as buttonWidth,v as buttonWidthClass,d as storedButtonIcon};
@@ -107,4 +107,5 @@ export declare function cardListFieldsOf(appState: unknown, list: {
107
107
  props?: Record<string, unknown>;
108
108
  } | null | undefined, kind?: CardRowFieldKind): readonly CardRowFieldSpec[];
109
109
  export declare function cardListProps(rows: readonly Record<string, unknown>[], fields: readonly CardRowFieldSpec[]): Record<string, unknown>;
110
+ export declare const HOST_PART_TYPE = "HostPart";
110
111
  export {};
@@ -1 +1 @@
1
- import{blockSources as F,blockSourceSpec as T,declaredBlockSource as h}from"./block-sources.js";import{slotFieldBlocks as B}from"./slot-field-blocks.js";import{isNodeList as P}from"efficient-easel/data";import{BOX_TYPE as D}from"../document/container-blocks.js";import{globalRegistry as v}from"../global-registry.js";import{nonEmptyString as L}from"../non-empty-string.js";import{accentItalicRuns as W}from"../markup.js";import{withCardsTemplate as M}from"../document/cards-template-on-read.js";import{withCardListTemplate as N}from"../document/blocks/general/CardList/item-seed.js";import{ARTICLE_BODY_BLOCK as K,withArticleBodyTemplate as j}from"../document/article-body-seed.js";import{withLogosTemplate as H}from"../document/blocks/general/Logos/card-seed.js";import{withFaqTemplate as Y}from"../document/blocks/general/FAQ/card-seed.js";import{withFootprintListTemplate as $}from"../document/blocks/general/Footprint/card-seed.js";const O="template",U="Card template",y="CardList",S=["Text","ImageBlock","ButtonBlock","Flex"],p="rowField",m="rowLinkField";function Be(){return{type:"slot",allow:[...S]}}const Q=S.filter(e=>e!=="ButtonBlock"),R="items",A="itemFields";function Le(){return{type:"slot",allow:[...Q]}}const q=[{block:"OrderSummary",typedRows:"rows",linesBetween:!0,fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:"FAQ",typedRows:"items",fields:[{key:"question",label:"Question"},{key:"answer",label:"Answer",multiline:!0}],seedOnInsert:e=>Y(e)},{block:"Footprint",typedRows:"offices",fields:[{key:"badge",label:"HQ",plain:!0},{key:"role",label:"Role"},{key:"city",label:"City"},{key:"country",label:"Region · country"},{key:"address",label:"Address"},{key:"phone",label:"Phone"},{key:"linkLabel",label:"Button"},{key:"href",label:"Link",kind:"link"}],seed:e=>$(e)},{block:"Cards",typedRows:"items",fields:[{key:"num",label:"Number"},{key:"since",label:"Corner note"},{key:"label",label:"Label"},{key:"title",label:"Card title"},{key:"value",label:"Value"},{key:"body",label:"Card body",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:"count",label:"Count"},{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],seed:e=>M("Cards",e)},{block:"ProcessSteps",fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title",mark:"accentItalic"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"},{key:"specs",label:"Specs",kind:"list",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]}],blocks:[{type:y,label:"Card list"}]},{block:"Logos",fields:[{key:"label",label:"Name"},{key:"kind",label:"Kind"}],seed:e=>H(e)},{block:y,fields:[{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],typedRows:R,seed:e=>N(e)},{block:K,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:e=>j(e)}];function f(){return v("efficient.card-templates",()=>new Map(q.map(e=>[e.block,e])))}function Oe(e){for(const t of e){if(typeof t.block!="string"||!t.block)throw new Error("A card template names no block.");const r=[];for(const o of t.blocks??[]){if(typeof o?.type!="string"||!o.type)throw new Error(`The card template of ${t.block} names an empty block.`);r.some(l=>l.type===o.type)||r.push({type:o.type,label:o.label||o.type})}const n=[];for(const o of t.slots??[]){if(typeof o?.slot!="string"||!o.slot)throw new Error(`The card template of ${t.block} names an empty slot.`);const l=L(o.label),c=Array.isArray(o.fields)?{fields:o.fields.map(a=>({...a}))}:null;n.some(a=>a.slot===o.slot)||n.push({slot:o.slot,...l?{label:l}:null,...c})}const s=n.some(o=>o.fields);if(s&&(t.fields.some(o=>o.everySource)||F(t.block).length))throw new Error(`The card template of ${t.block} declares slot fields, but the block reads a source: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);s?B().add(t.block):B().delete(t.block);const i=L(t.typedRows);f().set(t.block,{block:t.block,...n.length?{slots:n}:{},fields:t.fields.map(o=>({...o})),blocks:r,typedRows:i,...t.seed?{seed:t.seed}:{},...t.seedOnInsert?{seedOnInsert:t.seedOnInsert}:{},...t.linesBetween===!0?{linesBetween:!0}:{}})}}function V(e,t){const r=e?f().get(e)?.seed:void 0;return r?r(t):t}function Se(e,t){const r=z(e),n=(r.length?r:[O]).filter(l=>t[l]===void 0||Array.isArray(t[l])&&t[l].length===0);if(!n.length)return t;const s={...t};for(const l of n)delete s[l];const i=e?f().get(e)?.seedOnInsert:void 0,o=i?i(s):V(e,s);return o===s?t:o}function Re(){for(const e of f().values())if(e.blocks?.length)return!0;return!1}function Ae(e){return f().get(e)?.blocks??[]}function Ce(e){for(const t of f().values())if(t.blocks?.some(r=>r.type===e))return!0;return!1}function _e(e){return typeof e=="string"&&f().get(e)?.typedRows||""}function Ee(e){return typeof e=="string"&&f().get(e)?.linesBetween===!0}function Ie(e){return typeof e=="string"&&f().has(e)}const X=[{slot:O}];function k(e){if(typeof e!="string")return[];const t=f().get(e);return t?t.slots??X:[]}function z(e){return k(e).map(t=>t.slot)}function G(e,t){return k(e).some(r=>r.slot===t)}function Fe(e,t){const r=k(e).find(n=>n.slot===t);return r?r.label??U:null}function x(e,t){return t?k(e).find(r=>r.slot===t)?.fields:void 0}function J(e,t){const r=f().get(e)?.fields??[];return t?r.filter(n=>(n.kind??"text")===t):r}function Z(e,t){if(typeof e!="string")return"";const r=x(e,t);return(r?r.filter(n=>n.kind==="list"):J(e,"list"))[0]?.key??""}function ee(e,t,r){return g(e)||Z(t,r)}function C(e,t,r){const n=typeof e?.type=="string"?e.type:"";if(!n)return[];const s=x(n,r);if(s)return t?s.filter(c=>(c.kind??"text")===t):s;const i=f().get(n)?.fields??[],o=T(h(e?.props))?.fields,l=o?.length?[...o.map(c=>({...c})),...i.filter(c=>c.everySource&&!o.some(a=>a.key===c.key))]:i;return t?l.filter(c=>(c.kind??"text")===t):l}function te(e,t,r,n){if(!e)return null;const s=x(e,n);return s?s.find(i=>i.key===t)??null:r?C(r).find(i=>i.key===t)??null:f().get(e)?.fields.find(i=>i.key===t)??null}function _(e,t){return!e||!t?null:e.fields?.find(r=>r.key===t)??te(e.ownerType,t,e.owner,e.slot)}function Pe(e,t){return _(e,t)?.plain===!0}function g(e,t=p){const r=e?.[t];return typeof r=="string"?r.trim():""}function De(e,t){return e.key||String(t+1)}function ve(e){const t={};if(e&&typeof e=="object"&&!Array.isArray(e))for(const[r,n]of Object.entries(e))typeof n=="string"&&(t[r]=n);return t}const re="hideWhenRowEmpty";function We(e,t){const r=e[re];return!t||!Array.isArray(r)||!r.length?!1:r.every(n=>typeof n!="string"||!t[n]?.trim())}const w={Text:{text:p,href:m},ImageBlock:{src:p,href:m},ButtonBlock:{label:p,href:m},LogoBlock:{alt:p,href:m},Breadcrumb:{currentCrumb:p}},Me=w,oe=new Set(["ButtonBlock.label","LogoBlock.alt"]);function Ne(e,t,r){return ne(e,t,r)&&!oe.has(`${e}.${r}`)}function ne(e,t,r){return le(e,t,r)!==""}function le(e,t,r){const n=w[e]?.[r];return n?g(t,n):""}function E(e,t){return!t||!e?null:e[t]??""}function se(e,t){return E(e,t)?.trim()||void 0}function Ke(e,t,r,n,s,i){if(!r)return t;let o=null;for(const[l,c]of Object.entries(w[e]??{})){const a=g(t,c),u=E(r,a);if(u!==null){if(o??={...t},c===m){o[l]=se(r,a);continue}o[l]=_({ownerType:n,fields:s,slot:i},a)?.mark==="accentItalic"?W(u):u}}return o??t}function b(e,t){const r=e?.data?.content;if(!Array.isArray(r)||typeof t!="string")return;const n=(i,o)=>{for(const l of i){if(l?.props?.id===t)return o;for(const[c,a]of Object.entries(l?.props??{})){if(!P(a))continue;const u=G(l.type,c)?{owner:l,slot:c,direct:!0,nested:o!==null,underBox:!1}:o&&{owner:o.owner,slot:o.slot,direct:!1,nested:o.nested,underBox:o.underBox||l.type===D},d=n(a,u);if(d!==void 0)return d}}},s=n(r,null);return s===void 0?null:s}function ie(e,t){const r=b(e,t);return r&&r.owner}function ce(e,t){const r=b(e,t);return r&&r.slot}function je(e,t){const r=b(e,t);return r&&(r.direct?r.owner:null)}function He(e,t){const r=b(e,t);if(r!==void 0)return r===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:r.nested,underBox:r.underBox}}function Ye(e,t,r){if(t?.type!==y)return[];const n=ie(e,t.props?.id);if(!n){const l=T(h(t.props))?.fields,c=l?.length?l.map(d=>({...d})):ae(t.props),a=(f().get(y)?.fields??[]).filter(d=>d.everySource&&!c.some(I=>I.key===d.key)),u=[...c,...a];return r?u.filter(d=>(d.kind??"text")===r):u}const s=ce(e,t.props?.id)??void 0,i=ee(t.props,n.type,s),o=i&&C(n,"list",s).find(l=>l.key===i)?.fields||[];return r?o.filter(l=>(l.kind??"text")===r):o}function $e(e,t){return{[p]:"",[R]:e.map(r=>({...r})),[A]:t.map(r=>({...r}))}}function ae(e,t){const r=e?.[A];if(!Array.isArray(r))return[];const n=r.flatMap(s=>{if(!s||typeof s!="object")return[];const{key:i,label:o,kind:l,multiline:c,alt:a,next:u}=s;if(typeof i!="string"||!i||typeof o!="string")return[];const d=l==="image"||l==="link"||l==="colour"?l:void 0;return[{key:i,label:o,...d?{kind:d}:{},...c===!0?{multiline:!0}:{},...typeof a=="string"&&a?{alt:a}:{},...typeof u=="string"&&u?{next:u}:{}}]});return t?n.filter(s=>(s.kind??"text")===t):n}export{re as BOX_HIDE_WHEN_ROW_EMPTY,A as CARD_LIST_FIELDS,Q as CARD_LIST_ITEM_BLOCKS,R as CARD_LIST_ROWS,y as CARD_LIST_TYPE,p as CARD_ROW_FIELD_PROP,m as CARD_ROW_LINK_PROP,S as CARD_TEMPLATE_BLOCKS,U as CARD_TEMPLATE_LABEL,O as CARD_TEMPLATE_SLOT,Me as ROW_BOUND_PROPS,oe as ROW_PART_BY_WORDS,He as cardCopyPlace,De as cardKeyOf,Ye as cardListFieldsOf,Le as cardListItemSlot,$e as cardListProps,ee as cardListShows,ve as cardRow,Ae as cardTemplateBlocks,je as cardTemplateCardOwner,te as cardTemplateField,J as cardTemplateFields,C as cardTemplateFieldsOf,Ee as cardTemplateLinesBetween,ie as cardTemplateOwner,Be as cardTemplateSlot,Fe as cardTemplateSlotLabel,z as cardTemplateSlotNames,ce as cardTemplateSlotOf,_e as cardTemplateTypedRows,Re as cardTemplatesNameBlocks,Z as defaultListField,Ie as hasCardTemplate,Ce as isCardTemplateBlock,G as isCardTemplateSlot,g as namedRowField,Oe as registerCardTemplates,ne as rowBound,le as rowFieldOf,_ as rowFieldSpec,E as rowFieldText,Pe as rowFieldWordsArePlain,Ke as rowFilledProps,se as rowLinkText,Ne as rowPartByKey,We as templateBoxIsEmpty,Se as templateOnInsert,V as templateOnRead};
1
+ import{blockSources as P,blockSourceSpec as T,declaredBlockSource as h}from"./block-sources.js";import{slotFieldBlocks as B}from"./slot-field-blocks.js";import{isNodeList as D}from"efficient-easel/data";import{BOX_TYPE as v}from"../document/container-blocks.js";import{globalRegistry as W}from"../global-registry.js";import{nonEmptyString as L}from"../non-empty-string.js";import{accentItalicRuns as M}from"../markup.js";import{withCardsTemplate as N}from"../document/cards-template-on-read.js";import{withCardListTemplate as K}from"../document/blocks/general/CardList/item-seed.js";import{ARTICLE_BODY_BLOCK as H,withArticleBodyTemplate as $}from"../document/article-body-seed.js";import{withLogosTemplate as Y}from"../document/blocks/general/Logos/card-seed.js";import{withFaqTemplate as j}from"../document/blocks/general/FAQ/card-seed.js";import{withFootprintListTemplate as U}from"../document/blocks/general/Footprint/card-seed.js";const O="template",Q="Card template",y="CardList",S=["Text","ImageBlock","ButtonBlock","Flex"],p="rowField",m="rowLinkField";function Le(){return{type:"slot",allow:[...S]}}const q=S.filter(e=>e!=="ButtonBlock"),R="items",_="itemFields";function Oe(){return{type:"slot",allow:[...q]}}const V=[{block:"OrderSummary",typedRows:"rows",linesBetween:!0,fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:"FAQ",typedRows:"items",fields:[{key:"question",label:"Question"},{key:"answer",label:"Answer",multiline:!0}],seedOnInsert:e=>j(e)},{block:"Footprint",typedRows:"offices",fields:[{key:"badge",label:"HQ",plain:!0},{key:"role",label:"Role"},{key:"city",label:"City"},{key:"country",label:"Region · country"},{key:"address",label:"Address"},{key:"phone",label:"Phone"},{key:"linkLabel",label:"Button"},{key:"href",label:"Link",kind:"link"}],seed:e=>U(e)},{block:"Cards",typedRows:"items",fields:[{key:"num",label:"Number"},{key:"since",label:"Corner note"},{key:"label",label:"Label"},{key:"title",label:"Card title"},{key:"value",label:"Value"},{key:"body",label:"Card body",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:"count",label:"Count"},{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],seed:e=>N("Cards",e)},{block:"ProcessSteps",fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title",mark:"accentItalic"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"},{key:"specs",label:"Specs",kind:"list",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]}],blocks:[{type:y,label:"Card list"}]},{block:"Logos",fields:[{key:"label",label:"Name"},{key:"kind",label:"Kind"}],seed:e=>Y(e)},{block:y,fields:[{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],typedRows:R,seed:e=>K(e)},{block:H,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:e=>$(e)}];function f(){return W("efficient.card-templates",()=>new Map(V.map(e=>[e.block,e])))}function Se(e){for(const t of e){if(typeof t.block!="string"||!t.block)throw new Error("A card template names no block.");const r=[];for(const o of t.blocks??[]){if(typeof o?.type!="string"||!o.type)throw new Error(`The card template of ${t.block} names an empty block.`);if(o.type===I)throw new Error(`The card template of ${t.block} names "${I}" in its blocks. Only a host's seed puts a host part in a card template; a merchant never adds one. Take it out.`);r.some(l=>l.type===o.type)||r.push({type:o.type,label:o.label||o.type})}const n=[];for(const o of t.slots??[]){if(typeof o?.slot!="string"||!o.slot)throw new Error(`The card template of ${t.block} names an empty slot.`);const l=L(o.label),a=Array.isArray(o.fields)?{fields:o.fields.map(c=>({...c}))}:null;n.some(c=>c.slot===o.slot)||n.push({slot:o.slot,...l?{label:l}:null,...a})}const s=n.some(o=>o.fields);if(s&&(t.fields.some(o=>o.everySource)||P(t.block).length))throw new Error(`The card template of ${t.block} declares slot fields, but the block reads a source: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);s?B().add(t.block):B().delete(t.block);const i=L(t.typedRows);f().set(t.block,{block:t.block,...n.length?{slots:n}:{},fields:t.fields.map(o=>({...o})),blocks:r,typedRows:i,...t.seed?{seed:t.seed}:{},...t.seedOnInsert?{seedOnInsert:t.seedOnInsert}:{},...t.linesBetween===!0?{linesBetween:!0}:{}})}}function X(e,t){const r=e?f().get(e)?.seed:void 0;return r?r(t):t}function Re(e,t){const r=G(e),n=(r.length?r:[O]).filter(l=>t[l]===void 0||Array.isArray(t[l])&&t[l].length===0);if(!n.length)return t;const s={...t};for(const l of n)delete s[l];const i=e?f().get(e)?.seedOnInsert:void 0,o=i?i(s):X(e,s);return o===s?t:o}function _e(){for(const e of f().values())if(e.blocks?.length)return!0;return!1}function Ae(e){return f().get(e)?.blocks??[]}function Ce(e){for(const t of f().values())if(t.blocks?.some(r=>r.type===e))return!0;return!1}function Ee(e){return typeof e=="string"&&f().get(e)?.typedRows||""}function Ie(e){return typeof e=="string"&&f().get(e)?.linesBetween===!0}function Fe(e){return typeof e=="string"&&f().has(e)}const z=[{slot:O}];function k(e){if(typeof e!="string")return[];const t=f().get(e);return t?t.slots??z:[]}function G(e){return k(e).map(t=>t.slot)}function J(e,t){return k(e).some(r=>r.slot===t)}function Pe(e,t){const r=k(e).find(n=>n.slot===t);return r?r.label??Q:null}function x(e,t){return t?k(e).find(r=>r.slot===t)?.fields:void 0}function Z(e,t){const r=f().get(e)?.fields??[];return t?r.filter(n=>(n.kind??"text")===t):r}function ee(e,t){if(typeof e!="string")return"";const r=x(e,t);return(r?r.filter(n=>n.kind==="list"):Z(e,"list"))[0]?.key??""}function te(e,t,r){return g(e)||ee(t,r)}function A(e,t,r){const n=typeof e?.type=="string"?e.type:"";if(!n)return[];const s=x(n,r);if(s)return t?s.filter(a=>(a.kind??"text")===t):s;const i=f().get(n)?.fields??[],o=T(h(e?.props))?.fields,l=o?.length?[...o.map(a=>({...a})),...i.filter(a=>a.everySource&&!o.some(c=>c.key===a.key))]:i;return t?l.filter(a=>(a.kind??"text")===t):l}function re(e,t,r,n){if(!e)return null;const s=x(e,n);return s?s.find(i=>i.key===t)??null:r?A(r).find(i=>i.key===t)??null:f().get(e)?.fields.find(i=>i.key===t)??null}function C(e,t){return!e||!t?null:e.fields?.find(r=>r.key===t)??re(e.ownerType,t,e.owner,e.slot)}function De(e,t){return C(e,t)?.plain===!0}function g(e,t=p){const r=e?.[t];return typeof r=="string"?r.trim():""}function ve(e,t){return e.key||String(t+1)}function We(e){const t={};if(e&&typeof e=="object"&&!Array.isArray(e))for(const[r,n]of Object.entries(e))typeof n=="string"&&(t[r]=n);return t}const oe="hideWhenRowEmpty";function Me(e,t){const r=e[oe];return!t||!Array.isArray(r)||!r.length?!1:r.every(n=>typeof n!="string"||!t[n]?.trim())}const w={Text:{text:p,href:m},ImageBlock:{src:p,href:m},ButtonBlock:{label:p,href:m},LogoBlock:{alt:p,href:m},Breadcrumb:{currentCrumb:p}},Ne=w,ne=new Set(["ButtonBlock.label","LogoBlock.alt"]);function Ke(e,t,r){return le(e,t,r)&&!ne.has(`${e}.${r}`)}function le(e,t,r){return se(e,t,r)!==""}function se(e,t,r){const n=w[e]?.[r];return n?g(t,n):""}function E(e,t){return!t||!e?null:e[t]??""}function ie(e,t){return E(e,t)?.trim()||void 0}function He(e,t,r,n,s,i){if(!r)return t;let o=null;for(const[l,a]of Object.entries(w[e]??{})){const c=g(t,a),u=E(r,c);if(u!==null){if(o??={...t},a===m){o[l]=ie(r,c);continue}o[l]=C({ownerType:n,fields:s,slot:i},c)?.mark==="accentItalic"?M(u):u}}return o??t}function b(e,t){const r=e?.data?.content;if(!Array.isArray(r)||typeof t!="string")return;const n=(i,o)=>{for(const l of i){if(l?.props?.id===t)return o;for(const[a,c]of Object.entries(l?.props??{})){if(!D(c))continue;const u=J(l.type,a)?{owner:l,slot:a,direct:!0,nested:o!==null,underBox:!1}:o&&{owner:o.owner,slot:o.slot,direct:!1,nested:o.nested,underBox:o.underBox||l.type===v},d=n(c,u);if(d!==void 0)return d}}},s=n(r,null);return s===void 0?null:s}function ae(e,t){const r=b(e,t);return r&&r.owner}function ce(e,t){const r=b(e,t);return r&&r.slot}function $e(e,t){const r=b(e,t);return r&&(r.direct?r.owner:null)}function Ye(e,t){const r=b(e,t);if(r!==void 0)return r===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:r.nested,underBox:r.underBox}}function je(e,t,r){if(t?.type!==y)return[];const n=ae(e,t.props?.id);if(!n){const l=T(h(t.props))?.fields,a=l?.length?l.map(d=>({...d})):fe(t.props),c=(f().get(y)?.fields??[]).filter(d=>d.everySource&&!a.some(F=>F.key===d.key)),u=[...a,...c];return r?u.filter(d=>(d.kind??"text")===r):u}const s=ce(e,t.props?.id)??void 0,i=te(t.props,n.type,s),o=i&&A(n,"list",s).find(l=>l.key===i)?.fields||[];return r?o.filter(l=>(l.kind??"text")===r):o}function Ue(e,t){return{[p]:"",[R]:e.map(r=>({...r})),[_]:t.map(r=>({...r}))}}function fe(e,t){const r=e?.[_];if(!Array.isArray(r))return[];const n=r.flatMap(s=>{if(!s||typeof s!="object")return[];const{key:i,label:o,kind:l,multiline:a,alt:c,next:u}=s;if(typeof i!="string"||!i||typeof o!="string")return[];const d=l==="image"||l==="link"||l==="colour"?l:void 0;return[{key:i,label:o,...d?{kind:d}:{},...a===!0?{multiline:!0}:{},...typeof c=="string"&&c?{alt:c}:{},...typeof u=="string"&&u?{next:u}:{}}]});return t?n.filter(s=>(s.kind??"text")===t):n}const I="HostPart";export{oe as BOX_HIDE_WHEN_ROW_EMPTY,_ as CARD_LIST_FIELDS,q as CARD_LIST_ITEM_BLOCKS,R as CARD_LIST_ROWS,y as CARD_LIST_TYPE,p as CARD_ROW_FIELD_PROP,m as CARD_ROW_LINK_PROP,S as CARD_TEMPLATE_BLOCKS,Q as CARD_TEMPLATE_LABEL,O as CARD_TEMPLATE_SLOT,I as HOST_PART_TYPE,Ne as ROW_BOUND_PROPS,ne as ROW_PART_BY_WORDS,Ye as cardCopyPlace,ve as cardKeyOf,je as cardListFieldsOf,Oe as cardListItemSlot,Ue as cardListProps,te as cardListShows,We as cardRow,Ae as cardTemplateBlocks,$e as cardTemplateCardOwner,re as cardTemplateField,Z as cardTemplateFields,A as cardTemplateFieldsOf,Ie as cardTemplateLinesBetween,ae as cardTemplateOwner,Le as cardTemplateSlot,Pe as cardTemplateSlotLabel,G as cardTemplateSlotNames,ce as cardTemplateSlotOf,Ee as cardTemplateTypedRows,_e as cardTemplatesNameBlocks,ee as defaultListField,Fe as hasCardTemplate,Ce as isCardTemplateBlock,J as isCardTemplateSlot,g as namedRowField,Se as registerCardTemplates,le as rowBound,se as rowFieldOf,C as rowFieldSpec,E as rowFieldText,De as rowFieldWordsArePlain,He as rowFilledProps,ie as rowLinkText,Ke as rowPartByKey,Me as templateBoxIsEmpty,Re as templateOnInsert,X as templateOnRead};
@@ -1 +1 @@
1
- import{isNodeList as c}from"efficient-easel/data";import{CARD_LIST_ROWS as _,CARD_LIST_TYPE as y,namedRowField as E}from"./card-template.js";import{BLOCK_SOURCE_PROP as C,COUNT_KEY_PROP as f,COUNTS_SOURCE as p,declaredBlockSource as x,sourceChoices as U}from"./block-sources.js";const N="Flex";function R(e,r){return E(e)?typeof e?.[f]=="string"?a(r?.[f]):"":a(e?.[f])}const a=e=>typeof e=="string"?e.trim():"",P=e=>e.type===y&&Array.isArray(e.props?.[_])&&e.props[_].some(r=>a(r?.[f])!==""),b=new Intl.NumberFormat("en-US");function A(e){return/^\d+$/.test(e)?b.format(Number(e)):e}function Y(e,r){const n=r?r.find(t=>t.key===e)?.value:U(p).find(t=>t.key===e)?.value;return n===void 0?null:A(n)}const B={[f]:"any"};function l(e,r=!1){const n=e.props;if(!n)return{node:e,names:!1};let t=e.type==="Text"&&(R(n)!==""||r&&R(n,B)!=="");const u=r||P(e);let o=n;for(const[O,i]of Object.entries(n)){if(!c(i))continue;const m=i.map(s=>l(s,u));m.some(s=>s.names)&&(t=!0),m.some((s,T)=>s.node!==i[T])&&(o={...o,[O]:m.map(s=>s.node)})}if(e.type!==N)return{node:o===n?e:{...e,props:o},names:t};const d=x(o);if(t&&!d&&(o={...o,[C]:p}),!t&&d===p){const{[C]:O,...i}=o;o=i}return{node:o===n?e:{...e,props:o},names:!1}}function S(e,r,n){for(const t of e){if(t?.props?.id===r)return n;for(const u of Object.values(t?.props??{})){if(!c(u))continue;const o=S(u,r,t.type===N?t:n);if(o!==void 0)return o}}}function g(e,r){if(!c(e))return!0;const n=S(e,r,null);if(n===void 0)return!0;if(n===null)return!1;const t=x(n.props);return!t||t===p}function k(e){const r=e?.content;if(!c(r))return e;const n=r.map(t=>l(t));return n.every((t,u)=>t.node===r[u])?e:{...e,content:n.map(t=>t.node)}}function F(e){return l(e).node}export{Y as countNumber,A as countWords,g as countsReachText,R as linkedCount,F as settleCountNode,k as settleCountSources};
1
+ import{isNodeList as c}from"efficient-easel/data";import{mapEachNode as S,mapNodeLists as T}from"../document/node-lists.js";import{CARD_LIST_ROWS as _,CARD_LIST_TYPE as E,namedRowField as y}from"./card-template.js";import{BLOCK_SOURCE_PROP as N,COUNT_KEY_PROP as u,COUNTS_SOURCE as i,declaredBlockSource as O,sourceChoices as U}from"./block-sources.js";const C="Flex";function x(t,n){return y(t)?typeof t?.[u]=="string"?p(n?.[u]):"":p(t?.[u])}const p=t=>typeof t=="string"?t.trim():"",L=t=>t.type===E&&Array.isArray(t.props?.[_])&&t.props[_].some(n=>p(n?.[u])!==""),P=new Intl.NumberFormat("en-US");function A(t){return/^\d+$/.test(t)?P.format(Number(t)):t}function h(t,n){const r=n?n.find(e=>e.key===t)?.value:U(i).find(e=>e.key===t)?.value;return r===void 0?null:A(r)}const B={[u]:"any"};function m(t,n=!1){const r=t.props;if(!r)return{node:t,names:!1};let e=t.type==="Text"&&(x(r)!==""||n&&x(r,B)!=="");const s=n||L(t);let o=T(t,d=>S(d,f=>{const l=m(f,s);return l.names&&(e=!0),l.node})).props;if(t.type!==C)return{node:o===r?t:{...t,props:o},names:e};const a=O(o);if(e&&!a&&(o={...o,[N]:i}),!e&&a===i){const{[N]:d,...f}=o;o=f}return{node:o===r?t:{...t,props:o},names:!1}}function R(t,n,r){for(const e of t){if(e?.props?.id===n)return r;for(const s of Object.values(e?.props??{})){if(!c(s))continue;const o=R(s,n,e.type===C?e:r);if(o!==void 0)return o}}}function v(t,n){if(!c(t))return!0;const r=R(t,n,null);if(r===void 0)return!0;if(r===null)return!1;const e=O(r.props);return!e||e===i}function F(t){const n=t?.content;if(!c(n))return t;const r=n.map(e=>m(e));return r.every((e,s)=>e.node===n[s])?t:{...t,content:r.map(e=>e.node)}}function I(t){return m(t).node}export{h as countNumber,A as countWords,v as countsReachText,x as linkedCount,I as settleCountNode,F as settleCountSources};
@@ -171,9 +171,18 @@ export declare const GALLERY_LAYOUT_KEYS: GalleryLayoutKey[];
171
171
  export declare const GALLERY_ACROSS_BUCKETS: readonly (2 | 3 | 4 | 6)[];
172
172
  export declare function galleryChoices(across: number | null, chosen: string): GalleryLayoutKey[];
173
173
  export declare function resolveGalleryLayout(value: unknown): GalleryLayout | null;
174
+ export declare const GALLERY_PHONE_LAYOUTS: {
175
+ readonly oneAcross: {
176
+ readonly label: "One across";
177
+ readonly phone: readonly [readonly [6, 1]];
178
+ readonly acrossPhone: 1;
179
+ };
180
+ };
181
+ export type GalleryPhoneLayoutKey = keyof typeof GALLERY_PHONE_LAYOUTS;
182
+ export declare function resolveGalleryPhoneLayout(value: unknown): GalleryPhoneLayoutKey | null;
174
183
  export declare function galleryTailSpan(layout: GalleryLayout, phone: boolean): number;
175
184
  export declare function galleryLayoutRatio(layout: GalleryLayout): readonly [number, number] | null;
176
185
  export declare function galleryPictureCells(layout: GalleryLayout): readonly GalleryCell[];
177
186
  export declare const GALLERY_LAYOUT_CLASS_PREFIX = "sf-wall--";
178
- export declare function galleryLayoutClass(key: GalleryLayoutKey): string;
179
- export declare function galleryLayoutCss(key: GalleryLayoutKey): string;
187
+ export declare function galleryLayoutClass(key: GalleryLayoutKey, phone?: GalleryPhoneLayoutKey | null): string;
188
+ export declare function galleryLayoutCss(key: GalleryLayoutKey, phone?: GalleryPhoneLayoutKey | null): string;
@@ -1 +1 @@
1
- import{SHAPE_TABLE as b}from"./gallery-card-layout.js";const $=12,L=6,T=800,c={twoAcross:{label:"Two across",across:2,acrossPhone:2,desktop:[[6,1],[6,1]],phone:[[3,1],[3,1]]},zigzag:{label:"Zigzag",across:2,acrossPhone:2,desktop:[[8,1],[4,1],[4,1],[8,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},brick:{label:"Brick",across:2,acrossPhone:2,desktop:[[5,1],[7,1],[7,1],[5,1]],phone:[[2,1],[4,1],[4,1],[2,1]]},twoTall:{label:"Two tall",across:2,acrossPhone:2,desktop:[[6,2],[6,2]],phone:[[3,2],[3,2]]},offsetTall:{label:"Offset tall",across:2,acrossPhone:2,desktop:[[5,2],[7,1],[3,1],[4,1]],phone:[[3,2],[3,1],[3,1]]},ladder:{label:"Ladder",across:2,acrossPhone:2,desktop:[[3,2],[9,1],[5,1],[4,1]],phone:[[2,2],[4,1],[2,1],[2,1]]},threeAcross:{label:"Three across",across:3,acrossPhone:3,desktop:[[4,1],[4,1],[4,1]],phone:[[2,1],[2,1],[2,1]]},bigLeft:{label:"Big left",across:3,acrossPhone:3,desktop:[[6,1],[3,1],[3,1]],phone:[[4,1],[1,1],[1,1]]},bigRight:{label:"Big right",across:3,acrossPhone:3,desktop:[[3,1],[3,1],[6,1]],phone:[[1,1],[1,1],[4,1]]},threeStagger:{label:"Three stagger",across:3,acrossPhone:3,desktop:[[5,1],[4,1],[3,1],[3,1],[4,1],[5,1]],phone:[[3,1],[2,1],[1,1],[1,1],[2,1],[3,1]]},threeLadder:{label:"Three ladder",across:3,acrossPhone:3,desktop:[[3,1],[4,1],[5,1],[5,1],[4,1],[3,1]],phone:[[1,1],[2,1],[3,1],[3,1],[2,1],[1,1]]},tallMiddle:{label:"Tall middle",across:3,acrossPhone:3,desktop:[[4,1],[4,2],[4,1],[4,1],[4,1]],phone:[[2,1],[2,2],[2,1],[2,1],[2,1]]},fourAcross:{label:"Four across",across:4,acrossPhone:2,desktop:[[3,1],[3,1],[3,1],[3,1]],phone:[[3,1],[3,1]]},bigFirst:{label:"Big first",across:4,acrossPhone:2,desktop:[[6,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},fourStagger:{label:"Four stagger",across:4,acrossPhone:2,desktop:[[4,1],[3,1],[2,1],[3,1],[2,1],[3,1],[4,1],[3,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},tallFirst:{label:"Tall first",across:4,acrossPhone:2,desktop:[[3,2],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[3,2],[3,1],[3,1]]},oneThenFour:{label:"One then four",across:4,acrossPhone:2,desktop:[[12,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},sixAcross:{label:"Six across",across:6,acrossPhone:3,desktop:[[2,1],[2,1],[2,1],[2,1],[2,1],[2,1]],phone:[[2,1],[2,1],[2,1]]},sixStagger:{label:"Six stagger",across:6,acrossPhone:6,desktop:[[3,1],[2,1],[1,1],[2,1],[1,1],[3,1],[1,1],[3,1],[2,1],[2,1],[1,1],[3,1]],phone:[[1,1],[1,1],[1,1],[1,1],[1,1],[1,1]]},twoThenThrees:{label:"Two, then threes",across:3,acrossPhone:3,lead:[[6,1],[6,1]],desktop:[[4,1],[4,1],[4,1]],leadPhone:[[3,1],[3,1]],phone:[[2,1],[2,1],[2,1]]},twoThenThreesPhoto:{label:"Two, then threes · photo",across:3,acrossPhone:1,lead:[[6,1],[6,1]],desktop:[[4,1],[4,1],[4,1]],phone:[[6,1]],ratio:"landscape"}},x=Object.keys(c),w=[2,3,4,6];function _(o,e){return x.filter(s=>s===e||o===null||c[s].across===o)}function O(o){return typeof o!="string"||o===""?null:c[o]??null}function k(o,e){return e?L/o.acrossPhone:$/o.across}function A(o){return o.ratio?b.find(e=>e.shape===o.ratio)?.ratio??null:null}function R(o){return[...o.lead??[],...o.desktop]}const m="sf-wall--";function E(o){return`${m}${o}`}function y(o){const e=c[o],s=`.${E(o)}`,r=[],g=(l,h,a)=>`${s}:has(> :nth-child(${l}n+${h+a}):last-child) > :nth-last-child(-n+${a})`,f=(l,h,a=[])=>{const t=[],i=l.length,P=a.length;a.forEach(([n,d],u)=>{t.push(`${s} > :nth-child(${u+1}){grid-column:span ${n};grid-row:span ${d}}`)}),l.forEach(([n,d],u)=>{t.push(`${s} > :nth-child(${i}n+${P+u+1}){grid-column:span ${n};grid-row:span ${d}}`)});for(let n=1;n<i;n+=1)t.push(`${g(i,P,n)}{grid-column:span ${h};grid-row:span 1}`);return t};r.push(`${s}{grid-template-columns:repeat(${$},minmax(0,1fr))}`);const p=A(e);if(p&&(r.push(`${s}${s}{grid-auto-rows:auto}`),r.push(`${s}${s} > *{aspect-ratio:${p[0]}/${p[1]};height:auto}`)),r.push(...f(e.desktop,k(e,!1),e.lead)),r.push(`@media (max-width:${T}px){`),r.push(`${s}{grid-template-columns:repeat(${L},minmax(0,1fr))}`),r.push(...f(e.phone,k(e,!0),e.leadPhone)),e.phone.length===1&&!e.leadPhone?.length){const[l,h]=e.phone[0],a=e.lead?.length??0;for(let t=1;t<e.desktop.length;t+=1)r.push(`${g(e.desktop.length,a,t)}{grid-column:span ${l};grid-row:span ${h}}`)}return r.push("}"),r.join("")}export{w as GALLERY_ACROSS_BUCKETS,$ as GALLERY_COLUMNS,L as GALLERY_COLUMNS_PHONE,c as GALLERY_LAYOUTS,m as GALLERY_LAYOUT_CLASS_PREFIX,x as GALLERY_LAYOUT_KEYS,T as GALLERY_PHONE_BREAKPOINT,_ as galleryChoices,E as galleryLayoutClass,y as galleryLayoutCss,A as galleryLayoutRatio,R as galleryPictureCells,k as galleryTailSpan,O as resolveGalleryLayout};
1
+ import{SHAPE_TABLE as A}from"./gallery-card-layout.js";const k=12,P=6,E=800,i={twoAcross:{label:"Two across",across:2,acrossPhone:2,desktop:[[6,1],[6,1]],phone:[[3,1],[3,1]]},zigzag:{label:"Zigzag",across:2,acrossPhone:2,desktop:[[8,1],[4,1],[4,1],[8,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},brick:{label:"Brick",across:2,acrossPhone:2,desktop:[[5,1],[7,1],[7,1],[5,1]],phone:[[2,1],[4,1],[4,1],[2,1]]},twoTall:{label:"Two tall",across:2,acrossPhone:2,desktop:[[6,2],[6,2]],phone:[[3,2],[3,2]]},offsetTall:{label:"Offset tall",across:2,acrossPhone:2,desktop:[[5,2],[7,1],[3,1],[4,1]],phone:[[3,2],[3,1],[3,1]]},ladder:{label:"Ladder",across:2,acrossPhone:2,desktop:[[3,2],[9,1],[5,1],[4,1]],phone:[[2,2],[4,1],[2,1],[2,1]]},threeAcross:{label:"Three across",across:3,acrossPhone:3,desktop:[[4,1],[4,1],[4,1]],phone:[[2,1],[2,1],[2,1]]},bigLeft:{label:"Big left",across:3,acrossPhone:3,desktop:[[6,1],[3,1],[3,1]],phone:[[4,1],[1,1],[1,1]]},bigRight:{label:"Big right",across:3,acrossPhone:3,desktop:[[3,1],[3,1],[6,1]],phone:[[1,1],[1,1],[4,1]]},threeStagger:{label:"Three stagger",across:3,acrossPhone:3,desktop:[[5,1],[4,1],[3,1],[3,1],[4,1],[5,1]],phone:[[3,1],[2,1],[1,1],[1,1],[2,1],[3,1]]},threeLadder:{label:"Three ladder",across:3,acrossPhone:3,desktop:[[3,1],[4,1],[5,1],[5,1],[4,1],[3,1]],phone:[[1,1],[2,1],[3,1],[3,1],[2,1],[1,1]]},tallMiddle:{label:"Tall middle",across:3,acrossPhone:3,desktop:[[4,1],[4,2],[4,1],[4,1],[4,1]],phone:[[2,1],[2,2],[2,1],[2,1],[2,1]]},fourAcross:{label:"Four across",across:4,acrossPhone:2,desktop:[[3,1],[3,1],[3,1],[3,1]],phone:[[3,1],[3,1]]},bigFirst:{label:"Big first",across:4,acrossPhone:2,desktop:[[6,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},fourStagger:{label:"Four stagger",across:4,acrossPhone:2,desktop:[[4,1],[3,1],[2,1],[3,1],[2,1],[3,1],[4,1],[3,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},tallFirst:{label:"Tall first",across:4,acrossPhone:2,desktop:[[3,2],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[3,2],[3,1],[3,1]]},oneThenFour:{label:"One then four",across:4,acrossPhone:2,desktop:[[12,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},sixAcross:{label:"Six across",across:6,acrossPhone:3,desktop:[[2,1],[2,1],[2,1],[2,1],[2,1],[2,1]],phone:[[2,1],[2,1],[2,1]]},sixStagger:{label:"Six stagger",across:6,acrossPhone:6,desktop:[[3,1],[2,1],[1,1],[2,1],[1,1],[3,1],[1,1],[3,1],[2,1],[2,1],[1,1],[3,1]],phone:[[1,1],[1,1],[1,1],[1,1],[1,1],[1,1]]},twoThenThrees:{label:"Two, then threes",across:3,acrossPhone:3,lead:[[6,1],[6,1]],desktop:[[4,1],[4,1],[4,1]],leadPhone:[[3,1],[3,1]],phone:[[2,1],[2,1],[2,1]]},twoThenThreesPhoto:{label:"Two, then threes · photo",across:3,acrossPhone:1,lead:[[6,1],[6,1]],desktop:[[4,1],[4,1],[4,1]],phone:[[6,1]],ratio:"landscape"}},w=Object.keys(i),_=[2,3,4,6];function R(o,s){return w.filter(h=>h===s||o===null||i[h].across===o)}function Y(o){return typeof o!="string"||o===""?null:i[o]??null}const x={oneAcross:{label:"One across",phone:[[P,1]],acrossPhone:1}};function G(o){return typeof o=="string"&&Object.prototype.hasOwnProperty.call(x,o)?o:null}function T(o,s){return s?P/o.acrossPhone:k/o.across}function S(o){return o.ratio?A.find(s=>s.shape===o.ratio)?.ratio??null:null}function C(o){return[...o.lead??[],...o.desktop]}const m="sf-wall--";function O(o,s){return`${m}${o}${s?`--${s}`:""}`}function B(o,s){const h=i[o],e=s?{...h,...x[s],leadPhone:void 0}:h,t=`.${O(o,s)}`,r=[],$=(c,p,a)=>`${t}:has(> :nth-child(${c}n+${p+a}):last-child) > :nth-last-child(-n+${a})`,L=(c,p,a=[])=>{const n=[],u=c.length,b=a.length;a.forEach(([l,g],f)=>{n.push(`${t} > :nth-child(${f+1}){grid-column:span ${l};grid-row:span ${g}}`)}),c.forEach(([l,g],f)=>{n.push(`${t} > :nth-child(${u}n+${b+f+1}){grid-column:span ${l};grid-row:span ${g}}`)});for(let l=1;l<u;l+=1)n.push(`${$(u,b,l)}{grid-column:span ${p};grid-row:span 1}`);return n};r.push(`${t}{grid-template-columns:repeat(${k},minmax(0,1fr))}`);const d=S(e);if(d&&(r.push(`${t}${t}{grid-auto-rows:auto}`),r.push(`${t}${t} > *{aspect-ratio:${d[0]}/${d[1]};height:auto}`)),r.push(...L(e.desktop,T(e,!1),e.lead)),r.push(`@media (max-width:${E}px){`),r.push(`${t}{grid-template-columns:repeat(${P},minmax(0,1fr))}`),r.push(...L(e.phone,T(e,!0),e.leadPhone)),e.phone.length===1&&!e.leadPhone?.length){const[c,p]=e.phone[0],a=e.lead?.length??0;for(let n=1;n<e.desktop.length;n+=1)r.push(`${$(e.desktop.length,a,n)}{grid-column:span ${c};grid-row:span ${p}}`)}return r.push("}"),r.join("")}export{_ as GALLERY_ACROSS_BUCKETS,k as GALLERY_COLUMNS,P as GALLERY_COLUMNS_PHONE,i as GALLERY_LAYOUTS,m as GALLERY_LAYOUT_CLASS_PREFIX,w as GALLERY_LAYOUT_KEYS,E as GALLERY_PHONE_BREAKPOINT,x as GALLERY_PHONE_LAYOUTS,R as galleryChoices,O as galleryLayoutClass,B as galleryLayoutCss,S as galleryLayoutRatio,C as galleryPictureCells,T as galleryTailSpan,Y as resolveGalleryLayout,G as resolveGalleryPhoneLayout};
@@ -1 +1 @@
1
- import{MOTION_TIMING as O}from"efficient-shell/format";import{PHONE_EDGE as T}from"./view-lines.js";const f="grayscale(1) contrast(1.03)",g="Black and white";function A(o){return o===!0?{filter:f}:{}}function x(o){const{filter:e}=A(o);return e?{style:{filter:e}}:{}}const t="sf-photo-grayscale",y="data-sf-photo-host",$={duration:"--sf-photo-hover-duration",delay:"--sf-photo-hover-delay"},u=`@media (hover:hover){.${t}{filter:${f};transition:filter var(--sf-photo-hover-duration,var(--page-motion-hover-duration)) var(--page-ease-media) var(--sf-photo-hover-delay,var(--page-motion-hover-delay))}.${t}:hover,[data-sf-photo-host]:hover .${t}{filter:none}}@media (hover:hover) and (prefers-reduced-motion:reduce){.${t}{transition:none}}`;function _(o){const e=O.hover,r={...o.duration!==e.duration.default?{[$.duration]:`${o.duration}s`}:{},...o.delay!==e.delay.default?{[$.delay]:`${o.delay}s`}:{}};return Object.keys(r).length?r:void 0}function H(o,e,r){if(o===!0)return x(!0);if(r?.kind==="mono"){const d=_(r);return{className:t,sheet:u,...d?{style:d}:{}}}return o===!1?{}:e===!0?{className:t}:{}}const m="data-sf-repeat",p="sf-photo-zoom",R="--sf-photo-zoom",V="sf-photo-wash",a="sf-photo-wash-rest",n="sf-photo-wash-hover",s="sf-photo-frame",v=(o,e)=>`:not([${m}]:not(${e}) .${o})`,c=(o,e)=>`[${m}]${e} .${o}${v(o,e)}`,h=(o,e)=>`${e},${c(o,":hover")},[${y}]:hover .${o}${v(o,":hover")}`,E=o=>`${o} var(--sf-photo-hover-duration,var(--page-motion-hover-duration)) var(--page-ease-media) var(--sf-photo-hover-delay,var(--page-motion-hover-delay))`,C=`.${n}{opacity:0}@media (hover:hover){.${a},.${n}{transition:${E("opacity")}}${h(n,`.${s}:hover .${n}`)}{opacity:1}${h(a,`.${s}:hover .${a}`)}{opacity:0}}@media (hover:hover) and (prefers-reduced-motion:no-preference){.${p}{transition:${E("transform")}}${h(p,`.${s}:hover .${p}`)}{transform:scale(var(${R}))}}@media (hover:hover) and (prefers-reduced-motion:reduce){.${a},.${n}{transition:none}}`,M="sf-photo-move";function B(o){if(!o||!o.zoom&&!o.darken)return null;const e=_(o);return{className:s,sheet:C,...e?{style:e}:{}}}function U(o){return o===!0?{[t]:u}:{}}const i="sf-box-reveal",w="sf-box-reveal",I=8,S=.3,l=`(min-width:${T}px)`,N=`@media ${l}{.${i}{opacity:0;transform:translateY(${I}px);transition:opacity ${S}s ease-out,transform ${S}s ease-out}${c(i,":hover")},${c(i,":focus-within")}{opacity:1;transform:none}}@media ${l} and (prefers-reduced-motion:reduce){.${i}{transition:none;transform:none}}`;export{i as BOX_REVEAL_CLASS,N as BOX_REVEAL_CSS,w as BOX_REVEAL_SHEET,m as CARD_COPY_ATTR,f as IMAGE_GRAYSCALE_FILTER,g as IMAGE_GRAYSCALE_LABEL,y as PHOTO_HOST_ATTR,$ as PHOTO_HOVER_VARS,s as PICTURE_FRAME_CLASS,C as PICTURE_MOVE_CSS,M as PICTURE_MOVE_SHEET,V as PICTURE_WASH_CLASS,n as PICTURE_WASH_HOVER_CLASS,a as PICTURE_WASH_REST_CLASS,p as PICTURE_ZOOM_CLASS,R as PICTURE_ZOOM_VAR,t as SITE_PHOTO_CLASS,u as SITE_PHOTO_CSS,x as imageTreatmentProps,A as imageTreatmentStyle,H as resolveImageTreatment,B as resolvePictureMove,U as sitePhotographyTokens};
1
+ import{MOTION_TIMING as T}from"efficient-shell/format";import{EDGE_WIDE_MEDIA as f}from"./view-lines.js";const u="grayscale(1) contrast(1.03)",P="Black and white";function A(o){return o===!0?{filter:u}:{}}function O(o){const{filter:e}=A(o);return e?{style:{filter:e}}:{}}const t="sf-photo-grayscale",y="data-sf-photo-host",$={duration:"--sf-photo-hover-duration",delay:"--sf-photo-hover-delay"},_=`@media (hover:hover){.${t}{filter:${u};transition:filter var(--sf-photo-hover-duration,var(--page-motion-hover-duration)) var(--page-ease-media) var(--sf-photo-hover-delay,var(--page-motion-hover-delay))}.${t}:hover,[data-sf-photo-host]:hover .${t}{filter:none}}@media (hover:hover) and (prefers-reduced-motion:reduce){.${t}{transition:none}}`;function v(o){const e=T.hover,r={...o.duration!==e.duration.default?{[$.duration]:`${o.duration}s`}:{},...o.delay!==e.delay.default?{[$.delay]:`${o.delay}s`}:{}};return Object.keys(r).length?r:void 0}function g(o,e,r){if(o===!0)return O(!0);if(r?.kind==="mono"){const d=v(r);return{className:t,sheet:_,...d?{style:d}:{}}}return o===!1?{}:e===!0?{className:t}:{}}const m="data-sf-repeat",p="sf-photo-zoom",x="--sf-photo-zoom",H="sf-photo-wash",a="sf-photo-wash-rest",n="sf-photo-wash-hover",s="sf-photo-frame",E=(o,e)=>`:not([${m}]:not(${e}) .${o})`,c=(o,e)=>`[${m}]${e} .${o}${E(o,e)}`,h=(o,e)=>`${e},${c(o,":hover")},[${y}]:hover .${o}${E(o,":hover")}`,S=o=>`${o} var(--sf-photo-hover-duration,var(--page-motion-hover-duration)) var(--page-ease-media) var(--sf-photo-hover-delay,var(--page-motion-hover-delay))`,R=`.${n}{opacity:0}@media (hover:hover){.${a},.${n}{transition:${S("opacity")}}${h(n,`.${s}:hover .${n}`)}{opacity:1}${h(a,`.${s}:hover .${a}`)}{opacity:0}}@media (hover:hover) and (prefers-reduced-motion:no-preference){.${p}{transition:${S("transform")}}${h(p,`.${s}:hover .${p}`)}{transform:scale(var(${x}))}}@media (hover:hover) and (prefers-reduced-motion:reduce){.${a},.${n}{transition:none}}`,M="sf-photo-move";function V(o){if(!o||!o.zoom&&!o.darken)return null;const e=v(o);return{className:s,sheet:R,...e?{style:e}:{}}}function U(o){return o===!0?{[t]:_}:{}}const i="sf-box-reveal",B="sf-box-reveal",C=8,l=.3,w=`@media ${f}{.${i}{opacity:0;transform:translateY(${C}px);transition:opacity ${l}s ease-out,transform ${l}s ease-out}${c(i,":hover")},${c(i,":focus-within")}{opacity:1;transform:none}}@media ${f} and (prefers-reduced-motion:reduce){.${i}{transition:none;transform:none}}`;export{i as BOX_REVEAL_CLASS,w as BOX_REVEAL_CSS,B as BOX_REVEAL_SHEET,m as CARD_COPY_ATTR,u as IMAGE_GRAYSCALE_FILTER,P as IMAGE_GRAYSCALE_LABEL,y as PHOTO_HOST_ATTR,$ as PHOTO_HOVER_VARS,s as PICTURE_FRAME_CLASS,R as PICTURE_MOVE_CSS,M as PICTURE_MOVE_SHEET,H as PICTURE_WASH_CLASS,n as PICTURE_WASH_HOVER_CLASS,a as PICTURE_WASH_REST_CLASS,p as PICTURE_ZOOM_CLASS,x as PICTURE_ZOOM_VAR,t as SITE_PHOTO_CLASS,_ as SITE_PHOTO_CSS,O as imageTreatmentProps,A as imageTreatmentStyle,g as resolveImageTreatment,V as resolvePictureMove,U as sitePhotographyTokens};
@@ -10,3 +10,4 @@ export declare function breakpointOf(variant: string): {
10
10
  px: number;
11
11
  max: boolean;
12
12
  } | undefined;
13
+ export declare const EDGE_WIDE_MEDIA = "(min-width: 800px)";
@@ -1 +1 @@
1
- import{VIEW_DESKTOP_MIN as E,VIEW_TABLET_MIN as i}from"efficient-easel/screen/lib/content/view-tiers";const s="v1",p=800,x={"view-tablet":i,"view-desktop":E,"view-wide":p};function c(e){const o=e.startsWith("max-"),n=o?e.slice(4):e;if(n in x)return{px:x[n],max:o};const t=/^(max|min)-\[(\d+)px\]$/.exec(e);return t?{px:Number(t[2]),max:t[1]==="max"}:void 0}export{p as PHONE_EDGE,s as RESPONSIVE_RULES,x as VIEW_LINE_PX,c as breakpointOf};
1
+ import{VIEW_DESKTOP_MIN as i,VIEW_TABLET_MIN as p}from"efficient-easel/screen/lib/content/view-tiers";const s="v1",E=800,x={"view-tablet":p,"view-desktop":i,"view-wide":E};function c(e){const o=e.startsWith("max-"),n=o?e.slice(4):e;if(n in x)return{px:x[n],max:o};const t=/^(max|min)-\[(\d+)px\]$/.exec(e);return t?{px:Number(t[2]),max:t[1]==="max"}:void 0}const m=`(min-width: ${E}px)`;export{m as EDGE_WIDE_MEDIA,E as PHONE_EDGE,s as RESPONSIVE_RULES,x as VIEW_LINE_PX,c as breakpointOf};