efficient-web-builder 66.0.0 → 67.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 +16 -0
- package/dist/editor/components/MediaUploadField.js +1 -1
- package/dist/editor/components/PartSettingsPanel.js +1 -1
- package/dist/editor/components/PartTextBox.js +1 -1
- package/dist/editor/components/PreviewPartAnchors.js +1 -1
- package/dist/editor/components/SectionWidthRows.d.ts +3 -1
- package/dist/editor/components/SectionWidthRows.js +1 -1
- package/dist/editor/components/SiteTextStylesField.js +1 -1
- package/dist/editor/lib/animation/hover-fields.d.ts +1 -1
- package/dist/editor/lib/animation/hover-fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroGroup/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ImageBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/IntroBleed/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/PostCard/fields.js +1 -1
- package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -1
- package/dist/editor/lib/document/box-fields.d.ts +1 -1
- package/dist/editor/lib/document/controls.d.ts +20 -2
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/section-own-width-fields.js +1 -1
- package/dist/format/lib/animation/views.js +1 -1
- package/dist/format/lib/content/borders.d.ts +12 -2
- package/dist/format/lib/content/borders.js +1 -1
- package/dist/format/lib/content/card-corners.d.ts +3 -1
- package/dist/format/lib/content/card-corners.js +1 -1
- package/dist/format/lib/content/css-length.d.ts +6 -0
- package/dist/format/lib/content/css-length.js +1 -1
- package/dist/format/lib/content/image-corners.d.ts +3 -1
- package/dist/format/lib/content/image-corners.js +1 -1
- package/dist/format/lib/content/section-corners.d.ts +3 -1
- package/dist/format/lib/content/section-corners.js +1 -1
- package/dist/format/lib/content/section-sticky.d.ts +5 -0
- package/dist/format/lib/content/section-sticky.js +1 -1
- package/dist/format/lib/content/section-type-size.d.ts +12 -1
- package/dist/format/lib/content/section-type-size.js +1 -1
- package/dist/format/lib/content/section-width.d.ts +8 -0
- package/dist/format/lib/content/section-width.js +1 -1
- package/dist/format/lib/content/view-tier.d.ts +10 -0
- package/dist/format/lib/content/view-tier.js +1 -0
- package/dist/format/lib/post-card-layout.d.ts +3 -0
- package/dist/format/lib/post-card-layout.js +1 -1
- package/dist/format/lib/sections/divider-style.d.ts +9 -0
- package/dist/format/lib/sections/divider-style.js +1 -1
- package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
- package/dist/format/lib/source-rules/one-length-control.js +3 -3
- package/dist/format/lib/theme.d.ts +1 -1
- package/dist/format/lib/theme.js +4 -4
- package/dist/render/components/Divider.d.ts +3 -1
- package/dist/render/components/Divider.js +1 -1
- package/dist/render/components/Flex.d.ts +3 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/HeroGroup.d.ts +3 -1
- package/dist/render/components/HeroGroup.js +1 -1
- package/dist/render/components/ImageBlock.d.ts +2 -1
- package/dist/render/components/ImageBlock.js +1 -1
- package/dist/render/components/IntroBleed.d.ts +3 -2
- package/dist/render/components/IntroBleed.js +1 -1
- package/dist/render/components/PictureHoverMove.d.ts +18 -0
- package/dist/render/components/PictureHoverMove.js +1 -0
- package/dist/render/components/PictureWash.d.ts +2 -1
- package/dist/render/components/PictureWash.js +1 -1
- package/dist/render/lib/content/block-size.js +1 -1
- package/dist/render/lib/content/button-look.js +1 -1
- package/dist/render/lib/content/section-padding.js +1 -1
- package/dist/render/lib/document/blocks/general/Divider/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroGroup/render.js +1 -1
- package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/IntroBleed/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
- package/dist/render/lib/document/part-styles.d.ts +13 -0
- package/dist/render/lib/document/part-styles.js +2 -2
- package/dist/render/lib/document/passes/borders.js +1 -1
- package/dist/render/lib/document/passes/corners.js +1 -1
- package/dist/render/lib/document/passes/section-width.js +1 -1
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/dist/render/lib/text-styles/site-text-styles.js +2 -2
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as i,jsxs as P,Fragment as k}from"react/jsx-runtime";import{cloneElement as pe,createContext as nn,useContext as $e,useEffect as on,useId as Xe,useRef as z,useState as q}from"react";import{useEasel as Q,useSelectedHost as B}from"efficient-easel/easel";import{PIN_LENGTH as ee,toDateKey as rn,fromDateKey as ln}from"efficient-shell/format";import{say as s,editorEaselWords as y}from"../../../format/lib/editor-words.js";import{finiteNumber as sn}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as je,firstFrameHint as an,loadingShowsOf as cn,loadingStillHint as un}from"../../../format/lib/hero-video.js";import{pageFramesFor as dn,usePageVideoFrames as pn}from"../page-video-frames.js";import{ScreenDocumentContext as fn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as Ve,hidableText as Ye}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as fe,LINK_FIELD_MARKER as ze,MEDIA_FIELD_MARKER as qe,SCAFFOLD_FIELD_MARKER as Je,TEXT_FIELD_MARKER as E,foldMetaOf as he,textFieldIdentifier as hn}from"efficient-easel/draw";import mn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as Ze}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as gn,CARD_IMAGE_RADIUS_ROW as Qe,CARD_IMAGE_RADIUS_STEP as bn,CORNER_RADIUS_MAX as et,CORNER_RADIUS_MIN as L}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Sn,IMAGE_CORNERS_LABEL as wn}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 yn,GALLERY_LAYOUTS as te,GALLERY_LAYOUT_KEYS as Cn,galleryChoices as tt,galleryLayoutRatio as _n,galleryPictureCells as In}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as On}from"./shell-glyph.js";import{anchorSiblingsOf as Tn,placementPoints as En}from"../../../format/lib/hero-group-placement.js";import Rn from"../../components/AnchorField.js";import Nn from"../../components/SourceStatus.js";import{AdjustIcon as Pn,EyeIcon as kn,AnimationIcon as An,BackgroundIcon as nt,BorderAllIcon as Fn,BlockSectionIcon as Ln,ColumnWidthsIcon as me,ColumnsIcon as ot,CornerIcon as rt,DirectionDownIcon as Bn,DirectionLeftIcon as vn,DirectionRightIcon as Dn,DirectionUpIcon as Hn,EditIcon as Gn,GapIcon as Mn,GridIcon as Un,GroundIcon as ge,HashIcon as Wn,HeightIcon as it,ImageIcon as Kn,ListIcon as $n,LocationIcon as lt,PaddingBottomIcon as st,PaddingLeftIcon as at,PaddingRightIcon as ct,PaddingTopIcon as be,PageIcon as Xn,StickyIcon as ut,SearchIcon as jn,SquareIcon as Vn,TypeIcon as Yn,WidthIcon as zn}from"efficient-easel/icons";import{FieldGlyph as dt}from"../../components/FieldGlyph.js";import{resolvePageBackground as qn}from"../../../format/lib/content/page-background.js";import{boxFillOf as Jn,boxFillSlot as Se}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as pt,CORNER_SIDE_POINTS as Zn,hasOwnSectionCorners as Qn,normalizeCornerSides as ft}from"../../../format/lib/content/section-corners.js";import{enclosingPath as eo,enclosingSection as to}from"./enclosing-section.js";import{SettingsDefaultReset as C,SettingsDrill as no,SettingsField as x,SettingsGroup as oo,SettingsSegmented as ro,SettingsBorder as io,SettingsSidesEach as lo,SettingsSwitch as we,borderSides as so,borderStartEach as ao}from"efficient-easel/panel";import{ListField as co}from"efficient-easel/fields";import{DisplayChips as uo}from"efficient-shell/ui";import{desktopDisplayChanged as po,partShownOnDesktop as fo,partShownOnPhone as ho,phoneDisplayChanged as mo,withDesktopPart as go,withPhonePart as bo}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as So,ColorSwatch as wo,CornersInput as xo,DatePicker as yo,DateTimePicker as Co,FOCAL_DEFAULT as _o,IconPicker as ht,COLUMN_COUNT_MAX as mt,COLUMN_SHARE_MIN as Io,COLUMN_SHARES_EQUAL as Oo,resolveColumnShares as gt,WidthsBar as To,useShellStrings as Eo,IconButton as bt,InputNumber as St,Slider as Ro,Tooltip as xe}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as No}from"./geocode-resolve.js";import{ColourRow as ne,InheritedColourRow as wt}from"./ColourControl.js";import{fillThemeColors as Po,slotFill as oe}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as ye}from"../../../format/lib/document/part-inks.js";import{keptByRow as Ce}from"efficient-easel/screen/lib/document/style-fields";import xt from"./MarkupToolbar.js";import{deviceField as I}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as ko,NoControlMark as Ao,noControlField as yt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as Fo}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as Lo,PANEL_ONLY_FIELD as Bo}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as vo,resolvePhoneValue as _e}from"../../../format/lib/document/phone-override.js";import{phoneKey as K,tabletKey as Ie}from"efficient-easel/draw";import{viewKey as O}from"../../../format/lib/animation/views.js";import{viewRows as v}from"../animation/view-rows.js";import{SuppressibleText as Do}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Ho,CARD_OUTLINE_OPTIONS as Go,DEFAULT_CARD_INDEX_FORMAT as Mo,DEFAULT_CARD_OUTLINE as Uo}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Wo,DEFAULT_COVER_INDEX as Ko}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as $o}from"efficient-easel/draw";import Xo from"../../components/MediaUploadField.js";import jo from"../../components/MultiSelectField.js";import Vo from"../../components/SectionThemePicker.js";import Yo from"../../components/SearchSelectField.js";import zo from"../../components/StorefrontLinkField.js";import{UiIcon as Ct}from"efficient-easel/draw/client";import{SECTION_PADDING as R}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as qo}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Jo}from"efficient-easel/draw/client";import{encodePartId as Zo}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as Qo,useEaselStrings as er}from"efficient-easel/strings";import{hasPhoneHeight as tr,hasTabletHeight as Oe,resolveSectionMinHeight as nr,resolveTabletHeight as or}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as rr,SECTION_PIN_ABOVE_HINT as ir,SECTION_PIN_ABOVE_KEY as lr,SECTION_PIN_ABOVE_LABEL as sr,SECTION_PIN_GROUP as ar,SECTION_PIN_LABEL as _t,SECTION_PIN_SCREENS_KEY as Te,SECTION_PIN_SCREENS_LABEL as It,SECTION_PIN_STOP_DEFAULT as cr,SECTION_PIN_STOP_HINT as ur,SECTION_PIN_STOP_KEY as dr,SECTION_PIN_STOP_LABEL as pr,SECTION_PIN_STOP_OPTIONS as fr,SECTION_STICK_DISTANCE as re,SOME_VIEW_PINS as Ot,hasPhoneStick as hr,hasTabletStick as mr,resolveSectionStick as Ee,sectionPinStopOf as gr,sectionPinStopWrite as br}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as Sr,SECTION_MIN_HEIGHT_GROUP_LABEL as J,SECTION_SCREEN_PCT as wr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as xr,resolveContainerDirection as Tt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as yr,BOX_BLOCK_SPACING_POINTS as Et,BOX_PHONE_ROW_LABEL as Rt,BOX_COLUMNS_MAX as Cr,BOX_COLUMNS_MIN as Nt,BOX_PHONE_ROW_MAX as _r,BOX_PHONE_ROW_MIN as Re,BOX_SHARE_CHOICES as Pt,BOX_SHARE_LABEL as $,boxShareChoiceOf as kt,boxShareWidthsOf as Ne,BOX_SHARE_PHONE_DEFAULT as Ir,BOX_SHARE_PHONE_POINTS as Or}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as D}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Tr,borderBySide as At}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as Er,normalizeTheme as Ft,normalizeThemeColors as Rr,sectionBandTone as Nr,surfaceTwoTone as Pr}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Lt,CONTAINER_GAP_BUILT_IN as kr,CONTAINER_GAP_PHONE as Pe,GAP_FIELD_CONTAINER as ke,followsSitePhoneGap as Ar,hasOwnContainerGap as Fr,hasOwnPhoneGap as Ae,resolveContainerGap as Bt,resolvePhoneContainerGap as vt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as Lr,CARD_IMAGE_BG_OFF as Br,CARD_IMAGE_BG_SWATCH_NAMES as vr,CARD_IMAGE_BG_SWATCHES as Dr,isCardImageBackgroundInheriting as Hr,cardImageBackgroundChoice as Gr,THEME_CARD_IMAGE_BG as Mr}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Ur,SECTION_BG_NO_FILL as Wr,sectionBackgroundChoice as Kr,THEME_SECTION_BG as Fe,isSectionBackgroundEmpty as $r,sectionBackgroundHex as Dt}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Xr,nestedAccentValue as Ht,resolveSectionAccent as ie}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as jr,TYPE_SIZE_INHERIT as Vr,isTypeSizeInheriting as Yr}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as zr,WIDTH_CHOICE_LABEL as qr,WIDTH_INHERIT as Jr}from"../../../format/lib/content/section-width.js";import{useEaselSession as Zr}from"efficient-easel/screen/lib/session-context";import{backendOf as Qr}from"../website-session.js";import{BOX_GAP as ei,describedAs as A,group as T,iconOf as X,sharedStyleKinds as Z}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as Gt,onDesktopWords as H,phoneTwinFields as Le}from"efficient-easel/screen/lib/document/box-fields";import{directionField as ti,gapField as Be,iconPickerRow as ni,lengthUnitFields as oi,pickerCellIcon as ri,pickerNoneIcon as ii,Segmented as ve,select as j,slider as G}from"./box-fields.js";function ra({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?s(e):e})}function M(e,t){return s("{value} from {from}",{value:e,from:t})}function li(){const{blockGap:e}=D();return e===null?s("this container's own spacing"):M(`${e}px`,s("Styles"))}function si({inherited:e,onReset:t,label:n}){return i(C,{words:y()?.panel,label:s(n),changed:!e,detail:li(),onReset:t})}function ai(e){return Be({...ei,builtIn:kr[e],resolve:(t,n)=>Bt(e,t,n?.siteGap),action:(t,n)=>i(si,{inherited:!Fr(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[ke]:e}})}function ci(e){return Ze(I("mobile",{[ke]:e,type:"custom",render:t=>i(pi,{container:e,...t})}),Mt)}function ui(e){return Ze(I("tablet",{[ke]:e,type:"custom",render:t=>i(di,{container:e,...t})}),Mt)}const Mt={not:{field:"gap",in:Array.from({length:-Lt.min},(e,t)=>Lt.min+t)}};function ia(e){return{gap:I("desktop",ai(e)),[Ie("gap")]:ui(e),[K("gap")]:ci(e)}}function di({container:e,...t}){const[n]=F("gap"),{siteGap:o}=t.field??{},r=Math.max(Pe.min,Bt(e,n,o));return Be({...Pe,builtIn:r,resolve:a=>Ae(a)?a:r,action:(a,c)=>i(C,{words:y()?.panel,label:s("Gap"),changed:Ae(a),detail:H(u=>s(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function pi({container:e,...t}){const[n]=F("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},l=vt(e,void 0,n,o,r);return Be({...Pe,builtIn:l,resolve:c=>vt(e,c,n,o,r),action:(c,u)=>i(C,{words:y()?.panel,label:s("Gap"),changed:Ae(c),detail:M(`${l}px`,Ar(e,n,r)?s("Styles"):s("Desktop")),onReset:()=>u(void 0)})}).render(t)}function la(e){return ti({offered:xr(e),fallback:Tt(e,void 0),resolve:t=>Tt(e,t)})}function sa(e,t){return En(t?Tn(e,t):[],t)}function fi({inherited:e,onReset:t,label:n}){return i(C,{words:y()?.panel,label:s(n),changed:!e,detail:M(s("Full"),s("the page")),onReset:t})}function U({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:l,hideable:a=!0,markup:c=!0}){const{text:u,hidden:p}=Ve(e),h=z(null),f=z(null),d=_=>t(a?{text:_,hidden:p}:_),g=()=>t({text:u,hidden:!p}),m=a&&p,S=Xe(),w=r?Si(r)?i("span",{className:"sf-hint-while-typing",children:s(r)}):s(r):void 0,b=p?s("Show {label} on the slide",{label:s(n)}):s("Hide {label} on the slide",{label:s(n)});return i(x,{label:s(n),icon:i(Yn,{}),htmlFor:S,className:m?"is-hidden":void 0,hint:w,action:a?i(xe,{content:b,children:i(bt,{"aria-pressed":p,"aria-label":b,onClick:g,children:p?i(Ct,{name:"eye-off",size:14}):i(Ct,{name:"eye",size:14})})}):void 0,children:P("div",{className:"sf-copybox",children:[c&&i(xt,{target:l?f:h,value:u,onChange:d}),l?i("textarea",{id:S,ref:f,value:u,placeholder:o===void 0?void 0:s(o),onChange:_=>d(_.target.value)}):i("input",{id:S,ref:h,type:"text",value:u,placeholder:o===void 0?void 0:s(o),onChange:_=>d(_.target.value)})]})})}function aa(e,t){return{...e,[Je]:t}}function ca(e){const t=e[E];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[E]:{...t,offPage:!0}}}function ua(e){return!e||typeof e!="object"?!1:e[E]?.offPage===!0}function da(e){if(!e[E])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Bo]:!0}}function pa(e){return Lo(e)}function fa(e){const t=e[E];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[E]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as _c,SCALAR_TEXT_CONTROLS as Ic}from"efficient-easel/draw";function ha(e,t){if(!e[E])throw new Error("inOwnBox: the field holds no authored text");const{[ko]:o,...r}=e;return{...r,[Fo]:!0,render:t}}const hi=new Set($o),le={type:"radio",options:[{value:!0},{value:!1}]},Ut={text:{type:"object",objectFields:{text:{type:"text"},hidden:le}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:le}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},W=(e,t)=>{const n=A({...t,[E]:e},{...Ut[e.control],label:e.label});if(!hi.has(e.control))return n;const o=t.render;return{...yt(n,"authored-copy"),render:r=>i(Do,{name:r.name,children:o(r)})}},ma="Everything else on this block comes from the linked post. Unlink it to edit by hand.",mi={field:"source.slug",set:!0},ga={not:mi},gi="Select a word, then press the highlighter.",bi=new Set([gi]),Si=e=>bi.has(e);function ba(e,t,n){return W({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Sa(e,t,n){return W({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function wa(e,t,n){return W({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function xa(e,t,n){return W({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function ya(e){return{type:"custom",[ze]:{label:e},...A({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(zo,{value:Ye(t),onChange:n,label:e})}}function Ca(e,t,n){return W({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const _a={Design:Pn,Animation:An};function Ia(e){return{type:"custom",render:()=>i(wi,{text:e})}}function wi({text:e}){return i("p",{className:"sf-note",children:s(e)})}function Oa(e){return he(e)!==null&&e?.tabs!==void 0}const Wt=new Map;function Ta(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Wt.get(n)??{type:"custom",tabs:t,[fe]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(k,{})};return Wt.set(n,o),o}const Kt=new Map;function Ea(e){const t=Kt.get(e)??{type:"custom",[fe]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(k,{})};return Kt.set(e,t),t}function xi(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Ra(e,t){return xi(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(k,{})}}function Na(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(k,{})}}function Pa({title:e,children:t}){const[n,o]=q(()=>!De.has(e));return i(oo,{title:e,open:n,onToggle:r=>{o(r),r?De.delete(e):De.add(e)},children:t})}const De=new Set;function yi({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),l=r?o?.[r]:void 0,a=l?s(l):t;return P("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?s(o[c]):c;return i(xe,{content:u,children:i(wo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:a})]})}function ka(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(Ci,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function Ci({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const l=typeof o=="string"?o:void 0,{colors:a,n:c}=Ue(),u={background:a.background,surface:a.surface,surface2:Pr(a),band:Nr(a)},p=n?Fe:t,h=$r(l,t,p),f=Dt(void 0,p,u),d=n?Ur:void 0,g=p===Fe?s("the theme's section background"):s("Theme {n} background",{n:c}),m=_i(l,t,a,c,u,r),S=M(f.toUpperCase(),g),w=ye(l),b=w?oe(w,a,c):null;return b?i(ne,{label:s(e),icon:i(nt,{}),value:b.hex,caption:b.words,onChange:r,changed:!0,onReset:()=>r(d),resetTo:S,choices:m}):i(wt,{label:s(e),icon:i(nt,{}),value:h?"":Dt(l,t,u),inherited:f,resetTo:S,onChange:r,onReset:()=>r(d),choices:m})}function _i(e,t,n,o,r,l){const a=Kr(e,t);return[{label:s("No fill"),color:"",selected:a==="none",onPick:()=>l(Wr)},{label:`${s("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:a==="band",onPick:()=>l(Fe)},...Me(ye(e)??"",n,o,l)]}function Ii(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,l=Hr(r,t);return i(x,{label:s(e),icon:i(ge,{}),changed:!l,action:i(C,{words:y()?.panel,label:s(e),changed:!l,detail:s("the theme's image stage"),onReset:()=>o(Lr)}),children:yi({swatches:Dr,current:l?Mr:Gr(r,t),onPick:o,names:vr})})}}}function Aa(e=n=>n,t){return Z({_gSectionTheme:T(Xr),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(Vo,{value:e(n),onChange:o,followLabel:t})}})}function V({min:e,max:t,step:n,value:o,onChange:r,suffix:l="",readout:a=!0,notch:c,ariaLabel:u,disabled:p=!1,placeholder:h,placeholderWord:f,onClear:d,units:g}){const m=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:m?"sf-slider has-notch":"sf-slider",style:m?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(Ro,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...f?{emptyLabel:s(f)}:{},suffix:l||void 0,...g?{units:g}:{},showInput:a,label:u===void 0?void 0:s(u),disabled:p,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:S=>{S===null?d?.():S!==o&&r(S)}})})}function Oi(e,t){const{min:n,max:o,step:r=1,unsetLabel:l,hint:a,restTrack:c,unsetMark:u,icon:p,unit:h="px"}=t;return{type:"custom",render:({value:f,onChange:d})=>{const g=typeof f=="number"?f:null,m=g===null;return i(x,{label:s(e),icon:p?X(p):void 0,value:m?u||l===void 0?void 0:s(l):`${g}${h}`,changed:!m,action:u?pe(u,{changed:!m,onReset:()=>d(null)}):i(C,{words:y()?.panel,label:s(e),changed:!m,onReset:()=>d(null)}),hint:typeof a=="string"?s(a):a,children:c?c({min:n,max:o,step:r,px:g,label:e,onChange:d}):V({min:n,max:o,step:r,value:g??n,readout:!1,ariaLabel:e,onChange:d})})}}}const se="Corners";function He(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return i(x,{label:s(se),icon:i(rt,{}),changed:r,action:pe(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(Ei,{tier:e,px:o,onRadius:n})})}}}function F(e){const t=B();return[t?.values?.[e],n=>t?.onChange(e,n)]}function $t(){return yt({type:"custom",render:()=>i(Ao,{})},"always")}function Ti(){const e=B();return t=>e?.onChangeMany(t)}function Ei({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,l]=F(e.sidesKey),a=ft(r)??[...pt];return i(xo,{label:s(se),value:a,corners:Zn,onChange:c=>{const u=ft(c)??[];l(u.length===pt.length?null:u)},radius:t,onRadiusChange:n,radiusMin:L,radiusMax:et,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function Xt(){return $t()}function Ri({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=D(),r=typeof o=="number"?`${o}px`:s("not set");return i(C,{words:y()?.panel,label:s(e),changed:t,detail:o==null?s("the built-in corners"):M(r,s("Styles")),onReset:n})}function Ni(){const{cornerRadiusPx:e}=D();return typeof e=="number"?e:L}function Pi(){return He({sidesKey:"sectionCornerSides",useFollowed:Ni,mark:i(Ri,{label:se}),hint:ki})}const ki="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function Fa(){return Z({_gShape:T("Shape"),sectionCorners:Pi(),sectionCornerSides:Xt(),...v("sectionBorder",Di)})}const Ai=()=>({width:s("Border width"),sides:{top:s("Border top"),right:s("Border right"),bottom:s("Border bottom"),left:s("Border left")},style:s("Border style"),styles:{solid:s("Solid"),dashed:s("Dashed"),dotted:s("Dotted")},color:s("Border color"),unit:"px"});function Fi(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Li(){let e;try{const t=Ft(D().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Er.line}function Bi({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:l=!0,above:a={}}){const c=e&&typeof e=="object"?e:{},[u,p]=q(()=>r?ao(c,a):!1),h=Ai(),f=d=>Fi(r&&l?d:{width:d.width,color:d.color,...l?{style:d.style}:{}});return i(x,{label:s("Border"),icon:i(Fn,{}),action:r?i(lo,{each:u,label:s("Each side"),onChange:p}):void 0,children:i(io,{label:s("Border"),value:c,each:u,onChange:d=>t(f(d)),placeholder:n,presets:o,words:h,styles:l,max:Tr})})}function vi({value:e,onChange:t,view:n}){const[o]=F("sectionBorder"),[r]=F(Ie("sectionBorder")),l=Li(),a=u=>u&&typeof u=="object"?u:{},c=n==="phone"?{...At(a(o)),...At(a(r))}:n==="tablet"?a(o):{};return i(Bi,{value:e,onChange:t,placeholder:{sides:so(c),style:c.style??"solid",color:c.color||l},presets:[l],above:c})}function Di(e){return{type:"custom",render:({value:t,onChange:n})=>i(vi,{value:t,onChange:n,view:e})}}function La(e){return{type:"custom",render:()=>i(Hi,{partKey:e})}}function Hi({partKey:e}){const[t]=F("id"),[n]=F("_partStyles"),{textStyles:o}=D(),r=er();let l=null;try{l=Jo().select}catch{l=null}const a=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(no,{name:s("Text"),preview:qo(a,c,{noStyle:s("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??Qo.copy.panel).cases}),onOpen:()=>{l&&typeof t=="string"&&l(Zo(t,e))}})}function jt(e){const{cornerRadiusPx:t}=D(),n=typeof t=="number"?t:e;let o=null;try{const{appState:l,selectedItem:a}=Q(u=>u),c=a?.props?.id?String(a.props.id):void 0;o=c?to(l?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Qn(r)?r:n}function Gi({label:e,changed:t=!1,onReset:n=()=>{}}){const o=jt(L);return i(C,{words:y()?.panel,label:s(e),changed:t,detail:M(`${o}px`,s("the section")),onReset:n})}function Mi(){return i(k,{children:s("Follows the section's Corners until you set a number here.")})}function Ui(){return He({sidesKey:"cardCornerSides",useFollowed:()=>jt(L),mark:i(Gi,{label:se}),hint:i(Mi,{})})}function Wi(){return{type:"custom",render:()=>i(mn,{})}}function Ba(){return{_gShape:T("Shape"),cardCorners:Ui(),cardCornerSides:Xt(),cardCornersApplyAll:Wi()}}function Ki(){return A({type:"custom",render:e=>i(Xi,{...e})},{type:"select",label:$,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 $i(e,t){const n=kt(e);if(n!=="custom")return s(Pt.find(r=>r.value===n)?.label??"");const o=gt(Ne(e,t),t);return o?[...o,100-o.reduce((r,l)=>r+l,0)].join(" / "):s("Custom")}function Xi(e){const{value:t,onChange:n}=e,[o]=F("content"),r=Array.isArray(o)?o.length:0,l="follows"in e,a=t!=null,c=a?t:l?e.follows:void 0,u=kt(c),p=r>=2&&r<=mt,h=()=>[...Oo[r]??[]],f=z(null),d=b=>{const _=f.current;_&&JSON.stringify(b)===JSON.stringify(_.shares)?n(_.value):b&&n(b)},g=b=>{b===u||b==="custom"&&!p||n(b==="custom"?h():b)},m=s("The width bar works for 2 to {count} blocks.",{count:mt}),S=a&&(l||t!=="content"),w=Eo().widths.hint(r,Io);return i(x,{label:s($),icon:i(me,{}),changed:S,hint:u!=="custom"?void 0:p?w:m,action:i(C,{words:y()?.panel,label:s($),changed:S,disabled:e.readOnly===!0,detail:l?H(b=>s(b),$i(e.follows,r),e.followsView):s("Fit content"),onReset:()=>n(void 0)}),children:P("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(ht,{label:s($),value:u,options:Pt.map(b=>({value:b.value,label:b.value==="custom"&&!p?m:s(b.label),icon:ri(i("span",{className:"sf-gallery-pic sf-share-pic",children:Vt(b.weights).map((_,Y)=>i("i",{style:{gridColumn:`span ${_}`}},Y))}),s(b.label),b.value==="custom"&&!p?m:s(b.label))})),onChange:g,columns:3,cell:Yt,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&p?i("div",{onFocus:()=>{f.current={value:t,shares:gt(Ne(c,r),r)}},onBlur:()=>{f.current=null},children:i(To,{label:s($),count:r,value:Ne(c,r),onChange:d,readOnly:e.readOnly===!0})}):null]})})}function Vt(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function va(){return j(yr,i(Mn,{}),Et,Et[0].value)}function Da(){return I("mobile",ni($,i(me,{}),Or.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:Vt(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),Ir,{columns:2,cell:Yt}))}const Yt={width:"5.75rem",height:"3.25rem"};function Ha(){return Le("share",Ki(),Gt)[Ie("share")]}function ji(){return I("mobile",G(Rt,i(ot,{}),Re,_r,1,Re,"",{clear:{phoneFollows:!1,hint:Re}}))}const zt={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Ga(){const e=G(Rt,i(ot,{}),Nt,Cr,1,Nt,"",{clear:{emptyLabel:"Auto"}}),t=Le("columns",e,{...zt,tablet:Gt.tablet}),n=Le("columns",e,zt,{phoneRow:ji()});return{...t,phoneRow:n.phoneRow}}function Ma(e,t,n,o,r,l){return{type:"custom",render:({value:a,onChange:c})=>i(x,{label:s(e),icon:i(dt,{noun:l}),action:i(C,{words:y()?.panel,label:s(e),changed:!Yr(a),detail:s("the Text style in Styles"),onReset:()=>c(Vr),defaultAction:{onPress:()=>c(jr),title:s("Keep this section's own built-in size"),icon:i(Ln,{})}}),children:V({min:t,max:n,step:o,value:typeof a=="number"?a:r,suffix:"px",ariaLabel:e,onChange:c})})}}function Ua(){return{_gCellWidth:T("Cell width"),gridSpan:j("Positions",i(me,{}),[{label:"Auto",value:""},...Array.from({length:xn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function N(){let e=null,t=null;try{e=$e(Vi),t=Q(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Vi=nn(null);function Yi({min:e,max:t,step:n,px:o,label:r,onChange:l,desktopKey:a,fallback:c}){const u=N()[a],p=_e(void 0,u,c);return i(k,{children:V({min:e,max:t,step:n,value:_e(o,u,c),readout:!1,ariaLabel:r,notch:p,onChange:l})})}function zi({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:l=()=>{}}){const a=N()[t],c=_e(void 0,a,n);return i(C,{words:y()?.panel,label:s(e),changed:r,detail:H(u=>s(u),`${c}${o}`),onReset:l})}function qi(e){return Oi(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(zi,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Yi,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Ji={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Zi={Top:be,Bottom:st,Left:at,Right:ct},Qi=e=>{const t=Zi[e];return i(t,{})};function Wa(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=w=>Ji[w],l=w=>G(r("Top"),i(be,{}),R.min,R.max,R.step,w,"px"),a=(w,b,_,Y=R)=>I("mobile",qi({label:r(w),icon:Qi(w),desktopKey:b,min:Y.min,max:Y.max,step:Y.step,fallback:_})),c=e.top??R.min,u=e.bottom??R.min,p="sectionPaddingLeft",h="sectionPaddingRight",f=e.sideBounds??R,d=e.side??f.min,g=e.sidePhone??d,m=e.phone===!0,S=w=>m?I("desktop",w):w;return Z({...o?{_gSpacing:T("Padding")}:{},[t]:S(l(c)),...m?{[K(t)]:a("Top",t,c)}:{},...e.only==="top"?{}:{[n]:S(G(r("Bottom"),i(st,{}),R.min,R.max,R.step,u,"px")),...m?{[K(n)]:a("Bottom",n,u)}:{}},...e.sides?{[p]:S(G(r("Left"),i(at,{}),f.min,f.max,f.step,d,"px")),...m?{[K(p)]:a("Left",p,g,f)}:{},[h]:S(G(r("Right"),i(ct,{}),f.min,f.max,f.step,d,"px")),...m?{[K(h)]:a("Right",h,g,f)}:{}}:{}})}function Ka(e,t){const n=Object.fromEntries(Object.entries(t).map(([l,a])=>[l,l in e&&he(a)?e[l]:a])),o={};let r=!1;for(const[l,a]of Object.entries(e)){if(l in t){r||Object.assign(o,n),r=!0;continue}o[l]=a}return r||Object.assign(o,n),o}const ae="Width";function $a(e,t=zr,n=!0){const o=t.map(r=>({label:qr[r],value:r}));return Z({...n?{_gWidth:T(ae)}:{},widthMode:{type:"custom",render:({onChange:r,field:l})=>i(x,{label:s(ae),icon:i(zn,{}),action:n?i(fi,{inherited:l?.inherited??!1,onReset:()=>r(Jr),label:ae}):void 0,children:ve({options:o,value:l?.currentValue||e,onChange:r,ariaLabel:ae})})}})}function Xa(){const e=(o,r)=>({type:"custom",render:({value:l,onChange:a})=>i(el,{value:l,onChange:a,view:o,badge:r})}),t=()=>Ce("sectionHeightMode"),n=()=>Ce("sectionHeightMode");return Z({_gHeight:T(J),...v("sectionHeightMode",o=>o==="desktop"?e(o):e(o,r=>i(rl,{view:o,onClear:()=>r(void 0)}))),...v("sectionHeightValue",t),...v("sectionHeightUnit",n)})}function el({value:e,onChange:t,view:n,badge:o}){const r=N(),{mode:l,number:a,unit:c}=tl(n,r,e);return i(x,{label:J,icon:X(i(it,{})),action:o?o(t):void 0,children:P("div",{className:"es-width-stack",children:[ve({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:l,onChange:t,ariaLabel:J}),a?i(ol,{view:n,mode:l,menu:c}):null]})})}function qt(e,t){return e==="phone"&&Oe(t)?or(t):nr(t)}function ce(e,t){return e==="desktop"||(e==="tablet"?Oe(t):tr(t))?null:qt(e,t)}function tl(e,t,n){const r=(l=>["auto","fixed","screen"].includes(l))(n)?n:ce(e,t)?.mode??"auto";return{mode:r,number:r!=="auto",unit:r==="fixed"}}function nl(e,t,n,o){const r=ce(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 Jt(e,t,n){const o=B(),r=ce(e,N());return!o||!r?{followed:null,write:n}:{followed:r,write:a=>o.onChangeMany(c=>{const u=nl(e,c,t,a);return u===null?{[O(t,e)]:a}:Object.keys(u).length?u:null})}}function ol({view:e,mode:t,menu:n}){const o=B(),r=N(),l=O("sectionHeightValue",e),a=O("sectionHeightUnit",e),c=w=>b=>o?.onChangeMany(()=>({[w]:b})),{followed:u,write:p}=Jt(e,"sectionHeightValue",c(l)),{write:h}=Jt(e,"sectionHeightUnit",c(a)),f=t==="screen"?"%":r[a],d=(u?u.unit:f)==="%"?"%":"px",g=d==="%"?wr:Sr,m=r[l],S=n?{options:["px","%"],label:s("Unit"),onChange:w=>h(w)}:void 0;return V({min:g.min,max:g.max,step:g.step,value:u?null:typeof m=="number"?m:g.fallback,...u?{placeholder:u.value}:{},suffix:d,...S?{units:S}:{},ariaLabel:J,onChange:p})}function rl({view:e,onClear:t}){const n=N(),o=ce(e,n)===null,r=e==="phone"&&Oe(n),l=qt(e,n),a=H(c=>s(c),l.mode==="auto"?s("Auto"):`${l.value}${l.unit}`,r?"tablet":"desktop");return i(C,{words:y()?.panel,label:s(J),changed:o,detail:a,onReset:t})}function ja(e={}){const t=e.intro===!0,n=l=>({type:"custom",render:({value:a,onChange:c,id:u,name:p})=>i(dl,{value:a,onChange:c,labelId:`${u??p??"stickTop"}-label`,view:l,intro:t})}),o=l=>({type:"custom",render:({value:a,onChange:c})=>i(al,{value:a,onChange:c,view:l,intro:t})}),r=l=>({type:"custom",render:({value:a,onChange:c})=>i(cl,{value:a,onChange:c,view:l,intro:t})});return{_gStick:T(ar,{dot:t?sl:Ot}),...v("stickTop",n),...v("stickTopDistance",o),...e.screens?v(Te,r):{},...t?{}:{[dr]:il()},...t||e.above===!1?{}:{[lr]:ll()}}}function il(){const e=j(pr,i(be,{}),fr,cr);return I("desktop",{...e,render:t=>{const n=e.render({...t,value:gr(t.value),onChange:o=>t.onChange(br(o))});return pe(n,{hint:s(ur)})}})}function ll(){const e=en(sr,!1,i(ut,{}),ir);return I("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const sl={any:[Ot,rr]};function Zt(e,t,n,o){const r=B(),l=N(),a=e==="desktop"||ue(e,l)?null:Ge(e,Ee(l,{intro:o}));return{followed:a,write:a&&r?u=>r.onChangeMany(p=>{const h=ul(e,p,u,t,o);return h===null?{[O(t,e)]:u}:Object.keys(h).length?h:null}):n}}function al({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:l}=Zt(n,"stickTopDistance",t,o);return i("div",{className:"sf-field",children:V({min:re.min,max:re.max,step:re.step,value:r?null:typeof e=="number"?e:re.fallback,...r?{placeholder:r.distance}:{},suffix:"px",ariaLabel:s("Distance from top"),onChange:l})})}function cl({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:l}=Zt(n,Te,t,o);return i(x,{label:s(It),icon:X(i(it,{})),children:V({min:ee.min,max:ee.max,step:ee.step,value:r?null:sn(e)??ee.default,...r?{placeholder:r.screens}:{},ariaLabel:s(It),onChange:l})})}function ue(e,t){return e==="tablet"?mr(t):hr(t)}function Ge(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,screens:t.desktopScreens}}function ul(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ue(e,t))return null;if(n===void 0)return{};const l=Ge(e,Ee(t,{intro:r})),a=e==="phone"&&ue("tablet",t)?u=>O(u,"tablet"):u=>u,c=(u,p)=>t[a(u)]==null?{}:{[O(u,e)]:p};return{[O("stickTop",e)]:!0,...c("stickTopDistance",l.distance),...c(Te,l.screens),[O(o,e)]:n}}function dl({value:e,onChange:t,labelId:n,view:o,intro:r}){const l=N(),a=Ee(l,{intro:r}),c=o==="phone"?a.phone:o==="tablet"?a.tablet:r?a.desktop:e===!0,u=o==="phone"&&a.ownTablet,p=o==="desktop"?null:Ge(o,a),h=p?.on?`${p.distance}px`:s("Off");return i(x,{label:s(_t),labelId:n,icon:X(i(ut,{})),action:P(k,{children:[o!=="desktop"?i(C,{words:y()?.panel,label:s(_t),changed:ue(o,l),detail:H(f=>s(f),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(we,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const Qt="e.g. about";function Va(){return{_gAnchor:T("Anchor"),anchor:W({control:"plainText",label:"Name",placeholder:Qt},{type:"custom",render:({value:e,onChange:t})=>i(Rn,{value:e,onChange:t,nameBox:(n,o)=>i(U,{value:n,onChange:o,label:"Name",placeholder:Qt,hideable:!1,markup:!1})})})}}function Ya(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:a})=>{const c=`${l??a??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(x,{label:s(e),icon:t,htmlFor:c,hint:n===void 0?void 0:s(n),children:i(Co,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:p=>r(p?p.toISOString():"")})})}}}function za(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:a})=>{const c=`${l??a??e}-date`;return i(x,{label:s(e),icon:t,htmlFor:c,hint:n===void 0?void 0:s(n),children:i(yo,{id:c,value:ln(typeof o=="string"?o:null),onChange:u=>r(u?rn(u):"")})})}}}function en(e,t,n,o){return{type:"custom",...A({},{...le,label:e}),render:r=>{const{value:l,onChange:a,id:c,name:u}=r,p="follows"in r,h=r,f=typeof l=="boolean",d=typeof h.follows=="boolean"?h.follows:t,g=f?l:p?d:t,m=`${c??u??e}-label`,S=h.readOnly===!0,w=i(we,{checked:g,onChange:a,disabled:S,ariaLabelledBy:m});return i(x,{label:s(e),labelId:m,icon:n,hint:o===void 0?void 0:s(o),action:p?P(k,{children:[i(C,{words:y()?.panel,label:s(e),changed:f,detail:h.followsNoView?s(d?"On":"Off"):H(b=>s(b),s(d?"On":"Off"),h.followsView),disabled:S,onReset:()=>a(void 0)}),w]}):w})}}}function qa(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(pl,{label:"Background",icon:i(Xn,{}),id:r,value:e,shown:qn(e),onChange:t})}}}function Ja(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(ne,{label:s(e),icon:n,value:o||t,onChange:r})}}function pl({label:e,icon:t,id:n,value:o,shown:r,onChange:l}){const{colors:a,n:c}=Ue(),u=ye(o),p=u?oe(u,a,c):null;return i(ne,{label:s(e),icon:t,id:n,value:p?p.hex:r,caption:p?.words,onChange:l,choices:Me(u??"",a,c,l)})}function Za(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(fl,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Me(e,t,n,o){const r=Se(e);return Po(t,n).map(l=>({label:l.label,color:l.value,selected:r===l.name,onPick:()=>o(l.name)}))}function fl({value:e,onChange:t,twin:n}){const{colors:o,n:r}=Ue(),l=o.background,a=M(l.toUpperCase(),s("Theme {n} background",{n:r})),c=Se(e),u=c?oe(c,o,r):null,p=Me(e,o,r,t),h=n?()=>t(void 0):()=>t("");let f=l,d=a;if(n){const g=Se(n.follows),m=Jn(n.follows),S=g?oe(g,o,r):m?{hex:m,words:m.toUpperCase()}:null;f=S?.hex??l,d=H(w=>s(w),S?S.words:a,n.view)}return u?i(ne,{label:s("Fill"),icon:i(ge,{}),value:u.hex,caption:u.words,onChange:t,changed:!0,onReset:h,resetTo:d,choices:p}):i(wt,{label:s("Fill"),icon:i(ge,{}),value:e,inherited:f,resetTo:d,onChange:t,onReset:h,choices:p})}function hl(e,t,n){if((e?.content??[]).some(a=>a?.props?.id===t))return ie(n);const r=eo(e,t);if(r.length===0)return null;const l=ie(Ht(n));if(l!==null)return l;for(let a=r.length-1;a>0;a-=1){const c=ie(Ht(r[a].sectionAccent));if(c!==null)return c}return ie(r[0].sectionAccent)}function Ue(){const e=Ft(D().theme),[t]=F("sectionAccent");let n=null;try{const{appState:r,selectedItem:l}=Q(c=>c),a=l?.props?.id?String(l.props.id):void 0;n=a?hl(r?.data,a,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:Rr(e.themes[o]),n:o+1}}const ml=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function gl({label:e,value:t,onChange:n,points:o=ml}){const r=o.map(l=>({...l,label:s(l.label),...l.title?{title:s(l.title)}:null}));return i(So,{label:s(e),value:t,points:r,onChange:n})}function Qa(){return $t()}const ec={top:i(Hn,{}),right:i(Dn,{}),bottom:i(Bn,{}),left:i(vn,{})};function tc(e,t,n,o,r,l,a){const c=f=>t.find(d=>d.value===f),u=f=>({value:f,label:"",disabled:!0,title:o}),p=f=>{const d=t.find(m=>m.cell===f);if(!d)return u(`missing-${f}`);const g=l?.[f];return g?{value:d.value,label:d.label,icon:g}:{value:d.value,label:d.label}},h=[u("corner-top-left"),p("top"),u("corner-top-right"),p("left"),u("centre"),p("right"),u("corner-bottom-left"),p("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:d})=>{const g=t.some(m=>m.value===f)?f:n;return i(x,{label:s(e),icon:r,value:c(g)?.label?s(c(g).label):a?s(a):"",children:gl({label:e,value:g,onChange:d,points:h})})}}}function nc(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:l})=>i(jo,{label:e,options:(l.options??t).map(a=>({...a,label:s(a.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:s(n)}:{}})}}function oc(e,t,n,o){return{type:"custom",options:t,fallback:n,...A({},{type:"select",label:e}),render:({value:r,onChange:l,field:a})=>i(Yo,{label:e,options:(a.options??t).map(c=>({...c,label:s(c.label)})),fallback:a.fallback??n,value:r,onChange:l,placeholder:o===void 0?void 0:s(o)})}}function rc(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const ic=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function lc(e,t,n){const o=Object.keys(je).map(r=>({label:je[r],value:r,picture:n[r]}));return{type:"custom",...A({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(Sl,{label:e,icon:t,options:o,onChange:r})}}function bl(e,t,n){const o=an(e,t,n);if(o!==void 0)return o==="save-makes-frame"?s("A frame is made from this video when you save the page."):o==="starts-dark"?s("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"?s("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"?s("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"?s("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"?s("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=un(e);return r==="frame-missing-image"?s("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?s("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?s("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?s("No image yet. The slide shows its background colour until you choose one."):void 0}function Sl({label:e,icon:t,options:n,onChange:o}){const r=B(),l=r?.values??{},a=cn(l),c=$e(fn),u=pn(c?.docId??null);let p=null;try{p=Q(f=>f.appState.data)}catch{p=null}const h=dn(r?.id,p,u);return i(x,{label:s(e),icon:X(t),hint:bl(l,h,c?.hasUnsavedEdits??!1),children:ve({options:n,value:a,onChange:o,ariaLabel:e})})}function sc(e,t,n,o={}){const r={type:"custom",[qe]:!0,render:({value:l,onChange:a,name:c})=>i(Xo,{value:l||"",onChange:a,fieldKey:c,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?I("each",r):r}const ac={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function wl(e){const t=s(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function cc({value:e,onChange:t,label:n}){const o=e||{},r=B(),l=r?r.values!==r.node.props:!0,a=!!o.pending&&l,c=!!o.pending&&!l,u=!!Qr(Zr()).geocode,p=Xe(),h=(f,d)=>t({...o,[f]:d??void 0});return P(k,{children:[i(x,{label:s(n),icon:i(lt,{}),action:u?i(xe,{content:s("Find from the address (OpenStreetMap)"),children:i(bt,{"aria-label":s("Find from the address"),"aria-busy":a||void 0,disabled:a,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(jn,{})})}):void 0,children:u&&o.status?i(Nn,{compact:!0,oneLine:!0,spaced:!1,status:a?"busy":o.ok&&!c?"found":"notfound",statusText:a?s("Finding…"):c?s(No):s(o.status),hint:wl(o)}):null}),i(x,{label:s("Enter by hand"),labelId:p,icon:i(Gn,{}),action:i(we,{checked:!!o.manual,onChange:f=>t({...o,manual:f}),ariaLabelledBy:p})}),o.manual&&i(x,{label:s("Latitude, longitude"),icon:i(lt,{}),children:P("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(St,{value:typeof o.lat=="number"?o.lat:null,onChange:f=>h("lat",f),min:-90,max:90,step:1e-4,placeholder:s("Latitude")}),i(St,{value:typeof o.lng=="number"?o.lng:null,onChange:f=>h("lng",f),min:-180,max:180,step:1e-4,placeholder:s("Longitude")})]})})]})}function xl(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function yl(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,l)=>l===t?{text:n}:r)}function uc(e,t){return e===null?null:t>e?e:null}function Cl(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 dc={label:"Ticker items",icon:i($n,{})};function pc(e,t,n,o){return{type:"custom",[E]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...A({},{...Ut.textList,label:e}),render:({value:r,onChange:l})=>i(_l,{label:e,icon:X(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:l,markup:o==="markup"})}}function _l({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:l=!1}){const a=z(null),[c,u]=q(null),p=f=>f.map(d=>({text:d?.text??""})),h=f=>{const d=Cl(n,f,c);d===null&&(a.current=null),u(d),r(p(f))};return i(co,{label:s(e),icon:t,noun:s("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:l?i(xt,{target:a,value:xl(n,c),onChange:f=>r(yl(n,c??-1,f)),disabled:c===null,label:c===null?s("Formatting — click a row first"):s("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(f,d,g)=>i("input",{type:"text",className:l&&c===d?"sf-list-marking":void 0,value:f?.text??"",placeholder:s(o),"aria-label":s("{label} {n}",{label:s(e),n:d+1}),onChange:m=>g({text:m.target.value}),onFocus:m=>{a.current=m.currentTarget,u(d)}})})}function fc(e,t){const n=`${e.label} — row ${t+1}`;return W({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:s("{label} — row {n}",{label:s(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function hc(e){return{_gCards:T("Cards"),coverIndex:j("Cover image",i(Kn,{}),Wo,String(Ko),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:Ii("Image background",Br),cardImage:tn()}}function mc(){return{outline:j("Card outline",i(Vn,{}),Go,Uo),indexBadge:j("Card number",i(Wn,{}),Ho,Mo),showBadge:en("Product badge",!0,i(dt,{noun:"tag"}))}}function gc(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...le,label:de.find(l=>l.id===r).label}),o=r=>A(Ce(We),n(r));return{_gShowOnCard:T("Show on a card"),[We]:A({type:"custom",render:()=>i(Il,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(We)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const We="showCardPrice",de=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function Il({rest:e}){const t=N(),n=Ti(),o=a=>typeof t[a]=="boolean"?t[a]:void 0,r=a=>o(a)??e[a],l=de.some(({id:a})=>o(a)!==void 0&&o(a)!==e[a]);return i(Ke,{parts:de,changed:l,shown:r,onPress:(a,c)=>n({[a]:c}),onReset:()=>n(Object.fromEntries(de.map(({id:a})=>[a,void 0])))})}function bc(e,t="display"){const n=K(t);return{[t]:I("desktop",{type:"custom",render:({value:o,onChange:r})=>i(Ke,{parts:e,changed:po(o),shown:l=>fo(o,l),onPress:(l,a)=>r(go(o,l,a)),onReset:()=>r(void 0)})}),[n]:I("mobile",{type:"custom",render:({value:o,onChange:r})=>i(Ol,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Ke({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:l,disabledReason:a}){const c=s("Display");return i(x,{label:c,icon:i(kn,{}),changed:t,action:i(C,{words:y()?.panel,label:c,changed:t,detail:l,onReset:r}),children:i(uo,{label:c,items:e.map(u=>({id:u.id,label:s(u.label),shown:n(u.id),...a?{disabled:!0,disabledReason:s(a)}:{}})),onChange:o})})}function Ol({parts:e,desktopKey:t,value:n,onChange:o}){const r=N()[t];return i(Ke,{parts:e,changed:mo(n),shown:l=>ho(r,n,l),onPress:(l,a)=>o(bo(n,l,a)),onReset:()=>o(vo),detail:s("the same as Desktop")})}function tn(e=gn){return G("Card image",i(rt,{}),L,et,bn,L,e,{clear:{hint:L},hint:"Rounds the picture. The card's own corner is in Styles."})}function Tl(){return oi(Qe,"cardImage")}function Sc(){return{cardImage:tn(Qe),...Tl()}}function wc(){return He({sidesKey:"cornerSides",step:Sn,useFollowed:()=>L,mark:i(El,{label:wn}),hint:s("Rounds the picture. Left alone it stays square.")})}function El({label:e,changed:t=!1,onReset:n=()=>{}}){return i(C,{words:y()?.panel,label:s(e),changed:t,onReset:n})}function xc(){return{type:"custom",render:({value:e,onChange:t})=>i(kl,{value:typeof e=="string"?e:"",onChange:t})}}function Rl({layout:e,width:t}){const n=_n(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:In(e).map(([r,l],a)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${l}`,aspectRatio:o}},a))})}const Nl={width:"3.5rem",height:"2.5rem"},Pl=200;function kl({value:e,onChange:t}){const[n,o]=q(null),[r,l]=q(4),a=z(null);on(()=>{const d=a.current;if(!d||typeof ResizeObserver!="function")return;const g=()=>l(d.getBoundingClientRect().width>=Pl?4:3);g();const m=new ResizeObserver(g);return m.observe(d),()=>m.disconnect()},[]);const c=e&&e in te?e:"",u=tt(n,c),p=tt(n,"").length,h=On("no-symbol"),f=[{value:"",label:s("Not chosen"),icon:ii(h,s("Not chosen"))},...u.map(d=>({value:d,label:s(te[d].label),icon:i(Rl,{layout:te[d],width:40})}))];return i(x,{label:s("Layout"),icon:i(Un,{}),value:c?s(te[c].label):void 0,children:i("div",{ref:a,style:{flex:"1 1 auto",minWidth:0},children:i(ht,{label:s("Layout"),value:c,options:f,onChange:t,columns:r,cell:Nl,header:P("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:s("Photos in a row")}),i(ro,{options:[{id:"all",label:s("All")},...yn.map(d=>({id:String(d),label:String(d)}))],value:n===null?"all":String(n),ariaLabel:s("Photos in a row"),onChange:d=>o(d==="all"?null:Number(d))}),i("span",{className:"text-2xs text-ink-faint",children:s("{n} of {total} layouts",{n:p,total:Cn.length})})]})})})})}export{mi as BOUND_TO_POST,ma as BOUND_TO_POST_NOTE,_a as BUCKET_ICONS,ac as CUSTOM_FIELD_MEDIA,cc as CoordsField,Mt as DESKTOP_GAP_NOT_OVERLAP,Ke as DisplayRow,ec as EDGE_ARROWS,_o as FOCAL_DEFAULT,ml as FOCAL_POINTS,fe as FOLD_FIELD_MARKER,gl as FocalPicker,gi as HIGHLIGHT_HINT,U as HidableTextField,ze as LINK_FIELD_MARKER,ra as Label,qe as MEDIA_FIELD_MARKER,ic as MEDIA_TYPE_OPTIONS,ga as NOT_BOUND_TO_POST,Pa as PanelBand,wi as PanelNoteLine,Vi as RowPropsContext,Je as SCAFFOLD_FIELD_MARKER,Ic as SCALAR_TEXT_CONTROLS,si as SiteGapDefaultReset,V as Slider,yi as Swatches,_c as TEXT_CONTROL_KINDS,E as TEXT_FIELD_MARKER,dc as TICKER_ITEMS_ROW,_l as TextListField,pl as ThemeFillRow,ae as WIDTH_LABEL,fi as WidthDefaultReset,Cl as aimAfterListChange,Va as anchorFields,M as backTo,ka as backgroundField,va as boxBlockSpacingField,Ga as boxColumnsFields,Za as boxFillField,ji as boxPhoneRowField,Ki as boxShareField,Da as boxSharePhoneField,Ha as boxShareTabletField,hl as boxThemeIndexOf,Ta as bucketHeader,La as buttonWordsEntryField,Ui as cardCornersField,Ii as cardImageBackgroundField,tn as cardImageField,Sc as cardImageFields,hc as cardMediaFields,Ba as cardShapeFields,gc as cardShowFields,mc as cardStyleFields,Ua as cellWidthFields,Ja as colorInput,la as containerDirectionField,ai as containerGapField,ci as containerGapPhoneField,ia as containerGapRows,ui as containerGapTabletField,wl as coordsResultTip,xa as copyText,Xt as cornerSidesField,He as cornersRowField,za as date,Ya as dateTime,Ea as designGroupHeader,bc as displayFields,tc as edgePad,Me as fillSlotChoices,uc as focusAfterRemove,Qa as focusKeptField,Ra as foldMarker,he as foldMetaOf,xi as foldTitleOf,nl as followedHeightPatch,ul as followedStickPatch,xc as galleryLayoutField,Xa as heightFields,ce as heightFollowedBy,tl as heightLayersAt,sa as heroGroupPlacementPoints,Ye as hidableText,Si as hintIsWhileTyping,wc as imageCornersField,ha as inOwnBox,Oa as isBucketHeader,$t as keptBy,ya as linkField,bl as loadingRowHint,lc as loadingShowsField,nc as multiSelect,qa as pageBackgroundField,Ia as panelNote,qi as phoneOverrideField,wa as plainText,Ca as plainTextarea,Oi as pxField,Na as quietMarker,Ve as readHidable,xl as rowText,oc as searchSelect,_i as sectionBandChoices,Pi as sectionCornersField,Fa as sectionShapeFields,Aa as sectionThemeFields,yl as setRowText,Ma as sizeField,rc as sourceField,Wa as spacingFields,ja as stickFields,Ka as swapPadding,ba as text,hn as textFieldIdentifier,ua as textFieldOffPage,pa as textFieldPanelOnly,pc as textList,fc as textListRowField,Sa as textarea,en as toggle,sc as upload,Ti as useSelectedPatch,N as useSelectedProps,F as useSelectedSibling,li as useSiteGapDetail,$a as widthField,fa as withIdentifier,ca as withOffPage,da as withPanelOnly,aa as withScaffold};
|
|
1
|
+
"use client";import{jsx as i,jsxs as k,Fragment as P}from"react/jsx-runtime";import{cloneElement as be,createContext as wn,useContext as Qe,useEffect as Sn,useId as et,useRef as J,useState as Z}from"react";import{useEasel as oe,useSelectedHost as v}from"efficient-easel/easel";import{PIN_LENGTH as re,toDateKey as Cn,fromDateKey as _n}from"efficient-shell/format";import{say as a,editorEaselWords as _}from"../../../format/lib/editor-words.js";import{finiteNumber as $}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as tt,firstFrameHint as yn,loadingShowsOf as xn,loadingStillHint as In}from"../../../format/lib/hero-video.js";import{pageFramesFor as On,usePageVideoFrames as Tn}from"../page-video-frames.js";import{ScreenDocumentContext as Rn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as nt,hidableText as ot}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as we,LINK_FIELD_MARKER as rt,MEDIA_FIELD_MARKER as it,SCAFFOLD_FIELD_MARKER as st,TEXT_FIELD_MARKER as E,foldMetaOf as Se,textFieldIdentifier as En}from"efficient-easel/draw";import Nn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as lt}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as kn,CARD_IMAGE_RADIUS_ROW as at,CARD_IMAGE_RADIUS_STEP as Pn,CORNER_RADIUS_MAX as Ce,CORNER_RADIUS_MIN as A}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as An,IMAGE_CORNERS_LABEL as Ln,IMAGE_CORNERS_ROW as Fn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as vn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Bn,GALLERY_LAYOUTS as ie,GALLERY_LAYOUT_KEYS as Dn,galleryChoices as ct,galleryLayoutRatio as Hn,galleryPictureCells as Gn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as Mn}from"./shell-glyph.js";import{anchorSiblingsOf as Wn,placementPoints as Un}from"../../../format/lib/hero-group-placement.js";import Kn from"../../components/AnchorField.js";import $n from"../../components/SourceStatus.js";import{AdjustIcon as Xn,EyeIcon as Vn,AnimationIcon as jn,BackgroundIcon as ut,BorderAllIcon as zn,BlockSectionIcon as Yn,ColumnWidthsIcon as _e,ColumnsIcon as dt,CornerIcon as pt,DirectionDownIcon as qn,DirectionLeftIcon as Jn,DirectionRightIcon as Zn,DirectionUpIcon as Qn,EditIcon as eo,GapIcon as to,GridIcon as no,GroundIcon as ye,HashIcon as oo,HeightIcon as ft,ImageIcon as ro,ListIcon as io,LocationIcon as ht,PaddingBottomIcon as mt,PaddingLeftIcon as gt,PaddingRightIcon as bt,PaddingTopIcon as xe,PageIcon as so,StickyIcon as wt,SearchIcon as lo,SquareIcon as ao,TypeIcon as co,WidthIcon as uo}from"efficient-easel/icons";import{FieldGlyph as St}from"../../components/FieldGlyph.js";import{resolvePageBackground as po}from"../../../format/lib/content/page-background.js";import{boxFillOf as fo,boxFillSlot as Ie}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as Ct,CORNER_SIDE_POINTS as ho,SECTION_CORNERS_ROW as _t,hasOwnSectionCorners as mo,normalizeCornerSides as yt}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as xt}from"../../../format/lib/content/card-corners.js";import{enclosingPath as go,enclosingSection as bo}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsDrill as wo,SettingsField as C,SettingsGroup as So,SettingsSegmented as Co,SettingsBorder as _o,SettingsSidesEach as yo,SettingsSwitch as Oe,borderSides as xo,borderStartEach as Io}from"efficient-easel/panel";import{ListField as Oo}from"efficient-easel/fields";import{DisplayChips as To}from"efficient-shell/ui";import{desktopDisplayChanged as Ro,partShownOnDesktop as Eo,partShownOnPhone as No,phoneDisplayChanged as ko,withDesktopPart as Po,withPhonePart as Ao}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as Lo,ColorSwatch as Fo,CornersInput as vo,DatePicker as Bo,DateTimePicker as Do,FOCAL_DEFAULT as Ho,IconPicker as It,COLUMN_COUNT_MAX as Ot,COLUMN_SHARE_MIN as Go,COLUMN_SHARES_EQUAL as Mo,resolveColumnShares as Tt,WidthsBar as Wo,useShellStrings as Uo,IconButton as Rt,InputNumber as Et,Slider as Ko,Tooltip as Te}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as $o}from"./geocode-resolve.js";import{ColourRow as se,InheritedColourRow as Nt}from"./ColourControl.js";import{fillThemeColors as Xo,slotFill as le}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as Re}from"../../../format/lib/document/part-inks.js";import{keptByRow as Ee}from"efficient-easel/screen/lib/document/style-fields";import kt from"./MarkupToolbar.js";import{deviceField as T}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as Vo,NoControlMark as jo,noControlField as Pt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as zo}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as Yo,PANEL_ONLY_FIELD as qo}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as Jo,resolvePhoneValue as Ne}from"../../../format/lib/document/phone-override.js";import{phoneKey as X,tabletKey as ke,viewKeyAt as Pe}from"efficient-easel/draw";import{viewKey as I}from"../../../format/lib/animation/views.js";import{viewRows as B}from"../animation/view-rows.js";import{SuppressibleText as Zo}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Qo,CARD_OUTLINE_OPTIONS as er,DEFAULT_CARD_INDEX_FORMAT as tr,DEFAULT_CARD_OUTLINE as nr}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as or,DEFAULT_COVER_INDEX as rr}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as ir}from"efficient-easel/draw";import sr from"../../components/MediaUploadField.js";import lr from"../../components/MultiSelectField.js";import ar from"../../components/SectionThemePicker.js";import cr from"../../components/SearchSelectField.js";import ur from"../../components/StorefrontLinkField.js";import{UiIcon as At}from"efficient-easel/draw/client";import{SECTION_PADDING as N}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as dr}from"../../../render/lib/content/button-look.js";import{usePreviewParts as pr}from"efficient-easel/draw/client";import{encodePartId as fr}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as hr,useEaselStrings as mr}from"efficient-easel/strings";import{hasPhoneHeight as gr,hasTabletHeight as Ae,resolveSectionMinHeight as br,resolveTabletHeight as wr}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as Sr,SECTION_PIN_ABOVE_HINT as Cr,SECTION_PIN_ABOVE_KEY as _r,SECTION_PIN_ABOVE_LABEL as yr,SECTION_PIN_GROUP as xr,SECTION_PIN_LABEL as Lt,SECTION_PIN_SCREENS_KEY as Le,SECTION_PIN_SCREENS_LABEL as Ft,SECTION_PIN_STOP_DEFAULT as Ir,SECTION_PIN_STOP_HINT as Or,SECTION_PIN_STOP_KEY as Tr,SECTION_PIN_STOP_LABEL as Rr,SECTION_PIN_STOP_OPTIONS as Er,SECTION_STICK_DISTANCE as D,SECTION_STICK_DISTANCE_ROW as Fe,SOME_VIEW_PINS as vt,hasPhoneStick as Nr,hasTabletStick as kr,resolveSectionStick as ae,sectionPinStopOf as Pr,sectionPinStopWrite as Ar}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as Lr}from"../../../format/lib/content/css-length.js";import{SECTION_MIN_HEIGHT as Fr,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as vr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as Br,resolveContainerDirection as Bt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Dr,BOX_BLOCK_SPACING_POINTS as Dt,BOX_PHONE_ROW_LABEL as Ht,BOX_COLUMNS_MAX as Hr,BOX_COLUMNS_MIN as Gt,BOX_PHONE_ROW_MAX as Gr,BOX_PHONE_ROW_MIN as ve,BOX_SHARE_CHOICES as Mt,BOX_SHARE_LABEL as V,boxShareChoiceOf as Wt,boxShareWidthsOf as Be,BOX_SHARE_PHONE_DEFAULT as Mr,BOX_SHARE_PHONE_POINTS as Wr}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as H}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Ut,BORDER_SIDES as Ur,SECTION_BORDER_ROW as Kt,borderBySide as $t}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as Kr,normalizeTheme as Xt,normalizeThemeColors as $r,sectionBandTone as Xr,surfaceTwoTone as Vr}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Vt,CONTAINER_GAP_BUILT_IN as jr,CONTAINER_GAP_PHONE as De,GAP_FIELD_CONTAINER as He,followsSitePhoneGap as zr,hasOwnContainerGap as Yr,hasOwnPhoneGap as Ge,resolveContainerGap as jt,resolvePhoneContainerGap as zt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as qr,CARD_IMAGE_BG_OFF as Jr,CARD_IMAGE_BG_SWATCH_NAMES as Zr,CARD_IMAGE_BG_SWATCHES as Qr,isCardImageBackgroundInheriting as ei,cardImageBackgroundChoice as ti,THEME_CARD_IMAGE_BG as ni}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as oi,SECTION_BG_NO_FILL as ri,sectionBackgroundChoice as ii,THEME_SECTION_BG as Me,isSectionBackgroundEmpty as si,sectionBackgroundHex as Yt}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as li,nestedAccentValue as qt,resolveSectionAccent as ce}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as ai,TYPE_SIZE_INHERIT as ci,isTypeSizeInheriting as ui}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as di,WIDTH_CHOICE_LABEL as pi,WIDTH_INHERIT as fi}from"../../../format/lib/content/section-width.js";import{useEaselSession as hi}from"efficient-easel/screen/lib/session-context";import{backendOf as mi}from"../website-session.js";import{BOX_GAP as gi,describedAs as L,group as R,iconOf as j,sharedStyleKinds as ee}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as Jt,onDesktopWords as G,phoneTwinFields as We,useLengthUnit as bi}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as wi,directionField as Si,gapField as Ue,iconPickerRow as Ci,lengthUnitFields as ue,pickerCellIcon as _i,pickerNoneIcon as yi,Segmented as Ke,select as z,slider as M}from"./box-fields.js";import{VIEW_ABOVE as $e}from"efficient-easel/screen/lib/content/length-units";import{tierOfView as Zt,viewOfTier as xi}from"../../../format/lib/content/view-tier.js";function Na({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function W(e,t){return a("{value} from {from}",{value:e,from:t})}function Ii(){const{blockGap:e}=H();return e===null?a("this container's own spacing"):W(`${e}px`,a("Styles"))}function Oi({inherited:e,onReset:t,label:n}){return i(y,{words:_()?.panel,label:a(n),changed:!e,detail:Ii(),onReset:t})}function Ti(e){return Ue({...gi,builtIn:jr[e],resolve:(t,n)=>jt(e,t,n?.siteGap),action:(t,n)=>i(Oi,{inherited:!Yr(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[He]:e}})}function Ri(e){return lt(T("mobile",{[He]:e,type:"custom",render:t=>i(ki,{container:e,...t})}),Qt)}function Ei(e){return lt(T("tablet",{[He]:e,type:"custom",render:t=>i(Ni,{container:e,...t})}),Qt)}const Qt={not:{field:"gap",in:Array.from({length:-Vt.min},(e,t)=>Vt.min+t)}};function ka(e){return{gap:T("desktop",Ti(e)),[ke("gap")]:Ei(e),[X("gap")]:Ri(e)}}function Ni({container:e,...t}){const[n]=F("gap"),{siteGap:o}=t.field??{},r=Math.max(De.min,jt(e,n,o));return Ue({...De,builtIn:r,resolve:l=>Ge(l)?l:r,action:(l,c)=>i(y,{words:_()?.panel,label:a("Gap"),changed:Ge(l),detail:G(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function ki({container:e,...t}){const[n]=F("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=zt(e,void 0,n,o,r);return Ue({...De,builtIn:s,resolve:c=>zt(e,c,n,o,r),action:(c,u)=>i(y,{words:_()?.panel,label:a("Gap"),changed:Ge(c),detail:W(`${s}px`,zr(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function Pa(e){return Si({offered:Br(e),fallback:Bt(e,void 0),resolve:t=>Bt(e,t)})}function Aa(e,t){return Un(t?Wn(e,t):[],t)}function Pi({inherited:e,onReset:t,label:n}){return i(y,{words:_()?.panel,label:a(n),changed:!e,detail:W(a("Full"),a("the page")),onReset:t})}function U({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:l=!0,markup:c=!0}){const{text:u,hidden:p}=nt(e),h=J(null),d=J(null),f=x=>t(l?{text:x,hidden:p}:x),m=()=>t({text:u,hidden:!p}),g=l&&p,b=et(),S=r?Bi(r)?i("span",{className:"sf-hint-while-typing",children:a(r)}):a(r):void 0,w=p?a("Show {label} on the slide",{label:a(n)}):a("Hide {label} on the slide",{label:a(n)});return i(C,{label:a(n),icon:i(co,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:S,action:l?i(Te,{content:w,children:i(Rt,{"aria-pressed":p,"aria-label":w,onClick:m,children:p?i(At,{name:"eye-off",size:14}):i(At,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[c&&i(kt,{target:s?d:h,value:u,onChange:f}),s?i("textarea",{id:b,ref:d,value:u,placeholder:o===void 0?void 0:a(o),onChange:x=>f(x.target.value)}):i("input",{id:b,ref:h,type:"text",value:u,placeholder:o===void 0?void 0:a(o),onChange:x=>f(x.target.value)})]})})}function La(e,t){return{...e,[st]:t}}function Fa(e){const t=e[E];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[E]:{...t,offPage:!0}}}function va(e){return!e||typeof e!="object"?!1:e[E]?.offPage===!0}function Ba(e){if(!e[E])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[qo]:!0}}function Da(e){return Yo(e)}function Ha(e){const t=e[E];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[E]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as zc,SCALAR_TEXT_CONTROLS as Yc}from"efficient-easel/draw";function Ga(e,t){if(!e[E])throw new Error("inOwnBox: the field holds no authored text");const{[Vo]:o,...r}=e;return{...r,[zo]:!0,render:t}}const Ai=new Set(ir),de={type:"radio",options:[{value:!0},{value:!1}]},en={text:{type:"object",objectFields:{text:{type:"text"},hidden:de}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:de}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},K=(e,t)=>{const n=L({...t,[E]:e},{...en[e.control],label:e.label});if(!Ai.has(e.control))return n;const o=t.render;return{...Pt(n,"authored-copy"),render:r=>i(Zo,{name:r.name,children:o(r)})}},Ma="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Li={field:"source.slug",set:!0},Wa={not:Li},Fi="Select a word, then press the highlighter.",vi=new Set([Fi]),Bi=e=>vi.has(e);function Ua(e,t,n){return K({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Ka(e,t,n){return K({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function $a(e,t,n){return K({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Xa(e,t,n){return K({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Va(e){return{type:"custom",[rt]:{label:e},...L({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(ur,{value:ot(t),onChange:n,label:e})}}function ja(e,t,n){return K({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const za={Design:Xn,Animation:jn};function Ya(e){return{type:"custom",render:()=>i(Di,{text:e})}}function Di({text:e}){return i("p",{className:"sf-note",children:a(e)})}function qa(e){return Se(e)!==null&&e?.tabs!==void 0}const tn=new Map;function Ja(e,t){const n=`${e}\0${t?t.join(""):""}`,o=tn.get(n)??{type:"custom",tabs:t,[we]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(P,{})};return tn.set(n,o),o}const nn=new Map;function Za(e){const t=nn.get(e)??{type:"custom",[we]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(P,{})};return nn.set(e,t),t}function Hi(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Qa(e,t){return Hi(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(P,{})}}function ec(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(P,{})}}function tc({title:e,children:t}){const[n,o]=Z(()=>!Xe.has(e));return i(So,{title:e,open:n,onToggle:r=>{o(r),r?Xe.delete(e):Xe.add(e)},children:t})}const Xe=new Set;function Gi({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(Te,{content:u,children:i(Fo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:l})]})}function nc(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(Mi,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function Mi({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:Vr(l),band:Xr(l)},p=n?Me:t,h=si(s,t,p),d=Yt(void 0,p,u),f=n?oi:void 0,m=p===Me?a("the theme's section background"):a("Theme {n} background",{n:c}),g=Wi(s,t,l,c,u,r),b=W(d.toUpperCase(),m),S=Re(s),w=S?le(S,l,c):null;return w?i(se,{label:a(e),icon:i(ut,{}),value:w.hex,caption:w.words,onChange:r,changed:!0,onReset:()=>r(f),resetTo:b,choices:g}):i(Nt,{label:a(e),icon:i(ut,{}),value:h?"":Yt(s,t,u),inherited:d,resetTo:b,onChange:r,onReset:()=>r(f),choices:g})}function Wi(e,t,n,o,r,s){const l=ii(e,t);return[{label:a("No fill"),color:"",selected:l==="none",onPick:()=>s(ri)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:l==="band",onPick:()=>s(Me)},...Ye(Re(e)??"",n,o,s)]}function Ui(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=ei(r,t);return i(C,{label:a(e),icon:i(ye,{}),changed:!s,action:i(y,{words:_()?.panel,label:a(e),changed:!s,detail:a("the theme's image stage"),onReset:()=>o(qr)}),children:Gi({swatches:Qr,current:s?ni:ti(r,t),onPick:o,names:Zr})})}}}function oc(e=n=>n,t){return ee({_gSectionTheme:R(li),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(ar,{value:e(n),onChange:o,followLabel:t})}})}function pe(e){const t=O(),n=Zt(e?.view),o=l=>Pe(e.valueKey,l),r=e.numbersIn??(l=>$(t[o(l)])!==void 0),s=e.followsView??os(n,r);return bi({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:wi,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 Y({min:e,max:t,step:n,value:o,onChange:r,suffix:s="",readout:l=!0,notch:c,ariaLabel:u,disabled:p=!1,placeholder:h,placeholderWord:d,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(Ko,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...d?{emptyLabel:a(d)}:{},suffix:s||void 0,...m?{units:m}:{},showInput:l,label:u===void 0?void 0:a(u),disabled:p,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:b=>{b===null?f?.():b!==o&&r(b)}})})}function Ki(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:l,restTrack:c,unsetMark:u,icon:p,unit:h="px"}=t;return{type:"custom",render:({value:d,onChange:f})=>{const m=typeof d=="number"?d:null,g=m===null;return i(C,{label:a(e),icon:p?j(p):void 0,value:g?u||s===void 0?void 0:a(s):`${m}${h}`,changed:!g,action:u?be(u,{changed:!g,onReset:()=>f(null)}):i(y,{words:_()?.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}):Y({min:n,max:o,step:r,value:m??n,readout:!1,ariaLabel:e,onChange:f})})}}}const te="Corners",$i={kind:"radius"};function Ve(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(C,{label:a(te),icon:i(pt,{}),changed:s,action:be(e.mark,{changed:s,onReset:()=>o(null)}),hint:e.hint,children:i(Xi,{tier:e,px:r,name:t.name,onRadius:o})})}}}function F(e){const t=v();return[t?.values?.[e],n=>t?.onChange(e,n)]}function on(){return Pt({type:"custom",render:()=>i(jo,{})},"always")}function fe(){const e=v();return t=>e?.onChangeMany(t)}function Xi({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[s,l]=F(e.sidesKey),c=fe(),u=pe({row:e.row??$i,label:te,grid:{min:A,max:Ce,step:e.step??1},valueKey:n??"",view:"desktop"}),p=yt(s)??[...Ct];return i(vo,{label:a(te),value:p,corners:ho,onChange:h=>{const d=yt(h)??[];l(d.length===Ct.length?null:d)},radius:t,onRadiusChange:u&&n?h=>c({[n]:h,...u.unitPatch(h===null)}):o,radiusMin:u?.grid.min??A,radiusMax:u?.grid.max??Ce,radiusStep:u?.grid.step??e.step??1,radiusPlaceholder:u&&u.unit!=="px"?"–":String(r),...u?{radiusUnit:u.unit,units:u.units}:{}})}function rn(e,t){return ue(e,t)}function sn(){return on()}function Vi({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=H(),r=typeof o=="number"?`${o}px`:a("not set");return i(y,{words:_()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):W(r,a("Styles")),onReset:n})}function ji(){const{cornerRadiusPx:e}=H();return typeof e=="number"?e:A}function zi(){return Ve({sidesKey:"sectionCornerSides",row:_t,useFollowed:ji,mark:i(Vi,{label:te}),hint:Yi})}const Yi="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function rc(){return ee({_gShape:R("Shape"),sectionCorners:zi(),...rn(_t,"sectionCorners"),sectionCornerSides:sn(),...B("sectionBorder",ns),...ue(Kt,"sectionBorder",{tablet:!0,phone:!0})})}const qi=()=>({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 Ji(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Zi(){let e;try{const t=Xt(H().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Kr.line}function Qi({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:{},[p,h]=Z(()=>r?Io(u,l):!1),d=qi(),f=m=>Ji(r&&s?m:{width:m.width,color:m.color,...s?{style:m.style}:{}});return i(C,{label:a("Border"),icon:i(zn,{}),action:r?i(yo,{each:p,label:a("Each side"),onChange:h}):void 0,children:i(_o,{label:a("Border"),value:u,each:p,onChange:m=>t(f(m)),placeholder:n,presets:o,words:c?{...d,unit:c.unit}:d,styles:s,max:c?.grid.max??Ut,...c?{step:c.grid.step,units:c.units}:{}})})}function es({value:e,onChange:t,view:n}){const[o]=F("sectionBorder"),[r]=F(ke("sectionBorder")),s=Zi(),l=f=>f&&typeof f=="object"?f:{},c=n==="phone"?{...$t(l(o)),...$t(l(r))}:n==="tablet"?l(o):{},u=O(),p=fe(),h=I("sectionBorder",n),d=pe({row:Kt,label:"Border",grid:{min:0,max:Ut,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>je(u[Pe("sectionBorder",f)]),convertTo:f=>{const m=l(u[h]);return je(m)?{[h]:ts(m,f)}:{}}});return i(Qi,{value:e,length:d,onChange:d?f=>p({[h]:f,...d.unitPatch(!je(f))}):t,placeholder:{sides:xo(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}const ln=["width",...Ur];function je(e){if(!e||typeof e!="object")return!1;const t=e;return ln.some(n=>$(t[n])!==void 0)}function ts(e,t){const n={...e};for(const o of ln){const r=$(n[o]);r!==void 0&&(n[o]=t(r))}return n}function ns(e){return{type:"custom",render:({value:t,onChange:n})=>i(es,{value:t,onChange:n,view:e})}}function os(e,t){let n=$e[e];for(;n&&$e[n]!==null&&!t(n);)n=$e[n];return n??e}function ic(e){return{type:"custom",render:()=>i(rs,{partKey:e})}}function rs({partKey:e}){const[t]=F("id"),[n]=F("_partStyles"),{textStyles:o}=H(),r=mr();let s=null;try{s=pr().select}catch{s=null}const l=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(wo,{name:a("Text"),preview:dr(l,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??hr.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(fr(t,e))}})}function an(e){const{cornerRadiusPx:t}=H(),n=typeof t=="number"?t:e;let o=null;try{const{appState:s,selectedItem:l}=oe(u=>u),c=l?.props?.id?String(l.props.id):void 0;o=c?bo(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return mo(r)?r:n}function is({label:e,changed:t=!1,onReset:n=()=>{}}){const o=an(A);return i(y,{words:_()?.panel,label:a(e),changed:t,detail:W(`${o}px`,a("the section")),onReset:n})}function ss(){return i(P,{children:a("Follows the section's Corners until you set a number here.")})}function ls(){return Ve({sidesKey:"cardCornerSides",row:xt,useFollowed:()=>an(A),mark:i(is,{label:te}),hint:i(ss,{})})}function as(){return{type:"custom",render:()=>i(Nn,{})}}function sc(){return{_gShape:R("Shape"),cardCorners:ls(),...rn(xt,"cardCorners"),cardCornerSides:sn(),cardCornersApplyAll:as()}}function cs(){return L({type:"custom",render:e=>i(ds,{...e})},{type:"select",label:V,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 us(e,t){const n=Wt(e);if(n!=="custom")return a(Mt.find(r=>r.value===n)?.label??"");const o=Tt(Be(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):a("Custom")}function ds(e){const{value:t,onChange:n}=e,[o]=F("content"),r=Array.isArray(o)?o.length:0,s="follows"in e,l=t!=null,c=l?t:s?e.follows:void 0,u=Wt(c),p=r>=2&&r<=Ot,h=()=>[...Mo[r]??[]],d=J(null),f=w=>{const x=d.current;x&&JSON.stringify(w)===JSON.stringify(x.shares)?n(x.value):w&&n(w)},m=w=>{w===u||w==="custom"&&!p||n(w==="custom"?h():w)},g=a("The width bar works for 2 to {count} blocks.",{count:Ot}),b=l&&(s||t!=="content"),S=Uo().widths.hint(r,Go);return i(C,{label:a(V),icon:i(_e,{}),changed:b,hint:u!=="custom"?void 0:p?S:g,action:i(y,{words:_()?.panel,label:a(V),changed:b,disabled:e.readOnly===!0,detail:s?G(w=>a(w),us(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(It,{label:a(V),value:u,options:Mt.map(w=>({value:w.value,label:w.value==="custom"&&!p?g:a(w.label),icon:_i(i("span",{className:"sf-gallery-pic sf-share-pic",children:cn(w.weights).map((x,q)=>i("i",{style:{gridColumn:`span ${x}`}},q))}),a(w.label),w.value==="custom"&&!p?g:a(w.label))})),onChange:m,columns:3,cell:un,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&p?i("div",{onFocus:()=>{d.current={value:t,shares:Tt(Be(c,r),r)}},onBlur:()=>{d.current=null},children:i(Wo,{label:a(V),count:r,value:Be(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function cn(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 lc(){return z(Dr,i(to,{}),Dt,Dt[0].value)}function ac(){return T("mobile",Ci(V,i(_e,{}),Wr.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:cn(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),Mr,{columns:2,cell:un}))}const un={width:"5.75rem",height:"3.25rem"};function cc(){return We("share",cs(),Jt)[ke("share")]}function ps(){return T("mobile",M(Ht,i(dt,{}),ve,Gr,1,ve,"",{clear:{phoneFollows:!1,hint:ve}}))}const dn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function uc(){const e=M(Ht,i(dt,{}),Gt,Hr,1,Gt,"",{clear:{emptyLabel:"Auto"}}),t=We("columns",e,{...dn,tablet:Jt.tablet}),n=We("columns",e,dn,{phoneRow:ps()});return{...t,phoneRow:n.phoneRow}}function dc(e,t,n,o,r,s,l){return{type:"custom",render:({value:c,onChange:u,name:p})=>i(fs,{label:e,min:t,max:n,step:o,fallback:r,role:s,value:c,onChange:u,name:p??"",length:l})}}function fs({label:e,min:t,max:n,step:o,fallback:r,role:s,value:l,onChange:c,name:u,length:p}){const h=O(),d=fe(),f=Zt(p?.view),m=pe({row:p?.row??{kind:"fontSize"},label:e,grid:{min:t,max:n,step:o},valueKey:p?u:"",view:p?.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?d({[u]:b,...m.unitPatch(typeof b!="number")}):c(b);return i(C,{label:a(e),icon:i(St,{noun:s}),action:i(y,{words:_()?.panel,label:a(e),changed:!ui(l),detail:a("the Text style in Styles"),onReset:()=>g(ci),defaultAction:{onPress:()=>g(ai),title:a("Keep this section's own built-in size"),icon:i(Yn,{})}}),children:Y({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 pc(){return{_gCellWidth:R("Cell width"),gridSpan:z("Positions",i(_e,{}),[{label:"Auto",value:""},...Array.from({length:vn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function O(){let e=null,t=null;try{e=Qe(hs),t=oe(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const hs=wn(null);function ms({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:l,fallback:c}){const u=O()[l],p=Ne(void 0,u,c);return i(P,{children:Y({min:e,max:t,step:n,value:Ne(o,u,c),readout:!1,ariaLabel:r,notch:p,onChange:s})})}function gs({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const l=O()[t],c=Ne(void 0,l,n);return i(y,{words:_()?.panel,label:a(e),changed:r,detail:G(u=>a(u),`${c}${o}`),onReset:s})}function bs(e){return Ki(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(gs,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(ms,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const ws={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Ss={Top:xe,Bottom:mt,Left:gt,Right:bt},Cs=e=>{const t=Ss[e];return i(t,{})};function fc(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>ws[S],s=S=>M(r("Top"),i(xe,{}),N.min,N.max,N.step,S,"px"),l=(S,w,x,q=N)=>T("mobile",bs({label:r(S),icon:Cs(S),desktopKey:w,min:q.min,max:q.max,step:q.step,fallback:x})),c=e.top??N.min,u=e.bottom??N.min,p="sectionPaddingLeft",h="sectionPaddingRight",d=e.sideBounds??N,f=e.side??d.min,m=e.sidePhone??f,g=e.phone===!0,b=S=>g?T("desktop",S):S;return ee({...o?{_gSpacing:R("Padding")}:{},[t]:b(s(c)),...g?{[X(t)]:l("Top",t,c)}:{},...e.only==="top"?{}:{[n]:b(M(r("Bottom"),i(mt,{}),N.min,N.max,N.step,u,"px")),...g?{[X(n)]:l("Bottom",n,u)}:{}},...e.sides?{[p]:b(M(r("Left"),i(gt,{}),d.min,d.max,d.step,f,"px")),...g?{[X(p)]:l("Left",p,m,d)}:{},[h]:b(M(r("Right"),i(bt,{}),d.min,d.max,d.step,f,"px")),...g?{[X(h)]:l("Right",h,m,d)}:{}}:{}})}function hc(e,t){const n=Object.fromEntries(Object.entries(t).map(([s,l])=>[s,s in e&&Se(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 he="Width";function mc(e,t=di,n=!0){const o=t.map(r=>({label:pi[r],value:r}));return ee({...n?{_gWidth:R(he)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(C,{label:a(he),icon:i(uo,{}),action:n?i(Pi,{inherited:s?.inherited??!1,onReset:()=>r(fi),label:he}):void 0,children:Ke({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:he})})}})}function gc(){const e=(o,r)=>({type:"custom",render:({value:s,onChange:l})=>i(_s,{value:s,onChange:l,view:o,badge:r})}),t=()=>Ee("sectionHeightMode"),n=()=>Ee("sectionHeightMode");return ee({_gHeight:R(Q),...B("sectionHeightMode",o=>o==="desktop"?e(o):e(o,r=>i(Os,{view:o,onClear:()=>r(void 0)}))),...B("sectionHeightValue",t),...B("sectionHeightUnit",n)})}function _s({value:e,onChange:t,view:n,badge:o}){const r=O(),{mode:s,number:l,unit:c}=ys(n,r,e);return i(C,{label:Q,icon:j(i(ft,{})),action:o?o(t):void 0,children:k("div",{className:"es-width-stack",children:[Ke({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:s,onChange:t,ariaLabel:Q}),l?i(Is,{view:n,mode:s,menu:c}):null]})})}function pn(e,t){return e==="phone"&&Ae(t)?wr(t):br(t)}function me(e,t){return e==="desktop"||(e==="tablet"?Ae(t):gr(t))?null:pn(e,t)}function ys(e,t,n){const r=(s=>["auto","fixed","screen"].includes(s))(n)?n:me(e,t)?.mode??"auto";return{mode:r,number:r!=="auto",unit:r==="fixed"}}function xs(e,t,n,o){const r=me(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[I("sectionHeightMode",e)]:r.mode,...r.mode==="fixed"?{[I("sectionHeightUnit",e)]:r.unit}:{},...n==="sectionHeightUnit"?{[I("sectionHeightValue",e)]:r.value}:{},[I(n,e)]:o}}function fn(e,t,n){const o=v(),r=me(e,O());return!o||!r?{followed:null,write:n}:{followed:r,write:l=>o.onChangeMany(c=>{const u=xs(e,c,t,l);return u===null?{[I(t,e)]:l}:Object.keys(u).length?u:null})}}function Is({view:e,mode:t,menu:n}){const o=v(),r=O(),s=I("sectionHeightValue",e),l=I("sectionHeightUnit",e),c=S=>w=>o?.onChangeMany(()=>({[S]:w})),{followed:u,write:p}=fn(e,"sectionHeightValue",c(s)),{write:h}=fn(e,"sectionHeightUnit",c(l)),d=t==="screen"?"%":r[l],f=(u?u.unit:d)==="%"?"%":"px",m=f==="%"?vr:Fr,g=r[s],b=n?{options:["px","%"],label:a("Unit"),onChange:S=>h(S)}:void 0;return Y({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:p})}function Os({view:e,onClear:t}){const n=O(),o=me(e,n)===null,r=e==="phone"&&Ae(n),s=pn(e,n),l=G(c=>a(c),s.mode==="auto"?a("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return i(y,{words:_()?.panel,label:a(Q),changed:o,detail:l,onReset:t})}function bc(e={}){const t=e.intro===!0,n=s=>({type:"custom",render:({value:l,onChange:c,id:u,name:p})=>i(As,{value:l,onChange:c,labelId:`${u??p??"stickTop"}-label`,view:s,intro:t})}),o=s=>({type:"custom",render:({value:l,onChange:c})=>i(Ns,{value:l,onChange:c,view:s,intro:t})}),r=s=>({type:"custom",render:({value:l,onChange:c})=>i(ks,{value:l,onChange:c,view:s,intro:t})});return{_gStick:R(xr,{dot:t?Es:vt}),...B("stickTop",n),...B("stickTopDistance",o),...ue(Fe,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?B(Le,r):{},...t?{}:{[Tr]:Ts()},...t||e.above===!1?{}:{[_r]:Rs()}}}function Ts(){const e=z(Rr,i(xe,{}),Er,Ir);return T("desktop",{...e,render:t=>{const n=e.render({...t,value:Pr(t.value),onChange:o=>t.onChange(Ar(o))});return be(n,{hint:a(Or)})}})}function Rs(){const e=gn(yr,!1,i(wt,{}),Cr);return T("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const Es={any:[vt,Sr]};function hn(e,t,n,o,r){const s=v(),l=O(),c=e==="desktop"||ne(e,l)?null:ze(e,ae(l,{intro:o}));return{followed:c,write:(c||r)&&s?p=>s.onChangeMany(h=>{const d=Ps(e,h,p,t,o),f=d===null?{[I(t,e)]:p}:d;return Object.keys(f).length?{...f,...r?.(p)??{}}:null}):n}}function Ns({value:e,onChange:t,view:n,intro:o}){const r=O(),s=ae(r,{intro:o}),l=h=>{const d=xi(h);return d==="desktop"||ne(d,r)},c=pe({row:Fe,label:"Distance from top",grid:{min:D.min,max:D.max,step:D.step},valueKey:"stickTopDistance",view:n,numbersIn:h=>l(h)&&$(r[Pe("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&s.ownTablet?"tablet":"desktop"}),{followed:u,write:p}=hn(n,"stickTopDistance",t,o,c?h=>c.unitPatch(h===void 0):void 0);return i("div",{className:"sf-field",children:Y({min:c?.grid.min??D.min,max:c?.grid.max??D.max,step:c?.grid.step??D.step,value:u?null:typeof e=="number"?e:D.fallback,...u?{placeholder:u.distance}:{},...c?{suffix:c.unit,units:c.units}:{suffix:"px"},ariaLabel:a("Distance from top"),onChange:p})})}function ks({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:s}=hn(n,Le,t,o);return i(C,{label:a(Ft),icon:j(i(ft,{})),children:Y({min:re.min,max:re.max,step:re.step,value:r?null:$(e)??re.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Ft),onChange:s})})}function ne(e,t){return e==="tablet"?kr(t):Nr(t)}function ze(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,unit:t.tabletUnit,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,unit:t.desktopUnit,screens:t.desktopScreens}}function Ps(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ne(e,t))return null;if(n===void 0)return{};const s=ze(e,ae(t,{intro:r})),l=e==="phone"&&ne("tablet",t)?h=>I(h,"tablet"):h=>h,c=(h,d)=>t[l(h)]==null?{}:{[I(h,e)]:d},u=Fe.unitKey,p=t[l(u)]==null?{}:{[I(u,e)]:s.unit};return{[I("stickTop",e)]:!0,...c("stickTopDistance",s.distance),...p,...c(Le,s.screens),[I(o,e)]:n}}function As({value:e,onChange:t,labelId:n,view:o,intro:r}){const s=O(),l=ae(s,{intro:r}),c=o==="phone"?l.phone:o==="tablet"?l.tablet:r?l.desktop:e===!0,u=o==="phone"&&l.ownTablet,p=o==="desktop"?null:ze(o,l),h=p?.on?Lr(p.distance,p.unit):a("Off");return i(C,{label:a(Lt),labelId:n,icon:j(i(wt,{})),action:k(P,{children:[o!=="desktop"?i(y,{words:_()?.panel,label:a(Lt),changed:ne(o,s),detail:G(d=>a(d),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(Oe,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const mn="e.g. about";function wc(){return{_gAnchor:R("Anchor"),anchor:K({control:"plainText",label:"Name",placeholder:mn},{type:"custom",render:({value:e,onChange:t})=>i(Kn,{value:e,onChange:t,nameBox:(n,o)=>i(U,{value:n,onChange:o,label:"Name",placeholder:mn,hideable:!1,markup:!1})})})}}function Sc(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(C,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(Do,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:p=>r(p?p.toISOString():"")})})}}}function Cc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-date`;return i(C,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(Bo,{id:c,value:_n(typeof o=="string"?o:null),onChange:u=>r(u?Cn(u):"")})})}}}function gn(e,t,n,o){return{type:"custom",...L({},{...de,label:e}),render:r=>{const{value:s,onChange:l,id:c,name:u}=r,p="follows"in r,h=r,d=typeof s=="boolean",f=typeof h.follows=="boolean"?h.follows:t,m=d?s:p?f:t,g=`${c??u??e}-label`,b=h.readOnly===!0,S=i(Oe,{checked:m,onChange:l,disabled:b,ariaLabelledBy:g});return i(C,{label:a(e),labelId:g,icon:n,hint:o===void 0?void 0:a(o),action:p?k(P,{children:[i(y,{words:_()?.panel,label:a(e),changed:d,detail:h.followsNoView?a(f?"On":"Off"):G(w=>a(w),a(f?"On":"Off"),h.followsView),disabled:b,onReset:()=>l(void 0)}),S]}):S})}}}function _c(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(Ls,{label:"Background",icon:i(so,{}),id:r,value:e,shown:po(e),onChange:t})}}}function yc(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(se,{label:a(e),icon:n,value:o||t,onChange:r})}}function Ls({label:e,icon:t,id:n,value:o,shown:r,onChange:s}){const{colors:l,n:c}=qe(),u=Re(o),p=u?le(u,l,c):null;return i(se,{label:a(e),icon:t,id:n,value:p?p.hex:r,caption:p?.words,onChange:s,choices:Ye(u??"",l,c,s)})}function xc(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(Fs,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Ye(e,t,n,o){const r=Ie(e);return Xo(t,n).map(s=>({label:s.label,color:s.value,selected:r===s.name,onPick:()=>o(s.name)}))}function Fs({value:e,onChange:t,twin:n}){const{colors:o,n:r}=qe(),s=o.background,l=W(s.toUpperCase(),a("Theme {n} background",{n:r})),c=Ie(e),u=c?le(c,o,r):null,p=Ye(e,o,r,t),h=n?()=>t(void 0):()=>t("");let d=s,f=l;if(n){const m=Ie(n.follows),g=fo(n.follows),b=m?le(m,o,r):g?{hex:g,words:g.toUpperCase()}:null;d=b?.hex??s,f=G(S=>a(S),b?b.words:l,n.view)}return u?i(se,{label:a("Fill"),icon:i(ye,{}),value:u.hex,caption:u.words,onChange:t,changed:!0,onReset:h,resetTo:f,choices:p}):i(Nt,{label:a("Fill"),icon:i(ye,{}),value:e,inherited:d,resetTo:f,onChange:t,onReset:h,choices:p})}function vs(e,t,n){if((e?.content??[]).some(l=>l?.props?.id===t))return ce(n);const r=go(e,t);if(r.length===0)return null;const s=ce(qt(n));if(s!==null)return s;for(let l=r.length-1;l>0;l-=1){const c=ce(qt(r[l].sectionAccent));if(c!==null)return c}return ce(r[0].sectionAccent)}function qe(){const e=Xt(H().theme),[t]=F("sectionAccent");let n=null;try{const{appState:r,selectedItem:s}=oe(c=>c),l=s?.props?.id?String(s.props.id):void 0;n=l?vs(r?.data,l,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:$r(e.themes[o]),n:o+1}}const Bs=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function Ds({label:e,value:t,onChange:n,points:o=Bs}){const r=o.map(s=>({...s,label:a(s.label),...s.title?{title:a(s.title)}:null}));return i(Lo,{label:a(e),value:t,points:r,onChange:n})}function Ic(){return on()}const Oc={top:i(Qn,{}),right:i(Zn,{}),bottom:i(qn,{}),left:i(Jn,{})};function Tc(e,t,n,o,r,s,l){const c=d=>t.find(f=>f.value===d),u=d=>({value:d,label:"",disabled:!0,title:o}),p=d=>{const f=t.find(g=>g.cell===d);if(!f)return u(`missing-${d}`);const m=s?.[d];return m?{value:f.value,label:f.label,icon:m}:{value:f.value,label:f.label}},h=[u("corner-top-left"),p("top"),u("corner-top-right"),p("left"),u("centre"),p("right"),u("corner-bottom-left"),p("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:d,onChange:f})=>{const m=t.some(g=>g.value===d)?d:n;return i(C,{label:a(e),icon:r,value:c(m)?.label?a(c(m).label):l?a(l):"",children:Ds({label:e,value:m,onChange:f,points:h})})}}}function Rc(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:s})=>i(lr,{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 Ec(e,t,n,o){return{type:"custom",options:t,fallback:n,...L({},{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 Nc(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const kc=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Pc(e,t,n){const o=Object.keys(tt).map(r=>({label:tt[r],value:r,picture:n[r]}));return{type:"custom",...L({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(Gs,{label:e,icon:t,options:o,onChange:r})}}function Hs(e,t,n){const o=yn(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=In(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 Gs({label:e,icon:t,options:n,onChange:o}){const r=v(),s=r?.values??{},l=xn(s),c=Qe(Rn),u=Tn(c?.docId??null);let p=null;try{p=oe(d=>d.appState.data)}catch{p=null}const h=On(r?.id,p,u);return i(C,{label:a(e),icon:j(t),hint:Hs(s,h,c?.hasUnsavedEdits??!1),children:Ke({options:n,value:l,onChange:o,ariaLabel:e})})}function Ac(e,t,n,o={}){const r={type:"custom",[it]:!0,render:({value:s,onChange:l,name:c})=>i(sr,{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?T("each",r):r}const Lc={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Ms(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 Fc({value:e,onChange:t,label:n}){const o=e||{},r=v(),s=r?r.values!==r.node.props:!0,l=!!o.pending&&s,c=!!o.pending&&!s,u=!!mi(hi()).geocode,p=et(),h=(d,f)=>t({...o,[d]:f??void 0});return k(P,{children:[i(C,{label:a(n),icon:i(ht,{}),action:u?i(Te,{content:a("Find from the address (OpenStreetMap)"),children:i(Rt,{"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(lo,{})})}):void 0,children:u&&o.status?i($n,{compact:!0,oneLine:!0,spaced:!1,status:l?"busy":o.ok&&!c?"found":"notfound",statusText:l?a("Finding…"):c?a($o):a(o.status),hint:Ms(o)}):null}),i(C,{label:a("Enter by hand"),labelId:p,icon:i(eo,{}),action:i(Oe,{checked:!!o.manual,onChange:d=>t({...o,manual:d}),ariaLabelledBy:p})}),o.manual&&i(C,{label:a("Latitude, longitude"),icon:i(ht,{}),children:k("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(Et,{value:typeof o.lat=="number"?o.lat:null,onChange:d=>h("lat",d),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(Et,{value:typeof o.lng=="number"?o.lng:null,onChange:d=>h("lng",d),min:-180,max:180,step:1e-4,placeholder:a("Longitude")})]})})]})}function Ws(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Us(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 vc(e,t){return e===null?null:t>e?e:null}function Ks(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 Bc={label:"Ticker items",icon:i(io,{})};function Dc(e,t,n,o){return{type:"custom",[E]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...L({},{...en.textList,label:e}),render:({value:r,onChange:s})=>i($s,{label:e,icon:j(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function $s({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const l=J(null),[c,u]=Z(null),p=d=>d.map(f=>({text:f?.text??""})),h=d=>{const f=Ks(n,d,c);f===null&&(l.current=null),u(f),r(p(d))};return i(Oo,{label:a(e),icon:t,noun:a("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?i(kt,{target:l,value:Ws(n,c),onChange:d=>r(Us(n,c??-1,d)),disabled:c===null,label:c===null?a("Formatting — click a row first"):a("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(d,f,m)=>i("input",{type:"text",className:s&&c===f?"sf-list-marking":void 0,value:d?.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 Hc(e,t){const n=`${e.label} — row ${t+1}`;return K({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(U,{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 Gc(e){return{_gCards:R("Cards"),coverIndex:z("Cover image",i(ro,{}),or,String(rr),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:Ui("Image background",Jr),cardImage:bn()}}function Mc(){return{outline:z("Card outline",i(ao,{}),er,nr),indexBadge:z("Card number",i(oo,{}),Qo,tr),showBadge:gn("Product badge",!0,i(St,{noun:"tag"}))}}function Wc(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...de,label:ge.find(s=>s.id===r).label}),o=r=>L(Ee(Je),n(r));return{_gShowOnCard:R("Show on a card"),[Je]:L({type:"custom",render:()=>i(Xs,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(Je)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const Je="showCardPrice",ge=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function Xs({rest:e}){const t=O(),n=fe(),o=l=>typeof t[l]=="boolean"?t[l]:void 0,r=l=>o(l)??e[l],s=ge.some(({id:l})=>o(l)!==void 0&&o(l)!==e[l]);return i(Ze,{parts:ge,changed:s,shown:r,onPress:(l,c)=>n({[l]:c}),onReset:()=>n(Object.fromEntries(ge.map(({id:l})=>[l,void 0])))})}function Uc(e,t="display"){const n=X(t);return{[t]:T("desktop",{type:"custom",render:({value:o,onChange:r})=>i(Ze,{parts:e,changed:Ro(o),shown:s=>Eo(o,s),onPress:(s,l)=>r(Po(o,s,l)),onReset:()=>r(void 0)})}),[n]:T("mobile",{type:"custom",render:({value:o,onChange:r})=>i(Vs,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Ze({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:l}){const c=a("Display");return i(C,{label:c,icon:i(Vn,{}),changed:t,action:i(y,{words:_()?.panel,label:c,changed:t,detail:s,onReset:r}),children:i(To,{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 Vs({parts:e,desktopKey:t,value:n,onChange:o}){const r=O()[t];return i(Ze,{parts:e,changed:ko(n),shown:s=>No(r,n,s),onPress:(s,l)=>o(Ao(n,s,l)),onReset:()=>o(Jo),detail:a("the same as Desktop")})}function bn(e=kn){return M("Card image",i(pt,{}),A,Ce,Pn,A,e,{clear:{hint:A},hint:"Rounds the picture. The card's own corner is in Styles."})}function js(){return ue(at,"cardImage")}function Kc(){return{cardImage:bn(at),...js()}}function $c(){return Ve({sidesKey:"cornerSides",row:Fn,step:An,useFollowed:()=>A,mark:i(zs,{label:Ln}),hint:a("Rounds the picture. Left alone it stays square.")})}function zs({label:e,changed:t=!1,onReset:n=()=>{}}){return i(y,{words:_()?.panel,label:a(e),changed:t,onReset:n})}function Xc(){return{type:"custom",render:({value:e,onChange:t})=>i(Zs,{value:typeof e=="string"?e:"",onChange:t})}}function Ys({layout:e,width:t}){const n=Hn(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:Gn(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 qs={width:"3.5rem",height:"2.5rem"},Js=200;function Zs({value:e,onChange:t}){const[n,o]=Z(null),[r,s]=Z(4),l=J(null);Sn(()=>{const f=l.current;if(!f||typeof ResizeObserver!="function")return;const m=()=>s(f.getBoundingClientRect().width>=Js?4:3);m();const g=new ResizeObserver(m);return g.observe(f),()=>g.disconnect()},[]);const c=e&&e in ie?e:"",u=ct(n,c),p=ct(n,"").length,h=Mn("no-symbol"),d=[{value:"",label:a("Not chosen"),icon:yi(h,a("Not chosen"))},...u.map(f=>({value:f,label:a(ie[f].label),icon:i(Ys,{layout:ie[f],width:40})}))];return i(C,{label:a("Layout"),icon:i(no,{}),value:c?a(ie[c].label):void 0,children:i("div",{ref:l,style:{flex:"1 1 auto",minWidth:0},children:i(It,{label:a("Layout"),value:c,options:d,onChange:t,columns:r,cell:qs,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(Co,{options:[{id:"all",label:a("All")},...Bn.map(f=>({id:String(f),label:String(f)}))],value:n===null?"all":String(n),ariaLabel:a("Photos in a row"),onChange:f=>o(f==="all"?null:Number(f))}),i("span",{className:"text-2xs text-ink-faint",children:a("{n} of {total} layouts",{n:p,total:Dn.length})})]})})})})}export{Li as BOUND_TO_POST,Ma as BOUND_TO_POST_NOTE,za as BUCKET_ICONS,Lc as CUSTOM_FIELD_MEDIA,Fc as CoordsField,Qt as DESKTOP_GAP_NOT_OVERLAP,Ze as DisplayRow,Oc as EDGE_ARROWS,Ho as FOCAL_DEFAULT,Bs as FOCAL_POINTS,we as FOLD_FIELD_MARKER,Ds as FocalPicker,Fi as HIGHLIGHT_HINT,U as HidableTextField,rt as LINK_FIELD_MARKER,Na as Label,it as MEDIA_FIELD_MARKER,kc as MEDIA_TYPE_OPTIONS,Wa as NOT_BOUND_TO_POST,tc as PanelBand,Di as PanelNoteLine,hs as RowPropsContext,st as SCAFFOLD_FIELD_MARKER,Yc as SCALAR_TEXT_CONTROLS,Oi as SiteGapDefaultReset,Y as Slider,Gi as Swatches,zc as TEXT_CONTROL_KINDS,E as TEXT_FIELD_MARKER,Bc as TICKER_ITEMS_ROW,$s as TextListField,Ls as ThemeFillRow,he as WIDTH_LABEL,Pi as WidthDefaultReset,Ks as aimAfterListChange,wc as anchorFields,W as backTo,nc as backgroundField,lc as boxBlockSpacingField,uc as boxColumnsFields,xc as boxFillField,ps as boxPhoneRowField,cs as boxShareField,ac as boxSharePhoneField,cc as boxShareTabletField,vs as boxThemeIndexOf,Ja as bucketHeader,ic as buttonWordsEntryField,ls as cardCornersField,Ui as cardImageBackgroundField,bn as cardImageField,Kc as cardImageFields,Gc as cardMediaFields,sc as cardShapeFields,Wc as cardShowFields,Mc as cardStyleFields,pc as cellWidthFields,yc as colorInput,Pa as containerDirectionField,Ti as containerGapField,Ri as containerGapPhoneField,ka as containerGapRows,Ei as containerGapTabletField,Ms as coordsResultTip,Xa as copyText,sn as cornerSidesField,Ve as cornersRowField,rn as cornersUnitFields,Cc as date,Sc as dateTime,Za as designGroupHeader,Uc as displayFields,Tc as edgePad,Ye as fillSlotChoices,vc as focusAfterRemove,Ic as focusKeptField,Qa as foldMarker,Se as foldMetaOf,Hi as foldTitleOf,xs as followedHeightPatch,Ps as followedStickPatch,Xc as galleryLayoutField,gc as heightFields,me as heightFollowedBy,ys as heightLayersAt,Aa as heroGroupPlacementPoints,ot as hidableText,Bi as hintIsWhileTyping,$c as imageCornersField,Ga as inOwnBox,qa as isBucketHeader,on as keptBy,Va as linkField,Hs as loadingRowHint,Pc as loadingShowsField,Rc as multiSelect,_c as pageBackgroundField,Ya as panelNote,bs as phoneOverrideField,$a as plainText,ja as plainTextarea,Ki as pxField,ec as quietMarker,nt as readHidable,Ws as rowText,Ec as searchSelect,Wi as sectionBandChoices,zi as sectionCornersField,rc as sectionShapeFields,oc as sectionThemeFields,Us as setRowText,dc as sizeField,Nc as sourceField,fc as spacingFields,bc as stickFields,hc as swapPadding,Ua as text,En as textFieldIdentifier,va as textFieldOffPage,Da as textFieldPanelOnly,Dc as textList,Hc as textListRowField,Ka as textarea,gn as toggle,Ac as upload,pe as useLengthRow,fe as useSelectedPatch,O as useSelectedProps,F as useSelectedSibling,Ii as useSiteGapDetail,mc as widthField,Ha as withIdentifier,Fa as withOffPage,Ba as withPanelOnly,La as withScaffold};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as l}from"react/jsx-runtime";import{group as R,sharedStyleKinds as h}from"efficient-easel/screen/lib/document/box-fields";import{lengthUnitFields as _}from"./box-fields.js";import{deviceField as b}from"efficient-easel/screen/lib/document/device-fields";import{usePreviewHeader as E}from"../../../render/components/PreviewHeaderContext.js";import{BackgroundWidthRow as S,CONTENT_LABEL as I,ContentWidthRow as N}from"../../components/SectionWidthRows.js";import{PAGE_WIDTH as d}from"../../../format/lib/content/page-width.js";import{SECTION_CONTENT_MAX_ROW as f,SECTION_WIDTH_KEYS as s,chromeOwnWidth as T,ownSectionWidth as w,sectionBackgroundPatch as P,sectionContentMaxPatch as F,sectionContentPatch as M,sectionWidthResetPatch as p}from"../../../format/lib/content/section-width.js";import{say as B}from"../../../format/lib/editor-words.js";import{finiteNumber as A}from"../../../format/lib/finite-number.js";import{WIDTH_LABEL as D,keptBy as g,useLengthRow as H,useSelectedPatch as O,useSelectedProps as C}from"./controls.js";const U="Content cannot be wider than the background.",a=t=>B(t==="content"?"Content width":"Full width");function x(t){const{siteWidth:n,sectionBackgroundWidth:r,sectionContentWidth:e,themeFromDocument:o}=E(),c=A(n)??d.default;return t.drawsFullOnItsOwn?{px:c,background:"full",content:"full"}:{px:c,background:(o?null:r)??"full",content:(o?null:e)??"content"}}const v={read:w},y={read:w,drawsFullOnItsOwn:!0},K={read:T,clearOnContent:{fullWidth:void 0}};function L({source:t}){const n=t.read(C()),r=O(),e=x(t);return l(S,{value:n.background??e.background,changed:n.background!==null,detail:a(e.background),onChange:o=>r(P(o)),onReset:()=>r(p("background"))})}function j({source:t}){const n=t.read(C()),r=O(),e=i=>r({...i,...t.clearOnContent}),o=x(t),c=(n.background??o.background)==="content",u=H({row:f,label:I,grid:{min:d.min,max:c?o.px:d.max,step:d.step},valueKey:s.contentMax,view:"desktop",numbersIn:()=>n.contentMax!==null}),m=n.content??o.content;return l(N,{mode:c&&m==="full"?"content":m,px:n.contentMax??o.px,max:c?o.px:d.max,changed:n.content!==null,detail:o.content==="full"?a("full"):`${a("content")} ${o.px}px`,fullClosed:c,hint:c?U:void 0,onMode:i=>e(M(i)),onPx:i=>e({...F(i),...u?.unitPatch(!1)}),...u?{length:u}:{},onReset:()=>e(p("content"))})}const W=(t,n)=>b("desktop",{type:"custom",render:()=>l(t,{source:n})}),k=t=>({[s.background]:W(L,t),[s.content]:W(j,t),[s.contentMax]:g(),..._(f,s.content)});function nt(t){const n=t?.drawsFullOnItsOwn?y:v;return h({_gWidth:R(D),...k(n)})}function ot(){return h({...k(K),fullWidth:g()})}export{ot as chromeOwnWidthFields,nt as sectionOwnWidthFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FOLLOW_RULES as
|
|
1
|
+
import{FOLLOW_RULES as l,resolveViewValue as c,viewKeyAt as f}from"efficient-easel/screen/lib/content/view-tiers";import{tierOfView as p}from"../content/view-tier.js";const s=["desktop","tablet","phone"],n=(e,o)=>f(e,p(o)),x=e=>e.flatMap(o=>s.map(t=>n(o,t))),i=e=>e===null||e===""?void 0:e,w=(e,o,t)=>c("same",i(e),i(o),i(t),l);function O(e,o,t,r=e[o]){return w(r,e[n(o,"tablet")],e[n(o,"phone")])[t]}export{s as MOTION_VIEWS,w as followViews,O as followedIn,n as viewKey,x as viewStoreKeys};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties } from "react";
|
|
2
|
+
import { type LengthRow } from "efficient-easel/screen/lib/content/length-units";
|
|
2
3
|
export declare const BORDER_MAX = 20;
|
|
3
4
|
export declare const BORDER_STYLES: readonly ["solid", "dashed", "dotted"];
|
|
4
5
|
export type BorderStyle = (typeof BORDER_STYLES)[number];
|
|
@@ -15,9 +16,18 @@ export type BorderValue = {
|
|
|
15
16
|
};
|
|
16
17
|
export declare const SECTION_BORDER_CLASS = "sf-section-border";
|
|
17
18
|
export declare const SECTION_BORDER_SELF_CLASS = "sf-section-border-self";
|
|
18
|
-
export declare
|
|
19
|
+
export declare const SECTION_BORDER_ROW: LengthRow;
|
|
20
|
+
export declare const SECTION_BORDER_UNIT_KEYS: readonly string[];
|
|
21
|
+
export type BorderUnits = {
|
|
22
|
+
desktop?: unknown;
|
|
23
|
+
tablet?: unknown;
|
|
24
|
+
phone?: unknown;
|
|
25
|
+
};
|
|
26
|
+
export declare function sectionBorderUnitsOf(props: Readonly<Record<string, unknown>>): BorderUnits;
|
|
27
|
+
export declare function borderVars(value: BorderValue | null | undefined, { phone, tablet, unit }?: {
|
|
19
28
|
phone?: boolean;
|
|
20
29
|
tablet?: boolean;
|
|
30
|
+
unit?: unknown;
|
|
21
31
|
}): Record<string, string> | undefined;
|
|
22
32
|
export declare function borderBySide(value: BorderValue): BorderValue;
|
|
23
|
-
export declare function sectionBorderStyle(desktop: BorderValue | null | undefined, phone: BorderValue | null | undefined, tablet?: BorderValue | null): CSSProperties | undefined;
|
|
33
|
+
export declare function sectionBorderStyle(desktop: BorderValue | null | undefined, phone: BorderValue | null | undefined, tablet?: BorderValue | null, units?: BorderUnits): CSSProperties | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
import{viewKeyAt as p}from"efficient-easel/screen/lib/content/view-tiers";import{cssLengthOf as h,rowUnitKeys as m,storedUnit as E}from"./css-length.js";const x=20,O=["solid","dashed","dotted"],b=["top","right","bottom","left"],a="sf-section-border",B="sf-section-border-self",S=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,R=t=>typeof t=="number"&&Number.isFinite(t)?`${Math.min(x,Math.max(0,Math.round(t)))}px`:void 0,u={kind:"border",unitKey:"sectionBorderUnit"},w=m(u);function D(t){const e=u.unitKey;return{desktop:t[p(e,"desktop")],tablet:t[p(e,"tablet")],phone:t[p(e,"mobile")]}}const y=(t,e)=>e==="px"?R(t):typeof t=="number"&&Number.isFinite(t)?h(Math.max(0,t),e):void 0;function c(t,{phone:e=!1,tablet:r=!1,unit:o}={}){if(!t||typeof t!="object")return;const s=e?"-phone":r?"-tablet":"",n={},i=E(o);for(const d of b){const f=y(t[d],i)??y(t.width,i);f!==void 0&&(n[`--sf-border-${d}-width${s}`]=f)}return typeof t.style=="string"&&O.includes(t.style)&&(n[`--sf-border-style${s}`]=t.style),typeof t.color=="string"&&S.test(t.color)&&(n[`--sf-border-color${s}`]=t.color.toLowerCase()),Object.keys(n).length?n:void 0}function C(t){const{width:e,...r}=t;return typeof e!="number"?t:{...r,...Object.fromEntries(b.map(o=>[o,r[o]??e]))}}function I(t,e,r,o={}){const s=c(t,{unit:o.desktop}),n=c(r,{tablet:!0,unit:o.tablet}),i=c(r,{phone:!0,unit:o.tablet}),d=c(e,{phone:!0,unit:o.phone}),f=i||d?{...i,...d}:void 0;return s||n||f?{...s,...n,...f}:void 0}export{x as BORDER_MAX,b as BORDER_SIDES,O as BORDER_STYLES,a as SECTION_BORDER_CLASS,u as SECTION_BORDER_ROW,B as SECTION_BORDER_SELF_CLASS,w as SECTION_BORDER_UNIT_KEYS,C as borderBySide,c as borderVars,I as sectionBorderStyle,D as sectionBorderUnitsOf};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { CSSProperties } from "react";
|
|
2
|
+
import { type LengthRow } from "efficient-easel/screen/lib/content/length-units";
|
|
3
|
+
export declare const CARD_CORNERS_ROW: LengthRow;
|
|
2
4
|
export { CORNER_SIDES, CORNER_SIDE_POINTS, cornerSidesShorthand, hasCornerSubset, normalizeCornerSides, type CornerSide, } from "./section-corners.js";
|
|
3
5
|
export declare const CARD_BOX_RADIUS_PROP = "--sf-card-box-radius";
|
|
4
6
|
export declare function hasOwnCardCorners(value: unknown): boolean;
|
|
5
|
-
export declare function cardCornerStyle(value: unknown, sides?: unknown): CSSProperties | undefined;
|
|
7
|
+
export declare function cardCornerStyle(value: unknown, sides?: unknown, unit?: unknown): CSSProperties | undefined;
|
|
6
8
|
type CardNode = {
|
|
7
9
|
props?: Record<string, unknown>;
|
|
8
10
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cornerRadiusTokens as i,normalizeCornerRadius as
|
|
1
|
+
import{cornerRadiusTokens as i,normalizeCornerRadius as C}from"../theme.js";import{isLengthUnit as u}from"efficient-easel/screen/lib/content/length-units";const p={kind:"radius",unitKey:"cardCornersUnit"};import{CARD_RADIUS_PROP as S,cornerSidesShorthand as c,hasCornerSubset as a,normalizeCornerSides as f}from"./section-corners.js";import{CORNER_SIDES as A,CORNER_SIDE_POINTS as E,cornerSidesShorthand as N,hasCornerSubset as P,normalizeCornerSides as I}from"./section-corners.js";const R="--sf-card-box-radius";function m(r){return typeof r=="number"&&Number.isFinite(r)}function O(r,e,n){if(!m(r))return;const s=(u(n)&&n!=="px"?i(r,n):i(C(r)))[S];if(typeof s!="string")return;const t=a(e)?c(s,f(e)??[]):s;return{[R]:t}}function D(r,e){const n=r.find(o=>o?.props?.id===e);if(!n)return[...r];const s=n.props?.cardCorners,t=n.props?.cardCornerSides,d=n.props?.[p.unitKey];return r.map(o=>o?.props?.id===e?o:{...o,props:{...o.props,cardCorners:s,cardCornerSides:t,[p.unitKey]:d}})}export{R as CARD_BOX_RADIUS_PROP,p as CARD_CORNERS_ROW,A as CORNER_SIDES,E as CORNER_SIDE_POINTS,O as cardCornerStyle,D as cardsWithSharedCorners,N as cornerSidesShorthand,P as hasCornerSubset,m as hasOwnCardCorners,I as normalizeCornerSides};
|
|
@@ -1 +1,7 @@
|
|
|
1
|
+
import { VIEW_ABOVE, type LengthRow, type LengthUnit } from "efficient-easel/screen/lib/content/length-units";
|
|
2
|
+
type ViewTier = keyof typeof VIEW_ABOVE;
|
|
1
3
|
export declare function cssLengthOf(value: number, unit: unknown): string;
|
|
4
|
+
export declare function storedUnit(stored: unknown, base?: LengthUnit): LengthUnit;
|
|
5
|
+
export declare function ownRowUnit(props: Readonly<Record<string, unknown>>, row: LengthRow, view: ViewTier): LengthUnit;
|
|
6
|
+
export declare function rowUnitKeys(row: LengthRow, views?: readonly ViewTier[]): readonly string[];
|
|
7
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{viewKeyAt as o}from"efficient-easel/screen/lib/content/view-tiers";import{VIEW_ABOVE as i,isLengthUnit as f,lengthOf as s}from"efficient-easel/screen/lib/content/length-units";const p=(()=>{const e=Object.keys(i),t=e.filter(n=>i[n]===null);for(let n=e.find(r=>i[r]===t[0]);n&&!t.includes(n);n=e.find(r=>i[r]===t[t.length-1]))t.push(n);return t})();function y(e,t){const n=s(e,u(t));return typeof n=="number"?`${n}px`:n}function u(e,t="px"){return f(e)?e:t}function l(e,t,n){return t.unitKey?u(e[o(t.unitKey,n)],t.base??"px"):t.base??"px"}function m(e,t=p){return e.unitKey?t.map(n=>o(e.unitKey,n)):[]}export{y as cssLengthOf,l as ownRowUnit,m as rowUnitKeys,u as storedUnit};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { CSSProperties } from "react";
|
|
2
2
|
import { CORNER_RADIUS_MAX, CORNER_RADIUS_MIN } from "../theme.js";
|
|
3
|
+
import { type LengthRow } from "efficient-easel/screen/lib/content/length-units";
|
|
4
|
+
export declare const IMAGE_CORNERS_ROW: LengthRow;
|
|
3
5
|
export { CORNER_RADIUS_MAX, CORNER_RADIUS_MIN };
|
|
4
6
|
export declare const IMAGE_CORNER_STEP = 1;
|
|
5
7
|
export declare const IMAGE_CORNERS_LABEL = "Corners";
|
|
6
8
|
export declare function normalizeImageCorners(value?: number | string | null): number | null;
|
|
7
|
-
export declare function imageCornerStyle(value: unknown, sides?: unknown): CSSProperties | null;
|
|
9
|
+
export declare function imageCornerStyle(value: unknown, sides?: unknown, unit?: unknown): CSSProperties | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cornerSidesShorthand as
|
|
1
|
+
import{cornerSidesShorthand as s,hasCornerSubset as m,normalizeCornerSides as d}from"./section-corners.js";import{CORNER_RADIUS_MAX as u,CORNER_RADIUS_MIN as R,normalizeCornerRadius as f}from"../theme.js";import{isLengthUnit as p}from"efficient-easel/screen/lib/content/length-units";import{cssLengthOf as a}from"./css-length.js";import{finiteNumber as c}from"../finite-number.js";const A={kind:"radius",unitKey:"cornersUnit"},I=1,N="Corners";function C(r){return f(r)}function O(r,o,e){const n=p(e)&&e!=="px"?c(r):void 0,t=n===void 0?C(r):null;if(n===void 0&&t===null)return null;const i=n!==void 0?a(Math.max(0,n),e):`${t}px`;return{borderRadius:m(o)?s(i,d(o)??[]):i}}export{u as CORNER_RADIUS_MAX,R as CORNER_RADIUS_MIN,N as IMAGE_CORNERS_LABEL,A as IMAGE_CORNERS_ROW,I as IMAGE_CORNER_STEP,O as imageCornerStyle,C as normalizeImageCorners};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { CSSProperties } from "react";
|
|
2
2
|
import { CORNER_SIDES, type CornerSide, hasCornerSubset, normalizeCornerSides } from "efficient-easel/screen/lib/content/style-keys";
|
|
3
|
+
import { type LengthRow } from "efficient-easel/screen/lib/content/length-units";
|
|
4
|
+
export declare const SECTION_CORNERS_ROW: LengthRow;
|
|
3
5
|
export declare function hasOwnSectionCorners(value: unknown): boolean;
|
|
4
|
-
export declare function sectionCornerStyle(value: unknown, sides?: unknown): CSSProperties | undefined;
|
|
6
|
+
export declare function sectionCornerStyle(value: unknown, sides?: unknown, unit?: unknown): CSSProperties | undefined;
|
|
5
7
|
export declare const SECTION_RADIUS_PROP = "--sf-section-radius";
|
|
6
8
|
export declare const CARD_RADIUS_PROP = "--sf-card-radius";
|
|
7
9
|
export { CORNER_SIDES, type CornerSide, hasCornerSubset, normalizeCornerSides };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CORNER_SIDES as
|
|
1
|
+
import{CORNER_SIDES as i,hasCornerSubset as s,normalizeCornerSides as u}from"efficient-easel/screen/lib/content/style-keys";import{cornerRadiusTokens as c,normalizeCornerRadius as l}from"../theme.js";import{isLengthUnit as f}from"efficient-easel/screen/lib/content/length-units";const O={kind:"radius",unitKey:"sectionCornersUnit"};function p(r){return typeof r=="number"&&Number.isFinite(r)}function x(r,t,e){if(!p(r))return;const o=f(e)&&e!=="px"?c(r,e):c(l(r));if(Object.keys(o).length===0)return;const n=o[S];if(typeof n!="string")return o;const a=s(t)?R(n,u(t)??[]):n;return{...o,[d]:a}}const d="--sf-section-radius",S="--sf-card-radius";function R(r,t){return i.map(e=>t.includes(e)?r:"0").join(" ")}const _=[{value:"tl",label:"Top left"},{value:"tr",label:"Top right"},{value:"bl",label:"Bottom left"},{value:"br",label:"Bottom right"}];export{S as CARD_RADIUS_PROP,i as CORNER_SIDES,_ as CORNER_SIDE_POINTS,O as SECTION_CORNERS_ROW,d as SECTION_RADIUS_PROP,R as cornerSidesShorthand,s as hasCornerSubset,p as hasOwnSectionCorners,u as normalizeCornerSides,x as sectionCornerStyle};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CSSProperties } from "react";
|
|
2
2
|
import { type ShowWhenRule } from "efficient-shell/format";
|
|
3
|
+
import { type LengthRow } from "efficient-easel/screen/lib/content/length-units";
|
|
3
4
|
export declare const SECTION_STICK_LABEL = "Stick to top";
|
|
4
5
|
export declare const SECTION_STICK_DISTANCE: {
|
|
5
6
|
readonly min: 0;
|
|
@@ -7,6 +8,7 @@ export declare const SECTION_STICK_DISTANCE: {
|
|
|
7
8
|
readonly step: 4;
|
|
8
9
|
readonly fallback: 0;
|
|
9
10
|
};
|
|
11
|
+
export declare const SECTION_STICK_DISTANCE_ROW: LengthRow;
|
|
10
12
|
export declare const SECTION_PIN_LABEL = "Pin while scrolling";
|
|
11
13
|
export declare const SECTION_PIN_GROUP = "Scroll";
|
|
12
14
|
export declare const SECTION_PIN_VARS: {
|
|
@@ -68,13 +70,16 @@ export declare function resolveSectionStick(props: SectionStickProps, opts?: {
|
|
|
68
70
|
}): {
|
|
69
71
|
desktop: boolean;
|
|
70
72
|
desktopDistance: number;
|
|
73
|
+
desktopUnit: "px" | "%" | "vw";
|
|
71
74
|
desktopScreens: number;
|
|
72
75
|
tablet: boolean;
|
|
73
76
|
tabletDistance: number;
|
|
77
|
+
tabletUnit: "px" | "%" | "vw";
|
|
74
78
|
tabletScreens: number;
|
|
75
79
|
ownTablet: boolean;
|
|
76
80
|
phone: boolean;
|
|
77
81
|
phoneDistance: number;
|
|
82
|
+
phoneUnit: "px" | "%" | "vw";
|
|
78
83
|
phoneScreens: number;
|
|
79
84
|
ownPhone: boolean;
|
|
80
85
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PIN_STICK_VAR as
|
|
1
|
+
import{PIN_STICK_VAR as A,PIN_TRACK_POSITION_VAR as D,pinAttrs as f,pinStickVars as K,readPin as d}from"efficient-shell/format";import{finiteNumber as y}from"../finite-number.js";import{viewVarSplit as m}from"./view-var-split.js";import{cssLengthOf as E,rowUnitKeys as U,storedUnit as P}from"./css-length.js";const Q="Stick to top",h={min:0,max:200,step:4,fallback:0},L={kind:"position",unitKey:"stickTopDistanceUnit"},u=U(L),[g,R,v]=u,Z="Pin while scrolling",tt="Scroll",i={distance:"--sf-pin-distance",position:"--sf-pin-position",on:"--sf-pin-on",length:"--sf-pin-length",stick:"--sf-pin-stick",trackPosition:"--sf-pin-track-position",header:"--sf-pin-header"},B="stickTopScreens",V=[B,"stickTopScreensTablet","stickTopScreensPhone"],et="Screens",Y="stickTopStop",k="screen",nt="Pin stops at",ot=[{value:"header",label:"Under the header"},{value:k,label:"Screen top"}],st="header",ct="Under the header: the section stops below the site header. Screen top: it stops at the top edge of the screen, under a see-through header.";function w(e){return e===k?k:"header"}function it(e){return e===k?k:void 0}const M="stickAbove",rt="Stays above",at="On: the pinned box stays on top, and the sections after it scroll under it.";function H(e){return e.stickAbove===!0}const pt=["stickTop","stickTopDistance","stickTopTablet","stickTopDistanceTablet","stickTopPhone","stickTopDistancePhone",...u,...V,Y,M],St=new Set(["IntroBleed"]),Tt=new Set(["CategoryBar","DocTabs","Contents"]);function W(e){return typeof e.stickTop=="boolean"?e.stickTop:e.sticky!==!1}const O=e=>d(!0,e).length,_t={any:["stickTop","stickTopTablet","stickTopPhone"].map(e=>({field:e,is:!0}))},kt={all:[{not:{field:"stickTop",in:[!0,!1]}},{not:{field:"sticky",is:!1}}]};function b(e,s="px"){const t=y(e)??h.fallback;return s!=="px"?Math.max(h.min,t):Math.min(h.max,Math.max(h.min,Math.round(t)))}function j(e){return typeof e.stickTopTablet=="boolean"}function $(e){return typeof e.stickTopPhone=="boolean"}function F(e,s={}){const t=s.intro?W(e):e.stickTop===!0,S=e,T=P(S[g]),r=b(e.stickTopDistance,T),_=O(e.stickTopScreens),n=j(e),p=n?e.stickTopTablet===!0:t,o=n?P(S[R]):T,I=n?b(e.stickTopDistanceTablet,o):r,c=n?O(e.stickTopScreensTablet):_,a=$(e),l=a?e.stickTopPhone===!0:p,N=a?P(S[v]):o,C=a?b(e.stickTopDistancePhone,N):I,x=a?O(e.stickTopScreensPhone):c;return{desktop:t,desktopDistance:r,desktopUnit:T,desktopScreens:_,tablet:p,tabletDistance:I,tabletUnit:o,tabletScreens:c,ownTablet:n,phone:l,phoneDistance:C,phoneUnit:N,phoneScreens:x,ownPhone:a}}function lt(e,s={}){const t=F(e,{intro:s.atScreenTop});if(!t.desktop&&!t.tablet&&!t.phone)return null;const S=s.atScreenTop===!0&&typeof e.stickTop!="boolean",T=t.desktop&&t.desktopScreens>0||t.tablet&&t.tabletScreens>0||t.phone&&t.phoneScreens>0,r=s.above===!0&&H(e),_=s.track===!0&&!S&&T&&!r,n=(c,a,l,N)=>m({tabletClass:"",tabletVar:`${c}-tablet`,phoneClass:"",phoneVar:`${c}-phone`},a,l,N).style,p={...s.atScreenTop||w(e.stickTopStop)===k?{[i.header]:"0px"}:{},[i.distance]:E(t.desktopDistance,t.desktopUnit),...n(i.distance,E(t.desktopDistance,t.desktopUnit),E(t.tabletDistance,t.tabletUnit),E(t.phoneDistance,t.phoneUnit))};if(_){const c=l=>l?"1":"0",a={...p,...t.desktop?{}:{[i.on]:"0"},...n(i.on,c(t.desktop),c(t.tablet),c(t.phone)),[i.length]:String(t.desktopScreens),...n(i.length,String(t.desktopScreens),String(t.tabletScreens),String(t.phoneScreens)),...G(t.desktop&&t.desktopScreens===0,t.tablet&&t.tabletScreens===0,t.phone&&t.phoneScreens===0,n)};return{attrs:f(d(!0),"track").attrs,style:a}}const o=c=>c?"sticky":"static",I={...p,...t.desktop?{}:{[i.position]:"static"},...n(i.position,o(t.desktop),o(t.tablet),o(t.phone))};return{attrs:f(d(!0),"stick",r?{above:r}:{}).attrs,style:I}}function G(e,s,t,S){const T=[[i.stick,A],[i.trackPosition,D]],[r,_,n]=[e,s,t].map(K);return Object.fromEntries(T.flatMap(([p,o])=>[...e?[[p,r[o]]]:[],...Object.entries(S(p,r[o],_[o],n[o]))]))}export{kt as INTRO_OLD_STICKY_PINS,St as PIN_AT_SCREEN_TOP,at as SECTION_PIN_ABOVE_HINT,M as SECTION_PIN_ABOVE_KEY,rt as SECTION_PIN_ABOVE_LABEL,tt as SECTION_PIN_GROUP,pt as SECTION_PIN_KEYS,Z as SECTION_PIN_LABEL,B as SECTION_PIN_SCREENS_KEY,V as SECTION_PIN_SCREENS_KEYS,et as SECTION_PIN_SCREENS_LABEL,st as SECTION_PIN_STOP_DEFAULT,ct as SECTION_PIN_STOP_HINT,Y as SECTION_PIN_STOP_KEY,nt as SECTION_PIN_STOP_LABEL,ot as SECTION_PIN_STOP_OPTIONS,k as SECTION_PIN_STOP_SCREEN,i as SECTION_PIN_VARS,h as SECTION_STICK_DISTANCE,L as SECTION_STICK_DISTANCE_ROW,Tt as SECTION_STICK_EXCLUDED,Q as SECTION_STICK_LABEL,_t as SOME_VIEW_PINS,$ as hasPhoneStick,j as hasTabletStick,F as resolveSectionStick,H as sectionPinAbove,lt as sectionPinAttrs,w as sectionPinStopOf,it as sectionPinStopWrite};
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import type { SizeStep } from "../theme.js";
|
|
2
|
+
import { type LengthRow, type LengthUnit } from "efficient-easel/screen/lib/content/length-units";
|
|
2
3
|
export type TypeRole = "heading" | "body" | "label";
|
|
3
4
|
export declare const TYPE_SIZE_INHERIT: "inherit";
|
|
4
5
|
export declare const TYPE_SIZE_FIXED: "fixed";
|
|
5
6
|
export type TypeSizeValue = number | typeof TYPE_SIZE_INHERIT | typeof TYPE_SIZE_FIXED | undefined;
|
|
6
7
|
export declare const isTypeSizeInheriting: (v: unknown) => boolean;
|
|
7
|
-
export declare function resolveTypeSize(stored: TypeSizeValue, builtIn: string, role: TypeRole, step?: SizeStep): string;
|
|
8
|
+
export declare function resolveTypeSize(stored: TypeSizeValue, builtIn: string, role: TypeRole, step?: SizeStep, unit?: LengthUnit): string;
|
|
9
|
+
export declare const INTRO_TITLE_SIZE_ROW: LengthRow;
|
|
10
|
+
export declare const INTRO_BODY_SIZE_ROW: LengthRow;
|
|
11
|
+
export interface IntroSizeUnits {
|
|
12
|
+
titleDesktop: LengthUnit;
|
|
13
|
+
titleMobile: LengthUnit;
|
|
14
|
+
bodyDesktop: LengthUnit;
|
|
15
|
+
bodyMobile: LengthUnit;
|
|
16
|
+
}
|
|
17
|
+
export declare const INTRO_SIZE_UNIT_KEYS: readonly string[];
|
|
18
|
+
export declare function introSizeUnitsOf(props: Readonly<Record<string, unknown>>): IntroSizeUnits;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const x="inherit",
|
|
1
|
+
import{cssLengthOf as _,ownRowUnit as S,rowUnitKeys as f}from"./css-length.js";const x="inherit",p="fixed",y=e=>typeof e!="number"&&e!==p,E="var(--sf-heading-max, 9999px)";function a(e,t,i,o,I){if(typeof e=="number")return _(e,I);if(e===p)return t;const s=o?`var(--size-${o}, ${t})`:t;return i==="heading"?`min(${s}, ${E})`:s}const n={kind:"fontSize",unitKey:"titleSizeUnit"},r={kind:"fontSize",unitKey:"bodySizeUnit"},c=["desktop","mobile"],b=[n,r].flatMap(e=>f(e,c));function d(e){const t=(i,o)=>S(e,i,o);return{titleDesktop:t(n,"desktop"),titleMobile:t(n,"mobile"),bodyDesktop:t(r,"desktop"),bodyMobile:t(r,"mobile")}}export{r as INTRO_BODY_SIZE_ROW,b as INTRO_SIZE_UNIT_KEYS,n as INTRO_TITLE_SIZE_ROW,p as TYPE_SIZE_FIXED,x as TYPE_SIZE_INHERIT,d as introSizeUnitsOf,y as isTypeSizeInheriting,a as resolveTypeSize};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type LengthRow, type LengthUnit } from "efficient-easel/screen/lib/content/length-units";
|
|
1
2
|
export type WidthMode = "page" | "full";
|
|
2
3
|
export declare const WIDTH_MODES: readonly WidthMode[];
|
|
3
4
|
export declare const SECTION_WIDTH_CHOICES: readonly WidthMode[];
|
|
@@ -22,11 +23,14 @@ export declare const SECTION_WIDTH_KEYS: {
|
|
|
22
23
|
readonly background: "sectionBackgroundWidth";
|
|
23
24
|
readonly content: "sectionContentWidth";
|
|
24
25
|
readonly contentMax: "sectionContentMax";
|
|
26
|
+
readonly contentMaxUnit: "sectionContentMaxUnit";
|
|
25
27
|
};
|
|
28
|
+
export declare const SECTION_CONTENT_MAX_ROW: LengthRow;
|
|
26
29
|
export interface OwnSectionWidth {
|
|
27
30
|
background: WidthAnswer | null;
|
|
28
31
|
content: WidthAnswer | null;
|
|
29
32
|
contentMax: number | null;
|
|
33
|
+
contentMaxUnit: LengthUnit;
|
|
30
34
|
}
|
|
31
35
|
export declare function ownSectionWidth(props: Readonly<Record<string, unknown>>): OwnSectionWidth;
|
|
32
36
|
export declare function chromeOwnWidth(props: Readonly<Record<string, unknown>>): OwnSectionWidth;
|
|
@@ -37,9 +41,11 @@ export declare const sectionBackgroundPatch: (next: WidthAnswer) => {
|
|
|
37
41
|
export declare const sectionContentPatch: (next: WidthAnswer) => {
|
|
38
42
|
sectionContentWidth: "full";
|
|
39
43
|
sectionContentMax: undefined;
|
|
44
|
+
sectionContentMaxUnit: undefined;
|
|
40
45
|
} | {
|
|
41
46
|
sectionContentWidth: "content";
|
|
42
47
|
sectionContentMax?: undefined;
|
|
48
|
+
sectionContentMaxUnit?: undefined;
|
|
43
49
|
};
|
|
44
50
|
export declare const sectionContentMaxPatch: (px: number) => {
|
|
45
51
|
sectionContentWidth: "content";
|
|
@@ -49,9 +55,11 @@ export declare const sectionWidthResetPatch: (row: "background" | "content") =>
|
|
|
49
55
|
sectionBackgroundWidth: undefined;
|
|
50
56
|
sectionContentWidth?: undefined;
|
|
51
57
|
sectionContentMax?: undefined;
|
|
58
|
+
sectionContentMaxUnit?: undefined;
|
|
52
59
|
} | {
|
|
53
60
|
sectionContentWidth: undefined;
|
|
54
61
|
sectionContentMax: undefined;
|
|
62
|
+
sectionContentMaxUnit: undefined;
|
|
55
63
|
sectionBackgroundWidth?: undefined;
|
|
56
64
|
};
|
|
57
65
|
export declare const SITE_WIDTHS_KEY = "siteWidths";
|