efficient-storefront-blocks 0.121.1 → 0.121.3

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 (71) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/dist/chunks/{EditorPreviewCheckout-XK73KDIQ.js → EditorPreviewCheckout-3AKBPV3S.js} +4 -4
  3. package/dist/chunks/{SiteEditorProvider-LHGHQTP7.js → SiteEditorProvider-LBBAOVOX.js} +1 -1
  4. package/dist/chunks/{chunk-ULJSH3R7.js → chunk-4SBIX3UP.js} +1 -1
  5. package/dist/chunks/chunk-NLHCY45M.js +1 -0
  6. package/dist/chunks/chunk-QCSZZWC5.js +96 -0
  7. package/dist/chunks/{chunk-4M5X72OG.js → chunk-RWUW3WUD.js} +1 -1
  8. package/dist/chunks/chunk-SPAC3RLP.js +1 -0
  9. package/dist/chunks/{fitment-data-SWQZTLG6.js → fitment-data-IVQMG7AL.js} +1 -1
  10. package/dist/editor/components/HeaderSettingsPanel.d.ts +1 -1
  11. package/dist/editor/components/HeaderSettingsPanel.js +1 -1
  12. package/dist/editor/components/MenuPicker.js +1 -1
  13. package/dist/editor/lib/document/blocks/commerce/DetailRows/fields.js +1 -1
  14. package/dist/editor/lib/document/blocks/commerce/FitmentPicker/fields.js +1 -1
  15. package/dist/editor/lib/document/blocks/commerce/shared-fields.js +1 -1
  16. package/dist/editor/lib/document/blocks/service/SignUp/fields.js +1 -1
  17. package/dist/editor/lib/document/blocks/service/SiteHeader/fields.js +1 -1
  18. package/dist/editor/lib/document/box-header.js +1 -1
  19. package/dist/index.js +29 -29
  20. package/dist/links.js +1 -1
  21. package/dist/render/components/BoxHeaderBar.js +1 -1
  22. package/dist/render/components/Events.js +1 -1
  23. package/dist/render/components/FitmentTable.js +1 -1
  24. package/dist/render/components/GalleryShowcase.js +1 -1
  25. package/dist/render/components/Header.js +1 -1
  26. package/dist/render/components/HeaderToolBlocks.d.ts +2 -1
  27. package/dist/render/components/SignUpSection.d.ts +2 -1
  28. package/dist/render/components/card-pieces/CardBuyButton.js +1 -1
  29. package/dist/render/components/card-pieces/CardProductPicture.js +1 -1
  30. package/dist/render/components/checkout/CheckoutPageClient.js +1 -1
  31. package/dist/render/components/fitment/FitmentPickerPart.d.ts +2 -1
  32. package/dist/render/components/pdp-dynamic/DynamicDetailRows.d.ts +2 -1
  33. package/dist/render/components/useTyreCatalog.js +3 -3
  34. package/dist/render/components/useTyreDetail.d.ts +1 -0
  35. package/dist/render/components/useTyreDetail.js +1 -1
  36. package/dist/render/lib/api/index.js +1 -1
  37. package/dist/render/lib/content/english-variant.d.ts +3 -1
  38. package/dist/render/lib/content/english-variant.js +1 -1
  39. package/dist/render/lib/content/header-bar.d.ts +26 -1
  40. package/dist/render/lib/content/header-bar.js +1 -1
  41. package/dist/render/lib/content/tab-strip.d.ts +5 -2
  42. package/dist/render/lib/content/tab-strip.js +1 -1
  43. package/dist/render/lib/content/title-look.js +1 -1
  44. package/dist/render/lib/document/blocks/commerce/DetailRows/meta.d.ts +8 -0
  45. package/dist/render/lib/document/blocks/commerce/DetailRows/meta.js +1 -1
  46. package/dist/render/lib/document/blocks/commerce/DetailRows/render.js +1 -1
  47. package/dist/render/lib/document/blocks/commerce/FitmentPicker/meta.d.ts +8 -0
  48. package/dist/render/lib/document/blocks/commerce/FitmentPicker/meta.js +1 -1
  49. package/dist/render/lib/document/blocks/commerce/FitmentPicker/render.js +1 -1
  50. package/dist/render/lib/document/blocks/service/OpeningHours/render.js +1 -1
  51. package/dist/render/lib/document/blocks/service/SignUp/meta.d.ts +8 -0
  52. package/dist/render/lib/document/blocks/service/SignUp/meta.js +1 -1
  53. package/dist/render/lib/document/blocks/service/SignUp/render.js +1 -1
  54. package/dist/render/lib/document/card-templates.js +1 -1
  55. package/dist/render/lib/document/document-nodes.js +1 -1
  56. package/dist/render/lib/document/subscribe-content-type.js +1 -1
  57. package/dist/render/lib/sections/band-padding.d.ts +2 -0
  58. package/dist/render/lib/sections/band-padding.js +1 -1
  59. package/dist/render/lib/sections/gallery-frame.js +1 -1
  60. package/dist/render/lib/sections/hero-arrangement.d.ts +3 -1
  61. package/dist/render/lib/sections/hero-arrangement.js +1 -1
  62. package/dist/render/lib/sections/hero-gallery.js +1 -1
  63. package/dist/render/lib/sections/hero-price-placement.d.ts +2 -1
  64. package/dist/render/lib/sections/hero-price-placement.js +1 -1
  65. package/dist/render/lib/wheels/plp-filters.js +1 -1
  66. package/dist/render/lib/wheels/set-mode.js +1 -1
  67. package/package.json +1 -1
  68. package/dist/chunks/chunk-DRLNY2UU.js +0 -96
  69. package/dist/chunks/chunk-HPCPOXEL.js +0 -1
  70. package/dist/chunks/chunk-JGBM6X5G.js +0 -1
  71. /package/dist/chunks/{chunk-4M5X72OG.js.LEGAL.txt → chunk-RWUW3WUD.js.LEGAL.txt} +0 -0
