efficient-web-builder 74.13.0 → 75.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/editor/components/storefront-editor.css +4 -2
  3. package/dist/editor/lib/animation/hover-fields.js +1 -1
  4. package/dist/editor/lib/document/blocks/general/Grid/fields.js +1 -1
  5. package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
  6. package/dist/editor/lib/document/box-fields.d.ts +17 -0
  7. package/dist/editor/lib/document/box-fields.js +1 -1
  8. package/dist/format/lib/content/grid-carousel.d.ts +12 -0
  9. package/dist/format/lib/content/grid-carousel.js +1 -0
  10. package/dist/format/lib/content/hover-media.d.ts +0 -6
  11. package/dist/format/lib/content/hover-media.js +1 -1
  12. package/dist/format/lib/editor-words-catalogue.d.ts +8 -2
  13. package/dist/format/lib/editor-words-catalogue.js +3 -3
  14. package/dist/format/lib/editor-words-kept.js +1 -1
  15. package/dist/format/lib/hero-slide-change.d.ts +18 -0
  16. package/dist/format/lib/hero-slide-change.js +1 -0
  17. package/dist/format/lib/hero-wipe.d.ts +2 -0
  18. package/dist/format/lib/hero-wipe.js +1 -0
  19. package/dist/render/components/Flex.js +1 -1
  20. package/dist/render/components/Grid.d.ts +4 -1
  21. package/dist/render/components/Grid.js +1 -1
  22. package/dist/render/components/GridCarousel.d.ts +9 -0
  23. package/dist/render/components/GridCarousel.js +1 -0
  24. package/dist/render/components/HeroArrows.d.ts +3 -6
  25. package/dist/render/components/HeroArrows.js +1 -1
  26. package/dist/render/components/HeroSection.d.ts +4 -1
  27. package/dist/render/components/HeroSection.js +1 -1
  28. package/dist/render/components/HoverMediaLayer.d.ts +2 -18
  29. package/dist/render/components/HoverMediaLayer.js +1 -1
  30. package/dist/render/components/ImageBlock.d.ts +0 -1
  31. package/dist/render/components/ImageBlock.js +1 -1
  32. package/dist/render/lib/document/blocks/general/Grid/render.js +1 -1
  33. package/dist/render/lib/document/blocks/general/Hero/render.js +1 -1
  34. package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
  35. package/dist/routine-index.json +1 -1
  36. package/dist/value-index.json +1 -1
  37. package/package.json +2 -2
