@cartbot/vehicle-search-beta 3.0.15 → 3.0.17

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.
@@ -1,5 +1,5 @@
1
1
  import { jsx as a, jsxs as A, Fragment as $e } from "react/jsx-runtime";
2
- import { useState as M, useEffect as I, useRef as Z, useCallback as j, useMemo as ut } from "react";
2
+ import { useState as M, useEffect as B, useRef as Z, useCallback as N, useMemo as ut } from "react";
3
3
  import mt from "react-dom";
4
4
  import ft from "js-cookie";
5
5
  import { Combobox as gt, ComboboxInput as bt, ComboboxButton as wt, ComboboxOptions as yt, ComboboxOption as xt } from "@headlessui/react";
@@ -11,7 +11,7 @@ import Ct from "lodash/debounce.js";
11
11
  import _t from "tinycolor2";
12
12
  import Be from "posthog-js";
13
13
  const zt = `@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap";/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{*,:before,:after,::backdrop{--tw-space-x-reverse:0;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-border-style:solid}vehicle-search,vehicle-search *,vehicle-search:before,vehicle-search:after,vehicle-search::backdrop{--tw-space-x-reverse:0;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-border-style:solid}:host,:host *,:host:before,:host:after,:host::backdrop{--tw-space-x-reverse:0;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-border-style:solid}}@layer theme{:root,:host{--vs-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--vs-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--vs-color-red-300:oklch(80.8% .114 19.571);--vs-color-red-500:oklch(63.7% .237 25.331);--vs-color-stone-200:oklch(92.3% .003 48.717);--vs-color-stone-400:oklch(70.9% .01 56.259);--vs-color-stone-600:oklch(44.4% .011 73.639);--vs-color-stone-900:oklch(21.6% .006 56.043);--vs-color-black:#000;--vs-color-white:#fff;--vs-spacing:.25rem;--vs-text-base:1rem;--vs-text-base--line-height: 1.5 ;--vs-font-weight-normal:400;--vs-font-weight-medium:500;--vs-font-weight-semibold:600;--vs-font-weight-bold:700;--vs-leading-normal:1.5;--vs-animate-spin:spin 1s linear infinite;--vs-default-transition-duration:.15s;--vs-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--vs-default-font-family:var(--vs-font-sans);--vs-default-mono-font-family:var(--vs-font-mono)}vehicle-search,:host{--vs-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--vs-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--vs-color-red-300:oklch(80.8% .114 19.571);--vs-color-red-500:oklch(63.7% .237 25.331);--vs-color-stone-200:oklch(92.3% .003 48.717);--vs-color-stone-400:oklch(70.9% .01 56.259);--vs-color-stone-600:oklch(44.4% .011 73.639);--vs-color-stone-900:oklch(21.6% .006 56.043);--vs-color-black:#000;--vs-color-white:#fff;--vs-spacing:.25rem;--vs-text-base:1rem;--vs-text-base--line-height: 1.5 ;--vs-font-weight-normal:400;--vs-font-weight-medium:500;--vs-font-weight-semibold:600;--vs-font-weight-bold:700;--vs-leading-normal:1.5;--vs-animate-spin:spin 1s linear infinite;--vs-default-transition-duration:.15s;--vs-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--vs-default-font-family:var(--vs-font-sans);--vs-default-mono-font-family:var(--vs-font-mono)}:host{--vs-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--vs-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--vs-color-red-300:oklch(80.8% .114 19.571);--vs-color-red-500:oklch(63.7% .237 25.331);--vs-color-stone-200:oklch(92.3% .003 48.717);--vs-color-stone-400:oklch(70.9% .01 56.259);--vs-color-stone-600:oklch(44.4% .011 73.639);--vs-color-stone-900:oklch(21.6% .006 56.043);--vs-color-black:#000;--vs-color-white:#fff;--vs-spacing:.25rem;--vs-text-base:1rem;--vs-text-base--line-height: 1.5 ;--vs-font-weight-normal:400;--vs-font-weight-medium:500;--vs-font-weight-semibold:600;--vs-font-weight-bold:700;--vs-leading-normal:1.5;--vs-animate-spin:spin 1s linear infinite;--vs-default-transition-duration:.15s;--vs-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--vs-default-font-family:var(--vs-font-sans);--vs-default-mono-font-family:var(--vs-font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--vs-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--vs-default-font-feature-settings,normal);font-variation-settings:var(--vs-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--vs-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--vs-default-mono-font-feature-settings,normal);font-variation-settings:var(--vs-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}.partbot-mmyvs-container{--partbot-theme:0 188 125;--partbot-button-color:0 153 102;--partbot-button-hover-color:0 188 125;--partbot-button-label-color:255 255 255;--partbot-button-hover-label-color:255 255 255;--partbot-mobile-background-color:12 24 39;--partbot-button-border-radius:.375rem;--partbot-font-size:.875rem;--partbot-font-family:"Partbot","Inter",Helvetica,sans-serif;--partbot-padding:.5rem;--partbot-input-shadow:0 1px 2px 0 #0000000d;--partbot-input-border-color:229 231 235;--partbot-input-border-width:1px}[class*="vs:"]:before,[class*="vs:"]:after,[class^=vehicle-search-]:before,[class^=vehicle-search-]:after{box-sizing:border-box;--tw-content:"";border:0 solid}[class*="vs:"],[class^=vehicle-search-]{box-sizing:border-box;border:0 solid}.vehicle-search-select{text-transform:none;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}.partbot-mmyvs-container{top:calc(var(--vs-spacing)*0);right:calc(var(--vs-spacing)*0);left:calc(var(--vs-spacing)*0);z-index:10000;background-color:rgb(var(--partbot-mobile-background-color));padding:calc(var(--vs-spacing)*8);--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--vs-default-transition-timing-function));transition-duration:var(--tw-duration,var(--vs-default-transition-duration));--tw-duration:.5s;transition-duration:.5s;position:fixed}@media (min-width:48rem){.partbot-mmyvs-container{z-index:10;padding:calc(var(--vs-spacing)*0);--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);background-color:#0000;position:relative;top:auto;left:auto;right:auto}}.partbot-mmyvs-container{transform:translateY(-100vh)}@media (min-width:768px){.partbot-mmyvs-container{transform:translateY(0)}}.partbot-mmyvs-container.active{transform:translateY(0)}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;--tw-shadow:0 0 #0000;background-color:#fff;border-width:1px;border-color:#6a7282;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem}:is([type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select):focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#155dfc;outline:2px solid #0000}input::placeholder,textarea::placeholder{color:#6a7282;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}::-webkit-date-and-time-value{text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-year-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-month-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-day-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-hour-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-minute-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-second-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-millisecond-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{-webkit-print-color-adjust:exact;print-color-adjust:exact;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='oklch(55.1%25 0.027 264.364)' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;-webkit-print-color-adjust:unset;print-color-adjust:unset;padding-right:.75rem}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;print-color-adjust:exact;vertical-align:middle;-webkit-user-select:none;user-select:none;color:#155dfc;--tw-shadow:0 0 #0000;background-color:#fff;background-origin:border-box;border-width:1px;border-color:#6a7282;flex-shrink:0;width:1rem;height:1rem;padding:0;display:inline-block}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid #0000}[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors:active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors:active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{background-color:currentColor;border-color:#0000}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}@media (forced-colors:active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{background-color:currentColor;border-color:#0000}[type=file]{background:unset;border-color:inherit;font-size:unset;line-height:inherit;border-width:0;border-radius:0;padding:0}[type=file]:focus{outline:1px solid buttontext;outline:1px auto -webkit-focus-ring-color}}@layer components;@layer utilities{.vs\\:pointer-events-auto{pointer-events:auto}.vs\\:pointer-events-none{pointer-events:none}.vs\\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.vs\\:absolute{position:absolute}.vs\\:fixed{position:fixed}.vs\\:relative{position:relative}.vs\\:inset-0{inset:calc(var(--vs-spacing)*0)}.vs\\:inset-y-0{inset-block:calc(var(--vs-spacing)*0)}.vs\\:right-0{right:calc(var(--vs-spacing)*0)}.vs\\:right-\\[calc\\(var\\(--partbot-font-size\\)\\*1\\.95\\)\\]{right:calc(var(--partbot-font-size)*1.95)}.vs\\:z-10{z-index:10}.vs\\:z-99999\\!{z-index:99999!important}.vs\\:m-0{margin:calc(var(--vs-spacing)*0)}.vs\\:mt-2{margin-top:calc(var(--vs-spacing)*2)}.vs\\:mt-4{margin-top:calc(var(--vs-spacing)*4)}.vs\\:mb-1{margin-bottom:calc(var(--vs-spacing)*1)}.vs\\:block{display:block}.vs\\:flex{display:flex}.vs\\:flex\\!{display:flex!important}.vs\\:grid{display:grid}.vs\\:inline-flex{display:inline-flex}.vs\\:inline-flex\\!{display:inline-flex!important}.vs\\:h-5{height:calc(var(--vs-spacing)*5)}.vs\\:h-\\[13px\\]{height:13px}.vs\\:h-\\[calc\\(var\\(--partbot-font-size\\)\\*0\\.9\\)\\]\\!{height:calc(var(--partbot-font-size)*.9)!important}.vs\\:h-full{height:100%}.vs\\:max-h-60\\!{max-height:calc(var(--vs-spacing)*60)!important}.vs\\:w-\\(--input-width\\){width:var(--input-width)}.vs\\:w-5{width:calc(var(--vs-spacing)*5)}.vs\\:w-\\[calc\\(var\\(--partbot-font-size\\)\\*0\\.9\\)\\]\\!{width:calc(var(--partbot-font-size)*.9)!important}.vs\\:w-auto\\!{width:auto!important}.vs\\:w-full{width:100%}.vs\\:w-full\\!{width:100%!important}.vs\\:shrink\\!{flex-shrink:1!important}.vs\\:shrink-0\\!{flex-shrink:0!important}.vs\\:animate-spin{animation:var(--vs-animate-spin)}.vs\\:cursor-default{cursor:default}.vs\\:cursor-pointer{cursor:pointer}.vs\\:appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.vs\\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.vs\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.vs\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.vs\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.vs\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.vs\\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.vs\\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.vs\\:flex-col{flex-direction:column}.vs\\:items-center{align-items:center}.vs\\:justify-between{justify-content:space-between}.vs\\:justify-center{justify-content:center}.vs\\:justify-end{justify-content:flex-end}.vs\\:gap-3{gap:calc(var(--vs-spacing)*3)}:where(.vs\\:space-x-1\\.5>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--vs-spacing)*1.5)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--vs-spacing)*1.5)*calc(1 - var(--tw-space-x-reverse)))}:where(.vs\\:space-x-\\[calc\\(var\\(--partbot-padding\\)\\*0\\.25\\)\\]>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--partbot-padding)*.25)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--partbot-padding)*.25)*calc(1 - var(--tw-space-x-reverse)))}.vs\\:overflow-auto{overflow:auto}.vs\\:overflow-hidden{overflow:hidden}.vs\\:rounded-\\(--partbot-button-border-radius\\){border-radius:var(--partbot-button-border-radius)}.vs\\:rounded-\\[min\\(var\\(--partbot-button-border-radius\\)\\,0\\.89rem\\)\\]{border-radius:min(var(--partbot-button-border-radius),.89rem)}.vs\\:border-none{--tw-border-style:none;border-style:none}.vs\\:bg-\\[rgb\\(var\\(--partbot-theme\\)\\)\\]{background-color:rgb(var(--partbot-theme))}.vs\\:bg-stone-900{background-color:var(--vs-color-stone-900)}.vs\\:bg-transparent{background-color:#0000}.vs\\:bg-white{background-color:var(--vs-color-white)}.vs\\:p-\\(--partbot-padding\\){padding:var(--partbot-padding)}.vs\\:p-2{padding:calc(var(--vs-spacing)*2)}.vs\\:px-1\\.5{padding-inline:calc(var(--vs-spacing)*1.5)}.vs\\:px-\\[calc\\(var\\(--partbot-padding\\)\\*1\\.3\\)\\]{padding-inline:calc(var(--partbot-padding)*1.3)}.vs\\:py-\\(--partbot-padding\\){padding-block:var(--partbot-padding)}.vs\\:py-1{padding-block:calc(var(--vs-spacing)*1)}.vs\\:pr-\\(--partbot-padding\\){padding-right:var(--partbot-padding)}.vs\\:pr-2{padding-right:calc(var(--vs-spacing)*2)}.vs\\:pr-10{padding-right:calc(var(--vs-spacing)*10)}.vs\\:pr-\\[calc\\(var\\(--partbot-padding\\)\\*1\\.3\\)\\]{padding-right:calc(var(--partbot-padding)*1.3)}.vs\\:pb-4{padding-bottom:calc(var(--vs-spacing)*4)}.vs\\:pl-\\[calc\\(var\\(--partbot-padding\\)\\*1\\.3\\)\\]{padding-left:calc(var(--partbot-padding)*1.3)}.vs\\:text-center{text-align:center}.vs\\:text-left{text-align:left}.vs\\:font-\\(family-name\\:--partbot-font-family\\){font-family:var(--partbot-font-family)}.vs\\:font-sans{font-family:var(--vs-font-sans)}.vs\\:text-base{font-size:var(--vs-text-base);line-height:var(--tw-leading,var(--vs-text-base--line-height))}.vs\\:text-\\(length\\:--partbot-font-size\\){font-size:var(--partbot-font-size)}.vs\\:text-\\[10px\\]{font-size:10px}.vs\\:leading-\\[calc\\(var\\(--partbot-font-size\\)\\*1\\.5\\)\\]{--tw-leading:calc(var(--partbot-font-size)*1.5);line-height:calc(var(--partbot-font-size)*1.5)}.vs\\:leading-none{--tw-leading:1;line-height:1}.vs\\:leading-normal{--tw-leading:var(--vs-leading-normal);line-height:var(--vs-leading-normal)}.vs\\:font-bold{--tw-font-weight:var(--vs-font-weight-bold);font-weight:var(--vs-font-weight-bold)}.vs\\:font-bold\\!{--tw-font-weight:var(--vs-font-weight-bold)!important;font-weight:var(--vs-font-weight-bold)!important}.vs\\:font-medium{--tw-font-weight:var(--vs-font-weight-medium);font-weight:var(--vs-font-weight-medium)}.vs\\:font-normal{--tw-font-weight:var(--vs-font-weight-normal);font-weight:var(--vs-font-weight-normal)}.vs\\:font-semibold{--tw-font-weight:var(--vs-font-weight-semibold);font-weight:var(--vs-font-weight-semibold)}.vs\\:whitespace-pre-wrap{white-space:pre-wrap}.vs\\:text-\\[rgb\\(var\\(--partbot-button-label-color\\)\\)\\]{color:rgb(var(--partbot-button-label-color))}.vs\\:text-\\[rgb\\(var\\(--partbot-theme\\)\\)\\]{color:rgb(var(--partbot-theme))}.vs\\:text-\\[rgb\\(var\\(--partbot-theme\\)\\)\\]\\!{color:rgb(var(--partbot-theme))!important}.vs\\:text-black{color:var(--vs-color-black)}.vs\\:text-red-300{color:var(--vs-color-red-300)}.vs\\:text-red-300\\!{color:var(--vs-color-red-300)!important}.vs\\:text-stone-400{color:var(--vs-color-stone-400)}.vs\\:text-stone-900{color:var(--vs-color-stone-900)}.vs\\:text-white{color:var(--vs-color-white)}.vs\\:no-underline{text-decoration-line:none}.vs\\:opacity-0{opacity:0}.vs\\:opacity-75{opacity:.75}.vs\\:shadow-\\(--partbot-input-shadow\\){--tw-shadow:var(--partbot-input-shadow);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.vs\\:shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.vs\\:ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.vs\\:ring-stone-200{--tw-ring-color:var(--vs-color-stone-200)}.vs\\:transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--vs-default-transition-timing-function));transition-duration:var(--tw-duration,var(--vs-default-transition-duration))}.vs\\:transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--vs-default-transition-timing-function));transition-duration:var(--tw-duration,var(--vs-default-transition-duration))}.vs\\:duration-300{--tw-duration:.3s;transition-duration:.3s}.vs\\:outline-none{--tw-outline-style:none;outline-style:none}.vs\\:placeholder\\:text-stone-600::placeholder{color:var(--vs-color-stone-600)}@media (hover:hover){.vs\\:hover\\:border-none:hover{--tw-border-style:none;border-style:none}.vs\\:hover\\:bg-theme:hover{background-color:oklch(from rgb(var(--partbot-theme))l c h/<alpha-value>)}.vs\\:hover\\:text-button-label:hover{color:oklch(from rgb(var(--partbot-button-label-color))l c h/<alpha-value>)}.vs\\:hover\\:text-red-500:hover{color:var(--vs-color-red-500)}.vs\\:hover\\:opacity-100:hover{opacity:1}.vs\\:hover\\:outline-none:hover{--tw-outline-style:none;outline-style:none}}.vs\\:focus\\:border-\\[rgb\\(var\\(--partbot-theme\\)\\)\\]:focus{border-color:rgb(var(--partbot-theme))}.vs\\:focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.vs\\:focus\\:ring-\\[rgb\\(var\\(--partbot-theme\\)\\)\\]:focus{--tw-ring-color:rgb(var(--partbot-theme))}.vs\\:focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.vs\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.vs\\:disabled\\:text-stone-400\\!:disabled{color:var(--vs-color-stone-400)!important}.vs\\:disabled\\:opacity-100\\!:disabled{opacity:1!important}.vs\\:disabled\\:placeholder\\:text-stone-400:disabled::placeholder{color:var(--vs-color-stone-400)}@media (min-width:40rem){.vs\\:sm\\:text-\\(length\\:--partbot-font-size\\){font-size:var(--partbot-font-size)}}@media (min-width:48rem){.vs\\:md\\:col-span-3{grid-column:span 3/span 3}.vs\\:md\\:mt-3{margin-top:calc(var(--vs-spacing)*3)}.vs\\:md\\:hidden{display:none}.vs\\:md\\:hidden\\!{display:none!important}.vs\\:md\\:max-w-\\[400px\\]{max-width:400px}.vs\\:md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.vs\\:md\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.vs\\:md\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.vs\\:md\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.vs\\:md\\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.vs\\:md\\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.vs\\:md\\:items-end{align-items:flex-end}.vs\\:md\\:justify-center{justify-content:center}.vs\\:md\\:justify-end{justify-content:flex-end}.vs\\:md\\:gap-5{gap:calc(var(--vs-spacing)*5)}.vs\\:md\\:pr-1\\.5{padding-right:calc(var(--vs-spacing)*1.5)}}@media (min-width:64rem){.vs\\:lg\\:col-span-1{grid-column:span 1/span 1}.vs\\:lg\\:mx-auto{margin-inline:auto}.vs\\:lg\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.vs\\:lg\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.vs\\:lg\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.vs\\:lg\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.vs\\:lg\\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.vs\\:lg\\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}}.vehicle-search-btn{cursor:pointer;justify-content:center;align-items:center;display:inline-flex;position:relative!important}:where(.vehicle-search-btn>:not(:last-child)){--tw-space-x-reverse:0!important;margin-inline-start:calc(calc(var(--vs-spacing)*2)*var(--tw-space-x-reverse))!important;margin-inline-end:calc(calc(var(--vs-spacing)*2)*calc(1 - var(--tw-space-x-reverse)))!important}.vehicle-search-btn{border-radius:var(--partbot-button-border-radius);border-style:var(--tw-border-style);background-color:rgb(var(--partbot-button-color));padding-inline:var(--partbot-padding);padding-block:var(--partbot-padding);font-family:var(--partbot-font-family);font-size:var(--partbot-font-size);--tw-leading:calc(var(--partbot-font-size)*1.5);line-height:calc(var(--partbot-font-size)*1.5);--tw-font-weight:var(--vs-font-weight-medium);font-weight:var(--vs-font-weight-medium);white-space:nowrap;color:rgb(var(--partbot-button-label-color));--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--vs-default-transition-timing-function));transition-duration:var(--tw-duration,var(--vs-default-transition-duration));border-width:1px;border-color:#0000;text-decoration-line:none}@media (hover:hover){.vehicle-search-btn:hover{background-color:rgb(var(--partbot-button-hover-color));color:rgb(var(--partbot-button-hover-label-color))}}.vehicle-search-btn:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color:rgb(var(--partbot-theme));--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-outline-style:none;outline-style:none}.vehicle-search-btn:disabled{pointer-events:none;opacity:.5}.vehicle-search-btn>*{pointer-events:none}.partbot-input-border{border-width:var(--partbot-input-border-width);border-color:rgb(var(--partbot-input-border-color));border-style:solid}}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@keyframes spin{to{transform:rotate(360deg)}}`;
