efficient-web-builder 73.1.0 → 73.2.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 (101) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/editor/components/SlotChildRows.js +1 -1
  3. package/dist/editor/components/StandaloneSectionEditor.js +1 -1
  4. package/dist/editor/components/StorefrontEditor.js +1 -1
  5. package/dist/editor/components/TickerSettingsPanel.js +1 -1
  6. package/dist/editor/components/useHostDocumentBridge.js +1 -1
  7. package/dist/editor/lib/document/blocks/general/Footprint/fields.js +1 -1
  8. package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
  9. package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
  10. package/dist/editor/lib/document/blocks/hero-shared-fields.d.ts +5 -0
  11. package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -1
  12. package/dist/editor/lib/document/controls.js +1 -1
  13. package/dist/editor/lib/document/footer-blocks.js +1 -1
  14. package/dist/editor/lib/document/own-pad-fields.d.ts +5 -0
  15. package/dist/editor/lib/document/own-pad-fields.js +1 -0
  16. package/dist/editor/lib/document/passes/inspector.js +1 -1
  17. package/dist/editor/lib/editor-document-adapter.js +1 -1
  18. package/dist/format/lib/animation/hover.js +1 -1
  19. package/dist/format/lib/content/accordion-row-style.d.ts +3 -1
  20. package/dist/format/lib/content/accordion-row-style.js +1 -1
  21. package/dist/format/lib/content/box-layout.js +1 -1
  22. package/dist/format/lib/content/box-shape.d.ts +1 -1
  23. package/dist/format/lib/content/button-icon.d.ts +3 -1
  24. package/dist/format/lib/content/button-icon.js +1 -1
  25. package/dist/format/lib/content/card-place.d.ts +3 -1
  26. package/dist/format/lib/content/card-place.js +1 -1
  27. package/dist/format/lib/content/chat-launcher.js +1 -1
  28. package/dist/format/lib/content/container-direction.js +1 -1
  29. package/dist/format/lib/content/footprint.d.ts +22 -0
  30. package/dist/format/lib/content/footprint.js +1 -1
  31. package/dist/format/lib/content/image-fit.js +1 -1
  32. package/dist/format/lib/content/image-text-rows.d.ts +5 -2
  33. package/dist/format/lib/content/image-text-rows.js +1 -1
  34. package/dist/format/lib/content/list-number.js +1 -1
  35. package/dist/format/lib/content/list-position.js +1 -1
  36. package/dist/format/lib/content/text-tag.js +1 -1
  37. package/dist/format/lib/document/blocks/general/Footprint/card-seed.js +1 -1
  38. package/dist/format/lib/document/box-footer.js +1 -1
  39. package/dist/format/lib/document/left-view.js +1 -1
  40. package/dist/format/lib/document/mockup-variant-fields.js +1 -1
  41. package/dist/format/lib/document/passes/types.d.ts +1 -0
  42. package/dist/format/lib/document/section-groups.js +1 -1
  43. package/dist/format/lib/editor-words-catalogue.d.ts +11 -0
  44. package/dist/format/lib/editor-words-catalogue.js +4 -4
  45. package/dist/format/lib/hero-arrows.js +1 -1
  46. package/dist/format/lib/hero-group-placement.js +1 -1
  47. package/dist/format/lib/hero-media-layout.js +1 -1
  48. package/dist/format/lib/hero-phone-stack.d.ts +12 -0
  49. package/dist/format/lib/hero-phone-stack.js +1 -1
  50. package/dist/format/lib/hero-video.js +1 -1
  51. package/dist/format/lib/reel.js +1 -1
  52. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  53. package/dist/format/lib/sections/section-head-placement.d.ts +3 -1
  54. package/dist/format/lib/sections/section-head-placement.js +1 -1
  55. package/dist/format/lib/source-rules/one-option-parser.d.ts +12 -0
  56. package/dist/format/lib/source-rules/one-option-parser.js +12 -0
  57. package/dist/format/lib/theme.d.ts +2 -1
  58. package/dist/format/lib/theme.js +4 -4
  59. package/dist/render/components/BoxTabPaneContext.d.ts +2 -3
  60. package/dist/render/components/ButtonBlock.d.ts +2 -0
  61. package/dist/render/components/ButtonBlock.js +1 -1
  62. package/dist/render/components/DealerFinder.d.ts +7 -1
  63. package/dist/render/components/DealerFinder.js +1 -1
  64. package/dist/render/components/Footprint.d.ts +6 -2
  65. package/dist/render/components/Footprint.js +1 -1
  66. package/dist/render/components/Heading.d.ts +1 -1
  67. package/dist/render/components/Heading.js +1 -1
  68. package/dist/render/components/HeroSection.d.ts +4 -1
  69. package/dist/render/components/HeroSection.js +1 -1
  70. package/dist/render/components/HeroSingle.d.ts +4 -1
  71. package/dist/render/components/HeroSingle.js +1 -1
  72. package/dist/render/components/HeroSlide.d.ts +3 -0
  73. package/dist/render/components/HeroSlide.js +1 -1
  74. package/dist/render/components/SideListLayout.d.ts +8 -2
  75. package/dist/render/components/SideListLayout.js +1 -1
  76. package/dist/render/components/SiteGutterFrame.js +1 -1
  77. package/dist/render/components/Text.d.ts +1 -1
  78. package/dist/render/components/Text.js +1 -1
  79. package/dist/render/lib/content/section-padding.d.ts +36 -2
  80. package/dist/render/lib/content/section-padding.js +1 -1
  81. package/dist/render/lib/document/blocks/general/ButtonBlock/render.js +1 -1
  82. package/dist/render/lib/document/blocks/general/CustomHTML/render.js +1 -1
  83. package/dist/render/lib/document/blocks/general/Footprint/render.js +1 -1
  84. package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
  85. package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
  86. package/dist/render/lib/document/blocks/general/LocationMap/render.js +1 -1
  87. package/dist/render/lib/document/blocks/general/LogoBlock/render.js +1 -1
  88. package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
  89. package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
  90. package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.js +1 -1
  91. package/dist/render/lib/document/custom-css.d.ts +4 -2
  92. package/dist/render/lib/document/custom-css.js +2 -2
  93. package/dist/render/lib/document/header-clearance.js +1 -1
  94. package/dist/render/lib/document/header-ink.js +1 -1
  95. package/dist/render/lib/document/passes/section-padding.d.ts +4 -0
  96. package/dist/render/lib/document/passes/section-padding.js +1 -1
  97. package/dist/render/lib/document/sanitize.d.ts +4 -1
  98. package/dist/render/lib/document/sanitize.js +1 -1
  99. package/dist/routine-index.json +1 -0
  100. package/dist/value-index.json +1 -0
  101. package/package.json +5 -4
