efficient-web-builder 38.2.0 → 40.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +82 -1
  2. package/dist/editor/components/ChatSettingsPanel.js +1 -1
  3. package/dist/editor/components/PagesPanel.js +1 -1
  4. package/dist/editor/components/PreviewThemeFrame.d.ts +1 -1
  5. package/dist/editor/components/PreviewThemeFrame.js +8 -8
  6. package/dist/editor/components/SectionWidthRows.d.ts +2 -2
  7. package/dist/editor/components/SectionWidthRows.js +1 -1
  8. package/dist/editor/components/StylesPanel.js +1 -1
  9. package/dist/editor/components/ThemeCard.js +1 -1
  10. package/dist/editor/components/ThemeColourField.js +1 -1
  11. package/dist/editor/components/TickerSettingsPanel.js +1 -1
  12. package/dist/editor/components/WebsitePreviewButton.js +1 -1
  13. package/dist/editor/components/WebsiteScreenParts.js +1 -1
  14. package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
  15. package/dist/editor/components/storefront-editor.css +19 -13
  16. package/dist/editor/components/useHostDocumentBridge.d.ts +1 -0
  17. package/dist/editor/components/useHostDocumentBridge.js +1 -0
  18. package/dist/editor/lib/puck/ColourControl.d.ts +9 -2
  19. package/dist/editor/lib/puck/ColourControl.js +1 -1
  20. package/dist/editor/lib/puck/blocks/general/Flex/fields.js +1 -1
  21. package/dist/editor/lib/puck/controls.d.ts +4 -3
  22. package/dist/editor/lib/puck/controls.js +1 -1
  23. package/dist/editor/lib/puck/part-anchors.js +1 -1
  24. package/dist/editor/lib/puck/section-text-suppress.js +1 -1
  25. package/dist/format/lib/canvas-accent.d.ts +1 -0
  26. package/dist/format/lib/canvas-accent.js +1 -0
  27. package/dist/format/lib/editor-words-catalogue.d.ts +1 -2
  28. package/dist/format/lib/editor-words-catalogue.js +2 -2
  29. package/dist/format/lib/host-document-bridge.d.ts +28 -0
  30. package/dist/format/lib/host-document-bridge.js +1 -0
  31. package/dist/format/lib/puck/source-row-name.d.ts +2 -0
  32. package/dist/format/lib/puck/source-row-name.js +1 -0
  33. package/dist/format/lib/source-rules/panel-controls-medium.js +5 -4
  34. package/dist/render/components/ContactLocations.js +16 -13
  35. package/dist/render/components/HeroSection.js +4 -4
  36. package/dist/render/components/HeroSingle.js +4 -4
  37. package/dist/render/components/PublishedPartStylesContext.d.ts +1 -0
  38. package/dist/render/components/PublishedPartStylesContext.js +1 -1
  39. package/dist/render/lib/puck/part-rows.js +1 -1
  40. package/dist/render/lib/puck/text-parts.d.ts +2 -0
  41. package/dist/render/lib/puck/text-parts.js +1 -1
  42. package/package.json +5 -5
  43. package/dist/format/components/floating-editor/tokens.d.ts +0 -27
  44. package/dist/format/components/floating-editor/tokens.js +0 -1
@@ -1 +1 @@
1
- "use client";import{jsx as t,jsxs as g}from"react/jsx-runtime";import{ColorPicker as p,HexInput as x}from"efficient-shell/ui";import{SettingsDefaultReset as C,SettingsField as w}from"efficient-easel/panel";import{typedHex as u}from"efficient-easel/pick";import{usePreviewHeader as b}from"../../../render/components/PreviewHeaderContext.js";import{editorEaselWords as N,say as d}from"../../../format/lib/editor-words.js";import{themeSwatches as S}from"./theme-swatches.js";function j({value:e,onChange:o,label:n,id:r,caption:i,inherited:l,after:a,ariaLabel:c}){return t(k,{value:e,onChange:o,label:d(c??n),id:r,caption:i,inherited:l,after:a})}function P(){const{theme:e}=b();return S(e).map(o=>({value:o.value,label:o.name}))}function k({value:e,onChange:o,label:n,id:r,caption:i,inherited:l,after:a}){const c=P(),s=e?null:u(l??""),f=i!==void 0&&(!e||u(i)!==u(e))?i:null,m=h=>{h!==e&&o(h)};return g("div",{className:"sf-colour",children:[t(p,{id:r,value:e,onChange:m,label:n,presets:c,fallback:s??void 0,size:"sm",align:"end"}),f!==null?t("span",{className:"sf-colour-caption",children:f}):t("span",{className:"sf-colour-hexwrap",children:t(x,{value:e||s||"",onChange:m,label:d("{label} hex code",{label:n}),placeholder:e||s?void 0:d("Not set"),className:s?"sf-colour-hex is-inherited":"sf-colour-hex",size:"sm"})}),a]})}function B({value:e,onChange:o,label:n}){return t(p,{value:e,onChange:r=>{r&&r!==e&&o(r)},label:d(n),size:"sm",align:"end"})}function D({label:e,icon:o,value:n,inherited:r,resetTo:i,onChange:l,onReset:a,hint:c}){const s=!!n;return t(w,{label:e,icon:o,changed:s,action:j({value:n,inherited:s?void 0:r,onChange:l,label:e,after:t(C,{words:N()?.panel,label:e,changed:s,detail:i,onReset:a})}),hint:c})}export{B as AnyColourSwatch,j as ColourControl,D as InheritedColourRow};
1
+ "use client";import{jsx as s,jsxs as m}from"react/jsx-runtime";import{ColorPicker as p,HexInput as C}from"efficient-shell/ui";import{SettingsDefaultReset as g,SettingsField as x}from"efficient-easel/panel";import{typedHex as u}from"efficient-easel/pick";import{usePreviewHeader as w}from"../../../render/components/PreviewHeaderContext.js";import{editorEaselWords as b,say as c}from"../../../format/lib/editor-words.js";import{themeSwatches as N}from"./theme-swatches.js";function S({value:e,onChange:o,label:n,id:r,caption:t,inherited:l,ariaLabel:a}){return s(P,{value:e,onChange:o,label:c(a??n),id:r,caption:t,inherited:l})}function j(){const{theme:e}=w();return N(e).map(o=>({value:o.value,label:o.name}))}function P({value:e,onChange:o,label:n,id:r,caption:t,inherited:l}){const a=j(),i=e?null:u(l??""),d=t!==void 0&&(!e||u(t)!==u(e))?t:null,f=h=>{h!==e&&o(h)};return m("div",{className:"sf-colour",children:[s(p,{id:r,value:e,onChange:f,label:n,presets:a,fallback:i??void 0,size:"md",align:"start"}),d!==null?s("span",{className:"sf-colour-caption",children:d}):s("span",{className:"sf-colour-hexwrap",children:s(C,{value:e||i||"",onChange:f,label:c("{label} hex code",{label:n}),placeholder:e||i?void 0:c("Not set"),className:i?"sf-colour-hex is-inherited":"sf-colour-hex",size:"md"})})]})}function T({value:e,onChange:o,label:n}){return s(p,{value:e,onChange:r=>{r&&r!==e&&o(r)},label:c(n),size:"sm",align:"end"})}function R({label:e,icon:o,changed:n,hint:r,onReset:t,resetTo:l,children:a,...i}){return m(x,{label:e,icon:o,htmlFor:i.id,changed:n,hint:r,action:t?s(g,{words:b()?.panel,label:e,changed:!!n,detail:l,onReset:t}):void 0,children:[S({...i,label:e}),a]})}function _({label:e,icon:o,value:n,inherited:r,resetTo:t,onChange:l,onReset:a,hint:i}){const d=!!n;return s(R,{label:e,icon:o,value:n,inherited:d?void 0:r,onChange:l,changed:d,onReset:a,resetTo:t,hint:i})}export{T as AnyColourSwatch,S as ColourControl,R as ColourRow,_ as InheritedColourRow};
@@ -1 +1 @@
1
- import{jsx as s}from"react/jsx-runtime";import{BOX_CARD_PAD as l,BOX_DARKEN as t,BOX_DARKEN_STYLES as p,isBackgroundBox as b}from"../../../../../../format/lib/content/box-background.js";import{containerDirectionPoints as u}from"../../../../../../format/lib/content/container-direction.js";import{deviceField as c}from"efficient-easel/screen/lib/puck/device-fields";import{OpacityIcon as k,StylesIcon as x}from"efficient-easel/icons";import{boxAlignField as F,boxBlockSpacingField as y,boxJustifyField as S,boxPhoneRowField as _,boxShareField as B,boxWrapField as O,gapField as h,group as r,placementField as D,plainText as I,select as R,sidesPaddingFields as d,slider as w,upload as m,withPanelOnly as A}from"../../../controls.js";import{withRowRules as P}from"../../../../../../render/lib/puck/show-when.js";import{FlexSlots as j}from"../../../../../../format/lib/puck/blocks/general/Flex/meta.js";const C={field:"bgImage",set:!0},H={fields:P({_gContent:r("Content"),content:j.content,_gLayout:r("Layout"),direction:{type:"radio",options:u("Flex")},label:A(I("Tab name")),gap:h("Flex"),justify:S(),align:F(),wrap:O(),share:B(),phoneRow:_(),blockSpacing:y(),_gBackground:r("Background image"),bgImage:c("desktop",m("Image","image/*")),bgImagePhone:c("mobile",m("Image","image/*")),darken:w("Darken",s(k,{}),t.min,t.max,t.step,t.fallback,t.unit),darkenStyle:R("Darken style",s(x,{}),p,p[0].value),placement:D("Content position",{stacking:!1})},[[["darken","darkenStyle","placement"],C]]),resolveFields:(i,{fields:e})=>{const o=i.props;if(b(o.bgImage)){const a=d({fallback:{top:l.desktop,bottom:l.desktop,left:l.side,right:l.side}});return g(e,a)}return i.props.padV2!==!0?g(e,d({fallback:{top:24,bottom:24}})):e}};function g(i,e){const o={};let n=!1;for(const[a,f]of Object.entries(i)){if(a in e){n||Object.assign(o,e),n=!0;continue}o[a]=f}return n||Object.assign(o,e),o}export{H as FlexFields};
1
+ import{jsx as c}from"react/jsx-runtime";import{BOX_CARD_PAD as s,BOX_DARKEN as a,BOX_DARKEN_STYLES as m,isBackgroundBox as u}from"../../../../../../format/lib/content/box-background.js";import{containerDirectionPoints as k}from"../../../../../../format/lib/content/container-direction.js";import{deviceField as d}from"efficient-easel/screen/lib/puck/device-fields";import{OpacityIcon as x,StylesIcon as F}from"efficient-easel/icons";import{boxAlignField as y,boxBlockSpacingField as O,boxJustifyField as S,boxPhoneRowField as _,boxShareField as B,boxWrapField as h,foldMetaOf as j,gapField as w,group as p,placementField as D,plainText as I,select as R,sidesPaddingFields as g,slider as A,upload as b,withPanelOnly as P}from"../../../controls.js";import{withRowRules as C}from"../../../../../../render/lib/puck/show-when.js";import{FlexSlots as E}from"../../../../../../format/lib/puck/blocks/general/Flex/meta.js";const v={field:"bgImage",set:!0},M={fields:C({_gContent:p("Content"),content:E.content,_gLayout:p("Layout"),direction:{type:"radio",options:k("Flex")},label:P(I("Tab name")),gap:w("Flex"),justify:S(),align:y(),wrap:h(),share:B(),phoneRow:_(),blockSpacing:O(),_gBackground:p("Background image"),bgImage:d("desktop",b("Image","image/*")),bgImagePhone:d("mobile",b("Image","image/*")),darken:A("Darken",c(x,{}),a.min,a.max,a.step,a.fallback,a.unit),darkenStyle:R("Darken style",c(F,{}),m,m[0].value),placement:D("Content position",{stacking:!1})},[[["darken","darkenStyle","placement"],v]]),resolveFields:(e,{fields:o})=>{const r=e.props;if(u(r.bgImage)){const i=g({fallback:{top:s.desktop,bottom:s.desktop,left:s.side,right:s.side}});return f(o,i)}return e.props.padV2!==!0?f(o,g({fallback:{top:24,bottom:24}})):o}};function f(e,o){const r=Object.fromEntries(Object.entries(o).map(([t,l])=>[t,t in e&&j(l)?e[t]:l])),n={};let i=!1;for(const[t,l]of Object.entries(e)){if(t in o){i||Object.assign(n,r),i=!0;continue}n[t]=l}return i||Object.assign(n,r),n}export{M as FlexFields};
@@ -103,9 +103,6 @@ export declare const BUCKET_ICONS: Record<Bucket, (props: {
103
103
  size?: number;
104
104
  }) => ReactElement>;
105
105
  export declare function entriesHiddenForTab(buckets: readonly Bucket[], active: string): boolean | null;
106
- export declare function SectionHeading({ label }: {
107
- label: string;
108
- }): import("react").JSX.Element;
109
106
  export declare function group(label: string): CustomField<undefined>;
110
107
  export declare function panelNote(text: string): CustomField<undefined>;
