@best-bundles/bundle-ui 0.0.43 → 0.0.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/BundleBuilderDrawer.d.ts.map +1 -1
- package/dist/components/BundleBuilderPanel.d.ts.map +1 -1
- package/dist/components/VolumeDiscountPanel.d.ts +6 -0
- package/dist/components/VolumeDiscountPanel.d.ts.map +1 -0
- package/dist/context/BundleProvider.d.ts.map +1 -1
- package/dist/i18n.d.ts +1 -1
- package/dist/i18n.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1387 -1250
- package/dist/index.js.map +1 -1
- package/dist/liquid/bundle-ui.iife.css +1 -1
- package/dist/liquid/bundle-ui.iife.js +19 -19
- package/dist/liquid/bundle-ui.iife.js.map +1 -1
- package/dist/liquid/iife.d.ts +8 -15
- package/dist/liquid/iife.d.ts.map +1 -1
- package/dist/stories/VolumeDiscountPanel.stories.d.ts +6 -0
- package/dist/stories/VolumeDiscountPanel.stories.d.ts.map +1 -0
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode('._button_18rtl_1{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-family:var(--bb-font-family, inherit);border:1px solid var(--bb-button-border, rgba(0, 0, 0, .12));background:var(--bb-button-bg, #111827);color:var(--bb-button-text, #ffffff);font:inherit;line-height:1;padding:10px 14px;border-radius:var(--bb-button-radius, 10px);cursor:pointer;transition:transform .12s ease,background .12s ease,border-color .12s ease,opacity .12s ease}._button_18rtl_1:hover{background:var(--bb-button-bg-hover, #0b1220)}._button_18rtl_1:active{transform:translateY(1px)}._button_18rtl_1:disabled{opacity:.6;cursor:not-allowed}._button_18rtl_1:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._backdrop_1i4y2_1{position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--bb-backdrop-z-index, 2147483647);display:flex;justify-content:flex-end;background:var(--bb-backdrop-bg, rgba(0, 0, 0, .5));-webkit-backdrop-filter:blur(var(--bb-backdrop-blur, 2px));backdrop-filter:blur(var(--bb-backdrop-blur, 2px));padding:var(--bb-backdrop-padding, 12px);opacity:0;transition:opacity var(--bb-drawer-transition-duration, .22s) ease}._celebrationOverlay_1i4y2_14{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;pointer-events:none;z-index:50}._celebrationChip_1i4y2_23{font-family:var(--bb-font-family-body, "Cabin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);letter-spacing:.03em;font-size:18px;line-height:1;padding:12px 16px;border-radius:999px;color:var(--bb-celebration-text, #0b1b44);background:linear-gradient(180deg,var(--bb-celebration-bg-top, #ffffff),var(--bb-celebration-bg-bottom, #bae6fd));border:2px solid var(--bb-celebration-border, rgba(37, 99, 235, .28));box-shadow:0 18px 55px #0006,0 10px 28px #2563eb33,inset 0 1px #ffffffbf;transform-origin:50% 60%;will-change:transform,opacity,filter;animation:_bbCelebrationPop_1i4y2_1 2.8s cubic-bezier(.16,1,.3,1) forwards;filter:saturate(1.05)}@keyframes _bbCelebrationPop_1i4y2_1{0%{opacity:0;transform:translateY(10px) scale(.6);filter:blur(1px) saturate(1.1)}12%{opacity:1;transform:translateY(0) scale(1.12);filter:blur(0px) saturate(1.1)}22%{opacity:1;transform:translateY(0) scale(1)}80%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(-10px) scale(.98)}}._backdropOpen_1i4y2_74{opacity:1}._backdropClosed_1i4y2_78{opacity:0}._panel_1i4y2_82{width:440px;max-width:100%;min-width:0;height:100%;background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);font-family:var(--bb-font-family-body, "Cabin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);border-radius:var(--bb-panel-radius, 16px);box-shadow:0 20px 60px #00000059;display:grid;grid-template-rows:auto 1fr auto;overflow:hidden;outline:none;position:relative;top:unset;right:unset;bottom:unset;left:unset}._panelOpen_1i4y2_103{animation:_bbSlideInFromRight_1i4y2_1 var(--bb-drawer-transition-duration, .22s) ease forwards}._panelClosed_1i4y2_107{animation:_bbSlideOutToRight_1i4y2_1 var(--bb-drawer-transition-duration, .22s) ease forwards}@keyframes _bbSlideInFromRight_1i4y2_1{0%{transform:translate(110%)}to{transform:translate(0)}}@keyframes _bbSlideOutToRight_1i4y2_1{0%{transform:translate(0)}to{transform:translate(110%)}}@media(prefers-reduced-motion:reduce){._backdrop_1i4y2_1{transition:none}._celebrationChip_1i4y2_23,._panelOpen_1i4y2_103,._panelClosed_1i4y2_107{animation:none}}._header_1i4y2_146{display:grid;grid-template-columns:36px 1fr 36px;align-items:center;column-gap:12px;padding:var(--bb-header-padding, 16px 16px 12px 16px);border-bottom:1px solid var(--bb-border-color, rgba(17, 24, 39, .08))}._headerCenter_1i4y2_155{position:relative;min-width:0;display:flex;justify-content:center;align-items:center}._title_1i4y2_163{font-size:24px;margin:0;line-height:1.2;font-family:var(--bb-font-family-title, "Bebas Neue", "Cabin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);letter-spacing:.02em;color:var(--bb-title-color, var(--bb-text-color, #111827))}._searchIconButton_1i4y2_172{width:36px;height:36px;border-radius:10px;border:1px solid var(--bb-border-strong-color, rgba(17, 24, 39, .12));background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:0}._searchIconButton_1i4y2_172:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchIconButton_1i4y2_172:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._headerTitleWrap_1i4y2_195{transition:opacity .18s ease,transform .22s ease}._headerSearchWrap_1i4y2_199{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;pointer-events:none;opacity:0;transform:translateY(-2px);transition:opacity .18s ease,transform .22s ease}._headerSearchOpen_1i4y2_211 ._headerTitleWrap_1i4y2_195{opacity:0;transform:translateY(2px);pointer-events:none}._headerSearchOpen_1i4y2_211 ._headerSearchWrap_1i4y2_199{opacity:1;transform:translateY(0);pointer-events:auto}._searchBar_1i4y2_223{width:min(320px,100%);height:36px;display:flex;align-items:center;gap:8px;background:var(--bb-surface-bg, #ffffff);border:1px solid var(--bb-border-strong-color, rgba(17, 24, 39, .12));border-radius:10px;padding:0 8px}._searchInput_1i4y2_235{width:100%;border:none;outline:none;background:transparent;font:inherit;font-size:14px;min-width:0;height:100%;line-height:36px;padding:0}._searchInput_1i4y2_235::-webkit-search-cancel-button,._searchInput_1i4y2_235::-webkit-search-decoration,._searchInput_1i4y2_235::-webkit-search-results-button,._searchInput_1i4y2_235::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}._searchClearButton_1i4y2_256{border:none;background:transparent;color:var(--bb-text-color, #111827);font:inherit;font-size:13px;font-weight:700;cursor:pointer;padding:6px;border-radius:10px;line-height:1}._searchClearButton_1i4y2_256:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchClearButton_1i4y2_256:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._closeButton_1i4y2_278{border:1px solid var(--bb-border-strong-color, rgba(17, 24, 39, .12));background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);width:36px;height:36px;border-radius:10px;cursor:pointer;flex:0 0 auto;padding:0}._closeButton_1i4y2_278:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._closeButton_1i4y2_278:disabled{opacity:.6;cursor:not-allowed}._closeButton_1i4y2_278:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}@media(prefers-reduced-motion:reduce){._headerTitleWrap_1i4y2_195,._headerSearchWrap_1i4y2_199{transition:none}}._body_1i4y2_312{padding:var(--bb-body-padding, 8px 16px);overflow:auto}._muted_1i4y2_317{color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));margin:0 0 12px}._error_1i4y2_322{color:var(--bb-error-color, #b91c1c);margin:0 0 12px}._variants_1i4y2_327{margin-top:4px}._variantList_1i4y2_331{list-style:none;padding:0;margin:0;display:grid;gap:10px}._variantRow_1i4y2_339{display:grid;grid-template-columns:1fr auto;gap:0px;align-items:stretch;padding:5px}._variantRowSoldOut_1i4y2_347{opacity:.65}._variantLeft_1i4y2_351{min-width:0;display:flex;gap:12px;align-items:center}._addToBundleButton_1i4y2_358{height:100%;align-self:stretch;border-radius:12px;border:none;background:var(--bb-cta-bg, #91aae5);color:var(--bb-cta-text, #ffffff);font:inherit;font-weight:800;padding:0 16px;cursor:pointer;white-space:nowrap}._addToBundleButton_1i4y2_358:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._addToBundleButton_1i4y2_358:disabled{opacity:.6;cursor:not-allowed}._addToBundleButton_1i4y2_358:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._soldOutContainer_1i4y2_386{display:flex;align-items:center;justify-content:center;height:100%;padding:0 16px}._stockLimitContainer_1i4y2_394{display:flex;align-items:center;justify-content:center;height:100%;max-width:120px;padding:0 12px}._soldOut_1i4y2_386{align-self:center;text-align:center;color:var(--bb-muted-color, rgba(17, 24, 39));font-size:.9em;font-weight:600;pointer-events:none}._stockLimitNotice_1i4y2_412{color:var(--bb-muted-color, rgba(17, 24, 39, .72));font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;text-align:center}._variantThumb_1i4y2_421{width:60px;height:60px;border-radius:12px;overflow:hidden;border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .02));flex:0 0 auto}._variantThumbImg_1i4y2_431{width:100%;height:100%;object-fit:cover;display:block}._variantThumbFallback_1i4y2_438{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-weight:800;color:var(--bb-text-color, #111827)}._variantInfo_1i4y2_448{min-width:0}._variantName_1i4y2_452{font-size:14px;font-weight:600;margin-bottom:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantMeta_1i4y2_461{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantPriceRow_1i4y2_469{display:flex;align-items:baseline;gap:8px;margin-top:4px}._variantCompareAt_1i4y2_476{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));text-decoration:line-through}._variantPrice_1i4y2_469{font-size:13px;font-weight:800}._qtyControls_1i4y2_487{display:inline-flex;align-items:center;gap:6px}._qtyControlsWrap_1i4y2_493{display:grid;justify-items:center;gap:4px}._qtyButton_1i4y2_499{padding:0;width:34px;height:34px;border-radius:10px;border:1px solid var(--bb-border-strong-color, rgba(17, 24, 39, .12));background:var(--bb-surface-bg, #ffffff);cursor:pointer;line-height:1;font-size:16px}._qtyButton_1i4y2_499:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._qtyButton_1i4y2_499:disabled{opacity:.6;cursor:not-allowed}._qtyButton_1i4y2_499:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._qtyValue_1i4y2_525{min-width:18px;text-align:center;font-variant-numeric:tabular-nums;font-weight:700}._footer_1i4y2_532{padding:var(--bb-footer-padding, 12px 16px 16px 16px);border-top:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);position:relative;min-width:0}._poweredBy_1i4y2_540{font-size:10px;color:var(rgba(17, 24, 39, .6));text-align:center;margin-top:10px}._poweredBy_1i4y2_540 a{color:inherit;text-decoration:none}._boxSummaryWindow_1i4y2_552{margin-bottom:6px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;padding-bottom:6px;min-width:0;scrollbar-width:none;-ms-overflow-style:none}._boxSummaryWindow_1i4y2_552::-webkit-scrollbar{display:none}._boxSummaryRow_1i4y2_570{--bb-box-gap: 10px;display:flex;align-items:flex-start;gap:var(--bb-box-gap);width:100%}._boxSlot_1i4y2_578{flex:0 0 calc((100% - (4 * var(--bb-box-gap))) / 5);max-width:calc((100% - (4 * var(--bb-box-gap))) / 5);display:flex;flex-direction:column;align-items:stretch;gap:6px}._boxItem_1i4y2_587{width:100%;aspect-ratio:1 / 1;border-radius:12px;position:relative;display:flex;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;box-sizing:border-box}._boxItemClickable_1i4y2_599{cursor:pointer}._boxItemClickable_1i4y2_599:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._boxThresholdLabel_1i4y2_608{font-size:11px;line-height:1.15;font-weight:700;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));text-align:center;white-space:wrap;overflow:hidden;text-overflow:ellipsis}._boxItemPlaceholder_1i4y2_619{border:1px dashed var(--bb-border-strong-color, rgba(17, 24, 39, .18));background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .02));color:var(--bb-muted-color, rgba(17, 24, 39, .6))}._boxItemFilled_1i4y2_625{border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);overflow:hidden}._boxItemThreshold_1i4y2_631{border-style:solid;border-width:2px;border-color:var(--bb-tier-border, rgba(37, 99, 235, .55));background:var(--bb-tier-bg, rgba(37, 99, 235, .08));color:var(--bb-tier-text, rgba(29, 78, 216, .95))}._boxItemDiscountText_1i4y2_639{font-size:12px;font-weight:800;text-align:center;line-height:1.1;padding:6px}._boxItemPlus_1i4y2_647{font-size:22px;font-weight:700;opacity:.5;line-height:1}._boxItemImage_1i4y2_654{width:100%;height:100%;object-fit:cover;display:block}._boxItemFallback_1i4y2_661{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .04));color:var(--bb-text-color, #111827);font-weight:800}._ctaButtonGroup_1i4y2_672{display:flex;gap:8px;width:100%;transition:gap .3s cubic-bezier(.4,0,.2,1)}._ctaButtonGroupAnimating_1i4y2_679{gap:0}._cta_1i4y2_672{width:100%;border:1px solid var(--bb-cta-border, rgba(0, 0, 0, .12));background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff);font:inherit;font-weight:700;padding:12px 14px;border-radius:12px;cursor:pointer}._ctaSecondary_1i4y2_695{width:100%;border:2px solid var(--bb-cta-bg, #2563eb);background:transparent;color:var(--bb-cta-bg, #2563eb);font:inherit;font-weight:700;padding:10px 14px;border-radius:12px;cursor:pointer}._ctaDualLeft_1i4y2_707{width:100%;border:2px solid var(--bb-cta-bg, #2563eb);background:transparent;color:var(--bb-cta-bg, #2563eb);font:inherit;font-weight:700;padding:10px 14px;border-radius:12px;cursor:pointer;transition:border-radius .3s cubic-bezier(.4,0,.2,1),background .3s cubic-bezier(.4,0,.2,1),color .3s cubic-bezier(.4,0,.2,1),border-right-width .3s cubic-bezier(.4,0,.2,1),opacity .3s cubic-bezier(.4,0,.2,1)}._ctaDualLeftAnimating_1i4y2_725{border-top-right-radius:0;border-bottom-right-radius:0;border-right-width:0;background:var(--bb-cta-bg, #2563eb);opacity:.6;color:var(--bb-cta-text, #ffffff)}._ctaDualLeftAnimating_1i4y2_725>span{opacity:0}._ctaDualRight_1i4y2_738{width:100%;border:1px solid var(--bb-cta-border, rgba(0, 0, 0, .12));background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff);font:inherit;font-weight:700;padding:12px 14px;border-radius:12px;cursor:pointer;transition:border-radius .3s cubic-bezier(.4,0,.2,1),border-left-width .3s cubic-bezier(.4,0,.2,1),opacity .3s cubic-bezier(.4,0,.2,1)}._ctaDualRightAnimating_1i4y2_754{border-top-left-radius:0;border-bottom-left-radius:0;border-left-width:0;opacity:.6}._ctaDualRightAnimating_1i4y2_754>span{opacity:0}._ctaTotals_1i4y2_765{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-variant-numeric:tabular-nums}._ctaDiscountBadge_1i4y2_773{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:800;background:var(--bb-tier-bg, rgba(37, 99, 235, .12));border:1px solid var(--bb-tier-border, rgba(37, 99, 235, .3));color:var(--bb-tier-text, rgba(29, 78, 216, .95));white-space:nowrap}._ctaTotalsWrap_1i4y2_787{overflow:hidden;max-height:0;opacity:0;transform:translateY(4px);margin-bottom:0;transition:max-height .22s ease,opacity .16s ease,transform .22s ease,margin-bottom .22s ease}._ctaTotalsWrapVisible_1i4y2_800{max-height:40px;opacity:1;transform:translateY(0);margin-bottom:8px}._ctaTotalsStrike_1i4y2_807{opacity:.85;text-decoration:line-through;font-weight:700;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65))}._ctaTotalsPrice_1i4y2_814{font-weight:900;color:var(--bb-text-color, #111827)}@media(prefers-reduced-motion:reduce){._ctaTotalsWrap_1i4y2_787{transition:none}}._cta_1i4y2_672:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._cta_1i4y2_672:disabled{opacity:.6;cursor:not-allowed}._cta_1i4y2_672:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaSecondary_1i4y2_695:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaSecondary_1i4y2_695:disabled{opacity:.6;cursor:not-allowed}._ctaSecondary_1i4y2_695:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualLeft_1i4y2_707:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaDualLeft_1i4y2_707:disabled{opacity:.6;cursor:not-allowed}._ctaDualLeft_1i4y2_707:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualRight_1i4y2_738:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._ctaDualRight_1i4y2_738:disabled{opacity:.6;cursor:not-allowed}._ctaDualRight_1i4y2_738:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._helperText_1i4y2_883{margin-top:8px;font-size:12px;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));text-align:center}@media(max-width:767px){._backdrop_1i4y2_1{padding:0;justify-content:stretch}._panel_1i4y2_82{width:100%;height:100%;border-radius:0}}._panel_96rr4_2 button,._panel_96rr4_2 input,._panel_96rr4_2 [role=button]{box-sizing:border-box;margin:0}._panel_96rr4_2{background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);font-family:var(--bb-font-family-body, "Cabin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));border-radius:var(--bb-panel-radius, 16px);padding:20px;display:grid;gap:14px}._header_96rr4_20{text-align:start}._title_96rr4_24{font-size:22px;margin:0;font-family:var(--bb-font-family-title, "Bebas Neue", "Cabin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);letter-spacing:.02em;color:var(--bb-title-color, var(--bb-text-color, #111827))}._status_96rr4_32{font-size:13px;color:var(--bb-muted-color, rgba(15, 23, 42, .6))}._error_96rr4_37{font-size:13px;color:#b91c1c;font-weight:600}._inactive_96rr4_43{font-size:13px;color:#b45309;font-weight:600}._section_96rr4_49{display:grid;gap:6px}._sectionTitle_96rr4_54{text-align:left;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--bb-muted-color, rgba(15, 23, 42, .6))}._rules_96rr4_63{display:flex;justify-content:center;gap:6px}._rulesList_96rr4_69{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px;list-style:none;margin:0;padding:0}._ruleItem_96rr4_80{display:flex;flex-direction:column;align-items:center;gap:6px;padding:6px 10px;border-radius:var(--bb-border-radius, 12px);border:1px solid var(--bb-tier-border, rgba(37, 99, 235, .25));background:var(--bb-tier-bg, rgba(37, 99, 235, .06));color:var(--bb-tier-text, #1f2937)}._ruleMin_96rr4_92{font-weight:600;font-size:13px}._ruleDiscount_96rr4_97{font-weight:700;font-size:13px}._ruleLabel_96rr4_102{font-size:12px;opacity:.7}._rulesVisual_96rr4_107{display:flex;flex-direction:column;gap:4px;width:100%}._rulesLabelsRow_96rr4_114,._rulesLinesRow_96rr4_121{display:flex;flex-direction:row;gap:4px;width:100%}._rulesLineLabelCell_96rr4_128{flex:1 1 0;display:flex;align-items:flex-end;justify-content:center}._rulesLineLabelCell_96rr4_128:empty{display:flex!important}._rulesLineLabel_96rr4_128{font-size:11px;font-weight:600;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65))}._rulesLineLabelSpacer_96rr4_145{height:1em}._rulesLine_96rr4_121{display:block;width:100%;height:4px;border-radius:999px;background-color:var(--bb-tier-background, rgba(148, 163, 184, .22));transition:background-color .2s ease}._rulesLine_96rr4_121:empty{display:block!important}._rulesLineEmpty_96rr4_162{background-color:var(--bb-tier-background, rgba(148, 163, 184, .22))}._rulesLineFilled_96rr4_166{background-color:var(--bb-tier-border, rgba(37, 99, 235, .8))}._variants_96rr4_170{display:grid;gap:12px;max-height:400px;overflow-y:auto;padding-right:6px}._variantList_96rr4_178{list-style:none;padding:0;margin:0;display:grid;gap:10px}._variantRow_96rr4_186{display:grid;grid-template-columns:76px minmax(0,1fr);gap:12px;align-items:start;padding:8px;border-radius:var(--bb-border-radius, 12px);border:1px solid var(--bb-border-color, rgba(15, 23, 42, .08));background:#fff;transition:border-color .14s ease,box-shadow .14s ease,transform .14s ease}._variantRowInteractive_96rr4_198{cursor:pointer}._variantRowSelected_96rr4_202{border-color:#2563eb40;box-shadow:0 0 0 1px #2563eb14}._variantRowSoldOut_96rr4_207{opacity:.65}._variantMedia_96rr4_211{display:grid;align-items:start;justify-items:center;width:76px;aspect-ratio:1 / 1}._variantContent_96rr4_219{display:flex;flex-direction:column;justify-content:space-between;gap:4px;height:100%}._variantHeader_96rr4_227{display:flex;flex-direction:column;gap:4px}._variantTitle_96rr4_233{font-weight:700;font-size:14px;color:var(--bb-text-color, #111827)}._variantDetailsRow_96rr4_239{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;gap:6px;align-items:start}._variantImage_96rr4_247{width:100%;height:100%;border-radius:var(--bb-border-radius, 12px);object-fit:cover;background:#94a3b833}._variantImageFallback_96rr4_255{width:100%;height:100%;border-radius:var(--bb-border-radius, 12px);background:linear-gradient(135deg,#94a3b84d,#94a3b80d);display:grid;place-items:center;color:#94a3b8cc;font-size:10px;text-transform:uppercase;letter-spacing:.08em}._variantMeta_96rr4_268{font-size:12px;color:var(--bb-muted-color, rgba(15, 23, 42, .6))}._variantPrice_96rr4_273{font-size:13px;font-weight:600;color:#0f172a}._variantFooterRow_96rr4_279{display:flex;align-items:center;justify-content:space-between;width:100%}._variantActions_96rr4_286{display:grid;align-items:end;justify-items:end}._qtyActions_96rr4_292{display:inline-flex;align-items:center;gap:6px}._qtyActionsWrap_96rr4_298{display:grid;justify-items:end;gap:4px}._variantUnavailable_96rr4_304{display:none}._qtyControls_96rr4_308{display:inline-flex;align-items:center;gap:6px;padding:4px;border-radius:999px;border:1px solid var(--bb-border-strong-color, rgba(15, 23, 42, .12));background:#0f172a0a}._qtyButton_96rr4_318{width:30px;height:30px;padding:0;border-radius:999px;border:0;background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);font-size:16px;cursor:pointer;display:grid;place-items:center}._qtyButton_96rr4_318:disabled{cursor:not-allowed;opacity:.4}._qtyButton_96rr4_318:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._qtyValue_96rr4_342{min-width:22px;text-align:center;font-weight:600;font-size:13px}._soldOut_96rr4_349{color:var(--bb-muted-color, rgba(17, 24, 39));font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}._stockLimitNotice_96rr4_357{color:var(--bb-muted-color, rgba(17, 24, 39, .72));font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;text-align:end}._qtyChip_96rr4_366{min-width:44px;height:30px;padding:0 2px;border-radius:var(--bb-border-radius, 12px);background:#0f172a14;color:#0f172a;font-size:12px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:3px}._qtyChipInteractive_96rr4_381{cursor:pointer}._qtyChipValue_96rr4_385{min-width:14px;padding-left:3px;text-align:center}._qtyChipPlus_96rr4_391{margin-bottom:-3px;font-weight:500}._qtyChipClear_96rr4_396{width:22px;height:22px;border-radius:999px;border:1px solid rgba(15,23,42,.12);background:#fff;color:#0f172a;display:grid;place-items:center;cursor:pointer;padding:0;transition:background .16s ease,color .16s ease}._qtyChip_96rr4_366:hover ._qtyChipClear_96rr4_396{background:#0f172a;color:#fff}._qtyChipClear_96rr4_396:disabled{cursor:not-allowed;opacity:.45}._qtyChip_96rr4_366:hover ._qtyChipClear_96rr4_396:disabled{background:#fff;color:#0f172a}._qtyTrash_96rr4_425{width:22px;height:22px;border:0;background:transparent;color:#0f172a;display:grid;place-items:center;cursor:pointer;padding:0}._footer_96rr4_437{display:grid;padding-top:6px}._boxSummaryWindow_96rr4_442{margin-bottom:6px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;padding-bottom:6px;scrollbar-width:none;-ms-overflow-style:none}._boxSummaryWindow_96rr4_442::-webkit-scrollbar{display:none}._boxSummaryRow_96rr4_456{--bb-box-gap: 10px;display:flex;align-items:flex-start;gap:var(--bb-box-gap);width:100%}._boxSlot_96rr4_464{flex:0 0 calc((100% - (4 * var(--bb-box-gap))) / 5);max-width:calc((100% - (4 * var(--bb-box-gap))) / 5);display:flex;flex-direction:column;align-items:stretch;gap:6px}._boxItem_96rr4_473{width:100%;border-radius:var(--bb-border-radius, 12px);position:relative;display:block;-webkit-user-select:none;user-select:none;box-sizing:border-box;overflow:hidden}._boxItem_96rr4_473:before{content:"";display:block;padding-bottom:100%}._boxItemFilled_96rr4_490{border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);overflow:hidden}._boxItemPlaceholder_96rr4_496{border:1px dashed var(--bb-border-strong-color, rgba(17, 24, 39, .18));background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .02));color:var(--bb-muted-color, rgba(17, 24, 39, .6))}._boxItemThreshold_96rr4_502{border-style:solid;border-width:2px;border-color:var(--bb-tier-border, rgba(37, 99, 235, .55));background:var(--bb-tier-bg, rgba(37, 99, 235, .08));color:var(--bb-tier-text, rgba(29, 78, 216, .95))}._boxItemClickable_96rr4_510{cursor:pointer}._boxItemClickable_96rr4_510:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._boxItemImage_96rr4_519{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;min-width:0;min-height:0;object-fit:cover;display:block}._boxItemFallback_96rr4_530{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .04));color:var(--bb-text-color, #111827);font-weight:800}._boxItemPlus_96rr4_543{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:700;opacity:.5;line-height:1}._boxItemDiscountText_96rr4_555{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:800;text-align:center;line-height:1.1;padding:6px}._boxThresholdLabel_96rr4_568{font-size:11px;line-height:1.15;font-weight:700;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));text-align:center;white-space:wrap;overflow:hidden;text-overflow:ellipsis}._totalsReveal_96rr4_579{max-height:0;padding-bottom:12px;opacity:0;overflow:hidden;transition:max-height .26s ease,opacity .2s ease}._totalsRevealOpen_96rr4_587{max-height:80px;opacity:1}._ctaTotalsWrap_96rr4_592{opacity:0;transition:opacity .18s ease .12s}._ctaTotalsWrapVisible_96rr4_597{opacity:1}._ctaTotals_96rr4_592{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-radius:14px;background:#0f172a0a;font-size:13px;font-weight:600}._ctaDiscountBadge_96rr4_612{padding:4px 8px;border-radius:999px;background:var(--bb-tier-bg, rgba(37, 99, 235, .12));color:var(--bb-tier-text, rgba(30, 64, 175, .9));border:1px solid var(--bb-tier-border, rgba(37, 99, 235, .3));font-size:11px;text-transform:uppercase;letter-spacing:.08em}._ctaTotalsStrike_96rr4_623{text-decoration:line-through;color:#64748bcc;margin-right:6px}._ctaTotalsPrice_96rr4_629{font-weight:700;color:#0f172a}._cta_96rr4_592{border:0;border-radius:var(--bb-border-radius, 12px);padding:14px 18px;min-height:44px;font-weight:700;font-size:14px;background:var(--bb-cta-bg, #111827);color:var(--bb-cta-text, #ffffff);cursor:pointer;letter-spacing:.02em;transition:transform .14s ease,box-shadow .14s ease,background .14s ease;box-shadow:0 10px 24px #0f172a40}._cta_96rr4_592:hover{transform:translateY(-1px);background:var(--bb-cta-bg-hover, #0f172a)}._cta_96rr4_592:disabled{cursor:not-allowed;transform:none;box-shadow:none;opacity:.6}._ctaButtonGroup_96rr4_661{display:grid;grid-template-columns:1fr 1fr;gap:10px}._ctaDualLeft_96rr4_667,._ctaDualRight_96rr4_668{border:0;border-radius:var(--bb-border-radius, 12px);padding:12px 16px;min-height:44px;font-weight:700;font-size:13px;cursor:pointer}._ctaDualLeft_96rr4_667{background:#fff;color:#0f172a;border:1px solid rgba(15,23,42,.15)}._ctaDualRight_96rr4_668{background:var(--bb-cta-bg, #111827);color:var(--bb-cta-text, #ffffff)}._ctaDualLeft_96rr4_667:disabled,._ctaDualRight_96rr4_668:disabled{cursor:not-allowed;opacity:.6}._poweredBy_96rr4_695{padding-top:12px;font-size:11px;color:#64748bcc;text-align:center}._poweredBy_96rr4_695 a{color:inherit;text-decoration:none;font-weight:700}@media(max-width:640px){._panel_96rr4_2{padding:16px}._variantRow_96rr4_186{grid-template-columns:64px minmax(0,1fr);gap:10px}._qtyControls_96rr4_308{justify-self:start}._variantDetailsRow_96rr4_239{grid-template-columns:1fr}}')),document.head.appendChild(r)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
-
import { jsx as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode('._button_18rtl_1{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-family:var(--bb-font-family, inherit);border:1px solid var(--bb-button-border, rgba(0, 0, 0, .12));background:var(--bb-button-bg, #111827);color:var(--bb-button-text, #ffffff);font:inherit;line-height:1;padding:10px 14px;border-radius:var(--bb-button-radius, 10px);cursor:pointer;transition:transform .12s ease,background .12s ease,border-color .12s ease,opacity .12s ease}._button_18rtl_1:hover{background:var(--bb-button-bg-hover, #0b1220)}._button_18rtl_1:active{transform:translateY(1px)}._button_18rtl_1:disabled{opacity:.6;cursor:not-allowed}._button_18rtl_1:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._backdrop_p0w0a_1{position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--bb-backdrop-z-index, 2147483647);display:flex;justify-content:flex-end;background:var(--bb-backdrop-bg, rgba(0, 0, 0, .5));-webkit-backdrop-filter:blur(var(--bb-backdrop-blur, 2px));backdrop-filter:blur(var(--bb-backdrop-blur, 2px));padding:var(--bb-backdrop-padding, 12px);opacity:0;transition:opacity var(--bb-drawer-transition-duration, .22s) ease}._celebrationOverlay_p0w0a_14{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;pointer-events:none;z-index:50}._celebrationChip_p0w0a_23{font-family:var(--bb-font-family-body, "Cabin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);letter-spacing:.03em;font-size:18px;line-height:1;padding:12px 16px;border-radius:999px;color:var(--bb-celebration-text, #0b1b44);background:linear-gradient(180deg,var(--bb-celebration-bg-top, #ffffff),var(--bb-celebration-bg-bottom, #bae6fd));border:2px solid var(--bb-celebration-border, rgba(37, 99, 235, .28));box-shadow:0 18px 55px #0006,0 10px 28px #2563eb33,inset 0 1px #ffffffbf;transform-origin:50% 60%;will-change:transform,opacity,filter;animation:_bbCelebrationPop_p0w0a_1 2.8s cubic-bezier(.16,1,.3,1) forwards;filter:saturate(1.05)}@keyframes _bbCelebrationPop_p0w0a_1{0%{opacity:0;transform:translateY(10px) scale(.6);filter:blur(1px) saturate(1.1)}12%{opacity:1;transform:translateY(0) scale(1.12);filter:blur(0px) saturate(1.1)}22%{opacity:1;transform:translateY(0) scale(1)}80%{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(-10px) scale(.98)}}._backdropOpen_p0w0a_74{opacity:1}._backdropClosed_p0w0a_78{opacity:0}._panel_p0w0a_82{width:440px;max-width:100%;min-width:0;height:100%;background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);font-family:var(--bb-font-family-body, "Cabin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);border-radius:var(--bb-panel-radius, 16px);box-shadow:0 20px 60px #00000059;display:grid;grid-template-rows:auto 1fr auto;overflow:hidden;outline:none;position:relative;top:unset;right:unset;bottom:unset;left:unset}._panelOpen_p0w0a_103{animation:_bbSlideInFromRight_p0w0a_1 var(--bb-drawer-transition-duration, .22s) ease forwards}._panelClosed_p0w0a_107{animation:_bbSlideOutToRight_p0w0a_1 var(--bb-drawer-transition-duration, .22s) ease forwards}@keyframes _bbSlideInFromRight_p0w0a_1{0%{transform:translate(110%)}to{transform:translate(0)}}@keyframes _bbSlideOutToRight_p0w0a_1{0%{transform:translate(0)}to{transform:translate(110%)}}@media(prefers-reduced-motion:reduce){._backdrop_p0w0a_1{transition:none}._celebrationChip_p0w0a_23,._panelOpen_p0w0a_103,._panelClosed_p0w0a_107{animation:none}}._header_p0w0a_146{display:grid;grid-template-columns:36px 1fr 36px;align-items:center;column-gap:12px;padding:var(--bb-header-padding, 16px 16px 12px 16px);border-bottom:1px solid var(--bb-border-color, rgba(17, 24, 39, .08))}._headerCenter_p0w0a_155{position:relative;min-width:0;display:flex;justify-content:center;align-items:center}._title_p0w0a_163{font-size:24px;margin:0;line-height:1.2;font-family:var(--bb-font-family-title, "Bebas Neue", "Cabin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);letter-spacing:.02em;color:var(--bb-title-color, var(--bb-text-color, #111827))}._searchIconButton_p0w0a_172{width:36px;height:36px;border-radius:10px;border:1px solid var(--bb-border-strong-color, rgba(17, 24, 39, .12));background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:0}._searchIconButton_p0w0a_172:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchIconButton_p0w0a_172:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._headerTitleWrap_p0w0a_195{transition:opacity .18s ease,transform .22s ease}._headerSearchWrap_p0w0a_199{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;pointer-events:none;opacity:0;transform:translateY(-2px);transition:opacity .18s ease,transform .22s ease}._headerSearchOpen_p0w0a_211 ._headerTitleWrap_p0w0a_195{opacity:0;transform:translateY(2px);pointer-events:none}._headerSearchOpen_p0w0a_211 ._headerSearchWrap_p0w0a_199{opacity:1;transform:translateY(0);pointer-events:auto}._searchBar_p0w0a_223{width:min(320px,100%);height:36px;display:flex;align-items:center;gap:8px;background:var(--bb-surface-bg, #ffffff);border:1px solid var(--bb-border-strong-color, rgba(17, 24, 39, .12));border-radius:10px;padding:0 8px}._searchInput_p0w0a_235{width:100%;border:none;outline:none;background:transparent;font:inherit;font-size:14px;min-width:0;height:100%;line-height:36px;padding:0}._searchInput_p0w0a_235::-webkit-search-cancel-button,._searchInput_p0w0a_235::-webkit-search-decoration,._searchInput_p0w0a_235::-webkit-search-results-button,._searchInput_p0w0a_235::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}._searchClearButton_p0w0a_256{border:none;background:transparent;color:var(--bb-text-color, #111827);font:inherit;font-size:13px;font-weight:700;cursor:pointer;padding:6px;border-radius:10px;line-height:1}._searchClearButton_p0w0a_256:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._searchClearButton_p0w0a_256:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._closeButton_p0w0a_278{border:1px solid var(--bb-border-strong-color, rgba(17, 24, 39, .12));background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);width:36px;height:36px;border-radius:10px;cursor:pointer;flex:0 0 auto;padding:0}._closeButton_p0w0a_278:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._closeButton_p0w0a_278:disabled{opacity:.6;cursor:not-allowed}._closeButton_p0w0a_278:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}@media(prefers-reduced-motion:reduce){._headerTitleWrap_p0w0a_195,._headerSearchWrap_p0w0a_199{transition:none}}._body_p0w0a_312{padding:var(--bb-body-padding, 8px 16px);overflow:auto}._muted_p0w0a_317{color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));margin:0 0 12px}._error_p0w0a_322{color:var(--bb-error-color, #b91c1c);margin:0 0 12px}._variants_p0w0a_327{margin-top:4px}._variantList_p0w0a_331{list-style:none;padding:0;margin:0;display:grid;gap:10px}._emptyState_p0w0a_339{margin:0;padding:20px 16px;border-radius:var(--bb-border-radius, 12px);border:1px dashed var(--bb-border-color, rgba(17, 24, 39, .12));background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .02));color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));font-size:13px;line-height:1.5;text-align:center}._variantRow_p0w0a_351{display:grid;grid-template-columns:1fr auto;gap:0px;align-items:stretch;padding:5px}._variantRowSoldOut_p0w0a_359{opacity:.65}._variantLeft_p0w0a_363{min-width:0;display:flex;gap:12px;align-items:center}._addToBundleButton_p0w0a_370{height:100%;align-self:stretch;border-radius:12px;border:none;background:var(--bb-cta-bg, #91aae5);color:var(--bb-cta-text, #ffffff);font:inherit;font-weight:800;padding:0 16px;cursor:pointer;white-space:nowrap}._addToBundleButton_p0w0a_370:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._addToBundleButton_p0w0a_370:disabled{opacity:.6;cursor:not-allowed}._addToBundleButton_p0w0a_370:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._soldOutContainer_p0w0a_398{display:flex;align-items:center;justify-content:center;height:100%;padding:0 16px}._stockLimitContainer_p0w0a_406{display:flex;align-items:center;justify-content:center;height:100%;max-width:120px;padding:0 12px}._soldOut_p0w0a_398{align-self:center;text-align:center;color:var(--bb-muted-color, rgba(17, 24, 39));font-size:.9em;font-weight:600;pointer-events:none}._stockLimitNotice_p0w0a_424{color:var(--bb-muted-color, rgba(17, 24, 39, .72));font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;text-align:center}._variantThumb_p0w0a_433{width:60px;height:60px;border-radius:12px;overflow:hidden;border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .02));flex:0 0 auto}._variantThumbImg_p0w0a_443{width:100%;height:100%;object-fit:cover;display:block}._variantThumbFallback_p0w0a_450{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-weight:800;color:var(--bb-text-color, #111827)}._variantInfo_p0w0a_460{min-width:0}._variantName_p0w0a_464{font-size:14px;font-weight:600;margin-bottom:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantMeta_p0w0a_473{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._variantPriceRow_p0w0a_481{display:flex;align-items:baseline;gap:8px;margin-top:4px}._variantCompareAt_p0w0a_488{font-size:12px;color:var(--bb-muted-color, rgba(17, 24, 39, .6));text-decoration:line-through}._variantPrice_p0w0a_481{font-size:13px;font-weight:800}._qtyControls_p0w0a_499{display:inline-flex;align-items:center;gap:6px}._qtyControlsWrap_p0w0a_505{display:grid;justify-items:center;gap:4px}._qtyButton_p0w0a_511{padding:0;width:34px;height:34px;border-radius:10px;border:1px solid var(--bb-border-strong-color, rgba(17, 24, 39, .12));background:var(--bb-surface-bg, #ffffff);cursor:pointer;line-height:1;font-size:16px}._qtyButton_p0w0a_511:hover{background:var(--bb-control-bg-hover, rgba(17, 24, 39, .04))}._qtyButton_p0w0a_511:disabled{opacity:.6;cursor:not-allowed}._qtyButton_p0w0a_511:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._qtyValue_p0w0a_537{min-width:18px;text-align:center;font-variant-numeric:tabular-nums;font-weight:700}._footer_p0w0a_544{padding:var(--bb-footer-padding, 12px 16px 16px 16px);border-top:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);position:relative;min-width:0}._poweredBy_p0w0a_552{font-size:10px;color:var(rgba(17, 24, 39, .6));text-align:center;margin-top:10px}._poweredBy_p0w0a_552 a{color:inherit;text-decoration:none}._boxSummaryWindow_p0w0a_564{margin-bottom:6px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;padding-bottom:6px;min-width:0;scrollbar-width:none;-ms-overflow-style:none}._boxSummaryWindow_p0w0a_564::-webkit-scrollbar{display:none}._boxSummaryRow_p0w0a_582{--bb-box-gap: 10px;display:flex;align-items:flex-start;gap:var(--bb-box-gap);width:100%}._boxSlot_p0w0a_590{flex:0 0 calc((100% - (4 * var(--bb-box-gap))) / 5);max-width:calc((100% - (4 * var(--bb-box-gap))) / 5);display:flex;flex-direction:column;align-items:stretch;gap:6px}._boxItem_p0w0a_599{width:100%;aspect-ratio:1 / 1;border-radius:12px;position:relative;display:flex;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;box-sizing:border-box}._boxItemClickable_p0w0a_611{cursor:pointer}._boxItemClickable_p0w0a_611:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._boxThresholdLabel_p0w0a_620{font-size:11px;line-height:1.15;font-weight:700;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));text-align:center;white-space:wrap;overflow:hidden;text-overflow:ellipsis}._boxItemPlaceholder_p0w0a_631{border:1px dashed var(--bb-border-strong-color, rgba(17, 24, 39, .18));background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .02));color:var(--bb-muted-color, rgba(17, 24, 39, .6))}._boxItemFilled_p0w0a_637{border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);overflow:hidden}._boxItemThreshold_p0w0a_643{border-style:solid;border-width:2px;border-color:var(--bb-tier-border, rgba(37, 99, 235, .55));background:var(--bb-tier-bg, rgba(37, 99, 235, .08));color:var(--bb-tier-text, rgba(29, 78, 216, .95))}._boxItemDiscountText_p0w0a_651{font-size:12px;font-weight:800;text-align:center;line-height:1.1;padding:6px}._boxItemPlus_p0w0a_659{font-size:22px;font-weight:700;opacity:.5;line-height:1}._boxItemImage_p0w0a_666{width:100%;height:100%;object-fit:cover;display:block}._boxItemFallback_p0w0a_673{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .04));color:var(--bb-text-color, #111827);font-weight:800}._ctaButtonGroup_p0w0a_684{display:flex;gap:8px;width:100%;transition:gap .3s cubic-bezier(.4,0,.2,1)}._ctaButtonGroupAnimating_p0w0a_691{gap:0}._cta_p0w0a_684{width:100%;border:1px solid var(--bb-cta-border, rgba(0, 0, 0, .12));background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff);font:inherit;font-weight:700;padding:12px 14px;border-radius:12px;cursor:pointer}._ctaSecondary_p0w0a_707{width:100%;border:2px solid var(--bb-cta-bg, #2563eb);background:transparent;color:var(--bb-cta-bg, #2563eb);font:inherit;font-weight:700;padding:10px 14px;border-radius:12px;cursor:pointer}._ctaDualLeft_p0w0a_719{width:100%;border:2px solid var(--bb-cta-bg, #2563eb);background:transparent;color:var(--bb-cta-bg, #2563eb);font:inherit;font-weight:700;padding:10px 14px;border-radius:12px;cursor:pointer;transition:border-radius .3s cubic-bezier(.4,0,.2,1),background .3s cubic-bezier(.4,0,.2,1),color .3s cubic-bezier(.4,0,.2,1),border-right-width .3s cubic-bezier(.4,0,.2,1),opacity .3s cubic-bezier(.4,0,.2,1)}._ctaDualLeftAnimating_p0w0a_737{border-top-right-radius:0;border-bottom-right-radius:0;border-right-width:0;background:var(--bb-cta-bg, #2563eb);opacity:.6;color:var(--bb-cta-text, #ffffff)}._ctaDualLeftAnimating_p0w0a_737>span{opacity:0}._ctaDualRight_p0w0a_750{width:100%;border:1px solid var(--bb-cta-border, rgba(0, 0, 0, .12));background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff);font:inherit;font-weight:700;padding:12px 14px;border-radius:12px;cursor:pointer;transition:border-radius .3s cubic-bezier(.4,0,.2,1),border-left-width .3s cubic-bezier(.4,0,.2,1),opacity .3s cubic-bezier(.4,0,.2,1)}._ctaDualRightAnimating_p0w0a_766{border-top-left-radius:0;border-bottom-left-radius:0;border-left-width:0;opacity:.6}._ctaDualRightAnimating_p0w0a_766>span{opacity:0}._ctaTotals_p0w0a_777{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-variant-numeric:tabular-nums}._ctaDiscountBadge_p0w0a_785{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:800;background:var(--bb-tier-bg, rgba(37, 99, 235, .12));border:1px solid var(--bb-tier-border, rgba(37, 99, 235, .3));color:var(--bb-tier-text, rgba(29, 78, 216, .95));white-space:nowrap}._ctaTotalsWrap_p0w0a_799{overflow:hidden;max-height:0;opacity:0;transform:translateY(4px);margin-bottom:0;transition:max-height .22s ease,opacity .16s ease,transform .22s ease,margin-bottom .22s ease}._ctaTotalsWrapVisible_p0w0a_812{max-height:40px;opacity:1;transform:translateY(0);margin-bottom:8px}._ctaTotalsStrike_p0w0a_819{opacity:.85;text-decoration:line-through;font-weight:700;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65))}._ctaTotalsPrice_p0w0a_826{font-weight:900;color:var(--bb-text-color, #111827)}@media(prefers-reduced-motion:reduce){._ctaTotalsWrap_p0w0a_799{transition:none}}._cta_p0w0a_684:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._cta_p0w0a_684:disabled{opacity:.6;cursor:not-allowed}._cta_p0w0a_684:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaSecondary_p0w0a_707:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaSecondary_p0w0a_707:disabled{opacity:.6;cursor:not-allowed}._ctaSecondary_p0w0a_707:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualLeft_p0w0a_719:hover{background:var(--bb-cta-bg, #2563eb);color:var(--bb-cta-text, #ffffff)}._ctaDualLeft_p0w0a_719:disabled{opacity:.6;cursor:not-allowed}._ctaDualLeft_p0w0a_719:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._ctaDualRight_p0w0a_750:hover{background:var(--bb-cta-bg-hover, #1d4ed8)}._ctaDualRight_p0w0a_750:disabled{opacity:.6;cursor:not-allowed}._ctaDualRight_p0w0a_750:focus-visible{outline:2px solid var(--bb-cta-focus-ring, var(--bb-text-color, #111827));outline-offset:2px}._helperText_p0w0a_895{margin-top:8px;font-size:12px;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));text-align:center}@media(max-width:767px){._backdrop_p0w0a_1{padding:0;justify-content:stretch}._panel_p0w0a_82{width:100%;height:100%;border-radius:0}}._panel_gafs6_2 button,._panel_gafs6_2 input,._panel_gafs6_2 [role=button]{box-sizing:border-box;margin:0}._panel_gafs6_2{background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);font-family:var(--bb-font-family-body, "Cabin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));border-radius:var(--bb-panel-radius, 16px);padding:20px;display:grid;gap:14px}._header_gafs6_20{text-align:start}._title_gafs6_24{font-size:22px;margin:0;font-family:var(--bb-font-family-title, "Bebas Neue", "Cabin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif);letter-spacing:.02em;color:var(--bb-title-color, var(--bb-text-color, #111827))}._status_gafs6_32{font-size:13px;color:var(--bb-muted-color, rgba(15, 23, 42, .6))}._error_gafs6_37{font-size:13px;color:#b91c1c;font-weight:600}._section_gafs6_43{display:grid;gap:6px}._sectionTitle_gafs6_48{text-align:left;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--bb-muted-color, rgba(15, 23, 42, .6))}._rules_gafs6_57{display:flex;justify-content:center;gap:6px}._rulesList_gafs6_63{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px;list-style:none;margin:0;padding:0}._ruleItem_gafs6_74{display:flex;flex-direction:column;align-items:center;gap:6px;padding:6px 10px;border-radius:var(--bb-border-radius, 12px);border:1px solid var(--bb-tier-border, rgba(37, 99, 235, .25));background:var(--bb-tier-bg, rgba(37, 99, 235, .06));color:var(--bb-tier-text, #1f2937)}._ruleMin_gafs6_86{font-weight:600;font-size:13px}._ruleDiscount_gafs6_91{font-weight:700;font-size:13px}._ruleLabel_gafs6_96{font-size:12px;opacity:.7}._rulesVisual_gafs6_101{display:flex;flex-direction:column;gap:4px;width:100%}._rulesLabelsRow_gafs6_108,._rulesLinesRow_gafs6_115{display:flex;flex-direction:row;gap:4px;width:100%}._rulesLineLabelCell_gafs6_122{flex:1 1 0;display:flex;align-items:flex-end;justify-content:center}._rulesLineLabelCell_gafs6_122:empty{display:flex!important}._rulesLineLabel_gafs6_122{font-size:11px;font-weight:600;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65))}._rulesLineLabelSpacer_gafs6_139{height:1em}._rulesLine_gafs6_115{display:block;width:100%;height:4px;border-radius:999px;background-color:var(--bb-tier-background, rgba(148, 163, 184, .22));transition:background-color .2s ease}._rulesLine_gafs6_115:empty{display:block!important}._rulesLineEmpty_gafs6_156{background-color:var(--bb-tier-background, rgba(148, 163, 184, .22))}._rulesLineFilled_gafs6_160{background-color:var(--bb-tier-border, rgba(37, 99, 235, .8))}._variants_gafs6_164{display:grid;gap:12px;max-height:400px;overflow-y:auto;padding-right:6px}._variantList_gafs6_172{list-style:none;padding:0;margin:0;display:grid;gap:10px}._emptyState_gafs6_180{margin:0;padding:20px 16px;border-radius:var(--bb-border-radius, 12px);border:1px dashed var(--bb-border-color, rgba(15, 23, 42, .12));background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .02));color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));font-size:13px;line-height:1.5;text-align:center}._variantRow_gafs6_192{display:grid;grid-template-columns:76px minmax(0,1fr);gap:12px;align-items:start;padding:8px;border-radius:var(--bb-border-radius, 12px);border:1px solid var(--bb-border-color, rgba(15, 23, 42, .08));background:#fff;transition:border-color .14s ease,box-shadow .14s ease,transform .14s ease}._variantRowInteractive_gafs6_204{cursor:pointer}._variantRowSelected_gafs6_208{border-color:#2563eb40;box-shadow:0 0 0 1px #2563eb14}._variantRowSoldOut_gafs6_213{opacity:.65}._variantMedia_gafs6_217{display:grid;align-items:start;justify-items:center;width:76px;aspect-ratio:1 / 1}._variantContent_gafs6_225{display:flex;flex-direction:column;justify-content:space-between;gap:4px;height:100%}._variantHeader_gafs6_233{display:flex;flex-direction:column;gap:4px}._variantTitle_gafs6_239{font-weight:700;font-size:14px;color:var(--bb-text-color, #111827)}._variantDetailsRow_gafs6_245{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;gap:6px;align-items:start}._variantImage_gafs6_253{width:100%;height:100%;border-radius:var(--bb-border-radius, 12px);object-fit:cover;background:#94a3b833}._variantImageFallback_gafs6_261{width:100%;height:100%;border-radius:var(--bb-border-radius, 12px);background:linear-gradient(135deg,#94a3b84d,#94a3b80d);display:grid;place-items:center;color:#94a3b8cc;font-size:10px;text-transform:uppercase;letter-spacing:.08em}._variantMeta_gafs6_274{font-size:12px;color:var(--bb-muted-color, rgba(15, 23, 42, .6))}._variantPrice_gafs6_279{font-size:13px;font-weight:600;color:#0f172a}._variantFooterRow_gafs6_285{display:flex;align-items:center;justify-content:space-between;width:100%}._variantActions_gafs6_292{display:grid;align-items:end;justify-items:end}._qtyActions_gafs6_298{display:inline-flex;align-items:center;gap:6px}._qtyActionsWrap_gafs6_304{display:grid;justify-items:end;gap:4px}._variantUnavailable_gafs6_310{display:none}._qtyControls_gafs6_314{display:inline-flex;align-items:center;gap:6px;padding:4px;border-radius:999px;border:1px solid var(--bb-border-strong-color, rgba(15, 23, 42, .12));background:#0f172a0a}._qtyButton_gafs6_324{width:30px;height:30px;padding:0;border-radius:999px;border:0;background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);font-size:16px;cursor:pointer;display:grid;place-items:center}._qtyButton_gafs6_324:disabled{cursor:not-allowed;opacity:.4}._qtyButton_gafs6_324:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._qtyValue_gafs6_348{min-width:22px;text-align:center;font-weight:600;font-size:13px}._soldOut_gafs6_355{color:var(--bb-muted-color, rgba(17, 24, 39));font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}._stockLimitNotice_gafs6_363{color:var(--bb-muted-color, rgba(17, 24, 39, .72));font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;text-align:end}._qtyChip_gafs6_372{min-width:44px;height:30px;padding:0 2px;border-radius:var(--bb-border-radius, 12px);background:#0f172a14;color:#0f172a;font-size:12px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:3px}._qtyChipInteractive_gafs6_387{cursor:pointer}._qtyChipValue_gafs6_391{min-width:14px;padding-left:3px;text-align:center}._qtyChipPlus_gafs6_397{margin-bottom:-3px;font-weight:500}._qtyChipClear_gafs6_402{width:22px;height:22px;border-radius:999px;border:1px solid rgba(15,23,42,.12);background:#fff;color:#0f172a;display:grid;place-items:center;cursor:pointer;padding:0;transition:background .16s ease,color .16s ease}._qtyChip_gafs6_372:hover ._qtyChipClear_gafs6_402{background:#0f172a;color:#fff}._qtyChipClear_gafs6_402:disabled{cursor:not-allowed;opacity:.45}._qtyChip_gafs6_372:hover ._qtyChipClear_gafs6_402:disabled{background:#fff;color:#0f172a}._qtyTrash_gafs6_431{width:22px;height:22px;border:0;background:transparent;color:#0f172a;display:grid;place-items:center;cursor:pointer;padding:0}._footer_gafs6_443{display:grid;padding-top:6px}._boxSummaryWindow_gafs6_448{margin-bottom:6px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;padding-bottom:6px;scrollbar-width:none;-ms-overflow-style:none}._boxSummaryWindow_gafs6_448::-webkit-scrollbar{display:none}._boxSummaryRow_gafs6_462{--bb-box-gap: 10px;display:flex;align-items:flex-start;gap:var(--bb-box-gap);width:100%}._boxSlot_gafs6_470{flex:0 0 calc((100% - (4 * var(--bb-box-gap))) / 5);max-width:calc((100% - (4 * var(--bb-box-gap))) / 5);display:flex;flex-direction:column;align-items:stretch;gap:6px}._boxItem_gafs6_479{width:100%;border-radius:var(--bb-border-radius, 12px);position:relative;display:block;-webkit-user-select:none;user-select:none;box-sizing:border-box;overflow:hidden}._boxItem_gafs6_479:before{content:"";display:block;padding-bottom:100%}._boxItemFilled_gafs6_496{border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));background:var(--bb-surface-bg, #ffffff);overflow:hidden}._boxItemPlaceholder_gafs6_502{border:1px dashed var(--bb-border-strong-color, rgba(17, 24, 39, .18));background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .02));color:var(--bb-muted-color, rgba(17, 24, 39, .6))}._boxItemThreshold_gafs6_508{border-style:solid;border-width:2px;border-color:var(--bb-tier-border, rgba(37, 99, 235, .55));background:var(--bb-tier-bg, rgba(37, 99, 235, .08));color:var(--bb-tier-text, rgba(29, 78, 216, .95))}._boxItemClickable_gafs6_516{cursor:pointer}._boxItemClickable_gafs6_516:focus-visible{outline:2px solid var(--bb-focus-ring, #2563eb);outline-offset:2px}._boxItemImage_gafs6_525{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;min-width:0;min-height:0;object-fit:cover;display:block}._boxItemFallback_gafs6_536{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:var(--bb-surface-subtle-bg, rgba(17, 24, 39, .04));color:var(--bb-text-color, #111827);font-weight:800}._boxItemPlus_gafs6_549{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:700;opacity:.5;line-height:1}._boxItemDiscountText_gafs6_561{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:800;text-align:center;line-height:1.1;padding:6px}._boxThresholdLabel_gafs6_574{font-size:11px;line-height:1.15;font-weight:700;color:var(--bb-muted-strong-color, rgba(17, 24, 39, .65));text-align:center;white-space:wrap;overflow:hidden;text-overflow:ellipsis}._totalsReveal_gafs6_585{max-height:0;padding-bottom:12px;opacity:0;overflow:hidden;transition:max-height .26s ease,opacity .2s ease}._totalsRevealOpen_gafs6_593{max-height:80px;opacity:1}._ctaTotalsWrap_gafs6_598{opacity:0;transition:opacity .18s ease .12s}._ctaTotalsWrapVisible_gafs6_603{opacity:1}._ctaTotals_gafs6_598{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-radius:14px;background:#0f172a0a;font-size:13px;font-weight:600}._ctaDiscountBadge_gafs6_618{padding:4px 8px;border-radius:999px;background:var(--bb-tier-bg, rgba(37, 99, 235, .12));color:var(--bb-tier-text, rgba(30, 64, 175, .9));border:1px solid var(--bb-tier-border, rgba(37, 99, 235, .3));font-size:11px;text-transform:uppercase;letter-spacing:.08em}._ctaTotalsStrike_gafs6_629{text-decoration:line-through;color:#64748bcc;margin-right:6px}._ctaTotalsPrice_gafs6_635{font-weight:700;color:#0f172a}._cta_gafs6_598{border:0;border-radius:var(--bb-border-radius, 12px);padding:14px 18px;min-height:44px;font-weight:700;font-size:14px;background:var(--bb-cta-bg, #111827);color:var(--bb-cta-text, #ffffff);cursor:pointer;letter-spacing:.02em;transition:transform .14s ease,box-shadow .14s ease,background .14s ease;box-shadow:0 10px 24px #0f172a40}._cta_gafs6_598:hover{transform:translateY(-1px);background:var(--bb-cta-bg-hover, #0f172a)}._cta_gafs6_598:disabled{cursor:not-allowed;transform:none;box-shadow:none;opacity:.6}._ctaButtonGroup_gafs6_667{display:grid;grid-template-columns:1fr 1fr;gap:10px}._ctaDualLeft_gafs6_673,._ctaDualRight_gafs6_674{border:0;border-radius:var(--bb-border-radius, 12px);padding:12px 16px;min-height:44px;font-weight:700;font-size:13px;cursor:pointer}._ctaDualLeft_gafs6_673{background:#fff;color:#0f172a;border:1px solid rgba(15,23,42,.15)}._ctaDualRight_gafs6_674{background:var(--bb-cta-bg, #111827);color:var(--bb-cta-text, #ffffff)}._ctaDualLeft_gafs6_673:disabled,._ctaDualRight_gafs6_674:disabled{cursor:not-allowed;opacity:.6}._poweredBy_gafs6_701{padding-top:12px;font-size:11px;color:#64748bcc;text-align:center}._poweredBy_gafs6_701 a{color:inherit;text-decoration:none;font-weight:700}@media(max-width:640px){._panel_gafs6_2{padding:16px}._variantRow_gafs6_192{grid-template-columns:64px minmax(0,1fr);gap:10px}._qtyControls_gafs6_314{justify-self:start}._variantDetailsRow_gafs6_245{grid-template-columns:1fr}}._panel_mo8go_1{background:var(--bb-surface-bg, #ffffff);color:var(--bb-text-color, #111827);font-family:var(--bb-font-family-body, "Cabin", system-ui, sans-serif);border:1px solid var(--bb-border-color, rgba(17, 24, 39, .08));border-radius:var(--bb-panel-radius, 16px);padding:20px;display:grid;gap:14px}._title_mo8go_12{margin:0;font-size:22px;font-family:var(--bb-font-family-title, "Bebas Neue", "Cabin", system-ui, sans-serif);color:var(--bb-title-color, var(--bb-text-color, #111827))}._status_mo8go_19{font-size:13px;color:var(--bb-muted-color, rgba(17, 24, 39, .65))}._error_mo8go_24{font-size:13px;font-weight:600;color:#b91c1c}._rules_mo8go_30{display:grid;gap:10px}._rule_mo8go_30{width:100%;border:1px solid var(--bb-border-color, rgba(17, 24, 39, .12));border-radius:14px;background:#fff;padding:0;overflow:hidden}._ruleInput_mo8go_44{position:absolute;opacity:0;pointer-events:none}._ruleLabel_mo8go_50{display:flex!important;justify-content:space-between!important;align-items:center!important;gap:4px!important;padding:14px 16px!important;cursor:pointer!important}._ruleLabelContent_mo8go_59{display:flex;flex-direction:column;justify-content:flex-start;gap:4px}._ruleSelected_mo8go_66{border-color:var(--bb-tier-border, rgba(37, 99, 235, .55));background:var(--bb-tier-bg, rgba(37, 99, 235, .08))}._ruleTitle_mo8go_71{font-size:16px;font-weight:700;color:var(--bb-title-color, var(--bb-text-color, #111827))}._ruleSubtitle_mo8go_77{font-size:13px;color:var(--bb-tier-text, rgba(29, 78, 216, .95));font-weight:600}._priceRow_mo8go_83{display:inline-flex;align-items:baseline;gap:8px;flex-wrap:wrap}._oldPrice_mo8go_90{font-size:13px;color:var(--bb-muted-color, rgba(17, 24, 39, .65));text-decoration:line-through}._newPrice_mo8go_96{font-size:16px;font-weight:700;color:var(--bb-title-color, var(--bb-text-color, #111827))}')),document.head.appendChild(a)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import { jsx as s, jsxs as T, Fragment as Nt } from "react/jsx-runtime";
|
|
3
|
+
import It, { useCallback as re, useState as W, useRef as Y, useEffect as D, useMemo as P, createContext as Kt, useContext as Xt, forwardRef as Ht, createElement as Rt } from "react";
|
|
4
|
+
const wt = {
|
|
5
5
|
bundleId: "_bundle_id",
|
|
6
6
|
bundleConfig: "_bundle_config",
|
|
7
7
|
bundleSource: "_bundle_source",
|
|
8
8
|
bundleTitle: "_bundle_title"
|
|
9
9
|
};
|
|
10
|
-
async function
|
|
10
|
+
async function Zt(n) {
|
|
11
11
|
const e = new URL("/api/public/bundle-configs-active", n.apiBaseUrl);
|
|
12
12
|
e.searchParams.set("shop", n.shop);
|
|
13
|
-
const
|
|
13
|
+
const i = await (await fetch(e, {
|
|
14
14
|
method: "GET",
|
|
15
15
|
signal: n.signal,
|
|
16
16
|
headers: { "Content-Type": "application/json" }
|
|
17
17
|
})).json().catch(() => null);
|
|
18
|
-
return !
|
|
18
|
+
return !i || typeof i != "object" ? { ok: !1, error: "Invalid response." } : i;
|
|
19
19
|
}
|
|
20
|
-
async function
|
|
20
|
+
async function Jt(n) {
|
|
21
21
|
const e = new URL("/api/public/bundle-config", n.apiBaseUrl);
|
|
22
22
|
e.searchParams.set("shop", n.shop), n.configHandle && e.searchParams.set("handle", n.configHandle), n.fresh && e.searchParams.set("fresh", "1");
|
|
23
|
-
const
|
|
23
|
+
const i = await (await fetch(e, {
|
|
24
24
|
method: "GET",
|
|
25
25
|
signal: n.signal,
|
|
26
26
|
headers: { "Content-Type": "application/json" }
|
|
27
27
|
})).json().catch(() => null);
|
|
28
|
-
return !
|
|
28
|
+
return !i || typeof i != "object" ? { ok: !1, error: "Invalid response." } : i;
|
|
29
29
|
}
|
|
30
|
-
async function
|
|
30
|
+
async function en(n) {
|
|
31
31
|
const e = new URL("/api/public/bundle-config-status", n.apiBaseUrl);
|
|
32
32
|
e.searchParams.set("shop", n.shop), n.configHandle && e.searchParams.set("handle", n.configHandle);
|
|
33
|
-
const
|
|
33
|
+
const i = await (await fetch(e, {
|
|
34
34
|
method: "GET",
|
|
35
35
|
signal: n.signal,
|
|
36
36
|
headers: { "Content-Type": "application/json" }
|
|
37
37
|
})).json().catch(() => null);
|
|
38
|
-
return !
|
|
38
|
+
return !i || typeof i != "object" ? { ok: !1, error: "Invalid response." } : i;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function St(n) {
|
|
41
41
|
if (!n || n.availableForSale === !1) return 0;
|
|
42
42
|
if (n.inventoryPolicy === "CONTINUE" || n.sellableOnlineQuantity == null) return Number.POSITIVE_INFINITY;
|
|
43
43
|
const e = Number(n.sellableOnlineQuantity);
|
|
44
44
|
return !Number.isFinite(e) || e <= 0 && n.availableForSale === !0 ? Number.POSITIVE_INFINITY : Math.max(0, Math.floor(e));
|
|
45
45
|
}
|
|
46
|
-
const
|
|
47
|
-
function
|
|
46
|
+
const At = "bb_anonymous_user_id";
|
|
47
|
+
function yt() {
|
|
48
48
|
if (typeof window > "u" || typeof localStorage > "u")
|
|
49
49
|
return `bb_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
|
|
50
50
|
try {
|
|
51
|
-
const n = localStorage.getItem(
|
|
51
|
+
const n = localStorage.getItem(At);
|
|
52
52
|
if (n && typeof n == "string" && n.length > 0)
|
|
53
53
|
return n;
|
|
54
54
|
let e;
|
|
@@ -61,17 +61,17 @@ function pt() {
|
|
|
61
61
|
} catch {
|
|
62
62
|
e = `bb_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
|
|
63
63
|
}
|
|
64
|
-
return localStorage.setItem(
|
|
64
|
+
return localStorage.setItem(At, e), e;
|
|
65
65
|
} catch {
|
|
66
66
|
return `bb_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
async function
|
|
69
|
+
async function ct(n, e, t) {
|
|
70
70
|
if (!(typeof window > "u"))
|
|
71
71
|
try {
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
const
|
|
72
|
+
const i = new URL(n, window.location.origin);
|
|
73
|
+
i.searchParams.set("shop", e);
|
|
74
|
+
const r = await fetch(i, {
|
|
75
75
|
method: "POST",
|
|
76
76
|
headers: {
|
|
77
77
|
"Content-Type": "application/json"
|
|
@@ -80,18 +80,18 @@ async function lt(n, e, t) {
|
|
|
80
80
|
// Don't wait for response - fire and forget
|
|
81
81
|
keepalive: !0
|
|
82
82
|
});
|
|
83
|
-
|
|
84
|
-
`[Bundle Analytics] Event tracking failed with status ${
|
|
85
|
-
await
|
|
83
|
+
r.ok || console.warn(
|
|
84
|
+
`[Bundle Analytics] Event tracking failed with status ${r.status}:`,
|
|
85
|
+
await r.text().catch(() => "Unable to read response")
|
|
86
86
|
);
|
|
87
|
-
} catch (
|
|
88
|
-
console.warn("[Bundle Analytics] Failed to track event:",
|
|
87
|
+
} catch (i) {
|
|
88
|
+
console.warn("[Bundle Analytics] Failed to track event:", i);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
const
|
|
91
|
+
const _t = {
|
|
92
92
|
"bundle.title.default": "Build your bundle",
|
|
93
93
|
"bundle.loading": "Loading...",
|
|
94
|
-
"bundle.
|
|
94
|
+
"bundle.empty": "Your selected eligible products for bundling will show here",
|
|
95
95
|
"bundle.drawer.aria": "Bundle builder",
|
|
96
96
|
"bundle.search": "Search",
|
|
97
97
|
"bundle.search.expanded": "Search (expanded)",
|
|
@@ -132,11 +132,11 @@ const ft = {
|
|
|
132
132
|
"bundle.a11y.max_available_selected": "{{name}} max available selected",
|
|
133
133
|
"bundle.a11y.increase": "Increase {{name}}",
|
|
134
134
|
"bundle.a11y.decrease": "Decrease {{name}}"
|
|
135
|
-
},
|
|
136
|
-
...
|
|
135
|
+
}, tn = {
|
|
136
|
+
..._t,
|
|
137
137
|
"bundle.title.default": "Creez votre bundle",
|
|
138
138
|
"bundle.loading": "Chargement...",
|
|
139
|
-
"bundle.
|
|
139
|
+
"bundle.empty": "Vos produits eligibles selectionnes pour le bundle apparaitront ici",
|
|
140
140
|
"bundle.drawer.aria": "Constructeur de bundle",
|
|
141
141
|
"bundle.search": "Rechercher",
|
|
142
142
|
"bundle.search.expanded": "Rechercher (deplie)",
|
|
@@ -160,11 +160,11 @@ const ft = {
|
|
|
160
160
|
"bundle.cta.add_more": "Ajoutez encore {{count}} {{productWord}}",
|
|
161
161
|
"bundle.powered_by": "propulse par",
|
|
162
162
|
"bundle.button.default": "Creer un bundle"
|
|
163
|
-
},
|
|
164
|
-
...
|
|
163
|
+
}, nn = {
|
|
164
|
+
..._t,
|
|
165
165
|
"bundle.title.default": "Bundle erstellen",
|
|
166
166
|
"bundle.loading": "Wird geladen...",
|
|
167
|
-
"bundle.
|
|
167
|
+
"bundle.empty": "Ihre ausgewahlten bundelbaren Produkte werden hier angezeigt",
|
|
168
168
|
"bundle.drawer.aria": "Bundle-Builder",
|
|
169
169
|
"bundle.search": "Suchen",
|
|
170
170
|
"bundle.search.expanded": "Suche (erweitert)",
|
|
@@ -188,11 +188,11 @@ const ft = {
|
|
|
188
188
|
"bundle.cta.add_more": "Fuge noch {{count}} {{productWord}} hinzu",
|
|
189
189
|
"bundle.powered_by": "powered by",
|
|
190
190
|
"bundle.button.default": "Bundle erstellen"
|
|
191
|
-
},
|
|
192
|
-
...
|
|
191
|
+
}, an = {
|
|
192
|
+
..._t,
|
|
193
193
|
"bundle.title.default": "Crea tu bundle",
|
|
194
194
|
"bundle.loading": "Cargando...",
|
|
195
|
-
"bundle.
|
|
195
|
+
"bundle.empty": "Tus productos elegibles seleccionados para el bundle se mostraran aqui",
|
|
196
196
|
"bundle.drawer.aria": "Constructor de bundles",
|
|
197
197
|
"bundle.search": "Buscar",
|
|
198
198
|
"bundle.search.expanded": "Buscar (expandido)",
|
|
@@ -216,50 +216,50 @@ const ft = {
|
|
|
216
216
|
"bundle.cta.add_more": "Agrega {{count}} {{productWord}} mas",
|
|
217
217
|
"bundle.powered_by": "impulsado por",
|
|
218
218
|
"bundle.button.default": "Crear bundle"
|
|
219
|
-
},
|
|
220
|
-
en:
|
|
221
|
-
fr:
|
|
222
|
-
de:
|
|
223
|
-
es:
|
|
219
|
+
}, rn = {
|
|
220
|
+
en: _t,
|
|
221
|
+
fr: tn,
|
|
222
|
+
de: nn,
|
|
223
|
+
es: an
|
|
224
224
|
};
|
|
225
|
-
function
|
|
225
|
+
function on(n) {
|
|
226
226
|
const e = String(n ?? "").trim().toLowerCase();
|
|
227
227
|
if (!e) return "en";
|
|
228
228
|
const t = e.split("-")[0] ?? "en";
|
|
229
229
|
return t === "fr" || t === "de" || t === "en" || t === "es" ? t : "en";
|
|
230
230
|
}
|
|
231
|
-
function
|
|
232
|
-
var
|
|
233
|
-
const
|
|
234
|
-
return t ? Object.entries(t).reduce((h, [u,
|
|
231
|
+
function sn(n, e, t, i) {
|
|
232
|
+
var a;
|
|
233
|
+
const r = (i == null ? void 0 : i[e]) ?? ((a = rn[n]) == null ? void 0 : a[e]) ?? _t[e] ?? e;
|
|
234
|
+
return t ? Object.entries(t).reduce((h, [u, S]) => h.replaceAll(`{{${u}}}`, String(S)), r) : r;
|
|
235
235
|
}
|
|
236
|
-
function
|
|
237
|
-
const
|
|
238
|
-
if (!Number.isFinite(
|
|
236
|
+
function ft(n, e, t) {
|
|
237
|
+
const i = Number(n);
|
|
238
|
+
if (!Number.isFinite(i)) return String(n);
|
|
239
239
|
if (e)
|
|
240
240
|
try {
|
|
241
|
-
return new Intl.NumberFormat(t || void 0, { style: "currency", currency: e }).format(
|
|
241
|
+
return new Intl.NumberFormat(t || void 0, { style: "currency", currency: e }).format(i);
|
|
242
242
|
} catch {
|
|
243
243
|
}
|
|
244
|
-
return `$${
|
|
244
|
+
return `$${i.toFixed(2)}`;
|
|
245
245
|
}
|
|
246
|
-
function
|
|
246
|
+
function ut(n, e) {
|
|
247
247
|
const t = e === 1 ? "one" : "many";
|
|
248
248
|
return n === "fr" ? t === "one" ? "produit" : "produits" : n === "de" ? t === "one" ? "Produkt" : "Produkte" : n === "es" ? t === "one" ? "producto" : "productos" : t === "one" ? "product" : "products";
|
|
249
249
|
}
|
|
250
|
-
const
|
|
251
|
-
function
|
|
250
|
+
const Qt = Kt(null), dt = "#best-bundles", ln = [];
|
|
251
|
+
function Ge(n) {
|
|
252
252
|
const e = String(n ?? "").trim().toLowerCase();
|
|
253
253
|
return e && e.replace(/[^a-z0-9-]+/g, "-").replace(/^-+/, "").replace(/-+$/, "").replace(/-{2,}/g, "-") || "default";
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function Et(n) {
|
|
256
256
|
const e = String(n ?? "").trim().toLowerCase();
|
|
257
|
-
if (!e.startsWith(
|
|
258
|
-
if (e ===
|
|
259
|
-
const t = `${
|
|
260
|
-
return e.startsWith(t) ?
|
|
257
|
+
if (!e.startsWith(dt)) return null;
|
|
258
|
+
if (e === dt) return "default";
|
|
259
|
+
const t = `${dt}:`;
|
|
260
|
+
return e.startsWith(t) ? Ge(e.slice(t.length)) : null;
|
|
261
261
|
}
|
|
262
|
-
const
|
|
262
|
+
const cn = {
|
|
263
263
|
primaryColor: "--bb-cta-bg",
|
|
264
264
|
primaryHoverColor: "--bb-cta-bg-hover",
|
|
265
265
|
primaryTextColor: "--bb-cta-text",
|
|
@@ -282,47 +282,47 @@ const on = {
|
|
|
282
282
|
fontFamilyBody: "--bb-font-family-body",
|
|
283
283
|
fontFamilyTitle: "--bb-font-family-title"
|
|
284
284
|
}, Ct = "bb-google-fonts";
|
|
285
|
-
function
|
|
285
|
+
function Dt(n) {
|
|
286
286
|
const e = (n ?? "").trim().replace(/^["']|["']$/g, "");
|
|
287
287
|
return e ? encodeURIComponent(e).replace(/%20/g, "+") : "";
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function un(n) {
|
|
290
290
|
var u;
|
|
291
291
|
if (typeof document > "u" || !document.head) return;
|
|
292
292
|
if (!n) {
|
|
293
293
|
(u = document.getElementById(Ct)) == null || u.remove();
|
|
294
294
|
return;
|
|
295
295
|
}
|
|
296
|
-
const e = (n.fontFamilyBody ?? "").trim().replace(/^["']|["']$/g, ""), t = (n.fontFamilyTitle ?? "").trim().replace(/^["']|["']$/g, ""),
|
|
297
|
-
e &&
|
|
298
|
-
const
|
|
299
|
-
if (
|
|
300
|
-
|
|
296
|
+
const e = (n.fontFamilyBody ?? "").trim().replace(/^["']|["']$/g, ""), t = (n.fontFamilyTitle ?? "").trim().replace(/^["']|["']$/g, ""), i = [];
|
|
297
|
+
e && i.push("family=" + Dt(e)), t && t !== e && i.push("family=" + Dt(t));
|
|
298
|
+
const r = document.getElementById(Ct);
|
|
299
|
+
if (i.length === 0) {
|
|
300
|
+
r == null || r.remove();
|
|
301
301
|
return;
|
|
302
302
|
}
|
|
303
|
-
const
|
|
304
|
-
if (
|
|
305
|
-
|
|
303
|
+
const a = `https://fonts.googleapis.com/css2?${i.join("&")}&display=swap`;
|
|
304
|
+
if (r) {
|
|
305
|
+
r.getAttribute("href") !== a && r.setAttribute("href", a);
|
|
306
306
|
return;
|
|
307
307
|
}
|
|
308
308
|
const h = document.createElement("link");
|
|
309
|
-
h.id = Ct, h.rel = "stylesheet", h.href =
|
|
309
|
+
h.id = Ct, h.rel = "stylesheet", h.href = a, document.head.appendChild(h);
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function qt(n) {
|
|
312
312
|
if (!n) return;
|
|
313
|
-
|
|
313
|
+
un(n);
|
|
314
314
|
const e = document.documentElement;
|
|
315
|
-
Object.entries(
|
|
316
|
-
let
|
|
317
|
-
|
|
315
|
+
Object.entries(cn).forEach(([t, i]) => {
|
|
316
|
+
let r = n[t];
|
|
317
|
+
r && ((t === "fontFamilyBody" || t === "fontFamilyTitle") && /^\s*\S+\s+\S/.test(r) && !/^["']/.test(r.trim()) && (r = `"${r.trim().replace(/^["']|["']$/g, "")}"`), e.style.setProperty(i, r));
|
|
318
318
|
});
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function $t(n) {
|
|
321
321
|
if (typeof window > "u") return n;
|
|
322
322
|
const e = window.__BUNDLE_PREVIEW_STYLES__;
|
|
323
323
|
return e && typeof e == "object" ? e : n;
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function dn() {
|
|
326
326
|
try {
|
|
327
327
|
const n = globalThis.crypto;
|
|
328
328
|
if (n != null && n.randomUUID) return n.randomUUID();
|
|
@@ -330,711 +330,715 @@ function ln() {
|
|
|
330
330
|
}
|
|
331
331
|
return `bb_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
|
|
332
332
|
}
|
|
333
|
-
function
|
|
333
|
+
function xt(n) {
|
|
334
334
|
return Number.isFinite(n) ? Math.max(0, Math.floor(n)) : 0;
|
|
335
335
|
}
|
|
336
|
-
function
|
|
337
|
-
const t =
|
|
336
|
+
function Bt(n, e) {
|
|
337
|
+
const t = xt(n);
|
|
338
338
|
return Number.isFinite(e) ? Math.min(t, Math.max(0, Math.floor(e))) : t;
|
|
339
339
|
}
|
|
340
|
-
function
|
|
340
|
+
function hn(n, e) {
|
|
341
341
|
return !n && !e;
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function Wi(n) {
|
|
344
344
|
const {
|
|
345
345
|
apiBaseUrl: e,
|
|
346
346
|
shop: t,
|
|
347
|
-
cartAdapter:
|
|
348
|
-
configHandle:
|
|
349
|
-
initialData:
|
|
347
|
+
cartAdapter: i,
|
|
348
|
+
configHandle: r = "default",
|
|
349
|
+
initialData: a,
|
|
350
350
|
configFetcher: h,
|
|
351
351
|
activeConfigsFetcher: u,
|
|
352
|
-
configStatusFetcher:
|
|
353
|
-
analyticsEndpoint:
|
|
354
|
-
allowDrawerWhenInactive:
|
|
355
|
-
locale:
|
|
356
|
-
messages:
|
|
357
|
-
children:
|
|
358
|
-
} = n,
|
|
359
|
-
!
|
|
360
|
-
), [
|
|
352
|
+
configStatusFetcher: S,
|
|
353
|
+
analyticsEndpoint: ce,
|
|
354
|
+
allowDrawerWhenInactive: q = !1,
|
|
355
|
+
locale: $,
|
|
356
|
+
messages: me,
|
|
357
|
+
children: M
|
|
358
|
+
} = n, ie = on($), F = re((o, l) => sn(ie, o, l, me), [ie, me]), K = Ge(r), g = ce ?? `${e}/api/public/bundle-analytics`, j = hn(q, a), [N, se] = W(!1), [L, O] = W(!1), [X, Z] = W(null), [V, ne] = W(!1), [ue, xe] = W({}), [de, Be] = W(K), [ge, Ee] = W(() => a ? { [K]: a } : {}), [Ne, Pe] = W(j), [ke, De] = W(
|
|
359
|
+
!j && !a ? K : null
|
|
360
|
+
), [at, We] = W(null), [je, Me] = W(null), [Ke, Te] = W(
|
|
361
361
|
() => ({ selections: {}, order: [] })
|
|
362
|
-
),
|
|
363
|
-
if (typeof
|
|
364
|
-
const o = await
|
|
365
|
-
return Object.entries(o ?? {}).reduce((
|
|
366
|
-
const y =
|
|
367
|
-
return y > 0 && (
|
|
362
|
+
), qe = Y(null), Ie = Y(null), f = Y(null), _ = Y(0), x = Y(de), R = Y(ge), A = Y(Ne), U = Y(null), Q = h ?? Jt, ae = u ?? Zt, le = S ?? en, J = re(async () => {
|
|
363
|
+
if (typeof i.getLineQuantitiesByMerchandiseId != "function") return null;
|
|
364
|
+
const o = await i.getLineQuantitiesByMerchandiseId();
|
|
365
|
+
return Object.entries(o ?? {}).reduce((l, [m, w]) => {
|
|
366
|
+
const y = xt(w);
|
|
367
|
+
return y > 0 && (l[m] = y), l;
|
|
368
368
|
}, {});
|
|
369
|
-
}, [
|
|
370
|
-
const o = ++
|
|
371
|
-
|
|
369
|
+
}, [i]), z = re(async () => {
|
|
370
|
+
const o = ++_.current;
|
|
371
|
+
ne(!0);
|
|
372
372
|
try {
|
|
373
|
-
const
|
|
374
|
-
return
|
|
373
|
+
const l = await J();
|
|
374
|
+
return l && o === _.current && xe(l), l;
|
|
375
375
|
} catch {
|
|
376
376
|
return null;
|
|
377
377
|
} finally {
|
|
378
|
-
o ===
|
|
378
|
+
o === _.current && ne(!1);
|
|
379
379
|
}
|
|
380
|
-
}, [
|
|
381
|
-
|
|
382
|
-
x.current =
|
|
383
|
-
}, [
|
|
384
|
-
|
|
385
|
-
}, [
|
|
386
|
-
|
|
387
|
-
}, [
|
|
388
|
-
|
|
389
|
-
}, [
|
|
390
|
-
const
|
|
391
|
-
|
|
392
|
-
}, []),
|
|
380
|
+
}, [J]);
|
|
381
|
+
D(() => {
|
|
382
|
+
x.current = de;
|
|
383
|
+
}, [de]), D(() => {
|
|
384
|
+
R.current = ge;
|
|
385
|
+
}, [ge]), D(() => {
|
|
386
|
+
A.current = Ne;
|
|
387
|
+
}, [Ne]), D(() => {
|
|
388
|
+
z();
|
|
389
|
+
}, [z]);
|
|
390
|
+
const H = re((o) => {
|
|
391
|
+
Be(Ge(o));
|
|
392
|
+
}, []), Le = re(() => {
|
|
393
393
|
if (g)
|
|
394
394
|
try {
|
|
395
|
-
const o =
|
|
396
|
-
|
|
395
|
+
const o = yt();
|
|
396
|
+
ct(g, t, {
|
|
397
397
|
eventType: "DRAWER_CLOSED",
|
|
398
398
|
shop: t,
|
|
399
399
|
anonymousUserId: o,
|
|
400
400
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
401
401
|
mixpanelEvent: "bundle_closed"
|
|
402
|
-
}).catch((
|
|
403
|
-
console.warn("[Bundle Analytics] Failed to track drawer closed:",
|
|
402
|
+
}).catch((l) => {
|
|
403
|
+
console.warn("[Bundle Analytics] Failed to track drawer closed:", l);
|
|
404
404
|
});
|
|
405
405
|
} catch (o) {
|
|
406
406
|
console.warn("[Bundle Analytics] Error in close() callback:", o);
|
|
407
407
|
}
|
|
408
|
-
|
|
409
|
-
}, [g, t]),
|
|
410
|
-
|
|
408
|
+
se(!1), typeof window < "u" && window.location.hash.toLowerCase().startsWith(dt) && window.history.replaceState(null, "", window.location.pathname + window.location.search);
|
|
409
|
+
}, [g, t]), Fe = re(() => {
|
|
410
|
+
se((o) => {
|
|
411
411
|
if (o) return o;
|
|
412
412
|
if (g)
|
|
413
413
|
try {
|
|
414
|
-
const
|
|
415
|
-
|
|
414
|
+
const l = yt();
|
|
415
|
+
ct(g, t, {
|
|
416
416
|
eventType: "DRAWER_OPENED",
|
|
417
417
|
shop: t,
|
|
418
|
-
anonymousUserId:
|
|
418
|
+
anonymousUserId: l,
|
|
419
419
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
420
420
|
mixpanelEvent: "bundle_opened"
|
|
421
|
-
}).catch((
|
|
422
|
-
console.warn("[Bundle Analytics] Failed to track drawer opened:",
|
|
421
|
+
}).catch((m) => {
|
|
422
|
+
console.warn("[Bundle Analytics] Failed to track drawer opened:", m);
|
|
423
423
|
});
|
|
424
|
-
} catch (
|
|
425
|
-
console.warn("[Bundle Analytics] Error in open() callback:",
|
|
424
|
+
} catch (l) {
|
|
425
|
+
console.warn("[Bundle Analytics] Error in open() callback:", l);
|
|
426
426
|
}
|
|
427
427
|
return !0;
|
|
428
428
|
});
|
|
429
|
-
}, [g, t]), rt =
|
|
430
|
-
if (!
|
|
431
|
-
const w = { ...
|
|
429
|
+
}, [g, t]), rt = re((o, l) => l.ok ? l.config.isActive === !1 && !q ? (Ee((m) => {
|
|
430
|
+
if (!m[o]) return m;
|
|
431
|
+
const w = { ...m };
|
|
432
432
|
return delete w[o], w;
|
|
433
|
-
}),
|
|
434
|
-
...
|
|
433
|
+
}), x.current === o && (Z(F("bundle.provider.inactive_error")), se(!1), typeof window < "u" && window.location.hash.toLowerCase().startsWith(dt) && window.history.replaceState(null, "", window.location.pathname + window.location.search)), !1) : (Ee((m) => ({
|
|
434
|
+
...m,
|
|
435
435
|
[o]: {
|
|
436
|
-
currencyCode:
|
|
437
|
-
config:
|
|
438
|
-
eligibleVariants:
|
|
436
|
+
currencyCode: l.currencyCode ?? null,
|
|
437
|
+
config: l.config,
|
|
438
|
+
eligibleVariants: l.eligibleVariants ?? []
|
|
439
439
|
}
|
|
440
|
-
})), x.current === o &&
|
|
440
|
+
})), x.current === o && Z(null), !0) : (Ee((m) => {
|
|
441
|
+
if (!m[o]) return m;
|
|
442
|
+
const w = { ...m };
|
|
443
|
+
return delete w[o], w;
|
|
444
|
+
}), !q && x.current === o && (Z(l.ok ? F("bundle.provider.inactive_error") : l.error || F("bundle.provider.load_error")), se(!1), typeof window < "u" && window.location.hash.toLowerCase().startsWith(dt) && window.history.replaceState(null, "", window.location.pathname + window.location.search)), !1), [q, F]), Oe = re((o, l) => {
|
|
441
445
|
var y;
|
|
442
|
-
const
|
|
443
|
-
(y =
|
|
446
|
+
const m = Ge(o);
|
|
447
|
+
(y = Ie.current) == null || y.abort();
|
|
444
448
|
const w = new AbortController();
|
|
445
|
-
|
|
449
|
+
Ie.current = w, l != null && l.blocking && De(m), Z(null), Q({
|
|
446
450
|
apiBaseUrl: e,
|
|
447
451
|
shop: t,
|
|
448
|
-
configHandle:
|
|
449
|
-
fresh: (
|
|
452
|
+
configHandle: m,
|
|
453
|
+
fresh: (l == null ? void 0 : l.blocking) === !0 && !R.current[m],
|
|
450
454
|
signal: w.signal
|
|
451
|
-
}).then((
|
|
452
|
-
w.signal.aborted || rt(
|
|
453
|
-
}).catch((
|
|
455
|
+
}).then((I) => {
|
|
456
|
+
w.signal.aborted || rt(m, I);
|
|
457
|
+
}).catch((I) => {
|
|
454
458
|
if (w.signal.aborted) return;
|
|
455
|
-
const
|
|
456
|
-
x.current ===
|
|
459
|
+
const B = I instanceof Error ? I.message : F("bundle.provider.load_error");
|
|
460
|
+
x.current === m && Z(B);
|
|
457
461
|
}).finally(() => {
|
|
458
|
-
w.signal.aborted ||
|
|
462
|
+
w.signal.aborted || De((I) => I === m ? null : I);
|
|
459
463
|
});
|
|
460
|
-
}, [e, rt,
|
|
461
|
-
const
|
|
462
|
-
|
|
463
|
-
}, [
|
|
464
|
-
var
|
|
465
|
-
const
|
|
466
|
-
if (
|
|
467
|
-
Me({ handle:
|
|
464
|
+
}, [e, rt, Q, t, F]), he = re((o) => {
|
|
465
|
+
const l = Ge(o), m = R.current[l];
|
|
466
|
+
Be(l), Z(null), Oe(l, { blocking: !m });
|
|
467
|
+
}, [Oe]), G = re((o, l = "api") => {
|
|
468
|
+
var I, B;
|
|
469
|
+
const m = Ge(o), w = R.current[m];
|
|
470
|
+
if (j && A.current && !w) {
|
|
471
|
+
Me({ handle: m, source: l });
|
|
468
472
|
return;
|
|
469
473
|
}
|
|
470
|
-
if (
|
|
471
|
-
|
|
474
|
+
if (Be(m), q) {
|
|
475
|
+
Fe(), Oe(m, { blocking: !w });
|
|
472
476
|
return;
|
|
473
477
|
}
|
|
474
|
-
if ((
|
|
475
|
-
|
|
478
|
+
if ((I = w == null ? void 0 : w.config) != null && I.isActive) {
|
|
479
|
+
Z(null), Fe(), Oe(m, { blocking: !1 });
|
|
476
480
|
return;
|
|
477
481
|
}
|
|
478
|
-
We(
|
|
482
|
+
We(m), (B = f.current) == null || B.abort();
|
|
479
483
|
const y = new AbortController();
|
|
480
|
-
f.current = y,
|
|
484
|
+
f.current = y, le({
|
|
481
485
|
apiBaseUrl: e,
|
|
482
486
|
shop: t,
|
|
483
|
-
configHandle:
|
|
487
|
+
configHandle: m,
|
|
484
488
|
signal: y.signal
|
|
485
|
-
}).then((
|
|
489
|
+
}).then((E) => {
|
|
486
490
|
if (!y.signal.aborted) {
|
|
487
|
-
if (We((
|
|
488
|
-
|
|
491
|
+
if (We((ee) => ee === m ? null : ee), !E.ok || E.isActive !== !0) {
|
|
492
|
+
l === "hash" && typeof window < "u" && Et(window.location.hash) === m && window.history.replaceState(null, "", window.location.pathname + window.location.search);
|
|
489
493
|
return;
|
|
490
494
|
}
|
|
491
|
-
|
|
495
|
+
Z(null), Be(m), Fe(), Oe(m, { blocking: !0 });
|
|
492
496
|
}
|
|
493
497
|
}).catch(() => {
|
|
494
|
-
y.signal.aborted || We((
|
|
498
|
+
y.signal.aborted || We((E) => E === m ? null : E);
|
|
495
499
|
});
|
|
496
500
|
}, [
|
|
497
|
-
|
|
501
|
+
q,
|
|
498
502
|
e,
|
|
499
|
-
Pe,
|
|
500
503
|
Fe,
|
|
504
|
+
Oe,
|
|
501
505
|
t,
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
]),
|
|
505
|
-
|
|
506
|
-
}, [
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
}, [
|
|
510
|
-
const
|
|
511
|
-
if (
|
|
512
|
-
|
|
506
|
+
le,
|
|
507
|
+
j
|
|
508
|
+
]), it = re(() => {
|
|
509
|
+
z(), G(x.current, "api");
|
|
510
|
+
}, [G, z]);
|
|
511
|
+
D(() => {
|
|
512
|
+
U.current = G;
|
|
513
|
+
}, [G]);
|
|
514
|
+
const Ae = re(() => {
|
|
515
|
+
if (N) {
|
|
516
|
+
Le();
|
|
513
517
|
return;
|
|
514
518
|
}
|
|
515
|
-
|
|
516
|
-
}, [
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
}, [
|
|
520
|
-
var
|
|
521
|
-
if (!
|
|
522
|
-
|
|
519
|
+
z(), G(x.current, "api");
|
|
520
|
+
}, [Le, N, G, z]);
|
|
521
|
+
D(() => {
|
|
522
|
+
Be(Ge(r));
|
|
523
|
+
}, [r]), D(() => {
|
|
524
|
+
var l;
|
|
525
|
+
if (!j) {
|
|
526
|
+
Pe(!1), a || Oe(K, { blocking: !0 });
|
|
523
527
|
return;
|
|
524
528
|
}
|
|
525
|
-
(
|
|
529
|
+
(l = qe.current) == null || l.abort();
|
|
526
530
|
const o = new AbortController();
|
|
527
|
-
return
|
|
528
|
-
o.signal.aborted ||
|
|
531
|
+
return qe.current = o, Pe(!0), ae({ apiBaseUrl: e, shop: t, signal: o.signal }).then((m) => {
|
|
532
|
+
o.signal.aborted || m.ok && Ee((w) => {
|
|
529
533
|
const y = { ...w };
|
|
530
|
-
for (const [
|
|
531
|
-
y[
|
|
532
|
-
currencyCode:
|
|
533
|
-
config:
|
|
534
|
-
eligibleVariants:
|
|
534
|
+
for (const [I, B] of Object.entries(m.configs ?? {}))
|
|
535
|
+
y[Ge(I)] = {
|
|
536
|
+
currencyCode: B.currencyCode ?? null,
|
|
537
|
+
config: B.config,
|
|
538
|
+
eligibleVariants: B.eligibleVariants ?? []
|
|
535
539
|
};
|
|
536
540
|
return y;
|
|
537
541
|
});
|
|
538
542
|
}).catch(() => {
|
|
539
543
|
}).finally(() => {
|
|
540
|
-
o.signal.aborted ||
|
|
544
|
+
o.signal.aborted || Pe(!1);
|
|
541
545
|
}), () => o.abort();
|
|
542
|
-
}, [
|
|
543
|
-
|
|
544
|
-
}, [
|
|
546
|
+
}, [ae, e, a, K, Oe, t, j]), D(() => {
|
|
547
|
+
Ne || !je || (G(je.handle, je.source), Me(null));
|
|
548
|
+
}, [Ne, G, je]), D(() => {
|
|
545
549
|
if (typeof window > "u") return;
|
|
546
550
|
const o = () => {
|
|
547
|
-
var
|
|
548
|
-
const
|
|
549
|
-
|
|
551
|
+
var m;
|
|
552
|
+
const l = Et(window.location.hash);
|
|
553
|
+
l && ((m = U.current) == null || m.call(U, l, "hash"));
|
|
550
554
|
};
|
|
551
555
|
return o(), window.addEventListener("hashchange", o), () => window.removeEventListener("hashchange", o);
|
|
552
556
|
}, []);
|
|
553
|
-
const
|
|
554
|
-
|
|
555
|
-
const o =
|
|
556
|
-
o &&
|
|
557
|
-
}, [
|
|
557
|
+
const Se = ge[de] ?? null, C = (Se == null ? void 0 : Se.config) ?? null, be = (Se == null ? void 0 : Se.eligibleVariants) ?? ln, Ue = (Se == null ? void 0 : Se.currencyCode) ?? null, Ce = !C && (ke === de || at === de) || q && !C && ke != null;
|
|
558
|
+
D(() => {
|
|
559
|
+
const o = $t(C == null ? void 0 : C.styleSettings);
|
|
560
|
+
o && qt(o);
|
|
561
|
+
}, [C == null ? void 0 : C.styleSettings]), D(() => {
|
|
558
562
|
if (typeof window > "u") return;
|
|
559
563
|
const o = () => {
|
|
560
|
-
const
|
|
561
|
-
|
|
564
|
+
const l = $t(void 0);
|
|
565
|
+
l && qt(l);
|
|
562
566
|
};
|
|
563
567
|
return window.addEventListener("bundle-preview-styles-updated", o), () => window.removeEventListener("bundle-preview-styles-updated", o);
|
|
564
|
-
}, []),
|
|
568
|
+
}, []), D(() => {
|
|
565
569
|
if (typeof window > "u") return;
|
|
566
|
-
const o = window,
|
|
567
|
-
const
|
|
568
|
-
if (!
|
|
569
|
-
const w = o.__BUNDLE_PREVIEW_ELIGIBLE_VARIANTS__
|
|
570
|
-
|
|
571
|
-
var
|
|
570
|
+
const o = window, l = () => {
|
|
571
|
+
const m = o.__BUNDLE_PREVIEW_CONFIG__;
|
|
572
|
+
if (!m) return;
|
|
573
|
+
const w = Array.isArray(o.__BUNDLE_PREVIEW_ELIGIBLE_VARIANTS__) ? o.__BUNDLE_PREVIEW_ELIGIBLE_VARIANTS__ : [], y = o.__BUNDLE_PREVIEW_VARIANTS_LOADING__ === !0;
|
|
574
|
+
Ee((I) => {
|
|
575
|
+
var B;
|
|
572
576
|
return {
|
|
573
|
-
...
|
|
577
|
+
...I,
|
|
574
578
|
[x.current]: {
|
|
575
|
-
currencyCode:
|
|
576
|
-
config:
|
|
577
|
-
eligibleVariants:
|
|
579
|
+
currencyCode: Ue ?? null,
|
|
580
|
+
config: m,
|
|
581
|
+
eligibleVariants: y ? ((B = I[x.current]) == null ? void 0 : B.eligibleVariants) ?? [] : w
|
|
578
582
|
}
|
|
579
583
|
};
|
|
580
|
-
}),
|
|
584
|
+
}), De(y ? x.current : (I) => I === x.current ? null : I);
|
|
581
585
|
};
|
|
582
|
-
return o.__BUNDLE_PREVIEW_CONFIG__ &&
|
|
583
|
-
}, [
|
|
584
|
-
const
|
|
585
|
-
const o = Number((
|
|
586
|
-
return Math.max(2, Math.min(100,
|
|
587
|
-
}, [
|
|
588
|
-
|
|
589
|
-
const
|
|
590
|
-
if (!Number.isFinite(
|
|
591
|
-
const
|
|
592
|
-
return [o.id, Math.max(0, Math.floor(
|
|
586
|
+
return o.__BUNDLE_PREVIEW_CONFIG__ && l(), window.addEventListener("bundle-preview-config-updated", l), () => window.removeEventListener("bundle-preview-config-updated", l);
|
|
587
|
+
}, [Ue]);
|
|
588
|
+
const ot = P(() => {
|
|
589
|
+
const o = Number((C == null ? void 0 : C.maxBundleSize) ?? Number.NaN), l = Number.isFinite(o) ? Math.floor(o) : 100;
|
|
590
|
+
return Math.max(2, Math.min(100, l));
|
|
591
|
+
}, [C == null ? void 0 : C.maxBundleSize]), He = P(() => new Map(
|
|
592
|
+
be.map((o) => {
|
|
593
|
+
const l = St(o);
|
|
594
|
+
if (!Number.isFinite(l)) return [o.id, l];
|
|
595
|
+
const m = xt(ue[o.id] ?? 0);
|
|
596
|
+
return [o.id, Math.max(0, Math.floor(l) - m)];
|
|
593
597
|
})
|
|
594
|
-
), [
|
|
595
|
-
|
|
596
|
-
), [
|
|
597
|
-
const o = (
|
|
598
|
-
return y == null ?
|
|
599
|
-
}, [
|
|
600
|
-
if (
|
|
598
|
+
), [be, ue]), Qe = P(() => new Set(
|
|
599
|
+
be.filter((o) => St(o) > 0).map((o) => o.id)
|
|
600
|
+
), [be]), Re = P(() => {
|
|
601
|
+
const o = (C == null ? void 0 : C.rules) ?? [], l = o.length ? Math.min(...o.map((I) => I.minBundleSize)) : 2, m = Number.isFinite(l) && l > 0 ? l : 2, w = Number((C == null ? void 0 : C.minBundleSize) ?? Number.NaN), y = Number.isFinite(w) && Number.isInteger(w) ? Math.max(2, Math.min(100, w)) : null;
|
|
602
|
+
return y == null ? m : Math.min(m, y);
|
|
603
|
+
}, [C == null ? void 0 : C.minBundleSize, C == null ? void 0 : C.rules]), ht = re((o, l) => {
|
|
604
|
+
if (V || !Qe.has(o) && !Ce)
|
|
601
605
|
return;
|
|
602
|
-
const
|
|
603
|
-
|
|
604
|
-
const
|
|
605
|
-
|
|
606
|
-
Math.max(0,
|
|
607
|
-
|
|
608
|
-
) :
|
|
609
|
-
let
|
|
610
|
-
if (
|
|
611
|
-
const
|
|
612
|
-
delete
|
|
613
|
-
} else
|
|
614
|
-
let
|
|
615
|
-
if (
|
|
616
|
-
|
|
617
|
-
else if (
|
|
618
|
-
let
|
|
619
|
-
const
|
|
620
|
-
for (let
|
|
621
|
-
const
|
|
622
|
-
if (
|
|
623
|
-
|
|
606
|
+
const m = He.get(o) ?? (Ce ? Number.POSITIVE_INFINITY : 0), w = Bt(l, m);
|
|
607
|
+
Te((y) => {
|
|
608
|
+
const I = y.selections[o] ?? 0, B = w - I, E = Object.values(y.selections).reduce((ye, _e) => ye + (_e || 0), 0), ee = Number.isFinite(m) ? Math.max(0, Math.floor(m) - I) : B, te = B > 0 ? Math.min(
|
|
609
|
+
B,
|
|
610
|
+
Math.max(0, ot - E),
|
|
611
|
+
ee
|
|
612
|
+
) : B, pe = I + te;
|
|
613
|
+
let we;
|
|
614
|
+
if (pe <= 0) {
|
|
615
|
+
const ye = { ...y.selections };
|
|
616
|
+
delete ye[o], we = ye;
|
|
617
|
+
} else I === pe ? we = y.selections : we = { ...y.selections, [o]: pe };
|
|
618
|
+
let ze = y.order;
|
|
619
|
+
if (te > 0)
|
|
620
|
+
ze = [...y.order, ...Array.from({ length: te }, () => o)];
|
|
621
|
+
else if (te < 0) {
|
|
622
|
+
let ye = -te;
|
|
623
|
+
const _e = [];
|
|
624
|
+
for (let lt = y.order.length - 1; lt >= 0; lt--) {
|
|
625
|
+
const k = y.order[lt];
|
|
626
|
+
if (k === o && ye > 0) {
|
|
627
|
+
ye--;
|
|
624
628
|
continue;
|
|
625
629
|
}
|
|
626
|
-
|
|
630
|
+
_e.push(k);
|
|
627
631
|
}
|
|
628
|
-
|
|
632
|
+
_e.reverse(), ze = _e;
|
|
629
633
|
}
|
|
630
|
-
if (
|
|
631
|
-
const
|
|
634
|
+
if (we === y.selections && ze === y.order) return y;
|
|
635
|
+
const et = E, tt = Object.values(we).reduce((ye, _e) => ye + (_e || 0), 0);
|
|
632
636
|
if (g)
|
|
633
637
|
try {
|
|
634
|
-
const
|
|
638
|
+
const ye = yt(), _e = {
|
|
635
639
|
eventType: "VARIANT_SELECTION_CHANGED",
|
|
636
640
|
shop: t,
|
|
637
|
-
anonymousUserId:
|
|
641
|
+
anonymousUserId: ye,
|
|
638
642
|
before: { ...y.selections },
|
|
639
|
-
after: { ...
|
|
643
|
+
after: { ...we },
|
|
640
644
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
641
645
|
};
|
|
642
|
-
|
|
643
|
-
...
|
|
646
|
+
ct(g, t, _e), et === 0 && tt >= 1 && ct(g, t, {
|
|
647
|
+
..._e,
|
|
644
648
|
mixpanelEvent: "bundle_started"
|
|
645
|
-
}),
|
|
646
|
-
...
|
|
649
|
+
}), et < Re && tt >= Re && ct(g, t, {
|
|
650
|
+
..._e,
|
|
647
651
|
mixpanelEvent: "bundle_completed"
|
|
648
652
|
});
|
|
649
653
|
} catch {
|
|
650
654
|
}
|
|
651
|
-
return { selections:
|
|
655
|
+
return { selections: we, order: ze };
|
|
652
656
|
});
|
|
653
|
-
}, [g,
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
const
|
|
657
|
-
if (!
|
|
658
|
-
const
|
|
659
|
-
return
|
|
660
|
-
}).filter(Boolean),
|
|
661
|
-
const
|
|
662
|
-
return
|
|
657
|
+
}, [g, V, Qe, Ce, ot, Re, t, He]);
|
|
658
|
+
D(() => {
|
|
659
|
+
Ce || Te((o) => {
|
|
660
|
+
const l = Object.entries(o.selections).map(([I, B]) => {
|
|
661
|
+
if (!Qe.has(I)) return null;
|
|
662
|
+
const E = He.get(I) ?? 0, ee = Bt(B, E);
|
|
663
|
+
return ee <= 0 ? null : [I, ee];
|
|
664
|
+
}).filter(Boolean), m = Object.fromEntries(l), w = new Map(l), y = o.order.filter((I) => {
|
|
665
|
+
const B = w.get(I) ?? 0;
|
|
666
|
+
return B <= 0 ? !1 : (w.set(I, B - 1), !0);
|
|
663
667
|
});
|
|
664
|
-
return y.length === o.order.length &&
|
|
668
|
+
return y.length === o.order.length && l.length === Object.keys(o.selections).length && l.every(([I, B]) => o.selections[I] === B) ? o : { selections: m, order: y };
|
|
665
669
|
});
|
|
666
|
-
}, [
|
|
667
|
-
|
|
668
|
-
}, [
|
|
669
|
-
const
|
|
670
|
-
await
|
|
671
|
-
}, [
|
|
672
|
-
const
|
|
673
|
-
return
|
|
674
|
-
}, [
|
|
675
|
-
var
|
|
676
|
-
if (!
|
|
677
|
-
const
|
|
678
|
-
|
|
679
|
-
const
|
|
680
|
-
if (!Number.isFinite(
|
|
681
|
-
const
|
|
682
|
-
return [
|
|
670
|
+
}, [Qe, Ce, He]), D(() => {
|
|
671
|
+
Te({ selections: {}, order: [] });
|
|
672
|
+
}, [de]);
|
|
673
|
+
const Xe = re(() => Te({ selections: {}, order: [] }), []), st = re(async () => {
|
|
674
|
+
await z();
|
|
675
|
+
}, [z]), mt = re((o) => {
|
|
676
|
+
const l = He.get(o);
|
|
677
|
+
return l == null || !Number.isFinite(l) ? null : Math.max(0, Math.floor(l));
|
|
678
|
+
}, [He]), $e = Ke.selections, bt = Ke.order, Ve = P(() => Object.values($e).reduce((o, l) => o + (l || 0), 0), [$e]), Ze = P(() => !(Ce || V || L || X || !(C != null && C.isActive) || Ve < Re), [Ve, V, C == null ? void 0 : C.isActive, X, Ce, Re, L]), Je = re(async (o) => {
|
|
679
|
+
var _e, lt;
|
|
680
|
+
if (!Ze || !C) return;
|
|
681
|
+
const l = dn(), m = (C.title ?? "").trim().slice(0, 255), w = await z(), y = new Map(
|
|
682
|
+
be.map((k) => {
|
|
683
|
+
const fe = St(k);
|
|
684
|
+
if (!Number.isFinite(fe)) return [k.id, fe];
|
|
685
|
+
const nt = xt((w ?? ue)[k.id] ?? 0);
|
|
686
|
+
return [k.id, Math.max(0, Math.floor(fe) - nt)];
|
|
683
687
|
})
|
|
684
|
-
),
|
|
685
|
-
merchandiseId:
|
|
686
|
-
quantity:
|
|
687
|
-
})).filter((
|
|
688
|
-
merchandiseId:
|
|
689
|
-
quantity:
|
|
688
|
+
), I = Object.entries($e).map(([k, fe]) => ({
|
|
689
|
+
merchandiseId: k,
|
|
690
|
+
quantity: Bt(fe, y.get(k) ?? 0)
|
|
691
|
+
})).filter((k) => k.quantity > 0).filter((k) => Qe.has(k.merchandiseId)).map((k) => ({
|
|
692
|
+
merchandiseId: k.merchandiseId,
|
|
693
|
+
quantity: k.quantity,
|
|
690
694
|
attributes: [
|
|
691
|
-
{ key:
|
|
692
|
-
{ key:
|
|
693
|
-
{ key:
|
|
694
|
-
...
|
|
695
|
+
{ key: wt.bundleId, value: l },
|
|
696
|
+
{ key: wt.bundleConfig, value: de },
|
|
697
|
+
{ key: wt.bundleSource, value: "bundle_builder" },
|
|
698
|
+
...m ? [{ key: wt.bundleTitle, value: m }] : []
|
|
695
699
|
]
|
|
696
700
|
}));
|
|
697
|
-
if (!
|
|
698
|
-
const
|
|
699
|
-
let
|
|
700
|
-
for (const
|
|
701
|
-
const
|
|
702
|
-
if (
|
|
703
|
-
const
|
|
704
|
-
Number.isFinite(
|
|
701
|
+
if (!I.length) return;
|
|
702
|
+
const B = new Map(be.map((k) => [k.id, k]));
|
|
703
|
+
let E = 0;
|
|
704
|
+
for (const k of I) {
|
|
705
|
+
const fe = k.quantity ?? 0;
|
|
706
|
+
if (fe <= 0) continue;
|
|
707
|
+
const nt = B.get(k.merchandiseId), Ot = Number(nt == null ? void 0 : nt.price);
|
|
708
|
+
Number.isFinite(Ot) && (E += Ot * fe);
|
|
705
709
|
}
|
|
706
|
-
|
|
707
|
-
const
|
|
708
|
-
let
|
|
709
|
-
for (const
|
|
710
|
-
|
|
711
|
-
const
|
|
712
|
-
const
|
|
713
|
-
return Number.isFinite(
|
|
714
|
-
})() : null,
|
|
715
|
-
|
|
710
|
+
E = Math.round(E * 100) / 100;
|
|
711
|
+
const ee = [...C.rules ?? []].sort((k, fe) => k.minBundleSize - fe.minBundleSize);
|
|
712
|
+
let te = null;
|
|
713
|
+
for (const k of ee)
|
|
714
|
+
Ve >= k.minBundleSize && (te = k);
|
|
715
|
+
const pe = te ? (() => {
|
|
716
|
+
const k = Number.parseFloat(te.discountPercent);
|
|
717
|
+
return Number.isFinite(k) && k > 0 ? k : null;
|
|
718
|
+
})() : null, we = pe ? Math.round(E * (1 - pe / 100) * 100) / 100 : E, ze = E - we, et = I.map((k) => k.merchandiseId), tt = (te == null ? void 0 : te.handle) ?? "", ye = ((_e = te == null ? void 0 : te.label) == null ? void 0 : _e.trim()) || "";
|
|
719
|
+
O(!0);
|
|
716
720
|
try {
|
|
717
|
-
if (o != null && o.checkout ? await
|
|
721
|
+
if (o != null && o.checkout ? await i.linesAddForCheckout(I) : await i.linesAdd(I), g)
|
|
718
722
|
try {
|
|
719
|
-
const
|
|
720
|
-
|
|
723
|
+
const k = yt(), fe = !!(o != null && o.checkout);
|
|
724
|
+
ct(g, t, {
|
|
721
725
|
eventType: "BUNDLE_ADDED_TO_BASKET",
|
|
722
726
|
shop: t,
|
|
723
|
-
anonymousUserId:
|
|
724
|
-
bundleId:
|
|
725
|
-
productVariantIds:
|
|
726
|
-
grossPrice:
|
|
727
|
-
discountedPrice:
|
|
728
|
-
currency:
|
|
729
|
-
discountThresholdIdentifier:
|
|
730
|
-
discountLabel:
|
|
731
|
-
discountPercentage:
|
|
732
|
-
discountedAmount:
|
|
727
|
+
anonymousUserId: k,
|
|
728
|
+
bundleId: l,
|
|
729
|
+
productVariantIds: et,
|
|
730
|
+
grossPrice: E,
|
|
731
|
+
discountedPrice: we,
|
|
732
|
+
currency: Ue ?? void 0,
|
|
733
|
+
discountThresholdIdentifier: tt,
|
|
734
|
+
discountLabel: ye,
|
|
735
|
+
discountPercentage: pe,
|
|
736
|
+
discountedAmount: ze,
|
|
733
737
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
734
|
-
checkout:
|
|
735
|
-
mixpanelEvent:
|
|
738
|
+
checkout: fe,
|
|
739
|
+
mixpanelEvent: fe ? "checkout_started_with_bundle" : "bundle_added_to_cart"
|
|
736
740
|
});
|
|
737
741
|
} catch {
|
|
738
742
|
}
|
|
739
|
-
|
|
740
|
-
} catch (
|
|
741
|
-
const
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
),
|
|
743
|
+
Xe(), Le(), z(), (lt = o == null ? void 0 : o.onComplete) == null || lt.call(o), Z(null);
|
|
744
|
+
} catch (k) {
|
|
745
|
+
const fe = k instanceof Error ? k.message : "", nt = /stock|sold out|inventory|insufficient|available|422/i.test(fe);
|
|
746
|
+
Z(
|
|
747
|
+
F(nt ? "bundle.provider.stock_error" : "bundle.provider.add_error")
|
|
748
|
+
), z();
|
|
745
749
|
} finally {
|
|
746
|
-
|
|
750
|
+
O(!1);
|
|
747
751
|
}
|
|
748
752
|
}, [
|
|
749
753
|
g,
|
|
750
|
-
|
|
754
|
+
Ve,
|
|
755
|
+
Ze,
|
|
756
|
+
i,
|
|
751
757
|
Xe,
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
A,
|
|
762
|
-
Ee,
|
|
758
|
+
Le,
|
|
759
|
+
C,
|
|
760
|
+
Ue,
|
|
761
|
+
ue,
|
|
762
|
+
de,
|
|
763
|
+
Qe,
|
|
764
|
+
be,
|
|
765
|
+
z,
|
|
766
|
+
$e,
|
|
763
767
|
t,
|
|
764
|
-
|
|
765
|
-
]), c =
|
|
766
|
-
await
|
|
768
|
+
F
|
|
769
|
+
]), c = re(async () => {
|
|
770
|
+
await Je({
|
|
767
771
|
onComplete: () => {
|
|
768
772
|
var o;
|
|
769
|
-
(o =
|
|
773
|
+
(o = i.openCartUI) == null || o.call(i);
|
|
770
774
|
}
|
|
771
775
|
});
|
|
772
|
-
}, [
|
|
773
|
-
await
|
|
776
|
+
}, [i, Je]), d = re(async () => {
|
|
777
|
+
await Je({
|
|
774
778
|
checkout: !0,
|
|
775
779
|
onComplete: () => {
|
|
776
780
|
var o;
|
|
777
|
-
(o =
|
|
781
|
+
(o = i.navigateToCheckout) == null || o.call(i);
|
|
778
782
|
}
|
|
779
783
|
});
|
|
780
|
-
}, [
|
|
781
|
-
isOpen:
|
|
782
|
-
open:
|
|
783
|
-
openForHandle:
|
|
784
|
-
close:
|
|
785
|
-
toggle:
|
|
786
|
-
currentHandle:
|
|
787
|
-
setConfigHandle:
|
|
788
|
-
loadHandle:
|
|
789
|
-
syncCartQuantities:
|
|
790
|
-
loading:
|
|
791
|
-
submitting:
|
|
792
|
-
error:
|
|
793
|
-
currencyCode:
|
|
794
|
-
config:
|
|
795
|
-
eligibleVariants:
|
|
796
|
-
selections:
|
|
797
|
-
selectionOrder:
|
|
798
|
-
getVariantMaxSelectableQuantity:
|
|
799
|
-
setQuantity:
|
|
800
|
-
clearSelections:
|
|
801
|
-
bundleSize:
|
|
802
|
-
minRequired:
|
|
803
|
-
canSubmit:
|
|
784
|
+
}, [i, Je]), v = P(() => ({
|
|
785
|
+
isOpen: N,
|
|
786
|
+
open: it,
|
|
787
|
+
openForHandle: G,
|
|
788
|
+
close: Le,
|
|
789
|
+
toggle: Ae,
|
|
790
|
+
currentHandle: de,
|
|
791
|
+
setConfigHandle: H,
|
|
792
|
+
loadHandle: he,
|
|
793
|
+
syncCartQuantities: st,
|
|
794
|
+
loading: Ce,
|
|
795
|
+
submitting: L,
|
|
796
|
+
error: X,
|
|
797
|
+
currencyCode: Ue,
|
|
798
|
+
config: C,
|
|
799
|
+
eligibleVariants: be,
|
|
800
|
+
selections: $e,
|
|
801
|
+
selectionOrder: bt,
|
|
802
|
+
getVariantMaxSelectableQuantity: mt,
|
|
803
|
+
setQuantity: ht,
|
|
804
|
+
clearSelections: Xe,
|
|
805
|
+
bundleSize: Ve,
|
|
806
|
+
minRequired: Re,
|
|
807
|
+
canSubmit: Ze,
|
|
804
808
|
submit: c,
|
|
805
809
|
submitAndCheckout: d,
|
|
806
|
-
locale:
|
|
807
|
-
t:
|
|
810
|
+
locale: ie,
|
|
811
|
+
t: F
|
|
808
812
|
}), [
|
|
809
|
-
|
|
813
|
+
Ve,
|
|
814
|
+
Ze,
|
|
810
815
|
Xe,
|
|
811
|
-
|
|
812
|
-
|
|
816
|
+
Le,
|
|
817
|
+
C,
|
|
818
|
+
Ue,
|
|
819
|
+
de,
|
|
820
|
+
be,
|
|
821
|
+
X,
|
|
813
822
|
N,
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
+
Ce,
|
|
824
|
+
Re,
|
|
825
|
+
it,
|
|
826
|
+
G,
|
|
827
|
+
bt,
|
|
828
|
+
$e,
|
|
829
|
+
H,
|
|
830
|
+
he,
|
|
831
|
+
st,
|
|
832
|
+
mt,
|
|
823
833
|
ht,
|
|
824
|
-
Ee,
|
|
825
|
-
q,
|
|
826
|
-
re,
|
|
827
|
-
ot,
|
|
828
|
-
dt,
|
|
829
|
-
ut,
|
|
830
834
|
c,
|
|
831
835
|
d,
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
+
L,
|
|
837
|
+
Ae,
|
|
838
|
+
ie,
|
|
839
|
+
F
|
|
836
840
|
]);
|
|
837
|
-
return /* @__PURE__ */
|
|
841
|
+
return /* @__PURE__ */ s(Qt.Provider, { value: v, children: M });
|
|
838
842
|
}
|
|
839
|
-
function
|
|
840
|
-
const n =
|
|
843
|
+
function gt() {
|
|
844
|
+
const n = Xt(Qt);
|
|
841
845
|
if (!n)
|
|
842
846
|
throw new Error("useBundleBuilder must be used within <BundleProvider />");
|
|
843
847
|
return n;
|
|
844
848
|
}
|
|
845
|
-
function
|
|
846
|
-
const { isOpen: n, open: e, close: t, toggle:
|
|
847
|
-
return { isOpen: n, open: e, close: t, toggle:
|
|
849
|
+
function ji() {
|
|
850
|
+
const { isOpen: n, open: e, close: t, toggle: i } = gt();
|
|
851
|
+
return { isOpen: n, open: e, close: t, toggle: i };
|
|
848
852
|
}
|
|
849
|
-
const
|
|
850
|
-
button:
|
|
853
|
+
const mn = "_button_18rtl_1", bn = {
|
|
854
|
+
button: mn
|
|
851
855
|
};
|
|
852
|
-
function
|
|
853
|
-
const { toggle: e, t } =
|
|
854
|
-
return /* @__PURE__ */
|
|
856
|
+
function Ui(n) {
|
|
857
|
+
const { toggle: e, t } = gt();
|
|
858
|
+
return /* @__PURE__ */ s(
|
|
855
859
|
"button",
|
|
856
860
|
{
|
|
857
861
|
type: "button",
|
|
858
862
|
onClick: e,
|
|
859
|
-
className: [
|
|
863
|
+
className: [bn.button, n.className].filter(Boolean).join(" "),
|
|
860
864
|
children: n.children ?? t("bundle.button.default")
|
|
861
865
|
}
|
|
862
866
|
);
|
|
863
867
|
}
|
|
864
|
-
var
|
|
865
|
-
function
|
|
866
|
-
if (
|
|
867
|
-
|
|
868
|
+
var kt, Vt;
|
|
869
|
+
function fn() {
|
|
870
|
+
if (Vt) return kt;
|
|
871
|
+
Vt = 1;
|
|
868
872
|
var n = {
|
|
869
|
-
linear: function(e, t,
|
|
870
|
-
var
|
|
871
|
-
return
|
|
873
|
+
linear: function(e, t, i, r) {
|
|
874
|
+
var a = i - t;
|
|
875
|
+
return a * e / r + t;
|
|
872
876
|
},
|
|
873
|
-
easeInQuad: function(e, t,
|
|
874
|
-
var
|
|
875
|
-
return
|
|
877
|
+
easeInQuad: function(e, t, i, r) {
|
|
878
|
+
var a = i - t;
|
|
879
|
+
return a * (e /= r) * e + t;
|
|
876
880
|
},
|
|
877
|
-
easeOutQuad: function(e, t,
|
|
878
|
-
var
|
|
879
|
-
return -
|
|
881
|
+
easeOutQuad: function(e, t, i, r) {
|
|
882
|
+
var a = i - t;
|
|
883
|
+
return -a * (e /= r) * (e - 2) + t;
|
|
880
884
|
},
|
|
881
|
-
easeInOutQuad: function(e, t,
|
|
882
|
-
var
|
|
883
|
-
return (e /=
|
|
885
|
+
easeInOutQuad: function(e, t, i, r) {
|
|
886
|
+
var a = i - t;
|
|
887
|
+
return (e /= r / 2) < 1 ? a / 2 * e * e + t : -a / 2 * (--e * (e - 2) - 1) + t;
|
|
884
888
|
},
|
|
885
|
-
easeInCubic: function(e, t,
|
|
886
|
-
var
|
|
887
|
-
return
|
|
889
|
+
easeInCubic: function(e, t, i, r) {
|
|
890
|
+
var a = i - t;
|
|
891
|
+
return a * (e /= r) * e * e + t;
|
|
888
892
|
},
|
|
889
|
-
easeOutCubic: function(e, t,
|
|
890
|
-
var
|
|
891
|
-
return
|
|
893
|
+
easeOutCubic: function(e, t, i, r) {
|
|
894
|
+
var a = i - t;
|
|
895
|
+
return a * ((e = e / r - 1) * e * e + 1) + t;
|
|
892
896
|
},
|
|
893
|
-
easeInOutCubic: function(e, t,
|
|
894
|
-
var
|
|
895
|
-
return (e /=
|
|
897
|
+
easeInOutCubic: function(e, t, i, r) {
|
|
898
|
+
var a = i - t;
|
|
899
|
+
return (e /= r / 2) < 1 ? a / 2 * e * e * e + t : a / 2 * ((e -= 2) * e * e + 2) + t;
|
|
896
900
|
},
|
|
897
|
-
easeInQuart: function(e, t,
|
|
898
|
-
var
|
|
899
|
-
return
|
|
901
|
+
easeInQuart: function(e, t, i, r) {
|
|
902
|
+
var a = i - t;
|
|
903
|
+
return a * (e /= r) * e * e * e + t;
|
|
900
904
|
},
|
|
901
|
-
easeOutQuart: function(e, t,
|
|
902
|
-
var
|
|
903
|
-
return -
|
|
905
|
+
easeOutQuart: function(e, t, i, r) {
|
|
906
|
+
var a = i - t;
|
|
907
|
+
return -a * ((e = e / r - 1) * e * e * e - 1) + t;
|
|
904
908
|
},
|
|
905
|
-
easeInOutQuart: function(e, t,
|
|
906
|
-
var
|
|
907
|
-
return (e /=
|
|
909
|
+
easeInOutQuart: function(e, t, i, r) {
|
|
910
|
+
var a = i - t;
|
|
911
|
+
return (e /= r / 2) < 1 ? a / 2 * e * e * e * e + t : -a / 2 * ((e -= 2) * e * e * e - 2) + t;
|
|
908
912
|
},
|
|
909
|
-
easeInQuint: function(e, t,
|
|
910
|
-
var
|
|
911
|
-
return
|
|
913
|
+
easeInQuint: function(e, t, i, r) {
|
|
914
|
+
var a = i - t;
|
|
915
|
+
return a * (e /= r) * e * e * e * e + t;
|
|
912
916
|
},
|
|
913
|
-
easeOutQuint: function(e, t,
|
|
914
|
-
var
|
|
915
|
-
return
|
|
917
|
+
easeOutQuint: function(e, t, i, r) {
|
|
918
|
+
var a = i - t;
|
|
919
|
+
return a * ((e = e / r - 1) * e * e * e * e + 1) + t;
|
|
916
920
|
},
|
|
917
|
-
easeInOutQuint: function(e, t,
|
|
918
|
-
var
|
|
919
|
-
return (e /=
|
|
921
|
+
easeInOutQuint: function(e, t, i, r) {
|
|
922
|
+
var a = i - t;
|
|
923
|
+
return (e /= r / 2) < 1 ? a / 2 * e * e * e * e * e + t : a / 2 * ((e -= 2) * e * e * e * e + 2) + t;
|
|
920
924
|
},
|
|
921
|
-
easeInSine: function(e, t,
|
|
922
|
-
var
|
|
923
|
-
return -
|
|
925
|
+
easeInSine: function(e, t, i, r) {
|
|
926
|
+
var a = i - t;
|
|
927
|
+
return -a * Math.cos(e / r * (Math.PI / 2)) + a + t;
|
|
924
928
|
},
|
|
925
|
-
easeOutSine: function(e, t,
|
|
926
|
-
var
|
|
927
|
-
return
|
|
929
|
+
easeOutSine: function(e, t, i, r) {
|
|
930
|
+
var a = i - t;
|
|
931
|
+
return a * Math.sin(e / r * (Math.PI / 2)) + t;
|
|
928
932
|
},
|
|
929
|
-
easeInOutSine: function(e, t,
|
|
930
|
-
var
|
|
931
|
-
return -
|
|
933
|
+
easeInOutSine: function(e, t, i, r) {
|
|
934
|
+
var a = i - t;
|
|
935
|
+
return -a / 2 * (Math.cos(Math.PI * e / r) - 1) + t;
|
|
932
936
|
},
|
|
933
|
-
easeInExpo: function(e, t,
|
|
934
|
-
var
|
|
935
|
-
return e == 0 ? t :
|
|
937
|
+
easeInExpo: function(e, t, i, r) {
|
|
938
|
+
var a = i - t;
|
|
939
|
+
return e == 0 ? t : a * Math.pow(2, 10 * (e / r - 1)) + t;
|
|
936
940
|
},
|
|
937
|
-
easeOutExpo: function(e, t,
|
|
938
|
-
var
|
|
939
|
-
return e ==
|
|
941
|
+
easeOutExpo: function(e, t, i, r) {
|
|
942
|
+
var a = i - t;
|
|
943
|
+
return e == r ? t + a : a * (-Math.pow(2, -10 * e / r) + 1) + t;
|
|
940
944
|
},
|
|
941
|
-
easeInOutExpo: function(e, t,
|
|
942
|
-
var
|
|
943
|
-
return e === 0 ? t : e ===
|
|
945
|
+
easeInOutExpo: function(e, t, i, r) {
|
|
946
|
+
var a = i - t;
|
|
947
|
+
return e === 0 ? t : e === r ? t + a : (e /= r / 2) < 1 ? a / 2 * Math.pow(2, 10 * (e - 1)) + t : a / 2 * (-Math.pow(2, -10 * --e) + 2) + t;
|
|
944
948
|
},
|
|
945
|
-
easeInCirc: function(e, t,
|
|
946
|
-
var
|
|
947
|
-
return -
|
|
949
|
+
easeInCirc: function(e, t, i, r) {
|
|
950
|
+
var a = i - t;
|
|
951
|
+
return -a * (Math.sqrt(1 - (e /= r) * e) - 1) + t;
|
|
948
952
|
},
|
|
949
|
-
easeOutCirc: function(e, t,
|
|
950
|
-
var
|
|
951
|
-
return
|
|
953
|
+
easeOutCirc: function(e, t, i, r) {
|
|
954
|
+
var a = i - t;
|
|
955
|
+
return a * Math.sqrt(1 - (e = e / r - 1) * e) + t;
|
|
952
956
|
},
|
|
953
|
-
easeInOutCirc: function(e, t,
|
|
954
|
-
var
|
|
955
|
-
return (e /=
|
|
957
|
+
easeInOutCirc: function(e, t, i, r) {
|
|
958
|
+
var a = i - t;
|
|
959
|
+
return (e /= r / 2) < 1 ? -a / 2 * (Math.sqrt(1 - e * e) - 1) + t : a / 2 * (Math.sqrt(1 - (e -= 2) * e) + 1) + t;
|
|
956
960
|
},
|
|
957
|
-
easeInElastic: function(e, t,
|
|
958
|
-
var
|
|
959
|
-
return
|
|
961
|
+
easeInElastic: function(e, t, i, r) {
|
|
962
|
+
var a = i - t, h, u, S;
|
|
963
|
+
return S = 1.70158, u = 0, h = a, e === 0 ? t : (e /= r) === 1 ? t + a : (u || (u = r * 0.3), h < Math.abs(a) ? (h = a, S = u / 4) : S = u / (2 * Math.PI) * Math.asin(a / h), -(h * Math.pow(2, 10 * (e -= 1)) * Math.sin((e * r - S) * (2 * Math.PI) / u)) + t);
|
|
960
964
|
},
|
|
961
|
-
easeOutElastic: function(e, t,
|
|
962
|
-
var
|
|
963
|
-
return
|
|
965
|
+
easeOutElastic: function(e, t, i, r) {
|
|
966
|
+
var a = i - t, h, u, S;
|
|
967
|
+
return S = 1.70158, u = 0, h = a, e === 0 ? t : (e /= r) === 1 ? t + a : (u || (u = r * 0.3), h < Math.abs(a) ? (h = a, S = u / 4) : S = u / (2 * Math.PI) * Math.asin(a / h), h * Math.pow(2, -10 * e) * Math.sin((e * r - S) * (2 * Math.PI) / u) + a + t);
|
|
964
968
|
},
|
|
965
|
-
easeInOutElastic: function(e, t,
|
|
966
|
-
var
|
|
967
|
-
return
|
|
969
|
+
easeInOutElastic: function(e, t, i, r) {
|
|
970
|
+
var a = i - t, h, u, S;
|
|
971
|
+
return S = 1.70158, u = 0, h = a, e === 0 ? t : (e /= r / 2) === 2 ? t + a : (u || (u = r * (0.3 * 1.5)), h < Math.abs(a) ? (h = a, S = u / 4) : S = u / (2 * Math.PI) * Math.asin(a / h), e < 1 ? -0.5 * (h * Math.pow(2, 10 * (e -= 1)) * Math.sin((e * r - S) * (2 * Math.PI) / u)) + t : h * Math.pow(2, -10 * (e -= 1)) * Math.sin((e * r - S) * (2 * Math.PI) / u) * 0.5 + a + t);
|
|
968
972
|
},
|
|
969
|
-
easeInBack: function(e, t,
|
|
970
|
-
var h =
|
|
971
|
-
return
|
|
973
|
+
easeInBack: function(e, t, i, r, a) {
|
|
974
|
+
var h = i - t;
|
|
975
|
+
return a === void 0 && (a = 1.70158), h * (e /= r) * e * ((a + 1) * e - a) + t;
|
|
972
976
|
},
|
|
973
|
-
easeOutBack: function(e, t,
|
|
974
|
-
var h =
|
|
975
|
-
return
|
|
977
|
+
easeOutBack: function(e, t, i, r, a) {
|
|
978
|
+
var h = i - t;
|
|
979
|
+
return a === void 0 && (a = 1.70158), h * ((e = e / r - 1) * e * ((a + 1) * e + a) + 1) + t;
|
|
976
980
|
},
|
|
977
|
-
easeInOutBack: function(e, t,
|
|
978
|
-
var h =
|
|
979
|
-
return
|
|
981
|
+
easeInOutBack: function(e, t, i, r, a) {
|
|
982
|
+
var h = i - t;
|
|
983
|
+
return a === void 0 && (a = 1.70158), (e /= r / 2) < 1 ? h / 2 * (e * e * (((a *= 1.525) + 1) * e - a)) + t : h / 2 * ((e -= 2) * e * (((a *= 1.525) + 1) * e + a) + 2) + t;
|
|
980
984
|
},
|
|
981
|
-
easeInBounce: function(e, t,
|
|
982
|
-
var
|
|
983
|
-
return h = n.easeOutBounce(
|
|
985
|
+
easeInBounce: function(e, t, i, r) {
|
|
986
|
+
var a = i - t, h;
|
|
987
|
+
return h = n.easeOutBounce(r - e, 0, a, r), a - h + t;
|
|
984
988
|
},
|
|
985
|
-
easeOutBounce: function(e, t,
|
|
986
|
-
var
|
|
987
|
-
return (e /=
|
|
989
|
+
easeOutBounce: function(e, t, i, r) {
|
|
990
|
+
var a = i - t;
|
|
991
|
+
return (e /= r) < 1 / 2.75 ? a * (7.5625 * e * e) + t : e < 2 / 2.75 ? a * (7.5625 * (e -= 1.5 / 2.75) * e + 0.75) + t : e < 2.5 / 2.75 ? a * (7.5625 * (e -= 2.25 / 2.75) * e + 0.9375) + t : a * (7.5625 * (e -= 2.625 / 2.75) * e + 0.984375) + t;
|
|
988
992
|
},
|
|
989
|
-
easeInOutBounce: function(e, t,
|
|
990
|
-
var
|
|
991
|
-
return e <
|
|
993
|
+
easeInOutBounce: function(e, t, i, r) {
|
|
994
|
+
var a = i - t, h;
|
|
995
|
+
return e < r / 2 ? (h = n.easeInBounce(e * 2, 0, a, r), h * 0.5 + t) : (h = n.easeOutBounce(e * 2 - r, 0, a, r), h * 0.5 + a * 0.5 + t);
|
|
992
996
|
}
|
|
993
997
|
};
|
|
994
|
-
return
|
|
998
|
+
return kt = n, kt;
|
|
995
999
|
}
|
|
996
|
-
var
|
|
997
|
-
function
|
|
1000
|
+
var pn = fn();
|
|
1001
|
+
function _n(n) {
|
|
998
1002
|
return n * Math.PI / 180;
|
|
999
1003
|
}
|
|
1000
|
-
function
|
|
1004
|
+
function ve(n, e) {
|
|
1001
1005
|
return n + Math.random() * (e - n);
|
|
1002
1006
|
}
|
|
1003
|
-
function
|
|
1007
|
+
function gn(n, e) {
|
|
1004
1008
|
return Math.floor(n + Math.random() * (e - n + 1));
|
|
1005
1009
|
}
|
|
1006
|
-
var
|
|
1010
|
+
var pt;
|
|
1007
1011
|
(function(n) {
|
|
1008
1012
|
n[n.Circle = 0] = "Circle", n[n.Square = 1] = "Square", n[n.Strip = 2] = "Strip";
|
|
1009
|
-
})(
|
|
1010
|
-
var
|
|
1013
|
+
})(pt || (pt = {}));
|
|
1014
|
+
var Ye;
|
|
1011
1015
|
(function(n) {
|
|
1012
1016
|
n[n.Positive = 1] = "Positive", n[n.Negative = -1] = "Negative";
|
|
1013
|
-
})(
|
|
1014
|
-
const
|
|
1015
|
-
class
|
|
1016
|
-
constructor(e, t,
|
|
1017
|
+
})(Ye || (Ye = {}));
|
|
1018
|
+
const wn = 1e3 / 60;
|
|
1019
|
+
class yn {
|
|
1020
|
+
constructor(e, t, i, r) {
|
|
1017
1021
|
this.getOptions = t;
|
|
1018
|
-
const { colors:
|
|
1019
|
-
this.context = e, this.x =
|
|
1022
|
+
const { colors: a, initialVelocityX: h, initialVelocityY: u } = this.getOptions();
|
|
1023
|
+
this.context = e, this.x = i, this.y = r, this.w = ve(5, 20), this.h = ve(5, 20), this.radius = ve(5, 10), this.vx = typeof h == "number" ? ve(-h, h) : ve(h.min, h.max), this.vy = typeof u == "number" ? ve(-u, 0) : ve(u.min, u.max), this.shape = gn(0, 2), this.angle = _n(ve(0, 360)), this.angularSpin = ve(-0.2, 0.2), this.color = a[Math.floor(Math.random() * a.length)], this.rotateY = ve(0, 1), this.rotationDirection = ve(0, 1) ? Ye.Positive : Ye.Negative;
|
|
1020
1024
|
}
|
|
1021
1025
|
update(e) {
|
|
1022
|
-
const { gravity: t, wind:
|
|
1023
|
-
this.x += this.vx * u, this.y += this.vy * u, this.vy += t * u, this.vx +=
|
|
1024
|
-
const
|
|
1025
|
-
if (this.rotateY +=
|
|
1026
|
+
const { gravity: t, wind: i, friction: r, opacity: a, drawShape: h } = this.getOptions(), u = e / wn;
|
|
1027
|
+
this.x += this.vx * u, this.y += this.vy * u, this.vy += t * u, this.vx += i * u, this.vx *= r ** u, this.vy *= r ** u, this.rotateY >= 1 && this.rotationDirection === Ye.Positive ? this.rotationDirection = Ye.Negative : this.rotateY <= -1 && this.rotationDirection === Ye.Negative && (this.rotationDirection = Ye.Positive);
|
|
1028
|
+
const S = 0.1 * this.rotationDirection * u;
|
|
1029
|
+
if (this.rotateY += S, this.angle += this.angularSpin, this.context.save(), this.context.translate(this.x, this.y), this.context.rotate(this.angle), this.context.scale(1, this.rotateY), this.context.rotate(this.angle), this.context.beginPath(), this.context.fillStyle = this.color, this.context.strokeStyle = this.color, this.context.globalAlpha = a, this.context.lineCap = "round", this.context.lineWidth = 2, h && typeof h == "function")
|
|
1026
1030
|
h.call(this, this.context);
|
|
1027
1031
|
else
|
|
1028
1032
|
switch (this.shape) {
|
|
1029
|
-
case
|
|
1033
|
+
case pt.Circle: {
|
|
1030
1034
|
this.context.beginPath(), this.context.arc(0, 0, this.radius, 0, 2 * Math.PI), this.context.fill();
|
|
1031
1035
|
break;
|
|
1032
1036
|
}
|
|
1033
|
-
case
|
|
1037
|
+
case pt.Square: {
|
|
1034
1038
|
this.context.fillRect(-this.w / 2, -this.h / 2, this.w, this.h);
|
|
1035
1039
|
break;
|
|
1036
1040
|
}
|
|
1037
|
-
case
|
|
1041
|
+
case pt.Strip: {
|
|
1038
1042
|
this.context.fillRect(-this.w / 6, -this.h / 2, this.w / 3, this.h);
|
|
1039
1043
|
break;
|
|
1040
1044
|
}
|
|
@@ -1042,39 +1046,39 @@ class pn {
|
|
|
1042
1046
|
this.context.closePath(), this.context.restore();
|
|
1043
1047
|
}
|
|
1044
1048
|
}
|
|
1045
|
-
class
|
|
1049
|
+
class vn {
|
|
1046
1050
|
constructor(e, t) {
|
|
1047
|
-
this.x = 0, this.y = 0, this.w = 0, this.h = 0, this.lastNumberOfPieces = 0, this.tweenProgress = 0, this.tweenFrom = 0, this.particles = [], this.particlesGenerated = 0, this.removeParticleAt = (
|
|
1048
|
-
this.particles.splice(
|
|
1051
|
+
this.x = 0, this.y = 0, this.w = 0, this.h = 0, this.lastNumberOfPieces = 0, this.tweenProgress = 0, this.tweenFrom = 0, this.particles = [], this.particlesGenerated = 0, this.removeParticleAt = (r) => {
|
|
1052
|
+
this.particles.splice(r, 1);
|
|
1049
1053
|
}, this.getParticle = () => {
|
|
1050
|
-
const
|
|
1051
|
-
return new
|
|
1052
|
-
}, this.animate = (
|
|
1053
|
-
const { canvas:
|
|
1054
|
-
if (!
|
|
1054
|
+
const r = ve(this.x, this.w + this.x), a = ve(this.y, this.h + this.y);
|
|
1055
|
+
return new yn(this.context, this.getOptions, r, a);
|
|
1056
|
+
}, this.animate = (r) => {
|
|
1057
|
+
const { canvas: a, context: h, particlesGenerated: u, lastNumberOfPieces: S } = this, { run: ce, recycle: q, numberOfPieces: $, debug: me, tweenFunction: M, tweenDuration: ie } = this.getOptions();
|
|
1058
|
+
if (!ce)
|
|
1055
1059
|
return !1;
|
|
1056
|
-
const
|
|
1057
|
-
if (K <
|
|
1058
|
-
|
|
1059
|
-
const g =
|
|
1060
|
-
for (let
|
|
1060
|
+
const F = this.particles.length, K = q ? F : u;
|
|
1061
|
+
if (K < $) {
|
|
1062
|
+
S !== $ && (this.tweenProgress = 0, this.tweenFrom = K, this.lastNumberOfPieces = $), this.tweenProgress = Math.min(ie, Math.max(0, this.tweenProgress + r));
|
|
1063
|
+
const g = M(this.tweenProgress, this.tweenFrom, $, ie), j = Math.round(g - K);
|
|
1064
|
+
for (let N = 0; N < j; N++)
|
|
1061
1065
|
this.particles.push(this.getParticle());
|
|
1062
|
-
this.particlesGenerated +=
|
|
1066
|
+
this.particlesGenerated += j;
|
|
1063
1067
|
}
|
|
1064
|
-
|
|
1068
|
+
me && (h.font = "12px sans-serif", h.fillStyle = "#333", h.textAlign = "right", h.fillText(`Particles: ${F}`, a.width - 10, a.height - 20));
|
|
1065
1069
|
for (let g = this.particles.length - 1; g >= 0; g--) {
|
|
1066
|
-
const
|
|
1067
|
-
|
|
1070
|
+
const j = this.particles[g];
|
|
1071
|
+
j.update(r), (j.y > a.height || j.y < -100 || j.x > a.width + 100 || j.x < -100) && (q && K <= $ ? this.particles[g] = this.getParticle() : this.removeParticleAt(g));
|
|
1068
1072
|
}
|
|
1069
|
-
return
|
|
1073
|
+
return F > 0 || K < $;
|
|
1070
1074
|
}, this.canvas = e;
|
|
1071
|
-
const
|
|
1072
|
-
if (!
|
|
1075
|
+
const i = this.canvas.getContext("2d");
|
|
1076
|
+
if (!i)
|
|
1073
1077
|
throw new Error("Could not get canvas context");
|
|
1074
|
-
this.context =
|
|
1078
|
+
this.context = i, this.getOptions = t;
|
|
1075
1079
|
}
|
|
1076
1080
|
}
|
|
1077
|
-
const
|
|
1081
|
+
const Pt = {
|
|
1078
1082
|
width: typeof window < "u" ? window.innerWidth : 300,
|
|
1079
1083
|
height: typeof window < "u" ? window.innerHeight : 200,
|
|
1080
1084
|
numberOfPieces: 200,
|
|
@@ -1104,15 +1108,15 @@ const Rt = {
|
|
|
1104
1108
|
],
|
|
1105
1109
|
opacity: 1,
|
|
1106
1110
|
debug: !1,
|
|
1107
|
-
tweenFunction:
|
|
1111
|
+
tweenFunction: pn.easeInOutQuad,
|
|
1108
1112
|
tweenDuration: 5e3,
|
|
1109
1113
|
recycle: !0,
|
|
1110
1114
|
run: !0
|
|
1111
1115
|
};
|
|
1112
|
-
class
|
|
1116
|
+
class xn {
|
|
1113
1117
|
constructor(e, t) {
|
|
1114
|
-
this.lastFrameTime = 0, this.setOptionsWithDefaults = (
|
|
1115
|
-
const
|
|
1118
|
+
this.lastFrameTime = 0, this.setOptionsWithDefaults = (r) => {
|
|
1119
|
+
const a = {
|
|
1116
1120
|
confettiSource: {
|
|
1117
1121
|
x: 0,
|
|
1118
1122
|
y: 0,
|
|
@@ -1121,56 +1125,56 @@ class gn {
|
|
|
1121
1125
|
}
|
|
1122
1126
|
};
|
|
1123
1127
|
this._options = {
|
|
1124
|
-
...
|
|
1125
|
-
...
|
|
1126
|
-
...
|
|
1127
|
-
}, Object.assign(this,
|
|
1128
|
-
}, this.update = (
|
|
1129
|
-
const { options: { run:
|
|
1130
|
-
if (u &&
|
|
1128
|
+
...a,
|
|
1129
|
+
...Pt,
|
|
1130
|
+
...r
|
|
1131
|
+
}, Object.assign(this, r.confettiSource);
|
|
1132
|
+
}, this.update = (r = 0) => {
|
|
1133
|
+
const { options: { run: a, onConfettiComplete: h, frameRate: u }, canvas: S, context: ce } = this, q = Math.min(r - this.lastFrameTime, 50);
|
|
1134
|
+
if (u && q < 1e3 / u) {
|
|
1131
1135
|
this.rafId = requestAnimationFrame(this.update);
|
|
1132
1136
|
return;
|
|
1133
1137
|
}
|
|
1134
|
-
this.lastFrameTime =
|
|
1138
|
+
this.lastFrameTime = r - (u ? q % u : 0), a && (ce.fillStyle = "white", ce.clearRect(0, 0, S.width, S.height)), this.generator.animate(q) ? this.rafId = requestAnimationFrame(this.update) : (h && typeof h == "function" && this.generator.particlesGenerated > 0 && h.call(this, this), this._options.run = !1);
|
|
1135
1139
|
}, this.reset = () => {
|
|
1136
1140
|
this.generator && this.generator.particlesGenerated > 0 && (this.generator.particlesGenerated = 0, this.generator.particles = [], this.generator.lastNumberOfPieces = 0);
|
|
1137
1141
|
}, this.stop = () => {
|
|
1138
1142
|
this.options = { run: !1 }, this.rafId && (cancelAnimationFrame(this.rafId), this.rafId = void 0);
|
|
1139
1143
|
}, this.canvas = e;
|
|
1140
|
-
const
|
|
1141
|
-
if (!
|
|
1144
|
+
const i = this.canvas.getContext("2d");
|
|
1145
|
+
if (!i)
|
|
1142
1146
|
throw new Error("Could not get canvas context");
|
|
1143
|
-
this.context =
|
|
1147
|
+
this.context = i, this.generator = new vn(this.canvas, () => this.options), this.options = t, this.update();
|
|
1144
1148
|
}
|
|
1145
1149
|
get options() {
|
|
1146
1150
|
return this._options;
|
|
1147
1151
|
}
|
|
1148
1152
|
set options(e) {
|
|
1149
|
-
var
|
|
1150
|
-
const t = (
|
|
1151
|
-
this.setOptionsWithDefaults(e), this.generator && (Object.assign(this.generator, this.options.confettiSource), typeof e.recycle == "boolean" && e.recycle &&
|
|
1153
|
+
var r, a;
|
|
1154
|
+
const t = (r = this._options) == null ? void 0 : r.run, i = (a = this._options) == null ? void 0 : a.recycle;
|
|
1155
|
+
this.setOptionsWithDefaults(e), this.generator && (Object.assign(this.generator, this.options.confettiSource), typeof e.recycle == "boolean" && e.recycle && i === !1 && (this.generator.lastNumberOfPieces = this.generator.particles.length)), typeof e.run == "boolean" && e.run && t === !1 && this.update();
|
|
1152
1156
|
}
|
|
1153
1157
|
}
|
|
1154
|
-
const
|
|
1155
|
-
class
|
|
1158
|
+
const Nn = It.createRef();
|
|
1159
|
+
class Mt extends It.Component {
|
|
1156
1160
|
constructor(e) {
|
|
1157
|
-
super(e), this.canvas =
|
|
1161
|
+
super(e), this.canvas = It.createRef(), this.canvas = e.canvasRef || Nn;
|
|
1158
1162
|
}
|
|
1159
1163
|
componentDidMount() {
|
|
1160
1164
|
if (this.canvas.current) {
|
|
1161
|
-
const e =
|
|
1162
|
-
this.confetti = new
|
|
1165
|
+
const e = Tt(this.props)[0];
|
|
1166
|
+
this.confetti = new xn(this.canvas.current, e);
|
|
1163
1167
|
}
|
|
1164
1168
|
}
|
|
1165
1169
|
componentDidUpdate() {
|
|
1166
|
-
const e =
|
|
1170
|
+
const e = Tt(this.props)[0];
|
|
1167
1171
|
this.confetti && (this.confetti.options = e);
|
|
1168
1172
|
}
|
|
1169
1173
|
componentWillUnmount() {
|
|
1170
1174
|
this.confetti && this.confetti.stop(), this.confetti = void 0;
|
|
1171
1175
|
}
|
|
1172
1176
|
render() {
|
|
1173
|
-
const [e, t] =
|
|
1177
|
+
const [e, t] = Tt(this.props), i = {
|
|
1174
1178
|
zIndex: 2,
|
|
1175
1179
|
position: "absolute",
|
|
1176
1180
|
pointerEvents: "none",
|
|
@@ -1180,41 +1184,41 @@ class Lt extends vt.Component {
|
|
|
1180
1184
|
right: 0,
|
|
1181
1185
|
...t.style
|
|
1182
1186
|
};
|
|
1183
|
-
return
|
|
1187
|
+
return s("canvas", { width: e.width, height: e.height, ref: this.canvas, ...t, style: i });
|
|
1184
1188
|
}
|
|
1185
1189
|
}
|
|
1186
|
-
|
|
1187
|
-
...
|
|
1190
|
+
Mt.defaultProps = {
|
|
1191
|
+
...Pt
|
|
1188
1192
|
};
|
|
1189
|
-
|
|
1190
|
-
function
|
|
1191
|
-
const e = {}, t = {},
|
|
1192
|
-
...Object.keys(
|
|
1193
|
+
Mt.displayName = "ReactConfetti";
|
|
1194
|
+
function Tt(n) {
|
|
1195
|
+
const e = {}, t = {}, i = {}, r = [
|
|
1196
|
+
...Object.keys(Pt),
|
|
1193
1197
|
"confettiSource",
|
|
1194
1198
|
"drawShape",
|
|
1195
1199
|
"onConfettiComplete",
|
|
1196
1200
|
"frameRate"
|
|
1197
|
-
],
|
|
1201
|
+
], a = ["canvasRef"];
|
|
1198
1202
|
for (const h in n) {
|
|
1199
1203
|
const u = n[h];
|
|
1200
|
-
|
|
1204
|
+
r.includes(h) ? e[h] = u : a.includes(h) ? a[h] = u : i[h] = u;
|
|
1201
1205
|
}
|
|
1202
|
-
return [e,
|
|
1206
|
+
return [e, i, t];
|
|
1203
1207
|
}
|
|
1204
|
-
const
|
|
1208
|
+
const In = It.forwardRef((n, e) => s(Mt, { canvasRef: e, ...n }));
|
|
1205
1209
|
/**
|
|
1206
1210
|
* @license lucide-react v0.515.0 - ISC
|
|
1207
1211
|
*
|
|
1208
1212
|
* This source code is licensed under the ISC license.
|
|
1209
1213
|
* See the LICENSE file in the root directory of this source tree.
|
|
1210
1214
|
*/
|
|
1211
|
-
const
|
|
1215
|
+
const Sn = (n) => n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Cn = (n) => n.replace(
|
|
1212
1216
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
1213
|
-
(e, t,
|
|
1214
|
-
),
|
|
1217
|
+
(e, t, i) => i ? i.toUpperCase() : t.toLowerCase()
|
|
1218
|
+
), zt = (n) => {
|
|
1215
1219
|
const e = Cn(n);
|
|
1216
1220
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
1217
|
-
},
|
|
1221
|
+
}, Gt = (...n) => n.filter((e, t, i) => !!e && e.trim() !== "" && i.indexOf(e) === t).join(" ").trim(), Bn = (n) => {
|
|
1218
1222
|
for (const e in n)
|
|
1219
1223
|
if (e.startsWith("aria-") || e === "role" || e === "title")
|
|
1220
1224
|
return !0;
|
|
@@ -1225,7 +1229,7 @@ const xn = (n) => n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Cn = (
|
|
|
1225
1229
|
* This source code is licensed under the ISC license.
|
|
1226
1230
|
* See the LICENSE file in the root directory of this source tree.
|
|
1227
1231
|
*/
|
|
1228
|
-
var
|
|
1232
|
+
var kn = {
|
|
1229
1233
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1230
1234
|
width: 24,
|
|
1231
1235
|
height: 24,
|
|
@@ -1242,32 +1246,32 @@ var Nn = {
|
|
|
1242
1246
|
* This source code is licensed under the ISC license.
|
|
1243
1247
|
* See the LICENSE file in the root directory of this source tree.
|
|
1244
1248
|
*/
|
|
1245
|
-
const
|
|
1249
|
+
const Tn = Ht(
|
|
1246
1250
|
({
|
|
1247
1251
|
color: n = "currentColor",
|
|
1248
1252
|
size: e = 24,
|
|
1249
1253
|
strokeWidth: t = 2,
|
|
1250
|
-
absoluteStrokeWidth:
|
|
1251
|
-
className:
|
|
1252
|
-
children:
|
|
1254
|
+
absoluteStrokeWidth: i,
|
|
1255
|
+
className: r = "",
|
|
1256
|
+
children: a,
|
|
1253
1257
|
iconNode: h,
|
|
1254
1258
|
...u
|
|
1255
|
-
},
|
|
1259
|
+
}, S) => Rt(
|
|
1256
1260
|
"svg",
|
|
1257
1261
|
{
|
|
1258
|
-
ref:
|
|
1259
|
-
...
|
|
1262
|
+
ref: S,
|
|
1263
|
+
...kn,
|
|
1260
1264
|
width: e,
|
|
1261
1265
|
height: e,
|
|
1262
1266
|
stroke: n,
|
|
1263
|
-
strokeWidth:
|
|
1264
|
-
className:
|
|
1265
|
-
...!
|
|
1267
|
+
strokeWidth: i ? Number(t) * 24 / Number(e) : t,
|
|
1268
|
+
className: Gt("lucide", r),
|
|
1269
|
+
...!a && !Bn(u) && { "aria-hidden": "true" },
|
|
1266
1270
|
...u
|
|
1267
1271
|
},
|
|
1268
1272
|
[
|
|
1269
|
-
...h.map(([
|
|
1270
|
-
...Array.isArray(
|
|
1273
|
+
...h.map(([ce, q]) => Rt(ce, q)),
|
|
1274
|
+
...Array.isArray(a) ? a : [a]
|
|
1271
1275
|
]
|
|
1272
1276
|
)
|
|
1273
1277
|
);
|
|
@@ -1277,20 +1281,20 @@ const Sn = zt(
|
|
|
1277
1281
|
* This source code is licensed under the ISC license.
|
|
1278
1282
|
* See the LICENSE file in the root directory of this source tree.
|
|
1279
1283
|
*/
|
|
1280
|
-
const
|
|
1281
|
-
const t =
|
|
1282
|
-
({ className:
|
|
1283
|
-
ref:
|
|
1284
|
+
const Ft = (n, e) => {
|
|
1285
|
+
const t = Ht(
|
|
1286
|
+
({ className: i, ...r }, a) => Rt(Tn, {
|
|
1287
|
+
ref: a,
|
|
1284
1288
|
iconNode: e,
|
|
1285
|
-
className:
|
|
1286
|
-
`lucide-${
|
|
1289
|
+
className: Gt(
|
|
1290
|
+
`lucide-${Sn(zt(n))}`,
|
|
1287
1291
|
`lucide-${n}`,
|
|
1288
|
-
|
|
1292
|
+
i
|
|
1289
1293
|
),
|
|
1290
|
-
...
|
|
1294
|
+
...r
|
|
1291
1295
|
})
|
|
1292
1296
|
);
|
|
1293
|
-
return t.displayName =
|
|
1297
|
+
return t.displayName = zt(n), t;
|
|
1294
1298
|
};
|
|
1295
1299
|
/**
|
|
1296
1300
|
* @license lucide-react v0.515.0 - ISC
|
|
@@ -1298,207 +1302,208 @@ const Mt = (n, e) => {
|
|
|
1298
1302
|
* This source code is licensed under the ISC license.
|
|
1299
1303
|
* See the LICENSE file in the root directory of this source tree.
|
|
1300
1304
|
*/
|
|
1301
|
-
const
|
|
1305
|
+
const Ln = [
|
|
1302
1306
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
1303
1307
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
1304
|
-
],
|
|
1308
|
+
], Wt = Ft("plus", Ln);
|
|
1305
1309
|
/**
|
|
1306
1310
|
* @license lucide-react v0.515.0 - ISC
|
|
1307
1311
|
*
|
|
1308
1312
|
* This source code is licensed under the ISC license.
|
|
1309
1313
|
* See the LICENSE file in the root directory of this source tree.
|
|
1310
1314
|
*/
|
|
1311
|
-
const
|
|
1315
|
+
const Rn = [
|
|
1312
1316
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
1313
1317
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
1314
|
-
],
|
|
1318
|
+
], Pn = Ft("search", Rn);
|
|
1315
1319
|
/**
|
|
1316
1320
|
* @license lucide-react v0.515.0 - ISC
|
|
1317
1321
|
*
|
|
1318
1322
|
* This source code is licensed under the ISC license.
|
|
1319
1323
|
* See the LICENSE file in the root directory of this source tree.
|
|
1320
1324
|
*/
|
|
1321
|
-
const
|
|
1325
|
+
const Mn = [
|
|
1322
1326
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
1323
1327
|
["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
|
|
1324
1328
|
["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }],
|
|
1325
1329
|
["line", { x1: "10", x2: "10", y1: "11", y2: "17", key: "1uufr5" }],
|
|
1326
1330
|
["line", { x1: "14", x2: "14", y1: "11", y2: "17", key: "xtxkd" }]
|
|
1327
|
-
],
|
|
1328
|
-
backdrop:
|
|
1329
|
-
celebrationOverlay:
|
|
1330
|
-
celebrationChip:
|
|
1331
|
-
backdropOpen:
|
|
1332
|
-
backdropClosed:
|
|
1333
|
-
panel:
|
|
1334
|
-
panelOpen:
|
|
1335
|
-
panelClosed:
|
|
1336
|
-
header:
|
|
1337
|
-
headerCenter:
|
|
1338
|
-
title:
|
|
1339
|
-
searchIconButton:
|
|
1340
|
-
headerTitleWrap:
|
|
1341
|
-
headerSearchWrap:
|
|
1342
|
-
headerSearchOpen:
|
|
1343
|
-
searchBar:
|
|
1344
|
-
searchInput:
|
|
1345
|
-
searchClearButton:
|
|
1346
|
-
closeButton:
|
|
1347
|
-
body:
|
|
1348
|
-
muted:
|
|
1349
|
-
error:
|
|
1350
|
-
variants:
|
|
1351
|
-
variantList:
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1331
|
+
], Fn = Ft("trash-2", Mn), On = "_backdrop_p0w0a_1", An = "_celebrationOverlay_p0w0a_14", En = "_celebrationChip_p0w0a_23", Dn = "_backdropOpen_p0w0a_74", qn = "_backdropClosed_p0w0a_78", $n = "_panel_p0w0a_82", Vn = "_panelOpen_p0w0a_103", zn = "_panelClosed_p0w0a_107", Wn = "_header_p0w0a_146", jn = "_headerCenter_p0w0a_155", Un = "_title_p0w0a_163", Hn = "_searchIconButton_p0w0a_172", Qn = "_headerTitleWrap_p0w0a_195", Gn = "_headerSearchWrap_p0w0a_199", Yn = "_headerSearchOpen_p0w0a_211", Kn = "_searchBar_p0w0a_223", Xn = "_searchInput_p0w0a_235", Zn = "_searchClearButton_p0w0a_256", Jn = "_closeButton_p0w0a_278", ea = "_body_p0w0a_312", ta = "_muted_p0w0a_317", na = "_error_p0w0a_322", aa = "_variants_p0w0a_327", ra = "_variantList_p0w0a_331", ia = "_emptyState_p0w0a_339", oa = "_variantRow_p0w0a_351", sa = "_variantRowSoldOut_p0w0a_359", la = "_variantLeft_p0w0a_363", ca = "_addToBundleButton_p0w0a_370", ua = "_soldOutContainer_p0w0a_398", da = "_stockLimitContainer_p0w0a_406", ha = "_soldOut_p0w0a_398", ma = "_stockLimitNotice_p0w0a_424", ba = "_variantThumb_p0w0a_433", fa = "_variantThumbImg_p0w0a_443", pa = "_variantThumbFallback_p0w0a_450", _a = "_variantInfo_p0w0a_460", ga = "_variantName_p0w0a_464", wa = "_variantMeta_p0w0a_473", ya = "_variantPriceRow_p0w0a_481", va = "_variantCompareAt_p0w0a_488", xa = "_variantPrice_p0w0a_481", Na = "_qtyControls_p0w0a_499", Ia = "_qtyControlsWrap_p0w0a_505", Sa = "_qtyButton_p0w0a_511", Ca = "_qtyValue_p0w0a_537", Ba = "_footer_p0w0a_544", ka = "_poweredBy_p0w0a_552", Ta = "_boxSummaryWindow_p0w0a_564", La = "_boxSummaryRow_p0w0a_582", Ra = "_boxSlot_p0w0a_590", Pa = "_boxItem_p0w0a_599", Ma = "_boxItemClickable_p0w0a_611", Fa = "_boxThresholdLabel_p0w0a_620", Oa = "_boxItemPlaceholder_p0w0a_631", Aa = "_boxItemFilled_p0w0a_637", Ea = "_boxItemThreshold_p0w0a_643", Da = "_boxItemDiscountText_p0w0a_651", qa = "_boxItemPlus_p0w0a_659", $a = "_boxItemImage_p0w0a_666", Va = "_boxItemFallback_p0w0a_673", za = "_ctaButtonGroup_p0w0a_684", Wa = "_ctaButtonGroupAnimating_p0w0a_691", ja = "_cta_p0w0a_684", Ua = "_ctaDualLeft_p0w0a_719", Ha = "_ctaDualLeftAnimating_p0w0a_737", Qa = "_ctaDualRight_p0w0a_750", Ga = "_ctaDualRightAnimating_p0w0a_766", Ya = "_ctaTotals_p0w0a_777", Ka = "_ctaDiscountBadge_p0w0a_785", Xa = "_ctaTotalsWrap_p0w0a_799", Za = "_ctaTotalsWrapVisible_p0w0a_812", Ja = "_ctaTotalsStrike_p0w0a_819", er = "_ctaTotalsPrice_p0w0a_826", b = {
|
|
1332
|
+
backdrop: On,
|
|
1333
|
+
celebrationOverlay: An,
|
|
1334
|
+
celebrationChip: En,
|
|
1335
|
+
backdropOpen: Dn,
|
|
1336
|
+
backdropClosed: qn,
|
|
1337
|
+
panel: $n,
|
|
1338
|
+
panelOpen: Vn,
|
|
1339
|
+
panelClosed: zn,
|
|
1340
|
+
header: Wn,
|
|
1341
|
+
headerCenter: jn,
|
|
1342
|
+
title: Un,
|
|
1343
|
+
searchIconButton: Hn,
|
|
1344
|
+
headerTitleWrap: Qn,
|
|
1345
|
+
headerSearchWrap: Gn,
|
|
1346
|
+
headerSearchOpen: Yn,
|
|
1347
|
+
searchBar: Kn,
|
|
1348
|
+
searchInput: Xn,
|
|
1349
|
+
searchClearButton: Zn,
|
|
1350
|
+
closeButton: Jn,
|
|
1351
|
+
body: ea,
|
|
1352
|
+
muted: ta,
|
|
1353
|
+
error: na,
|
|
1354
|
+
variants: aa,
|
|
1355
|
+
variantList: ra,
|
|
1356
|
+
emptyState: ia,
|
|
1357
|
+
variantRow: oa,
|
|
1358
|
+
variantRowSoldOut: sa,
|
|
1359
|
+
variantLeft: la,
|
|
1360
|
+
addToBundleButton: ca,
|
|
1361
|
+
soldOutContainer: ua,
|
|
1362
|
+
stockLimitContainer: da,
|
|
1363
|
+
soldOut: ha,
|
|
1364
|
+
stockLimitNotice: ma,
|
|
1365
|
+
variantThumb: ba,
|
|
1366
|
+
variantThumbImg: fa,
|
|
1367
|
+
variantThumbFallback: pa,
|
|
1368
|
+
variantInfo: _a,
|
|
1369
|
+
variantName: ga,
|
|
1370
|
+
variantMeta: wa,
|
|
1371
|
+
variantPriceRow: ya,
|
|
1372
|
+
variantCompareAt: va,
|
|
1373
|
+
variantPrice: xa,
|
|
1374
|
+
qtyControls: Na,
|
|
1375
|
+
qtyControlsWrap: Ia,
|
|
1376
|
+
qtyButton: Sa,
|
|
1377
|
+
qtyValue: Ca,
|
|
1378
|
+
footer: Ba,
|
|
1379
|
+
poweredBy: ka,
|
|
1380
|
+
boxSummaryWindow: Ta,
|
|
1381
|
+
boxSummaryRow: La,
|
|
1382
|
+
boxSlot: Ra,
|
|
1383
|
+
boxItem: Pa,
|
|
1384
|
+
boxItemClickable: Ma,
|
|
1385
|
+
boxThresholdLabel: Fa,
|
|
1386
|
+
boxItemPlaceholder: Oa,
|
|
1387
|
+
boxItemFilled: Aa,
|
|
1388
|
+
boxItemThreshold: Ea,
|
|
1389
|
+
boxItemDiscountText: Da,
|
|
1390
|
+
boxItemPlus: qa,
|
|
1391
|
+
boxItemImage: $a,
|
|
1392
|
+
boxItemFallback: Va,
|
|
1393
|
+
ctaButtonGroup: za,
|
|
1394
|
+
ctaButtonGroupAnimating: Wa,
|
|
1395
|
+
cta: ja,
|
|
1396
|
+
ctaDualLeft: Ua,
|
|
1397
|
+
ctaDualLeftAnimating: Ha,
|
|
1398
|
+
ctaDualRight: Qa,
|
|
1399
|
+
ctaDualRightAnimating: Ga,
|
|
1400
|
+
ctaTotals: Ya,
|
|
1401
|
+
ctaDiscountBadge: Ka,
|
|
1402
|
+
ctaTotalsWrap: Xa,
|
|
1403
|
+
ctaTotalsWrapVisible: Za,
|
|
1404
|
+
ctaTotalsStrike: Ja,
|
|
1405
|
+
ctaTotalsPrice: er
|
|
1401
1406
|
};
|
|
1402
|
-
function
|
|
1403
|
-
var
|
|
1407
|
+
function Hi(n) {
|
|
1408
|
+
var Ze, Je;
|
|
1404
1409
|
const {
|
|
1405
1410
|
isOpen: e,
|
|
1406
1411
|
close: t,
|
|
1407
|
-
loading:
|
|
1408
|
-
submitting:
|
|
1409
|
-
error:
|
|
1412
|
+
loading: i,
|
|
1413
|
+
submitting: r,
|
|
1414
|
+
error: a,
|
|
1410
1415
|
currencyCode: h,
|
|
1411
1416
|
config: u,
|
|
1412
|
-
eligibleVariants:
|
|
1413
|
-
selections:
|
|
1414
|
-
selectionOrder:
|
|
1415
|
-
getVariantMaxSelectableQuantity:
|
|
1416
|
-
setQuantity:
|
|
1417
|
-
bundleSize:
|
|
1418
|
-
minRequired:
|
|
1419
|
-
canSubmit:
|
|
1417
|
+
eligibleVariants: S,
|
|
1418
|
+
selections: ce,
|
|
1419
|
+
selectionOrder: q,
|
|
1420
|
+
getVariantMaxSelectableQuantity: $,
|
|
1421
|
+
setQuantity: me,
|
|
1422
|
+
bundleSize: M,
|
|
1423
|
+
minRequired: ie,
|
|
1424
|
+
canSubmit: F,
|
|
1420
1425
|
submit: K,
|
|
1421
1426
|
submitAndCheckout: g,
|
|
1422
|
-
locale:
|
|
1423
|
-
t:
|
|
1424
|
-
} =
|
|
1427
|
+
locale: j,
|
|
1428
|
+
t: N
|
|
1429
|
+
} = gt(), [se, L] = W(!1), [O, X] = W(""), Z = Y(null), V = Y(null), ne = Y(null), [ue, xe] = W(() => typeof window > "u" ? { width: 0, height: 0 } : { width: window.innerWidth, height: window.innerHeight }), [de, Be] = W(0), [ge, Ee] = W(null), [Ne, Pe] = W(!1), ke = Y(null), De = Y(M), at = 7e3, [We, je] = W(0), [Me, Ke] = W(null), [Te, qe] = W(!1), Ie = Y(null), f = 2800, _ = [
|
|
1425
1430
|
"#2563eb",
|
|
1426
1431
|
"#3b82f6",
|
|
1427
1432
|
"#60a5fa",
|
|
1428
1433
|
"#93c5fd",
|
|
1429
1434
|
"#bae6fd",
|
|
1430
1435
|
"#e0f2fe"
|
|
1431
|
-
], x =
|
|
1436
|
+
], x = P(() => {
|
|
1432
1437
|
var d;
|
|
1433
1438
|
const c = (d = u == null ? void 0 : u.styleSettings) == null ? void 0 : d.confettiColors;
|
|
1434
1439
|
return Array.isArray(c) && c.length >= 6 ? c.slice(0, 6).map(
|
|
1435
|
-
(v, o) => typeof v == "string" && v.trim() ? v :
|
|
1436
|
-
) : [...
|
|
1437
|
-
}, [(
|
|
1440
|
+
(v, o) => typeof v == "string" && v.trim() ? v : _[o]
|
|
1441
|
+
) : [..._];
|
|
1442
|
+
}, [(Ze = u == null ? void 0 : u.styleSettings) == null ? void 0 : Ze.confettiColors]), R = (c) => {
|
|
1438
1443
|
const d = Number.parseFloat(c);
|
|
1439
1444
|
return Number.isFinite(d) ? String(Math.round(d)) : c;
|
|
1440
|
-
},
|
|
1445
|
+
}, A = (c) => {
|
|
1441
1446
|
const d = (c ?? []).filter((v) => {
|
|
1442
|
-
var
|
|
1443
|
-
const o = (
|
|
1444
|
-
return !(!o || !
|
|
1447
|
+
var m, w;
|
|
1448
|
+
const o = (m = v == null ? void 0 : v.name) == null ? void 0 : m.trim(), l = (w = v == null ? void 0 : v.value) == null ? void 0 : w.trim();
|
|
1449
|
+
return !(!o || !l || o.toLowerCase() === "title");
|
|
1445
1450
|
});
|
|
1446
1451
|
return d.length ? d.map((v) => `${v.name}: ${v.value}`).join(" · ") : null;
|
|
1447
|
-
},
|
|
1452
|
+
}, U = (c) => {
|
|
1448
1453
|
var d;
|
|
1449
1454
|
return ((d = c.product) == null ? void 0 : d.title) ?? c.displayName ?? c.title;
|
|
1450
|
-
},
|
|
1451
|
-
const d =
|
|
1455
|
+
}, Q = (c) => {
|
|
1456
|
+
const d = U(c), v = A(c.selectedOptions);
|
|
1452
1457
|
return [d, v].filter(Boolean).join(" — ");
|
|
1453
|
-
}, [
|
|
1458
|
+
}, [ae, le] = W(e), J = Y(null), z = (c) => {
|
|
1454
1459
|
const d = Number(c);
|
|
1455
|
-
return Number.isFinite(d) ?
|
|
1456
|
-
},
|
|
1460
|
+
return Number.isFinite(d) ? ft(d, h, j) : c;
|
|
1461
|
+
}, H = ((Je = u == null ? void 0 : u.title) == null ? void 0 : Je.trim()) || N("bundle.title.default"), Le = P(() => {
|
|
1457
1462
|
const c = Number((u == null ? void 0 : u.maxBundleSize) ?? NaN), d = Number.isFinite(c) ? Math.floor(c) : 100;
|
|
1458
1463
|
return Math.max(2, Math.min(100, d));
|
|
1459
|
-
}, [u == null ? void 0 : u.maxBundleSize]),
|
|
1460
|
-
const c =
|
|
1464
|
+
}, [u == null ? void 0 : u.maxBundleSize]), Fe = M >= Le, rt = P(() => [...S].sort((c, d) => c.displayName.localeCompare(d.displayName)), [S]), Oe = P(() => {
|
|
1465
|
+
const c = O.trim().toLowerCase();
|
|
1461
1466
|
if (!c) return rt;
|
|
1462
1467
|
const d = c.split(/\s+/).filter(Boolean), v = (o) => {
|
|
1463
1468
|
var w;
|
|
1464
|
-
const
|
|
1465
|
-
|
|
1469
|
+
const l = [];
|
|
1470
|
+
l.push(o.displayName), (w = o.product) != null && w.title && l.push(o.product.title);
|
|
1466
1471
|
for (const y of o.selectedOptions ?? [])
|
|
1467
|
-
|
|
1468
|
-
const
|
|
1469
|
-
return d.every((y) =>
|
|
1472
|
+
l.push(y.name), l.push(y.value);
|
|
1473
|
+
const m = l.join(" ").toLowerCase();
|
|
1474
|
+
return d.every((y) => m.includes(y));
|
|
1470
1475
|
};
|
|
1471
1476
|
return rt.filter(v);
|
|
1472
|
-
}, [
|
|
1477
|
+
}, [O, rt]), he = P(() => [...(u == null ? void 0 : u.rules) ?? []].sort((c, d) => c.minBundleSize - d.minBundleSize), [u == null ? void 0 : u.rules]), G = P(() => Math.max(0, ie - M), [M, ie]), it = P(() => {
|
|
1473
1478
|
let c = null;
|
|
1474
|
-
for (const d of
|
|
1475
|
-
|
|
1479
|
+
for (const d of he)
|
|
1480
|
+
M >= d.minBundleSize && (c = d);
|
|
1476
1481
|
return c;
|
|
1477
|
-
}, [
|
|
1478
|
-
if (!
|
|
1479
|
-
const c = Number.parseFloat(
|
|
1482
|
+
}, [M, he]), Ae = P(() => {
|
|
1483
|
+
if (!it) return null;
|
|
1484
|
+
const c = Number.parseFloat(it.discountPercent);
|
|
1480
1485
|
return !Number.isFinite(c) || c <= 0 ? null : c;
|
|
1481
|
-
}, [
|
|
1482
|
-
const c = new Map(
|
|
1486
|
+
}, [it]), Se = he[0], C = !!(Se && M >= Se.minBundleSize), be = P(() => {
|
|
1487
|
+
const c = new Map(S.map((v) => [v.id, v]));
|
|
1483
1488
|
let d = 0;
|
|
1484
|
-
for (const [v, o] of Object.entries(
|
|
1485
|
-
const
|
|
1486
|
-
if (
|
|
1487
|
-
const
|
|
1488
|
-
Number.isFinite(w) && (d += w *
|
|
1489
|
+
for (const [v, o] of Object.entries(ce)) {
|
|
1490
|
+
const l = o ?? 0;
|
|
1491
|
+
if (l <= 0) continue;
|
|
1492
|
+
const m = c.get(v), w = Number(m == null ? void 0 : m.price);
|
|
1493
|
+
Number.isFinite(w) && (d += w * l);
|
|
1489
1494
|
}
|
|
1490
1495
|
return Math.round(d * 100) / 100;
|
|
1491
|
-
}, [
|
|
1492
|
-
if (!
|
|
1493
|
-
const c =
|
|
1496
|
+
}, [S, ce]), Ue = P(() => {
|
|
1497
|
+
if (!Ae) return be;
|
|
1498
|
+
const c = be * (1 - Ae / 100);
|
|
1494
1499
|
return Math.round(c * 100) / 100;
|
|
1495
|
-
}, [
|
|
1496
|
-
const c = new Map(
|
|
1497
|
-
return
|
|
1498
|
-
}, [
|
|
1500
|
+
}, [Ae, be]), Ce = P(() => he.length ? Math.max(...he.map((c) => c.minBundleSize)) : 0, [he]), ot = P(() => {
|
|
1501
|
+
const c = new Map(S.map((d) => [d.id, d]));
|
|
1502
|
+
return q.map((d) => c.get(d)).filter((d) => !!d);
|
|
1503
|
+
}, [S, q]), He = P(() => {
|
|
1499
1504
|
var d;
|
|
1500
1505
|
const c = /* @__PURE__ */ new Map();
|
|
1501
|
-
for (const v of
|
|
1506
|
+
for (const v of he) {
|
|
1502
1507
|
const o = Math.max(0, v.minBundleSize - 1);
|
|
1503
1508
|
c.set(o, {
|
|
1504
1509
|
discountPercent: v.discountPercent,
|
|
@@ -1507,118 +1512,118 @@ function Ii(n) {
|
|
|
1507
1512
|
});
|
|
1508
1513
|
}
|
|
1509
1514
|
return c;
|
|
1510
|
-
}, [
|
|
1511
|
-
|
|
1515
|
+
}, [he]), Qe = P(() => Math.max(Ce || ie, ot.length), [ot.length, Ce, ie]), [Re, ht] = W(!0), Xe = Y(G);
|
|
1516
|
+
D(() => {
|
|
1512
1517
|
if (((u == null ? void 0 : u.ctaButtonMode) || "add_to_cart") === "add_to_cart_checkout") {
|
|
1513
|
-
const d =
|
|
1514
|
-
|
|
1518
|
+
const d = Xe.current > 0;
|
|
1519
|
+
ht(!(d && G === 0));
|
|
1515
1520
|
}
|
|
1516
|
-
|
|
1517
|
-
}, [
|
|
1518
|
-
const
|
|
1519
|
-
const d =
|
|
1521
|
+
Xe.current = G;
|
|
1522
|
+
}, [G, u == null ? void 0 : u.ctaButtonMode]);
|
|
1523
|
+
const st = Y(null), mt = Y(null), $e = Y(null), bt = Y(M), Ve = (c) => {
|
|
1524
|
+
const d = mt.current;
|
|
1520
1525
|
if (!d) return;
|
|
1521
1526
|
const v = d.querySelector(`[data-variant-row="${c}"]`);
|
|
1522
1527
|
if (!v) return;
|
|
1523
|
-
const o = d.getBoundingClientRect(),
|
|
1524
|
-
if (
|
|
1525
|
-
const y = Math.max(0, d.scrollHeight - d.clientHeight),
|
|
1526
|
-
d.scrollTo({ top:
|
|
1528
|
+
const o = d.getBoundingClientRect(), l = v.getBoundingClientRect(), m = 8;
|
|
1529
|
+
if (l.top >= o.top + m && l.bottom <= o.bottom - m) return;
|
|
1530
|
+
const y = Math.max(0, d.scrollHeight - d.clientHeight), I = l.top - o.top + l.height / 2, B = d.scrollTop + I - d.clientHeight / 2, E = Math.min(y, Math.max(0, B));
|
|
1531
|
+
d.scrollTo({ top: E, behavior: "smooth" });
|
|
1527
1532
|
};
|
|
1528
|
-
return
|
|
1533
|
+
return D(() => {
|
|
1529
1534
|
if (!e) return;
|
|
1530
1535
|
const c = (d) => {
|
|
1531
1536
|
d.key === "Escape" && t();
|
|
1532
1537
|
};
|
|
1533
1538
|
return window.addEventListener("keydown", c), () => window.removeEventListener("keydown", c);
|
|
1534
|
-
}, [t, e]),
|
|
1539
|
+
}, [t, e]), D(() => {
|
|
1535
1540
|
if (typeof window > "u") return;
|
|
1536
|
-
const c = () =>
|
|
1541
|
+
const c = () => xe({ width: window.innerWidth, height: window.innerHeight });
|
|
1537
1542
|
return c(), window.addEventListener("resize", c), () => window.removeEventListener("resize", c);
|
|
1538
|
-
}, []),
|
|
1539
|
-
if (
|
|
1540
|
-
|
|
1543
|
+
}, []), D(() => {
|
|
1544
|
+
if (J.current != null && (window.clearTimeout(J.current), J.current = null), e) {
|
|
1545
|
+
le(!0);
|
|
1541
1546
|
return;
|
|
1542
1547
|
}
|
|
1543
|
-
|
|
1544
|
-
|
|
1548
|
+
J.current = window.setTimeout(() => {
|
|
1549
|
+
le(!1), J.current = null;
|
|
1545
1550
|
}, 220);
|
|
1546
|
-
}, [e]),
|
|
1547
|
-
|
|
1548
|
-
}, []),
|
|
1551
|
+
}, [e]), D(() => () => {
|
|
1552
|
+
J.current != null && window.clearTimeout(J.current);
|
|
1553
|
+
}, []), D(() => () => {
|
|
1554
|
+
ke.current != null && window.clearTimeout(ke.current);
|
|
1555
|
+
}, []), D(() => () => {
|
|
1549
1556
|
Ie.current != null && window.clearTimeout(Ie.current);
|
|
1550
|
-
}, []),
|
|
1551
|
-
|
|
1552
|
-
}, []), O(() => {
|
|
1553
|
-
if (!e || !he) return;
|
|
1557
|
+
}, []), D(() => {
|
|
1558
|
+
if (!e || !se) return;
|
|
1554
1559
|
const c = requestAnimationFrame(() => {
|
|
1555
1560
|
var d;
|
|
1556
|
-
return (d =
|
|
1561
|
+
return (d = Z.current) == null ? void 0 : d.focus();
|
|
1557
1562
|
});
|
|
1558
1563
|
return () => cancelAnimationFrame(c);
|
|
1559
|
-
}, [e,
|
|
1560
|
-
const c =
|
|
1561
|
-
if (
|
|
1562
|
-
const d =
|
|
1564
|
+
}, [e, se]), D(() => {
|
|
1565
|
+
const c = bt.current;
|
|
1566
|
+
if (bt.current = M, M <= c) return;
|
|
1567
|
+
const d = $e.current;
|
|
1563
1568
|
if (!d) return;
|
|
1564
|
-
const v =
|
|
1565
|
-
if (
|
|
1566
|
-
const
|
|
1567
|
-
const w = d.querySelector(`[data-box-slot="${
|
|
1569
|
+
const v = he.some((w) => w.minBundleSize === M), o = he.find((w) => w.minBundleSize > M), l = o && v ? o.minBundleSize - 1 : o ? null : M - 1;
|
|
1570
|
+
if (l == null || l < 0) return;
|
|
1571
|
+
const m = requestAnimationFrame(() => {
|
|
1572
|
+
const w = d.querySelector(`[data-box-slot="${l}"]`);
|
|
1568
1573
|
if (!w) return;
|
|
1569
|
-
const y = d.getBoundingClientRect(),
|
|
1570
|
-
if (
|
|
1571
|
-
const
|
|
1572
|
-
d.scrollTo({ left:
|
|
1574
|
+
const y = d.getBoundingClientRect(), B = w.getBoundingClientRect().right - y.right;
|
|
1575
|
+
if (B <= 1) return;
|
|
1576
|
+
const E = Math.max(0, d.scrollWidth - d.clientWidth), ee = Math.min(E, Math.max(0, d.scrollLeft + B));
|
|
1577
|
+
d.scrollTo({ left: ee, behavior: "smooth" });
|
|
1573
1578
|
});
|
|
1574
|
-
return () => cancelAnimationFrame(
|
|
1575
|
-
}, [
|
|
1579
|
+
return () => cancelAnimationFrame(m);
|
|
1580
|
+
}, [M, he]), D(() => {
|
|
1576
1581
|
if (!e) return;
|
|
1577
|
-
const c =
|
|
1578
|
-
if (
|
|
1579
|
-
const d =
|
|
1580
|
-
d && (
|
|
1581
|
-
|
|
1582
|
-
discount:
|
|
1582
|
+
const c = De.current;
|
|
1583
|
+
if (De.current = M, M <= c) return;
|
|
1584
|
+
const d = he.find((v) => v.minBundleSize === M);
|
|
1585
|
+
d && (Ke(
|
|
1586
|
+
N("bundle.celebration.received_discount", {
|
|
1587
|
+
discount: R(d.discountPercent)
|
|
1583
1588
|
})
|
|
1584
|
-
),
|
|
1585
|
-
|
|
1589
|
+
), je((v) => v + 1), qe(!0), Ie.current != null && window.clearTimeout(Ie.current), Ie.current = window.setTimeout(() => {
|
|
1590
|
+
qe(!1), Ie.current = null;
|
|
1586
1591
|
}, f));
|
|
1587
|
-
}, [
|
|
1588
|
-
if (!e || !
|
|
1592
|
+
}, [M, e, he]), D(() => {
|
|
1593
|
+
if (!e || !Te || !Me) return;
|
|
1589
1594
|
const c = requestAnimationFrame(() => {
|
|
1590
1595
|
var y;
|
|
1591
|
-
const d =
|
|
1592
|
-
x:
|
|
1593
|
-
y:
|
|
1596
|
+
const d = ne.current, v = d == null ? void 0 : d.getBoundingClientRect(), o = (y = st.current) == null ? void 0 : y.getBoundingClientRect(), l = v ? v.left + v.width / 2 : o ? o.left + o.width / 2 : window.innerWidth / 2, m = v ? v.top + v.height / 2 : o ? o.top + o.height / 2 : window.innerHeight / 2, w = {
|
|
1597
|
+
x: l - 2,
|
|
1598
|
+
y: m - 2,
|
|
1594
1599
|
w: 4,
|
|
1595
1600
|
h: 4
|
|
1596
1601
|
};
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
},
|
|
1602
|
+
Ee(w), Be((I) => I + 1), Pe(!0), ke.current != null && window.clearTimeout(ke.current), ke.current = window.setTimeout(() => {
|
|
1603
|
+
Pe(!1), ke.current = null;
|
|
1604
|
+
}, at);
|
|
1600
1605
|
});
|
|
1601
1606
|
return () => cancelAnimationFrame(c);
|
|
1602
|
-
}, [We, Me,
|
|
1607
|
+
}, [We, Me, at, Te, e]), D(() => {
|
|
1603
1608
|
var c;
|
|
1604
|
-
e && ((c =
|
|
1605
|
-
}, [e]),
|
|
1609
|
+
e && ((c = st.current) == null || c.focus());
|
|
1610
|
+
}, [e]), ae ? /* @__PURE__ */ T(
|
|
1606
1611
|
"div",
|
|
1607
1612
|
{
|
|
1608
1613
|
role: "dialog",
|
|
1609
1614
|
"aria-modal": "true",
|
|
1610
|
-
"aria-label":
|
|
1611
|
-
className: [
|
|
1615
|
+
"aria-label": N("bundle.drawer.aria"),
|
|
1616
|
+
className: [b.backdrop, e ? b.backdropOpen : b.backdropClosed, n.className].filter(Boolean).join(" "),
|
|
1612
1617
|
onMouseDown: (c) => {
|
|
1613
1618
|
c.target === c.currentTarget && t();
|
|
1614
1619
|
},
|
|
1615
1620
|
children: [
|
|
1616
|
-
|
|
1617
|
-
|
|
1621
|
+
Ne && ge && ue.width > 0 && ue.height > 0 ? /* @__PURE__ */ s(
|
|
1622
|
+
In,
|
|
1618
1623
|
{
|
|
1619
|
-
width:
|
|
1620
|
-
height:
|
|
1621
|
-
confettiSource:
|
|
1624
|
+
width: ue.width,
|
|
1625
|
+
height: ue.height,
|
|
1626
|
+
confettiSource: ge,
|
|
1622
1627
|
colors: x,
|
|
1623
1628
|
recycle: !1,
|
|
1624
1629
|
numberOfPieces: 70,
|
|
@@ -1628,131 +1633,131 @@ function Ii(n) {
|
|
|
1628
1633
|
initialVelocityX: { min: -6, max: 6 },
|
|
1629
1634
|
style: { position: "fixed", inset: 0, pointerEvents: "none", zIndex: 2147483646 }
|
|
1630
1635
|
},
|
|
1631
|
-
|
|
1636
|
+
de
|
|
1632
1637
|
) : null,
|
|
1633
|
-
/* @__PURE__ */
|
|
1634
|
-
|
|
1635
|
-
/* @__PURE__ */
|
|
1636
|
-
/* @__PURE__ */
|
|
1638
|
+
/* @__PURE__ */ T("aside", { ref: st, className: [b.panel, e ? b.panelOpen : b.panelClosed].filter(Boolean).join(" "), tabIndex: -1, children: [
|
|
1639
|
+
Te && Me ? /* @__PURE__ */ s("div", { className: b.celebrationOverlay, "aria-hidden": "true", children: /* @__PURE__ */ s("div", { ref: ne, className: b.celebrationChip, children: Me }, We) }) : null,
|
|
1640
|
+
/* @__PURE__ */ T("header", { className: [b.header, se ? b.headerSearchOpen : null].filter(Boolean).join(" "), children: [
|
|
1641
|
+
/* @__PURE__ */ s(
|
|
1637
1642
|
"button",
|
|
1638
1643
|
{
|
|
1639
1644
|
type: "button",
|
|
1640
|
-
className:
|
|
1641
|
-
"aria-label":
|
|
1642
|
-
"aria-expanded":
|
|
1645
|
+
className: b.searchIconButton,
|
|
1646
|
+
"aria-label": N(se ? "bundle.search.expanded" : "bundle.search"),
|
|
1647
|
+
"aria-expanded": se,
|
|
1643
1648
|
onClick: () => {
|
|
1644
|
-
|
|
1649
|
+
L(!0);
|
|
1645
1650
|
},
|
|
1646
|
-
children: /* @__PURE__ */
|
|
1651
|
+
children: /* @__PURE__ */ s(Pn, { size: 18, "aria-hidden": "true" })
|
|
1647
1652
|
}
|
|
1648
1653
|
),
|
|
1649
|
-
/* @__PURE__ */
|
|
1650
|
-
/* @__PURE__ */
|
|
1651
|
-
/* @__PURE__ */
|
|
1652
|
-
/* @__PURE__ */
|
|
1654
|
+
/* @__PURE__ */ T("div", { className: b.headerCenter, children: [
|
|
1655
|
+
/* @__PURE__ */ s("div", { className: b.headerTitleWrap, "aria-hidden": se, children: /* @__PURE__ */ s("h2", { className: b.title, children: H }) }),
|
|
1656
|
+
/* @__PURE__ */ s("div", { className: b.headerSearchWrap, "aria-hidden": !se, children: /* @__PURE__ */ T("div", { className: b.searchBar, children: [
|
|
1657
|
+
/* @__PURE__ */ s(
|
|
1653
1658
|
"input",
|
|
1654
1659
|
{
|
|
1655
|
-
ref:
|
|
1656
|
-
className:
|
|
1660
|
+
ref: Z,
|
|
1661
|
+
className: b.searchInput,
|
|
1657
1662
|
type: "search",
|
|
1658
|
-
value:
|
|
1659
|
-
placeholder:
|
|
1660
|
-
onChange: (c) =>
|
|
1663
|
+
value: O,
|
|
1664
|
+
placeholder: N("bundle.search.placeholder"),
|
|
1665
|
+
onChange: (c) => X(c.target.value),
|
|
1661
1666
|
onBlur: () => {
|
|
1662
|
-
|
|
1667
|
+
O.trim() === "" && L(!1);
|
|
1663
1668
|
}
|
|
1664
1669
|
}
|
|
1665
1670
|
),
|
|
1666
|
-
|
|
1671
|
+
O.trim() ? /* @__PURE__ */ s(
|
|
1667
1672
|
"button",
|
|
1668
1673
|
{
|
|
1669
1674
|
type: "button",
|
|
1670
|
-
className:
|
|
1675
|
+
className: b.searchClearButton,
|
|
1671
1676
|
onMouseDown: (c) => {
|
|
1672
1677
|
c.preventDefault();
|
|
1673
1678
|
},
|
|
1674
1679
|
onClick: () => {
|
|
1675
1680
|
var c;
|
|
1676
|
-
|
|
1681
|
+
X(""), (c = Z.current) == null || c.focus();
|
|
1677
1682
|
},
|
|
1678
|
-
"aria-label":
|
|
1679
|
-
children:
|
|
1683
|
+
"aria-label": N("bundle.search.clear"),
|
|
1684
|
+
children: N("bundle.search.clear")
|
|
1680
1685
|
}
|
|
1681
1686
|
) : null
|
|
1682
1687
|
] }) })
|
|
1683
1688
|
] }),
|
|
1684
|
-
/* @__PURE__ */
|
|
1689
|
+
/* @__PURE__ */ s("button", { type: "button", onClick: t, disabled: r, className: b.closeButton, "aria-label": N("bundle.close"), children: "×" })
|
|
1685
1690
|
] }),
|
|
1686
|
-
/* @__PURE__ */
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
/* @__PURE__ */
|
|
1690
|
-
var
|
|
1691
|
-
const d =
|
|
1692
|
-
return /* @__PURE__ */
|
|
1691
|
+
/* @__PURE__ */ T("div", { className: b.body, ref: mt, children: [
|
|
1692
|
+
i ? /* @__PURE__ */ s("p", { className: b.muted, children: N("bundle.loading") }) : null,
|
|
1693
|
+
a ? /* @__PURE__ */ s("p", { className: b.error, children: a }) : null,
|
|
1694
|
+
/* @__PURE__ */ s("div", { className: b.variants, children: !i && !a && S.length === 0 ? /* @__PURE__ */ s("p", { className: b.emptyState, children: N("bundle.empty") }) : /* @__PURE__ */ s("ul", { className: b.variantList, children: Oe.map((c) => {
|
|
1695
|
+
var we, ze, et, tt;
|
|
1696
|
+
const d = ce[c.id] ?? 0, v = U(c), o = A(c.selectedOptions), l = Q(c), m = $(c.id), w = m ?? Number.POSITIVE_INFINITY, y = d >= w, I = c.availableForSale !== !1 && !Fe && !y, B = c.availableForSale === !1 ? null : y ? N("bundle.stock.max_reached") : null, E = Ae, ee = Number(c.price), te = E != null && Number.isFinite(E) && E > 0 && Number.isFinite(ee), pe = te ? Math.round(ee * (1 - E / 100) * 100) / 100 : null;
|
|
1697
|
+
return /* @__PURE__ */ T(
|
|
1693
1698
|
"li",
|
|
1694
1699
|
{
|
|
1695
|
-
className: [
|
|
1700
|
+
className: [b.variantRow, c.availableForSale === !1 && b.variantRowSoldOut].filter(Boolean).join(" "),
|
|
1696
1701
|
"data-variant-row": c.id,
|
|
1697
1702
|
children: [
|
|
1698
|
-
/* @__PURE__ */
|
|
1699
|
-
/* @__PURE__ */
|
|
1703
|
+
/* @__PURE__ */ T("div", { className: b.variantLeft, children: [
|
|
1704
|
+
/* @__PURE__ */ s("div", { className: b.variantThumb, "aria-hidden": "true", children: (we = c.image) != null && we.url ? /* @__PURE__ */ s(
|
|
1700
1705
|
"img",
|
|
1701
1706
|
{
|
|
1702
|
-
className:
|
|
1707
|
+
className: b.variantThumbImg,
|
|
1703
1708
|
src: c.image.url,
|
|
1704
|
-
alt: c.image.altText ??
|
|
1709
|
+
alt: c.image.altText ?? l,
|
|
1705
1710
|
loading: "lazy"
|
|
1706
1711
|
}
|
|
1707
|
-
) : /* @__PURE__ */
|
|
1708
|
-
/* @__PURE__ */
|
|
1709
|
-
/* @__PURE__ */
|
|
1710
|
-
o ? /* @__PURE__ */
|
|
1711
|
-
/* @__PURE__ */
|
|
1712
|
-
|
|
1713
|
-
/* @__PURE__ */
|
|
1714
|
-
|
|
1712
|
+
) : /* @__PURE__ */ s("div", { className: b.variantThumbFallback, children: ((tt = (et = (ze = c.product) == null ? void 0 : ze.title) == null ? void 0 : et.slice(0, 1)) == null ? void 0 : tt.toUpperCase()) ?? "•" }) }),
|
|
1713
|
+
/* @__PURE__ */ T("div", { className: b.variantInfo, children: [
|
|
1714
|
+
/* @__PURE__ */ s("div", { className: b.variantName, children: v }),
|
|
1715
|
+
o ? /* @__PURE__ */ s("div", { className: b.variantMeta, children: o }) : null,
|
|
1716
|
+
/* @__PURE__ */ T("div", { className: b.variantPriceRow, children: [
|
|
1717
|
+
te ? /* @__PURE__ */ s("span", { className: b.variantCompareAt, children: z(Number.isFinite(ee) ? ee.toFixed(2) : c.price) }) : null,
|
|
1718
|
+
/* @__PURE__ */ s("span", { className: b.variantPrice, children: z(
|
|
1719
|
+
pe != null ? pe.toFixed(2) : Number.isFinite(ee) ? ee.toFixed(2) : c.price
|
|
1715
1720
|
) })
|
|
1716
1721
|
] })
|
|
1717
1722
|
] })
|
|
1718
1723
|
] }),
|
|
1719
|
-
c.availableForSale === !1 ? /* @__PURE__ */
|
|
1724
|
+
c.availableForSale === !1 ? /* @__PURE__ */ s("div", { className: b.soldOutContainer, children: /* @__PURE__ */ s("span", { className: b.soldOut, "aria-label": N("bundle.a11y.sold_out", { name: l }), children: N("bundle.stock.sold_out") }) }) : d <= 0 && w <= 0 ? /* @__PURE__ */ s("div", { className: b.stockLimitContainer, children: /* @__PURE__ */ s("span", { className: b.stockLimitNotice, "aria-label": N("bundle.a11y.max_available_selected", { name: l }), children: N("bundle.stock.max_added") }) }) : d <= 0 ? /* @__PURE__ */ s(
|
|
1720
1725
|
"button",
|
|
1721
1726
|
{
|
|
1722
1727
|
type: "button",
|
|
1723
|
-
onClick: () =>
|
|
1724
|
-
disabled:
|
|
1725
|
-
className:
|
|
1726
|
-
"aria-label":
|
|
1727
|
-
children:
|
|
1728
|
+
onClick: () => me(c.id, 1),
|
|
1729
|
+
disabled: r || !I,
|
|
1730
|
+
className: b.addToBundleButton,
|
|
1731
|
+
"aria-label": B ? `${l} ${B.toLowerCase()}` : N("bundle.a11y.add_to_bundle", { name: l }),
|
|
1732
|
+
children: N("bundle.cta.add_to_bundle")
|
|
1728
1733
|
}
|
|
1729
|
-
) : /* @__PURE__ */
|
|
1730
|
-
/* @__PURE__ */
|
|
1731
|
-
/* @__PURE__ */
|
|
1734
|
+
) : /* @__PURE__ */ T("div", { className: b.qtyControlsWrap, children: [
|
|
1735
|
+
/* @__PURE__ */ T("div", { className: b.qtyControls, children: [
|
|
1736
|
+
/* @__PURE__ */ s(
|
|
1732
1737
|
"button",
|
|
1733
1738
|
{
|
|
1734
1739
|
type: "button",
|
|
1735
|
-
onClick: () =>
|
|
1736
|
-
disabled:
|
|
1737
|
-
className:
|
|
1738
|
-
"aria-label":
|
|
1740
|
+
onClick: () => me(c.id, d - 1),
|
|
1741
|
+
disabled: r || d <= 0,
|
|
1742
|
+
className: b.qtyButton,
|
|
1743
|
+
"aria-label": N("bundle.a11y.decrease", { name: l }),
|
|
1739
1744
|
children: "−"
|
|
1740
1745
|
}
|
|
1741
1746
|
),
|
|
1742
|
-
/* @__PURE__ */
|
|
1743
|
-
/* @__PURE__ */
|
|
1747
|
+
/* @__PURE__ */ s("span", { className: b.qtyValue, "aria-label": N("bundle.a11y.quantity", { name: l, qty: d }), children: d }),
|
|
1748
|
+
/* @__PURE__ */ s(
|
|
1744
1749
|
"button",
|
|
1745
1750
|
{
|
|
1746
1751
|
type: "button",
|
|
1747
|
-
onClick: () =>
|
|
1748
|
-
disabled:
|
|
1749
|
-
className:
|
|
1750
|
-
"aria-label":
|
|
1752
|
+
onClick: () => me(c.id, d + 1),
|
|
1753
|
+
disabled: r || !I,
|
|
1754
|
+
className: b.qtyButton,
|
|
1755
|
+
"aria-label": B ? `${l} ${B.toLowerCase()}` : N("bundle.a11y.increase", { name: l }),
|
|
1751
1756
|
children: "+"
|
|
1752
1757
|
}
|
|
1753
1758
|
)
|
|
1754
1759
|
] }),
|
|
1755
|
-
|
|
1760
|
+
B ? /* @__PURE__ */ s("div", { className: b.stockLimitNotice, children: B }) : null
|
|
1756
1761
|
] })
|
|
1757
1762
|
]
|
|
1758
1763
|
},
|
|
@@ -1760,86 +1765,86 @@ function Ii(n) {
|
|
|
1760
1765
|
);
|
|
1761
1766
|
}) }) })
|
|
1762
1767
|
] }),
|
|
1763
|
-
/* @__PURE__ */
|
|
1764
|
-
/* @__PURE__ */
|
|
1765
|
-
var
|
|
1766
|
-
const v =
|
|
1767
|
-
return /* @__PURE__ */
|
|
1768
|
-
/* @__PURE__ */
|
|
1768
|
+
/* @__PURE__ */ T("footer", { className: b.footer, ref: V, children: [
|
|
1769
|
+
/* @__PURE__ */ s("div", { className: b.boxSummaryWindow, ref: $e, children: /* @__PURE__ */ s("div", { className: b.boxSummaryRow, "aria-label": "Bundle box summary", children: Array.from({ length: Qe }).map((c, d) => {
|
|
1770
|
+
var B, E, ee, te;
|
|
1771
|
+
const v = ot[d], o = He.get(d), l = !!v, m = !!o, w = m && !l, y = o ? N("bundle.discount.off_label", { discount: R(o.discountPercent) }) : null, I = l ? v.displayName : N("bundle.slot", { slot: d + 1 });
|
|
1772
|
+
return /* @__PURE__ */ T("div", { "data-box-slot": d, className: b.boxSlot, children: [
|
|
1773
|
+
/* @__PURE__ */ s(
|
|
1769
1774
|
"div",
|
|
1770
1775
|
{
|
|
1771
1776
|
className: [
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1777
|
+
b.boxItem,
|
|
1778
|
+
l ? b.boxItemFilled : b.boxItemPlaceholder,
|
|
1779
|
+
m ? b.boxItemThreshold : null,
|
|
1780
|
+
l ? b.boxItemClickable : null
|
|
1776
1781
|
].filter(Boolean).join(" "),
|
|
1777
|
-
role:
|
|
1778
|
-
tabIndex:
|
|
1779
|
-
onClick:
|
|
1780
|
-
onKeyDown:
|
|
1781
|
-
(
|
|
1782
|
+
role: l ? "button" : void 0,
|
|
1783
|
+
tabIndex: l ? 0 : void 0,
|
|
1784
|
+
onClick: l ? () => Ve(v.id) : void 0,
|
|
1785
|
+
onKeyDown: l ? (pe) => {
|
|
1786
|
+
(pe.key === "Enter" || pe.key === " ") && (pe.preventDefault(), Ve(v.id));
|
|
1782
1787
|
} : void 0,
|
|
1783
|
-
"aria-label": w && y ? `${
|
|
1784
|
-
title: w && y ? `${
|
|
1785
|
-
children:
|
|
1788
|
+
"aria-label": w && y ? `${I}. ${N("bundle.unlocks", { discount: y })}.` : I,
|
|
1789
|
+
title: w && y ? `${I} • ${N("bundle.unlocks", { discount: y })}` : I,
|
|
1790
|
+
children: l ? (B = v.image) != null && B.url ? /* @__PURE__ */ s(
|
|
1786
1791
|
"img",
|
|
1787
1792
|
{
|
|
1788
|
-
className:
|
|
1793
|
+
className: b.boxItemImage,
|
|
1789
1794
|
src: v.image.url,
|
|
1790
1795
|
alt: v.image.altText ?? v.displayName,
|
|
1791
1796
|
loading: "lazy"
|
|
1792
1797
|
}
|
|
1793
|
-
) : /* @__PURE__ */
|
|
1798
|
+
) : /* @__PURE__ */ s("div", { className: b.boxItemFallback, "aria-hidden": "true", children: ((te = (ee = (E = v.product) == null ? void 0 : E.title) == null ? void 0 : ee.slice(0, 1)) == null ? void 0 : te.toUpperCase()) ?? "•" }) : w && y ? /* @__PURE__ */ s("div", { className: b.boxItemDiscountText, children: y }) : /* @__PURE__ */ s("div", { className: b.boxItemPlus, "aria-hidden": "true", children: "+" })
|
|
1794
1799
|
}
|
|
1795
1800
|
),
|
|
1796
|
-
|
|
1801
|
+
m ? /* @__PURE__ */ s("div", { className: b.boxThresholdLabel, children: o.label }) : null
|
|
1797
1802
|
] }, d);
|
|
1798
1803
|
}) }) }),
|
|
1799
|
-
/* @__PURE__ */
|
|
1804
|
+
/* @__PURE__ */ s(
|
|
1800
1805
|
"div",
|
|
1801
1806
|
{
|
|
1802
|
-
className: [
|
|
1803
|
-
"aria-hidden": !
|
|
1804
|
-
children: /* @__PURE__ */
|
|
1805
|
-
|
|
1806
|
-
/* @__PURE__ */
|
|
1807
|
-
/* @__PURE__ */
|
|
1807
|
+
className: [b.ctaTotalsWrap, C ? b.ctaTotalsWrapVisible : null].filter(Boolean).join(" "),
|
|
1808
|
+
"aria-hidden": !C,
|
|
1809
|
+
children: /* @__PURE__ */ T("div", { className: b.ctaTotals, "aria-label": N("bundle.totals"), children: [
|
|
1810
|
+
Ae ? /* @__PURE__ */ s("span", { className: b.ctaDiscountBadge, children: N("bundle.discount.badge", { discount: Ae }) }) : /* @__PURE__ */ s("span", {}),
|
|
1811
|
+
/* @__PURE__ */ s("span", { children: Ae ? /* @__PURE__ */ T(Nt, { children: [
|
|
1812
|
+
/* @__PURE__ */ s("span", { className: b.ctaTotalsStrike, children: z(be.toFixed(2)) }),
|
|
1808
1813
|
" ",
|
|
1809
|
-
/* @__PURE__ */
|
|
1810
|
-
] }) : /* @__PURE__ */
|
|
1814
|
+
/* @__PURE__ */ s("span", { className: b.ctaTotalsPrice, children: z(Ue.toFixed(2)) })
|
|
1815
|
+
] }) : /* @__PURE__ */ s("span", { className: b.ctaTotalsPrice, children: z(be.toFixed(2)) }) })
|
|
1811
1816
|
] })
|
|
1812
1817
|
}
|
|
1813
1818
|
),
|
|
1814
1819
|
(() => {
|
|
1815
1820
|
const c = (u == null ? void 0 : u.ctaButtonMode) || "add_to_cart";
|
|
1816
|
-
return c === "add_to_cart_checkout" ?
|
|
1817
|
-
/* @__PURE__ */
|
|
1821
|
+
return c === "add_to_cart_checkout" ? G > 0 ? /* @__PURE__ */ s("button", { type: "button", onClick: K, disabled: !F, className: b.cta, children: r ? N("bundle.cta.adding") : N("bundle.cta.add_more", { count: G, productWord: ut(j, G) }) }) : /* @__PURE__ */ T("div", { className: `${b.ctaButtonGroup} ${Re ? b.ctaButtonGroupAnimating : ""}`, children: [
|
|
1822
|
+
/* @__PURE__ */ s(
|
|
1818
1823
|
"button",
|
|
1819
1824
|
{
|
|
1820
1825
|
type: "button",
|
|
1821
1826
|
onClick: K,
|
|
1822
|
-
disabled: !
|
|
1823
|
-
className: `${
|
|
1824
|
-
children: /* @__PURE__ */
|
|
1827
|
+
disabled: !F,
|
|
1828
|
+
className: `${b.ctaDualLeft} ${Re ? b.ctaDualLeftAnimating : ""}`,
|
|
1829
|
+
children: /* @__PURE__ */ s("span", { children: N(r ? "bundle.cta.adding" : "bundle.cta.add_to_basket") })
|
|
1825
1830
|
}
|
|
1826
1831
|
),
|
|
1827
|
-
/* @__PURE__ */
|
|
1832
|
+
/* @__PURE__ */ s(
|
|
1828
1833
|
"button",
|
|
1829
1834
|
{
|
|
1830
1835
|
type: "button",
|
|
1831
1836
|
onClick: g,
|
|
1832
|
-
disabled: !
|
|
1833
|
-
className: `${
|
|
1834
|
-
children: /* @__PURE__ */
|
|
1837
|
+
disabled: !F,
|
|
1838
|
+
className: `${b.ctaDualRight} ${Re ? b.ctaDualRightAnimating : ""}`,
|
|
1839
|
+
children: /* @__PURE__ */ s("span", { children: N(r ? "bundle.cta.processing" : "bundle.cta.checkout") })
|
|
1835
1840
|
}
|
|
1836
1841
|
)
|
|
1837
|
-
] }) : c === "checkout" ? /* @__PURE__ */
|
|
1842
|
+
] }) : c === "checkout" ? /* @__PURE__ */ s("button", { type: "button", onClick: g, disabled: !F, className: b.cta, children: r ? N("bundle.cta.processing") : G > 0 ? N("bundle.cta.add_more", { count: G, productWord: ut(j, G) }) : N("bundle.cta.checkout") }) : /* @__PURE__ */ s("button", { type: "button", onClick: K, disabled: !F, className: b.cta, children: r ? N("bundle.cta.adding") : G > 0 ? N("bundle.cta.add_more", { count: G, productWord: ut(j, G) }) : N("bundle.cta.add_to_basket") });
|
|
1838
1843
|
})(),
|
|
1839
|
-
/* @__PURE__ */
|
|
1840
|
-
|
|
1844
|
+
/* @__PURE__ */ T("div", { className: b.poweredBy, children: [
|
|
1845
|
+
N("bundle.powered_by"),
|
|
1841
1846
|
" ",
|
|
1842
|
-
/* @__PURE__ */
|
|
1847
|
+
/* @__PURE__ */ s("a", { href: "https://apps.shopify.com/best-bundles", target: "_blank", rel: "noopener noreferrer", children: " BestBundles" })
|
|
1843
1848
|
] })
|
|
1844
1849
|
] })
|
|
1845
1850
|
] })
|
|
@@ -1847,299 +1852,298 @@ function Ii(n) {
|
|
|
1847
1852
|
}
|
|
1848
1853
|
) : null;
|
|
1849
1854
|
}
|
|
1850
|
-
const
|
|
1851
|
-
panel:
|
|
1852
|
-
header:
|
|
1853
|
-
title:
|
|
1854
|
-
status:
|
|
1855
|
-
error:
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
variantRow:
|
|
1870
|
-
variantRowInteractive:
|
|
1871
|
-
variantRowSelected:
|
|
1872
|
-
variantRowSoldOut:
|
|
1873
|
-
variantMedia:
|
|
1874
|
-
variantContent:
|
|
1875
|
-
variantHeader:
|
|
1876
|
-
variantTitle:
|
|
1877
|
-
variantImage:
|
|
1878
|
-
variantImageFallback:
|
|
1879
|
-
variantMeta:
|
|
1880
|
-
variantPrice:
|
|
1881
|
-
variantFooterRow:
|
|
1882
|
-
variantActions:
|
|
1883
|
-
qtyActions:
|
|
1884
|
-
qtyActionsWrap:
|
|
1885
|
-
soldOut:
|
|
1886
|
-
stockLimitNotice:
|
|
1887
|
-
qtyChip:
|
|
1888
|
-
qtyChipInteractive:
|
|
1889
|
-
qtyChipValue:
|
|
1890
|
-
qtyChipPlus:
|
|
1891
|
-
qtyChipClear:
|
|
1892
|
-
qtyTrash:
|
|
1893
|
-
footer:
|
|
1894
|
-
boxSummaryWindow:
|
|
1895
|
-
boxSummaryRow:
|
|
1896
|
-
boxSlot:
|
|
1897
|
-
boxItem:
|
|
1898
|
-
boxItemFilled:
|
|
1899
|
-
boxItemPlaceholder:
|
|
1900
|
-
boxItemThreshold:
|
|
1901
|
-
boxItemClickable:
|
|
1902
|
-
boxItemImage:
|
|
1903
|
-
boxItemFallback:
|
|
1904
|
-
boxItemPlus:
|
|
1905
|
-
boxItemDiscountText:
|
|
1906
|
-
boxThresholdLabel:
|
|
1907
|
-
totalsReveal:
|
|
1908
|
-
totalsRevealOpen:
|
|
1909
|
-
ctaTotalsWrap:
|
|
1910
|
-
ctaTotalsWrapVisible:
|
|
1911
|
-
ctaTotals:
|
|
1912
|
-
ctaDiscountBadge:
|
|
1913
|
-
ctaTotalsStrike:
|
|
1914
|
-
ctaTotalsPrice:
|
|
1915
|
-
cta:
|
|
1916
|
-
ctaButtonGroup:
|
|
1917
|
-
ctaDualLeft:
|
|
1918
|
-
ctaDualRight:
|
|
1919
|
-
poweredBy:
|
|
1855
|
+
const tr = "_panel_gafs6_2", nr = "_header_gafs6_20", ar = "_title_gafs6_24", rr = "_status_gafs6_32", ir = "_error_gafs6_37", or = "_section_gafs6_43", sr = "_sectionTitle_gafs6_48", lr = "_rulesVisual_gafs6_101", cr = "_rulesLabelsRow_gafs6_108", ur = "_rulesLinesRow_gafs6_115", dr = "_rulesLineLabelCell_gafs6_122", hr = "_rulesLineLabel_gafs6_122", mr = "_rulesLine_gafs6_115", br = "_rulesLineEmpty_gafs6_156", fr = "_rulesLineFilled_gafs6_160", pr = "_variants_gafs6_164", _r = "_variantList_gafs6_172", gr = "_emptyState_gafs6_180", wr = "_variantRow_gafs6_192", yr = "_variantRowInteractive_gafs6_204", vr = "_variantRowSelected_gafs6_208", xr = "_variantRowSoldOut_gafs6_213", Nr = "_variantMedia_gafs6_217", Ir = "_variantContent_gafs6_225", Sr = "_variantHeader_gafs6_233", Cr = "_variantTitle_gafs6_239", Br = "_variantImage_gafs6_253", kr = "_variantImageFallback_gafs6_261", Tr = "_variantMeta_gafs6_274", Lr = "_variantPrice_gafs6_279", Rr = "_variantFooterRow_gafs6_285", Pr = "_variantActions_gafs6_292", Mr = "_qtyActions_gafs6_298", Fr = "_qtyActionsWrap_gafs6_304", Or = "_soldOut_gafs6_355", Ar = "_stockLimitNotice_gafs6_363", Er = "_qtyChip_gafs6_372", Dr = "_qtyChipInteractive_gafs6_387", qr = "_qtyChipValue_gafs6_391", $r = "_qtyChipPlus_gafs6_397", Vr = "_qtyChipClear_gafs6_402", zr = "_qtyTrash_gafs6_431", Wr = "_footer_gafs6_443", jr = "_boxSummaryWindow_gafs6_448", Ur = "_boxSummaryRow_gafs6_462", Hr = "_boxSlot_gafs6_470", Qr = "_boxItem_gafs6_479", Gr = "_boxItemFilled_gafs6_496", Yr = "_boxItemPlaceholder_gafs6_502", Kr = "_boxItemThreshold_gafs6_508", Xr = "_boxItemClickable_gafs6_516", Zr = "_boxItemImage_gafs6_525", Jr = "_boxItemFallback_gafs6_536", ei = "_boxItemPlus_gafs6_549", ti = "_boxItemDiscountText_gafs6_561", ni = "_boxThresholdLabel_gafs6_574", ai = "_totalsReveal_gafs6_585", ri = "_totalsRevealOpen_gafs6_593", ii = "_ctaTotalsWrap_gafs6_598", oi = "_ctaTotalsWrapVisible_gafs6_603", si = "_ctaTotals_gafs6_598", li = "_ctaDiscountBadge_gafs6_618", ci = "_ctaTotalsStrike_gafs6_629", ui = "_ctaTotalsPrice_gafs6_635", di = "_cta_gafs6_598", hi = "_ctaButtonGroup_gafs6_667", mi = "_ctaDualLeft_gafs6_673", bi = "_ctaDualRight_gafs6_674", fi = "_poweredBy_gafs6_701", p = {
|
|
1856
|
+
panel: tr,
|
|
1857
|
+
header: nr,
|
|
1858
|
+
title: ar,
|
|
1859
|
+
status: rr,
|
|
1860
|
+
error: ir,
|
|
1861
|
+
section: or,
|
|
1862
|
+
sectionTitle: sr,
|
|
1863
|
+
rulesVisual: lr,
|
|
1864
|
+
rulesLabelsRow: cr,
|
|
1865
|
+
rulesLinesRow: ur,
|
|
1866
|
+
rulesLineLabelCell: dr,
|
|
1867
|
+
rulesLineLabel: hr,
|
|
1868
|
+
rulesLine: mr,
|
|
1869
|
+
rulesLineEmpty: br,
|
|
1870
|
+
rulesLineFilled: fr,
|
|
1871
|
+
variants: pr,
|
|
1872
|
+
variantList: _r,
|
|
1873
|
+
emptyState: gr,
|
|
1874
|
+
variantRow: wr,
|
|
1875
|
+
variantRowInteractive: yr,
|
|
1876
|
+
variantRowSelected: vr,
|
|
1877
|
+
variantRowSoldOut: xr,
|
|
1878
|
+
variantMedia: Nr,
|
|
1879
|
+
variantContent: Ir,
|
|
1880
|
+
variantHeader: Sr,
|
|
1881
|
+
variantTitle: Cr,
|
|
1882
|
+
variantImage: Br,
|
|
1883
|
+
variantImageFallback: kr,
|
|
1884
|
+
variantMeta: Tr,
|
|
1885
|
+
variantPrice: Lr,
|
|
1886
|
+
variantFooterRow: Rr,
|
|
1887
|
+
variantActions: Pr,
|
|
1888
|
+
qtyActions: Mr,
|
|
1889
|
+
qtyActionsWrap: Fr,
|
|
1890
|
+
soldOut: Or,
|
|
1891
|
+
stockLimitNotice: Ar,
|
|
1892
|
+
qtyChip: Er,
|
|
1893
|
+
qtyChipInteractive: Dr,
|
|
1894
|
+
qtyChipValue: qr,
|
|
1895
|
+
qtyChipPlus: $r,
|
|
1896
|
+
qtyChipClear: Vr,
|
|
1897
|
+
qtyTrash: zr,
|
|
1898
|
+
footer: Wr,
|
|
1899
|
+
boxSummaryWindow: jr,
|
|
1900
|
+
boxSummaryRow: Ur,
|
|
1901
|
+
boxSlot: Hr,
|
|
1902
|
+
boxItem: Qr,
|
|
1903
|
+
boxItemFilled: Gr,
|
|
1904
|
+
boxItemPlaceholder: Yr,
|
|
1905
|
+
boxItemThreshold: Kr,
|
|
1906
|
+
boxItemClickable: Xr,
|
|
1907
|
+
boxItemImage: Zr,
|
|
1908
|
+
boxItemFallback: Jr,
|
|
1909
|
+
boxItemPlus: ei,
|
|
1910
|
+
boxItemDiscountText: ti,
|
|
1911
|
+
boxThresholdLabel: ni,
|
|
1912
|
+
totalsReveal: ai,
|
|
1913
|
+
totalsRevealOpen: ri,
|
|
1914
|
+
ctaTotalsWrap: ii,
|
|
1915
|
+
ctaTotalsWrapVisible: oi,
|
|
1916
|
+
ctaTotals: si,
|
|
1917
|
+
ctaDiscountBadge: li,
|
|
1918
|
+
ctaTotalsStrike: ci,
|
|
1919
|
+
ctaTotalsPrice: ui,
|
|
1920
|
+
cta: di,
|
|
1921
|
+
ctaButtonGroup: hi,
|
|
1922
|
+
ctaDualLeft: mi,
|
|
1923
|
+
ctaDualRight: bi,
|
|
1924
|
+
poweredBy: fi
|
|
1920
1925
|
};
|
|
1921
|
-
function
|
|
1922
|
-
var
|
|
1926
|
+
function Qi(n) {
|
|
1927
|
+
var Ie;
|
|
1923
1928
|
const {
|
|
1924
1929
|
loading: e,
|
|
1925
1930
|
submitting: t,
|
|
1926
|
-
error:
|
|
1927
|
-
currencyCode:
|
|
1928
|
-
config:
|
|
1931
|
+
error: i,
|
|
1932
|
+
currencyCode: r,
|
|
1933
|
+
config: a,
|
|
1929
1934
|
eligibleVariants: h,
|
|
1930
1935
|
selections: u,
|
|
1931
|
-
selectionOrder:
|
|
1932
|
-
getVariantMaxSelectableQuantity:
|
|
1933
|
-
setQuantity:
|
|
1934
|
-
bundleSize:
|
|
1935
|
-
minRequired:
|
|
1936
|
-
canSubmit:
|
|
1937
|
-
submit:
|
|
1938
|
-
submitAndCheckout:
|
|
1936
|
+
selectionOrder: S,
|
|
1937
|
+
getVariantMaxSelectableQuantity: ce,
|
|
1938
|
+
setQuantity: q,
|
|
1939
|
+
bundleSize: $,
|
|
1940
|
+
minRequired: me,
|
|
1941
|
+
canSubmit: M,
|
|
1942
|
+
submit: ie,
|
|
1943
|
+
submitAndCheckout: F,
|
|
1939
1944
|
locale: K,
|
|
1940
1945
|
t: g
|
|
1941
|
-
} =
|
|
1942
|
-
className:
|
|
1943
|
-
showRules:
|
|
1944
|
-
showVariants:
|
|
1945
|
-
} = n,
|
|
1946
|
-
const
|
|
1947
|
-
return Number.isFinite(
|
|
1948
|
-
},
|
|
1949
|
-
const
|
|
1950
|
-
var
|
|
1951
|
-
const
|
|
1952
|
-
return !(!
|
|
1946
|
+
} = gt(), {
|
|
1947
|
+
className: j,
|
|
1948
|
+
showRules: N = !0,
|
|
1949
|
+
showVariants: se = !0
|
|
1950
|
+
} = n, L = (f) => {
|
|
1951
|
+
const _ = Number.parseFloat(f);
|
|
1952
|
+
return Number.isFinite(_) ? String(Math.round(_)) : f;
|
|
1953
|
+
}, O = (f) => {
|
|
1954
|
+
const _ = (f ?? []).filter((x) => {
|
|
1955
|
+
var U, Q;
|
|
1956
|
+
const R = (U = x == null ? void 0 : x.name) == null ? void 0 : U.trim(), A = (Q = x == null ? void 0 : x.value) == null ? void 0 : Q.trim();
|
|
1957
|
+
return !(!R || !A || R.toLowerCase() === "title");
|
|
1953
1958
|
});
|
|
1954
|
-
return
|
|
1955
|
-
},
|
|
1956
|
-
const
|
|
1957
|
-
return Number.isFinite(
|
|
1958
|
-
},
|
|
1959
|
+
return _.length ? _.map((x) => `${x.name}: ${x.value}`).join(" • ") : null;
|
|
1960
|
+
}, X = (f) => {
|
|
1961
|
+
const _ = Number(f);
|
|
1962
|
+
return Number.isFinite(_) ? ft(_, r, K) : f;
|
|
1963
|
+
}, Z = P(() => [...h].sort((f, _) => f.displayName.localeCompare(_.displayName)), [h]), V = P(() => [...(a == null ? void 0 : a.rules) ?? []].sort((f, _) => f.minBundleSize - _.minBundleSize), [a == null ? void 0 : a.rules]), ne = P(() => Math.max(0, me - $), [$, me]), ue = P(() => {
|
|
1959
1964
|
let f = null;
|
|
1960
|
-
for (const
|
|
1961
|
-
|
|
1965
|
+
for (const _ of V)
|
|
1966
|
+
$ >= _.minBundleSize && (f = _);
|
|
1962
1967
|
return f;
|
|
1963
|
-
}, [
|
|
1964
|
-
if (!
|
|
1965
|
-
const f = Number.parseFloat(
|
|
1968
|
+
}, [$, V]), xe = P(() => {
|
|
1969
|
+
if (!ue) return null;
|
|
1970
|
+
const f = Number.parseFloat(ue.discountPercent);
|
|
1966
1971
|
return !Number.isFinite(f) || f <= 0 ? null : f;
|
|
1967
|
-
}, [
|
|
1972
|
+
}, [ue]), de = V[0], Be = !!(de && $ >= de.minBundleSize), ge = P(() => {
|
|
1968
1973
|
const f = new Map(h.map((x) => [x.id, x]));
|
|
1969
|
-
let
|
|
1970
|
-
for (const [x,
|
|
1971
|
-
const
|
|
1972
|
-
if (
|
|
1973
|
-
const
|
|
1974
|
-
Number.isFinite(
|
|
1974
|
+
let _ = 0;
|
|
1975
|
+
for (const [x, R] of Object.entries(u)) {
|
|
1976
|
+
const A = R ?? 0;
|
|
1977
|
+
if (A <= 0) continue;
|
|
1978
|
+
const U = f.get(x), Q = Number(U == null ? void 0 : U.price);
|
|
1979
|
+
Number.isFinite(Q) && (_ += Q * A);
|
|
1975
1980
|
}
|
|
1976
|
-
return Math.round(
|
|
1977
|
-
}, [h, u]),
|
|
1978
|
-
if (!
|
|
1979
|
-
const f =
|
|
1981
|
+
return Math.round(_ * 100) / 100;
|
|
1982
|
+
}, [h, u]), Ee = P(() => {
|
|
1983
|
+
if (!xe) return ge;
|
|
1984
|
+
const f = ge * (1 - xe / 100);
|
|
1980
1985
|
return Math.round(f * 100) / 100;
|
|
1981
|
-
}, [
|
|
1982
|
-
const f = new Map(h.map((
|
|
1983
|
-
return
|
|
1984
|
-
}, [h,
|
|
1985
|
-
var
|
|
1986
|
+
}, [xe, ge]), Ne = P(() => V.length ? Math.max(...V.map((f) => f.minBundleSize)) : 0, [V]), Pe = P(() => {
|
|
1987
|
+
const f = new Map(h.map((_) => [_.id, _]));
|
|
1988
|
+
return S.map((_) => f.get(_)).filter((_) => !!_);
|
|
1989
|
+
}, [h, S]), ke = P(() => {
|
|
1990
|
+
var _;
|
|
1986
1991
|
const f = /* @__PURE__ */ new Map();
|
|
1987
|
-
for (const x of
|
|
1988
|
-
const
|
|
1989
|
-
f.set(
|
|
1992
|
+
for (const x of V) {
|
|
1993
|
+
const R = Math.max(0, x.minBundleSize - 1);
|
|
1994
|
+
f.set(R, {
|
|
1990
1995
|
discountPercent: x.discountPercent,
|
|
1991
1996
|
minBundleSize: x.minBundleSize,
|
|
1992
|
-
label: ((
|
|
1997
|
+
label: ((_ = x.label) == null ? void 0 : _.trim()) || `Buy ${x.minBundleSize}+`
|
|
1993
1998
|
});
|
|
1994
1999
|
}
|
|
1995
2000
|
return f;
|
|
1996
|
-
}, [
|
|
1997
|
-
const f = Number((
|
|
1998
|
-
return Math.max(2, Math.min(100,
|
|
1999
|
-
}, [
|
|
2000
|
-
|
|
2001
|
-
const f =
|
|
2002
|
-
if (
|
|
2003
|
-
const
|
|
2004
|
-
if (!
|
|
2005
|
-
const x =
|
|
2006
|
-
if (
|
|
2007
|
-
const
|
|
2008
|
-
const
|
|
2009
|
-
if (!
|
|
2010
|
-
const
|
|
2011
|
-
if (
|
|
2012
|
-
const
|
|
2013
|
-
|
|
2001
|
+
}, [V]), De = P(() => {
|
|
2002
|
+
const f = Number((a == null ? void 0 : a.maxBundleSize) ?? NaN), _ = Number.isFinite(f) ? Math.floor(f) : 100;
|
|
2003
|
+
return Math.max(2, Math.min(100, _));
|
|
2004
|
+
}, [a == null ? void 0 : a.maxBundleSize]), at = ((Ie = a == null ? void 0 : a.title) == null ? void 0 : Ie.trim()) || g("bundle.title.default"), We = P(() => Math.max(Ne || me, Pe.length), [Pe.length, Ne, me]), je = $ >= De, Me = Y(null), Ke = Y(null), Te = Y($);
|
|
2005
|
+
D(() => {
|
|
2006
|
+
const f = Te.current;
|
|
2007
|
+
if (Te.current = $, $ <= f) return;
|
|
2008
|
+
const _ = Ke.current;
|
|
2009
|
+
if (!_) return;
|
|
2010
|
+
const x = V.some((Q) => Q.minBundleSize === $), R = V.find((Q) => Q.minBundleSize > $), A = R && x ? R.minBundleSize - 1 : R ? null : $ - 1;
|
|
2011
|
+
if (A == null || A < 0) return;
|
|
2012
|
+
const U = requestAnimationFrame(() => {
|
|
2013
|
+
const Q = _.querySelector(`[data-box-slot="${A}"]`);
|
|
2014
|
+
if (!Q) return;
|
|
2015
|
+
const ae = _.getBoundingClientRect(), J = Q.getBoundingClientRect().right - ae.right;
|
|
2016
|
+
if (J <= 1) return;
|
|
2017
|
+
const z = Math.max(0, _.scrollWidth - _.clientWidth), H = Math.min(z, Math.max(0, _.scrollLeft + J));
|
|
2018
|
+
_.scrollTo({ left: H, behavior: "smooth" });
|
|
2014
2019
|
});
|
|
2015
|
-
return () => cancelAnimationFrame(
|
|
2016
|
-
}, [
|
|
2017
|
-
const
|
|
2018
|
-
const
|
|
2019
|
-
if (!
|
|
2020
|
-
const x =
|
|
2020
|
+
return () => cancelAnimationFrame(U);
|
|
2021
|
+
}, [$, V]);
|
|
2022
|
+
const qe = (f) => {
|
|
2023
|
+
const _ = Me.current;
|
|
2024
|
+
if (!_) return;
|
|
2025
|
+
const x = _.querySelector(`[data-variant-row="${f}"]`);
|
|
2021
2026
|
x && x.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
2022
2027
|
};
|
|
2023
|
-
return /* @__PURE__ */
|
|
2024
|
-
/* @__PURE__ */
|
|
2025
|
-
e ? /* @__PURE__ */
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
return /* @__PURE__ */ l("div", { className: _.rulesLineLabelCell, children: M ? /* @__PURE__ */ l("span", { className: _.rulesLineLabel, children: M }) : null }, x);
|
|
2028
|
+
return /* @__PURE__ */ T("section", { className: [p.panel, j].filter(Boolean).join(" "), "aria-busy": e, children: [
|
|
2029
|
+
/* @__PURE__ */ s("header", { className: p.header, children: /* @__PURE__ */ s("h2", { className: p.title, children: at }) }),
|
|
2030
|
+
e ? /* @__PURE__ */ s("div", { className: p.status, children: g("bundle.loading") }) : null,
|
|
2031
|
+
i ? /* @__PURE__ */ s("div", { className: p.error, children: i }) : null,
|
|
2032
|
+
N && V.length ? /* @__PURE__ */ s("div", { className: p.section, children: /* @__PURE__ */ T("div", { className: p.rulesVisual, children: [
|
|
2033
|
+
/* @__PURE__ */ s("div", { className: p.rulesLabelsRow, children: Array.from({ length: Ne }).map((f, _) => {
|
|
2034
|
+
const x = _ + 1, R = V.find((U) => U.minBundleSize === x), A = R ? g("bundle.discount.off_label", { discount: L(R.discountPercent) }) : null;
|
|
2035
|
+
return /* @__PURE__ */ s("div", { className: p.rulesLineLabelCell, children: A ? /* @__PURE__ */ s("span", { className: p.rulesLineLabel, children: A }) : null }, x);
|
|
2032
2036
|
}) }),
|
|
2033
|
-
/* @__PURE__ */
|
|
2034
|
-
const x =
|
|
2035
|
-
return /* @__PURE__ */
|
|
2037
|
+
/* @__PURE__ */ s("div", { className: p.rulesLinesRow, children: Array.from({ length: Ne }).map((f, _) => {
|
|
2038
|
+
const x = _ + 1, R = $ >= x;
|
|
2039
|
+
return /* @__PURE__ */ s(
|
|
2036
2040
|
"div",
|
|
2037
2041
|
{
|
|
2038
2042
|
className: [
|
|
2039
|
-
|
|
2040
|
-
|
|
2043
|
+
p.rulesLine,
|
|
2044
|
+
R ? p.rulesLineFilled : p.rulesLineEmpty
|
|
2041
2045
|
].filter(Boolean).join(" ")
|
|
2042
2046
|
},
|
|
2043
2047
|
x
|
|
2044
2048
|
);
|
|
2045
2049
|
}) })
|
|
2046
2050
|
] }) }) : null,
|
|
2047
|
-
|
|
2048
|
-
/* @__PURE__ */
|
|
2049
|
-
/* @__PURE__ */
|
|
2050
|
-
var
|
|
2051
|
-
const
|
|
2052
|
-
return /* @__PURE__ */
|
|
2051
|
+
se ? /* @__PURE__ */ T("div", { className: p.section, ref: Me, children: [
|
|
2052
|
+
/* @__PURE__ */ s("div", { className: p.sectionTitle, children: g("bundle.select.items") }),
|
|
2053
|
+
/* @__PURE__ */ s("div", { className: p.variants, children: !e && !i && Z.length === 0 ? /* @__PURE__ */ s("div", { className: p.emptyState, children: g("bundle.empty") }) : /* @__PURE__ */ s("ul", { className: p.variantList, children: Z.map((f) => {
|
|
2054
|
+
var z;
|
|
2055
|
+
const _ = u[f.id] ?? 0, x = O(f.selectedOptions), R = f.availableForSale === !1, A = ce(f.id), U = A ?? Number.POSITIVE_INFINITY, Q = _ >= U, ae = !R && !je && !Q, le = ae, J = !R && Q ? g("bundle.stock.max_reached") : null;
|
|
2056
|
+
return /* @__PURE__ */ T(
|
|
2053
2057
|
"li",
|
|
2054
2058
|
{
|
|
2055
2059
|
className: [
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
+
p.variantRow,
|
|
2061
|
+
le ? p.variantRowInteractive : null,
|
|
2062
|
+
_ > 0 ? p.variantRowSelected : null,
|
|
2063
|
+
R ? p.variantRowSoldOut : null
|
|
2060
2064
|
].filter(Boolean).join(" "),
|
|
2061
2065
|
"data-variant-row": f.id,
|
|
2062
|
-
role:
|
|
2063
|
-
tabIndex:
|
|
2064
|
-
onClick:
|
|
2065
|
-
|
|
2066
|
+
role: le ? "button" : void 0,
|
|
2067
|
+
tabIndex: le ? 0 : void 0,
|
|
2068
|
+
onClick: le ? () => {
|
|
2069
|
+
q(f.id, _ + 1);
|
|
2066
2070
|
} : void 0,
|
|
2067
|
-
onKeyDown:
|
|
2068
|
-
(
|
|
2071
|
+
onKeyDown: le ? (H) => {
|
|
2072
|
+
(H.key === "Enter" || H.key === " ") && (H.preventDefault(), q(f.id, _ + 1), qe(f.id));
|
|
2069
2073
|
} : void 0,
|
|
2070
|
-
"aria-label":
|
|
2074
|
+
"aria-label": R ? g("bundle.a11y.sold_out", { name: f.displayName }) : J ? `${f.displayName} ${J.toLowerCase()}` : g("bundle.a11y.add_to_bundle", { name: f.displayName }),
|
|
2071
2075
|
children: [
|
|
2072
|
-
/* @__PURE__ */
|
|
2076
|
+
/* @__PURE__ */ s("div", { className: p.variantMedia, children: (z = f.image) != null && z.url ? /* @__PURE__ */ s(
|
|
2073
2077
|
"img",
|
|
2074
2078
|
{
|
|
2075
2079
|
src: f.image.url,
|
|
2076
2080
|
alt: f.image.altText ?? f.displayName,
|
|
2077
2081
|
width: f.image.width ?? 64,
|
|
2078
2082
|
height: f.image.height ?? 64,
|
|
2079
|
-
className:
|
|
2083
|
+
className: p.variantImage,
|
|
2080
2084
|
loading: "lazy"
|
|
2081
2085
|
}
|
|
2082
|
-
) : /* @__PURE__ */
|
|
2083
|
-
/* @__PURE__ */
|
|
2084
|
-
/* @__PURE__ */
|
|
2085
|
-
/* @__PURE__ */
|
|
2086
|
-
x ? /* @__PURE__ */
|
|
2086
|
+
) : /* @__PURE__ */ s("div", { className: p.variantImageFallback, children: g("bundle.item.generic") }) }),
|
|
2087
|
+
/* @__PURE__ */ T("div", { className: p.variantContent, children: [
|
|
2088
|
+
/* @__PURE__ */ T("div", { className: p.variantHeader, children: [
|
|
2089
|
+
/* @__PURE__ */ s("div", { className: p.variantTitle, children: f.displayName }),
|
|
2090
|
+
x ? /* @__PURE__ */ s("div", { className: p.variantMeta, children: x }) : null
|
|
2087
2091
|
] }),
|
|
2088
|
-
/* @__PURE__ */
|
|
2089
|
-
/* @__PURE__ */
|
|
2090
|
-
/* @__PURE__ */
|
|
2091
|
-
/* @__PURE__ */
|
|
2092
|
-
|
|
2092
|
+
/* @__PURE__ */ T("div", { className: p.variantFooterRow, children: [
|
|
2093
|
+
/* @__PURE__ */ s("div", { className: p.variantPrice, children: X(f.price) }),
|
|
2094
|
+
/* @__PURE__ */ s("div", { className: p.variantActions, children: R ? /* @__PURE__ */ s("div", { className: p.soldOut, "aria-label": g("bundle.a11y.sold_out", { name: f.displayName }), children: g("bundle.stock.sold_out") }) : _ <= 0 && U <= 0 ? /* @__PURE__ */ s("div", { className: p.stockLimitNotice, "aria-label": g("bundle.a11y.max_available_selected", { name: f.displayName }), children: g("bundle.stock.max_added") }) : /* @__PURE__ */ T("div", { className: p.qtyActionsWrap, children: [
|
|
2095
|
+
/* @__PURE__ */ T("div", { className: p.qtyActions, children: [
|
|
2096
|
+
_ > 0 ? /* @__PURE__ */ s(
|
|
2093
2097
|
"button",
|
|
2094
2098
|
{
|
|
2095
2099
|
type: "button",
|
|
2096
|
-
className:
|
|
2100
|
+
className: p.qtyTrash,
|
|
2097
2101
|
"aria-label": g("bundle.a11y.remove_from_bundle", { name: f.displayName }),
|
|
2098
|
-
onClick: (
|
|
2099
|
-
|
|
2102
|
+
onClick: (H) => {
|
|
2103
|
+
H.stopPropagation(), q(f.id, 0);
|
|
2100
2104
|
},
|
|
2101
|
-
onKeyDown: (
|
|
2102
|
-
|
|
2105
|
+
onKeyDown: (H) => {
|
|
2106
|
+
H.stopPropagation();
|
|
2103
2107
|
},
|
|
2104
|
-
children: /* @__PURE__ */
|
|
2108
|
+
children: /* @__PURE__ */ s(Fn, { size: 14 })
|
|
2105
2109
|
}
|
|
2106
2110
|
) : null,
|
|
2107
|
-
/* @__PURE__ */
|
|
2111
|
+
/* @__PURE__ */ s(
|
|
2108
2112
|
"div",
|
|
2109
2113
|
{
|
|
2110
|
-
className: [
|
|
2111
|
-
"aria-label": g("bundle.a11y.quantity", { name: f.displayName, qty:
|
|
2112
|
-
onClick:
|
|
2113
|
-
|
|
2114
|
+
className: [p.qtyChip, ae ? p.qtyChipInteractive : null].filter(Boolean).join(" "),
|
|
2115
|
+
"aria-label": g("bundle.a11y.quantity", { name: f.displayName, qty: _ }),
|
|
2116
|
+
onClick: ae ? (H) => {
|
|
2117
|
+
H.stopPropagation(), q(f.id, _ + 1);
|
|
2114
2118
|
} : void 0,
|
|
2115
|
-
onKeyDown: (
|
|
2116
|
-
|
|
2119
|
+
onKeyDown: (H) => {
|
|
2120
|
+
H.stopPropagation();
|
|
2117
2121
|
},
|
|
2118
|
-
role:
|
|
2119
|
-
tabIndex:
|
|
2120
|
-
children:
|
|
2121
|
-
/* @__PURE__ */
|
|
2122
|
-
/* @__PURE__ */
|
|
2122
|
+
role: ae ? "button" : void 0,
|
|
2123
|
+
tabIndex: ae ? 0 : void 0,
|
|
2124
|
+
children: _ <= 0 ? /* @__PURE__ */ s("span", { className: p.qtyChipPlus, "aria-hidden": "true", children: /* @__PURE__ */ s(Wt, { size: 18, strokeWidth: 1.8 }) }) : /* @__PURE__ */ T(Nt, { children: [
|
|
2125
|
+
/* @__PURE__ */ s("span", { className: p.qtyChipValue, children: _ }),
|
|
2126
|
+
/* @__PURE__ */ s(
|
|
2123
2127
|
"button",
|
|
2124
2128
|
{
|
|
2125
2129
|
type: "button",
|
|
2126
|
-
className:
|
|
2130
|
+
className: p.qtyChipClear,
|
|
2127
2131
|
"aria-label": g("bundle.a11y.increase", { name: f.displayName }),
|
|
2128
|
-
onClick: (
|
|
2129
|
-
|
|
2132
|
+
onClick: (H) => {
|
|
2133
|
+
H.stopPropagation(), q(f.id, _ + 1);
|
|
2130
2134
|
},
|
|
2131
|
-
onKeyDown: (
|
|
2132
|
-
|
|
2135
|
+
onKeyDown: (H) => {
|
|
2136
|
+
H.stopPropagation();
|
|
2133
2137
|
},
|
|
2134
|
-
disabled: !
|
|
2135
|
-
children: /* @__PURE__ */
|
|
2138
|
+
disabled: !ae,
|
|
2139
|
+
children: /* @__PURE__ */ s(Wt, { size: 12, strokeWidth: 2 })
|
|
2136
2140
|
}
|
|
2137
2141
|
)
|
|
2138
2142
|
] })
|
|
2139
2143
|
}
|
|
2140
2144
|
)
|
|
2141
2145
|
] }),
|
|
2142
|
-
|
|
2146
|
+
J ? /* @__PURE__ */ s("div", { className: p.stockLimitNotice, children: J }) : null
|
|
2143
2147
|
] }) })
|
|
2144
2148
|
] })
|
|
2145
2149
|
] })
|
|
@@ -2149,108 +2153,240 @@ function Ni(n) {
|
|
|
2149
2153
|
);
|
|
2150
2154
|
}) }) })
|
|
2151
2155
|
] }) : null,
|
|
2152
|
-
/* @__PURE__ */
|
|
2153
|
-
/* @__PURE__ */
|
|
2154
|
-
var
|
|
2155
|
-
const x =
|
|
2156
|
-
return /* @__PURE__ */
|
|
2157
|
-
/* @__PURE__ */
|
|
2156
|
+
/* @__PURE__ */ T("footer", { className: p.footer, children: [
|
|
2157
|
+
/* @__PURE__ */ s("div", { className: p.boxSummaryWindow, ref: Ke, children: /* @__PURE__ */ s("div", { className: p.boxSummaryRow, "aria-label": "Bundle box summary", children: Array.from({ length: We }).map((f, _) => {
|
|
2158
|
+
var J, z, H, Le;
|
|
2159
|
+
const x = Pe[_], R = ke.get(_), A = !!x, U = !!R, Q = U && !A, ae = R ? g("bundle.discount.off_label", { discount: L(R.discountPercent) }) : null, le = A ? x.displayName : g("bundle.slot", { slot: _ + 1 });
|
|
2160
|
+
return /* @__PURE__ */ T("div", { "data-box-slot": _, className: p.boxSlot, children: [
|
|
2161
|
+
/* @__PURE__ */ s(
|
|
2158
2162
|
"div",
|
|
2159
2163
|
{
|
|
2160
2164
|
className: [
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
+
p.boxItem,
|
|
2166
|
+
A ? p.boxItemFilled : p.boxItemPlaceholder,
|
|
2167
|
+
U ? p.boxItemThreshold : null,
|
|
2168
|
+
A ? p.boxItemClickable : null
|
|
2165
2169
|
].filter(Boolean).join(" "),
|
|
2166
|
-
role:
|
|
2167
|
-
tabIndex:
|
|
2168
|
-
onClick:
|
|
2169
|
-
onKeyDown:
|
|
2170
|
-
(
|
|
2170
|
+
role: A ? "button" : void 0,
|
|
2171
|
+
tabIndex: A ? 0 : void 0,
|
|
2172
|
+
onClick: A ? () => qe(x.id) : void 0,
|
|
2173
|
+
onKeyDown: A ? (Fe) => {
|
|
2174
|
+
(Fe.key === "Enter" || Fe.key === " ") && (Fe.preventDefault(), qe(x.id));
|
|
2171
2175
|
} : void 0,
|
|
2172
|
-
"aria-label":
|
|
2173
|
-
title:
|
|
2174
|
-
children:
|
|
2176
|
+
"aria-label": Q && ae ? `${le}. ${g("bundle.unlocks", { discount: ae })}.` : le,
|
|
2177
|
+
title: Q && ae ? `${le} • ${g("bundle.unlocks", { discount: ae })}` : le,
|
|
2178
|
+
children: A ? (J = x.image) != null && J.url ? /* @__PURE__ */ s(
|
|
2175
2179
|
"img",
|
|
2176
2180
|
{
|
|
2177
|
-
className:
|
|
2181
|
+
className: p.boxItemImage,
|
|
2178
2182
|
src: x.image.url,
|
|
2179
2183
|
alt: x.image.altText ?? x.displayName,
|
|
2180
2184
|
width: 1,
|
|
2181
2185
|
height: 1,
|
|
2182
2186
|
loading: "lazy"
|
|
2183
2187
|
}
|
|
2184
|
-
) : /* @__PURE__ */
|
|
2188
|
+
) : /* @__PURE__ */ s("div", { className: p.boxItemFallback, "aria-hidden": "true", children: ((Le = (H = (z = x.product) == null ? void 0 : z.title) == null ? void 0 : H.slice(0, 1)) == null ? void 0 : Le.toUpperCase()) ?? "•" }) : Q && ae ? /* @__PURE__ */ s("div", { className: p.boxItemDiscountText, children: ae }) : /* @__PURE__ */ s("div", { className: p.boxItemPlus, "aria-hidden": "true", children: "+" })
|
|
2185
2189
|
}
|
|
2186
2190
|
),
|
|
2187
|
-
|
|
2188
|
-
] },
|
|
2191
|
+
U ? /* @__PURE__ */ s("div", { className: p.boxThresholdLabel, children: R.label }) : null
|
|
2192
|
+
] }, _);
|
|
2189
2193
|
}) }) }),
|
|
2190
|
-
/* @__PURE__ */
|
|
2194
|
+
/* @__PURE__ */ s("div", { className: [p.totalsReveal, Be ? p.totalsRevealOpen : null].filter(Boolean).join(" "), children: /* @__PURE__ */ s(
|
|
2191
2195
|
"div",
|
|
2192
2196
|
{
|
|
2193
|
-
className: [
|
|
2194
|
-
"aria-hidden": !
|
|
2195
|
-
children: /* @__PURE__ */
|
|
2196
|
-
|
|
2197
|
-
/* @__PURE__ */
|
|
2198
|
-
/* @__PURE__ */
|
|
2197
|
+
className: [p.ctaTotalsWrap, Be ? p.ctaTotalsWrapVisible : null].filter(Boolean).join(" "),
|
|
2198
|
+
"aria-hidden": !Be,
|
|
2199
|
+
children: /* @__PURE__ */ T("div", { className: p.ctaTotals, "aria-label": g("bundle.totals"), children: [
|
|
2200
|
+
xe ? /* @__PURE__ */ s("span", { className: p.ctaDiscountBadge, children: g("bundle.discount.badge", { discount: xe }) }) : /* @__PURE__ */ s("span", {}),
|
|
2201
|
+
/* @__PURE__ */ s("span", { children: xe ? /* @__PURE__ */ T(Nt, { children: [
|
|
2202
|
+
/* @__PURE__ */ s("span", { className: p.ctaTotalsStrike, children: X(ge.toFixed(2)) }),
|
|
2199
2203
|
" ",
|
|
2200
|
-
/* @__PURE__ */
|
|
2201
|
-
] }) : /* @__PURE__ */
|
|
2204
|
+
/* @__PURE__ */ s("span", { className: p.ctaTotalsPrice, children: X(Ee.toFixed(2)) })
|
|
2205
|
+
] }) : /* @__PURE__ */ s("span", { className: p.ctaTotalsPrice, children: X(ge.toFixed(2)) }) })
|
|
2202
2206
|
] })
|
|
2203
2207
|
}
|
|
2204
2208
|
) }),
|
|
2205
2209
|
(() => {
|
|
2206
|
-
const f = (
|
|
2207
|
-
return f === "add_to_cart_checkout" ?
|
|
2208
|
-
/* @__PURE__ */
|
|
2209
|
-
/* @__PURE__ */
|
|
2210
|
-
] }) : f === "checkout" ? /* @__PURE__ */
|
|
2210
|
+
const f = (a == null ? void 0 : a.ctaButtonMode) || "add_to_cart";
|
|
2211
|
+
return f === "add_to_cart_checkout" ? ne > 0 ? /* @__PURE__ */ s("button", { type: "button", onClick: ie, disabled: !M, className: p.cta, children: t ? g("bundle.cta.adding") : g("bundle.cta.add_more", { count: ne, productWord: ut(K, ne) }) }) : /* @__PURE__ */ T("div", { className: p.ctaButtonGroup, children: [
|
|
2212
|
+
/* @__PURE__ */ s("button", { type: "button", onClick: ie, disabled: !M, className: p.ctaDualLeft, children: /* @__PURE__ */ s("span", { children: g(t ? "bundle.cta.adding" : "bundle.cta.add_to_basket") }) }),
|
|
2213
|
+
/* @__PURE__ */ s("button", { type: "button", onClick: F, disabled: !M, className: p.ctaDualRight, children: /* @__PURE__ */ s("span", { children: g(t ? "bundle.cta.processing" : "bundle.cta.checkout") }) })
|
|
2214
|
+
] }) : f === "checkout" ? /* @__PURE__ */ s("button", { type: "button", onClick: F, disabled: !M, className: p.cta, children: t ? g("bundle.cta.processing") : ne > 0 ? g("bundle.cta.add_more", { count: ne, productWord: ut(K, ne) }) : g("bundle.cta.checkout") }) : /* @__PURE__ */ s("button", { type: "button", onClick: ie, disabled: !M, className: p.cta, children: t ? g("bundle.cta.adding") : ne > 0 ? g("bundle.cta.add_more", { count: ne, productWord: ut(K, ne) }) : g("bundle.cta.add_to_basket") });
|
|
2211
2215
|
})(),
|
|
2212
|
-
/* @__PURE__ */
|
|
2216
|
+
/* @__PURE__ */ T("div", { className: p.poweredBy, children: [
|
|
2213
2217
|
g("bundle.powered_by"),
|
|
2214
2218
|
" ",
|
|
2215
|
-
/* @__PURE__ */
|
|
2219
|
+
/* @__PURE__ */ s("a", { href: "https://apps.shopify.com/best-bundles", target: "_blank", rel: "noopener noreferrer", children: "BestBundles" })
|
|
2216
2220
|
] })
|
|
2217
2221
|
] })
|
|
2218
2222
|
] });
|
|
2219
2223
|
}
|
|
2220
|
-
|
|
2224
|
+
const pi = "_panel_mo8go_1", _i = "_title_mo8go_12", gi = "_status_mo8go_19", wi = "_error_mo8go_24", yi = "_rules_mo8go_30", vi = "_rule_mo8go_30", xi = "_ruleInput_mo8go_44", Ni = "_ruleLabel_mo8go_50", Ii = "_ruleLabelContent_mo8go_59", Si = "_ruleSelected_mo8go_66", Ci = "_ruleTitle_mo8go_71", Bi = "_ruleSubtitle_mo8go_77", ki = "_priceRow_mo8go_83", Ti = "_oldPrice_mo8go_90", Li = "_newPrice_mo8go_96", oe = {
|
|
2225
|
+
panel: pi,
|
|
2226
|
+
title: _i,
|
|
2227
|
+
status: gi,
|
|
2228
|
+
error: wi,
|
|
2229
|
+
rules: yi,
|
|
2230
|
+
rule: vi,
|
|
2231
|
+
ruleInput: xi,
|
|
2232
|
+
ruleLabel: Ni,
|
|
2233
|
+
ruleLabelContent: Ii,
|
|
2234
|
+
ruleSelected: Si,
|
|
2235
|
+
ruleTitle: Ci,
|
|
2236
|
+
ruleSubtitle: Bi,
|
|
2237
|
+
priceRow: ki,
|
|
2238
|
+
oldPrice: Ti,
|
|
2239
|
+
newPrice: Li
|
|
2240
|
+
};
|
|
2241
|
+
function jt(n) {
|
|
2242
|
+
const e = String(n ?? "").trim();
|
|
2243
|
+
if (!e) return "";
|
|
2244
|
+
if (e.startsWith("gid://shopify/ProductVariant/")) return e;
|
|
2245
|
+
const t = e.replace(/\D/g, "");
|
|
2246
|
+
return t ? `gid://shopify/ProductVariant/${t}` : "";
|
|
2247
|
+
}
|
|
2248
|
+
function Ri() {
|
|
2249
|
+
if (typeof window > "u") return "";
|
|
2250
|
+
const n = new URLSearchParams(window.location.search).get("variant");
|
|
2251
|
+
if (n) return jt(n);
|
|
2252
|
+
const e = document.querySelector('form[action*="/cart/add"]'), t = e == null ? void 0 : e.querySelector('input[name="id"], select[name="id"]');
|
|
2253
|
+
return jt((t == null ? void 0 : t.value) ?? "");
|
|
2254
|
+
}
|
|
2255
|
+
function Yt() {
|
|
2256
|
+
if (typeof document > "u") return null;
|
|
2257
|
+
const n = document.querySelector('form[action*="/cart/add"]');
|
|
2258
|
+
return (n == null ? void 0 : n.querySelector('input[name="quantity"]')) ?? null;
|
|
2259
|
+
}
|
|
2260
|
+
function Pi() {
|
|
2261
|
+
const n = Yt();
|
|
2262
|
+
if (!n) return null;
|
|
2263
|
+
const e = Number(n.value ?? NaN);
|
|
2264
|
+
return !Number.isFinite(e) || e <= 0 ? null : Math.floor(e);
|
|
2265
|
+
}
|
|
2266
|
+
function Mi(n) {
|
|
2267
|
+
const e = Yt();
|
|
2268
|
+
return e ? (e.value = String(n), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.dispatchEvent(new Event("change", { bubbles: !0 })), !0) : !1;
|
|
2269
|
+
}
|
|
2270
|
+
function Gi({ className: n, preferFirstEligibleVariant: e = !1 }) {
|
|
2271
|
+
var j, N, se;
|
|
2272
|
+
const { loading: t, error: i, config: r, eligibleVariants: a, currencyCode: h, locale: u } = gt(), [S, ce] = W(""), [q, $] = W(null), [me, M] = W(null), ie = e || typeof window < "u" && !!window.__BUNDLE_PREVIEW_CONFIG__;
|
|
2273
|
+
D(() => {
|
|
2274
|
+
const L = () => ce(Ri());
|
|
2275
|
+
L(), document.addEventListener("variant:change", L);
|
|
2276
|
+
const O = window.setInterval(L, 500);
|
|
2277
|
+
return () => {
|
|
2278
|
+
document.removeEventListener("variant:change", L), window.clearInterval(O);
|
|
2279
|
+
};
|
|
2280
|
+
}, []), D(() => {
|
|
2281
|
+
const L = () => $(Pi()), O = (Z) => {
|
|
2282
|
+
const V = Z.target;
|
|
2283
|
+
V instanceof HTMLInputElement && V.name === "quantity" && L();
|
|
2284
|
+
};
|
|
2285
|
+
L(), document.addEventListener("input", O, !0), document.addEventListener("change", O, !0);
|
|
2286
|
+
const X = window.setInterval(L, 500);
|
|
2287
|
+
return () => {
|
|
2288
|
+
document.removeEventListener("input", O, !0), document.removeEventListener("change", O, !0), window.clearInterval(X);
|
|
2289
|
+
};
|
|
2290
|
+
}, []);
|
|
2291
|
+
const F = P(
|
|
2292
|
+
() => [...(r == null ? void 0 : r.rules) ?? []].sort((L, O) => L.minBundleSize - O.minBundleSize),
|
|
2293
|
+
[r == null ? void 0 : r.rules]
|
|
2294
|
+
), K = ie ? ((j = a[0]) == null ? void 0 : j.id) || "" : S || ((N = a[0]) == null ? void 0 : N.id) || "", g = a.find((L) => L.id === K) ?? null;
|
|
2295
|
+
return D(() => {
|
|
2296
|
+
var L;
|
|
2297
|
+
if (!F.length) {
|
|
2298
|
+
M(null);
|
|
2299
|
+
return;
|
|
2300
|
+
}
|
|
2301
|
+
if (q != null) {
|
|
2302
|
+
let O = null;
|
|
2303
|
+
for (const X of F)
|
|
2304
|
+
X.minBundleSize <= q && (O = X.handle);
|
|
2305
|
+
M(O ?? ((L = F[0]) == null ? void 0 : L.handle) ?? null);
|
|
2306
|
+
return;
|
|
2307
|
+
}
|
|
2308
|
+
M((O) => {
|
|
2309
|
+
var X;
|
|
2310
|
+
return O ?? ((X = F[0]) == null ? void 0 : X.handle) ?? null;
|
|
2311
|
+
});
|
|
2312
|
+
}, [q, F]), (r == null ? void 0 : r.bundleType) !== "volume_discount" ? null : /* @__PURE__ */ T("section", { className: [oe.panel, n].filter(Boolean).join(" "), "aria-busy": t, children: [
|
|
2313
|
+
/* @__PURE__ */ s("h2", { className: oe.title, children: ((se = r == null ? void 0 : r.title) == null ? void 0 : se.trim()) || "Volume discount" }),
|
|
2314
|
+
t ? /* @__PURE__ */ s("div", { className: oe.status, children: "Loading volume discounts…" }) : null,
|
|
2315
|
+
i ? /* @__PURE__ */ s("div", { className: oe.error, children: i }) : null,
|
|
2316
|
+
!t && !i && !g ? /* @__PURE__ */ s("div", { className: oe.status, children: "Select an eligible variant to view volume discounts." }) : null,
|
|
2317
|
+
!t && !i && g ? /* @__PURE__ */ s(Nt, { children: /* @__PURE__ */ s("div", { className: oe.rules, children: F.map((L) => {
|
|
2318
|
+
const O = Number.parseFloat(L.discountPercent), X = Number.isFinite(O) && O > 0 ? `Save ${Math.round(O)}%` : "Standard", Z = me === L.handle;
|
|
2319
|
+
return /* @__PURE__ */ s(
|
|
2320
|
+
"div",
|
|
2321
|
+
{
|
|
2322
|
+
className: [oe.rule, Z ? oe.ruleSelected : ""].filter(Boolean).join(" "),
|
|
2323
|
+
children: /* @__PURE__ */ T("label", { className: oe.ruleLabel, children: [
|
|
2324
|
+
/* @__PURE__ */ T("div", { className: oe.ruleLabelContent, children: [
|
|
2325
|
+
/* @__PURE__ */ s(
|
|
2326
|
+
"input",
|
|
2327
|
+
{
|
|
2328
|
+
className: oe.ruleInput,
|
|
2329
|
+
type: "radio",
|
|
2330
|
+
checked: Z,
|
|
2331
|
+
name: "bb-volume-discount-rule",
|
|
2332
|
+
onChange: () => {
|
|
2333
|
+
M(L.handle), Mi(L.minBundleSize);
|
|
2334
|
+
}
|
|
2335
|
+
}
|
|
2336
|
+
),
|
|
2337
|
+
/* @__PURE__ */ s("span", { className: oe.ruleTitle, children: `Buy ${L.minBundleSize}` }),
|
|
2338
|
+
/* @__PURE__ */ s("span", { className: oe.ruleSubtitle, children: X })
|
|
2339
|
+
] }),
|
|
2340
|
+
/* @__PURE__ */ s("div", { children: (() => {
|
|
2341
|
+
const V = Number(g.price ?? NaN);
|
|
2342
|
+
if (!Number.isFinite(V)) return null;
|
|
2343
|
+
const ne = V * L.minBundleSize, ue = Number.isFinite(O) && O > 0, xe = ue ? ne * (1 - O / 100) : ne;
|
|
2344
|
+
return ue ? /* @__PURE__ */ T("span", { className: oe.priceRow, children: [
|
|
2345
|
+
/* @__PURE__ */ s("span", { className: oe.oldPrice, children: ft(ne, h, u) }),
|
|
2346
|
+
/* @__PURE__ */ s("span", { className: oe.newPrice, children: ft(xe, h, u) })
|
|
2347
|
+
] }) : /* @__PURE__ */ s("span", { className: oe.priceRow, children: /* @__PURE__ */ s("span", { className: oe.newPrice, children: ft(ne, h, u) }) });
|
|
2348
|
+
})() })
|
|
2349
|
+
] })
|
|
2350
|
+
},
|
|
2351
|
+
L.handle
|
|
2352
|
+
);
|
|
2353
|
+
}) }) }) : null
|
|
2354
|
+
] });
|
|
2355
|
+
}
|
|
2356
|
+
function Lt(n) {
|
|
2221
2357
|
if (n != null && n.length)
|
|
2222
2358
|
return n.reduce((e, t) => (t != null && t.key && (e[t.key] = t.value ?? ""), e), {});
|
|
2223
2359
|
}
|
|
2224
|
-
function
|
|
2360
|
+
function Ut(n) {
|
|
2225
2361
|
const e = /\/(\d+)$/.exec(n);
|
|
2226
2362
|
return e ? e[1] : n;
|
|
2227
2363
|
}
|
|
2228
|
-
function
|
|
2364
|
+
function Fi(n) {
|
|
2229
2365
|
if (n == null) return null;
|
|
2230
2366
|
const e = String(n).trim();
|
|
2231
2367
|
return e ? e.startsWith("gid://shopify/ProductVariant/") ? e : `gid://shopify/ProductVariant/${e}` : null;
|
|
2232
2368
|
}
|
|
2233
|
-
function
|
|
2369
|
+
function Oi() {
|
|
2234
2370
|
var n;
|
|
2235
2371
|
return typeof window > "u" ? null : ((n = window.Shopify) == null ? void 0 : n.theme) ?? null;
|
|
2236
2372
|
}
|
|
2237
|
-
function
|
|
2238
|
-
const n =
|
|
2373
|
+
function Ai() {
|
|
2374
|
+
const n = Oi();
|
|
2239
2375
|
return n ? n.schema_name === "Sleek" ? !0 : /sleek/i.test(n.name ?? "") : !1;
|
|
2240
2376
|
}
|
|
2241
|
-
function
|
|
2377
|
+
function Ei() {
|
|
2242
2378
|
return typeof document > "u" ? !1 : !!document.querySelector("cart-drawer");
|
|
2243
2379
|
}
|
|
2244
|
-
function
|
|
2245
|
-
return !
|
|
2380
|
+
function Di() {
|
|
2381
|
+
return !Ai() || !Ei() ? !1 : (document.dispatchEvent(new CustomEvent("cart:refresh", {
|
|
2246
2382
|
bubbles: !0,
|
|
2247
2383
|
detail: { open: !0 }
|
|
2248
2384
|
})), !0);
|
|
2249
2385
|
}
|
|
2250
|
-
function
|
|
2386
|
+
function qi() {
|
|
2251
2387
|
window.location.reload();
|
|
2252
2388
|
}
|
|
2253
|
-
async function
|
|
2389
|
+
async function vt(n, e) {
|
|
2254
2390
|
const t = await fetch(n, {
|
|
2255
2391
|
method: "POST",
|
|
2256
2392
|
headers: {
|
|
@@ -2260,12 +2396,12 @@ async function yt(n, e) {
|
|
|
2260
2396
|
body: JSON.stringify(e)
|
|
2261
2397
|
});
|
|
2262
2398
|
if (!t.ok) {
|
|
2263
|
-
const
|
|
2264
|
-
throw new Error(
|
|
2399
|
+
const i = await t.text().catch(() => "");
|
|
2400
|
+
throw new Error(i || `Cart request failed: ${t.status}`);
|
|
2265
2401
|
}
|
|
2266
2402
|
return t.json().catch(() => null);
|
|
2267
2403
|
}
|
|
2268
|
-
async function
|
|
2404
|
+
async function $i() {
|
|
2269
2405
|
const n = await fetch("/cart.js", {
|
|
2270
2406
|
method: "GET",
|
|
2271
2407
|
cache: "no-store",
|
|
@@ -2278,48 +2414,48 @@ async function yi() {
|
|
|
2278
2414
|
throw new Error(`Cart request failed: ${n.status}`);
|
|
2279
2415
|
return n.json();
|
|
2280
2416
|
}
|
|
2281
|
-
function
|
|
2417
|
+
function Yi() {
|
|
2282
2418
|
return {
|
|
2283
2419
|
async linesAdd(n) {
|
|
2284
2420
|
const e = n.map((t) => ({
|
|
2285
|
-
id:
|
|
2421
|
+
id: Ut(t.merchandiseId),
|
|
2286
2422
|
quantity: t.quantity,
|
|
2287
|
-
properties:
|
|
2423
|
+
properties: Lt(t.attributes)
|
|
2288
2424
|
}));
|
|
2289
|
-
await
|
|
2425
|
+
await vt("/cart/add.js", { items: e });
|
|
2290
2426
|
},
|
|
2291
2427
|
async linesAddForCheckout(n) {
|
|
2292
2428
|
const e = n.map((t) => ({
|
|
2293
|
-
id:
|
|
2429
|
+
id: Ut(t.merchandiseId),
|
|
2294
2430
|
quantity: t.quantity,
|
|
2295
|
-
properties:
|
|
2431
|
+
properties: Lt(t.attributes)
|
|
2296
2432
|
}));
|
|
2297
|
-
await
|
|
2433
|
+
await vt("/cart/add.js", { items: e });
|
|
2298
2434
|
},
|
|
2299
2435
|
async linesUpdate(n) {
|
|
2300
2436
|
for (const e of n)
|
|
2301
|
-
await
|
|
2437
|
+
await vt("/cart/change.js", {
|
|
2302
2438
|
id: e.id,
|
|
2303
2439
|
quantity: e.quantity,
|
|
2304
|
-
properties:
|
|
2440
|
+
properties: Lt(e.attributes)
|
|
2305
2441
|
});
|
|
2306
2442
|
},
|
|
2307
2443
|
async linesRemove(n) {
|
|
2308
2444
|
for (const e of n)
|
|
2309
|
-
await
|
|
2445
|
+
await vt("/cart/change.js", { id: e, quantity: 0 });
|
|
2310
2446
|
},
|
|
2311
2447
|
async getLineQuantitiesByMerchandiseId() {
|
|
2312
|
-
const n = await
|
|
2448
|
+
const n = await $i(), e = {};
|
|
2313
2449
|
for (const t of n.items ?? []) {
|
|
2314
|
-
const
|
|
2315
|
-
if (!
|
|
2316
|
-
const
|
|
2317
|
-
!Number.isFinite(
|
|
2450
|
+
const i = Fi(t.id);
|
|
2451
|
+
if (!i) continue;
|
|
2452
|
+
const r = Number(t.quantity ?? 0);
|
|
2453
|
+
!Number.isFinite(r) || r <= 0 || (e[i] = (e[i] ?? 0) + Math.floor(r));
|
|
2318
2454
|
}
|
|
2319
2455
|
return e;
|
|
2320
2456
|
},
|
|
2321
2457
|
openCartUI() {
|
|
2322
|
-
|
|
2458
|
+
Di() || window.setTimeout(() => qi(), 0);
|
|
2323
2459
|
},
|
|
2324
2460
|
navigateToCheckout() {
|
|
2325
2461
|
window.location.href = "/checkout";
|
|
@@ -2327,13 +2463,14 @@ function Si() {
|
|
|
2327
2463
|
};
|
|
2328
2464
|
}
|
|
2329
2465
|
export {
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2466
|
+
Hi as BundleBuilderDrawer,
|
|
2467
|
+
Qi as BundleBuilderPanel,
|
|
2468
|
+
Ui as BundleButton,
|
|
2469
|
+
wt as BundleLineAttributeKeys,
|
|
2470
|
+
Wi as BundleProvider,
|
|
2471
|
+
Gi as VolumeDiscountPanel,
|
|
2472
|
+
Yi as createLiquidCartAdapter,
|
|
2473
|
+
gt as useBundleBuilder,
|
|
2474
|
+
ji as useBundleBuilderDrawer
|
|
2338
2475
|
};
|
|
2339
2476
|
//# sourceMappingURL=index.js.map
|