@@ -1 +1 @@
1
- "use client";import{jsx as i,jsxs as A,Fragment as L}from"react/jsx-runtime";import{HERO_FOCUS as An,HERO_MEDIA_TYPES as Ln}from"../../../format/lib/hero-media-layout.js";import{cloneElement as xe,createContext as kn,useContext as st,useEffect as Fn,useId as lt,useRef as J,useState as Z}from"react";import{useEasel as re,useSelectedHost as G}from"efficient-easel/easel";import{PIN_LENGTH as ie,toDateKey as vn,fromDateKey as Dn}from"efficient-shell/format";import{say as a,editorEaselWords as x}from"../../../format/lib/editor-words.js";import{finiteNumber as Y}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as at,firstFrameHint as Bn,loadingShowsOf as Hn,loadingStillHint as Gn}from"../../../format/lib/hero-video.js";import{pageFramesFor as Mn,usePageVideoFrames as Un}from"../page-video-frames.js";import{ScreenDocumentContext as Wn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as ct,hidableText as ut}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Oe,LINK_FIELD_MARKER as dt,MEDIA_FIELD_MARKER as Ie,SCAFFOLD_FIELD_MARKER as pt,TEXT_FIELD_MARKER as N,foldMetaOf as Ee,textFieldIdentifier as Kn}from"efficient-easel/draw";import Xn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as ft}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as $n,CARD_IMAGE_RADIUS_ROW as ht,CARD_IMAGE_RADIUS_STEP as jn,CORNER_RADIUS_MAX as Re,CORNER_RADIUS_MIN as k}from"../../../format/lib/content/card-image-shape.js";import{SECTION_CSS_KEY as Vn}from"../../../format/lib/content/section-css.js";import{IMAGE_CORNER_STEP as Yn,IMAGE_CORNERS_LABEL as zn,IMAGE_CORNERS_ROW as qn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Jn,GRID_MAX_ROW_SPAN as mt,GRID_MAX_TILE_AT as Zn,GRID_MOBILE_MAX_COLUMNS as Qn,GRID_TILE_AT_KEY as eo}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as to,GALLERY_LAYOUTS as Te,GALLERY_LAYOUT_KEYS as no,GALLERY_PHONE_LAYOUTS as oo,galleryChoices as gt,galleryLayoutRatio as ro,galleryPictureCells as io}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as so}from"./shell-glyph.js";import{anchorSiblingsOf as lo,placementPoints as ao}from"../../../format/lib/hero-group-placement.js";import co from"../../components/AnchorField.js";import uo from"../../components/SourceStatus.js";import{AdjustIcon as po,EyeIcon as fo,AnimationIcon as ho,BackgroundIcon as bt,BorderAllIcon as mo,BlockSectionIcon as go,ColumnWidthsIcon as se,ColumnsIcon as wt,CornerIcon as St,DirectionDownIcon as bo,DirectionLeftIcon as wo,DirectionRightIcon as So,DirectionUpIcon as _o,EditIcon as Co,GapIcon as yo,GridIcon as _t,GroundIcon as Ne,HashIcon as Ct,HeightIcon as le,ImageIcon as xo,ListIcon as Oo,LocationIcon as yt,PaddingBottomIcon as xt,PaddingLeftIcon as Ot,PaddingRightIcon as It,PaddingTopIcon as Pe,PageIcon as Io,StickyIcon as Et,SearchIcon as Eo,SquareIcon as Ro,TypeIcon as To,WidthIcon as No}from"efficient-easel/icons";import{FieldGlyph as Rt}from"../../components/FieldGlyph.js";import{resolvePageBackground as Po}from"../../../format/lib/content/page-background.js";import{BOX_FILL_FADE_PROP as Ao,BOX_FILL_FADES as Lo,BOX_SWATCH_PROP as ko,boxFillFadeOf as Tt,boxFillOf as Fo,boxFillSlot as Ae,boxPaintOf as vo}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as Nt,CORNER_SIDE_POINTS as Do,SECTION_CORNERS_ROW as Pt,hasOwnSectionCorners as Bo,normalizeCornerSides as At}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as Lt}from"../../../format/lib/content/card-corners.js";import{enclosingPath as Ho,enclosingSection as Go}from"./enclosing-section.js";import{SettingsDefaultReset as O,SettingsDrill as Mo,SettingsField as _,SettingsGroup as Uo,SettingsSegmented as Wo,SettingsBorder as Ko,SettingsSidesEach as Xo,SettingsSwitch as Le,borderSides as $o,borderStartEach as jo}from"efficient-easel/panel";import{ListField as Vo}from"efficient-easel/fields";import{CodeIcon as Yo}from"efficient-shell/icons/efficient";import{DisplayChips as zo}from"efficient-shell/ui";import{desktopDisplayChanged as qo,partShownOnDesktop as Jo,partShownOnPhone as Zo,phoneDisplayChanged as Qo,withDesktopPart as er,withPhonePart as tr}from"../../../format/lib/content/part-display.js";import{ColorSwatch as nr,CornersInput as or,DatePicker as rr,DateTimePicker as ir,FOCAL_DEFAULT as sr,IconPicker as kt,COLUMN_COUNT_MAX as Ft,COLUMN_SHARE_MIN as lr,COLUMN_SHARES_EQUAL as ar,resolveColumnShares as vt,WidthsBar as cr,useShellStrings as ur,IconButton as Dt,InputNumber as Bt,Slider as dr,Textarea as pr,Tooltip as ke}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as fr}from"./geocode-resolve.js";import{ColourRow as ae,InheritedColourRow as Ht}from"./ColourControl.js";import{fillThemeColors as hr,slotFill as ce}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as Fe}from"../../../format/lib/document/part-inks.js";import{keptByRow as ve}from"efficient-easel/screen/lib/document/style-fields";import Gt from"./MarkupToolbar.js";import{deviceField as y}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as mr,NoControlMark as gr,noControlField as Mt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as br}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as wr,PANEL_ONLY_FIELD as Sr}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as _r,resolvePhoneValue as De}from"../../../format/lib/document/phone-override.js";import{phoneKey as B,tabletKey as Be,viewKeyAt as He}from"efficient-easel/draw";import{viewKey as I}from"../../../format/lib/animation/views.js";import{viewRows as M}from"../animation/view-rows.js";import{SuppressibleText as Cr}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as yr,CARD_OUTLINE_OPTIONS as xr,DEFAULT_CARD_INDEX_FORMAT as Or,DEFAULT_CARD_OUTLINE as Ir}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Er,DEFAULT_COVER_INDEX as Rr}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Tr}from"efficient-easel/draw";import Nr from"../../components/MediaUploadField.js";import Pr from"../../components/MultiSelectField.js";import Ar from"../../components/SectionThemePicker.js";import Lr from"../../components/SearchSelectField.js";import kr from"../../components/StorefrontLinkField.js";import{UiIcon as Ut}from"efficient-easel/draw/client";import{SECTION_PADDING as P}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Fr}from"../../../render/lib/content/button-look.js";import{usePreviewParts as vr}from"efficient-easel/draw/client";import{encodePartId as Dr}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as Br,useEaselStrings as Hr}from"efficient-easel/strings";import{hasPhoneHeight as Gr,hasTabletHeight as Ge,resolveSectionMinHeight as Mr,resolveTabletHeight as Ur}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as Wr,SECTION_PIN_ABOVE_HINT as Kr,SECTION_PIN_ABOVE_KEY as Xr,SECTION_PIN_ABOVE_LABEL as $r,SECTION_PIN_GROUP as jr,SECTION_PIN_LABEL as Wt,SECTION_PIN_SCREENS_KEY as Me,SECTION_PIN_SCREENS_LABEL as Kt,SECTION_PIN_STOP_DEFAULT as Vr,SECTION_PIN_STOP_HINT as Yr,SECTION_PIN_STOP_KEY as zr,SECTION_PIN_STOP_LABEL as qr,SECTION_PIN_STOP_OPTIONS as Jr,SECTION_STICK_DISTANCE as U,SECTION_STICK_DISTANCE_ROW as Ue,SOME_VIEW_PINS as Xt,hasPhoneStick as Zr,hasTabletStick as Qr,resolveSectionStick as ue,sectionPinStopOf as ei,sectionPinStopWrite as ti}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as ni}from"../../../format/lib/content/css-length.js";import{SECTION_HEIGHT_MODES as oi,SECTION_MIN_HEIGHT as ri,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as ii}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as si,resolveContainerDirection as $t}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as li,BOX_BLOCK_SPACING_POINTS as jt,BOX_PHONE_ROW_LABEL as Vt,BOX_COLUMNS_MAX as ai,BOX_COLUMNS_MIN as Yt,BOX_PHONE_ROW_MAX as ci,BOX_PHONE_ROW_MIN as We,BOX_SHARE_CHOICES as zt,BOX_SHARE_LABEL as z,boxShareChoiceOf as qt,boxShareWidthsOf as Ke,BOX_SHARE_PHONE_DEFAULT as ui,BOX_SHARE_PHONE_POINTS as di}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as W}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Jt,BORDER_SIDES as pi,SECTION_BORDER_ROW as Zt,borderBySide as Qt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as fi,normalizeTheme as en,normalizeThemeColors as hi,sectionBandTone as mi,surfaceTwoTone as gi}from"../../../format/lib/theme.js";import{CONTAINER_GAP as tn,CONTAINER_GAP_BUILT_IN as bi,CONTAINER_GAP_PHONE as Xe,GAP_FIELD_CONTAINER as $e,followsSitePhoneGap as wi,hasOwnContainerGap as Si,hasOwnPhoneGap as je,resolveContainerGap as nn,resolvePhoneContainerGap as on}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as _i,CARD_IMAGE_BG_OFF as Ci,CARD_IMAGE_BG_SWATCH_NAMES as yi,CARD_IMAGE_BG_SWATCHES as xi,isCardImageBackgroundInheriting as Oi,cardImageBackgroundChoice as Ii,THEME_CARD_IMAGE_BG as Ei}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Ri,SECTION_BG_NO_FILL as Ti,sectionBackgroundChoice as Ni,THEME_SECTION_BG as Ve,isSectionBackgroundEmpty as Pi,sectionBackgroundHex as rn}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Ai,nestedAccentValue as sn,resolveSectionAccent as de}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Li,TYPE_SIZE_INHERIT as ki,isTypeSizeInheriting as Fi}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as vi,WIDTH_CHOICE_LABEL as Di,WIDTH_INHERIT as Bi}from"../../../format/lib/content/section-width.js";import{useEaselSession as Hi}from"efficient-easel/screen/lib/session-context";import{backendOf as Gi}from"../website-session.js";import{BOX_GAP as Mi,describedAs as F,group as R,iconOf as K,sharedStyleKinds as ee}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as ln,onDesktopWords as X,phoneTwinFields as Ye,saidAlignmentGrid as Ui,useLengthUnit as Wi}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as Ki,PICTURE_PICKER_ROW as Xi,directionField as $i,gapField as ze,iconPickerRow as an,lengthUnitFields as pe,pickerCellIcon as ji,pickerNoneIcon as Vi,Segmented as fe,select as v,slider as H}from"./box-fields.js";import{VIEW_ABOVE as qe}from"efficient-easel/screen/lib/content/length-units";import{tierOfView as cn,viewOfTier as Yi}from"../../../format/lib/content/view-tier.js";import{ownEntry as zi}from"../../../format/lib/own-entry.js";import{LAYOUT_CELL as qi,galleryPhonePicture as un}from"./choice-pictures.js";function lc({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function $(e,t){return a("{value} from {from}",{value:e,from:t})}function Ji(){const{blockGap:e}=W();return e===null?a("this container's own spacing"):$(`${e}px`,a("Styles"))}function Zi({inherited:e,onReset:t,label:n}){return i(O,{words:x()?.panel,label:a(n),changed:!e,detail:Ji(),onReset:t})}function Qi(e){return ze({...Mi,builtIn:bi[e],resolve:(t,n)=>nn(e,t,n?.siteGap),action:(t,n)=>i(Zi,{inherited:!Si(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[$e]:e}})}function es(e){return ft(y("mobile",{[$e]:e,type:"custom",render:t=>i(os,{container:e,...t})}),dn)}function ts(e){return ft(y("tablet",{[$e]:e,type:"custom",render:t=>i(ns,{container:e,...t})}),dn)}const dn={not:{field:"gap",in:Array.from({length:-tn.min},(e,t)=>tn.min+t)}};function ac(e){return{gap:y("desktop",Qi(e)),[Be("gap")]:ts(e),[B("gap")]:es(e)}}function ns({container:e,...t}){const[n]=T("gap"),{siteGap:o}=t.field??{},r=Math.max(Xe.min,nn(e,n,o));return ze({...Xe,builtIn:r,resolve:s=>je(s)?s:r,action:(s,c)=>i(O,{words:x()?.panel,label:a("Gap"),changed:je(s),detail:X(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function os({container:e,...t}){const[n]=T("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},l=on(e,void 0,n,o,r);return ze({...Xe,builtIn:l,resolve:c=>on(e,c,n,o,r),action:(c,u)=>i(O,{words:x()?.panel,label:a("Gap"),changed:je(c),detail:$(`${l}px`,wi(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function cc(e){return $i({offered:si(e),fallback:$t(e,void 0),resolve:t=>$t(e,t)})}function uc(e,t){return ao(t?lo(e,t):[],t)}function rs({inherited:e,onReset:t,label:n}){return i(O,{words:x()?.panel,label:a(n),changed:!e,detail:$(a("Full"),a("the page")),onReset:t})}function j({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:l,hideable:s=!0,markup:c=!0}){const{text:u,hidden:d}=ct(e),h=J(null),p=J(null),f=C=>t(s?{text:C,hidden:d}:C),m=()=>t({text:u,hidden:!d}),g=s&&d,b=lt(),S=r?cs(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(To,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:S,action:s?i(ke,{content:w,children:i(Dt,{"aria-pressed":d,"aria-label":w,onClick:m,children:d?i(Ut,{name:"eye-off",size:14}):i(Ut,{name:"eye",size:14})})}):void 0,children:A("div",{className:"sf-copybox",children:[c&&i(Gt,{target:l?p:h,value:u,onChange:f}),l?i("textarea",{id:b,ref:p,value:u,placeholder:o===void 0?void 0:a(o),onChange:C=>f(C.target.value)}):i("input",{id:b,ref:h,type:"text",value:u,placeholder:o===void 0?void 0:a(o),onChange:C=>f(C.target.value)})]})})}function dc(e,t){return{...e,[pt]:t}}function pc(e){const t=e[N];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[N]:{...t,offPage:!0}}}function fc(e){return!e||typeof e!="object"?!1:e[N]?.offPage===!0}function hc(e){if(!e[N])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Sr]:!0}}function mc(e){return wr(e)}function gc(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 Nu,SCALAR_TEXT_CONTROLS as Pu}from"efficient-easel/draw";function bc(e,t){if(!e[N])throw new Error("inOwnBox: the field holds no authored text");const{[mr]:o,...r}=e;return{...r,[br]:!0,render:t}}const is=new Set(Tr),he={type:"radio",options:[{value:!0},{value:!1}]},pn={text:{type:"object",objectFields:{text:{type:"text"},hidden:he}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:he}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},V=(e,t)=>{const n=F({...t,[N]:e},{...pn[e.control],label:e.label});if(!is.has(e.control))return n;const o=t.render;return{...Mt(n,"authored-copy"),render:r=>i(Cr,{name:r.name,children:o(r)})}},wc="Everything else on this block comes from the linked post. Unlink it to edit by hand.",ss={field:"source.slug",set:!0},Sc={not:ss},ls="Select a word, then press the highlighter.",as=new Set([ls]),cs=e=>as.has(e);function _c(e,t,n){return V({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Cc(e,t,n){return V({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function yc(e,t,n){return V({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function xc(e,t,n){return V({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Oc(e){return{type:"custom",[dt]:{label:e},...F({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(kr,{value:ut(t),onChange:n,label:e})}}function Ic(e,t,n){return V({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const Ec={Design:po,Animation:ho};function Rc(e,t){return{type:"custom",render:()=>i(us,{text:e,values:t})}}function us({text:e,values:t}){return i("p",{className:"sf-note",children:a(e,t)})}function Tc(e){return Ee(e)!==null&&e?.tabs!==void 0}const fn=new Map;function Nc(e,t){const n=`${e}\0${t?t.join(""):""}`,o=fn.get(n)??{type:"custom",tabs:t,[Oe]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(L,{})};return fn.set(n,o),o}const hn=new Map;function Pc(e){const t=hn.get(e)??{type:"custom",[Oe]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(L,{})};return hn.set(e,t),t}function ds(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Ac(e,t){return ds(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(L,{})}}function Lc(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 kc({title:e,children:t}){const[n,o]=Z(()=>!Je.has(e));return i(Uo,{title:e,open:n,onToggle:r=>{o(r),r?Je.delete(e):Je.add(e)},children:t})}const Je=new Set;function ps({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),l=r?o?.[r]:void 0,s=l?a(l):t;return A("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?a(o[c]):c;return i(ke,{content:u,children:i(nr,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:s})]})}function Fc(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(fs,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function fs({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const l=typeof o=="string"?o:void 0,{colors:s,n:c}=nt(),u={background:s.background,surface:s.surface,surface2:gi(s),band:mi(s)},d=n?Ve:t,h=Pi(l,t,d),p=rn(void 0,d,u),f=n?Ri:void 0,m=d===Ve?a("the theme's section background"):a("Theme {n} background",{n:c}),g=hs(l,t,s,c,u,r),b=$(p.toUpperCase(),m),S=Fe(l),w=S?ce(S,s,c):null;return w?i(ae,{label:a(e),icon:i(bt,{}),value:w.hex,caption:w.words,onChange:r,changed:!0,onReset:()=>r(f),resetTo:b,choices:g}):i(Ht,{label:a(e),icon:i(bt,{}),value:h?"":rn(l,t,u),inherited:p,resetTo:b,onChange:r,onReset:()=>r(f),choices:g})}function hs(e,t,n,o,r,l){const s=Ni(e,t);return[{label:a("No fill"),color:"",selected:s==="none",onPick:()=>l(Ti)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:s==="band",onPick:()=>l(Ve)},...tt(Fe(e)??"",n,o,l)]}function ms(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,l=Oi(r,t);return i(_,{label:a(e),icon:i(Ne,{}),changed:!l,action:i(O,{words:x()?.panel,label:a(e),changed:!l,detail:a("the theme's image stage"),onReset:()=>o(_i)}),children:ps({swatches:xi,current:l?Ei:Ii(r,t),onPick:o,names:yi})})}}}function vc(e=n=>n,t){return ee({_gSectionTheme:R(Ai),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(Ar,{value:e(n),onChange:o,followLabel:t})}})}function me(e){const t=E(),n=cn(e?.view),o=s=>He(e.valueKey,s),r=e.numbersIn??(s=>Y(t[o(s)])!==void 0),l=e.followsView??Ps(n,r);return Wi({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:Ki,label:a(e.label),grid:e.grid,hasOwn:r(n),view:{tier:n,numbersIn:r,followsView:l},convertTo:e.convertTo??(s=>{const c=Y(t[o(n)]);return c===void 0?{}:{[o(n)]:s(c)}})})}function q({min:e,max:t,step:n,value:o,onChange:r,suffix:l="",readout:s=!0,notch:c,ariaLabel:u,disabled:d=!1,placeholder:h,placeholderWord:p,onClear:f,units:m,inputMax:g}){const b=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:b?"sf-slider has-notch":"sf-slider",style:b?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(dr,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...p?{emptyLabel:a(p)}:{},suffix:l||void 0,...m?{units:m}:{},...g!==void 0?{inputMax:g}:{},showInput:s,label:u===void 0?void 0:a(u),disabled:d,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:S=>{S===null?f?.():S!==o&&r(S)}})})}function gs(e,t){const{min:n,max:o,step:r=1,unsetLabel:l,hint:s,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?K(d):void 0,value:g?u||l===void 0?void 0:a(l):`${m}${h}`,changed:!g,action:u?xe(u,{changed:!g,onReset:()=>f(null)}):i(O,{words:x()?.panel,label:a(e),changed:!g,onReset:()=>f(null)}),hint:typeof s=="string"?a(s):s,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",bs={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,l=r!==null;return i(_,{label:a(te),icon:i(St,{}),changed:l,action:xe(e.mark,{changed:l,onReset:()=>o(null)}),hint:e.hint,children:i(ws,{tier:e,px:r,name:t.name,onRadius:o})})}}}function T(e){const t=G();return[t?.values?.[e],n=>t?.onChange(e,n)]}function mn(){return Mt({type:"custom",render:()=>i(gr,{})},"always")}function ge(){const e=G();return t=>e?.onChangeMany(t)}function ws({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[l,s]=T(e.sidesKey),c=ge(),u=me({row:e.row??bs,label:te,grid:{min:k,max:Re,step:e.step??1},valueKey:n??"",view:"desktop"}),d=At(l)??[...Nt];return i(or,{label:a(te),value:d,corners:Do,onChange:h=>{const p=At(h)??[];s(p.length===Nt.length?null:p)},radius:t,onRadiusChange:u&&n?h=>c({[n]:h,...u.unitPatch(h===null)}):o,radiusMin:u?.grid.min??k,radiusMax:u?.grid.max??Re,radiusStep:u?.grid.step??e.step??1,radiusPlaceholder:u&&u.unit!=="px"?"–":String(r),...u?{radiusUnit:u.unit,units:u.units}:{}})}function gn(e,t){return pe(e,t)}function bn(){return mn()}function Ss({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=W(),r=typeof o=="number"?`${o}px`:a("not set");return i(O,{words:x()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):$(r,a("Styles")),onReset:n})}function _s(){const{cornerRadiusPx:e}=W();return typeof e=="number"?e:k}function Cs(){return Ze({sidesKey:"sectionCornerSides",row:Pt,useFollowed:_s,mark:i(Ss,{label:te}),hint:ys})}const ys="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function Dc(){return ee({_gShape:R("Shape"),sectionCorners:Cs(),...gn(Pt,"sectionCorners"),sectionCornerSides:bn(),...M("sectionBorder",Ns),...pe(Zt,"sectionBorder",{tablet:!0,phone:!0})})}const xs=()=>({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 Os(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Is(){let e;try{const t=en(W().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||fi.line}function Es({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:l=!0,above:s={},length:c}){const u=e&&typeof e=="object"?e:{},[d,h]=Z(()=>r?jo(u,s):!1),p=xs(),f=m=>Os(r&&l?m:{width:m.width,color:m.color,...l?{style:m.style}:{}});return i(_,{label:a("Border"),icon:i(mo,{}),action:r?i(Xo,{each:d,label:a("Each side"),onChange:h}):void 0,children:i(Ko,{label:a("Border"),value:u,each:d,onChange:m=>t(f(m)),placeholder:n,presets:o,words:c?{...p,unit:c.unit}:p,styles:l,max:c?.grid.max??Jt,...c?{step:c.grid.step,units:c.units}:{}})})}function Rs({value:e,onChange:t,view:n}){const[o]=T("sectionBorder"),[r]=T(Be("sectionBorder")),l=Is(),s=f=>f&&typeof f=="object"?f:{},c=n==="phone"?{...Qt(s(o)),...Qt(s(r))}:n==="tablet"?s(o):{},u=E(),d=ge(),h=I("sectionBorder",n),p=me({row:Zt,label:"Border",grid:{min:0,max:Jt,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>Qe(u[He("sectionBorder",f)]),convertTo:f=>{const m=s(u[h]);return Qe(m)?{[h]:Ts(m,f)}:{}}});return i(Es,{value:e,length:p,onChange:p?f=>d({[h]:f,...p.unitPatch(!Qe(f))}):t,placeholder:{sides:$o(c),style:c.style??"solid",color:c.color||l},presets:[l],above:c})}const wn=["width",...pi];function Qe(e){if(!e||typeof e!="object")return!1;const t=e;return wn.some(n=>Y(t[n])!==void 0)}function Ts(e,t){const n={...e};for(const o of wn){const r=Y(n[o]);r!==void 0&&(n[o]=t(r))}return n}function Ns(e){return{type:"custom",render:({value:t,onChange:n})=>i(Rs,{value:t,onChange:n,view:e})}}function Ps(e,t){let n=qe[e];for(;n&&qe[n]!==null&&!t(n);)n=qe[n];return n??e}function Bc(e){return{type:"custom",render:()=>i(As,{partKey:e})}}function As({partKey:e}){const[t]=T("id"),[n]=T("_partStyles"),{textStyles:o}=W(),r=Hr();let l=null;try{l=vr().select}catch{l=null}const s=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(Mo,{name:a("Text"),preview:Fr(s,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??Br.copy.panel).cases}),onOpen:()=>{l&&typeof t=="string"&&l(Dr(t,e))}})}function Sn(e){const{cornerRadiusPx:t}=W(),n=typeof t=="number"?t:e;let o=null;try{const{appState:l,selectedItem:s}=re(u=>u),c=s?.props?.id?String(s.props.id):void 0;o=c?Go(l?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Bo(r)?r:n}function Ls({label:e,changed:t=!1,onReset:n=()=>{}}){const o=Sn(k);return i(O,{words:x()?.panel,label:a(e),changed:t,detail:$(`${o}px`,a("the section")),onReset:n})}function ks(){return i(L,{children:a("Follows the section's Corners until you set a number here.")})}function Fs(){return Ze({sidesKey:"cardCornerSides",row:Lt,useFollowed:()=>Sn(k),mark:i(Ls,{label:te}),hint:i(ks,{})})}function vs(){return{type:"custom",render:()=>i(Xn,{})}}function Hc(){return{_gShape:R("Shape"),cardCorners:Fs(),...gn(Lt,"cardCorners"),cardCornerSides:bn(),cardCornersApplyAll:vs()}}function Ds(){return F({type:"custom",[Xi]:!0,render:e=>i(Hs,{...e})},{type:"select",label:z,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 Bs(e,t){const n=qt(e);if(n!=="custom")return a(zt.find(r=>r.value===n)?.label??"");const o=vt(Ke(e,t),t);return o?[...o,100-o.reduce((r,l)=>r+l,0)].join(" / "):a("Custom")}function Hs(e){const{value:t,onChange:n}=e,[o]=T("content"),r=Array.isArray(o)?o.length:0,l="follows"in e,s=t!=null,c=s?t:l?e.follows:void 0,u=qt(c),d=r>=2&&r<=Ft,h=()=>[...ar[r]??[]],p=J(null),f=w=>{const C=p.current;C&&JSON.stringify(w)===JSON.stringify(C.shares)?n(C.value):w&&n(w)},m=w=>{w===u||w==="custom"&&!d||n(w==="custom"?h():w)},g=a("The width bar works for 2 to {count} blocks.",{count:Ft}),b=s&&(l||t!=="content"),S=ur().widths.hint(r,lr);return i(_,{label:a(z),icon:i(se,{}),changed:b,hint:u!=="custom"?void 0:d?S:g,action:i(O,{words:x()?.panel,label:a(z),changed:b,disabled:e.readOnly===!0,detail:l?X(w=>a(w),Bs(e.follows,r),e.followsView):a("Fit content"),onReset:()=>n(void 0)}),children:A("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(kt,{label:a(z),value:u,options:zt.map(w=>({value:w.value,label:w.value==="custom"&&!d?g:a(w.label),icon:ji(i("span",{className:"sf-gallery-pic sf-share-pic",children:_n(w.weights).map((C,D)=>i("i",{style:{gridColumn:`span ${C}`}},D))}),a(w.label),w.value==="custom"&&!d?g:a(w.label))})),onChange:m,columns:3,cell:Cn,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&d?i("div",{onFocus:()=>{p.current={value:t,shares:vt(Ke(c,r),r)}},onBlur:()=>{p.current=null},children:i(cr,{label:a(z),count:r,value:Ke(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function _n(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 Gc(){return v(li,i(yo,{}),jt,jt[0].value)}function Mc(){return y("mobile",an(z,i(se,{}),di.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:_n(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),ui,{columns:2,cell:Cn}))}const Cn={width:"5.75rem",height:"3.25rem",words:!0};function Uc(){return Ye("share",Ds(),ln)[Be("share")]}function Gs(){return y("mobile",H(Vt,i(wt,{}),We,ci,1,We,"",{clear:{phoneFollows:!1,hint:We}}))}const yn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Wc(){const e=H(Vt,i(wt,{}),Yt,ai,1,Yt,"",{clear:{emptyLabel:"Auto"}}),t=Ye("columns",e,{...yn,tablet:ln.tablet}),n=Ye("columns",e,yn,{phoneRow:Gs()});return{...t,phoneRow:n.phoneRow}}function Kc(e,t,n,o,r,l,s){return{type:"custom",render:({value:c,onChange:u,name:d})=>i(Ms,{label:e,min:t,max:n,step:o,fallback:r,role:l,value:c,onChange:u,name:d??"",length:s})}}function Ms({label:e,min:t,max:n,step:o,fallback:r,role:l,value:s,onChange:c,name:u,length:d}){const h=E(),p=ge(),f=cn(d?.view),m=me({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(Rt,{noun:l}),action:i(O,{words:x()?.panel,label:a(e),changed:!Fi(s),detail:a("the Text style in Styles"),onReset:()=>g(ki),defaultAction:{onPress:()=>g(Li),title:a("Keep this section's own built-in size"),icon:i(go,{})}}),children:q({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof s=="number"?s:r,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:g})})}function be(e,t,n){return[{label:"Auto",value:""},...Array.from({length:e},(o,r)=>({label:r===0?`1 ${t}`:`${r+1} ${n}`,value:String(r+1)}))]}function Xc(){return{_gCellWidth:R("Cell size"),gridSpan:y("desktop",v("Positions",i(se,{}),be(Jn,"position","positions"),"")),gridRowSpan:y("desktop",v("Rows tall",i(le,{}),be(mt,"row","rows"),"")),[eo]:H("At card",i(Ct,{}),1,Zn,1,1,""),[B("gridSpan")]:y("mobile",v("Positions",i(se,{}),[{label:"Full row",value:""},...be(Qn,"position","positions").slice(1)],"")),[B("gridRowSpan")]:y("mobile",v("Rows tall",i(le,{}),be(mt,"row","rows"),""))}}function E(){let e=null,t=null;try{e=st(Us),t=re(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Us=kn(null);function Ws({min:e,max:t,step:n,px:o,label:r,onChange:l,desktopKey:s,fallback:c}){const u=E()[s],d=De(void 0,u,c);return i(L,{children:q({min:e,max:t,step:n,value:De(o,u,c),readout:!1,ariaLabel:r,notch:d,onChange:l})})}function Ks({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:l=()=>{}}){const s=E()[t],c=De(void 0,s,n);return i(O,{words:x()?.panel,label:a(e),changed:r,detail:X(u=>a(u),`${c}${o}`),onReset:l})}function Xs(e){return gs(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Ks,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Ws,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const $s={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},js={Top:Pe,Bottom:xt,Left:Ot,Right:It},Vs=e=>{const t=js[e];return i(t,{})};function $c(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>$s[S],l=S=>H(r("Top"),i(Pe,{}),P.min,P.max,P.step,S,"px"),s=(S,w,C,D=P)=>y("mobile",Xs({label:r(S),icon:Vs(S),desktopKey:w,min:D.min,max:D.max,step:D.step,fallback:C})),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?y("desktop",S):S;return ee({...o?{_gSpacing:R("Padding")}:{},[t]:b(l(c)),...g?{[B(t)]:s("Top",t,c)}:{},...e.only==="top"?{}:{[n]:b(H(r("Bottom"),i(xt,{}),P.min,P.max,P.step,u,"px")),...g?{[B(n)]:s("Bottom",n,u)}:{}},...e.sides?{[d]:b(H(r("Left"),i(Ot,{}),p.min,p.max,p.step,f,"px")),...g?{[B(d)]:s("Left",d,m,p)}:{},[h]:b(H(r("Right"),i(It,{}),p.min,p.max,p.step,f,"px")),...g?{[B(h)]:s("Right",h,m,p)}:{}}:{}})}function jc(e,t){const n=Object.fromEntries(Object.entries(t).map(([l,s])=>[l,l in e&&Ee(s)?e[l]:s])),o={};let r=!1;for(const[l,s]of Object.entries(e)){if(l in t){r||Object.assign(o,n),r=!0;continue}o[l]=s}return r||Object.assign(o,n),o}const we="Width";function Vc(e,t=vi,n=!0){const o=t.map(r=>({label:Di[r],value:r}));return ee({...n?{_gWidth:R(we)}:{},widthMode:{type:"custom",render:({onChange:r,field:l})=>i(_,{label:a(we),icon:i(No,{}),action:n?i(rs,{inherited:l?.inherited??!1,onReset:()=>r(Bi),label:we}):void 0,children:fe({options:o,value:l?.currentValue||e,onChange:r,ariaLabel:we})})}})}function Yc({fill:e=!1}={}){const t=(r,l)=>({type:"custom",render:({value:s,onChange:c})=>i(Ys,{value:s,onChange:c,view:r,badge:l,fill:e})}),n=()=>ve("sectionHeightMode"),o=()=>ve("sectionHeightMode");return ee({_gHeight:R(Q),...M("sectionHeightMode",r=>r==="desktop"?t(r):t(r,l=>i(Zs,{view:r,onClear:()=>l(void 0)}))),...M("sectionHeightValue",n),...M("sectionHeightUnit",o)})}function Ys({value:e,onChange:t,view:n,badge:o,fill:r=!1}){const l=E(),{mode:s,number:c,unit:u}=zs(n,l,e);return i(_,{label:Q,icon:K(i(le,{})),action:o?o(t):void 0,children:A("div",{className:"es-width-stack",children:[fe({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...r?[{label:"Fill",value:"fill"}]:[]],value:s,onChange:t,ariaLabel:Q}),c?i(Js,{view:n,mode:s,menu:u}):null]})})}function xn(e,t){return e==="phone"&&Ge(t)?Ur(t):Mr(t)}function Se(e,t){return e==="desktop"||(e==="tablet"?Ge(t):Gr(t))?null:xn(e,t)}function zs(e,t,n){const r=(l=>oi.includes(l))(n)?n:Se(e,t)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function qs(e,t,n,o){const r=Se(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 On(e,t,n){const o=G(),r=Se(e,E());return!o||!r?{followed:null,write:n}:{followed:r,write:s=>o.onChangeMany(c=>{const u=qs(e,c,t,s);return u===null?{[I(t,e)]:s}:Object.keys(u).length?u:null})}}function Js({view:e,mode:t,menu:n}){const o=G(),r=E(),l=I("sectionHeightValue",e),s=I("sectionHeightUnit",e),c=S=>w=>o?.onChangeMany(()=>({[S]:w})),{followed:u,write:d}=On(e,"sectionHeightValue",c(l)),{write:h}=On(e,"sectionHeightUnit",c(s)),p=t==="screen"?"%":r[s],f=(u?u.unit:p)==="%"?"%":"px",m=f==="%"?ii:ri,g=r[l],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 Zs({view:e,onClear:t}){const n=E(),o=Se(e,n)===null,r=e==="phone"&&Ge(n),l=xn(e,n),s=X(c=>a(c),l.mode==="auto"?a("Auto"):`${l.value}${l.unit}`,r?"tablet":"desktop");return i(O,{words:x()?.panel,label:a(Q),changed:o,detail:s,onReset:t})}function zc(e={}){const t=e.intro===!0,n=l=>({type:"custom",render:({value:s,onChange:c,id:u,name:d})=>i(il,{value:s,onChange:c,labelId:`${u??d??"stickTop"}-label`,view:l,intro:t})}),o=l=>({type:"custom",render:({value:s,onChange:c})=>i(nl,{value:s,onChange:c,view:l,intro:t})}),r=l=>({type:"custom",render:({value:s,onChange:c})=>i(ol,{value:s,onChange:c,view:l,intro:t})});return{_gStick:R(jr,{dot:t?tl:Xt}),...M("stickTop",n),...M("stickTopDistance",o),...pe(Ue,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?M(Me,r):{},...t?{}:{[zr]:Qs()},...t||e.above===!1?{}:{[Xr]:el()}}}function Qs(){const e=v(qr,i(Pe,{}),Jr,Vr);return y("desktop",{...e,render:t=>{const n=e.render({...t,value:ei(t.value),onChange:o=>t.onChange(ti(o))});return xe(n,{hint:a(Yr)})}})}function el(){const e=Rn($r,!1,i(Et,{}),Kr);return y("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const tl={any:[Xt,Wr]};function In(e,t,n,o,r){const l=G(),s=E(),c=e==="desktop"||ne(e,s)?null:et(e,ue(s,{intro:o}));return{followed:c,write:(c||r)&&l?d=>l.onChangeMany(h=>{const p=rl(e,h,d,t,o),f=p===null?{[I(t,e)]:d}:p;return Object.keys(f).length?{...f,...r?.(d)??{}}:null}):n}}function nl({value:e,onChange:t,view:n,intro:o}){const r=E(),l=ue(r,{intro:o}),s=h=>{const p=Yi(h);return p==="desktop"||ne(p,r)},c=me({row:Ue,label:"Distance from top",grid:{min:U.min,max:U.max,step:U.step},valueKey:"stickTopDistance",view:n,numbersIn:h=>s(h)&&Y(r[He("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&l.ownTablet?"tablet":"desktop"}),{followed:u,write:d}=In(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??U.min,max:c?.grid.max??U.max,step:c?.grid.step??U.step,value:u?null:typeof e=="number"?e:U.fallback,...u?{placeholder:u.distance}:{},...c?{suffix:c.unit,units:c.units}:{suffix:"px"},ariaLabel:a("Distance from top"),onChange:d})})}function ol({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:l}=In(n,Me,t,o);return i(_,{label:a(Kt),icon:K(i(le,{})),children:q({min:ie.min,max:ie.max,step:ie.step,value:r?null:Y(e)??ie.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Kt),onChange:l})})}function ne(e,t){return e==="tablet"?Qr(t):Zr(t)}function et(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 rl(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ne(e,t))return null;if(n===void 0)return{};const l=et(e,ue(t,{intro:r})),s=e==="phone"&&ne("tablet",t)?h=>I(h,"tablet"):h=>h,c=(h,p)=>t[s(h)]==null?{}:{[I(h,e)]:p},u=Ue.unitKey,d=t[s(u)]==null?{}:{[I(u,e)]:l.unit};return{[I("stickTop",e)]:!0,...c("stickTopDistance",l.distance),...d,...c(Me,l.screens),[I(o,e)]:n}}function il({value:e,onChange:t,labelId:n,view:o,intro:r}){const l=E(),s=ue(l,{intro:r}),c=o==="phone"?s.phone:o==="tablet"?s.tablet:r?s.desktop:e===!0,u=o==="phone"&&s.ownTablet,d=o==="desktop"?null:et(o,s),h=d?.on?ni(d.distance,d.unit):a("Off");return i(_,{label:a(Wt),labelId:n,icon:K(i(Et,{})),action:A(L,{children:[o!=="desktop"?i(O,{words:x()?.panel,label:a(Wt),changed:ne(o,l),detail:X(p=>a(p),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(Le,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const En="e.g. about";function qc(){return{_gAnchor:R("Anchor"),anchor:V({control:"plainText",label:"Name",placeholder:En},{type:"custom",render:({value:e,onChange:t})=>i(co,{value:e,onChange:t,nameBox:(n,o)=>i(j,{value:n,onChange:o,label:"Name",placeholder:En,hideable:!1,markup:!1})})})}}function Jc(){return{_gAdvanced:R("Advanced"),[Vn]:{type:"custom",render:({value:e,onChange:t})=>i(_,{label:a("Custom CSS"),icon:K(i(Yo,{})),children:i(pr,{"aria-label":a("Custom CSS"),spellCheck:!1,autoGrow:!0,className:"font-mono",value:typeof e=="string"?e:"",onChange:n=>t(n.target.value)})})}}}function Zc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:s})=>{const c=`${l??s??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(ir,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:d=>r(d?d.toISOString():"")})})}}}function Qc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:s})=>{const c=`${l??s??e}-date`;return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(rr,{id:c,value:Dn(typeof o=="string"?o:null),onChange:u=>r(u?vn(u):"")})})}}}function Rn(e,t,n,o){return{type:"custom",...F({},{...he,label:e}),render:r=>{const{value:l,onChange:s,id:c,name:u}=r,d="follows"in r,h=r,p=typeof l=="boolean",f=typeof h.follows=="boolean"?h.follows:t,m=p?l:d?f:t,g=`${c??u??e}-label`,b=h.readOnly===!0,S=i(Le,{checked:m,onChange:s,disabled:b,ariaLabelledBy:g});return i(_,{label:a(e),labelId:g,icon:n,hint:o===void 0?void 0:a(o),action:d?A(L,{children:[i(O,{words:x()?.panel,label:a(e),changed:p,detail:h.followsNoView?a(f?"On":"Off"):X(w=>a(w),a(f?"On":"Off"),h.followsView),disabled:b,onReset:()=>s(void 0)}),S]}):S})}}}function eu(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(sl,{label:"Background",icon:i(Io,{}),id:r,value:e,shown:Po(e),onChange:t})}}}function tu(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(ae,{label:a(e),icon:n,value:o||t,onChange:r})}}function sl({label:e,icon:t,id:n,value:o,shown:r,onChange:l}){const{colors:s,n:c}=nt(),u=Fe(o),d=u?ce(u,s,c):null;return i(ae,{label:a(e),icon:t,id:n,value:d?d.hex:r,caption:d?.words,onChange:l,choices:tt(u??"",s,c,l)})}function nu(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(ll,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function tt(e,t,n,o){const r=Ae(e);return hr(t,n).map(l=>({label:l.label,color:l.value,selected:r===l.name,onPick:()=>o(l.name)}))}function ll({value:e,onChange:t,twin:n}){const{colors:o,n:r}=nt(),l=o.background,s=$(l.toUpperCase(),a("Theme {n} background",{n:r})),[c,u]=T(Ao),[d]=T(ko),h=typeof d=="string"&&d.trim()!=="",p=Tt(c),f=oe=>u(Tt(oe)||void 0),m=Ae(e),g=m?ce(m,o,r):null,b=tt(e,o,r,t),S=n?()=>t(void 0):()=>t("");let w=l,C=s;if(n){const oe=Ae(n.follows),Ce=Fo(n.follows),ye=oe?ce(oe,o,r):Ce?{hex:Ce,words:Ce.toUpperCase()}:null;w=ye?.hex??l,C=X(Pn=>a(Pn),ye?ye.words:s,n.view)}const D=!n&&(vo(e)||h)?i(al,{value:p,onChange:f}):null;return g?i(ae,{label:a("Fill"),icon:i(Ne,{}),value:g.hex,caption:g.words,onChange:t,changed:!0,onReset:S,resetTo:C,choices:b,children:D}):i(Ht,{label:a("Fill"),icon:i(Ne,{}),value:e,inherited:w,resetTo:C,onChange:t,onReset:S,choices:b,children:D})}function al({value:e,onChange:t}){return fe({options:Lo.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:a("Fill")})}function cl(e,t,n){if((e?.content??[]).some(s=>s?.props?.id===t))return de(n);const r=Ho(e,t);if(r.length===0)return null;const l=de(sn(n));if(l!==null)return l;for(let s=r.length-1;s>0;s-=1){const c=de(sn(r[s].sectionAccent));if(c!==null)return c}return de(r[0].sectionAccent)}function nt(){const e=en(W().theme),[t]=T("sectionAccent");let n=null;try{const{appState:r,selectedItem:l}=re(c=>c),s=l?.props?.id?String(l.props.id):void 0;n=s?cl(r?.data,s,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:hi(e.themes[o]),n:o+1}}function ou(){return mn()}const ru={top:i(_o,{}),right:i(So,{}),bottom:i(bo,{}),left:i(wo,{})};function iu(e,t,n,o,r,l,s){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=l?.[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):s?a(s):"",children:Ui(a,{label:e,value:m,onChange:f,points:h})})}}}function su(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:l})=>i(Pr,{label:e,options:(l.options??t).map(s=>({...s,label:a(s.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:a(n)}:{}})}}function lu(e,t,n,o){return{type:"custom",options:t,fallback:n,...F({},{type:"select",label:e}),render:({value:r,onChange:l,field:s})=>i(Lr,{label:e,options:(s.options??t).map(c=>({...c,label:a(c.label)})),fallback:s.fallback??n,value:r,onChange:l,placeholder:o===void 0?void 0:a(o)})}}function au(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const ul={image:"Image",video:"Video"},cu=Ln.map(e=>({label:ul[e],value:e}));function uu(e,t,n){const o=Object.keys(at).map(r=>({label:at[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(pl,{label:e,icon:t,options:o,onChange:r})}}function dl(e,t,n){const o=Bn(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=Gn(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 pl({label:e,icon:t,options:n,onChange:o}){const r=G(),l=r?.values??{},s=Hn(l),c=st(Wn),u=Un(c?.docId??null);let d=null;try{d=re(p=>p.appState.data)}catch{d=null}const h=Mn(r?.id,d,u);return i(_,{label:a(e),icon:K(t),hint:dl(l,h,c?.hasUnsavedEdits??!1),children:fe({options:n,value:s,onChange:o,ariaLabel:e})})}function du(e,t,n,o={}){const r={type:"custom",[Ie]:!0,render:({value:l,onChange:s,name:c})=>i(Nr,{value:l||"",onChange:s,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?y("each",r):r}function pu(e){return ot(e).map(t=>t.path)}function ot(e,t="",n=[]){const o=[];for(const[r,l]of Object.entries(e??{})){const s=t?`${t}.${r}`:r,c=l;if(c&&c[Ie]){o.push({path:s,field:c,along:n});continue}c?.arrayFields&&o.push(...ot(c.arrayFields,`${s}[]`,[...n,c])),c?.objectFields&&o.push(...ot(c.objectFields,s,[...n,c]))}return o}const fu={HeroSingle:[An.image],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function fl(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 hu({value:e,onChange:t,label:n}){const o=e||{},r=G(),l=r?r.values!==r.node.props:!0,s=!!o.pending&&l,c=!!o.pending&&!l,u=!!Gi(Hi()).geocode,d=lt(),h=(p,f)=>t({...o,[p]:f??void 0});return A(L,{children:[i(_,{label:a(n),icon:i(yt,{}),action:u?i(ke,{content:a("Find from the address (OpenStreetMap)"),children:i(Dt,{"aria-label":a("Find from the address"),"aria-busy":s||void 0,disabled:s,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(Eo,{})})}):void 0,children:u&&o.status?i(uo,{compact:!0,oneLine:!0,spaced:!1,status:s?"busy":o.ok&&!c?"found":"notfound",statusText:s?a("Finding…"):c?a(fr):a(o.status),hint:fl(o)}):null}),i(_,{label:a("Enter by hand"),labelId:d,icon:i(Co,{}),action:i(Le,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:d})}),o.manual&&i(_,{label:a("Latitude, longitude"),icon:i(yt,{}),children:A("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(Bt,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>h("lat",p),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(Bt,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>h("lng",p),min:-180,max:180,step:1e-4,placeholder:a("Longitude")})]})})]})}function hl(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function ml(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,l)=>l===t?{text:n}:r)}function mu(e,t){return e===null?null:t>e?e:null}function gl(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 gu={label:"Ticker items",icon:i(Oo,{})};function bu(e,t,n,o){return{type:"custom",[N]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...F({},{...pn.textList,label:e}),render:({value:r,onChange:l})=>i(bl,{label:e,icon:K(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:l,markup:o==="markup"})}}function bl({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:l=!1}){const s=J(null),[c,u]=Z(null),d=p=>p.map(f=>({text:f?.text??""})),h=p=>{const f=gl(n,p,c);f===null&&(s.current=null),u(f),r(d(p))};return i(Vo,{label:a(e),icon:t,noun:a("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:l?i(Gt,{target:s,value:hl(n,c),onChange:p=>r(ml(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:l&&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=>{s.current=g.currentTarget,u(f)}})})}function wu(e,t){const n=`${e.label} — row ${t+1}`;return V({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(j,{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 Su(e){return{_gCards:R("Cards"),coverIndex:v("Cover image",i(xo,{}),Er,String(Rr),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:ms("Image background",Ci),cardImage:Tn()}}function _u(){return{outline:v("Card outline",i(Ro,{}),xr,Ir),indexBadge:v("Card number",i(Ct,{}),yr,Or),showBadge:Rn("Product badge",!0,i(Rt,{noun:"tag"}))}}function Cu(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...he,label:_e.find(l=>l.id===r).label}),o=r=>F(ve(rt),n(r));return{_gShowOnCard:R("Show on a card"),[rt]:F({type:"custom",render:()=>i(wl,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(rt)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const rt="showCardPrice",_e=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function wl({rest:e}){const t=E(),n=ge(),o=s=>typeof t[s]=="boolean"?t[s]:void 0,r=s=>o(s)??e[s],l=_e.some(({id:s})=>o(s)!==void 0&&o(s)!==e[s]);return i(it,{parts:_e,changed:l,shown:r,onPress:(s,c)=>n({[s]:c}),onReset:()=>n(Object.fromEntries(_e.map(({id:s})=>[s,void 0])))})}function yu(e,t="display"){const n=B(t);return{[t]:y("desktop",{type:"custom",render:({value:o,onChange:r})=>i(it,{parts:e,changed:qo(o),shown:l=>Jo(o,l),onPress:(l,s)=>r(er(o,l,s)),onReset:()=>r(void 0)})}),[n]:y("mobile",{type:"custom",render:({value:o,onChange:r})=>i(Sl,{parts:e,desktopKey:t,value:o,onChange:r})})}}function it({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:l,disabledReason:s}){const c=a("Display");return i(_,{label:c,icon:i(fo,{}),changed:t,action:i(O,{words:x()?.panel,label:c,changed:t,detail:l,onReset:r}),children:i(zo,{label:c,items:e.map(u=>({id:u.id,label:a(u.label),shown:n(u.id),...s?{disabled:!0,disabledReason:a(s)}:{}})),onChange:o})})}function Sl({parts:e,desktopKey:t,value:n,onChange:o}){const r=E()[t];return i(it,{parts:e,changed:Qo(n),shown:l=>Zo(r,n,l),onPress:(l,s)=>o(tr(n,l,s)),onReset:()=>o(_r),detail:a("the same as Desktop")})}function Tn(e=$n){return H("Card image",i(St,{}),k,Re,jn,k,e,{clear:{hint:k},hint:"Rounds the picture. The card's own corner is in Styles."})}function _l(){return pe(ht,"cardImage")}function xu(){return{cardImage:Tn(ht),..._l()}}function Ou(){return Ze({sidesKey:"cornerSides",row:qn,step:Yn,useFollowed:()=>k,mark:i(Cl,{label:zn}),hint:a("Rounds the picture. Left alone it stays square.")})}function Cl({label:e,changed:t=!1,onReset:n=()=>{}}){return i(O,{words:x()?.panel,label:a(e),changed:t,onReset:n})}function Iu(){return{type:"custom",render:({value:e,onChange:t})=>i(Il,{value:typeof e=="string"?e:"",onChange:t})}}const Nn="own";function Eu(){const e=[{value:Nn,label:"Layout's own",picture:un(Array.from({length:8},()=>[3,1]))},...Object.entries(oo).map(([t,n])=>({value:t,label:n.label,picture:un([...n.phone,...n.phone])}))];return y("mobile",an("Layout",i(_t,{}),e,Nn,{columns:2,cell:qi}))}function yl({layout:e,width:t}){const n=ro(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:io(e).map(([r,l],s)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${l}`,aspectRatio:o}},s))})}const xl={width:"3.5rem",height:"2.5rem",words:!1},Ol=200;function Il({value:e,onChange:t}){const[n,o]=Z(null),[r,l]=Z(4),s=J(null);Fn(()=>{const m=s.current;if(!m||typeof ResizeObserver!="function")return;const g=()=>l(m.getBoundingClientRect().width>=Ol?4:3);g();const b=new ResizeObserver(g);return b.observe(m),()=>b.disconnect()},[]);const c=e?zi(Te,e):void 0,u=c?e:"",d=gt(n,u),h=gt(n,"").length,p=so("no-symbol"),f=[{value:"",label:a("Not chosen"),icon:Vi(p,a("Not chosen"))},...d.map(m=>({value:m,label:a(Te[m].label),icon:i(yl,{layout:Te[m],width:40})}))];return i(_,{label:a("Layout"),icon:i(_t,{}),value:c?a(c.label):void 0,children:i("div",{ref:s,style:{flex:"1 1 auto",minWidth:0},children:i(kt,{label:a("Layout"),value:u,options:f,onChange:t,columns:r,cell:xl,header:A("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(Wo,{options:[{id:"all",label:a("All")},...to.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:no.length})})]})})})})}export{ss as BOUND_TO_POST,wc as BOUND_TO_POST_NOTE,Ec as BUCKET_ICONS,fu as CUSTOM_FIELD_MEDIA,hu as CoordsField,dn as DESKTOP_GAP_NOT_OVERLAP,it as DisplayRow,ru as EDGE_ARROWS,sr as FOCAL_DEFAULT,Oe as FOLD_FIELD_MARKER,ls as HIGHLIGHT_HINT,j as HidableTextField,dt as LINK_FIELD_MARKER,lc as Label,Ie as MEDIA_FIELD_MARKER,cu as MEDIA_TYPE_OPTIONS,Sc as NOT_BOUND_TO_POST,kc as PanelBand,us as PanelNoteLine,Us as RowPropsContext,pt as SCAFFOLD_FIELD_MARKER,Pu as SCALAR_TEXT_CONTROLS,Zi as SiteGapDefaultReset,q as Slider,ps as Swatches,Nu as TEXT_CONTROL_KINDS,N as TEXT_FIELD_MARKER,gu as TICKER_ITEMS_ROW,bl as TextListField,sl as ThemeFillRow,we as WIDTH_LABEL,rs as WidthDefaultReset,gl as aimAfterListChange,qc as anchorFields,$ as backTo,Fc as backgroundField,Gc as boxBlockSpacingField,Wc as boxColumnsFields,nu as boxFillField,Gs as boxPhoneRowField,Ds as boxShareField,Mc as boxSharePhoneField,Uc as boxShareTabletField,cl as boxThemeIndexOf,Nc as bucketHeader,Bc as buttonWordsEntryField,Fs as cardCornersField,ms as cardImageBackgroundField,Tn as cardImageField,xu as cardImageFields,Su as cardMediaFields,Hc as cardShapeFields,Cu as cardShowFields,_u as cardStyleFields,Xc as cellWidthFields,tu as colorInput,cc as containerDirectionField,Qi as containerGapField,es as containerGapPhoneField,ac as containerGapRows,ts as containerGapTabletField,fl as coordsResultTip,xc as copyText,bn as cornerSidesField,Ze as cornersRowField,gn as cornersUnitFields,Jc as customCssFields,Qc as date,Zc as dateTime,Pc as designGroupHeader,yu as displayFields,iu as edgePad,tt as fillSlotChoices,mu as focusAfterRemove,ou as focusKeptField,Ac as foldMarker,Ee as foldMetaOf,ds as foldTitleOf,qs as followedHeightPatch,rl as followedStickPatch,Iu as galleryLayoutField,Eu as galleryLayoutPhoneField,Yc as heightFields,Se as heightFollowedBy,zs as heightLayersAt,uc as heroGroupPlacementPoints,ut as hidableText,cs as hintIsWhileTyping,Ou as imageCornersField,bc as inOwnBox,Tc as isBucketHeader,mn as keptBy,Oc as linkField,dl as loadingRowHint,uu as loadingShowsField,pu as mediaFieldPaths,ot as mediaFields,su as multiSelect,eu as pageBackgroundField,Rc as panelNote,Xs as phoneOverrideField,yc as plainText,Ic as plainTextarea,gs as pxField,Lc as quietMarker,ct as readHidable,hl as rowText,lu as searchSelect,hs as sectionBandChoices,Cs as sectionCornersField,Dc as sectionShapeFields,vc as sectionThemeFields,ml as setRowText,Kc as sizeField,au as sourceField,$c as spacingFields,zc as stickFields,jc as swapPadding,_c as text,Kn as textFieldIdentifier,fc as textFieldOffPage,mc as textFieldPanelOnly,bu as textList,wu as textListRowField,Cc as textarea,Rn as toggle,du as upload,me as useLengthRow,ge as useSelectedPatch,E as useSelectedProps,T as useSelectedSibling,Ji as useSiteGapDetail,Vc as widthField,gc as withIdentifier,pc as withOffPage,hc as withPanelOnly,dc as withScaffold};
1
+ "use client";import{jsx as i,jsxs as A,Fragment as L}from"react/jsx-runtime";import{HERO_FOCUS as An,HERO_MEDIA_TYPES as Ln}from"../../../format/lib/hero-media-layout.js";import{cloneElement as xe,createContext as kn,useContext as st,useEffect as Fn,useId as lt,useRef as J,useState as Z}from"react";import{useEasel as re,useSelectedHost as G}from"efficient-easel/easel";import{PIN_LENGTH as ie,toDateKey as vn,fromDateKey as Dn}from"efficient-shell/format";import{say as a,editorEaselWords as x}from"../../../format/lib/editor-words.js";import{finiteNumber as Y}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as at,firstFrameHint as Bn,loadingShowsOf as Hn,loadingStillHint as Gn}from"../../../format/lib/hero-video.js";import{pageFramesFor as Mn,usePageVideoFrames as Un}from"../page-video-frames.js";import{ScreenDocumentContext as Wn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as ct,hidableText as ut}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Oe,LINK_FIELD_MARKER as dt,MEDIA_FIELD_MARKER as Ie,SCAFFOLD_FIELD_MARKER as pt,TEXT_FIELD_MARKER as N,foldMetaOf as Ee,textFieldIdentifier as Kn}from"efficient-easel/draw";import Xn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as ft}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as $n,CARD_IMAGE_RADIUS_ROW as ht,CARD_IMAGE_RADIUS_STEP as jn,CORNER_RADIUS_MAX as Te,CORNER_RADIUS_MIN as k}from"../../../format/lib/content/card-image-shape.js";import{SECTION_CSS_KEY as Vn}from"../../../format/lib/content/section-css.js";import{IMAGE_CORNER_STEP as Yn,IMAGE_CORNERS_LABEL as zn,IMAGE_CORNERS_ROW as qn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Jn,GRID_MAX_ROW_SPAN as mt,GRID_MAX_TILE_AT as Zn,GRID_MOBILE_MAX_COLUMNS as Qn,GRID_TILE_AT_KEY as eo}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as to,GALLERY_LAYOUTS as Re,GALLERY_LAYOUT_KEYS as no,GALLERY_PHONE_LAYOUTS as oo,galleryChoices as gt,galleryLayoutRatio as ro,galleryPictureCells as io}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as so}from"./shell-glyph.js";import{anchorSiblingsOf as lo,placementPoints as ao}from"../../../format/lib/hero-group-placement.js";import co from"../../components/AnchorField.js";import uo from"../../components/SourceStatus.js";import{AdjustIcon as po,EyeIcon as fo,AnimationIcon as ho,BackgroundIcon as bt,BorderAllIcon as mo,BlockSectionIcon as go,ColumnWidthsIcon as se,ColumnsIcon as wt,CornerIcon as St,DirectionDownIcon as bo,DirectionLeftIcon as wo,DirectionRightIcon as So,DirectionUpIcon as _o,EditIcon as Co,GapIcon as yo,GridIcon as _t,GroundIcon as Ne,HashIcon as Ct,HeightIcon as le,ImageIcon as xo,ListIcon as Oo,LocationIcon as yt,PaddingBottomIcon as xt,PaddingLeftIcon as Ot,PaddingRightIcon as It,PaddingTopIcon as Pe,PageIcon as Io,StickyIcon as Et,SearchIcon as Eo,SquareIcon as To,TypeIcon as Ro,WidthIcon as No}from"efficient-easel/icons";import{FieldGlyph as Tt}from"../../components/FieldGlyph.js";import{resolvePageBackground as Po}from"../../../format/lib/content/page-background.js";import{BOX_FILL_FADE_PROP as Ao,BOX_FILL_FADES as Lo,BOX_SWATCH_PROP as ko,boxFillFadeOf as Rt,boxFillOf as Fo,boxFillSlot as Ae,boxPaintOf as vo}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as Nt,CORNER_SIDE_POINTS as Do,SECTION_CORNERS_ROW as Pt,hasOwnSectionCorners as Bo,normalizeCornerSides as At}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as Lt}from"../../../format/lib/content/card-corners.js";import{enclosingPath as Ho,enclosingSection as Go}from"./enclosing-section.js";import{SettingsDefaultReset as O,SettingsDrill as Mo,SettingsField as _,SettingsGroup as Uo,SettingsSegmented as Wo,SettingsBorder as Ko,SettingsSidesEach as Xo,SettingsSwitch as Le,borderSides as $o,borderStartEach as jo}from"efficient-easel/panel";import{ListField as Vo}from"efficient-easel/fields";import{CodeIcon as Yo}from"efficient-shell/icons/efficient";import{DisplayChips as zo}from"efficient-shell/ui";import{desktopDisplayChanged as qo,partShownOnDesktop as Jo,partShownOnPhone as Zo,phoneDisplayChanged as Qo,withDesktopPart as er,withPhonePart as tr}from"../../../format/lib/content/part-display.js";import{ColorSwatch as nr,CornersInput as or,DatePicker as rr,DateTimePicker as ir,FOCAL_DEFAULT as sr,IconPicker as kt,COLUMN_COUNT_MAX as Ft,COLUMN_SHARE_MIN as lr,COLUMN_SHARES_EQUAL as ar,resolveColumnShares as vt,WidthsBar as cr,useShellStrings as ur,IconButton as Dt,InputNumber as Bt,Slider as dr,Textarea as pr,Tooltip as ke}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as fr}from"./geocode-resolve.js";import{ColourRow as ae,InheritedColourRow as Ht}from"./ColourControl.js";import{fillThemeColors as hr,slotFill as ce}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as Fe}from"../../../format/lib/document/part-inks.js";import{keptByRow as ve}from"efficient-easel/screen/lib/document/style-fields";import Gt from"./MarkupToolbar.js";import{deviceField as y}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as mr,NoControlMark as gr,noControlField as Mt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as br}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as wr,PANEL_ONLY_FIELD as Sr}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as _r,resolvePhoneValue as De}from"../../../format/lib/document/phone-override.js";import{phoneKey as B,tabletKey as Be,viewKeyAt as He}from"efficient-easel/draw";import{viewKey as I}from"../../../format/lib/animation/views.js";import{viewRows as M}from"../animation/view-rows.js";import{SuppressibleText as Cr}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as yr,CARD_OUTLINE_OPTIONS as xr,DEFAULT_CARD_INDEX_FORMAT as Or,DEFAULT_CARD_OUTLINE as Ir}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Er,DEFAULT_COVER_INDEX as Tr}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Rr}from"efficient-easel/draw";import Nr from"../../components/MediaUploadField.js";import Pr from"../../components/MultiSelectField.js";import Ar from"../../components/SectionThemePicker.js";import Lr from"../../components/SearchSelectField.js";import kr from"../../components/StorefrontLinkField.js";import{UiIcon as Ut}from"efficient-easel/draw/client";import{SECTION_PADDING as P}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Fr}from"../../../render/lib/content/button-look.js";import{usePreviewParts as vr}from"efficient-easel/draw/client";import{encodePartId as Dr}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as Br,useEaselStrings as Hr}from"efficient-easel/strings";import{hasPhoneHeight as Gr,hasTabletHeight as Ge,resolveSectionMinHeight as Mr,resolveTabletHeight as Ur}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as Wr,SECTION_PIN_ABOVE_HINT as Kr,SECTION_PIN_ABOVE_KEY as Xr,SECTION_PIN_ABOVE_LABEL as $r,SECTION_PIN_GROUP as jr,SECTION_PIN_LABEL as Wt,SECTION_PIN_SCREENS_KEY as Me,SECTION_PIN_SCREENS_LABEL as Kt,SECTION_PIN_STOP_DEFAULT as Vr,SECTION_PIN_STOP_HINT as Yr,SECTION_PIN_STOP_KEY as zr,SECTION_PIN_STOP_LABEL as qr,SECTION_PIN_STOP_OPTIONS as Jr,SECTION_STICK_DISTANCE as U,SECTION_STICK_DISTANCE_ROW as Ue,SOME_VIEW_PINS as Xt,hasPhoneStick as Zr,hasTabletStick as Qr,resolveSectionStick as ue,sectionPinStopOf as ei,sectionPinStopWrite as ti}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as ni}from"../../../format/lib/content/css-length.js";import{SECTION_HEIGHT_MODES as oi,SECTION_MIN_HEIGHT as ri,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as ii,SECTION_HEIGHT_UNITS as si}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as li,resolveContainerDirection as $t}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as ai,BOX_BLOCK_SPACING_POINTS as jt,BOX_PHONE_ROW_LABEL as Vt,BOX_COLUMNS_MAX as ci,BOX_COLUMNS_MIN as Yt,BOX_PHONE_ROW_MAX as ui,BOX_PHONE_ROW_MIN as We,BOX_SHARE_CHOICES as zt,BOX_SHARE_LABEL as z,boxShareChoiceOf as qt,boxShareWidthsOf as Ke,BOX_SHARE_PHONE_DEFAULT as di,BOX_SHARE_PHONE_POINTS as pi}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as W}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Jt,BORDER_SIDES as fi,SECTION_BORDER_ROW as Zt,borderBySide as Qt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as hi,normalizeTheme as en,normalizeThemeColors as mi,sectionBandTone as gi,surfaceTwoTone as bi}from"../../../format/lib/theme.js";import{CONTAINER_GAP as tn,CONTAINER_GAP_BUILT_IN as wi,CONTAINER_GAP_PHONE as Xe,GAP_FIELD_CONTAINER as $e,followsSitePhoneGap as Si,hasOwnContainerGap as _i,hasOwnPhoneGap as je,resolveContainerGap as nn,resolvePhoneContainerGap as on}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as Ci,CARD_IMAGE_BG_OFF as yi,CARD_IMAGE_BG_SWATCH_NAMES as xi,CARD_IMAGE_BG_SWATCHES as Oi,isCardImageBackgroundInheriting as Ii,cardImageBackgroundChoice as Ei,THEME_CARD_IMAGE_BG as Ti}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Ri,SECTION_BG_NO_FILL as Ni,sectionBackgroundChoice as Pi,THEME_SECTION_BG as Ve,isSectionBackgroundEmpty as Ai,sectionBackgroundHex as rn}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Li,nestedAccentValue as sn,resolveSectionAccent as de}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as ki,TYPE_SIZE_INHERIT as Fi,isTypeSizeInheriting as vi}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Di,WIDTH_CHOICE_LABEL as Bi,WIDTH_INHERIT as Hi}from"../../../format/lib/content/section-width.js";import{useEaselSession as Gi}from"efficient-easel/screen/lib/session-context";import{backendOf as Mi}from"../website-session.js";import{BOX_GAP as Ui,describedAs as F,group as T,iconOf as K,sharedStyleKinds as ee}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as ln,onDesktopWords as X,phoneTwinFields as Ye,saidAlignmentGrid as Wi,useLengthUnit as Ki}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as Xi,PICTURE_PICKER_ROW as $i,directionField as ji,gapField as ze,iconPickerRow as an,lengthUnitFields as pe,pickerCellIcon as Vi,pickerNoneIcon as Yi,Segmented as fe,select as v,slider as H}from"./box-fields.js";import{VIEW_ABOVE as qe}from"efficient-easel/screen/lib/content/length-units";import{tierOfView as cn,viewOfTier as zi}from"../../../format/lib/content/view-tier.js";import{ownEntry as qi}from"../../../format/lib/own-entry.js";import{LAYOUT_CELL as Ji,galleryPhonePicture as un}from"./choice-pictures.js";import{parseOption as Zi}from"../../../format/lib/parse-option.js";function uc({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function $(e,t){return a("{value} from {from}",{value:e,from:t})}function Qi(){const{blockGap:e}=W();return e===null?a("this container's own spacing"):$(`${e}px`,a("Styles"))}function es({inherited:e,onReset:t,label:n}){return i(O,{words:x()?.panel,label:a(n),changed:!e,detail:Qi(),onReset:t})}function ts(e){return ze({...Ui,builtIn:wi[e],resolve:(t,n)=>nn(e,t,n?.siteGap),action:(t,n)=>i(es,{inherited:!_i(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[$e]:e}})}function ns(e){return ft(y("mobile",{[$e]:e,type:"custom",render:t=>i(is,{container:e,...t})}),dn)}function os(e){return ft(y("tablet",{[$e]:e,type:"custom",render:t=>i(rs,{container:e,...t})}),dn)}const dn={not:{field:"gap",in:Array.from({length:-tn.min},(e,t)=>tn.min+t)}};function dc(e){return{gap:y("desktop",ts(e)),[Be("gap")]:os(e),[B("gap")]:ns(e)}}function rs({container:e,...t}){const[n]=R("gap"),{siteGap:o}=t.field??{},r=Math.max(Xe.min,nn(e,n,o));return ze({...Xe,builtIn:r,resolve:s=>je(s)?s:r,action:(s,c)=>i(O,{words:x()?.panel,label:a("Gap"),changed:je(s),detail:X(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function is({container:e,...t}){const[n]=R("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},l=on(e,void 0,n,o,r);return ze({...Xe,builtIn:l,resolve:c=>on(e,c,n,o,r),action:(c,u)=>i(O,{words:x()?.panel,label:a("Gap"),changed:je(c),detail:$(`${l}px`,Si(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function pc(e){return ji({offered:li(e),fallback:$t(e,void 0),resolve:t=>$t(e,t)})}function fc(e,t){return ao(t?lo(e,t):[],t)}function ss({inherited:e,onReset:t,label:n}){return i(O,{words:x()?.panel,label:a(n),changed:!e,detail:$(a("Full"),a("the page")),onReset:t})}function j({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:l,hideable:s=!0,markup:c=!0}){const{text:u,hidden:d}=ct(e),h=J(null),p=J(null),f=C=>t(s?{text:C,hidden:d}:C),m=()=>t({text:u,hidden:!d}),g=s&&d,b=lt(),S=r?ds(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(Ro,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:S,action:s?i(ke,{content:w,children:i(Dt,{"aria-pressed":d,"aria-label":w,onClick:m,children:d?i(Ut,{name:"eye-off",size:14}):i(Ut,{name:"eye",size:14})})}):void 0,children:A("div",{className:"sf-copybox",children:[c&&i(Gt,{target:l?p:h,value:u,onChange:f}),l?i("textarea",{id:b,ref:p,value:u,placeholder:o===void 0?void 0:a(o),onChange:C=>f(C.target.value)}):i("input",{id:b,ref:h,type:"text",value:u,placeholder:o===void 0?void 0:a(o),onChange:C=>f(C.target.value)})]})})}function hc(e,t){return{...e,[pt]:t}}function mc(e){const t=e[N];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[N]:{...t,offPage:!0}}}function gc(e){return!e||typeof e!="object"?!1:e[N]?.offPage===!0}function bc(e){if(!e[N])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Sr]:!0}}function wc(e){return wr(e)}function Sc(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 Lu,SCALAR_TEXT_CONTROLS as ku}from"efficient-easel/draw";function _c(e,t){if(!e[N])throw new Error("inOwnBox: the field holds no authored text");const{[mr]:o,...r}=e;return{...r,[br]:!0,render:t}}const ls=new Set(Rr),he={type:"radio",options:[{value:!0},{value:!1}]},pn={text:{type:"object",objectFields:{text:{type:"text"},hidden:he}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:he}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},V=(e,t)=>{const n=F({...t,[N]:e},{...pn[e.control],label:e.label});if(!ls.has(e.control))return n;const o=t.render;return{...Mt(n,"authored-copy"),render:r=>i(Cr,{name:r.name,children:o(r)})}},Cc="Everything else on this block comes from the linked post. Unlink it to edit by hand.",as={field:"source.slug",set:!0},yc={not:as},cs="Select a word, then press the highlighter.",us=new Set([cs]),ds=e=>us.has(e);function xc(e,t,n){return V({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Oc(e,t,n){return V({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function Ic(e,t,n){return V({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Ec(e,t,n){return V({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Tc(e){return{type:"custom",[dt]:{label:e},...F({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(kr,{value:ut(t),onChange:n,label:e})}}function Rc(e,t,n){return V({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const Nc={Design:po,Animation:ho};function Pc(e,t){return{type:"custom",render:()=>i(ps,{text:e,values:t})}}function ps({text:e,values:t}){return i("p",{className:"sf-note",children:a(e,t)})}function Ac(e){return Ee(e)!==null&&e?.tabs!==void 0}const fn=new Map;function Lc(e,t){const n=`${e}\0${t?t.join(""):""}`,o=fn.get(n)??{type:"custom",tabs:t,[Oe]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(L,{})};return fn.set(n,o),o}const hn=new Map;function kc(e){const t=hn.get(e)??{type:"custom",[Oe]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(L,{})};return hn.set(e,t),t}function fs(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Fc(e,t){return fs(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(L,{})}}function vc(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 Dc({title:e,children:t}){const[n,o]=Z(()=>!Je.has(e));return i(Uo,{title:e,open:n,onToggle:r=>{o(r),r?Je.delete(e):Je.add(e)},children:t})}const Je=new Set;function hs({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),l=r?o?.[r]:void 0,s=l?a(l):t;return A("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?a(o[c]):c;return i(ke,{content:u,children:i(nr,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:s})]})}function Bc(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(ms,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function ms({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const l=typeof o=="string"?o:void 0,{colors:s,n:c}=nt(),u={background:s.background,surface:s.surface,surface2:bi(s),band:gi(s)},d=n?Ve:t,h=Ai(l,t,d),p=rn(void 0,d,u),f=n?Ri:void 0,m=d===Ve?a("the theme's section background"):a("Theme {n} background",{n:c}),g=gs(l,t,s,c,u,r),b=$(p.toUpperCase(),m),S=Fe(l),w=S?ce(S,s,c):null;return w?i(ae,{label:a(e),icon:i(bt,{}),value:w.hex,caption:w.words,onChange:r,changed:!0,onReset:()=>r(f),resetTo:b,choices:g}):i(Ht,{label:a(e),icon:i(bt,{}),value:h?"":rn(l,t,u),inherited:p,resetTo:b,onChange:r,onReset:()=>r(f),choices:g})}function gs(e,t,n,o,r,l){const s=Pi(e,t);return[{label:a("No fill"),color:"",selected:s==="none",onPick:()=>l(Ni)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:s==="band",onPick:()=>l(Ve)},...tt(Fe(e)??"",n,o,l)]}function bs(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,l=Ii(r,t);return i(_,{label:a(e),icon:i(Ne,{}),changed:!l,action:i(O,{words:x()?.panel,label:a(e),changed:!l,detail:a("the theme's image stage"),onReset:()=>o(Ci)}),children:hs({swatches:Oi,current:l?Ti:Ei(r,t),onPick:o,names:xi})})}}}function Hc(e=n=>n,t){return ee({_gSectionTheme:T(Li),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(Ar,{value:e(n),onChange:o,followLabel:t})}})}function me(e){const t=E(),n=cn(e?.view),o=s=>He(e.valueKey,s),r=e.numbersIn??(s=>Y(t[o(s)])!==void 0),l=e.followsView??Ls(n,r);return Ki({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:Xi,label:a(e.label),grid:e.grid,hasOwn:r(n),view:{tier:n,numbersIn:r,followsView:l},convertTo:e.convertTo??(s=>{const c=Y(t[o(n)]);return c===void 0?{}:{[o(n)]:s(c)}})})}function q({min:e,max:t,step:n,value:o,onChange:r,suffix:l="",readout:s=!0,notch:c,ariaLabel:u,disabled:d=!1,placeholder:h,placeholderWord:p,onClear:f,units:m,inputMax:g}){const b=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:b?"sf-slider has-notch":"sf-slider",style:b?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(dr,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...p?{emptyLabel:a(p)}:{},suffix:l||void 0,...m?{units:m}:{},...g!==void 0?{inputMax:g}:{},showInput:s,label:u===void 0?void 0:a(u),disabled:d,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:S=>{S===null?f?.():S!==o&&r(S)}})})}function ws(e,t){const{min:n,max:o,step:r=1,unsetLabel:l,hint:s,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?K(d):void 0,value:g?u||l===void 0?void 0:a(l):`${m}${h}`,changed:!g,action:u?xe(u,{changed:!g,onReset:()=>f(null)}):i(O,{words:x()?.panel,label:a(e),changed:!g,onReset:()=>f(null)}),hint:typeof s=="string"?a(s):s,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,l=r!==null;return i(_,{label:a(te),icon:i(St,{}),changed:l,action:xe(e.mark,{changed:l,onReset:()=>o(null)}),hint:e.hint,children:i(_s,{tier:e,px:r,name:t.name,onRadius:o})})}}}function R(e){const t=G();return[t?.values?.[e],n=>t?.onChange(e,n)]}function mn(){return Mt({type:"custom",render:()=>i(gr,{})},"always")}function ge(){const e=G();return t=>e?.onChangeMany(t)}function _s({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[l,s]=R(e.sidesKey),c=ge(),u=me({row:e.row??Ss,label:te,grid:{min:k,max:Te,step:e.step??1},valueKey:n??"",view:"desktop"}),d=At(l)??[...Nt];return i(or,{label:a(te),value:d,corners:Do,onChange:h=>{const p=At(h)??[];s(p.length===Nt.length?null:p)},radius:t,onRadiusChange:u&&n?h=>c({[n]:h,...u.unitPatch(h===null)}):o,radiusMin:u?.grid.min??k,radiusMax:u?.grid.max??Te,radiusStep:u?.grid.step??e.step??1,radiusPlaceholder:u&&u.unit!=="px"?"–":String(r),...u?{radiusUnit:u.unit,units:u.units}:{}})}function gn(e,t){return pe(e,t)}function bn(){return mn()}function Cs({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=W(),r=typeof o=="number"?`${o}px`:a("not set");return i(O,{words:x()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):$(r,a("Styles")),onReset:n})}function ys(){const{cornerRadiusPx:e}=W();return typeof e=="number"?e:k}function xs(){return Ze({sidesKey:"sectionCornerSides",row:Pt,useFollowed:ys,mark:i(Cs,{label:te}),hint:Os})}const Os="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function Gc(){return ee({_gShape:T("Shape"),sectionCorners:xs(),...gn(Pt,"sectionCorners"),sectionCornerSides:bn(),...M("sectionBorder",As),...pe(Zt,"sectionBorder",{tablet:!0,phone:!0})})}const Is=()=>({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 Es(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Ts(){let e;try{const t=en(W().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||hi.line}function Rs({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:l=!0,above:s={},length:c}){const u=e&&typeof e=="object"?e:{},[d,h]=Z(()=>r?jo(u,s):!1),p=Is(),f=m=>Es(r&&l?m:{width:m.width,color:m.color,...l?{style:m.style}:{}});return i(_,{label:a("Border"),icon:i(mo,{}),action:r?i(Xo,{each:d,label:a("Each side"),onChange:h}):void 0,children:i(Ko,{label:a("Border"),value:u,each:d,onChange:m=>t(f(m)),placeholder:n,presets:o,words:c?{...p,unit:c.unit}:p,styles:l,max:c?.grid.max??Jt,...c?{step:c.grid.step,units:c.units}:{}})})}function Ns({value:e,onChange:t,view:n}){const[o]=R("sectionBorder"),[r]=R(Be("sectionBorder")),l=Ts(),s=f=>f&&typeof f=="object"?f:{},c=n==="phone"?{...Qt(s(o)),...Qt(s(r))}:n==="tablet"?s(o):{},u=E(),d=ge(),h=I("sectionBorder",n),p=me({row:Zt,label:"Border",grid:{min:0,max:Jt,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>Qe(u[He("sectionBorder",f)]),convertTo:f=>{const m=s(u[h]);return Qe(m)?{[h]:Ps(m,f)}:{}}});return i(Rs,{value:e,length:p,onChange:p?f=>d({[h]:f,...p.unitPatch(!Qe(f))}):t,placeholder:{sides:$o(c),style:c.style??"solid",color:c.color||l},presets:[l],above:c})}const wn=["width",...fi];function Qe(e){if(!e||typeof e!="object")return!1;const t=e;return wn.some(n=>Y(t[n])!==void 0)}function Ps(e,t){const n={...e};for(const o of wn){const r=Y(n[o]);r!==void 0&&(n[o]=t(r))}return n}function As(e){return{type:"custom",render:({value:t,onChange:n})=>i(Ns,{value:t,onChange:n,view:e})}}function Ls(e,t){let n=qe[e];for(;n&&qe[n]!==null&&!t(n);)n=qe[n];return n??e}function Mc(e){return{type:"custom",render:()=>i(ks,{partKey:e})}}function ks({partKey:e}){const[t]=R("id"),[n]=R("_partStyles"),{textStyles:o}=W(),r=Hr();let l=null;try{l=vr().select}catch{l=null}const s=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(Mo,{name:a("Text"),preview:Fr(s,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??Br.copy.panel).cases}),onOpen:()=>{l&&typeof t=="string"&&l(Dr(t,e))}})}function Sn(e){const{cornerRadiusPx:t}=W(),n=typeof t=="number"?t:e;let o=null;try{const{appState:l,selectedItem:s}=re(u=>u),c=s?.props?.id?String(s.props.id):void 0;o=c?Go(l?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Bo(r)?r:n}function Fs({label:e,changed:t=!1,onReset:n=()=>{}}){const o=Sn(k);return i(O,{words:x()?.panel,label:a(e),changed:t,detail:$(`${o}px`,a("the section")),onReset:n})}function vs(){return i(L,{children:a("Follows the section's Corners until you set a number here.")})}function Ds(){return Ze({sidesKey:"cardCornerSides",row:Lt,useFollowed:()=>Sn(k),mark:i(Fs,{label:te}),hint:i(vs,{})})}function Bs(){return{type:"custom",render:()=>i(Xn,{})}}function Uc(){return{_gShape:T("Shape"),cardCorners:Ds(),...gn(Lt,"cardCorners"),cardCornerSides:bn(),cardCornersApplyAll:Bs()}}function Hs(){return F({type:"custom",[$i]:!0,render:e=>i(Ms,{...e})},{type:"select",label:z,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 Gs(e,t){const n=qt(e);if(n!=="custom")return a(zt.find(r=>r.value===n)?.label??"");const o=vt(Ke(e,t),t);return o?[...o,100-o.reduce((r,l)=>r+l,0)].join(" / "):a("Custom")}function Ms(e){const{value:t,onChange:n}=e,[o]=R("content"),r=Array.isArray(o)?o.length:0,l="follows"in e,s=t!=null,c=s?t:l?e.follows:void 0,u=qt(c),d=r>=2&&r<=Ft,h=()=>[...ar[r]??[]],p=J(null),f=w=>{const C=p.current;C&&JSON.stringify(w)===JSON.stringify(C.shares)?n(C.value):w&&n(w)},m=w=>{w===u||w==="custom"&&!d||n(w==="custom"?h():w)},g=a("The width bar works for 2 to {count} blocks.",{count:Ft}),b=s&&(l||t!=="content"),S=ur().widths.hint(r,lr);return i(_,{label:a(z),icon:i(se,{}),changed:b,hint:u!=="custom"?void 0:d?S:g,action:i(O,{words:x()?.panel,label:a(z),changed:b,disabled:e.readOnly===!0,detail:l?X(w=>a(w),Gs(e.follows,r),e.followsView):a("Fit content"),onReset:()=>n(void 0)}),children:A("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(kt,{label:a(z),value:u,options:zt.map(w=>({value:w.value,label:w.value==="custom"&&!d?g:a(w.label),icon:Vi(i("span",{className:"sf-gallery-pic sf-share-pic",children:_n(w.weights).map((C,D)=>i("i",{style:{gridColumn:`span ${C}`}},D))}),a(w.label),w.value==="custom"&&!d?g:a(w.label))})),onChange:m,columns:3,cell:Cn,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&d?i("div",{onFocus:()=>{p.current={value:t,shares:vt(Ke(c,r),r)}},onBlur:()=>{p.current=null},children:i(cr,{label:a(z),count:r,value:Ke(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function _n(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function Wc(){return v(ai,i(yo,{}),jt,jt[0].value)}function Kc(){return y("mobile",an(z,i(se,{}),pi.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:_n(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),di,{columns:2,cell:Cn}))}const Cn={width:"5.75rem",height:"3.25rem",words:!0};function Xc(){return Ye("share",Hs(),ln)[Be("share")]}function Us(){return y("mobile",H(Vt,i(wt,{}),We,ui,1,We,"",{clear:{phoneFollows:!1,hint:We}}))}const yn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function $c(){const e=H(Vt,i(wt,{}),Yt,ci,1,Yt,"",{clear:{emptyLabel:"Auto"}}),t=Ye("columns",e,{...yn,tablet:ln.tablet}),n=Ye("columns",e,yn,{phoneRow:Us()});return{...t,phoneRow:n.phoneRow}}function jc(e,t,n,o,r,l,s){return{type:"custom",render:({value:c,onChange:u,name:d})=>i(Ws,{label:e,min:t,max:n,step:o,fallback:r,role:l,value:c,onChange:u,name:d??"",length:s})}}function Ws({label:e,min:t,max:n,step:o,fallback:r,role:l,value:s,onChange:c,name:u,length:d}){const h=E(),p=ge(),f=cn(d?.view),m=me({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(Tt,{noun:l}),action:i(O,{words:x()?.panel,label:a(e),changed:!vi(s),detail:a("the Text style in Styles"),onReset:()=>g(Fi),defaultAction:{onPress:()=>g(ki),title:a("Keep this section's own built-in size"),icon:i(go,{})}}),children:q({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof s=="number"?s:r,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:g})})}function be(e,t,n){return[{label:"Auto",value:""},...Array.from({length:e},(o,r)=>({label:r===0?`1 ${t}`:`${r+1} ${n}`,value:String(r+1)}))]}function Vc(){return{_gCellWidth:T("Cell size"),gridSpan:y("desktop",v("Positions",i(se,{}),be(Jn,"position","positions"),"")),gridRowSpan:y("desktop",v("Rows tall",i(le,{}),be(mt,"row","rows"),"")),[eo]:H("At card",i(Ct,{}),1,Zn,1,1,""),[B("gridSpan")]:y("mobile",v("Positions",i(se,{}),[{label:"Full row",value:""},...be(Qn,"position","positions").slice(1)],"")),[B("gridRowSpan")]:y("mobile",v("Rows tall",i(le,{}),be(mt,"row","rows"),""))}}function E(){let e=null,t=null;try{e=st(Ks),t=re(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Ks=kn(null);function Xs({min:e,max:t,step:n,px:o,label:r,onChange:l,desktopKey:s,fallback:c}){const u=E()[s],d=De(void 0,u,c);return i(L,{children:q({min:e,max:t,step:n,value:De(o,u,c),readout:!1,ariaLabel:r,notch:d,onChange:l})})}function $s({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:l=()=>{}}){const s=E()[t],c=De(void 0,s,n);return i(O,{words:x()?.panel,label:a(e),changed:r,detail:X(u=>a(u),`${c}${o}`),onReset:l})}function js(e){return ws(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i($s,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Xs,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Vs={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Ys={Top:Pe,Bottom:xt,Left:Ot,Right:It},zs=e=>{const t=Ys[e];return i(t,{})};function Yc(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>Vs[S],l=S=>H(r("Top"),i(Pe,{}),P.min,P.max,P.step,S,"px"),s=(S,w,C,D=P)=>y("mobile",js({label:r(S),icon:zs(S),desktopKey:w,min:D.min,max:D.max,step:D.step,fallback:C})),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?y("desktop",S):S;return ee({...o?{_gSpacing:T("Padding")}:{},[t]:b(l(c)),...g?{[B(t)]:s("Top",t,c)}:{},...e.only==="top"?{}:{[n]:b(H(r("Bottom"),i(xt,{}),P.min,P.max,P.step,u,"px")),...g?{[B(n)]:s("Bottom",n,u)}:{}},...e.sides?{[d]:b(H(r("Left"),i(Ot,{}),p.min,p.max,p.step,f,"px")),...g?{[B(d)]:s("Left",d,m,p)}:{},[h]:b(H(r("Right"),i(It,{}),p.min,p.max,p.step,f,"px")),...g?{[B(h)]:s("Right",h,m,p)}:{}}:{}})}function zc(e,t){const n=Object.fromEntries(Object.entries(t).map(([l,s])=>[l,l in e&&Ee(s)?e[l]:s])),o={};let r=!1;for(const[l,s]of Object.entries(e)){if(l in t){r||Object.assign(o,n),r=!0;continue}o[l]=s}return r||Object.assign(o,n),o}const we="Width";function qc(e,t=Di,n=!0){const o=t.map(r=>({label:Bi[r],value:r}));return ee({...n?{_gWidth:T(we)}:{},widthMode:{type:"custom",render:({onChange:r,field:l})=>i(_,{label:a(we),icon:i(No,{}),action:n?i(ss,{inherited:l?.inherited??!1,onReset:()=>r(Hi),label:we}):void 0,children:fe({options:o,value:l?.currentValue||e,onChange:r,ariaLabel:we})})}})}function Jc({fill:e=!1}={}){const t=(r,l)=>({type:"custom",render:({value:s,onChange:c})=>i(qs,{value:s,onChange:c,view:r,badge:l,fill:e})}),n=()=>ve("sectionHeightMode"),o=()=>ve("sectionHeightMode");return ee({_gHeight:T(Q),...M("sectionHeightMode",r=>r==="desktop"?t(r):t(r,l=>i(el,{view:r,onClear:()=>l(void 0)}))),...M("sectionHeightValue",n),...M("sectionHeightUnit",o)})}function qs({value:e,onChange:t,view:n,badge:o,fill:r=!1}){const l=E(),{mode:s,number:c,unit:u}=Js(n,l,e);return i(_,{label:Q,icon:K(i(le,{})),action:o?o(t):void 0,children:A("div",{className:"es-width-stack",children:[fe({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...r?[{label:"Fill",value:"fill"}]:[]],value:s,onChange:t,ariaLabel:Q}),c?i(Qs,{view:n,mode:s,menu:u}):null]})})}function xn(e,t){return e==="phone"&&Ge(t)?Ur(t):Mr(t)}function Se(e,t){return e==="desktop"||(e==="tablet"?Ge(t):Gr(t))?null:xn(e,t)}function Js(e,t,n){const r=(l=>oi.includes(l))(n)?n:Se(e,t)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function Zs(e,t,n,o){const r=Se(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 On(e,t,n){const o=G(),r=Se(e,E());return!o||!r?{followed:null,write:n}:{followed:r,write:s=>o.onChangeMany(c=>{const u=Zs(e,c,t,s);return u===null?{[I(t,e)]:s}:Object.keys(u).length?u:null})}}function Qs({view:e,mode:t,menu:n}){const o=G(),r=E(),l=I("sectionHeightValue",e),s=I("sectionHeightUnit",e),c=S=>w=>o?.onChangeMany(()=>({[S]:w})),{followed:u,write:d}=On(e,"sectionHeightValue",c(l)),{write:h}=On(e,"sectionHeightUnit",c(s)),p=t==="screen"?"%":r[s],f=Zi(si,"px",u?u.unit:p),m=f==="%"?ii:ri,g=r[l],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 el({view:e,onClear:t}){const n=E(),o=Se(e,n)===null,r=e==="phone"&&Ge(n),l=xn(e,n),s=X(c=>a(c),l.mode==="auto"?a("Auto"):`${l.value}${l.unit}`,r?"tablet":"desktop");return i(O,{words:x()?.panel,label:a(Q),changed:o,detail:s,onReset:t})}function Zc(e={}){const t=e.intro===!0,n=l=>({type:"custom",render:({value:s,onChange:c,id:u,name:d})=>i(ll,{value:s,onChange:c,labelId:`${u??d??"stickTop"}-label`,view:l,intro:t})}),o=l=>({type:"custom",render:({value:s,onChange:c})=>i(rl,{value:s,onChange:c,view:l,intro:t})}),r=l=>({type:"custom",render:({value:s,onChange:c})=>i(il,{value:s,onChange:c,view:l,intro:t})});return{_gStick:T(jr,{dot:t?ol:Xt}),...M("stickTop",n),...M("stickTopDistance",o),...pe(Ue,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?M(Me,r):{},...t?{}:{[zr]:tl()},...t||e.above===!1?{}:{[Xr]:nl()}}}function tl(){const e=v(qr,i(Pe,{}),Jr,Vr);return y("desktop",{...e,render:t=>{const n=e.render({...t,value:ei(t.value),onChange:o=>t.onChange(ti(o))});return xe(n,{hint:a(Yr)})}})}function nl(){const e=Tn($r,!1,i(Et,{}),Kr);return y("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const ol={any:[Xt,Wr]};function In(e,t,n,o,r){const l=G(),s=E(),c=e==="desktop"||ne(e,s)?null:et(e,ue(s,{intro:o}));return{followed:c,write:(c||r)&&l?d=>l.onChangeMany(h=>{const p=sl(e,h,d,t,o),f=p===null?{[I(t,e)]:d}:p;return Object.keys(f).length?{...f,...r?.(d)??{}}:null}):n}}function rl({value:e,onChange:t,view:n,intro:o}){const r=E(),l=ue(r,{intro:o}),s=h=>{const p=zi(h);return p==="desktop"||ne(p,r)},c=me({row:Ue,label:"Distance from top",grid:{min:U.min,max:U.max,step:U.step},valueKey:"stickTopDistance",view:n,numbersIn:h=>s(h)&&Y(r[He("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&l.ownTablet?"tablet":"desktop"}),{followed:u,write:d}=In(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??U.min,max:c?.grid.max??U.max,step:c?.grid.step??U.step,value:u?null:typeof e=="number"?e:U.fallback,...u?{placeholder:u.distance}:{},...c?{suffix:c.unit,units:c.units}:{suffix:"px"},ariaLabel:a("Distance from top"),onChange:d})})}function il({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:l}=In(n,Me,t,o);return i(_,{label:a(Kt),icon:K(i(le,{})),children:q({min:ie.min,max:ie.max,step:ie.step,value:r?null:Y(e)??ie.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Kt),onChange:l})})}function ne(e,t){return e==="tablet"?Qr(t):Zr(t)}function et(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 sl(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ne(e,t))return null;if(n===void 0)return{};const l=et(e,ue(t,{intro:r})),s=e==="phone"&&ne("tablet",t)?h=>I(h,"tablet"):h=>h,c=(h,p)=>t[s(h)]==null?{}:{[I(h,e)]:p},u=Ue.unitKey,d=t[s(u)]==null?{}:{[I(u,e)]:l.unit};return{[I("stickTop",e)]:!0,...c("stickTopDistance",l.distance),...d,...c(Me,l.screens),[I(o,e)]:n}}function ll({value:e,onChange:t,labelId:n,view:o,intro:r}){const l=E(),s=ue(l,{intro:r}),c=o==="phone"?s.phone:o==="tablet"?s.tablet:r?s.desktop:e===!0,u=o==="phone"&&s.ownTablet,d=o==="desktop"?null:et(o,s),h=d?.on?ni(d.distance,d.unit):a("Off");return i(_,{label:a(Wt),labelId:n,icon:K(i(Et,{})),action:A(L,{children:[o!=="desktop"?i(O,{words:x()?.panel,label:a(Wt),changed:ne(o,l),detail:X(p=>a(p),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(Le,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const En="e.g. about";function Qc(){return{_gAnchor:T("Anchor"),anchor:V({control:"plainText",label:"Name",placeholder:En},{type:"custom",render:({value:e,onChange:t})=>i(co,{value:e,onChange:t,nameBox:(n,o)=>i(j,{value:n,onChange:o,label:"Name",placeholder:En,hideable:!1,markup:!1})})})}}function eu(){return{_gAdvanced:T("Advanced"),[Vn]:{type:"custom",render:({value:e,onChange:t})=>i(_,{label:a("Custom CSS"),icon:K(i(Yo,{})),children:i(pr,{"aria-label":a("Custom CSS"),spellCheck:!1,autoGrow:!0,className:"font-mono",value:typeof e=="string"?e:"",onChange:n=>t(n.target.value)})})}}}function tu(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:s})=>{const c=`${l??s??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(ir,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:d=>r(d?d.toISOString():"")})})}}}function nu(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:s})=>{const c=`${l??s??e}-date`;return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(rr,{id:c,value:Dn(typeof o=="string"?o:null),onChange:u=>r(u?vn(u):"")})})}}}function Tn(e,t,n,o){return{type:"custom",...F({},{...he,label:e}),render:r=>{const{value:l,onChange:s,id:c,name:u}=r,d="follows"in r,h=r,p=typeof l=="boolean",f=typeof h.follows=="boolean"?h.follows:t,m=p?l:d?f:t,g=`${c??u??e}-label`,b=h.readOnly===!0,S=i(Le,{checked:m,onChange:s,disabled:b,ariaLabelledBy:g});return i(_,{label:a(e),labelId:g,icon:n,hint:o===void 0?void 0:a(o),action:d?A(L,{children:[i(O,{words:x()?.panel,label:a(e),changed:p,detail:h.followsNoView?a(f?"On":"Off"):X(w=>a(w),a(f?"On":"Off"),h.followsView),disabled:b,onReset:()=>s(void 0)}),S]}):S})}}}function ou(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(al,{label:"Background",icon:i(Io,{}),id:r,value:e,shown:Po(e),onChange:t})}}}function ru(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(ae,{label:a(e),icon:n,value:o||t,onChange:r})}}function al({label:e,icon:t,id:n,value:o,shown:r,onChange:l}){const{colors:s,n:c}=nt(),u=Fe(o),d=u?ce(u,s,c):null;return i(ae,{label:a(e),icon:t,id:n,value:d?d.hex:r,caption:d?.words,onChange:l,choices:tt(u??"",s,c,l)})}function iu(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(cl,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function tt(e,t,n,o){const r=Ae(e);return hr(t,n).map(l=>({label:l.label,color:l.value,selected:r===l.name,onPick:()=>o(l.name)}))}function cl({value:e,onChange:t,twin:n}){const{colors:o,n:r}=nt(),l=o.background,s=$(l.toUpperCase(),a("Theme {n} background",{n:r})),[c,u]=R(Ao),[d]=R(ko),h=typeof d=="string"&&d.trim()!=="",p=Rt(c),f=oe=>u(Rt(oe)||void 0),m=Ae(e),g=m?ce(m,o,r):null,b=tt(e,o,r,t),S=n?()=>t(void 0):()=>t("");let w=l,C=s;if(n){const oe=Ae(n.follows),Ce=Fo(n.follows),ye=oe?ce(oe,o,r):Ce?{hex:Ce,words:Ce.toUpperCase()}:null;w=ye?.hex??l,C=X(Pn=>a(Pn),ye?ye.words:s,n.view)}const D=!n&&(vo(e)||h)?i(ul,{value:p,onChange:f}):null;return g?i(ae,{label:a("Fill"),icon:i(Ne,{}),value:g.hex,caption:g.words,onChange:t,changed:!0,onReset:S,resetTo:C,choices:b,children:D}):i(Ht,{label:a("Fill"),icon:i(Ne,{}),value:e,inherited:w,resetTo:C,onChange:t,onReset:S,choices:b,children:D})}function ul({value:e,onChange:t}){return fe({options:Lo.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:a("Fill")})}function dl(e,t,n){if((e?.content??[]).some(s=>s?.props?.id===t))return de(n);const r=Ho(e,t);if(r.length===0)return null;const l=de(sn(n));if(l!==null)return l;for(let s=r.length-1;s>0;s-=1){const c=de(sn(r[s].sectionAccent));if(c!==null)return c}return de(r[0].sectionAccent)}function nt(){const e=en(W().theme),[t]=R("sectionAccent");let n=null;try{const{appState:r,selectedItem:l}=re(c=>c),s=l?.props?.id?String(l.props.id):void 0;n=s?dl(r?.data,s,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:mi(e.themes[o]),n:o+1}}function su(){return mn()}const lu={top:i(_o,{}),right:i(So,{}),bottom:i(bo,{}),left:i(wo,{})};function au(e,t,n,o,r,l,s){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=l?.[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):s?a(s):"",children:Wi(a,{label:e,value:m,onChange:f,points:h})})}}}function cu(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:l})=>i(Pr,{label:e,options:(l.options??t).map(s=>({...s,label:a(s.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:a(n)}:{}})}}function uu(e,t,n,o){return{type:"custom",options:t,fallback:n,...F({},{type:"select",label:e}),render:({value:r,onChange:l,field:s})=>i(Lr,{label:e,options:(s.options??t).map(c=>({...c,label:a(c.label)})),fallback:s.fallback??n,value:r,onChange:l,placeholder:o===void 0?void 0:a(o)})}}function du(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const pl={image:"Image",video:"Video"},pu=Ln.map(e=>({label:pl[e],value:e}));function fu(e,t,n){const o=Object.keys(at).map(r=>({label:at[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(hl,{label:e,icon:t,options:o,onChange:r})}}function fl(e,t,n){const o=Bn(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=Gn(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 hl({label:e,icon:t,options:n,onChange:o}){const r=G(),l=r?.values??{},s=Hn(l),c=st(Wn),u=Un(c?.docId??null);let d=null;try{d=re(p=>p.appState.data)}catch{d=null}const h=Mn(r?.id,d,u);return i(_,{label:a(e),icon:K(t),hint:fl(l,h,c?.hasUnsavedEdits??!1),children:fe({options:n,value:s,onChange:o,ariaLabel:e})})}function hu(e,t,n,o={}){const r={type:"custom",[Ie]:!0,render:({value:l,onChange:s,name:c})=>i(Nr,{value:l||"",onChange:s,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?y("each",r):r}function mu(e){return ot(e).map(t=>t.path)}function ot(e,t="",n=[]){const o=[];for(const[r,l]of Object.entries(e??{})){const s=t?`${t}.${r}`:r,c=l;if(c&&c[Ie]){o.push({path:s,field:c,along:n});continue}c?.arrayFields&&o.push(...ot(c.arrayFields,`${s}[]`,[...n,c])),c?.objectFields&&o.push(...ot(c.objectFields,s,[...n,c]))}return o}const gu={HeroSingle:[An.image],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function ml(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 bu({value:e,onChange:t,label:n}){const o=e||{},r=G(),l=r?r.values!==r.node.props:!0,s=!!o.pending&&l,c=!!o.pending&&!l,u=!!Mi(Gi()).geocode,d=lt(),h=(p,f)=>t({...o,[p]:f??void 0});return A(L,{children:[i(_,{label:a(n),icon:i(yt,{}),action:u?i(ke,{content:a("Find from the address (OpenStreetMap)"),children:i(Dt,{"aria-label":a("Find from the address"),"aria-busy":s||void 0,disabled:s,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(Eo,{})})}):void 0,children:u&&o.status?i(uo,{compact:!0,oneLine:!0,spaced:!1,status:s?"busy":o.ok&&!c?"found":"notfound",statusText:s?a("Finding…"):c?a(fr):a(o.status),hint:ml(o)}):null}),i(_,{label:a("Enter by hand"),labelId:d,icon:i(Co,{}),action:i(Le,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:d})}),o.manual&&i(_,{label:a("Latitude, longitude"),icon:i(yt,{}),children:A("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(Bt,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>h("lat",p),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(Bt,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>h("lng",p),min:-180,max:180,step:1e-4,placeholder:a("Longitude")})]})})]})}function gl(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function bl(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,l)=>l===t?{text:n}:r)}function wu(e,t){return e===null?null:t>e?e:null}function wl(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 Su={label:"Ticker items",icon:i(Oo,{})};function _u(e,t,n,o){return{type:"custom",[N]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...F({},{...pn.textList,label:e}),render:({value:r,onChange:l})=>i(Sl,{label:e,icon:K(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:l,markup:o==="markup"})}}function Sl({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:l=!1}){const s=J(null),[c,u]=Z(null),d=p=>p.map(f=>({text:f?.text??""})),h=p=>{const f=wl(n,p,c);f===null&&(s.current=null),u(f),r(d(p))};return i(Vo,{label:a(e),icon:t,noun:a("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:l?i(Gt,{target:s,value:gl(n,c),onChange:p=>r(bl(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:l&&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=>{s.current=g.currentTarget,u(f)}})})}function Cu(e,t){const n=`${e.label} — row ${t+1}`;return V({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(j,{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 yu(e){return{_gCards:T("Cards"),coverIndex:v("Cover image",i(xo,{}),Er,String(Tr),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:bs("Image background",yi),cardImage:Rn()}}function xu(){return{outline:v("Card outline",i(To,{}),xr,Ir),indexBadge:v("Card number",i(Ct,{}),yr,Or),showBadge:Tn("Product badge",!0,i(Tt,{noun:"tag"}))}}function Ou(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...he,label:_e.find(l=>l.id===r).label}),o=r=>F(ve(rt),n(r));return{_gShowOnCard:T("Show on a card"),[rt]:F({type:"custom",render:()=>i(_l,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(rt)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const rt="showCardPrice",_e=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function _l({rest:e}){const t=E(),n=ge(),o=s=>typeof t[s]=="boolean"?t[s]:void 0,r=s=>o(s)??e[s],l=_e.some(({id:s})=>o(s)!==void 0&&o(s)!==e[s]);return i(it,{parts:_e,changed:l,shown:r,onPress:(s,c)=>n({[s]:c}),onReset:()=>n(Object.fromEntries(_e.map(({id:s})=>[s,void 0])))})}function Iu(e,t="display"){const n=B(t);return{[t]:y("desktop",{type:"custom",render:({value:o,onChange:r})=>i(it,{parts:e,changed:qo(o),shown:l=>Jo(o,l),onPress:(l,s)=>r(er(o,l,s)),onReset:()=>r(void 0)})}),[n]:y("mobile",{type:"custom",render:({value:o,onChange:r})=>i(Cl,{parts:e,desktopKey:t,value:o,onChange:r})})}}function it({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:l,disabledReason:s}){const c=a("Display");return i(_,{label:c,icon:i(fo,{}),changed:t,action:i(O,{words:x()?.panel,label:c,changed:t,detail:l,onReset:r}),children:i(zo,{label:c,items:e.map(u=>({id:u.id,label:a(u.label),shown:n(u.id),...s?{disabled:!0,disabledReason:a(s)}:{}})),onChange:o})})}function Cl({parts:e,desktopKey:t,value:n,onChange:o}){const r=E()[t];return i(it,{parts:e,changed:Qo(n),shown:l=>Zo(r,n,l),onPress:(l,s)=>o(tr(n,l,s)),onReset:()=>o(_r),detail:a("the same as Desktop")})}function Rn(e=$n){return H("Card image",i(St,{}),k,Te,jn,k,e,{clear:{hint:k},hint:"Rounds the picture. The card's own corner is in Styles."})}function yl(){return pe(ht,"cardImage")}function Eu(){return{cardImage:Rn(ht),...yl()}}function Tu(){return Ze({sidesKey:"cornerSides",row:qn,step:Yn,useFollowed:()=>k,mark:i(xl,{label:zn}),hint:a("Rounds the picture. Left alone it stays square.")})}function xl({label:e,changed:t=!1,onReset:n=()=>{}}){return i(O,{words:x()?.panel,label:a(e),changed:t,onReset:n})}function Ru(){return{type:"custom",render:({value:e,onChange:t})=>i(Tl,{value:typeof e=="string"?e:"",onChange:t})}}const Nn="own";function Nu(){const e=[{value:Nn,label:"Layout's own",picture:un(Array.from({length:8},()=>[3,1]))},...Object.entries(oo).map(([t,n])=>({value:t,label:n.label,picture:un([...n.phone,...n.phone])}))];return y("mobile",an("Layout",i(_t,{}),e,Nn,{columns:2,cell:Ji}))}function Ol({layout:e,width:t}){const n=ro(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:io(e).map(([r,l],s)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${l}`,aspectRatio:o}},s))})}const Il={width:"3.5rem",height:"2.5rem",words:!1},El=200;function Tl({value:e,onChange:t}){const[n,o]=Z(null),[r,l]=Z(4),s=J(null);Fn(()=>{const m=s.current;if(!m||typeof ResizeObserver!="function")return;const g=()=>l(m.getBoundingClientRect().width>=El?4:3);g();const b=new ResizeObserver(g);return b.observe(m),()=>b.disconnect()},[]);const c=e?qi(Re,e):void 0,u=c?e:"",d=gt(n,u),h=gt(n,"").length,p=so("no-symbol"),f=[{value:"",label:a("Not chosen"),icon:Yi(p,a("Not chosen"))},...d.map(m=>({value:m,label:a(Re[m].label),icon:i(Ol,{layout:Re[m],width:40})}))];return i(_,{label:a("Layout"),icon:i(_t,{}),value:c?a(c.label):void 0,children:i("div",{ref:s,style:{flex:"1 1 auto",minWidth:0},children:i(kt,{label:a("Layout"),value:u,options:f,onChange:t,columns:r,cell:Il,header:A("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(Wo,{options:[{id:"all",label:a("All")},...to.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:no.length})})]})})})})}export{as as BOUND_TO_POST,Cc as BOUND_TO_POST_NOTE,Nc as BUCKET_ICONS,gu as CUSTOM_FIELD_MEDIA,bu as CoordsField,dn as DESKTOP_GAP_NOT_OVERLAP,it as DisplayRow,lu as EDGE_ARROWS,sr as FOCAL_DEFAULT,Oe as FOLD_FIELD_MARKER,cs as HIGHLIGHT_HINT,j as HidableTextField,dt as LINK_FIELD_MARKER,uc as Label,Ie as MEDIA_FIELD_MARKER,pu as MEDIA_TYPE_OPTIONS,yc as NOT_BOUND_TO_POST,Dc as PanelBand,ps as PanelNoteLine,Ks as RowPropsContext,pt as SCAFFOLD_FIELD_MARKER,ku as SCALAR_TEXT_CONTROLS,es as SiteGapDefaultReset,q as Slider,hs as Swatches,Lu as TEXT_CONTROL_KINDS,N as TEXT_FIELD_MARKER,Su as TICKER_ITEMS_ROW,Sl as TextListField,al as ThemeFillRow,we as WIDTH_LABEL,ss as WidthDefaultReset,wl as aimAfterListChange,Qc as anchorFields,$ as backTo,Bc as backgroundField,Wc as boxBlockSpacingField,$c as boxColumnsFields,iu as boxFillField,Us as boxPhoneRowField,Hs as boxShareField,Kc as boxSharePhoneField,Xc as boxShareTabletField,dl as boxThemeIndexOf,Lc as bucketHeader,Mc as buttonWordsEntryField,Ds as cardCornersField,bs as cardImageBackgroundField,Rn as cardImageField,Eu as cardImageFields,yu as cardMediaFields,Uc as cardShapeFields,Ou as cardShowFields,xu as cardStyleFields,Vc as cellWidthFields,ru as colorInput,pc as containerDirectionField,ts as containerGapField,ns as containerGapPhoneField,dc as containerGapRows,os as containerGapTabletField,ml as coordsResultTip,Ec as copyText,bn as cornerSidesField,Ze as cornersRowField,gn as cornersUnitFields,eu as customCssFields,nu as date,tu as dateTime,kc as designGroupHeader,Iu as displayFields,au as edgePad,tt as fillSlotChoices,wu as focusAfterRemove,su as focusKeptField,Fc as foldMarker,Ee as foldMetaOf,fs as foldTitleOf,Zs as followedHeightPatch,sl as followedStickPatch,Ru as galleryLayoutField,Nu as galleryLayoutPhoneField,Jc as heightFields,Se as heightFollowedBy,Js as heightLayersAt,fc as heroGroupPlacementPoints,ut as hidableText,ds as hintIsWhileTyping,Tu as imageCornersField,_c as inOwnBox,Ac as isBucketHeader,mn as keptBy,Tc as linkField,fl as loadingRowHint,fu as loadingShowsField,mu as mediaFieldPaths,ot as mediaFields,cu as multiSelect,ou as pageBackgroundField,Pc as panelNote,js as phoneOverrideField,Ic as plainText,Rc as plainTextarea,ws as pxField,vc as quietMarker,ct as readHidable,gl as rowText,uu as searchSelect,gs as sectionBandChoices,xs as sectionCornersField,Gc as sectionShapeFields,Hc as sectionThemeFields,bl as setRowText,jc as sizeField,du as sourceField,Yc as spacingFields,Zc as stickFields,zc as swapPadding,xc as text,Kn as textFieldIdentifier,gc as textFieldOffPage,wc as textFieldPanelOnly,_u as textList,Cu as textListRowField,Oc as textarea,Tn as toggle,hu as upload,me as useLengthRow,ge as useSelectedPatch,E as useSelectedProps,R as useSelectedSibling,Qi as useSiteGapDetail,qc as widthField,Sc as withIdentifier,mc as withOffPage,bc as withPanelOnly,hc as withScaffold};
@@ -1 +1 @@
1
- import{HEADER_TYPE as e,FOOTER_TYPE as r,newNodeId as p}from"efficient-easel/draw";import{EMAIL_SIGNUP_PH as i,FOOTER_PAYMENT_SEED as F}from"../../../format/lib/content/footer.js";function c(){return{type:e,props:{id:p(e)}}}const l=[{type:"FooterLogo",label:"Logo"},{type:"FooterMenu",label:"Menu"},{type:"FooterText",label:"Text"},{type:"FooterEmailSignup",label:"Email Form"},{type:"FooterSocial",label:"Social Logos"},{type:"FooterPayment",label:"Payment Logos"},{type:"FooterGroup",label:"Footer Box"}],a=l.filter(o=>o.type!=="FooterLogo"&&o.type!=="FooterGroup"),u="FooterGroup",_="blocks";function b(o){return o===r?l:o===u?a:null}function m(){const o=(t,n)=>({type:t,props:{id:`${t}-${crypto.randomUUID()}`,...n}});return[o("FooterLogo",{widthPct:100,align:"left",tagline:""}),o("FooterEmailSignup",{...i}),o("FooterPayment",{...F})]}export{_ as FOOTER_BLOCKS_SLOT,l as FOOTER_BLOCK_CHOICES,u as FOOTER_GROUP_TYPE,r as FOOTER_TYPE,a as GROUP_BLOCK_CHOICES,e as HEADER_TYPE,b as blockChoicesFor,m as buildDefaultFooterBlocks,c as buildDefaultHeaderNode};
1
+ import{newId as p}from"efficient-easel/data";import{HEADER_TYPE as e,FOOTER_TYPE as r,newNodeId as i}from"efficient-easel/draw";import{EMAIL_SIGNUP_PH as F,FOOTER_PAYMENT_SEED as u}from"../../../format/lib/content/footer.js";function m(){return{type:e,props:{id:i(e)}}}const l=[{type:"FooterLogo",label:"Logo"},{type:"FooterMenu",label:"Menu"},{type:"FooterText",label:"Text"},{type:"FooterEmailSignup",label:"Email Form"},{type:"FooterSocial",label:"Social Logos"},{type:"FooterPayment",label:"Payment Logos"},{type:"FooterGroup",label:"Footer Box"}],a=l.filter(o=>o.type!=="FooterLogo"&&o.type!=="FooterGroup"),E="FooterGroup",b="blocks";function f(o){return o===r?l:o===E?a:null}function s(){const o=(t,n)=>({type:t,props:{id:p(t),...n}});return[o("FooterLogo",{widthPct:100,align:"left",tagline:""}),o("FooterEmailSignup",{...F}),o("FooterPayment",{...u})]}export{b as FOOTER_BLOCKS_SLOT,l as FOOTER_BLOCK_CHOICES,E as FOOTER_GROUP_TYPE,r as FOOTER_TYPE,a as GROUP_BLOCK_CHOICES,e as HEADER_TYPE,f as blockChoicesFor,s as buildDefaultFooterBlocks,m as buildDefaultHeaderNode};
@@ -0,0 +1,5 @@
1
+ type Props = Record<string, unknown>;
2
+ type FrameOf = (props: Props) => number;
3
+ type Note = (props: Props, frame: number) => string | null;
4
+ export declare function ownPaddingFields(frameOf: FrameOf, note: Note, label?: string): Record<string, unknown>;
5
+ export {};
@@ -0,0 +1 @@
1
+ import{jsx as i,Fragment as u,jsxs as c}from"react/jsx-runtime";import{useSelectedHost as d}from"efficient-easel/easel";import{SECTION_PAD_KEYS as m,padTotalKeys as f}from"../../../render/lib/content/section-padding.js";import{sidesPaddingFields as p}from"./box-fields.js";function j({frameOf:t,note:o}){const e=d()?.values,n=e?o(e,t(e)):null;return n?i("p",{className:"es-field-hint",children:n}):null}const O=new Set(f().filter(t=>t.startsWith(m.top)));function F(t,o,e){const n=p({tablet:!0,siteSide:!0,...e?{label:e}:{},useFallback:()=>{const s=d()?.values,r=s?t(s):0;return{top:r,bottom:r}}});return Object.fromEntries(Object.entries(n).map(([s,r])=>{const a=r.render;return!O.has(s)||typeof a!="function"?[s,r]:[s,{...r,render:l=>c(u,{children:[a(l),i(j,{frameOf:t,note:o})]})}]}))}export{F as ownPaddingFields};
@@ -1 +1 @@
1
- import e from"../../../components/PreviewPartAnchors.js";import{animationTabFields as r}from"../../animation/fields.js";import{BLOCK_THEME_FOLLOW_LABEL as s,SECTION_THEME_FOLLOW_LABEL as t}from"../../../components/SectionThemePicker.js";import{anchorFields as m,cardShapeFields as d,customCssFields as l,cellWidthFields as n,heightFields as p,sectionShapeFields as F,sectionThemeFields as a,spacingFields as c,stickFields as h,widthField as S}from"../controls.js";import{blockSizeFieldSet as E}from"efficient-easel/screen/lib/document/block-size-fields";import{VIEW_KEY_ACCESS as f}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as L,rowSay as _,sidesPaddingFields as T}from"../box-fields.js";import{assignSectionGroups as O}from"../field-groups.js";import{boxGutterFields as A}from"../box-gutter-field.js";import{sectionOwnWidthFields as g}from"../section-own-width-fields.js";import{dropEmptyHeadings as w}from"../panel-drop-empty-headings.js";import{rowsShownForNode as C}from"../show-when-resolve.js";const z={spacingFields:c,sidesPaddingFields:T,sectionShapeFields:F,cardShapeFields:d,cellWidthFields:n,widthField:S,boxGutterFields:A,sectionOwnWidthFields:g,heightFields:p,anchorFields:m,customCssFields:l,stickFields:h,sectionThemeFields:a,animationTabFields:r,blockSizeFields:({tablet:i,...o}={})=>E({...o,shorten:!0,say:_,lengthUnits:L,...i?{phone:f}:{}}),assignSectionGroups:O,dropEmptyHeadings:w,rowsShownForNode:C,SECTION_THEME_FOLLOW_LABEL:t,BLOCK_THEME_FOLLOW_LABEL:s,PartAnchors:e};export{z as PASS_INSPECTOR};
1
+ import r from"../../../components/PreviewPartAnchors.js";import{animationTabFields as e}from"../../animation/fields.js";import{BLOCK_THEME_FOLLOW_LABEL as s,SECTION_THEME_FOLLOW_LABEL as t}from"../../../components/SectionThemePicker.js";import{anchorFields as m,cardShapeFields as d,customCssFields as l,cellWidthFields as n,heightFields as p,sectionShapeFields as F,sectionThemeFields as a,spacingFields as c,stickFields as h,widthField as S}from"../controls.js";import{blockSizeFieldSet as E}from"efficient-easel/screen/lib/document/block-size-fields";import{VIEW_KEY_ACCESS as f}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as L,rowSay as _,sidesPaddingFields as T}from"../box-fields.js";import{ownPaddingFields as O}from"../own-pad-fields.js";import{assignSectionGroups as g}from"../field-groups.js";import{boxGutterFields as w}from"../box-gutter-field.js";import{sectionOwnWidthFields as A}from"../section-own-width-fields.js";import{dropEmptyHeadings as P}from"../panel-drop-empty-headings.js";import{rowsShownForNode as C}from"../show-when-resolve.js";const M={spacingFields:c,sidesPaddingFields:T,ownPaddingFields:O,sectionShapeFields:F,cardShapeFields:d,cellWidthFields:n,widthField:S,boxGutterFields:w,sectionOwnWidthFields:A,heightFields:p,anchorFields:m,customCssFields:l,stickFields:h,sectionThemeFields:a,animationTabFields:e,blockSizeFields:({tablet:i,...o}={})=>E({...o,shorten:!0,say:_,lengthUnits:L,...i?{phone:f}:{}}),assignSectionGroups:g,dropEmptyHeadings:P,rowsShownForNode:C,SECTION_THEME_FOLLOW_LABEL:t,BLOCK_THEME_FOLLOW_LABEL:s,PartAnchors:r};export{M as PASS_INSPECTOR};
@@ -1 +1 @@
1
- "use client";import{settleCountNode as ee,settleCountSources as te}from"../../format/lib/content/count-numbers.js";import{SITE_FOOTER_SLUG as A}from"../../format/lib/content/footer.js";import{offeredSetsOf as U}from"./editor-blocks.js";import{isBackendError as L}from"efficient-easel/screen/lib/backend-error";import{isEfficientBackend as z}from"efficient-easel/screen/lib/session";import{noteLoaded as _,notePublished as T,noteSaved as N,pageLiveState as oe}from"./page-live-state.js";import{noteVideoFramesLoaded as ne,noteVideoFramesSaved as ie}from"./page-video-frames.js";import{noteSiteLiveState as se,refreshSiteLiveState as J}from"./site-live-state.js";import{say as re}from"../../format/lib/editor-words.js";import{sendSiteWrites as ae}from"../../format/lib/site-writes.js";import{isPopupPageLayout as le}from"../../format/lib/popup/new-popup.js";import{spliceChrome as ce,splitChrome as G}from"./pinned-chrome-doc.js";import{references as de,sectionNodeOf as ue,spliceShared as fe,splitShared as me}from"../../format/lib/shared-section-docs.js";import{setActiveSharedSections as W}from"../../format/lib/shared-sections-active.js";import{setActivePinnedChrome as Y}from"../../format/lib/pinned-chrome-lock.js";import{backendOf as $}from"./website-session.js";function I(o){return!!(o?.publish&&o.liveState)}function ve(o,i){if(!I(o))return;const{versions:a,nameVersion:d,restoreVersion:s,previewVersion:n}=o;if(!(!a||!d||!s||!n))return{list:()=>a.call(o,i),name:(f,S)=>d.call(o,f,S,i),restore:(f,S)=>s.call(o,f,S??{},i),preview:f=>n.call(o,f,i)}}function he(o,i){return async(a,d)=>{try{await ae()}catch(n){throw new Error(re("A change waiting to go live could not be saved."),{cause:n})}return(await o.publish(i)).state==="live"?se({state:"live",changes:[]}):J(0),{version:d??null}}}function V(o,i,a){const d=i?{siteId:i}:void 0;return{resolve:s=>o.load({slug:s,...d}).then(n=>(n&&(_(n.id,n.live),ne(n.id,n.videoFrames)),n)),saveLayout:(s,n,f,S)=>o.save(s,{layout:n},{version:f,clientId:S??""}).then(v=>(N(s,v.live),ie(s,v.videoFrames),J(),v)),rereadVersion:o.version?s=>o.version(s):void 0,publish:I(a)?he(a,d):o.publish?(s,n)=>o.publish(s,n?{version:n}:void 0).then(f=>(T(s,f.live),f)):void 0,listPages:()=>o.list(d),createPage:o.create?s=>o.create({...s,...d}):void 0,deletePage:o.remove?(s,n)=>o.remove(s,n):void 0}}function pe(o,i,a,d,s=!1){let n=null;const f=new Set;let S=!1,v=new Map,y=new Map,m=new Map,P=new Map,g={docId:null,lockHolder:null,conflict:null,saveFailed:!1,unpublished:!1,loadFailed:!1,sections:[]};const k=new Set,E=()=>{if(!n)return!1;const e=oe(n.id);return e==="changed"||e==="never"||e===void 0&&S},w=e=>{g={...g,...e,docId:n?.id??null,unpublished:E(),sections:[...m.values()]};for(const t of k)t()},F=(e,t,r)=>{t?m.set(e,{section:e,title:v.get(e)?.title??"",problem:t,holder:r}):m.delete(e)},H=e=>e&&typeof e=="object"&&!Array.isArray(e)?e:{},C=e=>f.has(e),R=()=>new Map([...v].map(([e,t])=>[e,t.layout])),j=()=>`SharedSection-${typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():Math.random().toString(36).slice(2)}`,M=(e,t,r,l)=>{const c=H(t);v.set(e,{layout:c,version:r,savedJson:JSON.stringify(c),title:l})},D={state:()=>g,subscribe:e=>(k.add(e),()=>{k.delete(e)})},Q={sectionOf:e=>y.get(e)?.section??null,heldElsewhere:e=>{const t=y.get(e)?.section;return!!(t&&m.get(t)?.problem==="lock")},adopt:(e,t)=>{M(t.id,t.layout,t.layout_updated_at,t.title),y.set(e,{section:t.id,refId:j()}),P.set(t.id,t.used_on),w({})},place:e=>{if([...y.values()].some(l=>l.section===e.id))return null;const t=ue(H(e.layout)),r=typeof t?.props?.id=="string"?t.props.id:null;return!t||!r||!t.type?null:(M(e.id,e.layout,e.layout_updated_at,e.title),y.set(r,{section:e.id,refId:j()}),P.set(e.id,e.used_on),t)},usedOn:e=>P.get(e)??null,learn:e=>{for(const t of e){P.set(t.id,t.used_on);const r=v.get(t.id);r&&(r.title=t.title);const l=m.get(t.id);l&&m.set(t.id,{...l,title:t.title})}w({})}},X=async(e,t)=>{for(const[r,l]of e){const c=v.get(r),u=JSON.stringify(l);if(!(!c||u===c.savedJson||m.get(r)?.problem==="lock"))try{const h=await o.save(r,{layout:l},{version:c.version,clientId:t??""});N(r,h.live),c.layout=l,c.version=h.version,c.savedJson=u,F(r,null)}catch(h){L(h,"changed-elsewhere")?F(r,"conflict"):L(h,"lock-taken")?F(r,"lock",h.holder??void 0):F(r,"save")}}e.size&&J(),w({})};return{resolve:async e=>{if(Y(e===A?null:D),W(e===A?null:Q),v=new Map,y=new Map,m=new Map,P=new Map,e===A)return a.resolve(e);let t=!1;const[r,l]=await Promise.all([a.resolve(e),o.load({slug:A,...i}).catch(()=>(t=!0,null))]);if(l&&!le(r?.layout)){_(l.id,l.live);const p=H(l.layout);n={id:l.id,layout:p,version:l.version,savedJson:""}}else n=null;if(S=!1,!r)return w({conflict:null,saveFailed:!1,loadFailed:t}),r;const c=H(r.layout),u=de(c),h=await Promise.all(u.map(p=>o.load({id:p.section,...i}).catch(()=>null)));u.forEach((p,Z)=>{const b=h[Z];b?(_(b.id,b.live),M(p.section,b.layout,b.version,"")):(v.delete(p.section),m.set(p.section,{section:p.section,title:"",problem:"load"}))});const B=fe(c,R());if(y=B.held,!n)return y.size&&f.add(r.id),w({conflict:null,saveFailed:!1,loadFailed:t}),y.size?{...r,layout:B.working}:r;const O=ce(B.working,n.layout);return n.savedJson=JSON.stringify(G(O,n.layout).chrome),f.add(r.id),w({conflict:null,saveFailed:!1,loadFailed:!1}),{...r,layout:O}},saveLayout:async(e,t,r,l)=>{if(!C(e))return a.saveLayout(e,t,r,l);const c=n,u=c?G(t,c.layout):{page:t,chrome:null},h=me(u.page,y,R()),B=await a.saveLayout(e,h.page,r,l);if(await X(h.docs,l),!c)return B;const O=JSON.stringify(u.chrome);if(!u.chrome||O===c.savedJson||g.lockHolder)return B;try{const p=await o.save(c.id,{layout:u.chrome},{version:c.version,clientId:l??""});N(c.id,p.live),J(),c.layout=u.chrome,c.version=p.version,c.savedJson=O,S=!0,w({conflict:null,saveFailed:!1})}catch(p){L(p,"changed-elsewhere")?w({conflict:p.conflict??{savedBy:"",savedByYou:!1,secondsAgo:0}}):L(p,"lock-taken")?w({lockHolder:p.holder??{name:"",secondsSinceSeen:0,secondsSinceHeld:0}}):w({saveFailed:!0})}return B},publish:a.publish?async(e,t)=>{const r=await a.publish(e,t),l=n;if(l&&C(e)&&!s&&o.publish&&E()&&!g.lockHolder){const c=await o.publish(l.id,l.version?{version:l.version}:void 0);T(l.id,c.live),c.version!==null&&(l.version=c.version),S=!1,w({})}if(C(e)&&!s&&o.publish)for(const[c,u]of v){if(m.get(c)?.problem==="lock")continue;const h=await o.publish(c,u.version?{version:u.version}:void 0);T(c,h.live),h.version!==null&&(u.version=h.version)}return r}:void 0,lock:d?{claim:async(e,t,r)=>{const l=await d.claim(e,t,r);if(!C(e))return l;const c=n;if(c)try{await d.claim(c.id,t,!1),g.lockHolder&&w({lockHolder:null})}catch(u){L(u,"lock-taken")&&w({lockHolder:u.holder??{name:"",secondsSinceSeen:0,secondsSinceHeld:0}})}for(const u of v.keys())try{await d.claim(u,t,!1),m.get(u)?.problem==="lock"&&F(u,null)}catch(h){L(h,"lock-taken")&&F(u,"lock",h.holder??void 0)}return v.size&&w({}),l},release:async(e,t)=>{if(await d.release(e,t),!C(e))return;const r=n;r&&!g.lockHolder&&await d.release(r.id,t).catch(()=>{});for(const l of v.keys())m.get(l)?.problem!=="lock"&&await d.release(l,t).catch(()=>{})}}:void 0,pinnedChrome:D}}function q(o){const i=(a,d,s)=>o.save(a,d.layout?{...d,layout:te(d.layout)}:d,s);return new Proxy(o,{get(a,d){if(d==="save")return i;const s=Reflect.get(a,d,a);return typeof s=="function"?s.bind(a):s}})}function Me(o,i,a){return o.update(i,ee(a))}function _e(o,i=$(),a=U(),d={}){const s=z(i),n=o?{siteId:o}:void 0,f=s?!!o:!0,S=i.site.update,v=s&&a.commerce&&a.service,y=!!d.editsPinnedInPlace&&v,m=I(i.site)?i.site:void 0,P=q(i.pages),g=V(P,o,m),k=y?pe(P,n,g,i.lock,!!m):null;return{capabilities:{canPublish:!!m||!!i.pages.publish,hasSiteSettings:s,hasSiteTheme:!!i.theme,placeholderFrames:!1,mediaEditing:!0,pageCreationInAdminForm:!i.pages.create,canDeletePagesInline:!!i.pages.remove,hasEditLock:!!i.lock,hasEditGuard:!0,hasPinnedChrome:v,editsPinnedInPlace:y,explainsSiteSettings:!1,hasSiteRecord:f,canEditSiteRecord:f&&!!S,hasPreviewLink:s||!!i.preview,hasCatalog:s&&a.commerce,hasForms:s&&a.service,hasBlog:!!i.blog&&a.service,offersCommerce:a.commerce,offersService:a.service},...g,...K(g.resolve),lock:i.lock,...k,site:f?()=>i.site.get(n):void 0,siteLiveState:m?()=>m.liveState(n):void 0,siteVersions:ve(m,n),updateSite:f&&S?E=>S(E,n):void 0,previewHref:i.preview?E=>i.preview.href(E):void 0}}function Te(o,i=$(),a=U()){const d=z(i),s=i.templates,n=s?q(s.pages(o)):{list:()=>Promise.reject(new Error(x)),load:()=>Promise.reject(new Error(x)),save:()=>Promise.reject(new Error(x))};return{capabilities:{canPublish:!1,hasSiteSettings:!1,hasSiteTheme:!1,placeholderFrames:!0,mediaEditing:!1,pageCreationInAdminForm:!n.create,canDeletePagesInline:!!n.remove,hasEditLock:!1,hasEditGuard:!1,hasPinnedChrome:d&&a.commerce&&a.service,editsPinnedInPlace:!1,explainsSiteSettings:d,hasSiteRecord:!1,canEditSiteRecord:!1,hasPreviewLink:!1,hasCatalog:d&&a.commerce,hasForms:d&&a.service,hasBlog:!!i.blog&&a.service,offersCommerce:a.commerce,offersService:a.service},...V(n,void 0),...K(V(n,void 0).resolve),publish:void 0,templateName:s?()=>s.get(o).then(f=>f.name):void 0}}function K(o){return{resolve:i=>(Y(null),W(null),o(i))}}const x="This editor's backend has no website templates.";export{_e as makeSitePageAdapter,Te as makeTemplatePageAdapter,Me as saveSectionTemplate,q as settlingPages};
1
+ "use client";import{settleCountNode as ee,settleCountSources as te}from"../../format/lib/content/count-numbers.js";import{newId as oe}from"efficient-easel/data";import{SITE_FOOTER_SLUG as A}from"../../format/lib/content/footer.js";import{offeredSetsOf as D}from"./editor-blocks.js";import{isBackendError as L}from"efficient-easel/screen/lib/backend-error";import{isEfficientBackend as G}from"efficient-easel/screen/lib/session";import{noteLoaded as M,notePublished as T,noteSaved as N,pageLiveState as ne}from"./page-live-state.js";import{noteVideoFramesLoaded as ie,noteVideoFramesSaved as se}from"./page-video-frames.js";import{noteSiteLiveState as re,refreshSiteLiveState as J}from"./site-live-state.js";import{say as le}from"../../format/lib/editor-words.js";import{sendSiteWrites as ae}from"../../format/lib/site-writes.js";import{isPopupPageLayout as ce}from"../../format/lib/popup/new-popup.js";import{spliceChrome as de,splitChrome as U}from"./pinned-chrome-doc.js";import{references as ue,sectionNodeOf as fe,spliceShared as me,splitShared as ve}from"../../format/lib/shared-section-docs.js";import{setActiveSharedSections as W}from"../../format/lib/shared-sections-active.js";import{setActivePinnedChrome as Y}from"../../format/lib/pinned-chrome-lock.js";import{backendOf as q}from"./website-session.js";function V(o){return!!(o?.publish&&o.liveState)}function he(o,i){if(!V(o))return;const{versions:l,nameVersion:d,restoreVersion:s,previewVersion:n}=o;if(!(!l||!d||!s||!n))return{list:()=>l.call(o,i),name:(f,w)=>d.call(o,f,w,i),restore:(f,w)=>s.call(o,f,w??{},i),preview:f=>n.call(o,f,i)}}function pe(o,i){return async(l,d)=>{try{await ae()}catch(n){throw new Error(le("A change waiting to go live could not be saved."),{cause:n})}return(await o.publish(i)).state==="live"?re({state:"live",changes:[]}):J(0),{version:d??null}}}function x(o,i,l){const d=i?{siteId:i}:void 0;return{resolve:s=>o.load({slug:s,...d}).then(n=>(n&&(M(n.id,n.live),ie(n.id,n.videoFrames)),n)),saveLayout:(s,n,f,w)=>o.save(s,{layout:n},{version:f,clientId:w??""}).then(v=>(N(s,v.live),se(s,v.videoFrames),J(),v)),rereadVersion:o.version?s=>o.version(s):void 0,publish:V(l)?pe(l,d):o.publish?(s,n)=>o.publish(s,n?{version:n}:void 0).then(f=>(T(s,f.live),f)):void 0,listPages:()=>o.list(d),createPage:o.create?s=>o.create({...s,...d}):void 0,deletePage:o.remove?(s,n)=>o.remove(s,n):void 0}}function we(o,i,l,d,s=!1){let n=null;const f=new Set;let w=!1,v=new Map,y=new Map,m=new Map,P=new Map,g={docId:null,lockHolder:null,conflict:null,saveFailed:!1,unpublished:!1,loadFailed:!1,sections:[]};const k=new Set,E=()=>{if(!n)return!1;const e=ne(n.id);return e==="changed"||e==="never"||e===void 0&&w},S=e=>{g={...g,...e,docId:n?.id??null,unpublished:E(),sections:[...m.values()]};for(const t of k)t()},F=(e,t,r)=>{t?m.set(e,{section:e,title:v.get(e)?.title??"",problem:t,holder:r}):m.delete(e)},H=e=>e&&typeof e=="object"&&!Array.isArray(e)?e:{},C=e=>f.has(e),R=()=>new Map([...v].map(([e,t])=>[e,t.layout])),j=()=>oe("SharedSection"),_=(e,t,r,a)=>{const c=H(t);v.set(e,{layout:c,version:r,savedJson:JSON.stringify(c),title:a})},z={state:()=>g,subscribe:e=>(k.add(e),()=>{k.delete(e)})},X={sectionOf:e=>y.get(e)?.section??null,heldElsewhere:e=>{const t=y.get(e)?.section;return!!(t&&m.get(t)?.problem==="lock")},adopt:(e,t)=>{_(t.id,t.layout,t.layout_updated_at,t.title),y.set(e,{section:t.id,refId:j()}),P.set(t.id,t.used_on),S({})},place:e=>{if([...y.values()].some(a=>a.section===e.id))return null;const t=fe(H(e.layout)),r=typeof t?.props?.id=="string"?t.props.id:null;return!t||!r||!t.type?null:(_(e.id,e.layout,e.layout_updated_at,e.title),y.set(r,{section:e.id,refId:j()}),P.set(e.id,e.used_on),t)},usedOn:e=>P.get(e)??null,learn:e=>{for(const t of e){P.set(t.id,t.used_on);const r=v.get(t.id);r&&(r.title=t.title);const a=m.get(t.id);a&&m.set(t.id,{...a,title:t.title})}S({})}},Z=async(e,t)=>{for(const[r,a]of e){const c=v.get(r),u=JSON.stringify(a);if(!(!c||u===c.savedJson||m.get(r)?.problem==="lock"))try{const h=await o.save(r,{layout:a},{version:c.version,clientId:t??""});N(r,h.live),c.layout=a,c.version=h.version,c.savedJson=u,F(r,null)}catch(h){L(h,"changed-elsewhere")?F(r,"conflict"):L(h,"lock-taken")?F(r,"lock",h.holder??void 0):F(r,"save")}}e.size&&J(),S({})};return{resolve:async e=>{if(Y(e===A?null:z),W(e===A?null:X),v=new Map,y=new Map,m=new Map,P=new Map,e===A)return l.resolve(e);let t=!1;const[r,a]=await Promise.all([l.resolve(e),o.load({slug:A,...i}).catch(()=>(t=!0,null))]);if(a&&!ce(r?.layout)){M(a.id,a.live);const p=H(a.layout);n={id:a.id,layout:p,version:a.version,savedJson:""}}else n=null;if(w=!1,!r)return S({conflict:null,saveFailed:!1,loadFailed:t}),r;const c=H(r.layout),u=ue(c),h=await Promise.all(u.map(p=>o.load({id:p.section,...i}).catch(()=>null)));u.forEach((p,$)=>{const b=h[$];b?(M(b.id,b.live),_(p.section,b.layout,b.version,"")):(v.delete(p.section),m.set(p.section,{section:p.section,title:"",problem:"load"}))});const B=me(c,R());if(y=B.held,!n)return y.size&&f.add(r.id),S({conflict:null,saveFailed:!1,loadFailed:t}),y.size?{...r,layout:B.working}:r;const O=de(B.working,n.layout);return n.savedJson=JSON.stringify(U(O,n.layout).chrome),f.add(r.id),S({conflict:null,saveFailed:!1,loadFailed:!1}),{...r,layout:O}},saveLayout:async(e,t,r,a)=>{if(!C(e))return l.saveLayout(e,t,r,a);const c=n,u=c?U(t,c.layout):{page:t,chrome:null},h=ve(u.page,y,R()),B=await l.saveLayout(e,h.page,r,a);if(await Z(h.docs,a),!c)return B;const O=JSON.stringify(u.chrome);if(!u.chrome||O===c.savedJson||g.lockHolder)return B;try{const p=await o.save(c.id,{layout:u.chrome},{version:c.version,clientId:a??""});N(c.id,p.live),J(),c.layout=u.chrome,c.version=p.version,c.savedJson=O,w=!0,S({conflict:null,saveFailed:!1})}catch(p){L(p,"changed-elsewhere")?S({conflict:p.conflict??{savedBy:"",savedByYou:!1,secondsAgo:0}}):L(p,"lock-taken")?S({lockHolder:p.holder??{name:"",secondsSinceSeen:0,secondsSinceHeld:0}}):S({saveFailed:!0})}return B},publish:l.publish?async(e,t)=>{const r=await l.publish(e,t),a=n;if(a&&C(e)&&!s&&o.publish&&E()&&!g.lockHolder){const c=await o.publish(a.id,a.version?{version:a.version}:void 0);T(a.id,c.live),c.version!==null&&(a.version=c.version),w=!1,S({})}if(C(e)&&!s&&o.publish)for(const[c,u]of v){if(m.get(c)?.problem==="lock")continue;const h=await o.publish(c,u.version?{version:u.version}:void 0);T(c,h.live),h.version!==null&&(u.version=h.version)}return r}:void 0,lock:d?{claim:async(e,t,r)=>{const a=await d.claim(e,t,r);if(!C(e))return a;const c=n;if(c)try{await d.claim(c.id,t,!1),g.lockHolder&&S({lockHolder:null})}catch(u){L(u,"lock-taken")&&S({lockHolder:u.holder??{name:"",secondsSinceSeen:0,secondsSinceHeld:0}})}for(const u of v.keys())try{await d.claim(u,t,!1),m.get(u)?.problem==="lock"&&F(u,null)}catch(h){L(h,"lock-taken")&&F(u,"lock",h.holder??void 0)}return v.size&&S({}),a},release:async(e,t)=>{if(await d.release(e,t),!C(e))return;const r=n;r&&!g.lockHolder&&await d.release(r.id,t).catch(()=>{});for(const a of v.keys())m.get(a)?.problem!=="lock"&&await d.release(a,t).catch(()=>{})}}:void 0,pinnedChrome:z}}function K(o){const i=(l,d,s)=>o.save(l,d.layout?{...d,layout:te(d.layout)}:d,s);return new Proxy(o,{get(l,d){if(d==="save")return i;const s=Reflect.get(l,d,l);return typeof s=="function"?s.bind(l):s}})}function Te(o,i,l){return o.update(i,ee(l))}function Ne(o,i=q(),l=D(),d={}){const s=G(i),n=o?{siteId:o}:void 0,f=s?!!o:!0,w=i.site.update,v=s&&l.commerce&&l.service,y=!!d.editsPinnedInPlace&&v,m=V(i.site)?i.site:void 0,P=K(i.pages),g=x(P,o,m),k=y?we(P,n,g,i.lock,!!m):null;return{capabilities:{canPublish:!!m||!!i.pages.publish,hasSiteSettings:s,hasSiteTheme:!!i.theme,placeholderFrames:!1,mediaEditing:!0,pageCreationInAdminForm:!i.pages.create,canDeletePagesInline:!!i.pages.remove,hasEditLock:!!i.lock,hasEditGuard:!0,hasPinnedChrome:v,editsPinnedInPlace:y,explainsSiteSettings:!1,hasSiteRecord:f,canEditSiteRecord:f&&!!w,hasPreviewLink:s||!!i.preview,hasCatalog:s&&l.commerce,hasForms:s&&l.service,hasBlog:!!i.blog&&l.service,offersCommerce:l.commerce,offersService:l.service},...g,...Q(g.resolve),lock:i.lock,...k,site:f?()=>i.site.get(n):void 0,siteLiveState:m?()=>m.liveState(n):void 0,siteVersions:he(m,n),updateSite:f&&w?E=>w(E,n):void 0,previewHref:i.preview?E=>i.preview.href(E):void 0}}function Ve(o,i=q(),l=D()){const d=G(i),s=i.templates,n=s?K(s.pages(o)):{list:()=>Promise.reject(new Error(I)),load:()=>Promise.reject(new Error(I)),save:()=>Promise.reject(new Error(I))};return{capabilities:{canPublish:!1,hasSiteSettings:!1,hasSiteTheme:!1,placeholderFrames:!0,mediaEditing:!1,pageCreationInAdminForm:!n.create,canDeletePagesInline:!!n.remove,hasEditLock:!1,hasEditGuard:!1,hasPinnedChrome:d&&l.commerce&&l.service,editsPinnedInPlace:!1,explainsSiteSettings:d,hasSiteRecord:!1,canEditSiteRecord:!1,hasPreviewLink:!1,hasCatalog:d&&l.commerce,hasForms:d&&l.service,hasBlog:!!i.blog&&l.service,offersCommerce:l.commerce,offersService:l.service},...x(n,void 0),...Q(x(n,void 0).resolve),publish:void 0,templateName:s?()=>s.get(o).then(f=>f.name):void 0}}function Q(o){return{resolve:i=>(Y(null),W(null),o(i))}}const I="This editor's backend has no website templates.";export{Ne as makeSitePageAdapter,Ve as makeTemplatePageAdapter,Te as saveSectionTemplate,K as settlingPages};
@@ -1 +1 @@
1
- import{MEDIA_ZONES as I,MEDIA_ZONE_LABELS as S}from"efficient-easel/screen/lib/content/media-zones";import{HOVER_MOTION as A,hoverKindsOf as a,motionSeconds as s}from"efficient-shell/format";import{ANGLE_RANGE as D}from"../content/box-angle.js";import{finiteNumber as u}from"../finite-number.js";const i="hover",q="_gHover",L={none:"None",nextImage:"Show next image",rotate:"Rotate",zoom:"Zoom",lift:"Lift",mono:"Black and white"},c="highlight",V="Highlight",J=["none",c],Q={none:L.none,[c]:V};function N(e){return e[i]===c?c:"none"}const $="transition-colors hover:bg-[var(--sf-hl-bg)]! hover:[--fg:var(--sf-hl-ink)] active:bg-[var(--sf-hl-bg)]! active:[--fg:var(--sf-hl-ink)]",ee="hover:[--fg:var(--sf-hl-ink)]! hover:[--fg-dim:inherit]! hover:[--site-line:inherit]! hover:[color:inherit]! active:[--fg:var(--sf-hl-ink)]! active:[--fg-dim:inherit]! active:[--site-line:inherit]! active:[color:inherit]!";function ne(e,n){return N(e)!==c?null:{"--sf-hl-bg":n("surface"),"--sf-hl-ink":n("main")}}const k=a(["none","lift"]);function oe(e){const n=e[i];return k.includes(n)?n:"none"}const O=a(["none","nextImage","rotate"]),r={kind:i,angle:"hoverAngle",duration:"hoverDuration",delay:"hoverDelay",mediaKind:"hoverKind",mediaGroup:"hoverGroup",cover:"hoverCover"},f="spinOnHover",E=D,x={ProductGrid:"rotate",RelatedProducts:"rotate",AlloyWheelsListing:"none"},te=Object.keys(x);function C(e){return x[e]??"none"}const K=A.rotateFallbackDeg,T=e=>e==="rendering"?"renderings":e,B=e=>e==="renderings"?"rendering":e,R=Object.freeze(I.filter(e=>e!=="videos").map(T)),re=Object.freeze(Object.fromEntries(R.map(e=>[e,S[B(e)]]))),G=["finish","first"],ie={finish:"Same finish",first:"First group"},M=["card","picture"],ce={card:"Whole card",picture:"Picture"},d={kind:"photos",group:"finish",cover:"card"},l=(e,n,o)=>e.includes(n)?n:o;function m(e){return{kind:l(R,e[r.mediaKind],d.kind),group:l(G,e[r.mediaGroup],d.group),cover:l(M,e[r.cover],d.cover)}}function ae(){return{field:r.kind,is:"nextImage"}}function P(e,n){const o=e[r.kind];if(O.includes(o))return o;const t=e[f];return typeof t=="boolean"?t?"rotate":"none":n}function b(e){const n=u(e);return n===void 0?K:Math.min(E.max,Math.max(E.min,n))}function se(e,n){const o=C(n),t=P(e,o);return{kind:t,angle:t==="rotate"?b(e[r.angle]):null,duration:s("hover","duration",t==="rotate"?e[r.duration]:void 0),delay:s("hover","delay",t==="rotate"?e[r.delay]:void 0),...t==="nextImage"?{media:m(e)}:{}}}function ue(e){const n={field:r.kind,in:[...O]};return{any:[{field:r.kind,is:"rotate"},{all:[{not:n},e==="rotate"?{not:{field:f,is:!1}}:{field:f,is:!0}]}]}}const v=a(["none","mono"]),y=a(["none","nextImage","mono"]),H={ImageBlock:"none",Manifesto:"none",Split:"none",ContactLocations:"mono"},fe=Object.keys(H);function U(e){return H[e]??"none"}const h={zoom:"hoverZoom",darken:"hoverDarken"},p={min:100,max:150,step:1,unit:"%"};function X(e){const n=u(e[h.zoom]);if(n===void 0)return null;const o=Math.min(p.max,Math.max(p.min,n));return o===p.min?null:String(o/100)}function W(e){const n=u(e[h.darken]);return n!==void 0&&n>0?n:null}const de="hoverShow",le="cardHover",pe="always",Y=["ImageBlock","Flex"];function Z(e,n,o=v){const t=e[i];return o.includes(t)?t:n}function _e(e,n=""){const o=Y.includes(n)?y:v,t=Z(e,U(n),o),_=t==="mono";return{kind:t,duration:s("hover","duration",_?e[r.duration]:void 0),delay:s("hover","delay",_?e[r.delay]:void 0),...t==="nextImage"?{media:m(e),...n==="Flex"?g(e):{}}:g(e)}}function g(e){const n=X(e),o=W(e);return{...n?{zoom:n}:{},...o?{darken:o}:{}}}function Oe(){return{not:{field:i,is:"nextImage"}}}function Ee(e){return e==="none"?{field:i,in:["mono","nextImage"]}:{not:{field:i,is:"none"}}}function xe(e){return e==="none"?{field:i,is:"mono"}:{not:{field:i,in:["none","nextImage"]}}}export{c as BOX_HIGHLIGHT,$ as BOX_HIGHLIGHT_CLASS,ee as BOX_HIGHLIGHT_OVER_ROW_INK_CLASS,J as BOX_HOVER_KINDS,Q as BOX_HOVER_LABELS,pe as BOX_SHOW_ALWAYS,de as BOX_SHOW_KEY,le as BOX_SHOW_ON_CARD_HOVER,E as CARD_HOVER_ANGLE,r as CARD_HOVER_KEYS,O as CARD_HOVER_KINDS,te as CARD_HOVER_SECTIONS,K as CARD_HOVER_TURN,V as HIGHLIGHT_LABEL,q as HOVER_GROUP_KEY,i as HOVER_KEY,L as HOVER_KIND_LABELS,M as HOVER_MEDIA_COVERS,ce as HOVER_MEDIA_COVER_LABELS,d as HOVER_MEDIA_DEFAULTS,G as HOVER_MEDIA_GROUPS,ie as HOVER_MEDIA_GROUP_LABELS,R as HOVER_MEDIA_KINDS,re as HOVER_MEDIA_KIND_LABELS,Y as NEXT_PICTURE_BLOCKS,y as NEXT_PICTURE_HOVER_KINDS,f as OLD_SPIN_KEY,k as PART_HOVER_KINDS,fe as PICTURE_HOVER_BLOCKS,h as PICTURE_HOVER_KEYS,v as PICTURE_HOVER_KINDS,p as PICTURE_HOVER_ZOOM,ne as boxHighlightStyle,N as boxHoverOf,b as cardHoverAngleOf,P as cardHoverKindOf,m as cardHoverMediaOf,se as cardHoverOf,C as cardHoverResting,ue as cardRotatesRule,ae as cardShowsNextRule,oe as hoverOf,W as pictureHoverDarkenOf,Z as pictureHoverKindOf,Oe as pictureHoverMoveRule,_e as pictureHoverOf,U as pictureHoverResting,Ee as pictureHoverRunsRule,xe as pictureHoverTimedRule,X as pictureHoverZoomOf};
1
+ import{MEDIA_ZONES as I,MEDIA_ZONE_LABELS as S}from"efficient-easel/screen/lib/content/media-zones";import{HOVER_MOTION as A,hoverKindsOf as s,motionSeconds as u}from"efficient-shell/format";import{ANGLE_RANGE as D}from"../content/box-angle.js";import{finiteNumber as f}from"../finite-number.js";import{parseOption as a}from"../parse-option.js";const i="hover",J="_gHover",L={none:"None",nextImage:"Show next image",rotate:"Rotate",zoom:"Zoom",lift:"Lift",mono:"Black and white"},c="highlight",V="Highlight",Q=["none",c],$={none:L.none,[c]:V};function N(e){return e[i]===c?c:"none"}const ee="transition-colors hover:bg-[var(--sf-hl-bg)]! hover:[--fg:var(--sf-hl-ink)] active:bg-[var(--sf-hl-bg)]! active:[--fg:var(--sf-hl-ink)]",ne="hover:[--fg:var(--sf-hl-ink)]! hover:[--fg-dim:inherit]! hover:[--site-line:inherit]! hover:[color:inherit]! active:[--fg:var(--sf-hl-ink)]! active:[--fg-dim:inherit]! active:[--site-line:inherit]! active:[color:inherit]!";function oe(e,n){return N(e)!==c?null:{"--sf-hl-bg":n("surface"),"--sf-hl-ink":n("main")}}const k=s(["none","lift"]);function te(e){const n=e[i];return a(k,"none",n)}const O=s(["none","nextImage","rotate"]),r={kind:i,angle:"hoverAngle",duration:"hoverDuration",delay:"hoverDelay",mediaKind:"hoverKind",mediaGroup:"hoverGroup",cover:"hoverCover"},p="spinOnHover",E=D,x={ProductGrid:"rotate",RelatedProducts:"rotate",AlloyWheelsListing:"none"},re=Object.keys(x);function C(e){return x[e]??"none"}const K=A.rotateFallbackDeg,T=e=>e==="rendering"?"renderings":e,B=e=>e==="renderings"?"rendering":e,m=Object.freeze(I.filter(e=>e!=="videos").map(T)),ie=Object.freeze(Object.fromEntries(m.map(e=>[e,S[B(e)]]))),G=["finish","first"],ae={finish:"Same finish",first:"First group"},M=["card","picture"],ce={card:"Whole card",picture:"Picture"},d={kind:"photos",group:"finish",cover:"card"};function R(e){return{kind:a(m,d.kind,e[r.mediaKind]),group:a(G,d.group,e[r.mediaGroup]),cover:a(M,d.cover,e[r.cover])}}function se(){return{field:r.kind,is:"nextImage"}}function P(e,n){const o=e[r.kind];if(O.includes(o))return o;const t=e[p];return typeof t=="boolean"?t?"rotate":"none":n}function b(e){const n=f(e);return n===void 0?K:Math.min(E.max,Math.max(E.min,n))}function ue(e,n){const o=C(n),t=P(e,o);return{kind:t,angle:t==="rotate"?b(e[r.angle]):null,duration:u("hover","duration",t==="rotate"?e[r.duration]:void 0),delay:u("hover","delay",t==="rotate"?e[r.delay]:void 0),...t==="nextImage"?{media:R(e)}:{}}}function fe(e){const n={field:r.kind,in:[...O]};return{any:[{field:r.kind,is:"rotate"},{all:[{not:n},e==="rotate"?{not:{field:p,is:!1}}:{field:p,is:!0}]}]}}const v=s(["none","mono"]),y=s(["none","nextImage","mono"]),H={ImageBlock:"none",Manifesto:"none",Split:"none",ContactLocations:"mono"},pe=Object.keys(H);function U(e){return H[e]??"none"}const h={zoom:"hoverZoom",darken:"hoverDarken"},l={min:100,max:150,step:1,unit:"%"};function X(e){const n=f(e[h.zoom]);if(n===void 0)return null;const o=Math.min(l.max,Math.max(l.min,n));return o===l.min?null:String(o/100)}function W(e){const n=f(e[h.darken]);return n!==void 0&&n>0?n:null}const de="hoverShow",le="cardHover",_e="always",Y=["ImageBlock","Flex"];function Z(e,n,o=v){const t=e[i];return a(o,n,t)}function Oe(e,n=""){const o=Y.includes(n)?y:v,t=Z(e,U(n),o),_=t==="mono";return{kind:t,duration:u("hover","duration",_?e[r.duration]:void 0),delay:u("hover","delay",_?e[r.delay]:void 0),...t==="nextImage"?{media:R(e),...n==="Flex"?g(e):{}}:g(e)}}function g(e){const n=X(e),o=W(e);return{...n?{zoom:n}:{},...o?{darken:o}:{}}}function Ee(){return{not:{field:i,is:"nextImage"}}}function xe(e){return e==="none"?{field:i,in:["mono","nextImage"]}:{not:{field:i,is:"none"}}}function me(e){return e==="none"?{field:i,is:"mono"}:{not:{field:i,in:["none","nextImage"]}}}export{c as BOX_HIGHLIGHT,ee as BOX_HIGHLIGHT_CLASS,ne as BOX_HIGHLIGHT_OVER_ROW_INK_CLASS,Q as BOX_HOVER_KINDS,$ as BOX_HOVER_LABELS,_e as BOX_SHOW_ALWAYS,de as BOX_SHOW_KEY,le as BOX_SHOW_ON_CARD_HOVER,E as CARD_HOVER_ANGLE,r as CARD_HOVER_KEYS,O as CARD_HOVER_KINDS,re as CARD_HOVER_SECTIONS,K as CARD_HOVER_TURN,V as HIGHLIGHT_LABEL,J as HOVER_GROUP_KEY,i as HOVER_KEY,L as HOVER_KIND_LABELS,M as HOVER_MEDIA_COVERS,ce as HOVER_MEDIA_COVER_LABELS,d as HOVER_MEDIA_DEFAULTS,G as HOVER_MEDIA_GROUPS,ae as HOVER_MEDIA_GROUP_LABELS,m as HOVER_MEDIA_KINDS,ie as HOVER_MEDIA_KIND_LABELS,Y as NEXT_PICTURE_BLOCKS,y as NEXT_PICTURE_HOVER_KINDS,p as OLD_SPIN_KEY,k as PART_HOVER_KINDS,pe as PICTURE_HOVER_BLOCKS,h as PICTURE_HOVER_KEYS,v as PICTURE_HOVER_KINDS,l as PICTURE_HOVER_ZOOM,oe as boxHighlightStyle,N as boxHoverOf,b as cardHoverAngleOf,P as cardHoverKindOf,R as cardHoverMediaOf,ue as cardHoverOf,C as cardHoverResting,fe as cardRotatesRule,se as cardShowsNextRule,te as hoverOf,W as pictureHoverDarkenOf,Z as pictureHoverKindOf,Ee as pictureHoverMoveRule,Oe as pictureHoverOf,U as pictureHoverResting,xe as pictureHoverRunsRule,me as pictureHoverTimedRule,X as pictureHoverZoomOf};
@@ -1,5 +1,6 @@
1
1
  export declare const ACCORDION_ROW_STYLE_PROP = "rowStyle";