@@ -1 +1 @@
1
- import{Fragment as P,jsx as e,jsxs as L}from"react/jsx-runtime";import{useContext as Rr,useId as Ar,useState as Pr}from"react";import Lr from"./BoxTabs.js";import{AccordionRowStyleContext as so,BoxAnchorContext as $r,BoxTabPaneContext as no,copyAnchorOf as yr,useAccordionRowStyle as Nr,useBoxPaneKind as Er,useCopyAnchors as kr,useFirstCopyOpens as Ir,useIsTabPane as Br}from"./BoxTabPaneContext.js";import gr,{ACCORDION_COUNTER_RESET as Tr}from"./BoxAccordionRow.js";import{readAnchorName as Fr}from"../../format/lib/content/anchor-name.js";import{ACCORDION_MARK_SHEET as Hr}from"./AccordionMark.js";import{EDGE_LINE_ATTRS as Dr}from"../../format/lib/content/view-lines.js";import{accordionRowStyleOf as Vr}from"../../format/lib/content/accordion-row-style.js";import{boxPhoneCell as Mr,boxPhoneOrder as Wr}from"../../format/lib/content/box-phone-place.js";import{CellFillContext as gs,InBoxContext as Ts,useCellOfStretchedRow as Gr,useFillsCell as Xr}from"./InBoxContext.js";import jr,{InsideSiteColumn as Fs,useInsideSiteGutter as Kr,useSectionRoot as Ur}from"./SiteGutterFrame.js";import{BoxSurfaceProvider as zr}from"./BoxSurfaceContext.js";import Yr from"./PictureWash.js";import{BoxCellContext as Hs,NoCellBound as Jr}from"./BoxCellContext.js";import{boxCellFractions as Zr}from"../lib/content/box-cell-bound.js";import{boundOf as qr}from"../../format/lib/content/cell-picture-sizes.js";import{useInSiteHeader as Qr}from"./PhoneMenuTools.js";import{useCardRow as et}from"./CardRowContext.js";import{cardLineBetween as ro,framesItsCards as ot}from"../../format/lib/content/card-place.js";import{rowLinkText as st}from"../../format/lib/content/card-template.js";import{HandedMirrorContext as nt,MirrorContext as rt,RowHandContext as Ds,boxPlace as tt,useHandedMirrorAbove as lt,useHandedRows as it,useMirroredCopy as ct,useUnderCardBox as at}from"./MirrorContext.js";import{boxChildrenHand as dt,isMirroredCopy as ut,mirrorCardsActs as Vs,mirrorCardsOf as mt,mirroredBoxClass as ft,MIRROR_ROW_CLASS as ht,ownsCard as Ct}from"../../format/lib/content/mirror-cards.js";import{FRAME_BASE as to,frameGutterOf as bt}from"./BlockFrame.js";import{BOX_SIDE_SPACE_NONE as St,boxSideSpaceOf as pt}from"../../format/lib/content/box-side-space.js";import{containerGapProps as Ms}from"../../format/lib/content/container-gap.js";import{boxLayoutClasses as wt,boxAlignViewClasses as xt,boxBlockSpacingClass as _t,boxBlockSpacingViewClasses as vt,boxJustifyViewClasses as Ot,boxWrapTabletClass as Rt,boxFitContentClass as At,boxAccordionColumnsClass as Ws,boxRowColumnsClass as Pt,boxRowTabletColumnsClass as Lt,boxRowTabletShareClass as $t,boxPhoneCellsShareLine as yt,boxPhoneRowClasses as ie,boxPhoneRowFits as Gs,boxShareClasses as $,boxShareVars as Nt,boxWrapClass as Et,BOX_GAP_ONLY_CLASS as kt}from"../../format/lib/content/box-layout.js";import{boxSeparatorClasses as It,boxSeparatorSeamClass as Bt,boxSeparatorStyle as gt,isStripBox as Tt}from"../../format/lib/content/box-separator.js";import{DEFAULT_LOOP_DELAY as Ft,DEFAULT_LOOP_DIRECTION as Ht,DEFAULT_LOOP_SECONDS as Dt,isVerticalLoop as Vt}from"../../format/lib/animation/index.js";import{LoopTrack as Mt}from"../lib/animation/LoopTrack.js";import{BOX_CARD_PAD as y,BOX_OWNS_SIDES_CLASS as Wt,boxDarkenStyle as Xs,boxPaintOf as Gt,boxFillFadeStyle as Xt,boxFillViews as jt,boxPlacementClasses as Kt,boxCardProps as Ut,boxIsCard as js,boxRowPicture as zt,boxSwatchFill as Yt,boxWashViews as Jt,CARD_NO_LIFT_CLASS as Zt,CARD_SHADOW_CLASS as qt,isBackgroundBox as _e}from"../../format/lib/content/box-background.js";import{BOX_ROW_IMAGE_PROP as x}from"../../format/lib/content/box-card-rule.js";import{boxShadowAttrs as Qt,boxShadowOnAnyView as el,boxShadowViewAttrs as ol}from"../../format/lib/content/box-shadow.js";import{boxRunsEdgeToEdge as sl,drawsSiteGutter as nl}from"../../format/lib/content/site-gutter.js";import{boxShapeClass as rl,boxShapeClasses as tl,boxShapeStyle as ll}from"../../format/lib/content/box-shape.js";import{boxAngleStyle as il}from"../../format/lib/content/box-angle.js";import{BOX_JUMP_ATTR as cl,BOX_LINK_ATTR as Ks,BOX_LINK_CLASS as Us,BOX_LINKED_CLASS as al,boxJumpBlocksClass as dl,boxJumpCss as ul,boxJumpSlug as ml,boxLinkOf as fl,siteLinkDraws as hl}from"../../format/lib/content/box-link.js";import{SiteLink as Cl}from"../lib/site-runtime.js";import{sectionBorderStyle as zs}from"../../format/lib/content/borders.js";import{finiteNumber as ve}from"../../format/lib/finite-number.js";import{padDefaultIn as N,padSideValue as Oe,sectionPadAttrs as bl}from"../lib/content/section-padding.js";import{SECTION_FILL_CLASS as Re}from"../../format/lib/content/section-min-height.js";import{ON_MEDIA_INK_STYLE as Sl,rowFillInkStyle as pl}from"../../format/lib/content/ink.js";import{useThemeLightInk as wl}from"./ThemeLightInkContext.js";import{sizedBackground as lo}from"../../format/lib/sized-image.js";import{BOX_REVEAL_CLASS as xl,BOX_REVEAL_CSS as _l,BOX_REVEAL_SHEET as vl,PHOTO_HOST_ATTR as Ol,resolveImageTreatment as Rl}from"../../format/lib/content/image-treatment.js";import Al,{HoverArrowsSlot as Pl,HoverMediaArrows as Ll}from"./HoverMediaLayer.js";import{HOVER_ARROWS_HOST_ATTR as $l,HOVER_ARROWS_HOST_CLASS as yl,HOVER_LAYER_GROUND as Nl,cardRowHoverMedia as El,hoverLayerName as kl}from"../../format/lib/content/hover-media.js";import{BOX_HIGHLIGHT_CLASS as Il,BOX_HIGHLIGHT_OVER_ROW_INK_CLASS as Bl,BOX_SHOW_ON_CARD_HOVER as gl}from"../../format/lib/animation/hover.js";import{BoxRail as Tl,BoxRailStop as Fl,RAIL_STOPS_CLASS as Hl,useTimelineRail as Dl}from"./TimelineRail.js";import{SHARED_PLAIN_ATTR as Vl,sharedColumnsClasses as Ml,sharedColumnsCss as Wl,sharedRowsClasses as Gl,sharedRowsCss as Xl}from"../lib/content/box-shared-columns.js";import Ys from"./PhotoHoverSheet.js";import{PICTURE_FRAME_ONLY as jl,PictureHoverMoveSheet as Kl,PictureHoverZoom as Ul,pictureHoverMoveOf as zl}from"./PictureHoverMove.js";import{BOX_DESKTOP_LINE as Yl,stackGutterClass as Jl,stackLineCss as Zl,stackOuterClass as ql,stackRowClass as Ql,storedStackLine as io}from"../lib/content/box-stack-line.js";import{partAttr as co}from"../../format/lib/content/part-names.js";import{withSideOnce as Js}from"../../format/lib/content/page-width.js";import{useSideSpaceOnce as ei}from"./SideSpaceOnce.js";const ao={"--sf-site-gutter":"0px"},oi={overflowX:"clip",overflowY:"visible"},si={stretchedRow:!1,fillingColumn:!1,columnsRow:!1},Zs={desktop:!1,phone:!1},qs="bg-cover bg-center bg-[image:var(--sf-box-bg)] max-view-wide:bg-[image:var(--sf-box-bg-p)]",uo=m=>m==null||m==="",mo=m=>!uo(m)&&Number(m)===0;function ni({children:m}){return e(P,{children:m(Ar())})}function ri({direction:m,label:Qs,tabShape:en,gap:fo,gapPhone:on,gapTablet:Ae,justify:z,align:E,wrap:ce,share:sn,sharePhone:F,shareTablet:H,wrapPhone:nn,orderPhone:rn,phoneRow:C,columns:f,columnsTablet:D,separator:h,stackBelow:ae,blockSpacing:ho,bgImage:tn,bgImagePhone:ln,rowImage:cn,hoverShow:an,pictureHover:V,darken:Pe,darkenStyle:de,darkenTablet:dn,darkenPhone:un,darkenStyleTablet:mn,darkenStylePhone:fn,placement:hn,padV2:Co=!1,border:Cn,borderTablet:bn,borderPhone:Sn,borderUnits:bo,pad:t={},contained:Le=!0,fillHeight:_=!1,shadow:$e,shadowTablet:So,shadowPhone:po,justifyTablet:wo,justifyPhone:pn,alignTablet:wn,alignPhone:xn,wrapTablet:xo,blockSpacingTablet:_n,blockSpacingPhone:vn,loop:b,scrollDirection:ye=Ht,loopSeconds:On=Dt,loopDelay:Rn=Ft,editing:k=!1,fillColor:_o,fillColorTablet:An,fillColorPhone:Pn,fillFade:Ln,swatch:$n,line:v,upcoming:yn,link:Nn,rowLink:vo,highlight:En,boxShape:Ne,boxShapePhone:Oo,boxShapeTablet:Ro,angle:kn,jumpHighlight:In,anchor:Ao,sharedSides:Bn=Zs,sharedRows:gn=!1,boxId:M,slotCount:Tn,mirrorCards:Po,content:c,rowTitle:Ee,startsOpen:Fn,rowStyle:Hn,sideSpace:Dn}){const n=et(),I=Ut({[x]:cn},n!==null)[x],Lo=js({[x]:I}),d=Lo?Zs:Bn,Vn=Lo?!1:gn,$o=zt({[x]:I},n?.row),S=$o??tn,ke=$o===null?ln:void 0,yo=Rr(Hs),[No,Mn]=Pr(null),Wn=lt(),Eo=at()&&!(Wn&&n!==null),O=it(),u=Ct({inCopy:n!==null,nestedCopy:n?.nested===!0,underBox:Eo}),Ie=an===gl&&n!==null&&!u&&!(k&&n.previewHover===!0),ko=ro(Cn,n,u),Io=ro(bn,n,u),Bo=ro(Sn,n,u),go=n===null&&!Eo&&O?.ids&&M?O.ids.indexOf(M):-1,ue=go>=0&&O&&M?tt(O,M,go):-1,p=ue>=0?O?.hand??null:u&&O?.copies===!0?O.hand:null,o=p?.row?"row":m,a=p?.row?p.row.share:sn,Gn=p?.row?p.row.phoneReverse?[...c.blockIds??[]].reverse():void 0:rn,me=Vn&&!p?.row,W=k?"":vo&&n?st(n.row,vo)??"":fl(Nn),R=_?"":tl(Ne,Oo,Ro),Xn=!_&&rl(Ne)!=="",B=ml(In,Ao),Be=Yt({swatch:$n},n?.row),Y=Be??Gt(_o),g=Be?{className:"",style:{}}:jt(_o,An,Pn),jn=wl(),To=pl(Be,jn??void 0),Kn=_e(S)||_e(ke),Un=(Y||g.className)&&!Kn?Xt(Ln):null,Fo=Y||g.className?{...Y?{backgroundColor:Y}:{},...g.style,...Un,...To}:void 0,Ho=Dl(),J=v===!0&&o!=="tabs"&&o!=="accordion",r=js({bgImage:S,[x]:I}),Do=il(kn),Vo=r?void 0:Fo,fe=r?null:En??null,Mo=_?null:ll(Ne,Oo,Ro),zn=Do||fe||Mo?{...Vo,...Do,...fe,...Mo}:Vo,he=Qr(),Yn=Ur(),Jn=Br(),Wo=Er(),Go=Nr(),Zn=Ir(),qn=kr(),l=o==="accordion",ge=Vr(Hn),Z=l&&ge==="numbered",Te=l&&ge==="chevron",Fe=Xr(),Xo=Gr(),G=Tt(o,h),i=b==="scroll"&&o!=="tabs"&&!l,Qn=ct(),Ce=u||ue>=0&&p!==null,jo=p?p.mirror:Po,er=ue>=0?ue:n?.index,q=u&&ot(n?.ownerType),Ko=Vs({direction:o,separator:h,loop:b,line:v,bgImage:S,[x]:I,columns:f,columnsTablet:D,share:a,wrap:ce},Ce,d.desktop)&&ut(jo,er),or=Vs({direction:o,separator:h,loop:b,line:v,bgImage:S,[x]:I,columns:f,columnsTablet:D,share:a,wrap:ce},Ce,d.desktop)&&mt(jo)!==null,X=Pt({direction:o,separator:h,loop:b,line:v,columns:f}),T=Lt({direction:o,separator:h,loop:b,line:v,columnsTablet:D}),Q=$t({direction:o,separator:h,loop:b,line:v,columns:f,columnsTablet:D,share:a,shareTablet:H}),be=pt(Dn),He=be!=="box",De=bt(be),Uo=ei(),zo=J&&io(ae)===Yl,j=o==="row"&&!r&&!G&&!i&&(!J||zo)&&T===""&&Q===""?io(ae):void 0,K=j??(o==="column"&&!r?io(ae):void 0),sr=Kr(),Se=Ml(d,c.blockCount??0,j),nr=(Se&&(!n||n.index===0)?Wl(d,c.blockCount??0,j):"")+(me&&(!n||n.index===0)?Xl(me,c.blockCount??0):""),Yo=Gl(me,c.blockCount??0),Jo=T!==""?Number(D)>=2:Q===""||$(H)!=="",Zo=T!==""||Q!=="",Ve=o==="row"&&!G&&!i&&v!==!0,Me=Ve&&!d.phone&&!d.desktop?Mr(Wr(Gn,c.blockIds??[]),{editing:k}):void 0,qo=Me!==void 0&&!k,rr=X!==""?Number(f)>=2:$(a)!=="",Qo=!r&&!l&&!or&&!d.desktop&&!d.phone,pe=Qo&&!i?Ot(z,wo,pn):"",We=r||Ce?"":ft(Qn,o,i?void 0:z,E,pe?wo:void 0),tr=/view-wide:max-view-desktop:justify-/.test(We)?pe.split(" ").filter(s=>!s.startsWith("view-wide:max-view-desktop:justify-")).join(" "):pe,lr=Qo&&o==="row"?xt(E,wn,xn):"",es=Xo&&o==="column"&&!r&&!i&&!l,Ge=typeof z=="string"&&z!=="start"||pe!=="",os=es&&Ge&&$(a)!=="",ss=es&&!Ge&&$(a)!==""&&(c.blockCount??0)===1,ir=!i&&!l&&X===""&&T===""&&!d.desktop?Rt(ce,xo):"",ns=[l||os?"":$(a),o==="row"?At(a):"",X,T,Q,_t(l?"gap":ho),It(o,h),l&&!Z&&!Te?"border-t border-line":"",tr,lr,ir,l?"":vt(ho,_n,vn),l?Ws(f,C,Z||Te):"",Z?Tr:""].filter(Boolean).join(" "),cr=ns?` ${ns}`:"",rs=["flex",o==="row"?G||i?"flex-row":`flex-row ${ie(C,F,nn,xo)}`:"flex-col",Et(i||l?!1:ce),r?Kt(hn??"center",o):wt(i||l?void 0:z,l?void 0:E)+(We?` ${We}`:"")].join(" ")+cr,ee=_||r||R||Fe?` ${Re}`:"",Xe=Xn?` ${R}`:R?`${ee} ${R}`:ee,ts=Xo&&o==="column"&&!r&&!i&&$(a)===""&&Ge||os,ls=ee||(ts||ss?` ${Re}`:""),je=W?` ${al}`:"",Ke=r||he||Co?"":" py-6",ar=j===void 0?"":` ${Ql(j)}`,is=K===void 0||He?"":` ${Jl(K)}`,Ue=K===void 0?"":` ${ql(K)}`,dr=`${to}${Ke} ${De}${Xe}${je}${is}${Ue}`,ur=he?`${Xe}${je}${Ue}`.trim():`w-full${Ke}${Xe}${je}${Ue}`,oe=(Z||Te)&&Ws(f,C)===""?Ms("Flex",0,"block"):Ms("Flex",fo,o==="row"?"inline":"block",on,G||i?void 0:Ae),cs=Nt(a,H,o==="row"?c.blockCount??0:0),as=G?{...oe.style,...gt(o,h)}:oe.style,mr=cs?{...as,...cs}:as,ze=(s="")=>e(c,{className:`${rs}${Ko?` ${ht}`:""}${oe.className}${ls}${ar}${s?` ${s}`:""}${J?` ${Hl}`:""}${B?` ${dl(B)}`:""}${Se}${Yo}`,style:mr,minEmptyHeight:120,...Me?{cell:Me}:null}),ds=Vt(ye)?"":Bt(o,h),us=i?e(Mt,{direction:ye,seconds:On,delay:Rn,editing:k,copy:s=>ze(s&&ds?`${s} ${ds}`:s)}):Z?L(P,{children:[e("style",{children:Hr}),ze()]}):ze(),Ye=o==="tabs"?e(Lr,{className:`${rs}${oe.className}${Fe&&!_&&!r&&!R?"":ee}`,style:oe.style,shape:en,children:us}):us,Je=l?e(no.Provider,{value:"accordion",children:e(so.Provider,{value:ge,children:Ye})}):Wo?e(no.Provider,{value:!1,children:e(so.Provider,{value:"plain",children:Ye})}):Ye,ms=o==="row"&&!r&&(E===void 0||E==="stretch"),fr={stretchedRow:ms,fillingColumn:o==="column"&&(Fe||ts),columnsRow:X!==""||T!==""||Se!==""||Yo!==""||o==="row"&&(Array.isArray(a)||Array.isArray(H))||qo,...qo?{phoneCells:!0}:null,...ms&&Ve&&(c.blockCount??0)>=2&&rr||ss?{picturesFillRow:!0}:null,...Zo&&!Jo?{fillFrom:"desktop"}:null,...yt(C,F)&&(!Zo||Jo)?{phoneRowFills:!0}:null,...Ve&&Gs(C,F)?{phoneRowFits:!0}:null,...i?{loops:!0}:null,...M?{id:M}:null},fs=n===null?dt({direction:o,loop:b,bgImage:S,[x]:I,columns:f,mirrorCards:Po},!1):null,hs=fs?e(Ds.Provider,{value:{hand:fs,ids:c.blockIds??[],boxes:[]},children:Je}):O?e(Ds.Provider,{value:null,children:Je}):Je,Cs=Fr(Ao),bs=e(Ts.Provider,{value:fr,children:e(gs.Provider,{value:!1,children:Ce?e(rt.Provider,{value:Ko,children:e(nt.Provider,{value:!u,children:hs})}):hs})}),Ss=Cs?e($r.Provider,{value:Cs,children:bs}):bs,hr=Ee?.blockCount??0,ps=Wo==="accordion"&&!!Ee&&(k||hr>0)?e(gr,{startsOpen:Fn===!0||Zn&&u&&n?.index===0,editing:k,numbered:Go==="numbered",chevron:Go==="chevron",anchor:u?yr(qn,n):void 0,title:e(Ts.Provider,{value:si,children:e(gs.Provider,{value:!1,children:e(no.Provider,{value:!1,children:e(so.Provider,{value:"plain",children:e(Ee,{className:`min-w-0 flex-1 ${kt}`,minEmptyHeight:24})})})})}),children:Ss}):Ss,Ze=J?e(Tl,{row:o==="row",stops:c.blockCount??0,desktopLine:j!==void 0&&zo,children:ps}):ps,Cr=Qs?.trim()||(Jn?"":void 0),br={values:t,frame:Ke?24:0},Sr=s=>Ho?e(Fl,{on:Ho,future:yn===!0,children:s}):s,pr=s=>hl(W)?e(Cl,{href:W,newTab:"auto",className:Us,"aria-labelledby":s,[Ks]:""}):e("a",{href:W,className:Us,"aria-labelledby":s,[Ks]:""}),ws=(B?ul(B):"")+nr+(K===void 0||n&&n.index!==0?"":Zl(K,{gutter:!He})),xs=ws?e("style",{dangerouslySetInnerHTML:{__html:ws}}):null,se=sl({loop:b,direction:o,scrollDirection:ye,bgImage:S,[x]:I}),wr=d.desktop&&Se!==""&&!Y&&!g.className&&!zs(ko,Bo,Io,bo)&&!el($e,So,po)&&!W&&!R&&!_&&!B&&!nl(Le&&!se,sr)&&mo(fo)&&(uo(Ae)||mo(Ae))&&Co&&Object.values(t).every(s=>uo(s)||mo(s)),xr=s=>({...Dr,...wr?{[Vl]:""}:null,...r?null:{...Qt($e),...ol($e,So,po)},...B?{[cl]:B}:null,...s?{id:s}:null}),_s=X!==""?Number(f):0,_r=ie(C,F)===ie(void 0),vr=(o==="column"||o==="row"&&!G&&!i&&(_s===1&&_r||_s===0&&c.blockCount===1))&&!r&&!J&&!he,vs=r&&Yn&&!he,we=!r&&n!==null?Xs(Pe,de):null,Os=Ie||we?L(P,{children:[Ie?e(Ys,{sheet:_l,name:vl}):null,we?e("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 -z-10 rounded-[inherit]",style:we}):null]}):null,Rs=[Ie?xl:"",we?"relative isolate":""].filter(Boolean).join(" "),As=s=>Os?L(P,{children:[Os,s]}):s,Ps=(s,A)=>Sr(e(jr,{contained:Le&&!se,style:se?ao:void 0,framedClass:dr,fillClass:ur,columnClass:`${to} ${De}${ls}${is}`,tabLabel:Cr,pad:r?void 0:br,border:zs(ko,Bo,Io,bo),outerAttrs:xr(A),box:!0,edge:vr&&be!==St,outerStyle:zn,outerClass:r?Rs||void 0:[g.className,fe?Il:"",fe&&To?Bl:"",Rs].filter(Boolean).join(" ")||void 0,bleed:vs,siteSide:He,part:co("box"),children:xs||A?L(P,{children:[xs,A?pr(A):null,se?e(Fs,{children:s}):s]}):se?e(Fs,{children:s}):s})),qe=s=>W?e(ni,{children:A=>Ps(As(s),A)}):Ps(As(s)),Ls=s=>yo.bound?e(Jr,{children:s}):s;if(!r){const s=E===void 0||E==="stretch",A=($(a)!==""||X!==""||T!=="")&&!Gs(C,F)&&!(Q!==""&&$(H)==="")&&(s||ie(C)!==ie(void 0));if(!(o==="row"?A:o==="column"&&s))return qe(Ls(Ze));const Bs=Zr({direction:o,separator:h,loop:b,line:v,share:a,shareTablet:H,sharePhone:F,phoneRow:C,columns:f,columnsTablet:D,stackBelow:ae,shared:d.desktop||d.phone||me,count:Tn}),Or={hasWidth:!0,...Bs?{bound:qr(Bs,yo.bound)}:null};return qe(e(Hs.Provider,{value:Or,children:Ze}))}const ne=_e(S),re=ne?Xs(Pe,de):null,xe=ne?Jt({darken:Pe,darkenStyle:de,darkenTablet:dn,darkenStyleTablet:mn,darkenPhone:un,darkenStylePhone:fn}):{className:"",style:{}},Qe=_e(ke),$s=ne?Qe?{"--sf-box-bg":lo(S??""),"--sf-box-bg-p":lo(ke??"")}:{backgroundImage:lo(S??""),backgroundSize:"cover",backgroundPosition:"center"}:{},ys=Rl(void 0,void 0,V),U=ys.className?ys:null,te=ne&&n&&V?.kind==="nextImage"&&V.media?El(n,V.media):null,w=ne?zl(V,de)??(te?jl:null):null,Ns=V?.media?.cover??"picture",eo=te?e("div",{className:`absolute inset-0 isolate${q?" rounded-[inherit]":""}`,children:e(Pl.Provider,{value:Mn,children:e(Al,{media:te,name:kl(n?.row),cover:Ns,ground:Nl[Ns],arrowsAbove:!0})})}):null,le=U!==null||!!w?.zoom,Es=le?e("div",{"aria-hidden":!0,className:`absolute inset-0${q?" rounded-[inherit]":""}${Qe?` ${qs}`:""}${U?` ${U.className}`:""}`,style:{...$s,...U?.style??{}}}):null,oo=bl({...t,top:ve(t.top)??N(y.desktop,t.unit,"desktop"),bottom:ve(t.bottom)??N(y.desktop,t.unit,"desktop"),topPhone:ve(t.topPhone)??N(y.phone,t.unitPhone,"mobile"),bottomPhone:ve(t.bottomPhone)??N(y.phone,t.unitPhone,"mobile"),left:Oe(t.left)??N(y.side,t.unit,"desktop"),right:Oe(t.right)??N(y.side,t.unit,"desktop"),leftPhone:Oe(t.leftPhone)??N(y.sidePhone,t.unitPhone,"mobile"),rightPhone:Oe(t.rightPhone)??N(y.sidePhone,t.unitPhone,"mobile"),sideSpace:be}),ks=e("div",{className:`relative z-[1] ${Wt} ${Js(oo?.className??"",Uo)}${_||R?` ${Re}`:""}`.trimEnd(),style:re?{...oo?.style,...ao,...Sl}:{...oo?.style,...ao},...co("card-content"),children:Ls(Ze)}),Is=vs&&Le?e("div",{className:Js(`${to} ${De}${_||R?` ${Re}`:""}`,Uo),children:ks}):ks;return qe(e(P,{children:L("div",{className:`relative isolate overflow-hidden ${qt}${n!==null&&!u?` ${Zt}`:""}${ee}${Qe&&!le?` ${qs}`:""}${g.className?` ${g.className}`:""}${w?` ${w.className}`:""}`,style:{...q?oi:{},...Fo,...le?{}:$s,...w?w.style:{}},...U||te?{[Ol]:""}:{},...co("card"),children:[e(Kl,{move:w}),le&&L(P,{children:[e(Ys,{sheet:U?.sheet}),w?.zoom?e("div",{className:`absolute inset-0 overflow-hidden${q?" rounded-[inherit]":""}`,children:L(Ul,{move:w,className:"absolute inset-0",children:[Es,eo]})}):L(P,{children:[Es,eo]})]}),!le&&eo,e(Yr,{wash:re&&xe.className?{...re,...xe.style}:re,hover:w?.washHover,...q?{className:"rounded-[inherit]"}:{},...xe.className?{restClassName:xe.className}:{}}),re?e(zr,{children:Is}):Is,te?e("div",{[$l]:"",className:yl,children:No?e(Ll,{state:No}):null}):null]})}))}export{ri as default};
1
+ import{Fragment as A,jsx as e,jsxs as $}from"react/jsx-runtime";import{useContext as vt,useId as Ot}from"react";import Pt from"./BoxTabs.js";import{AccordionRowStyleContext as so,BoxAnchorContext as Rt,BoxTabPaneContext as no,copyAnchorOf as At,useAccordionRowStyle as $t,useBoxPaneKind as Lt,useCopyAnchors as yt,useFirstCopyOpens as Nt,useIsTabPane as Et}from"./BoxTabPaneContext.js";import kt,{ACCORDION_COUNTER_RESET as It}from"./BoxAccordionRow.js";import{readAnchorName as Bt}from"../../format/lib/content/anchor-name.js";import{ACCORDION_MARK_SHEET as gt}from"./AccordionMark.js";import{EDGE_LINE_ATTRS as Tt}from"../../format/lib/content/view-lines.js";import{accordionRowStyleOf as Ft}from"../../format/lib/content/accordion-row-style.js";import{boxPhoneCell as Dt,boxPhoneOrder as Ht}from"../../format/lib/content/box-phone-place.js";import{CellFillContext as Bs,InBoxContext as gs,useCellOfStretchedRow as Vt,useFillsCell as Mt}from"./InBoxContext.js";import Gt,{InsideSiteColumn as Ts,useInsideSiteGutter as Xt,useSectionRoot as Wt}from"./SiteGutterFrame.js";import{BoxSurfaceProvider as jt}from"./BoxSurfaceContext.js";import Kt from"./PictureWash.js";import{BoxCellContext as Fs,NoCellBound as Ut}from"./BoxCellContext.js";import{boxCellFractions as zt}from"../lib/content/box-cell-bound.js";import{boundOf as Yt}from"../../format/lib/content/cell-picture-sizes.js";import{useInSiteHeader as Jt}from"./PhoneMenuTools.js";import{useCardRow as Zt}from"./CardRowContext.js";import{cardLineBetween as to,framesItsCards as qt}from"../../format/lib/content/card-place.js";import{rowLinkText as Qt}from"../../format/lib/content/card-template.js";import{HandedMirrorContext as er,MirrorContext as or,RowHandContext as Ds,boxPlace as sr,useHandedMirrorAbove as nr,useHandedRows as tr,useMirroredCopy as rr,useUnderCardBox as lr}from"./MirrorContext.js";import{boxChildrenHand as ir,isMirroredCopy as cr,mirrorCardsActs as Hs,mirrorCardsOf as ar,mirroredBoxClass as dr,MIRROR_ROW_CLASS as ur,ownsCard as mr}from"../../format/lib/content/mirror-cards.js";import{FRAME_BASE as ro,frameGutterOf as fr}from"./BlockFrame.js";import{BOX_SIDE_SPACE_NONE as hr,boxSideSpaceOf as Cr}from"../../format/lib/content/box-side-space.js";import{containerGapProps as Vs}from"../../format/lib/content/container-gap.js";import{boxLayoutClasses as br,boxAlignViewClasses as pr,boxBlockSpacingClass as Sr,boxBlockSpacingViewClasses as wr,boxJustifyViewClasses as xr,boxWrapTabletClass as _r,boxFitContentClass as vr,boxAccordionColumnsClass as Ms,boxRowColumnsClass as Or,boxRowTabletColumnsClass as Pr,boxRowTabletShareClass as Rr,boxPhoneCellsShareLine as Ar,boxPhoneRowClasses as le,boxPhoneRowFits as Gs,boxShareClasses as L,boxShareVars as $r,boxWrapClass as Lr,BOX_GAP_ONLY_CLASS as yr}from"../../format/lib/content/box-layout.js";import{boxSeparatorClasses as Nr,boxSeparatorSeamClass as Er,boxSeparatorStyle as kr,isStripBox as Ir}from"../../format/lib/content/box-separator.js";import{DEFAULT_LOOP_DELAY as Br,DEFAULT_LOOP_DIRECTION as gr,DEFAULT_LOOP_SECONDS as Tr,isVerticalLoop as Fr}from"../../format/lib/animation/index.js";import{LoopTrack as Dr}from"../lib/animation/LoopTrack.js";import{BOX_CARD_PAD as y,BOX_OWNS_SIDES_CLASS as Hr,boxDarkenStyle as Xs,boxPaintOf as Vr,boxFillFadeStyle as Mr,boxFillViews as Gr,boxPlacementClasses as Xr,boxCardProps as Wr,boxIsCard as Ws,boxRowPicture as jr,boxSwatchFill as Kr,boxWashViews as Ur,CARD_NO_LIFT_CLASS as zr,CARD_SHADOW_CLASS as Yr,isBackgroundBox as _e}from"../../format/lib/content/box-background.js";import{BOX_ROW_IMAGE_PROP as x}from"../../format/lib/content/box-card-rule.js";import{boxShadowAttrs as Jr,boxShadowOnAnyView as Zr,boxShadowViewAttrs as qr}from"../../format/lib/content/box-shadow.js";import{boxRunsEdgeToEdge as Qr,drawsSiteGutter as el}from"../../format/lib/content/site-gutter.js";import{boxShapeClass as ol,boxShapeClasses as sl,boxShapeStyle as nl}from"../../format/lib/content/box-shape.js";import{boxAngleStyle as tl}from"../../format/lib/content/box-angle.js";import{BOX_JUMP_ATTR as rl,BOX_LINK_ATTR as js,BOX_LINK_CLASS as Ks,BOX_LINKED_CLASS as ll,boxJumpBlocksClass as il,boxJumpCss as cl,boxJumpSlug as al,boxLinkOf as dl,siteLinkDraws as ul}from"../../format/lib/content/box-link.js";import{SiteLink as ml}from"../lib/site-runtime.js";import{sectionBorderStyle as Us}from"../../format/lib/content/borders.js";import{finiteNumber as ve}from"../../format/lib/finite-number.js";import{padDefaultIn as N,padSideValue as Oe,sectionPadAttrs as fl}from"../lib/content/section-padding.js";import{SECTION_FILL_CLASS as Pe}from"../../format/lib/content/section-min-height.js";import{ON_MEDIA_INK_STYLE as hl,rowFillInkStyle as Cl}from"../../format/lib/content/ink.js";import{useThemeLightInk as bl}from"./ThemeLightInkContext.js";import{sizedBackground as lo}from"../../format/lib/sized-image.js";import{BOX_REVEAL_CLASS as pl,BOX_REVEAL_CSS as Sl,BOX_REVEAL_SHEET as wl,PHOTO_HOST_ATTR as xl,resolveImageTreatment as _l}from"../../format/lib/content/image-treatment.js";import vl from"./HoverMediaLayer.js";import{HOVER_LAYER_GROUND as Ol,cardRowHoverMedia as Pl}from"../../format/lib/content/hover-media.js";import{BOX_HIGHLIGHT_CLASS as Rl,BOX_HIGHLIGHT_OVER_ROW_INK_CLASS as Al,BOX_SHOW_ON_CARD_HOVER as $l}from"../../format/lib/animation/hover.js";import{BoxRail as Ll,BoxRailStop as yl,RAIL_STOPS_CLASS as Nl,useTimelineRail as El}from"./TimelineRail.js";import{SHARED_PLAIN_ATTR as kl,sharedColumnsClasses as Il,sharedColumnsCss as Bl,sharedRowsClasses as gl,sharedRowsCss as Tl}from"../lib/content/box-shared-columns.js";import zs from"./PhotoHoverSheet.js";import{PICTURE_FRAME_ONLY as Fl,PictureHoverMoveSheet as Dl,PictureHoverZoom as Hl,pictureHoverMoveOf as Vl}from"./PictureHoverMove.js";import{BOX_DESKTOP_LINE as Ml,stackGutterClass as Gl,stackLineCss as Xl,stackOuterClass as Wl,stackRowClass as jl,storedStackLine as io}from"../lib/content/box-stack-line.js";import{partAttr as co}from"../../format/lib/content/part-names.js";import{withSideOnce as Ys}from"../../format/lib/content/page-width.js";import{useSideSpaceOnce as Kl}from"./SideSpaceOnce.js";const ao={"--sf-site-gutter":"0px"},Ul={overflowX:"clip",overflowY:"visible"},zl={stretchedRow:!1,fillingColumn:!1,columnsRow:!1},Js={desktop:!1,phone:!1},Zs="bg-cover bg-center bg-[image:var(--sf-box-bg)] max-view-wide:bg-[image:var(--sf-box-bg-p)]",uo=m=>m==null||m==="",mo=m=>!uo(m)&&Number(m)===0;function Yl({children:m}){return e(A,{children:m(Ot())})}function Jl({direction:m,label:qs,tabShape:Qs,gap:fo,gapPhone:en,gapTablet:Re,justify:z,align:E,wrap:ie,share:on,sharePhone:F,shareTablet:D,wrapPhone:sn,orderPhone:nn,phoneRow:C,columns:f,columnsTablet:H,separator:h,stackBelow:ce,blockSpacing:ho,bgImage:tn,bgImagePhone:rn,rowImage:ln,hoverShow:cn,pictureHover:V,darken:Ae,darkenStyle:ae,darkenTablet:an,darkenPhone:dn,darkenStyleTablet:un,darkenStylePhone:mn,placement:fn,padV2:Co=!1,border:hn,borderTablet:Cn,borderPhone:bn,borderUnits:bo,pad:r={},contained:$e=!0,fillHeight:_=!1,shadow:Le,shadowTablet:po,shadowPhone:So,justifyTablet:wo,justifyPhone:pn,alignTablet:Sn,alignPhone:wn,wrapTablet:xo,blockSpacingTablet:xn,blockSpacingPhone:_n,loop:b,scrollDirection:ye=gr,loopSeconds:vn=Tr,loopDelay:On=Br,editing:k=!1,fillColor:_o,fillColorTablet:Pn,fillColorPhone:Rn,fillFade:An,swatch:$n,line:v,upcoming:Ln,link:yn,rowLink:vo,highlight:Nn,boxShape:Ne,boxShapePhone:Oo,boxShapeTablet:Po,angle:En,jumpHighlight:kn,anchor:Ro,sharedSides:In=Js,sharedRows:Bn=!1,boxId:M,slotCount:gn,mirrorCards:Ao,content:c,rowTitle:Ee,startsOpen:Tn,rowStyle:Fn,sideSpace:Dn}){const n=Zt(),I=Wr({[x]:ln},n!==null)[x],$o=Ws({[x]:I}),d=$o?Js:In,Hn=$o?!1:Bn,Lo=jr({[x]:I},n?.row),p=Lo??tn,ke=Lo===null?rn:void 0,yo=vt(Fs),Vn=nr(),No=lr()&&!(Vn&&n!==null),O=tr(),u=mr({inCopy:n!==null,nestedCopy:n?.nested===!0,underBox:No}),Ie=cn===$l&&n!==null&&!u&&!(k&&n.previewHover===!0),Eo=to(hn,n,u),ko=to(Cn,n,u),Io=to(bn,n,u),Bo=n===null&&!No&&O?.ids&&M?O.ids.indexOf(M):-1,de=Bo>=0&&O&&M?sr(O,M,Bo):-1,S=de>=0?O?.hand??null:u&&O?.copies===!0?O.hand:null,o=S?.row?"row":m,a=S?.row?S.row.share:on,Mn=S?.row?S.row.phoneReverse?[...c.blockIds??[]].reverse():void 0:nn,ue=Hn&&!S?.row,G=k?"":vo&&n?Qt(n.row,vo)??"":dl(yn),P=_?"":sl(Ne,Oo,Po),Gn=!_&&ol(Ne)!=="",B=al(kn,Ro),Be=Kr({swatch:$n},n?.row),Y=Be??Vr(_o),g=Be?{className:"",style:{}}:Gr(_o,Pn,Rn),Xn=bl(),go=Cl(Be,Xn??void 0),Wn=_e(p)||_e(ke),jn=(Y||g.className)&&!Wn?Mr(An):null,To=Y||g.className?{...Y?{backgroundColor:Y}:{},...g.style,...jn,...go}:void 0,Fo=El(),J=v===!0&&o!=="tabs"&&o!=="accordion",t=Ws({bgImage:p,[x]:I}),Do=tl(En),Ho=t?void 0:To,me=t?null:Nn??null,Vo=_?null:nl(Ne,Oo,Po),Kn=Do||me||Vo?{...Ho,...Do,...me,...Vo}:Ho,fe=Jt(),Un=Wt(),zn=Et(),Mo=Lt(),Go=$t(),Yn=Nt(),Jn=yt(),l=o==="accordion",ge=Ft(Fn),Z=l&&ge==="numbered",Te=l&&ge==="chevron",Fe=Mt(),Xo=Vt(),X=Ir(o,h),i=b==="scroll"&&o!=="tabs"&&!l,Zn=rr(),he=u||de>=0&&S!==null,Wo=S?S.mirror:Ao,qn=de>=0?de:n?.index,q=u&&qt(n?.ownerType),jo=Hs({direction:o,separator:h,loop:b,line:v,bgImage:p,[x]:I,columns:f,columnsTablet:H,share:a,wrap:ie},he,d.desktop)&&cr(Wo,qn),Qn=Hs({direction:o,separator:h,loop:b,line:v,bgImage:p,[x]:I,columns:f,columnsTablet:H,share:a,wrap:ie},he,d.desktop)&&ar(Wo)!==null,W=Or({direction:o,separator:h,loop:b,line:v,columns:f}),T=Pr({direction:o,separator:h,loop:b,line:v,columnsTablet:H}),Q=Rr({direction:o,separator:h,loop:b,line:v,columns:f,columnsTablet:H,share:a,shareTablet:D}),Ce=Cr(Dn),De=Ce!=="box",He=fr(Ce),Ko=Kl(),Uo=J&&io(ce)===Ml,j=o==="row"&&!t&&!X&&!i&&(!J||Uo)&&T===""&&Q===""?io(ce):void 0,K=j??(o==="column"&&!t?io(ce):void 0),et=Xt(),be=Il(d,c.blockCount??0,j),ot=(be&&(!n||n.index===0)?Bl(d,c.blockCount??0,j):"")+(ue&&(!n||n.index===0)?Tl(ue,c.blockCount??0):""),zo=gl(ue,c.blockCount??0),Yo=T!==""?Number(H)>=2:Q===""||L(D)!=="",Jo=T!==""||Q!=="",Ve=o==="row"&&!X&&!i&&v!==!0,Me=Ve&&!d.phone&&!d.desktop?Dt(Ht(Mn,c.blockIds??[]),{editing:k}):void 0,Zo=Me!==void 0&&!k,st=W!==""?Number(f)>=2:L(a)!=="",qo=!t&&!l&&!Qn&&!d.desktop&&!d.phone,pe=qo&&!i?xr(z,wo,pn):"",Ge=t||he?"":dr(Zn,o,i?void 0:z,E,pe?wo:void 0),nt=/view-wide:max-view-desktop:justify-/.test(Ge)?pe.split(" ").filter(s=>!s.startsWith("view-wide:max-view-desktop:justify-")).join(" "):pe,tt=qo&&o==="row"?pr(E,Sn,wn):"",Qo=Xo&&o==="column"&&!t&&!i&&!l,Xe=typeof z=="string"&&z!=="start"||pe!=="",es=Qo&&Xe&&L(a)!=="",os=Qo&&!Xe&&L(a)!==""&&(c.blockCount??0)===1,rt=!i&&!l&&W===""&&T===""&&!d.desktop?_r(ie,xo):"",ss=[l||es?"":L(a),o==="row"?vr(a):"",W,T,Q,Sr(l?"gap":ho),Nr(o,h),l&&!Z&&!Te?"border-t border-line":"",nt,tt,rt,l?"":wr(ho,xn,_n),l?Ms(f,C,Z||Te):"",Z?It:""].filter(Boolean).join(" "),lt=ss?` ${ss}`:"",ns=["flex",o==="row"?X||i?"flex-row":`flex-row ${le(C,F,sn,xo)}`:"flex-col",Lr(i||l?!1:ie),t?Xr(fn??"center",o):br(i||l?void 0:z,l?void 0:E)+(Ge?` ${Ge}`:"")].join(" ")+lt,ee=_||t||P||Fe?` ${Pe}`:"",We=Gn?` ${P}`:P?`${ee} ${P}`:ee,ts=Xo&&o==="column"&&!t&&!i&&L(a)===""&&Xe||es,rs=ee||(ts||os?` ${Pe}`:""),je=G?` ${ll}`:"",Ke=t||fe||Co?"":" py-6",it=j===void 0?"":` ${jl(j)}`,ls=K===void 0||De?"":` ${Gl(K)}`,Ue=K===void 0?"":` ${Wl(K)}`,ct=`${ro}${Ke} ${He}${We}${je}${ls}${Ue}`,at=fe?`${We}${je}${Ue}`.trim():`w-full${Ke}${We}${je}${Ue}`,oe=(Z||Te)&&Ms(f,C)===""?Vs("Flex",0,"block"):Vs("Flex",fo,o==="row"?"inline":"block",en,X||i?void 0:Re),is=$r(a,D,o==="row"?c.blockCount??0:0),cs=X?{...oe.style,...kr(o,h)}:oe.style,dt=is?{...cs,...is}:cs,ze=(s="")=>e(c,{className:`${ns}${jo?` ${ur}`:""}${oe.className}${rs}${it}${s?` ${s}`:""}${J?` ${Nl}`:""}${B?` ${il(B)}`:""}${be}${zo}`,style:dt,minEmptyHeight:120,...Me?{cell:Me}:null}),as=Fr(ye)?"":Er(o,h),ds=i?e(Dr,{direction:ye,seconds:vn,delay:On,editing:k,copy:s=>ze(s&&as?`${s} ${as}`:s)}):Z?$(A,{children:[e("style",{children:gt}),ze()]}):ze(),Ye=o==="tabs"?e(Pt,{className:`${ns}${oe.className}${Fe&&!_&&!t&&!P?"":ee}`,style:oe.style,shape:Qs,children:ds}):ds,Je=l?e(no.Provider,{value:"accordion",children:e(so.Provider,{value:ge,children:Ye})}):Mo?e(no.Provider,{value:!1,children:e(so.Provider,{value:"plain",children:Ye})}):Ye,us=o==="row"&&!t&&(E===void 0||E==="stretch"),ut={stretchedRow:us,fillingColumn:o==="column"&&(Fe||ts),columnsRow:W!==""||T!==""||be!==""||zo!==""||o==="row"&&(Array.isArray(a)||Array.isArray(D))||Zo,...Zo?{phoneCells:!0}:null,...us&&Ve&&(c.blockCount??0)>=2&&st||os?{picturesFillRow:!0}:null,...Jo&&!Yo?{fillFrom:"desktop"}:null,...Ar(C,F)&&(!Jo||Yo)?{phoneRowFills:!0}:null,...Ve&&Gs(C,F)?{phoneRowFits:!0}:null,...i?{loops:!0}:null,...M?{id:M}:null},ms=n===null?ir({direction:o,loop:b,bgImage:p,[x]:I,columns:f,mirrorCards:Ao},!1):null,fs=ms?e(Ds.Provider,{value:{hand:ms,ids:c.blockIds??[],boxes:[]},children:Je}):O?e(Ds.Provider,{value:null,children:Je}):Je,hs=Bt(Ro),Cs=e(gs.Provider,{value:ut,children:e(Bs.Provider,{value:!1,children:he?e(or.Provider,{value:jo,children:e(er.Provider,{value:!u,children:fs})}):fs})}),bs=hs?e(Rt.Provider,{value:hs,children:Cs}):Cs,mt=Ee?.blockCount??0,ps=Mo==="accordion"&&!!Ee&&(k||mt>0)?e(kt,{startsOpen:Tn===!0||Yn&&u&&n?.index===0,editing:k,numbered:Go==="numbered",chevron:Go==="chevron",anchor:u?At(Jn,n):void 0,title:e(gs.Provider,{value:zl,children:e(Bs.Provider,{value:!1,children:e(no.Provider,{value:!1,children:e(so.Provider,{value:"plain",children:e(Ee,{className:`min-w-0 flex-1 ${yr}`,minEmptyHeight:24})})})})}),children:bs}):bs,Ze=J?e(Ll,{row:o==="row",stops:c.blockCount??0,desktopLine:j!==void 0&&Uo,children:ps}):ps,ft=qs?.trim()||(zn?"":void 0),ht={values:r,frame:Ke?24:0},Ct=s=>Fo?e(yl,{on:Fo,future:Ln===!0,children:s}):s,bt=s=>ul(G)?e(ml,{href:G,newTab:"auto",className:Ks,"aria-labelledby":s,[js]:""}):e("a",{href:G,className:Ks,"aria-labelledby":s,[js]:""}),Ss=(B?cl(B):"")+ot+(K===void 0||n&&n.index!==0?"":Xl(K,{gutter:!De})),ws=Ss?e("style",{dangerouslySetInnerHTML:{__html:Ss}}):null,se=Qr({loop:b,direction:o,scrollDirection:ye,bgImage:p,[x]:I}),pt=d.desktop&&be!==""&&!Y&&!g.className&&!Us(Eo,Io,ko,bo)&&!Zr(Le,po,So)&&!G&&!P&&!_&&!B&&!el($e&&!se,et)&&mo(fo)&&(uo(Re)||mo(Re))&&Co&&Object.values(r).every(s=>uo(s)||mo(s)),St=s=>({...Tt,...pt?{[kl]:""}:null,...t?null:{...Jr(Le),...qr(Le,po,So)},...B?{[rl]:B}:null,...s?{id:s}:null}),xs=W!==""?Number(f):0,wt=le(C,F)===le(void 0),xt=(o==="column"||o==="row"&&!X&&!i&&(xs===1&&wt||xs===0&&c.blockCount===1))&&!t&&!J&&!fe,_s=t&&Un&&!fe,Se=!t&&n!==null?Xs(Ae,ae):null,vs=Ie||Se?$(A,{children:[Ie?e(zs,{sheet:Sl,name:wl}):null,Se?e("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 -z-10 rounded-[inherit]",style:Se}):null]}):null,Os=[Ie?pl:"",Se?"relative isolate":""].filter(Boolean).join(" "),Ps=s=>vs?$(A,{children:[vs,s]}):s,Rs=(s,R)=>Ct(e(Gt,{contained:$e&&!se,style:se?ao:void 0,framedClass:ct,fillClass:at,columnClass:`${ro} ${He}${rs}${ls}`,tabLabel:ft,pad:t?void 0:ht,border:Us(Eo,Io,ko,bo),outerAttrs:St(R),box:!0,edge:xt&&Ce!==hr,outerStyle:Kn,outerClass:t?Os||void 0:[g.className,me?Rl:"",me&&go?Al:"",Os].filter(Boolean).join(" ")||void 0,bleed:_s,siteSide:De,part:co("box"),children:ws||R?$(A,{children:[ws,R?bt(R):null,se?e(Ts,{children:s}):s]}):se?e(Ts,{children:s}):s})),qe=s=>G?e(Yl,{children:R=>Rs(Ps(s),R)}):Rs(Ps(s)),As=s=>yo.bound?e(Ut,{children:s}):s;if(!t){const s=E===void 0||E==="stretch",R=(L(a)!==""||W!==""||T!=="")&&!Gs(C,F)&&!(Q!==""&&L(D)==="")&&(s||le(C)!==le(void 0));if(!(o==="row"?R:o==="column"&&s))return qe(As(Ze));const Is=zt({direction:o,separator:h,loop:b,line:v,share:a,shareTablet:D,sharePhone:F,phoneRow:C,columns:f,columnsTablet:H,stackBelow:ce,shared:d.desktop||d.phone||ue,count:gn}),_t={hasWidth:!0,...Is?{bound:Yt(Is,yo.bound)}:null};return qe(e(Fs.Provider,{value:_t,children:Ze}))}const ne=_e(p),te=ne?Xs(Ae,ae):null,we=ne?Ur({darken:Ae,darkenStyle:ae,darkenTablet:an,darkenStyleTablet:un,darkenPhone:dn,darkenStylePhone:mn}):{className:"",style:{}},Qe=_e(ke),$s=ne?Qe?{"--sf-box-bg":lo(p??""),"--sf-box-bg-p":lo(ke??"")}:{backgroundImage:lo(p??""),backgroundSize:"cover",backgroundPosition:"center"}:{},Ls=_l(void 0,void 0,V),U=Ls.className?Ls:null,xe=ne&&n&&V?.kind==="nextImage"&&V.media?Pl(n,V.media):null,w=ne?Vl(V,ae)??(xe?Fl:null):null,ys=V?.media?.cover??"picture",eo=xe?e("div",{className:`absolute inset-0 isolate${q?" rounded-[inherit]":""}`,children:e(vl,{media:xe,cover:ys,ground:Ol[ys]})}):null,re=U!==null||!!w?.zoom,Ns=re?e("div",{"aria-hidden":!0,className:`absolute inset-0${q?" rounded-[inherit]":""}${Qe?` ${Zs}`:""}${U?` ${U.className}`:""}`,style:{...$s,...U?.style??{}}}):null,oo=fl({...r,top:ve(r.top)??N(y.desktop,r.unit,"desktop"),bottom:ve(r.bottom)??N(y.desktop,r.unit,"desktop"),topPhone:ve(r.topPhone)??N(y.phone,r.unitPhone,"mobile"),bottomPhone:ve(r.bottomPhone)??N(y.phone,r.unitPhone,"mobile"),left:Oe(r.left)??N(y.side,r.unit,"desktop"),right:Oe(r.right)??N(y.side,r.unit,"desktop"),leftPhone:Oe(r.leftPhone)??N(y.sidePhone,r.unitPhone,"mobile"),rightPhone:Oe(r.rightPhone)??N(y.sidePhone,r.unitPhone,"mobile"),sideSpace:Ce}),Es=e("div",{className:`relative z-[1] ${Hr} ${Ys(oo?.className??"",Ko)}${_||P?` ${Pe}`:""}`.trimEnd(),style:te?{...oo?.style,...ao,...hl}:{...oo?.style,...ao},...co("card-content"),children:As(Ze)}),ks=_s&&$e?e("div",{className:Ys(`${ro} ${He}${_||P?` ${Pe}`:""}`,Ko),children:Es}):Es;return qe(e(A,{children:$("div",{className:`relative isolate overflow-hidden ${Yr}${n!==null&&!u?` ${zr}`:""}${ee}${Qe&&!re?` ${Zs}`:""}${g.className?` ${g.className}`:""}${w?` ${w.className}`:""}`,style:{...q?Ul:{},...To,...re?{}:$s,...w?w.style:{}},...U||xe?{[xl]:""}:{},...co("card"),children:[e(Dl,{move:w}),re&&$(A,{children:[e(zs,{sheet:U?.sheet}),w?.zoom?e("div",{className:`absolute inset-0 overflow-hidden${q?" rounded-[inherit]":""}`,children:$(Hl,{move:w,className:"absolute inset-0",children:[Ns,eo]})}):$(A,{children:[Ns,eo]})]}),!re&&eo,e(Kt,{wash:te&&we.className?{...te,...we.style}:te,hover:w?.washHover,...q?{className:"rounded-[inherit]"}:{},...we.className?{restClassName:we.className}:{}}),te?e(jt,{children:ks}):ks]})}))}export{Jl as default};
@@ -10,6 +10,9 @@ interface GridProps {
10
10
  fillHeight?: boolean;
11
11
  content: SlotComponent;
12
12
  pad?: RootPadAttrs | null;
13
+ layout?: unknown;
14
+ carouselTile?: unknown;
15
+ carouselTilePhone?: unknown;
13
16
  }