@@ -1 +1 @@
1
- import{CARD_LIST_TYPE as R,CARD_ROW_FIELD_PROP as y,CARD_ROW_LINK_PROP as m,CARD_TEMPLATE_SLOT as E,registerCardTemplates as ce}from"efficient-web-builder/format/lib/content/card-template";import{DIM as d,INNER_BOX as o,LABEL_FACE as C,TEXT as n,boxPadding as r,fillSlot as H,labelLook as p,labelStyle as K,seedNodes as f,token as _}from"efficient-web-builder/format/lib/document/seed-parts";import{BOX_SHOW_KEY as M,BOX_SHOW_ON_CARD_HOVER as Y,HOVER_KEY as Oe,PICTURE_HOVER_KEYS as x}from"efficient-web-builder/format/lib/animation/hover";import{BOX_TYPE as a,CONTAINER_BLOCKS_SLOT as i}from"efficient-web-builder/format/lib/document/container-blocks";import{BOX_ROW_IMAGE_PROP as k}from"efficient-web-builder/format/lib/content/box-card-rule";import{POST_CARD_HEIGHT as Le}from"efficient-web-builder/format/lib/post-card-layout";import{EVENTS_FEATURED_DARKEN as me,EVENTS_FEATURED_DARKEN_STYLE as G,EVENTS_FEATURED_PLACEMENT as be}from"../content/events-featured-look.js";import{COLLECTION_DARKEN as he,COLLECTION_HOVER_DARKEN as ge,COLLECTION_HOVER_ZOOM as U}from"../content/collection-card-look.js";import{COLLECTION_CARD_REGIONS as b,COLLECTION_CARD_TEXT_SIZE as Pe}from"efficient-web-builder/format/lib/sections/collection-card-text-regions";import{SH_LINK as V}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-row-parts";import{rowFieldTextSeed as t}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{withRelatedTabletColumns as S}from"../sections/product-grid-columns.js";import{bundleColumns as Re}from"../sections/bundle-to-grid.js";import{HERO_GALLERY_BLOCK as ye,withHeroTemplate as Ce}from"../content/hero-seed.js";import{HERO_BUY_SLOT as fe,HERO_BUY_SLOT_LABEL as ke,withHeroBuyTemplate as Se}from"../content/hero-buy-seed.js";import{HERO_OPTION_FIELDS as W,HERO_OPTION_SLOT as Ae,HERO_OPTION_SLOT_LABEL as Ie,withHeroOptionTemplate as ue}from"../content/hero-option-seed.js";import{FILTER_OPTIONS_FIELD as Ne,withFilterChipsTemplate as De,withFilterTemplate as we}from"../content/filter-card-seed.js";import{FACET_ROW_FIELDS as h,FACET_TEMPLATE_LABEL as v,FACET_TEMPLATE_SLOT as $,withFacetTemplate as X}from"../content/facet-row-seed.js";import{RAIL_HEAD_TEMPLATE_LABEL as Be,RAIL_HEAD_TEMPLATE_SLOT as Fe,RAIL_ROW_FIELDS as A,RAIL_TEMPLATE_LABEL as He,RAIL_TEMPLATE_SLOT as Ke,withRailTemplates as Z}from"../content/rail-row-seed.js";import{MENU_LINK_BLOCK as Me,withMenuTemplate as Ye}from"../content/menu-card-seed.js";import{CONTACT_CHANNEL_FIELDS as j,CONTACT_CHANNEL_SLOT as xe,CONTACT_REASON_FIELDS as Ge,CONTACT_REASON_SLOT as Ue,CONTACT_TOPIC_FIELDS as z,CONTACT_TOPIC_SLOT as Ve,withContactTemplates as We}from"../content/contact-card-seed.js";import{ARTICLE_BODY_BLOCK as ve,withArticleBodyTemplate as $e}from"efficient-web-builder/format/lib/document/article-body-seed";import{APPOINTMENT_BOOKING_TYPE as Xe,BOOKING_BOX_TYPE as Ze,BOOKING_OPTION_FIELDS as je,BOOKING_TEMPLATE_SLOTS as ze,withBookingTemplates as qe}from"../content/booking-card-seed.js";import{PRODUCT_BUY_BLOCK as Qe,PRODUCT_CARD_FIELDS as I,PRODUCT_COLOUR_BLOCK as Je,PRODUCT_EYEBROW_BLOCK as q,PRODUCT_NAME_BLOCK as Q,PRODUCT_PICTURE_BLOCK as et,PRODUCT_PRICE_BLOCK as J,PRODUCT_SIZE_BLOCK as tt,PRODUCT_SPECS_BLOCK as lt,productCardSeed as ot,withKitCardTemplate as u,withListingCardTemplate as at,withProductCardTemplate as N}from"../content/product-card-seed.js";import{ALLOY_WHEELS_LISTING_TYPE as it,FILTER_BLOCK_TYPE as nt,FILTER_CHIPS_TYPE as rt,MENU_BLOCK_TYPE as st,PRODUCT_GRID_TYPE as Et,PRODUCT_HERO_TYPE as _t}from"./document-nodes.js";import{withSeededSlot as D}from"../content/seed-ids.js";import{FITMENT_HEAD_FIELDS as ee,FITMENT_HEAD_TEMPLATE_LABEL as dt,FITMENT_HEAD_TEMPLATE_SLOT as pt,FITMENT_ROW_FIELDS as te,FITMENT_ROW_TEMPLATE_LABEL as Tt,FITMENT_ROW_TEMPLATE_SLOT as ct}from"../content/fitment-row-seed.js";const le="tags",T=p(12),oe={textStyle:"heading-3",..._("headingSmall",20),weight:500,lineHeight:1.2,letterSpacing:-.02},ae={textStyle:"body-1",..._("body",14),lineHeight:1.55},Ot={...oe,..._("headingSmall",30)},Lt={sectionPaddingTop:24,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,sectionPaddingTopPhone:24,sectionPaddingRightPhone:28,sectionPaddingBottomPhone:32,sectionPaddingLeftPhone:28},mt=Le.fallback,bt=480,ht=70,gt=()=>({type:a,props:{...o,name:"Featured",[k]:"cover",darken:me,darkenStyle:G,darkenPhone:ht,darkenStylePhone:G,placement:be,direction:"column",gap:8,gapPhone:8,...r(32,32,20,20),sectionHeightMode:"fixed",sectionHeightValue:mt,sectionHeightUnit:"px",sectionHeightModePhone:"fixed",sectionHeightValuePhone:bt,sectionHeightUnitPhone:"px",[m]:"href"},slots:{[i]:[t("meta",{...n,tag:"p"},T,!0),t("title",{...n,tag:"h3",widthFit:"fill"},Ot),t("excerpt",{...d,tag:"p",widthFit:"fill",maxWidth:384},ae),t("dateLabel",{...d,tag:"p"},{...T,color:"muted"})]}}),Pt=()=>({type:a,props:{...o,name:"Post",gap:0,gapPhone:0,...r(0,0,0,0),...H("surface"),shadow:!0},slots:{[i]:[{type:"ImageBlock",props:{[y]:"cover",aspect:"16/10",contained:!1}},{type:a,props:{...o,name:"Words",gap:12,gapPhone:12,...Lt},slots:{[i]:[{type:a,props:{...o,name:"Meta",direction:"row",wrap:!0,share:"content",sharePhone:"content",phoneRow:2,gap:12,gapPhone:12,...r(0,0,0,0)},slots:{[i]:[t("meta",{...n,tag:"p"},T,!0),t("dateLabel",{...d,tag:"p"},{...T,color:"muted"},!0)]}},t("title",{...n,tag:"h3",widthFit:"fill"},oe),t("excerpt",{...d,tag:"p",widthFit:"fill"},ae),{type:R,props:{[y]:le},slots:{template:[{type:a,props:{...o,name:"Chip",...r(4,8,4,8),sectionBorder:{width:1}},slots:{[i]:[t("label",{...d,tag:"p"},T)]}}]}},{type:"ButtonBlock",props:{variant:"ghost",label:"Read more",href:"",[m]:"href",...V,icon:"arrow-right",iconPosition:"after",_partStyles:{label:K(12)}}}]}}]}}),Rt=()=>[gt(),Pt()];function yt(e){const l=["featured","post"];return D(e,E,"Events",L=>f(Rt(),(s,Te)=>{const[w,...B]=Te.split("."),F=l[Number(w)]??`card${w}`;return B.length?`${L}~${F}.${B.join(".")}`:`${L}~${F}`}))}const Ct={fields:[{key:"cover",label:"Cover",kind:"image",alt:"title"},{key:"meta",label:"Eyebrow"},{key:"dateLabel",label:"Date"},{key:"title",label:"Title"},{key:"excerpt",label:"Excerpt",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:le,label:"Tags",kind:"list",fields:[{key:"label",label:"Tag"}]}],blocks:[{type:R,label:"Card list"}],seedOnInsert:yt},c=e=>Number(/(\d+)px/.exec(e)?.[1]),O={tag:c(b.tag.builtIn),name:c(b.name.builtIn),namePhone:c(Pe.namePhone),body:c(b.body.builtIn),link:c(b.link.builtIn)},ft={...p(O.tag),letterSpacing:.25},kt={textStyle:"heading-2",..._("headingMedium",O.name,O.namePhone),weight:500,lineHeight:1,letterSpacing:-.03},St={textStyle:"body-1",..._("body",O.body),lineHeight:1.5,paragraphSpacing:12},ie=()=>[t("tag",{...n,tag:"p"},ft,!0),t("name",{...n,tag:"h3",widthFit:"fill"},kt),t("desc",{...n,tag:"p",widthFit:"fill",maxWidth:420},St),{type:"ButtonBlock",props:{variant:"ghost",label:"Explore",href:"",[m]:"href",...V,icon:"arrow-right",iconPosition:"after",_partStyles:{label:K(O.link)}}}],ne={_hidden:!0,_hiddenTablet:!0,_hiddenPhone:!1},At=()=>({type:a,props:{...o,name:"Collection",gap:0,gapPhone:0,...r(0,0,0,0),[m]:"href"},slots:{[i]:[{type:a,props:{...o,name:"Picture",[k]:"image",boxShape:"portrait",darken:he,placement:"bottom-left",direction:"column",gap:12,gapPhone:12,...r(32,32),hoverZoom:U,hoverDarken:ge,_hiddenPhone:!0},slots:{[i]:ie()}},{type:"ImageBlock",props:{[y]:"image",aspect:"4/5",contained:!1,hoverZoom:U,...ne}},{type:a,props:{...o,name:"Words",gap:12,gapPhone:12,...r(24,24),...H("surface"),...ne},slots:{[i]:ie()}}]}});function It(e){return D(e,E,"Collections",l=>f([At()],(L,s)=>`${l}~card${s?`.${s}`:""}`))}const ut={fields:[{key:"tag",label:"Eyebrow"},{key:"name",label:"Title"},{key:"desc",label:"Description",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"name"},{key:"href",label:"Link",kind:"link"}],seedOnInsert:It},Nt=35,Dt=50,wt=106,Bt=85,Ft="nextImage",Ht="#f5f1e8",re="#c4c1ba",se={...C,...p(11),letterSpacing:.24,color:"main"},Kt={...se,color:re},Mt={...C,...p(12,11),color:"main"},Yt={textStyle:"heading-3",..._("headingSmall",22,16),weight:500,lineHeight:1.05,letterSpacing:-.02,color:Ht},xt={...C,...p(12),letterSpacing:.12,color:re},g=r(0,0,0,0),Gt=()=>({type:a,props:{...o,name:"Tile",placement:"top-left",share:"content",gap:0,gapPhone:0,...g,[k]:"image",boxShape:"square",darken:Nt,[Oe]:Ft,[x.zoom]:wt,[x.darken]:Dt},slots:{[i]:[{type:a,props:{...o,name:"Top row",direction:"row",justify:"between",align:"start",share:"content",phoneRow:2,sharePhone:"content",wrapPhone:"nowrap",widthFit:"fill",gap:8,gapPhone:8,...g,sectionPaddingTop:12,sectionPaddingLeft:12,sectionPaddingRight:12,sectionPaddingTopPhone:10,sectionPaddingLeftPhone:10,sectionPaddingRightPhone:10},slots:{[i]:[{type:a,props:{...o,name:"Tag",direction:"row",share:"content",minWidth:0,...g,[M]:Y},slots:{[i]:[t("tag",{...n,tag:"p",textFit:"ellipsis"},se)]}},t("number",{...n,tag:"p",textFit:"line"},Kt)]}},{type:a,props:{...o,name:"Words",justify:"end",align:"start",placement:"bottom-left",share:"content",widthFit:"fill",sectionHeightMode:"fill",gap:8,gapPhone:8,...r(24,24,12,14),sectionPaddingTopPhone:4,darken:Bt,darkenStyle:"bottom",[M]:Y},slots:{[i]:[{type:a,props:{...o,name:"Heading",widthFit:"fill",gap:4,gapPhone:4,...g},slots:{[i]:[t("eyebrow",{...n,tag:"p",_hiddenPhone:!0},Mt),t("name",{...n,tag:"h3"},Yt)]}},t("meta",{...n,tag:"p"},xt)]}}]}});function Ut(e){return D(e,E,"GalleryB",l=>f([Gt()],(L,s)=>`${l}~tile${s?`.${s}`:""}`))}const Vt={fields:[{key:"image",label:"Image",kind:"image",alt:"name"},{key:"tag",label:"Tag"},{key:"number",label:"Card number"},{key:"eyebrow",label:"Eyebrow"},{key:"name",label:"Title"},{key:"meta",label:"Meta"},{key:"href",label:"Product link",kind:"link"}],seedOnInsert:Ut},Wt=["showCardPrice","showCardFinishes","showCardSizes","showCardBuy","showCardPage"],vt=e=>Object.fromEntries(Object.entries(e).filter(([l])=>!Wt.includes(l))),Ee={fields:[{key:"label",label:"Label"},{key:"href",label:"Link",kind:"link"}],blocks:[{type:Me,label:"Menu link"}],seed:Ye},_e=e=>e.dynamic===!0&&e.relationship==="bundles",gl=(e={})=>ot(e),P={fields:I,blocks:[{type:et,label:"Picture"},{type:q,label:"Eyebrow"},{type:Q,label:"Name"},{type:lt,label:"Specs"},{type:J,label:"Price"},{type:Je,label:"Colour"},{type:tt,label:"Size"},{type:Qe,label:"Buy"}],seed:e=>{if(e.dynamic!==!0)return N(e);const l=S(e);return _e(e)?u(l):N(l)}},de=[{key:"label",label:"Filter name"},{key:Ne,label:"Options",kind:"list",fields:[{key:"label",label:"Option"},{key:"count",label:"Count"}]}],pe=[{slot:Ke,label:He,fields:A},{slot:Fe,label:Be,fields:[]}],$t=[{block:"Reviews",fields:[{key:"quote",label:"Quote"},{key:"title",label:"Title"},{key:"name",label:"Name"},{key:"role",label:"Role · location"},{key:"rating",label:"Rating"},{key:"dateLabel",label:"Date"}],blocks:[{type:"RatingBlock",label:"Rating"}]},{block:"SpecTable",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]},{block:"DetailRows",fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"}]},{block:"FooterMenu",...Ee},{block:st,...Ee},{block:Et,...P},{block:it,...P,slots:[{slot:E,fields:I},{slot:$,label:v,fields:h},...pe],fields:[...I,...h,...A],seed:e=>Z(X(at(e)))},{block:"RelatedProducts",...P,seed:e=>{const l=S({...vt(e),dynamic:!0});return _e(l)?u(l):N(l,{legacyWellHonoured:!0})}},{block:"BundleOffer",...P,seed:e=>u(S({...e,columns:Re(e),dynamic:!0}))},{block:_t,slots:[{slot:E,fields:[]},{slot:Ae,label:Ie,fields:W},{slot:fe,label:ke,fields:[]}],fields:W,blocks:[{type:ye,label:"Product Gallery"},{type:q,label:"Eyebrow"},{type:Q,label:"Name"},{type:J,label:"Price"}],seed:e=>Se(ue(Ce(e)))},{block:nt,slots:[{slot:E,fields:de},{slot:$,label:v,fields:h},...pe],fields:[...de,...h,...A],blocks:[{type:R,label:"Card list"}],seed:e=>Z(X(we(e)))},{block:rt,fields:[{key:"label",label:"Pick"},{key:"mark",label:"Remove mark"}],seed:De},{block:"ContactRouting",slots:[{slot:Ve,label:"Topic card",fields:z},{slot:Ue,label:"Reason chip",fields:Ge},{slot:xe,label:"Channel row",fields:j}],fields:[...z,...j],seed:We},{block:ve,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:$e},...[Ze,Xe].map(e=>({block:e,slots:ze,fields:je,seed:l=>qe(e,l)})),{block:"Events",...Ct},{block:"Collections",...ut},{block:"GalleryB",...Vt},{block:"FitmentTable",fields:[...ee,...te],slots:[{slot:pt,label:dt,fields:ee},{slot:ct,label:Tt,fields:te}]}];ce($t);export{$t as STOREFRONT_CARD_TEMPLATES,At as collectionCardSeed,_e as drawsKits,Rt as eventsCardSeeds,Gt as galleryTileSeed,gl as productGridCardSeed,It as withCollectionsTemplate,yt as withEventsTemplate,Ut as withGalleryTemplate};
1
+ import{CARD_LIST_TYPE as R,CARD_ROW_FIELD_PROP as y,CARD_ROW_LINK_PROP as m,CARD_TEMPLATE_SLOT as E,registerCardTemplates as ce}from"efficient-web-builder/format/lib/content/card-template";import{DIM as d,INNER_BOX as o,LABEL_FACE as C,TEXT as n,boxPadding as r,fillSlot as H,labelLook as p,labelStyle as K,seedNodes as f,token as _}from"efficient-web-builder/format/lib/document/seed-parts";import{BOX_SHOW_KEY as M,BOX_SHOW_ON_CARD_HOVER as Y,HOVER_KEY as Le,PICTURE_HOVER_KEYS as G}from"efficient-web-builder/format/lib/animation/hover";import{BOX_TYPE as a,CONTAINER_BLOCKS_SLOT as i}from"efficient-web-builder/format/lib/document/container-blocks";import{BOX_ROW_IMAGE_PROP as k}from"efficient-web-builder/format/lib/content/box-card-rule";import{POST_CARD_HEIGHT as Oe}from"efficient-web-builder/format/lib/post-card-layout";import{OVERLAY_INK_LIGHT as me}from"efficient-web-builder/format/lib/theme";import{EVENTS_FEATURED_DARKEN as be,EVENTS_FEATURED_DARKEN_STYLE as x,EVENTS_FEATURED_PLACEMENT as he}from"../content/events-featured-look.js";import{COLLECTION_DARKEN as ge,COLLECTION_HOVER_DARKEN as Pe,COLLECTION_HOVER_ZOOM as U}from"../content/collection-card-look.js";import{COLLECTION_CARD_REGIONS as b,COLLECTION_CARD_TEXT_SIZE as Re}from"efficient-web-builder/format/lib/sections/collection-card-text-regions";import{SH_LINK as V}from"efficient-web-builder/render/lib/document/blocks/general/section-to-box-row-parts";import{rowFieldTextSeed as t}from"efficient-web-builder/format/lib/document/blocks/general/Cards/card-seed";import{withRelatedTabletColumns as S}from"../sections/product-grid-columns.js";import{bundleColumns as ye}from"../sections/bundle-to-grid.js";import{HERO_GALLERY_BLOCK as Ce,withHeroTemplate as fe}from"../content/hero-seed.js";import{HERO_BUY_SLOT as ke,HERO_BUY_SLOT_LABEL as Se,withHeroBuyTemplate as Ae}from"../content/hero-buy-seed.js";import{HERO_OPTION_FIELDS as W,HERO_OPTION_SLOT as Ie,HERO_OPTION_SLOT_LABEL as ue,withHeroOptionTemplate as Ne}from"../content/hero-option-seed.js";import{FILTER_OPTIONS_FIELD as De,withFilterChipsTemplate as we,withFilterTemplate as Be}from"../content/filter-card-seed.js";import{FACET_ROW_FIELDS as h,FACET_TEMPLATE_LABEL as v,FACET_TEMPLATE_SLOT as $,withFacetTemplate as X}from"../content/facet-row-seed.js";import{RAIL_HEAD_TEMPLATE_LABEL as Fe,RAIL_HEAD_TEMPLATE_SLOT as He,RAIL_ROW_FIELDS as A,RAIL_TEMPLATE_LABEL as Ke,RAIL_TEMPLATE_SLOT as Me,withRailTemplates as Z}from"../content/rail-row-seed.js";import{MENU_LINK_BLOCK as Ye,withMenuTemplate as Ge}from"../content/menu-card-seed.js";import{CONTACT_CHANNEL_FIELDS as j,CONTACT_CHANNEL_SLOT as xe,CONTACT_REASON_FIELDS as Ue,CONTACT_REASON_SLOT as Ve,CONTACT_TOPIC_FIELDS as z,CONTACT_TOPIC_SLOT as We,withContactTemplates as ve}from"../content/contact-card-seed.js";import{ARTICLE_BODY_BLOCK as $e,withArticleBodyTemplate as Xe}from"efficient-web-builder/format/lib/document/article-body-seed";import{APPOINTMENT_BOOKING_TYPE as Ze,BOOKING_BOX_TYPE as je,BOOKING_OPTION_FIELDS as ze,BOOKING_TEMPLATE_SLOTS as qe,withBookingTemplates as Qe}from"../content/booking-card-seed.js";import{PRODUCT_BUY_BLOCK as Je,PRODUCT_CARD_FIELDS as I,PRODUCT_COLOUR_BLOCK as et,PRODUCT_EYEBROW_BLOCK as q,PRODUCT_NAME_BLOCK as Q,PRODUCT_PICTURE_BLOCK as tt,PRODUCT_PRICE_BLOCK as J,PRODUCT_SIZE_BLOCK as lt,PRODUCT_SPECS_BLOCK as ot,productCardSeed as at,withKitCardTemplate as u,withListingCardTemplate as it,withProductCardTemplate as N}from"../content/product-card-seed.js";import{ALLOY_WHEELS_LISTING_TYPE as nt,FILTER_BLOCK_TYPE as rt,FILTER_CHIPS_TYPE as st,MENU_BLOCK_TYPE as Et,PRODUCT_GRID_TYPE as _t,PRODUCT_HERO_TYPE as dt}from"./document-nodes.js";import{withSeededSlot as D}from"../content/seed-ids.js";import{FITMENT_HEAD_FIELDS as ee,FITMENT_HEAD_TEMPLATE_LABEL as pt,FITMENT_HEAD_TEMPLATE_SLOT as Tt,FITMENT_ROW_FIELDS as te,FITMENT_ROW_TEMPLATE_LABEL as ct,FITMENT_ROW_TEMPLATE_SLOT as Lt}from"../content/fitment-row-seed.js";const le="tags",T=p(12),oe={textStyle:"heading-3",..._("headingSmall",20),weight:500,lineHeight:1.2,letterSpacing:-.02},ae={textStyle:"body-1",..._("body",14),lineHeight:1.55},Ot={...oe,..._("headingSmall",30)},mt={sectionPaddingTop:24,sectionPaddingRight:28,sectionPaddingBottom:32,sectionPaddingLeft:28,sectionPaddingTopPhone:24,sectionPaddingRightPhone:28,sectionPaddingBottomPhone:32,sectionPaddingLeftPhone:28},bt=Oe.fallback,ht=480,gt=70,Pt=()=>({type:a,props:{...o,name:"Featured",[k]:"cover",darken:be,darkenStyle:x,darkenPhone:gt,darkenStylePhone:x,placement:he,direction:"column",gap:8,gapPhone:8,...r(32,32,20,20),sectionHeightMode:"fixed",sectionHeightValue:bt,sectionHeightUnit:"px",sectionHeightModePhone:"fixed",sectionHeightValuePhone:ht,sectionHeightUnitPhone:"px",[m]:"href"},slots:{[i]:[t("meta",{...n,tag:"p"},T,!0),t("title",{...n,tag:"h3",widthFit:"fill"},Ot),t("excerpt",{...d,tag:"p",widthFit:"fill",maxWidth:384},ae),t("dateLabel",{...d,tag:"p"},{...T,color:"muted"})]}}),Rt=()=>({type:a,props:{...o,name:"Post",gap:0,gapPhone:0,...r(0,0,0,0),...H("surface"),shadow:!0},slots:{[i]:[{type:"ImageBlock",props:{[y]:"cover",aspect:"16/10",contained:!1}},{type:a,props:{...o,name:"Words",gap:12,gapPhone:12,...mt},slots:{[i]:[{type:a,props:{...o,name:"Meta",direction:"row",wrap:!0,share:"content",sharePhone:"content",phoneRow:2,gap:12,gapPhone:12,...r(0,0,0,0)},slots:{[i]:[t("meta",{...n,tag:"p"},T,!0),t("dateLabel",{...d,tag:"p"},{...T,color:"muted"},!0)]}},t("title",{...n,tag:"h3",widthFit:"fill"},oe),t("excerpt",{...d,tag:"p",widthFit:"fill"},ae),{type:R,props:{[y]:le},slots:{template:[{type:a,props:{...o,name:"Chip",...r(4,8,4,8),sectionBorder:{width:1}},slots:{[i]:[t("label",{...d,tag:"p"},T)]}}]}},{type:"ButtonBlock",props:{variant:"ghost",label:"Read more",href:"",[m]:"href",...V,icon:"arrow-right",iconPosition:"after",_partStyles:{label:K(12)}}}]}}]}}),yt=()=>[Pt(),Rt()];function Ct(e){const l=["featured","post"];return D(e,E,"Events",O=>f(yt(),(s,Te)=>{const[w,...B]=Te.split("."),F=l[Number(w)]??`card${w}`;return B.length?`${O}~${F}.${B.join(".")}`:`${O}~${F}`}))}const ft={fields:[{key:"cover",label:"Cover",kind:"image",alt:"title"},{key:"meta",label:"Eyebrow"},{key:"dateLabel",label:"Date"},{key:"title",label:"Title"},{key:"excerpt",label:"Excerpt",multiline:!0},{key:"href",label:"Link",kind:"link"},{key:le,label:"Tags",kind:"list",fields:[{key:"label",label:"Tag"}]}],blocks:[{type:R,label:"Card list"}],seedOnInsert:Ct},c=e=>Number(/(\d+)px/.exec(e)?.[1]),L={tag:c(b.tag.builtIn),name:c(b.name.builtIn),namePhone:c(Re.namePhone),body:c(b.body.builtIn),link:c(b.link.builtIn)},kt={...p(L.tag),letterSpacing:.25},St={textStyle:"heading-2",..._("headingMedium",L.name,L.namePhone),weight:500,lineHeight:1,letterSpacing:-.03},At={textStyle:"body-1",..._("body",L.body),lineHeight:1.5,paragraphSpacing:12},ie=()=>[t("tag",{...n,tag:"p"},kt,!0),t("name",{...n,tag:"h3",widthFit:"fill"},St),t("desc",{...n,tag:"p",widthFit:"fill",maxWidth:420},At),{type:"ButtonBlock",props:{variant:"ghost",label:"Explore",href:"",[m]:"href",...V,icon:"arrow-right",iconPosition:"after",_partStyles:{label:K(L.link)}}}],ne={_hidden:!0,_hiddenTablet:!0,_hiddenPhone:!1},It=()=>({type:a,props:{...o,name:"Collection",gap:0,gapPhone:0,...r(0,0,0,0),[m]:"href"},slots:{[i]:[{type:a,props:{...o,name:"Picture",[k]:"image",boxShape:"portrait",darken:ge,placement:"bottom-left",direction:"column",gap:12,gapPhone:12,...r(32,32),hoverZoom:U,hoverDarken:Pe,_hiddenPhone:!0},slots:{[i]:ie()}},{type:"ImageBlock",props:{[y]:"image",aspect:"4/5",contained:!1,hoverZoom:U,...ne}},{type:a,props:{...o,name:"Words",gap:12,gapPhone:12,...r(24,24),...H("surface"),...ne},slots:{[i]:ie()}}]}});function ut(e){return D(e,E,"Collections",l=>f([It()],(O,s)=>`${l}~card${s?`.${s}`:""}`))}const Nt={fields:[{key:"tag",label:"Eyebrow"},{key:"name",label:"Title"},{key:"desc",label:"Description",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"name"},{key:"href",label:"Link",kind:"link"}],seedOnInsert:ut},Dt=35,wt=50,Bt=106,Ft=85,Ht="nextImage",Kt=me,re="#c4c1ba",se={...C,...p(11),letterSpacing:.24,color:"main"},Mt={...se,color:re},Yt={...C,...p(12,11),color:"main"},Gt={textStyle:"heading-3",..._("headingSmall",22,16),weight:500,lineHeight:1.05,letterSpacing:-.02,color:Kt},xt={...C,...p(12),letterSpacing:.12,color:re},g=r(0,0,0,0),Ut=()=>({type:a,props:{...o,name:"Tile",placement:"top-left",share:"content",gap:0,gapPhone:0,...g,[k]:"image",boxShape:"square",darken:Dt,[Le]:Ht,[G.zoom]:Bt,[G.darken]:wt},slots:{[i]:[{type:a,props:{...o,name:"Top row",direction:"row",justify:"between",align:"start",share:"content",phoneRow:2,sharePhone:"content",wrapPhone:"nowrap",widthFit:"fill",gap:8,gapPhone:8,...g,sectionPaddingTop:12,sectionPaddingLeft:12,sectionPaddingRight:12,sectionPaddingTopPhone:10,sectionPaddingLeftPhone:10,sectionPaddingRightPhone:10},slots:{[i]:[{type:a,props:{...o,name:"Tag",direction:"row",share:"content",minWidth:0,...g,[M]:Y},slots:{[i]:[t("tag",{...n,tag:"p",textFit:"ellipsis"},se)]}},t("number",{...n,tag:"p",textFit:"line"},Mt)]}},{type:a,props:{...o,name:"Words",justify:"end",align:"start",placement:"bottom-left",share:"content",widthFit:"fill",sectionHeightMode:"fill",gap:8,gapPhone:8,...r(24,24,12,14),sectionPaddingTopPhone:4,darken:Ft,darkenStyle:"bottom",[M]:Y},slots:{[i]:[{type:a,props:{...o,name:"Heading",widthFit:"fill",gap:4,gapPhone:4,...g},slots:{[i]:[t("eyebrow",{...n,tag:"p",_hiddenPhone:!0},Yt),t("name",{...n,tag:"h3"},Gt)]}},t("meta",{...n,tag:"p"},xt)]}}]}});function Vt(e){return D(e,E,"GalleryB",l=>f([Ut()],(O,s)=>`${l}~tile${s?`.${s}`:""}`))}const Wt={fields:[{key:"image",label:"Image",kind:"image",alt:"name"},{key:"tag",label:"Tag"},{key:"number",label:"Card number"},{key:"eyebrow",label:"Eyebrow"},{key:"name",label:"Title"},{key:"meta",label:"Meta"},{key:"href",label:"Product link",kind:"link"}],seedOnInsert:Vt},vt=["showCardPrice","showCardFinishes","showCardSizes","showCardBuy","showCardPage"],$t=e=>Object.fromEntries(Object.entries(e).filter(([l])=>!vt.includes(l))),Ee={fields:[{key:"label",label:"Label"},{key:"href",label:"Link",kind:"link"}],blocks:[{type:Ye,label:"Menu link"}],seed:Ge},_e=e=>e.dynamic===!0&&e.relationship==="bundles",Rl=(e={})=>at(e),P={fields:I,blocks:[{type:tt,label:"Picture"},{type:q,label:"Eyebrow"},{type:Q,label:"Name"},{type:ot,label:"Specs"},{type:J,label:"Price"},{type:et,label:"Colour"},{type:lt,label:"Size"},{type:Je,label:"Buy"}],seed:e=>{if(e.dynamic!==!0)return N(e);const l=S(e);return _e(e)?u(l):N(l)}},de=[{key:"label",label:"Filter name"},{key:De,label:"Options",kind:"list",fields:[{key:"label",label:"Option"},{key:"count",label:"Count"}]}],pe=[{slot:Me,label:Ke,fields:A},{slot:He,label:Fe,fields:[]}],Xt=[{block:"Reviews",fields:[{key:"quote",label:"Quote"},{key:"title",label:"Title"},{key:"name",label:"Name"},{key:"role",label:"Role · location"},{key:"rating",label:"Rating"},{key:"dateLabel",label:"Date"}],blocks:[{type:"RatingBlock",label:"Rating"}]},{block:"SpecTable",fields:[{key:"label",label:"Label"},{key:"value",label:"Value"}]},{block:"DetailRows",fields:[{key:"eyebrow",label:"Eyebrow"},{key:"title",label:"Title"},{key:"copy",label:"Body",multiline:!0},{key:"image",label:"Image",kind:"image",alt:"title"},{key:"tag",label:"Image tag"}]},{block:"FooterMenu",...Ee},{block:Et,...Ee},{block:_t,...P},{block:nt,...P,slots:[{slot:E,fields:I},{slot:$,label:v,fields:h},...pe],fields:[...I,...h,...A],seed:e=>Z(X(it(e)))},{block:"RelatedProducts",...P,seed:e=>{const l=S({...$t(e),dynamic:!0});return _e(l)?u(l):N(l,{legacyWellHonoured:!0})}},{block:"BundleOffer",...P,seed:e=>u(S({...e,columns:ye(e),dynamic:!0}))},{block:dt,slots:[{slot:E,fields:[]},{slot:Ie,label:ue,fields:W},{slot:ke,label:Se,fields:[]}],fields:W,blocks:[{type:Ce,label:"Product Gallery"},{type:q,label:"Eyebrow"},{type:Q,label:"Name"},{type:J,label:"Price"}],seed:e=>Ae(Ne(fe(e)))},{block:rt,slots:[{slot:E,fields:de},{slot:$,label:v,fields:h},...pe],fields:[...de,...h,...A],blocks:[{type:R,label:"Card list"}],seed:e=>Z(X(Be(e)))},{block:st,fields:[{key:"label",label:"Pick"},{key:"mark",label:"Remove mark"}],seed:we},{block:"ContactRouting",slots:[{slot:We,label:"Topic card",fields:z},{slot:Ve,label:"Reason chip",fields:Ue},{slot:xe,label:"Channel row",fields:j}],fields:[...z,...j],seed:ve},{block:$e,fields:[{key:"heading",label:"Subhead"},{key:"paragraph",label:"Paragraph",multiline:!0}],seed:Xe},...[je,Ze].map(e=>({block:e,slots:qe,fields:ze,seed:l=>Qe(e,l)})),{block:"Events",...ft},{block:"Collections",...Nt},{block:"GalleryB",...Wt},{block:"FitmentTable",fields:[...ee,...te],slots:[{slot:Tt,label:pt,fields:ee},{slot:Lt,label:ct,fields:te}]}];ce(Xt);export{Xt as STOREFRONT_CARD_TEMPLATES,It as collectionCardSeed,_e as drawsKits,yt as eventsCardSeeds,Ut as galleryTileSeed,Rl as productGridCardSeed,ut as withCollectionsTemplate,Ct as withEventsTemplate,Vt as withGalleryTemplate};
@@ -1 +1 @@
1
- import{isNode as a}from"efficient-easel/data";import{mapEachNode as l,mapNodeLists as m,mapPageContent as E}from"efficient-web-builder/format/lib/document/node-lists";const T="FilterBlock",x="FilterChipsBlock",y="ProductGrid",A="ProductHero",C="AlloyWheelsListing",N="MenuBlock";function L(r){const o=r??{},t=[];Array.isArray(o.content)&&t.push(o.content);for(const n of Object.values(o.zones??{}))Array.isArray(n)&&t.push(n);return t}function _(r){const o=[],t=(n,u)=>{const i=[n,...u];for(const c of n)a(c)&&(o.push({node:c,order:o.length,lists:i}),m(c,p=>(t(p,i),p)))};for(const n of L(r))t(n,[]);return o}function O(r){return _(r).map(o=>o.node)}function h(r,o){const t=s=>o(m(s,e=>l(e,n)),s),n=s=>t(s),u=s=>l(s,e=>a(e)?t(e):e),i=E(r,u),c=r.zones;if(!c)return i;let p=null;for(const[s,e]of Object.entries(c)){if(!Array.isArray(e))continue;const f=u(e);f!==e&&((p??={...c})[s]=f)}return p?{...i,zones:p}:i}export{C as ALLOY_WHEELS_LISTING_TYPE,T as FILTER_BLOCK_TYPE,x as FILTER_CHIPS_TYPE,N as MENU_BLOCK_TYPE,y as PRODUCT_GRID_TYPE,A as PRODUCT_HERO_TYPE,O as documentNodes,h as mapDocumentNodes,_ as placedDocumentNodes};
1
+ import{isNode as i}from"efficient-easel/data";import{mapEachNode as u,mapNodeLists as a,mapPageLists as f}from"efficient-web-builder/format/lib/document/node-lists";const _="FilterBlock",P="FilterChipsBlock",d="ProductGrid",T="ProductHero",x="AlloyWheelsListing",N="MenuBlock";function l(e){const o=e??{},t=[];Array.isArray(o.content)&&t.push(o.content);for(const s of Object.values(o.zones??{}))Array.isArray(s)&&t.push(s);return t}function L(e){const o=[],t=(s,c)=>{const n=[s,...c];for(const r of s)i(r)&&(o.push({node:r,order:o.length,lists:n}),a(r,p=>(t(p,n),p)))};for(const s of l(e))t(s,[]);return o}function y(e){return L(e).map(o=>o.node)}function O(e,o){const t=n=>o(a(n,r=>u(r,s)),n),s=n=>t(n);return f(e,n=>u(n,r=>i(r)?t(r):r))}export{x as ALLOY_WHEELS_LISTING_TYPE,_ as FILTER_BLOCK_TYPE,P as FILTER_CHIPS_TYPE,N as MENU_BLOCK_TYPE,d as PRODUCT_GRID_TYPE,T as PRODUCT_HERO_TYPE,y as documentNodes,O as mapDocumentNodes,L as placedDocumentNodes};
@@ -1 +1 @@
1
- import{shownForOption as p,withRowRules as i}from"efficient-web-builder/format/lib/document/show-when-attach";const t=["issues","posts"],T=[{label:"Issues",value:"issues"},{label:"Blog posts",value:"posts"}],e="issues";function E(s){return t.includes(s)?s:e}const r={issues:["issues"],_gPosts:["posts"],posts:["posts"],limit:["posts"]};function S(s){return i(s,Object.entries(r).map(([o,n])=>[[o],p("contentType",t,e,n)]))}export{t as SUBSCRIBE_CONTENT_TYPES,e as SUBSCRIBE_CONTENT_TYPE_DEFAULT,r as SUBSCRIBE_CONTENT_TYPE_FIELDS,T as SUBSCRIBE_CONTENT_TYPE_OPTIONS,E as subscribeContentTypeOf,S as withSubscribeContentRules};
1
+ import{parseOption as n}from"efficient-web-builder/format/lib/parse-option";import{shownForOption as r,withRowRules as i}from"efficient-web-builder/format/lib/document/show-when-attach";const t=["issues","posts"],S=[{label:"Issues",value:"issues"},{label:"Blog posts",value:"posts"}],o="issues";function _(s){return n(t,o,s)}const u={issues:["issues"],_gPosts:["posts"],posts:["posts"],limit:["posts"]};function c(s){return i(s,Object.entries(u).map(([e,p])=>[[e],r("contentType",t,o,p)]))}export{t as SUBSCRIBE_CONTENT_TYPES,o as SUBSCRIBE_CONTENT_TYPE_DEFAULT,u as SUBSCRIBE_CONTENT_TYPE_FIELDS,S as SUBSCRIBE_CONTENT_TYPE_OPTIONS,_ as subscribeContentTypeOf,c as withSubscribeContentRules};
@@ -8,6 +8,8 @@ export declare const FRAME_ROOM_NO_TOP = "pt-0";
8
8
  export declare const FRAME_ROOM_NO_TOP_PHONE = "max-view-wide:pt-0";