2
- export type AccordionRowStyle = "plain" | "numbered" | "chevron";
2
+ declare const ACCORDION_ROW_STYLES: readonly ["plain", "numbered", "chevron"];
3
+ export type AccordionRowStyle = (typeof ACCORDION_ROW_STYLES)[number];
3
4
  export declare const ACCORDION_ROW_STYLE_POINTS: readonly {
4
5
  label: string;
5
6
  value: AccordionRowStyle;
@@ -11,3 +12,4 @@ export declare const QA_ROW_ANSWER_CLASS = "pb-8 pl-11 pr-8 max-view-wide:pl-0 m
11
12
  export declare const CHEVRON_ROW_CLASS = "border-t border-line";
12
13
  export declare const CHEVRON_ROW_SUMMARY_CLASS = "flex w-full cursor-pointer list-none items-center justify-between py-3 text-left [&::-webkit-details-marker]:hidden";
13
14
  export declare const CHEVRON_ROW_MARK_CLASS = "shrink-0 text-fg-dim transition-transform [details[open]>summary_&]:rotate-180";
15
+ export {};
@@ -1 +1 @@
1
- const t="rowStyle",r=[{label:"Plain",value:"plain"},{label:"Numbered",value:"numbered"}];function n(e){return e==="numbered"||e==="chevron"?e:"plain"}const o="flex cursor-pointer list-none items-center gap-6 py-7 [&::-webkit-details-marker]:hidden max-view-wide:gap-4 max-view-wide:py-5",i="font-mono text-[length:var(--size-label,14px)] tracking-[0.2em] text-accent",a="pb-8 pl-11 pr-8 max-view-wide:pl-0 max-view-wide:pr-0",l="border-t border-line",p="flex w-full cursor-pointer list-none items-center justify-between py-3 text-left [&::-webkit-details-marker]:hidden",_="shrink-0 text-fg-dim transition-transform [details[open]>summary_&]:rotate-180";export{r as ACCORDION_ROW_STYLE_POINTS,t as ACCORDION_ROW_STYLE_PROP,l as CHEVRON_ROW_CLASS,_ as CHEVRON_ROW_MARK_CLASS,p as CHEVRON_ROW_SUMMARY_CLASS,a as QA_ROW_ANSWER_CLASS,i as QA_ROW_NUMBER_CLASS,o as QA_ROW_SUMMARY_CLASS,n as accordionRowStyleOf};
1
+ import{parseOption as t}from"../parse-option.js";const o="rowStyle",r=["plain","numbered","chevron"],i=[{label:"Plain",value:"plain"},{label:"Numbered",value:"numbered"}];function a(e){return t(r,"plain",e)}const p="flex cursor-pointer list-none items-center gap-6 py-7 [&::-webkit-details-marker]:hidden max-view-wide:gap-4 max-view-wide:py-5",l="font-mono text-[length:var(--size-label,14px)] tracking-[0.2em] text-accent",_="pb-8 pl-11 pr-8 max-view-wide:pl-0 max-view-wide:pr-0",s="border-t border-line",O="flex w-full cursor-pointer list-none items-center justify-between py-3 text-left [&::-webkit-details-marker]:hidden",R="shrink-0 text-fg-dim transition-transform [details[open]>summary_&]:rotate-180";export{i as ACCORDION_ROW_STYLE_POINTS,o as ACCORDION_ROW_STYLE_PROP,s as CHEVRON_ROW_CLASS,R as CHEVRON_ROW_MARK_CLASS,O as CHEVRON_ROW_SUMMARY_CLASS,_ as QA_ROW_ANSWER_CLASS,l as QA_ROW_NUMBER_CLASS,p as QA_ROW_SUMMARY_CLASS,a as accordionRowStyleOf};
@@ -1 +1 @@
1
- import{BLOCK_ALIGN_TEXT as R}from"./block-align.js";import{PARENT_BOX_IS_NOT_CARD_RULE as I}from"./box-card-rule.js";import{isStripBox as f}from"./box-separator.js";import{viewOverrides as P}from"./view-overrides.js";import{hasOwnEntry as m}from"../own-entry.js";const ce={sectionPaddingTop:0,sectionPaddingBottom:0},v={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},l={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},ve=[...new Set([...Object.keys(l),...Object.keys(R)])];function xe(e,i){const s=typeof e=="string"&&m(v,e)?v[e]:"",t=typeof i=="string"&&m(l,i)?l[i]:"";return[s,t].filter(Boolean).join(" ")}function H(e){return e===!0||e==="wrap"?"flex-wrap":""}const X={start:"view-wide:max-view-desktop:justify-start!",center:"view-wide:max-view-desktop:justify-center!",between:"view-wide:max-view-desktop:justify-between!",end:"view-wide:max-view-desktop:justify-end!"},M={start:"max-view-wide:justify-start",center:"max-view-wide:justify-center",between:"max-view-wide:justify-between",end:"max-view-wide:justify-end"},$={start:"view-wide:max-view-desktop:items-start!",center:"view-wide:max-view-desktop:items-center!",end:"view-wide:max-view-desktop:items-end!",stretch:"view-wide:max-view-desktop:items-stretch!"},U={start:"max-view-wide:items-start",center:"max-view-wide:items-center",end:"max-view-wide:items-end",stretch:"max-view-wide:items-stretch"},j={wrap:"view-wide:max-view-desktop:flex-wrap!",nowrap:"view-wide:max-view-desktop:flex-nowrap!"};function o(e,i){return typeof i=="string"&&m(e,i)?i:void 0}function h(e,i,s){const t=P("same",e,i,s),a={};return t.tablet!==void 0&&t.tablet!==e&&(a.tablet=t.tablet),t.phone!==void 0&&t.phone!==e&&(a.phone=t.phone),a}function _(e,i,s){return[e.tablet?i[e.tablet]:"",e.phone?s[e.phone]:""].filter(Boolean).join(" ")}function W(e,i,s){return h(o(v,e)??"start",o(v,i),o(v,s))}function pe(e,i,s){return _(W(e,i,s),X,M)}function fe(e,i,s){const t=o(l,e)??"stretch";if(t==="stretch")return"";const a=h(t,o(l,i),o(l,s));return _(a,$,U)}function b(e){if(e===!0||e==="wrap")return"wrap";if(e===!1||e==="nowrap")return"nowrap"}function me(e,i){const s=H(e)===""?"nowrap":"wrap",t=b(i);return t&&t!==s?j[t]:""}const he="Block widths",u=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{value:"bigLeft",weights:[2,1]},{value:"bigRight",weights:[1,2]},{value:"biggerLeft",weights:[3,1]},{value:"biggerRight",weights:[1,3]},{value:"twoThree",weights:[2,3]}],G="data-sf-box-items",F=new RegExp(`[ \\t]+[^\\s"'\`]*\\[${G}\\][^\\s"'\`]*`,"g");function _e(e){return e.replace(F,"")}const be=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Custom",value:"custom",weights:[2,1]}];function ge(e){return Array.isArray(e)?"custom":e==="equal"?"equal":typeof e=="string"&&e in p?"custom":"content"}const S=4,k=10;function q(e,i){if(!Number.isInteger(i)||i<2||i>S||e.length!==i-1||!e.every(a=>typeof a=="number"&&Number.isFinite(a)))return;const s=[];let t=0;return e.forEach((a,n)=>{const w=100-t-k*(i-1-n),x=Math.min(w,Math.max(k,Math.round(a)));s.push(x),t+=x}),s}function O(e,i,s){if(!Array.isArray(i))return;const t=q(i,s),a=t?[...t,100-t.reduce((w,x)=>w+x,0)]:[],n={};for(let w=0;w<S;w+=1)n[`--${e}-${w+1}`]=a[w]??1;return n}function ue(e,i,s){const t=O("sf-share",e,s),a=O("sf-share-tablet",i,s);return t||a?{...t,...a}:void 0}function D(e,i){const s=Array.from({length:i},()=>1),t=u.find(w=>w.value===e);if(!t?.weights||i<1)return s;const[a,n]=t.weights;return a>1&&(s[0]=a),n>1&&(s[i-1]=n),s}function Se(e,i){if(typeof e!="string"||!(e in p)||e==="equal")return e;const s=D(e,i),t=s.reduce((a,n)=>a+n,0);return s.slice(0,-1).map(a=>Math.round(a/t*100))}const d="[&>*]:min-w-0 [&>[data-sf-box-items]>*]:min-w-0 [&>*]:flex-1 [&>[data-sf-box-items]>*]:flex-1 [&>*]:basis-0 [&>[data-sf-box-items]>*]:basis-0",p={equal:d,bigLeft:`${d} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2]`,bigRight:`${d} [&>*:last-child]:view-wide:grow-[2] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[2]`,biggerLeft:`${d} [&>*:first-child]:view-wide:grow-[3] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[3]`,biggerRight:`${d} [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`,twoThree:`${d} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2] [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`},V=`${d} [&>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>[data-sf-box-items]>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>[data-sf-box-items]>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>[data-sf-box-items]>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)] [&>[data-sf-box-items]>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)]`;function K(e){return Array.isArray(e)?V:typeof e=="string"?p[e]??"":""}const ke={all:[{context:"parentType",is:"Flex"},{context:"parent.direction",is:"row"},{any:[{not:{context:"parent.align",set:!0}},{context:"parent.align",is:"stretch"}]},{not:{context:"parent.separator",set:!0}},{not:{context:"parent.loop",is:"scroll"}},{not:{context:"parent.line",is:!0}},I,{any:[{context:"parent.columns",in:[2,3,4,5,6]},{all:[{not:{context:"parent.columns",is:1}},{context:"parent.share",in:Object.keys(p)}]}]}]},A="view-wide:max-view-desktop:flex-row!",r=`${A} [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-0!`,C={content:`${A} [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[content]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[content]!`,equal:r,bigLeft:`${r} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]!`,bigRight:`${r} [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]!`,biggerLeft:`${r} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`,biggerRight:`${r} [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`,twoThree:`${r} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`},J=`${r} [&>*:nth-child(1):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>[data-sf-box-items]>*:nth-child(1):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>*:nth-child(2):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>[data-sf-box-items]>*:nth-child(2):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>*:nth-child(3):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>[data-sf-box-items]>*:nth-child(3):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>*:nth-child(4):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]! [&>[data-sf-box-items]>*:nth-child(4):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]!`;function Y(e){return Array.isArray(e)||typeof e=="string"&&e in C?e:null}function Oe(e){if(e.direction!=="row"||f(e.direction,e.separator)||e.loop==="scroll"||e.line===!0||L(e.columns)!==""||N(e.columnsTablet)!=="")return"";const i=Y(e.shareTablet);return i===null?"":typeof i=="string"?C[i]:J}const Q="[&>*]:view-wide:basis-[content] [&>[data-sf-box-items]>*]:view-wide:basis-[content]";function Ae(e){return K(e)===""?Q:""}const Ce="Columns",Le=1,Ne=3,g={2:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},Ee=u.filter(e=>e.value==="content"||e.value==="equal"),Te="equal",Be=1,ye=6,c="view-wide:flex-wrap [&>*]:view-wide:min-w-0 [&>[data-sf-box-items]>*]:view-wide:min-w-0 [&>*]:view-wide:grow-0! [&>[data-sf-box-items]>*]:view-wide:grow-0!",z={1:`${c} [&>*]:view-wide:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc(100%/1)]!`,2:`${c} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]!`,3:`${c} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]!`,4:`${c} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]!`,5:`${c} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]!`,6:`${c} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]!`};function L(e){return typeof e=="number"?z[e]??"":""}const Z={1:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc(100%/1)]!",2:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function N(e){return typeof e=="number"?Z[e]??"":""}function Re(e){return e.direction!=="row"||f(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":N(e.columnsTablet)}function Ie(e){return e.direction!=="row"||f(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":L(e.columns)}const E={2:"view-wide:grid view-wide:grid-cols-2",3:"view-wide:grid view-wide:grid-cols-3",4:"view-wide:grid view-wide:grid-cols-4",5:"view-wide:grid view-wide:grid-cols-5",6:"view-wide:grid view-wide:grid-cols-6"},T={2:"max-view-wide:grid max-view-wide:grid-cols-2",3:"max-view-wide:grid max-view-wide:grid-cols-3"},Pe=Object.keys(E).map(Number),He=Object.keys(T).map(Number);function Xe(e,i,s=!1){const t=typeof e=="number"?E[e]??"":"",a=T[Number(i)]??"";return!t&&!a?"":[t,a,s?"gap-y-0!":""].filter(Boolean).join(" ")}const ee="max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:grow-0 [&>[data-sf-box-items]>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content]",ie={2:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},te="max-view-wide:flex-nowrap [&>*]:max-view-wide:grow-0 [&>[data-sf-box-items]>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content]";function se(e,i){return(b(e)??b(i)??"wrap")==="nowrap"}function Me(e,i,s,t){const a=g[Number(e)];if(!a)return"max-view-wide:flex-col";const n=se(s,t);return B(e,i)?n?te:ee:n?ie[Number(e)]:a}function $e(e,i){return Number(e)in g&&!B(e,i)}function B(e,i){return Number(e)in g&&i==="content"}const Ue="Block spacing",je=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],ae="sf-box-gap-only";function We(e){return e==="gap"?ae:""}const y={each:"sf-box-each-tablet",gap:"sf-box-gap-only-tablet"},ne={each:"sf-box-each-phone",gap:"sf-box-gap-only-phone"};function Ge(e,i,s){const t=n=>o(y,n),a=h(e==="gap"?"gap":"each",t(i),t(s));return _(a,y,ne)}export{Pe as ACCORDION_COLUMN_COUNTS,He as ACCORDION_PHONE_COLUMN_COUNTS,ve as ALIGN_TABLE_WORDS,l as BOX_ALIGN_CLASS,Ue as BOX_BLOCK_SPACING_LABEL,je as BOX_BLOCK_SPACING_POINTS,ye as BOX_COLUMNS_MAX,Be as BOX_COLUMNS_MIN,ae as BOX_GAP_ONLY_CLASS,ke as BOX_GIVES_PICTURES_A_HEIGHT,G as BOX_ITEMS_ATTR,Ce as BOX_PHONE_ROW_LABEL,Ne as BOX_PHONE_ROW_MAX,Le as BOX_PHONE_ROW_MIN,be as BOX_SHARE_CHOICES,he as BOX_SHARE_LABEL,Te as BOX_SHARE_PHONE_DEFAULT,Ee as BOX_SHARE_PHONE_POINTS,u as BOX_SHARE_POINTS,ce as NESTED_BOX_PADDING,Xe as boxAccordionColumnsClass,fe as boxAlignViewClasses,We as boxBlockSpacingClass,Ge as boxBlockSpacingViewClasses,L as boxColumnsClass,Ae as boxFitContentClass,W as boxJustifyViewAnswers,pe as boxJustifyViewClasses,xe as boxLayoutClasses,$e as boxPhoneCellsShareLine,Me as boxPhoneRowClasses,B as boxPhoneRowFits,se as boxPhoneRowOneLine,Ie as boxRowColumnsClass,Re as boxRowTabletColumnsClass,Oe as boxRowTabletShareClass,ge as boxShareChoiceOf,K as boxShareClasses,Y as boxShareTabletOf,ue as boxShareVars,Se as boxShareWidthsOf,N as boxTabletColumnsClass,H as boxWrapClass,me as boxWrapTabletClass,b as boxWrapWordOf,_e as withoutBoxItemsHalf};
1
+ import{BLOCK_ALIGN_TEXT as R}from"./block-align.js";import{PARENT_BOX_IS_NOT_CARD_RULE as I}from"./box-card-rule.js";import{isStripBox as f}from"./box-separator.js";import{viewOverrides as P}from"./view-overrides.js";import{hasOwnEntry as m}from"../own-entry.js";import{parseOption as H}from"../parse-option.js";const pe={sectionPaddingTop:0,sectionPaddingBottom:0},v={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},l={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},fe=[...new Set([...Object.keys(l),...Object.keys(R)])];function me(e,i){const s=typeof e=="string"&&m(v,e)?v[e]:"",t=typeof i=="string"&&m(l,i)?l[i]:"";return[s,t].filter(Boolean).join(" ")}function X(e){return e===!0||e==="wrap"?"flex-wrap":""}const M={start:"view-wide:max-view-desktop:justify-start!",center:"view-wide:max-view-desktop:justify-center!",between:"view-wide:max-view-desktop:justify-between!",end:"view-wide:max-view-desktop:justify-end!"},$={start:"max-view-wide:justify-start",center:"max-view-wide:justify-center",between:"max-view-wide:justify-between",end:"max-view-wide:justify-end"},U={start:"view-wide:max-view-desktop:items-start!",center:"view-wide:max-view-desktop:items-center!",end:"view-wide:max-view-desktop:items-end!",stretch:"view-wide:max-view-desktop:items-stretch!"},j={start:"max-view-wide:items-start",center:"max-view-wide:items-center",end:"max-view-wide:items-end",stretch:"max-view-wide:items-stretch"},W={wrap:"view-wide:max-view-desktop:flex-wrap!",nowrap:"view-wide:max-view-desktop:flex-nowrap!"};function o(e,i){return typeof i=="string"&&m(e,i)?i:void 0}function h(e,i,s){const t=P("same",e,i,s),a={};return t.tablet!==void 0&&t.tablet!==e&&(a.tablet=t.tablet),t.phone!==void 0&&t.phone!==e&&(a.phone=t.phone),a}function _(e,i,s){return[e.tablet?i[e.tablet]:"",e.phone?s[e.phone]:""].filter(Boolean).join(" ")}function G(e,i,s){return h(o(v,e)??"start",o(v,i),o(v,s))}function he(e,i,s){return _(G(e,i,s),M,$)}function _e(e,i,s){const t=o(l,e)??"stretch";if(t==="stretch")return"";const a=h(t,o(l,i),o(l,s));return _(a,U,j)}function b(e){if(e===!0||e==="wrap")return"wrap";if(e===!1||e==="nowrap")return"nowrap"}function be(e,i){const s=X(e)===""?"nowrap":"wrap",t=b(i);return t&&t!==s?W[t]:""}const ge="Block widths",u=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{value:"bigLeft",weights:[2,1]},{value:"bigRight",weights:[1,2]},{value:"biggerLeft",weights:[3,1]},{value:"biggerRight",weights:[1,3]},{value:"twoThree",weights:[2,3]}],F="data-sf-box-items",q=new RegExp(`[ \\t]+[^\\s"'\`]*\\[${F}\\][^\\s"'\`]*`,"g");function ue(e){return e.replace(q,"")}const Se=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Custom",value:"custom",weights:[2,1]}];function ke(e){return Array.isArray(e)?"custom":e==="equal"?"equal":typeof e=="string"&&e in p?"custom":"content"}const S=4,k=10;function D(e,i){if(!Number.isInteger(i)||i<2||i>S||e.length!==i-1||!e.every(a=>typeof a=="number"&&Number.isFinite(a)))return;const s=[];let t=0;return e.forEach((a,n)=>{const w=100-t-k*(i-1-n),x=Math.min(w,Math.max(k,Math.round(a)));s.push(x),t+=x}),s}function O(e,i,s){if(!Array.isArray(i))return;const t=D(i,s),a=t?[...t,100-t.reduce((w,x)=>w+x,0)]:[],n={};for(let w=0;w<S;w+=1)n[`--${e}-${w+1}`]=a[w]??1;return n}function Oe(e,i,s){const t=O("sf-share",e,s),a=O("sf-share-tablet",i,s);return t||a?{...t,...a}:void 0}function V(e,i){const s=Array.from({length:i},()=>1),t=u.find(w=>w.value===e);if(!t?.weights||i<1)return s;const[a,n]=t.weights;return a>1&&(s[0]=a),n>1&&(s[i-1]=n),s}function Ae(e,i){if(typeof e!="string"||!(e in p)||e==="equal")return e;const s=V(e,i),t=s.reduce((a,n)=>a+n,0);return s.slice(0,-1).map(a=>Math.round(a/t*100))}const d="[&>*]:min-w-0 [&>[data-sf-box-items]>*]:min-w-0 [&>*]:flex-1 [&>[data-sf-box-items]>*]:flex-1 [&>*]:basis-0 [&>[data-sf-box-items]>*]:basis-0",p={equal:d,bigLeft:`${d} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2]`,bigRight:`${d} [&>*:last-child]:view-wide:grow-[2] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[2]`,biggerLeft:`${d} [&>*:first-child]:view-wide:grow-[3] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[3]`,biggerRight:`${d} [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`,twoThree:`${d} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2] [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`},K=`${d} [&>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>[data-sf-box-items]>*:nth-child(1)]:view-wide:grow-[var(--sf-share-1,1)] [&>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>[data-sf-box-items]>*:nth-child(2)]:view-wide:grow-[var(--sf-share-2,1)] [&>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>[data-sf-box-items]>*:nth-child(3)]:view-wide:grow-[var(--sf-share-3,1)] [&>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)] [&>[data-sf-box-items]>*:nth-child(4)]:view-wide:grow-[var(--sf-share-4,1)]`;function J(e){return Array.isArray(e)?K:typeof e=="string"?p[e]??"":""}const Ce={all:[{context:"parentType",is:"Flex"},{context:"parent.direction",is:"row"},{any:[{not:{context:"parent.align",set:!0}},{context:"parent.align",is:"stretch"}]},{not:{context:"parent.separator",set:!0}},{not:{context:"parent.loop",is:"scroll"}},{not:{context:"parent.line",is:!0}},I,{any:[{context:"parent.columns",in:[2,3,4,5,6]},{all:[{not:{context:"parent.columns",is:1}},{context:"parent.share",in:Object.keys(p)}]}]}]},A="view-wide:max-view-desktop:flex-row!",r=`${A} [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-0!`,C={content:`${A} [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[content]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[content]!`,equal:r,bigLeft:`${r} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]!`,bigRight:`${r} [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]!`,biggerLeft:`${r} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`,biggerRight:`${r} [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`,twoThree:`${r} [&>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-wide:max-view-desktop:grow-[2]! [&>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-wide:max-view-desktop:grow-[3]!`},Y=`${r} [&>*:nth-child(1):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>[data-sf-box-items]>*:nth-child(1):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>*:nth-child(2):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>[data-sf-box-items]>*:nth-child(2):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>*:nth-child(3):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>[data-sf-box-items]>*:nth-child(3):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>*:nth-child(4):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]! [&>[data-sf-box-items]>*:nth-child(4):nth-child(n)]:view-wide:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]!`;function Q(e){return Array.isArray(e)||typeof e=="string"&&e in C?e:null}function Le(e){if(e.direction!=="row"||f(e.direction,e.separator)||e.loop==="scroll"||e.line===!0||L(e.columns)!==""||N(e.columnsTablet)!=="")return"";const i=Q(e.shareTablet);return i===null?"":typeof i=="string"?C[i]:Y}const z="[&>*]:view-wide:basis-[content] [&>[data-sf-box-items]>*]:view-wide:basis-[content]";function Ne(e){return J(e)===""?z:""}const Ee="Columns",Te=1,Be=3,g={2:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},ye=u.filter(e=>e.value==="content"||e.value==="equal"),Re="equal",Ie=1,Pe=6,c="view-wide:flex-wrap [&>*]:view-wide:min-w-0 [&>[data-sf-box-items]>*]:view-wide:min-w-0 [&>*]:view-wide:grow-0! [&>[data-sf-box-items]>*]:view-wide:grow-0!",Z={1:`${c} [&>*]:view-wide:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc(100%/1)]!`,2:`${c} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]!`,3:`${c} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]!`,4:`${c} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_3)/4)]!`,5:`${c} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_4)/5)]!`,6:`${c} [&>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_5)/6)]!`};function L(e){return typeof e=="number"?Z[e]??"":""}const ee={1:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc(100%/1)]!",2:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"view-wide:max-view-desktop:flex-row! view-wide:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-wide:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function N(e){return typeof e=="number"?ee[e]??"":""}function He(e){return e.direction!=="row"||f(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":N(e.columnsTablet)}function Xe(e){return e.direction!=="row"||f(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":L(e.columns)}const E={2:"view-wide:grid view-wide:grid-cols-2",3:"view-wide:grid view-wide:grid-cols-3",4:"view-wide:grid view-wide:grid-cols-4",5:"view-wide:grid view-wide:grid-cols-5",6:"view-wide:grid view-wide:grid-cols-6"},T={2:"max-view-wide:grid max-view-wide:grid-cols-2",3:"max-view-wide:grid max-view-wide:grid-cols-3"},Me=Object.keys(E).map(Number),$e=Object.keys(T).map(Number);function Ue(e,i,s=!1){const t=typeof e=="number"?E[e]??"":"",a=T[Number(i)]??"";return!t&&!a?"":[t,a,s?"gap-y-0!":""].filter(Boolean).join(" ")}const ie="max-view-wide:flex-wrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:grow-0 [&>[data-sf-box-items]>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content]",te={2:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px)))/2)]",3:"max-view-wide:flex-nowrap [&>*]:max-view-wide:min-w-0 [&>[data-sf-box-items]>*]:max-view-wide:min-w-0 [&>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)] [&>[data-sf-box-items]>*]:max-view-wide:basis-[calc((100%_-_var(--sf-gap-len-phone,var(--sf-gap-len,0px))_*_2)/3)]"},se="max-view-wide:flex-nowrap [&>*]:max-view-wide:grow-0 [&>[data-sf-box-items]>*]:max-view-wide:grow-0 [&>*]:max-view-wide:basis-[content] [&>[data-sf-box-items]>*]:max-view-wide:basis-[content]";function ae(e,i){return(b(e)??b(i)??"wrap")==="nowrap"}function je(e,i,s,t){const a=g[Number(e)];if(!a)return"max-view-wide:flex-col";const n=ae(s,t);return B(e,i)?n?se:ie:n?te[Number(e)]:a}function We(e,i){return Number(e)in g&&!B(e,i)}function B(e,i){return Number(e)in g&&i==="content"}const Ge="Block spacing",ne=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],we="sf-box-gap-only";function Fe(e){return e==="gap"?we:""}const y={each:"sf-box-each-tablet",gap:"sf-box-gap-only-tablet"},oe={each:"sf-box-each-phone",gap:"sf-box-gap-only-phone"};function qe(e,i,s){const t=n=>o(y,n),a=h(H(ne,"each",e),t(i),t(s));return _(a,y,oe)}export{Me as ACCORDION_COLUMN_COUNTS,$e as ACCORDION_PHONE_COLUMN_COUNTS,fe as ALIGN_TABLE_WORDS,l as BOX_ALIGN_CLASS,Ge as BOX_BLOCK_SPACING_LABEL,ne as BOX_BLOCK_SPACING_POINTS,Pe as BOX_COLUMNS_MAX,Ie as BOX_COLUMNS_MIN,we as BOX_GAP_ONLY_CLASS,Ce as BOX_GIVES_PICTURES_A_HEIGHT,F as BOX_ITEMS_ATTR,Ee as BOX_PHONE_ROW_LABEL,Be as BOX_PHONE_ROW_MAX,Te as BOX_PHONE_ROW_MIN,Se as BOX_SHARE_CHOICES,ge as BOX_SHARE_LABEL,Re as BOX_SHARE_PHONE_DEFAULT,ye as BOX_SHARE_PHONE_POINTS,u as BOX_SHARE_POINTS,pe as NESTED_BOX_PADDING,Ue as boxAccordionColumnsClass,_e as boxAlignViewClasses,Fe as boxBlockSpacingClass,qe as boxBlockSpacingViewClasses,L as boxColumnsClass,Ne as boxFitContentClass,G as boxJustifyViewAnswers,he as boxJustifyViewClasses,me as boxLayoutClasses,We as boxPhoneCellsShareLine,je as boxPhoneRowClasses,B as boxPhoneRowFits,ae as boxPhoneRowOneLine,Xe as boxRowColumnsClass,He as boxRowTabletColumnsClass,Le as boxRowTabletShareClass,ke as boxShareChoiceOf,J as boxShareClasses,Q as boxShareTabletOf,Oe as boxShareVars,Ae as boxShareWidthsOf,N as boxTabletColumnsClass,X as boxWrapClass,be as boxWrapTabletClass,b as boxWrapWordOf,ue as withoutBoxItemsHalf};
@@ -1,4 +1,4 @@
1
- export declare const BOX_SHAPES: ("custom" | "auto" | "square" | "video" | "screen" | "tall" | "wide" | "landscape" | "portrait" | "panorama" | "story" | "poster")[];
1
+ export declare const BOX_SHAPES: ("custom" | "auto" | "square" | "video" | "tall" | "wide" | "screen" | "landscape" | "portrait" | "panorama" | "story" | "poster")[];
2
2
  export type BoxShape = (typeof BOX_SHAPES)[number];
3
3
  export declare function boxShapeOf(value: unknown): BoxShape;
4
4
  export declare function boxShapeClass(value: unknown): string;