14
- export default function Grid({ columns, mobileColumns, gap, gapPhone, gapTablet, contained, fillHeight, content: Content, pad, }: GridProps): import("react").JSX.Element;
17
+ export default function Grid({ columns, mobileColumns, gap, gapPhone, gapTablet, contained, fillHeight, content: Content, pad, layout, carouselTile, carouselTilePhone, }: GridProps): import("react").JSX.Element;
15
18
  export {};
@@ -1 +1 @@
1
- import{jsx as s}from"react/jsx-runtime";import{FRAME_BASE as i,FRAME_GUTTER as m}from"./BlockFrame.js";import{SlotsStartAfresh as G,useFillsCell as A}from"./InBoxContext.js";import E from"./SiteGutterFrame.js";import{containerGapProps as F}from"../../format/lib/content/container-gap.js";import{resolveGridColumns as N,resolveGridMobileColumns as _}from"../../format/lib/content/grid-span.js";import{SECTION_FILL_CLASS as x}from"../../format/lib/content/section-min-height.js";import{partAttr as R}from"../../format/lib/content/part-names.js";import{withRootPad as a}from"../lib/content/section-own-pads.js";function b({columns:o,mobileColumns:n,gap:f,gapPhone:c,gapTablet:p,contained:d=!0,fillHeight:C=!1,content:u,pad:t}){const $=A(),r=C||$?` ${x}`:"",l=a(`${i} py-6 ${m}${r}`,t),g=l.className,S=a(`w-full py-6${r}`,t).className,h=N(o),y=_(n,o),e=F("Grid",f,"both",c,p);return s(E,{contained:d,framedClass:g,fillClass:S,columnClass:`${i} ${m}${r}`,style:l.style,box:!0,part:R("grid"),children:s(G,{children:s(u,{className:`sf-grid-zone grid${e.className}${r}`,style:{...e.style,"--sf-grid-cols":String(h),"--sf-grid-cols-phone":String(y)},minEmptyHeight:120})})})}export{b as default};
1
+ import{jsx as o}from"react/jsx-runtime";import{FRAME_BASE as n,FRAME_GUTTER as f}from"./BlockFrame.js";import{SlotsStartAfresh as N,useFillsCell as T}from"./InBoxContext.js";import F from"./GridCarousel.js";import O from"./SiteGutterFrame.js";import{CAROUSEL_TILE_DEFAULT as R,CAROUSEL_TILE_PHONE_DEFAULT as P,carouselTileOf as c,gridLayoutOf as U}from"../../format/lib/content/grid-carousel.js";import{containerGapProps as x}from"../../format/lib/content/container-gap.js";import{resolveGridColumns as I,resolveGridMobileColumns as b}from"../../format/lib/content/grid-span.js";import{SECTION_FILL_CLASS as w}from"../../format/lib/content/section-min-height.js";import{partAttr as M}from"../../format/lib/content/part-names.js";import{withRootPad as t}from"../lib/content/section-own-pads.js";function j({columns:l,mobileColumns:p,gap:d,gapPhone:u,gapTablet:C,contained:E=!0,fillHeight:y=!1,content:e,pad:s,layout:S,carouselTile:g,carouselTilePhone:A}){const L=T();if(U(S)==="carousel"){const a=t("py-6",s);return o(F,{content:e,tile:c(g,R),tilePhone:c(A,P),className:a.className,style:a.style})}const r=y||L?` ${w}`:"",i=t(`${n} py-6 ${f}${r}`,s),_=i.className,$=t(`w-full py-6${r}`,s).className,h=I(l),G=b(p,l),m=x("Grid",d,"both",u,C);return o(O,{contained:E,framedClass:_,fillClass:$,columnClass:`${n} ${f}${r}`,style:i.style,box:!0,part:M("grid"),children:o(N,{children:o(e,{className:`sf-grid-zone grid${m.className}${r}`,style:{...m.style,"--sf-grid-cols":String(h),"--sf-grid-cols-phone":String(G)},minEmptyHeight:120})})})}export{j as default};
@@ -0,0 +1,9 @@
1
+ import type { SlotComponent } from "efficient-easel/blocks";
2
+ export interface GridCarouselProps {
3
+ content: SlotComponent;
4
+ tile: number;
5
+ tilePhone: number;
6
+ className: string;
7
+ style?: React.CSSProperties;
8
+ }
9
+ export default function GridCarousel({ content: Content, tile, tilePhone, className, style }: GridCarouselProps): import("react").ReactNode;
@@ -0,0 +1 @@
1
+ "use client";import{jsx as l,jsxs as S}from"react/jsx-runtime";import{useTakeViewHide as b,withViewHide as k}from"./ViewHideRoot.js";import{useCallback as E,useRef as A,useState as L}from"react";import C from"./HeroArrows.js";import{carouselOffset as N,carouselStep as I}from"../../format/lib/content/grid-carousel.js";import{partAttr as T}from"../../format/lib/content/part-names.js";const X="sf-carousel-cell [grid-area:1/1] justify-self-center w-[calc(var(--sf-carousel-tile)*1vw)] max-view-wide:w-[calc(var(--sf-carousel-tile-phone)*1vw)] [transform:translateX(calc(var(--sf-carousel-off)*(100%+8.5vw)))] max-view-wide:[transform:translateX(calc(var(--sf-carousel-off)*(100%+4vw)))] transition-[transform,opacity] duration-(--motion-base) ease-out motion-reduce:transition-none",j="[&_[data-part=text-block]]:opacity-0 [&_[data-part=text-block]]:transition-opacity",D="invisible opacity-0 transition-none",H="pointer-events-none absolute inset-0 [&_.sf-hero-overlay-rail]:inset-0 [&_.sf-hero-overlay-rail]:translate-x-0 [&_.sf-hero-overlay-rail]:translate-y-0 [&_.sf-hero-overlay-rail]:pointer-events-none [&_[data-hero-nav]]:pointer-events-auto [&_[data-hero-nav]]:absolute [&_[data-hero-nav]]:top-1/2 [&_[data-hero-nav]]:-translate-y-1/2 [&_[data-hero-nav=prev]]:left-[calc(25vw-64px)] [&_[data-hero-nav=next]]:right-[calc(25vw-64px)]",u=40;function R({content:c,tile:f,tilePhone:d,className:v,style:h}){const[p,m]=L(0),s=A(null),i=c.blockIds??[],a=i.length,o=E(e=>m(t=>I(t,e,a)),[a]),n=b(),w=e=>{const t=N(i.indexOf(e),p,a);return{className:`${X} ${t===null?D:t===0?"sf-carousel-at-0":j}`,style:{"--sf-carousel-off":String(t??0)}}},_=e=>{const t=e.target.closest?.("[data-hero-nav]")?.getAttribute("data-hero-nav");t==="prev"?o(-1):t==="next"&&o(1)},y=e=>{e.key==="ArrowLeft"?o(-1):e.key==="ArrowRight"&&o(1)},g=e=>{s.current=e.touches[0]?.clientX??null},x=e=>{const t=s.current;s.current=null;const r=e.changedTouches[0]?.clientX;t===null||r===void 0||(r-t>u?o(-1):t-r>u&&o(1))};return n.scope(S("div",{className:k(`sf-grid-carousel relative w-full overflow-hidden ${v}`,n.className),"data-grid-layout":"carousel",role:"region","aria-roledescription":"carousel",tabIndex:0,style:{...h,"--sf-carousel-tile":String(f),"--sf-carousel-tile-phone":String(d)},onClick:_,onKeyDown:y,onTouchStart:g,onTouchEnd:x,...T("grid"),...n.attrs,children:[l(c,{className:"sf-grid-carousel-track grid",cell:w,minEmptyHeight:120}),a>1?l("div",{className:H,children:l(C,{shape:"bare",placement:"center"})}):null]}))}export{R as default};
@@ -1,14 +1,11 @@
1
- import type { MouseEvent, Ref } from "react";
2
- import { type HeroArrowDirection, type HeroArrowShape } from "../../format/lib/hero-arrows.js";
1
+ import type { Ref } from "react";
2
+ import { type HeroArrowShape } from "../../format/lib/hero-arrows.js";
3
3
  import type { PartAttr } from "../../format/lib/content/part-names.js";