9
9
  export declare const FRAME_ROOM_Y = "py-[120px] max-view-wide:py-[70px]";
10
10
  export declare const FRAME_ROOM_OWN_BOX = "pt-0 pb-[120px] max-view-wide:pt-0 max-view-wide:pb-[70px]";
11
+ export declare const SECTION_FRAME_INLINE = "relative z-[2] bg-bg py-[120px] max-view-wide:py-[70px]";
12
+ export declare const SECTION_FRAME_OWN_BOX = "relative z-[2] bg-bg pt-0 pb-[120px] max-view-wide:pt-0 max-view-wide:pb-[70px]";
11
13
  export declare const FRAME_ROOM_PRODUCT_GRID = "pt-[var(--pg-pt)] pb-[120px]";
12
14
  export declare const FRAME_ROOM_PRODUCT_GRID_PHONE = "max-view-wide:pt-[70px] max-view-wide:pb-[70px]";
13
15
  export declare const FRAME_ROOM_COUNT = "py-[32px] max-view-wide:py-[24px]";
@@ -1 +1 @@
1
- import{BAND_PAD_KEYS as r,BAND_TO_SECTION_PAD as m,SECTION_PAD_KEYS as c,bandPadAttrs as a}from"efficient-web-builder/render/lib/content/section-padding";import{finiteNumber as p}from"efficient-web-builder/format/lib/finite-number";import{EDGE_LINE_ATTRS as A}from"efficient-web-builder/format/lib/content/view-lines";const P="py-[120px]",R="pb-[120px]",l=70,T="max-view-wide:py-[70px]",u="max-view-wide:pt-[70px]",E="max-view-wide:pb-[70px]",N="pt-0",b="max-view-wide:pt-0",I=`${P} ${T}`,S=`${N} ${R} ${b} ${E}`,B=`pt-[var(--pg-pt)] ${R}`,C=`${u} ${E}`,H="py-[32px] max-view-wide:py-[24px]",g={top:100,bottom:100},Y={top:120,bottom:120},k={top:120,bottom:120},O={top:c.top,bottom:c.bottom},D=[...m.map(([t])=>t),O.top,O.bottom];function v(t){const o={};for(const n of D)t[n]!==void 0&&(o[n]=t[n]);return o}function G(t,o,n={}){const e=n.nonNegative?F(t??{}):t??{},d={top:p(e[O.top])===void 0?void 0:o.top,bottom:p(e[O.bottom])===void 0?void 0:o.bottom},s=n.noTop&&p(e[r.top])===void 0,_=a(e,d,{noTop:s}),x=Object.fromEntries(Object.entries(_.style).filter(([f,M])=>M!==void 0&&!(s&&f==="paddingTop")));return{..._,style:x,attrs:_.className?A:{}}}function F(t){const o={...t};for(const n of[r.top,r.bottom]){const e=p(o[n]);e!==void 0&&e<0&&delete o[n]}return o}function K(t,o){return o.className?`${t} ${o.className}`:t}function i(t){return t==null||t===!1||typeof t=="string"&&!t.trim()}function U(t,o,n){return i(t)&&i(o)&&i(n)}export{g as DETAIL_ROWS_ROOM,k as FRAME_120,l as FRAME_PHONE_PX,H as FRAME_ROOM_COUNT,R as FRAME_ROOM_DESKTOP_BOTTOM,P as FRAME_ROOM_DESKTOP_Y,N as FRAME_ROOM_NO_TOP,b as FRAME_ROOM_NO_TOP_PHONE,S as FRAME_ROOM_OWN_BOX,E as FRAME_ROOM_PHONE_BOTTOM,T as FRAME_ROOM_PHONE_Y,B as FRAME_ROOM_PRODUCT_GRID,C as FRAME_ROOM_PRODUCT_GRID_PHONE,I as FRAME_ROOM_Y,Y as PRODUCT_GRID_ROOM,v as bandPadProps,G as framedBandPad,U as headIsEmpty,K as withBandClasses};
1
+ import{BAND_PAD_KEYS as r,BAND_TO_SECTION_PAD as m,SECTION_PAD_KEYS as c,bandPadAttrs as a}from"efficient-web-builder/render/lib/content/section-padding";import{finiteNumber as O}from"efficient-web-builder/format/lib/finite-number";import{EDGE_LINE_ATTRS as A}from"efficient-web-builder/format/lib/content/view-lines";const N="py-[120px]",R="pb-[120px]",y=70,T="max-view-wide:py-[70px]",b="max-view-wide:pt-[70px]",E="max-view-wide:pb-[70px]",P="pt-0",u="max-view-wide:pt-0",D=`${N} ${T}`,F=`${P} ${R} ${u} ${E}`,g=`relative z-[2] bg-bg ${D}`,B=`relative z-[2] bg-bg ${F}`,C=`pt-[var(--pg-pt)] ${R}`,v=`${b} ${E}`,H="py-[32px] max-view-wide:py-[24px]",Y={top:100,bottom:100},k={top:120,bottom:120},G={top:120,bottom:120},p={top:c.top,bottom:c.bottom},I=[...m.map(([t])=>t),p.top,p.bottom];function K(t){const o={};for(const n of I)t[n]!==void 0&&(o[n]=t[n]);return o}function U(t,o,n={}){const e=n.nonNegative?$(t??{}):t??{},d={top:O(e[p.top])===void 0?void 0:o.top,bottom:O(e[p.bottom])===void 0?void 0:o.bottom},s=n.noTop&&O(e[r.top])===void 0,_=a(e,d,{noTop:s}),x=Object.fromEntries(Object.entries(_.style).filter(([M,f])=>f!==void 0&&!(s&&M==="paddingTop")));return{..._,style:x,attrs:_.className?A:{}}}function $(t){const o={...t};for(const n of[r.top,r.bottom]){const e=O(o[n]);e!==void 0&&e<0&&delete o[n]}return o}function h(t,o){return o.className?`${t} ${o.className}`:t}function i(t){return t==null||t===!1||typeof t=="string"&&!t.trim()}function L(t,o,n){return i(t)&&i(o)&&i(n)}export{Y as DETAIL_ROWS_ROOM,G as FRAME_120,y as FRAME_PHONE_PX,H as FRAME_ROOM_COUNT,R as FRAME_ROOM_DESKTOP_BOTTOM,N as FRAME_ROOM_DESKTOP_Y,P as FRAME_ROOM_NO_TOP,u as FRAME_ROOM_NO_TOP_PHONE,F as FRAME_ROOM_OWN_BOX,E as FRAME_ROOM_PHONE_BOTTOM,T as FRAME_ROOM_PHONE_Y,C as FRAME_ROOM_PRODUCT_GRID,v as FRAME_ROOM_PRODUCT_GRID_PHONE,D as FRAME_ROOM_Y,k as PRODUCT_GRID_ROOM,g as SECTION_FRAME_INLINE,B as SECTION_FRAME_OWN_BOX,K as bandPadProps,U as framedBandPad,L as headIsEmpty,h as withBandClasses};
@@ -1 +1 @@
1
- import{FRAME_ROOM_NO_TOP as e,FRAME_ROOM_NO_TOP_PHONE as r,FRAME_ROOM_OWN_BOX as t,FRAME_ROOM_Y as R}from"./band-padding.js";const n=`relative z-[2] bg-bg ${R}`,E=`relative z-[2] bg-bg ${t}`,o=`relative z-[2] ${e} ${r}`;function A(_,O){return _?O?o:E:n}function i(_,O){return O&&(_?.blockCount??0)>0?_:void 0}export{A as galleryFrame,i as galleryTemplate};
1
+ import{FRAME_ROOM_NO_TOP as r,FRAME_ROOM_NO_TOP_PHONE as e,SECTION_FRAME_INLINE as n,SECTION_FRAME_OWN_BOX as E}from"./band-padding.js";const t=`relative z-[2] ${r} ${e}`;function N(O,_){return O?_?t:E:n}function R(O,_){return _&&(O?.blockCount??0)>0?O:void 0}export{N as galleryFrame,R as galleryTemplate};
@@ -2,10 +2,12 @@ export type HeroLayout = "split" | "imageRight" | "stacked";
2
2
  export declare const HERO_LAYOUTS: readonly ["split", "imageRight", "stacked"];