111
108
  export declare function PanelNoteLine({ text }: {
@@ -119,6 +116,10 @@ export declare function designGroupHeader(group: DesignGroup): CustomField<undef
119
116
  export declare function foldTitleOf(field: unknown): string | null;
120
117
  export declare function foldMarker<F>(field: F, title: string): F;
121
118
  export declare function quietMarker<F>(field: F): F;
119
+ export declare function PanelBand({ title, children }: {
120
+ title: string;
121
+ children: ReactNode;
122
+ }): import("react").JSX.Element;
122
123
  export declare function GroupLabel({ label }: {
123
124
  label: string;
124
125
  }): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as r,jsxs as R,Fragment as I}from"react/jsx-runtime";import{cloneElement as fe,useId as mt,useRef as oe,useState as V}from"react";import{useEasel as W,useSelectedFields as re}from"efficient-easel/easel";import{say as l,editorEaselWords as x}from"../../../format/lib/editor-words.js";import{readHidable as he,hidableText as me}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Y,LINK_FIELD_MARKER as ge,MEDIA_FIELD_MARKER as be,SCAFFOLD_FIELD_MARKER as xe,TEXT_FIELD_MARKER as E,foldMetaOf as q,textFieldIdentifier as gt}from"efficient-easel/draw";import bt from"../../components/ApplyCornersToSiblings.js";import xt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as yt,CORNER_RADIUS_MAX as ye,CORNER_RADIUS_MIN as D}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as St,IMAGE_CORNERS_LABEL as Ct}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as _t}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as It,GALLERY_LAYOUTS as U,GALLERY_LAYOUT_KEYS as Se}from"../../../format/lib/content/gallery-layout.js";import{anchorSiblingsOf as Et,HERO_GROUP_PLACEMENTS as Tt,HERO_GROUP_PLACEMENT_DEFAULT as Rt,normalisePlacement as Ot,placementPoints as Ce}from"../../../format/lib/hero-group-placement.js";import wt from"../../components/KeepHint.js";import Pt from"../../components/AnchorField.js";import{AdjustIcon as kt,AlignLeftIcon as Nt,EyeIcon as Lt,AlignSeparateIcon as vt,AnimationIcon as _e,BackgroundIcon as At,BorderAllIcon as Ft,BlockSectionIcon as Dt,CartIcon as Bt,ColumnWidthsIcon as Ie,ColumnsIcon as Ht,CornerIcon as Gt,DirectionDownIcon as Mt,DirectionLeftIcon as Kt,DirectionRightIcon as Wt,DirectionUpIcon as Ut,DollarIcon as Xt,FinishIcon as $t,GapIcon as Ee,GridIcon as jt,GroundIcon as zt,HashIcon as Te,HeightIcon as Vt,ImageIcon as Yt,ListIcon as qt,LocationIcon as ie,NudgeIcon as Jt,PaddingAllIcon as Zt,PaddingBottomIcon as Re,PaddingLeftIcon as Oe,PaddingRightIcon as we,PaddingTopIcon as Pe,PageIcon as ke,PhoneIcon as Qt,PlacementIcon as en,ProductSizeIcon as tn,StickyIcon as nn,RotateIcon as on,SquareIcon as rn,TypeIcon as ln,WidthIcon as an,WrapIcon as sn}from"efficient-easel/icons";import{FieldGlyph as Ne}from"../../components/FieldGlyph.js";import{resolvePageBackground as cn}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as Le,CORNER_SIDE_POINTS as dn,hasOwnSectionCorners as un,normalizeCornerSides as ve}from"../../../format/lib/content/section-corners.js";import{SECTION_MOTION_NONE as pn,SECTION_MOTION_OPTIONS as fn}from"../../../format/lib/content/section-animation.js";import{enclosingSectionProps as Ae}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsField as h,SettingsGroupHead as hn,SettingsGroupSub as mn,SettingsBorder as gn,SettingsSegmented as bn,SettingsSides as xn,SettingsSidesEach as Fe,sidesStartEach as yn,SettingsSwitch as De,borderSides as Sn,borderStartEach as Cn}from"efficient-easel/panel";import{FieldSelect as _n,ListField as In}from"efficient-easel/fields";import{DisplayChips as En}from"efficient-shell/ui";import{desktopDisplayChanged as Tn,partShownOnDesktop as Rn,partShownOnPhone as On,phoneDisplayChanged as wn,withDesktopPart as Pn,withPhonePart as kn}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as Nn,Checkbox as Ln,CornersInput as vn,DateTimePicker as An,FOCAL_DEFAULT as Fn,PictureTiles as Be,PositionInput as Dn,Slider as Bn,Tooltip as He}from"efficient-shell/ui";import{ColourControl as Ge,InheritedColourRow as Hn}from"./ColourControl.js";import Me from"./MarkupToolbar.js";import{deviceField as g}from"efficient-easel/screen/lib/puck/device-fields";import{NO_CONTROL_FIELD as Gn,NoControlMark as J,noControlField as X}from"efficient-easel/screen/lib/puck/panel-no-control-mark";import{OWN_BOX_FIELD as Mn}from"../../../format/lib/puck/own-box.js";import{PHONE_CLEAR as Kn,phoneKey as B,resolvePhoneValue as le}from"../../../format/lib/puck/phone-override.js";import{SuppressibleText as Wn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Un,CARD_OUTLINE_OPTIONS as Xn,DEFAULT_CARD_INDEX_FORMAT as $n,DEFAULT_CARD_OUTLINE as jn}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as zn,DEFAULT_COVER_INDEX as Vn}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Yn}from"efficient-easel/draw";import qn from"../../components/MediaUploadField.js";import Jn from"../../components/MultiSelectField.js";import Zn from"../../components/SectionThemePicker.js";import Qn from"../../components/SearchSelectField.js";import eo from"../../components/StorefrontLinkField.js";import{UiIcon as Ke}from"efficient-easel/draw/client";import{SECTION_PADDING as T}from"../../../format/lib/content/section-padding.js";import{hasPhoneHeight as to,resolveSectionMinHeight as no}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as Z,SECTION_STICK_LABEL as ae,hasPhoneStick as oo,resolveSectionStick as ro}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as io,SECTION_MIN_HEIGHT_GROUP_LABEL as $,SECTION_SCREEN_PCT as lo}from"../../../format/lib/content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as ao,containerDirectionPoints as so,resolveContainerDirection as We}from"../../../format/lib/content/container-direction.js";import{BOX_ALIGN_POINTS as co,BOX_BLOCK_SPACING_LABEL as uo,BOX_BLOCK_SPACING_POINTS as Ue,BOX_JUSTIFY_POINTS as Xe,BOX_PHONE_ROW_LABEL as po,BOX_PHONE_ROW_MAX as fo,BOX_PHONE_ROW_MIN as $e,BOX_SHARE_LABEL as je,BOX_SHARE_POINTS as se,BOX_WRAP_LABEL as ho,BOX_WRAP_POINTS as ze}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as H}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as mo}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as go,normalizeTheme as bo,siteButtonPaint as xo}from"../../../format/lib/theme.js";import{CONTAINER_GAP as ce,CONTAINER_GAP_BUILT_IN as yo,GAP_FIELD_CONTAINER as So,hasOwnContainerGap as Co,resolveContainerGap as _o}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as Io,CARD_IMAGE_BG_OFF as Eo,CARD_IMAGE_BG_SWATCH_NAMES as To,CARD_IMAGE_BG_SWATCHES as Ro,isCardImageBackgroundInheriting as Oo,cardImageBackgroundChoice as wo,THEME_CARD_IMAGE_BG as Po}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as ko,SECTION_BG_SWATCHES as No,SECTION_BG_SWATCH_NAMES as Lo,THEME_SECTION_BG as vo,isSectionBackgroundInheriting as Ao}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Fo}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Do,TYPE_SIZE_INHERIT as Bo,isTypeSizeInheriting as Ho}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Go,WIDTH_CHOICE_LABEL as Mo,WIDTH_INHERIT as Ko,resolveWidth as Wo,sectionRunsFullWidth as Ve}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as Ye}from"./panel-heading-scope.js";import{withStyleKind as Uo}from"efficient-easel/style-clipboard";import{useEaselSession as Xo}from"efficient-easel/screen/lib/session-context";import{backendOf as $o}from"../website-session.js";function G(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!q(n)&&Uo(n,`section:${t}`);return e}function il({children:e}){return r("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function qe(){return null}function jo(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(qe,{},e)}function zo(e){return e.type===qe}function P(e){return zo(e)?void 0:e}function N(e,t){return l("{value} from {from}",{value:e,from:t})}function Vo(){const{appState:e}=W(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=Wo(t,"full");return n==="page"?N(`${o}px`,l("the page")):n==="contained"?N(l("Contained"),l("the page")):N(l("Full"),l("the page"))}function Yo(){const{blockGap:e}=H();return e===null?l("this container's own spacing"):N(`${e}px`,l("Styles"))}function qo({inherited:e,onReset:t,label:n}){return r(y,{words:x()?.panel,label:l(n),changed:!e,detail:Yo(),onReset:t})}function Jo({inherited:e,onReset:t,label:n}){return r(y,{words:x()?.panel,label:l(n),changed:!e,detail:Vo(),onReset:t})}function L({value:e,onChange:t,label:n,placeholder:o,hint:i,multiline:a,hideable:c=!0,markup:s=!0}){const{text:d,hidden:u}=he(e),f=oe(null),p=oe(null),m=w=>t(c?{text:w,hidden:u}:w),b=()=>t({text:d,hidden:!u}),C=c&&u,O=mt(),_=i?nr(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(i)}):r(wt,{children:l(i)}):void 0,z=u?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return r(h,{label:l(n),icon:r(ln,{}),htmlFor:O,className:C?"is-hidden":void 0,hint:_,action:c?r(He,{content:z,children:r("button",{type:"button",className:"sf-field-eye","aria-pressed":u,"aria-label":z,onClick:b,children:u?r(Ke,{name:"eye-off",size:14}):r(Ke,{name:"eye",size:14})})}):void 0,children:R("div",{className:"sf-copybox",children:[s&&r(Me,{target:a?p:f,value:d,onChange:m}),a?r("textarea",{id:O,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:w=>m(w.target.value)}):r("input",{id:O,ref:f,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:w=>m(w.target.value)})]})})}function ll(e,t){return{...e,[xe]:t}}function al(e){const t=e[E];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[E]:{...t,offPage:!0}}}function sl(e){return!e||typeof e!="object"?!1:e[E]?.offPage===!0}const Je="sfPanelOnly";function cl(e){if(!e[E])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Je]:!0}}function dl(e){return!!e&&typeof e=="object"&&e[Je]===!0}function ul(e){const t=e[E];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[E]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as ka,SCALAR_TEXT_CONTROLS as Na}from"efficient-easel/draw";function pl(e,t){if(!e[E])throw new Error("inOwnBox: the field holds no authored text");const{[Gn]:o,...i}=e;return{...i,[Mn]:!0,render:t}}const Zo=new Set(Yn),v=(e,t)=>{const n={...t,[E]:e};if(!Zo.has(e.control))return n;const o=t.render;return{...X(n,"authored-copy"),render:i=>r(Wn,{name:i.name,children:o(i)})}},fl="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Qo={field:"source.slug",set:!0},hl={not:Qo},er="Select a word, then press the highlighter.",tr=new Set([er]),nr=e=>tr.has(e);function ml(e,t,n){return v({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(L,{value:o,onChange:i,label:e,placeholder:t,hint:n})})}function gl(e,t,n){return v({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(L,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0})})}function bl(e,t,n){return v({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(L,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function xl(e,t,n){return v({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(L,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1})})}function yl(e){return{type:"custom",[ge]:{label:e},render:({value:t,onChange:n})=>r(eo,{value:me(t),onChange:n,label:e})}}function Sl(e,t,n){return v({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(L,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const Cl={Design:kt,Animation:_e};function _l(e,t){return e.includes("Design")?t!=="Design":null}function or({label:e}){return r(hn,{title:l(e),level:Ye(1)})}function rr({level:e,label:t}){return e===1?r(or,{label:t}):r(ar,{label:t})}function Ze(e,t){return{type:"custom",[Y]:{label:e,level:t},render:()=>r(rr,{level:t,label:e})}}function S(e){return Ze(e,2)}function Il(e){return{type:"custom",render:()=>r(ir,{text:e})}}function ir({text:e}){return r("p",{className:"sf-note",children:l(e)})}function El(e){return Ze(e,1)}function Tl(e){return q(e)!==null&&e?.tabs!==void 0}const Qe=new Map;function Rl(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Qe.get(n)??{type:"custom",tabs:t,[Y]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(I,{})};return Qe.set(n,o),o}function Ol(e){return q(e)!==null&&e?.designGroup!==void 0}const et=new Map;function wl(e){const t=et.get(e)??{type:"custom",[Y]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>r(I,{})};return et.set(e,t),t}function lr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Pl(e,t){return lr(e)===t?e:{...e,marker:!0,fold:t,render:()=>r(I,{})}}function kl(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>r(I,{})}}function ar({label:e}){return r(mn,{title:l(e),level:Ye(2)})}function tt({swatches:e,current:t,onPick:n,names:o}){const i=e.find(s=>s.toLowerCase()===t.toLowerCase()),a=i?o?.[i]:void 0,c=a?l(a):t;return R("div",{className:"sf-swatches",children:[e.map(s=>{const d=o?.[s]?l(o[s]):s;return r(He,{content:d,children:r("button",{type:"button","aria-pressed":t.toLowerCase()===s.toLowerCase(),className:`sf-swatch ${t.toLowerCase()===s.toLowerCase()?"is-active":""}`,style:{background:s},onClick:()=>n(s),"aria-label":d})},s)}),r("span",{className:"sf-swatch-hex",children:c})]})}function Nl(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=Ao(n,t);return r(h,{label:l(e),icon:r(At,{}),changed:!i,action:r(y,{words:x()?.panel,label:l(e),changed:!i,detail:l("the theme's section background"),onReset:()=>o(ko)}),children:tt({swatches:No,current:i?vo:n??t??"",onPick:o,names:Lo})})}}}function sr(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,a=Oo(i,t);return r(h,{label:l(e),icon:r(zt,{}),changed:!a,action:r(y,{words:x()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(Io)}),children:tt({swatches:Ro,current:a?Po:wo(i,t),onPick:o,names:To})})}}}function Ll(e=n=>n,t){return G({_gSectionTheme:S(Fo),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r(Zn,{value:e(n),onChange:o,followLabel:t})}})}function M({min:e,max:t,step:n,value:o,onChange:i,suffix:a="",readout:c=!0,notch:s,ariaLabel:d,disabled:u=!1}){const f=s!==void 0&&Number.isFinite(s)&&s>=e&&s<=t;return r("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(s-e)/(t-e)}:void 0,children:r(Bn,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:c,label:d===void 0?void 0:l(d),disabled:u,size:"sm",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&i(p)}})})}function K(e,t,n,o,i,a,c="",s){return{type:"custom",render:d=>r(h,{label:l(e),icon:P(t),action:s?s("storedValue"in d?d.storedValue:d.value,d.onChange):void 0,children:M({min:n,max:o,step:i,value:typeof d.value=="number"?d.value:a,suffix:c,ariaLabel:e,onChange:d.onChange})})}}function nt(e,t){const{min:n,max:o,step:i=1,unsetLabel:a,hint:c,restTrack:s,unsetMark:d,icon:u}=t;return{type:"custom",render:({value:f,onChange:p})=>{const m=typeof f=="number"?f:null,b=m===null;return r(h,{label:l(e),icon:u?P(u):void 0,value:b?d||a===void 0?void 0:l(a):`${m}px`,changed:!b,action:d?fe(d,{changed:!b,onReset:()=>p(null)}):r(y,{words:x()?.panel,label:l(e),changed:!b,onReset:()=>p(null)}),hint:typeof c=="string"?l(c):c,children:s?s({min:n,max:o,step:i,px:m,label:e,onChange:p}):M({min:n,max:o,step:i,value:m??n,readout:!1,ariaLabel:e,onChange:p})})}}}function vl(e){const t=K("Gap",r(Ee,{}),ce.min,ce.max,ce.step,yo[e],"px",(n,o)=>r(qo,{inherited:!Co(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[So]:e,render:n=>t.render({...n,value:_o(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}const Q="Corners";function de(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,i=o!==null;return r(h,{label:l(Q),icon:r(Gt,{}),changed:i,action:fe(e.mark,{changed:i,onReset:()=>n(null)}),hint:e.hint,children:r(cr,{tier:e,px:o,onRadius:n})})}}}function ot(e){let t=null;try{t=re()}catch{t=null}return[t?.values?.[e],n=>t?.onChange(e,n)]}function cr({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),i=e.useClosedReason?e.useClosedReason():null,[a,c]=ot(e.sidesKey),s=ve(a)??[...Le];return r(vn,{label:l(Q),value:s,corners:dn,onChange:d=>{const u=ve(d)??[];c(u.length===Le.length?null:u)},radius:t,onRadiusChange:n,radiusMin:D,radiusMax:ye,radiusStep:e.step??1,radiusPlaceholder:String(o),disabled:i!==null,disabledReason:i??void 0})}function rt(){return X({type:"custom",render:()=>r(J,{})},"always")}function dr({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=H(),i=typeof o=="number"?`${o}px`:l("not set");return r(y,{words:x()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):N(i,l("Styles")),onReset:n})}function ur(){const{cornerRadiusPx:e}=H();return typeof e=="number"?e:D}function pr(){return de({sidesKey:"sectionCornerSides",useFollowed:ur,useClosedReason:()=>lt()?l(it):null,mark:r(dr,{label:Q}),hint:r(fr,{})})}const it="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function lt(){return Ve(A())}function fr(){return r(I,{children:lt()?it:"Follows Styles ▸ Basics ▸ Corners until you set a number here."})}function Al(){return G({_gShape:S("Shape"),sectionCorners:pr(),sectionCornerSides:rt(),sectionBorder:at("desktop"),sectionBorderPhone:at("mobile")})}const hr=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function mr(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function gr(){let e;try{const t=bo(H().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||go.line}function br({value:e,onChange:t,tier:n}){const[o]=ot("sectionBorder"),i=gr(),a=e&&typeof e=="object"?e:{},c=n==="mobile"?o&&typeof o=="object"?o:{}:{},[s,d]=V(()=>Cn(a,c)),u=hr();return r(h,{label:l("Border"),icon:r(Ft,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(gn,{label:l("Border"),value:a,each:s,onChange:f=>t(mr(f)),placeholder:{sides:Sn(c),style:c.style??"solid",color:c.color||i},presets:[i],words:u,max:mo})})}function at(e){return g(e,{type:"custom",render:({value:t,onChange:n})=>r(br,{value:t,onChange:n,tier:e})})}function Fl(){return{_gMotion:S("Motion"),sectionAnimation:pe("Entrance",r(_e,{}),[...fn],pn)}}function ue(){let e=null;try{const{appState:t,selectedItem:n}=W(i=>i),o=n?.props?.id?String(n.props.id):void 0;e=o?Ae(t?.data,o):null}catch{e=null}return e!==null&&Ve(e)}function st(e){const{cornerRadiusPx:t}=H(),n=ue(),o=typeof t=="number"?t:e;let i=null;try{const{appState:c,selectedItem:s}=W(u=>u),d=s?.props?.id?String(s.props.id):void 0;i=d?Ae(c?.data,d):null}catch{i=null}if(n||!i)return o;const a=i.sectionCorners;return un(a)?a:o}function xr({label:e,changed:t=!1,onReset:n=()=>{}}){const o=ue(),i=st(D),a=o?"Site":"Section";return r(y,{words:x()?.panel,label:l(e),changed:t,detail:N(`${i}px`,o?l("Styles"):l("the section")),onReset:n})}function yr(){return r(I,{children:ue()?l("The section is full width, so this card follows Styles ▸ Basics ▸ Corners."):l("Follows the section's Corners until you set a number here.")})}function Sr(){return de({sidesKey:"cardCornerSides",useFollowed:()=>st(D),mark:r(xr,{label:Q}),hint:r(yr,{})})}function Cr(){return{type:"custom",render:()=>r(bt,{})}}function Dl(e){return{...e,render:t=>r(xt,{render:e.render,props:t})}}function Bl(){return{_gShape:S("Shape"),cardCorners:Sr(),cardCornerSides:rt(),cardCornersApplyAll:Cr()}}function Hl(){return k("Justify",r(vt,{}),Xe,Xe[0].value)}function Gl(){return k("Item alignment",r(Nt,{}),co,"stretch")}function Ml(){return k(ho,r(sn,{}),ze,ze[0].value)}function Kl(){return{type:"custom",render:({value:e,onChange:t})=>{const n=se.find(o=>o.value===e)??se[0];return r(h,{label:l(je),icon:r(Ie,{}),value:l(n.label),children:r(Be,{className:"sf-gallery-layouts",label:l(je),value:n.value,onChange:t,options:se.map(o=>({value:o.value,label:l(o.label),picture:r("span",{className:"sf-gallery-pic",children:_r(o.weights).map((i,a)=>r("i",{style:{gridColumn:`span ${i}`}},a))})}))})})}}}function _r(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 Wl(){return k(uo,r(Ee,{}),Ue,Ue[0].value)}function Ul(){return K(po,r(Qt,{}),$e,fo,1,$e)}function Xl(e){const t=pe(ao,jo("`Direction` names how a container's children run — a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),so(e),We(e,void 0));return{type:"custom",render:n=>t.render({...n,value:We(e,n.value),onChange:o=>n.onChange(o)})}}function $l(e,t,n,o,i,a){return{type:"custom",render:({value:c,onChange:s})=>r(h,{label:l(e),icon:r(Ne,{noun:a}),action:r(y,{words:x()?.panel,label:l(e),changed:!Ho(c),detail:l("the Text style in Styles"),onReset:()=>s(Bo),defaultAction:{onPress:()=>s(Do),title:l("Keep this section's own built-in size"),icon:r(Dt,{})}}),children:M({min:t,max:n,step:o,value:typeof c=="number"?c:i,suffix:"px",ariaLabel:e,onChange:s})})}}function jl(){return{_gCellWidth:S("Cell width"),gridSpan:k("Positions",r(Ie,{}),[{label:"Auto",value:""},...Array.from({length:_t},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function A(){let e=null;try{e=W(t=>t).selectedItem}catch{e=null}return e?.props??{}}function Ir({min:e,max:t,step:n,px:o,label:i,onChange:a,desktopKey:c,fallback:s}){const d=A()[c],u=le(void 0,d,s);return r(I,{children:M({min:e,max:t,step:n,value:le(o,d,s),readout:!1,ariaLabel:i,notch:u,onChange:a})})}function Er({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:i=()=>{}}){const a=A()[t],c=le(void 0,a,n);return r(y,{words:x()?.panel,label:l(e),changed:o,detail:l("{value} on desktop",{value:`${c}px`}),onReset:i})}function Tr(e){return nt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:r(Er,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(Ir,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function zl(e){return{type:"custom",render:({value:t,onChange:n})=>r(Or,{...e,value:t,onChange:n})}}function Rr({label:e,icon:t,options:n,value:o,resolved:i,restWord:a,onChange:c}){const s=n.some(d=>d.value===o);return r(h,{label:l(e),icon:P(t),action:r(y,{words:x()?.panel,label:l(e),changed:s,detail:l("{value} on desktop",{value:l(a)}),onReset:()=>c(void 0)}),children:te({options:n,value:s?o:i,onChange:d=>c(d),ariaLabel:e})})}function Or({label:e,icon:t,options:n,desktopKey:o,resolve:i,value:a,onChange:c}){const s=A()[o],d=i(void 0,s),u=n.find(f=>f.value===d)?.label??"";return r(Rr,{label:e,icon:t,options:n,value:a,resolved:d,restWord:u,onChange:c})}const wr={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Pr={Top:Pe,Bottom:Re,Left:Oe,Right:we},kr=e=>{const t=Pr[e];return r(t,{})};function Vl(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=_=>wr[_],a=_=>K(i("Top"),r(Pe,{}),T.min,T.max,T.step,_,"px"),c=(_,z,w,ne=T)=>g("mobile",Tr({label:i(_),icon:kr(_),desktopKey:z,min:ne.min,max:ne.max,step:ne.step,fallback:w})),s=e.top??T.min,d=e.bottom??T.min,u="sectionPaddingLeft",f="sectionPaddingRight",p=e.sideBounds??T,m=e.side??p.min,b=e.sidePhone??m,C=e.phone===!0,O=_=>C?g("desktop",_):_;return G({...o?{_gSpacing:S("Padding")}:{},[t]:O(a(s)),...C?{[B(t)]:c("Top",t,s)}:{},...e.only==="top"?{}:{[n]:O(K(i("Bottom"),r(Re,{}),T.min,T.max,T.step,d,"px")),...C?{[B(n)]:c("Bottom",n,d)}:{}},...e.sides?{[u]:O(K(i("Left"),r(Oe,{}),p.min,p.max,p.step,m,"px")),...C?{[B(u)]:c("Left",u,b,p)}:{},[f]:O(K(i("Right"),r(we,{}),p.min,p.max,p.step,m,"px")),...C?{[B(f)]:c("Right",f,b,p)}:{}}:{}})}const j=["top","right","bottom","left"],Nr={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},ct=e=>typeof e=="number"?e:null;function Lr(e,t,n){const o={};for(const i of j)n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function vr({tier:e,o:t}){let n=null;try{n=re()}catch{n=null}const o=n?.values??{},i=e==="mobile"?t.phoneKeys:t.keys,a=Object.fromEntries(j.map(u=>[u,ct(o[i[u]])])),c=Object.fromEntries(j.map(u=>[u,String(e==="mobile"?ct(o[t.keys[u]])??t.fallback[u]:t.fallback[u])])),[s,d]=V(()=>yn(a,c));return r(h,{label:l("Padding"),icon:r(Zt,{}),action:r(Fe,{each:s,label:l("Each side"),onChange:d}),children:r(xn,{label:l("Padding"),each:s,value:a,placeholder:c,min:t.min,max:t.max,step:t.step,onChange:u=>{const f=Lr(i,a,u);Object.keys(f).length&&n?.onChangeMany(f)},words:{sides:{top:l("Padding top"),right:l("Padding right"),bottom:l("Padding bottom"),left:l("Padding left")},vertical:l("Top and bottom"),horizontal:l("Left and right"),unit:"px"}})})}function Yl(e={}){const t={...Nr,...e.keys},n={keys:t,phoneKeys:Object.fromEntries(j.map(s=>[s,B(t[s])])),fallback:{top:0,right:0,bottom:0,left:0,...e.fallback},min:e.min??0,max:e.max??200,step:e.step??4},o=e.phone!==!1,i=s=>{const d={type:"custom",render:()=>r(vr,{tier:s,o:n})};return o?g(s,d):d},a=()=>X({type:"custom",render:()=>r(J,{})},"always"),c=j.filter(s=>s!=="top");return G({...e.group===!1?{}:{_gSpacing:S("Padding")},[n.keys.top]:i("desktop"),...o?{[n.phoneKeys.top]:i("mobile")}:{},...Object.fromEntries(c.map(s=>[n.keys[s],{...a(),reachedBy:n.keys.top}])),...o?Object.fromEntries(c.map(s=>[n.phoneKeys[s],g("mobile",a())])):{}})}const dt=e=>typeof e=="number"?e:null;function Ar(e,t,n){const o={};for(const i of["x","y"])n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function Fr({o:e}){let t=null;try{t=re()}catch{t=null}const n=t?.values??{},o={x:dt(n[e.keys.x]),y:dt(n[e.keys.y])},i=l(e.label??"Position"),a=!!(o.x||o.y),c=u=>{const f=Ar(e.keys,o,u);Object.keys(f).length&&t?.onChangeMany(f)},s=r(Dn,{label:i,value:o,onChange:c,words:{x:l("Left and right"),y:l("Up and down"),unit:"px"},placeholder:{x:"0",y:"0"},min:e.min,max:e.max,step:e.step??1}),d=r(y,{words:x()?.panel,label:i,changed:a,detail:"0 px, 0 px",onReset:()=>c({x:null,y:null})});return e.label===null?R("div",{className:"sf-position-line",children:[s,d]}):r(h,{label:i,icon:r(Jt,{}),changed:a,action:d,children:s})}function ql(e){return{[e.keys.x]:{type:"custom",render:()=>r(Fr,{o:e})},[e.keys.y]:{...X({type:"custom",render:()=>r(J,{})},"always"),reachedBy:e.keys.x}}}const Dr={contained:"Contained",page:"Page",full:"Full"},ee="Width";function Jl(e,t=Go,n=!0){const o=t.map(i=>({label:Mo[i]??Dr[i],value:i}));return G({...n?{_gWidth:S(ee)}:{},widthMode:{type:"custom",render:({onChange:i,field:a})=>r(h,{label:l(ee),icon:r(an,{}),action:n?r(Jo,{inherited:a?.inherited??!1,onReset:()=>i(Ko),label:ee}):void 0,children:te({options:o,value:a?.currentValue||e,onChange:i,ariaLabel:ee})})}})}function Zl(){const e=o=>({type:"custom",render:({value:i,onChange:a})=>r(h,{label:$,icon:P(r(Vt,{})),action:o?o(a):void 0,children:te({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(i)?i:"auto",onChange:a,ariaLabel:$})})}),t=()=>({type:"custom",render:({value:o,onChange:i,field:a})=>{const c=a?.unit==="%"?"%":"px",s=c==="%"?lo:io;return r("div",{className:"sf-field",children:M({min:s.min,max:s.max,step:s.step,value:typeof o=="number"?o:s.fallback,suffix:c,ariaLabel:$,onChange:i})})}}),n=()=>pe("Unit",r(Te,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return G({_gHeight:S($),sectionHeightMode:g("desktop",e()),sectionHeightValue:g("desktop",t()),sectionHeightUnit:g("desktop",n()),sectionHeightModePhone:g("mobile",e(o=>r(Br,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:g("mobile",t()),sectionHeightUnitPhone:g("mobile",n())})}function Br({onClear:e}){const t=A(),n=to(t),o=no(t),i=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return r(y,{words:x()?.panel,label:l($),changed:n,detail:i,onReset:e})}function Ql(){const e=n=>({type:"custom",render:({value:o,onChange:i,id:a,name:c})=>r(Hr,{value:o,onChange:i,labelId:`${a??c??"stickTop"}-label`,phone:n})}),t=()=>({type:"custom",render:({value:n,onChange:o})=>r("div",{className:"sf-field",children:M({min:Z.min,max:Z.max,step:Z.step,value:typeof n=="number"?n:Z.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:o})})});return{_gStick:S(ae),stickTop:g("desktop",e(!1)),stickTopDistance:g("desktop",t()),stickTopPhone:g("mobile",e(!0)),stickTopDistancePhone:g("mobile",t())}}function Hr({value:e,onChange:t,labelId:n,phone:o}){const i=A(),a=ro(i),c=o?a.phone:e===!0;return r(h,{label:l(ae),labelId:n,icon:P(r(nn,{})),action:R(I,{children:[o?r(y,{words:x()?.panel,label:l(ae),changed:oo(i),detail:l("{value} on desktop",{value:a.desktop?`${a.desktopDistance}px`:l("Off")}),onReset:()=>t(void 0)}):null,r(De,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const ut="e.g. about";function ea(){return{_gAnchor:S("Anchor"),anchor:v({control:"plainText",label:"Name",placeholder:ut},{type:"custom",render:({value:e,onChange:t})=>r(Pt,{value:e,onChange:t,nameBox:(n,o)=>r(L,{value:n,onChange:o,label:"Name",placeholder:ut,hideable:!1,markup:!1})})})}}function ta(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=`${a??c??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return r(h,{label:l(e),icon:t,htmlFor:s,hint:n===void 0?void 0:l(n),children:r(An,{id:s,value:Number.isFinite(d)?new Date(d):null,onChange:u=>i(u?u.toISOString():"")})})}}}function F(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=typeof o=="boolean"?o:t,d=`${a??c??e}-label`;return r(h,{label:l(e),labelId:d,icon:n,action:r(De,{checked:s,onChange:i,ariaLabelledBy:d})})}}}function na(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const i=`${String(n??o??"pageBackground")}-colour`;return r(h,{label:l("Background"),icon:r(ke,{}),htmlFor:i,action:r(Ge,{id:i,label:"Background",value:cn(e),onChange:t})})}}}function oa(e,t){return{type:"custom",render:({value:n,onChange:o,id:i})=>{const a=typeof n=="boolean"?n:t,c=`${i??e}-checkbox`;return r(h,{label:l(e),htmlFor:c,className:"sf-checkbox",action:r(Ln,{id:c,checked:a,onChange:o})})}}}const ra={follows:"fill"},ia={follows:"ink"};function la(e,t,n){if(typeof t!="string"){const o=t.follows;return{type:"custom",render:({value:i,onChange:a})=>r(Gr,{label:e,part:o,icon:n,value:i,onChange:a})}}return{type:"custom",render:({value:o,onChange:i})=>r(h,{label:l(e),icon:n,action:Ge({value:o||t,onChange:i,label:e})})}}function Gr({label:e,part:t,icon:n,value:o,onChange:i}){const a=xo(H().theme),c=t==="fill"?a.fill:a.ink;return r(Hn,{label:l(e),icon:n,value:o||"",inherited:c,resetTo:N(c.toUpperCase(),l("Styles")),onChange:i,onReset:()=>i("")})}const Mr=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function pt({label:e,value:t,onChange:n,points:o=Mr}){const i=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return r(Nn,{label:l(e),value:t,points:i,onChange:n})}function aa(){return X({type:"custom",render:()=>r(J,{})},"always")}const Kr=Ce([]);function sa(e,{stacking:t,fallback:n=Rt}){return{type:"custom",render:({value:o,onChange:i})=>{const a=Tt.includes(o)?o:n;return t?r(Wr,{label:e,value:a,onChange:i}):ft({label:e,value:a,onChange:i,points:Kr})}}}function Wr({label:e,value:t,onChange:n}){const{appState:o,selectedItem:i}=W(s=>s),a=i?.props?.id?String(i.props.id):void 0,c=a?Et(o?.data,a):[];return ft({label:e,value:t,onChange:n,points:Ce(c,a)})}function ft({label:e,value:t,onChange:n,points:o}){const i=o.find(a=>a.disabled);return r(h,{label:l(e),icon:r(en,{}),hint:i?.title?l(i.title):void 0,children:pt({label:e,value:Ot(t),onChange:n,points:o})})}const ca={top:r(Ut,{}),right:r(Wt,{}),bottom:r(Mt,{}),left:r(Kt,{})};function da(e,t,n,o,i,a){const c=f=>t.find(p=>p.value===f),s=f=>({value:f,label:"",disabled:!0,title:o}),d=f=>{const p=t.find(b=>b.cell===f);if(!p)return s(`missing-${f}`);const m=a?.[f];return m?{value:p.value,label:p.label,icon:m}:{value:p.value,label:p.label}},u=[s("corner-top-left"),d("top"),s("corner-top-right"),d("left"),s("centre"),d("right"),s("corner-bottom-left"),d("bottom"),s("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:p})=>{const m=t.some(b=>b.value===f)?f:n;return r(h,{label:l(e),icon:i,value:c(m)?.label?l(c(m).label):"",children:pt({label:e,value:m,onChange:p,points:u})})}}}const Ur="\0note";function k(e,t,n,o,i){return{type:"custom",options:n,fallback:o,...i?{note:i}:{},render:({value:a,onChange:c,field:s})=>{const d=s.options??n,u=s.fallback??o,f=d.some(p=>p.value===a)?a:u;return r(h,{label:l(e),icon:P(t),children:r(_n,{value:f,ariaLabel:l(e),onChange:c,options:[...i?[{label:l(i),value:Ur,disabled:!0}]:[],...d.map(p=>({label:l(p.label),value:p.value}))]})})}}}function ua(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:i,field:a})=>r(Jn,{label:e,options:(a.options??t).map(c=>({...c,label:l(c.label)})),value:Array.isArray(o)?o:[],onChange:i,...n?{emptyLabel:l(n)}:{}})}}function pa(e,t,n,o){return{type:"custom",options:t,fallback:n,render:({value:i,onChange:a,field:c})=>r(Qn,{label:e,options:(c.options??t).map(s=>({...s,label:l(s.label)})),fallback:c.fallback??n,value:i,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function fa(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const i={value:n,onChange:o,...t};return r(e,{...i})}}}function te({options:e,value:t,onChange:n,ariaLabel:o,disabled:i=!1}){return r(bn,{options:e.map(a=>a.picture?{id:a.value,label:a.picture,title:l(a.title??a.label)}:{id:a.value,label:l(a.label),title:a.title===void 0?void 0:l(a.title)}),value:t,onChange:n,ariaLabel:l(o),disabled:i})}const ha=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function pe(e,t,n,o){const i=n.map(a=>typeof a=="string"?{label:a,value:a}:a);return{type:"custom",render:({value:a,onChange:c,field:s})=>r(h,{label:l(e),icon:P(t),children:te({options:i,value:i.some(d=>d.value===a)?a:a||s?.currentValue||o,onChange:c,ariaLabel:e})})}}function ma(e,t,n,o={}){return{type:"custom",[be]:!0,render:({value:i,onChange:a})=>r(qn,{value:i||"",onChange:a,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen})}}const ga={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function ba({value:e,onChange:t,label:n}){const o=e||{},i=!!o.pending,a=i?"var(--fg-dim, #888)":o.ok?"#1d9e75":"#d85a30",c=!!$o(Xo()).geocode,s=(d,u)=>t({...o,[d]:u===""?void 0:Number(u)});return R(h,{label:l(n),icon:r(ie,{}),children:[c&&R(I,{children:[r("button",{type:"button",disabled:i,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 10px",fontSize:13,cursor:i?"default":"pointer",opacity:i?.6:1,border:"1px solid var(--border-strong, #ccc)",borderRadius:6,background:"transparent",color:"inherit"},children:i?l("Finding…"):l("Find coordinates")}),o.status&&r("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:a},children:l(o.status)}),r("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:l("Coordinates from OpenStreetMap")})]}),r("button",{type:"button",onClick:()=>t({...o,manual:!o.manual}),style:{marginTop:8,padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer",textDecoration:"underline"},children:o.manual?l("Hide manual coordinates"):l("Enter coordinates manually")}),o.manual&&R("div",{style:{marginTop:8,display:"grid",gap:8},children:[r(h,{label:l("Latitude"),icon:r(ie,{}),children:r("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"34.0990198"}),value:typeof o.lat=="number"?o.lat:"",onChange:d=>s("lat",d.target.value)})}),r(h,{label:l("Longitude"),icon:r(ie,{}),children:r("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"-117.9842833"}),value:typeof o.lng=="number"?o.lng:"",onChange:d=>s("lng",d.target.value)})})]})]})}function Xr(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function $r(e,t,n){const o=e.map(i=>({text:i?.text??""}));return t===null||t<0||t>=e.length?o:o.map((i,a)=>a===t?{text:n}:i)}function xa(e,t){return e===null?null:t>e?e:null}function jr(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 ya={label:"Ticker items",icon:r(qt,{})};function Sa(e,t,n,o){return{type:"custom",[E]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},render:({value:i,onChange:a})=>r(zr,{label:e,icon:P(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:a,markup:o==="markup"})}}function zr({label:e,icon:t,items:n,placeholder:o,onChange:i,markup:a=!1}){const c=oe(null),[s,d]=V(null),u=p=>p.map(m=>({text:m?.text??""})),f=p=>{const m=jr(n,p,s);m===null&&(c.current=null),d(m),i(u(p))};return r(In,{label:l(e),icon:t,noun:l("item"),items:n,onChange:f,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?r(Me,{target:c,value:Xr(n,s),onChange:p=>i($r(n,s??-1,p)),disabled:s===null,label:s===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:s+1})}):void 0,renderRow:(p,m,b)=>r("input",{type:"text",className:a&&s===m?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:m+1}),onChange:C=>b({text:C.target.value}),onFocus:C=>{c.current=C.currentTarget,d(m)}})})}function Ca(e,t){const n=`${e.label} — row ${t+1}`;return v({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:i})=>r(L,{value:o,onChange:i,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function _a(e){return{_gCards:S("Cards"),coverIndex:k("Cover image",r(Yt,{}),zn,String(Vn),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:sr("Image background",Eo),cardImage:Yr(),spinOnHover:F("Rotate on hover",e?.spinDefault??!0,r(on,{}))}}function Ia(){return{outline:k("Card outline",r(rn,{}),Xn,jn),indexBadge:k("Card number",r(Te,{}),Un,$n),showBadge:F("Product badge",!0,r(Ne,{noun:"tag"}))}}function Ea(e){const t=e&&"bottomDefault"in e?e.bottomDefault:!0,n=e&&"defaults"in e?e.defaults:{showCardSizes:t,showCardBuy:t,showCardPage:t};return{_gShowOnCard:S("Show on a card"),showCardPrice:F("Price",!0,r(Xt,{})),showCardFinishes:F("Finish swatches",!0,r($t,{})),showCardSizes:F("Sizes",n.showCardSizes,r(tn,{})),showCardBuy:F("Buy button",n.showCardBuy,r(Bt,{})),showCardPage:F("Page button",n.showCardPage,r(ke,{}))}}function Ta(e,t="display"){const n=B(t);return{[t]:g("desktop",{type:"custom",render:({value:o,onChange:i})=>r(ht,{parts:e,changed:Tn(o),shown:a=>Rn(o,a),onPress:(a,c)=>i(Pn(o,a,c)),onReset:()=>i(void 0)})}),[n]:g("mobile",{type:"custom",render:({value:o,onChange:i})=>r(Vr,{parts:e,desktopKey:t,value:o,onChange:i})})}}function ht({parts:e,changed:t,shown:n,onPress:o,onReset:i,detail:a}){const c=l("Display");return r(h,{label:c,icon:r(Lt,{}),changed:t,action:r(y,{words:x()?.panel,label:c,changed:t,detail:a,onReset:i}),children:r(En,{label:c,items:e.map(s=>({id:s.id,label:l(s.label),shown:n(s.id)})),onChange:o})})}function Vr({parts:e,desktopKey:t,value:n,onChange:o}){const i=A()[t];return r(ht,{parts:e,changed:wn(n),shown:a=>On(i,n,a),onPress:(a,c)=>o(kn(n,a,c)),onReset:()=>o(Kn),detail:l("the same as Desktop")})}function Yr(){return nt("Card image",{min:D,max:ye,step:yt,hint:"Rounds the picture. The card's own corner is in Styles."})}function Ra(){return de({sidesKey:"cornerSides",step:St,useFollowed:()=>D,mark:r(qr,{label:Ct}),hint:l("Rounds the picture. Left alone it stays square.")})}function qr({label:e,changed:t=!1,onReset:n=()=>{}}){return r(y,{words:x()?.panel,label:l(e),changed:t,onReset:n})}function Oa(){return{type:"custom",render:({value:e,onChange:t})=>r(Jr,{value:typeof e=="string"?e:"",onChange:t})}}function Jr({value:e,onChange:t}){const[n,o]=V(null),i=Se.filter(c=>n===null||U[c].across===n),a=e&&e in U?U[e]:null;return R(I,{children:[r(h,{label:l("Photos in a row"),icon:r(Ht,{}),children:R("div",{className:"sf-gallery-filter",children:[r("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:l("All")}),It.map(c=>r("button",{type:"button","aria-pressed":n===c,onClick:()=>o(c),children:c},c))]})}),r(h,{label:l("Layout"),icon:r(jt,{}),value:a?l(a.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:i.length,total:Se.length}),children:r(Be,{className:"sf-gallery-layouts",label:l("Layout"),value:e,onChange:t,onClear:()=>t(""),options:i.map(c=>({value:c,label:l(U[c].label),picture:r("span",{className:"sf-gallery-pic",children:U[c].desktop.map(([s,d],u)=>r("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${d}`}},u))})}))})})]})}export{Qo as BOUND_TO_POST,fl as BOUND_TO_POST_NOTE,Cl as BUCKET_ICONS,ga as CUSTOM_FIELD_MEDIA,ba as CoordsField,ca as EDGE_ARROWS,Fn as FOCAL_DEFAULT,Mr as FOCAL_POINTS,Y as FOLD_FIELD_MARKER,ra as FOLLOWS_SITE_BUTTON,ia as FOLLOWS_SITE_BUTTON_INK,pt as FocalPicker,ar as GroupLabel,er as HIGHLIGHT_HINT,L as HidableTextField,ge as LINK_FIELD_MARKER,il as Label,be as MEDIA_FIELD_MARKER,ha as MEDIA_TYPE_OPTIONS,hl as NOT_BOUND_TO_POST,ir as PanelNoteLine,Or as PhoneChoiceRow,Rr as PhoneChoiceStrip,ft as PlacementGridView,xe as SCAFFOLD_FIELD_MARKER,Na as SCALAR_TEXT_CONTROLS,it as SECTION_BLEEDS_HINT,Nr as SIDE_PAD_KEYS,or as SectionHeading,te as Segmented,qo as SiteGapDefaultReset,M as Slider,tt as Swatches,ka as TEXT_CONTROL_KINDS,E as TEXT_FIELD_MARKER,ya as TICKER_ITEMS_ROW,zr as TextListField,Jo as WidthDefaultReset,jr as aimAfterListChange,ea as anchorFields,N as backTo,Nl as backgroundField,Gl as boxAlignField,Wl as boxBlockSpacingField,Hl as boxJustifyField,Ul as boxPhoneRowField,Kl as boxShareField,Ml as boxWrapField,Rl as bucketHeader,Sr as cardCornersField,sr as cardImageBackgroundField,Yr as cardImageField,_a as cardMediaFields,Bl as cardShapeFields,Ea as cardShowFields,Ia as cardStyleFields,jl as cellWidthFields,oa as checkbox,la as colorInput,xl as copyText,rt as cornerSidesField,de as cornersRowField,ta as dateTime,wl as designGroupHeader,Xl as directionField,Ta as displayFields,da as edgePad,_l as entriesHiddenForTab,xa as focusAfterRemove,aa as focusKeptField,Pl as foldMarker,q as foldMetaOf,lr as foldTitleOf,Oa as galleryLayoutField,vl as gapField,S as group,Zl as heightFields,me as hidableText,nr as hintIsWhileTyping,P as iconOf,Ra as imageCornersField,pl as inOwnBox,Tl as isBucketHeader,Ol as isDesignGroupHeader,zo as isNoGlyph,yl as linkField,ua as multiSelect,jo as noGlyph,na as pageBackgroundField,Il as panelNote,zl as phoneChoiceField,Tr as phoneOverrideField,sa as placementField,bl as plainText,Sl as plainTextarea,ql as positionFields,Ar as positionPatch,nt as pxField,kl as quietMarker,he as readHidable,Xr as rowText,pa as searchSelect,El as section,Fl as sectionAnimationFields,at as sectionBorderField,pr as sectionCornersField,Al as sectionShapeFields,Ll as sectionThemeFields,pe as segmented,k as select,$r as setRowText,G as sharedStyleKinds,Yl as sidesPaddingFields,Lr as sidesPaddingPatch,$l as sizeField,K as slider,fa as sourceField,Vl as spacingFields,Ql as stickFields,Dl as templateField,ml as text,gt as textFieldIdentifier,sl as textFieldOffPage,dl as textFieldPanelOnly,Sa as textList,Ca as textListRowField,gl as textarea,F as toggle,ma as upload,Vo as usePageWidthDetail,A as useSelectedProps,ot as useSelectedSibling,Yo as useSiteGapDetail,Jl as widthField,ul as withIdentifier,al as withOffPage,cl as withPanelOnly,ll as withScaffold};
1
+ "use client";import{jsx as r,jsxs as O,Fragment as I}from"react/jsx-runtime";import{cloneElement as ge,useId as xt,useRef as ie,useState as U}from"react";import{useEasel as j,useSelectedFields as le}from"efficient-easel/easel";import{say as l,editorEaselWords as x}from"../../../format/lib/editor-words.js";import{readHidable as be,hidableText as xe}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as q,LINK_FIELD_MARKER as ye,MEDIA_FIELD_MARKER as Se,SCAFFOLD_FIELD_MARKER as Ce,TEXT_FIELD_MARKER as E,foldMetaOf as J,textFieldIdentifier as yt}from"efficient-easel/draw";import St from"../../components/ApplyCornersToSiblings.js";import Ct from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as _t,CORNER_RADIUS_MAX as _e,CORNER_RADIUS_MIN as B}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as It,IMAGE_CORNERS_LABEL as Et}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Tt}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Ot,GALLERY_LAYOUTS as X,GALLERY_LAYOUT_KEYS as Ie}from"../../../format/lib/content/gallery-layout.js";import{anchorSiblingsOf as Rt,HERO_GROUP_PLACEMENTS as wt,HERO_GROUP_PLACEMENT_DEFAULT as Pt,normalisePlacement as kt,placementPoints as Ee}from"../../../format/lib/hero-group-placement.js";import Lt from"../../components/KeepHint.js";import Nt from"../../components/AnchorField.js";import{AdjustIcon as vt,AlignLeftIcon as At,EyeIcon as Ft,AlignSeparateIcon as Dt,AnimationIcon as Te,BackgroundIcon as Bt,BorderAllIcon as Ht,BlockSectionIcon as Gt,CartIcon as Mt,ColumnWidthsIcon as Oe,ColumnsIcon as Kt,CornerIcon as Wt,DirectionDownIcon as Ut,DirectionLeftIcon as jt,DirectionRightIcon as Xt,DirectionUpIcon as $t,DollarIcon as zt,FinishIcon as Vt,GapIcon as Re,GridIcon as Yt,GroundIcon as qt,HashIcon as we,HeightIcon as Jt,ImageIcon as Zt,ListIcon as Qt,LocationIcon as ae,NudgeIcon as en,PaddingAllIcon as tn,PaddingBottomIcon as Pe,PaddingLeftIcon as ke,PaddingRightIcon as Le,PaddingTopIcon as Ne,PageIcon as ve,PhoneIcon as nn,PlacementIcon as on,ProductSizeIcon as rn,StickyIcon as ln,RotateIcon as an,SquareIcon as sn,TypeIcon as cn,WidthIcon as dn,WrapIcon as un}from"efficient-easel/icons";import{FieldGlyph as Ae}from"../../components/FieldGlyph.js";import{resolvePageBackground as pn}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as Fe,CORNER_SIDE_POINTS as fn,hasOwnSectionCorners as hn,normalizeCornerSides as De}from"../../../format/lib/content/section-corners.js";import{SECTION_MOTION_NONE as mn,SECTION_MOTION_OPTIONS as gn}from"../../../format/lib/content/section-animation.js";import{enclosingSectionProps as Be}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsField as m,SettingsGroup as bn,SettingsGroupSub as xn,SettingsBorder as yn,SettingsSegmented as Sn,SettingsSides as Cn,SettingsSidesEach as He,sidesStartEach as _n,SettingsSwitch as Ge,borderSides as In,borderStartEach as En}from"efficient-easel/panel";import{FieldSelect as Tn,ListField as On}from"efficient-easel/fields";import{DisplayChips as Rn}from"efficient-shell/ui";import{desktopDisplayChanged as wn,partShownOnDesktop as Pn,partShownOnPhone as kn,phoneDisplayChanged as Ln,withDesktopPart as Nn,withPhonePart as vn}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as An,Checkbox as Fn,CornersInput as Dn,DateTimePicker as Bn,FOCAL_DEFAULT as Hn,PictureTiles as Me,PositionInput as Gn,Slider as Mn,Tooltip as Ke}from"efficient-shell/ui";import{ColourRow as We,InheritedColourRow as Kn}from"./ColourControl.js";import Ue from"./MarkupToolbar.js";import{deviceField as g}from"efficient-easel/screen/lib/puck/device-fields";import{NO_CONTROL_FIELD as Wn,NoControlMark as Z,noControlField as $}from"efficient-easel/screen/lib/puck/panel-no-control-mark";import{OWN_BOX_FIELD as Un}from"../../../format/lib/puck/own-box.js";import{PHONE_CLEAR as jn,phoneKey as H,resolvePhoneValue as se}from"../../../format/lib/puck/phone-override.js";import{SuppressibleText as Xn}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as $n,CARD_OUTLINE_OPTIONS as zn,DEFAULT_CARD_INDEX_FORMAT as Vn,DEFAULT_CARD_OUTLINE as Yn}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as qn,DEFAULT_COVER_INDEX as Jn}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Zn}from"efficient-easel/draw";import Qn from"../../components/MediaUploadField.js";import eo from"../../components/MultiSelectField.js";import to from"../../components/SectionThemePicker.js";import no from"../../components/SearchSelectField.js";import oo from"../../components/StorefrontLinkField.js";import{UiIcon as je}from"efficient-easel/draw/client";import{SECTION_PADDING as T}from"../../../format/lib/content/section-padding.js";import{hasPhoneHeight as ro,resolveSectionMinHeight as io}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as Q,SECTION_STICK_LABEL as ce,hasPhoneStick as lo,resolveSectionStick as ao}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as so,SECTION_MIN_HEIGHT_GROUP_LABEL as z,SECTION_SCREEN_PCT as co}from"../../../format/lib/content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as uo,containerDirectionPoints as po,resolveContainerDirection as Xe}from"../../../format/lib/content/container-direction.js";import{BOX_ALIGN_POINTS as fo,BOX_BLOCK_SPACING_LABEL as ho,BOX_BLOCK_SPACING_POINTS as $e,BOX_JUSTIFY_POINTS as ze,BOX_PHONE_ROW_LABEL as mo,BOX_PHONE_ROW_MAX as go,BOX_PHONE_ROW_MIN as Ve,BOX_SHARE_LABEL as Ye,BOX_SHARE_POINTS as de,BOX_WRAP_LABEL as bo,BOX_WRAP_POINTS as qe}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as G}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as xo}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as yo,normalizeTheme as So,siteButtonPaint as Co}from"../../../format/lib/theme.js";import{CONTAINER_GAP as ue,CONTAINER_GAP_BUILT_IN as _o,GAP_FIELD_CONTAINER as Io,hasOwnContainerGap as Eo,resolveContainerGap as To}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as Oo,CARD_IMAGE_BG_OFF as Ro,CARD_IMAGE_BG_SWATCH_NAMES as wo,CARD_IMAGE_BG_SWATCHES as Po,isCardImageBackgroundInheriting as ko,cardImageBackgroundChoice as Lo,THEME_CARD_IMAGE_BG as No}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as vo,SECTION_BG_SWATCHES as Ao,SECTION_BG_SWATCH_NAMES as Fo,THEME_SECTION_BG as Do,isSectionBackgroundInheriting as Bo}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Ho}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Go,TYPE_SIZE_INHERIT as Mo,isTypeSizeInheriting as Ko}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Wo,WIDTH_CHOICE_LABEL as Uo,WIDTH_INHERIT as jo,resolveWidth as Xo,sectionRunsFullWidth as Je}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as $o}from"./panel-heading-scope.js";import{withStyleKind as zo}from"efficient-easel/style-clipboard";import{useEaselSession as Vo}from"efficient-easel/screen/lib/session-context";import{backendOf as Yo}from"../website-session.js";import{describedAs as R}from"../../../format/lib/host-document-bridge.js";function M(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!J(n)&&zo(n,`section:${t}`);return e}function al({children:e}){return r("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function Ze(){return null}function qo(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(Ze,{},e)}function Jo(e){return e.type===Ze}function k(e){return Jo(e)?void 0:e}function N(e,t){return l("{value} from {from}",{value:e,from:t})}function Zo(){const{appState:e}=j(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=Xo(t,"full");return n==="page"?N(`${o}px`,l("the page")):n==="contained"?N(l("Contained"),l("the page")):N(l("Full"),l("the page"))}function Qo(){const{blockGap:e}=G();return e===null?l("this container's own spacing"):N(`${e}px`,l("Styles"))}function er({inherited:e,onReset:t,label:n}){return r(y,{words:x()?.panel,label:l(n),changed:!e,detail:Qo(),onReset:t})}function tr({inherited:e,onReset:t,label:n}){return r(y,{words:x()?.panel,label:l(n),changed:!e,detail:Zo(),onReset:t})}function v({value:e,onChange:t,label:n,placeholder:o,hint:i,multiline:a,hideable:c=!0,markup:s=!0}){const{text:d,hidden:u}=be(e),f=ie(null),p=ie(null),h=P=>t(c?{text:P,hidden:u}:P),b=()=>t({text:d,hidden:!u}),C=c&&u,w=xt(),_=i?lr(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(i)}):r(Lt,{children:l(i)}):void 0,Y=u?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return r(m,{label:l(n),icon:r(cn,{}),htmlFor:w,className:C?"is-hidden":void 0,hint:_,action:c?r(Ke,{content:Y,children:r("button",{type:"button",className:"sf-field-eye","aria-pressed":u,"aria-label":Y,onClick:b,children:u?r(je,{name:"eye-off",size:14}):r(je,{name:"eye",size:14})})}):void 0,children:O("div",{className:"sf-copybox",children:[s&&r(Ue,{target:a?p:f,value:d,onChange:h}),a?r("textarea",{id:w,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:P=>h(P.target.value)}):r("input",{id:w,ref:f,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:P=>h(P.target.value)})]})})}function sl(e,t){return{...e,[Ce]:t}}function cl(e){const t=e[E];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[E]:{...t,offPage:!0}}}function dl(e){return!e||typeof e!="object"?!1:e[E]?.offPage===!0}const Qe="sfPanelOnly";function ul(e){if(!e[E])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Qe]:!0}}function pl(e){return!!e&&typeof e=="object"&&e[Qe]===!0}function fl(e){const t=e[E];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[E]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as Aa,SCALAR_TEXT_CONTROLS as Fa}from"efficient-easel/draw";function hl(e,t){if(!e[E])throw new Error("inOwnBox: the field holds no authored text");const{[Wn]:o,...i}=e;return{...i,[Un]:!0,render:t}}const nr=new Set(Zn),ee={type:"radio",options:[{value:!0},{value:!1}]},et={text:{type:"object",objectFields:{text:{type:"text"},hidden:ee}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:ee}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},A=(e,t)=>{const n=R({...t,[E]:e},{...et[e.control],label:e.label});if(!nr.has(e.control))return n;const o=t.render;return{...$(n,"authored-copy"),render:i=>r(Xn,{name:i.name,children:o(i)})}},ml="Everything else on this block comes from the linked post. Unlink it to edit by hand.",or={field:"source.slug",set:!0},gl={not:or},rr="Select a word, then press the highlighter.",ir=new Set([rr]),lr=e=>ir.has(e);function bl(e,t,n){return A({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(v,{value:o,onChange:i,label:e,placeholder:t,hint:n})})}function xl(e,t,n){return A({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(v,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0})})}function yl(e,t,n){return A({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(v,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Sl(e,t,n){return A({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(v,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1})})}function Cl(e){return{type:"custom",[ye]:{label:e},...R({},{type:"text",label:e}),render:({value:t,onChange:n})=>r(oo,{value:xe(t),onChange:n,label:e})}}function _l(e,t,n){return A({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(v,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const Il={Design:vt,Animation:Te};function El(e,t){return e.includes("Design")?t!=="Design":null}function tt(e,t){return{type:"custom",[q]:{label:e,level:t},marker:!0,fold:e,render:()=>r(I,{})}}function S(e){return tt(e,2)}function Tl(e){return{type:"custom",render:()=>r(ar,{text:e})}}function ar({text:e}){return r("p",{className:"sf-note",children:l(e)})}function Ol(e){return tt(e,1)}function Rl(e){return J(e)!==null&&e?.tabs!==void 0}const nt=new Map;function wl(e,t){const n=`${e}\0${t?t.join(""):""}`,o=nt.get(n)??{type:"custom",tabs:t,[q]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(I,{})};return nt.set(n,o),o}function Pl(e){return J(e)!==null&&e?.designGroup!==void 0}const ot=new Map;function kl(e){const t=ot.get(e)??{type:"custom",[q]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>r(I,{})};return ot.set(e,t),t}function sr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Ll(e,t){return sr(e)===t?e:{...e,marker:!0,fold:t,render:()=>r(I,{})}}function Nl(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>r(I,{})}}function vl({title:e,children:t}){const[n,o]=U(()=>!pe.has(e));return r(bn,{title:e,open:n,onToggle:i=>{o(i),i?pe.delete(e):pe.add(e)},children:t})}const pe=new Set;function Al({label:e}){return r(xn,{title:l(e),level:$o(2)})}function rt({swatches:e,current:t,onPick:n,names:o}){const i=e.find(s=>s.toLowerCase()===t.toLowerCase()),a=i?o?.[i]:void 0,c=a?l(a):t;return O("div",{className:"sf-swatches",children:[e.map(s=>{const d=o?.[s]?l(o[s]):s;return r(Ke,{content:d,children:r("button",{type:"button","aria-pressed":t.toLowerCase()===s.toLowerCase(),className:`sf-swatch ${t.toLowerCase()===s.toLowerCase()?"is-active":""}`,style:{background:s},onClick:()=>n(s),"aria-label":d})},s)}),r("span",{className:"sf-swatch-hex",children:c})]})}function Fl(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=Bo(n,t);return r(m,{label:l(e),icon:r(Bt,{}),changed:!i,action:r(y,{words:x()?.panel,label:l(e),changed:!i,detail:l("the theme's section background"),onReset:()=>o(vo)}),children:rt({swatches:Ao,current:i?Do:n??t??"",onPick:o,names:Fo})})}}}function cr(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,a=ko(i,t);return r(m,{label:l(e),icon:r(qt,{}),changed:!a,action:r(y,{words:x()?.panel,label:l(e),changed:!a,detail:l("the theme's image stage"),onReset:()=>o(Oo)}),children:rt({swatches:Po,current:a?No:Lo(i,t),onPick:o,names:wo})})}}}function Dl(e=n=>n,t){return M({_gSectionTheme:S(Ho),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r(to,{value:e(n),onChange:o,followLabel:t})}})}function K({min:e,max:t,step:n,value:o,onChange:i,suffix:a="",readout:c=!0,notch:s,ariaLabel:d,disabled:u=!1}){const f=s!==void 0&&Number.isFinite(s)&&s>=e&&s<=t;return r("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(s-e)/(t-e)}:void 0,children:r(Mn,{min:e,max:t,step:n,value:o,suffix:a||void 0,showInput:c,label:d===void 0?void 0:l(d),disabled:u,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&i(p)}})})}function W(e,t,n,o,i,a,c="",s){return{type:"custom",...R({},{type:"number",label:e}),render:d=>r(m,{label:l(e),icon:k(t),action:s?s("storedValue"in d?d.storedValue:d.value,d.onChange):void 0,children:K({min:n,max:o,step:i,value:typeof d.value=="number"?d.value:a,suffix:c,ariaLabel:e,onChange:d.onChange})})}}function it(e,t){const{min:n,max:o,step:i=1,unsetLabel:a,hint:c,restTrack:s,unsetMark:d,icon:u}=t;return{type:"custom",render:({value:f,onChange:p})=>{const h=typeof f=="number"?f:null,b=h===null;return r(m,{label:l(e),icon:u?k(u):void 0,value:b?d||a===void 0?void 0:l(a):`${h}px`,changed:!b,action:d?ge(d,{changed:!b,onReset:()=>p(null)}):r(y,{words:x()?.panel,label:l(e),changed:!b,onReset:()=>p(null)}),hint:typeof c=="string"?l(c):c,children:s?s({min:n,max:o,step:i,px:h,label:e,onChange:p}):K({min:n,max:o,step:i,value:h??n,readout:!1,ariaLabel:e,onChange:p})})}}}function Bl(e){const t=W("Gap",r(Re,{}),ue.min,ue.max,ue.step,_o[e],"px",(n,o)=>r(er,{inherited:!Eo(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[Io]:e,render:n=>t.render({...n,value:To(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}const te="Corners";function fe(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,i=o!==null;return r(m,{label:l(te),icon:r(Wt,{}),changed:i,action:ge(e.mark,{changed:i,onReset:()=>n(null)}),hint:e.hint,children:r(dr,{tier:e,px:o,onRadius:n})})}}}function lt(e){let t=null;try{t=le()}catch{t=null}return[t?.values?.[e],n=>t?.onChange(e,n)]}function dr({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),i=e.useClosedReason?e.useClosedReason():null,[a,c]=lt(e.sidesKey),s=De(a)??[...Fe];return r(Dn,{label:l(te),value:s,corners:fn,onChange:d=>{const u=De(d)??[];c(u.length===Fe.length?null:u)},radius:t,onRadiusChange:n,radiusMin:B,radiusMax:_e,radiusStep:e.step??1,radiusPlaceholder:String(o),disabled:i!==null,disabledReason:i??void 0})}function at(){return $({type:"custom",render:()=>r(Z,{})},"always")}function ur({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=G(),i=typeof o=="number"?`${o}px`:l("not set");return r(y,{words:x()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):N(i,l("Styles")),onReset:n})}function pr(){const{cornerRadiusPx:e}=G();return typeof e=="number"?e:B}function fr(){return fe({sidesKey:"sectionCornerSides",useFollowed:pr,useClosedReason:()=>ct()?l(st):null,mark:r(ur,{label:te}),hint:r(hr,{})})}const st="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function ct(){return Je(F())}function hr(){return r(I,{children:ct()?st:"Follows Styles ▸ Basics ▸ Corners until you set a number here."})}function Hl(){return M({_gShape:S("Shape"),sectionCorners:fr(),sectionCornerSides:at(),sectionBorder:dt("desktop"),sectionBorderPhone:dt("mobile")})}const mr=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function gr(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function br(){let e;try{const t=So(G().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||yo.line}function xr({value:e,onChange:t,tier:n}){const[o]=lt("sectionBorder"),i=br(),a=e&&typeof e=="object"?e:{},c=n==="mobile"?o&&typeof o=="object"?o:{}:{},[s,d]=U(()=>En(a,c)),u=mr();return r(m,{label:l("Border"),icon:r(Ht,{}),action:r(He,{each:s,label:l("Each side"),onChange:d}),children:r(yn,{label:l("Border"),value:a,each:s,onChange:f=>t(gr(f)),placeholder:{sides:In(c),style:c.style??"solid",color:c.color||i},presets:[i],words:u,max:xo})})}function dt(e){return g(e,{type:"custom",render:({value:t,onChange:n})=>r(xr,{value:t,onChange:n,tier:e})})}function Gl(){return{_gMotion:S("Motion"),sectionAnimation:me("Entrance",r(Te,{}),[...gn],mn)}}function he(){let e=null;try{const{appState:t,selectedItem:n}=j(i=>i),o=n?.props?.id?String(n.props.id):void 0;e=o?Be(t?.data,o):null}catch{e=null}return e!==null&&Je(e)}function ut(e){const{cornerRadiusPx:t}=G(),n=he(),o=typeof t=="number"?t:e;let i=null;try{const{appState:c,selectedItem:s}=j(u=>u),d=s?.props?.id?String(s.props.id):void 0;i=d?Be(c?.data,d):null}catch{i=null}if(n||!i)return o;const a=i.sectionCorners;return hn(a)?a:o}function yr({label:e,changed:t=!1,onReset:n=()=>{}}){const o=he(),i=ut(B),a=o?"Site":"Section";return r(y,{words:x()?.panel,label:l(e),changed:t,detail:N(`${i}px`,o?l("Styles"):l("the section")),onReset:n})}function Sr(){return r(I,{children:he()?l("The section is full width, so this card follows Styles ▸ Basics ▸ Corners."):l("Follows the section's Corners until you set a number here.")})}function Cr(){return fe({sidesKey:"cardCornerSides",useFollowed:()=>ut(B),mark:r(yr,{label:te}),hint:r(Sr,{})})}function _r(){return{type:"custom",render:()=>r(St,{})}}function Ml(e){return{...e,render:t=>r(Ct,{render:e.render,props:t})}}function Kl(){return{_gShape:S("Shape"),cardCorners:Cr(),cardCornerSides:at(),cardCornersApplyAll:_r()}}function Wl(){return L("Justify",r(Dt,{}),ze,ze[0].value)}function Ul(){return L("Item alignment",r(At,{}),fo,"stretch")}function jl(){return L(bo,r(un,{}),qe,qe[0].value)}function Xl(){return{type:"custom",render:({value:e,onChange:t})=>{const n=de.find(o=>o.value===e)??de[0];return r(m,{label:l(Ye),icon:r(Oe,{}),value:l(n.label),children:r(Me,{className:"sf-gallery-layouts",label:l(Ye),value:n.value,onChange:t,options:de.map(o=>({value:o.value,label:l(o.label),picture:r("span",{className:"sf-gallery-pic",children:Ir(o.weights).map((i,a)=>r("i",{style:{gridColumn:`span ${i}`}},a))})}))})})}}}function Ir(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 $l(){return L(ho,r(Re,{}),$e,$e[0].value)}function zl(){return W(mo,r(nn,{}),Ve,go,1,Ve)}function Vl(e){const t=me(uo,qo("`Direction` names how a container's children run — a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),po(e),Xe(e,void 0));return{type:"custom",render:n=>t.render({...n,value:Xe(e,n.value),onChange:o=>n.onChange(o)})}}function Yl(e,t,n,o,i,a){return{type:"custom",render:({value:c,onChange:s})=>r(m,{label:l(e),icon:r(Ae,{noun:a}),action:r(y,{words:x()?.panel,label:l(e),changed:!Ko(c),detail:l("the Text style in Styles"),onReset:()=>s(Mo),defaultAction:{onPress:()=>s(Go),title:l("Keep this section's own built-in size"),icon:r(Gt,{})}}),children:K({min:t,max:n,step:o,value:typeof c=="number"?c:i,suffix:"px",ariaLabel:e,onChange:s})})}}function ql(){return{_gCellWidth:S("Cell width"),gridSpan:L("Positions",r(Oe,{}),[{label:"Auto",value:""},...Array.from({length:Tt},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function F(){let e=null;try{e=j(t=>t).selectedItem}catch{e=null}return e?.props??{}}function Er({min:e,max:t,step:n,px:o,label:i,onChange:a,desktopKey:c,fallback:s}){const d=F()[c],u=se(void 0,d,s);return r(I,{children:K({min:e,max:t,step:n,value:se(o,d,s),readout:!1,ariaLabel:i,notch:u,onChange:a})})}function Tr({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:i=()=>{}}){const a=F()[t],c=se(void 0,a,n);return r(y,{words:x()?.panel,label:l(e),changed:o,detail:l("{value} on desktop",{value:`${c}px`}),onReset:i})}function Or(e){return it(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:r(Tr,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(Er,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function Jl(e){return{type:"custom",render:({value:t,onChange:n})=>r(wr,{...e,value:t,onChange:n})}}function Rr({label:e,icon:t,options:n,value:o,resolved:i,restWord:a,onChange:c}){const s=n.some(d=>d.value===o);return r(m,{label:l(e),icon:k(t),action:r(y,{words:x()?.panel,label:l(e),changed:s,detail:l("{value} on desktop",{value:l(a)}),onReset:()=>c(void 0)}),children:oe({options:n,value:s?o:i,onChange:d=>c(d),ariaLabel:e})})}function wr({label:e,icon:t,options:n,desktopKey:o,resolve:i,value:a,onChange:c}){const s=F()[o],d=i(void 0,s),u=n.find(f=>f.value===d)?.label??"";return r(Rr,{label:e,icon:t,options:n,value:a,resolved:d,restWord:u,onChange:c})}const Pr={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},kr={Top:Ne,Bottom:Pe,Left:ke,Right:Le},Lr=e=>{const t=kr[e];return r(t,{})};function Zl(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=_=>Pr[_],a=_=>W(i("Top"),r(Ne,{}),T.min,T.max,T.step,_,"px"),c=(_,Y,P,re=T)=>g("mobile",Or({label:i(_),icon:Lr(_),desktopKey:Y,min:re.min,max:re.max,step:re.step,fallback:P})),s=e.top??T.min,d=e.bottom??T.min,u="sectionPaddingLeft",f="sectionPaddingRight",p=e.sideBounds??T,h=e.side??p.min,b=e.sidePhone??h,C=e.phone===!0,w=_=>C?g("desktop",_):_;return M({...o?{_gSpacing:S("Padding")}:{},[t]:w(a(s)),...C?{[H(t)]:c("Top",t,s)}:{},...e.only==="top"?{}:{[n]:w(W(i("Bottom"),r(Pe,{}),T.min,T.max,T.step,d,"px")),...C?{[H(n)]:c("Bottom",n,d)}:{}},...e.sides?{[u]:w(W(i("Left"),r(ke,{}),p.min,p.max,p.step,h,"px")),...C?{[H(u)]:c("Left",u,b,p)}:{},[f]:w(W(i("Right"),r(Le,{}),p.min,p.max,p.step,h,"px")),...C?{[H(f)]:c("Right",f,b,p)}:{}}:{}})}const V=["top","right","bottom","left"],Nr={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},pt=e=>typeof e=="number"?e:null;function vr(e,t,n){const o={};for(const i of V)n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function Ar({tier:e,o:t}){let n=null;try{n=le()}catch{n=null}const o=n?.values??{},i=e==="mobile"?t.phoneKeys:t.keys,a=Object.fromEntries(V.map(u=>[u,pt(o[i[u]])])),c=Object.fromEntries(V.map(u=>[u,String(e==="mobile"?pt(o[t.keys[u]])??t.fallback[u]:t.fallback[u])])),[s,d]=U(()=>_n(a,c));return r(m,{label:l("Padding"),icon:r(tn,{}),action:r(He,{each:s,label:l("Each side"),onChange:d}),children:r(Cn,{label:l("Padding"),each:s,value:a,placeholder:c,min:t.min,max:t.max,step:t.step,onChange:u=>{const f=vr(i,a,u);Object.keys(f).length&&n?.onChangeMany(f)},words:{sides:{top:l("Padding top"),right:l("Padding right"),bottom:l("Padding bottom"),left:l("Padding left")},vertical:l("Top and bottom"),horizontal:l("Left and right"),unit:"px"}})})}function Ql(e={}){const t={...Nr,...e.keys},n={keys:t,phoneKeys:Object.fromEntries(V.map(s=>[s,H(t[s])])),fallback:{top:0,right:0,bottom:0,left:0,...e.fallback},min:e.min??0,max:e.max??200,step:e.step??4},o=e.phone!==!1,i=s=>{const d={type:"custom",render:()=>r(Ar,{tier:s,o:n})};return o?g(s,d):d},a=()=>$({type:"custom",render:()=>r(Z,{})},"always"),c=V.filter(s=>s!=="top");return M({...e.group===!1?{}:{_gSpacing:S("Padding")},[n.keys.top]:i("desktop"),...o?{[n.phoneKeys.top]:i("mobile")}:{},...Object.fromEntries(c.map(s=>[n.keys[s],{...a(),reachedBy:n.keys.top}])),...o?Object.fromEntries(c.map(s=>[n.phoneKeys[s],g("mobile",a())])):{}})}const ft=e=>typeof e=="number"?e:null;function Fr(e,t,n){const o={};for(const i of["x","y"])n[i]!==t[i]&&(o[e[i]]=n[i]??void 0);return o}function Dr({o:e}){let t=null;try{t=le()}catch{t=null}const n=t?.values??{},o={x:ft(n[e.keys.x]),y:ft(n[e.keys.y])},i=l(e.label??"Position"),a=!!(o.x||o.y),c=u=>{const f=Fr(e.keys,o,u);Object.keys(f).length&&t?.onChangeMany(f)},s=r(Gn,{label:i,value:o,onChange:c,words:{x:l("Left and right"),y:l("Up and down"),unit:"px"},placeholder:{x:"0",y:"0"},min:e.min,max:e.max,step:e.step??1}),d=r(y,{words:x()?.panel,label:i,changed:a,detail:"0 px, 0 px",onReset:()=>c({x:null,y:null})});return e.label===null?O("div",{className:"sf-position-line",children:[s,d]}):r(m,{label:i,icon:r(en,{}),changed:a,action:d,children:s})}function ea(e){return{[e.keys.x]:{type:"custom",render:()=>r(Dr,{o:e})},[e.keys.y]:{...$({type:"custom",render:()=>r(Z,{})},"always"),reachedBy:e.keys.x}}}const Br={contained:"Contained",page:"Page",full:"Full"},ne="Width";function ta(e,t=Wo,n=!0){const o=t.map(i=>({label:Uo[i]??Br[i],value:i}));return M({...n?{_gWidth:S(ne)}:{},widthMode:{type:"custom",render:({onChange:i,field:a})=>r(m,{label:l(ne),icon:r(dn,{}),action:n?r(tr,{inherited:a?.inherited??!1,onReset:()=>i(jo),label:ne}):void 0,children:oe({options:o,value:a?.currentValue||e,onChange:i,ariaLabel:ne})})}})}function na(){const e=o=>({type:"custom",render:({value:i,onChange:a})=>r(m,{label:z,icon:k(r(Jt,{})),action:o?o(a):void 0,children:oe({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(i)?i:"auto",onChange:a,ariaLabel:z})})}),t=()=>({type:"custom",render:({value:o,onChange:i,field:a})=>{const c=a?.unit==="%"?"%":"px",s=c==="%"?co:so;return r("div",{className:"sf-field",children:K({min:s.min,max:s.max,step:s.step,value:typeof o=="number"?o:s.fallback,suffix:c,ariaLabel:z,onChange:i})})}}),n=()=>me("Unit",r(we,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return M({_gHeight:S(z),sectionHeightMode:g("desktop",e()),sectionHeightValue:g("desktop",t()),sectionHeightUnit:g("desktop",n()),sectionHeightModePhone:g("mobile",e(o=>r(Hr,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:g("mobile",t()),sectionHeightUnitPhone:g("mobile",n())})}function Hr({onClear:e}){const t=F(),n=ro(t),o=io(t),i=l("{value} on desktop",{value:o.mode==="auto"?l("Auto"):`${o.value}${o.unit}`});return r(y,{words:x()?.panel,label:l(z),changed:n,detail:i,onReset:e})}function oa(){const e=n=>({type:"custom",render:({value:o,onChange:i,id:a,name:c})=>r(Gr,{value:o,onChange:i,labelId:`${a??c??"stickTop"}-label`,phone:n})}),t=()=>({type:"custom",render:({value:n,onChange:o})=>r("div",{className:"sf-field",children:K({min:Q.min,max:Q.max,step:Q.step,value:typeof n=="number"?n:Q.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:o})})});return{_gStick:S(ce),stickTop:g("desktop",e(!1)),stickTopDistance:g("desktop",t()),stickTopPhone:g("mobile",e(!0)),stickTopDistancePhone:g("mobile",t())}}function Gr({value:e,onChange:t,labelId:n,phone:o}){const i=F(),a=ao(i),c=o?a.phone:e===!0;return r(m,{label:l(ce),labelId:n,icon:k(r(ln,{})),action:O(I,{children:[o?r(y,{words:x()?.panel,label:l(ce),changed:lo(i),detail:l("{value} on desktop",{value:a.desktop?`${a.desktopDistance}px`:l("Off")}),onReset:()=>t(void 0)}):null,r(Ge,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const ht="e.g. about";function ra(){return{_gAnchor:S("Anchor"),anchor:A({control:"plainText",label:"Name",placeholder:ht},{type:"custom",render:({value:e,onChange:t})=>r(Nt,{value:e,onChange:t,nameBox:(n,o)=>r(v,{value:n,onChange:o,label:"Name",placeholder:ht,hideable:!1,markup:!1})})})}}function ia(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:a,name:c})=>{const s=`${a??c??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return r(m,{label:l(e),icon:t,htmlFor:s,hint:n===void 0?void 0:l(n),children:r(Bn,{id:s,value:Number.isFinite(d)?new Date(d):null,onChange:u=>i(u?u.toISOString():"")})})}}}function D(e,t,n){return{type:"custom",...R({},{...ee,label:e}),render:({value:o,onChange:i,id:a,name:c})=>{const s=typeof o=="boolean"?o:t,d=`${a??c??e}-label`;return r(m,{label:l(e),labelId:d,icon:n,action:r(Ge,{checked:s,onChange:i,ariaLabelledBy:d})})}}}function la(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const i=`${String(n??o??"pageBackground")}-colour`;return r(We,{label:l("Background"),icon:r(ve,{}),id:i,value:pn(e),onChange:t})}}}function aa(e,t){return{type:"custom",...R({},{...ee,label:e}),render:({value:n,onChange:o,id:i})=>{const a=typeof n=="boolean"?n:t,c=`${i??e}-checkbox`;return r(m,{label:l(e),htmlFor:c,className:"sf-checkbox",action:r(Fn,{id:c,checked:a,onChange:o})})}}}const sa={follows:"fill"},ca={follows:"ink"};function da(e,t,n){if(typeof t!="string"){const o=t.follows;return{type:"custom",render:({value:i,onChange:a})=>r(Mr,{label:e,part:o,icon:n,value:i,onChange:a})}}return{type:"custom",render:({value:o,onChange:i})=>r(We,{label:l(e),icon:n,value:o||t,onChange:i})}}function Mr({label:e,part:t,icon:n,value:o,onChange:i}){const a=Co(G().theme),c=t==="fill"?a.fill:a.ink;return r(Kn,{label:l(e),icon:n,value:o||"",inherited:c,resetTo:N(c.toUpperCase(),l("Styles")),onChange:i,onReset:()=>i("")})}const Kr=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function mt({label:e,value:t,onChange:n,points:o=Kr}){const i=o.map(a=>({...a,label:l(a.label),...a.title?{title:l(a.title)}:null}));return r(An,{label:l(e),value:t,points:i,onChange:n})}function ua(){return $({type:"custom",render:()=>r(Z,{})},"always")}const Wr=Ee([]);function pa(e,{stacking:t,fallback:n=Pt}){return{type:"custom",render:({value:o,onChange:i})=>{const a=wt.includes(o)?o:n;return t?r(Ur,{label:e,value:a,onChange:i}):gt({label:e,value:a,onChange:i,points:Wr})}}}function Ur({label:e,value:t,onChange:n}){const{appState:o,selectedItem:i}=j(s=>s),a=i?.props?.id?String(i.props.id):void 0,c=a?Rt(o?.data,a):[];return gt({label:e,value:t,onChange:n,points:Ee(c,a)})}function gt({label:e,value:t,onChange:n,points:o}){const i=o.find(a=>a.disabled);return r(m,{label:l(e),icon:r(on,{}),hint:i?.title?l(i.title):void 0,children:mt({label:e,value:kt(t),onChange:n,points:o})})}const fa={top:r($t,{}),right:r(Xt,{}),bottom:r(Ut,{}),left:r(jt,{})};function ha(e,t,n,o,i,a){const c=f=>t.find(p=>p.value===f),s=f=>({value:f,label:"",disabled:!0,title:o}),d=f=>{const p=t.find(b=>b.cell===f);if(!p)return s(`missing-${f}`);const h=a?.[f];return h?{value:p.value,label:p.label,icon:h}:{value:p.value,label:p.label}},u=[s("corner-top-left"),d("top"),s("corner-top-right"),d("left"),s("centre"),d("right"),s("corner-bottom-left"),d("bottom"),s("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:p})=>{const h=t.some(b=>b.value===f)?f:n;return r(m,{label:l(e),icon:i,value:c(h)?.label?l(c(h).label):"",children:mt({label:e,value:h,onChange:p,points:u})})}}}const jr="\0note";function L(e,t,n,o,i){return{type:"custom",options:n,fallback:o,...i?{note:i}:{},...R({},{type:"select",label:e}),render:({value:a,onChange:c,field:s})=>{const d=s.options??n,u=s.fallback??o,f=d.some(p=>p.value===a)?a:u;return r(m,{label:l(e),icon:k(t),children:r(Tn,{value:f,ariaLabel:l(e),onChange:c,options:[...i?[{label:l(i),value:jr,disabled:!0}]:[],...d.map(p=>({label:l(p.label),value:p.value}))]})})}}}function ma(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:i,field:a})=>r(eo,{label:e,options:(a.options??t).map(c=>({...c,label:l(c.label)})),value:Array.isArray(o)?o:[],onChange:i,...n?{emptyLabel:l(n)}:{}})}}function ga(e,t,n,o){return{type:"custom",options:t,fallback:n,...R({},{type:"select",label:e}),render:({value:i,onChange:a,field:c})=>r(no,{label:e,options:(c.options??t).map(s=>({...s,label:l(s.label)})),fallback:c.fallback??n,value:i,onChange:a,placeholder:o===void 0?void 0:l(o)})}}function ba(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const i={value:n,onChange:o,...t};return r(e,{...i})}}}function oe({options:e,value:t,onChange:n,ariaLabel:o,disabled:i=!1}){return r(Sn,{options:e.map(a=>a.picture?{id:a.value,label:a.picture,title:l(a.title??a.label)}:{id:a.value,label:l(a.label),title:a.title===void 0?void 0:l(a.title)}),value:t,onChange:n,ariaLabel:l(o),disabled:i})}const xa=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function me(e,t,n,o){const i=n.map(a=>typeof a=="string"?{label:a,value:a}:a);return{type:"custom",...R({},{type:"radio",label:e,options:i.map(a=>({value:a.value,label:a.label}))}),render:({value:a,onChange:c,field:s})=>r(m,{label:l(e),icon:k(t),children:oe({options:i,value:i.some(d=>d.value===a)?a:a||s?.currentValue||o,onChange:c,ariaLabel:e})})}}function ya(e,t,n,o={}){return{type:"custom",[Se]:!0,render:({value:i,onChange:a})=>r(Qn,{value:i||"",onChange:a,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen})}}const Sa={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Ca({value:e,onChange:t,label:n}){const o=e||{},i=!!o.pending,a=i?"var(--fg-dim, #888)":o.ok?"#1d9e75":"#d85a30",c=!!Yo(Vo()).geocode,s=(d,u)=>t({...o,[d]:u===""?void 0:Number(u)});return O(m,{label:l(n),icon:r(ae,{}),children:[c&&O(I,{children:[r("button",{type:"button",disabled:i,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 10px",fontSize:13,cursor:i?"default":"pointer",opacity:i?.6:1,border:"1px solid var(--border-strong, #ccc)",borderRadius:6,background:"transparent",color:"inherit"},children:i?l("Finding…"):l("Find coordinates")}),o.status&&r("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:a},children:l(o.status)}),r("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:l("Coordinates from OpenStreetMap")})]}),r("button",{type:"button",onClick:()=>t({...o,manual:!o.manual}),style:{marginTop:8,padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer",textDecoration:"underline"},children:o.manual?l("Hide manual coordinates"):l("Enter coordinates manually")}),o.manual&&O("div",{style:{marginTop:8,display:"grid",gap:8},children:[r(m,{label:l("Latitude"),icon:r(ae,{}),children:r("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"34.0990198"}),value:typeof o.lat=="number"?o.lat:"",onChange:d=>s("lat",d.target.value)})}),r(m,{label:l("Longitude"),icon:r(ae,{}),children:r("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"-117.9842833"}),value:typeof o.lng=="number"?o.lng:"",onChange:d=>s("lng",d.target.value)})})]})]})}function Xr(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function $r(e,t,n){const o=e.map(i=>({text:i?.text??""}));return t===null||t<0||t>=e.length?o:o.map((i,a)=>a===t?{text:n}:i)}function _a(e,t){return e===null?null:t>e?e:null}function zr(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 Ia={label:"Ticker items",icon:r(Qt,{})};function Ea(e,t,n,o){return{type:"custom",[E]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...R({},{...et.textList,label:e}),render:({value:i,onChange:a})=>r(Vr,{label:e,icon:k(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:a,markup:o==="markup"})}}function Vr({label:e,icon:t,items:n,placeholder:o,onChange:i,markup:a=!1}){const c=ie(null),[s,d]=U(null),u=p=>p.map(h=>({text:h?.text??""})),f=p=>{const h=zr(n,p,s);h===null&&(c.current=null),d(h),i(u(p))};return r(On,{label:l(e),icon:t,noun:l("item"),items:n,onChange:f,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:a?r(Ue,{target:c,value:Xr(n,s),onChange:p=>i($r(n,s??-1,p)),disabled:s===null,label:s===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:s+1})}):void 0,renderRow:(p,h,b)=>r("input",{type:"text",className:a&&s===h?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:h+1}),onChange:C=>b({text:C.target.value}),onFocus:C=>{c.current=C.currentTarget,d(h)}})})}function Ta(e,t){const n=`${e.label} — row ${t+1}`;return A({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:i})=>r(v,{value:o,onChange:i,label:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Oa(e){return{_gCards:S("Cards"),coverIndex:L("Cover image",r(Zt,{}),qn,String(Jn),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:cr("Image background",Ro),cardImage:qr(),spinOnHover:D("Rotate on hover",e?.spinDefault??!0,r(an,{}))}}function Ra(){return{outline:L("Card outline",r(sn,{}),zn,Yn),indexBadge:L("Card number",r(we,{}),$n,Vn),showBadge:D("Product badge",!0,r(Ae,{noun:"tag"}))}}function wa(e){const t=e&&"bottomDefault"in e?e.bottomDefault:!0,n=e&&"defaults"in e?e.defaults:{showCardSizes:t,showCardBuy:t,showCardPage:t};return{_gShowOnCard:S("Show on a card"),showCardPrice:D("Price",!0,r(zt,{})),showCardFinishes:D("Finish swatches",!0,r(Vt,{})),showCardSizes:D("Sizes",n.showCardSizes,r(rn,{})),showCardBuy:D("Buy button",n.showCardBuy,r(Mt,{})),showCardPage:D("Page button",n.showCardPage,r(ve,{}))}}function Pa(e,t="display"){const n=H(t);return{[t]:g("desktop",{type:"custom",render:({value:o,onChange:i})=>r(bt,{parts:e,changed:wn(o),shown:a=>Pn(o,a),onPress:(a,c)=>i(Nn(o,a,c)),onReset:()=>i(void 0)})}),[n]:g("mobile",{type:"custom",render:({value:o,onChange:i})=>r(Yr,{parts:e,desktopKey:t,value:o,onChange:i})})}}function bt({parts:e,changed:t,shown:n,onPress:o,onReset:i,detail:a}){const c=l("Display");return r(m,{label:c,icon:r(Ft,{}),changed:t,action:r(y,{words:x()?.panel,label:c,changed:t,detail:a,onReset:i}),children:r(Rn,{label:c,items:e.map(s=>({id:s.id,label:l(s.label),shown:n(s.id)})),onChange:o})})}function Yr({parts:e,desktopKey:t,value:n,onChange:o}){const i=F()[t];return r(bt,{parts:e,changed:Ln(n),shown:a=>kn(i,n,a),onPress:(a,c)=>o(vn(n,a,c)),onReset:()=>o(jn),detail:l("the same as Desktop")})}function qr(){return it("Card image",{min:B,max:_e,step:_t,hint:"Rounds the picture. The card's own corner is in Styles."})}function ka(){return fe({sidesKey:"cornerSides",step:It,useFollowed:()=>B,mark:r(Jr,{label:Et}),hint:l("Rounds the picture. Left alone it stays square.")})}function Jr({label:e,changed:t=!1,onReset:n=()=>{}}){return r(y,{words:x()?.panel,label:l(e),changed:t,onReset:n})}function La(){return{type:"custom",render:({value:e,onChange:t})=>r(Zr,{value:typeof e=="string"?e:"",onChange:t})}}function Zr({value:e,onChange:t}){const[n,o]=U(null),i=Ie.filter(c=>n===null||X[c].across===n),a=e&&e in X?X[e]:null;return O(I,{children:[r(m,{label:l("Photos in a row"),icon:r(Kt,{}),children:O("div",{className:"sf-gallery-filter",children:[r("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:l("All")}),Ot.map(c=>r("button",{type:"button","aria-pressed":n===c,onClick:()=>o(c),children:c},c))]})}),r(m,{label:l("Layout"),icon:r(Yt,{}),value:a?l(a.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:i.length,total:Ie.length}),children:r(Me,{className:"sf-gallery-layouts",label:l("Layout"),value:e,onChange:t,onClear:()=>t(""),options:i.map(c=>({value:c,label:l(X[c].label),picture:r("span",{className:"sf-gallery-pic",children:X[c].desktop.map(([s,d],u)=>r("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${d}`}},u))})}))})})]})}export{or as BOUND_TO_POST,ml as BOUND_TO_POST_NOTE,Il as BUCKET_ICONS,Sa as CUSTOM_FIELD_MEDIA,Ca as CoordsField,fa as EDGE_ARROWS,Hn as FOCAL_DEFAULT,Kr as FOCAL_POINTS,q as FOLD_FIELD_MARKER,sa as FOLLOWS_SITE_BUTTON,ca as FOLLOWS_SITE_BUTTON_INK,mt as FocalPicker,Al as GroupLabel,rr as HIGHLIGHT_HINT,v as HidableTextField,ye as LINK_FIELD_MARKER,al as Label,Se as MEDIA_FIELD_MARKER,xa as MEDIA_TYPE_OPTIONS,gl as NOT_BOUND_TO_POST,vl as PanelBand,ar as PanelNoteLine,wr as PhoneChoiceRow,Rr as PhoneChoiceStrip,gt as PlacementGridView,Ce as SCAFFOLD_FIELD_MARKER,Fa as SCALAR_TEXT_CONTROLS,st as SECTION_BLEEDS_HINT,Nr as SIDE_PAD_KEYS,oe as Segmented,er as SiteGapDefaultReset,K as Slider,rt as Swatches,Aa as TEXT_CONTROL_KINDS,E as TEXT_FIELD_MARKER,Ia as TICKER_ITEMS_ROW,Vr as TextListField,tr as WidthDefaultReset,zr as aimAfterListChange,ra as anchorFields,N as backTo,Fl as backgroundField,Ul as boxAlignField,$l as boxBlockSpacingField,Wl as boxJustifyField,zl as boxPhoneRowField,Xl as boxShareField,jl as boxWrapField,wl as bucketHeader,Cr as cardCornersField,cr as cardImageBackgroundField,qr as cardImageField,Oa as cardMediaFields,Kl as cardShapeFields,wa as cardShowFields,Ra as cardStyleFields,ql as cellWidthFields,aa as checkbox,da as colorInput,Sl as copyText,at as cornerSidesField,fe as cornersRowField,ia as dateTime,kl as designGroupHeader,Vl as directionField,Pa as displayFields,ha as edgePad,El as entriesHiddenForTab,_a as focusAfterRemove,ua as focusKeptField,Ll as foldMarker,J as foldMetaOf,sr as foldTitleOf,La as galleryLayoutField,Bl as gapField,S as group,na as heightFields,xe as hidableText,lr as hintIsWhileTyping,k as iconOf,ka as imageCornersField,hl as inOwnBox,Rl as isBucketHeader,Pl as isDesignGroupHeader,Jo as isNoGlyph,Cl as linkField,ma as multiSelect,qo as noGlyph,la as pageBackgroundField,Tl as panelNote,Jl as phoneChoiceField,Or as phoneOverrideField,pa as placementField,yl as plainText,_l as plainTextarea,ea as positionFields,Fr as positionPatch,it as pxField,Nl as quietMarker,be as readHidable,Xr as rowText,ga as searchSelect,Ol as section,Gl as sectionAnimationFields,dt as sectionBorderField,fr as sectionCornersField,Hl as sectionShapeFields,Dl as sectionThemeFields,me as segmented,L as select,$r as setRowText,M as sharedStyleKinds,Ql as sidesPaddingFields,vr as sidesPaddingPatch,Yl as sizeField,W as slider,ba as sourceField,Zl as spacingFields,oa as stickFields,Ml as templateField,bl as text,yt as textFieldIdentifier,dl as textFieldOffPage,pl as textFieldPanelOnly,Ea as textList,Ta as textListRowField,xl as textarea,D as toggle,ya as upload,Zo as usePageWidthDetail,F as useSelectedProps,lt as useSelectedSibling,Qo as useSiteGapDetail,ta as widthField,fl as withIdentifier,cl as withOffPage,ul as withPanelOnly,sl as withScaffold};
@@ -1 +1 @@
1
- import{encodePartKey as b}from"../../../format/lib/puck/part-key.js";import{PART_ATTR as P,PART_KIND_ATTR as N,REGION_PART_ATTR as _,decodePartId as O,encodePartId as S,normalizePartText as z}from"../../../render/lib/puck/text-parts.js";const I="data-puck-component";function K(c,o){return c.closest(`[${I}]`)?.getAttribute(I)===o}function $(c,o,i){const r=c.querySelectorAll("*"),f=[],p=new Set;for(let t=0;t<r.length;t+=1){const e=r[t];if(!K(e,o))continue;const n=e.getAttribute(N);n&&(f.push({element:e,partId:S(o,n)}),p.add(e))}const u=[];for(let t=0;t<r.length;t+=1){const e=r[t];if(!K(e,o)||p.has(e))continue;const n=z(e.textContent??"");n&&u.push({element:e,text:n})}const m=new Map,y=[],T=t=>t.row?`${t.key}.${t.row.rowKey}`:null,g=new Map;for(const t of i){const e=T(t);if(!e)continue;const n=g.get(e);n?n.push(t):g.set(e,[t])}const d=new Set;for(const[t,e]of g){if(e.length<2)continue;const n=e.flatMap(a=>a.texts);if(new Set(n).size===n.length)continue;const l=u.filter(a=>n.includes(a.text));if(l.length!==e.length)continue;const h=[...e].sort((a,w)=>(a.row?.index??0)-(w.row?.index??0));for(let a=0;a<h.length;a+=1){const w=h[a],s=l[a].element,x={key:w.key,partKey:b(w.key,w.row),exact:!0},k=m.get(s);k?k.push(x):(m.set(s,[x]),y.push(s))}d.add(t)}for(const t of i){if(d.has(T(t)??""))continue;const e=b(t.key,t.row);for(const n of t.texts){const l=[];let h=null;for(const s of u)s.text===n?l.push(s.element):!l.length&&s.text.includes(n)&&(!h||s.text.length<=h.length)&&(h={element:s.element,length:s.text.length});const a=l.length?l:h?[h.element]:[],w=a.filter(s=>!a.some(x=>x!==s&&s.contains(x)));for(const s of w){const x={key:t.key,partKey:e,exact:l.length>0},k=m.get(s);k?k.push(x):(m.set(s,[x]),y.push(s))}}}const A=[...f];for(const t of y){const e=m.get(t)??[],n=e.some(l=>l.exact)?e.filter(l=>l.exact):e;if(new Set(n.map(l=>l.partKey)).size===1){A.push({element:t,partId:S(o,n[0].partKey)});continue}new Set(n.map(l=>l.key)).size===1&&A.push({element:t,partId:S(o,n[0].key)})}return A}function R(c,o,i){const r=c.querySelectorAll(`[${P}]`);for(let p=0;p<r.length;p+=1){const u=r[p];K(u,o)&&u.removeAttribute(P)}const f=[];for(const{element:p,partId:u}of i)p.setAttribute(P,u),f.push(p);return f}function q(c,o,i,r,f,p=()=>null){let u=null,m=null,y=null;const T=()=>{const g=i(),d=g?.getAttribute(I)??null;if(!g||!d)return!1;u=d;let A=$(c,d,o);return f(g,d,R(c,d,A)),y=p(()=>{const t=$(c,d,o);C(A,t)||(A=t,f(g,d,R(c,d,t)))}),!0};return T()||(m=r(()=>{(u||T())&&(m?.(),m=null)})),()=>{m?.(),m=null,y?.(),y=null,u&&R(c,u,[])}}function C(c,o){return c.length===o.length&&c.every((i,r)=>i.element===o[r].element&&i.partId===o[r].partId)}function B(c,o){const i=c?.closest?.(`[${P}],[${_}]`),r=i?.getAttribute(P)??i?.getAttribute(_),f=r?O(r):null;return i&&r&&f?.nodeId===o&&f.propKey?{id:r,element:i}:null}export{I as PUCK_COMPONENT_ATTR,R as applyPartStamps,q as engagePartAnchors,B as partOfBlockAt,$ as resolvePartStamps};
1
+ import{encodePartKey as z}from"../../../format/lib/puck/part-key.js";import{PART_ATTR as P,PART_KIND_ATTR as v,PART_ROW_ATTR as N,REGION_PART_ATTR as C,decodePartId as W,encodePartId as K,encodePartRow as q,normalizePartText as B}from"../../../render/lib/puck/text-parts.js";const _="data-puck-component";function b(l,s){return l.closest(`[${_}]`)?.getAttribute(_)===s}function M(l,s,i){const r=l.querySelectorAll("*"),p=[],m=new Set;for(let t=0;t<r.length;t+=1){const e=r[t];if(!b(e,s))continue;const n=e.getAttribute(v);n&&(p.push({element:e,partId:K(s,n)}),m.add(e))}const u=[],d=new Set;for(let t=0;t<r.length;t+=1){const e=r[t];if(!b(e,s)||m.has(e))continue;const n=B(e.textContent??"");if(!n)continue;const o=e.closest(`[${N}]`)?.getAttribute(N)||null;o&&d.add(o.replace(/\[\d+\]$/u,"")),u.push({element:e,text:n,row:o})}const T=t=>u.filter(e=>e.row===q(t.key,t.row.index)),R=u.filter(t=>t.row===null),w=t=>t.row&&d.has(t.key)?T(t):d.size?R:u,a=new Map,x=[],A=t=>t.row?`${t.key}.${t.row.rowKey}`:null,S=new Map;for(const t of i){const e=A(t);if(!e||d.has(t.key))continue;const n=S.get(e);n?n.push(t):S.set(e,[t])}const O=new Set;for(const[t,e]of S){if(e.length<2)continue;const n=e.flatMap(f=>f.texts);if(new Set(n).size===n.length)continue;const o=w(e[0]).filter(f=>n.includes(f.text));if(o.length!==e.length)continue;const h=[...e].sort((f,y)=>(f.row?.index??0)-(y.row?.index??0));for(let f=0;f<h.length;f+=1){const y=h[f],c=o[f].element,g={key:y.key,partKey:z(y.key,y.row),exact:!0},k=a.get(c);k?k.push(g):(a.set(c,[g]),x.push(c))}O.add(t)}for(const t of i){if(O.has(A(t)??""))continue;const e=z(t.key,t.row);for(const n of t.texts){const o=[];let h=null;for(const c of w(t))c.text===n?o.push(c.element):!o.length&&c.text.includes(n)&&(!h||c.text.length<=h.length)&&(h={element:c.element,length:c.text.length});const f=o.length?o:h?[h.element]:[],y=f.filter(c=>!f.some(g=>g!==c&&c.contains(g)));for(const c of y){const g={key:t.key,partKey:e,exact:o.length>0},k=a.get(c);k?k.push(g):(a.set(c,[g]),x.push(c))}}}const I=[...p];for(const t of x){const e=a.get(t)??[],n=e.some(o=>o.exact)?e.filter(o=>o.exact):e;if(new Set(n.map(o=>o.partKey)).size===1){I.push({element:t,partId:K(s,n[0].partKey)});continue}new Set(n.map(o=>o.key)).size===1&&I.push({element:t,partId:K(s,n[0].key)})}return I}function $(l,s,i){const r=l.querySelectorAll(`[${P}]`);for(let m=0;m<r.length;m+=1){const u=r[m];b(u,s)&&u.removeAttribute(P)}const p=[];for(const{element:m,partId:u}of i)m.setAttribute(P,u),p.push(m);return p}function G(l,s,i,r,p,m=()=>null){let u=null,d=null,T=null;const R=()=>{const w=i(),a=w?.getAttribute(_)??null;if(!w||!a)return!1;u=a;let x=M(l,a,s);return p(w,a,$(l,a,x)),T=m(()=>{const A=M(l,a,s);E(x,A)||(x=A,p(w,a,$(l,a,A)))}),!0};return R()||(d=r(()=>{(u||R())&&(d?.(),d=null)})),()=>{d?.(),d=null,T?.(),T=null,u&&$(l,u,[])}}function E(l,s){return l.length===s.length&&l.every((i,r)=>i.element===s[r].element&&i.partId===s[r].partId)}function L(l,s){const i=l?.closest?.(`[${P}],[${C}]`),r=i?.getAttribute(P)??i?.getAttribute(C),p=r?W(r):null;return i&&r&&p?.nodeId===s&&p.propKey?{id:r,element:i}:null}export{_ as PUCK_COMPONENT_ATTR,$ as applyPartStamps,G as engagePartAnchors,L as partOfBlockAt,M as resolvePartStamps};
@@ -1 +1 @@
1
- "use client";import{jsx as r,Fragment as s}from"react/jsx-runtime";import{createContext as n,useContext as p}from"react";import{isStructuralTextProp as u}from"../../../format/lib/puck/neutralization-contracts.js";import{NoControlMark as i}from"efficient-easel/screen/lib/puck/panel-no-control-mark";const t=n(!1);function l({children:e}){return r(t.Provider,{value:!0,children:e})}function c(){return p(t)}function S({name:e,children:o}){return!c()||!e||u(e)?r(s,{children:o}):r(i,{})}export{l as SectionTextSuppressProvider,S as SuppressibleText,c as useSectionTextSuppressed};
1
+ "use client";import{jsx as r,Fragment as s}from"react/jsx-runtime";import{createContext as n,useContext as u}from"react";import{isStructuralTextProp as p}from"../../../format/lib/puck/neutralization-contracts.js";import{NoControlMark as i}from"efficient-easel/screen/lib/puck/panel-no-control-mark";const t=n(!1);function S({children:e}){return r(t.Provider,{value:!0,children:e})}function c(){return u(t)}function T({name:e,children:o}){return!c()||!e||!x(e)||p(e)?r(s,{children:o}):r(i,{})}function x(e){return/^[A-Za-z0-9_$]+$/u.test(e)}export{S as SectionTextSuppressProvider,T as SuppressibleText,c as useSectionTextSuppressed};
@@ -0,0 +1 @@
1
+ export declare const CANVAS_ACCENT = "var(--es-accent, #2563eb)";
@@ -0,0 +1 @@
1
+ const e="var(--es-accent, #2563eb)";export{e as CANVAS_ACCENT};
@@ -155,6 +155,7 @@ export declare const WEB_BUILDER_WORDS: {
155
155
  readonly "Background color": "Background color";
156
156
  readonly "Background image": "Background image";
157
157
  readonly "Background images": "Background images";
158
+ readonly "Background width": "Background width";
158
159
  readonly Badge: "Badge";
159
160
  readonly Banner: "Banner";
160
161
  readonly "Banner headline": "Banner headline";
@@ -1039,7 +1040,6 @@ export declare const WEB_BUILDER_WORDS: {
1039
1040
  readonly "Success heading": "Success heading";
1040
1041
  readonly "Success message": "Success message";
1041
1042
  readonly Superscript: "Superscript";
1042
- readonly Surfaces: "Surfaces";
1043
1043
  readonly "Switch now": "Switch now";
1044
1044
  readonly "Switch to Box footer": "Switch to Box footer";
1045
1045
  readonly "Synced from the blog post.": "Synced from the blog post.";
@@ -1129,7 +1129,6 @@ export declare const WEB_BUILDER_WORDS: {
1129
1129
  readonly "Three across": "Three across";
1130
1130
  readonly "Three ladder": "Three ladder";
1131
1131
  readonly "Three stagger": "Three stagger";
1132
- readonly Ticker: "Ticker";
1133
1132
  readonly "Ticker items": "Ticker items";
1134
1133
  readonly TikTok: "TikTok";
1135
1134
  readonly "Timeline entries": "Timeline entries";