efficient-web-builder 69.3.0 → 69.5.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 +34 -0
- package/dist/editor/components/StandaloneSectionEditor.js +1 -1
- package/dist/editor/components/WebsiteScreenParts.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSlide/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ProcessSteps/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/document/blocks/hero-shared-fields.d.ts +19 -0
- package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -1
- package/dist/editor/lib/document/controls.d.ts +9 -1
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/host-document-bridge.js +1 -1
- package/dist/editor/lib/sections/city-presets.d.ts +1 -1
- package/dist/editor/lib/sections/city-presets.js +1 -1
- package/dist/editor/lib/sections/hero-ticker-to-strip.js +1 -1
- package/dist/editor/lib/sections/insert-box-path.d.ts +8 -0
- package/dist/editor/lib/sections/insert-box-path.js +1 -0
- package/dist/editor/lib/sections/menu-presets.d.ts +2 -0
- package/dist/editor/lib/sections/menu-presets.js +1 -0
- package/dist/format/lib/content/card-row-keys.d.ts +5 -0
- package/dist/format/lib/content/card-row-keys.js +1 -0
- package/dist/format/lib/content/card-template.d.ts +1 -6
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/picture-focus-rows.js +1 -1
- package/dist/format/lib/document/article-body-seed.js +1 -1
- package/dist/format/lib/document/blocks/general/CardList/item-seed.js +1 -1
- package/dist/format/lib/document/blocks/general/Cards/card-seed.d.ts +2 -1
- package/dist/format/lib/document/blocks/general/Cards/card-seed.js +1 -1
- package/dist/format/lib/document/blocks/general/FAQ/card-seed.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/FAQ/card-seed.js +1 -1
- package/dist/format/lib/document/blocks/general/Footprint/card-seed.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/Footprint/card-seed.js +1 -1
- package/dist/format/lib/document/blocks/general/HeroSingle/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/HeroSlide/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Logos/card-seed.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/Logos/card-seed.js +1 -1
- package/dist/format/lib/document/blocks/general/OrderSummary/block-type.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/OrderSummary/block-type.js +1 -0
- package/dist/format/lib/document/blocks/general/ProcessSteps/row-seed.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/ProcessSteps/row-seed.js +1 -1
- package/dist/format/lib/document/cap-hero-groups.js +1 -1
- package/dist/format/lib/document/card-content-switch.js +1 -1
- package/dist/format/lib/document/cards-template-on-read.js +1 -1
- package/dist/format/lib/document/media-manifest.json +2 -1
- package/dist/format/lib/document/node-lists.d.ts +1 -0
- package/dist/format/lib/document/node-lists.js +1 -1
- package/dist/format/lib/document/renamed-props.js +1 -1
- package/dist/format/lib/document/section-catalog.js +19 -3
- package/dist/format/lib/document/seed-parts.d.ts +3 -0
- package/dist/format/lib/document/seed-parts.js +1 -1
- package/dist/format/lib/editor-words-kept.js +1 -1
- package/dist/format/lib/hero-media-layout.d.ts +12 -0
- package/dist/format/lib/hero-media-layout.js +1 -1
- package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
- package/dist/format/lib/source-rules/editor-words.js +1 -1
- package/dist/format/lib/source-rules/no-glyph-rows.js +4 -4
- package/dist/format/lib/source-rules/one-node-list-loop.d.ts +6 -0
- package/dist/format/lib/source-rules/one-node-list-loop.js +1 -0
- package/dist/format/lib/source-rules/one-node-list.js +1 -1
- package/dist/format/lib/source-rules/one-seed-id-home.d.ts +6 -0
- package/dist/format/lib/source-rules/one-seed-id-home.js +1 -0
- package/dist/format/lib/source-rules/page-picture-place.js +3 -3
- package/dist/format/lib/source-rules/reduced-motion.js +8 -8
- package/dist/format/lib/source-rules/support/css-length.js +1 -1
- package/dist/format/lib/source-rules/support/css-rules.js +1 -1
- package/dist/format/lib/source-rules/support/label-extraction.js +5 -5
- package/dist/format/lib/source-rules/support/ts-source.js +3 -3
- package/dist/render/components/HeroSingle.d.ts +2 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/HeroSlide.d.ts +2 -1
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.d.ts +1 -0
- 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.js +1 -1
- package/dist/render/lib/document/hero-media-parts.d.ts +6 -4
- package/dist/render/lib/document/hero-media-parts.js +1 -1
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as i,jsxs as k,Fragment as L}from"react/jsx-runtime";import{cloneElement as _e,createContext as Tn,useContext as ot,useEffect as Nn,useId as rt,useRef as J,useState as Z}from"react";import{useEasel as re,useSelectedHost as B}from"efficient-easel/easel";import{PIN_LENGTH as ie,toDateKey as Pn,fromDateKey as kn}from"efficient-shell/format";import{say as a,editorEaselWords as y}from"../../../format/lib/editor-words.js";import{finiteNumber as V}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as it,firstFrameHint as Ln,loadingShowsOf as An,loadingStillHint as Fn}from"../../../format/lib/hero-video.js";import{pageFramesFor as vn,usePageVideoFrames as Bn}from"../page-video-frames.js";import{ScreenDocumentContext as Dn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as st,hidableText as lt}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Ce,LINK_FIELD_MARKER as at,MEDIA_FIELD_MARKER as ct,SCAFFOLD_FIELD_MARKER as ut,TEXT_FIELD_MARKER as N,foldMetaOf as ye,textFieldIdentifier as Hn}from"efficient-easel/draw";import Gn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as dt}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as Mn,CARD_IMAGE_RADIUS_ROW as pt,CARD_IMAGE_RADIUS_STEP as Wn,CORNER_RADIUS_MAX as xe,CORNER_RADIUS_MIN as A}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Un,IMAGE_CORNERS_LABEL as Kn,IMAGE_CORNERS_ROW as Xn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as $n,GRID_MAX_ROW_SPAN as Vn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as jn,GALLERY_LAYOUTS as Oe,GALLERY_LAYOUT_KEYS as Yn,GALLERY_PHONE_LAYOUTS as zn,galleryChoices as ft,galleryLayoutRatio as qn,galleryPictureCells as Jn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as Zn}from"./shell-glyph.js";import{anchorSiblingsOf as Qn,placementPoints as eo}from"../../../format/lib/hero-group-placement.js";import to from"../../components/AnchorField.js";import no from"../../components/SourceStatus.js";import{AdjustIcon as oo,EyeIcon as ro,AnimationIcon as io,BackgroundIcon as ht,BorderAllIcon as so,BlockSectionIcon as lo,ColumnWidthsIcon as Ie,ColumnsIcon as mt,CornerIcon as gt,DirectionDownIcon as ao,DirectionLeftIcon as co,DirectionRightIcon as uo,DirectionUpIcon as po,EditIcon as fo,GapIcon as ho,GridIcon as bt,GroundIcon as Ee,HashIcon as mo,HeightIcon as Re,ImageIcon as go,ListIcon as bo,LocationIcon as wt,PaddingBottomIcon as St,PaddingLeftIcon as _t,PaddingRightIcon as Ct,PaddingTopIcon as Te,PageIcon as wo,StickyIcon as yt,SearchIcon as So,SquareIcon as _o,TypeIcon as Co,WidthIcon as yo}from"efficient-easel/icons";import{FieldGlyph as xt}from"../../components/FieldGlyph.js";import{resolvePageBackground as xo}from"../../../format/lib/content/page-background.js";import{BOX_FILL_FADE_PROP as Oo,BOX_FILL_FADES as Io,BOX_SWATCH_PROP as Eo,boxFillFadeOf as Ot,boxFillOf as Ro,boxFillSlot as Ne,boxPaintOf as To}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as It,CORNER_SIDE_POINTS as No,SECTION_CORNERS_ROW as Et,hasOwnSectionCorners as Po,normalizeCornerSides as Rt}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as Tt}from"../../../format/lib/content/card-corners.js";import{enclosingPath as ko,enclosingSection as Lo}from"./enclosing-section.js";import{SettingsDefaultReset as x,SettingsDrill as Ao,SettingsField as _,SettingsGroup as Fo,SettingsSegmented as vo,SettingsBorder as Bo,SettingsSidesEach as Do,SettingsSwitch as Pe,borderSides as Ho,borderStartEach as Go}from"efficient-easel/panel";import{ListField as Mo}from"efficient-easel/fields";import{DisplayChips as Wo}from"efficient-shell/ui";import{desktopDisplayChanged as Uo,partShownOnDesktop as Ko,partShownOnPhone as Xo,phoneDisplayChanged as $o,withDesktopPart as Vo,withPhonePart as jo}from"../../../format/lib/content/part-display.js";import{ColorSwatch as Yo,CornersInput as zo,DatePicker as qo,DateTimePicker as Jo,FOCAL_DEFAULT as Zo,IconPicker as Nt,COLUMN_COUNT_MAX as Pt,COLUMN_SHARE_MIN as Qo,COLUMN_SHARES_EQUAL as er,resolveColumnShares as kt,WidthsBar as tr,useShellStrings as nr,IconButton as Lt,InputNumber as At,Slider as or,Tooltip as ke}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as rr}from"./geocode-resolve.js";import{ColourRow as se,InheritedColourRow as Ft}from"./ColourControl.js";import{fillThemeColors as ir,slotFill as le}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as Le}from"../../../format/lib/document/part-inks.js";import{keptByRow as Ae}from"efficient-easel/screen/lib/document/style-fields";import vt from"./MarkupToolbar.js";import{deviceField as E}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as sr,NoControlMark as lr,noControlField as Bt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as ar}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as cr,PANEL_ONLY_FIELD as ur}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as dr,resolvePhoneValue as Fe}from"../../../format/lib/document/phone-override.js";import{phoneKey as j,tabletKey as ve,viewKeyAt as Be}from"efficient-easel/draw";import{viewKey as O}from"../../../format/lib/animation/views.js";import{viewRows as D}from"../animation/view-rows.js";import{SuppressibleText as pr}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as fr,CARD_OUTLINE_OPTIONS as hr,DEFAULT_CARD_INDEX_FORMAT as mr,DEFAULT_CARD_OUTLINE as gr}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as br,DEFAULT_COVER_INDEX as wr}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Sr}from"efficient-easel/draw";import _r from"../../components/MediaUploadField.js";import Cr from"../../components/MultiSelectField.js";import yr from"../../components/SectionThemePicker.js";import xr from"../../components/SearchSelectField.js";import Or from"../../components/StorefrontLinkField.js";import{UiIcon as Dt}from"efficient-easel/draw/client";import{SECTION_PADDING as P}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Ir}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Er}from"efficient-easel/draw/client";import{encodePartId as Rr}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as Tr,useEaselStrings as Nr}from"efficient-easel/strings";import{hasPhoneHeight as Pr,hasTabletHeight as De,resolveSectionMinHeight as kr,resolveTabletHeight as Lr}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as Ar,SECTION_PIN_ABOVE_HINT as Fr,SECTION_PIN_ABOVE_KEY as vr,SECTION_PIN_ABOVE_LABEL as Br,SECTION_PIN_GROUP as Dr,SECTION_PIN_LABEL as Ht,SECTION_PIN_SCREENS_KEY as He,SECTION_PIN_SCREENS_LABEL as Gt,SECTION_PIN_STOP_DEFAULT as Hr,SECTION_PIN_STOP_HINT as Gr,SECTION_PIN_STOP_KEY as Mr,SECTION_PIN_STOP_LABEL as Wr,SECTION_PIN_STOP_OPTIONS as Ur,SECTION_STICK_DISTANCE as H,SECTION_STICK_DISTANCE_ROW as Ge,SOME_VIEW_PINS as Mt,hasPhoneStick as Kr,hasTabletStick as Xr,resolveSectionStick as ae,sectionPinStopOf as $r,sectionPinStopWrite as Vr}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as jr}from"../../../format/lib/content/css-length.js";import{SECTION_HEIGHT_MODES as Yr,SECTION_MIN_HEIGHT as zr,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as qr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as Jr,resolveContainerDirection as Wt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Zr,BOX_BLOCK_SPACING_POINTS as Ut,BOX_PHONE_ROW_LABEL as Kt,BOX_COLUMNS_MAX as Qr,BOX_COLUMNS_MIN as Xt,BOX_PHONE_ROW_MAX as ei,BOX_PHONE_ROW_MIN as Me,BOX_SHARE_CHOICES as $t,BOX_SHARE_LABEL as Y,boxShareChoiceOf as Vt,boxShareWidthsOf as We,BOX_SHARE_PHONE_DEFAULT as ti,BOX_SHARE_PHONE_POINTS as ni}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as G}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as jt,BORDER_SIDES as oi,SECTION_BORDER_ROW as Yt,borderBySide as zt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as ri,normalizeTheme as qt,normalizeThemeColors as ii,sectionBandTone as si,surfaceTwoTone as li}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Jt,CONTAINER_GAP_BUILT_IN as ai,CONTAINER_GAP_PHONE as Ue,GAP_FIELD_CONTAINER as Ke,followsSitePhoneGap as ci,hasOwnContainerGap as ui,hasOwnPhoneGap as Xe,resolveContainerGap as Zt,resolvePhoneContainerGap as Qt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as di,CARD_IMAGE_BG_OFF as pi,CARD_IMAGE_BG_SWATCH_NAMES as fi,CARD_IMAGE_BG_SWATCHES as hi,isCardImageBackgroundInheriting as mi,cardImageBackgroundChoice as gi,THEME_CARD_IMAGE_BG as bi}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as wi,SECTION_BG_NO_FILL as Si,sectionBackgroundChoice as _i,THEME_SECTION_BG as $e,isSectionBackgroundEmpty as Ci,sectionBackgroundHex as en}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as yi,nestedAccentValue as tn,resolveSectionAccent as ce}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as xi,TYPE_SIZE_INHERIT as Oi,isTypeSizeInheriting as Ii}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Ei,WIDTH_CHOICE_LABEL as Ri,WIDTH_INHERIT as Ti}from"../../../format/lib/content/section-width.js";import{useEaselSession as Ni}from"efficient-easel/screen/lib/session-context";import{backendOf as Pi}from"../website-session.js";import{BOX_GAP as ki,describedAs as F,group as R,iconOf as z,sharedStyleKinds as ee}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as nn,onDesktopWords as M,phoneTwinFields as Ve,saidAlignmentGrid as Li,useLengthUnit as Ai}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as Fi,PICTURE_PICKER_ROW as vi,directionField as Bi,gapField as je,iconPickerRow as on,lengthUnitFields as ue,pickerCellIcon as Di,pickerNoneIcon as Hi,Segmented as de,select as W,slider as U}from"./box-fields.js";import{VIEW_ABOVE as Ye}from"efficient-easel/screen/lib/content/length-units";import{tierOfView as rn,viewOfTier as Gi}from"../../../format/lib/content/view-tier.js";import{ownEntry as Mi}from"../../../format/lib/own-entry.js";import{LAYOUT_CELL as Wi,galleryPhonePicture as sn}from"./choice-pictures.js";function Ya({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function K(e,t){return a("{value} from {from}",{value:e,from:t})}function Ui(){const{blockGap:e}=G();return e===null?a("this container's own spacing"):K(`${e}px`,a("Styles"))}function Ki({inherited:e,onReset:t,label:n}){return i(x,{words:y()?.panel,label:a(n),changed:!e,detail:Ui(),onReset:t})}function Xi(e){return je({...ki,builtIn:ai[e],resolve:(t,n)=>Zt(e,t,n?.siteGap),action:(t,n)=>i(Ki,{inherited:!ui(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[Ke]:e}})}function $i(e){return dt(E("mobile",{[Ke]:e,type:"custom",render:t=>i(Yi,{container:e,...t})}),ln)}function Vi(e){return dt(E("tablet",{[Ke]:e,type:"custom",render:t=>i(ji,{container:e,...t})}),ln)}const ln={not:{field:"gap",in:Array.from({length:-Jt.min},(e,t)=>Jt.min+t)}};function za(e){return{gap:E("desktop",Xi(e)),[ve("gap")]:Vi(e),[j("gap")]:$i(e)}}function ji({container:e,...t}){const[n]=T("gap"),{siteGap:o}=t.field??{},r=Math.max(Ue.min,Zt(e,n,o));return je({...Ue,builtIn:r,resolve:l=>Xe(l)?l:r,action:(l,c)=>i(x,{words:y()?.panel,label:a("Gap"),changed:Xe(l),detail:M(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function Yi({container:e,...t}){const[n]=T("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=Qt(e,void 0,n,o,r);return je({...Ue,builtIn:s,resolve:c=>Qt(e,c,n,o,r),action:(c,u)=>i(x,{words:y()?.panel,label:a("Gap"),changed:Xe(c),detail:K(`${s}px`,ci(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function qa(e){return Bi({offered:Jr(e),fallback:Wt(e,void 0),resolve:t=>Wt(e,t)})}function Ja(e,t){return eo(t?Qn(e,t):[],t)}function zi({inherited:e,onReset:t,label:n}){return i(x,{words:y()?.panel,label:a(n),changed:!e,detail:K(a("Full"),a("the page")),onReset:t})}function X({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:l=!0,markup:c=!0}){const{text:u,hidden:d}=st(e),h=J(null),p=J(null),f=C=>t(l?{text:C,hidden:d}:C),m=()=>t({text:u,hidden:!d}),g=l&&d,b=rt(),S=r?es(r)?i("span",{className:"sf-hint-while-typing",children:a(r)}):a(r):void 0,w=d?a("Show {label} on the slide",{label:a(n)}):a("Hide {label} on the slide",{label:a(n)});return i(_,{label:a(n),icon:i(Co,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:S,action:l?i(ke,{content:w,children:i(Lt,{"aria-pressed":d,"aria-label":w,onClick:m,children:d?i(Dt,{name:"eye-off",size:14}):i(Dt,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[c&&i(vt,{target:s?p:h,value:u,onChange:f}),s?i("textarea",{id:b,ref:p,value:u,placeholder:o===void 0?void 0:a(o),onChange:C=>f(C.target.value)}):i("input",{id:b,ref:h,type:"text",value:u,placeholder:o===void 0?void 0:a(o),onChange:C=>f(C.target.value)})]})})}function Za(e,t){return{...e,[ut]:t}}function Qa(e){const t=e[N];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[N]:{...t,offPage:!0}}}function ec(e){return!e||typeof e!="object"?!1:e[N]?.offPage===!0}function tc(e){if(!e[N])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[ur]:!0}}function nc(e){return cr(e)}function oc(e){const t=e[N];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[N]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as hu,SCALAR_TEXT_CONTROLS as mu}from"efficient-easel/draw";function rc(e,t){if(!e[N])throw new Error("inOwnBox: the field holds no authored text");const{[sr]:o,...r}=e;return{...r,[ar]:!0,render:t}}const qi=new Set(Sr),pe={type:"radio",options:[{value:!0},{value:!1}]},an={text:{type:"object",objectFields:{text:{type:"text"},hidden:pe}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:pe}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},$=(e,t)=>{const n=F({...t,[N]:e},{...an[e.control],label:e.label});if(!qi.has(e.control))return n;const o=t.render;return{...Bt(n,"authored-copy"),render:r=>i(pr,{name:r.name,children:o(r)})}},ic="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Ji={field:"source.slug",set:!0},sc={not:Ji},Zi="Select a word, then press the highlighter.",Qi=new Set([Zi]),es=e=>Qi.has(e);function lc(e,t,n){return $({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(X,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function ac(e,t,n){return $({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(X,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function cc(e,t,n){return $({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(X,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function uc(e,t,n){return $({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(X,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function dc(e){return{type:"custom",[at]:{label:e},...F({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(Or,{value:lt(t),onChange:n,label:e})}}function pc(e,t,n){return $({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(X,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const fc={Design:oo,Animation:io};function hc(e,t){return{type:"custom",render:()=>i(ts,{text:e,values:t})}}function ts({text:e,values:t}){return i("p",{className:"sf-note",children:a(e,t)})}function mc(e){return ye(e)!==null&&e?.tabs!==void 0}const cn=new Map;function gc(e,t){const n=`${e}\0${t?t.join(""):""}`,o=cn.get(n)??{type:"custom",tabs:t,[Ce]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(L,{})};return cn.set(n,o),o}const un=new Map;function bc(e){const t=un.get(e)??{type:"custom",[Ce]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(L,{})};return un.set(e,t),t}function ns(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function wc(e,t){return ns(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(L,{})}}function Sc(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(L,{})}}function _c({title:e,children:t}){const[n,o]=Z(()=>!ze.has(e));return i(Fo,{title:e,open:n,onToggle:r=>{o(r),r?ze.delete(e):ze.add(e)},children:t})}const ze=new Set;function os({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),s=r?o?.[r]:void 0,l=s?a(s):t;return k("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?a(o[c]):c;return i(ke,{content:u,children:i(Yo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:l})]})}function Cc(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(rs,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function rs({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const s=typeof o=="string"?o:void 0,{colors:l,n:c}=et(),u={background:l.background,surface:l.surface,surface2:li(l),band:si(l)},d=n?$e:t,h=Ci(s,t,d),p=en(void 0,d,u),f=n?wi:void 0,m=d===$e?a("the theme's section background"):a("Theme {n} background",{n:c}),g=is(s,t,l,c,u,r),b=K(p.toUpperCase(),m),S=Le(s),w=S?le(S,l,c):null;return w?i(se,{label:a(e),icon:i(ht,{}),value:w.hex,caption:w.words,onChange:r,changed:!0,onReset:()=>r(f),resetTo:b,choices:g}):i(Ft,{label:a(e),icon:i(ht,{}),value:h?"":en(s,t,u),inherited:p,resetTo:b,onChange:r,onReset:()=>r(f),choices:g})}function is(e,t,n,o,r,s){const l=_i(e,t);return[{label:a("No fill"),color:"",selected:l==="none",onPick:()=>s(Si)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:l==="band",onPick:()=>s($e)},...Qe(Le(e)??"",n,o,s)]}function ss(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=mi(r,t);return i(_,{label:a(e),icon:i(Ee,{}),changed:!s,action:i(x,{words:y()?.panel,label:a(e),changed:!s,detail:a("the theme's image stage"),onReset:()=>o(di)}),children:os({swatches:hi,current:s?bi:gi(r,t),onPick:o,names:fi})})}}}function yc(e=n=>n,t){return ee({_gSectionTheme:R(yi),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(yr,{value:e(n),onChange:o,followLabel:t})}})}function fe(e){const t=I(),n=rn(e?.view),o=l=>Be(e.valueKey,l),r=e.numbersIn??(l=>V(t[o(l)])!==void 0),s=e.followsView??Cs(n,r);return Ai({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:Fi,label:a(e.label),grid:e.grid,hasOwn:r(n),view:{tier:n,numbersIn:r,followsView:s},convertTo:e.convertTo??(l=>{const c=V(t[o(n)]);return c===void 0?{}:{[o(n)]:l(c)}})})}function q({min:e,max:t,step:n,value:o,onChange:r,suffix:s="",readout:l=!0,notch:c,ariaLabel:u,disabled:d=!1,placeholder:h,placeholderWord:p,onClear:f,units:m}){const g=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:g?"sf-slider has-notch":"sf-slider",style:g?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(or,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...p?{emptyLabel:a(p)}:{},suffix:s||void 0,...m?{units:m}:{},showInput:l,label:u===void 0?void 0:a(u),disabled:d,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:b=>{b===null?f?.():b!==o&&r(b)}})})}function ls(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:l,restTrack:c,unsetMark:u,icon:d,unit:h="px"}=t;return{type:"custom",render:({value:p,onChange:f})=>{const m=typeof p=="number"?p:null,g=m===null;return i(_,{label:a(e),icon:d?z(d):void 0,value:g?u||s===void 0?void 0:a(s):`${m}${h}`,changed:!g,action:u?_e(u,{changed:!g,onReset:()=>f(null)}):i(x,{words:y()?.panel,label:a(e),changed:!g,onReset:()=>f(null)}),hint:typeof l=="string"?a(l):l,children:c?c({min:n,max:o,step:r,px:m,label:e,onChange:f}):q({min:n,max:o,step:r,value:m??n,readout:!1,ariaLabel:e,onChange:f})})}}}const te="Corners",as={kind:"radius"};function qe(e){return{type:"custom",render:t=>{const{value:n,onChange:o}=t,r=typeof n=="number"&&Number.isFinite(n)?n:null,s=r!==null;return i(_,{label:a(te),icon:i(gt,{}),changed:s,action:_e(e.mark,{changed:s,onReset:()=>o(null)}),hint:e.hint,children:i(cs,{tier:e,px:r,name:t.name,onRadius:o})})}}}function T(e){const t=B();return[t?.values?.[e],n=>t?.onChange(e,n)]}function dn(){return Bt({type:"custom",render:()=>i(lr,{})},"always")}function he(){const e=B();return t=>e?.onChangeMany(t)}function cs({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[s,l]=T(e.sidesKey),c=he(),u=fe({row:e.row??as,label:te,grid:{min:A,max:xe,step:e.step??1},valueKey:n??"",view:"desktop"}),d=Rt(s)??[...It];return i(zo,{label:a(te),value:d,corners:No,onChange:h=>{const p=Rt(h)??[];l(p.length===It.length?null:p)},radius:t,onRadiusChange:u&&n?h=>c({[n]:h,...u.unitPatch(h===null)}):o,radiusMin:u?.grid.min??A,radiusMax:u?.grid.max??xe,radiusStep:u?.grid.step??e.step??1,radiusPlaceholder:u&&u.unit!=="px"?"–":String(r),...u?{radiusUnit:u.unit,units:u.units}:{}})}function pn(e,t){return ue(e,t)}function fn(){return dn()}function us({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=G(),r=typeof o=="number"?`${o}px`:a("not set");return i(x,{words:y()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):K(r,a("Styles")),onReset:n})}function ds(){const{cornerRadiusPx:e}=G();return typeof e=="number"?e:A}function ps(){return qe({sidesKey:"sectionCornerSides",row:Et,useFollowed:ds,mark:i(us,{label:te}),hint:fs})}const fs="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function xc(){return ee({_gShape:R("Shape"),sectionCorners:ps(),...pn(Et,"sectionCorners"),sectionCornerSides:fn(),...D("sectionBorder",_s),...ue(Yt,"sectionBorder",{tablet:!0,phone:!0})})}const hs=()=>({width:a("Border width"),sides:{top:a("Border top"),right:a("Border right"),bottom:a("Border bottom"),left:a("Border left")},style:a("Border style"),styles:{solid:a("Solid"),dashed:a("Dashed"),dotted:a("Dotted")},color:a("Border color"),unit:"px"});function ms(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function gs(){let e;try{const t=qt(G().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||ri.line}function bs({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:s=!0,above:l={},length:c}){const u=e&&typeof e=="object"?e:{},[d,h]=Z(()=>r?Go(u,l):!1),p=hs(),f=m=>ms(r&&s?m:{width:m.width,color:m.color,...s?{style:m.style}:{}});return i(_,{label:a("Border"),icon:i(so,{}),action:r?i(Do,{each:d,label:a("Each side"),onChange:h}):void 0,children:i(Bo,{label:a("Border"),value:u,each:d,onChange:m=>t(f(m)),placeholder:n,presets:o,words:c?{...p,unit:c.unit}:p,styles:s,max:c?.grid.max??jt,...c?{step:c.grid.step,units:c.units}:{}})})}function ws({value:e,onChange:t,view:n}){const[o]=T("sectionBorder"),[r]=T(ve("sectionBorder")),s=gs(),l=f=>f&&typeof f=="object"?f:{},c=n==="phone"?{...zt(l(o)),...zt(l(r))}:n==="tablet"?l(o):{},u=I(),d=he(),h=O("sectionBorder",n),p=fe({row:Yt,label:"Border",grid:{min:0,max:jt,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>Je(u[Be("sectionBorder",f)]),convertTo:f=>{const m=l(u[h]);return Je(m)?{[h]:Ss(m,f)}:{}}});return i(bs,{value:e,length:p,onChange:p?f=>d({[h]:f,...p.unitPatch(!Je(f))}):t,placeholder:{sides:Ho(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}const hn=["width",...oi];function Je(e){if(!e||typeof e!="object")return!1;const t=e;return hn.some(n=>V(t[n])!==void 0)}function Ss(e,t){const n={...e};for(const o of hn){const r=V(n[o]);r!==void 0&&(n[o]=t(r))}return n}function _s(e){return{type:"custom",render:({value:t,onChange:n})=>i(ws,{value:t,onChange:n,view:e})}}function Cs(e,t){let n=Ye[e];for(;n&&Ye[n]!==null&&!t(n);)n=Ye[n];return n??e}function Oc(e){return{type:"custom",render:()=>i(ys,{partKey:e})}}function ys({partKey:e}){const[t]=T("id"),[n]=T("_partStyles"),{textStyles:o}=G(),r=Nr();let s=null;try{s=Er().select}catch{s=null}const l=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(Ao,{name:a("Text"),preview:Ir(l,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??Tr.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(Rr(t,e))}})}function mn(e){const{cornerRadiusPx:t}=G(),n=typeof t=="number"?t:e;let o=null;try{const{appState:s,selectedItem:l}=re(u=>u),c=l?.props?.id?String(l.props.id):void 0;o=c?Lo(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Po(r)?r:n}function xs({label:e,changed:t=!1,onReset:n=()=>{}}){const o=mn(A);return i(x,{words:y()?.panel,label:a(e),changed:t,detail:K(`${o}px`,a("the section")),onReset:n})}function Os(){return i(L,{children:a("Follows the section's Corners until you set a number here.")})}function Is(){return qe({sidesKey:"cardCornerSides",row:Tt,useFollowed:()=>mn(A),mark:i(xs,{label:te}),hint:i(Os,{})})}function Es(){return{type:"custom",render:()=>i(Gn,{})}}function Ic(){return{_gShape:R("Shape"),cardCorners:Is(),...pn(Tt,"cardCorners"),cardCornerSides:fn(),cardCornersApplyAll:Es()}}function Rs(){return F({type:"custom",[vi]:!0,render:e=>i(Ns,{...e})},{type:"select",label:Y,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 Ts(e,t){const n=Vt(e);if(n!=="custom")return a($t.find(r=>r.value===n)?.label??"");const o=kt(We(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):a("Custom")}function Ns(e){const{value:t,onChange:n}=e,[o]=T("content"),r=Array.isArray(o)?o.length:0,s="follows"in e,l=t!=null,c=l?t:s?e.follows:void 0,u=Vt(c),d=r>=2&&r<=Pt,h=()=>[...er[r]??[]],p=J(null),f=w=>{const C=p.current;C&&JSON.stringify(w)===JSON.stringify(C.shares)?n(C.value):w&&n(w)},m=w=>{w===u||w==="custom"&&!d||n(w==="custom"?h():w)},g=a("The width bar works for 2 to {count} blocks.",{count:Pt}),b=l&&(s||t!=="content"),S=nr().widths.hint(r,Qo);return i(_,{label:a(Y),icon:i(Ie,{}),changed:b,hint:u!=="custom"?void 0:d?S:g,action:i(x,{words:y()?.panel,label:a(Y),changed:b,disabled:e.readOnly===!0,detail:s?M(w=>a(w),Ts(e.follows,r),e.followsView):a("Fit content"),onReset:()=>n(void 0)}),children:k("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(Nt,{label:a(Y),value:u,options:$t.map(w=>({value:w.value,label:w.value==="custom"&&!d?g:a(w.label),icon:Di(i("span",{className:"sf-gallery-pic sf-share-pic",children:gn(w.weights).map((C,v)=>i("i",{style:{gridColumn:`span ${C}`}},v))}),a(w.label),w.value==="custom"&&!d?g:a(w.label))})),onChange:m,columns:3,cell:bn,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&d?i("div",{onFocus:()=>{p.current={value:t,shares:kt(We(c,r),r)}},onBlur:()=>{p.current=null},children:i(tr,{label:a(Y),count:r,value:We(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function gn(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function Ec(){return W(Zr,i(ho,{}),Ut,Ut[0].value)}function Rc(){return E("mobile",on(Y,i(Ie,{}),ni.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:gn(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),ti,{columns:2,cell:bn}))}const bn={width:"5.75rem",height:"3.25rem",words:!0};function Tc(){return Ve("share",Rs(),nn)[ve("share")]}function Ps(){return E("mobile",U(Kt,i(mt,{}),Me,ei,1,Me,"",{clear:{phoneFollows:!1,hint:Me}}))}const wn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Nc(){const e=U(Kt,i(mt,{}),Xt,Qr,1,Xt,"",{clear:{emptyLabel:"Auto"}}),t=Ve("columns",e,{...wn,tablet:nn.tablet}),n=Ve("columns",e,wn,{phoneRow:Ps()});return{...t,phoneRow:n.phoneRow}}function Pc(e,t,n,o,r,s,l){return{type:"custom",render:({value:c,onChange:u,name:d})=>i(ks,{label:e,min:t,max:n,step:o,fallback:r,role:s,value:c,onChange:u,name:d??"",length:l})}}function ks({label:e,min:t,max:n,step:o,fallback:r,role:s,value:l,onChange:c,name:u,length:d}){const h=I(),p=he(),f=rn(d?.view),m=fe({row:d?.row??{kind:"fontSize"},label:e,grid:{min:t,max:n,step:o},valueKey:d?u:"",view:d?.view??"desktop",numbersIn:b=>b===f&&typeof h[u]=="number",followsView:f,convertTo:b=>typeof h[u]=="number"?{[u]:b(h[u])}:{}}),g=b=>m?p({[u]:b,...m.unitPatch(typeof b!="number")}):c(b);return i(_,{label:a(e),icon:i(xt,{noun:s}),action:i(x,{words:y()?.panel,label:a(e),changed:!Ii(l),detail:a("the Text style in Styles"),onReset:()=>g(Oi),defaultAction:{onPress:()=>g(xi),title:a("Keep this section's own built-in size"),icon:i(lo,{})}}),children:q({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof l=="number"?l:r,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:g})})}function Sn(e,t,n){return[{label:"Auto",value:""},...Array.from({length:e},(o,r)=>({label:r===0?`1 ${t}`:`${r+1} ${n}`,value:String(r+1)}))]}function kc(){return{_gCellWidth:R("Cell size"),gridSpan:W("Positions",i(Ie,{}),Sn($n,"position","positions"),""),gridRowSpan:W("Rows tall",i(Re,{}),Sn(Vn,"row","rows"),"")}}function I(){let e=null,t=null;try{e=ot(Ls),t=re(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Ls=Tn(null);function As({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:l,fallback:c}){const u=I()[l],d=Fe(void 0,u,c);return i(L,{children:q({min:e,max:t,step:n,value:Fe(o,u,c),readout:!1,ariaLabel:r,notch:d,onChange:s})})}function Fs({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const l=I()[t],c=Fe(void 0,l,n);return i(x,{words:y()?.panel,label:a(e),changed:r,detail:M(u=>a(u),`${c}${o}`),onReset:s})}function vs(e){return ls(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Fs,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(As,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Bs={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Ds={Top:Te,Bottom:St,Left:_t,Right:Ct},Hs=e=>{const t=Ds[e];return i(t,{})};function Lc(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>Bs[S],s=S=>U(r("Top"),i(Te,{}),P.min,P.max,P.step,S,"px"),l=(S,w,C,v=P)=>E("mobile",vs({label:r(S),icon:Hs(S),desktopKey:w,min:v.min,max:v.max,step:v.step,fallback:C})),c=e.top??P.min,u=e.bottom??P.min,d="sectionPaddingLeft",h="sectionPaddingRight",p=e.sideBounds??P,f=e.side??p.min,m=e.sidePhone??f,g=e.phone===!0,b=S=>g?E("desktop",S):S;return ee({...o?{_gSpacing:R("Padding")}:{},[t]:b(s(c)),...g?{[j(t)]:l("Top",t,c)}:{},...e.only==="top"?{}:{[n]:b(U(r("Bottom"),i(St,{}),P.min,P.max,P.step,u,"px")),...g?{[j(n)]:l("Bottom",n,u)}:{}},...e.sides?{[d]:b(U(r("Left"),i(_t,{}),p.min,p.max,p.step,f,"px")),...g?{[j(d)]:l("Left",d,m,p)}:{},[h]:b(U(r("Right"),i(Ct,{}),p.min,p.max,p.step,f,"px")),...g?{[j(h)]:l("Right",h,m,p)}:{}}:{}})}function Ac(e,t){const n=Object.fromEntries(Object.entries(t).map(([s,l])=>[s,s in e&&ye(l)?e[s]:l])),o={};let r=!1;for(const[s,l]of Object.entries(e)){if(s in t){r||Object.assign(o,n),r=!0;continue}o[s]=l}return r||Object.assign(o,n),o}const me="Width";function Fc(e,t=Ei,n=!0){const o=t.map(r=>({label:Ri[r],value:r}));return ee({...n?{_gWidth:R(me)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(_,{label:a(me),icon:i(yo,{}),action:n?i(zi,{inherited:s?.inherited??!1,onReset:()=>r(Ti),label:me}):void 0,children:de({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:me})})}})}function vc({fill:e=!1}={}){const t=(r,s)=>({type:"custom",render:({value:l,onChange:c})=>i(Gs,{value:l,onChange:c,view:r,badge:s,fill:e})}),n=()=>Ae("sectionHeightMode"),o=()=>Ae("sectionHeightMode");return ee({_gHeight:R(Q),...D("sectionHeightMode",r=>r==="desktop"?t(r):t(r,s=>i(Ks,{view:r,onClear:()=>s(void 0)}))),...D("sectionHeightValue",n),...D("sectionHeightUnit",o)})}function Gs({value:e,onChange:t,view:n,badge:o,fill:r=!1}){const s=I(),{mode:l,number:c,unit:u}=Ms(n,s,e);return i(_,{label:Q,icon:z(i(Re,{})),action:o?o(t):void 0,children:k("div",{className:"es-width-stack",children:[de({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...r?[{label:"Fill",value:"fill"}]:[]],value:l,onChange:t,ariaLabel:Q}),c?i(Us,{view:n,mode:l,menu:u}):null]})})}function _n(e,t){return e==="phone"&&De(t)?Lr(t):kr(t)}function ge(e,t){return e==="desktop"||(e==="tablet"?De(t):Pr(t))?null:_n(e,t)}function Ms(e,t,n){const r=(s=>Yr.includes(s))(n)?n:ge(e,t)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function Ws(e,t,n,o){const r=ge(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[O("sectionHeightMode",e)]:r.mode,...r.mode==="fixed"?{[O("sectionHeightUnit",e)]:r.unit}:{},...n==="sectionHeightUnit"?{[O("sectionHeightValue",e)]:r.value}:{},[O(n,e)]:o}}function Cn(e,t,n){const o=B(),r=ge(e,I());return!o||!r?{followed:null,write:n}:{followed:r,write:l=>o.onChangeMany(c=>{const u=Ws(e,c,t,l);return u===null?{[O(t,e)]:l}:Object.keys(u).length?u:null})}}function Us({view:e,mode:t,menu:n}){const o=B(),r=I(),s=O("sectionHeightValue",e),l=O("sectionHeightUnit",e),c=S=>w=>o?.onChangeMany(()=>({[S]:w})),{followed:u,write:d}=Cn(e,"sectionHeightValue",c(s)),{write:h}=Cn(e,"sectionHeightUnit",c(l)),p=t==="screen"?"%":r[l],f=(u?u.unit:p)==="%"?"%":"px",m=f==="%"?qr:zr,g=r[s],b=n?{options:["px","%"],label:a("Unit"),onChange:S=>h(S)}:void 0;return q({min:m.min,max:m.max,step:m.step,value:u?null:typeof g=="number"?g:m.fallback,...u?{placeholder:u.value}:{},suffix:f,...b?{units:b}:{},ariaLabel:Q,onChange:d})}function Ks({view:e,onClear:t}){const n=I(),o=ge(e,n)===null,r=e==="phone"&&De(n),s=_n(e,n),l=M(c=>a(c),s.mode==="auto"?a("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return i(x,{words:y()?.panel,label:a(Q),changed:o,detail:l,onReset:t})}function Bc(e={}){const t=e.intro===!0,n=s=>({type:"custom",render:({value:l,onChange:c,id:u,name:d})=>i(qs,{value:l,onChange:c,labelId:`${u??d??"stickTop"}-label`,view:s,intro:t})}),o=s=>({type:"custom",render:({value:l,onChange:c})=>i(js,{value:l,onChange:c,view:s,intro:t})}),r=s=>({type:"custom",render:({value:l,onChange:c})=>i(Ys,{value:l,onChange:c,view:s,intro:t})});return{_gStick:R(Dr,{dot:t?Vs:Mt}),...D("stickTop",n),...D("stickTopDistance",o),...ue(Ge,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?D(He,r):{},...t?{}:{[Mr]:Xs()},...t||e.above===!1?{}:{[vr]:$s()}}}function Xs(){const e=W(Wr,i(Te,{}),Ur,Hr);return E("desktop",{...e,render:t=>{const n=e.render({...t,value:$r(t.value),onChange:o=>t.onChange(Vr(o))});return _e(n,{hint:a(Gr)})}})}function $s(){const e=On(Br,!1,i(yt,{}),Fr);return E("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const Vs={any:[Mt,Ar]};function yn(e,t,n,o,r){const s=B(),l=I(),c=e==="desktop"||ne(e,l)?null:Ze(e,ae(l,{intro:o}));return{followed:c,write:(c||r)&&s?d=>s.onChangeMany(h=>{const p=zs(e,h,d,t,o),f=p===null?{[O(t,e)]:d}:p;return Object.keys(f).length?{...f,...r?.(d)??{}}:null}):n}}function js({value:e,onChange:t,view:n,intro:o}){const r=I(),s=ae(r,{intro:o}),l=h=>{const p=Gi(h);return p==="desktop"||ne(p,r)},c=fe({row:Ge,label:"Distance from top",grid:{min:H.min,max:H.max,step:H.step},valueKey:"stickTopDistance",view:n,numbersIn:h=>l(h)&&V(r[Be("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&s.ownTablet?"tablet":"desktop"}),{followed:u,write:d}=yn(n,"stickTopDistance",t,o,c?h=>c.unitPatch(h===void 0):void 0);return i("div",{className:"sf-field",children:q({min:c?.grid.min??H.min,max:c?.grid.max??H.max,step:c?.grid.step??H.step,value:u?null:typeof e=="number"?e:H.fallback,...u?{placeholder:u.distance}:{},...c?{suffix:c.unit,units:c.units}:{suffix:"px"},ariaLabel:a("Distance from top"),onChange:d})})}function Ys({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:s}=yn(n,He,t,o);return i(_,{label:a(Gt),icon:z(i(Re,{})),children:q({min:ie.min,max:ie.max,step:ie.step,value:r?null:V(e)??ie.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Gt),onChange:s})})}function ne(e,t){return e==="tablet"?Xr(t):Kr(t)}function Ze(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,unit:t.tabletUnit,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,unit:t.desktopUnit,screens:t.desktopScreens}}function zs(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ne(e,t))return null;if(n===void 0)return{};const s=Ze(e,ae(t,{intro:r})),l=e==="phone"&&ne("tablet",t)?h=>O(h,"tablet"):h=>h,c=(h,p)=>t[l(h)]==null?{}:{[O(h,e)]:p},u=Ge.unitKey,d=t[l(u)]==null?{}:{[O(u,e)]:s.unit};return{[O("stickTop",e)]:!0,...c("stickTopDistance",s.distance),...d,...c(He,s.screens),[O(o,e)]:n}}function qs({value:e,onChange:t,labelId:n,view:o,intro:r}){const s=I(),l=ae(s,{intro:r}),c=o==="phone"?l.phone:o==="tablet"?l.tablet:r?l.desktop:e===!0,u=o==="phone"&&l.ownTablet,d=o==="desktop"?null:Ze(o,l),h=d?.on?jr(d.distance,d.unit):a("Off");return i(_,{label:a(Ht),labelId:n,icon:z(i(yt,{})),action:k(L,{children:[o!=="desktop"?i(x,{words:y()?.panel,label:a(Ht),changed:ne(o,s),detail:M(p=>a(p),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(Pe,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const xn="e.g. about";function Dc(){return{_gAnchor:R("Anchor"),anchor:$({control:"plainText",label:"Name",placeholder:xn},{type:"custom",render:({value:e,onChange:t})=>i(to,{value:e,onChange:t,nameBox:(n,o)=>i(X,{value:n,onChange:o,label:"Name",placeholder:xn,hideable:!1,markup:!1})})})}}function Hc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(Jo,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:d=>r(d?d.toISOString():"")})})}}}function Gc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-date`;return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(qo,{id:c,value:kn(typeof o=="string"?o:null),onChange:u=>r(u?Pn(u):"")})})}}}function On(e,t,n,o){return{type:"custom",...F({},{...pe,label:e}),render:r=>{const{value:s,onChange:l,id:c,name:u}=r,d="follows"in r,h=r,p=typeof s=="boolean",f=typeof h.follows=="boolean"?h.follows:t,m=p?s:d?f:t,g=`${c??u??e}-label`,b=h.readOnly===!0,S=i(Pe,{checked:m,onChange:l,disabled:b,ariaLabelledBy:g});return i(_,{label:a(e),labelId:g,icon:n,hint:o===void 0?void 0:a(o),action:d?k(L,{children:[i(x,{words:y()?.panel,label:a(e),changed:p,detail:h.followsNoView?a(f?"On":"Off"):M(w=>a(w),a(f?"On":"Off"),h.followsView),disabled:b,onReset:()=>l(void 0)}),S]}):S})}}}function Mc(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(Js,{label:"Background",icon:i(wo,{}),id:r,value:e,shown:xo(e),onChange:t})}}}function Wc(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(se,{label:a(e),icon:n,value:o||t,onChange:r})}}function Js({label:e,icon:t,id:n,value:o,shown:r,onChange:s}){const{colors:l,n:c}=et(),u=Le(o),d=u?le(u,l,c):null;return i(se,{label:a(e),icon:t,id:n,value:d?d.hex:r,caption:d?.words,onChange:s,choices:Qe(u??"",l,c,s)})}function Uc(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(Zs,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Qe(e,t,n,o){const r=Ne(e);return ir(t,n).map(s=>({label:s.label,color:s.value,selected:r===s.name,onPick:()=>o(s.name)}))}function Zs({value:e,onChange:t,twin:n}){const{colors:o,n:r}=et(),s=o.background,l=K(s.toUpperCase(),a("Theme {n} background",{n:r})),[c,u]=T(Oo),[d]=T(Eo),h=typeof d=="string"&&d.trim()!=="",p=Ot(c),f=oe=>u(Ot(oe)||void 0),m=Ne(e),g=m?le(m,o,r):null,b=Qe(e,o,r,t),S=n?()=>t(void 0):()=>t("");let w=s,C=l;if(n){const oe=Ne(n.follows),we=Ro(n.follows),Se=oe?le(oe,o,r):we?{hex:we,words:we.toUpperCase()}:null;w=Se?.hex??s,C=M(Rn=>a(Rn),Se?Se.words:l,n.view)}const v=!n&&(To(e)||h)?i(Qs,{value:p,onChange:f}):null;return g?i(se,{label:a("Fill"),icon:i(Ee,{}),value:g.hex,caption:g.words,onChange:t,changed:!0,onReset:S,resetTo:C,choices:b,children:v}):i(Ft,{label:a("Fill"),icon:i(Ee,{}),value:e,inherited:w,resetTo:C,onChange:t,onReset:S,choices:b,children:v})}function Qs({value:e,onChange:t}){return de({options:Io.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:a("Fill")})}function el(e,t,n){if((e?.content??[]).some(l=>l?.props?.id===t))return ce(n);const r=ko(e,t);if(r.length===0)return null;const s=ce(tn(n));if(s!==null)return s;for(let l=r.length-1;l>0;l-=1){const c=ce(tn(r[l].sectionAccent));if(c!==null)return c}return ce(r[0].sectionAccent)}function et(){const e=qt(G().theme),[t]=T("sectionAccent");let n=null;try{const{appState:r,selectedItem:s}=re(c=>c),l=s?.props?.id?String(s.props.id):void 0;n=l?el(r?.data,l,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:ii(e.themes[o]),n:o+1}}function Kc(){return dn()}const Xc={top:i(po,{}),right:i(uo,{}),bottom:i(ao,{}),left:i(co,{})};function $c(e,t,n,o,r,s,l){const c=p=>t.find(f=>f.value===p),u=p=>({value:p,label:"",disabled:!0,title:o}),d=p=>{const f=t.find(g=>g.cell===p);if(!f)return u(`missing-${p}`);const m=s?.[p];return m?{value:f.value,label:f.label,icon:m}:{value:f.value,label:f.label}},h=[u("corner-top-left"),d("top"),u("corner-top-right"),d("left"),u("centre"),d("right"),u("corner-bottom-left"),d("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:f})=>{const m=t.some(g=>g.value===p)?p:n;return i(_,{label:a(e),icon:r,value:c(m)?.label?a(c(m).label):l?a(l):"",children:Li(a,{label:e,value:m,onChange:f,points:h})})}}}function Vc(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:s})=>i(Cr,{label:e,options:(s.options??t).map(l=>({...l,label:a(l.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:a(n)}:{}})}}function jc(e,t,n,o){return{type:"custom",options:t,fallback:n,...F({},{type:"select",label:e}),render:({value:r,onChange:s,field:l})=>i(xr,{label:e,options:(l.options??t).map(c=>({...c,label:a(c.label)})),fallback:l.fallback??n,value:r,onChange:s,placeholder:o===void 0?void 0:a(o)})}}function Yc(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const zc=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function qc(e,t,n){const o=Object.keys(it).map(r=>({label:it[r],value:r,picture:n[r]}));return{type:"custom",...F({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(nl,{label:e,icon:t,options:o,onChange:r})}}function tl(e,t,n){const o=Ln(e,t,n);if(o!==void 0)return o==="save-makes-frame"?a("A frame is made from this video when you save the page."):o==="starts-dark"?a("This video starts dark, so no frame was made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="outside"?a("This video is on another website, so no frame can be made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="unsupported"?a("This video's file type gives no frame. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="failed"?a("No frame could be made from this video. It is tried again the next time you save the page. The slide shows its background colour while the video loads."):o==="image-no-frame"?a("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=Fn(e);return r==="frame-missing-image"?a("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?a("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?a("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?a("No image yet. The slide shows its background colour until you choose one."):void 0}function nl({label:e,icon:t,options:n,onChange:o}){const r=B(),s=r?.values??{},l=An(s),c=ot(Dn),u=Bn(c?.docId??null);let d=null;try{d=re(p=>p.appState.data)}catch{d=null}const h=vn(r?.id,d,u);return i(_,{label:a(e),icon:z(t),hint:tl(s,h,c?.hasUnsavedEdits??!1),children:de({options:n,value:l,onChange:o,ariaLabel:e})})}function Jc(e,t,n,o={}){const r={type:"custom",[ct]:!0,render:({value:s,onChange:l,name:c})=>i(_r,{value:s||"",onChange:l,fieldKey:c,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?E("each",r):r}const Zc={HeroSingle:["imageFocal"],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function ol(e){const t=a(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function Qc({value:e,onChange:t,label:n}){const o=e||{},r=B(),s=r?r.values!==r.node.props:!0,l=!!o.pending&&s,c=!!o.pending&&!s,u=!!Pi(Ni()).geocode,d=rt(),h=(p,f)=>t({...o,[p]:f??void 0});return k(L,{children:[i(_,{label:a(n),icon:i(wt,{}),action:u?i(ke,{content:a("Find from the address (OpenStreetMap)"),children:i(Lt,{"aria-label":a("Find from the address"),"aria-busy":l||void 0,disabled:l,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(So,{})})}):void 0,children:u&&o.status?i(no,{compact:!0,oneLine:!0,spaced:!1,status:l?"busy":o.ok&&!c?"found":"notfound",statusText:l?a("Finding…"):c?a(rr):a(o.status),hint:ol(o)}):null}),i(_,{label:a("Enter by hand"),labelId:d,icon:i(fo,{}),action:i(Pe,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:d})}),o.manual&&i(_,{label:a("Latitude, longitude"),icon:i(wt,{}),children:k("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(At,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>h("lat",p),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(At,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>h("lng",p),min:-180,max:180,step:1e-4,placeholder:a("Longitude")})]})})]})}function rl(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function il(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 eu(e,t){return e===null?null:t>e?e:null}function sl(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 tu={label:"Ticker items",icon:i(bo,{})};function nu(e,t,n,o){return{type:"custom",[N]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...F({},{...an.textList,label:e}),render:({value:r,onChange:s})=>i(ll,{label:e,icon:z(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function ll({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const l=J(null),[c,u]=Z(null),d=p=>p.map(f=>({text:f?.text??""})),h=p=>{const f=sl(n,p,c);f===null&&(l.current=null),u(f),r(d(p))};return i(Mo,{label:a(e),icon:t,noun:a("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?i(vt,{target:l,value:rl(n,c),onChange:p=>r(il(n,c??-1,p)),disabled:c===null,label:c===null?a("Formatting — click a row first"):a("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,f,m)=>i("input",{type:"text",className:s&&c===f?"sf-list-marking":void 0,value:p?.text??"",placeholder:a(o),"aria-label":a("{label} {n}",{label:a(e),n:f+1}),onChange:g=>m({text:g.target.value}),onFocus:g=>{l.current=g.currentTarget,u(f)}})})}function ou(e,t){const n=`${e.label} — row ${t+1}`;return $({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(X,{value:o,onChange:r,label:a("{label} — row {n}",{label:a(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function ru(e){return{_gCards:R("Cards"),coverIndex:W("Cover image",i(go,{}),br,String(wr),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:ss("Image background",pi),cardImage:In()}}function iu(){return{outline:W("Card outline",i(_o,{}),hr,gr),indexBadge:W("Card number",i(mo,{}),fr,mr),showBadge:On("Product badge",!0,i(xt,{noun:"tag"}))}}function su(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...pe,label:be.find(s=>s.id===r).label}),o=r=>F(Ae(tt),n(r));return{_gShowOnCard:R("Show on a card"),[tt]:F({type:"custom",render:()=>i(al,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(tt)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const tt="showCardPrice",be=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function al({rest:e}){const t=I(),n=he(),o=l=>typeof t[l]=="boolean"?t[l]:void 0,r=l=>o(l)??e[l],s=be.some(({id:l})=>o(l)!==void 0&&o(l)!==e[l]);return i(nt,{parts:be,changed:s,shown:r,onPress:(l,c)=>n({[l]:c}),onReset:()=>n(Object.fromEntries(be.map(({id:l})=>[l,void 0])))})}function lu(e,t="display"){const n=j(t);return{[t]:E("desktop",{type:"custom",render:({value:o,onChange:r})=>i(nt,{parts:e,changed:Uo(o),shown:s=>Ko(o,s),onPress:(s,l)=>r(Vo(o,s,l)),onReset:()=>r(void 0)})}),[n]:E("mobile",{type:"custom",render:({value:o,onChange:r})=>i(cl,{parts:e,desktopKey:t,value:o,onChange:r})})}}function nt({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:l}){const c=a("Display");return i(_,{label:c,icon:i(ro,{}),changed:t,action:i(x,{words:y()?.panel,label:c,changed:t,detail:s,onReset:r}),children:i(Wo,{label:c,items:e.map(u=>({id:u.id,label:a(u.label),shown:n(u.id),...l?{disabled:!0,disabledReason:a(l)}:{}})),onChange:o})})}function cl({parts:e,desktopKey:t,value:n,onChange:o}){const r=I()[t];return i(nt,{parts:e,changed:$o(n),shown:s=>Xo(r,n,s),onPress:(s,l)=>o(jo(n,s,l)),onReset:()=>o(dr),detail:a("the same as Desktop")})}function In(e=Mn){return U("Card image",i(gt,{}),A,xe,Wn,A,e,{clear:{hint:A},hint:"Rounds the picture. The card's own corner is in Styles."})}function ul(){return ue(pt,"cardImage")}function au(){return{cardImage:In(pt),...ul()}}function cu(){return qe({sidesKey:"cornerSides",row:Xn,step:Un,useFollowed:()=>A,mark:i(dl,{label:Kn}),hint:a("Rounds the picture. Left alone it stays square.")})}function dl({label:e,changed:t=!1,onReset:n=()=>{}}){return i(x,{words:y()?.panel,label:a(e),changed:t,onReset:n})}function uu(){return{type:"custom",render:({value:e,onChange:t})=>i(ml,{value:typeof e=="string"?e:"",onChange:t})}}const En="own";function du(){const e=[{value:En,label:"Layout's own",picture:sn(Array.from({length:8},()=>[3,1]))},...Object.entries(zn).map(([t,n])=>({value:t,label:n.label,picture:sn([...n.phone,...n.phone])}))];return E("mobile",on("Layout",i(bt,{}),e,En,{columns:2,cell:Wi}))}function pl({layout:e,width:t}){const n=qn(e),o=n?`${n[0]}/${n[1]}`:void 0;return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:o?"auto":6,gridAutoFlow:"row dense",gap:2},children:Jn(e).map(([r,s],l)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${s}`,aspectRatio:o}},l))})}const fl={width:"3.5rem",height:"2.5rem",words:!1},hl=200;function ml({value:e,onChange:t}){const[n,o]=Z(null),[r,s]=Z(4),l=J(null);Nn(()=>{const m=l.current;if(!m||typeof ResizeObserver!="function")return;const g=()=>s(m.getBoundingClientRect().width>=hl?4:3);g();const b=new ResizeObserver(g);return b.observe(m),()=>b.disconnect()},[]);const c=e?Mi(Oe,e):void 0,u=c?e:"",d=ft(n,u),h=ft(n,"").length,p=Zn("no-symbol"),f=[{value:"",label:a("Not chosen"),icon:Hi(p,a("Not chosen"))},...d.map(m=>({value:m,label:a(Oe[m].label),icon:i(pl,{layout:Oe[m],width:40})}))];return i(_,{label:a("Layout"),icon:i(bt,{}),value:c?a(c.label):void 0,children:i("div",{ref:l,style:{flex:"1 1 auto",minWidth:0},children:i(Nt,{label:a("Layout"),value:u,options:f,onChange:t,columns:r,cell:fl,header:k("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:a("Photos in a row")}),i(vo,{options:[{id:"all",label:a("All")},...jn.map(m=>({id:String(m),label:String(m)}))],value:n===null?"all":String(n),ariaLabel:a("Photos in a row"),onChange:m=>o(m==="all"?null:Number(m))}),i("span",{className:"text-2xs text-ink-faint",children:a("{n} of {total} layouts",{n:h,total:Yn.length})})]})})})})}export{Ji as BOUND_TO_POST,ic as BOUND_TO_POST_NOTE,fc as BUCKET_ICONS,Zc as CUSTOM_FIELD_MEDIA,Qc as CoordsField,ln as DESKTOP_GAP_NOT_OVERLAP,nt as DisplayRow,Xc as EDGE_ARROWS,Zo as FOCAL_DEFAULT,Ce as FOLD_FIELD_MARKER,Zi as HIGHLIGHT_HINT,X as HidableTextField,at as LINK_FIELD_MARKER,Ya as Label,ct as MEDIA_FIELD_MARKER,zc as MEDIA_TYPE_OPTIONS,sc as NOT_BOUND_TO_POST,_c as PanelBand,ts as PanelNoteLine,Ls as RowPropsContext,ut as SCAFFOLD_FIELD_MARKER,mu as SCALAR_TEXT_CONTROLS,Ki as SiteGapDefaultReset,q as Slider,os as Swatches,hu as TEXT_CONTROL_KINDS,N as TEXT_FIELD_MARKER,tu as TICKER_ITEMS_ROW,ll as TextListField,Js as ThemeFillRow,me as WIDTH_LABEL,zi as WidthDefaultReset,sl as aimAfterListChange,Dc as anchorFields,K as backTo,Cc as backgroundField,Ec as boxBlockSpacingField,Nc as boxColumnsFields,Uc as boxFillField,Ps as boxPhoneRowField,Rs as boxShareField,Rc as boxSharePhoneField,Tc as boxShareTabletField,el as boxThemeIndexOf,gc as bucketHeader,Oc as buttonWordsEntryField,Is as cardCornersField,ss as cardImageBackgroundField,In as cardImageField,au as cardImageFields,ru as cardMediaFields,Ic as cardShapeFields,su as cardShowFields,iu as cardStyleFields,kc as cellWidthFields,Wc as colorInput,qa as containerDirectionField,Xi as containerGapField,$i as containerGapPhoneField,za as containerGapRows,Vi as containerGapTabletField,ol as coordsResultTip,uc as copyText,fn as cornerSidesField,qe as cornersRowField,pn as cornersUnitFields,Gc as date,Hc as dateTime,bc as designGroupHeader,lu as displayFields,$c as edgePad,Qe as fillSlotChoices,eu as focusAfterRemove,Kc as focusKeptField,wc as foldMarker,ye as foldMetaOf,ns as foldTitleOf,Ws as followedHeightPatch,zs as followedStickPatch,uu as galleryLayoutField,du as galleryLayoutPhoneField,vc as heightFields,ge as heightFollowedBy,Ms as heightLayersAt,Ja as heroGroupPlacementPoints,lt as hidableText,es as hintIsWhileTyping,cu as imageCornersField,rc as inOwnBox,mc as isBucketHeader,dn as keptBy,dc as linkField,tl as loadingRowHint,qc as loadingShowsField,Vc as multiSelect,Mc as pageBackgroundField,hc as panelNote,vs as phoneOverrideField,cc as plainText,pc as plainTextarea,ls as pxField,Sc as quietMarker,st as readHidable,rl as rowText,jc as searchSelect,is as sectionBandChoices,ps as sectionCornersField,xc as sectionShapeFields,yc as sectionThemeFields,il as setRowText,Pc as sizeField,Yc as sourceField,Lc as spacingFields,Bc as stickFields,Ac as swapPadding,lc as text,Hn as textFieldIdentifier,ec as textFieldOffPage,nc as textFieldPanelOnly,nu as textList,ou as textListRowField,ac as textarea,On as toggle,Jc as upload,fe as useLengthRow,he as useSelectedPatch,I as useSelectedProps,T as useSelectedSibling,Ui as useSiteGapDetail,Fc as widthField,oc as withIdentifier,Qa as withOffPage,tc as withPanelOnly,Za as withScaffold};
|
|
1
|
+
"use client";import{jsx as i,jsxs as k,Fragment as F}from"react/jsx-runtime";import{HERO_FOCUS as Nn,HERO_MEDIA_TYPES as Pn}from"../../../format/lib/hero-media-layout.js";import{cloneElement as _e,createContext as kn,useContext as it,useEffect as Fn,useId as st,useRef as J,useState as Z}from"react";import{useEasel as re,useSelectedHost as D}from"efficient-easel/easel";import{PIN_LENGTH as ie,toDateKey as Ln,fromDateKey as An}from"efficient-shell/format";import{say as a,editorEaselWords as y}from"../../../format/lib/editor-words.js";import{finiteNumber as j}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as lt,firstFrameHint as Bn,loadingShowsOf as Dn,loadingStillHint as vn}from"../../../format/lib/hero-video.js";import{pageFramesFor as Hn,usePageVideoFrames as Gn}from"../page-video-frames.js";import{ScreenDocumentContext as Mn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as at,hidableText as ct}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Ce,LINK_FIELD_MARKER as ut,MEDIA_FIELD_MARKER as ye,SCAFFOLD_FIELD_MARKER as dt,TEXT_FIELD_MARKER as N,foldMetaOf as xe,textFieldIdentifier as Wn}from"efficient-easel/draw";import Un from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as pt}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as Kn,CARD_IMAGE_RADIUS_ROW as ft,CARD_IMAGE_RADIUS_STEP as $n,CORNER_RADIUS_MAX as Oe,CORNER_RADIUS_MIN as L}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Xn,IMAGE_CORNERS_LABEL as jn,IMAGE_CORNERS_ROW as Vn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Yn,GRID_MAX_ROW_SPAN as zn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as qn,GALLERY_LAYOUTS as Ee,GALLERY_LAYOUT_KEYS as Jn,GALLERY_PHONE_LAYOUTS as Zn,galleryChoices as ht,galleryLayoutRatio as Qn,galleryPictureCells as eo}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as to}from"./shell-glyph.js";import{anchorSiblingsOf as no,placementPoints as oo}from"../../../format/lib/hero-group-placement.js";import ro from"../../components/AnchorField.js";import io from"../../components/SourceStatus.js";import{AdjustIcon as so,EyeIcon as lo,AnimationIcon as ao,BackgroundIcon as mt,BorderAllIcon as co,BlockSectionIcon as uo,ColumnWidthsIcon as Ie,ColumnsIcon as gt,CornerIcon as bt,DirectionDownIcon as po,DirectionLeftIcon as fo,DirectionRightIcon as ho,DirectionUpIcon as mo,EditIcon as go,GapIcon as bo,GridIcon as wt,GroundIcon as Re,HashIcon as wo,HeightIcon as Te,ImageIcon as So,ListIcon as _o,LocationIcon as St,PaddingBottomIcon as _t,PaddingLeftIcon as Ct,PaddingRightIcon as yt,PaddingTopIcon as Ne,PageIcon as Co,StickyIcon as xt,SearchIcon as yo,SquareIcon as xo,TypeIcon as Oo,WidthIcon as Eo}from"efficient-easel/icons";import{FieldGlyph as Ot}from"../../components/FieldGlyph.js";import{resolvePageBackground as Io}from"../../../format/lib/content/page-background.js";import{BOX_FILL_FADE_PROP as Ro,BOX_FILL_FADES as To,BOX_SWATCH_PROP as No,boxFillFadeOf as Et,boxFillOf as Po,boxFillSlot as Pe,boxPaintOf as ko}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as It,CORNER_SIDE_POINTS as Fo,SECTION_CORNERS_ROW as Rt,hasOwnSectionCorners as Lo,normalizeCornerSides as Tt}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as Nt}from"../../../format/lib/content/card-corners.js";import{enclosingPath as Ao,enclosingSection as Bo}from"./enclosing-section.js";import{SettingsDefaultReset as x,SettingsDrill as Do,SettingsField as _,SettingsGroup as vo,SettingsSegmented as Ho,SettingsBorder as Go,SettingsSidesEach as Mo,SettingsSwitch as ke,borderSides as Wo,borderStartEach as Uo}from"efficient-easel/panel";import{ListField as Ko}from"efficient-easel/fields";import{DisplayChips as $o}from"efficient-shell/ui";import{desktopDisplayChanged as Xo,partShownOnDesktop as jo,partShownOnPhone as Vo,phoneDisplayChanged as Yo,withDesktopPart as zo,withPhonePart as qo}from"../../../format/lib/content/part-display.js";import{ColorSwatch as Jo,CornersInput as Zo,DatePicker as Qo,DateTimePicker as er,FOCAL_DEFAULT as tr,IconPicker as Pt,COLUMN_COUNT_MAX as kt,COLUMN_SHARE_MIN as nr,COLUMN_SHARES_EQUAL as or,resolveColumnShares as Ft,WidthsBar as rr,useShellStrings as ir,IconButton as Lt,InputNumber as At,Slider as sr,Tooltip as Fe}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as lr}from"./geocode-resolve.js";import{ColourRow as se,InheritedColourRow as Bt}from"./ColourControl.js";import{fillThemeColors as ar,slotFill as le}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as Le}from"../../../format/lib/document/part-inks.js";import{keptByRow as Ae}from"efficient-easel/screen/lib/document/style-fields";import Dt from"./MarkupToolbar.js";import{deviceField as I}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as cr,NoControlMark as ur,noControlField as vt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as dr}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as pr,PANEL_ONLY_FIELD as fr}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as hr,resolvePhoneValue as Be}from"../../../format/lib/document/phone-override.js";import{phoneKey as V,tabletKey as De,viewKeyAt as ve}from"efficient-easel/draw";import{viewKey as O}from"../../../format/lib/animation/views.js";import{viewRows as v}from"../animation/view-rows.js";import{SuppressibleText as mr}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as gr,CARD_OUTLINE_OPTIONS as br,DEFAULT_CARD_INDEX_FORMAT as wr,DEFAULT_CARD_OUTLINE as Sr}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as _r,DEFAULT_COVER_INDEX as Cr}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as yr}from"efficient-easel/draw";import xr from"../../components/MediaUploadField.js";import Or from"../../components/MultiSelectField.js";import Er from"../../components/SectionThemePicker.js";import Ir from"../../components/SearchSelectField.js";import Rr from"../../components/StorefrontLinkField.js";import{UiIcon as Ht}from"efficient-easel/draw/client";import{SECTION_PADDING as P}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Tr}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Nr}from"efficient-easel/draw/client";import{encodePartId as Pr}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as kr,useEaselStrings as Fr}from"efficient-easel/strings";import{hasPhoneHeight as Lr,hasTabletHeight as He,resolveSectionMinHeight as Ar,resolveTabletHeight as Br}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as Dr,SECTION_PIN_ABOVE_HINT as vr,SECTION_PIN_ABOVE_KEY as Hr,SECTION_PIN_ABOVE_LABEL as Gr,SECTION_PIN_GROUP as Mr,SECTION_PIN_LABEL as Gt,SECTION_PIN_SCREENS_KEY as Ge,SECTION_PIN_SCREENS_LABEL as Mt,SECTION_PIN_STOP_DEFAULT as Wr,SECTION_PIN_STOP_HINT as Ur,SECTION_PIN_STOP_KEY as Kr,SECTION_PIN_STOP_LABEL as $r,SECTION_PIN_STOP_OPTIONS as Xr,SECTION_STICK_DISTANCE as H,SECTION_STICK_DISTANCE_ROW as Me,SOME_VIEW_PINS as Wt,hasPhoneStick as jr,hasTabletStick as Vr,resolveSectionStick as ae,sectionPinStopOf as Yr,sectionPinStopWrite as zr}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as qr}from"../../../format/lib/content/css-length.js";import{SECTION_HEIGHT_MODES as Jr,SECTION_MIN_HEIGHT as Zr,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as Qr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as ei,resolveContainerDirection as Ut}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as ti,BOX_BLOCK_SPACING_POINTS as Kt,BOX_PHONE_ROW_LABEL as $t,BOX_COLUMNS_MAX as ni,BOX_COLUMNS_MIN as Xt,BOX_PHONE_ROW_MAX as oi,BOX_PHONE_ROW_MIN as We,BOX_SHARE_CHOICES as jt,BOX_SHARE_LABEL as Y,boxShareChoiceOf as Vt,boxShareWidthsOf as Ue,BOX_SHARE_PHONE_DEFAULT as ri,BOX_SHARE_PHONE_POINTS as ii}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as G}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Yt,BORDER_SIDES as si,SECTION_BORDER_ROW as zt,borderBySide as qt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as li,normalizeTheme as Jt,normalizeThemeColors as ai,sectionBandTone as ci,surfaceTwoTone as ui}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Zt,CONTAINER_GAP_BUILT_IN as di,CONTAINER_GAP_PHONE as Ke,GAP_FIELD_CONTAINER as $e,followsSitePhoneGap as pi,hasOwnContainerGap as fi,hasOwnPhoneGap as Xe,resolveContainerGap as Qt,resolvePhoneContainerGap as en}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as hi,CARD_IMAGE_BG_OFF as mi,CARD_IMAGE_BG_SWATCH_NAMES as gi,CARD_IMAGE_BG_SWATCHES as bi,isCardImageBackgroundInheriting as wi,cardImageBackgroundChoice as Si,THEME_CARD_IMAGE_BG as _i}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Ci,SECTION_BG_NO_FILL as yi,sectionBackgroundChoice as xi,THEME_SECTION_BG as je,isSectionBackgroundEmpty as Oi,sectionBackgroundHex as tn}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Ei,nestedAccentValue as nn,resolveSectionAccent as ce}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Ii,TYPE_SIZE_INHERIT as Ri,isTypeSizeInheriting as Ti}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Ni,WIDTH_CHOICE_LABEL as Pi,WIDTH_INHERIT as ki}from"../../../format/lib/content/section-width.js";import{useEaselSession as Fi}from"efficient-easel/screen/lib/session-context";import{backendOf as Li}from"../website-session.js";import{BOX_GAP as Ai,describedAs as A,group as R,iconOf as z,sharedStyleKinds as ee}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as on,onDesktopWords as M,phoneTwinFields as Ve,saidAlignmentGrid as Bi,useLengthUnit as Di}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as vi,PICTURE_PICKER_ROW as Hi,directionField as Gi,gapField as Ye,iconPickerRow as rn,lengthUnitFields as ue,pickerCellIcon as Mi,pickerNoneIcon as Wi,Segmented as de,select as W,slider as U}from"./box-fields.js";import{VIEW_ABOVE as ze}from"efficient-easel/screen/lib/content/length-units";import{tierOfView as sn,viewOfTier as Ui}from"../../../format/lib/content/view-tier.js";import{ownEntry as Ki}from"../../../format/lib/own-entry.js";import{LAYOUT_CELL as $i,galleryPhonePicture as ln}from"./choice-pictures.js";function Qa({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function K(e,t){return a("{value} from {from}",{value:e,from:t})}function Xi(){const{blockGap:e}=G();return e===null?a("this container's own spacing"):K(`${e}px`,a("Styles"))}function ji({inherited:e,onReset:t,label:n}){return i(x,{words:y()?.panel,label:a(n),changed:!e,detail:Xi(),onReset:t})}function Vi(e){return Ye({...Ai,builtIn:di[e],resolve:(t,n)=>Qt(e,t,n?.siteGap),action:(t,n)=>i(ji,{inherited:!fi(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[$e]:e}})}function Yi(e){return pt(I("mobile",{[$e]:e,type:"custom",render:t=>i(Ji,{container:e,...t})}),an)}function zi(e){return pt(I("tablet",{[$e]:e,type:"custom",render:t=>i(qi,{container:e,...t})}),an)}const an={not:{field:"gap",in:Array.from({length:-Zt.min},(e,t)=>Zt.min+t)}};function ec(e){return{gap:I("desktop",Vi(e)),[De("gap")]:zi(e),[V("gap")]:Yi(e)}}function qi({container:e,...t}){const[n]=T("gap"),{siteGap:o}=t.field??{},r=Math.max(Ke.min,Qt(e,n,o));return Ye({...Ke,builtIn:r,resolve:s=>Xe(s)?s:r,action:(s,c)=>i(x,{words:y()?.panel,label:a("Gap"),changed:Xe(s),detail:M(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function Ji({container:e,...t}){const[n]=T("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},l=en(e,void 0,n,o,r);return Ye({...Ke,builtIn:l,resolve:c=>en(e,c,n,o,r),action:(c,u)=>i(x,{words:y()?.panel,label:a("Gap"),changed:Xe(c),detail:K(`${l}px`,pi(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function tc(e){return Gi({offered:ei(e),fallback:Ut(e,void 0),resolve:t=>Ut(e,t)})}function nc(e,t){return oo(t?no(e,t):[],t)}function Zi({inherited:e,onReset:t,label:n}){return i(x,{words:y()?.panel,label:a(n),changed:!e,detail:K(a("Full"),a("the page")),onReset:t})}function $({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:l,hideable:s=!0,markup:c=!0}){const{text:u,hidden:d}=at(e),h=J(null),p=J(null),f=C=>t(s?{text:C,hidden:d}:C),m=()=>t({text:u,hidden:!d}),g=s&&d,b=st(),S=r?os(r)?i("span",{className:"sf-hint-while-typing",children:a(r)}):a(r):void 0,w=d?a("Show {label} on the slide",{label:a(n)}):a("Hide {label} on the slide",{label:a(n)});return i(_,{label:a(n),icon:i(Oo,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:S,action:s?i(Fe,{content:w,children:i(Lt,{"aria-pressed":d,"aria-label":w,onClick:m,children:d?i(Ht,{name:"eye-off",size:14}):i(Ht,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[c&&i(Dt,{target:l?p:h,value:u,onChange:f}),l?i("textarea",{id:b,ref:p,value:u,placeholder:o===void 0?void 0:a(o),onChange:C=>f(C.target.value)}):i("input",{id:b,ref:h,type:"text",value:u,placeholder:o===void 0?void 0:a(o),onChange:C=>f(C.target.value)})]})})}function oc(e,t){return{...e,[dt]:t}}function rc(e){const t=e[N];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[N]:{...t,offPage:!0}}}function ic(e){return!e||typeof e!="object"?!1:e[N]?.offPage===!0}function sc(e){if(!e[N])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[fr]:!0}}function lc(e){return pr(e)}function ac(e){const t=e[N];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[N]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as _u,SCALAR_TEXT_CONTROLS as Cu}from"efficient-easel/draw";function cc(e,t){if(!e[N])throw new Error("inOwnBox: the field holds no authored text");const{[cr]:o,...r}=e;return{...r,[dr]:!0,render:t}}const Qi=new Set(yr),pe={type:"radio",options:[{value:!0},{value:!1}]},cn={text:{type:"object",objectFields:{text:{type:"text"},hidden:pe}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:pe}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},X=(e,t)=>{const n=A({...t,[N]:e},{...cn[e.control],label:e.label});if(!Qi.has(e.control))return n;const o=t.render;return{...vt(n,"authored-copy"),render:r=>i(mr,{name:r.name,children:o(r)})}},uc="Everything else on this block comes from the linked post. Unlink it to edit by hand.",es={field:"source.slug",set:!0},dc={not:es},ts="Select a word, then press the highlighter.",ns=new Set([ts]),os=e=>ns.has(e);function pc(e,t,n){return X({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i($,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function fc(e,t,n){return X({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i($,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function hc(e,t,n){return X({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i($,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function mc(e,t,n){return X({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i($,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function gc(e){return{type:"custom",[ut]:{label:e},...A({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(Rr,{value:ct(t),onChange:n,label:e})}}function bc(e,t,n){return X({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i($,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const wc={Design:so,Animation:ao};function Sc(e,t){return{type:"custom",render:()=>i(rs,{text:e,values:t})}}function rs({text:e,values:t}){return i("p",{className:"sf-note",children:a(e,t)})}function _c(e){return xe(e)!==null&&e?.tabs!==void 0}const un=new Map;function Cc(e,t){const n=`${e}\0${t?t.join(""):""}`,o=un.get(n)??{type:"custom",tabs:t,[Ce]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(F,{})};return un.set(n,o),o}const dn=new Map;function yc(e){const t=dn.get(e)??{type:"custom",[Ce]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(F,{})};return dn.set(e,t),t}function is(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function xc(e,t){return is(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(F,{})}}function Oc(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(F,{})}}function Ec({title:e,children:t}){const[n,o]=Z(()=>!qe.has(e));return i(vo,{title:e,open:n,onToggle:r=>{o(r),r?qe.delete(e):qe.add(e)},children:t})}const qe=new Set;function ss({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),l=r?o?.[r]:void 0,s=l?a(l):t;return k("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?a(o[c]):c;return i(Fe,{content:u,children:i(Jo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:s})]})}function Ic(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(ls,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function ls({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const l=typeof o=="string"?o:void 0,{colors:s,n:c}=tt(),u={background:s.background,surface:s.surface,surface2:ui(s),band:ci(s)},d=n?je:t,h=Oi(l,t,d),p=tn(void 0,d,u),f=n?Ci:void 0,m=d===je?a("the theme's section background"):a("Theme {n} background",{n:c}),g=as(l,t,s,c,u,r),b=K(p.toUpperCase(),m),S=Le(l),w=S?le(S,s,c):null;return w?i(se,{label:a(e),icon:i(mt,{}),value:w.hex,caption:w.words,onChange:r,changed:!0,onReset:()=>r(f),resetTo:b,choices:g}):i(Bt,{label:a(e),icon:i(mt,{}),value:h?"":tn(l,t,u),inherited:p,resetTo:b,onChange:r,onReset:()=>r(f),choices:g})}function as(e,t,n,o,r,l){const s=xi(e,t);return[{label:a("No fill"),color:"",selected:s==="none",onPick:()=>l(yi)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:s==="band",onPick:()=>l(je)},...et(Le(e)??"",n,o,l)]}function cs(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,l=wi(r,t);return i(_,{label:a(e),icon:i(Re,{}),changed:!l,action:i(x,{words:y()?.panel,label:a(e),changed:!l,detail:a("the theme's image stage"),onReset:()=>o(hi)}),children:ss({swatches:bi,current:l?_i:Si(r,t),onPick:o,names:gi})})}}}function Rc(e=n=>n,t){return ee({_gSectionTheme:R(Ei),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(Er,{value:e(n),onChange:o,followLabel:t})}})}function fe(e){const t=E(),n=sn(e?.view),o=s=>ve(e.valueKey,s),r=e.numbersIn??(s=>j(t[o(s)])!==void 0),l=e.followsView??Os(n,r);return Di({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:vi,label:a(e.label),grid:e.grid,hasOwn:r(n),view:{tier:n,numbersIn:r,followsView:l},convertTo:e.convertTo??(s=>{const c=j(t[o(n)]);return c===void 0?{}:{[o(n)]:s(c)}})})}function q({min:e,max:t,step:n,value:o,onChange:r,suffix:l="",readout:s=!0,notch:c,ariaLabel:u,disabled:d=!1,placeholder:h,placeholderWord:p,onClear:f,units:m}){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(sr,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...p?{emptyLabel:a(p)}:{},suffix:l||void 0,...m?{units:m}:{},showInput:s,label:u===void 0?void 0:a(u),disabled:d,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:b=>{b===null?f?.():b!==o&&r(b)}})})}function us(e,t){const{min:n,max:o,step:r=1,unsetLabel:l,hint:s,restTrack:c,unsetMark:u,icon:d,unit:h="px"}=t;return{type:"custom",render:({value:p,onChange:f})=>{const m=typeof p=="number"?p:null,g=m===null;return i(_,{label:a(e),icon:d?z(d):void 0,value:g?u||l===void 0?void 0:a(l):`${m}${h}`,changed:!g,action:u?_e(u,{changed:!g,onReset:()=>f(null)}):i(x,{words:y()?.panel,label:a(e),changed:!g,onReset:()=>f(null)}),hint:typeof s=="string"?a(s):s,children:c?c({min:n,max:o,step:r,px:m,label:e,onChange:f}):q({min:n,max:o,step:r,value:m??n,readout:!1,ariaLabel:e,onChange:f})})}}}const te="Corners",ds={kind:"radius"};function Je(e){return{type:"custom",render:t=>{const{value:n,onChange:o}=t,r=typeof n=="number"&&Number.isFinite(n)?n:null,l=r!==null;return i(_,{label:a(te),icon:i(bt,{}),changed:l,action:_e(e.mark,{changed:l,onReset:()=>o(null)}),hint:e.hint,children:i(ps,{tier:e,px:r,name:t.name,onRadius:o})})}}}function T(e){const t=D();return[t?.values?.[e],n=>t?.onChange(e,n)]}function pn(){return vt({type:"custom",render:()=>i(ur,{})},"always")}function he(){const e=D();return t=>e?.onChangeMany(t)}function ps({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[l,s]=T(e.sidesKey),c=he(),u=fe({row:e.row??ds,label:te,grid:{min:L,max:Oe,step:e.step??1},valueKey:n??"",view:"desktop"}),d=Tt(l)??[...It];return i(Zo,{label:a(te),value:d,corners:Fo,onChange:h=>{const p=Tt(h)??[];s(p.length===It.length?null:p)},radius:t,onRadiusChange:u&&n?h=>c({[n]:h,...u.unitPatch(h===null)}):o,radiusMin:u?.grid.min??L,radiusMax:u?.grid.max??Oe,radiusStep:u?.grid.step??e.step??1,radiusPlaceholder:u&&u.unit!=="px"?"–":String(r),...u?{radiusUnit:u.unit,units:u.units}:{}})}function fn(e,t){return ue(e,t)}function hn(){return pn()}function fs({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=G(),r=typeof o=="number"?`${o}px`:a("not set");return i(x,{words:y()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):K(r,a("Styles")),onReset:n})}function hs(){const{cornerRadiusPx:e}=G();return typeof e=="number"?e:L}function ms(){return Je({sidesKey:"sectionCornerSides",row:Rt,useFollowed:hs,mark:i(fs,{label:te}),hint:gs})}const gs="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function Tc(){return ee({_gShape:R("Shape"),sectionCorners:ms(),...fn(Rt,"sectionCorners"),sectionCornerSides:hn(),...v("sectionBorder",xs),...ue(zt,"sectionBorder",{tablet:!0,phone:!0})})}const bs=()=>({width:a("Border width"),sides:{top:a("Border top"),right:a("Border right"),bottom:a("Border bottom"),left:a("Border left")},style:a("Border style"),styles:{solid:a("Solid"),dashed:a("Dashed"),dotted:a("Dotted")},color:a("Border color"),unit:"px"});function ws(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Ss(){let e;try{const t=Jt(G().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||li.line}function _s({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:l=!0,above:s={},length:c}){const u=e&&typeof e=="object"?e:{},[d,h]=Z(()=>r?Uo(u,s):!1),p=bs(),f=m=>ws(r&&l?m:{width:m.width,color:m.color,...l?{style:m.style}:{}});return i(_,{label:a("Border"),icon:i(co,{}),action:r?i(Mo,{each:d,label:a("Each side"),onChange:h}):void 0,children:i(Go,{label:a("Border"),value:u,each:d,onChange:m=>t(f(m)),placeholder:n,presets:o,words:c?{...p,unit:c.unit}:p,styles:l,max:c?.grid.max??Yt,...c?{step:c.grid.step,units:c.units}:{}})})}function Cs({value:e,onChange:t,view:n}){const[o]=T("sectionBorder"),[r]=T(De("sectionBorder")),l=Ss(),s=f=>f&&typeof f=="object"?f:{},c=n==="phone"?{...qt(s(o)),...qt(s(r))}:n==="tablet"?s(o):{},u=E(),d=he(),h=O("sectionBorder",n),p=fe({row:zt,label:"Border",grid:{min:0,max:Yt,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>Ze(u[ve("sectionBorder",f)]),convertTo:f=>{const m=s(u[h]);return Ze(m)?{[h]:ys(m,f)}:{}}});return i(_s,{value:e,length:p,onChange:p?f=>d({[h]:f,...p.unitPatch(!Ze(f))}):t,placeholder:{sides:Wo(c),style:c.style??"solid",color:c.color||l},presets:[l],above:c})}const mn=["width",...si];function Ze(e){if(!e||typeof e!="object")return!1;const t=e;return mn.some(n=>j(t[n])!==void 0)}function ys(e,t){const n={...e};for(const o of mn){const r=j(n[o]);r!==void 0&&(n[o]=t(r))}return n}function xs(e){return{type:"custom",render:({value:t,onChange:n})=>i(Cs,{value:t,onChange:n,view:e})}}function Os(e,t){let n=ze[e];for(;n&&ze[n]!==null&&!t(n);)n=ze[n];return n??e}function Nc(e){return{type:"custom",render:()=>i(Es,{partKey:e})}}function Es({partKey:e}){const[t]=T("id"),[n]=T("_partStyles"),{textStyles:o}=G(),r=Fr();let l=null;try{l=Nr().select}catch{l=null}const s=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(Do,{name:a("Text"),preview:Tr(s,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??kr.copy.panel).cases}),onOpen:()=>{l&&typeof t=="string"&&l(Pr(t,e))}})}function gn(e){const{cornerRadiusPx:t}=G(),n=typeof t=="number"?t:e;let o=null;try{const{appState:l,selectedItem:s}=re(u=>u),c=s?.props?.id?String(s.props.id):void 0;o=c?Bo(l?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Lo(r)?r:n}function Is({label:e,changed:t=!1,onReset:n=()=>{}}){const o=gn(L);return i(x,{words:y()?.panel,label:a(e),changed:t,detail:K(`${o}px`,a("the section")),onReset:n})}function Rs(){return i(F,{children:a("Follows the section's Corners until you set a number here.")})}function Ts(){return Je({sidesKey:"cardCornerSides",row:Nt,useFollowed:()=>gn(L),mark:i(Is,{label:te}),hint:i(Rs,{})})}function Ns(){return{type:"custom",render:()=>i(Un,{})}}function Pc(){return{_gShape:R("Shape"),cardCorners:Ts(),...fn(Nt,"cardCorners"),cardCornerSides:hn(),cardCornersApplyAll:Ns()}}function Ps(){return A({type:"custom",[Hi]:!0,render:e=>i(Fs,{...e})},{type:"select",label:Y,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 ks(e,t){const n=Vt(e);if(n!=="custom")return a(jt.find(r=>r.value===n)?.label??"");const o=Ft(Ue(e,t),t);return o?[...o,100-o.reduce((r,l)=>r+l,0)].join(" / "):a("Custom")}function Fs(e){const{value:t,onChange:n}=e,[o]=T("content"),r=Array.isArray(o)?o.length:0,l="follows"in e,s=t!=null,c=s?t:l?e.follows:void 0,u=Vt(c),d=r>=2&&r<=kt,h=()=>[...or[r]??[]],p=J(null),f=w=>{const C=p.current;C&&JSON.stringify(w)===JSON.stringify(C.shares)?n(C.value):w&&n(w)},m=w=>{w===u||w==="custom"&&!d||n(w==="custom"?h():w)},g=a("The width bar works for 2 to {count} blocks.",{count:kt}),b=s&&(l||t!=="content"),S=ir().widths.hint(r,nr);return i(_,{label:a(Y),icon:i(Ie,{}),changed:b,hint:u!=="custom"?void 0:d?S:g,action:i(x,{words:y()?.panel,label:a(Y),changed:b,disabled:e.readOnly===!0,detail:l?M(w=>a(w),ks(e.follows,r),e.followsView):a("Fit content"),onReset:()=>n(void 0)}),children:k("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(Pt,{label:a(Y),value:u,options:jt.map(w=>({value:w.value,label:w.value==="custom"&&!d?g:a(w.label),icon:Mi(i("span",{className:"sf-gallery-pic sf-share-pic",children:bn(w.weights).map((C,B)=>i("i",{style:{gridColumn:`span ${C}`}},B))}),a(w.label),w.value==="custom"&&!d?g:a(w.label))})),onChange:m,columns:3,cell:wn,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&d?i("div",{onFocus:()=>{p.current={value:t,shares:Ft(Ue(c,r),r)}},onBlur:()=>{p.current=null},children:i(rr,{label:a(Y),count:r,value:Ue(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function bn(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 kc(){return W(ti,i(bo,{}),Kt,Kt[0].value)}function Fc(){return I("mobile",rn(Y,i(Ie,{}),ii.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:bn(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),ri,{columns:2,cell:wn}))}const wn={width:"5.75rem",height:"3.25rem",words:!0};function Lc(){return Ve("share",Ps(),on)[De("share")]}function Ls(){return I("mobile",U($t,i(gt,{}),We,oi,1,We,"",{clear:{phoneFollows:!1,hint:We}}))}const Sn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Ac(){const e=U($t,i(gt,{}),Xt,ni,1,Xt,"",{clear:{emptyLabel:"Auto"}}),t=Ve("columns",e,{...Sn,tablet:on.tablet}),n=Ve("columns",e,Sn,{phoneRow:Ls()});return{...t,phoneRow:n.phoneRow}}function Bc(e,t,n,o,r,l,s){return{type:"custom",render:({value:c,onChange:u,name:d})=>i(As,{label:e,min:t,max:n,step:o,fallback:r,role:l,value:c,onChange:u,name:d??"",length:s})}}function As({label:e,min:t,max:n,step:o,fallback:r,role:l,value:s,onChange:c,name:u,length:d}){const h=E(),p=he(),f=sn(d?.view),m=fe({row:d?.row??{kind:"fontSize"},label:e,grid:{min:t,max:n,step:o},valueKey:d?u:"",view:d?.view??"desktop",numbersIn:b=>b===f&&typeof h[u]=="number",followsView:f,convertTo:b=>typeof h[u]=="number"?{[u]:b(h[u])}:{}}),g=b=>m?p({[u]:b,...m.unitPatch(typeof b!="number")}):c(b);return i(_,{label:a(e),icon:i(Ot,{noun:l}),action:i(x,{words:y()?.panel,label:a(e),changed:!Ti(s),detail:a("the Text style in Styles"),onReset:()=>g(Ri),defaultAction:{onPress:()=>g(Ii),title:a("Keep this section's own built-in size"),icon:i(uo,{})}}),children:q({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof s=="number"?s:r,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:g})})}function _n(e,t,n){return[{label:"Auto",value:""},...Array.from({length:e},(o,r)=>({label:r===0?`1 ${t}`:`${r+1} ${n}`,value:String(r+1)}))]}function Dc(){return{_gCellWidth:R("Cell size"),gridSpan:W("Positions",i(Ie,{}),_n(Yn,"position","positions"),""),gridRowSpan:W("Rows tall",i(Te,{}),_n(zn,"row","rows"),"")}}function E(){let e=null,t=null;try{e=it(Bs),t=re(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Bs=kn(null);function Ds({min:e,max:t,step:n,px:o,label:r,onChange:l,desktopKey:s,fallback:c}){const u=E()[s],d=Be(void 0,u,c);return i(F,{children:q({min:e,max:t,step:n,value:Be(o,u,c),readout:!1,ariaLabel:r,notch:d,onChange:l})})}function vs({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:l=()=>{}}){const s=E()[t],c=Be(void 0,s,n);return i(x,{words:y()?.panel,label:a(e),changed:r,detail:M(u=>a(u),`${c}${o}`),onReset:l})}function Hs(e){return us(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(vs,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Ds,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Gs={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Ms={Top:Ne,Bottom:_t,Left:Ct,Right:yt},Ws=e=>{const t=Ms[e];return i(t,{})};function vc(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>Gs[S],l=S=>U(r("Top"),i(Ne,{}),P.min,P.max,P.step,S,"px"),s=(S,w,C,B=P)=>I("mobile",Hs({label:r(S),icon:Ws(S),desktopKey:w,min:B.min,max:B.max,step:B.step,fallback:C})),c=e.top??P.min,u=e.bottom??P.min,d="sectionPaddingLeft",h="sectionPaddingRight",p=e.sideBounds??P,f=e.side??p.min,m=e.sidePhone??f,g=e.phone===!0,b=S=>g?I("desktop",S):S;return ee({...o?{_gSpacing:R("Padding")}:{},[t]:b(l(c)),...g?{[V(t)]:s("Top",t,c)}:{},...e.only==="top"?{}:{[n]:b(U(r("Bottom"),i(_t,{}),P.min,P.max,P.step,u,"px")),...g?{[V(n)]:s("Bottom",n,u)}:{}},...e.sides?{[d]:b(U(r("Left"),i(Ct,{}),p.min,p.max,p.step,f,"px")),...g?{[V(d)]:s("Left",d,m,p)}:{},[h]:b(U(r("Right"),i(yt,{}),p.min,p.max,p.step,f,"px")),...g?{[V(h)]:s("Right",h,m,p)}:{}}:{}})}function Hc(e,t){const n=Object.fromEntries(Object.entries(t).map(([l,s])=>[l,l in e&&xe(s)?e[l]:s])),o={};let r=!1;for(const[l,s]of Object.entries(e)){if(l in t){r||Object.assign(o,n),r=!0;continue}o[l]=s}return r||Object.assign(o,n),o}const me="Width";function Gc(e,t=Ni,n=!0){const o=t.map(r=>({label:Pi[r],value:r}));return ee({...n?{_gWidth:R(me)}:{},widthMode:{type:"custom",render:({onChange:r,field:l})=>i(_,{label:a(me),icon:i(Eo,{}),action:n?i(Zi,{inherited:l?.inherited??!1,onReset:()=>r(ki),label:me}):void 0,children:de({options:o,value:l?.currentValue||e,onChange:r,ariaLabel:me})})}})}function Mc({fill:e=!1}={}){const t=(r,l)=>({type:"custom",render:({value:s,onChange:c})=>i(Us,{value:s,onChange:c,view:r,badge:l,fill:e})}),n=()=>Ae("sectionHeightMode"),o=()=>Ae("sectionHeightMode");return ee({_gHeight:R(Q),...v("sectionHeightMode",r=>r==="desktop"?t(r):t(r,l=>i(js,{view:r,onClear:()=>l(void 0)}))),...v("sectionHeightValue",n),...v("sectionHeightUnit",o)})}function Us({value:e,onChange:t,view:n,badge:o,fill:r=!1}){const l=E(),{mode:s,number:c,unit:u}=Ks(n,l,e);return i(_,{label:Q,icon:z(i(Te,{})),action:o?o(t):void 0,children:k("div",{className:"es-width-stack",children:[de({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...r?[{label:"Fill",value:"fill"}]:[]],value:s,onChange:t,ariaLabel:Q}),c?i(Xs,{view:n,mode:s,menu:u}):null]})})}function Cn(e,t){return e==="phone"&&He(t)?Br(t):Ar(t)}function ge(e,t){return e==="desktop"||(e==="tablet"?He(t):Lr(t))?null:Cn(e,t)}function Ks(e,t,n){const r=(l=>Jr.includes(l))(n)?n:ge(e,t)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function $s(e,t,n,o){const r=ge(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[O("sectionHeightMode",e)]:r.mode,...r.mode==="fixed"?{[O("sectionHeightUnit",e)]:r.unit}:{},...n==="sectionHeightUnit"?{[O("sectionHeightValue",e)]:r.value}:{},[O(n,e)]:o}}function yn(e,t,n){const o=D(),r=ge(e,E());return!o||!r?{followed:null,write:n}:{followed:r,write:s=>o.onChangeMany(c=>{const u=$s(e,c,t,s);return u===null?{[O(t,e)]:s}:Object.keys(u).length?u:null})}}function Xs({view:e,mode:t,menu:n}){const o=D(),r=E(),l=O("sectionHeightValue",e),s=O("sectionHeightUnit",e),c=S=>w=>o?.onChangeMany(()=>({[S]:w})),{followed:u,write:d}=yn(e,"sectionHeightValue",c(l)),{write:h}=yn(e,"sectionHeightUnit",c(s)),p=t==="screen"?"%":r[s],f=(u?u.unit:p)==="%"?"%":"px",m=f==="%"?Qr:Zr,g=r[l],b=n?{options:["px","%"],label:a("Unit"),onChange:S=>h(S)}:void 0;return q({min:m.min,max:m.max,step:m.step,value:u?null:typeof g=="number"?g:m.fallback,...u?{placeholder:u.value}:{},suffix:f,...b?{units:b}:{},ariaLabel:Q,onChange:d})}function js({view:e,onClear:t}){const n=E(),o=ge(e,n)===null,r=e==="phone"&&He(n),l=Cn(e,n),s=M(c=>a(c),l.mode==="auto"?a("Auto"):`${l.value}${l.unit}`,r?"tablet":"desktop");return i(x,{words:y()?.panel,label:a(Q),changed:o,detail:s,onReset:t})}function Wc(e={}){const t=e.intro===!0,n=l=>({type:"custom",render:({value:s,onChange:c,id:u,name:d})=>i(Qs,{value:s,onChange:c,labelId:`${u??d??"stickTop"}-label`,view:l,intro:t})}),o=l=>({type:"custom",render:({value:s,onChange:c})=>i(qs,{value:s,onChange:c,view:l,intro:t})}),r=l=>({type:"custom",render:({value:s,onChange:c})=>i(Js,{value:s,onChange:c,view:l,intro:t})});return{_gStick:R(Mr,{dot:t?zs:Wt}),...v("stickTop",n),...v("stickTopDistance",o),...ue(Me,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?v(Ge,r):{},...t?{}:{[Kr]:Vs()},...t||e.above===!1?{}:{[Hr]:Ys()}}}function Vs(){const e=W($r,i(Ne,{}),Xr,Wr);return I("desktop",{...e,render:t=>{const n=e.render({...t,value:Yr(t.value),onChange:o=>t.onChange(zr(o))});return _e(n,{hint:a(Ur)})}})}function Ys(){const e=En(Gr,!1,i(xt,{}),vr);return I("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const zs={any:[Wt,Dr]};function xn(e,t,n,o,r){const l=D(),s=E(),c=e==="desktop"||ne(e,s)?null:Qe(e,ae(s,{intro:o}));return{followed:c,write:(c||r)&&l?d=>l.onChangeMany(h=>{const p=Zs(e,h,d,t,o),f=p===null?{[O(t,e)]:d}:p;return Object.keys(f).length?{...f,...r?.(d)??{}}:null}):n}}function qs({value:e,onChange:t,view:n,intro:o}){const r=E(),l=ae(r,{intro:o}),s=h=>{const p=Ui(h);return p==="desktop"||ne(p,r)},c=fe({row:Me,label:"Distance from top",grid:{min:H.min,max:H.max,step:H.step},valueKey:"stickTopDistance",view:n,numbersIn:h=>s(h)&&j(r[ve("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&l.ownTablet?"tablet":"desktop"}),{followed:u,write:d}=xn(n,"stickTopDistance",t,o,c?h=>c.unitPatch(h===void 0):void 0);return i("div",{className:"sf-field",children:q({min:c?.grid.min??H.min,max:c?.grid.max??H.max,step:c?.grid.step??H.step,value:u?null:typeof e=="number"?e:H.fallback,...u?{placeholder:u.distance}:{},...c?{suffix:c.unit,units:c.units}:{suffix:"px"},ariaLabel:a("Distance from top"),onChange:d})})}function Js({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:l}=xn(n,Ge,t,o);return i(_,{label:a(Mt),icon:z(i(Te,{})),children:q({min:ie.min,max:ie.max,step:ie.step,value:r?null:j(e)??ie.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Mt),onChange:l})})}function ne(e,t){return e==="tablet"?Vr(t):jr(t)}function Qe(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,unit:t.tabletUnit,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,unit:t.desktopUnit,screens:t.desktopScreens}}function Zs(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ne(e,t))return null;if(n===void 0)return{};const l=Qe(e,ae(t,{intro:r})),s=e==="phone"&&ne("tablet",t)?h=>O(h,"tablet"):h=>h,c=(h,p)=>t[s(h)]==null?{}:{[O(h,e)]:p},u=Me.unitKey,d=t[s(u)]==null?{}:{[O(u,e)]:l.unit};return{[O("stickTop",e)]:!0,...c("stickTopDistance",l.distance),...d,...c(Ge,l.screens),[O(o,e)]:n}}function Qs({value:e,onChange:t,labelId:n,view:o,intro:r}){const l=E(),s=ae(l,{intro:r}),c=o==="phone"?s.phone:o==="tablet"?s.tablet:r?s.desktop:e===!0,u=o==="phone"&&s.ownTablet,d=o==="desktop"?null:Qe(o,s),h=d?.on?qr(d.distance,d.unit):a("Off");return i(_,{label:a(Gt),labelId:n,icon:z(i(xt,{})),action:k(F,{children:[o!=="desktop"?i(x,{words:y()?.panel,label:a(Gt),changed:ne(o,l),detail:M(p=>a(p),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(ke,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const On="e.g. about";function Uc(){return{_gAnchor:R("Anchor"),anchor:X({control:"plainText",label:"Name",placeholder:On},{type:"custom",render:({value:e,onChange:t})=>i(ro,{value:e,onChange:t,nameBox:(n,o)=>i($,{value:n,onChange:o,label:"Name",placeholder:On,hideable:!1,markup:!1})})})}}function Kc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:s})=>{const c=`${l??s??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(er,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:d=>r(d?d.toISOString():"")})})}}}function $c(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:s})=>{const c=`${l??s??e}-date`;return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(Qo,{id:c,value:An(typeof o=="string"?o:null),onChange:u=>r(u?Ln(u):"")})})}}}function En(e,t,n,o){return{type:"custom",...A({},{...pe,label:e}),render:r=>{const{value:l,onChange:s,id:c,name:u}=r,d="follows"in r,h=r,p=typeof l=="boolean",f=typeof h.follows=="boolean"?h.follows:t,m=p?l:d?f:t,g=`${c??u??e}-label`,b=h.readOnly===!0,S=i(ke,{checked:m,onChange:s,disabled:b,ariaLabelledBy:g});return i(_,{label:a(e),labelId:g,icon:n,hint:o===void 0?void 0:a(o),action:d?k(F,{children:[i(x,{words:y()?.panel,label:a(e),changed:p,detail:h.followsNoView?a(f?"On":"Off"):M(w=>a(w),a(f?"On":"Off"),h.followsView),disabled:b,onReset:()=>s(void 0)}),S]}):S})}}}function Xc(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(el,{label:"Background",icon:i(Co,{}),id:r,value:e,shown:Io(e),onChange:t})}}}function jc(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(se,{label:a(e),icon:n,value:o||t,onChange:r})}}function el({label:e,icon:t,id:n,value:o,shown:r,onChange:l}){const{colors:s,n:c}=tt(),u=Le(o),d=u?le(u,s,c):null;return i(se,{label:a(e),icon:t,id:n,value:d?d.hex:r,caption:d?.words,onChange:l,choices:et(u??"",s,c,l)})}function Vc(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(tl,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function et(e,t,n,o){const r=Pe(e);return ar(t,n).map(l=>({label:l.label,color:l.value,selected:r===l.name,onPick:()=>o(l.name)}))}function tl({value:e,onChange:t,twin:n}){const{colors:o,n:r}=tt(),l=o.background,s=K(l.toUpperCase(),a("Theme {n} background",{n:r})),[c,u]=T(Ro),[d]=T(No),h=typeof d=="string"&&d.trim()!=="",p=Et(c),f=oe=>u(Et(oe)||void 0),m=Pe(e),g=m?le(m,o,r):null,b=et(e,o,r,t),S=n?()=>t(void 0):()=>t("");let w=l,C=s;if(n){const oe=Pe(n.follows),we=Po(n.follows),Se=oe?le(oe,o,r):we?{hex:we,words:we.toUpperCase()}:null;w=Se?.hex??l,C=M(Tn=>a(Tn),Se?Se.words:s,n.view)}const B=!n&&(ko(e)||h)?i(nl,{value:p,onChange:f}):null;return g?i(se,{label:a("Fill"),icon:i(Re,{}),value:g.hex,caption:g.words,onChange:t,changed:!0,onReset:S,resetTo:C,choices:b,children:B}):i(Bt,{label:a("Fill"),icon:i(Re,{}),value:e,inherited:w,resetTo:C,onChange:t,onReset:S,choices:b,children:B})}function nl({value:e,onChange:t}){return de({options:To.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:a("Fill")})}function ol(e,t,n){if((e?.content??[]).some(s=>s?.props?.id===t))return ce(n);const r=Ao(e,t);if(r.length===0)return null;const l=ce(nn(n));if(l!==null)return l;for(let s=r.length-1;s>0;s-=1){const c=ce(nn(r[s].sectionAccent));if(c!==null)return c}return ce(r[0].sectionAccent)}function tt(){const e=Jt(G().theme),[t]=T("sectionAccent");let n=null;try{const{appState:r,selectedItem:l}=re(c=>c),s=l?.props?.id?String(l.props.id):void 0;n=s?ol(r?.data,s,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:ai(e.themes[o]),n:o+1}}function Yc(){return pn()}const zc={top:i(mo,{}),right:i(ho,{}),bottom:i(po,{}),left:i(fo,{})};function qc(e,t,n,o,r,l,s){const c=p=>t.find(f=>f.value===p),u=p=>({value:p,label:"",disabled:!0,title:o}),d=p=>{const f=t.find(g=>g.cell===p);if(!f)return u(`missing-${p}`);const m=l?.[p];return m?{value:f.value,label:f.label,icon:m}:{value:f.value,label:f.label}},h=[u("corner-top-left"),d("top"),u("corner-top-right"),d("left"),u("centre"),d("right"),u("corner-bottom-left"),d("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:f})=>{const m=t.some(g=>g.value===p)?p:n;return i(_,{label:a(e),icon:r,value:c(m)?.label?a(c(m).label):s?a(s):"",children:Bi(a,{label:e,value:m,onChange:f,points:h})})}}}function Jc(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:l})=>i(Or,{label:e,options:(l.options??t).map(s=>({...s,label:a(s.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:a(n)}:{}})}}function Zc(e,t,n,o){return{type:"custom",options:t,fallback:n,...A({},{type:"select",label:e}),render:({value:r,onChange:l,field:s})=>i(Ir,{label:e,options:(s.options??t).map(c=>({...c,label:a(c.label)})),fallback:s.fallback??n,value:r,onChange:l,placeholder:o===void 0?void 0:a(o)})}}function Qc(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const rl={image:"Image",video:"Video"},eu=Pn.map(e=>({label:rl[e],value:e}));function tu(e,t,n){const o=Object.keys(lt).map(r=>({label:lt[r],value:r,picture:n[r]}));return{type:"custom",...A({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(sl,{label:e,icon:t,options:o,onChange:r})}}function il(e,t,n){const o=Bn(e,t,n);if(o!==void 0)return o==="save-makes-frame"?a("A frame is made from this video when you save the page."):o==="starts-dark"?a("This video starts dark, so no frame was made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="outside"?a("This video is on another website, so no frame can be made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="unsupported"?a("This video's file type gives no frame. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="failed"?a("No frame could be made from this video. It is tried again the next time you save the page. The slide shows its background colour while the video loads."):o==="image-no-frame"?a("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=vn(e);return r==="frame-missing-image"?a("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?a("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?a("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?a("No image yet. The slide shows its background colour until you choose one."):void 0}function sl({label:e,icon:t,options:n,onChange:o}){const r=D(),l=r?.values??{},s=Dn(l),c=it(Mn),u=Gn(c?.docId??null);let d=null;try{d=re(p=>p.appState.data)}catch{d=null}const h=Hn(r?.id,d,u);return i(_,{label:a(e),icon:z(t),hint:il(l,h,c?.hasUnsavedEdits??!1),children:de({options:n,value:s,onChange:o,ariaLabel:e})})}function nu(e,t,n,o={}){const r={type:"custom",[ye]:!0,render:({value:l,onChange:s,name:c})=>i(xr,{value:l||"",onChange:s,fieldKey:c,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?I("each",r):r}function ou(e){return nt(e).map(t=>t.path)}function nt(e,t="",n=[]){const o=[];for(const[r,l]of Object.entries(e??{})){const s=t?`${t}.${r}`:r,c=l;if(c&&c[ye]){o.push({path:s,field:c,along:n});continue}c?.arrayFields&&o.push(...nt(c.arrayFields,`${s}[]`,[...n,c])),c?.objectFields&&o.push(...nt(c.objectFields,s,[...n,c]))}return o}const ru={HeroSingle:[Nn.image],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function ll(e){const t=a(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function iu({value:e,onChange:t,label:n}){const o=e||{},r=D(),l=r?r.values!==r.node.props:!0,s=!!o.pending&&l,c=!!o.pending&&!l,u=!!Li(Fi()).geocode,d=st(),h=(p,f)=>t({...o,[p]:f??void 0});return k(F,{children:[i(_,{label:a(n),icon:i(St,{}),action:u?i(Fe,{content:a("Find from the address (OpenStreetMap)"),children:i(Lt,{"aria-label":a("Find from the address"),"aria-busy":s||void 0,disabled:s,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(yo,{})})}):void 0,children:u&&o.status?i(io,{compact:!0,oneLine:!0,spaced:!1,status:s?"busy":o.ok&&!c?"found":"notfound",statusText:s?a("Finding…"):c?a(lr):a(o.status),hint:ll(o)}):null}),i(_,{label:a("Enter by hand"),labelId:d,icon:i(go,{}),action:i(ke,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:d})}),o.manual&&i(_,{label:a("Latitude, longitude"),icon:i(St,{}),children:k("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(At,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>h("lat",p),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(At,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>h("lng",p),min:-180,max:180,step:1e-4,placeholder:a("Longitude")})]})})]})}function al(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function cl(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,l)=>l===t?{text:n}:r)}function su(e,t){return e===null?null:t>e?e:null}function ul(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 lu={label:"Ticker items",icon:i(_o,{})};function au(e,t,n,o){return{type:"custom",[N]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...A({},{...cn.textList,label:e}),render:({value:r,onChange:l})=>i(dl,{label:e,icon:z(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:l,markup:o==="markup"})}}function dl({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:l=!1}){const s=J(null),[c,u]=Z(null),d=p=>p.map(f=>({text:f?.text??""})),h=p=>{const f=ul(n,p,c);f===null&&(s.current=null),u(f),r(d(p))};return i(Ko,{label:a(e),icon:t,noun:a("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:l?i(Dt,{target:s,value:al(n,c),onChange:p=>r(cl(n,c??-1,p)),disabled:c===null,label:c===null?a("Formatting — click a row first"):a("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,f,m)=>i("input",{type:"text",className:l&&c===f?"sf-list-marking":void 0,value:p?.text??"",placeholder:a(o),"aria-label":a("{label} {n}",{label:a(e),n:f+1}),onChange:g=>m({text:g.target.value}),onFocus:g=>{s.current=g.currentTarget,u(f)}})})}function cu(e,t){const n=`${e.label} — row ${t+1}`;return X({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i($,{value:o,onChange:r,label:a("{label} — row {n}",{label:a(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function uu(e){return{_gCards:R("Cards"),coverIndex:W("Cover image",i(So,{}),_r,String(Cr),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:cs("Image background",mi),cardImage:In()}}function du(){return{outline:W("Card outline",i(xo,{}),br,Sr),indexBadge:W("Card number",i(wo,{}),gr,wr),showBadge:En("Product badge",!0,i(Ot,{noun:"tag"}))}}function pu(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...pe,label:be.find(l=>l.id===r).label}),o=r=>A(Ae(ot),n(r));return{_gShowOnCard:R("Show on a card"),[ot]:A({type:"custom",render:()=>i(pl,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(ot)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const ot="showCardPrice",be=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function pl({rest:e}){const t=E(),n=he(),o=s=>typeof t[s]=="boolean"?t[s]:void 0,r=s=>o(s)??e[s],l=be.some(({id:s})=>o(s)!==void 0&&o(s)!==e[s]);return i(rt,{parts:be,changed:l,shown:r,onPress:(s,c)=>n({[s]:c}),onReset:()=>n(Object.fromEntries(be.map(({id:s})=>[s,void 0])))})}function fu(e,t="display"){const n=V(t);return{[t]:I("desktop",{type:"custom",render:({value:o,onChange:r})=>i(rt,{parts:e,changed:Xo(o),shown:l=>jo(o,l),onPress:(l,s)=>r(zo(o,l,s)),onReset:()=>r(void 0)})}),[n]:I("mobile",{type:"custom",render:({value:o,onChange:r})=>i(fl,{parts:e,desktopKey:t,value:o,onChange:r})})}}function rt({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:l,disabledReason:s}){const c=a("Display");return i(_,{label:c,icon:i(lo,{}),changed:t,action:i(x,{words:y()?.panel,label:c,changed:t,detail:l,onReset:r}),children:i($o,{label:c,items:e.map(u=>({id:u.id,label:a(u.label),shown:n(u.id),...s?{disabled:!0,disabledReason:a(s)}:{}})),onChange:o})})}function fl({parts:e,desktopKey:t,value:n,onChange:o}){const r=E()[t];return i(rt,{parts:e,changed:Yo(n),shown:l=>Vo(r,n,l),onPress:(l,s)=>o(qo(n,l,s)),onReset:()=>o(hr),detail:a("the same as Desktop")})}function In(e=Kn){return U("Card image",i(bt,{}),L,Oe,$n,L,e,{clear:{hint:L},hint:"Rounds the picture. The card's own corner is in Styles."})}function hl(){return ue(ft,"cardImage")}function hu(){return{cardImage:In(ft),...hl()}}function mu(){return Je({sidesKey:"cornerSides",row:Vn,step:Xn,useFollowed:()=>L,mark:i(ml,{label:jn}),hint:a("Rounds the picture. Left alone it stays square.")})}function ml({label:e,changed:t=!1,onReset:n=()=>{}}){return i(x,{words:y()?.panel,label:a(e),changed:t,onReset:n})}function gu(){return{type:"custom",render:({value:e,onChange:t})=>i(Sl,{value:typeof e=="string"?e:"",onChange:t})}}const Rn="own";function bu(){const e=[{value:Rn,label:"Layout's own",picture:ln(Array.from({length:8},()=>[3,1]))},...Object.entries(Zn).map(([t,n])=>({value:t,label:n.label,picture:ln([...n.phone,...n.phone])}))];return I("mobile",rn("Layout",i(wt,{}),e,Rn,{columns:2,cell:$i}))}function gl({layout:e,width:t}){const n=Qn(e),o=n?`${n[0]}/${n[1]}`:void 0;return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:o?"auto":6,gridAutoFlow:"row dense",gap:2},children:eo(e).map(([r,l],s)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${l}`,aspectRatio:o}},s))})}const bl={width:"3.5rem",height:"2.5rem",words:!1},wl=200;function Sl({value:e,onChange:t}){const[n,o]=Z(null),[r,l]=Z(4),s=J(null);Fn(()=>{const m=s.current;if(!m||typeof ResizeObserver!="function")return;const g=()=>l(m.getBoundingClientRect().width>=wl?4:3);g();const b=new ResizeObserver(g);return b.observe(m),()=>b.disconnect()},[]);const c=e?Ki(Ee,e):void 0,u=c?e:"",d=ht(n,u),h=ht(n,"").length,p=to("no-symbol"),f=[{value:"",label:a("Not chosen"),icon:Wi(p,a("Not chosen"))},...d.map(m=>({value:m,label:a(Ee[m].label),icon:i(gl,{layout:Ee[m],width:40})}))];return i(_,{label:a("Layout"),icon:i(wt,{}),value:c?a(c.label):void 0,children:i("div",{ref:s,style:{flex:"1 1 auto",minWidth:0},children:i(Pt,{label:a("Layout"),value:u,options:f,onChange:t,columns:r,cell:bl,header:k("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:a("Photos in a row")}),i(Ho,{options:[{id:"all",label:a("All")},...qn.map(m=>({id:String(m),label:String(m)}))],value:n===null?"all":String(n),ariaLabel:a("Photos in a row"),onChange:m=>o(m==="all"?null:Number(m))}),i("span",{className:"text-2xs text-ink-faint",children:a("{n} of {total} layouts",{n:h,total:Jn.length})})]})})})})}export{es as BOUND_TO_POST,uc as BOUND_TO_POST_NOTE,wc as BUCKET_ICONS,ru as CUSTOM_FIELD_MEDIA,iu as CoordsField,an as DESKTOP_GAP_NOT_OVERLAP,rt as DisplayRow,zc as EDGE_ARROWS,tr as FOCAL_DEFAULT,Ce as FOLD_FIELD_MARKER,ts as HIGHLIGHT_HINT,$ as HidableTextField,ut as LINK_FIELD_MARKER,Qa as Label,ye as MEDIA_FIELD_MARKER,eu as MEDIA_TYPE_OPTIONS,dc as NOT_BOUND_TO_POST,Ec as PanelBand,rs as PanelNoteLine,Bs as RowPropsContext,dt as SCAFFOLD_FIELD_MARKER,Cu as SCALAR_TEXT_CONTROLS,ji as SiteGapDefaultReset,q as Slider,ss as Swatches,_u as TEXT_CONTROL_KINDS,N as TEXT_FIELD_MARKER,lu as TICKER_ITEMS_ROW,dl as TextListField,el as ThemeFillRow,me as WIDTH_LABEL,Zi as WidthDefaultReset,ul as aimAfterListChange,Uc as anchorFields,K as backTo,Ic as backgroundField,kc as boxBlockSpacingField,Ac as boxColumnsFields,Vc as boxFillField,Ls as boxPhoneRowField,Ps as boxShareField,Fc as boxSharePhoneField,Lc as boxShareTabletField,ol as boxThemeIndexOf,Cc as bucketHeader,Nc as buttonWordsEntryField,Ts as cardCornersField,cs as cardImageBackgroundField,In as cardImageField,hu as cardImageFields,uu as cardMediaFields,Pc as cardShapeFields,pu as cardShowFields,du as cardStyleFields,Dc as cellWidthFields,jc as colorInput,tc as containerDirectionField,Vi as containerGapField,Yi as containerGapPhoneField,ec as containerGapRows,zi as containerGapTabletField,ll as coordsResultTip,mc as copyText,hn as cornerSidesField,Je as cornersRowField,fn as cornersUnitFields,$c as date,Kc as dateTime,yc as designGroupHeader,fu as displayFields,qc as edgePad,et as fillSlotChoices,su as focusAfterRemove,Yc as focusKeptField,xc as foldMarker,xe as foldMetaOf,is as foldTitleOf,$s as followedHeightPatch,Zs as followedStickPatch,gu as galleryLayoutField,bu as galleryLayoutPhoneField,Mc as heightFields,ge as heightFollowedBy,Ks as heightLayersAt,nc as heroGroupPlacementPoints,ct as hidableText,os as hintIsWhileTyping,mu as imageCornersField,cc as inOwnBox,_c as isBucketHeader,pn as keptBy,gc as linkField,il as loadingRowHint,tu as loadingShowsField,ou as mediaFieldPaths,nt as mediaFields,Jc as multiSelect,Xc as pageBackgroundField,Sc as panelNote,Hs as phoneOverrideField,hc as plainText,bc as plainTextarea,us as pxField,Oc as quietMarker,at as readHidable,al as rowText,Zc as searchSelect,as as sectionBandChoices,ms as sectionCornersField,Tc as sectionShapeFields,Rc as sectionThemeFields,cl as setRowText,Bc as sizeField,Qc as sourceField,vc as spacingFields,Wc as stickFields,Hc as swapPadding,pc as text,Wn as textFieldIdentifier,ic as textFieldOffPage,lc as textFieldPanelOnly,au as textList,cu as textListRowField,fc as textarea,En as toggle,nu as upload,fe as useLengthRow,he as useSelectedPatch,E as useSelectedProps,T as useSelectedSibling,Xi as useSiteGapDetail,Gc as widthField,ac as withIdentifier,rc as withOffPage,sc as withPanelOnly,oc as withScaffold};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FIELD_DESCRIPTION_MARKER as j}from"efficient-easel/screen/lib/host";import{isNode as
|
|
1
|
+
import{FIELD_DESCRIPTION_MARKER as j}from"efficient-easel/screen/lib/host";import{isNode as y,isNodeList as v}from"efficient-easel/data";import{RETIRED_SECTIONS as E}from"../../format/lib/document/section-catalog.js";import{layoutPresetFor as O}from"./sections/text-layouts.js";import{hasOwnEntry as x}from"../../format/lib/own-entry.js";function u(r,t){const e=r.components[t]?.label;return typeof e=="string"&&e.trim()?e.trim():t}function w(r){return r.length>3&&r.endsWith("s")?r.slice(0,-1):r}function d(r,t,e,o){r.forEach((s,l)=>{if(y(s)){o.push({node:s,list:r,index:l,parent:t,slot:e});for(const[i,n]of Object.entries(s.props))v(n)&&d(n,s,i,o)}})}function F(r){const t=[];d(Array.isArray(r.content)?r.content:[],null,"",t);for(const e of Object.values(r.zones??{}))Array.isArray(e)&&d(e,null,"",t);return t}function h(r,t){return F(r).find(e=>String(e.node.props.id)===t)}function L(r,t,e){if(!e)return null;const o=h(t,e);if(!o)return null;const s=u(r,o.node.type),l=o.parent?`${u(r,o.parent.type)} · ${w(o.slot)} ${o.index+1}`:s;return{blockId:e,type:o.node.type,label:l,path:""}}const S=r=>r.filter(t=>!!t&&typeof t=="object"&&"value"in t).map(t=>typeof t.label=="string"?{value:t.value,label:t.label}:{value:t.value});function C(r){if(!r||typeof r!="object")return null;const t=r;if(typeof t.type!="string")return null;const e=t.type==="custom"?t[j]:void 0,o={type:e?.type??t.type},s=e?.label??t.label;typeof s=="string"&&(o.label=s);const l=e?.options??t.options;Array.isArray(l)&&(o.options=S(l));for(const i of["arrayFields","objectFields"]){const n=e?.[i]??t[i];n&&typeof n=="object"&&(o[i]=k(n))}return o}function k(r){const t={};for(const[e,o]of Object.entries(r??{})){const s=C(o);s&&(t[e]=s)}return t}function T(r){const t={};for(const[e,o]of Object.entries(r.components))o&&(t[e]={label:u(r,e),fields:k(o.fields),...m(e)?{retired:!0}:{}});return t}function m(r){return x(E,r)}function g(r,t){const e=r.components[t]?.defaultProps;return e&&typeof e=="object"?structuredClone(e):{}}function R(r,t){let e=r;for(const o of t?t.split("."):[]){const s=/^([A-Za-z_][A-Za-z0-9_]*)(?:\[(\d+)\])?$/.exec(o);if(!s||!e||typeof e!="object")return null;e=e[s[1]],s[2]!==void 0&&(e=Array.isArray(e)?e[Number(s[2])]:void 0)}return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function b(r,t){return r.findIndex(e=>y(e)&&String(e.props.id)===t)}function A(r,t,e){const o=t||e;if(!o)return r.length;const s=b(r,o);if(s<0)throw new Error(`there is no top-level block ${o}`);return t?s+1:s}function B(r,t,e,o,s={}){const l=structuredClone(t),i=Array.isArray(l.content)?l.content:l.content=[];try{e.forEach((n,_)=>{const a=c=>{throw new Error(`change ${_+1}: ${c}`)};switch(n.op){case"set_props":{const c=h(l,n.block_id)??a(`there is no block ${n.block_id}`);"id"in n.props&&a("a block's id is never changed");const f=R(c.node.props,n.path)??a(`there is no ${n.path} in that block`);Object.assign(f,structuredClone(n.props));break}case"insert_block":{r.components[n.type]??a(`there is no block type ${n.type}`),m(n.type)&&a(`${u(r,n.type)} is retired: it is no longer added (a page that holds one keeps it)`);const c=O(n.type),f=Object.keys(n.props??{}).filter(p=>p!=="id");c&&f.length&&a(`${u(r,n.type)} is laid down as a Box of blocks: insert it with no props, then change its blocks`);const $=c?c(p=>g(r,p),o,s):{type:n.type,props:{...g(r,n.type),...structuredClone(n.props),id:o(n.type)}};i.splice(A(i,n.after,n.before),0,$);break}case"remove_block":{const c=b(i,n.block_id);c<0&&a(`there is no top-level block ${n.block_id}`),i.splice(c,1);break}case"move_block":{const c=b(i,n.block_id);c<0&&a(`there is no top-level block ${n.block_id}`);const[f]=i.splice(c,1);i.splice(A(i,n.after,n.before),0,f);break}default:a(`"${n.op}" is not a change this editor makes`)}})}catch(n){return{ok:!1,reason:n instanceof Error?n.message:String(n)}}return{ok:!0,document:l}}export{B as applyPageEdits,u as blockLabel,T as describeBlocks,L as describeSelection};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { PalettePreset } from "efficient-easel/screen/lib/document/palette-sections";
|
|
2
2
|
export declare const CITY_PICTURES = "CityPictures";
|
|
3
3
|
export declare const CITY_MAPS = "CityMaps";
|
|
4
|
-
export declare function cityPalettePresets(press?: readonly string[]): PalettePreset[];
|
|
4
|
+
export declare function cityPalettePresets(press?: readonly string[], wallHidden?: boolean): PalettePreset[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SECTION_CATALOG as
|
|
1
|
+
import{SECTION_CATALOG as O}from"../../../format/lib/document/section-catalog.js";import{SECTION_TO_BOX_PRESS as P,sectionToBoxRow as S}from"../../../render/lib/sections/section-to-box.js";import{conversionPreset as u}from"./text-layouts.js";import{activePressContext as b}from"../../../format/lib/sections/active-press-context.js";import{CITY_PHOTO_WALL_HIDDEN as A}from"../../../render/lib/document/blocks/general/section-to-box-rows-locations.js";import{SECTION_PAD_KEYS as c}from"../../../render/lib/content/section-padding.js";import{phoneKey as I,tabletKey as h}from"efficient-easel/draw";const R=[c.top,h(c.top),I(c.top)],r="ContactLocations",d="ContactRouting",l="CityPictures",y="CityMaps",x=[{key:l,label:"City pictures",piece:0,desc:"A wall of city photos, grouped by region. Each photo links to its city's card."},{key:y,label:"City maps",piece:1,desc:"A card per city, grouped by region: address, phone, hours and a map."}];function w(C=P,p=A){const a=O.find(o=>o.sections.some(s=>s.type===d))?.key;return!C.includes(r)||!a?[]:x.filter(o=>!(p&&o.key===l)).map(({key:o,label:s,desc:T,piece:_})=>({key:o,label:s,cat:a,after:d,desc:T,alias:"locations offices stores branches",insert:n=>{const i=S(r);if(!i)return null;const f=b(),e=u(r,i,_)(n.nodeDefaults,n.newNodeId,f);if(!e||!(p&&o===y))return e;const m=u(r,i,0)(n.nodeDefaults,t=>`${t}-above`,f),E=Object.fromEntries(R.filter(t=>m?.props[t]!==void 0).map(t=>[t,m.props[t]]));return{...e,props:{...e.props,...E}}}}))}export{y as CITY_MAPS,l as CITY_PICTURES,w as cityPalettePresets};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{readPartMotions as
|
|
1
|
+
import{readPartMotions as I}from"../../../render/lib/animation/part-motion.js";import{STRIP_SECTION_TO_BOX as g}from"../../../render/lib/document/blocks/general/section-to-box-rows-strip.js";import{HERO_STRIP_SLOT as a,legacyTickerWords as l,STRIP_ON_MEDIA as m,TICKER_MOTION_PART as n}from"../../../format/lib/hero-ticker.js";import{convertSection as u}from"../../../render/lib/sections/section-to-box.js";import{seedNodeId as O}from"../../../format/lib/document/seed-parts.js";function E(e){const{showTicker:i,tickerItems:k,...y}=e.props,T=O(e.props,"Hero"),r=[],o=[],t={...y},s=l({tickerItems:k}),p=i!==!1&&s.length>0,c=I(e.props),h=c[n];if(h){const{[n]:d,...w}=c;Object.keys(w).length?t._partMotion=w:delete t._partMotion,r.push({key:"_partMotion",home:p?`${n} → the strip Box's own Entrance`:`${n} → nothing: no strip is drawn`})}if(!p)return t[a]=[],"showTicker"in e.props&&o.push({key:"showTicker",why:i===!1?"switched off: an empty strip draws nothing, the same as today":"no words: the strip drew nothing published, so the strip stays empty"}),"tickerItems"in e.props&&o.push({key:"tickerItems",why:s.length?"switched off: the words were not drawn, and an empty strip draws nothing":"no row has words: an empty row draws nothing published"}),{node:{type:e.type,props:t},carried:r,dropped:o};const f={type:"Ticker",props:{id:`${T}~strip`,items:s.map(d=>({text:d})),tone:"plain",sectionAccent:m.sectionAccent,borders:m.line,...h??{}}},_=u(f,g.Ticker);return t[a]=[_.node],"showTicker"in e.props&&o.push({key:"showTicker",why:"on: the strip Box is the switch now (delete or hide it like any block)"}),r.push({key:"tickerItems",home:`the strip Box: one Text block per row with words (${s.length}), in order`}),{node:{type:e.type,props:t},carried:r,dropped:o}}export{E as heroTickerToStrip};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type Node = {
|
|
2
|
+
type: string;
|
|
3
|
+
props: Record<string, unknown>;
|
|
4
|
+
};
|
|
5
|
+
export declare const SAME_KEY_BOX_PART: Readonly<Record<string, string>>;
|
|
6
|
+
export declare function drawsThroughBox(root: Node | null | undefined, type: string): boolean;
|
|
7
|
+
export declare function hasInsertBoxPath(type: string, nodeDefaults?: (type: string) => Record<string, unknown>): boolean;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isNode as s}from"efficient-easel/data";import{BOX_TYPE as p}from"../../../format/lib/document/container-blocks.js";import{hasOwnEntry as c,ownEntry as n}from"../../../format/lib/own-entry.js";import{boxNativeReason as l}from"../../../render/lib/sections/section-to-box.js";import{newSectionNode as f}from"./new-section-node.js";import{SECTION_HEAD_TYPE as d}from"../../../format/lib/sections/section-head-placement.js";function i(e,o=[]){o.push(e);for(const t of Object.values(e.props))if(Array.isArray(t))for(const r of t)s(r)&&i(r,o);return o}const a=e=>Array.isArray(e.props.template)&&e.props.template.length>0,m={Form:"the form logic (its fields, picked by slug, and the post to the backend's form service) is the Form block's; a Box holding that block is the Form layout"},u={Logos:"logos",ProcessSteps:"boxes"},y=e=>{const o=n(u,e.type);return!!o&&e.props.headPlacement==="own-box"&&Array.isArray(e.props[o])&&e.props[o].some(s)},h={Chart:["eyebrow","title","body","caption"],Mockup:["eyebrow","title","body"],Countdown:["title"],FeaturedCover:[]},b=e=>{const o=n(h,e.type);return!!o&&e.props.headPlacement==="own-box"&&o.every(t=>e.props[t]===void 0)};function w(e,o){if(!e)return!1;if(e.type===o)return a(e);if(e.type!==p)return!1;const t=i(e);return c(m,o)?t.some(r=>r.type===o)&&t.every(r=>r.type!==d):t.every(r=>r.type!==o||a(r)||y(r)||b(r))}let A=0;function v(e,o=()=>({})){if(l(e))return!0;const t=f(e,{nodeDefaults:o,newNodeId:r=>`${r}-${++A}`,sectionLabel:r=>r,blockIsOffered:()=>!0});return w(t,e)}export{m as SAME_KEY_BOX_PART,w as drawsThroughBox,v as hasInsertBoxPath};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{SECTION_TO_BOX_PRESS as r}from"../../../render/lib/sections/section-to-box.js";import{cityPalettePresets as o}from"./city-presets.js";function n(t=r,e){return[...o(t,e)]}export{n as menuPresets};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const CARD_ROW_FIELD_PROP = "rowField";
|
|
2
|
+
export declare const CARD_ROW_LINK_PROP = "rowLinkField";
|
|
3
|
+
export declare const CARD_TEMPLATE_SLOT = "template";
|
|
4
|
+
export declare const CARD_LIST_TYPE = "CardList";
|
|
5
|
+
export declare const BOX_HIDE_WHEN_ROW_EMPTY = "hideWhenRowEmpty";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t="rowField",_="rowLinkField",o="template",e="CardList",R="hideWhenRowEmpty";export{R as BOX_HIDE_WHEN_ROW_EMPTY,e as CARD_LIST_TYPE,t as CARD_ROW_FIELD_PROP,_ as CARD_ROW_LINK_PROP,o as CARD_TEMPLATE_SLOT};
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { type SourceRow } from "./block-sources.js";
|
|
2
2
|
import type { CardCopyPlace } from "./mirror-cards.js";
|
|
3
|
-
export declare const CARD_TEMPLATE_SLOT = "template";
|
|
4
3
|
export declare const CARD_TEMPLATE_LABEL = "Card template";
|
|
5
|
-
export declare const CARD_LIST_TYPE = "CardList";
|
|
6
4
|
export declare const CARD_TEMPLATE_BLOCKS: readonly ["Text", "ImageBlock", "ButtonBlock", "Flex"];
|
|
7
|
-
export
|
|
8
|
-
export declare const CARD_ROW_LINK_PROP = "rowLinkField";
|
|
5
|
+
export { BOX_HIDE_WHEN_ROW_EMPTY, CARD_LIST_TYPE, CARD_ROW_FIELD_PROP, CARD_ROW_LINK_PROP, CARD_TEMPLATE_SLOT } from "./card-row-keys.js";
|
|
9
6
|
export declare function cardTemplateSlot(): {
|
|
10
7
|
type: "slot";
|
|
11
8
|
allow: string[];
|
|
@@ -87,7 +84,6 @@ export declare function rowFieldIsDate(copy: Parameters<typeof rowFieldSpec>[0],
|
|
|
87
84
|
export declare function namedRowField(props: Record<string, unknown> | null | undefined, prop?: string): string;
|
|
88
85
|
export declare function cardKeyOf(row: SourceRow, index: number): string;
|
|
89
86
|
export declare function cardRow(value: unknown): SourceRow;
|
|
90
|
-
export declare const BOX_HIDE_WHEN_ROW_EMPTY = "hideWhenRowEmpty";
|
|
91
87
|
export declare function templateBoxIsEmpty(props: Record<string, unknown>, row: SourceRow | null | undefined): boolean;
|
|
92
88
|
export declare const ROW_BOUND_PROPS: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
93
89
|
export declare const ROW_PART_BY_WORDS: ReadonlySet<string>;
|
|
@@ -111,4 +107,3 @@ export declare function cardListFieldsOf(appState: unknown, list: {
|
|
|
111
107
|
} | null | undefined, kind?: CardRowFieldKinds): readonly CardRowFieldSpec[];
|
|
112
108
|
export declare function cardListProps(rows: readonly Record<string, unknown>[], fields: readonly CardRowFieldSpec[]): Record<string, unknown>;
|
|
113
109
|
export declare const HOST_PART_TYPE = "HostPart";
|
|
114
|
-
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{blockSources as D,blockSourceSpec as B,declaredBlockSource as L}from"./block-sources.js";import{slotFieldBlocks as O}from"./slot-field-blocks.js";import{isNodeList as v}from"efficient-easel/data";import{BOX_TYPE as W}from"../document/container-blocks.js";import{globalRegistry as K}from"../global-registry.js";import{nonEmptyString as S}from"../non-empty-string.js";import{accentItalicRuns as M}from"../markup.js";import{withCardsTemplate as N}from"../document/cards-template-on-read.js";import{withCardListTemplate as H}from"../document/blocks/general/CardList/item-seed.js";import{ARTICLE_BODY_BLOCK as $,withArticleBodyTemplate as Y}from"../document/article-body-seed.js";import{withLogosTemplate as j}from"../document/blocks/general/Logos/card-seed.js";import{withFaqTemplate as U}from"../document/blocks/general/FAQ/card-seed.js";import{withFootprintListTemplate as Q}from"../document/blocks/general/Footprint/card-seed.js";const R="template",q="Card template",k="CardList",_=["Text","ImageBlock","ButtonBlock","Flex"],p="rowField",y="rowLinkField";function Oe(){return{type:"slot",allow:[..._]}}const V=_.filter(e=>e!=="ButtonBlock"),A="items",C="itemFields";function Se(){return{type:"slot",allow:[...V]}}function m(e,t){if(!t)return e;const o=typeof t=="string"?[t]:t;return e.filter(n=>o.includes(n.kind??"text"))}const X=[{block:"OrderSummary",typedRows:"rows",linesBetween:!0,fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:"FAQ",typedRows:"items",fields:[{key:"question",label:"Question"},{key:"answer",label:"Answer",multiline:!0}],seedOnInsert:e=>U(e)},{block:"Footprint",typedRows:"offices",fields:[{key:"badge",label:"HQ",plain:!0},{key:"role",label:"Role"},{key:"city",label:"City"},{key:"country",label:"Region · country"},{key:"address",label:"Address"},{key:"phone",label:"Phone"},{key:"linkLabel",label:"Button"},{key:"href",label:"Link",kind:"link"}],seed:e=>Q(e)},{block:"Cards",typedRows:"items",fields:[{key:"num",label:"Number"},{key:"since",label:"Corner note"},{key:"label",label:"Label"},{key:"title",label:"Card title"},{key:"value",label:"Value"},{key:"body",label:"Card body",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:"count",label:"Count"},{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],seed:e=>N("Cards",e)},{block:"ProcessSteps",fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title",mark:"accentItalic"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"},{key:"specs",label:"Specs",kind:"list",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]}],blocks:[{type:k,label:"Card list"}]},{block:"Logos",fields:[{key:"label",label:"Name"},{key:"kind",label:"Kind"}],seed:e=>j(e)},{block:k,fields:[{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],typedRows:A,seed:e=>H(e)},{block:$,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:e=>Y(e)}];function u(){return K("efficient.card-templates",()=>new Map(X.map(e=>[e.block,e])))}function Re(e){for(const t of e){if(typeof t.block!="string"||!t.block)throw new Error("A card template names no block.");const o=[];for(const r of t.blocks??[]){if(typeof r?.type!="string"||!r.type)throw new Error(`The card template of ${t.block} names an empty block.`);if(r.type===F)throw new Error(`The card template of ${t.block} names "${F}" in its blocks. Only a host's seed puts a host part in a card template; a merchant never adds one. Take it out.`);o.some(l=>l.type===r.type)||o.push({type:r.type,label:r.label||r.type})}const n=[];for(const r of t.slots??[]){if(typeof r?.slot!="string"||!r.slot)throw new Error(`The card template of ${t.block} names an empty slot.`);const l=S(r.label),c=Array.isArray(r.fields)?{fields:r.fields.map(a=>({...a}))}:null;n.some(a=>a.slot===r.slot)||n.push({slot:r.slot,...l?{label:l}:null,...c})}const s=n.some(r=>r.fields);if(s&&(t.fields.some(r=>r.everySource)||D(t.block).length))throw new Error(`The card template of ${t.block} declares slot fields, but the block reads a source: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);s?O().add(t.block):O().delete(t.block);const i=S(t.typedRows);u().set(t.block,{block:t.block,...n.length?{slots:n}:{},fields:t.fields.map(r=>({...r})),blocks:o,typedRows:i,...t.seed?{seed:t.seed}:{},...t.seedOnInsert?{seedOnInsert:t.seedOnInsert}:{},...t.linesBetween===!0?{linesBetween:!0}:{}})}}function z(e,t){const o=e?u().get(e)?.seed:void 0;return o?o(t):t}function _e(e,t){const o=J(e),n=(o.length?o:[R]).filter(l=>t[l]===void 0||Array.isArray(t[l])&&t[l].length===0);if(!n.length)return t;const s={...t};for(const l of n)delete s[l];const i=e?u().get(e)?.seedOnInsert:void 0,r=i?i(s):z(e,s);return r===s?t:r}function Ae(){for(const e of u().values())if(e.blocks?.length)return!0;return!1}function Ce(e){return u().get(e)?.blocks??[]}function Ee(e){for(const t of u().values())if(t.blocks?.some(o=>o.type===e))return!0;return!1}function Ie(e){return typeof e=="string"&&u().get(e)?.typedRows||""}function Fe(e){return typeof e=="string"&&u().get(e)?.linesBetween===!0}function Pe(e){return typeof e=="string"&&u().has(e)}const G=[{slot:R}];function b(e){if(typeof e!="string")return[];const t=u().get(e);return t?t.slots??G:[]}function J(e){return b(e).map(t=>t.slot)}function Z(e,t){return b(e).some(o=>o.slot===t)}function De(e,t){const o=b(e).find(n=>n.slot===t);return o?o.label??q:null}function x(e,t){return t?b(e).find(o=>o.slot===t)?.fields:void 0}function ee(e,t){const o=u().get(e)?.fields??[];return m(o,t)}function te(e,t){if(typeof e!="string")return"";const o=x(e,t);return(o?m(o,"list"):ee(e,"list"))[0]?.key??""}function oe(e,t,o){return T(e)||te(t,o)}function E(e,t,o){const n=typeof e?.type=="string"?e.type:"";if(!n)return[];const s=x(n,o);if(s)return m(s,t);const i=u().get(n)?.fields??[],r=B(L(e?.props))?.fields,l=r?.length?[...r.map(c=>({...c})),...i.filter(c=>c.everySource&&!r.some(a=>a.key===c.key))]:i;return m(l,t)}function re(e,t,o,n){if(!e)return null;const s=x(e,n);return s?s.find(i=>i.key===t)??null:o?E(o).find(i=>i.key===t)??null:u().get(e)?.fields.find(i=>i.key===t)??null}function w(e,t){return!e||!t?null:e.fields?.find(o=>o.key===t)??re(e.ownerType,t,e.owner,e.slot)}function ve(e,t){return w(e,t)?.plain===!0}function We(e,t){return w(e,t)?.kind==="date"}function T(e,t=p){const o=e?.[t];return typeof o=="string"?o.trim():""}function Ke(e,t){return e.key||String(t+1)}function Me(e){const t={};if(e&&typeof e=="object"&&!Array.isArray(e))for(const[o,n]of Object.entries(e))typeof n=="string"&&(t[o]=n);return t}const ne="hideWhenRowEmpty";function Ne(e,t){const o=e[ne];return!t||!Array.isArray(o)||!o.length?!1:o.every(n=>typeof n!="string"||!t[n]?.trim())}const h={Text:{text:p,href:y},ImageBlock:{src:p,href:y},ButtonBlock:{label:p,href:y},LogoBlock:{alt:p,href:y},Breadcrumb:{currentCrumb:p}},He=h,le=new Set(["ButtonBlock.label","LogoBlock.alt"]);function $e(e,t,o){return se(e,t,o)&&!le.has(`${e}.${o}`)}function se(e,t,o){return ie(e,t,o)!==""}function ie(e,t,o){const n=h[e]?.[o];return n?T(t,n):""}function I(e,t){return!t||!e?null:e[t]??""}function ae(e,t){return I(e,t)?.trim()||void 0}function Ye(e,t,o,n,s,i){if(!o)return t;let r=null;for(const[l,c]of Object.entries(h[e]??{})){const a=T(t,c),f=I(o,a);if(f!==null){if(r??={...t},c===y){r[l]=ae(o,a);continue}r[l]=w({ownerType:n,fields:s,slot:i},a)?.mark==="accentItalic"?M(f):f}}return r??t}function g(e,t){const o=e?.data?.content;if(!Array.isArray(o)||typeof t!="string")return;const n=(i,r)=>{for(const l of i){if(l?.props?.id===t)return r;for(const[c,a]of Object.entries(l?.props??{})){if(!v(a))continue;const f=Z(l.type,c)?{owner:l,slot:c,direct:!0,nested:r!==null,underBox:!1}:r&&{owner:r.owner,slot:r.slot,direct:!1,nested:r.nested,underBox:r.underBox||l.type===W},d=n(a,f);if(d!==void 0)return d}}},s=n(o,null);return s===void 0?null:s}function ce(e,t){const o=g(e,t);return o&&o.owner}function ue(e,t){const o=g(e,t);return o&&o.slot}function je(e,t){const o=g(e,t);return o&&(o.direct?o.owner:null)}function Ue(e,t){const o=g(e,t);if(o!==void 0)return o===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:o.nested,underBox:o.underBox}}function Qe(e,t,o){if(t?.type!==k)return[];const n=ce(e,t.props?.id);if(!n){const l=B(L(t.props))?.fields,c=l?.length?l.map(d=>({...d})):fe(t.props),a=(u().get(k)?.fields??[]).filter(d=>d.everySource&&!c.some(P=>P.key===d.key)),f=[...c,...a];return m(f,o)}const s=ue(e,t.props?.id)??void 0,i=oe(t.props,n.type,s),r=i&&E(n,"list",s).find(l=>l.key===i)?.fields||[];return m(r,o)}function qe(e,t){return{[p]:"",[A]:e.map(o=>({...o})),[C]:t.map(o=>({...o}))}}function fe(e,t){const o=e?.[C];if(!Array.isArray(o))return[];const n=o.flatMap(s=>{if(!s||typeof s!="object")return[];const{key:i,label:r,kind:l,multiline:c,alt:a,next:f}=s;if(typeof i!="string"||!i||typeof r!="string")return[];const d=l==="image"||l==="link"||l==="colour"||l==="date"?l:void 0;return[{key:i,label:r,...d?{kind:d}:{},...c===!0?{multiline:!0}:{},...typeof a=="string"&&a?{alt:a}:{},...typeof f=="string"&&f?{next:f}:{}}]});return m(n,t)}const F="HostPart";export{ne as BOX_HIDE_WHEN_ROW_EMPTY,C as CARD_LIST_FIELDS,V as CARD_LIST_ITEM_BLOCKS,A as CARD_LIST_ROWS,k as CARD_LIST_TYPE,p as CARD_ROW_FIELD_PROP,y as CARD_ROW_LINK_PROP,_ as CARD_TEMPLATE_BLOCKS,q as CARD_TEMPLATE_LABEL,R as CARD_TEMPLATE_SLOT,F as HOST_PART_TYPE,He as ROW_BOUND_PROPS,le as ROW_PART_BY_WORDS,Ue as cardCopyPlace,Ke as cardKeyOf,Qe as cardListFieldsOf,Se as cardListItemSlot,qe as cardListProps,oe as cardListShows,Me as cardRow,Ce as cardTemplateBlocks,je as cardTemplateCardOwner,re as cardTemplateField,ee as cardTemplateFields,E as cardTemplateFieldsOf,Fe as cardTemplateLinesBetween,ce as cardTemplateOwner,Oe as cardTemplateSlot,De as cardTemplateSlotLabel,J as cardTemplateSlotNames,ue as cardTemplateSlotOf,Ie as cardTemplateTypedRows,Ae as cardTemplatesNameBlocks,te as defaultListField,m as fieldsOfKind,Pe as hasCardTemplate,Ee as isCardTemplateBlock,Z as isCardTemplateSlot,T as namedRowField,Re as registerCardTemplates,se as rowBound,We as rowFieldIsDate,ie as rowFieldOf,w as rowFieldSpec,I as rowFieldText,ve as rowFieldWordsArePlain,Ye as rowFilledProps,ae as rowLinkText,$e as rowPartByKey,Ne as templateBoxIsEmpty,_e as templateOnInsert,z as templateOnRead};
|
|
1
|
+
import{blockSources as Y,blockSourceSpec as O,declaredBlockSource as R}from"./block-sources.js";import{slotFieldBlocks as h}from"./slot-field-blocks.js";import{isNodeList as v}from"efficient-easel/data";import{BOX_TYPE as W}from"../document/container-blocks.js";import{globalRegistry as M}from"../global-registry.js";import{nonEmptyString as S}from"../non-empty-string.js";import{accentItalicRuns as N}from"../markup.js";import{BOX_HIDE_WHEN_ROW_EMPTY as K,CARD_LIST_TYPE as k,CARD_ROW_FIELD_PROP as p,CARD_ROW_LINK_PROP as y,CARD_TEMPLATE_SLOT as B}from"./card-row-keys.js";import{withCardsTemplate as H}from"../document/cards-template-on-read.js";import{CARDS_TYPE as L}from"../document/blocks/general/Cards/card-seed.js";import{ORDER_SUMMARY_TYPE as $}from"../document/blocks/general/OrderSummary/block-type.js";import{PROCESS_STEPS_TYPE as j}from"../document/blocks/general/ProcessSteps/row-seed.js";import{withCardListTemplate as U}from"../document/blocks/general/CardList/item-seed.js";import{ARTICLE_BODY_BLOCK as Q,withArticleBodyTemplate as X}from"../document/article-body-seed.js";import{LOGOS_TYPE as q,withLogosTemplate as V}from"../document/blocks/general/Logos/card-seed.js";import{FAQ_TYPE as G,withFaqTemplate as z}from"../document/blocks/general/FAQ/card-seed.js";import{FOOTPRINT_TYPE as J,withFootprintListTemplate as Z}from"../document/blocks/general/Footprint/card-seed.js";const ee="Card template",E=["Text","ImageBlock","ButtonBlock","Flex"];import{BOX_HIDE_WHEN_ROW_EMPTY as st,CARD_LIST_TYPE as it,CARD_ROW_FIELD_PROP as at,CARD_ROW_LINK_PROP as ct,CARD_TEMPLATE_SLOT as ft}from"./card-row-keys.js";function Fe(){return{type:"slot",allow:[...E]}}const te=E.filter(e=>e!=="ButtonBlock"),A="items",P="itemFields";function Ye(){return{type:"slot",allow:[...te]}}function m(e,t){if(!t)return e;const r=typeof t=="string"?[t]:t;return e.filter(n=>r.includes(n.kind??"text"))}const re=[{block:$,typedRows:"rows",linesBetween:!0,fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]},{block:G,typedRows:"items",fields:[{key:"question",label:"Question"},{key:"answer",label:"Answer",multiline:!0}],seedOnInsert:e=>z(e)},{block:J,typedRows:"offices",fields:[{key:"badge",label:"HQ",plain:!0},{key:"role",label:"Role"},{key:"city",label:"City"},{key:"country",label:"Region · country"},{key:"address",label:"Address"},{key:"phone",label:"Phone"},{key:"linkLabel",label:"Button"},{key:"href",label:"Link",kind:"link"}],seed:e=>Z(e)},{block:L,typedRows:"items",fields:[{key:"num",label:"Number"},{key:"since",label:"Corner note"},{key:"label",label:"Label"},{key:"title",label:"Card title"},{key:"value",label:"Value"},{key:"body",label:"Card body",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:"count",label:"Count"},{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],seed:e=>H(L,e)},{block:j,fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title",mark:"accentItalic"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"},{key:"specs",label:"Specs",kind:"list",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]}],blocks:[{type:k,label:"Card list"}]},{block:q,fields:[{key:"label",label:"Name"},{key:"kind",label:"Kind"}],seed:e=>V(e)},{block:k,fields:[{key:"badge",label:"Highlight badge",everySource:!0,plain:!0}],typedRows:A,seed:e=>U(e)},{block:Q,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:e=>X(e)}];function f(){return M("efficient.card-templates",()=>new Map(re.map(e=>[e.block,e])))}function ve(e){for(const t of e){if(typeof t.block!="string"||!t.block)throw new Error("A card template names no block.");const r=[];for(const o of t.blocks??[]){if(typeof o?.type!="string"||!o.type)throw new Error(`The card template of ${t.block} names an empty block.`);if(o.type===D)throw new Error(`The card template of ${t.block} names "${D}" in its blocks. Only a host's seed puts a host part in a card template; a merchant never adds one. Take it out.`);r.some(l=>l.type===o.type)||r.push({type:o.type,label:o.label||o.type})}const n=[];for(const o of t.slots??[]){if(typeof o?.slot!="string"||!o.slot)throw new Error(`The card template of ${t.block} names an empty slot.`);const l=S(o.label),c=Array.isArray(o.fields)?{fields:o.fields.map(a=>({...a}))}:null;n.some(a=>a.slot===o.slot)||n.push({slot:o.slot,...l?{label:l}:null,...c})}const s=n.some(o=>o.fields);if(s&&(t.fields.some(o=>o.everySource)||Y(t.block).length))throw new Error(`The card template of ${t.block} declares slot fields, but the block reads a source: slot fields take the place of a source's fields, so a block with slot fields reads no source.`);s?h().add(t.block):h().delete(t.block);const i=S(t.typedRows);f().set(t.block,{block:t.block,...n.length?{slots:n}:{},fields:t.fields.map(o=>({...o})),blocks:r,typedRows:i,...t.seed?{seed:t.seed}:{},...t.seedOnInsert?{seedOnInsert:t.seedOnInsert}:{},...t.linesBetween===!0?{linesBetween:!0}:{}})}}function oe(e,t){const r=e?f().get(e)?.seed:void 0;return r?r(t):t}function We(e,t){const r=le(e),n=(r.length?r:[B]).filter(l=>t[l]===void 0||Array.isArray(t[l])&&t[l].length===0);if(!n.length)return t;const s={...t};for(const l of n)delete s[l];const i=e?f().get(e)?.seedOnInsert:void 0,o=i?i(s):oe(e,s);return o===s?t:o}function Me(){for(const e of f().values())if(e.blocks?.length)return!0;return!1}function Ne(e){return f().get(e)?.blocks??[]}function Ke(e){for(const t of f().values())if(t.blocks?.some(r=>r.type===e))return!0;return!1}function He(e){return typeof e=="string"&&f().get(e)?.typedRows||""}function $e(e){return typeof e=="string"&&f().get(e)?.linesBetween===!0}function je(e){return typeof e=="string"&&f().has(e)}const ne=[{slot:B}];function b(e){if(typeof e!="string")return[];const t=f().get(e);return t?t.slots??ne:[]}function le(e){return b(e).map(t=>t.slot)}function se(e,t){return b(e).some(r=>r.slot===t)}function Ue(e,t){const r=b(e).find(n=>n.slot===t);return r?r.label??ee:null}function g(e,t){return t?b(e).find(r=>r.slot===t)?.fields:void 0}function ie(e,t){const r=f().get(e)?.fields??[];return m(r,t)}function ae(e,t){if(typeof e!="string")return"";const r=g(e,t);return(r?m(r,"list"):ie(e,"list"))[0]?.key??""}function ce(e,t,r){return _(e)||ae(t,r)}function C(e,t,r){const n=typeof e?.type=="string"?e.type:"";if(!n)return[];const s=g(n,r);if(s)return m(s,t);const i=f().get(n)?.fields??[],o=O(R(e?.props))?.fields,l=o?.length?[...o.map(c=>({...c})),...i.filter(c=>c.everySource&&!o.some(a=>a.key===c.key))]:i;return m(l,t)}function fe(e,t,r,n){if(!e)return null;const s=g(e,n);return s?s.find(i=>i.key===t)??null:r?C(r).find(i=>i.key===t)??null:f().get(e)?.fields.find(i=>i.key===t)??null}function x(e,t){return!e||!t?null:e.fields?.find(r=>r.key===t)??fe(e.ownerType,t,e.owner,e.slot)}function Qe(e,t){return x(e,t)?.plain===!0}function Xe(e,t){return x(e,t)?.kind==="date"}function _(e,t=p){const r=e?.[t];return typeof r=="string"?r.trim():""}function qe(e,t){return e.key||String(t+1)}function Ve(e){const t={};if(e&&typeof e=="object"&&!Array.isArray(e))for(const[r,n]of Object.entries(e))typeof n=="string"&&(t[r]=n);return t}function Ge(e,t){const r=e[K];return!t||!Array.isArray(r)||!r.length?!1:r.every(n=>typeof n!="string"||!t[n]?.trim())}const w={Text:{text:p,href:y},ImageBlock:{src:p,href:y},ButtonBlock:{label:p,href:y},LogoBlock:{alt:p,href:y},Breadcrumb:{currentCrumb:p}},ze=w,ue=new Set(["ButtonBlock.label","LogoBlock.alt"]);function Je(e,t,r){return de(e,t,r)&&!ue.has(`${e}.${r}`)}function de(e,t,r){return pe(e,t,r)!==""}function pe(e,t,r){const n=w[e]?.[r];return n?_(t,n):""}function I(e,t){return!t||!e?null:e[t]??""}function me(e,t){return I(e,t)?.trim()||void 0}function Ze(e,t,r,n,s,i){if(!r)return t;let o=null;for(const[l,c]of Object.entries(w[e]??{})){const a=_(t,c),u=I(r,a);if(u!==null){if(o??={...t},c===y){o[l]=me(r,a);continue}o[l]=x({ownerType:n,fields:s,slot:i},a)?.mark==="accentItalic"?N(u):u}}return o??t}function T(e,t){const r=e?.data?.content;if(!Array.isArray(r)||typeof t!="string")return;const n=(i,o)=>{for(const l of i){if(l?.props?.id===t)return o;for(const[c,a]of Object.entries(l?.props??{})){if(!v(a))continue;const u=se(l.type,c)?{owner:l,slot:c,direct:!0,nested:o!==null,underBox:!1}:o&&{owner:o.owner,slot:o.slot,direct:!1,nested:o.nested,underBox:o.underBox||l.type===W},d=n(a,u);if(d!==void 0)return d}}},s=n(r,null);return s===void 0?null:s}function ye(e,t){const r=T(e,t);return r&&r.owner}function ke(e,t){const r=T(e,t);return r&&r.slot}function et(e,t){const r=T(e,t);return r&&(r.direct?r.owner:null)}function tt(e,t){const r=T(e,t);if(r!==void 0)return r===null?{inCopy:!1,nestedCopy:!1,underBox:!1}:{inCopy:!0,nestedCopy:r.nested,underBox:r.underBox}}function rt(e,t,r){if(t?.type!==k)return[];const n=ye(e,t.props?.id);if(!n){const l=O(R(t.props))?.fields,c=l?.length?l.map(d=>({...d})):be(t.props),a=(f().get(k)?.fields??[]).filter(d=>d.everySource&&!c.some(F=>F.key===d.key)),u=[...c,...a];return m(u,r)}const s=ke(e,t.props?.id)??void 0,i=ce(t.props,n.type,s),o=i&&C(n,"list",s).find(l=>l.key===i)?.fields||[];return m(o,r)}function ot(e,t){return{[p]:"",[A]:e.map(r=>({...r})),[P]:t.map(r=>({...r}))}}function be(e,t){const r=e?.[P];if(!Array.isArray(r))return[];const n=r.flatMap(s=>{if(!s||typeof s!="object")return[];const{key:i,label:o,kind:l,multiline:c,alt:a,next:u}=s;if(typeof i!="string"||!i||typeof o!="string")return[];const d=l==="image"||l==="link"||l==="colour"||l==="date"?l:void 0;return[{key:i,label:o,...d?{kind:d}:{},...c===!0?{multiline:!0}:{},...typeof a=="string"&&a?{alt:a}:{},...typeof u=="string"&&u?{next:u}:{}}]});return m(n,t)}const D="HostPart";export{st as BOX_HIDE_WHEN_ROW_EMPTY,P as CARD_LIST_FIELDS,te as CARD_LIST_ITEM_BLOCKS,A as CARD_LIST_ROWS,it as CARD_LIST_TYPE,at as CARD_ROW_FIELD_PROP,ct as CARD_ROW_LINK_PROP,E as CARD_TEMPLATE_BLOCKS,ee as CARD_TEMPLATE_LABEL,ft as CARD_TEMPLATE_SLOT,D as HOST_PART_TYPE,ze as ROW_BOUND_PROPS,ue as ROW_PART_BY_WORDS,tt as cardCopyPlace,qe as cardKeyOf,rt as cardListFieldsOf,Ye as cardListItemSlot,ot as cardListProps,ce as cardListShows,Ve as cardRow,Ne as cardTemplateBlocks,et as cardTemplateCardOwner,fe as cardTemplateField,ie as cardTemplateFields,C as cardTemplateFieldsOf,$e as cardTemplateLinesBetween,ye as cardTemplateOwner,Fe as cardTemplateSlot,Ue as cardTemplateSlotLabel,le as cardTemplateSlotNames,ke as cardTemplateSlotOf,He as cardTemplateTypedRows,Me as cardTemplatesNameBlocks,ae as defaultListField,m as fieldsOfKind,je as hasCardTemplate,Ke as isCardTemplateBlock,se as isCardTemplateSlot,_ as namedRowField,ve as registerCardTemplates,de as rowBound,Xe as rowFieldIsDate,pe as rowFieldOf,x as rowFieldSpec,I as rowFieldText,Qe as rowFieldWordsArePlain,Ze as rowFilledProps,me as rowLinkText,Je as rowPartByKey,Ge as templateBoxIsEmpty,We as templateOnInsert,oe as templateOnRead};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{phoneKey as
|
|
1
|
+
import{phoneKey as d,tabletKey as n}from"efficient-easel/screen/lib/content/view-tiers";import{HERO_FOCUS as o}from"../hero-media-layout.js";const r=[{block:"HeroSlide",upload:"mediaImage",focus:o.image},{block:"HeroSlide",upload:"mediaImage2",focus:o.image2},{block:"HeroSingle",upload:"mediaImage",focus:o.image},{block:"HeroSingle",upload:"mediaImage2",focus:o.image2},{block:"ImageBlock",upload:"src",focus:"focal"}],t=e=>[e,n(e),d(e)],s=[...new Set(r.flatMap(e=>t(e.focus)))].sort();function g(e,l){const[c,i,m]=t(l).map(a=>typeof e[a]=="string"&&e[a]?e[a]:void 0);return{desktop:c,tablet:i,phone:m}}export{r as PICTURE_DOTS,s as PICTURE_FOCUS_KEYS,t as viewFocusKeys,g as viewFocusValues};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CARDS_BODY_LOOK as
|
|
1
|
+
import{CARDS_BODY_LOOK as n,rowFieldTextSeed as t}from"./blocks/general/Cards/card-seed.js";import{CARD_TEMPLATE_SLOT as i}from"../content/card-row-keys.js";import{DIM as a,TEXT as d,seedNodes as p,token as c,withSeededSlot as l}from"./seed-parts.js";const g="ArticleBody",A={textStyle:"heading-3",...c("headingSmall",20),weight:500,lineHeight:1.4,align:"center"},h={...n,align:"center"},o=640,T=()=>[t("heading",{...d,tag:"h2",align:"center",maxWidth:o},A),t("paragraph",{...a,tag:"p",align:"center",maxWidth:o},h)],_=e=>p(T(),e);function m(e){return _((x,r)=>`${e}~${r==="0"?"heading":"paragraph"}`)}function O(e){return l(e,i,g,m)}export{g as ARTICLE_BODY_BLOCK,A as ARTICLE_HEADING_LOOK,o as ARTICLE_MEASURE,h as ARTICLE_PARAGRAPH_LOOK,m as articleBodySeed,_ as articleBodyTemplateNodes,O as withArticleBodyTemplate};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BOX_TYPE as o,CONTAINER_BLOCKS_SLOT as r}from"../../../container-blocks.js";import{CARDS_BODY_LOOK as
|
|
1
|
+
import{BOX_TYPE as o,CONTAINER_BLOCKS_SLOT as r}from"../../../container-blocks.js";import{CARD_LIST_TYPE as T,CARD_TEMPLATE_SLOT as m}from"../../../../content/card-row-keys.js";import{CARDS_BODY_LOOK as _,rowFieldTextSeed as i}from"../Cards/card-seed.js";import{INNER_BOX as d,TEXT as p,seedNodes as S,slotSeedIds as s,withSeededSlot as L}from"../../../seed-parts.js";const E="label";function a(e){return L(e,m,T,t=>S([I()],s(t,"item")))}function I(){return{type:o,props:{...d,name:"Item"},slots:{[r]:[i(E,{...p,tag:"p"},_)]}}}export{E as CARD_LIST_ITEM_FIELD,a as withCardListTemplate};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type BlockSeed, type SeededNode } from "../../../seed-parts.js";
|
|
2
2
|
type Props = Record<string, unknown>;
|
|
3
|
+
export declare const CARDS_TYPE = "Cards";
|
|
3
4
|
export declare const CARDS_CARD: Props;
|
|
4
5
|
export declare const CARDS_TITLE_LOOK: Props;
|
|
5
6
|
export declare const CARDS_BODY_LOOK: Props;
|
|
@@ -19,6 +20,6 @@ export declare const LABEL_ONLY_CARD_FIELDS: {
|
|
|
19
20
|
export declare const LABEL_ONLY_LABEL_LOOK: Props;
|
|
20
21
|
export declare const LABEL_ONLY_MARK: Props;
|
|
21
22
|
export declare const labelOnlyCardSeed: (linked?: boolean) => BlockSeed;
|
|
22
|
-
export declare const cardIdOf: (own: string) => (
|
|
23
|
+
export declare const cardIdOf: (own: string) => ((type: string, at: string) => string);
|
|
23
24
|
export declare const labelOnlyTemplateNodes: (idOf: (type: string, at: string) => string, linked?: boolean) => SeededNode[];
|
|
24
25
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CARD_ROW_FIELD_PROP as O,CARD_ROW_LINK_PROP as L}from"../../../../content/card-
|
|
1
|
+
import{CARD_ROW_FIELD_PROP as O,CARD_ROW_LINK_PROP as L}from"../../../../content/card-row-keys.js";import{BOX_ANGLE_PROP as S}from"../../../../content/box-angle.js";import{BOX_HIGHLIGHT as R,HOVER_KEY as m}from"../../../../animation/hover.js";import{BOX_TYPE as o,CONTAINER_BLOCKS_SLOT as a}from"../../../container-blocks.js";import{DIM as h,INNER_BOX as l,TEXT as n,boxPadding as s,markBoxProps as E,seedNodes as i,token as r,slotSeedIds as g}from"../../../seed-parts.js";import{labelTextSeed as y}from"../../../text-seeds.js";const H="Cards",D={...l,gap:12,gapPhone:12,...s(32,32,28,28)},f={textStyle:"heading-3",...r("headingSmall",20),weight:500,case:"upper",lineHeight:1.5,letterSpacing:.02},A={textStyle:"body-1",...r("body",15),lineHeight:1.6},p=(e,t,c,x=!1)=>({type:"Text",props:{...t,text:"",[O]:e,_partStyles:{text:{...x?y()._partStyles?.text??{}:{},...c}}}}),d={title:"title",body:"body"},K={title:"name",body:"note"},C=(e=d)=>({type:o,props:{...D,name:"Card"},slots:{[a]:[p(e.title,{...n,tag:"p",widthFit:"fill"},f),p(e.body,{...h,tag:"p",widthFit:"fill"},A)]}}),X=(e,t)=>i([C(t)],e),_={label:d.title,href:"href"},P={textStyle:"body-1",fontRole:"heading",color:"text",...r("body",17),weight:500,case:"upper",letterSpacing:.06,lineHeight:1.5},T=E(9,"main",{[S]:45}),b=(e=!1)=>({type:o,props:{...l,name:"Card",direction:"row",align:"center",gap:16,gapPhone:16,phoneRow:2,sharePhone:"content",wrapPhone:!1,...s(32,28),[L]:_.href,...e?{[m]:R}:{}},slots:{[a]:[{type:o,props:{...T,name:"Mark"}},p(_.label,{...n,tag:"p",widthFit:"fill"},P)]}}),k=e=>g(e,"card"),G=(e,t=!1)=>i([b(t)],e);export{A as CARDS_BODY_LOOK,D as CARDS_CARD,f as CARDS_TITLE_LOOK,H as CARDS_TYPE,_ as LABEL_ONLY_CARD_FIELDS,P as LABEL_ONLY_LABEL_LOOK,T as LABEL_ONLY_MARK,K as SERVED_CARD_FIELDS,d as TYPED_CARD_FIELDS,k as cardIdOf,C as cardsCardSeed,X as cardsTemplateNodes,b as labelOnlyCardSeed,G as labelOnlyTemplateNodes,p as rowFieldTextSeed};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type BlockSeed } from "../../../seed-parts.js";
|
|
2
2
|
type Props = Record<string, unknown>;
|
|
3
|
+
export declare const FAQ_TYPE = "FAQ";
|
|
3
4
|
export declare const FAQ_QUESTION_FIELD = "question";
|
|
4
5
|
export declare const FAQ_ANSWER_FIELD = "answer";
|
|
5
6
|
export declare function faqRunStyleKeys(): string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{BOX_TYPE as o,CONTAINER_BLOCKS_SLOT as
|
|
1
|
+
import{BOX_TYPE as o,CONTAINER_BLOCKS_SLOT as a}from"../../../container-blocks.js";import{CARD_TEMPLATE_SLOT as d}from"../../../../content/card-row-keys.js";import{DIM as l,INNER_BOX as p,TEXT as f,seedNodes as s,token as r,withSeededSlot as S}from"../../../seed-parts.js";import{rowFieldTextSeed as n}from"../Cards/card-seed.js";import{nonEmptyString as c}from"../../../../non-empty-string.js";import{parseSectionHeadPlacement as u}from"../../../../sections/section-head-placement.js";import{textRegionPartKey as E}from"../../../../sections/text-regions.js";import{FAQ_REGIONS as O}from"../../../../sections/faq-text-regions.js";const T="FAQ",_="question",x="answer",w={textStyle:"body-1",fontRole:"heading",...r("body",18,15),weight:500,case:"upper",letterSpacing:.02,lineHeight:1.5},y={textStyle:"body-1",...r("body",15),lineHeight:1.7};function P(){return Object.keys(O).map(E)}const F=()=>({type:o,props:{...p,gap:0,name:"Question"},slots:{rowTitle:[n(_,{...f,tag:"p",widthFit:"fill"},w)],[a]:[n(x,{...l,tag:"p",widthFit:"fill",maxWidth:760},y)]}});function g(t){return u(t.headPlacement)==="own-box"?!1:["num","title","linkText"].some(e=>c(t[e])!==void 0)}function K(t){return g(t)?t:S(t,d,T,e=>{let i=0;return s([F()],m=>m===o?`${e}~row`:`${e}~row.${i++}`)})}export{x as FAQ_ANSWER_FIELD,_ as FAQ_QUESTION_FIELD,T as FAQ_TYPE,F as faqCardSeed,P as faqRunStyleKeys,K as withFaqTemplate};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type BlockSeed } from "../../../seed-parts.js";
|
|
2
|
+
export declare const FOOTPRINT_TYPE = "Footprint";
|
|
2
3
|
export declare const footprintCardSeed: () => BlockSeed;
|
|
3
4
|
export declare const footprintSideCardSeed: () => BlockSeed;
|
|
4
5
|
export declare function isUntouchedFootprintSideRow(props: Record<string, unknown>): boolean;
|