3
3
  export declare const DEFAULT_HERO_LAYOUT: HeroLayout;
4
4
  export declare function parseHeroLayout(v: unknown): HeroLayout;
5
- export type HeroTextAlign = "left" | "center";
5
+ declare const HERO_TEXT_ALIGNS: readonly ["left", "center"];
6
+ export type HeroTextAlign = (typeof HERO_TEXT_ALIGNS)[number];
6
7
  export declare const DEFAULT_HERO_TEXT_ALIGN: HeroTextAlign;
7
8
  export declare function parseHeroTextAlign(v: unknown): HeroTextAlign;
8
9
  export declare const HERO_RATIO_MIN = 35;
9
10
  export declare const HERO_RATIO_MAX = 70;
10
11
  export declare const DEFAULT_HERO_RATIO = 50;
11
12
  export declare function parseHeroRatio(v: unknown): number;
13
+ export {};
@@ -1 +1 @@
1
- const r=["split","imageRight","stacked"],n="split";function s(t){return r.includes(t)?t:n}const c="left";function u(t){return t==="center"?"center":"left"}const o=35,i=70,p=50;function _(t){const e=typeof t=="number"?t:Number(t);return Number.isFinite(e)?Math.min(i,Math.max(o,Math.round(e))):p}export{n as DEFAULT_HERO_LAYOUT,p as DEFAULT_HERO_RATIO,c as DEFAULT_HERO_TEXT_ALIGN,r as HERO_LAYOUTS,i as HERO_RATIO_MAX,o as HERO_RATIO_MIN,s as parseHeroLayout,_ as parseHeroRatio,u as parseHeroTextAlign};
1
+ import{parseOption as r}from"efficient-web-builder/format/lib/parse-option";const o=["split","imageRight","stacked"],n="split";function T(t){return r(o,n,t)}const p=["left","center"],i="left";function a(t){return r(p,i,t)}const s=35,_=70,c=50;function u(t){const e=typeof t=="number"?t:Number(t);return Number.isFinite(e)?Math.min(_,Math.max(s,Math.round(e))):c}export{n as DEFAULT_HERO_LAYOUT,c as DEFAULT_HERO_RATIO,i as DEFAULT_HERO_TEXT_ALIGN,o as HERO_LAYOUTS,_ as HERO_RATIO_MAX,s as HERO_RATIO_MIN,T as parseHeroLayout,u as parseHeroRatio,a as parseHeroTextAlign};
@@ -1 +1 @@
1
- import{IMAGE_FIT_LABEL as o,parseImageFit as r}from"efficient-web-builder/format/lib/content/image-fit";const n=["main","thumbs","tiled"],i="thumbs";function c(t){return n.includes(t)?t:i}const p=["contain","cover"],E="contain";function s(t){return r(t,E)}function _(){return p.map(t=>({label:o[t],value:t}))}function m(t,e){return e?"contain":t}export{i as DEFAULT_HERO_GALLERY_MODE,E as DEFAULT_HERO_IMAGE_FIT,n as HERO_GALLERY_MODES,p as HERO_IMAGE_FITS,_ as heroImageFitOptions,c as parseHeroGalleryMode,s as parseHeroImageFit,m as resolveHeroImageFit};
1
+ import{parseOption as r}from"efficient-web-builder/format/lib/parse-option";import{IMAGE_FIT_LABEL as e,parseImageFit as n}from"efficient-web-builder/format/lib/content/image-fit";const i=["main","thumbs","tiled"],p="thumbs";function s(t){return r(i,p,t)}const a=["contain","cover"],E="contain";function _(t){return n(t,E)}function I(){return a.map(t=>({label:e[t],value:t}))}function u(t,o){return o?"contain":t}export{p as DEFAULT_HERO_GALLERY_MODE,E as DEFAULT_HERO_IMAGE_FIT,i as HERO_GALLERY_MODES,a as HERO_IMAGE_FITS,I as heroImageFitOptions,s as parseHeroGalleryMode,_ as parseHeroImageFit,u as resolveHeroImageFit};
@@ -1,4 +1,5 @@
1
- type HeroPricePlacement = "top" | "belowSpecs";
1
+ declare const HERO_PRICE_PLACEMENTS: readonly ["top", "belowSpecs"];
2
+ type HeroPricePlacement = (typeof HERO_PRICE_PLACEMENTS)[number];
2
3
  export declare const DEFAULT_HERO_PRICE_PLACEMENT: HeroPricePlacement;
