@magicx-eng/ai-autocomplete-react 0.53.2 → 0.54.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 +1 -0
- package/dist/index.js +26 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -570,6 +570,7 @@ For styling beyond the CSS variables, target these stable `data-aia-*` attribute
|
|
|
570
570
|
| `[data-aia-pillbar]` | Pill bar container inside the dropdown |
|
|
571
571
|
| `[data-aia-pill-scroll]` | Scrollable pill region inside the bar — carries the horizontal scroll and right-edge fade mask |
|
|
572
572
|
| `[data-aia-skip]` | The pill bar's "skip" button: at the header's trailing edge, or alone at the end of a skip-only row. Tune via `--aia-skip-font-size` / `--aia-skip-color` / `--aia-skip-color-hover` / `--aia-skip-hover-bg` |
|
|
573
|
+
| `[data-aia-hint-el]` | The empty box's hint: the lead-in and the first starting options, one at a time. Tune via `--aia-hint-color` / `--aia-hint-font-weight` / `--aia-hint-icon-opacity` |
|
|
573
574
|
| `[data-aia-option]` | Each suggestion option |
|
|
574
575
|
| `[data-aia-scroll-arrow]` | The "more below" arrow on the dropdown — carries `data-aia-visible` while shown |
|
|
575
576
|
| `[data-aia-dropdown]` | The dropdown root (listbox). Carries `data-aia-has-products` while the product strip has cards, and `data-aia-fit` while it is fitted to a short screen (see [Short screens](#short-screens)). |
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Ot=Object.defineProperty;var Pa=Object.getOwnPropertyDescriptor;var Ia=Object.getOwnPropertyNames;var Ea=Object.prototype.hasOwnProperty;var Aa=(e,a)=>{for(var t in a)Ot(e,t,{get:a[t],enumerable:!0})},Ra=(e,a,t,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let o of Ia(a))!Ea.call(e,o)&&o!==t&&Ot(e,o,{get:()=>a[o],enumerable:!(i=Pa(a,o))||i.enumerable});return e};var Oa=e=>Ra(Ot({},"__esModule",{value:!0}),e);var ni={};Aa(ni,{AIAutocomplete:()=>wa,AIAutocompleteDropdown:()=>Tt,DATE_RANGE_META_END:()=>l.DATE_RANGE_META_END,DATE_RANGE_META_START:()=>l.DATE_RANGE_META_START,DEFAULT_OPTION_COUNT_UNIT:()=>l.DEFAULT_OPTION_COUNT_UNIT,LOCATION_META_KEY:()=>l.LOCATION_META_KEY,PRODUCT_PATH_PREFIX:()=>l.PRODUCT_PATH_PREFIX,TIME_META_KEY:()=>l.TIME_META_KEY,WEEKDAY_LABELS:()=>l.WEEKDAY_LABELS,buildSubmitResult:()=>l.buildSubmitResult,cellDay:()=>l.cellDay,cellIso:()=>l.cellIso,dateCellMarks:()=>l.dateCellMarks,formatDate:()=>l.formatDate,formatDateRange:()=>l.formatDateRange,formatOptionCount:()=>l.formatOptionCount,formatPlace:()=>l.formatPlace,formatTime:()=>l.formatTime,isoDate:()=>l.isoDate,monthLabel:()=>l.monthLabel,optionCountLabel:()=>l.optionCountLabel,optionHasImage:()=>l.optionHasImage,optionImageSources:()=>l.optionImageSources,optionImageSrc:()=>l.optionImageSrc,optionLabel:()=>l.optionLabel,optionsShowLeadingVisuals:()=>l.optionsShowLeadingVisuals,parseDate:()=>l.parseDate,parseLooseDate:()=>l.parseLooseDate,parseLooseDateRange:()=>l.parseLooseDateRange,parseTime:()=>l.parseTime,productFromMatchedItem:()=>l.productFromMatchedItem,productImageSources:()=>l.productImageSources,productsFromCustomFields:()=>l.productsFromCustomFields,sanitizeOptionIconSvg:()=>l.sanitizeOptionIconSvg,selectedRangeFor:()=>l.selectedRangeFor,useAIAutocomplete:()=>It,visibleDateRange:()=>l.visibleDateRange,withSkippedParams:()=>l.withSkippedParams});module.exports=Oa(ni);var l=require("@magicx-eng/ai-autocomplete-vanilla");var
|
|
1
|
+
"use strict";var Ot=Object.defineProperty;var Pa=Object.getOwnPropertyDescriptor;var Ia=Object.getOwnPropertyNames;var Ea=Object.prototype.hasOwnProperty;var Aa=(e,a)=>{for(var t in a)Ot(e,t,{get:a[t],enumerable:!0})},Ra=(e,a,t,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let o of Ia(a))!Ea.call(e,o)&&o!==t&&Ot(e,o,{get:()=>a[o],enumerable:!(i=Pa(a,o))||i.enumerable});return e};var Oa=e=>Ra(Ot({},"__esModule",{value:!0}),e);var ni={};Aa(ni,{AIAutocomplete:()=>wa,AIAutocompleteDropdown:()=>Tt,DATE_RANGE_META_END:()=>l.DATE_RANGE_META_END,DATE_RANGE_META_START:()=>l.DATE_RANGE_META_START,DEFAULT_OPTION_COUNT_UNIT:()=>l.DEFAULT_OPTION_COUNT_UNIT,LOCATION_META_KEY:()=>l.LOCATION_META_KEY,PRODUCT_PATH_PREFIX:()=>l.PRODUCT_PATH_PREFIX,TIME_META_KEY:()=>l.TIME_META_KEY,WEEKDAY_LABELS:()=>l.WEEKDAY_LABELS,buildSubmitResult:()=>l.buildSubmitResult,cellDay:()=>l.cellDay,cellIso:()=>l.cellIso,dateCellMarks:()=>l.dateCellMarks,formatDate:()=>l.formatDate,formatDateRange:()=>l.formatDateRange,formatOptionCount:()=>l.formatOptionCount,formatPlace:()=>l.formatPlace,formatTime:()=>l.formatTime,isoDate:()=>l.isoDate,monthLabel:()=>l.monthLabel,optionCountLabel:()=>l.optionCountLabel,optionHasImage:()=>l.optionHasImage,optionImageSources:()=>l.optionImageSources,optionImageSrc:()=>l.optionImageSrc,optionLabel:()=>l.optionLabel,optionsShowLeadingVisuals:()=>l.optionsShowLeadingVisuals,parseDate:()=>l.parseDate,parseLooseDate:()=>l.parseLooseDate,parseLooseDateRange:()=>l.parseLooseDateRange,parseTime:()=>l.parseTime,productFromMatchedItem:()=>l.productFromMatchedItem,productImageSources:()=>l.productImageSources,productsFromCustomFields:()=>l.productsFromCustomFields,sanitizeOptionIconSvg:()=>l.sanitizeOptionIconSvg,selectedRangeFor:()=>l.selectedRangeFor,useAIAutocomplete:()=>It,visibleDateRange:()=>l.visibleDateRange,withSkippedParams:()=>l.withSkippedParams});module.exports=Oa(ni);var l=require("@magicx-eng/ai-autocomplete-vanilla");var $=require("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
|
|
@@ -236,6 +236,18 @@
|
|
|
236
236
|
opacity: 0;
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
+
/* The empty box's hint (the lead word and the starting options, swapping
|
|
240
|
+
one at a time) is a sibling laid over the input; while it shows, the
|
|
241
|
+
input's own placeholder steps aside, and during IME composition the hint
|
|
242
|
+
steps aside for the composing text. */
|
|
243
|
+
.aia-input-IW-P-[data-aia-empty="true"][data-placeholder][data-aia-hint]::before {
|
|
244
|
+
content: none;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
[data-aia-hint-el]:has(+ .aia-input-IW-P-[data-aia-composing]) {
|
|
248
|
+
visibility: hidden;
|
|
249
|
+
}
|
|
250
|
+
|
|
239
251
|
@media (prefers-reduced-motion: reduce) {
|
|
240
252
|
.aia-input-IW-P-[data-aia-empty="true"][data-placeholder]::before {
|
|
241
253
|
transition-duration: 0s;
|
|
@@ -346,7 +358,7 @@
|
|
|
346
358
|
transition: none;
|
|
347
359
|
}
|
|
348
360
|
}
|
|
349
|
-
`,document.head.appendChild(e)}var rt={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",aiaChipForm:"aia-aiaChipForm-tKbNc",aiaTileGrow:"aia-aiaTileGrow-j9Pat",aiaTileSpring:"aia-aiaTileSpring-FEwNg",aiaTileFade:"aia-aiaTileFade-H1LDQ",aiaImageGrow:"aia-aiaImageGrow-i9yw8"};var
|
|
361
|
+
`,document.head.appendChild(e)}var rt={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",aiaChipForm:"aia-aiaChipForm-tKbNc",aiaTileGrow:"aia-aiaTileGrow-j9Pat",aiaTileSpring:"aia-aiaTileSpring-FEwNg",aiaTileFade:"aia-aiaTileFade-H1LDQ",aiaImageGrow:"aia-aiaImageGrow-i9yw8"};var z=require("@magicx-eng/ai-autocomplete-vanilla"),Q=require("react");if(typeof document<"u"&&!document.getElementById("ac-style-0ae03977")){let e=document.createElement("style");e.id="ac-style-0ae03977",e.textContent=`/*
|
|
350
362
|
* Built-in appearance defaults \u2014 zero specificity via :where().
|
|
351
363
|
* Consumer CSS always wins without !important.
|
|
352
364
|
*
|
|
@@ -1534,7 +1546,7 @@
|
|
|
1534
1546
|
transition-delay: 0s;
|
|
1535
1547
|
}
|
|
1536
1548
|
}
|
|
1537
|
-
`,document.head.appendChild(e)}var
|
|
1549
|
+
`,document.head.appendChild(e)}var He={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",skeletonBar:"aia-skeletonBar-O3xIx",multiDone:"aia-multiDone-y12U7"};var J=require("@magicx-eng/ai-autocomplete-vanilla"),Vt=require("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) ---
|
|
1538
1550
|
|
|
1539
1551
|
One of three hand-maintained copies (vanilla styles.css, this file, Angular's
|
|
1540
1552
|
date-grid.component.css). Only the class-naming layer differs \u2014 the
|
|
@@ -1721,7 +1733,7 @@
|
|
|
1721
1733
|
opacity: 0.8;
|
|
1722
1734
|
background: rgba(var(--aia-streak-rgb, 255, 255, 255), 0.06);
|
|
1723
1735
|
}
|
|
1724
|
-
`,document.head.appendChild(e)}var
|
|
1736
|
+
`,document.head.appendChild(e)}var X={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"};var be=require("react/jsx-runtime"),La=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function Ut({options:e,activeIndex:a,listboxId:t,view:i,selection:o,onSelect:s,onHighlight:r,onUnhighlight:d,onPreviousMonth:m,onNextMonth:v}){let C=(0,J.isoDate)(new Date),g=(0,J.visibleDateRange)({pendingStart:o.rangeStart,highlightedIso:(0,J.cellIso)(e[a]),selected:o.selectedRange,floor:o.floor});return(0,be.jsxs)("div",{className:X.datepicker,"data-aia-datepicker":"",children:[(0,be.jsxs)("div",{className:X.header,children:[(0,be.jsx)("button",{type:"button",tabIndex:-1,className:X.nav,"data-aia-date-prev":"","aria-label":"Previous month",onMouseDown:p=>p.preventDefault(),onClick:m,children:"\u2039"}),(0,be.jsx)("span",{className:X.month,"data-aia-date-month":"","aria-live":"polite",children:(0,J.monthLabel)(i)}),(0,be.jsx)("button",{type:"button",tabIndex:-1,className:X.nav,"data-aia-date-next":"","aria-label":"Next month",onMouseDown:p=>p.preventDefault(),onClick:v,children:"\u203A"})]}),(0,be.jsx)("div",{className:X.weekdays,"aria-hidden":"true",children:J.WEEKDAY_LABELS.map((p,u)=>(0,be.jsx)("span",{className:X.weekday,children:p},La[u]))}),(0,be.jsx)("div",{className:X.grid,"data-aia-date-grid":"",children:e.map((p,u)=>(0,be.jsx)(za,{option:p,id:`${t}-option-${u}`,index:u,isHighlighted:u===a&&p.is_tappable,isToday:(0,J.cellIso)(p)===C,isPast:(0,J.isDimmedDay)((0,J.cellIso)(p),C,o.floor),marks:(0,J.dateCellMarks)((0,J.cellIso)(p),{selectedIso:o.selectedIso,range:g}),onSelect:s,onHighlight:r,onUnhighlight:d},(0,J.cellIso)(p)??`pad-${u}`))})]})}function za({option:e,id:a,index:t,isHighlighted:i,isToday:o,isPast:s,marks:r,onSelect:d,onHighlight:m,onUnhighlight:v}){let[C,g]=(0,Vt.useState)(!1),p=(0,J.cellDay)(e);if(p==null)return(0,be.jsx)("div",{id:a,role:"option","data-aia-option":"","data-aia-date-cell":"","aria-hidden":"true","aria-selected":!1,tabIndex:-1,className:`${X.cell} ${X.blank}`});let u=()=>{g(!0),d(e),setTimeout(()=>g(!1),170)},x=[X.cell,X.day,s?X.past:"",i?X.highlighted:"",o?X.today:"",r.inRange?X.inRange:"",r.selected?X.selected:"",C?X.pressed:""].filter(Boolean).join(" ");return(0,be.jsx)("div",{id:a,role:"option","data-aia-option":"","data-aia-date-cell":"","aria-selected":i,"aria-label":e.text,tabIndex:0,className:x,onClick:u,onKeyDown:A=>{(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),u())},onMouseEnter:()=>m(t),onMouseLeave:v?()=>v(t):void 0,children:(0,be.jsx)("span",{className:X.number,children:p})})}var Je=require("@magicx-eng/ai-autocomplete-vanilla"),yt=require("react");if(typeof document<"u"&&!document.getElementById("ac-style-5259a217")){let e=document.createElement("style");e.id="ac-style-5259a217",e.textContent=`.aia-cluster {
|
|
1725
1737
|
display: flex;
|
|
1726
1738
|
flex-wrap: wrap;
|
|
1727
1739
|
gap: var(--aia-cluster-gap, 0.5rem);
|
|
@@ -1908,7 +1920,7 @@
|
|
|
1908
1920
|
justify-content: flex-end;
|
|
1909
1921
|
}
|
|
1910
1922
|
}
|
|
1911
|
-
`,document.head.appendChild(e)}var
|
|
1923
|
+
`,document.head.appendChild(e)}var Ve={footer:"aia-footer-qQQ7x",row:"aia-row-BgZ6Q",hintGroup:"aia-hintGroup-ZzbPf",brandLink:"aia-brandLink-r4f3R",key:"aia-key-Bz1H-",hint:"aia-hint-GKEOH",brand:"aia-brand-Al-lR",badge:"aia-badge-Fk9vg"};var Fe=require("react/jsx-runtime");function Yt({isOptionHighlighted:e=!1,isInputEmpty:a=!1,strings:t=(0,Je.uiStringsFor)()}){let{key:i,hint:o}=(0,Je.getFooterHint)(e,a,t),[s,r]=(0,yt.useState)(Je.ATTRIBUTION_URL);return(0,yt.useEffect)(()=>{r((0,Je.buildAttributionUrl)())},[]),(0,Fe.jsx)("footer",{className:Ve.footer,"data-aia-footer":"",children:(0,Fe.jsxs)(ft,{justify:"between",noWrap:!0,className:Ve.row,children:[(0,Fe.jsxs)(ft,{gap:"5px",className:Ve.hintGroup,children:[(0,Fe.jsx)("kbd",{className:Ve.key,children:i}),(0,Fe.jsx)("span",{className:Ve.hint,children:o})]}),(0,Fe.jsxs)("a",{className:Ve.brandLink,href:s,target:"_blank",rel:"noopener noreferrer",children:[(0,Fe.jsx)("span",{className:Ve.brand,children:"AI"}),(0,Fe.jsx)("span",{className:Ve.badge,children:"Autocomplete"})]})]})})}var ne=require("react");if(typeof document<"u"&&!document.getElementById("ac-style-2feec02e")){let e=document.createElement("style");e.id="ac-style-2feec02e",e.textContent=`/* Location search \u2014 React copy of the vanilla rules in styles.css (and of the
|
|
1912
1924
|
Angular copy). The three are kept identical by
|
|
1913
1925
|
packages/vanilla/tests/render/locationFieldParity.test.ts. */
|
|
1914
1926
|
.aia-location-6-fsr {
|
|
@@ -2042,7 +2054,7 @@
|
|
|
2042
2054
|
.aia-loadingBar-OLCr4:nth-child(3) {
|
|
2043
2055
|
width: 60%;
|
|
2044
2056
|
}
|
|
2045
|
-
`,document.head.appendChild(e)}var
|
|
2057
|
+
`,document.head.appendChild(e)}var ee={location:"aia-location-6-fsr",field:"aia-field-xEzwi",icon:"aia-icon-czx6C",input:"aia-input-Yi9V-",results:"aia-results-C3O0V",row:"aia-row-Q9y8g",highlighted:"aia-highlighted-RJjPx",pin:"aia-pin-OjabL",text:"aia-text-Xs84O",name:"aia-name-Z-WJR",secondary:"aia-secondary-4sCT1",note:"aia-note-xCSvY",empty:"aia-empty-SYBzi",loading:"aia-loading-Ih1gi",loadingBar:"aia-loadingBar-OLCr4"};var q=require("react/jsx-runtime"),Da=0;function bt(e){return e.getRootNode().activeElement??null}function $t(e){return e.getRootNode().getSelection?.()??document.getSelection()}function Qt(e){if(!e.isContentEditable)return null;let a=$t(e);if(!a||a.rangeCount===0)return null;let t=a.getRangeAt(0);return e.contains(t.startContainer)?t.cloneRange():null}function jt(e,a){if(e.focus({preventScroll:!0}),!e.isContentEditable)return;let t=$t(e);if(!t)return;let i=a;(!i||!i.startContainer.isConnected||!e.contains(i.startContainer))&&(i=document.createRange(),i.selectNodeContents(e),i.collapse(!1)),t.removeAllRanges(),t.addRange(i)}var Ma=(0,q.jsxs)("svg",{className:ee.icon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,q.jsx)("path",{d:"M12 21s-7-6.2-7-11.5A7 7 0 0 1 19 9.5C19 14.8 12 21 12 21z"}),(0,q.jsx)("circle",{cx:"12",cy:"9.5",r:"2.5"})]}),Na=(0,q.jsxs)("svg",{className:ee.icon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,q.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,q.jsx)("path",{d:"m20 20-3.5-3.5"})]});function Zt({view:e,searchLabel:a,noResultsLabel:t,useTypedLabel:i,widgetFocused:o,reediting:s=!1,visible:r=!0,interactive:d=!0,onQuery:m,onMove:v,onCommit:C,onFocusChange:g}){let p=(0,ne.useRef)(null),u=(0,ne.useRef)(null),x=(0,ne.useRef)(null),A=(0,ne.useRef)(null),V=(0,ne.useRef)(null),H=(0,ne.useRef)(!1),N=(0,ne.useRef)(!1),de=(0,ne.useRef)(!1),P=(0,ne.useRef)(!1),G=(0,ne.useRef)(o);G.current=o;let K=(0,ne.useRef)(g);K.current=g;let S=c=>{P.current=c,g(c)},ae=()=>{let c=p.current;return c!=null&&bt(c)===c},ce=()=>{let c=u.current;if(!c)return;let E=bt(c);E instanceof HTMLElement&&E!==p.current&&E!==document.body&&!c.contains(E)&&(A.current=E,V.current=Qt(E))},ie=c=>{let E=u.current;!E||!(c instanceof HTMLElement)||c===A.current||c===document.body||E.contains(c)||(A.current=c,V.current=Qt(c))},oe=(0,ne.useRef)(null);oe.current===null&&(oe.current=`aia-location-${++Da}`);let L=`${oe.current}-row-`;(0,ne.useEffect)(()=>{let c=p.current;c&&c.value!==e.query&&bt(c)!==c&&(c.value=e.query)},[e.query]),(0,ne.useEffect)(()=>{o&&(s&&!de.current&&(N.current=!1),de.current=s);let c=p.current;if(c){if(!r&&ae()){N.current=!0,F();return}if(!o){setTimeout(()=>{if(G.current)return;let E=A.current;E&&bt(E)===E||(N.current=!1)},0);return}if(!(!s||N.current||!d||ae())){if(ce(),S(!0),c.focus({preventScroll:!0}),!ae()){N.current=!0,S(!1);return}c.value&&c.select()}}}),(0,ne.useLayoutEffect)(()=>()=>{if(!P.current)return;let c=p.current,E=A.current;E?.isConnected&&c&&bt(c)===c&&(H.current=!0,jt(E,V.current),H.current=!1),P.current=!1,K.current(!1)},[]);let F=(c=!1)=>{c&&(N.current=!0);let E=A.current;E?.isConnected&&ae()&&(H.current=!0,jt(E,V.current),H.current=!1),S(!1)},Le=e.query.trim(),Ce=e.highlighted>=0&&e.highlighted<e.places.length?`${L}${e.highlighted}`:void 0,ve=null;return e.places.length>0?ve=e.places.map((c,E)=>(0,q.jsxs)("div",{id:`${L}${E}`,role:"option","aria-selected":E===e.highlighted,className:E===e.highlighted?`${ee.row} ${ee.highlighted}`:ee.row,"data-aia-location-row":"","data-aia-index":E,onClick:()=>{d&&(F(!0),C(E))},children:[(0,q.jsx)("span",{className:ee.pin,children:Ma}),(0,q.jsxs)("span",{className:ee.text,children:[(0,q.jsx)("span",{className:ee.name,children:c.name}),c.secondary&&(0,q.jsx)("span",{className:ee.secondary,children:c.secondary})]})]},c.id)):e.status==="loading"?ve=(0,q.jsxs)("div",{className:ee.loading,"data-aia-location-loading":"",children:[(0,q.jsx)("span",{className:ee.loadingBar}),(0,q.jsx)("span",{className:ee.loadingBar}),(0,q.jsx)("span",{className:ee.loadingBar})]}):Le&&(ve=(0,q.jsxs)("div",{className:ee.note,"data-aia-location-note":"",children:[e.status==="done"&&(0,q.jsx)("span",{className:ee.empty,children:t}),(0,q.jsx)("span",{children:i})]})),(0,q.jsxs)("div",{ref:u,className:ee.location,"data-aia-location":"",onMouseDown:c=>{!(c.target instanceof Node)||!x.current?.contains(c.target)||(c.stopPropagation(),ce(),S(!0))},children:[(0,q.jsxs)("label",{ref:x,className:ee.field,children:[Na,(0,q.jsx)("input",{ref:p,type:"text",className:ee.input,"data-aia-location-input":"",defaultValue:e.query,placeholder:a,"aria-label":a,"aria-activedescendant":Ce,autoComplete:"off",autoCapitalize:"words",enterKeyHint:"done",spellCheck:!1,tabIndex:r?0:-1,onChange:c=>m(c.target.value),onFocus:c=>{ie(c.relatedTarget),S(!0)},onBlur:()=>{H.current||(N.current=!0,S(!1))},onKeyDown:c=>{if(!c.nativeEvent.isComposing)switch(c.key){case"ArrowDown":case"ArrowUp":c.preventDefault(),v(c.key==="ArrowDown"?1:-1);return;case"Enter":if(c.preventDefault(),!d)return;F(!0),C();return;case"Escape":c.preventDefault(),c.stopPropagation(),N.current=!0,F();return;case"Backspace":if(c.currentTarget.value!=="")return;c.preventDefault(),N.current=!0,F();return}}})]}),(0,q.jsx)("div",{className:ee.results,"data-aia-location-results":"","aria-live":"polite",children:ve})]})}var kt=require("@magicx-eng/ai-autocomplete-vanilla");var Xt=require("@magicx-eng/ai-autocomplete-vanilla");if(typeof document<"u"&&!document.getElementById("ac-style-199d0432")){let e=document.createElement("style");e.id="ac-style-199d0432",e.textContent=`/* ParamPill (Figma "ParamPill") \u2014 unfilled suggestion pill: transparent fill,
|
|
2046
2058
|
no outline. ~28px via 6px padding + 14px text + the 1px border (border-box).
|
|
2047
2059
|
The border is kept as a 1px transparent line so the box stays the same size
|
|
2048
2060
|
as it was when the outline was dashed. */
|
|
@@ -2200,7 +2212,7 @@
|
|
|
2200
2212
|
opacity: 0;
|
|
2201
2213
|
}
|
|
2202
2214
|
}
|
|
2203
|
-
`,document.head.appendChild(e)}var
|
|
2215
|
+
`,document.head.appendChild(e)}var Be={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",loadingOut:"aia-loadingOut-Aj9xO"};var et=require("react/jsx-runtime"),zt={selected:1,first:.7,next:.4,last:.2};function Jt({label:e,state:a,active:t,rounded:i,loading:o,smartSuggestion:s,completionHeader:r,onClick:d}){let m=[Be.pill,i?Be.rounded:"",o?Be.skeleton:""].filter(Boolean).join(" ");return(0,et.jsx)("button",{type:"button","data-aia-pill":"","data-aia-pill-active":t?"":void 0,"data-aia-loading":o?"":void 0,"data-aia-smart-suggestion":s?r?"header":"":void 0,tabIndex:-1,contentEditable:!1,suppressContentEditableWarning:!0,className:m,style:{"--aia-pill-opacity":zt[a]},onMouseDown:v=>v.preventDefault(),onClick:o?void 0:d,disabled:o,children:s?(0,et.jsxs)(et.Fragment,{children:[(0,et.jsx)("span",{className:`${Be.smartText} magicx-aia-smart-suggestion-text`,children:e}),(0,et.jsx)("span",{className:`${Be.smartSparkle} magicx-aia-smart-suggestion-sparkle`,dangerouslySetInnerHTML:{__html:Xt.SMART_SUGGESTION_SPARKLE_SVG}})]}):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 {
|
|
2204
2216
|
position: relative;
|
|
2205
2217
|
z-index: 1;
|
|
2206
2218
|
pointer-events: auto;
|
|
@@ -2210,7 +2222,7 @@
|
|
|
2210
2222
|
align-items: center;
|
|
2211
2223
|
vertical-align: middle;
|
|
2212
2224
|
}
|
|
2213
|
-
`,document.head.appendChild(e)}var Dt={list:"aia-list-qvLqO"};var wt=require("react/jsx-runtime"),Ha=[125,69];function ea(e){return e===0?"first":e===1?"next":"last"}function Ct({pills:e,activePillIndex:a,onSelectPill:t,activeSelected:i,rounded:o,loading:s}){return s&&e.length===0?(0,wt.jsx)("span",{className:Dt.list,"data-aia-pill-list-loading":"",children:Ha.map((r,d)=>(0,wt.jsx)("span",{"data-aia-pill-skeleton":"",className:`${
|
|
2225
|
+
`,document.head.appendChild(e)}var Dt={list:"aia-list-qvLqO"};var wt=require("react/jsx-runtime"),Ha=[125,69];function ea(e){return e===0?"first":e===1?"next":"last"}function Ct({pills:e,activePillIndex:a,onSelectPill:t,activeSelected:i,rounded:o,loading:s}){return s&&e.length===0?(0,wt.jsx)("span",{className:Dt.list,"data-aia-pill-list-loading":"",children:Ha.map((r,d)=>(0,wt.jsx)("span",{"data-aia-pill-skeleton":"",className:`${Be.pill} ${o?Be.rounded:""} ${Be.skeleton}`,style:{width:r,"--aia-pill-opacity":zt[ea(d)]}},`skel-${r}`))}):(0,wt.jsx)("span",{className:Dt.list,"data-aia-pill-list-loading":s?"":void 0,children:e.map((r,d)=>{let m=!!i&&d===a;return(0,wt.jsx)(Jt,{label:r.text,state:m?"selected":ea(d),selected:m,active:d===a,rounded:o,loading:s,smartSuggestion:(0,kt.isSmartSuggestion)(r),completionHeader:(0,kt.isTraditionalAutocompleteSuggestion)(r),onClick:()=>t(d)},`${r.parameter}-${r.text}`)})})}var ye=require("@magicx-eng/ai-autocomplete-vanilla"),we=require("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
|
|
2214
2226
|
(packages/vanilla/src/styles.css). Same tokens, same defaults, so a consumer
|
|
2215
2227
|
theming one package sees the same result in the other.
|
|
2216
2228
|
|
|
@@ -2779,7 +2791,7 @@
|
|
|
2779
2791
|
.aia-card-JBGYT[data-aia-product-has-cart] {
|
|
2780
2792
|
padding-right: calc(var(--aia-product-cart-size, 28px) + 16px);
|
|
2781
2793
|
}
|
|
2782
|
-
`,document.head.appendChild(e)}var
|
|
2794
|
+
`,document.head.appendChild(e)}var te={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",compareAt:"aia-compareAt-ewE54",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"};var W=require("react/jsx-runtime");function ta({products:e,listboxId:a,onSelect:t,onAddToCart:i,onFocusChange:o,focusable:s=!0,layout:r="row",imageFallback:d="image",strings:m=(0,ye.uiStringsFor)()}){let v=e.length>0,C=(0,we.useRef)(null);if((0,we.useEffect)(()=>{let p=C.current;if(!(!v||!p))return(0,ye.attachProductRowWheel)(p)},[v]),!v)return null;let g=`${a}-products-label`;return(0,W.jsxs)("section",{className:te.section,"data-aia-products":"","data-aia-products-layout":r,role:"group","aria-labelledby":g,children:[(0,W.jsx)("div",{className:te.label,id:g,"data-aia-products-label":"",children:m.products}),(0,W.jsx)("div",{ref:C,className:te.row,"data-aia-products-row":"",children:e.map((p,u)=>(0,W.jsx)(Fa,{product:p,id:`${a}-product-${u}`,onSelect:t,onAddToCart:i,onFocusChange:o,focusable:s,imageFallback:d,soldOut:m.soldOut,addToCart:m.addToCart},p.id))})]})}function Fa({product:e,id:a,onSelect:t,onAddToCart:i,onFocusChange:o,focusable:s,imageFallback:r,soldOut:d,addToCart:m}){let v=!!i&&e.available!==!1,[C,g]=(0,we.useState)(null),p=x=>{x.relatedTarget?.closest("[data-aia-dropdown]")||o?.(!1)},u=x=>{x.metaKey||x.ctrlKey||x.shiftKey||x.altKey||x.button!==0||(x.preventDefault(),t(e))};return(0,W.jsxs)("a",{id:a,className:te.card,"data-aia-product":"","data-aia-product-sold-out":e.available===!1?"":void 0,"data-aia-product-has-cart":v?"":void 0,role:"option","aria-selected":!1,style:C?{"--aia-product-photo-fill-x":String(C.x),"--aia-product-photo-fill-y":String(C.y)}:void 0,href:e.url,tabIndex:s?0:-1,onClick:u,onKeyDown:x=>{x.key!=="Enter"&&x.key!==" "||(x.preventDefault(),t(e))},onFocus:()=>o?.(!0),onBlur:p,children:[(0,W.jsx)(Ga,{sources:(0,ye.productImageSources)(e.imageUrl),title:e.title,fallback:r,onPhotoFill:g},(0,ye.productImageSrc)(e.imageUrl)??""),(0,W.jsxs)("span",{className:te.body,children:[e.vendor?(0,W.jsx)("span",{className:te.vendor,children:e.vendor}):null,(0,W.jsx)("span",{className:te.title,children:e.title}),e.price?(0,W.jsxs)("span",{className:te.price,children:[e.price,e.compareAtPrice?(0,W.jsx)("s",{className:te.compareAt,children:e.compareAtPrice}):null]}):null,e.available===!1?(0,W.jsx)("span",{className:te.badge,children:d}):null]}),v&&i?(0,W.jsx)(Wa,{product:e,label:`${m}: ${e.title}`,focusable:s,onAddToCart:i,onFocus:()=>o?.(!0),onBlur:p},Ba(e)):null]})}function Ba(e){return[e.id,e.title,e.url,e.imageUrl,e.vendor].map(a=>a??"").join("\0")}function Wa({product:e,label:a,focusable:t,onAddToCart:i,onFocus:o,onBlur:s}){let[r,d]=(0,we.useState)(null),m=(0,we.useRef)(null),v=(0,we.useRef)(e);v.current=e;let C=(0,we.useRef)(!0);(0,we.useEffect)(()=>(C.current=!0,()=>{C.current=!1}),[]);let g=u=>{m.current=u,C.current&&d(u)},p=u=>{if(u.preventDefault(),u.stopPropagation(),m.current==="adding")return;g("adding");let x;try{x=Promise.resolve(i(v.current))}catch(A){x=Promise.reject(A)}x.then(()=>g("added"),()=>g(null))};return(0,W.jsx)("span",{className:te.cart,"data-aia-product-cart":"","data-aia-cart-state":r??void 0,"aria-busy":r==="adding"?!0:void 0,role:"button","aria-label":a,tabIndex:t?0:-1,onClick:p,onKeyDown:u=>{u.key!=="Enter"&&u.key!==" "||p(u)},onFocus:u=>{u.stopPropagation(),o()},onBlur:u=>{u.stopPropagation(),s(u)},children:(0,W.jsxs)("svg",{viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:[(0,W.jsx)("path",{className:te.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"}),(0,W.jsx)("path",{className:te.cartGlyph,d:"M13.5 6.5v-4M11.5 4.5h4"}),(0,W.jsx)("path",{className:te.cartCheck,d:"M5 12.5l4.5 4.5L19 7.5"}),(0,W.jsx)("path",{className:te.cartSpinner,d:"M12 4a8 8 0 1 0 8 8"}),(0,W.jsx)("circle",{className:te.cartGlyph,cx:"9",cy:"20",r:"1.3"}),(0,W.jsx)("circle",{className:te.cartGlyph,cx:"17.5",cy:"20",r:"1.3"})]})})}function Ga({sources:e,title:a,fallback:t,onPhotoFill:i}){let[o,s]=(0,we.useState)(0),r=e[o],d=!!r,[m,v]=(0,we.useState)(null),C=!d&&t==="initial";return(0,we.useEffect)(()=>()=>i(null),[i]),(0,W.jsxs)("span",{className:te.media,"aria-hidden":"true","data-aia-product-placeholder":!d&&!C?"":void 0,"data-aia-product-initial":C?"":void 0,"data-aia-image-loaded":d&&m===r?"":void 0,children:[d?(0,W.jsx)("img",{className:te.image,src:r,alt:"",loading:"lazy",decoding:"async",onLoad:g=>{v(r),i((0,ye.productPhotoFill)(g.currentTarget.naturalWidth,g.currentTarget.naturalHeight))},onError:()=>{o+1>=e.length&&i(null),s(g=>g+1)}}):null,C?(0,ye.productInitial)(a):null]})}var U=require("@magicx-eng/ai-autocomplete-vanilla"),Ee=require("react");var aa=require("@magicx-eng/ai-autocomplete-vanilla"),St=require("react");if(typeof document<"u"&&!document.getElementById("ac-style-948e58da")){let e=document.createElement("style");e.id="ac-style-948e58da",e.textContent=`.aia-grid {
|
|
2783
2795
|
display: grid;
|
|
2784
2796
|
grid-template-columns: repeat(
|
|
2785
2797
|
auto-fit,
|
|
@@ -2823,7 +2835,7 @@
|
|
|
2823
2835
|
:where([data-aia-options-style="classic"]) .aia-grid[data-scroll] {
|
|
2824
2836
|
max-height: var(--aia-grid-max-height, 120px);
|
|
2825
2837
|
}
|
|
2826
|
-
`,document.head.appendChild(e)}var oa=require("react/jsx-runtime");function ia({min:e="16rem",max:a,gap:t,scroll:i=!1,maxHeight:o,scrollResetKey:s,cols:r,template:d,innerRef:m,className:v,children:C,...
|
|
2838
|
+
`,document.head.appendChild(e)}var oa=require("react/jsx-runtime");function ia({min:e="16rem",max:a,gap:t,scroll:i=!1,maxHeight:o,scrollResetKey:s,cols:r,template:d,innerRef:m,className:v,children:C,...g}){let p=(0,St.useRef)(null);(0,St.useLayoutEffect)(()=>{if(s===void 0)return;let x=p.current;x&&(x.scrollTop=0)},[s]);let u={"--aia-grid-min":e};return a&&(u["--aia-grid-max"]=a),t&&(u["--aia-grid-gap"]=t),o&&(u["--aia-grid-max-height"]=o),r&&(u.gridTemplateColumns=(0,aa.optionsGridTemplateColumns)(r)),d&&(u.gridTemplateColumns=d),(0,oa.jsx)("div",{ref:x=>{p.current=x,m?.(x)},className:v?`aia-grid ${v}`:"aia-grid","data-scroll":i||void 0,style:u,...g,children:C})}var me=require("@magicx-eng/ai-autocomplete-vanilla"),Ie=require("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 {
|
|
2827
2839
|
position: relative;
|
|
2828
2840
|
/* Clip, not visible: the entrance rise below runs on the inner content,
|
|
2829
2841
|
and a transformed box extends its scroll container's scrollable area.
|
|
@@ -3343,7 +3355,7 @@
|
|
|
3343
3355
|
border-radius: 6px;
|
|
3344
3356
|
font-size: 11px;
|
|
3345
3357
|
}
|
|
3346
|
-
`,document.head.appendChild(e)}var le={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",liveMatch:"aia-liveMatch--eYfs",tag:"aia-tag-e3Fwe",pressed:"aia-pressed-98o-r",pressCompress:"aia-pressCompress-ICV3q",scrollHint:"aia-scrollHint-xKXPt",loadingOut:"aia-loadingOut-hI-qI",parameter:"aia-parameter-Dt2zF",match:"aia-match-pp-9v",icon:"aia-icon-Qw938",count:"aia-count-IpYbQ",image:"aia-image-YZAbO",text:"aia-text-yqoh9",checkbox:"aia-checkbox-KGRhg"};var he=require("react/jsx-runtime");function na({option:e,isHighlighted:a,checked:t,onSelect:i,onHighlight:o,onUnhighlight:s,id:r,loading:d,showIcon:m=!0,showImage:v=!0,showCount:C=!0,scrollHint:
|
|
3358
|
+
`,document.head.appendChild(e)}var le={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",liveMatch:"aia-liveMatch--eYfs",tag:"aia-tag-e3Fwe",pressed:"aia-pressed-98o-r",pressCompress:"aia-pressCompress-ICV3q",scrollHint:"aia-scrollHint-xKXPt",loadingOut:"aia-loadingOut-hI-qI",parameter:"aia-parameter-Dt2zF",match:"aia-match-pp-9v",icon:"aia-icon-Qw938",count:"aia-count-IpYbQ",image:"aia-image-YZAbO",text:"aia-text-yqoh9",checkbox:"aia-checkbox-KGRhg"};var he=require("react/jsx-runtime");function na({option:e,isHighlighted:a,checked:t,onSelect:i,onHighlight:o,onUnhighlight:s,id:r,loading:d,showIcon:m=!0,showImage:v=!0,showCount:C=!0,scrollHint:g,enterDelayMs:p=0}){let[u]=(0,Ie.useState)(p),[x,A]=(0,Ie.useState)(!1),V=v?(0,me.optionImageSources)(e.image_url):[],H=V[0]??null,[N,de]=(0,Ie.useState)([]),P=V.find(L=>!N.includes(L))??null,[G,K]=(0,Ie.useState)(null),S=(0,Ie.useMemo)(()=>!H&&m&&e.icon_svg?(0,me.sanitizeOptionIconSvg)(e.icon_svg):null,[H,m,e.icon_svg]),ae=C?(0,me.formatOptionCount)(e.item_count):null,ce=(0,Ie.useRef)(void 0);(0,Ie.useEffect)(()=>()=>clearTimeout(ce.current),[]);let ie=L=>{if(d||!e.is_tappable||x&&t===void 0)return;A(!0);let F=L?.currentTarget;t!==void 0&&F!==void 0&&L!==void 0&&!(0,me.isMultiSelectToggleTap)(F,F.querySelector("[data-aia-checkbox]"),L)?i(e,{commit:!0}):i(e),clearTimeout(ce.current),ce.current=setTimeout(()=>A(!1),170)},oe=[le.item,a&&!d?le.highlighted:"",e.liveMatch&&!d?le.liveMatch:"",e.is_tappable?le.tappable:le.nonTappable,x?le.pressed:"",g?le.scrollHint:""].filter(Boolean).join(" ");return(0,he.jsx)("div",{id:r,role:"option","data-aia-option":"","data-aia-loading":d?"":void 0,"data-aia-icon":S&&e.icon?e.icon:void 0,"data-aia-image":H?"":void 0,"data-aia-item-count":ae!==null?e.item_count:void 0,"aria-selected":t??a,className:oe,style:{[me.OPTION_ENTER_DELAY_VAR]:`${u}ms`},tabIndex:d||!e.is_tappable?-1:0,onClick:ie,onKeyDown:L=>{!d&&e.is_tappable&&(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),ie())},onMouseEnter:!d&&e.is_tappable?o:void 0,onMouseLeave:s,children:(0,he.jsxs)("span",{className:le.content,children:[t!==void 0&&e.is_tappable&&(0,he.jsx)("span",{className:le.checkbox,"aria-hidden":"true","data-aia-checkbox":"","data-checked":t,children:t?"\u2713":""}),H&&(0,he.jsx)("span",{className:`${le.image} magicx-aia-option-image`,"aria-hidden":"true","data-aia-image-loaded":P!==null&&G===P?"":void 0,children:(0,he.jsx)("img",{src:P??H,alt:"",loading:"lazy",decoding:"async",referrerPolicy:"no-referrer",draggable:!1,hidden:P===null,onLoad:()=>K(P),onError:()=>{P!==null&&de(L=>[...L,P])}})}),S&&(0,he.jsx)("span",{className:`${le.icon} magicx-aia-option-icon`,"aria-hidden":"true",dangerouslySetInnerHTML:{__html:S}}),(0,he.jsxs)("span",{className:le.text,children:[e.matchedText?(0,me.highlightParts)((0,me.optionLabel)(e),e.matchedText).map((L,F)=>L.bold?(0,he.jsx)("strong",{className:`${le.match} magicx-aia-option-match`,children:L.text},F):L.text):(0,me.optionLabel)(e),e.parameterLabel&&(0,he.jsxs)(he.Fragment,{children:[" ",(0,he.jsx)("span",{className:`${le.parameter} magicx-aia-option-parameter`,children:e.parameterLabel})]})]}),e.tag&&(0,he.jsx)("span",{className:le.tag,children:e.tag}),ae!==null&&(0,he.jsx)("span",{className:`${le.count} magicx-aia-option-count`,children:ae})]})})}var Mt=require("react/jsx-runtime");function Ka(){let[e,a]=(0,Ee.useState)(U.isOptionsGridMobileViewport);return(0,Ee.useEffect)(()=>{if(typeof window>"u"||!window.matchMedia)return;let t=window.matchMedia(U.OPTIONS_GRID_MOBILE_QUERY),i=()=>a(t.matches);return i(),t.addEventListener("change",i),()=>t.removeEventListener("change",i)},[]),e}function ra({options:e,activeIndex:a,picked:t,onSelect:i,onHighlight:o,onUnhighlight:s,listboxId:r,loading:d,groupKey:m="",optionsPosition:v="below",showIcons:C=!0,showImages:g=!0,showCounts:p=!0}){let u=Ka(),x=(0,Ee.useRef)(null),[A,V]=(0,Ee.useState)(null),H=(0,Ee.useRef)(null);(0,Ee.useLayoutEffect)(()=>{if(d&&(0,U.sameOptionRows)(H.current,e))return;H.current=d?null:e;let P=x.current,G=P&&!d&&(0,U.needsOptionsGridMeasurement)(e.length,u),K=P?.closest("[data-aia-dropdown]");G&&K&&(0,U.releasePanelHug)(K);let S=G?(0,U.measureOptionsGrid)(P):null;V(S?(0,U.planOptionsGrid)(e.length,u,S.rowWidths,S.gridWidth):null)},[e,u,d]);let N=A??(0,U.planOptionsGrid)(e.length,u,null,null);(0,Ee.useLayoutEffect)(()=>{let P=x.current?.closest("[data-aia-dropdown]");P&&(0,U.syncPanelHug)(P)},[N.template,u]);let de=(0,U.optionsShowLeadingVisuals)(e,C,g);return(0,Mt.jsx)(ia,{min:"250px",max:"1fr",gap:"0",scroll:!0,scrollResetKey:m,template:N.template,maxHeight:N.maxHeight,innerRef:P=>{x.current=P},"data-aia-group":m,children:e.map((P,G)=>(0,Mt.jsx)(na,{option:P,isHighlighted:G===a,checked:t?t.includes(P.text):void 0,onSelect:i,onHighlight:()=>o(G),onUnhighlight:s?()=>s(G):void 0,id:`${r}-option-${G}`,loading:d,showIcon:C&&de,showImage:g&&de,showCount:p,scrollHint:!d&&N.scrollHintIndices.includes(G),enterDelayMs:d?0:(0,U.optionEnterDelayMs)(G,N.cols,e.length,v)},`${m}\0${P.text}`))})}var ue=require("@magicx-eng/ai-autocomplete-vanilla"),Re=require("react");if(typeof document<"u"&&!document.getElementById("ac-style-52a922cb")){let e=document.createElement("style");e.id="ac-style-52a922cb",e.textContent=`/* --- Time wheel (replaces the options grid for time suggestions) ---
|
|
3347
3359
|
|
|
3348
3360
|
One of three hand-maintained copies (vanilla styles.css, this file, Angular's
|
|
3349
3361
|
time-wheel.component.css). Only the class-naming layer differs \u2014 the
|
|
@@ -3465,7 +3477,7 @@
|
|
|
3465
3477
|
.aia-done-llNY5:hover {
|
|
3466
3478
|
background: var(--aia-time-done-bg-hover, var(--aia-done-bg-hover, #d8dde8));
|
|
3467
3479
|
}
|
|
3468
|
-
`,document.head.appendChild(e)}var
|
|
3480
|
+
`,document.head.appendChild(e)}var Ae={timeWheel:"aia-timeWheel-KdR4A",value:"aia-value--wqvm",columns:"aia-columns-TaD-f",band:"aia-band-pVy-f",column:"aia-column-lwtdd",row:"aia-row-A3pAx",selected:"aia-selected-xgOWY",separator:"aia-separator-kX9WO",done:"aia-done-llNY5"};var ke=require("react/jsx-runtime"),qa=120;function sa({view:e,label:a,doneLabel:t,interactive:i=!0,onTimeChange:o,onTimeCommit:s}){return(0,ke.jsxs)("div",{className:Ae.timeWheel,"data-aia-time-wheel":"",role:"group","aria-label":a,onMouseDown:r=>r.preventDefault(),children:[(0,ke.jsx)("span",{className:Ae.value,"data-aia-time-value":"","aria-live":"polite",children:(0,ue.formatTime)(e.minutes)}),(0,ke.jsxs)("div",{className:Ae.columns,"aria-hidden":"true",children:[(0,ke.jsx)("div",{className:Ae.band}),ue.TIME_WHEEL_COLUMNS.map(r=>(0,ke.jsxs)(Re.Fragment,{children:[r==="minute"&&(0,ke.jsx)("span",{className:Ae.separator,children:":"}),(0,ke.jsx)(_a,{column:r,minutes:e.minutes,interactive:i,onTimeChange:o})]},r))]}),(0,ke.jsx)("button",{type:"button",tabIndex:-1,className:Ae.done,"data-aia-time-done":"",onClick:()=>{i&&s()},children:t})]})}function _a({column:e,minutes:a,interactive:t,onTimeChange:i}){let o=(0,Re.useRef)(null),s=(0,Re.useRef)(null),r=(0,Re.useRef)(null),d=(0,Re.useRef)({minutes:a,interactive:t,onTimeChange:i});d.current={minutes:a,interactive:t,onTimeChange:i};let m=(0,ue.timeWheelIndex)(e,a);(0,Re.useLayoutEffect)(()=>{let g=o.current;if(!g||r.current)return;let p=m*ue.TIME_WHEEL_ROW_HEIGHT;Math.abs(g.scrollTop-p)<1||(s.current=p,g.scrollTop=p)},[m]),(0,Re.useEffect)(()=>()=>{r.current&&clearTimeout(r.current)},[]);let v=()=>{r.current=null;let g=o.current,p=d.current;if(!g||!p.interactive)return;let u=(0,ue.timeWheelIndexFromScroll)(e,g.scrollTop);u!==(0,ue.timeWheelIndex)(e,p.minutes)&&p.onTimeChange((0,ue.withTimeWheelIndex)(e,p.minutes,u))},C=()=>{let g=o.current;if(g){if(s.current!=null&&Math.abs(g.scrollTop-s.current)<1){s.current=null;return}s.current=null,r.current&&clearTimeout(r.current),r.current=setTimeout(v,qa)}};return(0,ke.jsx)("div",{ref:o,className:Ae.column,"data-aia-time-column":e,onScroll:C,children:(0,ue.timeWheelRows)(e).map((g,p)=>(0,ke.jsx)("div",{className:p===m?`${Ae.row} ${Ae.selected}`:Ae.row,"data-aia-time-row":"","data-aia-index":p,onClick:()=>{d.current.interactive&&i((0,ue.withTimeWheelIndex)(e,d.current.minutes,p))},children:g.label},g.label))})}if(typeof document<"u"&&!document.getElementById("ac-style-8414cd5f")){let e=document.createElement("style");e.id="ac-style-8414cd5f",e.textContent=`.aia-stack {
|
|
3469
3481
|
display: flex;
|
|
3470
3482
|
flex-direction: column;
|
|
3471
3483
|
gap: var(--aia-stack-space, 0.5rem);
|
|
@@ -3480,7 +3492,7 @@
|
|
|
3480
3492
|
align-items: end;
|
|
3481
3493
|
}
|
|
3482
3494
|
/* data-align="stretch" is the flex default \u2014 no rule needed. */
|
|
3483
|
-
`,document.head.appendChild(e)}var da=require("react/jsx-runtime");function la({space:e,align:a="stretch",className:t,children:i,...o}){let s=e?{"--aia-stack-space":e}:void 0;return(0,da.jsx)("div",{className:t?`aia-stack ${t}`:"aia-stack","data-align":a,style:s,...o,children:i})}var
|
|
3495
|
+
`,document.head.appendChild(e)}var da=require("react/jsx-runtime");function la({space:e,align:a="stretch",className:t,children:i,...o}){let s=e?{"--aia-stack-space":e}:void 0;return(0,da.jsx)("div",{className:t?`aia-stack ${t}`:"aia-stack","data-align":a,style:s,...o,children:i})}var Y=require("react/jsx-runtime"),Va=typeof window>"u"?Q.useEffect:Q.useLayoutEffect,Ua=[159,119,164],Ya=()=>{},ca=()=>{},Qa=e=>{},ja=()=>{},$a=e=>{},Za=e=>{},Xa=e=>{},Ja=e=>{};function ei(e){let a=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches,[t,i]=(0,Q.useState)(a);if((0,Q.useEffect)(()=>{if(e!=="auto"||typeof window>"u"||typeof window.matchMedia!="function")return;let o=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>i(o.matches);return o.addEventListener("change",s),()=>o.removeEventListener("change",s)},[e]),e!==void 0)return e==="auto"?t?"dark":"light":e}function ti(e,a){let t=(0,Q.useRef)(null);(0,Q.useEffect)(()=>{let i=e.current,o=a.current;if(!i||!o)return;let s=(0,z.queryLive)(i,".aia-grid[data-scroll]");if(t.current&&t.current.grid!==s&&(t.current.controller.destroy(),t.current=null),s&&!t.current){t.current={grid:s,controller:(0,z.attachScrollArrow)({dropdown:i,grid:s,button:o})};return}t.current?.controller.update()}),(0,Q.useEffect)(()=>()=>{t.current?.controller.destroy(),t.current=null},[])}function ai(e,a){let t=(0,Q.useRef)(a);t.current=a;let i=(0,Q.useRef)(null);(0,Q.useLayoutEffect)(()=>{let o=e.current;if(o){if(!i.current){i.current=(0,z.attachViewportFit)({dropdown:o,isOpen:()=>t.current});return}i.current.update()}}),(0,Q.useEffect)(()=>()=>{i.current?.destroy(),i.current=null},[])}function Tt({suggestions:e,activeIndex:a,onSelect:t,onHighlight:i,onUnhighlight:o,isOpen:s,id:r,className:d,pills:m,onPillClick:v,showPills:C=!0,onSkip:g,showSkipButton:p=!0,showOptionIcons:u=!0,showOptionImages:x=!0,showOptionCounts:A=!0,skipDisabled:V=!1,activeSelected:H=!1,isLoading:N=!1,skeletonExiting:de=!1,isInputEmpty:P=!1,language:G,products:K,onProductSelect:S,onProductAddToCart:ae,onProductFocusChange:ce,productsLayout:ie="row",productImageFallback:oe="image",formatType:L="options",dateView:F=null,selectedDateIso:Le=null,selectedDateRange:Ce=null,dateRangeStart:ve=null,onPreviousMonth:c,onNextMonth:E,timeView:Ge=null,multiSelectView:w=null,onMultiSelectCommit:at,onTimeChange:Ue,onTimeCommit:Ye,locationView:Ke=null,isReediting:f=!1,onLocationQuery:T,onLocationMove:I,onLocationCommit:O,onLocationFocusChange:M,isFocused:re=!1,optionsPosition:ge="below",mode:xe}){let ze=ei(xe),st=ze!==void 0,Z=(0,Q.useRef)(null),Qe=(0,Q.useRef)(null);ti(Z,Qe),(0,Q.useEffect)(()=>{if(Z.current)return(0,z.containScroll)(Z.current)},[]);let pt=e[0]?.options??[],it=!!(m&&m.length>0&&v),De=!!(K&&K.length>0),ht=L==="time"&&Ge!=null,je=L==="location"&&Ke!=null,pe=s&&(pt.length>0||C&&it||N||De||ht||je);ai(Z,pe),Va(()=>{let k=Z.current;k&&((0,z.fitMultiSelectDone)(k,(0,z.findMultiSelectDone)(k)),(0,z.syncPanelHug)(k))});let Se={suggestions:e,activeIndex:a,pills:m,showPills:C,showSkipButton:p,showOptionIcons:u,showOptionImages:x,showOptionCounts:A,skipDisabled:V,activeSelected:H,isLoading:N,skeletonExiting:de,isInputEmpty:P,products:K,formatType:L,dateView:F,selectedDateIso:Le,selectedDateRange:Ce,dateRangeStart:ve,timeView:Ge,multiSelectView:w,locationView:Ke,isReediting:f},y=(0,Q.useRef)(Se);pe&&(y.current=Se);let n=pe?Se:y.current,se=(0,z.uiStringsFor)(G),Me=n.suggestions[0],b=Me?.options??[],$e=n.activeIndex>=0&&!!b[n.activeIndex]?.is_tappable,qe=(0,z.labelTraditionalAutocomplete)(n.pills??[],se.keepTyping),Te=!!(qe.length>0&&v),ot=n.showPills&&Te,ut=n.showPills&&!Te&&n.isLoading,_e=ot||ut,lt=Te&&(0,z.hasSkippablePill)(qe)&&n.showSkipButton&&!n.isInputEmpty&&!!g,Pe=qe[0]?.text,Ne=(0,z.isCalendarFormat)(n.formatType)&&n.dateView!=null,Ze=b.length>0&&!Ne,nt=b.length>0&&Ne&&!n.isLoading,dt=n.formatType==="time"&&n.timeView!=null&&!n.isLoading,Xe=n.formatType==="location"&&n.locationView!=null&&!n.isLoading,ct=n.isLoading&&!Ze&&!nt&&!dt&&!Xe,h=n.products??[],_=(0,z.panelMorphKey)(ot?qe:[]);return(0,Q.useLayoutEffect)(()=>{Z.current&&(0,z.settlePanelMorph)(Z.current,_,{visible:pe,anchorBottom:ge==="above"})},[_,pe,ge,n.suggestions,n.pills,n.isLoading,n.skeletonExiting,n.isInputEmpty,n.products,n.formatType,n.dateView,n.selectedDateIso,n.selectedDateRange,n.dateRangeStart,n.timeView,n.multiSelectView,n.locationView,n.showPills,n.showSkipButton,n.showOptionIcons,n.showOptionImages,n.showOptionCounts,ie,G]),(0,Q.useEffect)(()=>{let k=Z.current;return()=>{k&&(0,z.destroyPanelMorph)(k)}},[]),(0,Y.jsxs)("div",{ref:Z,id:r,role:"listbox","aria-multiselectable":!!n.multiSelectView,"data-aia-dropdown":"","data-options-position":ge,"data-mode":ze,"data-aia-loading":n.isLoading?"":void 0,"data-aia-skeleton-exiting":n.skeletonExiting?"":void 0,"data-aia-has-products":h.length>0?"":void 0,className:`${st?"magicx-aia ":""}${He.dropdown} ${pe?He.visible:""} ${d??""}`,onMouseDown:k=>k.preventDefault(),children:[(0,Y.jsxs)(la,{space:"8px",children:[(_e||lt)&&(0,Y.jsxs)(ft,{noWrap:!0,className:He.pillBar,"data-aia-pillbar":"",children:[_e&&(0,Y.jsx)("span",{className:He.pillScroll,"data-aia-pill-scroll":"",children:(0,Y.jsx)(Ct,{pills:qe,activePillIndex:0,activeSelected:n.activeSelected,onSelectPill:v??(()=>{}),rounded:!0,loading:n.isLoading})}),lt&&(0,Y.jsx)("button",{type:"button",tabIndex:-1,className:He.skip,"data-aia-skip":"",disabled:n.isLoading||n.skipDisabled,"aria-label":Pe?`${se.skipLabel} ${Pe}`:se.skipLabel,onClick:g,children:se.skip})]}),Ze&&(0,Y.jsx)(ra,{options:b,activeIndex:n.activeIndex,onSelect:t,onHighlight:i,onUnhighlight:o,listboxId:r,loading:n.isLoading,groupKey:Me?`${Me.parameter} ${Me.text}`:"",optionsPosition:ge,showIcons:n.showOptionIcons,showImages:n.showOptionImages,showCounts:n.showOptionCounts,picked:n.isLoading?void 0:n.multiSelectView?.picked}),n.multiSelectView&&!n.isLoading&&(0,Y.jsx)("div",{"data-aia-multi-actions":"",onClick:k=>{k.target.closest("[data-aia-multi-done]")&&!n.skipDisabled&&at?.()},children:(0,Y.jsx)("button",{type:"button",tabIndex:-1,disabled:!0,"data-aia-multi-done":"",className:He.multiDone,ref:k=>{k&&(k.disabled=!0,k.offsetHeight,k.disabled=n.skipDisabled)},children:se.done})}),nt&&n.dateView&&(0,Y.jsx)(Ut,{options:b,activeIndex:n.activeIndex,listboxId:r,view:n.dateView,selection:{selectedIso:n.selectedDateIso??null,selectedRange:n.selectedDateRange??null,rangeStart:n.dateRangeStart??null,floor:(0,z.dateFloorFor)(n.formatType,n.dateRangeStart)},onSelect:t,onHighlight:i,onUnhighlight:o,onPreviousMonth:c??ca,onNextMonth:E??ca}),dt&&n.timeView&&(0,Y.jsx)(sa,{view:n.timeView,label:se.timeLabel,doneLabel:se.done,interactive:!n.skipDisabled,onTimeChange:Ue??Qa,onTimeCommit:Ye??ja}),Xe&&n.locationView&&(0,Y.jsx)(Zt,{view:n.locationView,searchLabel:se.locationSearch,noResultsLabel:se.locationNoResults,useTypedLabel:se.locationUseTyped,widgetFocused:re&&pe,reediting:n.isReediting,visible:pe,interactive:!n.skipDisabled,onQuery:T??$a,onMove:I??Za,onCommit:O??Xa,onFocusChange:M??Ja}),ct&&(0,Y.jsx)("div",{className:He.skeletonBars,"data-aia-skeleton-bars":"",children:Ua.map(k=>(0,Y.jsx)("span",{className:He.skeletonBar,style:{width:k}},`bar-${k}`))}),(0,Y.jsx)(ta,{products:h,listboxId:r,onSelect:S??Ya,onAddToCart:ae,onFocusChange:ce,focusable:pe,layout:ie,imageFallback:oe,strings:se}),(0,Y.jsx)(Yt,{isOptionHighlighted:$e,isInputEmpty:n.isInputEmpty,strings:se})]}),(0,Y.jsx)("button",{ref:Qe,type:"button",tabIndex:-1,className:He.scrollArrow,"data-aia-scroll-arrow":"","aria-label":se.scrollArrow,"aria-hidden":"true",children:(0,Y.jsx)("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:(0,Y.jsx)("path",{d:"M4 6.5 8 10.5l4-4"})})})]})}var We=require("@magicx-eng/ai-autocomplete-vanilla");var ha=require("@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 {
|
|
3484
3496
|
flex-shrink: 0;
|
|
3485
3497
|
width: 32px;
|
|
3486
3498
|
height: 32px;
|
|
@@ -3551,5 +3563,5 @@
|
|
|
3551
3563
|
transition: none;
|
|
3552
3564
|
}
|
|
3553
3565
|
}
|
|
3554
|
-
`,document.head.appendChild(e)}var pa={submitButton:"aia-submitButton-otz7H"};var Pt=require("react/jsx-runtime");function ua({disabled:e,ready:a,onClick:t,label:i=(0,ha.uiStringsFor)().submit}){return(0,Pt.jsx)("button",{type:"button","data-aia-submit":"",className:pa.submitButton,disabled:e,"data-aia-ready":a?"":void 0,onClick:o=>{o.stopPropagation(),t()},"aria-label":i,children:(0,Pt.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",role:"img","aria-label":i,children:(0,Pt.jsx)("path",{d:"M9 14V4M9 4L4 9M9 4L14 9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}var tt=require("@magicx-eng/ai-autocomplete-vanilla"),L=require("react");var Nt=require("react");function ma(e){let a=(0,Nt.useRef)(e);a.current=e;let t=Object.keys(e??{}).sort().join("\0"),i=(0,Nt.useRef)({key:"",overrides:void 0});if(i.current.key!==t){let o={};for(let s of Object.keys(e??{})){let r=(d,m,v)=>{let C=a.current?.[s];return C?C(d,m,v):[]};o[s]=r}i.current={key:t,overrides:e?o:void 0}}return{overrides:i.current.overrides,key:t}}var Ht=require("react");function ga(e){let a=(0,Ht.useRef)(e);a.current=e;let t=(0,Ht.useRef)(null);t.current===null&&(t.current={fetch:(o,s)=>{let r=a.current;return r?r.fetch(o,s):Promise.reject(new Error("products config removed"))},transform:o=>a.current?.transform(o)??[],get limit(){return a.current?.limit}});let i=e!==void 0;return{config:i?t.current:void 0,enabled:i}}var fa={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,dateFloor:null,timeView:null,multiSelectView:null,multiSelectDraft:null,locationView:null,locationSearch:null,locationAutocomplete:!0,locationFieldFocused:!1,placeholderText:"",leadInText:"",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,timeDraft:null};function It({onSubmit:e,onResult:a,onError:t,optionOverrides:i,maskCompletedText:o,apiConfig:s,additionalContext:r,language:d,currency:m,productId:v,visitorId:C,columns:f=2,dropdownTrigger:p,optionsPosition:u,closeDropdownOnBlur:x,prependPlaceholder:R,showNonTappableOptions:_,locationSearch:F,showOptionIcons:H,showOptionImages:ie,showOptionCounts:E,showSkipButton:M,showProducts:T,productImageFallback:G="image",onFocus:oe,onBlur:ce,value:te,completedParams:ae,onChange:P,onParamsChange:j,products:Re,mapProducts:ke,onProductSelect:ve,onProductAddToCart:c,source:A,setCursor:We}){let b=(0,L.useRef)(null),[at,Ve]=(0,L.useState)(null),Ue=(0,L.useRef)(e);Ue.current=e;let w=(0,L.useRef)(a);w.current=a;let S=(0,L.useRef)(t);S.current=t;let I=(0,L.useRef)(P);I.current=P;let z=(0,L.useRef)(j);z.current=j;let D=(0,L.useRef)(oe);D.current=oe;let ne=(0,L.useRef)(ce);ne.current=ce;let Oe=(0,L.useRef)(We);Oe.current=We;let ge=(0,L.useRef)(ve);ge.current=ve;let Le=(0,L.useRef)(c);Le.current=c;let Ye=(0,L.useRef)(C);Ye.current=C;let st=(0,L.useRef)(()=>{let h=Ye.current;return typeof h=="function"?h():h}).current,$=ga(Re),Qe=(0,L.useRef)(ke);Qe.current=ke;let pt=(0,L.useRef)((h,q)=>{let k=Qe.current;return k?k(h,q):h}).current,it=ke?pt:void 0,Ge=ma(i);(0,L.useEffect)(()=>{if(typeof document>"u")return;let h=new tt.AIAutocomplete(document.createElement("div"),{renderMode:"headless",apiConfig:s,additionalContext:r,language:d,currency:m,productId:v,visitorId:st,optionOverrides:Ge.overrides,maskCompletedText:o,columns:f,dropdownTrigger:p,optionsPosition:u,closeDropdownOnBlur:x,prependPlaceholder:R,showNonTappableOptions:_,locationSearch:F,showProducts:T,source:A,value:te,completedParams:ae,onSubmit:(...k)=>Ue.current?.(...k),onResult:(...k)=>w.current?.(...k),onError:(...k)=>S.current?.(...k),onChange:(...k)=>I.current?.(...k),onParamsChange:(...k)=>z.current?.(...k),onFocus:()=>D.current?.(),onBlur:()=>ne.current?.(),onProductSelect:k=>ge.current?.(k),onProductAddToCart:k=>Le.current?.(k),setCursor:k=>Oe.current?.(k),products:$.config,mapProducts:it});b.current=h,Ve(h.getState());let q=h.subscribe(k=>Ve(k));return()=>{q(),h.destroy(),b.current===h&&(b.current=null)}},[]),(0,L.useEffect)(()=>{te!==void 0&&b.current?.setValue(te)},[te]),(0,L.useEffect)(()=>{ae!==void 0&&b.current?.setCompletedParams(ae)},[ae]);let ht=JSON.stringify(s??null),je;try{je=JSON.stringify(r??null)}catch{je="[unstringifiable]"}(0,L.useEffect)(()=>{b.current?.update({apiConfig:s,additionalContext:r,language:d,currency:m,productId:v,optionOverrides:Ge.overrides,dropdownTrigger:p,optionsPosition:u,closeDropdownOnBlur:x,prependPlaceholder:R,showNonTappableOptions:_,locationSearch:F,showProducts:T})},[ht,je,d,m?.code,m?.rate,m?.country,v,Ge.key,p,u,x,R,_,F,T]);let pe=(0,L.useRef)(!1);(0,L.useEffect)(()=>{if(!pe.current){pe.current=!0;return}b.current?.update({products:$.config})},[$.enabled]),(0,L.useEffect)(()=>{b.current?.update({mapProducts:it})},[it]);let Ce=(0,L.useRef)(null);Ce.current===null&&(Ce.current={handleTextChange:h=>b.current?.handleTextChange(h),handleKeyDown:h=>{let q="nativeEvent"in h?h.nativeEvent:h;b.current?.handleKeyDown(q)},setFocused:h=>b.current?.setFocused(h),startEditingParam:h=>b.current?.startEditingParam(h),exitEditMode:()=>b.current?.exitEditMode(),handleCaretAfterInput:h=>b.current?.handleCaretAfterInput(h),handleCaretMove:h=>b.current?.handleCaretMove(h),replaceEditingRange:h=>b.current?.replaceEditingRange(h)??!1,setActivePill:h=>b.current?.setActivePill(h),skipActivePill:()=>b.current?.skipActivePill(),removeLastParam:()=>b.current?.removeLastParam(),clearNewParamId:()=>b.current?.clearNewParamId(),reset:()=>b.current?.reset(),refreshProducts:()=>b.current?.refreshProducts(),prepareSubmit:()=>b.current?.prepareSubmit(),getState:()=>b.current?.getState()??fa,recordSubmit:h=>b.current?.recordSubmit(h),selectOption:(h,q)=>b.current?.selectOption(h,q),selectProduct:h=>b.current?.selectProduct(h),addProductToCart:h=>{let q=b.current;return!q||!Le.current?Promise.resolve():q.addProductToCart(h)},setActiveDropdownIndex:h=>b.current?.setActiveDropdownIndex(h),clearHighlight:h=>b.current?.clearHighlight(h),showPreviousMonth:()=>b.current?.showPreviousMonth(),showNextMonth:()=>b.current?.showNextMonth(),setTime:h=>b.current?.setTime(h),commitTime:()=>b.current?.commitTime(),toggleMultiSelectOption:h=>b.current?.toggleMultiSelectOption(h),commitMultiSelect:()=>b.current?.commitMultiSelect(),setLocationQuery:h=>b.current?.setLocationQuery(h),moveLocationHighlight:h=>b.current?.moveLocationHighlight(h),commitLocation:h=>b.current?.commitLocation(h),setLocationFieldFocused:h=>b.current?.setLocationFieldFocused(h),handleFocus:()=>b.current?.setFocused(!0),handleBlur:()=>b.current?.setFocused(!1)});let y=Ce.current,n=(0,L.useCallback)(h=>{let q=h.target.value,vt=q.length>0&&!h.nativeEvent?.isComposing&&q[0]!==q[0].toUpperCase()?q[0].toUpperCase()+q.slice(1):q;b.current?.handleTextChange(vt)},[]),se=(0,L.useCallback)(h=>{b.current?.handleKeyDown(h.nativeEvent)},[]),ze=b.current,g=at??fa,$e=te!==void 0?te:g.text,Ke=ae!==void 0?ae:g.completedParams,De=g.actionableSuggestions,ot=De[0],ut=(0,tt.withoutTraditionalAutocomplete)(De),qe=ze?.listboxId??"",lt=g.activeDropdownIndex>=0&&ze?`${qe}-option-${g.activeDropdownIndex}`:void 0,Se=g.editingParam,Me=g.editingIdentified,Ze=Se?{parameter:Se.suggestionParameter,text:Se.suggestionPlaceholder,required:!0,options:Se.options}:Me?{parameter:Me.parameter,text:(0,tt.identifiedParamLabel)(Me.parameter),required:!0,options:[]}:null,nt=g.dropdownSuggestion??Ze??ot,dt=Ze?[Ze]:De,Xe=(0,tt.dateSelectionFor)(g),ct=!ze||g.dropdownLoading;return{completedParams:Ke,multiSelectView:g.multiSelectView,toggleMultiSelectOption:y.toggleMultiSelectOption,commitMultiSelect:y.commitMultiSelect,skippedParams:g.skippedParams,identifiedParams:g.identifiedParams,suggestionPills:ut,setActivePill:y.setActivePill,skipActivePill:y.skipActivePill,removeLastParam:y.removeLastParam,segments:g.segments,newParamId:g.newParamId,clearNewParamId:y.clearNewParamId,suggestions:g.suggestions,activeIndex:g.activeDropdownIndex,isReady:g.isReady,isLoading:ct,isFocused:g.isFocused,isDropdownOpen:g.isDropdownOpen,isActivePillSelected:g.isActivePillSelected,placeholderText:g.placeholderText,listboxId:qe,error:g.error,products:g.products,customFields:g.customFields,selectProduct:y.selectProduct,addProductToCart:y.addProductToCart,handleTextChange:y.handleTextChange,handleKeyDown:y.handleKeyDown,setFocused:y.setFocused,editingParam:Se,editingIdentified:Me,editingAnchor:g.editingAnchor,caretOffset:g.caretOffset,startEditingParam:y.startEditingParam,exitEditMode:y.exitEditMode,handleCaretAfterInput:y.handleCaretAfterInput,handleCaretMove:y.handleCaretMove,replaceEditingRange:y.replaceEditingRange,inputProps:{value:$e,placeholder:g.placeholderText||void 0,onChange:n,onKeyDown:se,onFocus:y.handleFocus,onBlur:y.handleBlur,role:"combobox","aria-expanded":g.isDropdownOpen,"aria-activedescendant":lt,"aria-autocomplete":"list","aria-controls":qe},reset:y.reset,refreshProducts:y.refreshProducts,prepareSubmit:y.prepareSubmit,getState:y.getState,recordSubmit:y.recordSubmit,dropdownProps:{suggestions:nt?[{...nt,options:g.dropdownOptions}]:[],activeIndex:g.activeDropdownIndex,onSelect:y.selectOption,onHighlight:y.setActiveDropdownIndex,onUnhighlight:y.clearHighlight,isOpen:g.isDropdownOpen,id:qe,pills:dt,activeSelected:g.isActivePillSelected,onPillClick:y.setActivePill,onSkip:y.skipActivePill,showSkipButton:(M??!0)&&!Se&&!Me,showOptionIcons:H??!0,showOptionImages:ie??!0,showOptionCounts:E??!0,skipDisabled:g.inSelectionAnimation,isLoading:ct,skeletonExiting:g.skeletonExiting,isInputEmpty:$e.trim().length===0,language:d,products:g.products,productImageFallback:G,onProductSelect:y.selectProduct,onProductAddToCart:c?y.addProductToCart:void 0,onProductFocusChange:y.setFocused,formatType:g.activeFormatType,dateView:g.dateView,selectedDateIso:Xe.selectedIso,selectedDateRange:Xe.selectedRange,dateRangeStart:Xe.rangeStart,onPreviousMonth:y.showPreviousMonth,onNextMonth:y.showNextMonth,timeView:g.timeView,multiSelectView:g.multiSelectView,onMultiSelectCommit:y.commitMultiSelect,onTimeChange:y.setTime,onTimeCommit:y.commitTime,locationView:g.locationView,isReediting:g.editingParam!=null,onLocationQuery:y.setLocationQuery,onLocationMove:y.moveLocationHighlight,onLocationCommit:y.commitLocation,onLocationFocusChange:y.setLocationFieldFocused,isFocused:g.isFocused||g.locationFieldFocused,optionsPosition:u??"below"}}}var de=require("@magicx-eng/ai-autocomplete-vanilla"),N=require("react"),Et;function ii(){if(Et!==void 0)return Et;if(typeof document>"u")return!1;let e=document.createElement("div");return e.setAttribute("contenteditable","plaintext-only"),Et=e.contentEditable==="plaintext-only",Et}function ba(e){let{segments:a,showChipIcons:t=!0,showChipImages:i=!0,newParamId:o,editingParam:s,editingIdentified:r,editingAnchor:d,caretOffset:m,placeholderText:v,isFocused:C,isDropdownOpen:f,listboxId:p,activeDescendantId:u,autoFocus:x,handleTextChange:R,handleKeyDown:_,handleCaretAfterInput:F,handleCaretMove:H,startEditingParam:ie,replaceEditingRange:E,setFocused:M}=e,T=(0,N.useRef)(null),G=(0,N.useRef)(!1),oe=(0,N.useRef)(""),ce=(0,N.useRef)(""),te=(0,N.useRef)(null),ae=(0,N.useRef)(0);te.current=m,(0,N.useEffect)(()=>{if(!x)return;let w=T.current;if(!w)return;document.activeElement===w?M(!0):w.focus();let S=w.ownerDocument??document,I=S.getSelection(),z=I&&I.rangeCount>0&&w.contains(I.anchorNode);if(I&&!z){let D=S.createRange();D.selectNodeContents(w),D.collapse(!0),I.removeAllRanges(),I.addRange(D)}},[x,M]),(0,N.useEffect)(()=>{let w=T.current;if(!w)return;let S=w.ownerDocument??document,I=()=>{let z=S.getSelection();if(!z||z.rangeCount===0||!z.anchorNode||!w.contains(z.anchorNode))return;let D=z.anchorNode,ne=D.nodeType===Node.ELEMENT_NODE?D:D.parentElement,ge=(z.isCollapsed?ne?.closest("strong[data-param-id]"):null)?.dataset.paramId??null,Le=s?.id??r?.id??null;if(ge&&ge!==Le){ie(ge);return}performance.now()-ae.current<50||H((0,de.getCursorOffset)(w))};return S.addEventListener("selectionchange",I),()=>S.removeEventListener("selectionchange",I)},[s,r,ie,H]),(0,N.useEffect)(()=>{let w=T.current;if(!w)return;let S=I=>{let z=(0,de.chipIdFromTap)(w,I.target);z&&(ie(z),(0,de.keepCaretOnChip)(w,z))};return w.addEventListener("click",S),()=>w.removeEventListener("click",S)},[ie]),(0,N.useLayoutEffect)(()=>{let w=T.current;w&&(0,de.renderEditableContent)({input:w,segments:a,newParamId:o,editingParamId:s?.id??null,placeholderText:v??"",isFocused:C,showChipIcons:t,showChipImages:i})},[a,o,s,v,C,t,i]),(0,N.useLayoutEffect)(()=>{let w=oe.current,S=o??"";if(oe.current=S,!S||S===w)return;let I=T.current;if(!I)return;I.focus();let z=te.current??(0,de.plainTextLength)(I);(0,de.setCursorOffset)(I,z)},[o]),(0,N.useLayoutEffect)(()=>{let w=ce.current,S=s?.id??"";if(ce.current=S,!S||S===w||d==null)return;let I=T.current;I&&(0,de.setCursorOffset)(I,d)},[s,d]);let P=(0,N.useCallback)(()=>{if(G.current)return;let w=T.current;if(!w)return;let S=(0,de.extractPlainText)(w),z=S.length>0&&S[0]!==S[0].toUpperCase()?S[0].toUpperCase()+S.slice(1):S;R(z)},[R]),j=(0,N.useCallback)(()=>{ae.current=performance.now(),P();let w=T.current;w&&F((0,de.getCursorOffset)(w))},[P,F]);(0,N.useEffect)(()=>{let w=T.current;if(!w)return;let S=I=>{let z=I,D=z.inputType;if(D==="insertParagraph"||D==="insertLineBreak"||D==="insertFromDrop"){I.preventDefault();return}if(D.startsWith("insert")||D.startsWith("delete")){let ne=D.startsWith("delete")?"":z.data??"";E(ne)&&I.preventDefault()}};return w.addEventListener("beforeinput",S),()=>w.removeEventListener("beforeinput",S)},[E]);let Re=(0,N.useCallback)(()=>{G.current=!0,T.current?.setAttribute("data-aia-composing","true")},[]),ke=(0,N.useCallback)(()=>{G.current=!1,T.current?.removeAttribute("data-aia-composing"),P()},[P]),ve=(0,N.useCallback)(w=>{w.preventDefault();let S=T.current;if(!S)return;let I=(w.clipboardData.getData("text/plain")??"").replace(/\r?\n/g," ");if(!I)return;let z=S.ownerDocument??document,D=z.getSelection();if(!D||D.rangeCount===0)return;let ne=D.getRangeAt(0);if(!S.contains(ne.startContainer))return;ne.deleteContents();let Oe=z.createTextNode(I);ne.insertNode(Oe),ne.setStartAfter(Oe),ne.collapse(!0),D.removeAllRanges(),D.addRange(ne),P()},[P]),c=(0,N.useCallback)(w=>_(w),[_]),A=(0,N.useCallback)(()=>M(!0),[M]),We=(0,N.useCallback)(()=>M(!1),[M]),b=(0,N.useCallback)(()=>T.current?.focus(),[]),at=(0,N.useCallback)(()=>T.current?.blur(),[]),Ve=(0,N.useCallback)(()=>{let w=T.current;return w?(0,de.extractPlainText)(w):""},[]),Ue=ii()?"plaintext-only":"true";return{inputRef:T,editorProps:{ref:T,contentEditable:Ue,suppressContentEditableWarning:!0,tabIndex:0,role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":p,"aria-expanded":f,"aria-activedescendant":u,spellCheck:!0,enterKeyHint:"send",onInput:j,onKeyDown:c,onCompositionStart:Re,onCompositionEnd:ke,onPaste:ve,onFocus:A,onBlur:We},getPlainText:Ve,focus:b,blur:at}}var Ae=require("react/jsx-runtime");function oi(e){return e!=="auto"?e:typeof window>"u"||window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}var wa=(0,Q.forwardRef)(function({onSubmit:a,onResult:t,onError:i,optionOverrides:o,maskCompletedText:s,className:r,apiConfig:d,additionalContext:m,language:v,currency:C,productId:f,visitorId:p,columns:u,pillPlacement:x="dropdown",mode:R="auto",optionsPosition:_="below",animations:F=!0,optionsStyle:H="floating",dropdownTrigger:ie,closeDropdownOnBlur:E,prependPlaceholder:M,showNonTappableOptions:T,locationSearch:G,showOptionIcons:oe=!0,showChipIcons:ce=!0,showChipImages:te=!0,showOptionImages:ae=!0,showOptionCounts:P=!0,showSkipButton:j,showProducts:Re,productsLayout:ke,productImageFallback:ve,autoFocus:c=!0,onFocus:A,onBlur:We,value:b,completedParams:at,onChange:Ve,onParamsChange:Ue,products:w,mapProducts:S,onProductSelect:I,onProductAddToCart:z,submitButton:D,resetOnSubmit:ne=!0},Oe){let ge=(0,Q.useRef)(null),Le=(0,Q.useRef)(null),Ye=(0,Q.useRef)(null),st=(0,Q.useRef)(()=>{}),$=(0,Q.useRef)(null),Qe=(0,Q.useRef)(null);(0,Q.useEffect)(()=>{let B=ge.current;if(B)return $.current?$.current.setMode(R):$.current=new Be.ModeController(B,R),()=>{$.current?.destroy(),$.current=null}},[R]);let pt=(0,Q.useCallback)(B=>{let fe=Qe.current?.current;fe&&(fe.focus(),(0,Be.setCursorOffset)(fe,B))},[]),{completedParams:it,suggestionPills:Ge,setActivePill:ht,skipActivePill:je,segments:pe,newParamId:Ce,clearNewParamId:y,placeholderText:n,isFocused:se,isDropdownOpen:ze,isActivePillSelected:g,isLoading:$e,isReady:Ke,activeIndex:De,listboxId:ot,handleTextChange:ut,handleKeyDown:qe,setFocused:lt,editingParam:Se,editingIdentified:Me,editingAnchor:Ze,caretOffset:nt,startEditingParam:dt,handleCaretAfterInput:Xe,handleCaretMove:ct,replaceEditingRange:h,dropdownProps:q,reset:k,refreshProducts:vt,prepareSubmit:Ft,getState:Bt,recordSubmit:Wt}=It({onSubmit:B=>st.current(B),onResult:t,onError:i,optionOverrides:o,maskCompletedText:s,apiConfig:d,additionalContext:m,language:v,currency:C,productId:f,visitorId:p,columns:u,dropdownTrigger:ie,optionsPosition:_,closeDropdownOnBlur:E,prependPlaceholder:M,showNonTappableOptions:T,locationSearch:G,showOptionIcons:oe,showOptionImages:ae,showOptionCounts:P,showSkipButton:j,showProducts:Re,onFocus:A,onBlur:We,value:b,completedParams:at,onChange:Ve,onParamsChange:Ue,products:w,mapProducts:S,onProductSelect:I,onProductAddToCart:z,source:"full-sdk",setCursor:pt});(0,Q.useEffect)(()=>{if(!Ce)return;let B=window.setTimeout(()=>y(),650);return()=>window.clearTimeout(B)},[Ce,y]);let va=De>=0?`${ot}-option-${De}`:void 0,{inputRef:At,editorProps:xa,focus:xt,blur:Gt,getPlainText:Kt}=ba({segments:pe,newParamId:Ce,editingParam:Se,editingIdentified:Me,editingAnchor:Ze,caretOffset:nt,placeholderText:n,isFocused:se,showChipIcons:ce,showChipImages:te,isDropdownOpen:ze,listboxId:ot,activeDescendantId:va,autoFocus:c,handleTextChange:ut,handleKeyDown:qe,handleCaretAfterInput:Xe,handleCaretMove:ct,startEditingParam:dt,replaceEditingRange:h,setFocused:lt});Qe.current=At,(0,Q.useLayoutEffect)(()=>{let B=Le.current,fe=At.current;if(!B||!fe)return;let gt=()=>{let _t=B.firstElementChild;if(!_t)return;let Sa=_t.getBoundingClientRect(),Ta=fe.getBoundingClientRect();Sa.top>=Ta.bottom-2?B.setAttribute("data-aia-pill-wrapped",""):B.removeAttribute("data-aia-pill-wrapped")};gt();let qt=new ResizeObserver(gt);return qt.observe(fe),()=>qt.disconnect()},[pe,Ge.length,$e,At]),(0,Q.useEffect)(()=>{let B=Ye.current;if(B)return(0,Be.watchEditorHeight)(B)},[]),(0,Q.useImperativeHandle)(Oe,()=>({focus:xt,blur:Gt,reset:k,refreshProducts:vt,setMode:B=>$.current?.setMode(B),skipActivePill:je}),[xt,Gt,k,vt,je]);let mt=!!pe.length||it.length>0,Rt=(0,Q.useCallback)(B=>{if(!mt)return;B&&Ft();let fe=Bt(),gt=(0,Be.buildSubmitResult)(Kt(),fe.completedParams,fe.skippedParams,{identifiedParams:fe.identifiedParams,isReady:fe.isReady,customFields:fe.customFields});B&&Wt(gt),a(gt),ne&&k()},[Wt,ne,mt,Ft,Bt,a,k,Kt]);st.current=()=>Rt(!1);let ya=(0,Q.useCallback)(B=>{B.target?.closest("[data-aia-pill]")||document.activeElement?.closest("[data-aia-location]")||xt()},[xt]),ka=x==="inline",Ca=x==="dropdown";return(0,Ae.jsxs)("div",{ref:ge,className:`magicx-aia ${rt.container} ${r??""}`,"data-pill-placement":x,"data-options-position":_,"data-animations":F?"on":"off","data-aia-options-style":H,"data-mode":oi(R),children:[(0,Ae.jsx)(Tt,{...q,showPills:Ca,productsLayout:ke,productImageFallback:ve}),(0,Ae.jsxs)("div",{className:rt.inputWrapper,"data-aia-input-wrapper":"",onClick:ya,children:[(0,Ae.jsxs)("div",{ref:Ye,className:rt.editorArea,"data-aia-editor":"",children:[(0,Ae.jsx)("div",{...xa,className:rt.input,"data-aia-input":""}),ka&&($e||Ge.length>0)&&(0,Ae.jsx)("span",{ref:Le,className:rt.pillListContainer,"data-aia-pill-list-container":"",children:(0,Ae.jsx)(Ct,{pills:Ge,activePillIndex:0,activeSelected:g,onSelectPill:ht,loading:$e})})]}),D===null?null:D===void 0?(0,Ae.jsx)(ua,{disabled:!mt,ready:mt&&Ke,onClick:()=>Rt(!0),label:(0,Be.uiStringsFor)(v).submit}):(0,Ae.jsx)("span",{"data-aia-submit":"","data-aia-submit-slot":"",className:rt.submitSlot,onClick:B=>{mt&&(B.stopPropagation(),Rt(!0))},children:D})]})]})});0&&(module.exports={AIAutocomplete,AIAutocompleteDropdown,DATE_RANGE_META_END,DATE_RANGE_META_START,DEFAULT_OPTION_COUNT_UNIT,LOCATION_META_KEY,PRODUCT_PATH_PREFIX,TIME_META_KEY,WEEKDAY_LABELS,buildSubmitResult,cellDay,cellIso,dateCellMarks,formatDate,formatDateRange,formatOptionCount,formatPlace,formatTime,isoDate,monthLabel,optionCountLabel,optionHasImage,optionImageSources,optionImageSrc,optionLabel,optionsShowLeadingVisuals,parseDate,parseLooseDate,parseLooseDateRange,parseTime,productFromMatchedItem,productImageSources,productsFromCustomFields,sanitizeOptionIconSvg,selectedRangeFor,useAIAutocomplete,visibleDateRange,withSkippedParams});
|
|
3566
|
+
`,document.head.appendChild(e)}var pa={submitButton:"aia-submitButton-otz7H"};var Pt=require("react/jsx-runtime");function ua({disabled:e,ready:a,onClick:t,label:i=(0,ha.uiStringsFor)().submit}){return(0,Pt.jsx)("button",{type:"button","data-aia-submit":"",className:pa.submitButton,disabled:e,"data-aia-ready":a?"":void 0,onClick:o=>{o.stopPropagation(),t()},"aria-label":i,children:(0,Pt.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",role:"img","aria-label":i,children:(0,Pt.jsx)("path",{d:"M9 14V4M9 4L4 9M9 4L14 9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}var tt=require("@magicx-eng/ai-autocomplete-vanilla"),R=require("react");var Nt=require("react");function ma(e){let a=(0,Nt.useRef)(e);a.current=e;let t=Object.keys(e??{}).sort().join("\0"),i=(0,Nt.useRef)({key:"",overrides:void 0});if(i.current.key!==t){let o={};for(let s of Object.keys(e??{})){let r=(d,m,v)=>{let C=a.current?.[s];return C?C(d,m,v):[]};o[s]=r}i.current={key:t,overrides:e?o:void 0}}return{overrides:i.current.overrides,key:t}}var Ht=require("react");function ga(e){let a=(0,Ht.useRef)(e);a.current=e;let t=(0,Ht.useRef)(null);t.current===null&&(t.current={fetch:(o,s)=>{let r=a.current;return r?r.fetch(o,s):Promise.reject(new Error("products config removed"))},transform:o=>a.current?.transform(o)??[],get limit(){return a.current?.limit}});let i=e!==void 0;return{config:i?t.current:void 0,enabled:i}}var fa={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,dateFloor:null,timeView:null,multiSelectView:null,multiSelectDraft:null,locationView:null,locationSearch:null,locationAutocomplete:!0,locationFieldFocused:!1,placeholderText:"",leadInText:"",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,timeDraft:null};function It({onSubmit:e,onResult:a,onError:t,optionOverrides:i,maskCompletedText:o,apiConfig:s,additionalContext:r,language:d,currency:m,productId:v,visitorId:C,columns:g=2,dropdownTrigger:p,optionsPosition:u,closeDropdownOnBlur:x,prependPlaceholder:A,showNonTappableOptions:V,locationSearch:H,showOptionIcons:N,showOptionImages:de,showOptionCounts:P,showSkipButton:G,showProducts:K,productImageFallback:S="image",onFocus:ae,onBlur:ce,value:ie,completedParams:oe,onChange:L,onParamsChange:F,products:Le,mapProducts:Ce,onProductSelect:ve,onProductAddToCart:c,source:E,setCursor:Ge}){let w=(0,R.useRef)(null),[at,Ue]=(0,R.useState)(null),Ye=(0,R.useRef)(e);Ye.current=e;let Ke=(0,R.useRef)(a);Ke.current=a;let f=(0,R.useRef)(t);f.current=t;let T=(0,R.useRef)(L);T.current=L;let I=(0,R.useRef)(F);I.current=F;let O=(0,R.useRef)(ae);O.current=ae;let M=(0,R.useRef)(ce);M.current=ce;let re=(0,R.useRef)(Ge);re.current=Ge;let ge=(0,R.useRef)(ve);ge.current=ve;let xe=(0,R.useRef)(c);xe.current=c;let ze=(0,R.useRef)(C);ze.current=C;let st=(0,R.useRef)(()=>{let h=ze.current;return typeof h=="function"?h():h}).current,Z=ga(Le),Qe=(0,R.useRef)(Ce);Qe.current=Ce;let pt=(0,R.useRef)((h,_)=>{let k=Qe.current;return k?k(h,_):h}).current,it=Ce?pt:void 0,De=ma(i);(0,R.useEffect)(()=>{if(typeof document>"u")return;let h=new tt.AIAutocomplete(document.createElement("div"),{renderMode:"headless",apiConfig:s,additionalContext:r,language:d,currency:m,productId:v,visitorId:st,optionOverrides:De.overrides,maskCompletedText:o,columns:g,dropdownTrigger:p,optionsPosition:u,closeDropdownOnBlur:x,prependPlaceholder:A,showNonTappableOptions:V,locationSearch:H,showProducts:K,source:E,value:ie,completedParams:oe,onSubmit:(...k)=>Ye.current?.(...k),onResult:(...k)=>Ke.current?.(...k),onError:(...k)=>f.current?.(...k),onChange:(...k)=>T.current?.(...k),onParamsChange:(...k)=>I.current?.(...k),onFocus:()=>O.current?.(),onBlur:()=>M.current?.(),onProductSelect:k=>ge.current?.(k),onProductAddToCart:k=>xe.current?.(k),setCursor:k=>re.current?.(k),products:Z.config,mapProducts:it});w.current=h,Ue(h.getState());let _=h.subscribe(k=>Ue(k));return()=>{_(),h.destroy(),w.current===h&&(w.current=null)}},[]),(0,R.useEffect)(()=>{ie!==void 0&&w.current?.setValue(ie)},[ie]),(0,R.useEffect)(()=>{oe!==void 0&&w.current?.setCompletedParams(oe)},[oe]);let ht=JSON.stringify(s??null),je;try{je=JSON.stringify(r??null)}catch{je="[unstringifiable]"}(0,R.useEffect)(()=>{w.current?.update({apiConfig:s,additionalContext:r,language:d,currency:m,productId:v,optionOverrides:De.overrides,dropdownTrigger:p,optionsPosition:u,closeDropdownOnBlur:x,prependPlaceholder:A,showNonTappableOptions:V,locationSearch:H,showProducts:K})},[ht,je,d,m?.code,m?.rate,m?.country,v,De.key,p,u,x,A,V,H,K]);let pe=(0,R.useRef)(!1);(0,R.useEffect)(()=>{if(!pe.current){pe.current=!0;return}w.current?.update({products:Z.config})},[Z.enabled]),(0,R.useEffect)(()=>{w.current?.update({mapProducts:it})},[it]);let Se=(0,R.useRef)(null);Se.current===null&&(Se.current={handleTextChange:h=>w.current?.handleTextChange(h),handleKeyDown:h=>{let _="nativeEvent"in h?h.nativeEvent:h;w.current?.handleKeyDown(_)},setFocused:h=>w.current?.setFocused(h),startEditingParam:h=>w.current?.startEditingParam(h),exitEditMode:()=>w.current?.exitEditMode(),handleCaretAfterInput:h=>w.current?.handleCaretAfterInput(h),handleCaretMove:h=>w.current?.handleCaretMove(h),replaceEditingRange:h=>w.current?.replaceEditingRange(h)??!1,setActivePill:h=>w.current?.setActivePill(h),skipActivePill:()=>w.current?.skipActivePill(),removeLastParam:()=>w.current?.removeLastParam(),clearNewParamId:()=>w.current?.clearNewParamId(),reset:()=>w.current?.reset(),refreshProducts:()=>w.current?.refreshProducts(),prepareSubmit:()=>w.current?.prepareSubmit(),getState:()=>w.current?.getState()??fa,recordSubmit:h=>w.current?.recordSubmit(h),selectOption:(h,_)=>w.current?.selectOption(h,_),selectProduct:h=>w.current?.selectProduct(h),addProductToCart:h=>{let _=w.current;return!_||!xe.current?Promise.resolve():_.addProductToCart(h)},setActiveDropdownIndex:h=>w.current?.setActiveDropdownIndex(h),clearHighlight:h=>w.current?.clearHighlight(h),showPreviousMonth:()=>w.current?.showPreviousMonth(),showNextMonth:()=>w.current?.showNextMonth(),setTime:h=>w.current?.setTime(h),commitTime:()=>w.current?.commitTime(),toggleMultiSelectOption:h=>w.current?.toggleMultiSelectOption(h),commitMultiSelect:()=>w.current?.commitMultiSelect(),setLocationQuery:h=>w.current?.setLocationQuery(h),moveLocationHighlight:h=>w.current?.moveLocationHighlight(h),commitLocation:h=>w.current?.commitLocation(h),setLocationFieldFocused:h=>w.current?.setLocationFieldFocused(h),handleFocus:()=>w.current?.setFocused(!0),handleBlur:()=>w.current?.setFocused(!1)});let y=Se.current,n=(0,R.useCallback)(h=>{let _=h.target.value,vt=_.length>0&&!h.nativeEvent?.isComposing&&_[0]!==_[0].toUpperCase()?_[0].toUpperCase()+_.slice(1):_;w.current?.handleTextChange(vt)},[]),se=(0,R.useCallback)(h=>{w.current?.handleKeyDown(h.nativeEvent)},[]),Me=w.current,b=at??fa,$e=ie!==void 0?ie:b.text,qe=oe!==void 0?oe:b.completedParams,Te=b.actionableSuggestions,ot=Te[0],ut=(0,R.useMemo)(()=>(0,tt.withoutTraditionalAutocomplete)(Te),[Te]),_e=Me?.listboxId??"",lt=b.activeDropdownIndex>=0&&Me?`${_e}-option-${b.activeDropdownIndex}`:void 0,Pe=b.editingParam,Ne=b.editingIdentified,Ze=Pe?{parameter:Pe.suggestionParameter,text:Pe.suggestionPlaceholder,required:!0,options:Pe.options}:Ne?{parameter:Ne.parameter,text:(0,tt.identifiedParamLabel)(Ne.parameter),required:!0,options:[]}:null,nt=b.dropdownSuggestion??Ze??ot,dt=Ze?[Ze]:Te,Xe=(0,tt.dateSelectionFor)(b),ct=!Me||b.dropdownLoading;return{completedParams:qe,multiSelectView:b.multiSelectView,toggleMultiSelectOption:y.toggleMultiSelectOption,commitMultiSelect:y.commitMultiSelect,skippedParams:b.skippedParams,identifiedParams:b.identifiedParams,suggestionPills:ut,setActivePill:y.setActivePill,skipActivePill:y.skipActivePill,removeLastParam:y.removeLastParam,segments:b.segments,newParamId:b.newParamId,clearNewParamId:y.clearNewParamId,suggestions:b.suggestions,activeIndex:b.activeDropdownIndex,isReady:b.isReady,isLoading:ct,isFocused:b.isFocused,isDropdownOpen:b.isDropdownOpen,isActivePillSelected:b.isActivePillSelected,placeholderText:b.placeholderText,listboxId:_e,error:b.error,products:b.products,customFields:b.customFields,selectProduct:y.selectProduct,addProductToCart:y.addProductToCart,handleTextChange:y.handleTextChange,handleKeyDown:y.handleKeyDown,setFocused:y.setFocused,editingParam:Pe,editingIdentified:Ne,editingAnchor:b.editingAnchor,caretOffset:b.caretOffset,startEditingParam:y.startEditingParam,exitEditMode:y.exitEditMode,handleCaretAfterInput:y.handleCaretAfterInput,handleCaretMove:y.handleCaretMove,replaceEditingRange:y.replaceEditingRange,inputProps:{value:$e,placeholder:b.placeholderText||void 0,onChange:n,onKeyDown:se,onFocus:y.handleFocus,onBlur:y.handleBlur,role:"combobox","aria-expanded":b.isDropdownOpen,"aria-activedescendant":lt,"aria-autocomplete":"list","aria-controls":_e},reset:y.reset,refreshProducts:y.refreshProducts,prepareSubmit:y.prepareSubmit,getState:y.getState,recordSubmit:y.recordSubmit,dropdownProps:{suggestions:nt?[{...nt,options:b.dropdownOptions}]:[],activeIndex:b.activeDropdownIndex,onSelect:y.selectOption,onHighlight:y.setActiveDropdownIndex,onUnhighlight:y.clearHighlight,isOpen:b.isDropdownOpen,id:_e,pills:dt,activeSelected:b.isActivePillSelected,onPillClick:y.setActivePill,onSkip:y.skipActivePill,showSkipButton:(G??!0)&&!Pe&&!Ne,showOptionIcons:N??!0,showOptionImages:de??!0,showOptionCounts:P??!0,skipDisabled:b.inSelectionAnimation,isLoading:ct,skeletonExiting:b.skeletonExiting,isInputEmpty:$e.trim().length===0,language:d,products:b.products,productImageFallback:S,onProductSelect:y.selectProduct,onProductAddToCart:c?y.addProductToCart:void 0,onProductFocusChange:y.setFocused,formatType:b.activeFormatType,dateView:b.dateView,selectedDateIso:Xe.selectedIso,selectedDateRange:Xe.selectedRange,dateRangeStart:Xe.rangeStart,onPreviousMonth:y.showPreviousMonth,onNextMonth:y.showNextMonth,timeView:b.timeView,multiSelectView:b.multiSelectView,onMultiSelectCommit:y.commitMultiSelect,onTimeChange:y.setTime,onTimeCommit:y.commitTime,locationView:b.locationView,isReediting:b.editingParam!=null,onLocationQuery:y.setLocationQuery,onLocationMove:y.moveLocationHighlight,onLocationCommit:y.commitLocation,onLocationFocusChange:y.setLocationFieldFocused,isFocused:b.isFocused||b.locationFieldFocused,optionsPosition:u??"below"}}}var j=require("@magicx-eng/ai-autocomplete-vanilla"),D=require("react"),Et;function ii(){if(Et!==void 0)return Et;if(typeof document>"u")return!1;let e=document.createElement("div");return e.setAttribute("contenteditable","plaintext-only"),Et=e.contentEditable==="plaintext-only",Et}function ba(e){let{segments:a,showChipIcons:t=!0,showChipImages:i=!0,newParamId:o,editingParam:s,editingIdentified:r,editingAnchor:d,caretOffset:m,placeholderText:v,hintSuggestions:C,isFocused:g,isDropdownOpen:p,listboxId:u,activeDescendantId:x,autoFocus:A,handleTextChange:V,handleKeyDown:H,handleCaretAfterInput:N,handleCaretMove:de,startEditingParam:P,replaceEditingRange:G,setFocused:K}=e,S=(0,D.useRef)(null),ae=(0,D.useRef)(!1),ce=(0,D.useRef)(""),ie=(0,D.useRef)(""),oe=(0,D.useRef)(null),L=(0,D.useRef)(0);oe.current=m,(0,D.useEffect)(()=>{if(!A)return;let f=S.current;if(!f)return;document.activeElement===f?K(!0):f.focus();let T=f.ownerDocument??document,I=T.getSelection(),O=I&&I.rangeCount>0&&f.contains(I.anchorNode);if(I&&!O){let M=T.createRange();M.selectNodeContents(f),M.collapse(!0),I.removeAllRanges(),I.addRange(M)}},[A,K]),(0,D.useEffect)(()=>{let f=S.current;if(!f)return;let T=f.ownerDocument??document,I=()=>{let O=T.getSelection();if(!O||O.rangeCount===0||!O.anchorNode||!f.contains(O.anchorNode))return;let M=O.anchorNode,re=M.nodeType===Node.ELEMENT_NODE?M:M.parentElement,xe=(O.isCollapsed?re?.closest("strong[data-param-id]"):null)?.dataset.paramId??null,ze=s?.id??r?.id??null;if(xe&&xe!==ze){P(xe);return}performance.now()-L.current<50||de((0,j.getCursorOffset)(f))};return T.addEventListener("selectionchange",I),()=>T.removeEventListener("selectionchange",I)},[s,r,P,de]),(0,D.useEffect)(()=>{let f=S.current;if(!f)return;let T=I=>{let O=(0,j.chipIdFromTap)(f,I.target);O&&(P(O),(0,j.keepCaretOnChip)(f,O))};return f.addEventListener("click",T),()=>f.removeEventListener("click",T)},[P]),(0,D.useLayoutEffect)(()=>{let f=S.current;f&&(0,j.renderEditableContent)({input:f,segments:a,newParamId:o,editingParamId:s?.id??null,placeholderText:v??"",isFocused:g,showChipIcons:t,showChipImages:i,hintOptions:(0,j.startingHintOptions)(C??[])})},[a,o,s,v,C,g,t,i]),(0,D.useEffect)(()=>{let f=S.current;return()=>{f&&(0,j.cancelStartingHint)(f)}},[]),(0,D.useLayoutEffect)(()=>{let f=ce.current,T=o??"";if(ce.current=T,!T||T===f)return;let I=S.current;if(!I)return;I.focus();let O=oe.current??(0,j.plainTextLength)(I);(0,j.setCursorOffset)(I,O)},[o]),(0,D.useLayoutEffect)(()=>{let f=ie.current,T=s?.id??"";if(ie.current=T,!T||T===f||d==null)return;let I=S.current;I&&(0,j.setCursorOffset)(I,d)},[s,d]);let F=(0,D.useCallback)(()=>{if(ae.current)return;let f=S.current;if(!f)return;let T=(0,j.extractPlainText)(f),O=T.length>0&&T[0]!==T[0].toUpperCase()?T[0].toUpperCase()+T.slice(1):T;V(O)},[V]),Le=(0,D.useCallback)(()=>{L.current=performance.now(),F();let f=S.current;f&&N((0,j.getCursorOffset)(f))},[F,N]);(0,D.useEffect)(()=>{let f=S.current;if(!f)return;let T=I=>{let O=I,M=O.inputType;if(M==="insertParagraph"||M==="insertLineBreak"||M==="insertFromDrop"){I.preventDefault();return}if(M.startsWith("insert")||M.startsWith("delete")){let re=M.startsWith("delete")?"":O.data??"";G(re)&&I.preventDefault()}};return f.addEventListener("beforeinput",T),()=>f.removeEventListener("beforeinput",T)},[G]);let Ce=(0,D.useCallback)(()=>{ae.current=!0,S.current?.setAttribute("data-aia-composing","true")},[]),ve=(0,D.useCallback)(()=>{ae.current=!1,S.current?.removeAttribute("data-aia-composing"),F()},[F]),c=(0,D.useCallback)(f=>{f.preventDefault();let T=S.current;if(!T)return;let I=(f.clipboardData.getData("text/plain")??"").replace(/\r?\n/g," ");if(!I)return;let O=T.ownerDocument??document,M=O.getSelection();if(!M||M.rangeCount===0)return;let re=M.getRangeAt(0);if(!T.contains(re.startContainer))return;re.deleteContents();let ge=O.createTextNode(I);re.insertNode(ge),re.setStartAfter(ge),re.collapse(!0),M.removeAllRanges(),M.addRange(re),F()},[F]),E=(0,D.useCallback)(f=>H(f),[H]),Ge=(0,D.useCallback)(()=>K(!0),[K]),w=(0,D.useCallback)(()=>K(!1),[K]),at=(0,D.useCallback)(()=>S.current?.focus(),[]),Ue=(0,D.useCallback)(()=>S.current?.blur(),[]),Ye=(0,D.useCallback)(()=>{let f=S.current;return f?(0,j.extractPlainText)(f):""},[]),Ke=ii()?"plaintext-only":"true";return{inputRef:S,editorProps:{ref:S,contentEditable:Ke,suppressContentEditableWarning:!0,tabIndex:0,role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":u,"aria-expanded":p,"aria-activedescendant":x,spellCheck:!0,enterKeyHint:"send",onInput:Le,onKeyDown:E,onCompositionStart:Ce,onCompositionEnd:ve,onPaste:c,onFocus:Ge,onBlur:w},getPlainText:Ye,focus:at,blur:Ue}}var Oe=require("react/jsx-runtime");function oi(e){return e!=="auto"?e:typeof window>"u"||window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}var wa=(0,$.forwardRef)(function({onSubmit:a,onResult:t,onError:i,optionOverrides:o,maskCompletedText:s,className:r,apiConfig:d,additionalContext:m,language:v,currency:C,productId:g,visitorId:p,columns:u,pillPlacement:x="dropdown",mode:A="auto",optionsPosition:V="below",animations:H=!0,optionsStyle:N="floating",dropdownTrigger:de,closeDropdownOnBlur:P,prependPlaceholder:G,showNonTappableOptions:K,locationSearch:S,showOptionIcons:ae=!0,showChipIcons:ce=!0,showChipImages:ie=!0,showOptionImages:oe=!0,showOptionCounts:L=!0,showSkipButton:F,showProducts:Le,productsLayout:Ce,productImageFallback:ve,autoFocus:c=!0,onFocus:E,onBlur:Ge,value:w,completedParams:at,onChange:Ue,onParamsChange:Ye,products:Ke,mapProducts:f,onProductSelect:T,onProductAddToCart:I,submitButton:O,resetOnSubmit:M=!0},re){let ge=(0,$.useRef)(null),xe=(0,$.useRef)(null),ze=(0,$.useRef)(null),st=(0,$.useRef)(()=>{}),Z=(0,$.useRef)(null),Qe=(0,$.useRef)(null);(0,$.useEffect)(()=>{let B=ge.current;if(B)return Z.current?Z.current.setMode(A):Z.current=new We.ModeController(B,A),()=>{Z.current?.destroy(),Z.current=null}},[A]);let pt=(0,$.useCallback)(B=>{let fe=Qe.current?.current;fe&&(fe.focus(),(0,We.setCursorOffset)(fe,B))},[]),{completedParams:it,suggestionPills:De,setActivePill:ht,skipActivePill:je,segments:pe,newParamId:Se,clearNewParamId:y,placeholderText:n,isFocused:se,isDropdownOpen:Me,isActivePillSelected:b,isLoading:$e,isReady:qe,activeIndex:Te,listboxId:ot,handleTextChange:ut,handleKeyDown:_e,setFocused:lt,editingParam:Pe,editingIdentified:Ne,editingAnchor:Ze,caretOffset:nt,startEditingParam:dt,handleCaretAfterInput:Xe,handleCaretMove:ct,replaceEditingRange:h,dropdownProps:_,reset:k,refreshProducts:vt,prepareSubmit:Ft,getState:Bt,recordSubmit:Wt}=It({onSubmit:B=>st.current(B),onResult:t,onError:i,optionOverrides:o,maskCompletedText:s,apiConfig:d,additionalContext:m,language:v,currency:C,productId:g,visitorId:p,columns:u,dropdownTrigger:de,optionsPosition:V,closeDropdownOnBlur:P,prependPlaceholder:G,showNonTappableOptions:K,locationSearch:S,showOptionIcons:ae,showOptionImages:oe,showOptionCounts:L,showSkipButton:F,showProducts:Le,onFocus:E,onBlur:Ge,value:w,completedParams:at,onChange:Ue,onParamsChange:Ye,products:Ke,mapProducts:f,onProductSelect:T,onProductAddToCart:I,source:"full-sdk",setCursor:pt});(0,$.useEffect)(()=>{if(!Se)return;let B=window.setTimeout(()=>y(),650);return()=>window.clearTimeout(B)},[Se,y]);let va=Te>=0?`${ot}-option-${Te}`:void 0,{inputRef:At,editorProps:xa,focus:xt,blur:Gt,getPlainText:Kt}=ba({segments:pe,newParamId:Se,editingParam:Pe,editingIdentified:Ne,editingAnchor:Ze,caretOffset:nt,placeholderText:n,hintSuggestions:x==="inline"?[]:De,isFocused:se,showChipIcons:ce,showChipImages:ie,isDropdownOpen:Me,listboxId:ot,activeDescendantId:va,autoFocus:c,handleTextChange:ut,handleKeyDown:_e,handleCaretAfterInput:Xe,handleCaretMove:ct,startEditingParam:dt,replaceEditingRange:h,setFocused:lt});Qe.current=At,(0,$.useLayoutEffect)(()=>{let B=xe.current,fe=At.current;if(!B||!fe)return;let gt=()=>{let _t=B.firstElementChild;if(!_t)return;let Sa=_t.getBoundingClientRect(),Ta=fe.getBoundingClientRect();Sa.top>=Ta.bottom-2?B.setAttribute("data-aia-pill-wrapped",""):B.removeAttribute("data-aia-pill-wrapped")};gt();let qt=new ResizeObserver(gt);return qt.observe(fe),()=>qt.disconnect()},[pe,De.length,$e,At]),(0,$.useEffect)(()=>{let B=ze.current;if(B)return(0,We.watchEditorHeight)(B)},[]),(0,$.useImperativeHandle)(re,()=>({focus:xt,blur:Gt,reset:k,refreshProducts:vt,setMode:B=>Z.current?.setMode(B),skipActivePill:je}),[xt,Gt,k,vt,je]);let mt=!!pe.length||it.length>0,Rt=(0,$.useCallback)(B=>{if(!mt)return;B&&Ft();let fe=Bt(),gt=(0,We.buildSubmitResult)(Kt(),fe.completedParams,fe.skippedParams,{identifiedParams:fe.identifiedParams,isReady:fe.isReady,customFields:fe.customFields});B&&Wt(gt),a(gt),M&&k()},[Wt,M,mt,Ft,Bt,a,k,Kt]);st.current=()=>Rt(!1);let ya=(0,$.useCallback)(B=>{B.target?.closest("[data-aia-pill]")||document.activeElement?.closest("[data-aia-location]")||xt()},[xt]),ka=x==="inline",Ca=x==="dropdown";return(0,Oe.jsxs)("div",{ref:ge,className:`magicx-aia ${rt.container} ${r??""}`,"data-pill-placement":x,"data-options-position":V,"data-animations":H?"on":"off","data-aia-options-style":N,"data-mode":oi(A),children:[(0,Oe.jsx)(Tt,{..._,showPills:Ca,productsLayout:Ce,productImageFallback:ve}),(0,Oe.jsxs)("div",{className:rt.inputWrapper,"data-aia-input-wrapper":"",onClick:ya,children:[(0,Oe.jsxs)("div",{ref:ze,className:rt.editorArea,"data-aia-editor":"",children:[(0,Oe.jsx)("div",{...xa,className:rt.input,"data-aia-input":""}),ka&&($e||De.length>0)&&(0,Oe.jsx)("span",{ref:xe,className:rt.pillListContainer,"data-aia-pill-list-container":"",children:(0,Oe.jsx)(Ct,{pills:De,activePillIndex:0,activeSelected:b,onSelectPill:ht,loading:$e})})]}),O===null?null:O===void 0?(0,Oe.jsx)(ua,{disabled:!mt,ready:mt&&qe,onClick:()=>Rt(!0),label:(0,We.uiStringsFor)(v).submit}):(0,Oe.jsx)("span",{"data-aia-submit":"","data-aia-submit-slot":"",className:rt.submitSlot,onClick:B=>{mt&&(B.stopPropagation(),Rt(!0))},children:O})]})]})});0&&(module.exports={AIAutocomplete,AIAutocompleteDropdown,DATE_RANGE_META_END,DATE_RANGE_META_START,DEFAULT_OPTION_COUNT_UNIT,LOCATION_META_KEY,PRODUCT_PATH_PREFIX,TIME_META_KEY,WEEKDAY_LABELS,buildSubmitResult,cellDay,cellIso,dateCellMarks,formatDate,formatDateRange,formatOptionCount,formatPlace,formatTime,isoDate,monthLabel,optionCountLabel,optionHasImage,optionImageSources,optionImageSrc,optionLabel,optionsShowLeadingVisuals,parseDate,parseLooseDate,parseLooseDateRange,parseTime,productFromMatchedItem,productImageSources,productsFromCustomFields,sanitizeOptionIconSvg,selectedRangeFor,useAIAutocomplete,visibleDateRange,withSkippedParams});
|
|
3555
3567
|
//# sourceMappingURL=index.js.map
|