@magicx-eng/ai-autocomplete-react 0.44.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/index.d.mts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +45 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +45 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{buildSubmitResult as Hn,cellDay as Bn,cellIso as Gn,DATE_RANGE_META_END as Kn,DATE_RANGE_META_START as qn,DEFAULT_OPTION_COUNT_UNIT as Wn,dateCellMarks as Un,formatDate as _n,formatDateRange as jn,formatOptionCount as Vn,isoDate as Yn,monthLabel as Qn,optionCountLabel as $n,optionHasImage as Zn,optionImageSources as Xn,optionImageSrc as Jn,optionLabel as er,optionsShowLeadingVisuals as tr,PRODUCT_PATH_PREFIX as ar,parseDate as ir,parseLooseDate as or,parseLooseDateRange as nr,productFromMatchedItem as rr,productImageSources as sr,productsFromCustomFields as lr,sanitizeOptionIconSvg as dr,selectedRangeFor as cr,visibleDateRange as pr,WEEKDAY_LABELS as hr,withSkippedParams as ur}from"@magicx-eng/ai-autocomplete-vanilla";import{forwardRef as Mi,useCallback as yt,useEffect as aa,useImperativeHandle as Ni,useLayoutEffect as Fi,useRef as
|
|
1
|
+
import{buildSubmitResult as Hn,cellDay as Bn,cellIso as Gn,DATE_RANGE_META_END as Kn,DATE_RANGE_META_START as qn,DEFAULT_OPTION_COUNT_UNIT as Wn,dateCellMarks as Un,formatDate as _n,formatDateRange as jn,formatOptionCount as Vn,isoDate as Yn,monthLabel as Qn,optionCountLabel as $n,optionHasImage as Zn,optionImageSources as Xn,optionImageSrc as Jn,optionLabel as er,optionsShowLeadingVisuals as tr,PRODUCT_PATH_PREFIX as ar,parseDate as ir,parseLooseDate as or,parseLooseDateRange as nr,productFromMatchedItem as rr,productImageSources as sr,productsFromCustomFields as lr,sanitizeOptionIconSvg as dr,selectedRangeFor as cr,visibleDateRange as pr,WEEKDAY_LABELS as hr,withSkippedParams as ur}from"@magicx-eng/ai-autocomplete-vanilla";import{forwardRef as Mi,useCallback as yt,useEffect as aa,useImperativeHandle as Ni,useLayoutEffect as Fi,useRef as je}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-67791514")){let e=document.createElement("style");e.id="ac-style-67791514",e.textContent=`.aia-container-KKjFU {
|
|
2
2
|
position: relative;
|
|
3
3
|
/* Inherits the host page's font by default. Consumers can pin a specific
|
|
4
4
|
font on the library via \`--aia-font-family: 'Custom Font'\` without
|
|
@@ -280,7 +280,7 @@ import{buildSubmitResult as Hn,cellDay as Bn,cellIso as Gn,DATE_RANGE_META_END a
|
|
|
280
280
|
opacity: 0;
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
|
-
`,document.head.appendChild(e)}var Ae={container:"aia-container-KKjFU",inputWrapper:"aia-inputWrapper-FLq1b",editorArea:"aia-editorArea-7rBWq",input:"aia-input-IW-P-",pillListContainer:"aia-pillListContainer-h92IA",submitSlot:"aia-submitSlot-GhuCM",aiaPillReveal:"aia-aiaPillReveal-wf05b"};import{attachScrollArrow as pi,attachViewportFit as hi,containScroll as ui,hasSkippablePill as
|
|
283
|
+
`,document.head.appendChild(e)}var Ae={container:"aia-container-KKjFU",inputWrapper:"aia-inputWrapper-FLq1b",editorArea:"aia-editorArea-7rBWq",input:"aia-input-IW-P-",pillListContainer:"aia-pillListContainer-h92IA",submitSlot:"aia-submitSlot-GhuCM",aiaPillReveal:"aia-aiaPillReveal-wf05b"};import{attachScrollArrow as pi,attachViewportFit as hi,containScroll as ui,hasSkippablePill as gi,isCalendarFormat as mi,labelTraditionalAutocomplete as fi,uiStringsFor as bi}from"@magicx-eng/ai-autocomplete-vanilla";import{useEffect as Me,useRef as ze,useState as wi}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-0ae03977")){let e=document.createElement("style");e.id="ac-style-0ae03977",e.textContent=`/*
|
|
284
284
|
* Built-in appearance defaults \u2014 zero specificity via :where().
|
|
285
285
|
* Consumer CSS always wins without !important.
|
|
286
286
|
*
|
|
@@ -1132,7 +1132,7 @@ import{buildSubmitResult as Hn,cellDay as Bn,cellIso as Gn,DATE_RANGE_META_END a
|
|
|
1132
1132
|
opacity: 0.25;
|
|
1133
1133
|
}
|
|
1134
1134
|
}
|
|
1135
|
-
`,document.head.appendChild(e)}var pe={dropdown:"aia-dropdown-yz2KC",visible:"aia-visible-QCoXj",scrollArrow:"aia-scrollArrow-uUzV0","magicx-aia-scroll-arrow-bob":"aia-magicx-aia-scroll-arrow-bob-z-HXC",pillBar:"aia-pillBar-pwTXe",pillScroll:"aia-pillScroll-Tpzus",skip:"aia-skip-7-olS",skeletonBars:"aia-skeletonBars-HVr9C",skeletonBarsIn:"aia-skeletonBarsIn-BdPrL",skeletonBarsOut:"aia-skeletonBarsOut-TqKeD",skeletonBar:"aia-skeletonBar-O3xIx",aiaSkeletonPulse:"aia-aiaSkeletonPulse-G8W7q"};import{cellDay as ca,cellIso as Le,dateCellMarks as pa,isoDate as ha,monthLabel as ua,visibleDateRange as
|
|
1135
|
+
`,document.head.appendChild(e)}var pe={dropdown:"aia-dropdown-yz2KC",visible:"aia-visible-QCoXj",scrollArrow:"aia-scrollArrow-uUzV0","magicx-aia-scroll-arrow-bob":"aia-magicx-aia-scroll-arrow-bob-z-HXC",pillBar:"aia-pillBar-pwTXe",pillScroll:"aia-pillScroll-Tpzus",skip:"aia-skip-7-olS",skeletonBars:"aia-skeletonBars-HVr9C",skeletonBarsIn:"aia-skeletonBarsIn-BdPrL",skeletonBarsOut:"aia-skeletonBarsOut-TqKeD",skeletonBar:"aia-skeletonBar-O3xIx",aiaSkeletonPulse:"aia-aiaSkeletonPulse-G8W7q"};import{cellDay as ca,cellIso as Le,dateCellMarks as pa,isoDate as ha,monthLabel as ua,visibleDateRange as ga,WEEKDAY_LABELS as ma}from"@magicx-eng/ai-autocomplete-vanilla";import{useState as fa}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-f687bd03")){let e=document.createElement("style");e.id="ac-style-f687bd03",e.textContent=`/* --- Datepicker (replaces the options grid for date suggestions) ---
|
|
1136
1136
|
|
|
1137
1137
|
One of three hand-maintained copies (vanilla styles.css, this file, Angular's
|
|
1138
1138
|
date-grid.component.css). Only the class-naming layer differs \u2014 the
|
|
@@ -1295,7 +1295,7 @@ import{buildSubmitResult as Hn,cellDay as Bn,cellIso as Gn,DATE_RANGE_META_END a
|
|
|
1295
1295
|
opacity: 0.8;
|
|
1296
1296
|
background: rgba(var(--aia-streak-rgb, 255, 255, 255), 0.06);
|
|
1297
1297
|
}
|
|
1298
|
-
`,document.head.appendChild(e)}var
|
|
1298
|
+
`,document.head.appendChild(e)}var L={datepicker:"aia-datepicker-6RrTs",header:"aia-header-z4LRk",month:"aia-month-urB2T",nav:"aia-nav-ap4AN",weekdays:"aia-weekdays-3EA3q",grid:"aia-grid-mQCgw",weekday:"aia-weekday-3lF4B",cell:"aia-cell-59k0y",number:"aia-number-aoT01",day:"aia-day-cB3u9",blank:"aia-blank-ivgRC",past:"aia-past-CEZsj",highlighted:"aia-highlighted-YIdtK",today:"aia-today-iI3ME",inRange:"aia-inRange-r9S2q",selected:"aia-selected-28KDn",pressed:"aia-pressed-bEyyN"};import{jsx as ne,jsxs as It}from"react/jsx-runtime";var ba=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function Et({options:e,activeIndex:n,listboxId:t,view:a,selection:o,onSelect:r,onHighlight:i,onUnhighlight:c,onPreviousMonth:u,onNextMonth:g}){let w=ha(new Date),k=ga({pendingStart:o.rangeStart,highlightedIso:Le(e[n]),selected:o.selectedRange});return It("div",{className:L.datepicker,"data-aia-datepicker":"",children:[It("div",{className:L.header,children:[ne("button",{type:"button",tabIndex:-1,className:L.nav,"data-aia-date-prev":"","aria-label":"Previous month",onMouseDown:p=>p.preventDefault(),onClick:u,children:"\u2039"}),ne("span",{className:L.month,"data-aia-date-month":"","aria-live":"polite",children:ua(a)}),ne("button",{type:"button",tabIndex:-1,className:L.nav,"data-aia-date-next":"","aria-label":"Next month",onMouseDown:p=>p.preventDefault(),onClick:g,children:"\u203A"})]}),ne("div",{className:L.weekdays,"aria-hidden":"true",children:ma.map((p,s)=>ne("span",{className:L.weekday,children:p},ba[s]))}),ne("div",{className:L.grid,"data-aia-date-grid":"",children:e.map((p,s)=>ne(wa,{option:p,id:`${t}-option-${s}`,index:s,isHighlighted:s===n&&p.is_tappable,isToday:Le(p)===w,isPast:Le(p)!=null&&Le(p)<w,marks:pa(Le(p),{selectedIso:o.selectedIso,range:k}),onSelect:r,onHighlight:i,onUnhighlight:c},Le(p)??`pad-${s}`))})]})}function wa({option:e,id:n,index:t,isHighlighted:a,isToday:o,isPast:r,marks:i,onSelect:c,onHighlight:u,onUnhighlight:g}){let[w,k]=fa(!1),p=ca(e);if(p==null)return ne("div",{id:n,role:"option","data-aia-option":"","data-aia-date-cell":"","aria-hidden":"true","aria-selected":!1,tabIndex:-1,className:`${L.cell} ${L.blank}`});let s=()=>{k(!0),c(e),setTimeout(()=>k(!1),170)},f=[L.cell,L.day,r?L.past:"",a?L.highlighted:"",o?L.today:"",i.inRange?L.inRange:"",i.selected?L.selected:"",w?L.pressed:""].filter(Boolean).join(" ");return ne("div",{id:n,role:"option","data-aia-option":"","data-aia-date-cell":"","aria-selected":a,"aria-label":e.text,tabIndex:0,className:f,onClick:s,onKeyDown:I=>{(I.key==="Enter"||I.key===" ")&&(I.preventDefault(),s())},onMouseEnter:()=>u(t),onMouseLeave:g?()=>g(t):void 0,children:ne("span",{className:L.number,children:p})})}import{ATTRIBUTION_URL as va,buildAttributionUrl as xa,getFooterHint as ya,uiStringsFor as ka}from"@magicx-eng/ai-autocomplete-vanilla";import{useEffect as Ca,useState as Sa}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-5259a217")){let e=document.createElement("style");e.id="ac-style-5259a217",e.textContent=`.aia-cluster {
|
|
1299
1299
|
display: flex;
|
|
1300
1300
|
flex-wrap: wrap;
|
|
1301
1301
|
gap: var(--aia-cluster-gap, 0.5rem);
|
|
@@ -1335,7 +1335,7 @@ import{buildSubmitResult as Hn,cellDay as Bn,cellIso as Gn,DATE_RANGE_META_END a
|
|
|
1335
1335
|
.aia-cluster[data-justify="around"] {
|
|
1336
1336
|
justify-content: space-around;
|
|
1337
1337
|
}
|
|
1338
|
-
`,document.head.appendChild(e)}import{jsx as At}from"react/jsx-runtime";function We({gap:e,align:n="center",justify:t="start",noWrap:a=!1,inline:o=!1,className:r,children:i,...
|
|
1338
|
+
`,document.head.appendChild(e)}import{jsx as At}from"react/jsx-runtime";function We({gap:e,align:n="center",justify:t="start",noWrap:a=!1,inline:o=!1,className:r,children:i,...c}){let u=e?{"--aia-cluster-gap":e}:void 0,g={className:r?`aia-cluster ${r}`:"aia-cluster","data-align":n,"data-justify":t,"data-nowrap":a||void 0,"data-inline":o||void 0,style:u,...c};return o?At("span",{...g,children:i}):At("div",{...g,children:i})}if(typeof document<"u"&&!document.getElementById("ac-style-56b0c577")){let e=document.createElement("style");e.id="ac-style-56b0c577",e.textContent=`/* The footer adds its own 8px horizontal inset so it stays clear of the
|
|
1339
1339
|
dropdown's rounded edges. The top inset (--aia-footer-gap) adds breathing
|
|
1340
1340
|
room above the hint/branding row so the footer doesn't butt against the last
|
|
1341
1341
|
option row \u2014 additive to the dropdown's 8px section gap. */
|
|
@@ -1662,7 +1662,7 @@ import{buildSubmitResult as Hn,cellDay as Bn,cellIso as Gn,DATE_RANGE_META_END a
|
|
|
1662
1662
|
opacity: 0;
|
|
1663
1663
|
}
|
|
1664
1664
|
}
|
|
1665
|
-
`,document.head.appendChild(e)}var re={pill:"aia-pill-6Ga7S",fadeIn:"aia-fadeIn-Ux4eQ",rounded:"aia-rounded-y7xA9",smartText:"aia-smartText-R0cfw","smartSuggestion-shimmer":"aia-smartSuggestion-shimmer-F-yoD",smartSparkle:"aia-smartSparkle-IVabG","smartSuggestion-sparkle":"aia-smartSuggestion-sparkle-Wfj-4","smartSuggestion-sparkle-small":"aia-smartSuggestion-sparkle-small-3VsWJ",skeleton:"aia-skeleton-57P0T",skeletonIn:"aia-skeletonIn-54kMv",skeletonPulse:"aia-skeletonPulse-xGcUy",skeletonOut:"aia-skeletonOut-1sJ-r"};import{Fragment as Ta,jsx as pt,jsxs as Ia}from"react/jsx-runtime";var ht={selected:1,first:.7,next:.4,last:.2};function Dt({label:e,state:n,rounded:t,loading:a,smartSuggestion:o,completionHeader:r,onClick:i}){let
|
|
1665
|
+
`,document.head.appendChild(e)}var re={pill:"aia-pill-6Ga7S",fadeIn:"aia-fadeIn-Ux4eQ",rounded:"aia-rounded-y7xA9",smartText:"aia-smartText-R0cfw","smartSuggestion-shimmer":"aia-smartSuggestion-shimmer-F-yoD",smartSparkle:"aia-smartSparkle-IVabG","smartSuggestion-sparkle":"aia-smartSuggestion-sparkle-Wfj-4","smartSuggestion-sparkle-small":"aia-smartSuggestion-sparkle-small-3VsWJ",skeleton:"aia-skeleton-57P0T",skeletonIn:"aia-skeletonIn-54kMv",skeletonPulse:"aia-skeletonPulse-xGcUy",skeletonOut:"aia-skeletonOut-1sJ-r"};import{Fragment as Ta,jsx as pt,jsxs as Ia}from"react/jsx-runtime";var ht={selected:1,first:.7,next:.4,last:.2};function Dt({label:e,state:n,rounded:t,loading:a,smartSuggestion:o,completionHeader:r,onClick:i}){let c=[re.pill,t?re.rounded:"",a?re.skeleton:""].filter(Boolean).join(" ");return pt("button",{type:"button","data-aia-pill":"","data-aia-loading":a?"":void 0,"data-aia-smart-suggestion":o?r?"header":"":void 0,tabIndex:-1,contentEditable:!1,suppressContentEditableWarning:!0,className:c,style:{opacity:ht[n]},onMouseDown:u=>u.preventDefault(),onClick:a?void 0:i,disabled:a,children:o?Ia(Ta,{children:[pt("span",{className:`${re.smartText} magicx-aia-smart-suggestion-text`,children:e}),pt("span",{className:`${re.smartSparkle} magicx-aia-smart-suggestion-sparkle`,dangerouslySetInnerHTML:{__html:Pa}})]}):e})}if(typeof document<"u"&&!document.getElementById("ac-style-0fcb7940")){let e=document.createElement("style");e.id="ac-style-0fcb7940",e.textContent=`.aia-list-qvLqO {
|
|
1666
1666
|
position: relative;
|
|
1667
1667
|
z-index: 1;
|
|
1668
1668
|
pointer-events: auto;
|
|
@@ -1672,7 +1672,7 @@ import{buildSubmitResult as Hn,cellDay as Bn,cellIso as Gn,DATE_RANGE_META_END a
|
|
|
1672
1672
|
align-items: center;
|
|
1673
1673
|
vertical-align: middle;
|
|
1674
1674
|
}
|
|
1675
|
-
`,document.head.appendChild(e)}var ut={list:"aia-list-qvLqO"};import{jsx as
|
|
1675
|
+
`,document.head.appendChild(e)}var ut={list:"aia-list-qvLqO"};import{jsx as Ze}from"react/jsx-runtime";var Ra=[125,69];function Ot(e){return e===0?"first":e===1?"next":"last"}function Xe({pills:e,activePillIndex:n,onSelectPill:t,activeSelected:a,rounded:o,loading:r}){return r&&e.length===0?Ze("span",{className:ut.list,"data-aia-pill-list-loading":"",children:Ra.map((i,c)=>Ze("span",{"data-aia-pill-skeleton":"",className:`${re.pill} ${o?re.rounded:""} ${re.skeleton}`,style:{width:i,opacity:ht[Ot(c)]}},`skel-${i}`))}):Ze("span",{className:ut.list,"data-aia-pill-list-loading":r?"":void 0,children:e.map((i,c)=>{let u=!!a&&c===n;return Ze(Dt,{label:i.text,state:u?"selected":Ot(c),selected:u,rounded:o,loading:r,smartSuggestion:Ea(i),completionHeader:Aa(i),onClick:()=>t(c)},`${i.parameter}-${i.text}`)})})}import{attachProductRowWheel as Da,productImageSources as Oa,productImageSrc as La,productInitial as za,productPhotoFill as Ma,uiStringsFor as Na}from"@magicx-eng/ai-autocomplete-vanilla";import{useEffect as gt,useRef as Je,useState as et}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-fef1688d")){let e=document.createElement("style");e.id="ac-style-fef1688d",e.textContent=`/* Product strip \u2014 the React counterpart of the vanilla core's strip rules
|
|
1676
1676
|
(packages/vanilla/src/styles.css). Same tokens, same defaults, so a consumer
|
|
1677
1677
|
theming one package sees the same result in the other.
|
|
1678
1678
|
|
|
@@ -1991,10 +1991,10 @@ import{buildSubmitResult as Hn,cellDay as Bn,cellIso as Gn,DATE_RANGE_META_END a
|
|
|
1991
1991
|
display: none;
|
|
1992
1992
|
}
|
|
1993
1993
|
|
|
1994
|
-
/* While the integration's promise is in flight the button
|
|
1995
|
-
|
|
1994
|
+
/* While the integration's promise is in flight the button ignores presses
|
|
1995
|
+
and shows a spinner (below); once it resolves the cart turns into a check,
|
|
1996
|
+
which stays. */
|
|
1996
1997
|
.aia-cart-kSlqU[data-aia-cart-state="adding"] {
|
|
1997
|
-
opacity: 0.6;
|
|
1998
1998
|
cursor: progress;
|
|
1999
1999
|
}
|
|
2000
2000
|
|
|
@@ -2006,6 +2006,36 @@ import{buildSubmitResult as Hn,cellDay as Bn,cellIso as Gn,DATE_RANGE_META_END a
|
|
|
2006
2006
|
display: inline;
|
|
2007
2007
|
}
|
|
2008
2008
|
|
|
2009
|
+
/* While the add is in flight the cart gives way to a spinning arc. A slower
|
|
2010
|
+
turn under reduced motion: it is the only sign the press took. */
|
|
2011
|
+
.aia-cartSpinner-442rc {
|
|
2012
|
+
display: none;
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
.aia-cart-kSlqU[data-aia-cart-state="adding"] .aia-cartGlyph-cmqAk {
|
|
2016
|
+
display: none;
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
.aia-cart-kSlqU[data-aia-cart-state="adding"] .aia-cartSpinner-442rc {
|
|
2020
|
+
display: inline;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
.aia-cart-kSlqU[data-aia-cart-state="adding"] svg {
|
|
2024
|
+
animation: aia-magicx-aia-product-cart-spin-x8mgr 0.8s linear infinite;
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
@keyframes aia-magicx-aia-product-cart-spin-x8mgr {
|
|
2028
|
+
to {
|
|
2029
|
+
transform: rotate(360deg);
|
|
2030
|
+
}
|
|
2031
|
+
}
|
|
2032
|
+
|
|
2033
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2034
|
+
.aia-cart-kSlqU[data-aia-cart-state="adding"] svg {
|
|
2035
|
+
animation-duration: 2s;
|
|
2036
|
+
}
|
|
2037
|
+
}
|
|
2038
|
+
|
|
2009
2039
|
/* A sold-out product's image steps back, so the badge is not the only cue.
|
|
2010
2040
|
Desaturated rather than faded: opacity lets the panel show through, which
|
|
2011
2041
|
muddies a photo on a dark surface. */
|
|
@@ -2086,7 +2116,7 @@ import{buildSubmitResult as Hn,cellDay as Bn,cellIso as Gn,DATE_RANGE_META_END a
|
|
|
2086
2116
|
.aia-section-Hugfg[data-aia-products-layout="list"] .aia-card-JBGYT[data-aia-product-has-cart] {
|
|
2087
2117
|
padding-right: calc(var(--aia-product-cart-size, 28px) + 16px);
|
|
2088
2118
|
}
|
|
2089
|
-
`,document.head.appendChild(e)}var
|
|
2119
|
+
`,document.head.appendChild(e)}var z={section:"aia-section-Hugfg",label:"aia-label-nuc93",row:"aia-row-WDVBX",card:"aia-card-JBGYT",media:"aia-media-RrbGe",image:"aia-image-5pNL7",body:"aia-body-ly032",vendor:"aia-vendor-Gvu7G",title:"aia-title-gCNmq",price:"aia-price-gULcE",badge:"aia-badge-j9Hcd",cart:"aia-cart-kSlqU",cartCheck:"aia-cartCheck-YTTQ6",cartGlyph:"aia-cartGlyph-cmqAk",cartSpinner:"aia-cartSpinner-442rc","magicx-aia-product-cart-spin":"aia-magicx-aia-product-cart-spin-x8mgr"};import{jsx as B,jsxs as _e}from"react/jsx-runtime";function Lt({products:e,listboxId:n,onSelect:t,onAddToCart:a,onFocusChange:o,focusable:r=!0,layout:i="row",imageFallback:c="image",strings:u=Na()}){let g=e.length>0,w=Je(null);if(gt(()=>{let p=w.current;if(!(!g||!p))return Da(p)},[g]),!g)return null;let k=`${n}-products-label`;return _e("section",{className:z.section,"data-aia-products":"","data-aia-products-layout":i,role:"group","aria-labelledby":k,children:[B("div",{className:z.label,id:k,"data-aia-products-label":"",children:u.products}),B("div",{ref:w,className:z.row,"data-aia-products-row":"",children:e.map((p,s)=>B(Fa,{product:p,id:`${n}-product-${s}`,onSelect:t,onAddToCart:a,onFocusChange:o,focusable:r,imageFallback:c,soldOut:u.soldOut,addToCart:u.addToCart},p.id))})]})}function Fa({product:e,id:n,onSelect:t,onAddToCart:a,onFocusChange:o,focusable:r,imageFallback:i,soldOut:c,addToCart:u}){let g=!!a&&e.available!==!1,[w,k]=et(null),p=f=>{f.relatedTarget?.closest("[data-aia-dropdown]")||o?.(!1)},s=f=>{f.metaKey||f.ctrlKey||f.shiftKey||f.altKey||f.button!==0||(f.preventDefault(),t(e))};return _e("a",{id:n,className:z.card,"data-aia-product":"","data-aia-product-sold-out":e.available===!1?"":void 0,"data-aia-product-has-cart":g?"":void 0,role:"option","aria-selected":!1,style:w?{"--aia-product-photo-fill-x":String(w.x),"--aia-product-photo-fill-y":String(w.y)}:void 0,href:e.url,tabIndex:r?0:-1,onClick:s,onKeyDown:f=>{f.key!=="Enter"&&f.key!==" "||(f.preventDefault(),t(e))},onFocus:()=>o?.(!0),onBlur:p,children:[B(Ga,{sources:Oa(e.imageUrl),title:e.title,fallback:i,onPhotoFill:k},La(e.imageUrl)??""),_e("span",{className:z.body,children:[e.vendor?B("span",{className:z.vendor,children:e.vendor}):null,B("span",{className:z.title,children:e.title}),e.price?B("span",{className:z.price,children:e.price}):null,e.available===!1?B("span",{className:z.badge,children:c}):null]}),g&&a?B(Ba,{product:e,label:`${u}: ${e.title}`,focusable:r,onAddToCart:a,onFocus:()=>o?.(!0),onBlur:p},Ha(e)):null]})}function Ha(e){return[e.id,e.title,e.url,e.imageUrl,e.vendor].map(n=>n??"").join("\0")}function Ba({product:e,label:n,focusable:t,onAddToCart:a,onFocus:o,onBlur:r}){let[i,c]=et(null),u=Je(null),g=Je(e);g.current=e;let w=Je(!0);gt(()=>(w.current=!0,()=>{w.current=!1}),[]);let k=s=>{u.current=s,w.current&&c(s)},p=s=>{if(s.preventDefault(),s.stopPropagation(),u.current==="adding")return;k("adding");let f;try{f=Promise.resolve(a(g.current))}catch(I){f=Promise.reject(I)}f.then(()=>k("added"),()=>k(null))};return B("span",{className:z.cart,"data-aia-product-cart":"","data-aia-cart-state":i??void 0,"aria-busy":i==="adding"?!0:void 0,role:"button","aria-label":n,tabIndex:t?0:-1,onClick:p,onKeyDown:s=>{s.key!=="Enter"&&s.key!==" "||p(s)},onFocus:s=>{s.stopPropagation(),o()},onBlur:s=>{s.stopPropagation(),r(s)},children:_e("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:[B("path",{className:z.cartGlyph,d:"M2 3h2.2l2.4 11.2a2 2 0 0 0 2 1.6h8.9a2 2 0 0 0 1.9-1.5L21 8H6"}),B("path",{className:z.cartGlyph,d:"M13.5 6.5v-4M11.5 4.5h4"}),B("path",{className:z.cartCheck,d:"M5 12.5l4.5 4.5L19 7.5"}),B("path",{className:z.cartSpinner,d:"M12 4a8 8 0 1 0 8 8"}),B("circle",{className:z.cartGlyph,cx:"9",cy:"20",r:"1.3"}),B("circle",{className:z.cartGlyph,cx:"17.5",cy:"20",r:"1.3"})]})})}function Ga({sources:e,title:n,fallback:t,onPhotoFill:a}){let[o,r]=et(0),i=e[o],c=!!i,[u,g]=et(null),w=!c&&t==="initial";return gt(()=>()=>a(null),[a]),_e("span",{className:z.media,"aria-hidden":"true","data-aia-product-placeholder":!c&&!w?"":void 0,"data-aia-product-initial":w?"":void 0,"data-aia-image-loaded":c&&u===i?"":void 0,children:[c?B("img",{className:z.image,src:i,alt:"",loading:"lazy",decoding:"async",onLoad:k=>{g(i),a(Ma(k.currentTarget.naturalWidth,k.currentTarget.naturalHeight))},onError:()=>{o+1>=e.length&&a(null),r(k=>k+1)}}):null,w?za(n):null]})}import{isOptionsGridMobileViewport as ei,measureOptionsGrid as ti,needsOptionsGridMeasurement as ai,OPTIONS_GRID_MOBILE_QUERY as ii,optionEnterDelayMs as oi,optionsShowLeadingVisuals as ni,planOptionsGrid as Ft,sameOptionRows as ri}from"@magicx-eng/ai-autocomplete-vanilla";import{useEffect as si,useLayoutEffect as li,useRef as Ht,useState as Gt}from"react";import{optionsGridTemplateColumns as Ka}from"@magicx-eng/ai-autocomplete-vanilla";import{useLayoutEffect as qa,useRef as Wa}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-948e58da")){let e=document.createElement("style");e.id="ac-style-948e58da",e.textContent=`.aia-grid {
|
|
2090
2120
|
display: grid;
|
|
2091
2121
|
grid-template-columns: repeat(
|
|
2092
2122
|
auto-fit,
|
|
@@ -2122,7 +2152,7 @@ import{buildSubmitResult as Hn,cellDay as Bn,cellIso as Gn,DATE_RANGE_META_END a
|
|
|
2122
2152
|
.aia-grid[data-scroll]::-webkit-scrollbar {
|
|
2123
2153
|
display: none;
|
|
2124
2154
|
}
|
|
2125
|
-
`,document.head.appendChild(e)}import{jsx as Ua}from"react/jsx-runtime";function zt({min:e="16rem",max:n,gap:t,scroll:a=!1,maxHeight:o,scrollResetKey:r,cols:i,template:
|
|
2155
|
+
`,document.head.appendChild(e)}import{jsx as Ua}from"react/jsx-runtime";function zt({min:e="16rem",max:n,gap:t,scroll:a=!1,maxHeight:o,scrollResetKey:r,cols:i,template:c,innerRef:u,className:g,children:w,...k}){let p=Wa(null);qa(()=>{if(r===void 0)return;let f=p.current;f&&(f.scrollTop=0)},[r]);let s={"--aia-grid-min":e};return n&&(s["--aia-grid-max"]=n),t&&(s["--aia-grid-gap"]=t),o&&(s["--aia-grid-max-height"]=o),i&&(s.gridTemplateColumns=Ka(i)),c&&(s.gridTemplateColumns=c),Ua("div",{ref:f=>{p.current=f,u?.(f)},className:g?`aia-grid ${g}`:"aia-grid","data-scroll":a||void 0,style:s,...k,children:w})}import{formatOptionCount as _a,highlightParts as ja,OPTION_ENTER_DELAY_VAR as Va,optionImageSources as Ya,optionLabel as Mt,sanitizeOptionIconSvg as Qa}from"@magicx-eng/ai-autocomplete-vanilla";import{useEffect as $a,useMemo as Za,useRef as Xa,useState as tt}from"react";if(typeof document<"u"&&!document.getElementById("ac-style-82820da7")){let e=document.createElement("style");e.id="ac-style-82820da7",e.textContent=`.aia-item-d4vpD {
|
|
2126
2156
|
position: relative;
|
|
2127
2157
|
/* Clip, not visible: the entrance rise below runs on the inner content,
|
|
2128
2158
|
and a transformed box extends its scroll container's scrollable area.
|
|
@@ -2580,7 +2610,7 @@ import{buildSubmitResult as Hn,cellDay as Bn,cellIso as Gn,DATE_RANGE_META_END a
|
|
|
2580
2610
|
opacity: 0;
|
|
2581
2611
|
}
|
|
2582
2612
|
}
|
|
2583
|
-
`,document.head.appendChild(e)}var W={item:"aia-item-d4vpD",content:"aia-content-T-Qba",riseIn:"aia-riseIn-etXZT",fadeIn:"aia-fadeIn-I8u35",tappable:"aia-tappable-70KcX",nonTappable:"aia-nonTappable-xSZM-",highlighted:"aia-highlighted-Hb0SU",tag:"aia-tag-e3Fwe",pressed:"aia-pressed-98o-r",pressCompress:"aia-pressCompress-ICV3q",scrollHint:"aia-scrollHint-xKXPt",skeletonPulse:"aia-skeletonPulse-plvdD",text:"aia-text-yqoh9",skeletonBarIn:"aia-skeletonBarIn-ZlEM0",parameter:"aia-parameter-Dt2zF",match:"aia-match-pp-9v",icon:"aia-icon-Qw938",count:"aia-count-IpYbQ",image:"aia-image-YZAbO",skeletonOut:"aia-skeletonOut-x6NRd"};import{Fragment as Ja,jsx as Ce,jsxs as
|
|
2613
|
+
`,document.head.appendChild(e)}var W={item:"aia-item-d4vpD",content:"aia-content-T-Qba",riseIn:"aia-riseIn-etXZT",fadeIn:"aia-fadeIn-I8u35",tappable:"aia-tappable-70KcX",nonTappable:"aia-nonTappable-xSZM-",highlighted:"aia-highlighted-Hb0SU",tag:"aia-tag-e3Fwe",pressed:"aia-pressed-98o-r",pressCompress:"aia-pressCompress-ICV3q",scrollHint:"aia-scrollHint-xKXPt",skeletonPulse:"aia-skeletonPulse-plvdD",text:"aia-text-yqoh9",skeletonBarIn:"aia-skeletonBarIn-ZlEM0",parameter:"aia-parameter-Dt2zF",match:"aia-match-pp-9v",icon:"aia-icon-Qw938",count:"aia-count-IpYbQ",image:"aia-image-YZAbO",skeletonOut:"aia-skeletonOut-x6NRd"};import{Fragment as Ja,jsx as Ce,jsxs as mt}from"react/jsx-runtime";function Nt({option:e,isHighlighted:n,onSelect:t,onHighlight:a,onUnhighlight:o,id:r,loading:i,showIcon:c=!0,showImage:u=!0,showCount:g=!0,scrollHint:w,enterDelayMs:k=0}){let[p]=tt(k),[s,f]=tt(!1),I=u?Ya(e.image_url):[],M=I[0]??null,[q,U]=tt([]),T=I.find(R=>!q.includes(R))??null,[D,N]=tt(null),S=Za(()=>!M&&c&&e.icon_svg?Qa(e.icon_svg):null,[M,c,e.icon_svg]),_=g?_a(e.item_count):null,H=Xa(void 0);$a(()=>()=>clearTimeout(H.current),[]);let K=()=>{i||!e.is_tappable||s||(f(!0),t(e),clearTimeout(H.current),H.current=setTimeout(()=>f(!1),170))},X=[W.item,n&&!i?W.highlighted:"",e.is_tappable?W.tappable:W.nonTappable,s?W.pressed:"",w?W.scrollHint:""].filter(Boolean).join(" ");return Ce("div",{id:r,role:"option","data-aia-option":"","data-aia-loading":i?"":void 0,"data-aia-icon":S&&e.icon?e.icon:void 0,"data-aia-image":M?"":void 0,"data-aia-item-count":_!==null?e.item_count:void 0,"aria-selected":n,className:X,style:{[Va]:`${p}ms`},tabIndex:i||!e.is_tappable?-1:0,onClick:K,onKeyDown:R=>{!i&&e.is_tappable&&(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),K())},onMouseEnter:!i&&e.is_tappable?a:void 0,onMouseLeave:o,children:mt("span",{className:W.content,children:[M&&Ce("span",{className:`${W.image} magicx-aia-option-image`,"aria-hidden":"true","data-aia-image-loaded":T!==null&&D===T?"":void 0,children:Ce("img",{src:T??M,alt:"",loading:"lazy",decoding:"async",referrerPolicy:"no-referrer",draggable:!1,hidden:T===null,onLoad:()=>N(T),onError:()=>{T!==null&&U(R=>[...R,T])}})}),S&&Ce("span",{className:`${W.icon} magicx-aia-option-icon`,"aria-hidden":"true",dangerouslySetInnerHTML:{__html:S}}),mt("span",{className:W.text,children:[e.matchedText?ja(Mt(e),e.matchedText).map((R,j)=>R.bold?Ce("strong",{className:`${W.match} magicx-aia-option-match`,children:R.text},j):R.text):Mt(e),e.parameterLabel&&mt(Ja,{children:[" ",Ce("span",{className:`${W.parameter} magicx-aia-option-parameter`,children:e.parameterLabel})]})]}),e.tag&&Ce("span",{className:W.tag,children:e.tag}),_!==null&&Ce("span",{className:`${W.count} magicx-aia-option-count`,children:_})]})})}import{jsx as Bt}from"react/jsx-runtime";function di(){let[e,n]=Gt(ei);return si(()=>{if(typeof window>"u"||!window.matchMedia)return;let t=window.matchMedia(ii),a=()=>n(t.matches);return a(),t.addEventListener("change",a),()=>t.removeEventListener("change",a)},[]),e}function Kt({options:e,activeIndex:n,onSelect:t,onHighlight:a,onUnhighlight:o,listboxId:r,loading:i,groupKey:c="",optionsPosition:u="below",showIcons:g=!0,showImages:w=!0,showCounts:k=!0}){let p=di(),s=Ht(null),[f,I]=Gt(null),M=Ht(null);li(()=>{if(i&&ri(M.current,e))return;M.current=i?null:e;let T=s.current,N=T&&!i&&ai(e.length,p)?ti(T):null;I(N?Ft(e.length,p,N.rowWidths,N.gridWidth):null)},[e,p,i]);let q=f??Ft(e.length,p,null,null),U=ni(e,g,w);return Bt(zt,{min:"250px",max:"1fr",gap:"0",scroll:!0,scrollResetKey:c,template:q.template,maxHeight:q.maxHeight,innerRef:T=>{s.current=T},"data-aia-group":c,children:e.map((T,D)=>Bt(Nt,{option:T,isHighlighted:D===n,onSelect:t,onHighlight:()=>a(D),onUnhighlight:o?()=>o(D):void 0,id:`${r}-option-${D}`,loading:i,showIcon:g&&U,showImage:w&&U,showCount:k,scrollHint:!i&&q.scrollHintIndices.includes(D),enterDelayMs:i?0:oi(D,q.cols,e.length,u)},`${c}\0${T.text}`))})}if(typeof document<"u"&&!document.getElementById("ac-style-8414cd5f")){let e=document.createElement("style");e.id="ac-style-8414cd5f",e.textContent=`.aia-stack {
|
|
2584
2614
|
display: flex;
|
|
2585
2615
|
flex-direction: column;
|
|
2586
2616
|
gap: var(--aia-stack-space, 0.5rem);
|
|
@@ -2595,7 +2625,7 @@ import{buildSubmitResult as Hn,cellDay as Bn,cellIso as Gn,DATE_RANGE_META_END a
|
|
|
2595
2625
|
align-items: end;
|
|
2596
2626
|
}
|
|
2597
2627
|
/* data-align="stretch" is the flex default \u2014 no rule needed. */
|
|
2598
|
-
`,document.head.appendChild(e)}import{jsx as ci}from"react/jsx-runtime";function qt({space:e,align:n="stretch",className:t,children:a,...o}){let r=e?{"--aia-stack-space":e}:void 0;return ci("div",{className:t?`aia-stack ${t}`:"aia-stack","data-align":n,style:r,...o,children:a})}import{jsx as Z,jsxs as ft}from"react/jsx-runtime";var vi=[159,119,164],xi=()=>{},Wt=()=>{};function yi(e){let n=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches,[t,a]=wi(n);if(Me(()=>{if(e!=="auto"||typeof window>"u"||typeof window.matchMedia!="function")return;let o=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>a(o.matches);return o.addEventListener("change",r),()=>o.removeEventListener("change",r)},[e]),e!==void 0)return e==="auto"?t?"dark":"light":e}function ki(e,n){let t=ze(null);Me(()=>{let a=e.current,o=n.current;if(!a||!o)return;let r=a.querySelector(".aia-grid[data-scroll]");if(t.current&&t.current.grid!==r&&(t.current.controller.destroy(),t.current=null),r&&!t.current){t.current={grid:r,controller:pi({dropdown:a,grid:r,button:o})};return}t.current?.controller.update()}),Me(()=>()=>{t.current?.controller.destroy(),t.current=null},[])}function Ci(e,n){let t=ze(n);t.current=n;let a=ze(null);Me(()=>{let o=e.current;if(o){if(!a.current){a.current=hi({dropdown:o,isOpen:()=>t.current});return}a.current.update()}}),Me(()=>()=>{a.current?.destroy(),a.current=null},[])}function bt({suggestions:e,activeIndex:n,onSelect:t,onHighlight:a,onUnhighlight:o,isOpen:r,id:i,className:
|
|
2628
|
+
`,document.head.appendChild(e)}import{jsx as ci}from"react/jsx-runtime";function qt({space:e,align:n="stretch",className:t,children:a,...o}){let r=e?{"--aia-stack-space":e}:void 0;return ci("div",{className:t?`aia-stack ${t}`:"aia-stack","data-align":n,style:r,...o,children:a})}import{jsx as Z,jsxs as ft}from"react/jsx-runtime";var vi=[159,119,164],xi=()=>{},Wt=()=>{};function yi(e){let n=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches,[t,a]=wi(n);if(Me(()=>{if(e!=="auto"||typeof window>"u"||typeof window.matchMedia!="function")return;let o=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>a(o.matches);return o.addEventListener("change",r),()=>o.removeEventListener("change",r)},[e]),e!==void 0)return e==="auto"?t?"dark":"light":e}function ki(e,n){let t=ze(null);Me(()=>{let a=e.current,o=n.current;if(!a||!o)return;let r=a.querySelector(".aia-grid[data-scroll]");if(t.current&&t.current.grid!==r&&(t.current.controller.destroy(),t.current=null),r&&!t.current){t.current={grid:r,controller:pi({dropdown:a,grid:r,button:o})};return}t.current?.controller.update()}),Me(()=>()=>{t.current?.controller.destroy(),t.current=null},[])}function Ci(e,n){let t=ze(n);t.current=n;let a=ze(null);Me(()=>{let o=e.current;if(o){if(!a.current){a.current=hi({dropdown:o,isOpen:()=>t.current});return}a.current.update()}}),Me(()=>()=>{a.current?.destroy(),a.current=null},[])}function bt({suggestions:e,activeIndex:n,onSelect:t,onHighlight:a,onUnhighlight:o,isOpen:r,id:i,className:c,pills:u,onPillClick:g,showPills:w=!0,onSkip:k,showSkipButton:p=!0,showOptionIcons:s=!0,showOptionImages:f=!0,showOptionCounts:I=!0,skipDisabled:M=!1,activeSelected:q=!1,isLoading:U=!1,skeletonExiting:T=!1,isInputEmpty:D=!1,language:N,products:S,onProductSelect:_,onProductAddToCart:H,onProductFocusChange:K,productsLayout:X="row",productImageFallback:R="image",formatType:j="options",dateView:se=null,selectedDateIso:ue=null,selectedDateRange:le=null,dateRangeStart:Se=null,onPreviousMonth:ge,onNextMonth:m,optionsPosition:me="below",mode:fe}){let de=yi(fe),be=de!==void 0,$=ze(null),l=ze(null);ki($,l),Me(()=>{if($.current)return ui($.current)},[]);let v=e[0]?.options??[],y=!!(u&&u.length>0&&g),P=!!(S&&S.length>0),C=r&&(v.length>0||w&&y||U||P);Ci($,C);let O={suggestions:e,activeIndex:n,pills:u,showPills:w,showSkipButton:p,showOptionIcons:s,showOptionImages:f,showOptionCounts:I,skipDisabled:M,activeSelected:q,isLoading:U,skeletonExiting:T,isInputEmpty:D,products:S,formatType:j,dateView:se,selectedDateIso:ue,selectedDateRange:le,dateRangeStart:Se},Q=ze(O);C&&(Q.current=O);let h=C?O:Q.current,V=bi(N),ee=h.suggestions[0],te=ee?.options??[],Pe=h.activeIndex>=0&&!!te[h.activeIndex]?.is_tappable,ae=fi(h.pills??[],V.keepTyping),ie=!!(ae.length>0&&g),Te=h.showPills&&ie,ce=h.showPills&&!ie&&h.isLoading,we=Te||ce,ve=ie&&gi(ae)&&h.showSkipButton&&!h.isInputEmpty&&!!k,x=ae[0]?.text,Re=mi(h.formatType)&&h.dateView!=null,De=te.length>0&&!Re,oe=te.length>0&&Re&&!h.isLoading,b=h.isLoading&&!De&&!oe,xe=h.products??[];return ft("div",{ref:$,id:i,role:"listbox","data-aia-dropdown":"","data-options-position":me,"data-mode":de,"data-aia-loading":h.isLoading?"":void 0,"data-aia-skeleton-exiting":h.skeletonExiting?"":void 0,"data-aia-has-products":xe.length>0?"":void 0,className:`${be?"magicx-aia ":""}${pe.dropdown} ${C?pe.visible:""} ${c??""}`,onMouseDown:ye=>ye.preventDefault(),children:[ft(qt,{space:"8px",children:[(we||ve)&&ft(We,{noWrap:!0,className:pe.pillBar,"data-aia-pillbar":"",children:[we&&Z("span",{className:pe.pillScroll,"data-aia-pill-scroll":"",children:Z(Xe,{pills:ae,activePillIndex:0,activeSelected:h.activeSelected,onSelectPill:g??(()=>{}),rounded:!0,loading:h.isLoading})}),ve&&Z("button",{type:"button",tabIndex:-1,className:pe.skip,"data-aia-skip":"",disabled:h.isLoading||h.skipDisabled,"aria-label":x?`${V.skipLabel} ${x}`:V.skipLabel,onClick:k,children:V.skip})]}),De&&Z(Kt,{options:te,activeIndex:h.activeIndex,onSelect:t,onHighlight:a,onUnhighlight:o,listboxId:i,loading:h.isLoading,groupKey:ee?`${ee.parameter} ${ee.text}`:"",optionsPosition:me,showIcons:h.showOptionIcons,showImages:h.showOptionImages,showCounts:h.showOptionCounts}),oe&&h.dateView&&Z(Et,{options:te,activeIndex:h.activeIndex,listboxId:i,view:h.dateView,selection:{selectedIso:h.selectedDateIso??null,selectedRange:h.selectedDateRange??null,rangeStart:h.dateRangeStart??null},onSelect:t,onHighlight:a,onUnhighlight:o,onPreviousMonth:ge??Wt,onNextMonth:m??Wt}),b&&Z("div",{className:pe.skeletonBars,"data-aia-skeleton-bars":"",children:vi.map(ye=>Z("span",{className:pe.skeletonBar,style:{width:ye}},`bar-${ye}`))}),Z(Lt,{products:xe,listboxId:i,onSelect:_??xi,onAddToCart:H,onFocusChange:K,focusable:C,layout:X,imageFallback:R,strings:V}),Z(Rt,{isOptionHighlighted:Pe,isInputEmpty:h.isInputEmpty,strings:V})]}),Z("button",{ref:l,type:"button",tabIndex:-1,className:pe.scrollArrow,"data-aia-scroll-arrow":"","aria-label":V.scrollArrow,"aria-hidden":"true",children:Z("svg",{viewBox:"0 0 16 16",width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:Z("path",{d:"M4 6.5 8 10.5l4-4"})})})]})}import{buildSubmitResult as Hi,ModeController as Bi,setCursorOffset as Gi,uiStringsFor as Ki}from"@magicx-eng/ai-autocomplete-vanilla";import{uiStringsFor as Si}from"@magicx-eng/ai-autocomplete-vanilla";if(typeof document<"u"&&!document.getElementById("ac-style-fdee06e6")){let e=document.createElement("style");e.id="ac-style-fdee06e6",e.textContent=`.aia-submitButton-otz7H {
|
|
2599
2629
|
flex-shrink: 0;
|
|
2600
2630
|
width: 32px;
|
|
2601
2631
|
height: 32px;
|
|
@@ -2648,5 +2678,5 @@ import{buildSubmitResult as Hn,cellDay as Bn,cellIso as Gn,DATE_RANGE_META_END a
|
|
|
2648
2678
|
);
|
|
2649
2679
|
cursor: default;
|
|
2650
2680
|
}
|
|
2651
|
-
`,document.head.appendChild(e)}var Ut={submitButton:"aia-submitButton-otz7H"};import{jsx as wt}from"react/jsx-runtime";function _t({disabled:e,onClick:n,label:t=Si().submit}){return wt("button",{type:"button","data-aia-submit":"",className:Ut.submitButton,disabled:e,onClick:a=>{a.stopPropagation(),n()},"aria-label":t,children:wt("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",role:"img","aria-label":t,children:wt("path",{d:"M9 14V4M9 4L4 9M9 4L14 9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}import{AIAutocomplete as Pi,dateSelectionFor as Ti,identifiedParamLabel as Ii,withoutTraditionalAutocomplete as Ei}from"@magicx-eng/ai-autocomplete-vanilla";import{useCallback as $t,useEffect as Ne,useRef as B,useState as Ai}from"react";import{useRef as jt}from"react";function Vt(e){let n=jt(e);n.current=e;let t=Object.keys(e??{}).sort().join("\0"),a=jt({key:"",overrides:void 0});if(a.current.key!==t){let o={};for(let r of Object.keys(e??{})){let i=(p,u,m)=>{let b=n.current?.[r];return b?b(p,u,m):[]};o[r]=i}a.current={key:t,overrides:e?o:void 0}}return{overrides:a.current.overrides,key:t}}import{useRef as Yt}from"react";function Qt(e){let n=Yt(e);n.current=e;let t=Yt(null);t.current===null&&(t.current={fetch:(o,r)=>{let i=n.current;return i?i.fetch(o,r):Promise.reject(new Error("products config removed"))},transform:o=>n.current?.transform(o)??[],get limit(){return n.current?.limit}});let a=e!==void 0;return{config:a?t.current:void 0,enabled:a}}var Zt={text:"",completedParams:[],identifiedParams:[],skippedParams:[],pendingSpan:null,suggestions:[],products:[],traditionalAutocomplete:!1,customFields:null,optionSearch:null,activeDropdownIndex:-1,newParamId:null,isLoading:!0,isReady:!1,error:null,segments:[],actionableSuggestions:[],filteredOptions:[],dropdownLoading:!0,dropdownOptions:[],skeletonOptions:null,skeletonSuggestion:null,dropdownSuggestion:null,skeletonRequested:!1,skeletonExiting:!1,activeFormatType:"options",dateView:null,dateRangeStart:null,placeholderText:"",optionQuery:"",isSearchingOptions:!1,isDropdownOpen:!1,isActivePillSelected:!1,filterBase:0,filterInProgress:!1,pillTapped:!1,skipNextFetch:!1,lastRawQuery:"",isFocused:!1,dropdownHeld:!1,editingParam:null,editingIdentified:null,editingAnchor:null,editingTail:null,caretOffset:null,inSelectionAnimation:!1,dateViewMonth:null,pendingRangeStart:null};function vt({onSubmit:e,onResult:n,onError:t,optionOverrides:a,maskCompletedText:o,apiConfig:r,additionalContext:i,language:p,currency:u,productId:m,visitorId:b,columns:k=2,dropdownTrigger:l,optionsPosition:w,closeDropdownOnBlur:s,showNonTappableOptions:T,showOptionIcons:D,showOptionImages:q,showOptionCounts:U,showSkipButton:I,showProducts:O,productImageFallback:M="image",onFocus:S,onBlur:_,value:H,completedParams:G,onChange:X,onParamsChange:R,products:j,mapProducts:se,onProductSelect:ue,onProductAddToCart:le,source:Se,setCursor:me}){let g=B(null),[ge,fe]=Ai(null),de=B(e);de.current=e;let be=B(n);be.current=n;let $=B(t);$.current=t;let d=B(X);d.current=X;let v=B(R);v.current=R;let y=B(S);y.current=S;let P=B(_);P.current=_;let C=B(me);C.current=me;let L=B(ue);L.current=ue;let Q=B(le);Q.current=le;let h=B(b);h.current=b;let V=B(()=>{let c=h.current;return typeof c=="function"?c():c}).current,ee=Qt(j),te=B(se);te.current=se;let Pe=B((c,N)=>{let E=te.current;return E?E(c,N):c}).current,ae=se?Pe:void 0,ie=Vt(a);Ne(()=>{if(typeof document>"u")return;let c=new Pi(document.createElement("div"),{renderMode:"headless",apiConfig:r,additionalContext:i,language:p,currency:u,productId:m,visitorId:V,optionOverrides:ie.overrides,maskCompletedText:o,columns:k,dropdownTrigger:l,optionsPosition:w,closeDropdownOnBlur:s,showNonTappableOptions:T,showProducts:O,source:Se,value:H,completedParams:G,onSubmit:(...E)=>de.current?.(...E),onResult:(...E)=>be.current?.(...E),onError:(...E)=>$.current?.(...E),onChange:(...E)=>d.current?.(...E),onParamsChange:(...E)=>v.current?.(...E),onFocus:()=>y.current?.(),onBlur:()=>P.current?.(),onProductSelect:E=>L.current?.(E),onProductAddToCart:E=>Q.current?.(E),setCursor:E=>C.current?.(E),products:ee.config,mapProducts:ae});g.current=c,fe(c.getState());let N=c.subscribe(E=>fe(E));return()=>{N(),c.destroy(),g.current===c&&(g.current=null)}},[]),Ne(()=>{H!==void 0&&g.current?.setValue(H)},[H]),Ne(()=>{G!==void 0&&g.current?.setCompletedParams(G)},[G]);let Te=JSON.stringify(r??null),ce;try{ce=JSON.stringify(i??null)}catch{ce="[unstringifiable]"}Ne(()=>{g.current?.update({apiConfig:r,additionalContext:i,language:p,currency:u,productId:m,optionOverrides:ie.overrides,dropdownTrigger:l,optionsPosition:w,closeDropdownOnBlur:s,showNonTappableOptions:T,showProducts:O})},[Te,ce,p,u?.code,u?.rate,u?.country,m,ie.key,l,w,s,T,O]);let we=B(!1);Ne(()=>{if(!we.current){we.current=!0;return}g.current?.update({products:ee.config})},[ee.enabled]),Ne(()=>{g.current?.update({mapProducts:ae})},[ae]);let ve=B(null);ve.current===null&&(ve.current={handleTextChange:c=>g.current?.handleTextChange(c),handleKeyDown:c=>{let N="nativeEvent"in c?c.nativeEvent:c;g.current?.handleKeyDown(N)},setFocused:c=>g.current?.setFocused(c),startEditingParam:c=>g.current?.startEditingParam(c),exitEditMode:()=>g.current?.exitEditMode(),handleCaretAfterInput:c=>g.current?.handleCaretAfterInput(c),handleCaretMove:c=>g.current?.handleCaretMove(c),replaceEditingRange:c=>g.current?.replaceEditingRange(c)??!1,setActivePill:c=>g.current?.setActivePill(c),skipActivePill:()=>g.current?.skipActivePill(),removeLastParam:()=>g.current?.removeLastParam(),clearNewParamId:()=>g.current?.clearNewParamId(),reset:()=>g.current?.reset(),refreshProducts:()=>g.current?.refreshProducts(),prepareSubmit:()=>g.current?.prepareSubmit(),getState:()=>g.current?.getState()??Zt,recordSubmit:c=>g.current?.recordSubmit(c),selectOption:c=>g.current?.selectOption(c),selectProduct:c=>g.current?.selectProduct(c),addProductToCart:c=>{let N=g.current;return!N||!Q.current?Promise.resolve():N.addProductToCart(c)},setActiveDropdownIndex:c=>g.current?.setActiveDropdownIndex(c),clearHighlight:c=>g.current?.clearHighlight(c),showPreviousMonth:()=>g.current?.showPreviousMonth(),showNextMonth:()=>g.current?.showNextMonth(),handleFocus:()=>g.current?.setFocused(!0),handleBlur:()=>g.current?.setFocused(!1)});let x=ve.current,Re=$t(c=>{let N=c.target.value,Qe=N.length>0&&!c.nativeEvent?.isComposing&&N[0]!==N[0].toUpperCase()?N[0].toUpperCase()+N.slice(1):N;g.current?.handleTextChange(Qe)},[]),De=$t(c=>{g.current?.handleKeyDown(c.nativeEvent)},[]),oe=g.current,f=ge??Zt,xe=H!==void 0?H:f.text,ye=G!==void 0?G:f.completedParams,Be=f.actionableSuggestions,ot=Be[0],nt=Ei(Be),Oe=oe?.listboxId??"",rt=f.activeDropdownIndex>=0&&oe?`${Oe}-option-${f.activeDropdownIndex}`:void 0,ke=f.editingParam,Ie=f.editingIdentified,Ge=ke?{parameter:ke.suggestionParameter,text:ke.suggestionPlaceholder,required:!0,options:ke.options}:Ie?{parameter:Ie.parameter,text:Ii(Ie.parameter),required:!0,options:[]}:null,Ye=f.dropdownSuggestion??Ge??ot,st=Ge?[Ge]:Be,Ke=Ti(f),Ee=!oe||f.dropdownLoading;return{completedParams:ye,skippedParams:f.skippedParams,identifiedParams:f.identifiedParams,suggestionPills:nt,setActivePill:x.setActivePill,skipActivePill:x.skipActivePill,removeLastParam:x.removeLastParam,segments:f.segments,newParamId:f.newParamId,clearNewParamId:x.clearNewParamId,suggestions:f.suggestions,activeIndex:f.activeDropdownIndex,isReady:f.isReady,isLoading:Ee,isFocused:f.isFocused,isDropdownOpen:f.isDropdownOpen,isActivePillSelected:f.isActivePillSelected,placeholderText:f.placeholderText,listboxId:Oe,error:f.error,products:f.products,customFields:f.customFields,selectProduct:x.selectProduct,addProductToCart:x.addProductToCart,handleTextChange:x.handleTextChange,handleKeyDown:x.handleKeyDown,setFocused:x.setFocused,editingParam:ke,editingIdentified:Ie,editingAnchor:f.editingAnchor,caretOffset:f.caretOffset,startEditingParam:x.startEditingParam,exitEditMode:x.exitEditMode,handleCaretAfterInput:x.handleCaretAfterInput,handleCaretMove:x.handleCaretMove,replaceEditingRange:x.replaceEditingRange,inputProps:{value:xe,placeholder:f.placeholderText||void 0,onChange:Re,onKeyDown:De,onFocus:x.handleFocus,onBlur:x.handleBlur,role:"combobox","aria-expanded":f.isDropdownOpen,"aria-activedescendant":rt,"aria-autocomplete":"list","aria-controls":Oe},reset:x.reset,refreshProducts:x.refreshProducts,prepareSubmit:x.prepareSubmit,getState:x.getState,recordSubmit:x.recordSubmit,dropdownProps:{suggestions:Ye?[{...Ye,options:f.dropdownOptions}]:[],activeIndex:f.activeDropdownIndex,onSelect:x.selectOption,onHighlight:x.setActiveDropdownIndex,onUnhighlight:x.clearHighlight,isOpen:f.isDropdownOpen,id:Oe,pills:st,activeSelected:f.isActivePillSelected,onPillClick:x.setActivePill,onSkip:x.skipActivePill,showSkipButton:(I??!0)&&!ke&&!Ie,showOptionIcons:D??!0,showOptionImages:q??!0,showOptionCounts:U??!0,skipDisabled:f.inSelectionAnimation,isLoading:Ee,skeletonExiting:f.skeletonExiting,isInputEmpty:xe.trim().length===0,language:p,products:f.products,productImageFallback:M,onProductSelect:x.selectProduct,onProductAddToCart:le?x.addProductToCart:void 0,onProductFocusChange:x.setFocused,formatType:f.activeFormatType,dateView:f.dateView,selectedDateIso:Ke.selectedIso,selectedDateRange:Ke.selectedRange,dateRangeStart:Ke.rangeStart,onPreviousMonth:x.showPreviousMonth,onNextMonth:x.showNextMonth,optionsPosition:w??"below"}}}import{chipIdFromTap as Ri,extractPlainText as Xt,getCursorOffset as Jt,keepCaretOnChip as Di,plainTextLength as Oi,renderEditableContent as Li,setCursorOffset as ea}from"@magicx-eng/ai-autocomplete-vanilla";import{useCallback as J,useEffect as at,useLayoutEffect as xt,useRef as Fe}from"react";var it;function zi(){if(it!==void 0)return it;if(typeof document>"u")return!1;let e=document.createElement("div");return e.setAttribute("contenteditable","plaintext-only"),it=e.contentEditable==="plaintext-only",it}function ta(e){let{segments:n,showChipIcons:t=!0,showChipImages:a=!0,newParamId:o,editingParam:r,editingIdentified:i,editingAnchor:p,caretOffset:u,placeholderText:m,isFocused:b,isDropdownOpen:k,listboxId:l,activeDescendantId:w,autoFocus:s,handleTextChange:T,handleKeyDown:D,handleCaretAfterInput:q,handleCaretMove:U,startEditingParam:I,replaceEditingRange:O,setFocused:M}=e,S=Fe(null),_=Fe(!1),H=Fe(""),G=Fe(""),X=Fe(null),R=Fe(0);X.current=u,at(()=>{if(!s)return;let d=S.current;if(!d)return;document.activeElement===d?M(!0):d.focus();let v=d.ownerDocument??document,y=v.getSelection(),P=y&&y.rangeCount>0&&d.contains(y.anchorNode);if(y&&!P){let C=v.createRange();C.selectNodeContents(d),C.collapse(!0),y.removeAllRanges(),y.addRange(C)}},[s,M]),at(()=>{let d=S.current;if(!d)return;let v=d.ownerDocument??document,y=()=>{let P=v.getSelection();if(!P||P.rangeCount===0||!P.anchorNode||!d.contains(P.anchorNode))return;let C=P.anchorNode,L=C.nodeType===Node.ELEMENT_NODE?C:C.parentElement,h=(P.isCollapsed?L?.closest("strong[data-param-id]"):null)?.dataset.paramId??null,V=r?.id??i?.id??null;if(h&&h!==V){I(h);return}performance.now()-R.current<50||U(Jt(d))};return v.addEventListener("selectionchange",y),()=>v.removeEventListener("selectionchange",y)},[r,i,I,U]),at(()=>{let d=S.current;if(!d)return;let v=y=>{let P=Ri(d,y.target);P&&(I(P),Di(d,P))};return d.addEventListener("click",v),()=>d.removeEventListener("click",v)},[I]),xt(()=>{let d=S.current;d&&Li({input:d,segments:n,newParamId:o,editingParamId:r?.id??null,placeholderText:m??"",isFocused:b,showChipIcons:t,showChipImages:a})},[n,o,r,m,b,t,a]),xt(()=>{let d=H.current,v=o??"";if(H.current=v,!v||v===d)return;let y=S.current;if(!y)return;y.focus();let P=X.current??Oi(y);ea(y,P)},[o]),xt(()=>{let d=G.current,v=r?.id??"";if(G.current=v,!v||v===d||p==null)return;let y=S.current;y&&ea(y,p)},[r,p]);let j=J(()=>{if(_.current)return;let d=S.current;if(!d)return;let v=Xt(d),P=v.length>0&&v[0]!==v[0].toUpperCase()?v[0].toUpperCase()+v.slice(1):v;T(P)},[T]),se=J(()=>{R.current=performance.now(),j();let d=S.current;d&&q(Jt(d))},[j,q]);at(()=>{let d=S.current;if(!d)return;let v=y=>{let P=y,C=P.inputType;if(C==="insertParagraph"||C==="insertLineBreak"||C==="insertFromDrop"){y.preventDefault();return}if(C.startsWith("insert")||C.startsWith("delete")){let L=C.startsWith("delete")?"":P.data??"";O(L)&&y.preventDefault()}};return d.addEventListener("beforeinput",v),()=>d.removeEventListener("beforeinput",v)},[O]);let ue=J(()=>{_.current=!0,S.current?.setAttribute("data-aia-composing","true")},[]),le=J(()=>{_.current=!1,S.current?.removeAttribute("data-aia-composing"),j()},[j]),Se=J(d=>{d.preventDefault();let v=S.current;if(!v)return;let y=(d.clipboardData.getData("text/plain")??"").replace(/\r?\n/g," ");if(!y)return;let P=v.ownerDocument??document,C=P.getSelection();if(!C||C.rangeCount===0)return;let L=C.getRangeAt(0);if(!v.contains(L.startContainer))return;L.deleteContents();let Q=P.createTextNode(y);L.insertNode(Q),L.setStartAfter(Q),L.collapse(!0),C.removeAllRanges(),C.addRange(L),j()},[j]),me=J(d=>D(d),[D]),g=J(()=>M(!0),[M]),ge=J(()=>M(!1),[M]),fe=J(()=>S.current?.focus(),[]),de=J(()=>S.current?.blur(),[]),be=J(()=>{let d=S.current;return d?Xt(d):""},[]),$=zi()?"plaintext-only":"true";return{inputRef:S,editorProps:{ref:S,contentEditable:$,suppressContentEditableWarning:!0,tabIndex:0,role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":l,"aria-expanded":k,"aria-activedescendant":w,spellCheck:!0,enterKeyHint:"send",onInput:se,onKeyDown:me,onCompositionStart:ue,onCompositionEnd:le,onPaste:Se,onFocus:g,onBlur:ge},getPlainText:be,focus:fe,blur:de}}import{jsx as He,jsxs as kt}from"react/jsx-runtime";function qi(e){return e!=="auto"?e:typeof window>"u"||window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}var Wi=Mi(function({onSubmit:n,onResult:t,onError:a,optionOverrides:o,maskCompletedText:r,className:i,apiConfig:p,additionalContext:u,language:m,currency:b,productId:k,visitorId:l,columns:w,pillPlacement:s="dropdown",mode:T="auto",optionsPosition:D="below",animations:q=!0,dropdownTrigger:U,closeDropdownOnBlur:I,showNonTappableOptions:O,showOptionIcons:M=!0,showChipIcons:S=!0,showChipImages:_=!0,showOptionImages:H=!0,showOptionCounts:G=!0,showSkipButton:X,showProducts:R,productsLayout:j,productImageFallback:se,autoFocus:ue=!0,onFocus:le,onBlur:Se,value:me,completedParams:g,onChange:ge,onParamsChange:fe,products:de,mapProducts:be,onProductSelect:$,onProductAddToCart:d,submitButton:v,resetOnSubmit:y=!0},P){let C=Ve(null),L=Ve(null),Q=Ve(()=>{}),h=Ve(null),V=Ve(null);aa(()=>{let A=C.current;if(A)return h.current?h.current.setMode(T):h.current=new Bi(A,T),()=>{h.current?.destroy(),h.current=null}},[T]);let ee=yt(A=>{let Y=V.current?.current;Y&&(Y.focus(),Gi(Y,A))},[]),{completedParams:te,suggestionPills:Pe,setActivePill:ae,skipActivePill:ie,segments:Te,newParamId:ce,clearNewParamId:we,placeholderText:ve,isFocused:x,isDropdownOpen:Re,isActivePillSelected:De,isLoading:oe,activeIndex:f,listboxId:xe,handleTextChange:ye,handleKeyDown:Be,setFocused:ot,editingParam:nt,editingIdentified:Oe,editingAnchor:rt,caretOffset:ke,startEditingParam:Ie,handleCaretAfterInput:Ge,handleCaretMove:Ye,replaceEditingRange:st,dropdownProps:Ke,reset:Ee,refreshProducts:c,prepareSubmit:N,getState:E,recordSubmit:Qe}=vt({onSubmit:A=>Q.current(A),onResult:t,onError:a,optionOverrides:o,maskCompletedText:r,apiConfig:p,additionalContext:u,language:m,currency:b,productId:k,visitorId:l,columns:w,dropdownTrigger:U,optionsPosition:D,closeDropdownOnBlur:I,showNonTappableOptions:O,showOptionIcons:M,showOptionImages:H,showOptionCounts:G,showSkipButton:X,showProducts:R,onFocus:le,onBlur:Se,value:me,completedParams:g,onChange:ge,onParamsChange:fe,products:de,mapProducts:be,onProductSelect:$,onProductAddToCart:d,source:"full-sdk",setCursor:ee});aa(()=>{if(!ce)return;let A=window.setTimeout(()=>we(),650);return()=>window.clearTimeout(A)},[ce,we]);let ia=f>=0?`${xe}-option-${f}`:void 0,{inputRef:lt,editorProps:oa,focus:$e,blur:Ct,getPlainText:St}=ta({segments:Te,newParamId:ce,editingParam:nt,editingIdentified:Oe,editingAnchor:rt,caretOffset:ke,placeholderText:ve,isFocused:x,showChipIcons:S,showChipImages:_,isDropdownOpen:Re,listboxId:xe,activeDescendantId:ia,autoFocus:ue,handleTextChange:ye,handleKeyDown:Be,handleCaretAfterInput:Ge,handleCaretMove:Ye,startEditingParam:Ie,replaceEditingRange:st,setFocused:ot});V.current=lt,Fi(()=>{let A=L.current,Y=lt.current;if(!A||!Y)return;let qe=()=>{let Tt=A.firstElementChild;if(!Tt)return;let la=Tt.getBoundingClientRect(),da=Y.getBoundingClientRect();la.top>=da.bottom-2?A.setAttribute("data-aia-pill-wrapped",""):A.removeAttribute("data-aia-pill-wrapped")};qe();let Pt=new ResizeObserver(qe);return Pt.observe(Y),()=>Pt.disconnect()},[Te,Pe.length,oe,lt]),Ni(P,()=>({focus:$e,blur:Ct,reset:Ee,refreshProducts:c,setMode:A=>h.current?.setMode(A),skipActivePill:ie}),[$e,Ct,Ee,c,ie]);let Ze=!!Te.length||te.length>0,dt=yt(A=>{if(!Ze)return;A&&N();let Y=E(),qe=Hi(St(),Y.completedParams,Y.skippedParams,{identifiedParams:Y.identifiedParams,isReady:Y.isReady,customFields:Y.customFields});A&&Qe(qe),n(qe),y&&Ee()},[Qe,y,Ze,N,E,n,Ee,St]);Q.current=()=>dt(!1);let na=yt(A=>{A.target?.closest("[data-aia-pill]")||$e()},[$e]),ra=s==="inline",sa=s==="dropdown";return kt("div",{ref:C,className:`magicx-aia ${Ae.container} ${i??""}`,"data-pill-placement":s,"data-options-position":D,"data-animations":q?"on":"off","data-mode":qi(T),children:[He(bt,{...Ke,showPills:sa,productsLayout:j,productImageFallback:se}),kt("div",{className:Ae.inputWrapper,"data-aia-input-wrapper":"",onClick:na,children:[kt("div",{className:Ae.editorArea,"data-aia-editor":"",children:[He("div",{...oa,className:Ae.input,"data-aia-input":""}),ra&&(oe||Pe.length>0)&&He("span",{ref:L,className:Ae.pillListContainer,"data-aia-pill-list-container":"",children:He(Je,{pills:Pe,activePillIndex:0,activeSelected:De,onSelectPill:ae,loading:oe})})]}),v===null?null:v===void 0?He(_t,{disabled:!Ze,onClick:()=>dt(!0),label:Ki(m).submit}):He("span",{"data-aia-submit":"","data-aia-submit-slot":"",className:Ae.submitSlot,onClick:A=>{Ze&&(A.stopPropagation(),dt(!0))},children:v})]})]})});export{Wi as AIAutocomplete,bt as AIAutocompleteDropdown,Kn as DATE_RANGE_META_END,qn as DATE_RANGE_META_START,Wn as DEFAULT_OPTION_COUNT_UNIT,ar as PRODUCT_PATH_PREFIX,hr as WEEKDAY_LABELS,Hn as buildSubmitResult,Bn as cellDay,Gn as cellIso,Un as dateCellMarks,_n as formatDate,jn as formatDateRange,Vn as formatOptionCount,Yn as isoDate,Qn as monthLabel,$n as optionCountLabel,Zn as optionHasImage,Xn as optionImageSources,Jn as optionImageSrc,er as optionLabel,tr as optionsShowLeadingVisuals,ir as parseDate,or as parseLooseDate,nr as parseLooseDateRange,rr as productFromMatchedItem,sr as productImageSources,lr as productsFromCustomFields,dr as sanitizeOptionIconSvg,cr as selectedRangeFor,vt as useAIAutocomplete,pr as visibleDateRange,ur as withSkippedParams};
|
|
2681
|
+
`,document.head.appendChild(e)}var Ut={submitButton:"aia-submitButton-otz7H"};import{jsx as wt}from"react/jsx-runtime";function _t({disabled:e,onClick:n,label:t=Si().submit}){return wt("button",{type:"button","data-aia-submit":"",className:Ut.submitButton,disabled:e,onClick:a=>{a.stopPropagation(),n()},"aria-label":t,children:wt("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",role:"img","aria-label":t,children:wt("path",{d:"M9 14V4M9 4L4 9M9 4L14 9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}import{AIAutocomplete as Pi,dateSelectionFor as Ti,identifiedParamLabel as Ii,withoutTraditionalAutocomplete as Ei}from"@magicx-eng/ai-autocomplete-vanilla";import{useCallback as $t,useEffect as Ne,useRef as G,useState as Ai}from"react";import{useRef as jt}from"react";function Vt(e){let n=jt(e);n.current=e;let t=Object.keys(e??{}).sort().join("\0"),a=jt({key:"",overrides:void 0});if(a.current.key!==t){let o={};for(let r of Object.keys(e??{})){let i=(c,u,g)=>{let w=n.current?.[r];return w?w(c,u,g):[]};o[r]=i}a.current={key:t,overrides:e?o:void 0}}return{overrides:a.current.overrides,key:t}}import{useRef as Yt}from"react";function Qt(e){let n=Yt(e);n.current=e;let t=Yt(null);t.current===null&&(t.current={fetch:(o,r)=>{let i=n.current;return i?i.fetch(o,r):Promise.reject(new Error("products config removed"))},transform:o=>n.current?.transform(o)??[],get limit(){return n.current?.limit}});let a=e!==void 0;return{config:a?t.current:void 0,enabled:a}}var Zt={text:"",completedParams:[],identifiedParams:[],skippedParams:[],pendingSpan:null,suggestions:[],products:[],traditionalAutocomplete:!1,customFields:null,optionSearch:null,activeDropdownIndex:-1,newParamId:null,isLoading:!0,isReady:!1,error:null,segments:[],actionableSuggestions:[],filteredOptions:[],dropdownLoading:!0,dropdownOptions:[],skeletonOptions:null,skeletonSuggestion:null,dropdownSuggestion:null,skeletonRequested:!1,skeletonExiting:!1,activeFormatType:"options",dateView:null,dateRangeStart:null,placeholderText:"",optionQuery:"",isSearchingOptions:!1,isDropdownOpen:!1,isActivePillSelected:!1,filterBase:0,filterInProgress:!1,pillTapped:!1,skipNextFetch:!1,lastRawQuery:"",isFocused:!1,dropdownHeld:!1,editingParam:null,editingIdentified:null,editingAnchor:null,editingTail:null,caretOffset:null,inSelectionAnimation:!1,dateViewMonth:null,pendingRangeStart:null};function vt({onSubmit:e,onResult:n,onError:t,optionOverrides:a,maskCompletedText:o,apiConfig:r,additionalContext:i,language:c,currency:u,productId:g,visitorId:w,columns:k=2,dropdownTrigger:p,optionsPosition:s,closeDropdownOnBlur:f,showNonTappableOptions:I,showOptionIcons:M,showOptionImages:q,showOptionCounts:U,showSkipButton:T,showProducts:D,productImageFallback:N="image",onFocus:S,onBlur:_,value:H,completedParams:K,onChange:X,onParamsChange:R,products:j,mapProducts:se,onProductSelect:ue,onProductAddToCart:le,source:Se,setCursor:ge}){let m=G(null),[me,fe]=Ai(null),de=G(e);de.current=e;let be=G(n);be.current=n;let $=G(t);$.current=t;let l=G(X);l.current=X;let v=G(R);v.current=R;let y=G(S);y.current=S;let P=G(_);P.current=_;let C=G(ge);C.current=ge;let O=G(ue);O.current=ue;let Q=G(le);Q.current=le;let h=G(w);h.current=w;let V=G(()=>{let d=h.current;return typeof d=="function"?d():d}).current,ee=Qt(j),te=G(se);te.current=se;let Pe=G((d,F)=>{let E=te.current;return E?E(d,F):d}).current,ae=se?Pe:void 0,ie=Vt(a);Ne(()=>{if(typeof document>"u")return;let d=new Pi(document.createElement("div"),{renderMode:"headless",apiConfig:r,additionalContext:i,language:c,currency:u,productId:g,visitorId:V,optionOverrides:ie.overrides,maskCompletedText:o,columns:k,dropdownTrigger:p,optionsPosition:s,closeDropdownOnBlur:f,showNonTappableOptions:I,showProducts:D,source:Se,value:H,completedParams:K,onSubmit:(...E)=>de.current?.(...E),onResult:(...E)=>be.current?.(...E),onError:(...E)=>$.current?.(...E),onChange:(...E)=>l.current?.(...E),onParamsChange:(...E)=>v.current?.(...E),onFocus:()=>y.current?.(),onBlur:()=>P.current?.(),onProductSelect:E=>O.current?.(E),onProductAddToCart:E=>Q.current?.(E),setCursor:E=>C.current?.(E),products:ee.config,mapProducts:ae});m.current=d,fe(d.getState());let F=d.subscribe(E=>fe(E));return()=>{F(),d.destroy(),m.current===d&&(m.current=null)}},[]),Ne(()=>{H!==void 0&&m.current?.setValue(H)},[H]),Ne(()=>{K!==void 0&&m.current?.setCompletedParams(K)},[K]);let Te=JSON.stringify(r??null),ce;try{ce=JSON.stringify(i??null)}catch{ce="[unstringifiable]"}Ne(()=>{m.current?.update({apiConfig:r,additionalContext:i,language:c,currency:u,productId:g,optionOverrides:ie.overrides,dropdownTrigger:p,optionsPosition:s,closeDropdownOnBlur:f,showNonTappableOptions:I,showProducts:D})},[Te,ce,c,u?.code,u?.rate,u?.country,g,ie.key,p,s,f,I,D]);let we=G(!1);Ne(()=>{if(!we.current){we.current=!0;return}m.current?.update({products:ee.config})},[ee.enabled]),Ne(()=>{m.current?.update({mapProducts:ae})},[ae]);let ve=G(null);ve.current===null&&(ve.current={handleTextChange:d=>m.current?.handleTextChange(d),handleKeyDown:d=>{let F="nativeEvent"in d?d.nativeEvent:d;m.current?.handleKeyDown(F)},setFocused:d=>m.current?.setFocused(d),startEditingParam:d=>m.current?.startEditingParam(d),exitEditMode:()=>m.current?.exitEditMode(),handleCaretAfterInput:d=>m.current?.handleCaretAfterInput(d),handleCaretMove:d=>m.current?.handleCaretMove(d),replaceEditingRange:d=>m.current?.replaceEditingRange(d)??!1,setActivePill:d=>m.current?.setActivePill(d),skipActivePill:()=>m.current?.skipActivePill(),removeLastParam:()=>m.current?.removeLastParam(),clearNewParamId:()=>m.current?.clearNewParamId(),reset:()=>m.current?.reset(),refreshProducts:()=>m.current?.refreshProducts(),prepareSubmit:()=>m.current?.prepareSubmit(),getState:()=>m.current?.getState()??Zt,recordSubmit:d=>m.current?.recordSubmit(d),selectOption:d=>m.current?.selectOption(d),selectProduct:d=>m.current?.selectProduct(d),addProductToCart:d=>{let F=m.current;return!F||!Q.current?Promise.resolve():F.addProductToCart(d)},setActiveDropdownIndex:d=>m.current?.setActiveDropdownIndex(d),clearHighlight:d=>m.current?.clearHighlight(d),showPreviousMonth:()=>m.current?.showPreviousMonth(),showNextMonth:()=>m.current?.showNextMonth(),handleFocus:()=>m.current?.setFocused(!0),handleBlur:()=>m.current?.setFocused(!1)});let x=ve.current,Re=$t(d=>{let F=d.target.value,Ye=F.length>0&&!d.nativeEvent?.isComposing&&F[0]!==F[0].toUpperCase()?F[0].toUpperCase()+F.slice(1):F;m.current?.handleTextChange(Ye)},[]),De=$t(d=>{m.current?.handleKeyDown(d.nativeEvent)},[]),oe=m.current,b=me??Zt,xe=H!==void 0?H:b.text,ye=K!==void 0?K:b.completedParams,Be=b.actionableSuggestions,ot=Be[0],nt=Ei(Be),Oe=oe?.listboxId??"",rt=b.activeDropdownIndex>=0&&oe?`${Oe}-option-${b.activeDropdownIndex}`:void 0,ke=b.editingParam,Ie=b.editingIdentified,Ge=ke?{parameter:ke.suggestionParameter,text:ke.suggestionPlaceholder,required:!0,options:ke.options}:Ie?{parameter:Ie.parameter,text:Ii(Ie.parameter),required:!0,options:[]}:null,Ve=b.dropdownSuggestion??Ge??ot,st=Ge?[Ge]:Be,Ke=Ti(b),Ee=!oe||b.dropdownLoading;return{completedParams:ye,skippedParams:b.skippedParams,identifiedParams:b.identifiedParams,suggestionPills:nt,setActivePill:x.setActivePill,skipActivePill:x.skipActivePill,removeLastParam:x.removeLastParam,segments:b.segments,newParamId:b.newParamId,clearNewParamId:x.clearNewParamId,suggestions:b.suggestions,activeIndex:b.activeDropdownIndex,isReady:b.isReady,isLoading:Ee,isFocused:b.isFocused,isDropdownOpen:b.isDropdownOpen,isActivePillSelected:b.isActivePillSelected,placeholderText:b.placeholderText,listboxId:Oe,error:b.error,products:b.products,customFields:b.customFields,selectProduct:x.selectProduct,addProductToCart:x.addProductToCart,handleTextChange:x.handleTextChange,handleKeyDown:x.handleKeyDown,setFocused:x.setFocused,editingParam:ke,editingIdentified:Ie,editingAnchor:b.editingAnchor,caretOffset:b.caretOffset,startEditingParam:x.startEditingParam,exitEditMode:x.exitEditMode,handleCaretAfterInput:x.handleCaretAfterInput,handleCaretMove:x.handleCaretMove,replaceEditingRange:x.replaceEditingRange,inputProps:{value:xe,placeholder:b.placeholderText||void 0,onChange:Re,onKeyDown:De,onFocus:x.handleFocus,onBlur:x.handleBlur,role:"combobox","aria-expanded":b.isDropdownOpen,"aria-activedescendant":rt,"aria-autocomplete":"list","aria-controls":Oe},reset:x.reset,refreshProducts:x.refreshProducts,prepareSubmit:x.prepareSubmit,getState:x.getState,recordSubmit:x.recordSubmit,dropdownProps:{suggestions:Ve?[{...Ve,options:b.dropdownOptions}]:[],activeIndex:b.activeDropdownIndex,onSelect:x.selectOption,onHighlight:x.setActiveDropdownIndex,onUnhighlight:x.clearHighlight,isOpen:b.isDropdownOpen,id:Oe,pills:st,activeSelected:b.isActivePillSelected,onPillClick:x.setActivePill,onSkip:x.skipActivePill,showSkipButton:(T??!0)&&!ke&&!Ie,showOptionIcons:M??!0,showOptionImages:q??!0,showOptionCounts:U??!0,skipDisabled:b.inSelectionAnimation,isLoading:Ee,skeletonExiting:b.skeletonExiting,isInputEmpty:xe.trim().length===0,language:c,products:b.products,productImageFallback:N,onProductSelect:x.selectProduct,onProductAddToCart:le?x.addProductToCart:void 0,onProductFocusChange:x.setFocused,formatType:b.activeFormatType,dateView:b.dateView,selectedDateIso:Ke.selectedIso,selectedDateRange:Ke.selectedRange,dateRangeStart:Ke.rangeStart,onPreviousMonth:x.showPreviousMonth,onNextMonth:x.showNextMonth,optionsPosition:s??"below"}}}import{chipIdFromTap as Ri,extractPlainText as Xt,getCursorOffset as Jt,keepCaretOnChip as Di,plainTextLength as Oi,renderEditableContent as Li,setCursorOffset as ea}from"@magicx-eng/ai-autocomplete-vanilla";import{useCallback as J,useEffect as at,useLayoutEffect as xt,useRef as Fe}from"react";var it;function zi(){if(it!==void 0)return it;if(typeof document>"u")return!1;let e=document.createElement("div");return e.setAttribute("contenteditable","plaintext-only"),it=e.contentEditable==="plaintext-only",it}function ta(e){let{segments:n,showChipIcons:t=!0,showChipImages:a=!0,newParamId:o,editingParam:r,editingIdentified:i,editingAnchor:c,caretOffset:u,placeholderText:g,isFocused:w,isDropdownOpen:k,listboxId:p,activeDescendantId:s,autoFocus:f,handleTextChange:I,handleKeyDown:M,handleCaretAfterInput:q,handleCaretMove:U,startEditingParam:T,replaceEditingRange:D,setFocused:N}=e,S=Fe(null),_=Fe(!1),H=Fe(""),K=Fe(""),X=Fe(null),R=Fe(0);X.current=u,at(()=>{if(!f)return;let l=S.current;if(!l)return;document.activeElement===l?N(!0):l.focus();let v=l.ownerDocument??document,y=v.getSelection(),P=y&&y.rangeCount>0&&l.contains(y.anchorNode);if(y&&!P){let C=v.createRange();C.selectNodeContents(l),C.collapse(!0),y.removeAllRanges(),y.addRange(C)}},[f,N]),at(()=>{let l=S.current;if(!l)return;let v=l.ownerDocument??document,y=()=>{let P=v.getSelection();if(!P||P.rangeCount===0||!P.anchorNode||!l.contains(P.anchorNode))return;let C=P.anchorNode,O=C.nodeType===Node.ELEMENT_NODE?C:C.parentElement,h=(P.isCollapsed?O?.closest("strong[data-param-id]"):null)?.dataset.paramId??null,V=r?.id??i?.id??null;if(h&&h!==V){T(h);return}performance.now()-R.current<50||U(Jt(l))};return v.addEventListener("selectionchange",y),()=>v.removeEventListener("selectionchange",y)},[r,i,T,U]),at(()=>{let l=S.current;if(!l)return;let v=y=>{let P=Ri(l,y.target);P&&(T(P),Di(l,P))};return l.addEventListener("click",v),()=>l.removeEventListener("click",v)},[T]),xt(()=>{let l=S.current;l&&Li({input:l,segments:n,newParamId:o,editingParamId:r?.id??null,placeholderText:g??"",isFocused:w,showChipIcons:t,showChipImages:a})},[n,o,r,g,w,t,a]),xt(()=>{let l=H.current,v=o??"";if(H.current=v,!v||v===l)return;let y=S.current;if(!y)return;y.focus();let P=X.current??Oi(y);ea(y,P)},[o]),xt(()=>{let l=K.current,v=r?.id??"";if(K.current=v,!v||v===l||c==null)return;let y=S.current;y&&ea(y,c)},[r,c]);let j=J(()=>{if(_.current)return;let l=S.current;if(!l)return;let v=Xt(l),P=v.length>0&&v[0]!==v[0].toUpperCase()?v[0].toUpperCase()+v.slice(1):v;I(P)},[I]),se=J(()=>{R.current=performance.now(),j();let l=S.current;l&&q(Jt(l))},[j,q]);at(()=>{let l=S.current;if(!l)return;let v=y=>{let P=y,C=P.inputType;if(C==="insertParagraph"||C==="insertLineBreak"||C==="insertFromDrop"){y.preventDefault();return}if(C.startsWith("insert")||C.startsWith("delete")){let O=C.startsWith("delete")?"":P.data??"";D(O)&&y.preventDefault()}};return l.addEventListener("beforeinput",v),()=>l.removeEventListener("beforeinput",v)},[D]);let ue=J(()=>{_.current=!0,S.current?.setAttribute("data-aia-composing","true")},[]),le=J(()=>{_.current=!1,S.current?.removeAttribute("data-aia-composing"),j()},[j]),Se=J(l=>{l.preventDefault();let v=S.current;if(!v)return;let y=(l.clipboardData.getData("text/plain")??"").replace(/\r?\n/g," ");if(!y)return;let P=v.ownerDocument??document,C=P.getSelection();if(!C||C.rangeCount===0)return;let O=C.getRangeAt(0);if(!v.contains(O.startContainer))return;O.deleteContents();let Q=P.createTextNode(y);O.insertNode(Q),O.setStartAfter(Q),O.collapse(!0),C.removeAllRanges(),C.addRange(O),j()},[j]),ge=J(l=>M(l),[M]),m=J(()=>N(!0),[N]),me=J(()=>N(!1),[N]),fe=J(()=>S.current?.focus(),[]),de=J(()=>S.current?.blur(),[]),be=J(()=>{let l=S.current;return l?Xt(l):""},[]),$=zi()?"plaintext-only":"true";return{inputRef:S,editorProps:{ref:S,contentEditable:$,suppressContentEditableWarning:!0,tabIndex:0,role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":p,"aria-expanded":k,"aria-activedescendant":s,spellCheck:!0,enterKeyHint:"send",onInput:se,onKeyDown:ge,onCompositionStart:ue,onCompositionEnd:le,onPaste:Se,onFocus:m,onBlur:me},getPlainText:be,focus:fe,blur:de}}import{jsx as He,jsxs as kt}from"react/jsx-runtime";function qi(e){return e!=="auto"?e:typeof window>"u"||window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}var Wi=Mi(function({onSubmit:n,onResult:t,onError:a,optionOverrides:o,maskCompletedText:r,className:i,apiConfig:c,additionalContext:u,language:g,currency:w,productId:k,visitorId:p,columns:s,pillPlacement:f="dropdown",mode:I="auto",optionsPosition:M="below",animations:q=!0,dropdownTrigger:U,closeDropdownOnBlur:T,showNonTappableOptions:D,showOptionIcons:N=!0,showChipIcons:S=!0,showChipImages:_=!0,showOptionImages:H=!0,showOptionCounts:K=!0,showSkipButton:X,showProducts:R,productsLayout:j,productImageFallback:se,autoFocus:ue=!0,onFocus:le,onBlur:Se,value:ge,completedParams:m,onChange:me,onParamsChange:fe,products:de,mapProducts:be,onProductSelect:$,onProductAddToCart:l,submitButton:v,resetOnSubmit:y=!0},P){let C=je(null),O=je(null),Q=je(()=>{}),h=je(null),V=je(null);aa(()=>{let A=C.current;if(A)return h.current?h.current.setMode(I):h.current=new Bi(A,I),()=>{h.current?.destroy(),h.current=null}},[I]);let ee=yt(A=>{let Y=V.current?.current;Y&&(Y.focus(),Gi(Y,A))},[]),{completedParams:te,suggestionPills:Pe,setActivePill:ae,skipActivePill:ie,segments:Te,newParamId:ce,clearNewParamId:we,placeholderText:ve,isFocused:x,isDropdownOpen:Re,isActivePillSelected:De,isLoading:oe,activeIndex:b,listboxId:xe,handleTextChange:ye,handleKeyDown:Be,setFocused:ot,editingParam:nt,editingIdentified:Oe,editingAnchor:rt,caretOffset:ke,startEditingParam:Ie,handleCaretAfterInput:Ge,handleCaretMove:Ve,replaceEditingRange:st,dropdownProps:Ke,reset:Ee,refreshProducts:d,prepareSubmit:F,getState:E,recordSubmit:Ye}=vt({onSubmit:A=>Q.current(A),onResult:t,onError:a,optionOverrides:o,maskCompletedText:r,apiConfig:c,additionalContext:u,language:g,currency:w,productId:k,visitorId:p,columns:s,dropdownTrigger:U,optionsPosition:M,closeDropdownOnBlur:T,showNonTappableOptions:D,showOptionIcons:N,showOptionImages:H,showOptionCounts:K,showSkipButton:X,showProducts:R,onFocus:le,onBlur:Se,value:ge,completedParams:m,onChange:me,onParamsChange:fe,products:de,mapProducts:be,onProductSelect:$,onProductAddToCart:l,source:"full-sdk",setCursor:ee});aa(()=>{if(!ce)return;let A=window.setTimeout(()=>we(),650);return()=>window.clearTimeout(A)},[ce,we]);let ia=b>=0?`${xe}-option-${b}`:void 0,{inputRef:lt,editorProps:oa,focus:Qe,blur:Ct,getPlainText:St}=ta({segments:Te,newParamId:ce,editingParam:nt,editingIdentified:Oe,editingAnchor:rt,caretOffset:ke,placeholderText:ve,isFocused:x,showChipIcons:S,showChipImages:_,isDropdownOpen:Re,listboxId:xe,activeDescendantId:ia,autoFocus:ue,handleTextChange:ye,handleKeyDown:Be,handleCaretAfterInput:Ge,handleCaretMove:Ve,startEditingParam:Ie,replaceEditingRange:st,setFocused:ot});V.current=lt,Fi(()=>{let A=O.current,Y=lt.current;if(!A||!Y)return;let qe=()=>{let Tt=A.firstElementChild;if(!Tt)return;let la=Tt.getBoundingClientRect(),da=Y.getBoundingClientRect();la.top>=da.bottom-2?A.setAttribute("data-aia-pill-wrapped",""):A.removeAttribute("data-aia-pill-wrapped")};qe();let Pt=new ResizeObserver(qe);return Pt.observe(Y),()=>Pt.disconnect()},[Te,Pe.length,oe,lt]),Ni(P,()=>({focus:Qe,blur:Ct,reset:Ee,refreshProducts:d,setMode:A=>h.current?.setMode(A),skipActivePill:ie}),[Qe,Ct,Ee,d,ie]);let $e=!!Te.length||te.length>0,dt=yt(A=>{if(!$e)return;A&&F();let Y=E(),qe=Hi(St(),Y.completedParams,Y.skippedParams,{identifiedParams:Y.identifiedParams,isReady:Y.isReady,customFields:Y.customFields});A&&Ye(qe),n(qe),y&&Ee()},[Ye,y,$e,F,E,n,Ee,St]);Q.current=()=>dt(!1);let na=yt(A=>{A.target?.closest("[data-aia-pill]")||Qe()},[Qe]),ra=f==="inline",sa=f==="dropdown";return kt("div",{ref:C,className:`magicx-aia ${Ae.container} ${i??""}`,"data-pill-placement":f,"data-options-position":M,"data-animations":q?"on":"off","data-mode":qi(I),children:[He(bt,{...Ke,showPills:sa,productsLayout:j,productImageFallback:se}),kt("div",{className:Ae.inputWrapper,"data-aia-input-wrapper":"",onClick:na,children:[kt("div",{className:Ae.editorArea,"data-aia-editor":"",children:[He("div",{...oa,className:Ae.input,"data-aia-input":""}),ra&&(oe||Pe.length>0)&&He("span",{ref:O,className:Ae.pillListContainer,"data-aia-pill-list-container":"",children:He(Xe,{pills:Pe,activePillIndex:0,activeSelected:De,onSelectPill:ae,loading:oe})})]}),v===null?null:v===void 0?He(_t,{disabled:!$e,onClick:()=>dt(!0),label:Ki(g).submit}):He("span",{"data-aia-submit":"","data-aia-submit-slot":"",className:Ae.submitSlot,onClick:A=>{$e&&(A.stopPropagation(),dt(!0))},children:v})]})]})});export{Wi as AIAutocomplete,bt as AIAutocompleteDropdown,Kn as DATE_RANGE_META_END,qn as DATE_RANGE_META_START,Wn as DEFAULT_OPTION_COUNT_UNIT,ar as PRODUCT_PATH_PREFIX,hr as WEEKDAY_LABELS,Hn as buildSubmitResult,Bn as cellDay,Gn as cellIso,Un as dateCellMarks,_n as formatDate,jn as formatDateRange,Vn as formatOptionCount,Yn as isoDate,Qn as monthLabel,$n as optionCountLabel,Zn as optionHasImage,Xn as optionImageSources,Jn as optionImageSrc,er as optionLabel,tr as optionsShowLeadingVisuals,ir as parseDate,or as parseLooseDate,nr as parseLooseDateRange,rr as productFromMatchedItem,sr as productImageSources,lr as productsFromCustomFields,dr as sanitizeOptionIconSvg,cr as selectedRangeFor,vt as useAIAutocomplete,pr as visibleDateRange,ur as withSkippedParams};
|
|
2652
2682
|
//# sourceMappingURL=index.mjs.map
|