3
4
  export declare function parseHeroPricePlacement(value: unknown): HeroPricePlacement;
4
5
  export {};
@@ -1 +1 @@
1
- const E="top";function o(e){return e==="belowSpecs"?"belowSpecs":"top"}export{E as DEFAULT_HERO_PRICE_PLACEMENT,o as parseHeroPricePlacement};
1
+ import{parseOption as e}from"efficient-web-builder/format/lib/parse-option";const t=["top","belowSpecs"],r="top";function E(o){return e(t,r,o)}export{r as DEFAULT_HERO_PRICE_PLACEMENT,E as parseHeroPricePlacement};
@@ -1 +1 @@
1
- import{answerOrder as Q,answersForKind as R,facetFieldKey as k,keepForFilter as q,NO_FIELD_ANSWERS as J,orderByAnswers as ee}from"../content/field-usage.js";import{STOCK_WORDS as te}from"../content/stock-words.js";import{parseOption as ne}from"efficient-web-builder/format/lib/parse-option";import{comparePrice as L,FROM_PREFIX_START as re,priceIn as ie,withinPriceRange as se}from"./price-display.js";import{trimDecimal as oe,wheelSizeLabel as le}from"./spec-format.js";import{itemLugs as ce,lugFilterLabel as ae}from"./lug-count.js";import{itemBrand as z,itemCollections as ue,itemDiameters as pe,itemFinishFamilies as fe,itemFinishes as de,itemInStock as F,itemIsNew as E,itemKind as b,itemName as O,itemPcds as me,itemPrices as y,itemSpeedRatings as he,itemTyreSizes as _,itemTyreTypes as Se,PLP_ANY_TYPE_LABEL as ge,PLP_KIND_LABELS as N,PLP_KINDS as ye}from"../catalog/plp-item.js";import{parseTyreSize as Pe,tyreSizeLabel as I,tyreSizeLabels as xe,TYRE_SIZE_PARTS as S,TYRE_SIZE_PART_LABELS as we}from"../tyres/tyre-size.js";const Me={recommended:"Recommended","price-asc":"Price · low to high","price-desc":"Price · high to low",new:"Newest",name:"Name A–Z"},v=Object.keys(Me);function B(e){return ne(v,"recommended",e)}function be(e){return v.filter(t=>t!=="recommended"||e.length<=1)}function Ue(e,t){const r=B(e);return be(t).includes(r)?r:"name"}const P=["tyreSizes","brands","finishes","diameters","collections","pcds","tyreTypes","speedRatings"],A={tyreSizes:["tyre"],brands:["alloy-wheel","tyre"],finishes:["alloy-wheel"],diameters:["alloy-wheel","tyre"],collections:["alloy-wheel"],pcds:["alloy-wheel"],tyreTypes:["tyre"],speedRatings:["tyre"]},_e={diameters:"tyreSizes"};function C(e){if(e.length===0)return[];const t=P.filter(r=>e.every(n=>A[r].includes(n)));return t.filter(r=>{const n=_e[r];return!n||!t.includes(n)})}function Ze(e,t){return t&&e.includes(t)?[t]:[...e]}function K(e){const t=new Set;for(const r of e)t.add(b(r));return[...t]}const je={tyreSizes:[],brands:[],finishes:[],diameters:[],collections:[],pcds:[],tyreTypes:[],speedRatings:[],priceMax:null,priceMin:null,inStockOnly:!1,kind:null,sort:"recommended",page:1};function Ve(e){return`${Ae(e.width)}×${e.diameter}`}function Xe(e){return[...new Set((e.sizePairs??[]).map(t=>le(t.diameter,t.width)))]}function Ae(e){return oe(e)}function x(e,t,r,n=null,i="fail"){const s=b(e),o=l=>i==="fail"||(l==="lugs"?s==="alloy-wheel":A[l].includes(s));if(n!=="kind"&&t.kind&&s!==t.kind)return!1;for(const l of P){if(n===l)continue;const a=t[l];if(a.length===0||!o(l))continue;const f=a.map(String);if(!Y(e,l).some(u=>f.includes(u)))return!1}if(n!=="lugs"&&t.lugs&&t.lugs.length>0&&o("lugs")){const l=ce(e);if(l===null||!t.lugs.includes(l))return!1}return!(n!=="price"&&!se(y(e),r,t.priceMin??null,t.priceMax)||n!=="inStock"&&t.inStockOnly&&!F(e))}function Ge(e,t,r){return e.filter(n=>F(n)&&x(n,t,r,"inStock")).length}function D(e,t,r){const n=[...e],i=(o,l)=>O(o).localeCompare(O(l)),s=K(e).length>1;switch(t){case"price-asc":return n.sort((o,l)=>L(y(o),y(l),r,"asc"));case"price-desc":return n.sort((o,l)=>L(y(o),y(l),r,"desc"));case"name":return n.sort(i);case"new":return n.sort((o,l)=>{const a=(E(l)?1:0)-(E(o)?1:0);return a!==0||!s?a:i(o,l)});default:return n}}function He(e,t,r){return D(e.filter(n=>x(n,t,r)),t.sort,r)}function Qe(e,t,r){return D(e.filter(n=>x(n,t,r,null,"pass")),t.sort,r)}function qe(e){return P.some(t=>e[t].length>0)||(e.lugs?.length??0)>0||e.priceMin!=null||e.priceMax!=null||e.inStockOnly||e.kind!=null}const Je=e=>e.count===0&&!e.checked,Te={tyreSizes:"Size",brands:"Brand",finishes:"Colour",diameters:"Size · diameter",collections:"Collection",pcds:"PCD · fitment",tyreTypes:"Tyre type",speedRatings:"Speed rating"};function Y(e,t){switch(t){case"tyreSizes":return[...new Set(_(e).flatMap(xe))];case"brands":return z(e)?[z(e)]:[];case"finishes":return fe(e);case"diameters":return pe(e).map(String);case"collections":return ue(e);case"pcds":return me(e);case"tyreTypes":return Se(e);case"speedRatings":return he(e)}}function Re(e){const t=new Map;for(const r of e)for(const n of de(r))n.color&&!t.has(n.family)&&t.set(n.family,n.color);return t}function et(e,t,r,n=K(e),i=J,s="fail"){const o=c=>ke(c,n,i),l=Re(e),f=(s==="pass"?P.filter(c=>n.some(g=>A[c].includes(g))):C(n)).filter(c=>c!=="tyreSizes").filter(o).map(c=>{const g=t[c].map(String),T=new Set,M=new Map,w=new Map;for(const p of e){const h=Y(p,c);for(const d of h)T.add(d);for(const d of new Set(h))w.set(d,(w.get(d)??0)+1);if(x(p,t,r,c,s))for(const d of new Set(h))M.set(d,(M.get(d)??0)+1)}const H=[...T].map(p=>({value:p,label:c==="diameters"?`${p}″`:p,count:M.get(p)??0,checked:g.includes(p),swatch:c==="finishes"?l.get(p)??null:null})).sort((p,h)=>{if(c==="diameters")return Number(p.value)-Number(h.value);const d=(w.get(h.value)??0)-(w.get(p.value)??0);return d!==0?d:p.value.localeCompare(h.value)});return{key:c,label:Te[c],options:H}}).filter(c=>c.options.length>$),u=[];for(const c of f){const g=Le(c.key,n,i);g!==void 0&&u.push({fieldKey:c.key,filterOrder:g})}return[...ee(f,c=>c.key,u,"filterOrder")]}const $=1;function tt(e){return e.showCollection===!1?["collections"]:[]}function ke(e,t,r){return t.length===0||r.length===0?!0:t.some(n=>q(R(r,n))(k(e,n)))}function Le(e,t,r){if(r.length===0)return;let n;for(const i of t){const s=Q(R(r,i),"filter")(k(e,i));s!==void 0&&(n===void 0||s<n)&&(n=s)}return n}function ze(e){const t=new Set;for(const r of e)for(const n of _(r))t.add(I(n));return t.size}function nt(e,t){return C(t).includes("tyreSizes")?ze(e)>$:!1}function W(e){const t=Pe(e);if(t)return t;const[r,n]=e.split("/");return{width:r?Number(r):void 0,profile:n?Number(n):void 0}}function Fe(e,t,r){return S.slice(0,S.indexOf(r)).every(n=>{const i=t[n];return i==null||e[n]===i})}function rt(e,t,r){const n=W(t.tyreSizes[0]??""),i=new Set(e.filter(s=>x(s,t,r,"tyreSizes")));return S.map(s=>{const o=new Map;for(const a of e){const f=_(a).filter(u=>Fe(u,n,s));for(const u of new Set(f.map(c=>c[s])))o.has(u)||o.set(u,0),i.has(a)&&o.set(u,(o.get(u)??0)+1)}const l=[...o.keys()].sort((a,f)=>a-f).map(a=>({value:a,label:s==="rim"?`R${a}`:String(a),count:o.get(a)??0}));return{part:s,label:we[s],value:n[s]??null,options:l}})}function it(e,t,r,n){const i={...W(t)},s=S.indexOf(r);i[r]=n??void 0;for(const o of S.slice(s+1))i[o]!=null&&e.some(f=>S.slice(0,S.indexOf(o)+1).every(u=>i[u]==null||f[u]===i[u]))||(i[o]=void 0);return I(i)}function st(e,t,r,n){if(t.length<2)return[];const i=e.filter(s=>x(s,r,n,"kind"));return[{kind:null,label:ge,count:i.length,checked:r.kind===null},...t.map(s=>({kind:s,label:N[s],count:i.filter(o=>b(o)===s).length,checked:r.kind===s}))]}function Ee(e,t){return e.map(r=>ie(y(r),t)).filter(r=>r!==null)}function Oe(e){if(e.length===0)return null;const t=Math.floor(Math.min(...e)),r=Math.ceil(Math.max(...e));return r>t?{min:t,max:r}:null}function ot(e,t){return Oe(Ee(e,t))}function lt(e,t,r){const n=[];e.kind&&n.push({key:"kind",value:e.kind,label:N[e.kind]}),e.inStockOnly&&n.push({key:"inStock",value:"",label:te.inStock});for(const i of P)for(const s of e[i]){const o=String(s);n.push({key:i,value:o,label:i==="diameters"?`${o}″`:i==="pcds"?`PCD ${o}`:o})}for(const i of e.lugs??[])n.push({key:"lugs",value:String(i),label:ae(i)});return e.priceMin!=null&&n.push({key:"priceMin",value:"",label:`${re}${r(e.priceMin,t)}`}),e.priceMax!=null&&n.push({key:"price",value:"",label:`Up to ${r(e.priceMax,t)}`}),n}const m={tyreSizes:"tyreSize",brands:"brand",finishes:"colour",diameters:"size",collections:"collection",pcds:"pcd",tyreTypes:"tyreType",speedRatings:"speed"},U="type",Z="maxPrice",j="minPrice",V="inStock",X="sort",G="page";function Ne(e){const t=typeof e=="string"?new URLSearchParams(e):e,r=l=>t.getAll(l).flatMap(a=>a.split(",")).filter(Boolean),n=Number(t.get(Z)),i=Number(t.get(j)),s=Number(t.get(G)),o=t.get(U);return{tyreSizes:r(m.tyreSizes),brands:r(m.brands),finishes:r(m.finishes),diameters:r(m.diameters).map(Number).filter(Number.isFinite),collections:r(m.collections),pcds:r(m.pcds),tyreTypes:r(m.tyreTypes),speedRatings:r(m.speedRatings),priceMax:Number.isFinite(n)&&n>0?n:null,priceMin:Number.isFinite(i)&&i>0?i:null,inStockOnly:t.get(V)==="1",kind:ye.find(l=>l===o)??null,sort:B(t.get(X)),page:Number.isFinite(s)&&s>=1?Math.floor(s):1}}function Ie(e){const t=new URLSearchParams;for(const r of P){const n=e[r];n.length>0&&t.set(m[r],n.join(","))}return e.priceMin!=null&&t.set(j,String(e.priceMin)),e.priceMax!=null&&t.set(Z,String(e.priceMax)),e.inStockOnly&&t.set(V,"1"),e.kind&&t.set(U,e.kind),e.sort!=="recommended"&&t.set(X,e.sort),e.page>1&&t.set(G,String(e.page)),t}function ct(e){return Ie(Ne(e)).toString()}function at(e,t){if(e<=7)return Array.from({length:e},(s,o)=>o+1);const r=[1],n=Math.max(2,t-1),i=Math.min(e-1,t+1);n>2&&r.push(null);for(let s=n;s<=i;s++)r.push(s);return i<e-1&&r.push(null),r.push(e),r}function ut(e,t,r){const n=e.length,i=Math.max(1,Math.floor(r)),s=Math.max(1,Math.ceil(n/i)),o=Math.min(Math.max(1,Math.floor(t)),s),l=(o-1)*i;return{items:e.slice(l,l+i),page:o,pageCount:s,total:n,from:n===0?0:l+1,to:Math.min(l+i,n)}}export{je as EMPTY_PLP_FILTERS,P as PLP_FACET_KEYS,Te as PLP_FACET_LABELS,$ as PLP_ONE_VALUE_MAX,m as PLP_PARAM,Me as PLP_SORT_LABELS,U as PLP_TYPE_PARAM,He as applyPlpFilters,Qe as applyShopperFilters,B as asPlpSortKey,et as buildPlpFacets,st as buildPlpTypeOptions,rt as buildTyreSizeBoxes,ke as facetWantedByAnyKind,Ae as formatWidth,qe as hasActivePlpFilters,Je as isDeadPlpOption,x as itemMatchesPlp,tt as listingHiddenFacets,ut as paginatePlp,it as pickTyreSize,lt as plpActiveChips,C as plpFacetKeysFor,ct as plpFilterQuery,Ne as plpFiltersFromParams,Ie as plpFiltersToParams,Ge as plpInStockCount,Ue as plpOpeningSort,at as plpPageSequence,ot as plpPriceBounds,Oe as plpPriceBoundsOf,Ee as plpPricedAmounts,Ze as plpShownKinds,be as plpSortKeysFor,nt as plpTyreSizeBoxesShown,ze as plpTyreSizeCount,Ve as sizePairLabel,D as sortPlpItems,Xe as wheelSizeLabels};
1
+ import{answerOrder as q,answersForKind as R,facetFieldKey as k,keepForFilter as J,NO_FIELD_ANSWERS as ee,orderByAnswers as te}from"../content/field-usage.js";import{STOCK_WORDS as ne}from"../content/stock-words.js";import{parseOption as L}from"efficient-web-builder/format/lib/parse-option";import{comparePrice as z,FROM_PREFIX_START as re,priceIn as ie,withinPriceRange as se}from"./price-display.js";import{trimDecimal as oe,wheelSizeLabel as le}from"./spec-format.js";import{itemLugs as ce,lugFilterLabel as ae}from"./lug-count.js";import{itemBrand as F,itemCollections as ue,itemDiameters as pe,itemFinishFamilies as fe,itemFinishes as de,itemInStock as E,itemIsNew as O,itemKind as b,itemName as N,itemPcds as me,itemPrices as y,itemSpeedRatings as he,itemTyreSizes as _,itemTyreTypes as Se,PLP_ANY_TYPE_LABEL as ge,PLP_KIND_LABELS as I,PLP_KINDS as ye}from"../catalog/plp-item.js";import{parseTyreSize as Pe,tyreSizeLabel as v,tyreSizeLabels as xe,TYRE_SIZE_PARTS as S,TYRE_SIZE_PART_LABELS as we}from"../tyres/tyre-size.js";const Me={recommended:"Recommended","price-asc":"Price · low to high","price-desc":"Price · high to low",new:"Newest",name:"Name A–Z"},B=Object.keys(Me);function C(e){return L(B,"recommended",e)}function be(e){return B.filter(t=>t!=="recommended"||e.length<=1)}function Ue(e,t){const r=C(e);return L(be(t),"name",r)}const P=["tyreSizes","brands","finishes","diameters","collections","pcds","tyreTypes","speedRatings"],A={tyreSizes:["tyre"],brands:["alloy-wheel","tyre"],finishes:["alloy-wheel"],diameters:["alloy-wheel","tyre"],collections:["alloy-wheel"],pcds:["alloy-wheel"],tyreTypes:["tyre"],speedRatings:["tyre"]},_e={diameters:"tyreSizes"};function K(e){if(e.length===0)return[];const t=P.filter(r=>e.every(n=>A[r].includes(n)));return t.filter(r=>{const n=_e[r];return!n||!t.includes(n)})}function Ze(e,t){return t&&e.includes(t)?[t]:[...e]}function D(e){const t=new Set;for(const r of e)t.add(b(r));return[...t]}const je={tyreSizes:[],brands:[],finishes:[],diameters:[],collections:[],pcds:[],tyreTypes:[],speedRatings:[],priceMax:null,priceMin:null,inStockOnly:!1,kind:null,sort:"recommended",page:1};function Ve(e){return`${Ae(e.width)}×${e.diameter}`}function Xe(e){return[...new Set((e.sizePairs??[]).map(t=>le(t.diameter,t.width)))]}function Ae(e){return oe(e)}function x(e,t,r,n=null,i="fail"){const s=b(e),o=l=>i==="fail"||(l==="lugs"?s==="alloy-wheel":A[l].includes(s));if(n!=="kind"&&t.kind&&s!==t.kind)return!1;for(const l of P){if(n===l)continue;const a=t[l];if(a.length===0||!o(l))continue;const f=a.map(String);if(!$(e,l).some(u=>f.includes(u)))return!1}if(n!=="lugs"&&t.lugs&&t.lugs.length>0&&o("lugs")){const l=ce(e);if(l===null||!t.lugs.includes(l))return!1}return!(n!=="price"&&!se(y(e),r,t.priceMin??null,t.priceMax)||n!=="inStock"&&t.inStockOnly&&!E(e))}function Ge(e,t,r){return e.filter(n=>E(n)&&x(n,t,r,"inStock")).length}function Y(e,t,r){const n=[...e],i=(o,l)=>N(o).localeCompare(N(l)),s=D(e).length>1;switch(t){case"price-asc":return n.sort((o,l)=>z(y(o),y(l),r,"asc"));case"price-desc":return n.sort((o,l)=>z(y(o),y(l),r,"desc"));case"name":return n.sort(i);case"new":return n.sort((o,l)=>{const a=(O(l)?1:0)-(O(o)?1:0);return a!==0||!s?a:i(o,l)});default:return n}}function He(e,t,r){return Y(e.filter(n=>x(n,t,r)),t.sort,r)}function Qe(e,t,r){return Y(e.filter(n=>x(n,t,r,null,"pass")),t.sort,r)}function qe(e){return P.some(t=>e[t].length>0)||(e.lugs?.length??0)>0||e.priceMin!=null||e.priceMax!=null||e.inStockOnly||e.kind!=null}const Je=e=>e.count===0&&!e.checked,Te={tyreSizes:"Size",brands:"Brand",finishes:"Colour",diameters:"Size · diameter",collections:"Collection",pcds:"PCD · fitment",tyreTypes:"Tyre type",speedRatings:"Speed rating"};function $(e,t){switch(t){case"tyreSizes":return[...new Set(_(e).flatMap(xe))];case"brands":return F(e)?[F(e)]:[];case"finishes":return fe(e);case"diameters":return pe(e).map(String);case"collections":return ue(e);case"pcds":return me(e);case"tyreTypes":return Se(e);case"speedRatings":return he(e)}}function Re(e){const t=new Map;for(const r of e)for(const n of de(r))n.color&&!t.has(n.family)&&t.set(n.family,n.color);return t}function et(e,t,r,n=D(e),i=ee,s="fail"){const o=c=>ke(c,n,i),l=Re(e),f=(s==="pass"?P.filter(c=>n.some(g=>A[c].includes(g))):K(n)).filter(c=>c!=="tyreSizes").filter(o).map(c=>{const g=t[c].map(String),T=new Set,M=new Map,w=new Map;for(const p of e){const h=$(p,c);for(const d of h)T.add(d);for(const d of new Set(h))w.set(d,(w.get(d)??0)+1);if(x(p,t,r,c,s))for(const d of new Set(h))M.set(d,(M.get(d)??0)+1)}const Q=[...T].map(p=>({value:p,label:c==="diameters"?`${p}″`:p,count:M.get(p)??0,checked:g.includes(p),swatch:c==="finishes"?l.get(p)??null:null})).sort((p,h)=>{if(c==="diameters")return Number(p.value)-Number(h.value);const d=(w.get(h.value)??0)-(w.get(p.value)??0);return d!==0?d:p.value.localeCompare(h.value)});return{key:c,label:Te[c],options:Q}}).filter(c=>c.options.length>W),u=[];for(const c of f){const g=Le(c.key,n,i);g!==void 0&&u.push({fieldKey:c.key,filterOrder:g})}return[...te(f,c=>c.key,u,"filterOrder")]}const W=1;function tt(e){return e.showCollection===!1?["collections"]:[]}function ke(e,t,r){return t.length===0||r.length===0?!0:t.some(n=>J(R(r,n))(k(e,n)))}function Le(e,t,r){if(r.length===0)return;let n;for(const i of t){const s=q(R(r,i),"filter")(k(e,i));s!==void 0&&(n===void 0||s<n)&&(n=s)}return n}function ze(e){const t=new Set;for(const r of e)for(const n of _(r))t.add(v(n));return t.size}function nt(e,t){return K(t).includes("tyreSizes")?ze(e)>W:!1}function U(e){const t=Pe(e);if(t)return t;const[r,n]=e.split("/");return{width:r?Number(r):void 0,profile:n?Number(n):void 0}}function Fe(e,t,r){return S.slice(0,S.indexOf(r)).every(n=>{const i=t[n];return i==null||e[n]===i})}function rt(e,t,r){const n=U(t.tyreSizes[0]??""),i=new Set(e.filter(s=>x(s,t,r,"tyreSizes")));return S.map(s=>{const o=new Map;for(const a of e){const f=_(a).filter(u=>Fe(u,n,s));for(const u of new Set(f.map(c=>c[s])))o.has(u)||o.set(u,0),i.has(a)&&o.set(u,(o.get(u)??0)+1)}const l=[...o.keys()].sort((a,f)=>a-f).map(a=>({value:a,label:s==="rim"?`R${a}`:String(a),count:o.get(a)??0}));return{part:s,label:we[s],value:n[s]??null,options:l}})}function it(e,t,r,n){const i={...U(t)},s=S.indexOf(r);i[r]=n??void 0;for(const o of S.slice(s+1))i[o]!=null&&e.some(f=>S.slice(0,S.indexOf(o)+1).every(u=>i[u]==null||f[u]===i[u]))||(i[o]=void 0);return v(i)}function st(e,t,r,n){if(t.length<2)return[];const i=e.filter(s=>x(s,r,n,"kind"));return[{kind:null,label:ge,count:i.length,checked:r.kind===null},...t.map(s=>({kind:s,label:I[s],count:i.filter(o=>b(o)===s).length,checked:r.kind===s}))]}function Ee(e,t){return e.map(r=>ie(y(r),t)).filter(r=>r!==null)}function Oe(e){if(e.length===0)return null;const t=Math.floor(Math.min(...e)),r=Math.ceil(Math.max(...e));return r>t?{min:t,max:r}:null}function ot(e,t){return Oe(Ee(e,t))}function lt(e,t,r){const n=[];e.kind&&n.push({key:"kind",value:e.kind,label:I[e.kind]}),e.inStockOnly&&n.push({key:"inStock",value:"",label:ne.inStock});for(const i of P)for(const s of e[i]){const o=String(s);n.push({key:i,value:o,label:i==="diameters"?`${o}″`:i==="pcds"?`PCD ${o}`:o})}for(const i of e.lugs??[])n.push({key:"lugs",value:String(i),label:ae(i)});return e.priceMin!=null&&n.push({key:"priceMin",value:"",label:`${re}${r(e.priceMin,t)}`}),e.priceMax!=null&&n.push({key:"price",value:"",label:`Up to ${r(e.priceMax,t)}`}),n}const m={tyreSizes:"tyreSize",brands:"brand",finishes:"colour",diameters:"size",collections:"collection",pcds:"pcd",tyreTypes:"tyreType",speedRatings:"speed"},Z="type",j="maxPrice",V="minPrice",X="inStock",G="sort",H="page";function Ne(e){const t=typeof e=="string"?new URLSearchParams(e):e,r=l=>t.getAll(l).flatMap(a=>a.split(",")).filter(Boolean),n=Number(t.get(j)),i=Number(t.get(V)),s=Number(t.get(H)),o=t.get(Z);return{tyreSizes:r(m.tyreSizes),brands:r(m.brands),finishes:r(m.finishes),diameters:r(m.diameters).map(Number).filter(Number.isFinite),collections:r(m.collections),pcds:r(m.pcds),tyreTypes:r(m.tyreTypes),speedRatings:r(m.speedRatings),priceMax:Number.isFinite(n)&&n>0?n:null,priceMin:Number.isFinite(i)&&i>0?i:null,inStockOnly:t.get(X)==="1",kind:ye.find(l=>l===o)??null,sort:C(t.get(G)),page:Number.isFinite(s)&&s>=1?Math.floor(s):1}}function Ie(e){const t=new URLSearchParams;for(const r of P){const n=e[r];n.length>0&&t.set(m[r],n.join(","))}return e.priceMin!=null&&t.set(V,String(e.priceMin)),e.priceMax!=null&&t.set(j,String(e.priceMax)),e.inStockOnly&&t.set(X,"1"),e.kind&&t.set(Z,e.kind),e.sort!=="recommended"&&t.set(G,e.sort),e.page>1&&t.set(H,String(e.page)),t}function ct(e){return Ie(Ne(e)).toString()}function at(e,t){if(e<=7)return Array.from({length:e},(s,o)=>o+1);const r=[1],n=Math.max(2,t-1),i=Math.min(e-1,t+1);n>2&&r.push(null);for(let s=n;s<=i;s++)r.push(s);return i<e-1&&r.push(null),r.push(e),r}function ut(e,t,r){const n=e.length,i=Math.max(1,Math.floor(r)),s=Math.max(1,Math.ceil(n/i)),o=Math.min(Math.max(1,Math.floor(t)),s),l=(o-1)*i;return{items:e.slice(l,l+i),page:o,pageCount:s,total:n,from:n===0?0:l+1,to:Math.min(l+i,n)}}export{je as EMPTY_PLP_FILTERS,P as PLP_FACET_KEYS,Te as PLP_FACET_LABELS,W as PLP_ONE_VALUE_MAX,m as PLP_PARAM,Me as PLP_SORT_LABELS,Z as PLP_TYPE_PARAM,He as applyPlpFilters,Qe as applyShopperFilters,C as asPlpSortKey,et as buildPlpFacets,st as buildPlpTypeOptions,rt as buildTyreSizeBoxes,ke as facetWantedByAnyKind,Ae as formatWidth,qe as hasActivePlpFilters,Je as isDeadPlpOption,x as itemMatchesPlp,tt as listingHiddenFacets,ut as paginatePlp,it as pickTyreSize,lt as plpActiveChips,K as plpFacetKeysFor,ct as plpFilterQuery,Ne as plpFiltersFromParams,Ie as plpFiltersToParams,Ge as plpInStockCount,Ue as plpOpeningSort,at as plpPageSequence,ot as plpPriceBounds,Oe as plpPriceBoundsOf,Ee as plpPricedAmounts,Ze as plpShownKinds,be as plpSortKeysFor,nt as plpTyreSizeBoxesShown,ze as plpTyreSizeCount,Ve as sizePairLabel,Y as sortPlpItems,Xe as wheelSizeLabels};
@@ -1 +1 @@
1
- import{WHEELS_PER_SET as r}from"../commerce.js";function u(e){return(e.components??[]).reduce((o,s)=>o+s.wheels,0)>r}function R(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(u)}const a=150,c="Front + rear",w="L/R pair",D="Not handed",l="L/R";function i(e){return e.et==null||e.rearEt==null?0:Math.abs(e.rearEt-e.et)}function n(e){return i(e)>=a}function O(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(n)}function p(e){return e.directional===!0}function d(e){return e.kind==="staggered"}function T(e){return e.rearWidth!=null||e.rearEt!=null&&e.rearEt!==e.et}function m(e){return{twoObjects:n(e),handed:p(e),staggered:d(e)}}function I(e){return{twoObjects:E(e),handed:e.handed??!1,staggered:!1}}function P(e){const t=[e.twoObjects?c:"",e.handed?l:""].filter(Boolean);return t.length?t.join(" · "):null}function g(e){return e.handed}function x(e){return new Set((e.components??[]).map(t=>t.partNumber)).size>1}function W(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(x)}function E(e){return(e.setWheelCount??0)>r}const S=new Set(["boltPattern"]);function b(e,t){return e&&S.has(t)}function H(e,t){return!e?.srcRight||!t||t!==e.src?null:e.srcRight}const f="per wheel";function C(e,t){return t?`${e} ${f}`:e}const L=[{label:"Pair",value:"pair"},{label:"One wheel",value:"one"}],_="pair";function N(e){return e==="one"?"one":_}export{c as AXLE_WORDS,l as CARD_HAND_WORDS,w as HAND_WORDS,D as NOT_HANDED_WORDS,f as PER_WHEEL_UNIT,_ as SET_PICTURE_DEFAULT,L as SET_PICTURE_POINTS,a as TWO_OBJECT_ET_SPREAD_MM,N as parseSetPicture,W as productHasComposedRender,R as productIsDually,O as productIsTwoObjects,P as setBuildLabel,g as setIsWide,H as setSecondSrc,b as setSuppressesRow,E as summaryIsDually,I as summarySetBuild,i as variantEtSpread,x as variantHasComposedRender,T as variantHasDistinctRear,u as variantIsDually,p as variantIsHanded,d as variantIsStaggered,n as variantIsTwoObjects,m as variantSetBuild,C as wheelCardPriceLine};
1
+ import{parseOption as u}from"efficient-web-builder/format/lib/parse-option";import{WHEELS_PER_SET as r}from"../commerce.js";function a(e){return(e.components??[]).reduce((o,s)=>o+s.wheels,0)>r}function O(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(a)}const c=150,l="Front + rear",m="L/R pair",T="Not handed",i="L/R";function p(e){return e.et==null||e.rearEt==null?0:Math.abs(e.rearEt-e.et)}function n(e){return p(e)>=c}function I(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(n)}function d(e){return e.directional===!0}function x(e){return e.kind==="staggered"}function P(e){return e.rearWidth!=null||e.rearEt!=null&&e.rearEt!==e.et}function g(e){return{twoObjects:n(e),handed:d(e),staggered:x(e)}}function W(e){return{twoObjects:S(e),handed:e.handed??!1,staggered:!1}}function b(e){const t=[e.twoObjects?l:"",e.handed?i:""].filter(Boolean);return t.length?t.join(" · "):null}function H(e){return e.handed}function E(e){return new Set((e.components??[]).map(t=>t.partNumber)).size>1}function C(e){return e.kind==="alloy-wheel"&&(e.source.variants??[]).some(E)}function S(e){return(e.setWheelCount??0)>r}const f=new Set(["boltPattern"]);function L(e,t){return e&&f.has(t)}function N(e,t){return!e?.srcRight||!t||t!==e.src?null:e.srcRight}const _="per wheel";function y(e,t){return t?`${e} ${_}`:e}const h=[{label:"Pair",value:"pair"},{label:"One wheel",value:"one"}],R="pair";function A(e){return u(h,R,e)}export{l as AXLE_WORDS,i as CARD_HAND_WORDS,m as HAND_WORDS,T as NOT_HANDED_WORDS,_ as PER_WHEEL_UNIT,R as SET_PICTURE_DEFAULT,h as SET_PICTURE_POINTS,c as TWO_OBJECT_ET_SPREAD_MM,A as parseSetPicture,C as productHasComposedRender,O as productIsDually,I as productIsTwoObjects,b as setBuildLabel,H as setIsWide,N as setSecondSrc,L as setSuppressesRow,S as summaryIsDually,W as summarySetBuild,p as variantEtSpread,E as variantHasComposedRender,P as variantHasDistinctRear,a as variantIsDually,d as variantIsHanded,x as variantIsStaggered,n as variantIsTwoObjects,g as variantSetBuild,y as wheelCardPriceLine};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efficient-storefront-blocks",
3
- "version": "0.121.1",
3
+ "version": "0.121.3",
4
4
  "description": "The EFFICIENT storefront's website editor — the website builder assembled with the storefront's own sections — for an app that edits a storefront website inside its own page. Built from the efficient-storefront-blocks repository.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Efficient Pty Ltd",