efficient-web-builder 67.8.1 → 68.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -0
- package/dist/editor/components/BlockGapField.d.ts +4 -1
- package/dist/editor/components/BlockGapField.js +1 -1
- package/dist/editor/components/CornersField.d.ts +3 -1
- package/dist/editor/components/CornersField.js +1 -1
- package/dist/editor/components/SideSpaceField.d.ts +5 -1
- package/dist/editor/components/SideSpaceField.js +1 -1
- package/dist/editor/components/StorefrontEditor.js +1 -1
- package/dist/editor/components/WebsiteSettingsPanel.d.ts +0 -5
- package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
- package/dist/editor/components/storefront-editor.css +6 -1
- package/dist/editor/components/useSiteLengthRow.d.ts +15 -0
- package/dist/editor/components/useSiteLengthRow.js +1 -0
- package/dist/editor/lib/content/site-length-rows.d.ts +15 -0
- package/dist/editor/lib/content/site-length-rows.js +1 -0
- package/dist/editor/lib/document/blocks/general/Logos/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ProcessSteps/fields.js +1 -1
- package/dist/editor/lib/document/box-fields.d.ts +2 -0
- package/dist/editor/lib/document/box-fields.js +1 -1
- package/dist/editor/lib/document/choice-pictures.d.ts +2 -0
- package/dist/editor/lib/document/choice-pictures.js +1 -1
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/shape-picker.js +1 -1
- package/dist/format/lib/content/block-align.d.ts +2 -0
- package/dist/format/lib/content/block-align.js +1 -1
- package/dist/format/lib/content/container-gap.d.ts +1 -0
- package/dist/format/lib/content/container-gap.js +1 -1
- package/dist/format/lib/content/css-length.d.ts +5 -6
- package/dist/format/lib/content/css-length.js +1 -1
- package/dist/format/lib/content/gallery-layout.d.ts +25 -11
- package/dist/format/lib/content/gallery-layout.js +1 -1
- package/dist/format/lib/content/grid-span.js +1 -1
- package/dist/format/lib/content/image-text-rows.d.ts +1 -0
- package/dist/format/lib/content/image-text-rows.js +1 -1
- package/dist/format/lib/content/page-width.d.ts +2 -1
- package/dist/format/lib/content/page-width.js +1 -1
- package/dist/format/lib/content/section-min-height.d.ts +3 -1
- package/dist/format/lib/content/section-min-height.js +1 -1
- package/dist/format/lib/content/view-lines.d.ts +7 -0
- package/dist/format/lib/content/view-lines.js +1 -1
- package/dist/format/lib/editor-words-kept.js +1 -1
- package/dist/format/lib/sections/section-head-placement.js +1 -1
- package/dist/format/lib/source-rules/site-length-writes.d.ts +18 -0
- package/dist/format/lib/source-rules/site-length-writes.js +2 -0
- package/dist/format/lib/theme.d.ts +5 -0
- package/dist/format/lib/theme.js +1 -1
- package/dist/render/components/ButtonBlock.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +2 -1
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/Eyebrow.js +1 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/InBoxContext.d.ts +6 -0
- package/dist/render/components/InBoxContext.js +1 -1
- package/dist/render/components/Logo.js +1 -1
- package/dist/render/components/LogoBlock.js +1 -1
- package/dist/render/components/PreviewHeaderContext.d.ts +3 -1
- package/dist/render/components/PreviewHeaderContext.js +1 -1
- package/dist/render/components/PublishedPartStylesContext.js +1 -1
- package/dist/render/components/SectionAnimation.js +1 -1
- package/dist/render/components/Split.js +1 -1
- package/dist/render/components/Text.js +1 -1
- package/dist/render/components/ViewHideRoot.d.ts +2 -1
- package/dist/render/components/ViewHideRoot.js +1 -1
- package/dist/render/lib/content/section-edge.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/passes/block-size.js +1 -1
- package/dist/render/lib/document/passes/section-anchor.js +1 -1
- package/dist/render/lib/document/passes/section-height.js +1 -1
- package/dist/render/lib/document/passes/section-padding.js +1 -1
- package/dist/render/lib/document/passes/section-width.js +1 -1
- package/package.json +10 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as i,jsxs as k,Fragment as L}from"react/jsx-runtime";import{cloneElement as _e,createContext as Tn,useContext as nt,useEffect as Rn,useId as ot,useRef as J,useState as Z}from"react";import{useEasel as re,useSelectedHost as B}from"efficient-easel/easel";import{PIN_LENGTH as ie,toDateKey as Nn,fromDateKey as Pn}from"efficient-shell/format";import{say as a,editorEaselWords as C}from"../../../format/lib/editor-words.js";import{finiteNumber as $}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as rt,firstFrameHint as kn,loadingShowsOf as Ln,loadingStillHint as An}from"../../../format/lib/hero-video.js";import{pageFramesFor as Fn,usePageVideoFrames as vn}from"../page-video-frames.js";import{ScreenDocumentContext as Bn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as it,hidableText as st}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as ye,LINK_FIELD_MARKER as lt,MEDIA_FIELD_MARKER as at,SCAFFOLD_FIELD_MARKER as ct,TEXT_FIELD_MARKER as N,foldMetaOf as Ce,textFieldIdentifier as Dn}from"efficient-easel/draw";import Hn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as ut}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as Gn,CARD_IMAGE_RADIUS_ROW as dt,CARD_IMAGE_RADIUS_STEP as Mn,CORNER_RADIUS_MAX as xe,CORNER_RADIUS_MIN as A}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Wn,IMAGE_CORNERS_LABEL as Un,IMAGE_CORNERS_ROW as Kn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Xn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as $n,GALLERY_LAYOUTS as Oe,GALLERY_LAYOUT_KEYS as Vn,GALLERY_PHONE_LAYOUTS as jn,galleryChoices as pt,galleryLayoutRatio as Yn,galleryPictureCells as zn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as qn}from"./shell-glyph.js";import{anchorSiblingsOf as Jn,placementPoints as Zn}from"../../../format/lib/hero-group-placement.js";import Qn from"../../components/AnchorField.js";import eo from"../../components/SourceStatus.js";import{AdjustIcon as to,EyeIcon as no,AnimationIcon as oo,BackgroundIcon as ft,BorderAllIcon as ro,BlockSectionIcon as io,ColumnWidthsIcon as Ie,ColumnsIcon as ht,CornerIcon as mt,DirectionDownIcon as so,DirectionLeftIcon as lo,DirectionRightIcon as ao,DirectionUpIcon as co,EditIcon as uo,GapIcon as po,GridIcon as gt,GroundIcon as Ee,HashIcon as fo,HeightIcon as bt,ImageIcon as ho,ListIcon as mo,LocationIcon as wt,PaddingBottomIcon as St,PaddingLeftIcon as _t,PaddingRightIcon as yt,PaddingTopIcon as Te,PageIcon as go,StickyIcon as Ct,SearchIcon as bo,SquareIcon as wo,TypeIcon as So,WidthIcon as _o}from"efficient-easel/icons";import{FieldGlyph as xt}from"../../components/FieldGlyph.js";import{resolvePageBackground as yo}from"../../../format/lib/content/page-background.js";import{BOX_FILL_FADE_PROP as Co,BOX_FILL_FADES as xo,BOX_SWATCH_PROP as Oo,boxFillFadeOf as Ot,boxFillOf as Io,boxFillSlot as Re,boxPaintOf as Eo}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as It,CORNER_SIDE_POINTS as To,SECTION_CORNERS_ROW as Et,hasOwnSectionCorners as Ro,normalizeCornerSides as Tt}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as Rt}from"../../../format/lib/content/card-corners.js";import{enclosingPath as No,enclosingSection as Po}from"./enclosing-section.js";import{SettingsDefaultReset as x,SettingsDrill as ko,SettingsField as _,SettingsGroup as Lo,SettingsSegmented as Ao,SettingsBorder as Fo,SettingsSidesEach as vo,SettingsSwitch as Ne,borderSides as Bo,borderStartEach as Do}from"efficient-easel/panel";import{ListField as Ho}from"efficient-easel/fields";import{DisplayChips as Go}from"efficient-shell/ui";import{desktopDisplayChanged as Mo,partShownOnDesktop as Wo,partShownOnPhone as Uo,phoneDisplayChanged as Ko,withDesktopPart as Xo,withPhonePart as $o}from"../../../format/lib/content/part-display.js";import{ColorSwatch as Vo,CornersInput as jo,DatePicker as Yo,DateTimePicker as zo,FOCAL_DEFAULT as qo,IconPicker as Nt,COLUMN_COUNT_MAX as Pt,COLUMN_SHARE_MIN as Jo,COLUMN_SHARES_EQUAL as Zo,resolveColumnShares as kt,WidthsBar as Qo,useShellStrings as er,IconButton as Lt,InputNumber as At,Slider as tr,Tooltip as Pe}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as nr}from"./geocode-resolve.js";import{ColourRow as se,InheritedColourRow as Ft}from"./ColourControl.js";import{fillThemeColors as or,slotFill as le}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as ke}from"../../../format/lib/document/part-inks.js";import{keptByRow as Le}from"efficient-easel/screen/lib/document/style-fields";import vt from"./MarkupToolbar.js";import{deviceField as E}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as rr,NoControlMark as ir,noControlField as Bt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as sr}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as lr,PANEL_ONLY_FIELD as ar}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as cr,resolvePhoneValue as Ae}from"../../../format/lib/document/phone-override.js";import{phoneKey as V,tabletKey as Fe,viewKeyAt as ve}from"efficient-easel/draw";import{viewKey as O}from"../../../format/lib/animation/views.js";import{viewRows as D}from"../animation/view-rows.js";import{SuppressibleText as ur}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as dr,CARD_OUTLINE_OPTIONS as pr,DEFAULT_CARD_INDEX_FORMAT as fr,DEFAULT_CARD_OUTLINE as hr}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as mr,DEFAULT_COVER_INDEX as gr}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as br}from"efficient-easel/draw";import wr from"../../components/MediaUploadField.js";import Sr from"../../components/MultiSelectField.js";import _r from"../../components/SectionThemePicker.js";import yr from"../../components/SearchSelectField.js";import Cr from"../../components/StorefrontLinkField.js";import{UiIcon as Dt}from"efficient-easel/draw/client";import{SECTION_PADDING as P}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as xr}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Or}from"efficient-easel/draw/client";import{encodePartId as Ir}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as Er,useEaselStrings as Tr}from"efficient-easel/strings";import{hasPhoneHeight as Rr,hasTabletHeight as Be,resolveSectionMinHeight as Nr,resolveTabletHeight as Pr}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as kr,SECTION_PIN_ABOVE_HINT as Lr,SECTION_PIN_ABOVE_KEY as Ar,SECTION_PIN_ABOVE_LABEL as Fr,SECTION_PIN_GROUP as vr,SECTION_PIN_LABEL as Ht,SECTION_PIN_SCREENS_KEY as De,SECTION_PIN_SCREENS_LABEL as Gt,SECTION_PIN_STOP_DEFAULT as Br,SECTION_PIN_STOP_HINT as Dr,SECTION_PIN_STOP_KEY as Hr,SECTION_PIN_STOP_LABEL as Gr,SECTION_PIN_STOP_OPTIONS as Mr,SECTION_STICK_DISTANCE as H,SECTION_STICK_DISTANCE_ROW as He,SOME_VIEW_PINS as Mt,hasPhoneStick as Wr,hasTabletStick as Ur,resolveSectionStick as ae,sectionPinStopOf as Kr,sectionPinStopWrite as Xr}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as $r}from"../../../format/lib/content/css-length.js";import{SECTION_HEIGHT_MODES as Vr,SECTION_MIN_HEIGHT as jr,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as Yr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as zr,resolveContainerDirection as Wt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as qr,BOX_BLOCK_SPACING_POINTS as Ut,BOX_PHONE_ROW_LABEL as Kt,BOX_COLUMNS_MAX as Jr,BOX_COLUMNS_MIN as Xt,BOX_PHONE_ROW_MAX as Zr,BOX_PHONE_ROW_MIN as Ge,BOX_SHARE_CHOICES as $t,BOX_SHARE_LABEL as j,boxShareChoiceOf as Vt,boxShareWidthsOf as Me,BOX_SHARE_PHONE_DEFAULT as Qr,BOX_SHARE_PHONE_POINTS as ei}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as G}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as jt,BORDER_SIDES as ti,SECTION_BORDER_ROW as Yt,borderBySide as zt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as ni,normalizeTheme as qt,normalizeThemeColors as oi,sectionBandTone as ri,surfaceTwoTone as ii}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Jt,CONTAINER_GAP_BUILT_IN as si,CONTAINER_GAP_PHONE as We,GAP_FIELD_CONTAINER as Ue,followsSitePhoneGap as li,hasOwnContainerGap as ai,hasOwnPhoneGap as Ke,resolveContainerGap as Zt,resolvePhoneContainerGap as Qt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as ci,CARD_IMAGE_BG_OFF as ui,CARD_IMAGE_BG_SWATCH_NAMES as di,CARD_IMAGE_BG_SWATCHES as pi,isCardImageBackgroundInheriting as fi,cardImageBackgroundChoice as hi,THEME_CARD_IMAGE_BG as mi}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as gi,SECTION_BG_NO_FILL as bi,sectionBackgroundChoice as wi,THEME_SECTION_BG as Xe,isSectionBackgroundEmpty as Si,sectionBackgroundHex as en}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as _i,nestedAccentValue as tn,resolveSectionAccent as ce}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as yi,TYPE_SIZE_INHERIT as Ci,isTypeSizeInheriting as xi}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Oi,WIDTH_CHOICE_LABEL as Ii,WIDTH_INHERIT as Ei}from"../../../format/lib/content/section-width.js";import{useEaselSession as Ti}from"efficient-easel/screen/lib/session-context";import{backendOf as Ri}from"../website-session.js";import{BOX_GAP as Ni,describedAs as F,group as T,iconOf as Y,sharedStyleKinds as ee}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as nn,onDesktopWords as M,phoneTwinFields as $e,saidAlignmentGrid as Pi,useLengthUnit as ki}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as Li,directionField as Ai,gapField as Ve,iconPickerRow as on,lengthUnitFields as ue,pickerCellIcon as Fi,pickerNoneIcon as vi,Segmented as de,select as z,slider as W}from"./box-fields.js";import{VIEW_ABOVE as je}from"efficient-easel/screen/lib/content/length-units";import{tierOfView as rn,viewOfTier as Bi}from"../../../format/lib/content/view-tier.js";import{ownEntry as Di}from"../../../format/lib/own-entry.js";import{LAYOUT_CELL as Hi,galleryPhonePicture as sn}from"./choice-pictures.js";function $a({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function U(e,t){return a("{value} from {from}",{value:e,from:t})}function Gi(){const{blockGap:e}=G();return e===null?a("this container's own spacing"):U(`${e}px`,a("Styles"))}function Mi({inherited:e,onReset:t,label:n}){return i(x,{words:C()?.panel,label:a(n),changed:!e,detail:Gi(),onReset:t})}function Wi(e){return Ve({...Ni,builtIn:si[e],resolve:(t,n)=>Zt(e,t,n?.siteGap),action:(t,n)=>i(Mi,{inherited:!ai(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[Ue]:e}})}function Ui(e){return ut(E("mobile",{[Ue]:e,type:"custom",render:t=>i($i,{container:e,...t})}),ln)}function Ki(e){return ut(E("tablet",{[Ue]:e,type:"custom",render:t=>i(Xi,{container:e,...t})}),ln)}const ln={not:{field:"gap",in:Array.from({length:-Jt.min},(e,t)=>Jt.min+t)}};function Va(e){return{gap:E("desktop",Wi(e)),[Fe("gap")]:Ki(e),[V("gap")]:Ui(e)}}function Xi({container:e,...t}){const[n]=R("gap"),{siteGap:o}=t.field??{},r=Math.max(We.min,Zt(e,n,o));return Ve({...We,builtIn:r,resolve:l=>Ke(l)?l:r,action:(l,c)=>i(x,{words:C()?.panel,label:a("Gap"),changed:Ke(l),detail:M(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function $i({container:e,...t}){const[n]=R("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=Qt(e,void 0,n,o,r);return Ve({...We,builtIn:s,resolve:c=>Qt(e,c,n,o,r),action:(c,u)=>i(x,{words:C()?.panel,label:a("Gap"),changed:Ke(c),detail:U(`${s}px`,li(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function ja(e){return Ai({offered:zr(e),fallback:Wt(e,void 0),resolve:t=>Wt(e,t)})}function Ya(e,t){return Zn(t?Jn(e,t):[],t)}function Vi({inherited:e,onReset:t,label:n}){return i(x,{words:C()?.panel,label:a(n),changed:!e,detail:U(a("Full"),a("the page")),onReset:t})}function K({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:l=!0,markup:c=!0}){const{text:u,hidden:d}=it(e),h=J(null),p=J(null),f=y=>t(l?{text:y,hidden:d}:y),m=()=>t({text:u,hidden:!d}),g=l&&d,b=ot(),S=r?Ji(r)?i("span",{className:"sf-hint-while-typing",children:a(r)}):a(r):void 0,w=d?a("Show {label} on the slide",{label:a(n)}):a("Hide {label} on the slide",{label:a(n)});return i(_,{label:a(n),icon:i(So,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:S,action:l?i(Pe,{content:w,children:i(Lt,{"aria-pressed":d,"aria-label":w,onClick:m,children:d?i(Dt,{name:"eye-off",size:14}):i(Dt,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[c&&i(vt,{target:s?p:h,value:u,onChange:f}),s?i("textarea",{id:b,ref:p,value:u,placeholder:o===void 0?void 0:a(o),onChange:y=>f(y.target.value)}):i("input",{id:b,ref:h,type:"text",value:u,placeholder:o===void 0?void 0:a(o),onChange:y=>f(y.target.value)})]})})}function za(e,t){return{...e,[ct]:t}}function qa(e){const t=e[N];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[N]:{...t,offPage:!0}}}function Ja(e){return!e||typeof e!="object"?!1:e[N]?.offPage===!0}function Za(e){if(!e[N])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[ar]:!0}}function Qa(e){return lr(e)}function ec(e){const t=e[N];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[N]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as du,SCALAR_TEXT_CONTROLS as pu}from"efficient-easel/draw";function tc(e,t){if(!e[N])throw new Error("inOwnBox: the field holds no authored text");const{[rr]:o,...r}=e;return{...r,[sr]:!0,render:t}}const ji=new Set(br),pe={type:"radio",options:[{value:!0},{value:!1}]},an={text:{type:"object",objectFields:{text:{type:"text"},hidden:pe}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:pe}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},X=(e,t)=>{const n=F({...t,[N]:e},{...an[e.control],label:e.label});if(!ji.has(e.control))return n;const o=t.render;return{...Bt(n,"authored-copy"),render:r=>i(ur,{name:r.name,children:o(r)})}},nc="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Yi={field:"source.slug",set:!0},oc={not:Yi},zi="Select a word, then press the highlighter.",qi=new Set([zi]),Ji=e=>qi.has(e);function rc(e,t,n){return X({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function ic(e,t,n){return X({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function sc(e,t,n){return X({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function lc(e,t,n){return X({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function ac(e){return{type:"custom",[lt]:{label:e},...F({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(Cr,{value:st(t),onChange:n,label:e})}}function cc(e,t,n){return X({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const uc={Design:to,Animation:oo};function dc(e,t){return{type:"custom",render:()=>i(Zi,{text:e,values:t})}}function Zi({text:e,values:t}){return i("p",{className:"sf-note",children:a(e,t)})}function pc(e){return Ce(e)!==null&&e?.tabs!==void 0}const cn=new Map;function fc(e,t){const n=`${e}\0${t?t.join(""):""}`,o=cn.get(n)??{type:"custom",tabs:t,[ye]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(L,{})};return cn.set(n,o),o}const un=new Map;function hc(e){const t=un.get(e)??{type:"custom",[ye]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(L,{})};return un.set(e,t),t}function Qi(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function mc(e,t){return Qi(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(L,{})}}function gc(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(L,{})}}function bc({title:e,children:t}){const[n,o]=Z(()=>!Ye.has(e));return i(Lo,{title:e,open:n,onToggle:r=>{o(r),r?Ye.delete(e):Ye.add(e)},children:t})}const Ye=new Set;function es({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),s=r?o?.[r]:void 0,l=s?a(s):t;return k("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?a(o[c]):c;return i(Pe,{content:u,children:i(Vo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:l})]})}function wc(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(ts,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function ts({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const s=typeof o=="string"?o:void 0,{colors:l,n:c}=Qe(),u={background:l.background,surface:l.surface,surface2:ii(l),band:ri(l)},d=n?Xe:t,h=Si(s,t,d),p=en(void 0,d,u),f=n?gi:void 0,m=d===Xe?a("the theme's section background"):a("Theme {n} background",{n:c}),g=ns(s,t,l,c,u,r),b=U(p.toUpperCase(),m),S=ke(s),w=S?le(S,l,c):null;return w?i(se,{label:a(e),icon:i(ft,{}),value:w.hex,caption:w.words,onChange:r,changed:!0,onReset:()=>r(f),resetTo:b,choices:g}):i(Ft,{label:a(e),icon:i(ft,{}),value:h?"":en(s,t,u),inherited:p,resetTo:b,onChange:r,onReset:()=>r(f),choices:g})}function ns(e,t,n,o,r,s){const l=wi(e,t);return[{label:a("No fill"),color:"",selected:l==="none",onPick:()=>s(bi)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:l==="band",onPick:()=>s(Xe)},...Ze(ke(e)??"",n,o,s)]}function os(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=fi(r,t);return i(_,{label:a(e),icon:i(Ee,{}),changed:!s,action:i(x,{words:C()?.panel,label:a(e),changed:!s,detail:a("the theme's image stage"),onReset:()=>o(ci)}),children:es({swatches:pi,current:s?mi:hi(r,t),onPick:o,names:di})})}}}function Sc(e=n=>n,t){return ee({_gSectionTheme:T(_i),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(_r,{value:e(n),onChange:o,followLabel:t})}})}function fe(e){const t=I(),n=rn(e?.view),o=l=>ve(e.valueKey,l),r=e.numbersIn??(l=>$(t[o(l)])!==void 0),s=e.followsView??ws(n,r);return ki({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:Li,label:a(e.label),grid:e.grid,hasOwn:r(n),view:{tier:n,numbersIn:r,followsView:s},convertTo:e.convertTo??(l=>{const c=$(t[o(n)]);return c===void 0?{}:{[o(n)]:l(c)}})})}function q({min:e,max:t,step:n,value:o,onChange:r,suffix:s="",readout:l=!0,notch:c,ariaLabel:u,disabled:d=!1,placeholder:h,placeholderWord:p,onClear:f,units:m}){const g=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:g?"sf-slider has-notch":"sf-slider",style:g?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(tr,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...p?{emptyLabel:a(p)}:{},suffix:s||void 0,...m?{units:m}:{},showInput:l,label:u===void 0?void 0:a(u),disabled:d,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:b=>{b===null?f?.():b!==o&&r(b)}})})}function rs(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:l,restTrack:c,unsetMark:u,icon:d,unit:h="px"}=t;return{type:"custom",render:({value:p,onChange:f})=>{const m=typeof p=="number"?p:null,g=m===null;return i(_,{label:a(e),icon:d?Y(d):void 0,value:g?u||s===void 0?void 0:a(s):`${m}${h}`,changed:!g,action:u?_e(u,{changed:!g,onReset:()=>f(null)}):i(x,{words:C()?.panel,label:a(e),changed:!g,onReset:()=>f(null)}),hint:typeof l=="string"?a(l):l,children:c?c({min:n,max:o,step:r,px:m,label:e,onChange:f}):q({min:n,max:o,step:r,value:m??n,readout:!1,ariaLabel:e,onChange:f})})}}}const te="Corners",is={kind:"radius"};function ze(e){return{type:"custom",render:t=>{const{value:n,onChange:o}=t,r=typeof n=="number"&&Number.isFinite(n)?n:null,s=r!==null;return i(_,{label:a(te),icon:i(mt,{}),changed:s,action:_e(e.mark,{changed:s,onReset:()=>o(null)}),hint:e.hint,children:i(ss,{tier:e,px:r,name:t.name,onRadius:o})})}}}function R(e){const t=B();return[t?.values?.[e],n=>t?.onChange(e,n)]}function dn(){return Bt({type:"custom",render:()=>i(ir,{})},"always")}function he(){const e=B();return t=>e?.onChangeMany(t)}function ss({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[s,l]=R(e.sidesKey),c=he(),u=fe({row:e.row??is,label:te,grid:{min:A,max:xe,step:e.step??1},valueKey:n??"",view:"desktop"}),d=Tt(s)??[...It];return i(jo,{label:a(te),value:d,corners:To,onChange:h=>{const p=Tt(h)??[];l(p.length===It.length?null:p)},radius:t,onRadiusChange:u&&n?h=>c({[n]:h,...u.unitPatch(h===null)}):o,radiusMin:u?.grid.min??A,radiusMax:u?.grid.max??xe,radiusStep:u?.grid.step??e.step??1,radiusPlaceholder:u&&u.unit!=="px"?"–":String(r),...u?{radiusUnit:u.unit,units:u.units}:{}})}function pn(e,t){return ue(e,t)}function fn(){return dn()}function ls({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=G(),r=typeof o=="number"?`${o}px`:a("not set");return i(x,{words:C()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):U(r,a("Styles")),onReset:n})}function as(){const{cornerRadiusPx:e}=G();return typeof e=="number"?e:A}function cs(){return ze({sidesKey:"sectionCornerSides",row:Et,useFollowed:as,mark:i(ls,{label:te}),hint:us})}const us="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function _c(){return ee({_gShape:T("Shape"),sectionCorners:cs(),...pn(Et,"sectionCorners"),sectionCornerSides:fn(),...D("sectionBorder",bs),...ue(Yt,"sectionBorder",{tablet:!0,phone:!0})})}const ds=()=>({width:a("Border width"),sides:{top:a("Border top"),right:a("Border right"),bottom:a("Border bottom"),left:a("Border left")},style:a("Border style"),styles:{solid:a("Solid"),dashed:a("Dashed"),dotted:a("Dotted")},color:a("Border color"),unit:"px"});function ps(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function fs(){let e;try{const t=qt(G().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||ni.line}function hs({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:s=!0,above:l={},length:c}){const u=e&&typeof e=="object"?e:{},[d,h]=Z(()=>r?Do(u,l):!1),p=ds(),f=m=>ps(r&&s?m:{width:m.width,color:m.color,...s?{style:m.style}:{}});return i(_,{label:a("Border"),icon:i(ro,{}),action:r?i(vo,{each:d,label:a("Each side"),onChange:h}):void 0,children:i(Fo,{label:a("Border"),value:u,each:d,onChange:m=>t(f(m)),placeholder:n,presets:o,words:c?{...p,unit:c.unit}:p,styles:s,max:c?.grid.max??jt,...c?{step:c.grid.step,units:c.units}:{}})})}function ms({value:e,onChange:t,view:n}){const[o]=R("sectionBorder"),[r]=R(Fe("sectionBorder")),s=fs(),l=f=>f&&typeof f=="object"?f:{},c=n==="phone"?{...zt(l(o)),...zt(l(r))}:n==="tablet"?l(o):{},u=I(),d=he(),h=O("sectionBorder",n),p=fe({row:Yt,label:"Border",grid:{min:0,max:jt,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>qe(u[ve("sectionBorder",f)]),convertTo:f=>{const m=l(u[h]);return qe(m)?{[h]:gs(m,f)}:{}}});return i(hs,{value:e,length:p,onChange:p?f=>d({[h]:f,...p.unitPatch(!qe(f))}):t,placeholder:{sides:Bo(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}const hn=["width",...ti];function qe(e){if(!e||typeof e!="object")return!1;const t=e;return hn.some(n=>$(t[n])!==void 0)}function gs(e,t){const n={...e};for(const o of hn){const r=$(n[o]);r!==void 0&&(n[o]=t(r))}return n}function bs(e){return{type:"custom",render:({value:t,onChange:n})=>i(ms,{value:t,onChange:n,view:e})}}function ws(e,t){let n=je[e];for(;n&&je[n]!==null&&!t(n);)n=je[n];return n??e}function yc(e){return{type:"custom",render:()=>i(Ss,{partKey:e})}}function Ss({partKey:e}){const[t]=R("id"),[n]=R("_partStyles"),{textStyles:o}=G(),r=Tr();let s=null;try{s=Or().select}catch{s=null}const l=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(ko,{name:a("Text"),preview:xr(l,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??Er.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(Ir(t,e))}})}function mn(e){const{cornerRadiusPx:t}=G(),n=typeof t=="number"?t:e;let o=null;try{const{appState:s,selectedItem:l}=re(u=>u),c=l?.props?.id?String(l.props.id):void 0;o=c?Po(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Ro(r)?r:n}function _s({label:e,changed:t=!1,onReset:n=()=>{}}){const o=mn(A);return i(x,{words:C()?.panel,label:a(e),changed:t,detail:U(`${o}px`,a("the section")),onReset:n})}function ys(){return i(L,{children:a("Follows the section's Corners until you set a number here.")})}function Cs(){return ze({sidesKey:"cardCornerSides",row:Rt,useFollowed:()=>mn(A),mark:i(_s,{label:te}),hint:i(ys,{})})}function xs(){return{type:"custom",render:()=>i(Hn,{})}}function Cc(){return{_gShape:T("Shape"),cardCorners:Cs(),...pn(Rt,"cardCorners"),cardCornerSides:fn(),cardCornersApplyAll:xs()}}function Os(){return F({type:"custom",render:e=>i(Es,{...e})},{type:"select",label:j,options:[{value:"content",label:"Fit content"},{value:"equal",label:"Equal"},{value:[50],label:"Custom: the width of each block in %, the last block left out"}]})}function Is(e,t){const n=Vt(e);if(n!=="custom")return a($t.find(r=>r.value===n)?.label??"");const o=kt(Me(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):a("Custom")}function Es(e){const{value:t,onChange:n}=e,[o]=R("content"),r=Array.isArray(o)?o.length:0,s="follows"in e,l=t!=null,c=l?t:s?e.follows:void 0,u=Vt(c),d=r>=2&&r<=Pt,h=()=>[...Zo[r]??[]],p=J(null),f=w=>{const y=p.current;y&&JSON.stringify(w)===JSON.stringify(y.shares)?n(y.value):w&&n(w)},m=w=>{w===u||w==="custom"&&!d||n(w==="custom"?h():w)},g=a("The width bar works for 2 to {count} blocks.",{count:Pt}),b=l&&(s||t!=="content"),S=er().widths.hint(r,Jo);return i(_,{label:a(j),icon:i(Ie,{}),changed:b,hint:u!=="custom"?void 0:d?S:g,action:i(x,{words:C()?.panel,label:a(j),changed:b,disabled:e.readOnly===!0,detail:s?M(w=>a(w),Is(e.follows,r),e.followsView):a("Fit content"),onReset:()=>n(void 0)}),children:k("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(Nt,{label:a(j),value:u,options:$t.map(w=>({value:w.value,label:w.value==="custom"&&!d?g:a(w.label),icon:Fi(i("span",{className:"sf-gallery-pic sf-share-pic",children:gn(w.weights).map((y,v)=>i("i",{style:{gridColumn:`span ${y}`}},v))}),a(w.label),w.value==="custom"&&!d?g:a(w.label))})),onChange:m,columns:3,cell:bn,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&d?i("div",{onFocus:()=>{p.current={value:t,shares:kt(Me(c,r),r)}},onBlur:()=>{p.current=null},children:i(Qo,{label:a(j),count:r,value:Me(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function gn(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function xc(){return z(qr,i(po,{}),Ut,Ut[0].value)}function Oc(){return E("mobile",on(j,i(Ie,{}),ei.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:gn(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),Qr,{columns:2,cell:bn}))}const bn={width:"5.75rem",height:"3.25rem"};function Ic(){return $e("share",Os(),nn)[Fe("share")]}function Ts(){return E("mobile",W(Kt,i(ht,{}),Ge,Zr,1,Ge,"",{clear:{phoneFollows:!1,hint:Ge}}))}const wn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Ec(){const e=W(Kt,i(ht,{}),Xt,Jr,1,Xt,"",{clear:{emptyLabel:"Auto"}}),t=$e("columns",e,{...wn,tablet:nn.tablet}),n=$e("columns",e,wn,{phoneRow:Ts()});return{...t,phoneRow:n.phoneRow}}function Tc(e,t,n,o,r,s,l){return{type:"custom",render:({value:c,onChange:u,name:d})=>i(Rs,{label:e,min:t,max:n,step:o,fallback:r,role:s,value:c,onChange:u,name:d??"",length:l})}}function Rs({label:e,min:t,max:n,step:o,fallback:r,role:s,value:l,onChange:c,name:u,length:d}){const h=I(),p=he(),f=rn(d?.view),m=fe({row:d?.row??{kind:"fontSize"},label:e,grid:{min:t,max:n,step:o},valueKey:d?u:"",view:d?.view??"desktop",numbersIn:b=>b===f&&typeof h[u]=="number",followsView:f,convertTo:b=>typeof h[u]=="number"?{[u]:b(h[u])}:{}}),g=b=>m?p({[u]:b,...m.unitPatch(typeof b!="number")}):c(b);return i(_,{label:a(e),icon:i(xt,{noun:s}),action:i(x,{words:C()?.panel,label:a(e),changed:!xi(l),detail:a("the Text style in Styles"),onReset:()=>g(Ci),defaultAction:{onPress:()=>g(yi),title:a("Keep this section's own built-in size"),icon:i(io,{})}}),children:q({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof l=="number"?l:r,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:g})})}function Rc(){return{_gCellWidth:T("Cell width"),gridSpan:z("Positions",i(Ie,{}),[{label:"Auto",value:""},...Array.from({length:Xn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function I(){let e=null,t=null;try{e=nt(Ns),t=re(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Ns=Tn(null);function Ps({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:l,fallback:c}){const u=I()[l],d=Ae(void 0,u,c);return i(L,{children:q({min:e,max:t,step:n,value:Ae(o,u,c),readout:!1,ariaLabel:r,notch:d,onChange:s})})}function ks({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const l=I()[t],c=Ae(void 0,l,n);return i(x,{words:C()?.panel,label:a(e),changed:r,detail:M(u=>a(u),`${c}${o}`),onReset:s})}function Ls(e){return rs(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(ks,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Ps,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const As={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Fs={Top:Te,Bottom:St,Left:_t,Right:yt},vs=e=>{const t=Fs[e];return i(t,{})};function Nc(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>As[S],s=S=>W(r("Top"),i(Te,{}),P.min,P.max,P.step,S,"px"),l=(S,w,y,v=P)=>E("mobile",Ls({label:r(S),icon:vs(S),desktopKey:w,min:v.min,max:v.max,step:v.step,fallback:y})),c=e.top??P.min,u=e.bottom??P.min,d="sectionPaddingLeft",h="sectionPaddingRight",p=e.sideBounds??P,f=e.side??p.min,m=e.sidePhone??f,g=e.phone===!0,b=S=>g?E("desktop",S):S;return ee({...o?{_gSpacing:T("Padding")}:{},[t]:b(s(c)),...g?{[V(t)]:l("Top",t,c)}:{},...e.only==="top"?{}:{[n]:b(W(r("Bottom"),i(St,{}),P.min,P.max,P.step,u,"px")),...g?{[V(n)]:l("Bottom",n,u)}:{}},...e.sides?{[d]:b(W(r("Left"),i(_t,{}),p.min,p.max,p.step,f,"px")),...g?{[V(d)]:l("Left",d,m,p)}:{},[h]:b(W(r("Right"),i(yt,{}),p.min,p.max,p.step,f,"px")),...g?{[V(h)]:l("Right",h,m,p)}:{}}:{}})}function Pc(e,t){const n=Object.fromEntries(Object.entries(t).map(([s,l])=>[s,s in e&&Ce(l)?e[s]:l])),o={};let r=!1;for(const[s,l]of Object.entries(e)){if(s in t){r||Object.assign(o,n),r=!0;continue}o[s]=l}return r||Object.assign(o,n),o}const me="Width";function kc(e,t=Oi,n=!0){const o=t.map(r=>({label:Ii[r],value:r}));return ee({...n?{_gWidth:T(me)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(_,{label:a(me),icon:i(_o,{}),action:n?i(Vi,{inherited:s?.inherited??!1,onReset:()=>r(Ei),label:me}):void 0,children:de({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:me})})}})}function Lc({fill:e=!1}={}){const t=(r,s)=>({type:"custom",render:({value:l,onChange:c})=>i(Bs,{value:l,onChange:c,view:r,badge:s,fill:e})}),n=()=>Le("sectionHeightMode"),o=()=>Le("sectionHeightMode");return ee({_gHeight:T(Q),...D("sectionHeightMode",r=>r==="desktop"?t(r):t(r,s=>i(Ms,{view:r,onClear:()=>s(void 0)}))),...D("sectionHeightValue",n),...D("sectionHeightUnit",o)})}function Bs({value:e,onChange:t,view:n,badge:o,fill:r=!1}){const s=I(),{mode:l,number:c,unit:u}=Ds(n,s,e);return i(_,{label:Q,icon:Y(i(bt,{})),action:o?o(t):void 0,children:k("div",{className:"es-width-stack",children:[de({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...r?[{label:"Fill",value:"fill"}]:[]],value:l,onChange:t,ariaLabel:Q}),c?i(Gs,{view:n,mode:l,menu:u}):null]})})}function Sn(e,t){return e==="phone"&&Be(t)?Pr(t):Nr(t)}function ge(e,t){return e==="desktop"||(e==="tablet"?Be(t):Rr(t))?null:Sn(e,t)}function Ds(e,t,n){const r=(s=>Vr.includes(s))(n)?n:ge(e,t)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function Hs(e,t,n,o){const r=ge(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[O("sectionHeightMode",e)]:r.mode,...r.mode==="fixed"?{[O("sectionHeightUnit",e)]:r.unit}:{},...n==="sectionHeightUnit"?{[O("sectionHeightValue",e)]:r.value}:{},[O(n,e)]:o}}function _n(e,t,n){const o=B(),r=ge(e,I());return!o||!r?{followed:null,write:n}:{followed:r,write:l=>o.onChangeMany(c=>{const u=Hs(e,c,t,l);return u===null?{[O(t,e)]:l}:Object.keys(u).length?u:null})}}function Gs({view:e,mode:t,menu:n}){const o=B(),r=I(),s=O("sectionHeightValue",e),l=O("sectionHeightUnit",e),c=S=>w=>o?.onChangeMany(()=>({[S]:w})),{followed:u,write:d}=_n(e,"sectionHeightValue",c(s)),{write:h}=_n(e,"sectionHeightUnit",c(l)),p=t==="screen"?"%":r[l],f=(u?u.unit:p)==="%"?"%":"px",m=f==="%"?Yr:jr,g=r[s],b=n?{options:["px","%"],label:a("Unit"),onChange:S=>h(S)}:void 0;return q({min:m.min,max:m.max,step:m.step,value:u?null:typeof g=="number"?g:m.fallback,...u?{placeholder:u.value}:{},suffix:f,...b?{units:b}:{},ariaLabel:Q,onChange:d})}function Ms({view:e,onClear:t}){const n=I(),o=ge(e,n)===null,r=e==="phone"&&Be(n),s=Sn(e,n),l=M(c=>a(c),s.mode==="auto"?a("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return i(x,{words:C()?.panel,label:a(Q),changed:o,detail:l,onReset:t})}function Ac(e={}){const t=e.intro===!0,n=s=>({type:"custom",render:({value:l,onChange:c,id:u,name:d})=>i(js,{value:l,onChange:c,labelId:`${u??d??"stickTop"}-label`,view:s,intro:t})}),o=s=>({type:"custom",render:({value:l,onChange:c})=>i(Xs,{value:l,onChange:c,view:s,intro:t})}),r=s=>({type:"custom",render:({value:l,onChange:c})=>i($s,{value:l,onChange:c,view:s,intro:t})});return{_gStick:T(vr,{dot:t?Ks:Mt}),...D("stickTop",n),...D("stickTopDistance",o),...ue(He,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?D(De,r):{},...t?{}:{[Hr]:Ws()},...t||e.above===!1?{}:{[Ar]:Us()}}}function Ws(){const e=z(Gr,i(Te,{}),Mr,Br);return E("desktop",{...e,render:t=>{const n=e.render({...t,value:Kr(t.value),onChange:o=>t.onChange(Xr(o))});return _e(n,{hint:a(Dr)})}})}function Us(){const e=xn(Fr,!1,i(Ct,{}),Lr);return E("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const Ks={any:[Mt,kr]};function yn(e,t,n,o,r){const s=B(),l=I(),c=e==="desktop"||ne(e,l)?null:Je(e,ae(l,{intro:o}));return{followed:c,write:(c||r)&&s?d=>s.onChangeMany(h=>{const p=Vs(e,h,d,t,o),f=p===null?{[O(t,e)]:d}:p;return Object.keys(f).length?{...f,...r?.(d)??{}}:null}):n}}function Xs({value:e,onChange:t,view:n,intro:o}){const r=I(),s=ae(r,{intro:o}),l=h=>{const p=Bi(h);return p==="desktop"||ne(p,r)},c=fe({row:He,label:"Distance from top",grid:{min:H.min,max:H.max,step:H.step},valueKey:"stickTopDistance",view:n,numbersIn:h=>l(h)&&$(r[ve("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&s.ownTablet?"tablet":"desktop"}),{followed:u,write:d}=yn(n,"stickTopDistance",t,o,c?h=>c.unitPatch(h===void 0):void 0);return i("div",{className:"sf-field",children:q({min:c?.grid.min??H.min,max:c?.grid.max??H.max,step:c?.grid.step??H.step,value:u?null:typeof e=="number"?e:H.fallback,...u?{placeholder:u.distance}:{},...c?{suffix:c.unit,units:c.units}:{suffix:"px"},ariaLabel:a("Distance from top"),onChange:d})})}function $s({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:s}=yn(n,De,t,o);return i(_,{label:a(Gt),icon:Y(i(bt,{})),children:q({min:ie.min,max:ie.max,step:ie.step,value:r?null:$(e)??ie.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Gt),onChange:s})})}function ne(e,t){return e==="tablet"?Ur(t):Wr(t)}function Je(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,unit:t.tabletUnit,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,unit:t.desktopUnit,screens:t.desktopScreens}}function Vs(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ne(e,t))return null;if(n===void 0)return{};const s=Je(e,ae(t,{intro:r})),l=e==="phone"&&ne("tablet",t)?h=>O(h,"tablet"):h=>h,c=(h,p)=>t[l(h)]==null?{}:{[O(h,e)]:p},u=He.unitKey,d=t[l(u)]==null?{}:{[O(u,e)]:s.unit};return{[O("stickTop",e)]:!0,...c("stickTopDistance",s.distance),...d,...c(De,s.screens),[O(o,e)]:n}}function js({value:e,onChange:t,labelId:n,view:o,intro:r}){const s=I(),l=ae(s,{intro:r}),c=o==="phone"?l.phone:o==="tablet"?l.tablet:r?l.desktop:e===!0,u=o==="phone"&&l.ownTablet,d=o==="desktop"?null:Je(o,l),h=d?.on?$r(d.distance,d.unit):a("Off");return i(_,{label:a(Ht),labelId:n,icon:Y(i(Ct,{})),action:k(L,{children:[o!=="desktop"?i(x,{words:C()?.panel,label:a(Ht),changed:ne(o,s),detail:M(p=>a(p),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(Ne,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const Cn="e.g. about";function Fc(){return{_gAnchor:T("Anchor"),anchor:X({control:"plainText",label:"Name",placeholder:Cn},{type:"custom",render:({value:e,onChange:t})=>i(Qn,{value:e,onChange:t,nameBox:(n,o)=>i(K,{value:n,onChange:o,label:"Name",placeholder:Cn,hideable:!1,markup:!1})})})}}function vc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(zo,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:d=>r(d?d.toISOString():"")})})}}}function Bc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-date`;return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(Yo,{id:c,value:Pn(typeof o=="string"?o:null),onChange:u=>r(u?Nn(u):"")})})}}}function xn(e,t,n,o){return{type:"custom",...F({},{...pe,label:e}),render:r=>{const{value:s,onChange:l,id:c,name:u}=r,d="follows"in r,h=r,p=typeof s=="boolean",f=typeof h.follows=="boolean"?h.follows:t,m=p?s:d?f:t,g=`${c??u??e}-label`,b=h.readOnly===!0,S=i(Ne,{checked:m,onChange:l,disabled:b,ariaLabelledBy:g});return i(_,{label:a(e),labelId:g,icon:n,hint:o===void 0?void 0:a(o),action:d?k(L,{children:[i(x,{words:C()?.panel,label:a(e),changed:p,detail:h.followsNoView?a(f?"On":"Off"):M(w=>a(w),a(f?"On":"Off"),h.followsView),disabled:b,onReset:()=>l(void 0)}),S]}):S})}}}function Dc(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(Ys,{label:"Background",icon:i(go,{}),id:r,value:e,shown:yo(e),onChange:t})}}}function Hc(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(se,{label:a(e),icon:n,value:o||t,onChange:r})}}function Ys({label:e,icon:t,id:n,value:o,shown:r,onChange:s}){const{colors:l,n:c}=Qe(),u=ke(o),d=u?le(u,l,c):null;return i(se,{label:a(e),icon:t,id:n,value:d?d.hex:r,caption:d?.words,onChange:s,choices:Ze(u??"",l,c,s)})}function Gc(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(zs,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Ze(e,t,n,o){const r=Re(e);return or(t,n).map(s=>({label:s.label,color:s.value,selected:r===s.name,onPick:()=>o(s.name)}))}function zs({value:e,onChange:t,twin:n}){const{colors:o,n:r}=Qe(),s=o.background,l=U(s.toUpperCase(),a("Theme {n} background",{n:r})),[c,u]=R(Co),[d]=R(Oo),h=typeof d=="string"&&d.trim()!=="",p=Ot(c),f=oe=>u(Ot(oe)||void 0),m=Re(e),g=m?le(m,o,r):null,b=Ze(e,o,r,t),S=n?()=>t(void 0):()=>t("");let w=s,y=l;if(n){const oe=Re(n.follows),we=Io(n.follows),Se=oe?le(oe,o,r):we?{hex:we,words:we.toUpperCase()}:null;w=Se?.hex??s,y=M(En=>a(En),Se?Se.words:l,n.view)}const v=!n&&(Eo(e)||h)?i(qs,{value:p,onChange:f}):null;return g?i(se,{label:a("Fill"),icon:i(Ee,{}),value:g.hex,caption:g.words,onChange:t,changed:!0,onReset:S,resetTo:y,choices:b,children:v}):i(Ft,{label:a("Fill"),icon:i(Ee,{}),value:e,inherited:w,resetTo:y,onChange:t,onReset:S,choices:b,children:v})}function qs({value:e,onChange:t}){return de({options:xo.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:a("Fill")})}function Js(e,t,n){if((e?.content??[]).some(l=>l?.props?.id===t))return ce(n);const r=No(e,t);if(r.length===0)return null;const s=ce(tn(n));if(s!==null)return s;for(let l=r.length-1;l>0;l-=1){const c=ce(tn(r[l].sectionAccent));if(c!==null)return c}return ce(r[0].sectionAccent)}function Qe(){const e=qt(G().theme),[t]=R("sectionAccent");let n=null;try{const{appState:r,selectedItem:s}=re(c=>c),l=s?.props?.id?String(s.props.id):void 0;n=l?Js(r?.data,l,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:oi(e.themes[o]),n:o+1}}function Mc(){return dn()}const Wc={top:i(co,{}),right:i(ao,{}),bottom:i(so,{}),left:i(lo,{})};function Uc(e,t,n,o,r,s,l){const c=p=>t.find(f=>f.value===p),u=p=>({value:p,label:"",disabled:!0,title:o}),d=p=>{const f=t.find(g=>g.cell===p);if(!f)return u(`missing-${p}`);const m=s?.[p];return m?{value:f.value,label:f.label,icon:m}:{value:f.value,label:f.label}},h=[u("corner-top-left"),d("top"),u("corner-top-right"),d("left"),u("centre"),d("right"),u("corner-bottom-left"),d("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:f})=>{const m=t.some(g=>g.value===p)?p:n;return i(_,{label:a(e),icon:r,value:c(m)?.label?a(c(m).label):l?a(l):"",children:Pi(a,{label:e,value:m,onChange:f,points:h})})}}}function Kc(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:s})=>i(Sr,{label:e,options:(s.options??t).map(l=>({...l,label:a(l.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:a(n)}:{}})}}function Xc(e,t,n,o){return{type:"custom",options:t,fallback:n,...F({},{type:"select",label:e}),render:({value:r,onChange:s,field:l})=>i(yr,{label:e,options:(l.options??t).map(c=>({...c,label:a(c.label)})),fallback:l.fallback??n,value:r,onChange:s,placeholder:o===void 0?void 0:a(o)})}}function $c(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const Vc=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function jc(e,t,n){const o=Object.keys(rt).map(r=>({label:rt[r],value:r,picture:n[r]}));return{type:"custom",...F({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(Qs,{label:e,icon:t,options:o,onChange:r})}}function Zs(e,t,n){const o=kn(e,t,n);if(o!==void 0)return o==="save-makes-frame"?a("A frame is made from this video when you save the page."):o==="starts-dark"?a("This video starts dark, so no frame was made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="outside"?a("This video is on another website, so no frame can be made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="unsupported"?a("This video's file type gives no frame. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="failed"?a("No frame could be made from this video. It is tried again the next time you save the page. The slide shows its background colour while the video loads."):o==="image-no-frame"?a("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=An(e);return r==="frame-missing-image"?a("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?a("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?a("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?a("No image yet. The slide shows its background colour until you choose one."):void 0}function Qs({label:e,icon:t,options:n,onChange:o}){const r=B(),s=r?.values??{},l=Ln(s),c=nt(Bn),u=vn(c?.docId??null);let d=null;try{d=re(p=>p.appState.data)}catch{d=null}const h=Fn(r?.id,d,u);return i(_,{label:a(e),icon:Y(t),hint:Zs(s,h,c?.hasUnsavedEdits??!1),children:de({options:n,value:l,onChange:o,ariaLabel:e})})}function Yc(e,t,n,o={}){const r={type:"custom",[at]:!0,render:({value:s,onChange:l,name:c})=>i(wr,{value:s||"",onChange:l,fieldKey:c,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?E("each",r):r}const zc={HeroSingle:["imageFocal"],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function el(e){const t=a(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function qc({value:e,onChange:t,label:n}){const o=e||{},r=B(),s=r?r.values!==r.node.props:!0,l=!!o.pending&&s,c=!!o.pending&&!s,u=!!Ri(Ti()).geocode,d=ot(),h=(p,f)=>t({...o,[p]:f??void 0});return k(L,{children:[i(_,{label:a(n),icon:i(wt,{}),action:u?i(Pe,{content:a("Find from the address (OpenStreetMap)"),children:i(Lt,{"aria-label":a("Find from the address"),"aria-busy":l||void 0,disabled:l,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(bo,{})})}):void 0,children:u&&o.status?i(eo,{compact:!0,oneLine:!0,spaced:!1,status:l?"busy":o.ok&&!c?"found":"notfound",statusText:l?a("Finding…"):c?a(nr):a(o.status),hint:el(o)}):null}),i(_,{label:a("Enter by hand"),labelId:d,icon:i(uo,{}),action:i(Ne,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:d})}),o.manual&&i(_,{label:a("Latitude, longitude"),icon:i(wt,{}),children:k("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(At,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>h("lat",p),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(At,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>h("lng",p),min:-180,max:180,step:1e-4,placeholder:a("Longitude")})]})})]})}function tl(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function nl(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,s)=>s===t?{text:n}:r)}function Jc(e,t){return e===null?null:t>e?e:null}function ol(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}const Zc={label:"Ticker items",icon:i(mo,{})};function Qc(e,t,n,o){return{type:"custom",[N]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...F({},{...an.textList,label:e}),render:({value:r,onChange:s})=>i(rl,{label:e,icon:Y(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function rl({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const l=J(null),[c,u]=Z(null),d=p=>p.map(f=>({text:f?.text??""})),h=p=>{const f=ol(n,p,c);f===null&&(l.current=null),u(f),r(d(p))};return i(Ho,{label:a(e),icon:t,noun:a("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?i(vt,{target:l,value:tl(n,c),onChange:p=>r(nl(n,c??-1,p)),disabled:c===null,label:c===null?a("Formatting — click a row first"):a("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,f,m)=>i("input",{type:"text",className:s&&c===f?"sf-list-marking":void 0,value:p?.text??"",placeholder:a(o),"aria-label":a("{label} {n}",{label:a(e),n:f+1}),onChange:g=>m({text:g.target.value}),onFocus:g=>{l.current=g.currentTarget,u(f)}})})}function eu(e,t){const n=`${e.label} — row ${t+1}`;return X({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:a("{label} — row {n}",{label:a(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function tu(e){return{_gCards:T("Cards"),coverIndex:z("Cover image",i(ho,{}),mr,String(gr),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:os("Image background",ui),cardImage:On()}}function nu(){return{outline:z("Card outline",i(wo,{}),pr,hr),indexBadge:z("Card number",i(fo,{}),dr,fr),showBadge:xn("Product badge",!0,i(xt,{noun:"tag"}))}}function ou(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...pe,label:be.find(s=>s.id===r).label}),o=r=>F(Le(et),n(r));return{_gShowOnCard:T("Show on a card"),[et]:F({type:"custom",render:()=>i(il,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(et)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const et="showCardPrice",be=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function il({rest:e}){const t=I(),n=he(),o=l=>typeof t[l]=="boolean"?t[l]:void 0,r=l=>o(l)??e[l],s=be.some(({id:l})=>o(l)!==void 0&&o(l)!==e[l]);return i(tt,{parts:be,changed:s,shown:r,onPress:(l,c)=>n({[l]:c}),onReset:()=>n(Object.fromEntries(be.map(({id:l})=>[l,void 0])))})}function ru(e,t="display"){const n=V(t);return{[t]:E("desktop",{type:"custom",render:({value:o,onChange:r})=>i(tt,{parts:e,changed:Mo(o),shown:s=>Wo(o,s),onPress:(s,l)=>r(Xo(o,s,l)),onReset:()=>r(void 0)})}),[n]:E("mobile",{type:"custom",render:({value:o,onChange:r})=>i(sl,{parts:e,desktopKey:t,value:o,onChange:r})})}}function tt({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:l}){const c=a("Display");return i(_,{label:c,icon:i(no,{}),changed:t,action:i(x,{words:C()?.panel,label:c,changed:t,detail:s,onReset:r}),children:i(Go,{label:c,items:e.map(u=>({id:u.id,label:a(u.label),shown:n(u.id),...l?{disabled:!0,disabledReason:a(l)}:{}})),onChange:o})})}function sl({parts:e,desktopKey:t,value:n,onChange:o}){const r=I()[t];return i(tt,{parts:e,changed:Ko(n),shown:s=>Uo(r,n,s),onPress:(s,l)=>o($o(n,s,l)),onReset:()=>o(cr),detail:a("the same as Desktop")})}function On(e=Gn){return W("Card image",i(mt,{}),A,xe,Mn,A,e,{clear:{hint:A},hint:"Rounds the picture. The card's own corner is in Styles."})}function ll(){return ue(dt,"cardImage")}function iu(){return{cardImage:On(dt),...ll()}}function su(){return ze({sidesKey:"cornerSides",row:Kn,step:Wn,useFollowed:()=>A,mark:i(al,{label:Un}),hint:a("Rounds the picture. Left alone it stays square.")})}function al({label:e,changed:t=!1,onReset:n=()=>{}}){return i(x,{words:C()?.panel,label:a(e),changed:t,onReset:n})}function lu(){return{type:"custom",render:({value:e,onChange:t})=>i(pl,{value:typeof e=="string"?e:"",onChange:t})}}const In="own";function au(){const e=[{value:In,label:"Layout's own",picture:sn(Array.from({length:8},()=>[3,1]))},...Object.entries(jn).map(([t,n])=>({value:t,label:n.label,picture:sn([...n.phone,...n.phone])}))];return E("mobile",on("Layout",i(gt,{}),e,In,{columns:2,cell:Hi}))}function cl({layout:e,width:t}){const n=Yn(e),o=n?`${n[0]}/${n[1]}`:void 0;return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:o?"auto":6,gridAutoFlow:"row dense",gap:2},children:zn(e).map(([r,s],l)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${s}`,aspectRatio:o}},l))})}const ul={width:"3.5rem",height:"2.5rem"},dl=200;function pl({value:e,onChange:t}){const[n,o]=Z(null),[r,s]=Z(4),l=J(null);Rn(()=>{const m=l.current;if(!m||typeof ResizeObserver!="function")return;const g=()=>s(m.getBoundingClientRect().width>=dl?4:3);g();const b=new ResizeObserver(g);return b.observe(m),()=>b.disconnect()},[]);const c=e?Di(Oe,e):void 0,u=c?e:"",d=pt(n,u),h=pt(n,"").length,p=qn("no-symbol"),f=[{value:"",label:a("Not chosen"),icon:vi(p,a("Not chosen"))},...d.map(m=>({value:m,label:a(Oe[m].label),icon:i(cl,{layout:Oe[m],width:40})}))];return i(_,{label:a("Layout"),icon:i(gt,{}),value:c?a(c.label):void 0,children:i("div",{ref:l,style:{flex:"1 1 auto",minWidth:0},children:i(Nt,{label:a("Layout"),value:u,options:f,onChange:t,columns:r,cell:ul,header:k("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:a("Photos in a row")}),i(Ao,{options:[{id:"all",label:a("All")},...$n.map(m=>({id:String(m),label:String(m)}))],value:n===null?"all":String(n),ariaLabel:a("Photos in a row"),onChange:m=>o(m==="all"?null:Number(m))}),i("span",{className:"text-2xs text-ink-faint",children:a("{n} of {total} layouts",{n:h,total:Vn.length})})]})})})})}export{Yi as BOUND_TO_POST,nc as BOUND_TO_POST_NOTE,uc as BUCKET_ICONS,zc as CUSTOM_FIELD_MEDIA,qc as CoordsField,ln as DESKTOP_GAP_NOT_OVERLAP,tt as DisplayRow,Wc as EDGE_ARROWS,qo as FOCAL_DEFAULT,ye as FOLD_FIELD_MARKER,zi as HIGHLIGHT_HINT,K as HidableTextField,lt as LINK_FIELD_MARKER,$a as Label,at as MEDIA_FIELD_MARKER,Vc as MEDIA_TYPE_OPTIONS,oc as NOT_BOUND_TO_POST,bc as PanelBand,Zi as PanelNoteLine,Ns as RowPropsContext,ct as SCAFFOLD_FIELD_MARKER,pu as SCALAR_TEXT_CONTROLS,Mi as SiteGapDefaultReset,q as Slider,es as Swatches,du as TEXT_CONTROL_KINDS,N as TEXT_FIELD_MARKER,Zc as TICKER_ITEMS_ROW,rl as TextListField,Ys as ThemeFillRow,me as WIDTH_LABEL,Vi as WidthDefaultReset,ol as aimAfterListChange,Fc as anchorFields,U as backTo,wc as backgroundField,xc as boxBlockSpacingField,Ec as boxColumnsFields,Gc as boxFillField,Ts as boxPhoneRowField,Os as boxShareField,Oc as boxSharePhoneField,Ic as boxShareTabletField,Js as boxThemeIndexOf,fc as bucketHeader,yc as buttonWordsEntryField,Cs as cardCornersField,os as cardImageBackgroundField,On as cardImageField,iu as cardImageFields,tu as cardMediaFields,Cc as cardShapeFields,ou as cardShowFields,nu as cardStyleFields,Rc as cellWidthFields,Hc as colorInput,ja as containerDirectionField,Wi as containerGapField,Ui as containerGapPhoneField,Va as containerGapRows,Ki as containerGapTabletField,el as coordsResultTip,lc as copyText,fn as cornerSidesField,ze as cornersRowField,pn as cornersUnitFields,Bc as date,vc as dateTime,hc as designGroupHeader,ru as displayFields,Uc as edgePad,Ze as fillSlotChoices,Jc as focusAfterRemove,Mc as focusKeptField,mc as foldMarker,Ce as foldMetaOf,Qi as foldTitleOf,Hs as followedHeightPatch,Vs as followedStickPatch,lu as galleryLayoutField,au as galleryLayoutPhoneField,Lc as heightFields,ge as heightFollowedBy,Ds as heightLayersAt,Ya as heroGroupPlacementPoints,st as hidableText,Ji as hintIsWhileTyping,su as imageCornersField,tc as inOwnBox,pc as isBucketHeader,dn as keptBy,ac as linkField,Zs as loadingRowHint,jc as loadingShowsField,Kc as multiSelect,Dc as pageBackgroundField,dc as panelNote,Ls as phoneOverrideField,sc as plainText,cc as plainTextarea,rs as pxField,gc as quietMarker,it as readHidable,tl as rowText,Xc as searchSelect,ns as sectionBandChoices,cs as sectionCornersField,_c as sectionShapeFields,Sc as sectionThemeFields,nl as setRowText,Tc as sizeField,$c as sourceField,Nc as spacingFields,Ac as stickFields,Pc as swapPadding,rc as text,Dn as textFieldIdentifier,Ja as textFieldOffPage,Qa as textFieldPanelOnly,Qc as textList,eu as textListRowField,ic as textarea,xn as toggle,Yc as upload,fe as useLengthRow,he as useSelectedPatch,I as useSelectedProps,R as useSelectedSibling,Gi as useSiteGapDetail,kc as widthField,ec as withIdentifier,qa as withOffPage,Za as withPanelOnly,za as withScaffold};
|
|
1
|
+
"use client";import{jsx as i,jsxs as k,Fragment as L}from"react/jsx-runtime";import{cloneElement as _e,createContext as Tn,useContext as nt,useEffect as Rn,useId as ot,useRef as J,useState as Z}from"react";import{useEasel as re,useSelectedHost as B}from"efficient-easel/easel";import{PIN_LENGTH as ie,toDateKey as Nn,fromDateKey as Pn}from"efficient-shell/format";import{say as a,editorEaselWords as y}from"../../../format/lib/editor-words.js";import{finiteNumber as $}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as rt,firstFrameHint as kn,loadingShowsOf as Ln,loadingStillHint as An}from"../../../format/lib/hero-video.js";import{pageFramesFor as Fn,usePageVideoFrames as vn}from"../page-video-frames.js";import{ScreenDocumentContext as Bn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as it,hidableText as st}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Ce,LINK_FIELD_MARKER as lt,MEDIA_FIELD_MARKER as at,SCAFFOLD_FIELD_MARKER as ct,TEXT_FIELD_MARKER as N,foldMetaOf as ye,textFieldIdentifier as Dn}from"efficient-easel/draw";import Hn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as ut}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as Gn,CARD_IMAGE_RADIUS_ROW as dt,CARD_IMAGE_RADIUS_STEP as Mn,CORNER_RADIUS_MAX as xe,CORNER_RADIUS_MIN as A}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Wn,IMAGE_CORNERS_LABEL as Un,IMAGE_CORNERS_ROW as Kn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Xn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as $n,GALLERY_LAYOUTS as Oe,GALLERY_LAYOUT_KEYS as Vn,GALLERY_PHONE_LAYOUTS as jn,galleryChoices as pt,galleryLayoutRatio as Yn,galleryPictureCells as zn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as qn}from"./shell-glyph.js";import{anchorSiblingsOf as Jn,placementPoints as Zn}from"../../../format/lib/hero-group-placement.js";import Qn from"../../components/AnchorField.js";import eo from"../../components/SourceStatus.js";import{AdjustIcon as to,EyeIcon as no,AnimationIcon as oo,BackgroundIcon as ft,BorderAllIcon as ro,BlockSectionIcon as io,ColumnWidthsIcon as Ie,ColumnsIcon as ht,CornerIcon as mt,DirectionDownIcon as so,DirectionLeftIcon as lo,DirectionRightIcon as ao,DirectionUpIcon as co,EditIcon as uo,GapIcon as po,GridIcon as gt,GroundIcon as Ee,HashIcon as fo,HeightIcon as bt,ImageIcon as ho,ListIcon as mo,LocationIcon as wt,PaddingBottomIcon as St,PaddingLeftIcon as _t,PaddingRightIcon as Ct,PaddingTopIcon as Te,PageIcon as go,StickyIcon as yt,SearchIcon as bo,SquareIcon as wo,TypeIcon as So,WidthIcon as _o}from"efficient-easel/icons";import{FieldGlyph as xt}from"../../components/FieldGlyph.js";import{resolvePageBackground as Co}from"../../../format/lib/content/page-background.js";import{BOX_FILL_FADE_PROP as yo,BOX_FILL_FADES as xo,BOX_SWATCH_PROP as Oo,boxFillFadeOf as Ot,boxFillOf as Io,boxFillSlot as Re,boxPaintOf as Eo}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as It,CORNER_SIDE_POINTS as To,SECTION_CORNERS_ROW as Et,hasOwnSectionCorners as Ro,normalizeCornerSides as Tt}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as Rt}from"../../../format/lib/content/card-corners.js";import{enclosingPath as No,enclosingSection as Po}from"./enclosing-section.js";import{SettingsDefaultReset as x,SettingsDrill as ko,SettingsField as _,SettingsGroup as Lo,SettingsSegmented as Ao,SettingsBorder as Fo,SettingsSidesEach as vo,SettingsSwitch as Ne,borderSides as Bo,borderStartEach as Do}from"efficient-easel/panel";import{ListField as Ho}from"efficient-easel/fields";import{DisplayChips as Go}from"efficient-shell/ui";import{desktopDisplayChanged as Mo,partShownOnDesktop as Wo,partShownOnPhone as Uo,phoneDisplayChanged as Ko,withDesktopPart as Xo,withPhonePart as $o}from"../../../format/lib/content/part-display.js";import{ColorSwatch as Vo,CornersInput as jo,DatePicker as Yo,DateTimePicker as zo,FOCAL_DEFAULT as qo,IconPicker as Nt,COLUMN_COUNT_MAX as Pt,COLUMN_SHARE_MIN as Jo,COLUMN_SHARES_EQUAL as Zo,resolveColumnShares as kt,WidthsBar as Qo,useShellStrings as er,IconButton as Lt,InputNumber as At,Slider as tr,Tooltip as Pe}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as nr}from"./geocode-resolve.js";import{ColourRow as se,InheritedColourRow as Ft}from"./ColourControl.js";import{fillThemeColors as or,slotFill as le}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as ke}from"../../../format/lib/document/part-inks.js";import{keptByRow as Le}from"efficient-easel/screen/lib/document/style-fields";import vt from"./MarkupToolbar.js";import{deviceField as E}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as rr,NoControlMark as ir,noControlField as Bt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as sr}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as lr,PANEL_ONLY_FIELD as ar}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as cr,resolvePhoneValue as Ae}from"../../../format/lib/document/phone-override.js";import{phoneKey as V,tabletKey as Fe,viewKeyAt as ve}from"efficient-easel/draw";import{viewKey as O}from"../../../format/lib/animation/views.js";import{viewRows as D}from"../animation/view-rows.js";import{SuppressibleText as ur}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as dr,CARD_OUTLINE_OPTIONS as pr,DEFAULT_CARD_INDEX_FORMAT as fr,DEFAULT_CARD_OUTLINE as hr}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as mr,DEFAULT_COVER_INDEX as gr}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as br}from"efficient-easel/draw";import wr from"../../components/MediaUploadField.js";import Sr from"../../components/MultiSelectField.js";import _r from"../../components/SectionThemePicker.js";import Cr from"../../components/SearchSelectField.js";import yr from"../../components/StorefrontLinkField.js";import{UiIcon as Dt}from"efficient-easel/draw/client";import{SECTION_PADDING as P}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as xr}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Or}from"efficient-easel/draw/client";import{encodePartId as Ir}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as Er,useEaselStrings as Tr}from"efficient-easel/strings";import{hasPhoneHeight as Rr,hasTabletHeight as Be,resolveSectionMinHeight as Nr,resolveTabletHeight as Pr}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as kr,SECTION_PIN_ABOVE_HINT as Lr,SECTION_PIN_ABOVE_KEY as Ar,SECTION_PIN_ABOVE_LABEL as Fr,SECTION_PIN_GROUP as vr,SECTION_PIN_LABEL as Ht,SECTION_PIN_SCREENS_KEY as De,SECTION_PIN_SCREENS_LABEL as Gt,SECTION_PIN_STOP_DEFAULT as Br,SECTION_PIN_STOP_HINT as Dr,SECTION_PIN_STOP_KEY as Hr,SECTION_PIN_STOP_LABEL as Gr,SECTION_PIN_STOP_OPTIONS as Mr,SECTION_STICK_DISTANCE as H,SECTION_STICK_DISTANCE_ROW as He,SOME_VIEW_PINS as Mt,hasPhoneStick as Wr,hasTabletStick as Ur,resolveSectionStick as ae,sectionPinStopOf as Kr,sectionPinStopWrite as Xr}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as $r}from"../../../format/lib/content/css-length.js";import{SECTION_HEIGHT_MODES as Vr,SECTION_MIN_HEIGHT as jr,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as Yr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as zr,resolveContainerDirection as Wt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as qr,BOX_BLOCK_SPACING_POINTS as Ut,BOX_PHONE_ROW_LABEL as Kt,BOX_COLUMNS_MAX as Jr,BOX_COLUMNS_MIN as Xt,BOX_PHONE_ROW_MAX as Zr,BOX_PHONE_ROW_MIN as Ge,BOX_SHARE_CHOICES as $t,BOX_SHARE_LABEL as j,boxShareChoiceOf as Vt,boxShareWidthsOf as Me,BOX_SHARE_PHONE_DEFAULT as Qr,BOX_SHARE_PHONE_POINTS as ei}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as G}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as jt,BORDER_SIDES as ti,SECTION_BORDER_ROW as Yt,borderBySide as zt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as ni,normalizeTheme as qt,normalizeThemeColors as oi,sectionBandTone as ri,surfaceTwoTone as ii}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Jt,CONTAINER_GAP_BUILT_IN as si,CONTAINER_GAP_PHONE as We,GAP_FIELD_CONTAINER as Ue,followsSitePhoneGap as li,hasOwnContainerGap as ai,hasOwnPhoneGap as Ke,resolveContainerGap as Zt,resolvePhoneContainerGap as Qt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as ci,CARD_IMAGE_BG_OFF as ui,CARD_IMAGE_BG_SWATCH_NAMES as di,CARD_IMAGE_BG_SWATCHES as pi,isCardImageBackgroundInheriting as fi,cardImageBackgroundChoice as hi,THEME_CARD_IMAGE_BG as mi}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as gi,SECTION_BG_NO_FILL as bi,sectionBackgroundChoice as wi,THEME_SECTION_BG as Xe,isSectionBackgroundEmpty as Si,sectionBackgroundHex as en}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as _i,nestedAccentValue as tn,resolveSectionAccent as ce}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Ci,TYPE_SIZE_INHERIT as yi,isTypeSizeInheriting as xi}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Oi,WIDTH_CHOICE_LABEL as Ii,WIDTH_INHERIT as Ei}from"../../../format/lib/content/section-width.js";import{useEaselSession as Ti}from"efficient-easel/screen/lib/session-context";import{backendOf as Ri}from"../website-session.js";import{BOX_GAP as Ni,describedAs as F,group as T,iconOf as Y,sharedStyleKinds as ee}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as nn,onDesktopWords as M,phoneTwinFields as $e,saidAlignmentGrid as Pi,useLengthUnit as ki}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as Li,PICTURE_PICKER_ROW as Ai,directionField as Fi,gapField as Ve,iconPickerRow as on,lengthUnitFields as ue,pickerCellIcon as vi,pickerNoneIcon as Bi,Segmented as de,select as z,slider as W}from"./box-fields.js";import{VIEW_ABOVE as je}from"efficient-easel/screen/lib/content/length-units";import{tierOfView as rn,viewOfTier as Di}from"../../../format/lib/content/view-tier.js";import{ownEntry as Hi}from"../../../format/lib/own-entry.js";import{LAYOUT_CELL as Gi,galleryPhonePicture as sn}from"./choice-pictures.js";function Va({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function U(e,t){return a("{value} from {from}",{value:e,from:t})}function Mi(){const{blockGap:e}=G();return e===null?a("this container's own spacing"):U(`${e}px`,a("Styles"))}function Wi({inherited:e,onReset:t,label:n}){return i(x,{words:y()?.panel,label:a(n),changed:!e,detail:Mi(),onReset:t})}function Ui(e){return Ve({...Ni,builtIn:si[e],resolve:(t,n)=>Zt(e,t,n?.siteGap),action:(t,n)=>i(Wi,{inherited:!ai(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[Ue]:e}})}function Ki(e){return ut(E("mobile",{[Ue]:e,type:"custom",render:t=>i(Vi,{container:e,...t})}),ln)}function Xi(e){return ut(E("tablet",{[Ue]:e,type:"custom",render:t=>i($i,{container:e,...t})}),ln)}const ln={not:{field:"gap",in:Array.from({length:-Jt.min},(e,t)=>Jt.min+t)}};function ja(e){return{gap:E("desktop",Ui(e)),[Fe("gap")]:Xi(e),[V("gap")]:Ki(e)}}function $i({container:e,...t}){const[n]=R("gap"),{siteGap:o}=t.field??{},r=Math.max(We.min,Zt(e,n,o));return Ve({...We,builtIn:r,resolve:l=>Ke(l)?l:r,action:(l,c)=>i(x,{words:y()?.panel,label:a("Gap"),changed:Ke(l),detail:M(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function Vi({container:e,...t}){const[n]=R("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=Qt(e,void 0,n,o,r);return Ve({...We,builtIn:s,resolve:c=>Qt(e,c,n,o,r),action:(c,u)=>i(x,{words:y()?.panel,label:a("Gap"),changed:Ke(c),detail:U(`${s}px`,li(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function Ya(e){return Fi({offered:zr(e),fallback:Wt(e,void 0),resolve:t=>Wt(e,t)})}function za(e,t){return Zn(t?Jn(e,t):[],t)}function ji({inherited:e,onReset:t,label:n}){return i(x,{words:y()?.panel,label:a(n),changed:!e,detail:U(a("Full"),a("the page")),onReset:t})}function K({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:l=!0,markup:c=!0}){const{text:u,hidden:d}=it(e),h=J(null),p=J(null),f=C=>t(l?{text:C,hidden:d}:C),m=()=>t({text:u,hidden:!d}),g=l&&d,b=ot(),S=r?Zi(r)?i("span",{className:"sf-hint-while-typing",children:a(r)}):a(r):void 0,w=d?a("Show {label} on the slide",{label:a(n)}):a("Hide {label} on the slide",{label:a(n)});return i(_,{label:a(n),icon:i(So,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:S,action:l?i(Pe,{content:w,children:i(Lt,{"aria-pressed":d,"aria-label":w,onClick:m,children:d?i(Dt,{name:"eye-off",size:14}):i(Dt,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[c&&i(vt,{target:s?p:h,value:u,onChange:f}),s?i("textarea",{id:b,ref:p,value:u,placeholder:o===void 0?void 0:a(o),onChange:C=>f(C.target.value)}):i("input",{id:b,ref:h,type:"text",value:u,placeholder:o===void 0?void 0:a(o),onChange:C=>f(C.target.value)})]})})}function qa(e,t){return{...e,[ct]:t}}function Ja(e){const t=e[N];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[N]:{...t,offPage:!0}}}function Za(e){return!e||typeof e!="object"?!1:e[N]?.offPage===!0}function Qa(e){if(!e[N])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[ar]:!0}}function ec(e){return lr(e)}function tc(e){const t=e[N];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[N]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as pu,SCALAR_TEXT_CONTROLS as fu}from"efficient-easel/draw";function nc(e,t){if(!e[N])throw new Error("inOwnBox: the field holds no authored text");const{[rr]:o,...r}=e;return{...r,[sr]:!0,render:t}}const Yi=new Set(br),pe={type:"radio",options:[{value:!0},{value:!1}]},an={text:{type:"object",objectFields:{text:{type:"text"},hidden:pe}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:pe}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},X=(e,t)=>{const n=F({...t,[N]:e},{...an[e.control],label:e.label});if(!Yi.has(e.control))return n;const o=t.render;return{...Bt(n,"authored-copy"),render:r=>i(ur,{name:r.name,children:o(r)})}},oc="Everything else on this block comes from the linked post. Unlink it to edit by hand.",zi={field:"source.slug",set:!0},rc={not:zi},qi="Select a word, then press the highlighter.",Ji=new Set([qi]),Zi=e=>Ji.has(e);function ic(e,t,n){return X({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function sc(e,t,n){return X({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function lc(e,t,n){return X({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function ac(e,t,n){return X({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function cc(e){return{type:"custom",[lt]:{label:e},...F({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(yr,{value:st(t),onChange:n,label:e})}}function uc(e,t,n){return X({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const dc={Design:to,Animation:oo};function pc(e,t){return{type:"custom",render:()=>i(Qi,{text:e,values:t})}}function Qi({text:e,values:t}){return i("p",{className:"sf-note",children:a(e,t)})}function fc(e){return ye(e)!==null&&e?.tabs!==void 0}const cn=new Map;function hc(e,t){const n=`${e}\0${t?t.join(""):""}`,o=cn.get(n)??{type:"custom",tabs:t,[Ce]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(L,{})};return cn.set(n,o),o}const un=new Map;function mc(e){const t=un.get(e)??{type:"custom",[Ce]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(L,{})};return un.set(e,t),t}function es(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function gc(e,t){return es(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(L,{})}}function bc(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(L,{})}}function wc({title:e,children:t}){const[n,o]=Z(()=>!Ye.has(e));return i(Lo,{title:e,open:n,onToggle:r=>{o(r),r?Ye.delete(e):Ye.add(e)},children:t})}const Ye=new Set;function ts({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),s=r?o?.[r]:void 0,l=s?a(s):t;return k("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?a(o[c]):c;return i(Pe,{content:u,children:i(Vo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:l})]})}function Sc(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(ns,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function ns({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const s=typeof o=="string"?o:void 0,{colors:l,n:c}=Qe(),u={background:l.background,surface:l.surface,surface2:ii(l),band:ri(l)},d=n?Xe:t,h=Si(s,t,d),p=en(void 0,d,u),f=n?gi:void 0,m=d===Xe?a("the theme's section background"):a("Theme {n} background",{n:c}),g=os(s,t,l,c,u,r),b=U(p.toUpperCase(),m),S=ke(s),w=S?le(S,l,c):null;return w?i(se,{label:a(e),icon:i(ft,{}),value:w.hex,caption:w.words,onChange:r,changed:!0,onReset:()=>r(f),resetTo:b,choices:g}):i(Ft,{label:a(e),icon:i(ft,{}),value:h?"":en(s,t,u),inherited:p,resetTo:b,onChange:r,onReset:()=>r(f),choices:g})}function os(e,t,n,o,r,s){const l=wi(e,t);return[{label:a("No fill"),color:"",selected:l==="none",onPick:()=>s(bi)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:l==="band",onPick:()=>s(Xe)},...Ze(ke(e)??"",n,o,s)]}function rs(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=fi(r,t);return i(_,{label:a(e),icon:i(Ee,{}),changed:!s,action:i(x,{words:y()?.panel,label:a(e),changed:!s,detail:a("the theme's image stage"),onReset:()=>o(ci)}),children:ts({swatches:pi,current:s?mi:hi(r,t),onPick:o,names:di})})}}}function _c(e=n=>n,t){return ee({_gSectionTheme:T(_i),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(_r,{value:e(n),onChange:o,followLabel:t})}})}function fe(e){const t=I(),n=rn(e?.view),o=l=>ve(e.valueKey,l),r=e.numbersIn??(l=>$(t[o(l)])!==void 0),s=e.followsView??Ss(n,r);return ki({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:Li,label:a(e.label),grid:e.grid,hasOwn:r(n),view:{tier:n,numbersIn:r,followsView:s},convertTo:e.convertTo??(l=>{const c=$(t[o(n)]);return c===void 0?{}:{[o(n)]:l(c)}})})}function q({min:e,max:t,step:n,value:o,onChange:r,suffix:s="",readout:l=!0,notch:c,ariaLabel:u,disabled:d=!1,placeholder:h,placeholderWord:p,onClear:f,units:m}){const g=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:g?"sf-slider has-notch":"sf-slider",style:g?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(tr,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...p?{emptyLabel:a(p)}:{},suffix:s||void 0,...m?{units:m}:{},showInput:l,label:u===void 0?void 0:a(u),disabled:d,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:b=>{b===null?f?.():b!==o&&r(b)}})})}function is(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:l,restTrack:c,unsetMark:u,icon:d,unit:h="px"}=t;return{type:"custom",render:({value:p,onChange:f})=>{const m=typeof p=="number"?p:null,g=m===null;return i(_,{label:a(e),icon:d?Y(d):void 0,value:g?u||s===void 0?void 0:a(s):`${m}${h}`,changed:!g,action:u?_e(u,{changed:!g,onReset:()=>f(null)}):i(x,{words:y()?.panel,label:a(e),changed:!g,onReset:()=>f(null)}),hint:typeof l=="string"?a(l):l,children:c?c({min:n,max:o,step:r,px:m,label:e,onChange:f}):q({min:n,max:o,step:r,value:m??n,readout:!1,ariaLabel:e,onChange:f})})}}}const te="Corners",ss={kind:"radius"};function ze(e){return{type:"custom",render:t=>{const{value:n,onChange:o}=t,r=typeof n=="number"&&Number.isFinite(n)?n:null,s=r!==null;return i(_,{label:a(te),icon:i(mt,{}),changed:s,action:_e(e.mark,{changed:s,onReset:()=>o(null)}),hint:e.hint,children:i(ls,{tier:e,px:r,name:t.name,onRadius:o})})}}}function R(e){const t=B();return[t?.values?.[e],n=>t?.onChange(e,n)]}function dn(){return Bt({type:"custom",render:()=>i(ir,{})},"always")}function he(){const e=B();return t=>e?.onChangeMany(t)}function ls({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[s,l]=R(e.sidesKey),c=he(),u=fe({row:e.row??ss,label:te,grid:{min:A,max:xe,step:e.step??1},valueKey:n??"",view:"desktop"}),d=Tt(s)??[...It];return i(jo,{label:a(te),value:d,corners:To,onChange:h=>{const p=Tt(h)??[];l(p.length===It.length?null:p)},radius:t,onRadiusChange:u&&n?h=>c({[n]:h,...u.unitPatch(h===null)}):o,radiusMin:u?.grid.min??A,radiusMax:u?.grid.max??xe,radiusStep:u?.grid.step??e.step??1,radiusPlaceholder:u&&u.unit!=="px"?"–":String(r),...u?{radiusUnit:u.unit,units:u.units}:{}})}function pn(e,t){return ue(e,t)}function fn(){return dn()}function as({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=G(),r=typeof o=="number"?`${o}px`:a("not set");return i(x,{words:y()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):U(r,a("Styles")),onReset:n})}function cs(){const{cornerRadiusPx:e}=G();return typeof e=="number"?e:A}function us(){return ze({sidesKey:"sectionCornerSides",row:Et,useFollowed:cs,mark:i(as,{label:te}),hint:ds})}const ds="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function Cc(){return ee({_gShape:T("Shape"),sectionCorners:us(),...pn(Et,"sectionCorners"),sectionCornerSides:fn(),...D("sectionBorder",ws),...ue(Yt,"sectionBorder",{tablet:!0,phone:!0})})}const ps=()=>({width:a("Border width"),sides:{top:a("Border top"),right:a("Border right"),bottom:a("Border bottom"),left:a("Border left")},style:a("Border style"),styles:{solid:a("Solid"),dashed:a("Dashed"),dotted:a("Dotted")},color:a("Border color"),unit:"px"});function fs(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function hs(){let e;try{const t=qt(G().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||ni.line}function ms({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:s=!0,above:l={},length:c}){const u=e&&typeof e=="object"?e:{},[d,h]=Z(()=>r?Do(u,l):!1),p=ps(),f=m=>fs(r&&s?m:{width:m.width,color:m.color,...s?{style:m.style}:{}});return i(_,{label:a("Border"),icon:i(ro,{}),action:r?i(vo,{each:d,label:a("Each side"),onChange:h}):void 0,children:i(Fo,{label:a("Border"),value:u,each:d,onChange:m=>t(f(m)),placeholder:n,presets:o,words:c?{...p,unit:c.unit}:p,styles:s,max:c?.grid.max??jt,...c?{step:c.grid.step,units:c.units}:{}})})}function gs({value:e,onChange:t,view:n}){const[o]=R("sectionBorder"),[r]=R(Fe("sectionBorder")),s=hs(),l=f=>f&&typeof f=="object"?f:{},c=n==="phone"?{...zt(l(o)),...zt(l(r))}:n==="tablet"?l(o):{},u=I(),d=he(),h=O("sectionBorder",n),p=fe({row:Yt,label:"Border",grid:{min:0,max:jt,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>qe(u[ve("sectionBorder",f)]),convertTo:f=>{const m=l(u[h]);return qe(m)?{[h]:bs(m,f)}:{}}});return i(ms,{value:e,length:p,onChange:p?f=>d({[h]:f,...p.unitPatch(!qe(f))}):t,placeholder:{sides:Bo(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}const hn=["width",...ti];function qe(e){if(!e||typeof e!="object")return!1;const t=e;return hn.some(n=>$(t[n])!==void 0)}function bs(e,t){const n={...e};for(const o of hn){const r=$(n[o]);r!==void 0&&(n[o]=t(r))}return n}function ws(e){return{type:"custom",render:({value:t,onChange:n})=>i(gs,{value:t,onChange:n,view:e})}}function Ss(e,t){let n=je[e];for(;n&&je[n]!==null&&!t(n);)n=je[n];return n??e}function yc(e){return{type:"custom",render:()=>i(_s,{partKey:e})}}function _s({partKey:e}){const[t]=R("id"),[n]=R("_partStyles"),{textStyles:o}=G(),r=Tr();let s=null;try{s=Or().select}catch{s=null}const l=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(ko,{name:a("Text"),preview:xr(l,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??Er.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(Ir(t,e))}})}function mn(e){const{cornerRadiusPx:t}=G(),n=typeof t=="number"?t:e;let o=null;try{const{appState:s,selectedItem:l}=re(u=>u),c=l?.props?.id?String(l.props.id):void 0;o=c?Po(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Ro(r)?r:n}function Cs({label:e,changed:t=!1,onReset:n=()=>{}}){const o=mn(A);return i(x,{words:y()?.panel,label:a(e),changed:t,detail:U(`${o}px`,a("the section")),onReset:n})}function ys(){return i(L,{children:a("Follows the section's Corners until you set a number here.")})}function xs(){return ze({sidesKey:"cardCornerSides",row:Rt,useFollowed:()=>mn(A),mark:i(Cs,{label:te}),hint:i(ys,{})})}function Os(){return{type:"custom",render:()=>i(Hn,{})}}function xc(){return{_gShape:T("Shape"),cardCorners:xs(),...pn(Rt,"cardCorners"),cardCornerSides:fn(),cardCornersApplyAll:Os()}}function Is(){return F({type:"custom",[Ai]:!0,render:e=>i(Ts,{...e})},{type:"select",label:j,options:[{value:"content",label:"Fit content"},{value:"equal",label:"Equal"},{value:[50],label:"Custom: the width of each block in %, the last block left out"}]})}function Es(e,t){const n=Vt(e);if(n!=="custom")return a($t.find(r=>r.value===n)?.label??"");const o=kt(Me(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):a("Custom")}function Ts(e){const{value:t,onChange:n}=e,[o]=R("content"),r=Array.isArray(o)?o.length:0,s="follows"in e,l=t!=null,c=l?t:s?e.follows:void 0,u=Vt(c),d=r>=2&&r<=Pt,h=()=>[...Zo[r]??[]],p=J(null),f=w=>{const C=p.current;C&&JSON.stringify(w)===JSON.stringify(C.shares)?n(C.value):w&&n(w)},m=w=>{w===u||w==="custom"&&!d||n(w==="custom"?h():w)},g=a("The width bar works for 2 to {count} blocks.",{count:Pt}),b=l&&(s||t!=="content"),S=er().widths.hint(r,Jo);return i(_,{label:a(j),icon:i(Ie,{}),changed:b,hint:u!=="custom"?void 0:d?S:g,action:i(x,{words:y()?.panel,label:a(j),changed:b,disabled:e.readOnly===!0,detail:s?M(w=>a(w),Es(e.follows,r),e.followsView):a("Fit content"),onReset:()=>n(void 0)}),children:k("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(Nt,{label:a(j),value:u,options:$t.map(w=>({value:w.value,label:w.value==="custom"&&!d?g:a(w.label),icon:vi(i("span",{className:"sf-gallery-pic sf-share-pic",children:gn(w.weights).map((C,v)=>i("i",{style:{gridColumn:`span ${C}`}},v))}),a(w.label),w.value==="custom"&&!d?g:a(w.label))})),onChange:m,columns:3,cell:bn,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&d?i("div",{onFocus:()=>{p.current={value:t,shares:kt(Me(c,r),r)}},onBlur:()=>{p.current=null},children:i(Qo,{label:a(j),count:r,value:Me(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function gn(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function Oc(){return z(qr,i(po,{}),Ut,Ut[0].value)}function Ic(){return E("mobile",on(j,i(Ie,{}),ei.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:gn(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),Qr,{columns:2,cell:bn}))}const bn={width:"5.75rem",height:"3.25rem",words:!0};function Ec(){return $e("share",Is(),nn)[Fe("share")]}function Rs(){return E("mobile",W(Kt,i(ht,{}),Ge,Zr,1,Ge,"",{clear:{phoneFollows:!1,hint:Ge}}))}const wn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Tc(){const e=W(Kt,i(ht,{}),Xt,Jr,1,Xt,"",{clear:{emptyLabel:"Auto"}}),t=$e("columns",e,{...wn,tablet:nn.tablet}),n=$e("columns",e,wn,{phoneRow:Rs()});return{...t,phoneRow:n.phoneRow}}function Rc(e,t,n,o,r,s,l){return{type:"custom",render:({value:c,onChange:u,name:d})=>i(Ns,{label:e,min:t,max:n,step:o,fallback:r,role:s,value:c,onChange:u,name:d??"",length:l})}}function Ns({label:e,min:t,max:n,step:o,fallback:r,role:s,value:l,onChange:c,name:u,length:d}){const h=I(),p=he(),f=rn(d?.view),m=fe({row:d?.row??{kind:"fontSize"},label:e,grid:{min:t,max:n,step:o},valueKey:d?u:"",view:d?.view??"desktop",numbersIn:b=>b===f&&typeof h[u]=="number",followsView:f,convertTo:b=>typeof h[u]=="number"?{[u]:b(h[u])}:{}}),g=b=>m?p({[u]:b,...m.unitPatch(typeof b!="number")}):c(b);return i(_,{label:a(e),icon:i(xt,{noun:s}),action:i(x,{words:y()?.panel,label:a(e),changed:!xi(l),detail:a("the Text style in Styles"),onReset:()=>g(yi),defaultAction:{onPress:()=>g(Ci),title:a("Keep this section's own built-in size"),icon:i(io,{})}}),children:q({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof l=="number"?l:r,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:g})})}function Nc(){return{_gCellWidth:T("Cell width"),gridSpan:z("Positions",i(Ie,{}),[{label:"Auto",value:""},...Array.from({length:Xn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function I(){let e=null,t=null;try{e=nt(Ps),t=re(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Ps=Tn(null);function ks({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:l,fallback:c}){const u=I()[l],d=Ae(void 0,u,c);return i(L,{children:q({min:e,max:t,step:n,value:Ae(o,u,c),readout:!1,ariaLabel:r,notch:d,onChange:s})})}function Ls({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const l=I()[t],c=Ae(void 0,l,n);return i(x,{words:y()?.panel,label:a(e),changed:r,detail:M(u=>a(u),`${c}${o}`),onReset:s})}function As(e){return is(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Ls,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(ks,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Fs={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},vs={Top:Te,Bottom:St,Left:_t,Right:Ct},Bs=e=>{const t=vs[e];return i(t,{})};function Pc(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>Fs[S],s=S=>W(r("Top"),i(Te,{}),P.min,P.max,P.step,S,"px"),l=(S,w,C,v=P)=>E("mobile",As({label:r(S),icon:Bs(S),desktopKey:w,min:v.min,max:v.max,step:v.step,fallback:C})),c=e.top??P.min,u=e.bottom??P.min,d="sectionPaddingLeft",h="sectionPaddingRight",p=e.sideBounds??P,f=e.side??p.min,m=e.sidePhone??f,g=e.phone===!0,b=S=>g?E("desktop",S):S;return ee({...o?{_gSpacing:T("Padding")}:{},[t]:b(s(c)),...g?{[V(t)]:l("Top",t,c)}:{},...e.only==="top"?{}:{[n]:b(W(r("Bottom"),i(St,{}),P.min,P.max,P.step,u,"px")),...g?{[V(n)]:l("Bottom",n,u)}:{}},...e.sides?{[d]:b(W(r("Left"),i(_t,{}),p.min,p.max,p.step,f,"px")),...g?{[V(d)]:l("Left",d,m,p)}:{},[h]:b(W(r("Right"),i(Ct,{}),p.min,p.max,p.step,f,"px")),...g?{[V(h)]:l("Right",h,m,p)}:{}}:{}})}function kc(e,t){const n=Object.fromEntries(Object.entries(t).map(([s,l])=>[s,s in e&&ye(l)?e[s]:l])),o={};let r=!1;for(const[s,l]of Object.entries(e)){if(s in t){r||Object.assign(o,n),r=!0;continue}o[s]=l}return r||Object.assign(o,n),o}const me="Width";function Lc(e,t=Oi,n=!0){const o=t.map(r=>({label:Ii[r],value:r}));return ee({...n?{_gWidth:T(me)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(_,{label:a(me),icon:i(_o,{}),action:n?i(ji,{inherited:s?.inherited??!1,onReset:()=>r(Ei),label:me}):void 0,children:de({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:me})})}})}function Ac({fill:e=!1}={}){const t=(r,s)=>({type:"custom",render:({value:l,onChange:c})=>i(Ds,{value:l,onChange:c,view:r,badge:s,fill:e})}),n=()=>Le("sectionHeightMode"),o=()=>Le("sectionHeightMode");return ee({_gHeight:T(Q),...D("sectionHeightMode",r=>r==="desktop"?t(r):t(r,s=>i(Ws,{view:r,onClear:()=>s(void 0)}))),...D("sectionHeightValue",n),...D("sectionHeightUnit",o)})}function Ds({value:e,onChange:t,view:n,badge:o,fill:r=!1}){const s=I(),{mode:l,number:c,unit:u}=Hs(n,s,e);return i(_,{label:Q,icon:Y(i(bt,{})),action:o?o(t):void 0,children:k("div",{className:"es-width-stack",children:[de({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...r?[{label:"Fill",value:"fill"}]:[]],value:l,onChange:t,ariaLabel:Q}),c?i(Ms,{view:n,mode:l,menu:u}):null]})})}function Sn(e,t){return e==="phone"&&Be(t)?Pr(t):Nr(t)}function ge(e,t){return e==="desktop"||(e==="tablet"?Be(t):Rr(t))?null:Sn(e,t)}function Hs(e,t,n){const r=(s=>Vr.includes(s))(n)?n:ge(e,t)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function Gs(e,t,n,o){const r=ge(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[O("sectionHeightMode",e)]:r.mode,...r.mode==="fixed"?{[O("sectionHeightUnit",e)]:r.unit}:{},...n==="sectionHeightUnit"?{[O("sectionHeightValue",e)]:r.value}:{},[O(n,e)]:o}}function _n(e,t,n){const o=B(),r=ge(e,I());return!o||!r?{followed:null,write:n}:{followed:r,write:l=>o.onChangeMany(c=>{const u=Gs(e,c,t,l);return u===null?{[O(t,e)]:l}:Object.keys(u).length?u:null})}}function Ms({view:e,mode:t,menu:n}){const o=B(),r=I(),s=O("sectionHeightValue",e),l=O("sectionHeightUnit",e),c=S=>w=>o?.onChangeMany(()=>({[S]:w})),{followed:u,write:d}=_n(e,"sectionHeightValue",c(s)),{write:h}=_n(e,"sectionHeightUnit",c(l)),p=t==="screen"?"%":r[l],f=(u?u.unit:p)==="%"?"%":"px",m=f==="%"?Yr:jr,g=r[s],b=n?{options:["px","%"],label:a("Unit"),onChange:S=>h(S)}:void 0;return q({min:m.min,max:m.max,step:m.step,value:u?null:typeof g=="number"?g:m.fallback,...u?{placeholder:u.value}:{},suffix:f,...b?{units:b}:{},ariaLabel:Q,onChange:d})}function Ws({view:e,onClear:t}){const n=I(),o=ge(e,n)===null,r=e==="phone"&&Be(n),s=Sn(e,n),l=M(c=>a(c),s.mode==="auto"?a("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return i(x,{words:y()?.panel,label:a(Q),changed:o,detail:l,onReset:t})}function Fc(e={}){const t=e.intro===!0,n=s=>({type:"custom",render:({value:l,onChange:c,id:u,name:d})=>i(Ys,{value:l,onChange:c,labelId:`${u??d??"stickTop"}-label`,view:s,intro:t})}),o=s=>({type:"custom",render:({value:l,onChange:c})=>i($s,{value:l,onChange:c,view:s,intro:t})}),r=s=>({type:"custom",render:({value:l,onChange:c})=>i(Vs,{value:l,onChange:c,view:s,intro:t})});return{_gStick:T(vr,{dot:t?Xs:Mt}),...D("stickTop",n),...D("stickTopDistance",o),...ue(He,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?D(De,r):{},...t?{}:{[Hr]:Us()},...t||e.above===!1?{}:{[Ar]:Ks()}}}function Us(){const e=z(Gr,i(Te,{}),Mr,Br);return E("desktop",{...e,render:t=>{const n=e.render({...t,value:Kr(t.value),onChange:o=>t.onChange(Xr(o))});return _e(n,{hint:a(Dr)})}})}function Ks(){const e=xn(Fr,!1,i(yt,{}),Lr);return E("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const Xs={any:[Mt,kr]};function Cn(e,t,n,o,r){const s=B(),l=I(),c=e==="desktop"||ne(e,l)?null:Je(e,ae(l,{intro:o}));return{followed:c,write:(c||r)&&s?d=>s.onChangeMany(h=>{const p=js(e,h,d,t,o),f=p===null?{[O(t,e)]:d}:p;return Object.keys(f).length?{...f,...r?.(d)??{}}:null}):n}}function $s({value:e,onChange:t,view:n,intro:o}){const r=I(),s=ae(r,{intro:o}),l=h=>{const p=Di(h);return p==="desktop"||ne(p,r)},c=fe({row:He,label:"Distance from top",grid:{min:H.min,max:H.max,step:H.step},valueKey:"stickTopDistance",view:n,numbersIn:h=>l(h)&&$(r[ve("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&s.ownTablet?"tablet":"desktop"}),{followed:u,write:d}=Cn(n,"stickTopDistance",t,o,c?h=>c.unitPatch(h===void 0):void 0);return i("div",{className:"sf-field",children:q({min:c?.grid.min??H.min,max:c?.grid.max??H.max,step:c?.grid.step??H.step,value:u?null:typeof e=="number"?e:H.fallback,...u?{placeholder:u.distance}:{},...c?{suffix:c.unit,units:c.units}:{suffix:"px"},ariaLabel:a("Distance from top"),onChange:d})})}function Vs({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:s}=Cn(n,De,t,o);return i(_,{label:a(Gt),icon:Y(i(bt,{})),children:q({min:ie.min,max:ie.max,step:ie.step,value:r?null:$(e)??ie.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Gt),onChange:s})})}function ne(e,t){return e==="tablet"?Ur(t):Wr(t)}function Je(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,unit:t.tabletUnit,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,unit:t.desktopUnit,screens:t.desktopScreens}}function js(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ne(e,t))return null;if(n===void 0)return{};const s=Je(e,ae(t,{intro:r})),l=e==="phone"&&ne("tablet",t)?h=>O(h,"tablet"):h=>h,c=(h,p)=>t[l(h)]==null?{}:{[O(h,e)]:p},u=He.unitKey,d=t[l(u)]==null?{}:{[O(u,e)]:s.unit};return{[O("stickTop",e)]:!0,...c("stickTopDistance",s.distance),...d,...c(De,s.screens),[O(o,e)]:n}}function Ys({value:e,onChange:t,labelId:n,view:o,intro:r}){const s=I(),l=ae(s,{intro:r}),c=o==="phone"?l.phone:o==="tablet"?l.tablet:r?l.desktop:e===!0,u=o==="phone"&&l.ownTablet,d=o==="desktop"?null:Je(o,l),h=d?.on?$r(d.distance,d.unit):a("Off");return i(_,{label:a(Ht),labelId:n,icon:Y(i(yt,{})),action:k(L,{children:[o!=="desktop"?i(x,{words:y()?.panel,label:a(Ht),changed:ne(o,s),detail:M(p=>a(p),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(Ne,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const yn="e.g. about";function vc(){return{_gAnchor:T("Anchor"),anchor:X({control:"plainText",label:"Name",placeholder:yn},{type:"custom",render:({value:e,onChange:t})=>i(Qn,{value:e,onChange:t,nameBox:(n,o)=>i(K,{value:n,onChange:o,label:"Name",placeholder:yn,hideable:!1,markup:!1})})})}}function Bc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(zo,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:d=>r(d?d.toISOString():"")})})}}}function Dc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-date`;return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(Yo,{id:c,value:Pn(typeof o=="string"?o:null),onChange:u=>r(u?Nn(u):"")})})}}}function xn(e,t,n,o){return{type:"custom",...F({},{...pe,label:e}),render:r=>{const{value:s,onChange:l,id:c,name:u}=r,d="follows"in r,h=r,p=typeof s=="boolean",f=typeof h.follows=="boolean"?h.follows:t,m=p?s:d?f:t,g=`${c??u??e}-label`,b=h.readOnly===!0,S=i(Ne,{checked:m,onChange:l,disabled:b,ariaLabelledBy:g});return i(_,{label:a(e),labelId:g,icon:n,hint:o===void 0?void 0:a(o),action:d?k(L,{children:[i(x,{words:y()?.panel,label:a(e),changed:p,detail:h.followsNoView?a(f?"On":"Off"):M(w=>a(w),a(f?"On":"Off"),h.followsView),disabled:b,onReset:()=>l(void 0)}),S]}):S})}}}function Hc(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(zs,{label:"Background",icon:i(go,{}),id:r,value:e,shown:Co(e),onChange:t})}}}function Gc(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(se,{label:a(e),icon:n,value:o||t,onChange:r})}}function zs({label:e,icon:t,id:n,value:o,shown:r,onChange:s}){const{colors:l,n:c}=Qe(),u=ke(o),d=u?le(u,l,c):null;return i(se,{label:a(e),icon:t,id:n,value:d?d.hex:r,caption:d?.words,onChange:s,choices:Ze(u??"",l,c,s)})}function Mc(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(qs,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Ze(e,t,n,o){const r=Re(e);return or(t,n).map(s=>({label:s.label,color:s.value,selected:r===s.name,onPick:()=>o(s.name)}))}function qs({value:e,onChange:t,twin:n}){const{colors:o,n:r}=Qe(),s=o.background,l=U(s.toUpperCase(),a("Theme {n} background",{n:r})),[c,u]=R(yo),[d]=R(Oo),h=typeof d=="string"&&d.trim()!=="",p=Ot(c),f=oe=>u(Ot(oe)||void 0),m=Re(e),g=m?le(m,o,r):null,b=Ze(e,o,r,t),S=n?()=>t(void 0):()=>t("");let w=s,C=l;if(n){const oe=Re(n.follows),we=Io(n.follows),Se=oe?le(oe,o,r):we?{hex:we,words:we.toUpperCase()}:null;w=Se?.hex??s,C=M(En=>a(En),Se?Se.words:l,n.view)}const v=!n&&(Eo(e)||h)?i(Js,{value:p,onChange:f}):null;return g?i(se,{label:a("Fill"),icon:i(Ee,{}),value:g.hex,caption:g.words,onChange:t,changed:!0,onReset:S,resetTo:C,choices:b,children:v}):i(Ft,{label:a("Fill"),icon:i(Ee,{}),value:e,inherited:w,resetTo:C,onChange:t,onReset:S,choices:b,children:v})}function Js({value:e,onChange:t}){return de({options:xo.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:a("Fill")})}function Zs(e,t,n){if((e?.content??[]).some(l=>l?.props?.id===t))return ce(n);const r=No(e,t);if(r.length===0)return null;const s=ce(tn(n));if(s!==null)return s;for(let l=r.length-1;l>0;l-=1){const c=ce(tn(r[l].sectionAccent));if(c!==null)return c}return ce(r[0].sectionAccent)}function Qe(){const e=qt(G().theme),[t]=R("sectionAccent");let n=null;try{const{appState:r,selectedItem:s}=re(c=>c),l=s?.props?.id?String(s.props.id):void 0;n=l?Zs(r?.data,l,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:oi(e.themes[o]),n:o+1}}function Wc(){return dn()}const Uc={top:i(co,{}),right:i(ao,{}),bottom:i(so,{}),left:i(lo,{})};function Kc(e,t,n,o,r,s,l){const c=p=>t.find(f=>f.value===p),u=p=>({value:p,label:"",disabled:!0,title:o}),d=p=>{const f=t.find(g=>g.cell===p);if(!f)return u(`missing-${p}`);const m=s?.[p];return m?{value:f.value,label:f.label,icon:m}:{value:f.value,label:f.label}},h=[u("corner-top-left"),d("top"),u("corner-top-right"),d("left"),u("centre"),d("right"),u("corner-bottom-left"),d("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:f})=>{const m=t.some(g=>g.value===p)?p:n;return i(_,{label:a(e),icon:r,value:c(m)?.label?a(c(m).label):l?a(l):"",children:Pi(a,{label:e,value:m,onChange:f,points:h})})}}}function Xc(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:s})=>i(Sr,{label:e,options:(s.options??t).map(l=>({...l,label:a(l.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:a(n)}:{}})}}function $c(e,t,n,o){return{type:"custom",options:t,fallback:n,...F({},{type:"select",label:e}),render:({value:r,onChange:s,field:l})=>i(Cr,{label:e,options:(l.options??t).map(c=>({...c,label:a(c.label)})),fallback:l.fallback??n,value:r,onChange:s,placeholder:o===void 0?void 0:a(o)})}}function Vc(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const jc=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Yc(e,t,n){const o=Object.keys(rt).map(r=>({label:rt[r],value:r,picture:n[r]}));return{type:"custom",...F({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(el,{label:e,icon:t,options:o,onChange:r})}}function Qs(e,t,n){const o=kn(e,t,n);if(o!==void 0)return o==="save-makes-frame"?a("A frame is made from this video when you save the page."):o==="starts-dark"?a("This video starts dark, so no frame was made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="outside"?a("This video is on another website, so no frame can be made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="unsupported"?a("This video's file type gives no frame. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="failed"?a("No frame could be made from this video. It is tried again the next time you save the page. The slide shows its background colour while the video loads."):o==="image-no-frame"?a("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=An(e);return r==="frame-missing-image"?a("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?a("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?a("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?a("No image yet. The slide shows its background colour until you choose one."):void 0}function el({label:e,icon:t,options:n,onChange:o}){const r=B(),s=r?.values??{},l=Ln(s),c=nt(Bn),u=vn(c?.docId??null);let d=null;try{d=re(p=>p.appState.data)}catch{d=null}const h=Fn(r?.id,d,u);return i(_,{label:a(e),icon:Y(t),hint:Qs(s,h,c?.hasUnsavedEdits??!1),children:de({options:n,value:l,onChange:o,ariaLabel:e})})}function zc(e,t,n,o={}){const r={type:"custom",[at]:!0,render:({value:s,onChange:l,name:c})=>i(wr,{value:s||"",onChange:l,fieldKey:c,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?E("each",r):r}const qc={HeroSingle:["imageFocal"],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function tl(e){const t=a(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function Jc({value:e,onChange:t,label:n}){const o=e||{},r=B(),s=r?r.values!==r.node.props:!0,l=!!o.pending&&s,c=!!o.pending&&!s,u=!!Ri(Ti()).geocode,d=ot(),h=(p,f)=>t({...o,[p]:f??void 0});return k(L,{children:[i(_,{label:a(n),icon:i(wt,{}),action:u?i(Pe,{content:a("Find from the address (OpenStreetMap)"),children:i(Lt,{"aria-label":a("Find from the address"),"aria-busy":l||void 0,disabled:l,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(bo,{})})}):void 0,children:u&&o.status?i(eo,{compact:!0,oneLine:!0,spaced:!1,status:l?"busy":o.ok&&!c?"found":"notfound",statusText:l?a("Finding…"):c?a(nr):a(o.status),hint:tl(o)}):null}),i(_,{label:a("Enter by hand"),labelId:d,icon:i(uo,{}),action:i(Ne,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:d})}),o.manual&&i(_,{label:a("Latitude, longitude"),icon:i(wt,{}),children:k("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(At,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>h("lat",p),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(At,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>h("lng",p),min:-180,max:180,step:1e-4,placeholder:a("Longitude")})]})})]})}function nl(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function ol(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,s)=>s===t?{text:n}:r)}function Zc(e,t){return e===null?null:t>e?e:null}function rl(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}const Qc={label:"Ticker items",icon:i(mo,{})};function eu(e,t,n,o){return{type:"custom",[N]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...F({},{...an.textList,label:e}),render:({value:r,onChange:s})=>i(il,{label:e,icon:Y(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function il({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const l=J(null),[c,u]=Z(null),d=p=>p.map(f=>({text:f?.text??""})),h=p=>{const f=rl(n,p,c);f===null&&(l.current=null),u(f),r(d(p))};return i(Ho,{label:a(e),icon:t,noun:a("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?i(vt,{target:l,value:nl(n,c),onChange:p=>r(ol(n,c??-1,p)),disabled:c===null,label:c===null?a("Formatting — click a row first"):a("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,f,m)=>i("input",{type:"text",className:s&&c===f?"sf-list-marking":void 0,value:p?.text??"",placeholder:a(o),"aria-label":a("{label} {n}",{label:a(e),n:f+1}),onChange:g=>m({text:g.target.value}),onFocus:g=>{l.current=g.currentTarget,u(f)}})})}function tu(e,t){const n=`${e.label} — row ${t+1}`;return X({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(K,{value:o,onChange:r,label:a("{label} — row {n}",{label:a(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function nu(e){return{_gCards:T("Cards"),coverIndex:z("Cover image",i(ho,{}),mr,String(gr),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:rs("Image background",ui),cardImage:On()}}function ou(){return{outline:z("Card outline",i(wo,{}),pr,hr),indexBadge:z("Card number",i(fo,{}),dr,fr),showBadge:xn("Product badge",!0,i(xt,{noun:"tag"}))}}function ru(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...pe,label:be.find(s=>s.id===r).label}),o=r=>F(Le(et),n(r));return{_gShowOnCard:T("Show on a card"),[et]:F({type:"custom",render:()=>i(sl,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(et)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const et="showCardPrice",be=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function sl({rest:e}){const t=I(),n=he(),o=l=>typeof t[l]=="boolean"?t[l]:void 0,r=l=>o(l)??e[l],s=be.some(({id:l})=>o(l)!==void 0&&o(l)!==e[l]);return i(tt,{parts:be,changed:s,shown:r,onPress:(l,c)=>n({[l]:c}),onReset:()=>n(Object.fromEntries(be.map(({id:l})=>[l,void 0])))})}function iu(e,t="display"){const n=V(t);return{[t]:E("desktop",{type:"custom",render:({value:o,onChange:r})=>i(tt,{parts:e,changed:Mo(o),shown:s=>Wo(o,s),onPress:(s,l)=>r(Xo(o,s,l)),onReset:()=>r(void 0)})}),[n]:E("mobile",{type:"custom",render:({value:o,onChange:r})=>i(ll,{parts:e,desktopKey:t,value:o,onChange:r})})}}function tt({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:l}){const c=a("Display");return i(_,{label:c,icon:i(no,{}),changed:t,action:i(x,{words:y()?.panel,label:c,changed:t,detail:s,onReset:r}),children:i(Go,{label:c,items:e.map(u=>({id:u.id,label:a(u.label),shown:n(u.id),...l?{disabled:!0,disabledReason:a(l)}:{}})),onChange:o})})}function ll({parts:e,desktopKey:t,value:n,onChange:o}){const r=I()[t];return i(tt,{parts:e,changed:Ko(n),shown:s=>Uo(r,n,s),onPress:(s,l)=>o($o(n,s,l)),onReset:()=>o(cr),detail:a("the same as Desktop")})}function On(e=Gn){return W("Card image",i(mt,{}),A,xe,Mn,A,e,{clear:{hint:A},hint:"Rounds the picture. The card's own corner is in Styles."})}function al(){return ue(dt,"cardImage")}function su(){return{cardImage:On(dt),...al()}}function lu(){return ze({sidesKey:"cornerSides",row:Kn,step:Wn,useFollowed:()=>A,mark:i(cl,{label:Un}),hint:a("Rounds the picture. Left alone it stays square.")})}function cl({label:e,changed:t=!1,onReset:n=()=>{}}){return i(x,{words:y()?.panel,label:a(e),changed:t,onReset:n})}function au(){return{type:"custom",render:({value:e,onChange:t})=>i(fl,{value:typeof e=="string"?e:"",onChange:t})}}const In="own";function cu(){const e=[{value:In,label:"Layout's own",picture:sn(Array.from({length:8},()=>[3,1]))},...Object.entries(jn).map(([t,n])=>({value:t,label:n.label,picture:sn([...n.phone,...n.phone])}))];return E("mobile",on("Layout",i(gt,{}),e,In,{columns:2,cell:Gi}))}function ul({layout:e,width:t}){const n=Yn(e),o=n?`${n[0]}/${n[1]}`:void 0;return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:o?"auto":6,gridAutoFlow:"row dense",gap:2},children:zn(e).map(([r,s],l)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${s}`,aspectRatio:o}},l))})}const dl={width:"3.5rem",height:"2.5rem",words:!1},pl=200;function fl({value:e,onChange:t}){const[n,o]=Z(null),[r,s]=Z(4),l=J(null);Rn(()=>{const m=l.current;if(!m||typeof ResizeObserver!="function")return;const g=()=>s(m.getBoundingClientRect().width>=pl?4:3);g();const b=new ResizeObserver(g);return b.observe(m),()=>b.disconnect()},[]);const c=e?Hi(Oe,e):void 0,u=c?e:"",d=pt(n,u),h=pt(n,"").length,p=qn("no-symbol"),f=[{value:"",label:a("Not chosen"),icon:Bi(p,a("Not chosen"))},...d.map(m=>({value:m,label:a(Oe[m].label),icon:i(ul,{layout:Oe[m],width:40})}))];return i(_,{label:a("Layout"),icon:i(gt,{}),value:c?a(c.label):void 0,children:i("div",{ref:l,style:{flex:"1 1 auto",minWidth:0},children:i(Nt,{label:a("Layout"),value:u,options:f,onChange:t,columns:r,cell:dl,header:k("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:a("Photos in a row")}),i(Ao,{options:[{id:"all",label:a("All")},...$n.map(m=>({id:String(m),label:String(m)}))],value:n===null?"all":String(n),ariaLabel:a("Photos in a row"),onChange:m=>o(m==="all"?null:Number(m))}),i("span",{className:"text-2xs text-ink-faint",children:a("{n} of {total} layouts",{n:h,total:Vn.length})})]})})})})}export{zi as BOUND_TO_POST,oc as BOUND_TO_POST_NOTE,dc as BUCKET_ICONS,qc as CUSTOM_FIELD_MEDIA,Jc as CoordsField,ln as DESKTOP_GAP_NOT_OVERLAP,tt as DisplayRow,Uc as EDGE_ARROWS,qo as FOCAL_DEFAULT,Ce as FOLD_FIELD_MARKER,qi as HIGHLIGHT_HINT,K as HidableTextField,lt as LINK_FIELD_MARKER,Va as Label,at as MEDIA_FIELD_MARKER,jc as MEDIA_TYPE_OPTIONS,rc as NOT_BOUND_TO_POST,wc as PanelBand,Qi as PanelNoteLine,Ps as RowPropsContext,ct as SCAFFOLD_FIELD_MARKER,fu as SCALAR_TEXT_CONTROLS,Wi as SiteGapDefaultReset,q as Slider,ts as Swatches,pu as TEXT_CONTROL_KINDS,N as TEXT_FIELD_MARKER,Qc as TICKER_ITEMS_ROW,il as TextListField,zs as ThemeFillRow,me as WIDTH_LABEL,ji as WidthDefaultReset,rl as aimAfterListChange,vc as anchorFields,U as backTo,Sc as backgroundField,Oc as boxBlockSpacingField,Tc as boxColumnsFields,Mc as boxFillField,Rs as boxPhoneRowField,Is as boxShareField,Ic as boxSharePhoneField,Ec as boxShareTabletField,Zs as boxThemeIndexOf,hc as bucketHeader,yc as buttonWordsEntryField,xs as cardCornersField,rs as cardImageBackgroundField,On as cardImageField,su as cardImageFields,nu as cardMediaFields,xc as cardShapeFields,ru as cardShowFields,ou as cardStyleFields,Nc as cellWidthFields,Gc as colorInput,Ya as containerDirectionField,Ui as containerGapField,Ki as containerGapPhoneField,ja as containerGapRows,Xi as containerGapTabletField,tl as coordsResultTip,ac as copyText,fn as cornerSidesField,ze as cornersRowField,pn as cornersUnitFields,Dc as date,Bc as dateTime,mc as designGroupHeader,iu as displayFields,Kc as edgePad,Ze as fillSlotChoices,Zc as focusAfterRemove,Wc as focusKeptField,gc as foldMarker,ye as foldMetaOf,es as foldTitleOf,Gs as followedHeightPatch,js as followedStickPatch,au as galleryLayoutField,cu as galleryLayoutPhoneField,Ac as heightFields,ge as heightFollowedBy,Hs as heightLayersAt,za as heroGroupPlacementPoints,st as hidableText,Zi as hintIsWhileTyping,lu as imageCornersField,nc as inOwnBox,fc as isBucketHeader,dn as keptBy,cc as linkField,Qs as loadingRowHint,Yc as loadingShowsField,Xc as multiSelect,Hc as pageBackgroundField,pc as panelNote,As as phoneOverrideField,lc as plainText,uc as plainTextarea,is as pxField,bc as quietMarker,it as readHidable,nl as rowText,$c as searchSelect,os as sectionBandChoices,us as sectionCornersField,Cc as sectionShapeFields,_c as sectionThemeFields,ol as setRowText,Rc as sizeField,Vc as sourceField,Pc as spacingFields,Fc as stickFields,kc as swapPadding,ic as text,Dn as textFieldIdentifier,Za as textFieldOffPage,ec as textFieldPanelOnly,eu as textList,tu as textListRowField,sc as textarea,xn as toggle,zc as upload,fe as useLengthRow,he as useSelectedPatch,I as useSelectedProps,R as useSelectedSibling,Mi as useSiteGapDetail,Lc as widthField,tc as withIdentifier,Ja as withOffPage,Qa as withPanelOnly,qa as withScaffold};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as n,jsxs as d}from"react/jsx-runtime";import{IconPicker as x}from"efficient-shell/ui";import{iconPickerRow as f,pickerCellsOf as m}from"./box-fields.js";import{say as k}from"../../../format/lib/editor-words.js";const e=28,t=1.5;function w({ratio:r}){const[i,o]=r??[1,1],c=(e-t*2)/Math.max(i,o),l=i*c,s=o*c;return n("svg",{width:e,height:e,viewBox:`0 0 ${e} ${e}`,"aria-hidden":"true",children:n("rect",{x:(e-l)/2,y:(e-s)/2,width:l,height:s,rx:2,fill:"none",stroke:"currentColor",strokeWidth:t,strokeDasharray:r?void 0:"3 2"})})}function C(){const r=t*2;return d("svg",{width:e,height:e,viewBox:`0 0 ${e} ${e}`,"aria-hidden":"true",children:[n("line",{x1:t,y1:t/2,x2:e-t,y2:t/2,stroke:"currentColor",strokeWidth:t}),n("line",{x1:t,y1:e-t/2,x2:e-t,y2:e-t/2,stroke:"currentColor",strokeWidth:t}),n("rect",{x:e/4,y:r,width:e/2,height:e-r*2,rx:2,fill:"none",stroke:"currentColor",strokeWidth:t})]})}function R(r){return{...r,picture:n(C,{})}}const h={width:"5.25rem",height:"3.5rem"},u=3;function a(r,i){return r.map(o=>({value:o[i],label:o.label,picture:n(w,{ratio:o.ratio})}))}function S({label:r,lines:i,column:o,value:c,onChange:l,disabled:s}){return n(x,{label:k(r),value:c,options:m(a(i,o)),onChange:l,columns:u,cell:h,tooltips:!1,disabled:s})}function b(r,i,o,c,l,s={}){const p=[...a(o,c),...s.more??[]];return f(r,i,p,l,{columns:u,cell:h,phoneRest:s.phoneRest})}export{S as ShapePicker,R as fillRowCell,b as shapePickerRow};
|
|
1
|
+
import{jsx as n,jsxs as d}from"react/jsx-runtime";import{IconPicker as x}from"efficient-shell/ui";import{iconPickerRow as f,pickerCellsOf as m}from"./box-fields.js";import{say as k}from"../../../format/lib/editor-words.js";const e=28,t=1.5;function w({ratio:r}){const[i,o]=r??[1,1],c=(e-t*2)/Math.max(i,o),l=i*c,s=o*c;return n("svg",{width:e,height:e,viewBox:`0 0 ${e} ${e}`,"aria-hidden":"true",children:n("rect",{x:(e-l)/2,y:(e-s)/2,width:l,height:s,rx:2,fill:"none",stroke:"currentColor",strokeWidth:t,strokeDasharray:r?void 0:"3 2"})})}function C(){const r=t*2;return d("svg",{width:e,height:e,viewBox:`0 0 ${e} ${e}`,"aria-hidden":"true",children:[n("line",{x1:t,y1:t/2,x2:e-t,y2:t/2,stroke:"currentColor",strokeWidth:t}),n("line",{x1:t,y1:e-t/2,x2:e-t,y2:e-t/2,stroke:"currentColor",strokeWidth:t}),n("rect",{x:e/4,y:r,width:e/2,height:e-r*2,rx:2,fill:"none",stroke:"currentColor",strokeWidth:t})]})}function R(r){return{...r,picture:n(C,{})}}const h={width:"5.25rem",height:"3.5rem",words:!0},u=3;function a(r,i){return r.map(o=>({value:o[i],label:o.label,picture:n(w,{ratio:o.ratio})}))}function S({label:r,lines:i,column:o,value:c,onChange:l,disabled:s}){return n(x,{label:k(r),value:c,options:m(a(i,o)),onChange:l,columns:u,cell:h,tooltips:!1,disabled:s})}function b(r,i,o,c,l,s={}){const p=[...a(o,c),...s.more??[]];return f(r,i,p,l,{columns:u,cell:h,phoneRest:s.phoneRest})}export{S as ShapePicker,R as fillRowCell,b as shapePickerRow};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { type ViewOverrides } from "./view-overrides.js";
|
|
2
2
|
export type BlockAlign = "left" | "center" | "right";
|
|
3
3
|
export declare const BLOCK_ALIGN_JUSTIFY: Record<BlockAlign, string>;
|
|
4
|
+
export declare const BLOCK_ALIGN_PLACE: Record<BlockAlign, string>;
|
|
5
|
+
export declare const BLOCK_ALIGN_TEXT: Record<BlockAlign, string>;
|
|
4
6
|
export type AlignKind = "text" | "place" | "justify" | "items";
|
|
5
7
|
export declare function blockAlignOf(value: unknown): BlockAlign | undefined;
|
|
6
8
|
export declare function legacyBlockAlignOf(value: unknown): BlockAlign | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{viewOverrides as
|
|
1
|
+
import{viewOverrides as o}from"./view-overrides.js";const p={left:"justify-start",center:"justify-center",right:"justify-end"},u={left:"",center:"mx-auto",right:"ml-auto"},g={left:"",center:"text-center",right:"text-right"},n={text:{left:"view-wide:max-view-desktop:text-left",center:"view-wide:max-view-desktop:text-center",right:"view-wide:max-view-desktop:text-right"},place:{left:"view-wide:max-view-desktop:mx-0",center:"view-wide:max-view-desktop:mx-auto",right:"view-wide:max-view-desktop:ml-auto view-wide:max-view-desktop:mr-0"},items:{left:"view-wide:max-view-desktop:grid-cols-1 view-wide:max-view-desktop:justify-items-start",center:"view-wide:max-view-desktop:grid-cols-1 view-wide:max-view-desktop:justify-items-center",right:"view-wide:max-view-desktop:justify-items-end"},justify:{left:"view-wide:max-view-desktop:justify-start",center:"view-wide:max-view-desktop:justify-center",right:"view-wide:max-view-desktop:justify-end"}},v={text:{left:"max-view-wide:text-left",center:"max-view-wide:text-center",right:"max-view-wide:text-right"},place:{left:"max-view-wide:mx-0",center:"max-view-wide:mx-auto",right:"max-view-wide:ml-auto max-view-wide:mr-0"},items:{left:"max-view-wide:grid-cols-1 max-view-wide:justify-items-start",center:"max-view-wide:grid-cols-1 max-view-wide:justify-items-center",right:"max-view-wide:justify-items-end"},justify:{left:"max-view-wide:justify-start",center:"max-view-wide:justify-center",right:"max-view-wide:justify-end"}},l={text:{left:"view-tablet:max-view-desktop:text-left",center:"view-tablet:max-view-desktop:text-center",right:"view-tablet:max-view-desktop:text-right"},place:{left:"view-tablet:max-view-desktop:mx-0",center:"view-tablet:max-view-desktop:mx-auto",right:"view-tablet:max-view-desktop:ml-auto view-tablet:max-view-desktop:mr-0"},items:{left:"view-tablet:max-view-desktop:grid-cols-1 view-tablet:max-view-desktop:justify-items-start",center:"view-tablet:max-view-desktop:grid-cols-1 view-tablet:max-view-desktop:justify-items-center",right:"view-tablet:max-view-desktop:justify-items-end"},justify:{left:"view-tablet:max-view-desktop:justify-start",center:"view-tablet:max-view-desktop:justify-center",right:"view-tablet:max-view-desktop:justify-end"}},d={text:{left:"max-view-tablet:text-left",center:"max-view-tablet:text-center",right:"max-view-tablet:text-right"},place:{left:"max-view-tablet:mx-0",center:"max-view-tablet:mx-auto",right:"max-view-tablet:ml-auto max-view-tablet:mr-0"},items:{left:"max-view-tablet:grid-cols-1 max-view-tablet:justify-items-start",center:"max-view-tablet:grid-cols-1 max-view-tablet:justify-items-center",right:"max-view-tablet:justify-items-end"},justify:{left:"max-view-tablet:justify-start",center:"max-view-tablet:justify-center",right:"max-view-tablet:justify-end"}};function a(e){return e==="left"||e==="center"||e==="right"?e:void 0}function b(e){return e==="start"?"left":e==="end"?"right":a(e)}function f(e,s,r){const w=a(e)??"left",t=o("same",w,a(s),a(r)),i={};return t.tablet&&t.tablet!==w&&(i.tablet=t.tablet),t.phone&&t.phone!==w&&(i.phone=t.phone),i}function h(e,s,r,w,{atSectionLine:t=!1}={}){const i=f(s,r,w),m=t?l:n,x=t?d:v;return[i.tablet?m[e][i.tablet]:"",i.phone?x[e][i.phone]:""].filter(Boolean).join(" ")}export{p as BLOCK_ALIGN_JUSTIFY,u as BLOCK_ALIGN_PLACE,g as BLOCK_ALIGN_TEXT,f as alignViewAnswers,h as alignViewClasses,a as blockAlignOf,b as legacyBlockAlignOf};
|
|
@@ -26,6 +26,7 @@ export declare const SITE_BLOCK_GAP_PHONE_VAR = "--sf-block-gap-phone";
|
|
|
26
26
|
export declare const SITE_BLOCK_GAP_PHONE_REM_VAR = "--sf-block-gap-phone-rem";
|
|
27
27
|
export declare const SITE_BLOCK_GAP_ON_PHONE_VAR = "--sf-block-gap-on-phone";
|
|
28
28
|
export declare const SITE_BLOCK_GAP_PHONE_CLASS = "max-view-tablet:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";
|
|
29
|
+
export declare const SITE_BLOCK_GAP_PHONE_EDGE_CLASS = "max-view-wide:[&_[data-sf-line~=edge]:not([data-sf-line~=edge]_*)]:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";
|
|
29
30
|
export declare function siteBlockGapPhoneTokens(v?: number | null, unit?: unknown): Record<string, string>;
|
|
30
31
|
export declare function siteBlockGapPhoneClass(v?: number | null): string;
|
|
31
32
|
export declare const GAP_ZONE_CLASS = "sf-gap-zone";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{siteLengthCss as
|
|
1
|
+
import{siteLengthCss as u}from"./css-length.js";const V="sf.gapContainer",r={min:-32,max:64,step:2},x={Grid:{sm:12,md:24,lg:40},Flex:{sm:12,md:24,lg:40},FooterGroup:{sm:8,md:16,lg:32},HeroGroup:null,Events:null,GalleryB:null,ProductGrid:null},A={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},L=new Set(["Events","GalleryB"]);function m(t,n,e){if(typeof n=="number"&&Number.isFinite(n)&&n>=r.min)return n;if(typeof n=="string"){const o=x[t]?.[n];if(typeof o=="number")return o}return typeof e=="number"&&Number.isFinite(e)?e:A[t]}const h="sf-gap-overlap",S="--sf-gap-overlap",a="--sf-block-gap",G="--sf-block-gap-rem",s={min:0,max:r.max,step:r.step};function _(t){if(typeof t!="number"||!Number.isFinite(t))return null;const n=Math.min(Math.max(Math.round(t),s.min),s.max);return n-n%s.step}function F(t,n){const e=u(t,n,"gap",s);if(e!==null)return{[a]:e,[G]:e};const o=_(t);return o===null?{}:{[a]:`${o}px`,[G]:`${o/16}rem`}}const E="--sf-block-gap-phone",P="--sf-block-gap-phone-rem",R="--sf-block-gap-on-phone",T="max-view-tablet:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]",I="max-view-wide:[&_[data-sf-line~=edge]:not([data-sf-line~=edge]_*)]:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";function w(t,n){const e=u(t,n,"gap",s);if(e!==null)return{[E]:e,[P]:e};const o=_(t);return o===null?{}:{[E]:`${o}px`,[P]:`${o/16}rem`}}function K(t){return _(t)===null?"":`${T} ${I}`}const g="sf-gap-zone",N="--sf-gap-len";function b(t,n){return typeof n=="number"&&Number.isFinite(n)&&n>=r.min?!0:typeof n=="string"&&typeof x[t]?.[n]=="number"}const O="--sf-gap-len-phone",$="--sf-gap-len-tablet",k={min:0,max:r.max,step:r.step};function i(t){return typeof t=="number"&&Number.isFinite(t)&&t>=k.min}function B(t){return t/2}function d(t,n,e){return i(e)&&!b(t,n)}function D(t,n,e,o,p){return i(n)?n:d(t,e,p)?p:B(m(t,e,o))}const y={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function M(t,n,e,o,p){const c={...i(o)?{[O]:`${o}px`}:null,...i(p)?{[$]:`${p}px`}:null};if(!b(t,n)){const f=`${A[t]}px`,C=L.has(t)?`var(--sf-card-gap, ${f})`:f;return{className:` ${g}`,style:{[N]:`var(${a}, ${C})`,[O]:`var(${R})`,...c}}}const l=m(t,n);return l>=0?{className:` ${g}`,style:{[N]:`${l}px`,...c}}:{className:` ${h} ${y[e]}`,style:{gap:"0px",[S]:`${-l/2}px`}}}export{L as CARD_GRID_CONTAINERS,r as CONTAINER_GAP,A as CONTAINER_GAP_BUILT_IN,x as CONTAINER_GAP_LEGACY,k as CONTAINER_GAP_PHONE,V as GAP_FIELD_CONTAINER,N as GAP_LENGTH_VAR,h as GAP_OVERLAP_CLASS,S as GAP_OVERLAP_VAR,O as GAP_PHONE_LENGTH_VAR,$ as GAP_TABLET_LENGTH_VAR,g as GAP_ZONE_CLASS,s as SITE_BLOCK_GAP,R as SITE_BLOCK_GAP_ON_PHONE_VAR,T as SITE_BLOCK_GAP_PHONE_CLASS,I as SITE_BLOCK_GAP_PHONE_EDGE_CLASS,P as SITE_BLOCK_GAP_PHONE_REM_VAR,E as SITE_BLOCK_GAP_PHONE_VAR,G as SITE_BLOCK_GAP_REM_VAR,a as SITE_BLOCK_GAP_VAR,M as containerGapProps,d as followsSitePhoneGap,B as halfDesktopGap,b as hasOwnContainerGap,i as hasOwnPhoneGap,_ as normalizeSiteBlockGap,m as resolveContainerGap,D as resolvePhoneContainerGap,K as siteBlockGapPhoneClass,w as siteBlockGapPhoneTokens,F as siteBlockGapTokens};
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
+
import type { SiteThemeRow } from "../site-theme-row.js";
|
|
1
2
|
import { VIEW_ABOVE, type LengthGrid, type LengthKind, type LengthRow, type LengthUnit } from "efficient-easel/screen/lib/content/length-units";
|
|
2
3
|
type ViewTier = keyof typeof VIEW_ABOVE;
|
|
3
4
|
export declare function cssLengthOf(value: number, unit: unknown): string;
|
|
4
5
|
export declare function storedUnit(stored: unknown, base?: LengthUnit): LengthUnit;
|
|
5
6
|
export declare function ownRowUnit(props: Readonly<Record<string, unknown>>, row: LengthRow, view: ViewTier): LengthUnit;
|
|
6
7
|
export declare function rowUnitKeys(row: LengthRow, views?: readonly ViewTier[]): readonly string[];
|
|
7
|
-
export declare function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare function siteLengthCss(v: unknown, unit: unknown, kind: LengthKind, pxGrid: LengthGrid, options?: {
|
|
11
|
-
floor?: boolean;
|
|
12
|
-
}): string | null;
|
|
8
|
+
export declare function siteLengthTrack(kind: LengthKind, unit: LengthUnit, pxGrid: LengthGrid): LengthGrid;
|
|
9
|
+
export declare function siteLengthHeld(v: unknown, unit: unknown, kind: LengthKind, pxGrid: LengthGrid): number | null;
|
|
10
|
+
export declare function siteLengthCss(v: unknown, unit: unknown, kind: LengthKind, pxGrid: LengthGrid): string | null;
|
|
13
11
|
export type SiteLengthUnits = Readonly<{
|
|
14
12
|
cornerRadiusUnit?: unknown;
|
|
15
13
|
siteWidthUnit?: unknown;
|
|
@@ -18,6 +16,7 @@ export type SiteLengthUnits = Readonly<{
|
|
|
18
16
|
blockGapUnit?: unknown;
|
|
19
17
|
blockGapPhoneUnit?: unknown;
|
|
20
18
|
}>;
|
|
19
|
+
export declare const SITE_LENGTH_UNIT_COLUMNS: Readonly<Record<keyof SiteLengthUnits, keyof SiteThemeRow>>;
|
|
21
20
|
export declare function siteLengthUnitsOfRow(row: object): SiteLengthUnits;
|
|
22
21
|
export declare function siteLengthNumber<T>(v: unknown, unit: unknown, px: (v?: number | null) => T): number | T;
|
|
23
22
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{viewKeyAt as
|
|
1
|
+
import{viewKeyAt as p}from"efficient-easel/screen/lib/content/view-tiers";import{finiteNumber as f}from"../finite-number.js";import{VIEW_ABOVE as o,isLengthUnit as u,lengthOf as h,rowGrid as m}from"efficient-easel/screen/lib/content/length-units";const x=(()=>{const e=Object.keys(o),t=e.filter(n=>o[n]===null);for(let n=e.find(i=>o[i]===t[0]);n&&!t.includes(n);n=e.find(i=>o[i]===t[t.length-1]))t.push(n);return t})();function _(e,t){const n=h(e,s(t));return typeof n=="number"?`${n}px`:n}function s(e,t="px"){return u(e)?e:t}function k(e,t,n){return t.unitKey?s(e[p(t.unitKey,n)],t.base??"px"):t.base??"px"}function y(e,t=x){return e.unitKey?t.map(n=>p(e.unitKey,n)):[]}function a(e,t,n){const i=m({kind:e},t,n);return t!=="px"&&n.min>0?{...i,min:i.step}:i}function d(e,t,n,i){const r=f(e);if(!u(t)||t==="px"||r===void 0)return null;const c=a(n,t,i),l=Math.min(c.max,Math.max(c.min,r));return Math.round(l*100)/100}function O(e,t,n,i){const r=d(e,t,n,i);return r===null?null:_(r,t)}const g={cornerRadiusUnit:"corner_radius_unit",siteWidthUnit:"site_width_unit",siteGutterUnit:"site_gutter_unit",siteGutterPhoneUnit:"site_gutter_phone_unit",blockGapUnit:"block_gap_unit",blockGapPhoneUnit:"block_gap_phone_unit"};function E(e){const t=e;return Object.fromEntries(Object.entries(g).map(([n,i])=>[n,s(t[i])]))}function K(e,t,n){const i=f(e);return u(t)&&t!=="px"&&i!==void 0?i:n(i??null)}export{g as SITE_LENGTH_UNIT_COLUMNS,_ as cssLengthOf,k as ownRowUnit,y as rowUnitKeys,O as siteLengthCss,d as siteLengthHeld,K as siteLengthNumber,a as siteLengthTrack,E as siteLengthUnitsOfRow,s as storedUnit};
|
|
@@ -3,17 +3,21 @@ export declare const GALLERY_COLUMNS = 12;
|
|
|
3
3
|
export declare const GALLERY_COLUMNS_PHONE = 6;
|
|
4
4
|
export declare const GALLERY_PHONE_BREAKPOINT = 800;
|
|
5
5
|
export type GalleryCell = readonly [columns: number, rows: number];
|
|
6
|
-
export interface
|
|
6
|
+
export interface GalleryLayoutEntry {
|
|
7
7
|
readonly label: string;
|
|
8
8
|
readonly desktop: readonly GalleryCell[];
|
|
9
|
-
readonly phone: readonly GalleryCell[];
|
|
10
9
|
readonly across: 2 | 3 | 4 | 6;
|
|
11
|
-
readonly acrossPhone: 1 | 2 | 3 | 6;
|
|
12
10
|
readonly lead?: readonly GalleryCell[];
|
|
13
|
-
readonly leadPhone?: readonly GalleryCell[];
|
|
14
11
|
readonly ratio?: GalleryCardRatio;
|
|
15
12
|
}
|
|
16
|
-
export
|
|
13
|
+
export interface GalleryPhoneTrack {
|
|
14
|
+
readonly phone: readonly GalleryCell[];
|
|
15
|
+
readonly acrossPhone: 1 | 2 | 3 | 6;
|
|
16
|
+
readonly leadPhone?: readonly GalleryCell[];
|
|
17
|
+
}
|
|
18
|
+
export interface GalleryLayout extends GalleryLayoutEntry, GalleryPhoneTrack {
|
|
19
|
+
}
|
|
20
|
+
declare const LAYOUTS: {
|
|
17
21
|
readonly twoAcross: {
|
|
18
22
|
readonly label: "Two across";
|
|
19
23
|
readonly across: 2;
|
|
@@ -166,11 +170,20 @@ export declare const GALLERY_LAYOUTS: {
|
|
|
166
170
|
readonly ratio: "landscape";
|
|
167
171
|
};
|
|
168
172
|
};
|
|
169
|
-
export type GalleryLayoutKey = keyof typeof
|
|
173
|
+
export type GalleryLayoutKey = keyof typeof LAYOUTS;
|
|
174
|
+
declare const GALLERY_PHONE_FIELDS: readonly ["phone", "acrossPhone", "leadPhone"];
|
|
175
|
+
export type GalleryPhoneFieldsMissing<Track = GalleryPhoneTrack> = Exclude<keyof Track, (typeof GALLERY_PHONE_FIELDS)[number]>;
|
|
176
|
+
export declare const GALLERY_LAYOUTS: {
|
|
177
|
+
readonly [K in GalleryLayoutKey]: GalleryLayoutEntry;
|
|
178
|
+
};
|
|
170
179
|
export declare const GALLERY_LAYOUT_KEYS: GalleryLayoutKey[];
|
|
171
180
|
export declare const GALLERY_ACROSS_BUCKETS: readonly (2 | 3 | 4 | 6)[];
|
|
172
181
|
export declare function galleryChoices(across: number | null, chosen: string): GalleryLayoutKey[];
|
|
173
|
-
export
|
|
182
|
+
export interface GalleryLayoutProps {
|
|
183
|
+
readonly layout?: unknown;
|
|
184
|
+
readonly layoutPhone?: unknown;
|
|
185
|
+
}
|
|
186
|
+
export declare function resolveGalleryLayout(props: GalleryLayoutProps): GalleryLayout | null;
|
|
174
187
|
export declare const GALLERY_PHONE_LAYOUTS: {
|
|
175
188
|
readonly oneAcross: {
|
|
176
189
|
readonly label: "One across";
|
|
@@ -181,8 +194,9 @@ export declare const GALLERY_PHONE_LAYOUTS: {
|
|
|
181
194
|
export type GalleryPhoneLayoutKey = keyof typeof GALLERY_PHONE_LAYOUTS;
|
|
182
195
|
export declare function resolveGalleryPhoneLayout(value: unknown): GalleryPhoneLayoutKey | null;
|
|
183
196
|
export declare function galleryTailSpan(layout: GalleryLayout, phone: boolean): number;
|
|
184
|
-
export declare function galleryLayoutRatio(layout: GalleryLayout): readonly [number, number] | null;
|
|
185
|
-
export declare function galleryPictureCells(layout: GalleryLayout): readonly GalleryCell[];
|
|
197
|
+
export declare function galleryLayoutRatio(layout: Pick<GalleryLayout, "ratio">): readonly [number, number] | null;
|
|
198
|
+
export declare function galleryPictureCells(layout: Pick<GalleryLayout, "lead" | "desktop">): readonly GalleryCell[];
|
|
186
199
|
export declare const GALLERY_LAYOUT_CLASS_PREFIX = "sf-wall--";
|
|
187
|
-
export declare function galleryLayoutClass(
|
|
188
|
-
export declare function galleryLayoutCss(
|
|
200
|
+
export declare function galleryLayoutClass(props: GalleryLayoutProps): string;
|
|
201
|
+
export declare function galleryLayoutCss(props: GalleryLayoutProps): string;
|
|
202
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SHAPE_TABLE as
|
|
1
|
+
import{hasOwnEntry as $}from"../own-entry.js";import{SHAPE_TABLE as x}from"./gallery-card-layout.js";const b=12,P=6,A=800,u={twoAcross:{label:"Two across",across:2,acrossPhone:2,desktop:[[6,1],[6,1]],phone:[[3,1],[3,1]]},zigzag:{label:"Zigzag",across:2,acrossPhone:2,desktop:[[8,1],[4,1],[4,1],[8,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},brick:{label:"Brick",across:2,acrossPhone:2,desktop:[[5,1],[7,1],[7,1],[5,1]],phone:[[2,1],[4,1],[4,1],[2,1]]},twoTall:{label:"Two tall",across:2,acrossPhone:2,desktop:[[6,2],[6,2]],phone:[[3,2],[3,2]]},offsetTall:{label:"Offset tall",across:2,acrossPhone:2,desktop:[[5,2],[7,1],[3,1],[4,1]],phone:[[3,2],[3,1],[3,1]]},ladder:{label:"Ladder",across:2,acrossPhone:2,desktop:[[3,2],[9,1],[5,1],[4,1]],phone:[[2,2],[4,1],[2,1],[2,1]]},threeAcross:{label:"Three across",across:3,acrossPhone:3,desktop:[[4,1],[4,1],[4,1]],phone:[[2,1],[2,1],[2,1]]},bigLeft:{label:"Big left",across:3,acrossPhone:3,desktop:[[6,1],[3,1],[3,1]],phone:[[4,1],[1,1],[1,1]]},bigRight:{label:"Big right",across:3,acrossPhone:3,desktop:[[3,1],[3,1],[6,1]],phone:[[1,1],[1,1],[4,1]]},threeStagger:{label:"Three stagger",across:3,acrossPhone:3,desktop:[[5,1],[4,1],[3,1],[3,1],[4,1],[5,1]],phone:[[3,1],[2,1],[1,1],[1,1],[2,1],[3,1]]},threeLadder:{label:"Three ladder",across:3,acrossPhone:3,desktop:[[3,1],[4,1],[5,1],[5,1],[4,1],[3,1]],phone:[[1,1],[2,1],[3,1],[3,1],[2,1],[1,1]]},tallMiddle:{label:"Tall middle",across:3,acrossPhone:3,desktop:[[4,1],[4,2],[4,1],[4,1],[4,1]],phone:[[2,1],[2,2],[2,1],[2,1],[2,1]]},fourAcross:{label:"Four across",across:4,acrossPhone:2,desktop:[[3,1],[3,1],[3,1],[3,1]],phone:[[3,1],[3,1]]},bigFirst:{label:"Big first",across:4,acrossPhone:2,desktop:[[6,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},fourStagger:{label:"Four stagger",across:4,acrossPhone:2,desktop:[[4,1],[3,1],[2,1],[3,1],[2,1],[3,1],[4,1],[3,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},tallFirst:{label:"Tall first",across:4,acrossPhone:2,desktop:[[3,2],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[3,2],[3,1],[3,1]]},oneThenFour:{label:"One then four",across:4,acrossPhone:2,desktop:[[12,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},sixAcross:{label:"Six across",across:6,acrossPhone:3,desktop:[[2,1],[2,1],[2,1],[2,1],[2,1],[2,1]],phone:[[2,1],[2,1],[2,1]]},sixStagger:{label:"Six stagger",across:6,acrossPhone:6,desktop:[[3,1],[2,1],[1,1],[2,1],[1,1],[3,1],[1,1],[3,1],[2,1],[2,1],[1,1],[3,1]],phone:[[1,1],[1,1],[1,1],[1,1],[1,1],[1,1]]},twoThenThrees:{label:"Two, then threes",across:3,acrossPhone:3,lead:[[6,1],[6,1]],desktop:[[4,1],[4,1],[4,1]],leadPhone:[[3,1],[3,1]],phone:[[2,1],[2,1],[2,1]]},twoThenThreesPhoto:{label:"Two, then threes · photo",across:3,acrossPhone:1,lead:[[6,1],[6,1]],desktop:[[4,1],[4,1],[4,1]],phone:[[6,1]],ratio:"landscape"}},k=["phone","acrossPhone","leadPhone"],O=!0,S=new Set(k),_=Object.fromEntries(Object.entries(u).map(([e,o])=>[e,Object.fromEntries(Object.entries(o).filter(([s])=>!S.has(s)))])),w=Object.keys(u),j=[2,3,4,6];function B(e,o){return w.filter(s=>s===o||e===null||_[s].across===e)}function E(e){const o=e.layout;return typeof o=="string"&&$(u,o)?o:null}function Y(e){const o=E(e);return o?G(o,e.layoutPhone):null}const T={oneAcross:{label:"One across",phone:[[P,2]],acrossPhone:1}};function m(e){return typeof e=="string"&&$(T,e)?e:null}function y(e,o){return o?P/e.acrossPhone:b/e.across}function R(e){return e.ratio?x.find(o=>o.shape===e.ratio)?.ratio??null:null}function H(e){return[...e.lead??[],...e.desktop]}function G(e,o){const s=u[e],t=m(o);if(!t)return s;const{phone:p,acrossPhone:i}=T[t],c=Object.fromEntries(k.map(r=>[r,void 0]));return{...s,...c,phone:p,acrossPhone:i}}const C="sf-wall--";function F(e){const o=E(e);if(!o)return"";const s=m(e.layoutPhone);return`${C}${o}${s?`--${s}`:""}`}function v(e){const o=Y(e);if(!o)return"";const s=`.${F(e)}`,t=[],p=(r,h,a)=>`${s}:has(> :nth-child(${r}n+${h+a}):last-child) > :nth-last-child(-n+${a})`,i=(r,h,a=[])=>{const n=[],d=r.length,L=a.length;a.forEach(([l,g],f)=>{n.push(`${s} > :nth-child(${f+1}){grid-column:span ${l};grid-row:span ${g}}`)}),r.forEach(([l,g],f)=>{n.push(`${s} > :nth-child(${d}n+${L+f+1}){grid-column:span ${l};grid-row:span ${g}}`)});for(let l=1;l<d;l+=1)n.push(`${p(d,L,l)}{grid-column:span ${h};grid-row:span 1}`);return n};t.push(`${s}{grid-template-columns:repeat(${b},minmax(0,1fr))}`);const c=R(o);if(c&&(t.push(`${s}${s}{grid-auto-rows:auto}`),t.push(`${s}${s} > *{aspect-ratio:${c[0]}/${c[1]};height:auto}`)),t.push(...i(o.desktop,y(o,!1),o.lead)),t.push(`@media (max-width:${A}px){`),t.push(`${s}{grid-template-columns:repeat(${P},minmax(0,1fr))}`),t.push(...i(o.phone,y(o,!0),o.leadPhone)),o.phone.length===1&&!o.leadPhone?.length){const[r,h]=o.phone[0],a=o.lead?.length??0;for(let n=1;n<o.desktop.length;n+=1)t.push(`${p(o.desktop.length,a,n)}{grid-column:span ${r};grid-row:span ${h}}`)}return t.push("}"),t.join("")}export{j as GALLERY_ACROSS_BUCKETS,b as GALLERY_COLUMNS,P as GALLERY_COLUMNS_PHONE,_ as GALLERY_LAYOUTS,C as GALLERY_LAYOUT_CLASS_PREFIX,w as GALLERY_LAYOUT_KEYS,A as GALLERY_PHONE_BREAKPOINT,T as GALLERY_PHONE_LAYOUTS,B as galleryChoices,F as galleryLayoutClass,v as galleryLayoutCss,R as galleryLayoutRatio,H as galleryPictureCells,y as galleryTailSpan,Y as resolveGalleryLayout,m as resolveGalleryPhoneLayout};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{resolveGalleryLayout as i}from"./gallery-layout.js";const u=12,s=1,l=3,
|
|
1
|
+
import{resolveGalleryLayout as i}from"./gallery-layout.js";const u=12,s=1,l=3,_=800,f=3;function e(r,t,n){const o=typeof r=="number"?r:Number.parseInt(String(r??""),10);return Number.isFinite(o)?Math.min(n,Math.max(t,Math.trunc(o))):null}function p(r){return e(r,1,u)??f}function a(r,t){const n=e(r,s,l);return n??(p(t)===4?2:s)}function M(r){return r==null||r===""?null:e(r,1,u)}const G="data-sf-span";function I(r){if(!r)return!1;if(r.type==="Grid")return!0;if(r.type==="GalleryB"){if(i(r.props??{}))return!1;const t=r.props?.columns;return t!=null&&t!==""}return!1}export{f as GRID_COLUMNS_FALLBACK,u as GRID_MAX_COLUMNS,l as GRID_MOBILE_MAX_COLUMNS,s as GRID_MOBILE_MIN_COLUMNS,_ as GRID_PHONE_BREAKPOINT,G as GRID_SPAN_ATTR,I as containerOffersPositions,p as resolveGridColumns,a as resolveGridMobileColumns,M as resolveGridSpan};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a=[{value:"columns",label:"Columns"},{value:"rows-left",label:"
|
|
1
|
+
const a=[{value:"columns",label:"Columns"},{value:"rows-left",label:"Left",hint:"Image left"},{value:"rows-right",label:"Right",hint:"Image right"}],i=[{value:"half",label:"Half"},{value:"third",label:"One third"}],s=[{value:"picture",label:"Picture first"},{value:"words",label:"Words first"}];function l(e){return e==="rows-left"||e==="rows-right"?e:"columns"}const n={"rows-left":"even","rows-right":"odd"},o={half:"equal",third:"bigRight"};function h(e){const r=l(e?.arrangement);if(r==="columns")return null;const t=e?.imageWidth==="third"?"third":"half";return{mirror:n[r],row:{share:o[t],phoneReverse:e?.phoneOrder==="words"}}}export{a as ARRANGEMENT_OPTIONS,i as IMAGE_WIDTH_OPTIONS,s as PHONE_ORDER_OPTIONS,l as arrangementOf,h as imageTextRowsHand};
|
|
@@ -28,6 +28,7 @@ export declare const SITE_GUTTER_PHONE: {
|
|
|
28
28
|
};
|
|
29
29
|
export declare const SITE_GUTTER_PHONE_VAR = "--sf-site-gutter-phone";
|
|
30
30
|
export declare const SITE_GUTTER_PHONE_CLASS = "max-view-tablet:[--sf-site-gutter:var(--sf-site-gutter-phone)]!";
|
|
31
|
+
export declare const SITE_GUTTER_PHONE_EDGE_CLASS = "max-view-wide:[&_[data-sf-line~=edge]:not([data-sf-line~=edge]_*)]:[--sf-site-gutter:var(--sf-site-gutter-phone)]";
|
|
31
32
|
export declare const SITE_GUTTER_CAP: string;
|
|
32
33
|
export declare const SITE_GUTTER_CLASS: string;
|
|
33
34
|
export declare const PRE_SITE_GUTTER_CLASSES: readonly ["px-10", "px-[60px]"];
|
|
@@ -66,7 +67,7 @@ export declare function normalizeSiteGutterPhone(v?: number | null): number | nu
|
|
|
66
67
|
export declare function normalizeSectionContentMax(v: unknown): number | null;
|
|
67
68
|
export declare function siteGutterPhoneTokens(v?: number | null, unit?: unknown): Record<string, string>;
|
|
68
69
|
export declare function siteGutterPhoneClass(v?: number | null): string;
|
|
69
|
-
export declare function siteGutterPhoneFollows(gutter?: number | null): number;
|
|
70
|
+
export declare function siteGutterPhoneFollows(gutter?: number | null, unit?: unknown): number;
|
|
70
71
|
export declare function siteHalfColumnCap(dividerPx?: number): string;
|
|
71
72
|
export declare function siteHalfColumnCapClass(dividerPx?: number): string;
|
|
72
73
|
export declare const HERO_CAP: string;
|