efficient-web-builder 57.0.0 → 58.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -0
- package/dist/editor/components/SectionIcon.js +1 -1
- package/dist/editor/components/WebsiteScreenParts.js +1 -1
- package/dist/editor/components/storefront-editor.css +30 -0
- package/dist/editor/lib/animation/hover-fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Contents/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/FAQ/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ListSearch/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/general/ListSearch/fields.js +1 -0
- package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/document/blocks/general/index.js +1 -1
- package/dist/editor/lib/document/box-fields.d.ts +1 -0
- package/dist/editor/lib/document/box-fields.js +1 -1
- package/dist/editor/lib/document/card-display-chips.d.ts +7 -5
- package/dist/editor/lib/document/card-display-chips.js +1 -1
- package/dist/editor/lib/document/controls.d.ts +6 -0
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/panel-drop-empty-headings.js +1 -1
- package/dist/editor/lib/sections/text-layouts.js +1 -1
- package/dist/format/lib/animation/hover.js +1 -1
- package/dist/format/lib/content/accordion-row-style.d.ts +10 -0
- package/dist/format/lib/content/accordion-row-style.js +1 -0
- package/dist/format/lib/content/box-angle.d.ts +9 -0
- package/dist/format/lib/content/box-angle.js +1 -0
- package/dist/format/lib/content/box-background.d.ts +3 -0
- package/dist/format/lib/content/box-background.js +1 -1
- package/dist/format/lib/content/box-layout.d.ts +3 -0
- package/dist/format/lib/content/box-layout.js +1 -1
- package/dist/format/lib/content/card-place.d.ts +4 -0
- package/dist/format/lib/content/card-place.js +1 -1
- package/dist/format/lib/content/card-template.d.ts +3 -0
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/copies-in-box.d.ts +2 -0
- package/dist/format/lib/content/copies-in-box.js +1 -0
- package/dist/format/lib/content/list-query.d.ts +7 -0
- package/dist/format/lib/content/list-query.js +1 -0
- package/dist/format/lib/content/part-display.js +1 -1
- package/dist/format/lib/content/view-hide-class.d.ts +11 -0
- package/dist/format/lib/content/view-hide-class.js +1 -0
- package/dist/format/lib/document/blocks/general/FAQ/card-seed.d.ts +7 -0
- package/dist/format/lib/document/blocks/general/FAQ/card-seed.js +1 -0
- package/dist/format/lib/document/blocks/general/FAQ/meta.d.ts +6 -0
- package/dist/format/lib/document/blocks/general/FAQ/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/ListSearch/meta.d.ts +6 -0
- package/dist/format/lib/document/blocks/general/ListSearch/meta.js +1 -0
- package/dist/format/lib/document/blocks/general/PaymentBadges/meta.d.ts +6 -0
- package/dist/format/lib/document/blocks/general/PaymentBadges/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/metas.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/metas.js +1 -1
- package/dist/format/lib/document/blocks/general/text-part-shapes.json +18 -0
- package/dist/format/lib/document/box-footer.js +1 -1
- package/dist/format/lib/document/container-blocks.js +1 -1
- package/dist/format/lib/document/general-order.d.ts +1 -1
- package/dist/format/lib/document/general-order.js +1 -1
- package/dist/format/lib/document/list-search-scopes.d.ts +4 -0
- package/dist/format/lib/document/list-search-scopes.js +1 -0
- package/dist/format/lib/document/part-inks.d.ts +2 -1
- package/dist/format/lib/document/part-inks.js +1 -1
- package/dist/format/lib/document/section-catalog.d.ts +1 -1
- package/dist/format/lib/document/section-catalog.js +10 -2
- package/dist/format/lib/editor-words-catalogue.d.ts +7 -0
- package/dist/format/lib/editor-words-catalogue.js +4 -4
- package/dist/format/lib/editor-words-kept.js +1 -1
- package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
- package/dist/render/components/BoxAccordionRow.d.ts +3 -1
- package/dist/render/components/BoxAccordionRow.js +1 -1
- package/dist/render/components/BoxTabPaneContext.d.ts +5 -0
- package/dist/render/components/BoxTabPaneContext.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +3 -1
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/Cards.js +1 -1
- package/dist/render/components/CategoryBar.d.ts +1 -1
- package/dist/render/components/CategoryBar.js +1 -1
- package/dist/render/components/ChartSection.js +1 -1
- package/dist/render/components/ContactLocations.js +2 -2
- package/dist/render/components/ContentsList.d.ts +3 -3
- package/dist/render/components/ContentsList.js +1 -1
- package/dist/render/components/Countdown.js +1 -1
- package/dist/render/components/Divider.d.ts +1 -2
- package/dist/render/components/Divider.js +1 -1
- package/dist/render/components/DocBody.js +5 -5
- package/dist/render/components/DocMasthead.js +1 -1
- package/dist/render/components/DocMetaCards.js +1 -1
- package/dist/render/components/DocTabs.js +1 -1
- package/dist/render/components/Eyebrow.d.ts +2 -1
- package/dist/render/components/Eyebrow.js +1 -1
- package/dist/render/components/FAQ.d.ts +6 -1
- package/dist/render/components/FAQ.js +1 -1
- package/dist/render/components/FeaturedCover.js +1 -1
- package/dist/render/components/Flex.d.ts +3 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/Footprint.js +1 -1
- package/dist/render/components/HeroGroup.d.ts +1 -1
- package/dist/render/components/HeroGroup.js +1 -1
- package/dist/render/components/HeroPictures.js +1 -1
- package/dist/render/components/HeroSection.js +1 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/HeroSlide.d.ts +1 -1
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/components/InBoxContext.d.ts +1 -1
- package/dist/render/components/InBoxContext.js +1 -1
- package/dist/render/components/IntegrationsSection.js +1 -1
- package/dist/render/components/IntroBleed.js +1 -1
- package/dist/render/components/JoinBox.js +1 -1
- package/dist/render/components/KeyFeatures.js +1 -1
- package/dist/render/components/ListSearchBox.d.ts +7 -0
- package/dist/render/components/ListSearchBox.js +1 -0
- package/dist/render/components/LocationMap.d.ts +2 -1
- package/dist/render/components/LocationMap.js +1 -1
- package/dist/render/components/Logo.d.ts +3 -1
- package/dist/render/components/Logo.js +1 -1
- package/dist/render/components/LogoBlock.js +1 -1
- package/dist/render/components/LongRead.js +1 -1
- package/dist/render/components/Manifesto.js +1 -1
- package/dist/render/components/Masthead.js +1 -1
- package/dist/render/components/MockupSection.js +1 -1
- package/dist/render/components/ParagraphsA.d.ts +2 -1
- package/dist/render/components/ParagraphsA.js +1 -1
- package/dist/render/components/PostCard.d.ts +2 -1
- package/dist/render/components/PostCard.js +1 -1
- package/dist/render/components/ProcessSteps.js +1 -1
- package/dist/render/components/Prose.js +1 -1
- package/dist/render/components/SectionAnimation.d.ts +3 -2
- package/dist/render/components/SectionAnimation.js +1 -1
- package/dist/render/components/SectionEyebrow.d.ts +2 -1
- package/dist/render/components/SectionEyebrow.js +1 -1
- package/dist/render/components/Series.js +1 -1
- package/dist/render/components/SiteGutterFrame.d.ts +2 -2
- package/dist/render/components/SiteGutterFrame.js +1 -1
- package/dist/render/components/Spacer.js +1 -1
- package/dist/render/components/SpecStrip.js +1 -1
- package/dist/render/components/StatsParagraph.js +1 -1
- package/dist/render/components/Testimonials.js +1 -1
- package/dist/render/components/TickerSection.js +1 -1
- package/dist/render/components/Timeline.js +1 -1
- package/dist/render/components/TimelineTrack.js +1 -1
- package/dist/render/components/TitleWithButtons.js +1 -1
- package/dist/render/components/ViewHideRoot.d.ts +23 -0
- package/dist/render/components/ViewHideRoot.js +1 -0
- package/dist/render/lib/content/block-size.d.ts +0 -2
- package/dist/render/lib/content/block-size.js +1 -1
- package/dist/render/lib/content/page-contents.js +1 -1
- package/dist/render/lib/document/blocks/general/CardList/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Contents/render.js +1 -1
- package/dist/render/lib/document/blocks/general/CustomHTML/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Divider/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Eyebrow/render.js +1 -1
- package/dist/render/lib/document/blocks/general/FAQ/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
- package/dist/render/lib/document/blocks/general/ListSearch/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/ListSearch/render.js +1 -0
- package/dist/render/lib/document/blocks/general/LocationMap/render.js +1 -1
- package/dist/render/lib/document/blocks/general/OrderSummary/card-seed.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/OrderSummary/card-seed.js +1 -0
- package/dist/render/lib/document/blocks/general/ParagraphsA/render.js +1 -1
- package/dist/render/lib/document/blocks/general/PaymentBadges/render.js +1 -1
- package/dist/render/lib/document/blocks/general/PostCard/render.js +1 -1
- package/dist/render/lib/document/blocks/general/SectionHeader/render.js +1 -1
- package/dist/render/lib/document/blocks/general/renders.d.ts +1 -0
- package/dist/render/lib/document/blocks/general/renders.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-checkout.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-checkout.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-docbody.js +2 -2
- package/dist/render/lib/document/blocks/general/section-to-box-rows-head.d.ts +12 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.d.ts +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/page-render.js +1 -1
- package/dist/render/lib/document/passes/block-size.js +1 -1
- package/dist/render/lib/document/passes/borders.js +1 -1
- package/dist/render/lib/document/passes/box-join.js +1 -1
- package/dist/render/lib/document/passes/cell-width.js +1 -1
- package/dist/render/lib/document/passes/corners.js +1 -1
- package/dist/render/lib/document/passes/head-core.js +1 -1
- package/dist/render/lib/document/passes/hidden-nodes.d.ts +2 -0
- package/dist/render/lib/document/passes/hidden-nodes.js +1 -0
- package/dist/render/lib/document/passes/index.js +1 -1
- package/dist/render/lib/document/passes/section-anchor.js +1 -1
- package/dist/render/lib/document/passes/section-animation.js +1 -1
- package/dist/render/lib/document/passes/section-height.js +1 -1
- package/dist/render/lib/document/passes/section-padding.js +1 -1
- package/dist/render/lib/document/passes/section-sticky.js +1 -1
- package/dist/render/lib/document/passes/section-theme.js +1 -1
- package/dist/render/lib/document/passes/section-width.js +1 -1
- package/dist/render/lib/document/slot-counts.js +1 -1
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/package.json +1 -1
- package/dist/format/lib/document/passes/hidden-nodes.d.ts +0 -2
- package/dist/format/lib/document/passes/hidden-nodes.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as i,jsxs as N,Fragment as k}from"react/jsx-runtime";import{cloneElement as Pe,createContext as Kt,useContext as ve,useEffect as $t,useId as Be,useRef as V,useState as z}from"react";import{useEasel as te,useSelectedHost as M}from"efficient-easel/easel";import{toDateKey as Xt,fromDateKey as jt}from"efficient-shell/format";import{say as l,editorEaselWords as S}from"../../../format/lib/editor-words.js";import{LOADING_SHOWS_LABELS as De,firstFrameHint as Vt,loadingShowsOf as zt,loadingStillHint as Yt}from"../../../format/lib/hero-video.js";import{pageFramesFor as qt,usePageVideoFrames as Jt}from"../page-video-frames.js";import{ScreenDocumentContext as Zt}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as He,hidableText as Ge}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as de,LINK_FIELD_MARKER as Me,MEDIA_FIELD_MARKER as Ue,SCAFFOLD_FIELD_MARKER as We,TEXT_FIELD_MARKER as T,foldMetaOf as ue,textFieldIdentifier as Qt}from"efficient-easel/draw";import en from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as Ke}from"../../../render/lib/document/show-when.js";import tn from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as nn,CORNER_RADIUS_MAX as $e,CORNER_RADIUS_MIN as U}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as on,IMAGE_CORNERS_LABEL as rn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as ln}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as sn,GALLERY_LAYOUTS as ne,GALLERY_LAYOUT_KEYS as an,galleryChoices as Xe,galleryPictureCells as cn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as dn}from"./shell-glyph.js";import{anchorSiblingsOf as un,placementPoints as pn}from"../../../format/lib/hero-group-placement.js";import fn from"../../components/AnchorField.js";import hn from"../../components/SourceStatus.js";import{AdjustIcon as mn,EyeIcon as gn,AnimationIcon as bn,BackgroundIcon as wn,BorderAllIcon as xn,BlockSectionIcon as Sn,ColumnWidthsIcon as pe,ColumnsIcon as je,CornerIcon as yn,DirectionDownIcon as Cn,DirectionLeftIcon as _n,DirectionRightIcon as Rn,DirectionUpIcon as On,EditIcon as Tn,GapIcon as In,GridIcon as En,GroundIcon as fe,HashIcon as Ve,HeightIcon as kn,ImageIcon as Fn,ListIcon as An,LocationIcon as ze,PaddingBottomIcon as Ye,PaddingLeftIcon as qe,PaddingRightIcon as Je,PaddingTopIcon as Ze,PageIcon as Ln,StickyIcon as Nn,SearchIcon as Pn,SquareIcon as vn,TypeIcon as Bn,WidthIcon as Dn}from"efficient-easel/icons";import{FieldGlyph as Qe}from"../../components/FieldGlyph.js";import{resolvePageBackground as Hn}from"../../../format/lib/content/page-background.js";import{boxFillOf as Gn}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as et,CORNER_SIDE_POINTS as Mn,hasOwnSectionCorners as Un,normalizeCornerSides as tt}from"../../../format/lib/content/section-corners.js";import{enclosingPath as Wn,enclosingSection as Kn}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsDrill as $n,SettingsField as w,SettingsGroup as Xn,SettingsGroupSub as jn,SettingsSegmented as Vn,SettingsBorder as zn,SettingsSidesEach as Yn,SettingsSwitch as he,borderSides as qn,borderStartEach as Jn}from"efficient-easel/panel";import{ListField as Zn}from"efficient-easel/fields";import{DisplayChips as Qn}from"efficient-shell/ui";import{desktopDisplayChanged as eo,partShownOnDesktop as to,partShownOnPhone as no,phoneDisplayChanged as oo,withDesktopPart as ro,withPhonePart as io}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as lo,Checkbox as so,ColorSwatch as ao,CornersInput as co,DatePicker as uo,DateTimePicker as po,FOCAL_DEFAULT as fo,IconPicker as nt,COLUMN_COUNT_MAX as ot,COLUMN_SHARE_MIN as ho,COLUMN_SHARES_EQUAL as mo,resolveColumnShares as rt,WidthsBar as go,useShellStrings as bo,IconButton as it,InputNumber as lt,Slider as wo,Tooltip as me}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as xo}from"./geocode-resolve.js";import{ColourRow as st,InheritedColourRow as ge}from"./ColourControl.js";import{keptByRow as So}from"efficient-easel/screen/lib/document/style-fields";import at from"./MarkupToolbar.js";import{deviceField as R}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as yo,NoControlMark as Co,noControlField as ct}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as _o}from"../../../format/lib/document/own-box.js";import{PHONE_CLEAR as Ro,resolvePhoneValue as be}from"../../../format/lib/document/phone-override.js";import{phoneKey as F,tabletKey as W}from"efficient-easel/draw";import{SuppressibleText as Oo}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as To,CARD_OUTLINE_OPTIONS as Io,DEFAULT_CARD_INDEX_FORMAT as Eo,DEFAULT_CARD_OUTLINE as ko}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Fo,DEFAULT_COVER_INDEX as Ao}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Lo}from"efficient-easel/draw";import No from"../../components/MediaUploadField.js";import Po from"../../components/MultiSelectField.js";import vo from"../../components/SectionThemePicker.js";import Bo from"../../components/SearchSelectField.js";import Do from"../../components/StorefrontLinkField.js";import{UiIcon as dt}from"efficient-easel/draw/client";import{SECTION_PADDING as I}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Ho}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Go}from"efficient-easel/draw/client";import{encodePartId as Mo}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as Uo,useEaselStrings as Wo}from"efficient-easel/strings";import{hasPhoneHeight as Ko,hasTabletHeight as we,resolveSectionMinHeight as $o,resolveTabletHeight as Xo}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as oe,SECTION_STICK_LABEL as xe,hasPhoneStick as jo,hasTabletStick as Vo,resolveSectionStick as ut}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as zo,SECTION_MIN_HEIGHT_GROUP_LABEL as Y,SECTION_SCREEN_PCT as Yo}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as qo,resolveContainerDirection as pt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Jo,BOX_BLOCK_SPACING_POINTS as ft,BOX_PHONE_ROW_LABEL as ht,BOX_COLUMNS_MAX as Zo,BOX_COLUMNS_MIN as mt,BOX_PHONE_ROW_MAX as Qo,BOX_PHONE_ROW_MIN as Se,BOX_SHARE_CHOICES as gt,BOX_SHARE_LABEL as K,boxShareChoiceOf as bt,boxShareWidthsOf as ye,BOX_SHARE_PHONE_DEFAULT as er,BOX_SHARE_PHONE_POINTS as tr}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as v}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as nr,borderBySide as wt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as or,normalizeTheme as xt,normalizeThemeColors as rr,sectionBandTone as ir,surfaceTwoTone as lr}from"../../../format/lib/theme.js";import{CONTAINER_GAP as St,CONTAINER_GAP_BUILT_IN as sr,CONTAINER_GAP_PHONE as Ce,GAP_FIELD_CONTAINER as _e,followsSitePhoneGap as ar,hasOwnContainerGap as cr,hasOwnPhoneGap as Re,resolveContainerGap as yt,resolvePhoneContainerGap as Ct}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as dr,CARD_IMAGE_BG_OFF as ur,CARD_IMAGE_BG_SWATCH_NAMES as pr,CARD_IMAGE_BG_SWATCHES as fr,isCardImageBackgroundInheriting as hr,cardImageBackgroundChoice as mr,THEME_CARD_IMAGE_BG as gr}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as br,SECTION_BG_NO_FILL as wr,sectionBackgroundChoice as xr,THEME_SECTION_BG as Oe,isSectionBackgroundEmpty as Sr,sectionBackgroundHex as _t}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as yr,nestedAccentValue as Rt,resolveSectionAccent as re}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Cr,TYPE_SIZE_INHERIT as _r,isTypeSizeInheriting as Rr}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Or,WIDTH_CHOICE_LABEL as Tr,WIDTH_INHERIT as Ir}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as Er}from"./panel-heading-scope.js";import{useEaselSession as kr}from"efficient-easel/screen/lib/session-context";import{backendOf as Fr}from"../website-session.js";import{BOX_GAP as Ar,describedAs as E,group as O,iconOf as q,sharedStyleKinds as J}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as Te,onDesktopWords as B,phoneTwinFields as ie}from"efficient-easel/screen/lib/document/box-fields";import{directionField as Lr,gapField as Ie,iconPickerRow as Nr,pickerCellIcon as Pr,pickerNoneIcon as vr,Segmented as Ee,segmented as Br,select as Z,slider as $}from"./box-fields.js";function Os({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function D(e,t){return l("{value} from {from}",{value:e,from:t})}function Dr(){const{blockGap:e}=v();return e===null?l("this container's own spacing"):D(`${e}px`,l("Styles"))}function Hr({inherited:e,onReset:t,label:n}){return i(y,{words:S()?.panel,label:l(n),changed:!e,detail:Dr(),onReset:t})}function Gr(e){return Ie({...Ar,builtIn:sr[e],resolve:(t,n)=>yt(e,t,n?.siteGap),action:(t,n)=>i(Hr,{inherited:!cr(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[_e]:e}})}function Mr(e){return Ke(R("mobile",{[_e]:e,type:"custom",render:t=>i(Kr,{container:e,...t})}),Ot)}function Ur(e){return Ke(R("tablet",{[_e]:e,type:"custom",render:t=>i(Wr,{container:e,...t})}),Ot)}const Ot={not:{field:"gap",in:Array.from({length:-St.min},(e,t)=>St.min+t)}};function Ts(e){return{gap:R("desktop",Gr(e)),[W("gap")]:Ur(e),[F("gap")]:Mr(e)}}function Wr({container:e,...t}){const[n]=A("gap"),{siteGap:o}=t.field??{},r=Math.max(Ce.min,yt(e,n,o));return Ie({...Ce,builtIn:r,resolve:a=>Re(a)?a:r,action:(a,c)=>i(y,{words:S()?.panel,label:l("Gap"),changed:Re(a),detail:B(d=>l(d),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function Kr({container:e,...t}){const[n]=A("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=Ct(e,void 0,n,o,r);return Ie({...Ce,builtIn:s,resolve:c=>Ct(e,c,n,o,r),action:(c,d)=>i(y,{words:S()?.panel,label:l("Gap"),changed:Re(c),detail:D(`${s}px`,ar(e,n,r)?l("Styles"):l("Desktop")),onReset:()=>d(void 0)})}).render(t)}function Is(e){return Lr({offered:qo(e),fallback:pt(e,void 0),resolve:t=>pt(e,t)})}function Es(e,t){return pn(t?un(e,t):[],t)}function $r({inherited:e,onReset:t,label:n}){return i(y,{words:S()?.panel,label:l(n),changed:!e,detail:D(l("Full"),l("the page")),onReset:t})}function H({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:a=!0,markup:c=!0}){const{text:d,hidden:f}=He(e),h=V(null),p=V(null),u=_=>t(a?{text:_,hidden:f}:_),g=()=>t({text:d,hidden:!f}),m=a&&f,C=Be(),x=r?Yr(r)?i("span",{className:"sf-hint-while-typing",children:l(r)}):l(r):void 0,b=f?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return i(w,{label:l(n),icon:i(Bn,{}),htmlFor:C,className:m?"is-hidden":void 0,hint:x,action:a?i(me,{content:b,children:i(it,{"aria-pressed":f,"aria-label":b,onClick:g,children:f?i(dt,{name:"eye-off",size:14}):i(dt,{name:"eye",size:14})})}):void 0,children:N("div",{className:"sf-copybox",children:[c&&i(at,{target:s?p:h,value:d,onChange:u}),s?i("textarea",{id:C,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:_=>u(_.target.value)}):i("input",{id:C,ref:h,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:_=>u(_.target.value)})]})})}function ks(e,t){return{...e,[We]:t}}function Fs(e){const t=e[T];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[T]:{...t,offPage:!0}}}function As(e){return!e||typeof e!="object"?!1:e[T]?.offPage===!0}const Tt="sfPanelOnly";function Ls(e){if(!e[T])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Tt]:!0}}function Ns(e){return!!e&&typeof e=="object"&&e[Tt]===!0}function Ps(e){const t=e[T];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[T]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as Va,SCALAR_TEXT_CONTROLS as za}from"efficient-easel/draw";function vs(e,t){if(!e[T])throw new Error("inOwnBox: the field holds no authored text");const{[yo]:o,...r}=e;return{...r,[_o]:!0,render:t}}const Xr=new Set(Lo),Q={type:"radio",options:[{value:!0},{value:!1}]},It={text:{type:"object",objectFields:{text:{type:"text"},hidden:Q}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:Q}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},G=(e,t)=>{const n=E({...t,[T]:e},{...It[e.control],label:e.label});if(!Xr.has(e.control))return n;const o=t.render;return{...ct(n,"authored-copy"),render:r=>i(Oo,{name:r.name,children:o(r)})}},Bs="Everything else on this block comes from the linked post. Unlink it to edit by hand.",jr={field:"source.slug",set:!0},Ds={not:jr},Vr="Select a word, then press the highlighter.",zr=new Set([Vr]),Yr=e=>zr.has(e);function Hs(e,t,n){return G({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Gs(e,t,n){return G({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function Ms(e,t,n){return G({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Us(e,t,n){return G({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Ws(e){return{type:"custom",[Me]:{label:e},...E({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(Do,{value:Ge(t),onChange:n,label:e})}}function Ks(e,t,n){return G({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const $s={Design:mn,Animation:bn};function Xs(e){return{type:"custom",render:()=>i(qr,{text:e})}}function qr({text:e}){return i("p",{className:"sf-note",children:l(e)})}function js(e){return ue(e)!==null&&e?.tabs!==void 0}const Et=new Map;function Vs(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Et.get(n)??{type:"custom",tabs:t,[de]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(k,{})};return Et.set(n,o),o}const kt=new Map;function zs(e){const t=kt.get(e)??{type:"custom",[de]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(k,{})};return kt.set(e,t),t}function Jr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Ys(e,t){return Jr(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(k,{})}}function qs(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(k,{})}}function Js({title:e,children:t}){const[n,o]=z(()=>!ke.has(e));return i(Xn,{title:e,open:n,onToggle:r=>{o(r),r?ke.delete(e):ke.add(e)},children:t})}const ke=new Set;function Zs({label:e}){return i(jn,{title:l(e),level:Er(2)})}function Zr({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),s=r?o?.[r]:void 0,a=s?l(s):t;return N("div",{className:"sf-swatches",children:[e.map(c=>{const d=o?.[c]?l(o[c]):c;return i(me,{content:d,children:i(ao,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":d})},c)}),i("span",{className:"sf-swatch-hex",children:a})]})}function Qs(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(Qr,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function Qr({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const s=typeof o=="string"?o:void 0,{colors:a,n:c}=Wt(),d={background:a.background,surface:a.surface,surface2:lr(a),band:ir(a)},f=n?Oe:t,h=Sr(s,t,f),p=_t(void 0,f,d),u=n?br:void 0,g=xr(s,t),m=f===Oe?l("the theme's section background"):l("Theme {n} background",{n:c});return i(ge,{label:l(e),icon:i(wn,{}),value:h?"":_t(s,t,d),inherited:p,resetTo:D(p.toUpperCase(),m),onChange:r,onReset:()=>r(u),choices:[{label:l("No fill"),color:"",selected:g==="none",onPick:()=>r(wr)},{label:`${l("Section band")} · ${d.band.toUpperCase()}`,color:d.band,selected:g==="band",onPick:()=>r(Oe)}]})}function ei(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=hr(r,t);return i(w,{label:l(e),icon:i(fe,{}),changed:!s,action:i(y,{words:S()?.panel,label:l(e),changed:!s,detail:l("the theme's image stage"),onReset:()=>o(dr)}),children:Zr({swatches:fr,current:s?gr:mr(r,t),onPick:o,names:pr})})}}}function ea(e=n=>n,t){return J({_gSectionTheme:O(yr),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(vo,{value:e(n),onChange:o,followLabel:t})}})}function ee({min:e,max:t,step:n,value:o,onChange:r,suffix:s="",readout:a=!0,notch:c,ariaLabel:d,disabled:f=!1,placeholder:h,placeholderWord:p,onClear:u}){const g=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:g?"sf-slider has-notch":"sf-slider",style:g?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(wo,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...p?{emptyLabel:l(p)}:{},suffix:s||void 0,showInput:a,label:d===void 0?void 0:l(d),disabled:f,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:m=>{m===null?u?.():m!==o&&r(m)}})})}function Ft(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:a,restTrack:c,unsetMark:d,icon:f,unit:h="px"}=t;return{type:"custom",render:({value:p,onChange:u})=>{const g=typeof p=="number"?p:null,m=g===null;return i(w,{label:l(e),icon:f?q(f):void 0,value:m?d||s===void 0?void 0:l(s):`${g}${h}`,changed:!m,action:d?Pe(d,{changed:!m,onReset:()=>u(null)}):i(y,{words:S()?.panel,label:l(e),changed:!m,onReset:()=>u(null)}),hint:typeof a=="string"?l(a):a,children:c?c({min:n,max:o,step:r,px:g,label:e,onChange:u}):ee({min:n,max:o,step:r,value:g??n,readout:!1,ariaLabel:e,onChange:u})})}}}const le="Corners";function Fe(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return i(w,{label:l(le),icon:i(yn,{}),changed:r,action:Pe(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(ni,{tier:e,px:o,onRadius:n})})}}}function A(e){const t=M();return[t?.values?.[e],n=>t?.onChange(e,n)]}function At(){return ct({type:"custom",render:()=>i(Co,{})},"always")}function ti(){const e=M();return t=>e?.onChangeMany(t)}function ni({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,s]=A(e.sidesKey),a=tt(r)??[...et];return i(co,{label:l(le),value:a,corners:Mn,onChange:c=>{const d=tt(c)??[];s(d.length===et.length?null:d)},radius:t,onRadiusChange:n,radiusMin:U,radiusMax:$e,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function Lt(){return At()}function oi({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=v(),r=typeof o=="number"?`${o}px`:l("not set");return i(y,{words:S()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):D(r,l("Styles")),onReset:n})}function ri(){const{cornerRadiusPx:e}=v();return typeof e=="number"?e:U}function ii(){return Fe({sidesKey:"sectionCornerSides",useFollowed:ri,mark:i(oi,{label:le}),hint:li})}const li="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function ta(){return J({_gShape:O("Shape"),sectionCorners:ii(),sectionCornerSides:Lt(),...X("sectionBorder",Nt)})}const si=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function ai(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function ci(){let e;try{const t=xt(v().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||or.line}function di({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:s=!0,above:a={}}){const c=e&&typeof e=="object"?e:{},[d,f]=z(()=>r?Jn(c,a):!1),h=si(),p=u=>ai(r&&s?u:{width:u.width,color:u.color,...s?{style:u.style}:{}});return i(w,{label:l("Border"),icon:i(xn,{}),action:r?i(Yn,{each:d,label:l("Each side"),onChange:f}):void 0,children:i(zn,{label:l("Border"),value:c,each:d,onChange:u=>t(p(u)),placeholder:n,presets:o,words:h,styles:s,max:nr})})}function ui({value:e,onChange:t,view:n}){const[o]=A("sectionBorder"),[r]=A(W("sectionBorder")),s=ci(),a=d=>d&&typeof d=="object"?d:{},c=n==="phone"?{...wt(a(o)),...wt(a(r))}:n==="tablet"?a(o):{};return i(di,{value:e,onChange:t,placeholder:{sides:qn(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}function na(e){return R(e,Nt(e==="mobile"?"phone":e))}function Nt(e){return{type:"custom",render:({value:t,onChange:n})=>i(ui,{value:t,onChange:n,view:e})}}function X(e,t){const n=(o,r)=>ie(e,t(o),Te)[r];return{[e]:n("desktop",e),[W(e)]:n("tablet",W(e)),[F(e)]:n("phone",F(e))}}function oa(e){return{type:"custom",render:()=>i(pi,{partKey:e})}}function pi({partKey:e}){const[t]=A("id"),[n]=A("_partStyles"),{textStyles:o}=v(),r=Wo();let s=null;try{s=Go().select}catch{s=null}const a=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i($n,{name:l("Text"),preview:Ho(a,c,{noStyle:l("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??Uo.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(Mo(t,e))}})}function Pt(e){const{cornerRadiusPx:t}=v(),n=typeof t=="number"?t:e;let o=null;try{const{appState:s,selectedItem:a}=te(d=>d),c=a?.props?.id?String(a.props.id):void 0;o=c?Kn(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Un(r)?r:n}function fi({label:e,changed:t=!1,onReset:n=()=>{}}){const o=Pt(U);return i(y,{words:S()?.panel,label:l(e),changed:t,detail:D(`${o}px`,l("the section")),onReset:n})}function hi(){return i(k,{children:l("Follows the section's Corners until you set a number here.")})}function mi(){return Fe({sidesKey:"cardCornerSides",useFollowed:()=>Pt(U),mark:i(fi,{label:le}),hint:i(hi,{})})}function gi(){return{type:"custom",render:()=>i(en,{})}}function ra(e){return{...e,render:t=>i(tn,{render:e.render,props:t})}}function ia(){return{_gShape:O("Shape"),cardCorners:mi(),cardCornerSides:Lt(),cardCornersApplyAll:gi()}}function bi(){return E({type:"custom",render:e=>i(xi,{...e})},{type:"select",label:K,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 wi(e,t){const n=bt(e);if(n!=="custom")return l(gt.find(r=>r.value===n)?.label??"");const o=rt(ye(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):l("Custom")}function xi(e){const{value:t,onChange:n}=e,[o]=A("content"),r=Array.isArray(o)?o.length:0,s="follows"in e,a=t!=null,c=a?t:s?e.follows:void 0,d=bt(c),f=r>=2&&r<=ot,h=()=>[...mo[r]??[]],p=V(null),u=b=>{const _=p.current;_&&JSON.stringify(b)===JSON.stringify(_.shares)?n(_.value):b&&n(b)},g=b=>{b===d||b==="custom"&&!f||n(b==="custom"?h():b)},m=l("The width bar works for 2 to {count} blocks.",{count:ot}),C=a&&(s||t!=="content"),x=bo().widths.hint(r,ho);return i(w,{label:l(K),icon:i(pe,{}),changed:C,hint:d!=="custom"?void 0:f?x:m,action:i(y,{words:S()?.panel,label:l(K),changed:C,disabled:e.readOnly===!0,detail:s?B(b=>l(b),wi(e.follows,r),e.followsView):l("Fit content"),onReset:()=>n(void 0)}),children:N("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(nt,{label:l(K),value:d,options:gt.map(b=>({value:b.value,label:b.value==="custom"&&!f?m:l(b.label),icon:Pr(i("span",{className:"sf-gallery-pic sf-share-pic",children:vt(b.weights).map((_,j)=>i("i",{style:{gridColumn:`span ${_}`}},j))}),l(b.label),b.value==="custom"&&!f?m:l(b.label))})),onChange:g,columns:3,cell:Bt,tooltips:!1,disabled:e.readOnly===!0})}),d==="custom"&&f?i("div",{onFocus:()=>{p.current={value:t,shares:rt(ye(c,r),r)}},onBlur:()=>{p.current=null},children:i(go,{label:l(K),count:r,value:ye(c,r),onChange:u,readOnly:e.readOnly===!0})}):null]})})}function vt(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 la(){return Z(Jo,i(In,{}),ft,ft[0].value)}function sa(){return R("mobile",Nr(K,i(pe,{}),tr.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:vt(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),er,{columns:2,cell:Bt}))}const Bt={width:"5.75rem",height:"3.25rem"};function aa(){return ie("share",bi(),Te)[W("share")]}function Si(){return R("mobile",$(ht,i(je,{}),Se,Qo,1,Se,"",{clear:{phoneFollows:!1,hint:Se}}))}const Dt={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function ca(){const e=$(ht,i(je,{}),mt,Zo,1,mt,"",{clear:{emptyLabel:"Auto"}}),t=ie("columns",e,{...Dt,tablet:Te.tablet}),n=ie("columns",e,Dt,{phoneRow:Si()});return{...t,phoneRow:n.phoneRow}}function da(e,t,n,o,r,s){return{type:"custom",render:({value:a,onChange:c})=>i(w,{label:l(e),icon:i(Qe,{noun:s}),action:i(y,{words:S()?.panel,label:l(e),changed:!Rr(a),detail:l("the Text style in Styles"),onReset:()=>c(_r),defaultAction:{onPress:()=>c(Cr),title:l("Keep this section's own built-in size"),icon:i(Sn,{})}}),children:ee({min:t,max:n,step:o,value:typeof a=="number"?a:r,suffix:"px",ariaLabel:e,onChange:c})})}}function ua(){return{_gCellWidth:O("Cell width"),gridSpan:Z("Positions",i(pe,{}),[{label:"Auto",value:""},...Array.from({length:ln},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function L(){let e=null,t=null;try{e=ve(yi),t=te(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const yi=Kt(null);function Ci({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:a,fallback:c}){const d=L()[a],f=be(void 0,d,c);return i(k,{children:ee({min:e,max:t,step:n,value:be(o,d,c),readout:!1,ariaLabel:r,notch:f,onChange:s})})}function _i({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const a=L()[t],c=be(void 0,a,n);return i(y,{words:S()?.panel,label:l(e),changed:r,detail:B(d=>l(d),`${c}${o}`),onReset:s})}function Ri(e){return Ft(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(_i,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Ci,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Oi={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Ti={Top:Ze,Bottom:Ye,Left:qe,Right:Je},Ii=e=>{const t=Ti[e];return i(t,{})};function pa(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=x=>Oi[x],s=x=>$(r("Top"),i(Ze,{}),I.min,I.max,I.step,x,"px"),a=(x,b,_,j=I)=>R("mobile",Ri({label:r(x),icon:Ii(x),desktopKey:b,min:j.min,max:j.max,step:j.step,fallback:_})),c=e.top??I.min,d=e.bottom??I.min,f="sectionPaddingLeft",h="sectionPaddingRight",p=e.sideBounds??I,u=e.side??p.min,g=e.sidePhone??u,m=e.phone===!0,C=x=>m?R("desktop",x):x;return J({...o?{_gSpacing:O("Padding")}:{},[t]:C(s(c)),...m?{[F(t)]:a("Top",t,c)}:{},...e.only==="top"?{}:{[n]:C($(r("Bottom"),i(Ye,{}),I.min,I.max,I.step,d,"px")),...m?{[F(n)]:a("Bottom",n,d)}:{}},...e.sides?{[f]:C($(r("Left"),i(qe,{}),p.min,p.max,p.step,u,"px")),...m?{[F(f)]:a("Left",f,g,p)}:{},[h]:C($(r("Right"),i(Je,{}),p.min,p.max,p.step,u,"px")),...m?{[F(h)]:a("Right",h,g,p)}:{}}:{}})}function fa(e,t){const n=Object.fromEntries(Object.entries(t).map(([s,a])=>[s,s in e&&ue(a)?e[s]:a])),o={};let r=!1;for(const[s,a]of Object.entries(e)){if(s in t){r||Object.assign(o,n),r=!0;continue}o[s]=a}return r||Object.assign(o,n),o}const se="Width";function ha(e,t=Or,n=!0){const o=t.map(r=>({label:Tr[r],value:r}));return J({...n?{_gWidth:O(se)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(w,{label:l(se),icon:i(Dn,{}),action:n?i($r,{inherited:s?.inherited??!1,onReset:()=>r(Ir),label:se}):void 0,children:Ee({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:se})})}})}function ma(){const e=(o,r)=>({type:"custom",render:({value:s,onChange:a})=>i(Ei,{value:s,onChange:a,view:o,badge:r})}),t=o=>({type:"custom",render:({value:r,onChange:s,field:a})=>i(Fi,{value:r,onChange:s,unit:a?.unit,view:o})}),n=o=>{const r=Br("Unit",i(Ve,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");if(o==="desktop")return r;const s=r.render;return{...r,render:a=>i(Ai,{props:a,draw:s,view:o})}};return J({_gHeight:O(Y),...X("sectionHeightMode",o=>o==="desktop"?e(o):e(o,r=>i(Li,{view:o,onClear:()=>r(void 0)}))),...X("sectionHeightValue",t),...X("sectionHeightUnit",n)})}function Ei({value:e,onChange:t,view:n,badge:o}){const r=L(),s=c=>["auto","fixed","screen"].includes(c),a=ae(n,r)?.mode??"auto";return i(w,{label:Y,icon:q(i(kn,{})),action:o?o(t):void 0,children:Ee({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:s(e)?e:a,onChange:t,ariaLabel:Y})})}function Ht(e,t){return e==="phone"&&we(t)?Xo(t):$o(t)}function ae(e,t){return e==="desktop"||(e==="tablet"?we(t):Ko(t))?null:Ht(e,t)}const P=(e,t)=>e==="tablet"?W(t):F(t);function ki(e,t,n,o){const r=ae(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[P(e,"sectionHeightMode")]:r.mode,...r.mode==="fixed"?{[P(e,"sectionHeightUnit")]:r.unit}:{},...n==="sectionHeightUnit"?{[P(e,"sectionHeightValue")]:r.value}:{},[P(e,n)]:o}}function Gt(e,t,n){const o=M(),r=ae(e,L());return!o||!r?{followed:null,write:n}:{followed:r,write:a=>o.onChangeMany(c=>{const d=ki(e,c,t,a);return d===null?{[e==="desktop"?t:P(e,t)]:a}:Object.keys(d).length?d:null})}}function Fi({value:e,onChange:t,unit:n,view:o}){const{followed:r,write:s}=Gt(o,"sectionHeightValue",t),a=(r?r.unit:n)==="%"?"%":"px",c=a==="%"?Yo:zo;return i("div",{className:"sf-field",children:ee({min:c.min,max:c.max,step:c.step,value:r?null:typeof e=="number"?e:c.fallback,...r?{placeholder:r.value}:{},suffix:a,ariaLabel:Y,onChange:s})})}function Ai({props:e,draw:t,view:n}){const{followed:o,write:r}=Gt(n,"sectionHeightUnit",e.onChange);return t({...e,...o?{value:void 0,storedValue:void 0,follows:o.unit}:{},onChange:r})}function Li({view:e,onClear:t}){const n=L(),o=ae(e,n)===null,r=e==="phone"&&we(n),s=Ht(e,n),a=B(c=>l(c),s.mode==="auto"?l("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return i(y,{words:S()?.panel,label:l(Y),changed:o,detail:a,onReset:t})}function ga(){const e=n=>({type:"custom",render:({value:o,onChange:r,id:s,name:a})=>i(vi,{value:o,onChange:r,labelId:`${s??a??"stickTop"}-label`,view:n})}),t=n=>({type:"custom",render:({value:o,onChange:r})=>i(Ni,{value:o,onChange:r,view:n})});return{_gStick:O(xe),...X("stickTop",e),...X("stickTopDistance",t)}}function Ni({value:e,onChange:t,view:n}){const o=M(),r=L(),s=n==="desktop"||Ae(n,r)?null:Mt(n,ut(r)),a=s&&o?c=>o.onChangeMany(d=>{const f=Pi(n,d,c);return f===null?{[P(n,"stickTopDistance")]:c}:Object.keys(f).length?f:null}):t;return i("div",{className:"sf-field",children:ee({min:oe.min,max:oe.max,step:oe.step,value:s?null:typeof e=="number"?e:oe.fallback,...s?{placeholder:s.distance}:{},suffix:"px",ariaLabel:l("Distance from top"),onChange:a})})}function Ae(e,t){return e==="tablet"?Vo(t):jo(t)}function Mt(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance}:{on:t.desktop,distance:t.desktopDistance}}function Pi(e,t,n){return e==="desktop"||Ae(e,t)?null:n===void 0?{}:{[P(e,"stickTop")]:!0,[P(e,"stickTopDistance")]:n}}function vi({value:e,onChange:t,labelId:n,view:o}){const r=L(),s=ut(r),a=o==="phone"?s.phone:o==="tablet"?s.tablet:e===!0,c=o==="phone"&&s.ownTablet,d=o==="desktop"?null:Mt(o,s),f=d?.on?`${d.distance}px`:l("Off");return i(w,{label:l(xe),labelId:n,icon:q(i(Nn,{})),action:N(k,{children:[o!=="desktop"?i(y,{words:S()?.panel,label:l(xe),changed:Ae(o,r),detail:B(h=>l(h),f,c?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(he,{checked:a,onChange:t,ariaLabelledBy:n})]})})}const Ut="e.g. about";function ba(){return{_gAnchor:O("Anchor"),anchor:G({control:"plainText",label:"Name",placeholder:Ut},{type:"custom",render:({value:e,onChange:t})=>i(fn,{value:e,onChange:t,nameBox:(n,o)=>i(H,{value:n,onChange:o,label:"Name",placeholder:Ut,hideable:!1,markup:!1})})})}}function wa(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:a})=>{const c=`${s??a??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return i(w,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(po,{id:c,value:Number.isFinite(d)?new Date(d):null,onChange:f=>r(f?f.toISOString():"")})})}}}function xa(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:a})=>{const c=`${s??a??e}-date`;return i(w,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(uo,{id:c,value:jt(typeof o=="string"?o:null),onChange:d=>r(d?Xt(d):"")})})}}}function Bi(e,t,n,o){return{type:"custom",...E({},{...Q,label:e}),render:r=>{const{value:s,onChange:a,id:c,name:d}=r,f="follows"in r,h=r,p=typeof s=="boolean",u=typeof h.follows=="boolean"?h.follows:t,g=p?s:f?u:t,m=`${c??d??e}-label`,C=h.readOnly===!0,x=i(he,{checked:g,onChange:a,disabled:C,ariaLabelledBy:m});return i(w,{label:l(e),labelId:m,icon:n,hint:o===void 0?void 0:l(o),action:f?N(k,{children:[i(y,{words:S()?.panel,label:l(e),changed:p,detail:h.followsNoView?l(u?"On":"Off"):B(b=>l(b),l(u?"On":"Off"),h.followsView),disabled:C,onReset:()=>a(void 0)}),x]}):x})}}}function Sa(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(st,{label:l("Background"),icon:i(Ln,{}),id:r,value:Hn(e),onChange:t})}}}function ya(e,t){return{type:"custom",...E({},{...Q,label:e}),render:({value:n,onChange:o,id:r})=>{const s=typeof n=="boolean"?n:t,a=`${r??e}-checkbox`;return i(w,{label:l(e),htmlFor:a,className:"sf-checkbox",action:i(so,{id:a,checked:s,onChange:o})})}}}function Ca(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(st,{label:l(e),icon:n,value:o||t,onChange:r})}}function _a(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(Di,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Di({value:e,onChange:t,twin:n}){const{hex:o,n:r}=Gi(),s=D(o.toUpperCase(),l("Theme {n} background",{n:r}));if(n){const a=Gn(n.follows);return i(ge,{label:l("Fill"),icon:i(fe,{}),value:e,inherited:a??o,resetTo:B(c=>l(c),a?a.toUpperCase():s,n.view),onChange:t,onReset:()=>t(void 0)})}return i(ge,{label:l("Fill"),icon:i(fe,{}),value:e,inherited:o,resetTo:s,onChange:t,onReset:()=>t("")})}function Hi(e,t,n){if((e?.content??[]).some(a=>a?.props?.id===t))return re(n);const r=Wn(e,t);if(r.length===0)return null;const s=re(Rt(n));if(s!==null)return s;for(let a=r.length-1;a>0;a-=1){const c=re(Rt(r[a].sectionAccent));if(c!==null)return c}return re(r[0].sectionAccent)}function Gi(){const{colors:e,n:t}=Wt();return{hex:e.background,n:t}}function Wt(){const e=xt(v().theme),[t]=A("sectionAccent");let n=null;try{const{appState:r,selectedItem:s}=te(c=>c),a=s?.props?.id?String(s.props.id):void 0;n=a?Hi(r?.data,a,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:rr(e.themes[o]),n:o+1}}const Mi=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function Ui({label:e,value:t,onChange:n,points:o=Mi}){const r=o.map(s=>({...s,label:l(s.label),...s.title?{title:l(s.title)}:null}));return i(lo,{label:l(e),value:t,points:r,onChange:n})}function Ra(){return At()}const Oa={top:i(On,{}),right:i(Rn,{}),bottom:i(Cn,{}),left:i(_n,{})};function Ta(e,t,n,o,r,s,a){const c=p=>t.find(u=>u.value===p),d=p=>({value:p,label:"",disabled:!0,title:o}),f=p=>{const u=t.find(m=>m.cell===p);if(!u)return d(`missing-${p}`);const g=s?.[p];return g?{value:u.value,label:u.label,icon:g}:{value:u.value,label:u.label}},h=[d("corner-top-left"),f("top"),d("corner-top-right"),f("left"),d("centre"),f("right"),d("corner-bottom-left"),f("bottom"),d("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:u})=>{const g=t.some(m=>m.value===p)?p:n;return i(w,{label:l(e),icon:r,value:c(g)?.label?l(c(g).label):a?l(a):"",children:Ui({label:e,value:g,onChange:u,points:h})})}}}function Ia(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:s})=>i(Po,{label:e,options:(s.options??t).map(a=>({...a,label:l(a.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:l(n)}:{}})}}function Ea(e,t,n,o){return{type:"custom",options:t,fallback:n,...E({},{type:"select",label:e}),render:({value:r,onChange:s,field:a})=>i(Bo,{label:e,options:(a.options??t).map(c=>({...c,label:l(c.label)})),fallback:a.fallback??n,value:r,onChange:s,placeholder:o===void 0?void 0:l(o)})}}function ka(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const Fa=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Aa(e,t,n){const o=Object.keys(De).map(r=>({label:De[r],value:r,picture:n[r]}));return{type:"custom",...E({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(Ki,{label:e,icon:t,options:o,onChange:r})}}function Wi(e,t,n){const o=Vt(e,t,n);if(o!==void 0)return o==="save-makes-frame"?l("A frame is made from this video when you save the page."):o==="starts-dark"?l("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"?l("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"?l("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"?l("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"?l("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=Yt(e);return r==="frame-missing-image"?l("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?l("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?l("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?l("No image yet. The slide shows its background colour until you choose one."):void 0}function Ki({label:e,icon:t,options:n,onChange:o}){const r=M(),s=r?.values??{},a=zt(s),c=ve(Zt),d=Jt(c?.docId??null);let f=null;try{f=te(p=>p.appState.data)}catch{f=null}const h=qt(r?.id,f,d);return i(w,{label:l(e),icon:q(t),hint:Wi(s,h,c?.hasUnsavedEdits??!1),children:Ee({options:n,value:a,onChange:o,ariaLabel:e})})}function La(e,t,n,o={}){const r={type:"custom",[Ue]:!0,render:({value:s,onChange:a,name:c})=>i(No,{value:s||"",onChange:a,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?R("each",r):r}const Na={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function $i(e){const t=l(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function Pa({value:e,onChange:t,label:n}){const o=e||{},r=M(),s=r?r.values!==r.node.props:!0,a=!!o.pending&&s,c=!!o.pending&&!s,d=!!Fr(kr()).geocode,f=Be(),h=(p,u)=>t({...o,[p]:u??void 0});return N(k,{children:[i(w,{label:l(n),icon:i(ze,{}),action:d?i(me,{content:l("Find from the address (OpenStreetMap)"),children:i(it,{"aria-label":l("Find from the address"),"aria-busy":a||void 0,disabled:a,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(Pn,{})})}):void 0,children:d&&o.status?i(hn,{compact:!0,oneLine:!0,spaced:!1,status:a?"busy":o.ok&&!c?"found":"notfound",statusText:a?l("Finding…"):c?l(xo):l(o.status),hint:$i(o)}):null}),i(w,{label:l("Enter by hand"),labelId:f,icon:i(Tn,{}),action:i(he,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:f})}),o.manual&&i(w,{label:l("Latitude, longitude"),icon:i(ze,{}),children:N("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(lt,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>h("lat",p),min:-90,max:90,step:1e-4,placeholder:l("Latitude")}),i(lt,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>h("lng",p),min:-180,max:180,step:1e-4,placeholder:l("Longitude")})]})})]})}function Xi(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function ji(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,s)=>s===t?{text:n}:r)}function va(e,t){return e===null?null:t>e?e:null}function Vi(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 Ba={label:"Ticker items",icon:i(An,{})};function Da(e,t,n,o){return{type:"custom",[T]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...E({},{...It.textList,label:e}),render:({value:r,onChange:s})=>i(zi,{label:e,icon:q(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function zi({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const a=V(null),[c,d]=z(null),f=p=>p.map(u=>({text:u?.text??""})),h=p=>{const u=Vi(n,p,c);u===null&&(a.current=null),d(u),r(f(p))};return i(Zn,{label:l(e),icon:t,noun:l("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?i(at,{target:a,value:Xi(n,c),onChange:p=>r(ji(n,c??-1,p)),disabled:c===null,label:c===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,u,g)=>i("input",{type:"text",className:s&&c===u?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:u+1}),onChange:m=>g({text:m.target.value}),onFocus:m=>{a.current=m.currentTarget,d(u)}})})}function Ha(e,t){const n=`${e.label} — row ${t+1}`;return G({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Ga(e){return{_gCards:O("Cards"),coverIndex:Z("Cover image",i(Fn,{}),Fo,String(Ao),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:ei("Image background",ur),cardImage:Ji()}}function Ma(){return{outline:Z("Card outline",i(vn,{}),Io,ko),indexBadge:Z("Card number",i(Ve,{}),To,Eo),showBadge:Bi("Product badge",!0,i(Qe,{noun:"tag"}))}}function Ua(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...Q,label:ce.find(s=>s.id===r).label}),o=r=>E(So(Le),n(r));return{_gShowOnCard:O("Show on a card"),[Le]:E({type:"custom",render:()=>i(Yi,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(Le)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const Le="showCardPrice",ce=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function Yi({rest:e}){const t=L(),n=ti(),o=a=>typeof t[a]=="boolean"?t[a]:void 0,r=a=>o(a)??e[a],s=ce.some(({id:a})=>o(a)!==void 0&&o(a)!==e[a]);return i(Ne,{parts:ce,changed:s,shown:r,onPress:(a,c)=>n({[a]:c}),onReset:()=>n(Object.fromEntries(ce.map(({id:a})=>[a,void 0])))})}function Wa(e,t="display"){const n=F(t);return{[t]:R("desktop",{type:"custom",render:({value:o,onChange:r})=>i(Ne,{parts:e,changed:eo(o),shown:s=>to(o,s),onPress:(s,a)=>r(ro(o,s,a)),onReset:()=>r(void 0)})}),[n]:R("mobile",{type:"custom",render:({value:o,onChange:r})=>i(qi,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Ne({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:a}){const c=l("Display");return i(w,{label:c,icon:i(gn,{}),changed:t,action:i(y,{words:S()?.panel,label:c,changed:t,detail:s,onReset:r}),children:i(Qn,{label:c,items:e.map(d=>({id:d.id,label:l(d.label),shown:n(d.id),...a?{disabled:!0,disabledReason:l(a)}:{}})),onChange:o})})}function qi({parts:e,desktopKey:t,value:n,onChange:o}){const r=L()[t];return i(Ne,{parts:e,changed:oo(n),shown:s=>no(r,n,s),onPress:(s,a)=>o(io(n,s,a)),onReset:()=>o(Ro),detail:l("the same as Desktop")})}function Ji(){return Ft("Card image",{min:U,max:$e,step:nn,hint:"Rounds the picture. The card's own corner is in Styles."})}function Ka(){return Fe({sidesKey:"cornerSides",step:on,useFollowed:()=>U,mark:i(Zi,{label:rn}),hint:l("Rounds the picture. Left alone it stays square.")})}function Zi({label:e,changed:t=!1,onReset:n=()=>{}}){return i(y,{words:S()?.panel,label:l(e),changed:t,onReset:n})}function $a(){return{type:"custom",render:({value:e,onChange:t})=>i(nl,{value:typeof e=="string"?e:"",onChange:t})}}function Qi({layout:e,width:t}){return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:6,gridAutoFlow:"row dense",gap:2},children:cn(e).map(([n,o],r)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${n}`,gridRow:`span ${o}`}},r))})}const el={width:"3.5rem",height:"2.5rem"},tl=200;function nl({value:e,onChange:t}){const[n,o]=z(null),[r,s]=z(4),a=V(null);$t(()=>{const u=a.current;if(!u||typeof ResizeObserver!="function")return;const g=()=>s(u.getBoundingClientRect().width>=tl?4:3);g();const m=new ResizeObserver(g);return m.observe(u),()=>m.disconnect()},[]);const c=e&&e in ne?e:"",d=Xe(n,c),f=Xe(n,"").length,h=dn("no-symbol"),p=[{value:"",label:l("Not chosen"),icon:vr(h,l("Not chosen"))},...d.map(u=>({value:u,label:l(ne[u].label),icon:i(Qi,{layout:ne[u],width:40})}))];return i(w,{label:l("Layout"),icon:i(En,{}),value:c?l(ne[c].label):void 0,children:i("div",{ref:a,style:{flex:"1 1 auto",minWidth:0},children:i(nt,{label:l("Layout"),value:c,options:p,onChange:t,columns:r,cell:el,header:N("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:l("Photos in a row")}),i(Vn,{options:[{id:"all",label:l("All")},...sn.map(u=>({id:String(u),label:String(u)}))],value:n===null?"all":String(n),ariaLabel:l("Photos in a row"),onChange:u=>o(u==="all"?null:Number(u))}),i("span",{className:"text-2xs text-ink-faint",children:l("{n} of {total} layouts",{n:f,total:an.length})})]})})})})}export{jr as BOUND_TO_POST,Bs as BOUND_TO_POST_NOTE,$s as BUCKET_ICONS,Na as CUSTOM_FIELD_MEDIA,Pa as CoordsField,Ot as DESKTOP_GAP_NOT_OVERLAP,Ne as DisplayRow,Oa as EDGE_ARROWS,fo as FOCAL_DEFAULT,Mi as FOCAL_POINTS,de as FOLD_FIELD_MARKER,Ui as FocalPicker,Zs as GroupLabel,Vr as HIGHLIGHT_HINT,H as HidableTextField,Me as LINK_FIELD_MARKER,Os as Label,Ue as MEDIA_FIELD_MARKER,Fa as MEDIA_TYPE_OPTIONS,Ds as NOT_BOUND_TO_POST,Js as PanelBand,qr as PanelNoteLine,yi as RowPropsContext,We as SCAFFOLD_FIELD_MARKER,za as SCALAR_TEXT_CONTROLS,Hr as SiteGapDefaultReset,ee as Slider,Zr as Swatches,Va as TEXT_CONTROL_KINDS,T as TEXT_FIELD_MARKER,Ba as TICKER_ITEMS_ROW,zi as TextListField,se as WIDTH_LABEL,$r as WidthDefaultReset,Vi as aimAfterListChange,ba as anchorFields,D as backTo,Qs as backgroundField,la as boxBlockSpacingField,ca as boxColumnsFields,_a as boxFillField,Si as boxPhoneRowField,bi as boxShareField,sa as boxSharePhoneField,aa as boxShareTabletField,Hi as boxThemeIndexOf,Vs as bucketHeader,oa as buttonWordsEntryField,mi as cardCornersField,ei as cardImageBackgroundField,Ji as cardImageField,Ga as cardMediaFields,ia as cardShapeFields,Ua as cardShowFields,Ma as cardStyleFields,ua as cellWidthFields,ya as checkbox,Ca as colorInput,Is as containerDirectionField,Gr as containerGapField,Mr as containerGapPhoneField,Ts as containerGapRows,Ur as containerGapTabletField,$i as coordsResultTip,Us as copyText,Lt as cornerSidesField,Fe as cornersRowField,xa as date,wa as dateTime,zs as designGroupHeader,Wa as displayFields,Ta as edgePad,va as focusAfterRemove,Ra as focusKeptField,Ys as foldMarker,ue as foldMetaOf,Jr as foldTitleOf,ki as followedHeightPatch,Pi as followedStickPatch,$a as galleryLayoutField,ma as heightFields,ae as heightFollowedBy,Es as heroGroupPlacementPoints,Ge as hidableText,Yr as hintIsWhileTyping,Ka as imageCornersField,vs as inOwnBox,js as isBucketHeader,At as keptBy,Ws as linkField,Wi as loadingRowHint,Aa as loadingShowsField,Ia as multiSelect,Sa as pageBackgroundField,Xs as panelNote,Ri as phoneOverrideField,Ms as plainText,Ks as plainTextarea,Ft as pxField,qs as quietMarker,He as readHidable,Xi as rowText,Ea as searchSelect,na as sectionBorderField,ii as sectionCornersField,ta as sectionShapeFields,ea as sectionThemeFields,ji as setRowText,da as sizeField,ka as sourceField,pa as spacingFields,ga as stickFields,fa as swapPadding,ra as templateField,Hs as text,Qt as textFieldIdentifier,As as textFieldOffPage,Ns as textFieldPanelOnly,Da as textList,Ha as textListRowField,Gs as textarea,Bi as toggle,La as upload,ti as useSelectedPatch,L as useSelectedProps,A as useSelectedSibling,Dr as useSiteGapDetail,ha as widthField,Ps as withIdentifier,Fs as withOffPage,Ls as withPanelOnly,ks as withScaffold};
|
|
1
|
+
"use client";import{jsx as i,jsxs as N,Fragment as k}from"react/jsx-runtime";import{cloneElement as ve,createContext as Xt,useContext as Be,useEffect as Vt,useId as De,useRef as V,useState as z}from"react";import{useEasel as te,useSelectedHost as M}from"efficient-easel/easel";import{toDateKey as zt,fromDateKey as Yt}from"efficient-shell/format";import{say as l,editorEaselWords as S}from"../../../format/lib/editor-words.js";import{LOADING_SHOWS_LABELS as He,firstFrameHint as qt,loadingShowsOf as Jt,loadingStillHint as Zt}from"../../../format/lib/hero-video.js";import{pageFramesFor as Qt,usePageVideoFrames as en}from"../page-video-frames.js";import{ScreenDocumentContext as tn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as Ge,hidableText as Me}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as ue,LINK_FIELD_MARKER as Ue,MEDIA_FIELD_MARKER as We,SCAFFOLD_FIELD_MARKER as Ke,TEXT_FIELD_MARKER as O,foldMetaOf as pe,textFieldIdentifier as nn}from"efficient-easel/draw";import on from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as $e}from"../../../render/lib/document/show-when.js";import rn from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as ln,CORNER_RADIUS_MAX as je,CORNER_RADIUS_MIN as U}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as sn,IMAGE_CORNERS_LABEL as an}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as cn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as dn,GALLERY_LAYOUTS as ne,GALLERY_LAYOUT_KEYS as un,galleryChoices as Xe,galleryPictureCells as pn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as fn}from"./shell-glyph.js";import{anchorSiblingsOf as hn,placementPoints as mn}from"../../../format/lib/hero-group-placement.js";import gn from"../../components/AnchorField.js";import bn from"../../components/SourceStatus.js";import{AdjustIcon as wn,EyeIcon as xn,AnimationIcon as Sn,BackgroundIcon as yn,BorderAllIcon as Cn,BlockSectionIcon as _n,ColumnWidthsIcon as fe,ColumnsIcon as Ve,CornerIcon as Rn,DirectionDownIcon as Tn,DirectionLeftIcon as On,DirectionRightIcon as In,DirectionUpIcon as En,EditIcon as kn,GapIcon as Fn,GridIcon as An,GroundIcon as oe,HashIcon as ze,HeightIcon as Ln,ImageIcon as Nn,ListIcon as Pn,LocationIcon as Ye,PaddingBottomIcon as qe,PaddingLeftIcon as Je,PaddingRightIcon as Ze,PaddingTopIcon as Qe,PageIcon as vn,StickyIcon as Bn,SearchIcon as Dn,SquareIcon as Hn,TypeIcon as Gn,WidthIcon as Mn}from"efficient-easel/icons";import{FieldGlyph as et}from"../../components/FieldGlyph.js";import{resolvePageBackground as Un}from"../../../format/lib/content/page-background.js";import{boxFillOf as Wn,boxFillSlot as tt}from"../../../format/lib/content/box-background.js";import{typedHex as Kn}from"efficient-easel/pick";import{CORNER_SIDES as nt,CORNER_SIDE_POINTS as $n,hasOwnSectionCorners as jn,normalizeCornerSides as ot}from"../../../format/lib/content/section-corners.js";import{enclosingPath as Xn,enclosingSection as Vn}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsDrill as zn,SettingsField as w,SettingsGroup as Yn,SettingsGroupSub as qn,SettingsSegmented as Jn,SettingsBorder as Zn,SettingsSidesEach as Qn,SettingsSwitch as he,borderSides as eo,borderStartEach as to}from"efficient-easel/panel";import{ListField as no}from"efficient-easel/fields";import{DisplayChips as oo}from"efficient-shell/ui";import{desktopDisplayChanged as ro,partShownOnDesktop as io,partShownOnPhone as lo,phoneDisplayChanged as so,withDesktopPart as ao,withPhonePart as co}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as uo,Checkbox as po,ColorSwatch as fo,CornersInput as ho,DatePicker as mo,DateTimePicker as go,FOCAL_DEFAULT as bo,IconPicker as rt,COLUMN_COUNT_MAX as it,COLUMN_SHARE_MIN as wo,COLUMN_SHARES_EQUAL as xo,resolveColumnShares as lt,WidthsBar as So,useShellStrings as yo,IconButton as st,InputNumber as at,Slider as Co,Tooltip as me}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as _o}from"./geocode-resolve.js";import{ColourRow as ge,InheritedColourRow as be}from"./ColourControl.js";import{keptByRow as Ro}from"efficient-easel/screen/lib/document/style-fields";import ct from"./MarkupToolbar.js";import{deviceField as R}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as To,NoControlMark as Oo,noControlField as dt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as Io}from"../../../format/lib/document/own-box.js";import{PHONE_CLEAR as Eo,resolvePhoneValue as we}from"../../../format/lib/document/phone-override.js";import{phoneKey as F,tabletKey as W}from"efficient-easel/draw";import{SuppressibleText as ko}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Fo,CARD_OUTLINE_OPTIONS as Ao,DEFAULT_CARD_INDEX_FORMAT as Lo,DEFAULT_CARD_OUTLINE as No}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Po,DEFAULT_COVER_INDEX as vo}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Bo}from"efficient-easel/draw";import Do from"../../components/MediaUploadField.js";import Ho from"../../components/MultiSelectField.js";import Go from"../../components/SectionThemePicker.js";import Mo from"../../components/SearchSelectField.js";import Uo from"../../components/StorefrontLinkField.js";import{UiIcon as ut}from"efficient-easel/draw/client";import{SECTION_PADDING as I}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Wo}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Ko}from"efficient-easel/draw/client";import{encodePartId as $o}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as jo,useEaselStrings as Xo}from"efficient-easel/strings";import{hasPhoneHeight as Vo,hasTabletHeight as xe,resolveSectionMinHeight as zo,resolveTabletHeight as Yo}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as re,SECTION_STICK_LABEL as Se,hasPhoneStick as qo,hasTabletStick as Jo,resolveSectionStick as pt}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as Zo,SECTION_MIN_HEIGHT_GROUP_LABEL as Y,SECTION_SCREEN_PCT as Qo}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as er,resolveContainerDirection as ft}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as tr,BOX_BLOCK_SPACING_POINTS as ht,BOX_PHONE_ROW_LABEL as mt,BOX_COLUMNS_MAX as nr,BOX_COLUMNS_MIN as gt,BOX_PHONE_ROW_MAX as or,BOX_PHONE_ROW_MIN as ye,BOX_SHARE_CHOICES as bt,BOX_SHARE_LABEL as K,boxShareChoiceOf as wt,boxShareWidthsOf as Ce,BOX_SHARE_PHONE_DEFAULT as rr,BOX_SHARE_PHONE_POINTS as ir}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as v}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as lr,borderBySide as xt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as sr,normalizeTheme as St,normalizeThemeColors as ar,sectionBandTone as cr,surfaceTwoTone as dr}from"../../../format/lib/theme.js";import{CONTAINER_GAP as yt,CONTAINER_GAP_BUILT_IN as ur,CONTAINER_GAP_PHONE as _e,GAP_FIELD_CONTAINER as Re,followsSitePhoneGap as pr,hasOwnContainerGap as fr,hasOwnPhoneGap as Te,resolveContainerGap as Ct,resolvePhoneContainerGap as _t}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as hr,CARD_IMAGE_BG_OFF as mr,CARD_IMAGE_BG_SWATCH_NAMES as gr,CARD_IMAGE_BG_SWATCHES as br,isCardImageBackgroundInheriting as wr,cardImageBackgroundChoice as xr,THEME_CARD_IMAGE_BG as Sr}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as yr,SECTION_BG_NO_FILL as Cr,sectionBackgroundChoice as _r,THEME_SECTION_BG as Oe,isSectionBackgroundEmpty as Rr,sectionBackgroundHex as Rt}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Tr,nestedAccentValue as Tt,resolveSectionAccent as ie}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Or,TYPE_SIZE_INHERIT as Ir,isTypeSizeInheriting as Er}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as kr,WIDTH_CHOICE_LABEL as Fr,WIDTH_INHERIT as Ar}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as Lr}from"./panel-heading-scope.js";import{useEaselSession as Nr}from"efficient-easel/screen/lib/session-context";import{backendOf as Pr}from"../website-session.js";import{BOX_GAP as vr,describedAs as E,group as T,iconOf as q,sharedStyleKinds as J}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as Ie,onDesktopWords as B,phoneTwinFields as le}from"efficient-easel/screen/lib/document/box-fields";import{directionField as Br,gapField as Ee,iconPickerRow as Dr,pickerCellIcon as Hr,pickerNoneIcon as Gr,Segmented as ke,segmented as Mr,select as Z,slider as $}from"./box-fields.js";function ks({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function D(e,t){return l("{value} from {from}",{value:e,from:t})}function Ur(){const{blockGap:e}=v();return e===null?l("this container's own spacing"):D(`${e}px`,l("Styles"))}function Wr({inherited:e,onReset:t,label:n}){return i(y,{words:S()?.panel,label:l(n),changed:!e,detail:Ur(),onReset:t})}function Kr(e){return Ee({...vr,builtIn:ur[e],resolve:(t,n)=>Ct(e,t,n?.siteGap),action:(t,n)=>i(Wr,{inherited:!fr(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[Re]:e}})}function $r(e){return $e(R("mobile",{[Re]:e,type:"custom",render:t=>i(Vr,{container:e,...t})}),Ot)}function jr(e){return $e(R("tablet",{[Re]:e,type:"custom",render:t=>i(Xr,{container:e,...t})}),Ot)}const Ot={not:{field:"gap",in:Array.from({length:-yt.min},(e,t)=>yt.min+t)}};function Fs(e){return{gap:R("desktop",Kr(e)),[W("gap")]:jr(e),[F("gap")]:$r(e)}}function Xr({container:e,...t}){const[n]=A("gap"),{siteGap:o}=t.field??{},r=Math.max(_e.min,Ct(e,n,o));return Ee({..._e,builtIn:r,resolve:a=>Te(a)?a:r,action:(a,c)=>i(y,{words:S()?.panel,label:l("Gap"),changed:Te(a),detail:B(d=>l(d),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function Vr({container:e,...t}){const[n]=A("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=_t(e,void 0,n,o,r);return Ee({..._e,builtIn:s,resolve:c=>_t(e,c,n,o,r),action:(c,d)=>i(y,{words:S()?.panel,label:l("Gap"),changed:Te(c),detail:D(`${s}px`,pr(e,n,r)?l("Styles"):l("Desktop")),onReset:()=>d(void 0)})}).render(t)}function As(e){return Br({offered:er(e),fallback:ft(e,void 0),resolve:t=>ft(e,t)})}function Ls(e,t){return mn(t?hn(e,t):[],t)}function zr({inherited:e,onReset:t,label:n}){return i(y,{words:S()?.panel,label:l(n),changed:!e,detail:D(l("Full"),l("the page")),onReset:t})}function H({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:a=!0,markup:c=!0}){const{text:d,hidden:f}=Ge(e),h=V(null),p=V(null),u=_=>t(a?{text:_,hidden:f}:_),g=()=>t({text:d,hidden:!f}),m=a&&f,C=De(),x=r?Qr(r)?i("span",{className:"sf-hint-while-typing",children:l(r)}):l(r):void 0,b=f?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return i(w,{label:l(n),icon:i(Gn,{}),htmlFor:C,className:m?"is-hidden":void 0,hint:x,action:a?i(me,{content:b,children:i(st,{"aria-pressed":f,"aria-label":b,onClick:g,children:f?i(ut,{name:"eye-off",size:14}):i(ut,{name:"eye",size:14})})}):void 0,children:N("div",{className:"sf-copybox",children:[c&&i(ct,{target:s?p:h,value:d,onChange:u}),s?i("textarea",{id:C,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:_=>u(_.target.value)}):i("input",{id:C,ref:h,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:_=>u(_.target.value)})]})})}function Ns(e,t){return{...e,[Ke]:t}}function Ps(e){const t=e[O];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[O]:{...t,offPage:!0}}}function vs(e){return!e||typeof e!="object"?!1:e[O]?.offPage===!0}const It="sfPanelOnly";function Bs(e){if(!e[O])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[It]:!0}}function Ds(e){return!!e&&typeof e=="object"&&e[It]===!0}function Hs(e){const t=e[O];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[O]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as Ja,SCALAR_TEXT_CONTROLS as Za}from"efficient-easel/draw";function Gs(e,t){if(!e[O])throw new Error("inOwnBox: the field holds no authored text");const{[To]:o,...r}=e;return{...r,[Io]:!0,render:t}}const Yr=new Set(Bo),Q={type:"radio",options:[{value:!0},{value:!1}]},Et={text:{type:"object",objectFields:{text:{type:"text"},hidden:Q}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:Q}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},G=(e,t)=>{const n=E({...t,[O]:e},{...Et[e.control],label:e.label});if(!Yr.has(e.control))return n;const o=t.render;return{...dt(n,"authored-copy"),render:r=>i(ko,{name:r.name,children:o(r)})}},Ms="Everything else on this block comes from the linked post. Unlink it to edit by hand.",qr={field:"source.slug",set:!0},Us={not:qr},Jr="Select a word, then press the highlighter.",Zr=new Set([Jr]),Qr=e=>Zr.has(e);function Ws(e,t,n){return G({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Ks(e,t,n){return G({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function $s(e,t,n){return G({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function js(e,t,n){return G({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Xs(e){return{type:"custom",[Ue]:{label:e},...E({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(Uo,{value:Me(t),onChange:n,label:e})}}function Vs(e,t,n){return G({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const zs={Design:wn,Animation:Sn};function Ys(e){return{type:"custom",render:()=>i(ei,{text:e})}}function ei({text:e}){return i("p",{className:"sf-note",children:l(e)})}function qs(e){return pe(e)!==null&&e?.tabs!==void 0}const kt=new Map;function Js(e,t){const n=`${e}\0${t?t.join(""):""}`,o=kt.get(n)??{type:"custom",tabs:t,[ue]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(k,{})};return kt.set(n,o),o}const Ft=new Map;function Zs(e){const t=Ft.get(e)??{type:"custom",[ue]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(k,{})};return Ft.set(e,t),t}function ti(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Qs(e,t){return ti(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(k,{})}}function ea(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(k,{})}}function ta({title:e,children:t}){const[n,o]=z(()=>!Fe.has(e));return i(Yn,{title:e,open:n,onToggle:r=>{o(r),r?Fe.delete(e):Fe.add(e)},children:t})}const Fe=new Set;function na({label:e}){return i(qn,{title:l(e),level:Lr(2)})}function ni({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),s=r?o?.[r]:void 0,a=s?l(s):t;return N("div",{className:"sf-swatches",children:[e.map(c=>{const d=o?.[c]?l(o[c]):c;return i(me,{content:d,children:i(fo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":d})},c)}),i("span",{className:"sf-swatch-hex",children:a})]})}function oa(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(oi,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function oi({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const s=typeof o=="string"?o:void 0,{colors:a,n:c}=jt(),d={background:a.background,surface:a.surface,surface2:dr(a),band:cr(a)},f=n?Oe:t,h=Rr(s,t,f),p=Rt(void 0,f,d),u=n?yr:void 0,g=_r(s,t),m=f===Oe?l("the theme's section background"):l("Theme {n} background",{n:c});return i(be,{label:l(e),icon:i(yn,{}),value:h?"":Rt(s,t,d),inherited:p,resetTo:D(p.toUpperCase(),m),onChange:r,onReset:()=>r(u),choices:[{label:l("No fill"),color:"",selected:g==="none",onPick:()=>r(Cr)},{label:`${l("Section band")} · ${d.band.toUpperCase()}`,color:d.band,selected:g==="band",onPick:()=>r(Oe)}]})}function ri(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=wr(r,t);return i(w,{label:l(e),icon:i(oe,{}),changed:!s,action:i(y,{words:S()?.panel,label:l(e),changed:!s,detail:l("the theme's image stage"),onReset:()=>o(hr)}),children:ni({swatches:br,current:s?Sr:xr(r,t),onPick:o,names:gr})})}}}function ra(e=n=>n,t){return J({_gSectionTheme:T(Tr),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(Go,{value:e(n),onChange:o,followLabel:t})}})}function ee({min:e,max:t,step:n,value:o,onChange:r,suffix:s="",readout:a=!0,notch:c,ariaLabel:d,disabled:f=!1,placeholder:h,placeholderWord:p,onClear:u}){const g=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:g?"sf-slider has-notch":"sf-slider",style:g?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(Co,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...p?{emptyLabel:l(p)}:{},suffix:s||void 0,showInput:a,label:d===void 0?void 0:l(d),disabled:f,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:m=>{m===null?u?.():m!==o&&r(m)}})})}function At(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:a,restTrack:c,unsetMark:d,icon:f,unit:h="px"}=t;return{type:"custom",render:({value:p,onChange:u})=>{const g=typeof p=="number"?p:null,m=g===null;return i(w,{label:l(e),icon:f?q(f):void 0,value:m?d||s===void 0?void 0:l(s):`${g}${h}`,changed:!m,action:d?ve(d,{changed:!m,onReset:()=>u(null)}):i(y,{words:S()?.panel,label:l(e),changed:!m,onReset:()=>u(null)}),hint:typeof a=="string"?l(a):a,children:c?c({min:n,max:o,step:r,px:g,label:e,onChange:u}):ee({min:n,max:o,step:r,value:g??n,readout:!1,ariaLabel:e,onChange:u})})}}}const se="Corners";function Ae(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return i(w,{label:l(se),icon:i(Rn,{}),changed:r,action:ve(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(li,{tier:e,px:o,onRadius:n})})}}}function A(e){const t=M();return[t?.values?.[e],n=>t?.onChange(e,n)]}function Lt(){return dt({type:"custom",render:()=>i(Oo,{})},"always")}function ii(){const e=M();return t=>e?.onChangeMany(t)}function li({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,s]=A(e.sidesKey),a=ot(r)??[...nt];return i(ho,{label:l(se),value:a,corners:$n,onChange:c=>{const d=ot(c)??[];s(d.length===nt.length?null:d)},radius:t,onRadiusChange:n,radiusMin:U,radiusMax:je,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function Nt(){return Lt()}function si({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=v(),r=typeof o=="number"?`${o}px`:l("not set");return i(y,{words:S()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):D(r,l("Styles")),onReset:n})}function ai(){const{cornerRadiusPx:e}=v();return typeof e=="number"?e:U}function ci(){return Ae({sidesKey:"sectionCornerSides",useFollowed:ai,mark:i(si,{label:se}),hint:di})}const di="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function ia(){return J({_gShape:T("Shape"),sectionCorners:ci(),sectionCornerSides:Nt(),...j("sectionBorder",Pt)})}const ui=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function pi(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function fi(){let e;try{const t=St(v().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||sr.line}function hi({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:s=!0,above:a={}}){const c=e&&typeof e=="object"?e:{},[d,f]=z(()=>r?to(c,a):!1),h=ui(),p=u=>pi(r&&s?u:{width:u.width,color:u.color,...s?{style:u.style}:{}});return i(w,{label:l("Border"),icon:i(Cn,{}),action:r?i(Qn,{each:d,label:l("Each side"),onChange:f}):void 0,children:i(Zn,{label:l("Border"),value:c,each:d,onChange:u=>t(p(u)),placeholder:n,presets:o,words:h,styles:s,max:lr})})}function mi({value:e,onChange:t,view:n}){const[o]=A("sectionBorder"),[r]=A(W("sectionBorder")),s=fi(),a=d=>d&&typeof d=="object"?d:{},c=n==="phone"?{...xt(a(o)),...xt(a(r))}:n==="tablet"?a(o):{};return i(hi,{value:e,onChange:t,placeholder:{sides:eo(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}function la(e){return R(e,Pt(e==="mobile"?"phone":e))}function Pt(e){return{type:"custom",render:({value:t,onChange:n})=>i(mi,{value:t,onChange:n,view:e})}}function j(e,t){const n=(o,r)=>le(e,t(o),Ie)[r];return{[e]:n("desktop",e),[W(e)]:n("tablet",W(e)),[F(e)]:n("phone",F(e))}}function sa(e){return{type:"custom",render:()=>i(gi,{partKey:e})}}function gi({partKey:e}){const[t]=A("id"),[n]=A("_partStyles"),{textStyles:o}=v(),r=Xo();let s=null;try{s=Ko().select}catch{s=null}const a=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(zn,{name:l("Text"),preview:Wo(a,c,{noStyle:l("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??jo.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s($o(t,e))}})}function vt(e){const{cornerRadiusPx:t}=v(),n=typeof t=="number"?t:e;let o=null;try{const{appState:s,selectedItem:a}=te(d=>d),c=a?.props?.id?String(a.props.id):void 0;o=c?Vn(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return jn(r)?r:n}function bi({label:e,changed:t=!1,onReset:n=()=>{}}){const o=vt(U);return i(y,{words:S()?.panel,label:l(e),changed:t,detail:D(`${o}px`,l("the section")),onReset:n})}function wi(){return i(k,{children:l("Follows the section's Corners until you set a number here.")})}function xi(){return Ae({sidesKey:"cardCornerSides",useFollowed:()=>vt(U),mark:i(bi,{label:se}),hint:i(wi,{})})}function Si(){return{type:"custom",render:()=>i(on,{})}}function aa(e){return{...e,render:t=>i(rn,{render:e.render,props:t})}}function ca(){return{_gShape:T("Shape"),cardCorners:xi(),cardCornerSides:Nt(),cardCornersApplyAll:Si()}}function yi(){return E({type:"custom",render:e=>i(_i,{...e})},{type:"select",label:K,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 Ci(e,t){const n=wt(e);if(n!=="custom")return l(bt.find(r=>r.value===n)?.label??"");const o=lt(Ce(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):l("Custom")}function _i(e){const{value:t,onChange:n}=e,[o]=A("content"),r=Array.isArray(o)?o.length:0,s="follows"in e,a=t!=null,c=a?t:s?e.follows:void 0,d=wt(c),f=r>=2&&r<=it,h=()=>[...xo[r]??[]],p=V(null),u=b=>{const _=p.current;_&&JSON.stringify(b)===JSON.stringify(_.shares)?n(_.value):b&&n(b)},g=b=>{b===d||b==="custom"&&!f||n(b==="custom"?h():b)},m=l("The width bar works for 2 to {count} blocks.",{count:it}),C=a&&(s||t!=="content"),x=yo().widths.hint(r,wo);return i(w,{label:l(K),icon:i(fe,{}),changed:C,hint:d!=="custom"?void 0:f?x:m,action:i(y,{words:S()?.panel,label:l(K),changed:C,disabled:e.readOnly===!0,detail:s?B(b=>l(b),Ci(e.follows,r),e.followsView):l("Fit content"),onReset:()=>n(void 0)}),children:N("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(rt,{label:l(K),value:d,options:bt.map(b=>({value:b.value,label:b.value==="custom"&&!f?m:l(b.label),icon:Hr(i("span",{className:"sf-gallery-pic sf-share-pic",children:Bt(b.weights).map((_,X)=>i("i",{style:{gridColumn:`span ${_}`}},X))}),l(b.label),b.value==="custom"&&!f?m:l(b.label))})),onChange:g,columns:3,cell:Dt,tooltips:!1,disabled:e.readOnly===!0})}),d==="custom"&&f?i("div",{onFocus:()=>{p.current={value:t,shares:lt(Ce(c,r),r)}},onBlur:()=>{p.current=null},children:i(So,{label:l(K),count:r,value:Ce(c,r),onChange:u,readOnly:e.readOnly===!0})}):null]})})}function Bt(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 da(){return Z(tr,i(Fn,{}),ht,ht[0].value)}function ua(){return R("mobile",Dr(K,i(fe,{}),ir.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:Bt(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),rr,{columns:2,cell:Dt}))}const Dt={width:"5.75rem",height:"3.25rem"};function pa(){return le("share",yi(),Ie)[W("share")]}function Ri(){return R("mobile",$(mt,i(Ve,{}),ye,or,1,ye,"",{clear:{phoneFollows:!1,hint:ye}}))}const Ht={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function fa(){const e=$(mt,i(Ve,{}),gt,nr,1,gt,"",{clear:{emptyLabel:"Auto"}}),t=le("columns",e,{...Ht,tablet:Ie.tablet}),n=le("columns",e,Ht,{phoneRow:Ri()});return{...t,phoneRow:n.phoneRow}}function ha(e,t,n,o,r,s){return{type:"custom",render:({value:a,onChange:c})=>i(w,{label:l(e),icon:i(et,{noun:s}),action:i(y,{words:S()?.panel,label:l(e),changed:!Er(a),detail:l("the Text style in Styles"),onReset:()=>c(Ir),defaultAction:{onPress:()=>c(Or),title:l("Keep this section's own built-in size"),icon:i(_n,{})}}),children:ee({min:t,max:n,step:o,value:typeof a=="number"?a:r,suffix:"px",ariaLabel:e,onChange:c})})}}function ma(){return{_gCellWidth:T("Cell width"),gridSpan:Z("Positions",i(fe,{}),[{label:"Auto",value:""},...Array.from({length:cn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function L(){let e=null,t=null;try{e=Be(Ti),t=te(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Ti=Xt(null);function Oi({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:a,fallback:c}){const d=L()[a],f=we(void 0,d,c);return i(k,{children:ee({min:e,max:t,step:n,value:we(o,d,c),readout:!1,ariaLabel:r,notch:f,onChange:s})})}function Ii({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const a=L()[t],c=we(void 0,a,n);return i(y,{words:S()?.panel,label:l(e),changed:r,detail:B(d=>l(d),`${c}${o}`),onReset:s})}function Ei(e){return At(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Ii,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Oi,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const ki={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Fi={Top:Qe,Bottom:qe,Left:Je,Right:Ze},Ai=e=>{const t=Fi[e];return i(t,{})};function ga(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=x=>ki[x],s=x=>$(r("Top"),i(Qe,{}),I.min,I.max,I.step,x,"px"),a=(x,b,_,X=I)=>R("mobile",Ei({label:r(x),icon:Ai(x),desktopKey:b,min:X.min,max:X.max,step:X.step,fallback:_})),c=e.top??I.min,d=e.bottom??I.min,f="sectionPaddingLeft",h="sectionPaddingRight",p=e.sideBounds??I,u=e.side??p.min,g=e.sidePhone??u,m=e.phone===!0,C=x=>m?R("desktop",x):x;return J({...o?{_gSpacing:T("Padding")}:{},[t]:C(s(c)),...m?{[F(t)]:a("Top",t,c)}:{},...e.only==="top"?{}:{[n]:C($(r("Bottom"),i(qe,{}),I.min,I.max,I.step,d,"px")),...m?{[F(n)]:a("Bottom",n,d)}:{}},...e.sides?{[f]:C($(r("Left"),i(Je,{}),p.min,p.max,p.step,u,"px")),...m?{[F(f)]:a("Left",f,g,p)}:{},[h]:C($(r("Right"),i(Ze,{}),p.min,p.max,p.step,u,"px")),...m?{[F(h)]:a("Right",h,g,p)}:{}}:{}})}function ba(e,t){const n=Object.fromEntries(Object.entries(t).map(([s,a])=>[s,s in e&&pe(a)?e[s]:a])),o={};let r=!1;for(const[s,a]of Object.entries(e)){if(s in t){r||Object.assign(o,n),r=!0;continue}o[s]=a}return r||Object.assign(o,n),o}const ae="Width";function wa(e,t=kr,n=!0){const o=t.map(r=>({label:Fr[r],value:r}));return J({...n?{_gWidth:T(ae)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(w,{label:l(ae),icon:i(Mn,{}),action:n?i(zr,{inherited:s?.inherited??!1,onReset:()=>r(Ar),label:ae}):void 0,children:ke({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:ae})})}})}function xa(){const e=(o,r)=>({type:"custom",render:({value:s,onChange:a})=>i(Li,{value:s,onChange:a,view:o,badge:r})}),t=o=>({type:"custom",render:({value:r,onChange:s,field:a})=>i(Pi,{value:r,onChange:s,unit:a?.unit,view:o})}),n=o=>{const r=Mr("Unit",i(ze,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");if(o==="desktop")return r;const s=r.render;return{...r,render:a=>i(vi,{props:a,draw:s,view:o})}};return J({_gHeight:T(Y),...j("sectionHeightMode",o=>o==="desktop"?e(o):e(o,r=>i(Bi,{view:o,onClear:()=>r(void 0)}))),...j("sectionHeightValue",t),...j("sectionHeightUnit",n)})}function Li({value:e,onChange:t,view:n,badge:o}){const r=L(),s=c=>["auto","fixed","screen"].includes(c),a=ce(n,r)?.mode??"auto";return i(w,{label:Y,icon:q(i(Ln,{})),action:o?o(t):void 0,children:ke({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:s(e)?e:a,onChange:t,ariaLabel:Y})})}function Gt(e,t){return e==="phone"&&xe(t)?Yo(t):zo(t)}function ce(e,t){return e==="desktop"||(e==="tablet"?xe(t):Vo(t))?null:Gt(e,t)}const P=(e,t)=>e==="tablet"?W(t):F(t);function Ni(e,t,n,o){const r=ce(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[P(e,"sectionHeightMode")]:r.mode,...r.mode==="fixed"?{[P(e,"sectionHeightUnit")]:r.unit}:{},...n==="sectionHeightUnit"?{[P(e,"sectionHeightValue")]:r.value}:{},[P(e,n)]:o}}function Mt(e,t,n){const o=M(),r=ce(e,L());return!o||!r?{followed:null,write:n}:{followed:r,write:a=>o.onChangeMany(c=>{const d=Ni(e,c,t,a);return d===null?{[e==="desktop"?t:P(e,t)]:a}:Object.keys(d).length?d:null})}}function Pi({value:e,onChange:t,unit:n,view:o}){const{followed:r,write:s}=Mt(o,"sectionHeightValue",t),a=(r?r.unit:n)==="%"?"%":"px",c=a==="%"?Qo:Zo;return i("div",{className:"sf-field",children:ee({min:c.min,max:c.max,step:c.step,value:r?null:typeof e=="number"?e:c.fallback,...r?{placeholder:r.value}:{},suffix:a,ariaLabel:Y,onChange:s})})}function vi({props:e,draw:t,view:n}){const{followed:o,write:r}=Mt(n,"sectionHeightUnit",e.onChange);return t({...e,...o?{value:void 0,storedValue:void 0,follows:o.unit}:{},onChange:r})}function Bi({view:e,onClear:t}){const n=L(),o=ce(e,n)===null,r=e==="phone"&&xe(n),s=Gt(e,n),a=B(c=>l(c),s.mode==="auto"?l("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return i(y,{words:S()?.panel,label:l(Y),changed:o,detail:a,onReset:t})}function Sa(){const e=n=>({type:"custom",render:({value:o,onChange:r,id:s,name:a})=>i(Gi,{value:o,onChange:r,labelId:`${s??a??"stickTop"}-label`,view:n})}),t=n=>({type:"custom",render:({value:o,onChange:r})=>i(Di,{value:o,onChange:r,view:n})});return{_gStick:T(Se),...j("stickTop",e),...j("stickTopDistance",t)}}function Di({value:e,onChange:t,view:n}){const o=M(),r=L(),s=n==="desktop"||Le(n,r)?null:Ut(n,pt(r)),a=s&&o?c=>o.onChangeMany(d=>{const f=Hi(n,d,c);return f===null?{[P(n,"stickTopDistance")]:c}:Object.keys(f).length?f:null}):t;return i("div",{className:"sf-field",children:ee({min:re.min,max:re.max,step:re.step,value:s?null:typeof e=="number"?e:re.fallback,...s?{placeholder:s.distance}:{},suffix:"px",ariaLabel:l("Distance from top"),onChange:a})})}function Le(e,t){return e==="tablet"?Jo(t):qo(t)}function Ut(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance}:{on:t.desktop,distance:t.desktopDistance}}function Hi(e,t,n){return e==="desktop"||Le(e,t)?null:n===void 0?{}:{[P(e,"stickTop")]:!0,[P(e,"stickTopDistance")]:n}}function Gi({value:e,onChange:t,labelId:n,view:o}){const r=L(),s=pt(r),a=o==="phone"?s.phone:o==="tablet"?s.tablet:e===!0,c=o==="phone"&&s.ownTablet,d=o==="desktop"?null:Ut(o,s),f=d?.on?`${d.distance}px`:l("Off");return i(w,{label:l(Se),labelId:n,icon:q(i(Bn,{})),action:N(k,{children:[o!=="desktop"?i(y,{words:S()?.panel,label:l(Se),changed:Le(o,r),detail:B(h=>l(h),f,c?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(he,{checked:a,onChange:t,ariaLabelledBy:n})]})})}const Wt="e.g. about";function ya(){return{_gAnchor:T("Anchor"),anchor:G({control:"plainText",label:"Name",placeholder:Wt},{type:"custom",render:({value:e,onChange:t})=>i(gn,{value:e,onChange:t,nameBox:(n,o)=>i(H,{value:n,onChange:o,label:"Name",placeholder:Wt,hideable:!1,markup:!1})})})}}function Ca(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:a})=>{const c=`${s??a??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return i(w,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(go,{id:c,value:Number.isFinite(d)?new Date(d):null,onChange:f=>r(f?f.toISOString():"")})})}}}function _a(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:a})=>{const c=`${s??a??e}-date`;return i(w,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(mo,{id:c,value:Yt(typeof o=="string"?o:null),onChange:d=>r(d?zt(d):"")})})}}}function Mi(e,t,n,o){return{type:"custom",...E({},{...Q,label:e}),render:r=>{const{value:s,onChange:a,id:c,name:d}=r,f="follows"in r,h=r,p=typeof s=="boolean",u=typeof h.follows=="boolean"?h.follows:t,g=p?s:f?u:t,m=`${c??d??e}-label`,C=h.readOnly===!0,x=i(he,{checked:g,onChange:a,disabled:C,ariaLabelledBy:m});return i(w,{label:l(e),labelId:m,icon:n,hint:o===void 0?void 0:l(o),action:f?N(k,{children:[i(y,{words:S()?.panel,label:l(e),changed:p,detail:h.followsNoView?l(u?"On":"Off"):B(b=>l(b),l(u?"On":"Off"),h.followsView),disabled:C,onReset:()=>a(void 0)}),x]}):x})}}}function Ra(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(ge,{label:l("Background"),icon:i(vn,{}),id:r,value:Un(e),onChange:t})}}}function Ta(e,t){return{type:"custom",...E({},{...Q,label:e}),render:({value:n,onChange:o,id:r})=>{const s=typeof n=="boolean"?n:t,a=`${r??e}-checkbox`;return i(w,{label:l(e),htmlFor:a,className:"sf-checkbox",action:i(po,{id:a,checked:s,onChange:o})})}}}function Oa(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(ge,{label:l(e),icon:n,value:o||t,onChange:r})}}function Ia(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(Ui,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Ui({value:e,onChange:t,twin:n}){const{colors:o,n:r}=jt(),s=o.background,a=D(s.toUpperCase(),l("Theme {n} background",{n:r})),c=tt(e),d=c?Kt(c,o,r):null,f=n?()=>t(void 0):()=>t("");if(n){const h=tt(n.follows),p=Wn(n.follows),u=h?Kt(h,o,r):p?{hex:p,words:p.toUpperCase()}:null,g=B(m=>l(m),u?u.words:a,n.view);return d?i($t,{slot:d,resetTo:g,onChange:t,onReset:f}):i(be,{label:l("Fill"),icon:i(oe,{}),value:e,inherited:u?.hex??s,resetTo:g,onChange:t,onReset:f})}return d?i($t,{slot:d,resetTo:a,onChange:t,onReset:f}):i(be,{label:l("Fill"),icon:i(oe,{}),value:e,inherited:s,resetTo:a,onChange:t,onReset:f})}function Kt(e,t,n){const o={main:()=>[t.accent,l("Theme {n} main color",{n})],text:()=>[t.text,l("Theme {n} text color",{n})],background:()=>[t.background,l("Theme {n} background",{n})],muted:()=>[t.muted,l("Theme {n} muted color",{n})]},r=Object.hasOwn(o,e)?o[e]:void 0;if(!r)return null;const[s,a]=r();return{hex:Kn(s??"")??"",words:a}}function $t({slot:e,resetTo:t,onChange:n,onReset:o}){return i(ge,{label:l("Fill"),icon:i(oe,{}),value:e.hex,caption:e.words,onChange:n,changed:!0,onReset:o,resetTo:t})}function Wi(e,t,n){if((e?.content??[]).some(a=>a?.props?.id===t))return ie(n);const r=Xn(e,t);if(r.length===0)return null;const s=ie(Tt(n));if(s!==null)return s;for(let a=r.length-1;a>0;a-=1){const c=ie(Tt(r[a].sectionAccent));if(c!==null)return c}return ie(r[0].sectionAccent)}function jt(){const e=St(v().theme),[t]=A("sectionAccent");let n=null;try{const{appState:r,selectedItem:s}=te(c=>c),a=s?.props?.id?String(s.props.id):void 0;n=a?Wi(r?.data,a,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:ar(e.themes[o]),n:o+1}}const Ki=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function $i({label:e,value:t,onChange:n,points:o=Ki}){const r=o.map(s=>({...s,label:l(s.label),...s.title?{title:l(s.title)}:null}));return i(uo,{label:l(e),value:t,points:r,onChange:n})}function Ea(){return Lt()}const ka={top:i(En,{}),right:i(In,{}),bottom:i(Tn,{}),left:i(On,{})};function Fa(e,t,n,o,r,s,a){const c=p=>t.find(u=>u.value===p),d=p=>({value:p,label:"",disabled:!0,title:o}),f=p=>{const u=t.find(m=>m.cell===p);if(!u)return d(`missing-${p}`);const g=s?.[p];return g?{value:u.value,label:u.label,icon:g}:{value:u.value,label:u.label}},h=[d("corner-top-left"),f("top"),d("corner-top-right"),f("left"),d("centre"),f("right"),d("corner-bottom-left"),f("bottom"),d("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:u})=>{const g=t.some(m=>m.value===p)?p:n;return i(w,{label:l(e),icon:r,value:c(g)?.label?l(c(g).label):a?l(a):"",children:$i({label:e,value:g,onChange:u,points:h})})}}}function Aa(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:s})=>i(Ho,{label:e,options:(s.options??t).map(a=>({...a,label:l(a.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:l(n)}:{}})}}function La(e,t,n,o){return{type:"custom",options:t,fallback:n,...E({},{type:"select",label:e}),render:({value:r,onChange:s,field:a})=>i(Mo,{label:e,options:(a.options??t).map(c=>({...c,label:l(c.label)})),fallback:a.fallback??n,value:r,onChange:s,placeholder:o===void 0?void 0:l(o)})}}function Na(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const Pa=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function va(e,t,n){const o=Object.keys(He).map(r=>({label:He[r],value:r,picture:n[r]}));return{type:"custom",...E({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(Xi,{label:e,icon:t,options:o,onChange:r})}}function ji(e,t,n){const o=qt(e,t,n);if(o!==void 0)return o==="save-makes-frame"?l("A frame is made from this video when you save the page."):o==="starts-dark"?l("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"?l("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"?l("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"?l("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"?l("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=Zt(e);return r==="frame-missing-image"?l("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?l("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?l("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?l("No image yet. The slide shows its background colour until you choose one."):void 0}function Xi({label:e,icon:t,options:n,onChange:o}){const r=M(),s=r?.values??{},a=Jt(s),c=Be(tn),d=en(c?.docId??null);let f=null;try{f=te(p=>p.appState.data)}catch{f=null}const h=Qt(r?.id,f,d);return i(w,{label:l(e),icon:q(t),hint:ji(s,h,c?.hasUnsavedEdits??!1),children:ke({options:n,value:a,onChange:o,ariaLabel:e})})}function Ba(e,t,n,o={}){const r={type:"custom",[We]:!0,render:({value:s,onChange:a,name:c})=>i(Do,{value:s||"",onChange:a,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?R("each",r):r}const Da={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Vi(e){const t=l(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function Ha({value:e,onChange:t,label:n}){const o=e||{},r=M(),s=r?r.values!==r.node.props:!0,a=!!o.pending&&s,c=!!o.pending&&!s,d=!!Pr(Nr()).geocode,f=De(),h=(p,u)=>t({...o,[p]:u??void 0});return N(k,{children:[i(w,{label:l(n),icon:i(Ye,{}),action:d?i(me,{content:l("Find from the address (OpenStreetMap)"),children:i(st,{"aria-label":l("Find from the address"),"aria-busy":a||void 0,disabled:a,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(Dn,{})})}):void 0,children:d&&o.status?i(bn,{compact:!0,oneLine:!0,spaced:!1,status:a?"busy":o.ok&&!c?"found":"notfound",statusText:a?l("Finding…"):c?l(_o):l(o.status),hint:Vi(o)}):null}),i(w,{label:l("Enter by hand"),labelId:f,icon:i(kn,{}),action:i(he,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:f})}),o.manual&&i(w,{label:l("Latitude, longitude"),icon:i(Ye,{}),children:N("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(at,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>h("lat",p),min:-90,max:90,step:1e-4,placeholder:l("Latitude")}),i(at,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>h("lng",p),min:-180,max:180,step:1e-4,placeholder:l("Longitude")})]})})]})}function zi(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Yi(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,s)=>s===t?{text:n}:r)}function Ga(e,t){return e===null?null:t>e?e:null}function qi(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 Ma={label:"Ticker items",icon:i(Pn,{})};function Ua(e,t,n,o){return{type:"custom",[O]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...E({},{...Et.textList,label:e}),render:({value:r,onChange:s})=>i(Ji,{label:e,icon:q(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function Ji({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const a=V(null),[c,d]=z(null),f=p=>p.map(u=>({text:u?.text??""})),h=p=>{const u=qi(n,p,c);u===null&&(a.current=null),d(u),r(f(p))};return i(no,{label:l(e),icon:t,noun:l("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?i(ct,{target:a,value:zi(n,c),onChange:p=>r(Yi(n,c??-1,p)),disabled:c===null,label:c===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,u,g)=>i("input",{type:"text",className:s&&c===u?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:u+1}),onChange:m=>g({text:m.target.value}),onFocus:m=>{a.current=m.currentTarget,d(u)}})})}function Wa(e,t){const n=`${e.label} — row ${t+1}`;return G({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Ka(e){return{_gCards:T("Cards"),coverIndex:Z("Cover image",i(Nn,{}),Po,String(vo),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:ri("Image background",mr),cardImage:el()}}function $a(){return{outline:Z("Card outline",i(Hn,{}),Ao,No),indexBadge:Z("Card number",i(ze,{}),Fo,Lo),showBadge:Mi("Product badge",!0,i(et,{noun:"tag"}))}}function ja(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...Q,label:de.find(s=>s.id===r).label}),o=r=>E(Ro(Ne),n(r));return{_gShowOnCard:T("Show on a card"),[Ne]:E({type:"custom",render:()=>i(Zi,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(Ne)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const Ne="showCardPrice",de=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function Zi({rest:e}){const t=L(),n=ii(),o=a=>typeof t[a]=="boolean"?t[a]:void 0,r=a=>o(a)??e[a],s=de.some(({id:a})=>o(a)!==void 0&&o(a)!==e[a]);return i(Pe,{parts:de,changed:s,shown:r,onPress:(a,c)=>n({[a]:c}),onReset:()=>n(Object.fromEntries(de.map(({id:a})=>[a,void 0])))})}function Xa(e,t="display"){const n=F(t);return{[t]:R("desktop",{type:"custom",render:({value:o,onChange:r})=>i(Pe,{parts:e,changed:ro(o),shown:s=>io(o,s),onPress:(s,a)=>r(ao(o,s,a)),onReset:()=>r(void 0)})}),[n]:R("mobile",{type:"custom",render:({value:o,onChange:r})=>i(Qi,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Pe({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:a}){const c=l("Display");return i(w,{label:c,icon:i(xn,{}),changed:t,action:i(y,{words:S()?.panel,label:c,changed:t,detail:s,onReset:r}),children:i(oo,{label:c,items:e.map(d=>({id:d.id,label:l(d.label),shown:n(d.id),...a?{disabled:!0,disabledReason:l(a)}:{}})),onChange:o})})}function Qi({parts:e,desktopKey:t,value:n,onChange:o}){const r=L()[t];return i(Pe,{parts:e,changed:so(n),shown:s=>lo(r,n,s),onPress:(s,a)=>o(co(n,s,a)),onReset:()=>o(Eo),detail:l("the same as Desktop")})}function el(){return At("Card image",{min:U,max:je,step:ln,hint:"Rounds the picture. The card's own corner is in Styles."})}function Va(){return Ae({sidesKey:"cornerSides",step:sn,useFollowed:()=>U,mark:i(tl,{label:an}),hint:l("Rounds the picture. Left alone it stays square.")})}function tl({label:e,changed:t=!1,onReset:n=()=>{}}){return i(y,{words:S()?.panel,label:l(e),changed:t,onReset:n})}function za(){return{type:"custom",render:({value:e,onChange:t})=>i(il,{value:typeof e=="string"?e:"",onChange:t})}}function nl({layout:e,width:t}){return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:6,gridAutoFlow:"row dense",gap:2},children:pn(e).map(([n,o],r)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${n}`,gridRow:`span ${o}`}},r))})}const ol={width:"3.5rem",height:"2.5rem"},rl=200;function il({value:e,onChange:t}){const[n,o]=z(null),[r,s]=z(4),a=V(null);Vt(()=>{const u=a.current;if(!u||typeof ResizeObserver!="function")return;const g=()=>s(u.getBoundingClientRect().width>=rl?4:3);g();const m=new ResizeObserver(g);return m.observe(u),()=>m.disconnect()},[]);const c=e&&e in ne?e:"",d=Xe(n,c),f=Xe(n,"").length,h=fn("no-symbol"),p=[{value:"",label:l("Not chosen"),icon:Gr(h,l("Not chosen"))},...d.map(u=>({value:u,label:l(ne[u].label),icon:i(nl,{layout:ne[u],width:40})}))];return i(w,{label:l("Layout"),icon:i(An,{}),value:c?l(ne[c].label):void 0,children:i("div",{ref:a,style:{flex:"1 1 auto",minWidth:0},children:i(rt,{label:l("Layout"),value:c,options:p,onChange:t,columns:r,cell:ol,header:N("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:l("Photos in a row")}),i(Jn,{options:[{id:"all",label:l("All")},...dn.map(u=>({id:String(u),label:String(u)}))],value:n===null?"all":String(n),ariaLabel:l("Photos in a row"),onChange:u=>o(u==="all"?null:Number(u))}),i("span",{className:"text-2xs text-ink-faint",children:l("{n} of {total} layouts",{n:f,total:un.length})})]})})})})}export{qr as BOUND_TO_POST,Ms as BOUND_TO_POST_NOTE,zs as BUCKET_ICONS,Da as CUSTOM_FIELD_MEDIA,Ha as CoordsField,Ot as DESKTOP_GAP_NOT_OVERLAP,Pe as DisplayRow,ka as EDGE_ARROWS,bo as FOCAL_DEFAULT,Ki as FOCAL_POINTS,ue as FOLD_FIELD_MARKER,$i as FocalPicker,na as GroupLabel,Jr as HIGHLIGHT_HINT,H as HidableTextField,Ue as LINK_FIELD_MARKER,ks as Label,We as MEDIA_FIELD_MARKER,Pa as MEDIA_TYPE_OPTIONS,Us as NOT_BOUND_TO_POST,ta as PanelBand,ei as PanelNoteLine,Ti as RowPropsContext,Ke as SCAFFOLD_FIELD_MARKER,Za as SCALAR_TEXT_CONTROLS,Wr as SiteGapDefaultReset,ee as Slider,ni as Swatches,Ja as TEXT_CONTROL_KINDS,O as TEXT_FIELD_MARKER,Ma as TICKER_ITEMS_ROW,Ji as TextListField,ae as WIDTH_LABEL,zr as WidthDefaultReset,qi as aimAfterListChange,ya as anchorFields,D as backTo,oa as backgroundField,da as boxBlockSpacingField,fa as boxColumnsFields,Ia as boxFillField,Ri as boxPhoneRowField,yi as boxShareField,ua as boxSharePhoneField,pa as boxShareTabletField,Wi as boxThemeIndexOf,Js as bucketHeader,sa as buttonWordsEntryField,xi as cardCornersField,ri as cardImageBackgroundField,el as cardImageField,Ka as cardMediaFields,ca as cardShapeFields,ja as cardShowFields,$a as cardStyleFields,ma as cellWidthFields,Ta as checkbox,Oa as colorInput,As as containerDirectionField,Kr as containerGapField,$r as containerGapPhoneField,Fs as containerGapRows,jr as containerGapTabletField,Vi as coordsResultTip,js as copyText,Nt as cornerSidesField,Ae as cornersRowField,_a as date,Ca as dateTime,Zs as designGroupHeader,Xa as displayFields,Fa as edgePad,Ga as focusAfterRemove,Ea as focusKeptField,Qs as foldMarker,pe as foldMetaOf,ti as foldTitleOf,Ni as followedHeightPatch,Hi as followedStickPatch,za as galleryLayoutField,xa as heightFields,ce as heightFollowedBy,Ls as heroGroupPlacementPoints,Me as hidableText,Qr as hintIsWhileTyping,Va as imageCornersField,Gs as inOwnBox,qs as isBucketHeader,Lt as keptBy,Xs as linkField,ji as loadingRowHint,va as loadingShowsField,Aa as multiSelect,Ra as pageBackgroundField,Ys as panelNote,Ei as phoneOverrideField,$s as plainText,Vs as plainTextarea,At as pxField,ea as quietMarker,Ge as readHidable,zi as rowText,La as searchSelect,la as sectionBorderField,ci as sectionCornersField,ia as sectionShapeFields,ra as sectionThemeFields,Yi as setRowText,ha as sizeField,Kt as slotFill,Na as sourceField,ga as spacingFields,Sa as stickFields,ba as swapPadding,aa as templateField,Ws as text,nn as textFieldIdentifier,vs as textFieldOffPage,Ds as textFieldPanelOnly,Ua as textList,Wa as textListRowField,Ks as textarea,Mi as toggle,Ba as upload,ii as useSelectedPatch,L as useSelectedProps,A as useSelectedSibling,Ur as useSiteGapDetail,wa as widthField,Hs as withIdentifier,Ps as withOffPage,Bs as withPanelOnly,Ns as withScaffold};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{foldMetaOf as w,isBucketHeader as E}from"./controls.js";import{deviceMetaOf as k}from"efficient-easel/screen/lib/document/device-fields";import{BUCKET_KEY as h,DESIGN_GROUP_KEY as M,hasBucketTabs as O,reseatBucketTabs as x,seatDesignBucket as B}from"./field-groups.js";import{isStructuralTextProp as C}from"../../../format/lib/document/neutralization-contracts.js";import{noControlMetaOf as D}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{fieldDrawsEntryRow as y}from"../../../render/lib/document/text-parts.js";function S(e,n){const r=k(n),s=r?r.inner:n;if(w(s))return!1;if(s?.type==="slot")return!0;const o=D(s);return o==="always"?!1:o==="authored-copy"?C(e):!0}function d(e){const n=k(e),r=n?n.inner:e,s=w(r);return s?E(r)?0:s.level:null}function T(e,n,r){return r?n===0&&e===h.Design||n===1&&e===M.Content:!1}const b=new WeakMap,R=new WeakMap;function
|
|
1
|
+
import{foldMetaOf as w,isBucketHeader as E}from"./controls.js";import{deviceMetaOf as k}from"efficient-easel/screen/lib/document/device-fields";import{BUCKET_KEY as h,DESIGN_GROUP_KEY as M,hasBucketTabs as O,reseatBucketTabs as x,seatDesignBucket as B}from"./field-groups.js";import{isStructuralTextProp as C}from"../../../format/lib/document/neutralization-contracts.js";import{noControlMetaOf as D}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{fieldDrawsEntryRow as y}from"../../../render/lib/document/text-parts.js";function S(e,n){const r=k(n),s=r?r.inner:n;if(w(s)||s?.customize===!0)return!1;if(s?.type==="slot")return!0;const o=D(s);return o==="always"?!1:o==="authored-copy"?C(e):!0}function d(e){const n=k(e),r=n?n.inner:e,s=w(r);return s?E(r)?0:s.level:null}function T(e,n,r){return r?n===0&&e===h.Design||n===1&&e===M.Content:!1}const b=new WeakMap,R=new WeakMap;function P(e,n="section"){const r=n==="page"?R:b,s=r.get(e);if(s)return s;const o=Object.entries(e).map(([t,a])=>({key:t,field:a,level:d(a),draws:S(t,a)||n==="page"&&d(a)===null&&y(t,a)})),f=n==="section"&&o.some(t=>y(t.key,t.field)),i=new Set;for(let t=0;t<o.length;t++){const a=o[t].level;if(a===null)continue;let m=0;for(let c=t+1;c<o.length;c++){const g=o[c].level;if(g!==null&&g<=a)break;o[c].draws&&(m+=1)}m===0&&!T(o[t].key,a,f)&&i.add(o[t].key)}const l=f&&O(e),v=l&&!(h.Design in e);if(!i.size&&!v)return r.set(e,e),e;const u={};for(const t of o)i.has(t.key)||(u[t.key]=t.field);const p=x(l?B(u):u);return r.set(e,p),p}export{S as drawsControlOnSectionScreen,P as dropEmptyHeadings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{convertSection as
|
|
1
|
+
import{convertSection as l,pressesAsBox as S,SECTION_TO_BOX_PRESS as g,sectionToBoxRow as T}from"../../../render/lib/sections/section-to-box.js";import{SECTION_PRESETS as _,presetFor as R}from"../../../format/lib/sections/section-presets.js";import{GENERAL_SECTION_TO_BOX as k}from"../../../render/lib/document/blocks/general/section-to-box-rows.js";import{statsBoxSeed as P,statsPressSeed as B,statsSeedRows as N}from"../../../render/lib/document/blocks/general/section-to-box-rows-stats.js";import{logosPressStarter as L,paymentPressStarter as j}from"../../../render/lib/document/blocks/general/section-to-box-rows-logos.js";import{pageHeaderPressStarter as w}from"../../../render/lib/document/blocks/general/section-to-box-rows-pageheader.js";import{milestoneTimelinePressStarter as v,storyTimelinePressStarter as A}from"../../../render/lib/document/blocks/general/section-to-box-rows-timeline.js";import{seedNodes as C}from"../../../format/lib/document/seed-parts.js";import{propsWithPartStyleValue as U}from"../../../render/lib/document/part-styles.js";import{isNodeList as m}from"efficient-easel/data";const W=Object.keys(k),E={Logos:L,DocMasthead:w,Timeline:A,TimelineTrack:v},X={PaymentBadges:j};function u(t,r,e){const o={};for(const n of Object.keys(r(t.type)))o[n]=void 0;for(const[n,s]of Object.entries(t.props))o[n]=m(s)?s.map(p=>u(p,r,e)):s;return o.id=e(t.type),{type:t.type,props:o}}const O=t=>({...t?.theme?{theme:t.theme}:{},press:!0});function d(t,r,e=0,o=()=>({})){return(n,s,p)=>{const{nodes:i}=l({type:t,props:{...n(t),...o(),id:s(t)}},r,O(p));return u(i[e],n,s)}}const D={Stats:G};function G(){const t=T("StatsParagraph");return t?(r,e,o)=>{const{nodes:n}=l({type:"StatsParagraph",props:{...r("StatsParagraph"),...B(),id:e("StatsParagraph")}},t,O(o)),s=n[0],p=m(s.props.content)?s.props.content.filter(f=>f.props?.cardStyle===void 0):[],i=b(P(N(),"table")),c=p.map(h),a=u({...s,props:{...s.props,content:[...c,i]}},r,e);return{...a,props:{...a.props,name:"Stats section"}}}:null}function h(t){if(t.props?.name==="Words"){const r=m(t.props.content)?t.props.content.map(M):t.props.content;return{...t,props:{...t.props,widthFitPhone:"fill",content:r}}}return m(t.props?.content)?{...t,props:{...t.props,content:t.props.content.map(h)}}:t}function M(t){return t.type!=="Text"?t:{...t,props:U({...t.props,alignTablet:"left"},"text","alignTablet","left")}}const b=t=>C([t],(r,e)=>`${r}-seed-${e}`)[0];function Y(t,r){if(!S(t,r))return null;const e=D[t];if(e)return e();const o=T(t);return o?d(t,o,0,E[t]??X[t]):null}function $(t){return(r,e,o)=>{const n=s=>{if(s.type==="Stats"){const c=u(b(P([],"list")),r,e);return{...c,props:{...c.props,name:"Numbers"}}}let p=!1;const i={};for(const[c,a]of Object.entries(s.props))if(m(a)){const f=a.map(n);p||=f.some((x,y)=>x!==a[y]),i[c]=f}else i[c]=a;return p?{type:s.type,props:i}:s};return n(t(r,e,o))}}function tt(t,r=g){const e=R(t);return e?$(e):Y(t,r)}function rt(){return[...Object.keys(_),...W.filter(t=>S(t)),...Object.keys(E).filter(t=>S(t))]}export{E as MERGE_LAYOUTS,W as TEXT_LAYOUTS,d as conversionPreset,tt as layoutPresetFor,rt as layoutTypes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{HOVER_MOTION as E,hoverKindsOf as u,motionSeconds as a}from"efficient-shell/format";import{finiteNumber as s}from"../finite-number.js";const i="hover",
|
|
1
|
+
import{HOVER_MOTION as E,hoverKindsOf as u,motionSeconds as a}from"efficient-shell/format";import{ANGLE_RANGE as H}from"../content/box-angle.js";import{finiteNumber as s}from"../finite-number.js";const i="hover",P="_gHover",L={none:"None",nextImage:"Show next image",rotate:"Rotate",zoom:"Zoom",lift:"Lift",mono:"Black and white"},v=u(["none","lift"]);function M(n){const e=n[i];return v.includes(e)?e:"none"}const R=u(["none","rotate"]),r={kind:i,angle:"hoverAngle",duration:"hoverDuration",delay:"hoverDelay"},l="spinOnHover",p=H,_={ProductGrid:"rotate",RelatedProducts:"rotate",AlloyWheelsListing:"none"},U=Object.keys(_);function I(n){return _[n]??"none"}const N=E.rotateFallbackDeg;function g(n,e){const t=n[r.kind];if(R.includes(t))return t;const o=n[l];return typeof o=="boolean"?o?"rotate":"none":e}function h(n){const e=s(n);return e===void 0?N:Math.min(p.max,Math.max(p.min,e))}function G(n,e){const t=I(e),o=g(n,t);return{kind:o,angle:o==="rotate"?h(n[r.angle]):null,duration:a("hover","duration",o==="rotate"?n[r.duration]:void 0),delay:a("hover","delay",o==="rotate"?n[r.delay]:void 0)}}function B(n){const e={field:r.kind,in:[...R]};return{any:[{field:r.kind,is:"rotate"},{all:[{not:e},n==="rotate"?{not:{field:l,is:!1}}:{field:l,is:!0}]}]}}const O=u(["none","mono"]),S=u(["none","nextImage","mono"]),m={ImageBlock:"none",Manifesto:"none",Split:"none",ContactLocations:"mono"},Y=Object.keys(m);function k(n){return m[n]??"none"}const x={zoom:"hoverZoom",darken:"hoverDarken"},d={min:100,max:150,step:1,unit:"%"},c=["nextImage"];function D(n,e){if(!c.includes(e))return null;const t=s(n[x.zoom]);if(t===void 0)return null;const o=Math.min(d.max,Math.max(d.min,t));return o===d.min?null:String(o/100)}function V(n,e){if(!c.includes(e))return null;const t=s(n[x.darken]);return t!==void 0&&t>0?t:null}const C=["ImageBlock"];function K(n,e,t=O){const o=n[i];return t.includes(o)?o:e}function b(n,e=""){const t=C.includes(e)?S:O,o=K(n,k(e),t),f=o!=="none";return{kind:o,duration:a("hover","duration",f?n[r.duration]:void 0),delay:a("hover","delay",f?n[r.delay]:void 0),...c.includes(o)?{zoom:D(n,o),darken:V(n,o)}:{}}}function z(){return{field:i,in:[...c]}}function Z(n){return n==="none"?{field:i,in:["mono","nextImage"]}:{not:{field:i,is:"none"}}}export{p as CARD_HOVER_ANGLE,r as CARD_HOVER_KEYS,R as CARD_HOVER_KINDS,U as CARD_HOVER_SECTIONS,N as CARD_HOVER_TURN,P as HOVER_GROUP_KEY,i as HOVER_KEY,L as HOVER_KIND_LABELS,C as NEXT_PICTURE_BLOCKS,S as NEXT_PICTURE_HOVER_KINDS,l as OLD_SPIN_KEY,v as PART_HOVER_KINDS,Y as PICTURE_HOVER_BLOCKS,x as PICTURE_HOVER_KEYS,O as PICTURE_HOVER_KINDS,d as PICTURE_HOVER_ZOOM,h as cardHoverAngleOf,g as cardHoverKindOf,G as cardHoverOf,I as cardHoverResting,B as cardRotatesRule,M as hoverOf,K as pictureHoverKindOf,z as pictureHoverMovesRule,b as pictureHoverOf,k as pictureHoverResting,Z as pictureHoverRunsRule,D as pictureHoverZoomOf};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const ACCORDION_ROW_STYLE_PROP = "rowStyle";
|
|
2
|
+
export type AccordionRowStyle = "plain" | "numbered";
|
|
3
|
+
export declare const ACCORDION_ROW_STYLE_POINTS: readonly {
|
|
4
|
+
label: string;
|
|
5
|
+
value: AccordionRowStyle;
|
|
6
|
+
}[];
|
|
7
|
+
export declare function accordionRowStyleOf(value: unknown): AccordionRowStyle;
|
|
8
|
+
export declare const QA_ROW_SUMMARY_CLASS = "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";
|
|
9
|
+
export declare const QA_ROW_NUMBER_CLASS = "font-mono text-[length:var(--size-label,14px)] tracking-[0.2em] text-accent";
|
|
10
|
+
export declare const QA_ROW_ANSWER_CLASS = "pb-8 pl-11 pr-8 max-view-wide:pl-0 max-view-wide:pr-0";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t="rowStyle",n=[{label:"Plain",value:"plain"},{label:"Numbered",value:"numbered"}];function r(e){return e==="numbered"?"numbered":"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";export{n as ACCORDION_ROW_STYLE_POINTS,t as ACCORDION_ROW_STYLE_PROP,a as QA_ROW_ANSWER_CLASS,i as QA_ROW_NUMBER_CLASS,o as QA_ROW_SUMMARY_CLASS,r as accordionRowStyleOf};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{finiteNumber as m}from"../finite-number.js";const n={min:0,max:360,step:1},i="angle";function a(o){const e=m(o);if(e===void 0)return null;const t=Math.min(n.max,Math.max(n.min,e));return t===n.min||t===n.max?null:{rotate:`${t}deg`}}export{n as ANGLE_RANGE,i as BOX_ANGLE_PROP,a as boxAngleStyle};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties } from "react";
|
|
2
|
+
import { type ColorSlot } from "efficient-shell/markup";
|
|
2
3
|
import type { SourceRow } from "./block-sources.js";
|
|
3
4
|
import { type ViewVarNames } from "./view-var-split.js";
|
|
4
5
|
export declare const CARD_SHADOW_CLASS = "sf-card";
|
|
@@ -31,6 +32,8 @@ export declare const BOX_CARD_SIDE: {
|
|
|
31
32
|
export declare function isBackgroundBox(src?: string | null): boolean;
|
|
32
33
|
export declare function boxDarkenStyle(darken: unknown, style?: unknown): CSSProperties | null;
|
|
33
34
|
export declare const boxFillOf: (value: unknown) => string | null;
|
|
35
|
+
export declare const boxPaintOf: (value: unknown) => string | null;
|
|
36
|
+
export declare const boxFillSlot: (value: unknown) => ColorSlot | null;
|
|
34
37
|
export declare const BOX_SWATCH_PROP = "swatch";
|
|
35
38
|
export declare function boxSwatchFill(props: Record<string, unknown> | null | undefined, row: SourceRow | null | undefined): string | null;
|
|
36
39
|
export declare const BOX_FILL_VIEWS: ViewVarNames;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseHexColor as
|
|
1
|
+
import{parseHexColor as _}from"efficient-shell/format";import{colorRole as g}from"efficient-shell/markup";import{namedRowField as k,rowFieldText as y}from"./card-template.js";import{partColourName as O,partInkCss as C}from"../document/part-inks.js";import{scrim as f}from"./scrim.js";import{viewVarSplit as b}from"./view-var-split.js";const R="sf-card",x={min:0,max:100,step:5,fallback:0,unit:"%"},F=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}],A="68%",W={desktop:20,phone:20,side:40,sidePhone:24},L="sf-box-sides",$={min:0,max:200,step:10};function H(t){return typeof t=="string"&&t.trim()!==""}function S(t,e){const n=typeof t=="number"?t:Number.parseFloat(String(t??""));if(!Number.isFinite(n)||n<=0)return null;const r=(Math.min(x.max,Math.max(x.min,n))/100).toFixed(2);return e!=="bottom"?{background:f(Number(r))}:{background:`linear-gradient(0deg, ${f(Number(r))} 0%, ${f(0)} ${A})`}}const h=t=>typeof t=="string"?_(t.trim()):null,u=t=>{const e=h(t);if(e!==null||typeof t!="string")return e;const n=t.trim();return n&&!n.startsWith("#")&&C(n)||null},M=t=>{if(typeof t!="string")return null;const e=g(O(t.trim()));return e?.kind==="slot"?e.slot:null},D="swatch";function j(t,e){return e?h(y(e,k(t,D))):null}const T={tabletClass:"sf-fill-tablet",tabletVar:"--sf-fill-tablet",phoneClass:"sf-fill-phone",phoneVar:"--sf-fill-phone"};function w(t,e,n){return b(T,u(t),u(e),u(n))}const B={tabletClass:"sf-wash-tablet",tabletVar:"--sf-wash-tablet",phoneClass:"sf-wash-phone",phoneVar:"--sf-wash-phone"};function K(t){const e=S(t.darken,t.darkenStyle);if(!e)return{className:"",style:{}};const n=(o,p)=>String(S(o,p)?.background??"none"),s=o=>(typeof o=="number"||typeof o=="string"&&o.trim()!=="")&&Number.isFinite(Number(o))?o:void 0,r=o=>F.some(p=>p.value===o)?o:void 0,[l,a,i,c]=[s(t.darkenTablet),r(t.darkenStyleTablet),s(t.darkenPhone),r(t.darkenStylePhone)],m=l??t.darken,d=a??t.darkenStyle;return b(B,String(e.background),l!==void 0||a!==void 0?n(m,d):null,i!==void 0||c!==void 0?n(i??m,c??d):null)}function Y(t,e){const n={"top-left":["start","start"],"top-center":["center","start"],"top-right":["end","start"],left:["start","center"],center:["center","center"],right:["end","center"],"bottom-left":["start","end"],"bottom-center":["center","end"],"bottom-right":["end","end"]},[s,r]=n[t]??n.center,[l,a]=e==="column"?[r,s]:[s,r],i={start:"justify-start",center:"justify-center",end:"justify-end"},c={start:"items-start",center:"items-center",end:"items-end"};return`${i[l]} ${c[a]}`}export{W as BOX_CARD_PAD,$ as BOX_CARD_SIDE,x as BOX_DARKEN,F as BOX_DARKEN_STYLES,T as BOX_FILL_VIEWS,L as BOX_OWNS_SIDES_CLASS,D as BOX_SWATCH_PROP,B as BOX_WASH_VIEWS,R as CARD_SHADOW_CLASS,S as boxDarkenStyle,h as boxFillOf,M as boxFillSlot,w as boxFillViews,u as boxPaintOf,Y as boxPlacementClasses,j as boxSwatchFill,K as boxWashViews,H as isBackgroundBox};
|
|
@@ -103,6 +103,9 @@ export declare function boxRowColumnsClass(box: {
|
|
|
103
103
|
line?: unknown;
|
|
104
104
|
columns?: unknown;
|
|
105
105
|
}): string;
|
|
106
|
+
export declare const ACCORDION_COLUMN_COUNTS: readonly number[];
|
|
107
|
+
export declare const ACCORDION_PHONE_COLUMN_COUNTS: readonly number[];
|
|
108
|
+
export declare function boxAccordionColumnsClass(columns: unknown, phoneRow: unknown, touching?: boolean): string;
|
|
106
109
|
export declare function boxPhoneRowOneLine(wrapPhone: unknown, wrapTablet?: unknown): boolean;
|
|
107
110
|
export declare function boxPhoneRowClasses(perRow: unknown, sharePhone?: unknown, wrapPhone?: unknown, wrapTablet?: unknown): string;
|
|
108
111
|
export declare function boxPhoneCellsShareLine(perRow: unknown, sharePhone: unknown): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isStripBox as b}from"./box-separator.js";import{viewOverrides as B}from"./view-overrides.js";const ae={sectionPaddingTop:0,sectionPaddingBottom:0},c={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},v={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function se(e,t){const a=typeof e=="string"&&e in c?c[e]:"",i=typeof t=="string"&&t in v?v[t]:"";return[a,i].filter(Boolean).join(" ")}function y(e){return e===!0||e==="wrap"?"flex-wrap":""}const N={start:"view-tablet:max-view-desktop:justify-start!",center:"view-tablet:max-view-desktop:justify-center!",between:"view-tablet:max-view-desktop:justify-between!",end:"view-tablet:max-view-desktop:justify-end!"},P={start:"max-view-tablet:justify-start",center:"max-view-tablet:justify-center",between:"max-view-tablet:justify-between",end:"max-view-tablet:justify-end"},R={start:"view-tablet:max-view-desktop:items-start!",center:"view-tablet:max-view-desktop:items-center!",end:"view-tablet:max-view-desktop:items-end!",stretch:"view-tablet:max-view-desktop:items-stretch!"},I={start:"max-view-tablet:items-start",center:"max-view-tablet:items-center",end:"max-view-tablet:items-end",stretch:"max-view-tablet:items-stretch"},H={wrap:"view-tablet:max-view-desktop:flex-wrap!",nowrap:"view-tablet:max-view-desktop:flex-nowrap!"};function w(e,t){return typeof t=="string"&&Object.prototype.hasOwnProperty.call(e,t)?t:void 0}function f(e,t,a){const i=B("same",e,t,a),s={};return i.tablet!==void 0&&i.tablet!==e&&(s.tablet=i.tablet),i.phone!==void 0&&i.phone!==e&&(s.phone=i.phone),s}function h(e,t,a){return[e.tablet?t[e.tablet]:"",e.phone?a[e.phone]:""].filter(Boolean).join(" ")}function $(e,t,a){return f(w(c,e)??"start",w(c,t),w(c,a))}function ne(e,t,a){return h($(e,t,a),N,P)}function oe(e,t,a){const i=w(v,e)??"stretch";if(i==="stretch")return"";const s=f(i,w(v,t),w(v,a));return h(s,R,I)}function m(e){if(e===!0||e==="wrap")return"wrap";if(e===!1||e==="nowrap")return"nowrap"}function we(e,t){const a=y(e)===""?"nowrap":"wrap",i=m(t);return i&&i!==a?H[i]:""}const le="Block widths",g=[{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]}],X="data-sf-box-items",M=new RegExp(`[ \\t]+[^\\s"'\`]*\\[${X}\\][^\\s"'\`]*`,"g");function re(e){return e.replace(M,"")}const de=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Custom",value:"custom",weights:[2,1]}];function ce(e){return Array.isArray(e)?"custom":e==="equal"?"equal":typeof e=="string"&&e in p?"custom":"content"}const u=4,k=10;function W(e,t){if(!Number.isInteger(t)||t<2||t>u||e.length!==t-1||!e.every(s=>typeof s=="number"&&Number.isFinite(s)))return;const a=[];let i=0;return e.forEach((s,n)=>{const o=100-i-k*(t-1-n),x=Math.min(o,Math.max(k,Math.round(s)));a.push(x),i+=x}),a}function S(e,t,a){if(!Array.isArray(t))return;const i=W(t,a),s=i?[...i,100-i.reduce((o,x)=>o+x,0)]:[],n={};for(let o=0;o<u;o+=1)n[`--${e}-${o+1}`]=s[o]??1;return n}function ve(e,t,a){const i=S("sf-share",e,a),s=S("sf-share-tablet",t,a);return i||s?{...i,...s}:void 0}function j(e,t){const a=Array.from({length:t},()=>1),i=g.find(o=>o.value===e);if(!i?.weights||t<1)return a;const[s,n]=i.weights;return s>1&&(a[0]=s),n>1&&(a[t-1]=n),a}function xe(e,t){if(typeof e!="string"||!(e in p)||e==="equal")return e;const a=j(e,t),i=a.reduce((s,n)=>s+n,0);return a.slice(0,-1).map(s=>Math.round(s/i*100))}const l="[&>*]: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:l,bigLeft:`${l} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2]`,bigRight:`${l} [&>*:last-child]:view-wide:grow-[2] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[2]`,biggerLeft:`${l} [&>*:first-child]:view-wide:grow-[3] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[3]`,biggerRight:`${l} [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`,twoThree:`${l} [&>*: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]`},U=`${l} [&>*: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 F(e){return Array.isArray(e)?U:typeof e=="string"?p[e]??"":""}const pe={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}},{not:{context:"parent.bgImage",set:!0}},{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-tablet:max-view-desktop:flex-row!",r=`${A} [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-0!`,O={content:`${A} [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[content]! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[content]!`,equal:r,bigLeft:`${r} [&>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]!`,bigRight:`${r} [&>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]!`,biggerLeft:`${r} [&>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]!`,biggerRight:`${r} [&>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]!`,twoThree:`${r} [&>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]! [&>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]!`},G=`${r} [&>*:nth-child(1):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>[data-sf-box-items]>*:nth-child(1):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>*:nth-child(2):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>[data-sf-box-items]>*:nth-child(2):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>*:nth-child(3):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>[data-sf-box-items]>*:nth-child(3):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>*:nth-child(4):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]! [&>[data-sf-box-items]>*:nth-child(4):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]!`;function q(e){return Array.isArray(e)||typeof e=="string"&&e in O?e:null}function be(e){if(e.direction!=="row"||b(e.direction,e.separator)||e.loop==="scroll"||e.line===!0||C(e.columns)!==""||L(e.columnsTablet)!=="")return"";const t=q(e.shareTablet);return t===null?"":typeof t=="string"?O[t]:G}const V="[&>*]:view-wide:basis-[content] [&>[data-sf-box-items]>*]:view-wide:basis-[content]";function fe(e){return F(e)===""?V:""}const he="Columns",me=1,_e=3,_={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)]"},ge=g.filter(e=>e.value==="content"||e.value==="equal"),ue="equal",ke=1,Se=6,d="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!",K={1:`${d} [&>*]:view-wide:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc(100%/1)]!`,2:`${d} [&>*]: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:`${d} [&>*]: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:`${d} [&>*]: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:`${d} [&>*]: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:`${d} [&>*]: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 C(e){return typeof e=="number"?K[e]??"":""}const J={1:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc(100%/1)]!",2:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet: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-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet: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-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet: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-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet: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-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet: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-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function L(e){return typeof e=="number"?J[e]??"":""}function Ae(e){return e.direction!=="row"||b(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":L(e.columnsTablet)}function Oe(e){return e.direction!=="row"||b(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":C(e.columns)}const D="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]",Y={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)]"},Q="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 z(e,t){return(m(e)??m(t)??"wrap")==="nowrap"}function Ce(e,t,a,i){const s=_[Number(e)];if(!s)return"max-view-wide:flex-col";const n=z(a,i);return E(e,t)?n?Q:D:n?Y[Number(e)]:s}function Le(e,t){return Number(e)in _&&!E(e,t)}function E(e,t){return Number(e)in _&&t==="content"}const Ee="Block spacing",Te=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],Z="sf-box-gap-only";function Be(e){return e==="gap"?Z:""}const T={each:"sf-box-each-tablet",gap:"sf-box-gap-only-tablet"},ee={each:"sf-box-each-phone",gap:"sf-box-gap-only-phone"};function ye(e,t,a){const i=n=>w(T,n),s=f(e==="gap"?"gap":"each",i(t),i(a));return h(s,T,ee)}export{v as BOX_ALIGN_CLASS,Ee as BOX_BLOCK_SPACING_LABEL,Te as BOX_BLOCK_SPACING_POINTS,Se as BOX_COLUMNS_MAX,ke as BOX_COLUMNS_MIN,Z as BOX_GAP_ONLY_CLASS,pe as BOX_GIVES_PICTURES_A_HEIGHT,X as BOX_ITEMS_ATTR,he as BOX_PHONE_ROW_LABEL,_e as BOX_PHONE_ROW_MAX,me as BOX_PHONE_ROW_MIN,de as BOX_SHARE_CHOICES,le as BOX_SHARE_LABEL,ue as BOX_SHARE_PHONE_DEFAULT,ge as BOX_SHARE_PHONE_POINTS,g as BOX_SHARE_POINTS,ae as NESTED_BOX_PADDING,oe as boxAlignViewClasses,Be as boxBlockSpacingClass,ye as boxBlockSpacingViewClasses,C as boxColumnsClass,fe as boxFitContentClass,$ as boxJustifyViewAnswers,ne as boxJustifyViewClasses,se as boxLayoutClasses,Le as boxPhoneCellsShareLine,Ce as boxPhoneRowClasses,E as boxPhoneRowFits,z as boxPhoneRowOneLine,Oe as boxRowColumnsClass,Ae as boxRowTabletColumnsClass,be as boxRowTabletShareClass,ce as boxShareChoiceOf,F as boxShareClasses,q as boxShareTabletOf,ve as boxShareVars,xe as boxShareWidthsOf,L as boxTabletColumnsClass,y as boxWrapClass,we as boxWrapTabletClass,m as boxWrapWordOf,re as withoutBoxItemsHalf};
|
|
1
|
+
import{isStripBox as b}from"./box-separator.js";import{viewOverrides as B}from"./view-overrides.js";const ne={sectionPaddingTop:0,sectionPaddingBottom:0},c={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},v={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function oe(e,t){const a=typeof e=="string"&&e in c?c[e]:"",i=typeof t=="string"&&t in v?v[t]:"";return[a,i].filter(Boolean).join(" ")}function R(e){return e===!0||e==="wrap"?"flex-wrap":""}const P={start:"view-tablet:max-view-desktop:justify-start!",center:"view-tablet:max-view-desktop:justify-center!",between:"view-tablet:max-view-desktop:justify-between!",end:"view-tablet:max-view-desktop:justify-end!"},I={start:"max-view-tablet:justify-start",center:"max-view-tablet:justify-center",between:"max-view-tablet:justify-between",end:"max-view-tablet:justify-end"},H={start:"view-tablet:max-view-desktop:items-start!",center:"view-tablet:max-view-desktop:items-center!",end:"view-tablet:max-view-desktop:items-end!",stretch:"view-tablet:max-view-desktop:items-stretch!"},M={start:"max-view-tablet:items-start",center:"max-view-tablet:items-center",end:"max-view-tablet:items-end",stretch:"max-view-tablet:items-stretch"},$={wrap:"view-tablet:max-view-desktop:flex-wrap!",nowrap:"view-tablet:max-view-desktop:flex-nowrap!"};function w(e,t){return typeof t=="string"&&Object.prototype.hasOwnProperty.call(e,t)?t:void 0}function f(e,t,a){const i=B("same",e,t,a),s={};return i.tablet!==void 0&&i.tablet!==e&&(s.tablet=i.tablet),i.phone!==void 0&&i.phone!==e&&(s.phone=i.phone),s}function h(e,t,a){return[e.tablet?t[e.tablet]:"",e.phone?a[e.phone]:""].filter(Boolean).join(" ")}function X(e,t,a){return f(w(c,e)??"start",w(c,t),w(c,a))}function we(e,t,a){return h(X(e,t,a),P,I)}function re(e,t,a){const i=w(v,e)??"stretch";if(i==="stretch")return"";const s=f(i,w(v,t),w(v,a));return h(s,H,M)}function m(e){if(e===!0||e==="wrap")return"wrap";if(e===!1||e==="nowrap")return"nowrap"}function le(e,t){const a=R(e)===""?"nowrap":"wrap",i=m(t);return i&&i!==a?$[i]:""}const de="Block widths",g=[{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]}],U="data-sf-box-items",j=new RegExp(`[ \\t]+[^\\s"'\`]*\\[${U}\\][^\\s"'\`]*`,"g");function ce(e){return e.replace(j,"")}const ve=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Custom",value:"custom",weights:[2,1]}];function xe(e){return Array.isArray(e)?"custom":e==="equal"?"equal":typeof e=="string"&&e in p?"custom":"content"}const u=4,S=10;function W(e,t){if(!Number.isInteger(t)||t<2||t>u||e.length!==t-1||!e.every(s=>typeof s=="number"&&Number.isFinite(s)))return;const a=[];let i=0;return e.forEach((s,n)=>{const o=100-i-S*(t-1-n),x=Math.min(o,Math.max(S,Math.round(s)));a.push(x),i+=x}),a}function k(e,t,a){if(!Array.isArray(t))return;const i=W(t,a),s=i?[...i,100-i.reduce((o,x)=>o+x,0)]:[],n={};for(let o=0;o<u;o+=1)n[`--${e}-${o+1}`]=s[o]??1;return n}function pe(e,t,a){const i=k("sf-share",e,a),s=k("sf-share-tablet",t,a);return i||s?{...i,...s}:void 0}function F(e,t){const a=Array.from({length:t},()=>1),i=g.find(o=>o.value===e);if(!i?.weights||t<1)return a;const[s,n]=i.weights;return s>1&&(a[0]=s),n>1&&(a[t-1]=n),a}function be(e,t){if(typeof e!="string"||!(e in p)||e==="equal")return e;const a=F(e,t),i=a.reduce((s,n)=>s+n,0);return a.slice(0,-1).map(s=>Math.round(s/i*100))}const r="[&>*]: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:r,bigLeft:`${r} [&>*:first-child]:view-wide:grow-[2] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[2]`,bigRight:`${r} [&>*:last-child]:view-wide:grow-[2] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[2]`,biggerLeft:`${r} [&>*:first-child]:view-wide:grow-[3] [&>[data-sf-box-items]:first-child>*:first-child]:view-wide:grow-[3]`,biggerRight:`${r} [&>*:last-child]:view-wide:grow-[3] [&>[data-sf-box-items]:last-child>*:last-child]:view-wide:grow-[3]`,twoThree:`${r} [&>*: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]`},G=`${r} [&>*: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 q(e){return Array.isArray(e)?G:typeof e=="string"?p[e]??"":""}const fe={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}},{not:{context:"parent.bgImage",set:!0}},{any:[{context:"parent.columns",in:[2,3,4,5,6]},{all:[{not:{context:"parent.columns",is:1}},{context:"parent.share",in:Object.keys(p)}]}]}]},O="view-tablet:max-view-desktop:flex-row!",l=`${O} [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-0!`,C={content:`${O} [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[content]! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[content]!`,equal:l,bigLeft:`${l} [&>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]!`,bigRight:`${l} [&>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]!`,biggerLeft:`${l} [&>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]!`,biggerRight:`${l} [&>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]!`,twoThree:`${l} [&>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]! [&>[data-sf-box-items]:first-child>*:first-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[2]! [&>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]! [&>[data-sf-box-items]:last-child>*:last-child:nth-child(n)]:view-tablet:max-view-desktop:grow-[3]!`},D=`${l} [&>*:nth-child(1):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>[data-sf-box-items]>*:nth-child(1):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-1,1)]! [&>*:nth-child(2):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>[data-sf-box-items]>*:nth-child(2):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-2,1)]! [&>*:nth-child(3):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>[data-sf-box-items]>*:nth-child(3):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-3,1)]! [&>*:nth-child(4):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]! [&>[data-sf-box-items]>*:nth-child(4):nth-child(n)]:view-tablet:max-view-desktop:grow-[var(--sf-share-tablet-4,1)]!`;function V(e){return Array.isArray(e)||typeof e=="string"&&e in C?e:null}function he(e){if(e.direction!=="row"||b(e.direction,e.separator)||e.loop==="scroll"||e.line===!0||A(e.columns)!==""||L(e.columnsTablet)!=="")return"";const t=V(e.shareTablet);return t===null?"":typeof t=="string"?C[t]:D}const K="[&>*]:view-wide:basis-[content] [&>[data-sf-box-items]>*]:view-wide:basis-[content]";function me(e){return q(e)===""?K:""}const _e="Columns",ge=1,ue=3,_={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)]"},Se=g.filter(e=>e.value==="content"||e.value==="equal"),ke="equal",Oe=1,Ce=6,d="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!",J={1:`${d} [&>*]:view-wide:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*]:view-wide:basis-[calc(100%/1)]!`,2:`${d} [&>*]: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:`${d} [&>*]: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:`${d} [&>*]: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:`${d} [&>*]: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:`${d} [&>*]: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 A(e){return typeof e=="number"?J[e]??"":""}const Y={1:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc(100%/1)]! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:basis-[calc(100%/1)]!",2:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet: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-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px)))/2)]!",3:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet: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-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_2)/3)]!",4:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet: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-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_3)/4)]!",5:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet: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-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_4)/5)]!",6:"view-tablet:max-view-desktop:flex-row! view-tablet:max-view-desktop:flex-wrap! [&>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:min-w-0! [&>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>[data-sf-box-items]>*:nth-child(n)]:view-tablet:max-view-desktop:grow-0! [&>*:nth-child(n)]:view-tablet: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-tablet:max-view-desktop:basis-[calc((100%_-_var(--sf-gap-len-tablet,var(--sf-gap-len,0px))_*_5)/6)]!"};function L(e){return typeof e=="number"?Y[e]??"":""}function Ae(e){return e.direction!=="row"||b(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":L(e.columnsTablet)}function Le(e){return e.direction!=="row"||b(e.direction,e.separator)||e.loop==="scroll"||e.line===!0?"":A(e.columns)}const N={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"},E={2:"max-view-wide:grid max-view-wide:grid-cols-2",3:"max-view-wide:grid max-view-wide:grid-cols-3"},Ne=Object.keys(N).map(Number),Ee=Object.keys(E).map(Number);function Te(e,t,a=!1){const i=typeof e=="number"?N[e]??"":"",s=E[Number(t)]??"";return!i&&!s?"":[i,s,a?"gap-y-0!":""].filter(Boolean).join(" ")}const Q="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]",z={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)]"},Z="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 ee(e,t){return(m(e)??m(t)??"wrap")==="nowrap"}function ye(e,t,a,i){const s=_[Number(e)];if(!s)return"max-view-wide:flex-col";const n=ee(a,i);return T(e,t)?n?Z:Q:n?z[Number(e)]:s}function Be(e,t){return Number(e)in _&&!T(e,t)}function T(e,t){return Number(e)in _&&t==="content"}const Re="Block spacing",Pe=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],te="sf-box-gap-only";function Ie(e){return e==="gap"?te:""}const y={each:"sf-box-each-tablet",gap:"sf-box-gap-only-tablet"},ie={each:"sf-box-each-phone",gap:"sf-box-gap-only-phone"};function He(e,t,a){const i=n=>w(y,n),s=f(e==="gap"?"gap":"each",i(t),i(a));return h(s,y,ie)}export{Ne as ACCORDION_COLUMN_COUNTS,Ee as ACCORDION_PHONE_COLUMN_COUNTS,v as BOX_ALIGN_CLASS,Re as BOX_BLOCK_SPACING_LABEL,Pe as BOX_BLOCK_SPACING_POINTS,Ce as BOX_COLUMNS_MAX,Oe as BOX_COLUMNS_MIN,te as BOX_GAP_ONLY_CLASS,fe as BOX_GIVES_PICTURES_A_HEIGHT,U as BOX_ITEMS_ATTR,_e as BOX_PHONE_ROW_LABEL,ue as BOX_PHONE_ROW_MAX,ge as BOX_PHONE_ROW_MIN,ve as BOX_SHARE_CHOICES,de as BOX_SHARE_LABEL,ke as BOX_SHARE_PHONE_DEFAULT,Se as BOX_SHARE_PHONE_POINTS,g as BOX_SHARE_POINTS,ne as NESTED_BOX_PADDING,Te as boxAccordionColumnsClass,re as boxAlignViewClasses,Ie as boxBlockSpacingClass,He as boxBlockSpacingViewClasses,A as boxColumnsClass,me as boxFitContentClass,X as boxJustifyViewAnswers,we as boxJustifyViewClasses,oe as boxLayoutClasses,Be as boxPhoneCellsShareLine,ye as boxPhoneRowClasses,T as boxPhoneRowFits,ee as boxPhoneRowOneLine,Le as boxRowColumnsClass,Ae as boxRowTabletColumnsClass,he as boxRowTabletShareClass,xe as boxShareChoiceOf,q as boxShareClasses,V as boxShareTabletOf,pe as boxShareVars,be as boxShareWidthsOf,L as boxTabletColumnsClass,R as boxWrapClass,le as boxWrapTabletClass,m as boxWrapWordOf,ce as withoutBoxItemsHalf};
|
|
@@ -5,4 +5,8 @@ export declare const TOP_LINE_CLASS = "absolute left-5 top-0 z-10 -translate-y-1
|
|
|
5
5
|
export declare const TOP_LINE_ATTRIBUTE = "data-sf-top-line";
|
|
6
6
|
export declare const FRAMED_CARD_OWNERS: ReadonlySet<string>;
|
|
7
7
|
export declare function framesItsCards(ownerType: unknown): boolean;
|
|
8
|
+
export declare function cardLineBetween(value: unknown, at: {
|
|
9
|
+
linesBetween?: boolean;
|
|
10
|
+
index?: number;
|
|
11
|
+
} | null, isCardBox: boolean): unknown;
|
|
8
12
|
export declare const OUTSIDE_FRAMED_CARD = "outsideFramedCard";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const c="cardPlace";function f(t){return t[c]==="top-line"?"top-line":""}const d="absolute left-5 top-0 z-10 -translate-y-1/2 bg-bg px-2",a="data-sf-top-line",p=new Set(["Cards"]);function x(t){return typeof t=="string"&&p.has(t)}const i=t=>{if(!t||typeof t!="object")return!1;const e=t,o=n=>typeof n=="number"&&n>0,s=e.width,r=n=>typeof e[n]=="number"?o(e[n]):o(s);return r("top")&&!r("right")&&!r("bottom")&&!r("left")};function _(t,e,o){return!o||!e?.linesBetween||e.index!==0?t:i(t)?{...t,top:0}:t}const u="outsideFramedCard";export{c as CARD_PLACE_PROP,p as FRAMED_CARD_OWNERS,u as OUTSIDE_FRAMED_CARD,a as TOP_LINE_ATTRIBUTE,d as TOP_LINE_CLASS,_ as cardLineBetween,f as cardPlaceOf,x as framesItsCards};
|
|
@@ -35,6 +35,8 @@ export interface CardTemplateSpec {
|
|
|
35
35
|
blocks?: readonly CardTemplateBlock[];
|
|
36
36
|
typedRows?: string;
|
|
37
37
|
seed?: (props: Record<string, unknown>) => Record<string, unknown>;
|
|
38
|
+
seedOnInsert?: (props: Record<string, unknown>) => Record<string, unknown>;
|
|
39
|
+
linesBetween?: boolean;
|
|
38
40
|
}
|
|
39
41
|
export interface CardTemplateBlock {
|
|
40
42
|
type: string;
|
|
@@ -47,6 +49,7 @@ export declare function cardTemplatesNameBlocks(): boolean;
|
|
|
47
49
|
export declare function cardTemplateBlocks(type: string): readonly CardTemplateBlock[];
|
|
48
50
|
export declare function isCardTemplateBlock(type: string): boolean;
|
|
49
51
|
export declare function cardTemplateTypedRows(type: unknown): string;
|
|
52
|
+
export declare function cardTemplateLinesBetween(type: unknown): boolean;
|
|
50
53
|
export declare function hasCardTemplate(type: unknown): boolean;
|
|
51
54
|
export declare function cardTemplateFields(type: string, kind?: CardRowFieldKind): readonly CardRowFieldSpec[];
|
|
52
55
|
export declare function defaultListField(type: unknown): string;
|