4
4
  export interface HeroArrowsProps {
5
5
  shape?: HeroArrowShape | string;
6
6
  placement?: string;
7
7
  ref?: Ref<HTMLDivElement>;
8
- labels?: Readonly<Record<HeroArrowDirection, string>>;
9
- onPress?: (direction: HeroArrowDirection, event: MouseEvent<HTMLButtonElement>) => void;
10
- sides?: boolean;
11
8
  part?: PartAttr;
12
9
  buttonPart?: PartAttr;
13
10
  }
14
- export default function HeroArrows({ shape, placement, ref, labels, onPress, sides, part, buttonPart }: HeroArrowsProps): import("react").JSX.Element;
11
+ export default function HeroArrows({ shape, placement, ref, part, buttonPart }: HeroArrowsProps): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as t}from"react/jsx-runtime";import{UiIcon as i}from"efficient-easel/draw/client";import{arrowButtonClass as v,arrowsRailClass as d,HERO_ARROW_DIRECTIONS as R,HERO_ARROW_LABELS as c}from"../../format/lib/hero-arrows.js";const b={prev:"pointer-events-auto absolute left-3 top-1/2 -translate-y-1/2",next:"pointer-events-auto absolute right-3 top-1/2 -translate-y-1/2"};function h({shape:n,placement:l,ref:s,labels:u=c,onPress:a,sides:r=!1,part:f,buttonPart:p}){const o=v(n);return t("div",{ref:s,className:r?void 0:d(l),style:{color:"var(--overlay-fg)"},...f,children:R.map(e=>t("button",{type:"button","data-hero-nav":e,"aria-label":u[e],className:r?`${b[e]} ${o}`:o,onClick:a?m=>a(e,m):void 0,...p,children:t(i,{name:"chevron-right",size:18,rounded:!0,style:e==="prev"?{rotate:"180deg"}:void 0})},e))})}export{h as default};
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import{UiIcon as u}from"efficient-easel/draw/client";import{arrowButtonClass as m,arrowsRailClass as f,HERO_ARROW_DIRECTIONS as i,HERO_ARROW_LABELS as R}from"../../format/lib/hero-arrows.js";function c({shape:a,placement:o,ref:t,part:s,buttonPart:l}){const n=m(a);return e("div",{ref:t,className:f(o),style:{color:"var(--overlay-fg)"},...s,children:i.map(r=>e("button",{type:"button","data-hero-nav":r,"aria-label":R[r],className:n,...l,children:e(u,{name:"chevron-right",size:18,rounded:!0,style:r==="prev"?{rotate:"180deg"}:void 0})},r))})}export{c as default};
@@ -27,6 +27,9 @@ interface Props {
27
27
  wordsBottomTablet?: number;
28
28
  autoplay?: boolean;
29
29
  autoplayInterval?: number;
30
+ slideChange?: unknown;
31
+ scrollPerSlide?: unknown;
32
+ slideEffect?: unknown;
30
33
  showTicker?: boolean;
31
34
  tickerItems?: {
32
35
  text?: string;
@@ -46,4 +49,4 @@ interface Props {
46
49
  editing?: boolean;
47
50
  partMotion?: Record<string, unknown>;
48
51
  }
49
- export default function HeroSection({ slides: Slides, strip: Strip, alignment, textureOpacity, showTexture, textureColor, textureShape, phoneUpDown, phoneSideways, phoneWordsTop, phoneWordsBottom, phoneBoxGap, wordsTop, wordsBottom, wordsTopTablet, wordsBottomTablet, autoplay, autoplayInterval, showTicker, tickerItems, heightDesktop, heightTablet, heightMobile, heightFixed, heightFixedTablet, heightFixedMobile, showPicker, pickerShape, pickerPlacement, showArrows, arrowsShape, arrowsPlacement, editing, partMotion, }: Props): import("react").JSX.Element;
52
+ export default function HeroSection({ slides: Slides, strip: Strip, alignment, textureOpacity, showTexture, textureColor, textureShape, phoneUpDown, phoneSideways, phoneWordsTop, phoneWordsBottom, phoneBoxGap, wordsTop, wordsBottom, wordsTopTablet, wordsBottomTablet, autoplay, autoplayInterval, slideChange, scrollPerSlide, slideEffect, showTicker, tickerItems, heightDesktop, heightTablet, heightMobile, heightFixed, heightFixedTablet, heightFixedMobile, showPicker, pickerShape, pickerPlacement, showArrows, arrowsShape, arrowsPlacement, editing, partMotion, }: Props): import("react").JSX.Element;
@@ -1 +1 @@
1
- "use client";import{jsx as n,jsxs as $}from"react/jsx-runtime";import{HideTaker as qe}from"./ViewHideRoot.js";import{useCallback as v,useEffect as k,useId as Fe,useRef as u,useState as y}from"react";import{markOverlayPortal as se}from"../../format/lib/document/overlay-portal.js";import Ke from"./Ticker.js";import{HeroSlideStyleContext as Je}from"./HeroSlide.js";import{heroPhoneFrame as Qe}from"../lib/hero-poster-sizes.js";import Ue from"./HeroArrows.js";import We from"./Reel.js";import{TICKER_PART_ATTR as Ze}from"./PreviewTickerContext.js";import{useReducedMotion as et}from"./useReducedMotion.js";import{heroHeightBox as tt,heroStoresRatio as rt}from"../../format/lib/content/section-height.js";import{HEADER_HEIGHT_CSS as ot}from"../lib/document/header-clearance.js";import{nextReel as nt,normaliseHeroReelShape as st,reelShown as ct}from"../../format/lib/reel.js";import{arrowsShown as at,arrowStep as lt}from"../../format/lib/hero-arrows.js";import{swipeEnabled as it,swipeStep as ut}from"../../format/lib/hero-swipe.js";import{videoControlShown as mt,videoHeld as dt}from"../../format/lib/hero-video-control.js";import{HERO_SLIDER_GOTO_EVENT as B}from"efficient-easel/draw";import{say as ce}from"../../format/lib/editor-words.js";import{markedChildren as ae}from"../../format/lib/marked-children.js";import{legacyTickerDrawn as ft,TICKER_MOTION_PART as le}from"../../format/lib/hero-ticker.js";import{ON_MEDIA_INK_STYLE as ht}from"../../format/lib/content/ink.js";import{HeroPartBox as pt,heroPartScroll as vt}from"./HeroPictures.js";import{entranceDrawn as bt}from"../lib/animation/entrance.js";import{readPartMotion as xt}from"../lib/animation/part-motion.js";import{scrim as ie}from"../../format/lib/content/scrim.js";import{partAttr as b}from"../../format/lib/content/part-names.js";const wt="Play video",kt="Hold video",yt="flex h-7 cursor-pointer items-center gap-1.5 rounded-full border border-overlay-chrome/25 bg-overlay-scrim/80 px-[11px] font-mono text-[11px] leading-none tracking-[0.05em] text-overlay-fg",Et=()=>ce("item"),ue=new Map;function gt(d,l){const m=d?.ownerDocument?.defaultView;if(m)return m.addEventListener(B,l),()=>m.removeEventListener(B,l)}function _t({slides:d,strip:l,alignment:m,textureOpacity:T,showTexture:S,textureColor:O,textureShape:me,phoneUpDown:de,phoneSideways:fe,phoneWordsTop:he,phoneWordsBottom:pe,phoneBoxGap:ve,wordsTop:be,wordsBottom:xe,wordsTopTablet:we,wordsBottomTablet:ke,autoplay:z,autoplayInterval:H,showTicker:ye,tickerItems:X,heightDesktop:Ee,heightTablet:ge,heightMobile:G,heightFixed:_e,heightFixedTablet:Re,heightFixedMobile:Y,showPicker:Te,pickerShape:Se,pickerPlacement:Oe,showArrows:He,arrowsShape:Ne,arrowsPlacement:Ae,editing:s,partMotion:j}){const q=tt({heightDesktop:Ee,heightTablet:ge,heightMobile:G,heightFixed:_e,heightFixedTablet:Re,heightFixedMobile:Y}),{className:Le,style:Pe}=q,N=rt(q),F=(l?.blockCount??0)>0,Me=!F&&ft({showTicker:ye,tickerItems:X}),K=(X??[]).map(e=>e?.text?.trim()?e.text:s?Et():"").filter(Boolean),Ce=bt(xt({_partMotion:j},le)),De=vt(j,le),f=u(null),J=u(null),Q=u(null),A=u(null),U=Fe(),L=u(U),[E,Ie]=y([]),[Ve,W]=y(0),x=u(0),[Z,ee]=y(!1),[$e,te]=y(null),[g,Be]=y(!1),P=et(),_=v(()=>f.current?.querySelector(".hero-track")??null,[]),i=v((e,t=!1)=>{W(e),te(o=>o===e?o:null),x.current=e,ue.set(L.current,e);const r=f.current?.querySelector(".hero-track");if(r)if(t){const o=r.style.transition;r.style.transition="none",r.style.transform=`translateX(-${Math.max(0,e)*100}%)`,r.offsetHeight,r.style.transition=o}else r.style.transform=`translateX(-${Math.max(0,e)*100}%)`},[]);k(()=>{const e=f.current,t=e?.getAttribute("data-easel-block")||e?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||U;L.current=t;const r=ue.get(t);typeof r=="number"&&(W(r),x.current=r)},[]),k(()=>{const e=_();if(!e)return;const t=()=>{Ie(o=>nt(o,ae(e,"data-slide-name")))};t();const r=new MutationObserver(t);return r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-slide-name","data-slide-process","data-slide-media"]}),()=>{r.disconnect()}},[_]),k(()=>{if(!s)return;const e=t=>{const r=t.detail;if(!r||typeof r.index!="number")return;const o=f.current,p=o?.getAttribute("data-easel-block")||o?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||L.current;r.id&&r.id!==p||i(r.index,!0)};return gt(f.current,e)},[s,i]);const c=E.length,a=Math.min(Math.max(Ve,0),Math.max(0,c-1)),M=$e===a,C=ct({shown:Te,count:c}),re=at({shown:He,count:c}),oe=mt({editing:s,shown:a,slides:E}),ze=dt({editing:s,playing:g,controlShown:oe}),R=it({count:c,editing:s}),h=u(null),w=u(null),Xe=v(e=>{if(h.current=null,w.current=null,!R||e.touches.length!==1)return;const t=e.touches[0];h.current={x:t.clientX,y:t.clientY},w.current={x:t.clientX,y:t.clientY}},[R]),Ge=v(e=>{if(!h.current)return;if(e.touches.length!==1){h.current=null;return}const t=e.touches[0];w.current={x:t.clientX,y:t.clientY}},[]),Ye=v(()=>{const e=h.current,t=w.current;if(h.current=null,w.current=null,!R||!e||!t)return;const r=ut(t.x-e.x,t.y-e.y,x.current,c);r!==x.current&&i(r)},[R,c,i]);k(()=>{if(s||!z||Z||M||P||c<=1)return;const t=Math.max(1,typeof H=="number"?H:6)*1e3,r=window.setTimeout(()=>i((a+1)%c),t);return()=>window.clearTimeout(r)},[s,z,H,Z,M,P,c,a,i]),k(()=>{const e=[J.current,Q.current,A.current].filter(Boolean),t=e.map(o=>se(o)),r=o=>{const p=o.target,D=p.closest("[data-hero-nav]");if(D&&!A.current?.contains(D))return;const I=D,ne=I??p.closest("[data-idx]");if(!ne)return;o.stopPropagation(),o.preventDefault();const V=I?lt(I.dataset.heroNav,x.current,c):Number(ne.dataset.idx);Number.isNaN(V)||(i(V,s),ae(_(),"data-slide-name")[V]?.click())};return e.forEach(o=>o.addEventListener("click",r,{capture:!0})),()=>{t.forEach(o=>o?.()),e.forEach(o=>o.removeEventListener("click",r,{capture:!0}))}},[c,i,_,s]);const je=v(e=>{if(!e)return;const t=se(e),r=o=>{o.stopPropagation(),o.preventDefault(),Be(p=>!p)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[]);return n(Je.Provider,{value:{alignment:m,textureOpacity:T,textureOn:S,textureColor:O,textureShape:me,quietVideo:ze,phoneUpDown:de,phoneSideways:fe,phoneWordsTop:he,phoneWordsBottom:pe,phoneBoxGap:ve,wordsTop:be,wordsBottom:xe,wordsTopTablet:we,wordsBottomTablet:ke,holdReel:()=>te(a),reelHeld:M,shownSlide:a,ratioMin:N,posterPhoneFrame:Qe(G,Y)},children:$(qe,{ref:f,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${Le} max-w-[var(--sf-hero-cap,none)] ${N?"overflow-clip":"overflow-hidden"}`,style:Pe,onMouseEnter:()=>ee(!0),onMouseLeave:()=>ee(!1),onTouchStart:Xe,onTouchMove:Ge,onTouchEnd:Ye,...b("hero"),children:[n(d,{className:N?"hero-track flex min-h-full [&>*]:min-h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full":"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${a*100}%)`,transition:P?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),oe&&n("div",{ref:je,"data-hero-video-control":g?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${ot} + 16px)`},children:$("button",{type:"button",className:yt,children:[n("span",{"aria-hidden":"true",children:g?"❚❚":"▶"}),ce(g?kt:wt)]})}),(C||re)&&$("div",{className:"pointer-events-none absolute inset-y-0 left-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] right-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] z-[6] mx-auto max-w-[var(--sf-hero-chrome-cap,calc(var(--sf-site-width,1600px)_-_var(--sf-site-gutter,40px)*2))]",children:[C&&n(We,{ref:J,slides:E,active:a,shape:st(Se),placement:Oe}),re&&n(Ue,{ref:A,shape:Ne,placement:Ae,part:b("arrows"),buttonPart:b("arrow")})]}),C&&n("div",{ref:Q,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",...b("dots"),children:E.map((e,t)=>n("button",{type:"button","data-idx":t,"aria-label":`Go to slide ${t+1}`,className:`h-2 rounded-full transition-all motion-reduce:transition-none ${t===a?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`,...b("dot")},t))}),F&&l&&n("div",{className:"sf-hero-strip absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10",style:{background:ie(.55),...ht},...b("strip"),children:n(l,{})}),Me&&K.length>0&&n(Rt,{editing:!!s,entrance:Ce,scroll:De,children:n(Ke,{items:K,backdrop:"dark-media"})})]})})}function Rt({editing:d,entrance:l,scroll:m,children:T}){const S="sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5",O=d?{[Ze]:""}:void 0;return n(pt,{entrance:l,scroll:m,editing:d,className:S,attrs:O,style:{background:ie(.55)},children:T})}export{B as HERO_SLIDER_GOTO_EVENT,kt as HERO_VIDEO_HOLD_LABEL,wt as HERO_VIDEO_PLAY_LABEL,_t as default,gt as subscribeSliderGoto};
1
+ "use client";import{jsx as n,jsxs as C,Fragment as ot}from"react/jsx-runtime";import{HideTaker as de}from"./ViewHideRoot.js";import{useCallback as y,useEffect as g,useId as nt,useRef as i,useState as T}from"react";import{markOverlayPortal as me}from"../../format/lib/document/overlay-portal.js";import st from"./Ticker.js";import{HeroSlideStyleContext as ct}from"./HeroSlide.js";import{heroPhoneFrame as at}from"../lib/hero-poster-sizes.js";import it from"./HeroArrows.js";import lt from"./Reel.js";import{TICKER_PART_ATTR as ut}from"./PreviewTickerContext.js";import{useReducedMotion as dt}from"./useReducedMotion.js";import{heroHeightBox as mt,heroStoresRatio as ft}from"../../format/lib/content/section-height.js";import{HEADER_HEIGHT_CSS as ht}from"../lib/document/header-clearance.js";import{nextReel as pt,normaliseHeroReelShape as vt,reelShown as wt}from"../../format/lib/reel.js";import{arrowsShown as bt,arrowStep as xt}from"../../format/lib/hero-arrows.js";import{swipeEnabled as kt,swipeStep as Et}from"../../format/lib/hero-swipe.js";import{videoControlShown as yt,videoHeld as gt}from"../../format/lib/hero-video-control.js";import{HERO_SLIDER_GOTO_EVENT as G}from"efficient-easel/draw";import{say as fe}from"../../format/lib/editor-words.js";import{markedChildren as H}from"../../format/lib/marked-children.js";import{scrollPerSlideOf as Rt,scrollSlideIndex as St,slideChangeOf as _t,slideEffectOf as Ot}from"../../format/lib/hero-slide-change.js";import{stackSlides as Tt,wipeSlides as Ht}from"../../format/lib/hero-wipe.js";import{legacyTickerDrawn as At,TICKER_MOTION_PART as he}from"../../format/lib/hero-ticker.js";import{ON_MEDIA_INK_STYLE as Lt}from"../../format/lib/content/ink.js";import{HeroPartBox as Nt,heroPartScroll as Ct}from"./HeroPictures.js";import{entranceDrawn as Pt}from"../lib/animation/entrance.js";import{readPartMotion as Mt}from"../lib/animation/part-motion.js";import{scrim as pe}from"../../format/lib/content/scrim.js";import{partAttr as R}from"../../format/lib/content/part-names.js";const Dt="Play video",It="Hold video",$t="flex h-7 cursor-pointer items-center gap-1.5 rounded-full border border-overlay-chrome/25 bg-overlay-scrim/80 px-[11px] font-mono text-[11px] leading-none tracking-[0.05em] text-overlay-fg",Vt=()=>fe("item"),ve=new Map;function zt(d,l){const m=d?.ownerDocument?.defaultView;if(m)return m.addEventListener(G,l),()=>m.removeEventListener(G,l)}function Bt({slides:d,strip:l,alignment:m,textureOpacity:S,showTexture:w,textureColor:P,textureShape:we,phoneUpDown:be,phoneSideways:xe,phoneWordsTop:ke,phoneWordsBottom:Ee,phoneBoxGap:ye,wordsTop:ge,wordsBottom:Re,wordsTopTablet:Se,wordsBottomTablet:_e,autoplay:Oe,autoplayInterval:M,slideChange:Te,scrollPerSlide:He,slideEffect:Ae,showTicker:Le,tickerItems:K,heightDesktop:Ne,heightTablet:Ce,heightMobile:Y,heightFixed:Pe,heightFixedTablet:Me,heightFixedMobile:j,showPicker:De,pickerShape:Ie,pickerPlacement:$e,showArrows:Ve,arrowsShape:ze,arrowsPlacement:Be,editing:c,partMotion:q}){const J=mt({heightDesktop:Ne,heightTablet:Ce,heightMobile:Y,heightFixed:Pe,heightFixedTablet:Me,heightFixedMobile:j}),{className:Fe,style:Xe}=J,D=ft(J),Q=(l?.blockCount??0)>0,Ge=!Q&&At({showTicker:Le,tickerItems:K}),U=(K??[]).map(e=>e?.text?.trim()?e.text:c?Vt():"").filter(Boolean),Ke=Pt(Mt({_partMotion:q},he)),Ye=Ct(q,he),b=i(null),W=i(null),Z=i(null),I=i(null),ee=nt(),$=i(ee),[A,je]=T([]),[qe,te]=T(0),p=i(0),[re,oe]=T(!1),[Je,ne]=T(null),[L,Qe]=T(!1),_=dt(),V=_t({slideChange:Te,autoplay:Oe}),f=V==="scroll"&&!c,Ue=Ot(Ae),z=Rt(He),se=i(null),ce=i(f);ce.current=f;const ae=i(_);ae.current=_;const v=y(()=>b.current?.querySelector(".hero-track")??null,[]),u=y((e,t=!1)=>{const o=p.current;te(e),ne(s=>s===e?s:null),p.current=e,ve.set($.current,e);const r=b.current?.querySelector(".hero-track");if(r){if(ce.current){Ht(H(r,"data-slide-name"),o,e,t||ae.current);return}if(t){const s=r.style.transition;r.style.transition="none",r.style.transform=`translateX(-${Math.max(0,e)*100}%)`,r.offsetHeight,r.style.transition=s}else r.style.transform=`translateX(-${Math.max(0,e)*100}%)`}},[]);g(()=>{const e=b.current,t=e?.getAttribute("data-easel-block")||e?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||ee;$.current=t;const o=ve.get(t);typeof o=="number"&&(te(o),p.current=o)},[]),g(()=>{const e=v();if(!e)return;const t=()=>{je(r=>pt(r,H(e,"data-slide-name")))};t();const o=new MutationObserver(t);return o.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-slide-name","data-slide-process","data-slide-media"]}),()=>{o.disconnect()}},[v]),g(()=>{if(!c)return;const e=t=>{const o=t.detail;if(!o||typeof o.index!="number")return;const r=b.current,s=r?.getAttribute("data-easel-block")||r?.closest("[data-easel-block]")?.getAttribute("data-easel-block")||$.current;o.id&&o.id!==s||u(o.index,!0)};return zt(b.current,e)},[c,u]);const a=A.length,h=Math.min(Math.max(qe,0),Math.max(0,a-1)),B=Je===h,F=wt({shown:De,count:a}),ie=bt({shown:Ve,count:a}),le=yt({editing:c,shown:h,slides:A}),We=gt({editing:c,playing:L,controlShown:le}),N=kt({count:a,editing:c}),x=i(null),O=i(null),Ze=y(e=>{if(x.current=null,O.current=null,!N||e.touches.length!==1)return;const t=e.touches[0];x.current={x:t.clientX,y:t.clientY},O.current={x:t.clientX,y:t.clientY}},[N]),et=y(e=>{if(!x.current)return;if(e.touches.length!==1){x.current=null;return}const t=e.touches[0];O.current={x:t.clientX,y:t.clientY}},[]),tt=y(()=>{const e=x.current,t=O.current;if(x.current=null,O.current=null,!N||!e||!t)return;const o=Et(t.x-e.x,t.y-e.y,p.current,a);o!==p.current&&u(o)},[N,a,u]);g(()=>{if(c||V!=="timer"||re||B||_||a<=1)return;const t=Math.max(1,typeof M=="number"?M:6)*1e3,o=window.setTimeout(()=>u((h+1)%a),t);return()=>window.clearTimeout(o)},[c,V,M,re,B,_,a,h,u]),g(()=>{if(!f)return;const e=v();e&&Tt(H(e,"data-slide-name"),p.current,null);let t=0;const o=()=>{t=0;const s=se.current,k=v()?H(v(),"data-slide-name").length:0;if(!s||k===0)return;const E=St(-s.getBoundingClientRect().top,z/100*window.innerHeight,k);E!==p.current&&u(E)},r=()=>{t||(t=window.requestAnimationFrame(o))};return o(),window.addEventListener("scroll",r,{passive:!0}),window.addEventListener("resize",r),()=>{t&&window.cancelAnimationFrame(t),window.removeEventListener("scroll",r),window.removeEventListener("resize",r)}},[f,z,u,v]),g(()=>{const e=[W.current,Z.current,I.current].filter(Boolean),t=e.map(r=>me(r)),o=r=>{const s=r.target,k=s.closest("[data-hero-nav]");if(k&&!I.current?.contains(k))return;const E=k,ue=E??s.closest("[data-idx]");if(!ue)return;r.stopPropagation(),r.preventDefault();const X=E?xt(E.dataset.heroNav,p.current,a):Number(ue.dataset.idx);Number.isNaN(X)||(u(X,c),H(v(),"data-slide-name")[X]?.click())};return e.forEach(r=>r.addEventListener("click",o,{capture:!0})),()=>{t.forEach(r=>r?.()),e.forEach(r=>r.removeEventListener("click",o,{capture:!0}))}},[a,u,v,c]);const rt=y(e=>{if(!e)return;const t=me(e),o=r=>{r.stopPropagation(),r.preventDefault(),Qe(s=>!s)};return e.addEventListener("click",o,{capture:!0}),()=>{t?.(),e.removeEventListener("click",o,{capture:!0})}},[]);return n(ct.Provider,{value:{alignment:m,textureOpacity:S,textureOn:w,textureColor:P,textureShape:we,quietVideo:We,phoneUpDown:be,phoneSideways:xe,phoneWordsTop:ke,phoneWordsBottom:Ee,phoneBoxGap:ye,wordsTop:ge,wordsBottom:Re,wordsTopTablet:Se,wordsBottomTablet:_e,holdReel:()=>ne(h),reelHeld:B,shownSlide:h,ratioMin:D,posterPhoneFrame:at(Y,j)},children:n(Gt,{on:f,pinRef:se,height:(d?.blockCount||a)*z,effect:Ue,children:C(de,{ref:b,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${Fe} max-w-[var(--sf-hero-cap,none)] ${D?"overflow-clip":"overflow-hidden"}${f?" sticky top-0":""}`,style:Xe,onMouseEnter:()=>oe(!0),onMouseLeave:()=>oe(!1),onTouchStart:Ze,onTouchMove:et,onTouchEnd:tt,...R("hero"),children:[n(d,{className:f?Xt:D?"hero-track flex min-h-full [&>*]:min-h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full":"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:f?void 0:`translateX(-${h*100}%)`,transition:f||_?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),le&&n("div",{ref:rt,"data-hero-video-control":L?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${ht} + 16px)`},children:C("button",{type:"button",className:$t,children:[n("span",{"aria-hidden":"true",children:L?"❚❚":"▶"}),fe(L?It:Dt)]})}),(F||ie)&&C("div",{className:"pointer-events-none absolute inset-y-0 left-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] right-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] z-[6] mx-auto max-w-[var(--sf-hero-chrome-cap,calc(var(--sf-site-width,1600px)_-_var(--sf-site-gutter,40px)*2))]",children:[F&&n(lt,{ref:W,slides:A,active:h,shape:vt(Ie),placement:$e}),ie&&n(it,{ref:I,shape:ze,placement:Be,part:R("arrows"),buttonPart:R("arrow")})]}),F&&n("div",{ref:Z,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",...R("dots"),children:A.map((e,t)=>n("button",{type:"button","data-idx":t,"aria-label":`Go to slide ${t+1}`,className:`h-2 rounded-full transition-all motion-reduce:transition-none ${t===h?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`,...R("dot")},t))}),Q&&l&&n("div",{className:"sf-hero-strip absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10",style:{background:pe(.55),...Lt},...R("strip"),children:n(l,{})}),Ge&&U.length>0&&n(Ft,{editing:!!c,entrance:Ke,scroll:Ye,children:n(st,{items:U,backdrop:"dark-media"})})]})})})}function Ft({editing:d,entrance:l,scroll:m,children:S}){const w="sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5",P=d?{[ut]:""}:void 0;return n(Nt,{entrance:l,scroll:m,editing:d,className:w,attrs:P,style:{background:pe(.55)},children:S})}const Xt="hero-track grid h-full [&>*]:h-full [&>*]:min-w-full [&>*]:[grid-area:1/1] [&>*:not(:first-child)]:invisible";function Gt({on:d,pinRef:l,height:m,effect:S,children:w}){return d?C(de,{ref:l,className:"relative","data-hero-scroll":"","data-hero-effect":S,children:[w,n("div",{"aria-hidden":"true",style:{height:`${m}vh`}})]}):n(ot,{children:w})}export{G as HERO_SLIDER_GOTO_EVENT,It as HERO_VIDEO_HOLD_LABEL,Dt as HERO_VIDEO_PLAY_LABEL,Bt as default,zt as subscribeSliderGoto};
@@ -1,24 +1,8 @@
1
1
  import type { HoverMediaCover } from "../../format/lib/animation/hover.js";
2
- import { type HeroArrowDirection } from "../../format/lib/hero-arrows.js";
3
- import { type HoverMediaPick } from "../../format/lib/content/hover-media.js";
2
+ import type { HoverMediaPick } from "../../format/lib/content/hover-media.js";
4
3
  export interface HoverMediaLayerProps {
5
4
  media: HoverMediaPick | null;
6
- name: string;
7
5
  cover?: HoverMediaCover;
8
6
  ground?: string;
9
- arrowsAbove?: boolean;
10
7
  }
11
- export interface HoverArrowsState {
12
- name: string;
13
- count: number;
14
- shown: boolean;
15
- press: (direction: HeroArrowDirection, e: {
16
- preventDefault(): void;
17
- stopPropagation(): void;
18
- }) => void;
19
- }
20
- export declare const HoverArrowsSlot: import("react").Context<((state: HoverArrowsState | null) => void) | null>;
21
- export declare function HoverMediaArrows({ state }: {
22
- state: HoverArrowsState;
23
- }): import("react").JSX.Element;
24
- export default function HoverMediaLayer({ media, name, cover, ground, arrowsAbove }: HoverMediaLayerProps): import("react").JSX.Element | null;
8
+ export default function HoverMediaLayer({ media, cover, ground }: HoverMediaLayerProps): import("react").JSX.Element | null;
@@ -1 +1 @@
1
- "use client";import{jsx as w,jsxs as P,Fragment as q}from"react/jsx-runtime";import{createContext as B,useCallback as V,useContext as G,useEffect as A,useRef as J,useState as E}from"react";import K from"./HeroArrows.js";import{arrowStep as Q,HERO_ARROW_DIRECTIONS as U}from"../../format/lib/hero-arrows.js";import{hoverArrowLabel as X,hoverMediaCount as Z}from"../../format/lib/content/hover-media.js";import{CARD_COPY_ATTR as ee,PHOTO_HOST_ATTR as te}from"../../format/lib/content/image-treatment.js";import{useDeferredPicture as ne}from"../lib/first-screen.js";import{sizedImage as $}from"../../format/lib/sized-image.js";const re=B(null);function N({name:t,count:s,press:o}){if(s<2)return null;const a=Object.fromEntries(U.map(l=>[l,X(l,t)]));return w(K,{shape:"solid",sides:!0,labels:a,onPress:o})}function Ae({state:t}){return w("div",{className:ce,style:{opacity:t.shown?1:0},children:N(t)})}const oe=200,k="data-hover-media-anchor";function se(t){const s=t.closest(`[${ee}]`);for(let o=t.parentElement;o;o=o.parentElement){const a=!s?.contains(o)&&[...o.children].some(d=>d.matches("a[href]"));if(o.hasAttribute(te)||a)return o.querySelectorAll(`[${k}]`).length===1?o:null}return null}const b="transition-opacity duration-200 motion-reduce:transition-none",ie={card:`pointer-events-none absolute inset-0 z-20 overflow-hidden rounded-[inherit] ${b}`,picture:`pointer-events-none absolute inset-0 z-20 overflow-hidden ${b}`},ce=`pointer-events-none absolute inset-0 ${b}`,ae={cover:"h-full w-full object-cover",contain:"h-full w-full object-contain"};function W(t){const s=$(t,{fallbackWidth:960});return s.src===t?{src:t}:{src:s.src,srcSet:`${s.src} 1x, ${$(t,{fallbackWidth:1280}).src} 2x`}}const Y=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(hover: hover) and (pointer: fine)").matches;function le({media:t,name:s,cover:o="card",ground:a,arrowsAbove:l=!1}){const d=J(null),z=ne(),[c,S]=E(!1),[L,x]=E(!1),[m,O]=E(0),[T,y]=E(!1),u=G(re),_=l&&u!==null,p=t?.urls??[],n=p.length;A(()=>{const i=d.current;if(!i||n===0)return;const e=se(i)??i.parentElement;if(!e)return;let r,h=!1;const g=()=>{r!==void 0&&clearTimeout(r),r=void 0,S(!1),x(!1),O(0),y(!1),h=!1},H=f=>{f.pointerType!=="mouse"||!Y()||(r!==void 0&&clearTimeout(r),r=setTimeout(()=>{r=void 0,S(!0)},oe))},I=f=>{if(f.pointerType==="mouse"){if(!h&&e.contains(document.activeElement)){r!==void 0&&clearTimeout(r),r=void 0;return}g()}},M=()=>{h=!0},j=()=>{!h&&Y()&&S(!0)},D=f=>{const F=f.relatedTarget;(!F||!e.contains(F))&&g()};return e.addEventListener("pointerenter",H),e.addEventListener("pointerleave",I),e.addEventListener("pointerdown",M),e.addEventListener("focusin",j),e.addEventListener("focusout",D),()=>{r!==void 0&&clearTimeout(r),e.removeEventListener("pointerenter",H),e.removeEventListener("pointerleave",I),e.removeEventListener("pointerdown",M),e.removeEventListener("focusin",j),e.removeEventListener("focusout",D)}},[n]),A(()=>{if(!c)return;const i=requestAnimationFrame(()=>x(!0));return()=>cancelAnimationFrame(i)},[c]),A(()=>{if(!c||!T||n<2)return;const i=new Image,e=W(p[(m+1)%n]);e.srcSet&&(i.srcset=e.srcSet),i.src=e.src},[c,T,m,n,p]);const R=V((i,e)=>{e.preventDefault(),e.stopPropagation(),y(!0),O(r=>Q(i,r,n))},[n]),C=!!t&&c&&n>1;if(A(()=>{if(!(!_||!u))return u(C?{name:s,count:n,shown:L,press:R}:null),()=>u(null)},[_,u,C,s,n,L,R]),!t||n===0)return null;const v=c?W(p[Math.min(m,n-1)]):null;return P(q,{children:[w("span",{ref:d,className:"sr-only","aria-live":"polite",[k]:"",children:c&&T?Z(m,n):""}),v?P("div",{"data-hover-media":"","data-hover-cover":o,className:ie[o],style:{opacity:L?1:0,...a?{backgroundColor:a}:{}},children:[w("img",{src:v.src,...v.srcSet?{srcSet:v.srcSet}:{},alt:"",decoding:"async",...z,className:ae[t.fit]}),_?null:N({name:s,count:n,press:R})]}):null]})}export{re as HoverArrowsSlot,Ae as HoverMediaArrows,le as default};
1
+ "use client";import{jsx as m,Fragment as C,jsxs as j}from"react/jsx-runtime";import{useEffect as S,useRef as F,useState as y}from"react";import{CARD_COPY_ATTR as $,PHOTO_HOST_ATTR as H}from"../../format/lib/content/image-treatment.js";import{useDeferredPicture as I}from"../lib/first-screen.js";import{sizedImage as R}from"../../format/lib/sized-image.js";const M=200,O="data-hover-media-anchor";function k(e){const o=e.closest(`[${$}]`);for(let r=e.parentElement;r;r=r.parentElement){const a=!o?.contains(r)&&[...r.children].some(s=>s.matches("a[href]"));if(r.hasAttribute(H)||a)return r.querySelectorAll(`[${O}]`).length===1?r:null}return null}const b="transition-opacity duration-200 motion-reduce:transition-none",D={card:`pointer-events-none absolute inset-0 z-20 overflow-hidden rounded-[inherit] ${b}`,picture:`pointer-events-none absolute inset-0 z-20 overflow-hidden ${b}`},N={cover:"h-full w-full object-cover",contain:"h-full w-full object-contain"};function P(e){const o=R(e,{fallbackWidth:960});return o.src===e?{src:e}:{src:o.src,srcSet:`${o.src} 1x, ${R(e,{fallbackWidth:1280}).src} 2x`}}const g=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(hover: hover) and (pointer: fine)").matches;function Y({media:e,cover:o="card",ground:r}){const a=F(null),v=I(),[s,l]=y(!1),[x,p]=y(!1),d=e?.urls.length??0;if(S(()=>{const i=a.current;if(!i||d===0)return;const t=k(i)??i.parentElement;if(!t)return;let n,f=!1;const h=()=>{n!==void 0&&clearTimeout(n),n=void 0,l(!1),p(!1),f=!1},E=c=>{c.pointerType!=="mouse"||!g()||(n!==void 0&&clearTimeout(n),n=setTimeout(()=>{n=void 0,l(!0)},M))},w=c=>{if(c.pointerType==="mouse"){if(!f&&t.contains(document.activeElement)){n!==void 0&&clearTimeout(n),n=void 0;return}h()}},A=()=>{f=!0},T=()=>{!f&&g()&&l(!0)},L=c=>{const _=c.relatedTarget;(!_||!t.contains(_))&&h()};return t.addEventListener("pointerenter",E),t.addEventListener("pointerleave",w),t.addEventListener("pointerdown",A),t.addEventListener("focusin",T),t.addEventListener("focusout",L),()=>{n!==void 0&&clearTimeout(n),t.removeEventListener("pointerenter",E),t.removeEventListener("pointerleave",w),t.removeEventListener("pointerdown",A),t.removeEventListener("focusin",T),t.removeEventListener("focusout",L)}},[d]),S(()=>{if(!s)return;const i=requestAnimationFrame(()=>p(!0));return()=>cancelAnimationFrame(i)},[s]),!e||d===0)return null;const u=s?P(e.urls[0]):null;return j(C,{children:[m("span",{ref:a,className:"sr-only",[O]:""}),u?m("div",{"data-hover-media":"","data-hover-cover":o,"data-hover-fit":e.fit,className:D[o],style:{opacity:x?1:0,...r?{backgroundColor:r}:{}},children:m("img",{src:u.src,...u.srcSet?{srcSet:u.srcSet}:{},alt:"",decoding:"async",...v,className:N[e.fit]})}):null]})}export{Y as default};
@@ -5,7 +5,6 @@ import { type HoverMediaPick } from "../../format/lib/content/hover-media.js";
5
5
  import type { PadValues } from "../lib/content/section-padding.js";
6
6
  export type ImageHoverLayer = {
7
7
  media: HoverMediaPick;
8
- name: string;
9
8
  cover: HoverMediaCover;
10
9
  };
11
10
  interface ImageBlockProps {
@@ -1 +1 @@
1
- import{jsx as e,Fragment as ie,jsxs as w}from"react/jsx-runtime";import{PagePicture as me}from"../lib/first-screen.js";import{SiteLink as ae}from"../lib/site-runtime.js";import{siteLinkDraws as ce}from"../../format/lib/content/box-link.js";import ne from"./BlockFrame.js";import{partAttr as F}from"../../format/lib/content/part-names.js";import{useCellPictureSizes as fe}from"./BoxCellContext.js";import{useBoxCell as pe,useFillsCell as ue}from"./InBoxContext.js";import{useInsideSiteGutter as de,useSectionEdge as ge}from"./SiteGutterFrame.js";import{useSitePhotography as he}from"./SitePhotographyContext.js";import{media as Se}from"../lib/media.js";import{CONTENT_SIZES as j,sizedImage as ve}from"../../format/lib/sized-image.js";import{imageCornerStyle as we}from"../../format/lib/content/image-corners.js";import{FILL_ROW as Fe,imageAspectClasses as Ne,pictureLayerClass as ye,imageFillFrom as Ce,imageAspectDrawn as be,imageAspectDrawsARatio as Ae,imageFocalPointActs as xe,imageFocalPointActsIn as E,imageAspectPhoneOf as ke,imageFillRowClasses as Ie,imageWidthFollowsBox as $e,imageShapeStyle as Oe}from"../../format/lib/content/image-aspect.js";import{drawsSiteGutter as _e}from"../../format/lib/content/site-gutter.js";import{imageFitClass as Pe,parseImageFit as Re}from"../../format/lib/content/image-fit.js";import{SECTION_FILL_CLASS as je}from"../../format/lib/content/section-min-height.js";import{PICTURE_WASH_CLASS as Ee,resolveImageTreatment as He}from"../../format/lib/content/image-treatment.js";import{boxDarkenStyle as ze}from"../../format/lib/content/box-background.js";import{HOVER_LAYER_GROUND as Le}from"../../format/lib/content/hover-media.js";import{phoneFocus as Te}from"../../format/lib/content/phone-focus.js";import{say as De}from"../../format/lib/editor-words.js";import{sectionEdgeAttrs as Ge}from"../lib/content/section-edge.js";import{useSideSpaceOnce as We}from"./SideSpaceOnce.js";import Be from"./PhotoHoverSheet.js";import Me from"./PictureWash.js";import Ze from"./HoverMediaLayer.js";import{PictureHoverMoveSheet as Ue,PictureHoverZoom as Ve,pictureHoverMoveOf as Ye}from"./PictureHoverMove.js";import{PictureZoom as qe}from"./PictureZoom.js";function Je({src:o,alt:H,aspect:z,aspectPhone:l,contained:N,grayscale:L,pictureHover:y,hoverLayer:s,darken:T,darkenStyle:C,href:D,fit:G,focal:b,focalPhone:W,focalTablet:B,corners:M,cornerSides:Z,cornersUnit:U,pad:A,ownSize:V=!1,editing:x=!1}){const c=He(L,he(),y),u=pe(),Y=ue(),d=ge(),q=fe(j),t=be(z,u?.picturesFillRow===!0),g=t===Fe,k=Ce(u?.fillFrom,u?.phoneRowFills===!0,l),i=g?Ie(k):null,h=ke(t,l),m=Re(G,"cover"),J=d||!$e(t,h,m)?j:q,I=we(M,Z,U),K=xe(m,t,l),S=Te(E("mobile",m,t,l)?W:void 0,E("tablet",m,t,l)?B:void 0),$={...c.style??{},...b&&K?{objectPosition:b}:{},...S.style},n=o?ve(Se(o)):null,r=Ye(y,C),Q=ze(T,C),X=r?.washHover??null,O=Oe(t,h),_=O?{...r?.style??{},...O}:r?.style??{},f=s&&o?e(Ze,{media:s.media,name:s.name,cover:s.cover,ground:Le[s.cover]}):null,P=o&&n?e(me,{src:n.src,...n.srcSet?{srcSet:n.srcSet,sizes:J}:{},alt:H,className:`${i?`${i.img} `:""}h-full w-full ${Ae(t,l)?Pe(m):""}${c.className?` ${c.className}`:""}${S.className?` ${S.className}`:""}`,...Object.keys($).length?{style:$}:{},...F("image")}):null,v=P?w(ie,{children:[e(Be,{sheet:c.sheet}),e(Ue,{move:r}),e(Ve,{move:r,className:ye(i),children:P}),e(Me,{wash:Q,hover:X,className:`pointer-events-none ${Ee}`})]}):e("div",{className:"flex aspect-[16/9] items-center justify-center border border-dashed border-line font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim",children:De("Image — set a path")}),p=(D??"").trim(),ee=p&&o?ce(p)?e(ae,{href:p,className:"block h-full w-full",newTab:"auto",children:v}):e("a",{href:p,className:"block h-full w-full",children:v}):v,te=de(),oe=We(),a=d&&!V?Ge(d,oe):null,R=A?{values:A,frame:g?0:24}:void 0,se=R!==void 0&&_e(a?!1:N,te),re=g?Y||x||se?je:"":"py-6",le=o&&m==="contain"?"":"bg-surface ";return!o&&!x?null:w(ne,{contained:a?!1:N,className:re,pad:R,...a?{fillWidth:a.className,style:a.style}:{},part:F("image-block"),children:[e("figure",{...i?{className:i.figure}:{},children:w("div",{className:`relative w-full overflow-hidden ${le}${Ne(t,h,k)}${r?` ${r.className}`:""}`,...I||Object.keys(_).length?{style:{...I,..._}}:{},...F("image-frame"),children:[e(qe,{fill:i,children:ee}),f&&s?.cover==="picture"?f:null]})}),f&&s?.cover==="card"?f:null]})}export{Je as default};
1
+ import{jsx as e,Fragment as ie,jsxs as w}from"react/jsx-runtime";import{PagePicture as me}from"../lib/first-screen.js";import{SiteLink as ae}from"../lib/site-runtime.js";import{siteLinkDraws as ce}from"../../format/lib/content/box-link.js";import ne from"./BlockFrame.js";import{partAttr as F}from"../../format/lib/content/part-names.js";import{useCellPictureSizes as fe}from"./BoxCellContext.js";import{useBoxCell as pe,useFillsCell as ue}from"./InBoxContext.js";import{useInsideSiteGutter as de,useSectionEdge as ge}from"./SiteGutterFrame.js";import{useSitePhotography as he}from"./SitePhotographyContext.js";import{media as Se}from"../lib/media.js";import{CONTENT_SIZES as j,sizedImage as ve}from"../../format/lib/sized-image.js";import{imageCornerStyle as we}from"../../format/lib/content/image-corners.js";import{FILL_ROW as Fe,imageAspectClasses as Ne,pictureLayerClass as ye,imageFillFrom as Ce,imageAspectDrawn as be,imageAspectDrawsARatio as Ae,imageFocalPointActs as xe,imageFocalPointActsIn as E,imageAspectPhoneOf as ke,imageFillRowClasses as Ie,imageWidthFollowsBox as $e,imageShapeStyle as Oe}from"../../format/lib/content/image-aspect.js";import{drawsSiteGutter as _e}from"../../format/lib/content/site-gutter.js";import{imageFitClass as Pe,parseImageFit as Re}from"../../format/lib/content/image-fit.js";import{SECTION_FILL_CLASS as je}from"../../format/lib/content/section-min-height.js";import{PICTURE_WASH_CLASS as Ee,resolveImageTreatment as He}from"../../format/lib/content/image-treatment.js";import{boxDarkenStyle as ze}from"../../format/lib/content/box-background.js";import{HOVER_LAYER_GROUND as Le}from"../../format/lib/content/hover-media.js";import{phoneFocus as Te}from"../../format/lib/content/phone-focus.js";import{say as De}from"../../format/lib/editor-words.js";import{sectionEdgeAttrs as Ge}from"../lib/content/section-edge.js";import{useSideSpaceOnce as We}from"./SideSpaceOnce.js";import Be from"./PhotoHoverSheet.js";import Me from"./PictureWash.js";import Ze from"./HoverMediaLayer.js";import{PictureHoverMoveSheet as Ue,PictureHoverZoom as Ve,pictureHoverMoveOf as Ye}from"./PictureHoverMove.js";import{PictureZoom as qe}from"./PictureZoom.js";function Je({src:o,alt:H,aspect:z,aspectPhone:r,contained:N,grayscale:L,pictureHover:y,hoverLayer:l,darken:T,darkenStyle:C,href:D,fit:G,focal:b,focalPhone:W,focalTablet:B,corners:M,cornerSides:Z,cornersUnit:U,pad:A,ownSize:V=!1,editing:x=!1}){const c=He(L,he(),y),u=pe(),Y=ue(),d=ge(),q=fe(j),t=be(z,u?.picturesFillRow===!0),g=t===Fe,k=Ce(u?.fillFrom,u?.phoneRowFills===!0,r),i=g?Ie(k):null,h=ke(t,r),m=Re(G,"cover"),J=d||!$e(t,h,m)?j:q,I=we(M,Z,U),K=xe(m,t,r),S=Te(E("mobile",m,t,r)?W:void 0,E("tablet",m,t,r)?B:void 0),$={...c.style??{},...b&&K?{objectPosition:b}:{},...S.style},n=o?ve(Se(o)):null,s=Ye(y,C),Q=ze(T,C),X=s?.washHover??null,O=Oe(t,h),_=O?{...s?.style??{},...O}:s?.style??{},f=l&&o?e(Ze,{media:l.media,cover:l.cover,ground:Le[l.cover]}):null,P=o&&n?e(me,{src:n.src,...n.srcSet?{srcSet:n.srcSet,sizes:J}:{},alt:H,className:`${i?`${i.img} `:""}h-full w-full ${Ae(t,r)?Pe(m):""}${c.className?` ${c.className}`:""}${S.className?` ${S.className}`:""}`,...Object.keys($).length?{style:$}:{},...F("image")}):null,v=P?w(ie,{children:[e(Be,{sheet:c.sheet}),e(Ue,{move:s}),e(Ve,{move:s,className:ye(i),children:P}),e(Me,{wash:Q,hover:X,className:`pointer-events-none ${Ee}`})]}):e("div",{className:"flex aspect-[16/9] items-center justify-center border border-dashed border-line font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim",children:De("Image — set a path")}),p=(D??"").trim(),ee=p&&o?ce(p)?e(ae,{href:p,className:"block h-full w-full",newTab:"auto",children:v}):e("a",{href:p,className:"block h-full w-full",children:v}):v,te=de(),oe=We(),a=d&&!V?Ge(d,oe):null,R=A?{values:A,frame:g?0:24}:void 0,se=R!==void 0&&_e(a?!1:N,te),re=g?Y||x||se?je:"":"py-6",le=o&&m==="contain"?"":"bg-surface ";return!o&&!x?null:w(ne,{contained:a?!1:N,className:re,pad:R,...a?{fillWidth:a.className,style:a.style}:{},part:F("image-block"),children:[e("figure",{...i?{className:i.figure}:{},children:w("div",{className:`relative w-full overflow-hidden ${le}${Ne(t,h,k)}${s?` ${s.className}`:""}`,...I||Object.keys(_).length?{style:{...I,..._}}:{},...F("image-frame"),children:[e(qe,{fill:i,children:ee}),f&&l?.cover==="picture"?f:null]})}),f&&l?.cover==="card"?f:null]})}export{Je as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{phoneKey as o,tabletKey as i}from"efficient-easel/draw";import{sectionFillsHeight as n}from"../../../../../../format/lib/content/section-min-height.js";import{sectionRootPad as m}from"../../../../content/section-own-pads.js";import a from"../../../../../components/Grid.js";import{GridMeta as l}from"../../../../../../format/lib/document/blocks/general/Grid/meta.js";const h={...l,render:t=>e(a,{columns:t.columns,mobileColumns:t.mobileColumns,gap:t.gap,gapPhone:t[o("gap")],gapTablet:t[i("gap")],contained:t.contained,fillHeight:n(t),content:t.content,pad:m("Grid",t)})};export{h as GridRender};
1
+ import{jsx as o}from"react/jsx-runtime";import{phoneKey as t,tabletKey as i}from"efficient-easel/draw";import{sectionFillsHeight as l}from"../../../../../../format/lib/content/section-min-height.js";import{sectionRootPad as n}from"../../../../content/section-own-pads.js";import a from"../../../../../components/Grid.js";import{GridMeta as m}from"../../../../../../format/lib/document/blocks/general/Grid/meta.js";const h={...m,render:e=>o(a,{columns:e.columns,mobileColumns:e.mobileColumns,gap:e.gap,gapPhone:e[t("gap")],gapTablet:e[i("gap")],contained:e.contained,fillHeight:l(e),content:e.content,pad:n("Grid",e),layout:e.layout,carouselTile:e.carouselTile,carouselTilePhone:e.carouselTilePhone})};export{h as GridRender};
@@ -1 +1 @@
1
- import{jsx as A}from"react/jsx-runtime";import C from"../../../../../components/HeroSection.js";import{HeroMeta as E}from"../../../../../../format/lib/document/blocks/general/Hero/meta.js";const U={...E,render:({slides:e,strip:o,alignment:t,textureOpacity:r,showTexture:i,textureColor:p,textureShape:h,phoneUpDown:s,phoneSideways:a,phoneWordsTop:n,phoneWordsBottom:d,phoneBoxGap:l,wordsTop:m,wordsBottom:w,wordsTopTablet:x,wordsBottomTablet:c,autoplay:g,autoplayInterval:T,showTicker:b,tickerItems:k,heightDesktop:u,heightTablet:S,heightMobile:y,heightFixed:B,heightFixedTablet:M,heightFixedMobile:f,showPicker:F,pickerShape:H,pickerPlacement:P,showArrows:j,arrowsShape:D,arrowsPlacement:I,_partMotion:W,editor:v})=>A(C,{slides:e,strip:o,alignment:t,textureOpacity:r,showTexture:i,textureColor:p,textureShape:h,phoneUpDown:s,phoneSideways:a,phoneWordsTop:n,phoneWordsBottom:d,phoneBoxGap:l,wordsTop:m,wordsBottom:w,wordsTopTablet:x,wordsBottomTablet:c,autoplay:g,autoplayInterval:T,showTicker:b,tickerItems:k,heightDesktop:u,heightTablet:S,heightMobile:y,heightFixed:B,heightFixedTablet:M,heightFixedMobile:f,showPicker:F,pickerShape:H,pickerPlacement:P,showArrows:j,arrowsShape:D,arrowsPlacement:I,editing:v?.isEditing,partMotion:W})};export{U as HeroRender};
1
+ import{jsx as G}from"react/jsx-runtime";import O from"../../../../../components/HeroSection.js";import{HeroMeta as R}from"../../../../../../format/lib/document/blocks/general/Hero/meta.js";const z={...R,render:({slides:e,strip:o,alignment:t,textureOpacity:r,showTexture:i,textureColor:s,textureShape:h,phoneUpDown:p,phoneSideways:a,phoneWordsTop:l,phoneWordsBottom:n,phoneBoxGap:d,wordsTop:m,wordsBottom:w,wordsTopTablet:c,wordsBottomTablet:x,autoplay:g,autoplayInterval:T,slideChange:b,scrollPerSlide:k,slideEffect:u,showTicker:S,tickerItems:f,heightDesktop:y,heightTablet:B,heightMobile:M,heightFixed:P,heightFixedTablet:F,heightFixedMobile:H,showPicker:j,pickerShape:C,pickerPlacement:D,showArrows:E,arrowsShape:I,arrowsPlacement:W,_partMotion:v,editor:A})=>G(O,{slides:e,strip:o,alignment:t,textureOpacity:r,showTexture:i,textureColor:s,textureShape:h,phoneUpDown:p,phoneSideways:a,phoneWordsTop:l,phoneWordsBottom:n,phoneBoxGap:d,wordsTop:m,wordsBottom:w,wordsTopTablet:c,wordsBottomTablet:x,autoplay:g,autoplayInterval:T,slideChange:b,scrollPerSlide:k,slideEffect:u,showTicker:S,tickerItems:f,heightDesktop:y,heightTablet:B,heightMobile:M,heightFixed:P,heightFixedTablet:F,heightFixedMobile:H,showPicker:j,pickerShape:C,pickerPlacement:D,showArrows:E,arrowsShape:I,arrowsPlacement:W,editing:A?.isEditing,partMotion:v})};export{z as HeroRender};
@@ -1 +1 @@
1
- import{jsx as g}from"react/jsx-runtime";import{phoneKey as w}from"efficient-easel/draw";import{CardRowDrawn as I}from"../../../../../components/CardRowContext.js";import R from"../../../../../components/ImageBlock.js";import{recordPictureAlt as O}from"../../../../../../format/lib/content/record-row.js";import{CARD_ROW_LINK_PROP as x,namedRowField as h,rowFieldSpec as B,rowFieldText as P}from"../../../../../../format/lib/content/card-template.js";import{cardRowHoverMedia as b,hoverLayerName as F}from"../../../../../../format/lib/content/hover-media.js";import{blockSizeOf as _,blockSizeValuesOf as z}from"../../../../content/block-size.js";import{padValuesOf as H}from"../../../../content/section-padding.js";import{pictureHoverOf as K}from"../../../../../../format/lib/animation/hover.js";import{viewFocusValues as V}from"../../../../../../format/lib/content/picture-focus-rows.js";import{ImageBlockMeta as j}from"../../../../../../format/lib/document/blocks/general/ImageBlock/meta.js";const G={...j,render:e=>{const r=K(e,"ImageBlock"),o=h(e),a=h(e,x);return!o&&!a&&r.kind!=="nextImage"?y(e,e.src,e.alt,r):g(I,{type:"ImageBlock",props:e,children:(t,n,i)=>{const d=o?B(n,o):null,l=o?n?d?.alt:O(o):null,f=o?t.src:e.src,c=(l&&P(i,l))??e.alt,m=r.media?b(n,r.media):null,s=F(i,typeof c=="string"?c:""),u=a?t.href:e.href;return y({...e,href:u},f,c,r,m&&r.media?{media:m,name:s,cover:r.media.cover}:null)}})}};function y(e,r,o,a,t=null){const{aspect:n,contained:i,grayscale:d,darken:l,darkenStyle:f,href:c,fit:m,corners:s,cornerSides:u,cornersUnit:S,editor:v}=e,k=V(e,"focal");return g(R,{src:r,alt:o,aspect:n,aspectPhone:e[w("aspect")],contained:i,grayscale:d,darken:l,darkenStyle:f,pictureHover:a,...t?{hoverLayer:t}:{},href:c,fit:m,focal:k.desktop,focalPhone:k.phone,focalTablet:k.tablet,corners:s,cornerSides:u,cornersUnit:S,pad:H(e),ownSize:_(z(e))!==null,editing:v?.isEditing===!0})}export{G as ImageBlockRender};
1
+ import{jsx as k}from"react/jsx-runtime";import{phoneKey as R}from"efficient-easel/draw";import{CardRowDrawn as v}from"../../../../../components/CardRowContext.js";import y from"../../../../../components/ImageBlock.js";import{recordPictureAlt as O}from"../../../../../../format/lib/content/record-row.js";import{CARD_ROW_LINK_PROP as x,namedRowField as g,rowFieldSpec as B,rowFieldText as P}from"../../../../../../format/lib/content/card-template.js";import{cardRowHoverMedia as b}from"../../../../../../format/lib/content/hover-media.js";import{blockSizeOf as F,blockSizeValuesOf as _}from"../../../../content/block-size.js";import{padValuesOf as z}from"../../../../content/section-padding.js";import{pictureHoverOf as H}from"../../../../../../format/lib/animation/hover.js";import{viewFocusValues as K}from"../../../../../../format/lib/content/picture-focus-rows.js";import{ImageBlockMeta as V}from"../../../../../../format/lib/document/blocks/general/ImageBlock/meta.js";const G={...V,render:e=>{const r=H(e,"ImageBlock"),o=g(e),n=g(e,x);return!o&&!n&&r.kind!=="nextImage"?h(e,e.src,e.alt,r):k(v,{type:"ImageBlock",props:e,children:(t,c,l)=>{const m=o?B(c,o):null,i=o?c?m?.alt:O(o):null,d=o?t.src:e.src,f=(i&&P(l,i))??e.alt,a=r.media?b(c,r.media):null,s=n?t.href:e.href;return h({...e,href:s},d,f,r,a&&r.media?{media:a,cover:r.media.cover}:null)}})}};function h(e,r,o,n,t=null){const{aspect:c,contained:l,grayscale:m,darken:i,darkenStyle:d,href:f,fit:a,corners:s,cornerSides:w,cornersUnit:S,editor:I}=e,u=K(e,"focal");return k(y,{src:r,alt:o,aspect:c,aspectPhone:e[R("aspect")],contained:l,grayscale:m,darken:i,darkenStyle:d,pictureHover:n,...t?{hoverLayer:t}:{},href:f,fit:a,focal:u.desktop,focalPhone:u.phone,focalTablet:u.tablet,corners:s,cornerSides:w,cornersUnit:S,pad:z(e),ownSize:F(_(e))!==null,editing:I?.isEditing===!0})}export{G as ImageBlockRender};