14
- function $t({ className: b }) {
14
+ function St({ className: b }) {
15
15
  return /* @__PURE__ */ a("span", { className: b, children: /* @__PURE__ */ a(
16
16
  "svg",
17
17
  {
@@ -118,21 +118,21 @@ function X({
118
118
  items: v,
119
119
  selected: p,
120
120
  refine: U,
121
- showPopular: L,
121
+ showPopular: I,
122
122
  bgDark: R,
123
- sortOptions: N = !0,
123
+ sortOptions: P = !0,
124
124
  showLabel: O = !1,
125
125
  isMobile: _ = !1,
126
126
  loading: V = !1,
127
127
  shouldBeActive: T = !1
128
128
  // True when parent fields are selected and this field tried to load
129
129
  }) {
130
- const [re, u] = M(""), [y, C] = M(p || null), H = (s) => {
130
+ const [re, u] = M(""), [y, C] = M(p || null), q = (s) => {
131
131
  C(s), u(""), !(s && s.value === (p == null ? void 0 : p.value)) && U(s);
132
132
  }, ee = (s) => {
133
133
  s.preventDefault(), s.stopPropagation(), u(""), C(null), U("");
134
134
  };
135
- I(() => {
135
+ B(() => {
136
136
  u(""), C(p || null);
137
137
  }, [p, v]);
138
138
  let G = /* @__PURE__ */ new Set(), f = [];
@@ -146,7 +146,7 @@ function X({
146
146
  });
147
147
  }), f.length === 0 && (f = v));
148
148
  const D = f.filter((s) => s.popularity > 0).slice(0, 11);
149
- N && (f = f.filter(
149
+ P && (f = f.filter(
150
150
  (s) => !D.includes(s)
151
151
  ), f.sort(
152
152
  (s, F) => s.value.localeCompare(F.value, "en", { numeric: !0 })
@@ -168,7 +168,7 @@ function X({
168
168
  const F = f.find(
169
169
  (z) => z.value.toString() === s.target.value.toString()
170
170
  );
171
- F && H(F);
171
+ F && q(F);
172
172
  },
173
173
  className: "vehicle-search-select vs:relative vs:w-full vs:cursor-default vs:overflow-hidden vs:rounded-(--partbot-button-border-radius) partbot-input-border vs:bg-white vs:py-(--partbot-padding) vs:pl-[calc(var(--partbot-padding)*1.3)] vs:pr-10 vs:text-left vs:shadow-(--partbot-input-shadow) vs:focus:border-[rgb(var(--partbot-theme))] vs:focus:outline-none vs:focus:ring-1 vs:focus:ring-[rgb(var(--partbot-theme))] vs:disabled:opacity-100! vs:disabled:text-stone-400! vs:sm:text-(length:--partbot-font-size) vs:font-(family-name:--partbot-font-family) vs:text-(length:--partbot-font-size) vs:leading-[calc(var(--partbot-font-size)*1.5)]",
174
174
  tabIndex: -1,
@@ -213,7 +213,7 @@ function X({
213
213
  gt,
214
214
  {
215
215
  value: y || null,
216
- onChange: H,
216
+ onChange: q,
217
217
  virtual: { options: f },
218
218
  disabled: g,
219
219
  immediate: !0,
@@ -328,23 +328,23 @@ function X({
328
328
  )
329
329
  ] });
330
330
  }
331
- const St = "3.0.14";
331
+ const $t = "3.0.17";
332
332
  console.info(
333
- `Vehicle Search v${St} powered by Partbot https://mmyvs.partbot.io`
333
+ `Vehicle Search v${$t} powered by Partbot https://mmyvs.partbot.io`
334
334
  );
335
- function ze(b = [], v = []) {
335
+ function Se(b = [], v = []) {
336
336
  const p = [];
337
337
  return b.forEach((U) => {
338
- const [L, ...R] = U.split(":"), N = R.join(":");
339
- if (N.includes(" > ")) {
340
- const O = N.split(" > "), _ = O[O.length - 1].trim();
341
- if (L !== "make" && O.length >= 2) {
338
+ const [I, ...R] = U.split(":"), P = R.join(":");
339
+ if (P.includes(" > ")) {
340
+ const O = P.split(" > "), _ = O[O.length - 1].trim();
341
+ if (I !== "make" && O.length >= 2) {
342
342
  const V = O[0].trim();
343
343
  p.push(`make = "${V}"`);
344
344
  }
345
- p.push(`${L} = "${_}"`);
345
+ p.push(`${I} = "${_}"`);
346
346
  } else
347
- p.push(`${L} = "${N}"`);
347
+ p.push(`${I} = "${P}"`);
348
348
  }), v.forEach((U) => {
349
349
  p.push(U);
350
350
  }), p.length > 0 ? p.join(" AND ") : null;
@@ -354,9 +354,9 @@ function Mt({
354
354
  makes: v = "",
355
355
  models: p = "",
356
356
  callbackUrl: U = "",
357
- layout: L = "row",
357
+ layout: I = "row",
358
358
  fields: R,
359
- fieldPrefix: N = "",
359
+ fieldPrefix: P = "",
360
360
  showBranding: O = !0,
361
361
  showLabels: _ = !1,
362
362
  mobileFullWidthButton: V = !0,
@@ -365,7 +365,7 @@ function Mt({
365
365
  onChange: u,
366
366
  buttonLabel: y = "Search",
367
367
  showButton: C = !0,
368
- onSubmit: H,
368
+ onSubmit: q,
369
369
  store: ee,
370
370
  useStoreVehicles: G = !0,
371
371
  fieldOrder: f = "MMY",
@@ -377,7 +377,7 @@ function Mt({
377
377
  mobileButtonLabel: s = "Select Vehicle"
378
378
  // Label for mobile drawer trigger button
379
379
  }) {
380
- const F = Z(null), z = Z(null), ie = Z(null), $ = Z(null), q = Z(null), E = Z(null), K = Z(null), w = Z(null), Q = Z(null), B = Z(!1), x = f === "YMM", [le, ve] = M([]), [fe, ce] = M([]), [de, he] = M([]), [Ie, ge] = M([]), [Le, be] = M([]), [Ve, we] = M([]), [De, ye] = M([]), [Fe, xe] = M([]), Je = Z([]), [se, Se] = M([]), [e, W] = M({
380
+ const F = Z(null), z = Z(null), ie = Z(null), S = Z(null), K = Z(null), E = Z(null), Q = Z(null), w = Z(null), W = Z(null), j = Z(!1), x = f === "YMM", [le, ve] = M([]), [fe, ce] = M([]), [de, he] = M([]), [Le, ge] = M([]), [Ie, be] = M([]), [Ve, we] = M([]), [De, ye] = M([]), [Fe, xe] = M([]), Je = Z([]), [se, ke] = M([]), [e, Y] = M({
381
381
  make: null,
382
382
  model: null,
383
383
  year: null,
@@ -392,13 +392,13 @@ function Mt({
392
392
  "variant",
393
393
  "engine",
394
394
  "engine_capacity"
395
- ]), ke = Z(
395
+ ]), Ce = Z(
396
396
  R && R.length && Ue.current ? R.split(",").filter((t) => {
397
397
  var r;
398
398
  return (r = Ue.current) == null ? void 0 : r.includes(t);
399
399
  }) : null
400
400
  ), [J, Ge] = M(!1);
401
- I(() => {
401
+ B(() => {
402
402
  const t = navigator.userAgent;
403
403
  Ge(
404
404
  /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
@@ -412,7 +412,7 @@ function Mt({
412
412
  disable_session_recording: !1
413
413
  });
414
414
  }, []);
415
- const [oe, et] = M({}), [Nt, tt] = M(""), Re = j(async () => {
415
+ const [oe, et] = M({}), [Nt, tt] = M(""), Re = N(async () => {
416
416
  if (!b)
417
417
  return;
418
418
  const r = `${D ? "https://api.cartbot.io" : "https://api.partbot.io"}/v1/vehicles/auth`;
@@ -439,7 +439,7 @@ function Mt({
439
439
  vehicle_models: n,
440
440
  meilisearch_search_key: c,
441
441
  meilisearch_index_name: d,
442
- algolia_search_key: S,
442
+ algolia_search_key: $,
443
443
  // Fallback for backward compatibility
444
444
  algolia_index_name: te,
445
445
  // Fallback for backward compatibility
@@ -452,7 +452,7 @@ function Mt({
452
452
  z.current = o, ie.current = (l || []).map((m) => ({
453
453
  ...m,
454
454
  refinement: m.value
455
- })), G && n ? typeof n == "object" && !Array.isArray(n) ? $.current = n : Array.isArray(n) ? $.current = n.map((m) => m && m.value ? String(m.value).trim() : "").filter(Boolean) : $.current = [] : $.current = [], q.current = Array.isArray(ae) ? ae.map((m) => String(m).trim().toUpperCase()) : null, E.current = h || null, et({
455
+ })), G && n ? typeof n == "object" && !Array.isArray(n) ? S.current = n : Array.isArray(n) ? S.current = n.map((m) => m && m.value ? String(m.value).trim() : "").filter(Boolean) : S.current = [] : S.current = [], K.current = Array.isArray(ae) ? ae.map((m) => String(m).trim().toUpperCase()) : null, E.current = h || null, et({
456
456
  searchKey: "eeace38b64f52bf56ebb4fe8bd5837b3cd6c0ff9d7e272f76449d94b80cba86b",
457
457
  indexName: "otto_v1_vehicles_production"
458
458
  });
@@ -460,30 +460,30 @@ function Mt({
460
460
  console.error("[VehicleSearch] Auth failed:", i), tt(i);
461
461
  }
462
462
  }, [b, ee, G, D]);
463
- I(() => {
463
+ B(() => {
464
464
  Re();
465
- }, [Re]), I(() => {
465
+ }, [Re]), B(() => {
466
466
  if (oe.searchKey) {
467
467
  try {
468
- K.current = new Qe({
468
+ Q.current = new Qe({
469
469
  host: "https://search.partbot.io",
470
470
  apiKey: oe.searchKey
471
- }), w.current = K.current.index(oe.indexName);
471
+ }), w.current = Q.current.index(oe.indexName);
472
472
  const t = new Qe({
473
473
  host: "https://partbot-meilisearch-cache.partbot.workers.dev",
474
474
  // Cloudflare Worker endpoint
475
475
  apiKey: oe.searchKey
476
476
  });
477
- Q.current = t.index("otto_v1_vehicle_mmy");
477
+ W.current = t.index("otto_v1_vehicle_mmy");
478
478
  } catch (t) {
479
479
  console.error("[VehicleSearch] Failed to initialize Meilisearch:", t);
480
480
  }
481
481
  return () => {
482
- K.current = null;
482
+ Q.current = null;
483
483
  };
484
484
  }
485
485
  }, [oe.searchKey, b]);
486
- const [Y, rt] = M(!1), Oe = j(() => {
486
+ const [H, rt] = M(!1), Oe = N(() => {
487
487
  function t(n) {
488
488
  if (!n) return "rgba(0,0,0,1)";
489
489
  var c = r(), d = window.getComputedStyle(n).backgroundColor;
@@ -501,7 +501,7 @@ function Mt({
501
501
  const l = _t(o).isDark();
502
502
  rt(l);
503
503
  }, []);
504
- I(() => {
504
+ B(() => {
505
505
  async function t() {
506
506
  if (!e.make || !w.current)
507
507
  return;
@@ -517,15 +517,15 @@ function Mt({
517
517
  `engine_capacity:${e.engine_capacity.refinement}`
518
518
  );
519
519
  let l = (await w.current.search("", {
520
- filter: ze(r, i),
520
+ filter: Se(r, i),
521
521
  attributesToRetrieve: ["otto_id"],
522
522
  limit: 500
523
523
  // Reduced from 1000 for faster queries
524
524
  })).hits.map((d) => d.otto_id);
525
- Se(l);
525
+ ke(l);
526
526
  let c = {
527
527
  ...Object.fromEntries(
528
- Object.entries(e || {}).map(([d, S]) => [d, S && S.value || null]).filter(([d, S]) => S !== null)
528
+ Object.entries(e || {}).map(([d, $]) => [d, $ && $.value || null]).filter(([d, $]) => $ !== null)
529
529
  ),
530
530
  merchant: z.current
531
531
  };
@@ -533,7 +533,7 @@ function Mt({
533
533
  }
534
534
  t();
535
535
  }, [e, w, g]);
536
- const Ae = (t) => N ? `${N}${t}` : t, ot = (t) => N ? t.replace(new RegExp(`^${N}`), "") : t, at = j(() => {
536
+ const Ae = (t) => P ? `${P}${t}` : t, ot = (t) => P ? t.replace(new RegExp(`^${P}`), "") : t, at = N(() => {
537
537
  const t = new URL(window.location.href).searchParams, r = [
538
538
  "make",
539
539
  "model",
@@ -545,8 +545,8 @@ function Mt({
545
545
  ].map(Ae), i = Object.fromEntries(
546
546
  [...t.entries()].filter(([o]) => r.includes(o)).map(([o, l]) => [ot(o), { value: l, refinement: l }])
547
547
  );
548
- W(i);
549
- }, []), P = j(({ query: t, value: r, remove: i }) => {
548
+ Y(i);
549
+ }, []), L = N(({ query: t, value: r, remove: i }) => {
550
550
  if (re && "URLSearchParams" in window) {
551
551
  let o = new URLSearchParams(window.location.search);
552
552
  t = Ae(t), t && r && o.set(t, r), t && !r && o.delete(t), i && i.forEach((n) => {
@@ -555,32 +555,35 @@ function Mt({
555
555
  const l = window.location.pathname + "?" + o.toString();
556
556
  window.history.pushState(null, "", l);
557
557
  }
558
- }, []), nt = j(() => {
558
+ }, []), nt = N(() => {
559
559
  var i;
560
560
  const t = {
561
561
  vehicle_ids: se,
562
562
  vehicle: (i = e == null ? void 0 : e.make) != null && i.value ? e : {}
563
563
  };
564
- H && H(t);
564
+ q && q(t);
565
565
  const r = new CustomEvent("vehicle-search-submit", {
566
566
  detail: t
567
567
  });
568
568
  document.dispatchEvent(r), setTimeout(() => {
569
569
  Me(!1);
570
570
  }, 900);
571
- }, [se, H]), Te = j(() => {
572
- var i, o, l, n, c, d, S, te, pe;
571
+ }, [se, q]), Te = N(() => {
572
+ var i, o, l, n, c, d, $, te, pe;
573
573
  const t = {
574
574
  vehicle_ids: se,
575
- vehicle: (i = e == null ? void 0 : e.make) != null && i.value ? e : {}
575
+ vehicle: (i = e == null ? void 0 : e.make) != null && i.value ? e : {},
576
+ userSelected: j.current
577
+ // Flag to indicate if user actively selected
576
578
  };
577
579
  u && u(t);
578
580
  const r = new CustomEvent("vehicle-search-change", {
579
581
  detail: t
580
582
  });
581
- if (B.current === !0 && !localStorage.getItem("partbot_plate_details")) {
583
+ if (j.current === !0) {
584
+ localStorage.removeItem("partbot_plate_details");
582
585
  const ae = JSON.stringify({
583
- description: `${((o = e.make) == null ? void 0 : o.value) || ""} ${((l = e.model) == null ? void 0 : l.value) || ""} ${((n = e.year) == null ? void 0 : n.value) || ""} ${((c = e.body) == null ? void 0 : c.value) || ""} ${((d = e.series) == null ? void 0 : d.value) || ""} ${((S = e.variant) == null ? void 0 : S.value) || ""} ${((te = e.engine) == null ? void 0 : te.value) || ""} ${((pe = e.engine_capacity) == null ? void 0 : pe.value) || ""}`.trim(),
586
+ description: `${((o = e.make) == null ? void 0 : o.value) || ""} ${((l = e.model) == null ? void 0 : l.value) || ""} ${((n = e.year) == null ? void 0 : n.value) || ""} ${((c = e.body) == null ? void 0 : c.value) || ""} ${((d = e.series) == null ? void 0 : d.value) || ""} ${(($ = e.variant) == null ? void 0 : $.value) || ""} ${((te = e.engine) == null ? void 0 : te.value) || ""} ${((pe = e.engine_capacity) == null ? void 0 : pe.value) || ""}`.trim(),
584
587
  vehicle_ids: se,
585
588
  vehicle: e ? Object.entries(e).reduce((h, [m, k]) => (h[m] = k != null && k.value ? k.value : {}, h), {}) : {}
586
589
  });
@@ -594,17 +597,36 @@ function Mt({
594
597
  document.dispatchEvent(r), Je.current = se, setTimeout(() => {
595
598
  Me(!1);
596
599
  }, 900);
597
- }, [se, u]), Ce = ut(
600
+ }, [se, u]), _e = ut(
598
601
  () => Ct(Te, 100),
599
602
  [Te]
600
603
  );
601
- I(() => {
602
- Ce();
603
- }, [se, Ce]), I(() => () => {
604
- Ce.cancel();
605
- }, [Ce]), I(() => {
604
+ B(() => {
605
+ _e();
606
+ }, [se, _e]), B(() => () => {
607
+ _e.cancel();
608
+ }, [_e]), B(() => {
609
+ const t = () => {
610
+ Y({
611
+ make: null,
612
+ model: null,
613
+ year: null,
614
+ body: null,
615
+ series: null,
616
+ variant: null,
617
+ engine: null,
618
+ engine_capacity: null
619
+ }), ke([]);
620
+ };
621
+ return document.addEventListener("plate-search-change", t), () => {
622
+ document.removeEventListener(
623
+ "plate-search-change",
624
+ t
625
+ );
626
+ };
627
+ }, []), B(() => {
606
628
  oe.searchKey && (x || pt(), at());
607
- }, [oe.searchKey, x]), I(() => {
629
+ }, [oe.searchKey, x]), B(() => {
608
630
  x && w.current && de.length === 0 && !e.year && w.current.search("", {
609
631
  attributesToRetrieve: ["year_from", "year_to"],
610
632
  limit: 1e4
@@ -617,15 +639,15 @@ function Mt({
617
639
  }).catch((t) => {
618
640
  console.error("[VehicleSearch] Error loading year range:", t);
619
641
  });
620
- }, [x, oe.searchKey, de.length, e.year]), I(() => {
642
+ }, [x, oe.searchKey, de.length, e.year]), B(() => {
621
643
  typeof document > "u" || Oe();
622
644
  }, [Oe]);
623
- const Ze = j(
645
+ const Ze = N(
624
646
  (t) => {
625
- B.current = !0, ce([]), !x && !g && he([]), ge([]), be([]), we([]), xe([]), ye([]), W((r) => ({
647
+ j.current = !0, ce([]), !x && !g && he([]), ge([]), be([]), we([]), xe([]), ye([]), Y((r) => ({
626
648
  make: t,
627
649
  year: x || g ? r.year : null
628
- })), P({
650
+ })), L({
629
651
  query: "make",
630
652
  value: (t == null ? void 0 : t.value) ?? "",
631
653
  remove: x ? ["model", "body", "series", "engine", "variant", "engine_capacity"] : g ? [
@@ -644,12 +666,12 @@ function Mt({
644
666
  "variant",
645
667
  "engine_capacity"
646
668
  ]
647
- }), t || Se([]);
669
+ }), t || ke([]);
648
670
  },
649
- [P, x, g]
650
- ), Ye = j(
671
+ [L, x, g]
672
+ ), Ye = N(
651
673
  (t) => {
652
- B.current = !0, W((r) => ({
674
+ j.current = !0, Y((r) => ({
653
675
  ...r,
654
676
  model: t !== "" ? t : null,
655
677
  year: x || g ? r.year : null,
@@ -659,7 +681,7 @@ function Mt({
659
681
  variant: null,
660
682
  engine: null,
661
683
  engine_capacity: null
662
- })), !x && !g && he([]), ge([]), be([]), we([]), xe([]), ye([]), P({
684
+ })), !x && !g && he([]), ge([]), be([]), we([]), xe([]), ye([]), L({
663
685
  query: "model",
664
686
  value: (t == null ? void 0 : t.value) ?? "",
665
687
  remove: x ? ["body", "series", "engine", "variant", "engine_capacity"] : g ? ["body", "series", "engine", "variant", "engine_capacity"] : [
@@ -672,12 +694,12 @@ function Mt({
672
694
  ]
673
695
  });
674
696
  },
675
- [P, x, g]
676
- ), He = j(
697
+ [L, x, g]
698
+ ), He = N(
677
699
  (t) => {
678
- B.current = !0, x ? (ve([]), ce([]), W({
700
+ j.current = !0, x ? (ve([]), ce([]), Y({
679
701
  year: t !== "" ? t : null
680
- }), (!t || t === "") && he([])) : W(g ? (r) => ({
702
+ }), (!t || t === "") && he([])) : Y(g ? (r) => ({
681
703
  ...r,
682
704
  year: t !== "" ? t : null
683
705
  }) : (r) => ({
@@ -688,7 +710,7 @@ function Mt({
688
710
  variant: null,
689
711
  engine: null,
690
712
  engine_capacity: null
691
- })), g || (ge([]), be([]), we([]), xe([]), ye([])), P({
713
+ })), g || (ge([]), be([]), we([]), xe([]), ye([])), L({
692
714
  query: "year",
693
715
  value: (t == null ? void 0 : t.value) ?? "",
694
716
  remove: x ? [
@@ -700,66 +722,66 @@ function Mt({
700
722
  "engine",
701
723
  "engine_capacity"
702
724
  ] : g ? [] : ["body", "series", "variant", "engine", "engine_capacity"]
703
- }), !g && (!t || t === "") && Se([]);
725
+ }), !g && (!t || t === "") && ke([]);
704
726
  },
705
- [P, x, g]
706
- ), it = j(
727
+ [L, x, g]
728
+ ), it = N(
707
729
  (t) => {
708
- B.current = !0, W((r) => ({
730
+ j.current = !0, Y((r) => ({
709
731
  ...r,
710
732
  body: t !== "" ? t : null
711
- })), P({
733
+ })), L({
712
734
  query: "body",
713
735
  value: (t == null ? void 0 : t.value) ?? ""
714
736
  });
715
737
  },
716
- [P]
717
- ), st = j(
738
+ [L]
739
+ ), st = N(
718
740
  (t) => {
719
- B.current = !0, W((r) => ({
741
+ j.current = !0, Y((r) => ({
720
742
  ...r,
721
743
  series: t !== "" ? t : null
722
- })), P({
744
+ })), L({
723
745
  query: "series",
724
746
  value: (t == null ? void 0 : t.value) ?? ""
725
747
  });
726
748
  },
727
- [P]
728
- ), lt = j(
749
+ [L]
750
+ ), lt = N(
729
751
  (t) => {
730
- B.current = !0, W((r) => ({
752
+ j.current = !0, Y((r) => ({
731
753
  ...r,
732
754
  variant: t !== "" ? t : null
733
- })), P({
755
+ })), L({
734
756
  query: "variant",
735
757
  value: (t == null ? void 0 : t.value) ?? ""
736
758
  });
737
759
  },
738
- [P]
739
- ), ct = j(
760
+ [L]
761
+ ), ct = N(
740
762
  (t) => {
741
- B.current = !0, W((r) => ({
763
+ j.current = !0, Y((r) => ({
742
764
  ...r,
743
765
  engine: t !== "" ? t : null
744
- })), P({
766
+ })), L({
745
767
  query: "engine",
746
768
  value: (t == null ? void 0 : t.value) ?? ""
747
769
  });
748
770
  },
749
- [P]
750
- ), dt = j(
771
+ [L]
772
+ ), dt = N(
751
773
  (t) => {
752
- B.current = !0, W((r) => ({
774
+ j.current = !0, Y((r) => ({
753
775
  ...r,
754
776
  engine_capacity: t !== "" ? t : null
755
- })), P({
777
+ })), L({
756
778
  query: "engine_capacity",
757
779
  value: (t == null ? void 0 : t.value) ?? ""
758
780
  });
759
781
  },
760
- [P]
782
+ [L]
761
783
  );
762
- I(() => {
784
+ B(() => {
763
785
  x && e.year && w.current && (async () => {
764
786
  try {
765
787
  const r = await w.current.search("", {
@@ -775,10 +797,10 @@ function Mt({
775
797
  });
776
798
  });
777
799
  let o = Array.from(i.values());
778
- const l = new Set(q.current || []);
800
+ const l = new Set(K.current || []);
779
801
  l.size > 0 ? o.sort((n, c) => {
780
- const d = l.has(n.value), S = l.has(c.value);
781
- return d && !S ? -1 : !d && S ? 1 : d && S ? q.current.indexOf(n.value) - q.current.indexOf(c.value) : n.value.localeCompare(c.value);
802
+ const d = l.has(n.value), $ = l.has(c.value);
803
+ return d && !$ ? -1 : !d && $ ? 1 : d && $ ? K.current.indexOf(n.value) - K.current.indexOf(c.value) : n.value.localeCompare(c.value);
782
804
  }) : o.sort(
783
805
  (n, c) => c.popularity === n.popularity ? n.value.localeCompare(c.value) : c.popularity - n.popularity
784
806
  ), ve(o);
@@ -787,7 +809,7 @@ function Mt({
787
809
  }
788
810
  })();
789
811
  }, [x, e.year]);
790
- const pt = j(() => {
812
+ const pt = N(() => {
791
813
  (async () => {
792
814
  let r = [];
793
815
  if (ie.current && ie.current.length)
@@ -814,23 +836,23 @@ function Mt({
814
836
  (o) => i.includes(o.value)
815
837
  );
816
838
  }
817
- if (q.current && q.current.length > 0) {
818
- const i = new Set(q.current);
839
+ if (K.current && K.current.length > 0) {
840
+ const i = new Set(K.current);
819
841
  r.sort((o, l) => {
820
842
  const n = i.has(o.value), c = i.has(l.value);
821
- return n && !c ? -1 : !n && c ? 1 : n && c ? q.current.indexOf(o.value) - q.current.indexOf(l.value) : o.value.localeCompare(l.value);
843
+ return n && !c ? -1 : !n && c ? 1 : n && c ? K.current.indexOf(o.value) - K.current.indexOf(l.value) : o.value.localeCompare(l.value);
822
844
  });
823
845
  } else
824
846
  r.sort((i, o) => i.popularity === o.popularity ? i.value.localeCompare(o.value) : o.popularity - i.popularity);
825
847
  ve(r);
826
848
  })();
827
849
  }, [v]);
828
- I(() => {
850
+ B(() => {
829
851
  var t;
830
852
  if (e.make && e.make.refinement) {
831
853
  const r = e.make.refinement;
832
- if (G && typeof $.current == "object" && !Array.isArray($.current) && $.current[r]) {
833
- const i = $.current[r].map(
854
+ if (G && typeof S.current == "object" && !Array.isArray(S.current) && S.current[r]) {
855
+ const i = S.current[r].map(
834
856
  (l) => ({
835
857
  value: l,
836
858
  refinement: l,
@@ -846,17 +868,17 @@ function Mt({
846
868
  ])
847
869
  );
848
870
  i.sort((n, c) => {
849
- const d = l.get(n.value.toUpperCase()) || 0, S = l.get(c.value.toUpperCase()) || 0;
850
- return d !== S ? S - d : n.value.localeCompare(c.value);
871
+ const d = l.get(n.value.toUpperCase()) || 0, $ = l.get(c.value.toUpperCase()) || 0;
872
+ return d !== $ ? $ - d : n.value.localeCompare(c.value);
851
873
  });
852
874
  } else
853
875
  i.sort((l, n) => l.value.localeCompare(n.value));
854
876
  ce(i);
855
877
  return;
856
878
  }
857
- if (!Q.current || !b)
879
+ if (!W.current || !b)
858
880
  return;
859
- Q.current.search("", {
881
+ W.current.search("", {
860
882
  filter: `make = "${e.make.refinement}"`,
861
883
  limit: 1
862
884
  // Only one document per make
@@ -869,7 +891,7 @@ function Mt({
869
891
  model: `${e.make.refinement} > ${h.name}`,
870
892
  model_popularity: h.popularity || 0
871
893
  })), c = [];
872
- Array.isArray($.current) ? c = $.current : typeof $.current == "object" && $.current !== null ? c = $.current[e.make.refinement] || [] : typeof $.current == "string" && $.current.length && (c = $.current.split(",").map((h) => h.trim()).filter(Boolean));
894
+ Array.isArray(S.current) ? c = S.current : typeof S.current == "object" && S.current !== null ? c = S.current[e.make.refinement] || [] : typeof S.current == "string" && S.current.length && (c = S.current.split(",").map((h) => h.trim()).filter(Boolean));
873
895
  let d = c;
874
896
  if (p) {
875
897
  const h = p.trim().split(",").map((k) => k.trim()).filter(Boolean), m = new Set(
@@ -902,7 +924,7 @@ function Mt({
902
924
  refinement: h.model.match(/[^>]*$/)[0].trim(),
903
925
  popularity: h.model_popularity
904
926
  }));
905
- const S = (pe = e.make) == null ? void 0 : pe.refinement, te = (ae = E.current) == null ? void 0 : ae[S];
927
+ const $ = (pe = e.make) == null ? void 0 : pe.refinement, te = (ae = E.current) == null ? void 0 : ae[$];
906
928
  if (te && Array.isArray(te) && te.length > 0) {
907
929
  const h = new Set(
908
930
  te.map((m) => String(m).trim().toUpperCase())
@@ -934,7 +956,7 @@ function Mt({
934
956
  x,
935
957
  e.year,
936
958
  G
937
- ]), I(() => {
959
+ ]), B(() => {
938
960
  if (w.current && e.make && e.model) {
939
961
  let t = [
940
962
  `model:${e.make.refinement} > ${e.model.refinement}`
@@ -944,7 +966,7 @@ function Mt({
944
966
  ), e.series && t.push(`series:${e.series.refinement}`), e.engine && t.push(`engine:${e.engine.refinement}`), e.engine_capacity && t.push(
945
967
  `engine_capacity:${e.engine_capacity.refinement}`
946
968
  )), w.current.search("", {
947
- filter: ze(t, []),
969
+ filter: Se(t, []),
948
970
  attributesToRetrieve: ["year_from", "year_to", "otto_id"],
949
971
  limit: 200
950
972
  // Reduced from 1000 for faster queries
@@ -952,8 +974,8 @@ function Mt({
952
974
  const i = r.map((d) => d.year_from), o = Math.min(...i), l = r.map((d) => d.year_to), n = Math.max(...l);
953
975
  let c = Array.apply(null, {
954
976
  length: n + 1 - o
955
- }).map(function(d, S) {
956
- return S + o;
977
+ }).map(function(d, $) {
978
+ return $ + o;
957
979
  });
958
980
  c = c.reverse().map((d) => ({ value: d, refinement: d })), he(c);
959
981
  }).catch((r) => {
@@ -969,7 +991,7 @@ function Mt({
969
991
  e.series,
970
992
  e.engine,
971
993
  e.engine_capacity
972
- ]), I(() => {
994
+ ]), B(() => {
973
995
  const t = g ? e.make && e.model : e.year && e.make && e.model;
974
996
  if (w.current && t) {
975
997
  const r = e.year ? [
@@ -977,7 +999,7 @@ function Mt({
977
999
  `year_to >= ${e.year.value}`
978
1000
  ] : [];
979
1001
  w.current.search("", {
980
- filter: ze(
1002
+ filter: Se(
981
1003
  [`model:${e.make.refinement} > ${e.model.refinement}`],
982
1004
  r
983
1005
  ),
@@ -991,7 +1013,7 @@ function Mt({
991
1013
  });
992
1014
  }
993
1015
  }, [e.year, e.make, e.model, g]);
994
- const ue = j(({ hits: t, attribute: r, stateCallback: i }) => {
1016
+ const ue = N(({ hits: t, attribute: r, stateCallback: i }) => {
995
1017
  let o = [
996
1018
  ...new Map(t.map((l) => [l[r], l])).values()
997
1019
  ].map((l) => ({
@@ -999,11 +1021,11 @@ function Mt({
999
1021
  refinement: l[r].match(/[^|]*$/)[0].trim()
1000
1022
  })).filter((l) => l.refinement);
1001
1023
  i(o);
1002
- }, []), vt = j(() => {
1003
- const t = ke.current ? ke.current.length + 3 : 3, r = C ? t + 1 : t;
1024
+ }, []), vt = N(() => {
1025
+ const t = Ce.current ? Ce.current.length + 3 : 3, r = C ? t + 1 : t;
1004
1026
  return `vs:lg:grid-cols-${r > 8 ? 8 : r}`;
1005
1027
  }, [C]);
1006
- I(() => {
1028
+ B(() => {
1007
1029
  const t = g ? e.make && e.model : e.make && e.model && e.year;
1008
1030
  if (w.current && t) {
1009
1031
  let r = [
@@ -1020,7 +1042,7 @@ function Mt({
1020
1042
  `year_to >= ${e.year.value}`
1021
1043
  ] : [];
1022
1044
  w.current.search("", {
1023
- filter: ze(r, i),
1045
+ filter: Se(r, i),
1024
1046
  attributesToRetrieve: [
1025
1047
  "series",
1026
1048
  "engine_capacity",
@@ -1062,13 +1084,13 @@ function Mt({
1062
1084
  e.year,
1063
1085
  g
1064
1086
  ]);
1065
- const [_e, Ee] = M(!1);
1066
- return I(() => {
1087
+ const [ze, Ee] = M(!1);
1088
+ return B(() => {
1067
1089
  if (T)
1068
- return _e ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
1090
+ return ze ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
1069
1091
  document.body.style.overflow = "";
1070
1092
  };
1071
- }, [_e, T]), /* @__PURE__ */ A($e, { children: [
1093
+ }, [ze, T]), /* @__PURE__ */ A($e, { children: [
1072
1094
  T && /* @__PURE__ */ a(
1073
1095
  "button",
1074
1096
  {
@@ -1087,7 +1109,7 @@ function Mt({
1087
1109
  onClick: () => Ee(!1),
1088
1110
  className: ne(
1089
1111
  "vs:z-10 vs:fixed vs:inset-0 vs:bg-stone-900 vs:transition-all vs:duration-300",
1090
- _e ? "vs:opacity-75" : "vs:pointer-events-none vs:opacity-0"
1112
+ ze ? "vs:opacity-75" : "vs:pointer-events-none vs:opacity-0"
1091
1113
  )
1092
1114
  }
1093
1115
  ),
@@ -1096,7 +1118,7 @@ function Mt({
1096
1118
  {
1097
1119
  className: ne(
1098
1120
  "partbot-mmyvs-container",
1099
- T && _e && "active",
1121
+ T && ze && "active",
1100
1122
  "w-full"
1101
1123
  ),
1102
1124
  children: [
@@ -1130,7 +1152,7 @@ function Mt({
1130
1152
  ref: F,
1131
1153
  className: ne(
1132
1154
  "vs:grid vs:gap-3",
1133
- L === "row" ? `${vt()} vs:grid-cols-1 vs:md:grid-cols-3` : "vs:grid-cols-1 vs:md:max-w-[400px] vs:md:gap-5",
1155
+ I === "row" ? `${vt()} vs:grid-cols-1 vs:md:grid-cols-3` : "vs:grid-cols-1 vs:md:max-w-[400px] vs:md:gap-5",
1134
1156
  "vs:w-full vs:transition vs:lg:mx-auto"
1135
1157
  ),
1136
1158
  children: [
@@ -1142,7 +1164,7 @@ function Mt({
1142
1164
  items: de,
1143
1165
  refine: He,
1144
1166
  selected: e.year,
1145
- bgDark: Y,
1167
+ bgDark: H,
1146
1168
  showLabel: _,
1147
1169
  isMobile: J,
1148
1170
  sortOptions: !1,
@@ -1158,7 +1180,7 @@ function Mt({
1158
1180
  refine: Ze,
1159
1181
  selected: e.make,
1160
1182
  showPopular: !0,
1161
- bgDark: Y,
1183
+ bgDark: H,
1162
1184
  showLabel: _,
1163
1185
  isMobile: J,
1164
1186
  sortOptions: !1,
@@ -1174,7 +1196,7 @@ function Mt({
1174
1196
  refine: Ye,
1175
1197
  selected: e.model,
1176
1198
  showPopular: !0,
1177
- bgDark: Y,
1199
+ bgDark: H,
1178
1200
  showLabel: _,
1179
1201
  isMobile: J,
1180
1202
  sortOptions: !1,
@@ -1191,7 +1213,7 @@ function Mt({
1191
1213
  refine: Ze,
1192
1214
  selected: e.make,
1193
1215
  showPopular: !0,
1194
- bgDark: Y,
1216
+ bgDark: H,
1195
1217
  showLabel: _,
1196
1218
  isMobile: J,
1197
1219
  sortOptions: !1,
@@ -1207,7 +1229,7 @@ function Mt({
1207
1229
  refine: Ye,
1208
1230
  selected: e.model,
1209
1231
  showPopular: !0,
1210
- bgDark: Y,
1232
+ bgDark: H,
1211
1233
  showLabel: _,
1212
1234
  isMobile: J,
1213
1235
  sortOptions: !1,
@@ -1222,7 +1244,7 @@ function Mt({
1222
1244
  items: de,
1223
1245
  refine: He,
1224
1246
  selected: e.year,
1225
- bgDark: Y,
1247
+ bgDark: H,
1226
1248
  showLabel: _,
1227
1249
  isMobile: J,
1228
1250
  sortOptions: !1,
@@ -1231,7 +1253,7 @@ function Mt({
1231
1253
  }
1232
1254
  )
1233
1255
  ] }),
1234
- ke.current && ke.current.map((t) => {
1256
+ Ce.current && Ce.current.map((t) => {
1235
1257
  let r = null;
1236
1258
  switch (t) {
1237
1259
  case "body":
@@ -1239,13 +1261,13 @@ function Mt({
1239
1261
  X,
1240
1262
  {
1241
1263
  label: "Body",
1242
- items: Ie,
1264
+ items: Le,
1243
1265
  refine: it,
1244
1266
  selected: e.body,
1245
- bgDark: Y,
1267
+ bgDark: H,
1246
1268
  showLabel: _,
1247
1269
  isMobile: J,
1248
- loading: !!(e.make && e.model && e.year) && Ie.length === 0,
1270
+ loading: !!(e.make && e.model && e.year) && Le.length === 0,
1249
1271
  shouldBeActive: !!(e.make && e.model && e.year)
1250
1272
  },
1251
1273
  "body"
@@ -1256,13 +1278,13 @@ function Mt({
1256
1278
  X,
1257
1279
  {
1258
1280
  label: "Series",
1259
- items: Le,
1281
+ items: Ie,
1260
1282
  refine: st,
1261
1283
  selected: e.series,
1262
- bgDark: Y,
1284
+ bgDark: H,
1263
1285
  showLabel: _,
1264
1286
  isMobile: J,
1265
- loading: !!(e.make && e.model && e.year) && Le.length === 0,
1287
+ loading: !!(e.make && e.model && e.year) && Ie.length === 0,
1266
1288
  shouldBeActive: !!(e.make && e.model && e.year)
1267
1289
  },
1268
1290
  "series"
@@ -1276,7 +1298,7 @@ function Mt({
1276
1298
  items: Ve,
1277
1299
  refine: lt,
1278
1300
  selected: e.variant,
1279
- bgDark: Y,
1301
+ bgDark: H,
1280
1302
  showLabel: _,
1281
1303
  isMobile: J,
1282
1304
  loading: !!(e.make && e.model && e.year) && Ve.length === 0,
@@ -1293,7 +1315,7 @@ function Mt({
1293
1315
  items: Fe,
1294
1316
  refine: dt,
1295
1317
  selected: e.engine_capacity,
1296
- bgDark: Y,
1318
+ bgDark: H,
1297
1319
  showLabel: _,
1298
1320
  isMobile: J,
1299
1321
  loading: !!(e.make && e.model && e.year) && Fe.length === 0,
@@ -1310,7 +1332,7 @@ function Mt({
1310
1332
  items: De,
1311
1333
  refine: ct,
1312
1334
  selected: e.engine,
1313
- bgDark: Y,
1335
+ bgDark: H,
1314
1336
  showLabel: _,
1315
1337
  isMobile: J,
1316
1338
  loading: !!(e.make && e.model && e.year) && De.length === 0,
@@ -1327,7 +1349,7 @@ function Mt({
1327
1349
  {
1328
1350
  className: "vehicle-search-btn",
1329
1351
  onClick: () => {
1330
- Me(!0), U && !H ? window.location.href = U + window.location.search : nt();
1352
+ Me(!0), U && !q ? window.location.href = U + window.location.search : nt();
1331
1353
  },
1332
1354
  children: [
1333
1355
  /* @__PURE__ */ a("span", { children: y }),
@@ -1343,7 +1365,7 @@ function Mt({
1343
1365
  {
1344
1366
  className: ne(
1345
1367
  "vs:flex vs:w-full vs:justify-center vs:items-center",
1346
- L === "row" ? "vs:md:items-end vs:md:justify-end" : "vs:md:justify-center",
1368
+ I === "row" ? "vs:md:items-end vs:md:justify-end" : "vs:md:justify-center",
1347
1369
  "vs:mt-4 vs:md:mt-3 vs:md:pr-1.5"
1348
1370
  ),
1349
1371
  children: /* @__PURE__ */ A(
@@ -1353,10 +1375,10 @@ function Mt({
1353
1375
  typeof window < "u" ? window.location.href.split("/")[2] : "unknown"}&utm_source=vehicle-select&utm_medium=referral&utm_campaign=powered-by`,
1354
1376
  target: "_blank",
1355
1377
  rel: "noreferrer",
1356
- className: `${Y ? "vs:text-white" : "vs:text-black"} vs:flex vs:items-center vs:space-x-1.5 vs:px-1.5 vs:text-center vs:leading-normal vs:text-[10px] vs:opacity-75 vs:transition vs:hover:opacity-100 vs:font-sans vs:no-underline vs:m-0 pb-1.5`,
1378
+ className: `${H ? "vs:text-white" : "vs:text-black"} vs:flex vs:items-center vs:space-x-1.5 vs:px-1.5 vs:text-center vs:leading-normal vs:text-[10px] vs:opacity-75 vs:transition vs:hover:opacity-100 vs:font-sans vs:no-underline vs:m-0 pb-1.5`,
1357
1379
  children: [
1358
1380
  /* @__PURE__ */ a("span", { children: "Powered by" }),
1359
- /* @__PURE__ */ a($t, { className: "vs:inline-flex vs:h-[13px]" })
1381
+ /* @__PURE__ */ a(St, { className: "vs:inline-flex vs:h-[13px]" })
1360
1382
  ]
1361
1383
  }
1362
1384
  )
@@ -1415,13 +1437,13 @@ function At(b) {
1415
1437
  return u === b ? v.activeElement : u;
1416
1438
  }
1417
1439
  });
1418
- const N = (re = Object.getOwnPropertyDescriptor(
1440
+ const P = (re = Object.getOwnPropertyDescriptor(
1419
1441
  Event.prototype,
1420
1442
  "target"
1421
1443
  )) == null ? void 0 : re.get;
1422
1444
  Object.defineProperty(Event.prototype, "target", {
1423
1445
  get: function() {
1424
- const u = N == null ? void 0 : N.call(this);
1446
+ const u = P == null ? void 0 : P.call(this);
1425
1447
  return u === b ? this.composedPath()[0] : u;
1426
1448
  }
1427
1449
  });
@@ -1459,71 +1481,71 @@ class jt extends HTMLElement {
1459
1481
  }
1460
1482
  let v = document.createElement("style");
1461
1483
  v.textContent = zt;
1462
- const p = document.createElement("div"), U = this.attachShadow({ mode: "open" }), L = (E, K, w) => {
1463
- let Q;
1464
- if (this.hasAttribute(K)) {
1465
- const B = this.getAttribute(K);
1466
- if (/^#[0-9A-F]{6}$/i.test(B)) {
1467
- const x = parseInt(B.slice(1, 3), 16), le = parseInt(B.slice(3, 5), 16), ve = parseInt(B.slice(5, 7), 16);
1468
- Q = `${x} ${le} ${ve}`;
1484
+ const p = document.createElement("div"), U = this.attachShadow({ mode: "open" }), I = (E, Q, w) => {
1485
+ let W;
1486
+ if (this.hasAttribute(Q)) {
1487
+ const j = this.getAttribute(Q);
1488
+ if (/^#[0-9A-F]{6}$/i.test(j)) {
1489
+ const x = parseInt(j.slice(1, 3), 16), le = parseInt(j.slice(3, 5), 16), ve = parseInt(j.slice(5, 7), 16);
1490
+ W = `${x} ${le} ${ve}`;
1469
1491
  }
1470
1492
  }
1471
- return Q = Q || w, `:host { --${E}: ${Q}; } .partbot-mmyvs-container { --${E}: ${Q}; }`;
1493
+ return W = W || w, `:host { --${E}: ${W}; } .partbot-mmyvs-container { --${E}: ${W}; }`;
1472
1494
  };
1473
- let R = L(
1495
+ let R = I(
1474
1496
  "partbot-theme",
1475
1497
  "data-button-color",
1476
1498
  "0 0 0"
1477
- ), N = L(
1499
+ ), P = I(
1478
1500
  "partbot-button-color",
1479
1501
  "data-button-color",
1480
1502
  "0 0 0"
1481
- ), O = L(
1503
+ ), O = I(
1482
1504
  "partbot-button-hover-color",
1483
1505
  "data-button-hover-color",
1484
1506
  "0 0 0"
1485
- ), _ = L(
1507
+ ), _ = I(
1486
1508
  "partbot-button-label-color",
1487
1509
  "data-button-label-color",
1488
1510
  "255 255 255"
1489
- ), V = L(
1511
+ ), V = I(
1490
1512
  "partbot-button-hover-label-color",
1491
1513
  "data-button-hover-label-color",
1492
1514
  "255 255 255"
1493
- ), T = L(
1515
+ ), T = I(
1494
1516
  "partbot-mobile-background-color",
1495
1517
  "data-mobile-background-color",
1496
1518
  "0 0 0"
1497
1519
  ), re = `:host { --partbot-button-border-radius: ${this.getAttribute("data-button-border-radius") || "0.375rem"}; } .partbot-mmyvs-container { --partbot-button-border-radius: ${this.getAttribute("data-button-border-radius") || "0.375rem"}; }`, u = `:host { --partbot-font-size: ${this.getAttribute("data-font-size") || "0.875rem"}; } .partbot-mmyvs-container { --partbot-font-size: ${this.getAttribute("data-font-size") || "0.875rem"}; }`, y = `:host { --partbot-font-family: ${(this.getAttribute("data-font-family") || this.getAttribute("data-font")) && (this.getAttribute("data-font-family") || this.getAttribute("data-font")).trim() !== "" ? this.getAttribute("data-font-family") || this.getAttribute("data-font") : '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif'}; } .partbot-mmyvs-container { --partbot-font-family: ${(this.getAttribute("data-font-family") || this.getAttribute("data-font")) && (this.getAttribute("data-font-family") || this.getAttribute("data-font")).trim() !== "" ? this.getAttribute("data-font-family") || this.getAttribute("data-font") : '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif'}; }`, C = `:host { --partbot-padding: ${this.getAttribute("data-padding") || "0.5rem"}; } .partbot-mmyvs-container { --partbot-padding: ${this.getAttribute("data-padding") || "0.5rem"}; }`;
1498
- const H = this.getAttribute("data-input-shadow"), ee = H === "none" ? "none" : H || "0 1px 2px 0 rgb(0 0 0 / 0.05)";
1520
+ const q = this.getAttribute("data-input-shadow"), ee = q === "none" ? "none" : q || "0 1px 2px 0 rgb(0 0 0 / 0.05)";
1499
1521
  let G = `:host { --partbot-input-shadow: ${ee}; } .partbot-mmyvs-container { --partbot-input-shadow: ${ee}; }`;
1500
1522
  const f = this.getAttribute("data-input-border-color");
1501
1523
  let D = "229 231 235";
1502
1524
  if (f)
1503
1525
  if (/^#[0-9A-F]{6}$/i.test(f)) {
1504
- const E = parseInt(f.slice(1, 3), 16), K = parseInt(f.slice(3, 5), 16), w = parseInt(f.slice(5, 7), 16);
1505
- D = `${E} ${K} ${w}`;
1526
+ const E = parseInt(f.slice(1, 3), 16), Q = parseInt(f.slice(3, 5), 16), w = parseInt(f.slice(5, 7), 16);
1527
+ D = `${E} ${Q} ${w}`;
1506
1528
  } else /^\d+\s+\d+\s+\d+$/.test(f) && (D = f);
1507
1529
  let g = `:host { --partbot-input-border-color: ${D}; } .partbot-mmyvs-container { --partbot-input-border-color: ${D}; }`;
1508
1530
  const s = this.getAttribute("data-input-border-width") || "1px";
1509
1531
  let F = `:host { --partbot-input-border-width: ${s}; } .partbot-mmyvs-container { --partbot-input-border-width: ${s}; }`;
1510
- v.textContent += R, v.textContent += N, v.textContent += O, v.textContent += _, v.textContent += V, v.textContent += T, v.textContent += re, v.textContent += u, v.textContent += y, v.textContent += C, v.textContent += G, v.textContent += g, v.textContent += F, U.appendChild(v), U.appendChild(p);
1532
+ v.textContent += R, v.textContent += P, v.textContent += O, v.textContent += _, v.textContent += V, v.textContent += T, v.textContent += re, v.textContent += u, v.textContent += y, v.textContent += C, v.textContent += G, v.textContent += g, v.textContent += F, U.appendChild(v), U.appendChild(p);
1511
1533
  const z = this.getAttribute("data-api-key");
1512
1534
  if (!z) {
1513
1535
  console.warn("Missing attributes: " + (z ? "" : "data-api-key "));
1514
1536
  return;
1515
1537
  }
1516
- const ie = this.attributes, $ = {};
1538
+ const ie = this.attributes, S = {};
1517
1539
  for (let E = 0; E < ie.length; E++) {
1518
- const { name: K, value: w } = ie[E];
1519
- if (K.startsWith("data-")) {
1520
- const Q = K.slice(5).replace(/-([a-z])/g, (B) => B[1].toUpperCase());
1521
- $[Q] = w === "true" ? !0 : w === "false" ? !1 : w;
1540
+ const { name: Q, value: w } = ie[E];
1541
+ if (Q.startsWith("data-")) {
1542
+ const W = Q.slice(5).replace(/-([a-z])/g, (j) => j[1].toUpperCase());
1543
+ S[W] = w === "true" ? !0 : w === "false" ? !1 : w;
1522
1544
  }
1523
1545
  }
1524
1546
  At(this);
1525
- const q = /* @__PURE__ */ a(Mt, { ...$ });
1526
- mt.render(q, p);
1547
+ const K = /* @__PURE__ */ a(Mt, { ...S });
1548
+ mt.render(K, p);
1527
1549
  }
1528
1550
  }
1529
1551
  customElements.define("vehicle-search", jt);