@cartbot/vehicle-search-beta 3.0.11 → 3.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/vehicle-search.css +1 -1
- package/dist/js/vehicle-search.es.js +641 -616
- package/dist/js/vehicle-search.js +17 -17
- package/package.json +2 -2
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as M, useEffect as
|
|
1
|
+
import { jsx as a, jsxs as $, Fragment as Se } from "react/jsx-runtime";
|
|
2
|
+
import { useState as M, useEffect as P, useRef as O, useCallback as N, useMemo as pt } from "react";
|
|
3
3
|
import vt from "react-dom";
|
|
4
|
-
import
|
|
5
|
-
import { Combobox as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
4
|
+
import ht from "js-cookie";
|
|
5
|
+
import { Combobox as ut, ComboboxInput as mt, ComboboxButton as ft, ComboboxOptions as gt, ComboboxOption as bt } from "@headlessui/react";
|
|
6
|
+
import wt from "fuzzysearch";
|
|
7
|
+
import Ye from "pluralize";
|
|
8
8
|
import te from "clsx";
|
|
9
|
-
import { MeiliSearch as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
9
|
+
import { MeiliSearch as yt } from "meilisearch";
|
|
10
|
+
import xt from "lodash/debounce.js";
|
|
11
|
+
import kt from "tinycolor2";
|
|
12
12
|
import Ne from "posthog-js";
|
|
13
|
-
const kt = `@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-border-style:solid;--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}vehicle-search,vehicle-search *,vehicle-search:before,vehicle-search:after,vehicle-search::backdrop{--tw-space-x-reverse:0;--tw-border-style:solid;--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}:host,:host *,:host:before,:host:after,:host::backdrop{--tw-space-x-reverse:0;--tw-border-style:solid;--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}}@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);--vs-color-theme:oklch(from rgb(var(--partbot-theme))l c h/<alpha-value>);--vs-color-button-label:oklch(from rgb(var(--partbot-button-label-color))l c h/<alpha-value>)}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);--vs-color-theme:oklch(from rgb(var(--partbot-theme))l c h/<alpha-value>);--vs-color-button-label:oklch(from rgb(var(--partbot-button-label-color))l c h/<alpha-value>)}: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);--vs-color-theme:oklch(from rgb(var(--partbot-theme))l c h/<alpha-value>);--vs-color-button-label:oklch(from rgb(var(--partbot-button-label-color))l c h/<alpha-value>)}}@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}:root{--partbot-theme:79 70 229;--partbot-button-color:99 102 241;--partbot-button-hover-color:79 70 229;--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:"Inter",Helvetica,sans-serif;--partbot-padding:.5rem}vehicle-search{--partbot-theme:79 70 229;--partbot-button-color:99 102 241;--partbot-button-hover-color:79 70 229;--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:"Inter",Helvetica,sans-serif;--partbot-padding:.5rem}:host{--partbot-theme:79 70 229;--partbot-button-color:99 102 241;--partbot-button-hover-color:79 70 229;--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:"Inter",Helvetica,sans-serif;--partbot-padding:.5rem}[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\\: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{border-style:var(--tw-border-style);border-width:1px}.vs\\:border-none{--tw-border-style:none;border-style:none}.vs\\:border-stone-200{border-color:var(--vs-color-stone-200)}.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-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\\:shadow-sm{--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)}.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:var(--vs-color-theme)}.vs\\:hover\\:text-button-label:hover{color:var(--vs-color-button-label)}.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\\: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}}.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}@media (min-width:1024px){.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))}}}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@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}@keyframes spin{to{transform:rotate(360deg)}}`;
|
|
14
|
-
function
|
|
15
|
-
return /* @__PURE__ */
|
|
13
|
+
const Ct = `@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: y }) {
|
|
15
|
+
return /* @__PURE__ */ a("span", { className: y, children: /* @__PURE__ */ a(
|
|
16
16
|
"svg",
|
|
17
17
|
{
|
|
18
18
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -24,7 +24,7 @@ function Ct({ className: m }) {
|
|
|
24
24
|
height: "100%"
|
|
25
25
|
},
|
|
26
26
|
children: /* @__PURE__ */ $("g", { children: [
|
|
27
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ a(
|
|
28
28
|
"rect",
|
|
29
29
|
{
|
|
30
30
|
fill: "currentColor",
|
|
@@ -35,7 +35,7 @@ function Ct({ className: m }) {
|
|
|
35
35
|
ry: "1.81"
|
|
36
36
|
}
|
|
37
37
|
),
|
|
38
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ a(
|
|
39
39
|
"rect",
|
|
40
40
|
{
|
|
41
41
|
fill: "currentColor",
|
|
@@ -46,49 +46,49 @@ function Ct({ className: m }) {
|
|
|
46
46
|
ry: "1.7"
|
|
47
47
|
}
|
|
48
48
|
),
|
|
49
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ a(
|
|
50
50
|
"path",
|
|
51
51
|
{
|
|
52
52
|
fill: "currentColor",
|
|
53
53
|
d: "M36.91,34.61h-5.67c-.94,0-1.7-.76-1.7-1.7V1.7C29.55.76,30.31,0,31.25,0h5.67c9.44,0,17.09,7.65,17.09,17.09h0v.43c0,9.44-7.65,17.09-17.09,17.09Z"
|
|
54
54
|
}
|
|
55
55
|
),
|
|
56
|
-
/* @__PURE__ */
|
|
56
|
+
/* @__PURE__ */ a(
|
|
57
57
|
"path",
|
|
58
58
|
{
|
|
59
59
|
fill: "currentColor",
|
|
60
60
|
d: "M97.79,12.21c-1.74-.96-3.67-1.44-5.8-1.44h-13.54v31.48h7.56v-8.81h5.98c2.13,0,4.06-.48,5.8-1.44,1.74-.96,3.13-2.3,4.18-4.03,1.05-1.72,1.57-3.7,1.57-5.91s-.52-4.18-1.57-5.87c-1.05-1.69-2.44-3.02-4.18-3.98ZM95.32,24.8c-.45.75-1.04,1.32-1.78,1.71-.74.39-1.54.58-2.41.58h-5.13v-10.03h5.13c.87,0,1.67.2,2.41.61.73.4,1.33.98,1.78,1.73.45.75.67,1.65.67,2.7s-.22,1.95-.67,2.7Z"
|
|
61
61
|
}
|
|
62
62
|
),
|
|
63
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ a(
|
|
64
64
|
"path",
|
|
65
65
|
{
|
|
66
66
|
fill: "currentColor",
|
|
67
67
|
d: "M124.27,20.24c-1.81-1.06-4.01-1.6-6.59-1.6s-4.76.54-6.63,1.62c-1.87,1.08-3.32,2.54-4.34,4.39-1.02,1.84-1.53,3.93-1.53,6.27s.43,4.26,1.3,6.05c.87,1.78,2.08,3.2,3.64,4.25,1.56,1.05,3.36,1.57,5.4,1.57,1.29,0,2.41-.18,3.35-.54.94-.36,1.75-.86,2.41-1.51.66-.64,1.2-1.37,1.62-2.18h.18v3.69h6.84v-11.47c0-2.28-.49-4.34-1.46-6.18s-2.37-3.3-4.18-4.36ZM122.18,33.8c-.42.93-1.03,1.66-1.82,2.18s-1.72.79-2.77.79-2.02-.26-2.83-.79-1.42-1.25-1.84-2.18c-.42-.93-.63-1.96-.63-3.1s.21-2.11.63-3.01c.42-.9,1.03-1.61,1.84-2.14s1.75-.79,2.83-.79,1.97.26,2.77.79,1.4,1.24,1.82,2.14c.42.9.63,1.9.63,3.01s-.21,2.17-.63,3.1Z"
|
|
68
68
|
}
|
|
69
69
|
),
|
|
70
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ a(
|
|
71
71
|
"path",
|
|
72
72
|
{
|
|
73
73
|
fill: "currentColor",
|
|
74
74
|
d: "M159.56,13.56h-7.02v5.62h-12.06c-2.13,0-3.79.64-4.99,1.84s-1.8,2.85-1.8,4.95v16.28h6.97v-15.83c0-.45.15-.82.45-1.1.3-.28.66-.43,1.08-.43h10.35v10.61c0,2.07.6,3.71,1.8,4.92,1.2,1.21,2.86,1.82,4.99,1.82h6.57v-5.85h-5.04c-.36,0-.67-.13-.92-.38-.26-.25-.38-.56-.38-.92v-10.21h6.34v-5.71h-6.34v-5.62Z"
|
|
75
75
|
}
|
|
76
76
|
),
|
|
77
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ a(
|
|
78
78
|
"path",
|
|
79
79
|
{
|
|
80
80
|
fill: "currentColor",
|
|
81
81
|
d: "M189.1,20.13c-1.65-.99-3.57-1.48-5.76-1.48-.93,0-1.81.12-2.63.36-.83.24-1.57.59-2.25,1.06-.67.47-1.24,1.01-1.69,1.64h-.14v-12.28h-6.97v20.87c0,2.52.51,4.72,1.53,6.61,1.02,1.89,2.46,3.34,4.32,4.36,1.86,1.02,4.03,1.53,6.52,1.53,1.95,0,3.68-.3,5.19-.9,1.51-.6,2.8-1.46,3.87-2.59,1.06-1.12,1.88-2.45,2.45-3.98.57-1.53.85-3.19.85-4.99,0-2.34-.47-4.38-1.42-6.12-.94-1.74-2.24-3.1-3.89-4.09ZM186.65,33.82c-.44.91-1.04,1.63-1.82,2.16-.78.52-1.71.79-2.79.79s-2.02-.26-2.81-.79-1.4-1.24-1.82-2.16-.63-1.94-.63-3.08.21-2.16.63-3.06c.42-.9,1.03-1.61,1.82-2.14s1.73-.79,2.81-.79,2.01.26,2.79.79c.78.52,1.39,1.24,1.82,2.14.43.9.65,1.92.65,3.06s-.22,2.17-.65,3.08Z"
|
|
82
82
|
}
|
|
83
83
|
),
|
|
84
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ a(
|
|
85
85
|
"path",
|
|
86
86
|
{
|
|
87
87
|
fill: "currentColor",
|
|
88
88
|
d: "M215.96,20.24c-1.87-1.06-4-1.6-6.36-1.6s-4.5.53-6.39,1.6c-1.89,1.06-3.38,2.5-4.48,4.32-1.09,1.81-1.64,3.88-1.64,6.18s.55,4.33,1.64,6.16c1.09,1.83,2.59,3.27,4.48,4.32,1.89,1.05,4.02,1.57,6.39,1.57s4.45-.52,6.34-1.57,3.38-2.49,4.47-4.32c1.09-1.83,1.64-3.88,1.64-6.16s-.55-4.37-1.64-6.18c-1.09-1.81-2.58-3.25-4.45-4.32ZM214.37,33.75c-.45.9-1.08,1.62-1.89,2.16s-1.77.81-2.88.81-2.08-.27-2.9-.81-1.46-1.26-1.91-2.16c-.45-.9-.67-1.92-.67-3.06s.22-2.11.67-3.01c.45-.9,1.09-1.62,1.91-2.16s1.79-.81,2.9-.81,2.07.27,2.88.81,1.44,1.26,1.89,2.16c.45.9.67,1.9.67,3.01s-.22,2.16-.67,3.06Z"
|
|
89
89
|
}
|
|
90
90
|
),
|
|
91
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ a(
|
|
92
92
|
"path",
|
|
93
93
|
{
|
|
94
94
|
fill: "currentColor",
|
|
@@ -99,102 +99,102 @@ function Ct({ className: m }) {
|
|
|
99
99
|
}
|
|
100
100
|
) });
|
|
101
101
|
}
|
|
102
|
-
function je({ className:
|
|
103
|
-
return /* @__PURE__ */
|
|
102
|
+
function je({ className: y = "" }) {
|
|
103
|
+
return /* @__PURE__ */ a(
|
|
104
104
|
"svg",
|
|
105
105
|
{
|
|
106
|
-
className:
|
|
106
|
+
className: y,
|
|
107
107
|
xmlns: "http://www.w3.org/2000/svg",
|
|
108
108
|
width: "32",
|
|
109
109
|
height: "32",
|
|
110
110
|
fill: "currentColor",
|
|
111
111
|
viewBox: "0 0 256 256",
|
|
112
|
-
children: /* @__PURE__ */
|
|
112
|
+
children: /* @__PURE__ */ a("path", { d: "M236,128a108,108,0,0,1-216,0c0-42.52,24.73-81.34,63-98.9A12,12,0,1,1,93,50.91C63.24,64.57,44,94.83,44,128a84,84,0,0,0,168,0c0-33.17-19.24-63.43-49-77.09A12,12,0,1,1,173,29.1C211.27,46.66,236,85.48,236,128Z" })
|
|
113
113
|
}
|
|
114
114
|
);
|
|
115
115
|
}
|
|
116
|
-
function
|
|
117
|
-
label:
|
|
118
|
-
items:
|
|
119
|
-
selected:
|
|
116
|
+
function W({
|
|
117
|
+
label: y,
|
|
118
|
+
items: v,
|
|
119
|
+
selected: d,
|
|
120
120
|
refine: D,
|
|
121
121
|
showPopular: I,
|
|
122
122
|
bgDark: F,
|
|
123
|
-
sortOptions:
|
|
123
|
+
sortOptions: j = !0,
|
|
124
124
|
showLabel: U = !1,
|
|
125
|
-
isMobile:
|
|
125
|
+
isMobile: C = !1,
|
|
126
126
|
loading: Y = !1,
|
|
127
|
-
shouldBeActive:
|
|
127
|
+
shouldBeActive: R = !1
|
|
128
128
|
// True when parent fields are selected and this field tried to load
|
|
129
129
|
}) {
|
|
130
|
-
const [
|
|
131
|
-
|
|
132
|
-
},
|
|
133
|
-
i.preventDefault(), i.stopPropagation(),
|
|
130
|
+
const [G, u] = M(""), [x, k] = M(d || null), H = (i) => {
|
|
131
|
+
k(i), u(""), !(i && i.value === (d == null ? void 0 : d.value)) && D(i);
|
|
132
|
+
}, J = (i) => {
|
|
133
|
+
i.preventDefault(), i.stopPropagation(), u(""), k(null), D("");
|
|
134
134
|
};
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}, [
|
|
138
|
-
let
|
|
139
|
-
|
|
140
|
-
String(i.value).split(/,(?![^(]*\))/).forEach((
|
|
141
|
-
|
|
135
|
+
P(() => {
|
|
136
|
+
u(""), k(d || null);
|
|
137
|
+
}, [d, v]);
|
|
138
|
+
let re = /* @__PURE__ */ new Set(), g = [];
|
|
139
|
+
v && (v.forEach((i) => {
|
|
140
|
+
String(i.value).split(/,(?![^(]*\))/).forEach((_) => {
|
|
141
|
+
_ = _.trim(), _ && wt(G, _.toLowerCase()) && !re.has(_.toLowerCase()) && (re.add(_.toLowerCase()), g.push({
|
|
142
142
|
...i,
|
|
143
|
-
value:
|
|
143
|
+
value: _,
|
|
144
144
|
refinement: i.value
|
|
145
145
|
}));
|
|
146
146
|
});
|
|
147
|
-
}),
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
(i) => !
|
|
151
|
-
),
|
|
152
|
-
(i,
|
|
153
|
-
),
|
|
154
|
-
const
|
|
147
|
+
}), g.length === 0 && (g = v));
|
|
148
|
+
const L = g.filter((i) => i.popularity > 0).slice(0, 11);
|
|
149
|
+
j && (g = g.filter(
|
|
150
|
+
(i) => !L.includes(i)
|
|
151
|
+
), g.sort(
|
|
152
|
+
(i, B) => i.value.localeCompare(B.value, "en", { numeric: !0 })
|
|
153
|
+
), g = L.concat(g));
|
|
154
|
+
const w = !g || g.length === 0;
|
|
155
155
|
return /* @__PURE__ */ $("div", { className: "vs:relative vs:flex vs:flex-col", children: [
|
|
156
|
-
U && /* @__PURE__ */
|
|
156
|
+
U && /* @__PURE__ */ a(
|
|
157
157
|
"span",
|
|
158
158
|
{
|
|
159
159
|
className: `${F ? "vs:text-white" : "vs:text-black"} vs:mb-1 vs:block vs:text-(length:--partbot-font-size) vs:leading-[calc(var(--partbot-font-size)*1.5)] vs:font-medium vs:font-(family-name:--partbot-font-family)`,
|
|
160
|
-
children:
|
|
160
|
+
children: y
|
|
161
161
|
}
|
|
162
162
|
),
|
|
163
|
-
|
|
163
|
+
C && /* @__PURE__ */ $("div", { className: "vs:relative vs:flex vs:flex-col", children: [
|
|
164
164
|
/* @__PURE__ */ $(
|
|
165
165
|
"select",
|
|
166
166
|
{
|
|
167
167
|
onChange: (i) => {
|
|
168
|
-
const
|
|
169
|
-
(
|
|
168
|
+
const B = g.find(
|
|
169
|
+
(_) => _.value.toString() === i.target.value.toString()
|
|
170
170
|
);
|
|
171
|
-
|
|
171
|
+
B && H(B);
|
|
172
172
|
},
|
|
173
|
-
className: "vehicle-search-select vs:relative vs:w-full vs:cursor-default vs:overflow-hidden vs:rounded-(--partbot-button-border-radius)
|
|
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,
|
|
175
|
-
disabled: !(
|
|
176
|
-
value:
|
|
175
|
+
disabled: !(g && g.length),
|
|
176
|
+
value: x ? x.value : "",
|
|
177
177
|
children: [
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
-
(i) => !
|
|
183
|
-
(
|
|
178
|
+
/* @__PURE__ */ a("option", { value: "", disabled: !0, children: y }),
|
|
179
|
+
L.length > 0 ? /* @__PURE__ */ $(Se, { children: [
|
|
180
|
+
/* @__PURE__ */ a("optgroup", { label: `Popular ${Ye(y)}`, children: L.map((i) => /* @__PURE__ */ a("option", { value: i.refinement, children: i.value }, i.value)) }),
|
|
181
|
+
/* @__PURE__ */ a("optgroup", { label: `All ${Ye(y)}`, children: g.filter(
|
|
182
|
+
(i) => !L.some(
|
|
183
|
+
(B) => B.value === i.value
|
|
184
184
|
)
|
|
185
|
-
).map((i) => /* @__PURE__ */
|
|
186
|
-
] }) :
|
|
185
|
+
).map((i) => /* @__PURE__ */ a("option", { value: i.refinement, children: i.value }, i.value)) })
|
|
186
|
+
] }) : g.map((i) => /* @__PURE__ */ a("option", { value: i.refinement, children: i.value }, i.value))
|
|
187
187
|
]
|
|
188
188
|
}
|
|
189
189
|
),
|
|
190
|
-
Y && /* @__PURE__ */
|
|
191
|
-
!Y && (
|
|
190
|
+
Y && /* @__PURE__ */ a("div", { className: "vs:absolute vs:inset-y-0 vs:right-[calc(var(--partbot-font-size)*1.95)] vs:items-center vs:pr-(--partbot-padding) vs:text-[rgb(var(--partbot-theme))]! vs:pointer-events-none vs:flex vs:justify-center", children: /* @__PURE__ */ a(je, { className: "vs:h-[calc(var(--partbot-font-size)*0.9)]! vs:w-[calc(var(--partbot-font-size)*0.9)]! vs:animate-spin vs:text-[rgb(var(--partbot-theme))]!" }) }),
|
|
191
|
+
!Y && (x == null ? void 0 : x.value) && /* @__PURE__ */ a(
|
|
192
192
|
"button",
|
|
193
193
|
{
|
|
194
|
-
onClick:
|
|
194
|
+
onClick: J,
|
|
195
195
|
tabIndex: -1,
|
|
196
196
|
className: "vs:absolute vs:inset-y-0 vs:right-[calc(var(--partbot-font-size)*1.95)] vs:items-center vs:pr-(--partbot-padding) vs:text-red-300 vs:hover:text-red-500 vs:bg-transparent vs:border-none vs:outline-none vs:p-(--partbot-padding) vs:text-(length:--partbot-font-size) vs:leading-[calc(var(--partbot-font-size)*1.5)] vs:font-medium vs:transition vs:pointer-events-auto vs:flex vs:justify-center",
|
|
197
|
-
children: /* @__PURE__ */
|
|
197
|
+
children: /* @__PURE__ */ a(
|
|
198
198
|
"svg",
|
|
199
199
|
{
|
|
200
200
|
className: "vs:h-[calc(var(--partbot-font-size)*0.9)]! vs:w-[calc(var(--partbot-font-size)*0.9)]!",
|
|
@@ -203,42 +203,42 @@ function Q({
|
|
|
203
203
|
height: "32",
|
|
204
204
|
fill: "currentColor",
|
|
205
205
|
viewBox: "0 0 256 256",
|
|
206
|
-
children: /* @__PURE__ */
|
|
206
|
+
children: /* @__PURE__ */ a("path", { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,130.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32L139.31,128Z" })
|
|
207
207
|
}
|
|
208
208
|
)
|
|
209
209
|
}
|
|
210
210
|
)
|
|
211
211
|
] }),
|
|
212
|
-
!
|
|
213
|
-
|
|
212
|
+
!C && /* @__PURE__ */ $(
|
|
213
|
+
ut,
|
|
214
214
|
{
|
|
215
|
-
value:
|
|
216
|
-
onChange:
|
|
217
|
-
virtual: { options:
|
|
218
|
-
disabled:
|
|
215
|
+
value: x || null,
|
|
216
|
+
onChange: H,
|
|
217
|
+
virtual: { options: g },
|
|
218
|
+
disabled: w,
|
|
219
219
|
immediate: !0,
|
|
220
220
|
children: [
|
|
221
221
|
/* @__PURE__ */ $("div", { className: "vs:flex vs:h-full", children: [
|
|
222
|
-
/* @__PURE__ */
|
|
223
|
-
|
|
222
|
+
/* @__PURE__ */ a(
|
|
223
|
+
mt,
|
|
224
224
|
{
|
|
225
225
|
autoComplete: "off",
|
|
226
226
|
spellCheck: "false",
|
|
227
|
-
placeholder:
|
|
228
|
-
className: "vs:w-full vs:cursor-default vs:rounded-(--partbot-button-border-radius)
|
|
227
|
+
placeholder: w && R ? "N/A" : y,
|
|
228
|
+
className: "vs:w-full vs:cursor-default 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:text-(length:--partbot-font-size) vs:leading-[calc(var(--partbot-font-size)*1.5)] vs:font-(family-name:--partbot-font-family) vs:text-stone-900 vs:placeholder:text-stone-600 vs:disabled:placeholder:text-stone-400 vs:disabled:cursor-not-allowed",
|
|
229
229
|
displayValue: (i) => (i == null ? void 0 : i.value) || "",
|
|
230
|
-
onChange: (i) =>
|
|
231
|
-
title:
|
|
230
|
+
onChange: (i) => u(i.target.value),
|
|
231
|
+
title: y
|
|
232
232
|
}
|
|
233
233
|
),
|
|
234
234
|
/* @__PURE__ */ $("div", { className: "vs:absolute vs:pointer-events-none vs:h-full vs:right-0 vs:flex vs:space-x-[calc(var(--partbot-padding)*0.25)] vs:items-center", children: [
|
|
235
|
-
(
|
|
235
|
+
(x == null ? void 0 : x.value) && /* @__PURE__ */ a(
|
|
236
236
|
"button",
|
|
237
237
|
{
|
|
238
|
-
onClick:
|
|
238
|
+
onClick: J,
|
|
239
239
|
tabIndex: -1,
|
|
240
240
|
className: "vs:inset-y-0 vs:pr-2 vs:text-red-300 vs:hover:text-red-500 vs:bg-transparent vs:border-none vs:outline-none vs:p-2 vs:text-(length:--partbot-font-size) vs:leading-[calc(var(--partbot-font-size)*1.5)] vs:font-medium vs:transition vs:pointer-events-auto vs:flex vs:items-center vs:justify-center vs:cursor-pointer",
|
|
241
|
-
children: /* @__PURE__ */
|
|
241
|
+
children: /* @__PURE__ */ a(
|
|
242
242
|
"svg",
|
|
243
243
|
{
|
|
244
244
|
className: "vs:h-[calc(var(--partbot-font-size)*0.9)]! vs:w-[calc(var(--partbot-font-size)*0.9)]! vs:text-red-300!",
|
|
@@ -247,12 +247,12 @@ function Q({
|
|
|
247
247
|
height: "32",
|
|
248
248
|
fill: "currentColor",
|
|
249
249
|
viewBox: "0 0 256 256",
|
|
250
|
-
children: /* @__PURE__ */
|
|
250
|
+
children: /* @__PURE__ */ a("path", { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,130.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32L139.31,128Z" })
|
|
251
251
|
}
|
|
252
252
|
)
|
|
253
253
|
}
|
|
254
254
|
),
|
|
255
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ a(ft, { className: "vs:inset-y-0 vs:flex vs:items-center vs:pr-[calc(var(--partbot-padding)*1.3)] vs:pointer-events-auto vs:bg-transparent vs:border-none vs:outline-none", children: Y ? /* @__PURE__ */ a(je, { className: "vs:h-[calc(var(--partbot-font-size)*0.9)]! vs:w-[calc(var(--partbot-font-size)*0.9)]! vs:text-stone-400 vs:animate-spin" }) : /* @__PURE__ */ a(
|
|
256
256
|
"svg",
|
|
257
257
|
{
|
|
258
258
|
className: "vs:h-[calc(var(--partbot-font-size)*0.9)]! vs:w-[calc(var(--partbot-font-size)*0.9)]! vs:text-stone-400",
|
|
@@ -261,49 +261,49 @@ function Q({
|
|
|
261
261
|
height: "32",
|
|
262
262
|
fill: "currentColor",
|
|
263
263
|
viewBox: "0 0 256 256",
|
|
264
|
-
children: /* @__PURE__ */
|
|
264
|
+
children: /* @__PURE__ */ a("path", { d: "M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z" })
|
|
265
265
|
}
|
|
266
266
|
) })
|
|
267
267
|
] })
|
|
268
268
|
] }),
|
|
269
|
-
/* @__PURE__ */
|
|
270
|
-
|
|
269
|
+
/* @__PURE__ */ a(
|
|
270
|
+
gt,
|
|
271
271
|
{
|
|
272
272
|
portal: !0,
|
|
273
273
|
anchor: "bottom start",
|
|
274
274
|
className: "vs:w-(--input-width) vs:z-99999! vs:max-h-60! vs:overflow-auto vs:rounded-[min(var(--partbot-button-border-radius),0.89rem)] vs:bg-white vs:py-1 vs:text-base vs:shadow-lg vs:ring-1 vs:ring-stone-200 vs:focus:outline-none vs:sm:text-(length:--partbot-font-size) empty:vs:invisible vs:mt-2",
|
|
275
275
|
children: ({ option: i }) => {
|
|
276
|
-
const
|
|
277
|
-
(
|
|
276
|
+
const B = i && L.some(
|
|
277
|
+
(_) => _.value === i.value
|
|
278
278
|
);
|
|
279
|
-
return /* @__PURE__ */
|
|
280
|
-
|
|
279
|
+
return /* @__PURE__ */ a(
|
|
280
|
+
bt,
|
|
281
281
|
{
|
|
282
282
|
value: i,
|
|
283
|
-
className: ({ focus:
|
|
283
|
+
className: ({ focus: _ }) => te(
|
|
284
284
|
"vs:group vs:relative vs:w-full vs:cursor-default vs:py-(--partbot-padding) vs:px-[calc(var(--partbot-padding)*1.3)] vs:text-left vs:border-none",
|
|
285
|
-
|
|
286
|
-
|
|
285
|
+
_ ? "vs:bg-[rgb(var(--partbot-theme))] vs:text-[rgb(var(--partbot-button-label-color))]" : "vs:bg-white vs:text-stone-900 vs:hover:bg-theme vs:hover:text-button-label",
|
|
286
|
+
B && "vs:font-bold!"
|
|
287
287
|
),
|
|
288
|
-
children: ({ selected:
|
|
289
|
-
/* @__PURE__ */
|
|
288
|
+
children: ({ selected: _ }) => /* @__PURE__ */ $("div", { className: "vs:flex vs:w-full vs:items-center vs:justify-between", children: [
|
|
289
|
+
/* @__PURE__ */ a(
|
|
290
290
|
"span",
|
|
291
291
|
{
|
|
292
292
|
className: te(
|
|
293
|
-
i.value === (
|
|
293
|
+
i.value === (d == null ? void 0 : d.value) ? "vs:font-semibold" : "vs:font-normal",
|
|
294
294
|
"vs:block vs:font-(family-name:--partbot-font-family) vs:whitespace-pre-wrap vs:text-left vs:text-(length:--partbot-font-size) vs:leading-none"
|
|
295
295
|
),
|
|
296
296
|
children: i.value
|
|
297
297
|
}
|
|
298
298
|
),
|
|
299
|
-
i.value === (
|
|
299
|
+
i.value === (d == null ? void 0 : d.value) && /* @__PURE__ */ a(
|
|
300
300
|
"span",
|
|
301
301
|
{
|
|
302
302
|
className: te(
|
|
303
303
|
"vs:text-[rgb(var(--partbot-theme))]",
|
|
304
304
|
"vs:flex vs:items-center group-vs:hover:text-white"
|
|
305
305
|
),
|
|
306
|
-
children: /* @__PURE__ */
|
|
306
|
+
children: /* @__PURE__ */ a(
|
|
307
307
|
"svg",
|
|
308
308
|
{
|
|
309
309
|
className: "vs:h-[calc(var(--partbot-font-size)*0.9)]! vs:w-[calc(var(--partbot-font-size)*0.9)]!",
|
|
@@ -312,7 +312,7 @@ function Q({
|
|
|
312
312
|
height: "32",
|
|
313
313
|
fill: "currentColor",
|
|
314
314
|
viewBox: "0 0 256 256",
|
|
315
|
-
children: /* @__PURE__ */
|
|
315
|
+
children: /* @__PURE__ */ a("path", { d: "M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z" })
|
|
316
316
|
}
|
|
317
317
|
)
|
|
318
318
|
}
|
|
@@ -329,52 +329,52 @@ function Q({
|
|
|
329
329
|
] });
|
|
330
330
|
}
|
|
331
331
|
console.info("Vehicle Search powered by Partbot https://use.partbot.io");
|
|
332
|
-
function
|
|
333
|
-
const
|
|
334
|
-
return
|
|
335
|
-
const [I, ...F] = D.split(":"),
|
|
336
|
-
if (
|
|
337
|
-
const U =
|
|
332
|
+
function me(y = [], v = []) {
|
|
333
|
+
const d = [];
|
|
334
|
+
return y.forEach((D) => {
|
|
335
|
+
const [I, ...F] = D.split(":"), j = F.join(":");
|
|
336
|
+
if (j.includes(" > ")) {
|
|
337
|
+
const U = j.split(" > "), C = U[U.length - 1].trim();
|
|
338
338
|
if (I !== "make" && U.length >= 2) {
|
|
339
339
|
const Y = U[0].trim();
|
|
340
|
-
|
|
340
|
+
d.push(`make = "${Y}"`);
|
|
341
341
|
}
|
|
342
|
-
|
|
342
|
+
d.push(`${I} = "${C}"`);
|
|
343
343
|
} else
|
|
344
|
-
|
|
345
|
-
}),
|
|
346
|
-
|
|
347
|
-
}),
|
|
344
|
+
d.push(`${I} = "${j}"`);
|
|
345
|
+
}), v.forEach((D) => {
|
|
346
|
+
d.push(D);
|
|
347
|
+
}), d.length > 0 ? d.join(" AND ") : null;
|
|
348
348
|
}
|
|
349
|
-
function
|
|
350
|
-
apiKey:
|
|
351
|
-
makes:
|
|
352
|
-
models:
|
|
349
|
+
function St({
|
|
350
|
+
apiKey: y,
|
|
351
|
+
makes: v = "",
|
|
352
|
+
models: d = "",
|
|
353
353
|
callbackUrl: D = "",
|
|
354
354
|
layout: I = "row",
|
|
355
355
|
fields: F,
|
|
356
|
-
fieldPrefix:
|
|
356
|
+
fieldPrefix: j = "",
|
|
357
357
|
showBranding: U = !0,
|
|
358
|
-
showLabels:
|
|
358
|
+
showLabels: C = !1,
|
|
359
359
|
mobileFullWidthButton: Y = !0,
|
|
360
|
-
mobileDrawer:
|
|
361
|
-
modifyQueryString:
|
|
362
|
-
onChange:
|
|
363
|
-
buttonLabel:
|
|
364
|
-
showButton:
|
|
365
|
-
onSubmit:
|
|
366
|
-
store:
|
|
367
|
-
useStoreVehicles:
|
|
368
|
-
fieldOrder:
|
|
360
|
+
mobileDrawer: R = !0,
|
|
361
|
+
modifyQueryString: G = !0,
|
|
362
|
+
onChange: u,
|
|
363
|
+
buttonLabel: x = "Search",
|
|
364
|
+
showButton: k = !0,
|
|
365
|
+
onSubmit: H,
|
|
366
|
+
store: J,
|
|
367
|
+
useStoreVehicles: re = !0,
|
|
368
|
+
fieldOrder: g = "MMY",
|
|
369
369
|
// "MMY" (Make→Model→Year) or "YMM" (Year→Make→Model)
|
|
370
|
-
enableFeatureFlags:
|
|
370
|
+
enableFeatureFlags: L = !1,
|
|
371
371
|
// Use api.cartbot.io instead of api.partbot.io
|
|
372
|
-
yearOptional:
|
|
372
|
+
yearOptional: w = !1,
|
|
373
373
|
// Make year selection optional, only requiring make + model
|
|
374
374
|
mobileButtonLabel: i = "Select Vehicle"
|
|
375
375
|
// Label for mobile drawer trigger button
|
|
376
376
|
}) {
|
|
377
|
-
const
|
|
377
|
+
const B = O(null), _ = O(null), oe = O(null), X = O(null), T = O(null), E = O(null), q = O(null), b = O(null), A = O(!1), m = g === "YMM", [se, pe] = M([]), [le, ve] = M([]), [ce, he] = M([]), [Te, ge] = M([]), [Ze, be] = M([]), [Oe, we] = M([]), [He, ye] = M([]), [qe, xe] = M([]), Qe = O([]), [ae, ze] = M([]), [e, Q] = M({
|
|
378
378
|
make: null,
|
|
379
379
|
model: null,
|
|
380
380
|
year: null,
|
|
@@ -383,21 +383,21 @@ function _t({
|
|
|
383
383
|
variant: null,
|
|
384
384
|
engine: null,
|
|
385
385
|
engine_capacity: null
|
|
386
|
-
}), [
|
|
386
|
+
}), [Ke, Me] = M(!1), Ve = O([
|
|
387
387
|
"body",
|
|
388
388
|
"series",
|
|
389
389
|
"variant",
|
|
390
390
|
"engine",
|
|
391
391
|
"engine_capacity"
|
|
392
|
-
]),
|
|
393
|
-
F && F.length &&
|
|
392
|
+
]), ke = O(
|
|
393
|
+
F && F.length && Ve.current ? F.split(",").filter((t) => {
|
|
394
394
|
var r;
|
|
395
|
-
return (r =
|
|
395
|
+
return (r = Ve.current) == null ? void 0 : r.includes(t);
|
|
396
396
|
}) : null
|
|
397
|
-
), [
|
|
398
|
-
|
|
397
|
+
), [K, We] = M(!1);
|
|
398
|
+
P(() => {
|
|
399
399
|
const t = navigator.userAgent;
|
|
400
|
-
|
|
400
|
+
We(
|
|
401
401
|
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
402
402
|
t
|
|
403
403
|
)
|
|
@@ -409,104 +409,104 @@ function _t({
|
|
|
409
409
|
disable_session_recording: !1
|
|
410
410
|
});
|
|
411
411
|
}, []);
|
|
412
|
-
const [
|
|
413
|
-
if (!
|
|
412
|
+
const [ne, Je] = M({}), [Et, Xe] = M(""), Pe = N(async () => {
|
|
413
|
+
if (!y)
|
|
414
414
|
return;
|
|
415
|
-
const r = `${
|
|
415
|
+
const r = `${L ? "https://api.cartbot.io" : "https://api.partbot.io"}/v1/vehicles/auth`;
|
|
416
416
|
try {
|
|
417
|
-
const
|
|
417
|
+
const n = await fetch(r, {
|
|
418
418
|
method: "POST",
|
|
419
419
|
headers: {
|
|
420
420
|
"Content-Type": "application/json",
|
|
421
|
-
Authorization: `Bearer ${
|
|
421
|
+
Authorization: `Bearer ${y}`,
|
|
422
422
|
referrerPolicy: "no-referrer"
|
|
423
423
|
},
|
|
424
424
|
body: JSON.stringify(
|
|
425
425
|
(() => {
|
|
426
|
-
const
|
|
427
|
-
return
|
|
426
|
+
const p = { use_store_vehicles: re };
|
|
427
|
+
return J && (p.store = J), p;
|
|
428
428
|
})()
|
|
429
429
|
)
|
|
430
430
|
});
|
|
431
|
-
if (!
|
|
432
|
-
throw new Error(`Error: ${
|
|
431
|
+
if (!n.ok)
|
|
432
|
+
throw new Error(`Error: ${n.status} ${n.statusText}`);
|
|
433
433
|
const {
|
|
434
434
|
merchant: o,
|
|
435
|
-
vehicle_makes:
|
|
436
|
-
vehicle_models:
|
|
435
|
+
vehicle_makes: l,
|
|
436
|
+
vehicle_models: s,
|
|
437
437
|
meilisearch_search_key: c,
|
|
438
|
-
meilisearch_index_name:
|
|
439
|
-
algolia_search_key:
|
|
438
|
+
meilisearch_index_name: f,
|
|
439
|
+
algolia_search_key: S,
|
|
440
440
|
// Fallback for backward compatibility
|
|
441
|
-
algolia_index_name:
|
|
441
|
+
algolia_index_name: de,
|
|
442
442
|
// Fallback for backward compatibility
|
|
443
|
-
store_index_name:
|
|
444
|
-
store_popular_makes:
|
|
443
|
+
store_index_name: ie,
|
|
444
|
+
store_popular_makes: h,
|
|
445
445
|
// Array of popular make values for this store (from PostHog)
|
|
446
|
-
store_popular_models:
|
|
446
|
+
store_popular_models: z
|
|
447
447
|
// Object mapping makes to popular models: { "TOYOTA": ["HILUX", "LANDCRUISER"], ... }
|
|
448
|
-
} = await
|
|
449
|
-
|
|
450
|
-
...
|
|
451
|
-
refinement:
|
|
452
|
-
})),
|
|
448
|
+
} = await n.json();
|
|
449
|
+
_.current = o, oe.current = (l || []).map((p) => ({
|
|
450
|
+
...p,
|
|
451
|
+
refinement: p.value
|
|
452
|
+
})), X.current = Array.isArray(s) ? s.map((p) => p && p.value ? String(p.value).trim() : "").filter(Boolean) : [], T.current = Array.isArray(h) ? h.map((p) => String(p).trim().toUpperCase()) : null, console.log(
|
|
453
453
|
"[VehicleSearch] PostHog popular makes:",
|
|
454
|
-
|
|
455
|
-
),
|
|
454
|
+
T.current
|
|
455
|
+
), E.current = z || null, console.log(
|
|
456
456
|
"[VehicleSearch] PostHog popular models:",
|
|
457
|
-
|
|
457
|
+
E.current
|
|
458
458
|
), Je({
|
|
459
459
|
searchKey: "f0be4e6a192a51ad360e4f5886be389d34334bb930bb32e5cd6d32ceddba17ff",
|
|
460
460
|
indexName: "otto_v1_vehicles_production",
|
|
461
|
-
storeIndexName:
|
|
461
|
+
storeIndexName: ie || "shopify_partbot-app-test_development"
|
|
462
462
|
});
|
|
463
|
-
} catch (
|
|
464
|
-
console.error("[VehicleSearch] Auth failed:",
|
|
463
|
+
} catch (n) {
|
|
464
|
+
console.error("[VehicleSearch] Auth failed:", n), Xe(n);
|
|
465
465
|
}
|
|
466
|
-
}, [
|
|
467
|
-
|
|
466
|
+
}, [y, J, re, L]);
|
|
467
|
+
P(() => {
|
|
468
468
|
Pe();
|
|
469
|
-
}, [Pe]),
|
|
470
|
-
if (
|
|
469
|
+
}, [Pe]), P(() => {
|
|
470
|
+
if (ne.searchKey) {
|
|
471
471
|
try {
|
|
472
|
-
|
|
472
|
+
q.current = new yt({
|
|
473
473
|
host: "https://search.partbot.io",
|
|
474
|
-
apiKey:
|
|
475
|
-
}),
|
|
474
|
+
apiKey: ne.searchKey
|
|
475
|
+
}), b.current = q.current.index(ne.indexName);
|
|
476
476
|
} catch (t) {
|
|
477
477
|
console.error("[VehicleSearch] Failed to initialize Meilisearch:", t);
|
|
478
478
|
}
|
|
479
479
|
return () => {
|
|
480
|
-
|
|
480
|
+
q.current = null;
|
|
481
481
|
};
|
|
482
482
|
}
|
|
483
|
-
}, [
|
|
484
|
-
const [
|
|
485
|
-
function t(
|
|
486
|
-
if (!
|
|
487
|
-
var c = r(),
|
|
488
|
-
return
|
|
483
|
+
}, [ne.searchKey, y]);
|
|
484
|
+
const [Z, Ge] = M(!1), Ie = N(() => {
|
|
485
|
+
function t(s) {
|
|
486
|
+
if (!s) return "rgba(0,0,0,1)";
|
|
487
|
+
var c = r(), f = window.getComputedStyle(s).backgroundColor;
|
|
488
|
+
return f !== c ? f : s.parentElement ? t(s.parentElement) : "rgba(255,255,255,1)";
|
|
489
489
|
}
|
|
490
490
|
function r() {
|
|
491
|
-
var
|
|
492
|
-
document.head.appendChild(
|
|
493
|
-
var c = window.getComputedStyle(
|
|
494
|
-
return document.head.removeChild(
|
|
491
|
+
var s = document.createElement("div");
|
|
492
|
+
document.head.appendChild(s);
|
|
493
|
+
var c = window.getComputedStyle(s).backgroundColor;
|
|
494
|
+
return document.head.removeChild(s), c;
|
|
495
495
|
}
|
|
496
|
-
const
|
|
496
|
+
const n = document.querySelector("vehicle-search");
|
|
497
497
|
let o;
|
|
498
|
-
|
|
499
|
-
const
|
|
500
|
-
|
|
498
|
+
n ? o = t(n) : o = t(B.current);
|
|
499
|
+
const l = kt(o).isDark();
|
|
500
|
+
Ge(l);
|
|
501
501
|
}, []);
|
|
502
|
-
|
|
502
|
+
P(() => {
|
|
503
503
|
async function t() {
|
|
504
|
-
if (!e.make || !
|
|
504
|
+
if (!e.make || !b.current)
|
|
505
505
|
return;
|
|
506
|
-
let r = [],
|
|
506
|
+
let r = [], n = [];
|
|
507
507
|
e.make && r.push(`make:${e.make.refinement}`), e.model && r.push(
|
|
508
508
|
`model:${e.make.refinement} > ${e.model.refinement}`
|
|
509
|
-
), e.year && (
|
|
509
|
+
), e.year && (n = [
|
|
510
510
|
`year_from <= ${e.year.value}`,
|
|
511
511
|
`year_to >= ${e.year.value}`
|
|
512
512
|
]), e.body && r.push(
|
|
@@ -514,24 +514,24 @@ function _t({
|
|
|
514
514
|
), e.series && r.push(`series:${e.series.refinement}`), e.engine && r.push(`engine:${e.engine.refinement}`), e.engine_capacity && r.push(
|
|
515
515
|
`engine_capacity:${e.engine_capacity.refinement}`
|
|
516
516
|
);
|
|
517
|
-
let
|
|
518
|
-
filter:
|
|
517
|
+
let l = (await b.current.search("", {
|
|
518
|
+
filter: me(r, n),
|
|
519
519
|
attributesToRetrieve: ["otto_id"],
|
|
520
520
|
limit: 500
|
|
521
521
|
// Reduced from 1000 for faster queries
|
|
522
|
-
})).hits.map((
|
|
523
|
-
|
|
522
|
+
})).hits.map((f) => f.otto_id);
|
|
523
|
+
ze(l);
|
|
524
524
|
let c = {
|
|
525
525
|
...Object.fromEntries(
|
|
526
|
-
Object.entries(e || {}).map(([
|
|
526
|
+
Object.entries(e || {}).map(([f, S]) => [f, S && S.value || null]).filter(([f, S]) => S !== null)
|
|
527
527
|
),
|
|
528
|
-
merchant:
|
|
528
|
+
merchant: _.current
|
|
529
529
|
};
|
|
530
530
|
Ne.capture("vehicle select", c);
|
|
531
531
|
}
|
|
532
532
|
t();
|
|
533
|
-
}, [e,
|
|
534
|
-
const $e = (t) =>
|
|
533
|
+
}, [e, b, w]);
|
|
534
|
+
const $e = (t) => j ? `${j}${t}` : t, et = (t) => j ? t.replace(new RegExp(`^${j}`), "") : t, tt = N(() => {
|
|
535
535
|
const t = new URL(window.location.href).searchParams, r = [
|
|
536
536
|
"make",
|
|
537
537
|
"model",
|
|
@@ -540,72 +540,72 @@ function _t({
|
|
|
540
540
|
"series",
|
|
541
541
|
"engine",
|
|
542
542
|
"engine_capacity"
|
|
543
|
-
].map($e),
|
|
544
|
-
[...t.entries()].filter(([o]) => r.includes(o)).map(([o,
|
|
543
|
+
].map($e), n = Object.fromEntries(
|
|
544
|
+
[...t.entries()].filter(([o]) => r.includes(o)).map(([o, l]) => [et(o), { value: l, refinement: l }])
|
|
545
545
|
);
|
|
546
|
-
|
|
547
|
-
}, []),
|
|
548
|
-
if (
|
|
546
|
+
Q(n);
|
|
547
|
+
}, []), V = N(({ query: t, value: r, remove: n }) => {
|
|
548
|
+
if (G && "URLSearchParams" in window) {
|
|
549
549
|
let o = new URLSearchParams(window.location.search);
|
|
550
|
-
t = $e(t), t && r && o.set(t, r), t && !r && o.delete(t),
|
|
551
|
-
|
|
550
|
+
t = $e(t), t && r && o.set(t, r), t && !r && o.delete(t), n && n.forEach((s) => {
|
|
551
|
+
s = $e(s), o.delete(s);
|
|
552
552
|
});
|
|
553
|
-
const
|
|
554
|
-
window.history.pushState(null, "",
|
|
553
|
+
const l = window.location.pathname + "?" + o.toString();
|
|
554
|
+
window.history.pushState(null, "", l);
|
|
555
555
|
}
|
|
556
|
-
}, []),
|
|
557
|
-
var
|
|
556
|
+
}, []), rt = N(() => {
|
|
557
|
+
var n;
|
|
558
558
|
const t = {
|
|
559
|
-
vehicle_ids:
|
|
560
|
-
vehicle: (
|
|
559
|
+
vehicle_ids: ae,
|
|
560
|
+
vehicle: (n = e == null ? void 0 : e.make) != null && n.value ? e : {}
|
|
561
561
|
};
|
|
562
|
-
|
|
562
|
+
H && H(t);
|
|
563
563
|
const r = new CustomEvent("vehicle-search-submit", {
|
|
564
564
|
detail: t
|
|
565
565
|
});
|
|
566
566
|
document.dispatchEvent(r), setTimeout(() => {
|
|
567
567
|
Me(!1);
|
|
568
568
|
}, 900);
|
|
569
|
-
}, [
|
|
570
|
-
var
|
|
569
|
+
}, [ae, H]), Le = N(() => {
|
|
570
|
+
var n, o, l, s, c, f, S, de, ie;
|
|
571
571
|
const t = {
|
|
572
|
-
vehicle_ids:
|
|
573
|
-
vehicle: (
|
|
572
|
+
vehicle_ids: ae,
|
|
573
|
+
vehicle: (n = e == null ? void 0 : e.make) != null && n.value ? e : {}
|
|
574
574
|
};
|
|
575
|
-
|
|
575
|
+
u && u(t);
|
|
576
576
|
const r = new CustomEvent("vehicle-search-change", {
|
|
577
577
|
detail: t
|
|
578
578
|
});
|
|
579
|
-
if (
|
|
580
|
-
const
|
|
581
|
-
description: `${((o = e.make) == null ? void 0 : o.value) || ""} ${((
|
|
582
|
-
vehicle_ids:
|
|
583
|
-
vehicle: e ? Object.entries(e).reduce((
|
|
579
|
+
if (A.current === !0 && !localStorage.getItem("partbot_plate_details")) {
|
|
580
|
+
const h = JSON.stringify({
|
|
581
|
+
description: `${((o = e.make) == null ? void 0 : o.value) || ""} ${((l = e.model) == null ? void 0 : l.value) || ""} ${((s = e.year) == null ? void 0 : s.value) || ""} ${((c = e.body) == null ? void 0 : c.value) || ""} ${((f = e.series) == null ? void 0 : f.value) || ""} ${((S = e.variant) == null ? void 0 : S.value) || ""} ${((de = e.engine) == null ? void 0 : de.value) || ""} ${((ie = e.engine_capacity) == null ? void 0 : ie.value) || ""}`.trim(),
|
|
582
|
+
vehicle_ids: ae,
|
|
583
|
+
vehicle: e ? Object.entries(e).reduce((z, [p, ee]) => (z[p] = ee != null && ee.value ? ee.value : {}, z), {}) : {}
|
|
584
584
|
});
|
|
585
585
|
localStorage.setItem(
|
|
586
586
|
"partbot_selected_vehicle",
|
|
587
|
-
|
|
588
|
-
),
|
|
587
|
+
h
|
|
588
|
+
), ht.set("partbot_selected_vehicle", h, {
|
|
589
589
|
secure: !0
|
|
590
590
|
});
|
|
591
591
|
}
|
|
592
|
-
document.dispatchEvent(r),
|
|
592
|
+
document.dispatchEvent(r), Qe.current = ae, setTimeout(() => {
|
|
593
593
|
Me(!1);
|
|
594
594
|
}, 900);
|
|
595
|
-
}, [
|
|
596
|
-
() =>
|
|
595
|
+
}, [ae, u]), Ce = pt(
|
|
596
|
+
() => xt(Le, 100),
|
|
597
597
|
[Le]
|
|
598
598
|
);
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
}, [
|
|
602
|
-
|
|
603
|
-
}, [
|
|
604
|
-
|
|
605
|
-
}, [
|
|
606
|
-
|
|
599
|
+
P(() => {
|
|
600
|
+
Ce();
|
|
601
|
+
}, [ae, Ce]), P(() => () => {
|
|
602
|
+
Ce.cancel();
|
|
603
|
+
}, [Ce]), P(() => {
|
|
604
|
+
ne.searchKey && (m || lt(), tt());
|
|
605
|
+
}, [ne.searchKey, m]), P(() => {
|
|
606
|
+
m && b.current && ce.length === 0 && !e.year && (console.log(
|
|
607
607
|
"[VehicleSearch] YMM mode: Loading year range from dataset..."
|
|
608
|
-
),
|
|
608
|
+
), b.current.search("", {
|
|
609
609
|
attributesToRetrieve: ["year_from", "year_to"],
|
|
610
610
|
limit: 1e4
|
|
611
611
|
}).then(({ hits: t }) => {
|
|
@@ -614,37 +614,37 @@ function _t({
|
|
|
614
614
|
t.length,
|
|
615
615
|
"hits for year range"
|
|
616
616
|
);
|
|
617
|
-
const r = t.map((c) => c.year_from).filter(Boolean),
|
|
617
|
+
const r = t.map((c) => c.year_from).filter(Boolean), n = t.map((c) => c.year_to).filter(Boolean), o = Math.min(...r), l = Math.max(...n);
|
|
618
618
|
console.log(
|
|
619
619
|
"[VehicleSearch] YMM mode: Year range:",
|
|
620
620
|
o,
|
|
621
621
|
"-",
|
|
622
|
-
|
|
622
|
+
l
|
|
623
623
|
);
|
|
624
|
-
const
|
|
625
|
-
{ length:
|
|
626
|
-
(c,
|
|
624
|
+
const s = Array.from(
|
|
625
|
+
{ length: l - o + 1 },
|
|
626
|
+
(c, f) => ({ value: o + f, refinement: o + f })
|
|
627
627
|
).reverse();
|
|
628
628
|
console.log(
|
|
629
629
|
"[VehicleSearch] YMM mode: Setting",
|
|
630
|
-
|
|
630
|
+
s.length,
|
|
631
631
|
"years"
|
|
632
|
-
),
|
|
632
|
+
), he(s);
|
|
633
633
|
}).catch((t) => {
|
|
634
634
|
console.error("[VehicleSearch] Error loading year range:", t);
|
|
635
635
|
}));
|
|
636
|
-
}, [
|
|
637
|
-
typeof document > "u" ||
|
|
638
|
-
}, [
|
|
639
|
-
const
|
|
636
|
+
}, [m, ne.searchKey, ce.length, e.year]), P(() => {
|
|
637
|
+
typeof document > "u" || Ie();
|
|
638
|
+
}, [Ie]);
|
|
639
|
+
const Be = N(
|
|
640
640
|
(t) => {
|
|
641
|
-
|
|
641
|
+
A.current = !0, ve([]), !m && !w && he([]), ge([]), be([]), we([]), xe([]), ye([]), Q((r) => ({
|
|
642
642
|
make: t,
|
|
643
|
-
year:
|
|
644
|
-
})),
|
|
643
|
+
year: m || w ? r.year : null
|
|
644
|
+
})), V({
|
|
645
645
|
query: "make",
|
|
646
646
|
value: (t == null ? void 0 : t.value) ?? "",
|
|
647
|
-
remove:
|
|
647
|
+
remove: m ? ["model", "body", "series", "engine", "variant", "engine_capacity"] : w ? [
|
|
648
648
|
"model",
|
|
649
649
|
"body",
|
|
650
650
|
"series",
|
|
@@ -660,25 +660,25 @@ function _t({
|
|
|
660
660
|
"variant",
|
|
661
661
|
"engine_capacity"
|
|
662
662
|
]
|
|
663
|
-
}), t ||
|
|
663
|
+
}), t || ze([]);
|
|
664
664
|
},
|
|
665
|
-
[
|
|
666
|
-
),
|
|
665
|
+
[V, m, w]
|
|
666
|
+
), De = N(
|
|
667
667
|
(t) => {
|
|
668
|
-
|
|
668
|
+
A.current = !0, Q((r) => ({
|
|
669
669
|
...r,
|
|
670
670
|
model: t !== "" ? t : null,
|
|
671
|
-
year:
|
|
671
|
+
year: m || w ? r.year : null,
|
|
672
672
|
// Preserve year in YMM mode or yearOptional mode
|
|
673
673
|
body: null,
|
|
674
674
|
series: null,
|
|
675
675
|
variant: null,
|
|
676
676
|
engine: null,
|
|
677
677
|
engine_capacity: null
|
|
678
|
-
})), !
|
|
678
|
+
})), !m && !w && he([]), ge([]), be([]), we([]), xe([]), ye([]), V({
|
|
679
679
|
query: "model",
|
|
680
680
|
value: (t == null ? void 0 : t.value) ?? "",
|
|
681
|
-
remove:
|
|
681
|
+
remove: m ? ["body", "series", "engine", "variant", "engine_capacity"] : w ? ["body", "series", "engine", "variant", "engine_capacity"] : [
|
|
682
682
|
"year",
|
|
683
683
|
"body",
|
|
684
684
|
"series",
|
|
@@ -688,12 +688,12 @@ function _t({
|
|
|
688
688
|
]
|
|
689
689
|
});
|
|
690
690
|
},
|
|
691
|
-
[
|
|
692
|
-
),
|
|
691
|
+
[V, m, w]
|
|
692
|
+
), Fe = N(
|
|
693
693
|
(t) => {
|
|
694
|
-
|
|
694
|
+
A.current = !0, m ? (pe([]), ve([]), Q({
|
|
695
695
|
year: t !== "" ? t : null
|
|
696
|
-
}), (!t || t === "") &&
|
|
696
|
+
}), (!t || t === "") && he([])) : Q(w ? (r) => ({
|
|
697
697
|
...r,
|
|
698
698
|
year: t !== "" ? t : null
|
|
699
699
|
}) : (r) => ({
|
|
@@ -704,10 +704,10 @@ function _t({
|
|
|
704
704
|
variant: null,
|
|
705
705
|
engine: null,
|
|
706
706
|
engine_capacity: null
|
|
707
|
-
})),
|
|
707
|
+
})), w || (ge([]), be([]), we([]), xe([]), ye([])), V({
|
|
708
708
|
query: "year",
|
|
709
709
|
value: (t == null ? void 0 : t.value) ?? "",
|
|
710
|
-
remove:
|
|
710
|
+
remove: m ? [
|
|
711
711
|
"make",
|
|
712
712
|
"model",
|
|
713
713
|
"body",
|
|
@@ -715,199 +715,212 @@ function _t({
|
|
|
715
715
|
"variant",
|
|
716
716
|
"engine",
|
|
717
717
|
"engine_capacity"
|
|
718
|
-
] :
|
|
719
|
-
}), !
|
|
718
|
+
] : w ? [] : ["body", "series", "variant", "engine", "engine_capacity"]
|
|
719
|
+
}), !w && (!t || t === "") && ze([]);
|
|
720
720
|
},
|
|
721
|
-
[
|
|
722
|
-
),
|
|
721
|
+
[V, m, w]
|
|
722
|
+
), ot = N(
|
|
723
723
|
(t) => {
|
|
724
|
-
|
|
724
|
+
A.current = !0, Q((r) => ({
|
|
725
725
|
...r,
|
|
726
726
|
body: t !== "" ? t : null
|
|
727
|
-
})),
|
|
727
|
+
})), V({
|
|
728
728
|
query: "body",
|
|
729
729
|
value: (t == null ? void 0 : t.value) ?? ""
|
|
730
730
|
});
|
|
731
731
|
},
|
|
732
|
-
[
|
|
733
|
-
),
|
|
732
|
+
[V]
|
|
733
|
+
), at = N(
|
|
734
734
|
(t) => {
|
|
735
|
-
|
|
735
|
+
A.current = !0, Q((r) => ({
|
|
736
736
|
...r,
|
|
737
737
|
series: t !== "" ? t : null
|
|
738
|
-
})),
|
|
738
|
+
})), V({
|
|
739
739
|
query: "series",
|
|
740
740
|
value: (t == null ? void 0 : t.value) ?? ""
|
|
741
741
|
});
|
|
742
742
|
},
|
|
743
|
-
[
|
|
744
|
-
),
|
|
743
|
+
[V]
|
|
744
|
+
), nt = N(
|
|
745
745
|
(t) => {
|
|
746
|
-
|
|
746
|
+
A.current = !0, Q((r) => ({
|
|
747
747
|
...r,
|
|
748
748
|
variant: t !== "" ? t : null
|
|
749
|
-
})),
|
|
749
|
+
})), V({
|
|
750
750
|
query: "variant",
|
|
751
751
|
value: (t == null ? void 0 : t.value) ?? ""
|
|
752
752
|
});
|
|
753
753
|
},
|
|
754
|
-
[
|
|
755
|
-
),
|
|
754
|
+
[V]
|
|
755
|
+
), it = N(
|
|
756
756
|
(t) => {
|
|
757
|
-
|
|
757
|
+
A.current = !0, Q((r) => ({
|
|
758
758
|
...r,
|
|
759
759
|
engine: t !== "" ? t : null
|
|
760
|
-
})),
|
|
760
|
+
})), V({
|
|
761
761
|
query: "engine",
|
|
762
762
|
value: (t == null ? void 0 : t.value) ?? ""
|
|
763
763
|
});
|
|
764
764
|
},
|
|
765
|
-
[
|
|
766
|
-
),
|
|
765
|
+
[V]
|
|
766
|
+
), st = N(
|
|
767
767
|
(t) => {
|
|
768
|
-
|
|
768
|
+
A.current = !0, Q((r) => ({
|
|
769
769
|
...r,
|
|
770
770
|
engine_capacity: t !== "" ? t : null
|
|
771
|
-
})),
|
|
771
|
+
})), V({
|
|
772
772
|
query: "engine_capacity",
|
|
773
773
|
value: (t == null ? void 0 : t.value) ?? ""
|
|
774
774
|
});
|
|
775
775
|
},
|
|
776
|
-
[
|
|
776
|
+
[V]
|
|
777
777
|
);
|
|
778
|
-
|
|
779
|
-
|
|
778
|
+
P(() => {
|
|
779
|
+
m && e.year && b.current && (async () => {
|
|
780
780
|
try {
|
|
781
|
-
const r = await
|
|
781
|
+
const r = await b.current.search("", {
|
|
782
782
|
filter: `year_from <= ${e.year.value} AND year_to >= ${e.year.value}`,
|
|
783
783
|
attributesToRetrieve: ["make", "make_popularity"],
|
|
784
784
|
limit: 1e4
|
|
785
|
-
}),
|
|
786
|
-
r.hits.forEach((
|
|
787
|
-
|
|
788
|
-
value:
|
|
789
|
-
refinement:
|
|
790
|
-
popularity:
|
|
785
|
+
}), n = /* @__PURE__ */ new Map();
|
|
786
|
+
r.hits.forEach((s) => {
|
|
787
|
+
s.make && !n.has(s.make) && n.set(s.make, {
|
|
788
|
+
value: s.make.toUpperCase(),
|
|
789
|
+
refinement: s.make.toUpperCase(),
|
|
790
|
+
popularity: s.make_popularity || 0
|
|
791
791
|
});
|
|
792
792
|
});
|
|
793
|
-
let o = Array.from(
|
|
794
|
-
const
|
|
795
|
-
|
|
796
|
-
const
|
|
797
|
-
return
|
|
793
|
+
let o = Array.from(n.values());
|
|
794
|
+
const l = new Set(T.current || []);
|
|
795
|
+
l.size > 0 ? o.sort((s, c) => {
|
|
796
|
+
const f = l.has(s.value), S = l.has(c.value);
|
|
797
|
+
return f && !S ? -1 : !f && S ? 1 : f && S ? T.current.indexOf(s.value) - T.current.indexOf(c.value) : s.value.localeCompare(c.value);
|
|
798
798
|
}) : o.sort(
|
|
799
|
-
(
|
|
800
|
-
),
|
|
799
|
+
(s, c) => c.popularity === s.popularity ? s.value.localeCompare(c.value) : c.popularity - s.popularity
|
|
800
|
+
), pe(o);
|
|
801
801
|
} catch (r) {
|
|
802
802
|
console.error("[VehicleSearch] Error loading makes for year:", r);
|
|
803
803
|
}
|
|
804
804
|
})();
|
|
805
|
-
}, [
|
|
806
|
-
const
|
|
805
|
+
}, [m, e.year]);
|
|
806
|
+
const lt = N(() => {
|
|
807
807
|
(async () => {
|
|
808
808
|
let r = [];
|
|
809
|
-
if (
|
|
810
|
-
r =
|
|
811
|
-
else if (
|
|
809
|
+
if (oe.current && oe.current.length)
|
|
810
|
+
r = oe.current;
|
|
811
|
+
else if (b.current)
|
|
812
812
|
try {
|
|
813
|
-
const
|
|
813
|
+
const n = await b.current.search("", {
|
|
814
814
|
attributesToRetrieve: ["make", "make_popularity"],
|
|
815
815
|
limit: 1e3
|
|
816
816
|
}), o = /* @__PURE__ */ new Map();
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
value:
|
|
820
|
-
refinement:
|
|
821
|
-
popularity:
|
|
817
|
+
n.hits.forEach((l) => {
|
|
818
|
+
l.make && !o.has(l.make) && o.set(l.make, {
|
|
819
|
+
value: l.make.toUpperCase(),
|
|
820
|
+
refinement: l.make.toUpperCase(),
|
|
821
|
+
popularity: l.make_popularity || 0
|
|
822
822
|
});
|
|
823
823
|
}), r = Array.from(o.values());
|
|
824
|
-
} catch (
|
|
825
|
-
console.error("[VehicleSearch] Error loading makes:",
|
|
824
|
+
} catch (n) {
|
|
825
|
+
console.error("[VehicleSearch] Error loading makes:", n);
|
|
826
826
|
}
|
|
827
|
-
if (
|
|
828
|
-
const
|
|
827
|
+
if (v && r.length) {
|
|
828
|
+
const n = v.trim().split(",").map((o) => o.trim().toUpperCase());
|
|
829
829
|
r = r.filter(
|
|
830
|
-
(o) =>
|
|
830
|
+
(o) => n.includes(o.value)
|
|
831
831
|
);
|
|
832
832
|
}
|
|
833
|
-
if (
|
|
834
|
-
const
|
|
835
|
-
r.sort((o,
|
|
836
|
-
const
|
|
837
|
-
return
|
|
833
|
+
if (T.current && T.current.length > 0) {
|
|
834
|
+
const n = new Set(T.current);
|
|
835
|
+
r.sort((o, l) => {
|
|
836
|
+
const s = n.has(o.value), c = n.has(l.value);
|
|
837
|
+
return s && !c ? -1 : !s && c ? 1 : s && c ? T.current.indexOf(o.value) - T.current.indexOf(l.value) : o.value.localeCompare(l.value);
|
|
838
838
|
});
|
|
839
839
|
} else
|
|
840
|
-
r.sort((
|
|
841
|
-
|
|
840
|
+
r.sort((n, o) => n.popularity === o.popularity ? n.value.localeCompare(o.value) : o.popularity - n.popularity);
|
|
841
|
+
pe(r);
|
|
842
842
|
})();
|
|
843
|
-
}, [
|
|
844
|
-
|
|
845
|
-
if (
|
|
843
|
+
}, [v]);
|
|
844
|
+
P(() => {
|
|
845
|
+
if (b.current && e.make && e.make.refinement && y) {
|
|
846
846
|
let t = [`make:${e.make.refinement}`], r = [];
|
|
847
|
-
|
|
847
|
+
m && e.year && (r = [
|
|
848
848
|
`year_from <= ${e.year.value}`,
|
|
849
849
|
`year_to >= ${e.year.value}`
|
|
850
|
-
])
|
|
851
|
-
|
|
850
|
+
]);
|
|
851
|
+
const n = me(t, r);
|
|
852
|
+
console.log("[VehicleSearch] Fetching models with filter:", n), b.current.search("", {
|
|
853
|
+
filter: n,
|
|
852
854
|
attributesToRetrieve: ["model", "model_popularity", "otto_id"],
|
|
853
855
|
limit: 1e3
|
|
854
856
|
// Meilisearch can handle larger limits efficiently
|
|
855
|
-
}).then(({ hits:
|
|
856
|
-
var
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
857
|
+
}).then(({ hits: o }) => {
|
|
858
|
+
var de, ie;
|
|
859
|
+
console.log(
|
|
860
|
+
"[VehicleSearch] Models search returned hits:",
|
|
861
|
+
o.length
|
|
862
|
+
);
|
|
863
|
+
const l = Array.isArray(X.current) ? X.current : typeof X.current == "string" && X.current.length ? X.current.split(",").map((h) => h.trim()).filter(Boolean) : [];
|
|
864
|
+
let s = l;
|
|
865
|
+
if (d) {
|
|
866
|
+
const h = d.trim().split(",").map((p) => p.trim()).filter(Boolean), z = new Set(
|
|
867
|
+
h.map((p) => p.toLowerCase())
|
|
862
868
|
);
|
|
863
|
-
s =
|
|
864
|
-
(
|
|
865
|
-
) :
|
|
866
|
-
(
|
|
867
|
-
|
|
869
|
+
s = l.length ? l.filter(
|
|
870
|
+
(p) => z.has(String(p).toLowerCase())
|
|
871
|
+
) : h, o = o.filter(
|
|
872
|
+
(p) => z.has(
|
|
873
|
+
p.model.match(/[^>]*$/)[0].trim().toLowerCase()
|
|
868
874
|
)
|
|
869
875
|
);
|
|
870
876
|
}
|
|
871
|
-
if (s && s.length) {
|
|
872
|
-
const
|
|
873
|
-
s.map((
|
|
877
|
+
if (s && s.length > 0) {
|
|
878
|
+
const h = new Set(
|
|
879
|
+
s.map((p) => String(p).toLowerCase())
|
|
874
880
|
);
|
|
875
|
-
|
|
876
|
-
(
|
|
877
|
-
|
|
881
|
+
o.some(
|
|
882
|
+
(p) => h.has(
|
|
883
|
+
p.model.match(/[^>]*$/)[0].trim().toLowerCase()
|
|
878
884
|
)
|
|
879
|
-
)
|
|
885
|
+
) && (o = o.filter(
|
|
886
|
+
(p) => h.has(
|
|
887
|
+
p.model.match(/[^>]*$/)[0].trim().toLowerCase()
|
|
888
|
+
)
|
|
889
|
+
));
|
|
880
890
|
}
|
|
881
|
-
let
|
|
882
|
-
|
|
883
|
-
value:
|
|
884
|
-
refinement:
|
|
885
|
-
popularity:
|
|
891
|
+
let c = /* @__PURE__ */ new Set();
|
|
892
|
+
o = o.filter((h) => h.model && h.model !== "" && !c.has(h.model) && h.model.match(/[^>]*$/)[0].trim() !== "" ? (c.add(h.model), !0) : !1), o = o.map((h) => ({
|
|
893
|
+
value: h.model.match(/[^>]*$/)[0].trim(),
|
|
894
|
+
refinement: h.model.match(/[^>]*$/)[0].trim(),
|
|
895
|
+
popularity: h.model_popularity
|
|
886
896
|
}));
|
|
887
|
-
const
|
|
888
|
-
if (
|
|
889
|
-
const
|
|
890
|
-
|
|
897
|
+
const f = (de = e.make) == null ? void 0 : de.refinement, S = (ie = E.current) == null ? void 0 : ie[f];
|
|
898
|
+
if (S && Array.isArray(S) && S.length > 0) {
|
|
899
|
+
const h = new Set(
|
|
900
|
+
S.map((z) => String(z).trim().toUpperCase())
|
|
891
901
|
);
|
|
892
|
-
|
|
893
|
-
const
|
|
894
|
-
if (
|
|
895
|
-
if (!
|
|
896
|
-
if (
|
|
897
|
-
const
|
|
898
|
-
(
|
|
902
|
+
o.sort((z, p) => {
|
|
903
|
+
const ee = h.has(z.value), Ae = h.has(p.value);
|
|
904
|
+
if (ee && !Ae) return -1;
|
|
905
|
+
if (!ee && Ae) return 1;
|
|
906
|
+
if (ee && Ae) {
|
|
907
|
+
const Ue = S.map(
|
|
908
|
+
(dt) => String(dt).trim().toUpperCase()
|
|
899
909
|
);
|
|
900
|
-
return
|
|
910
|
+
return Ue.indexOf(z.value) - Ue.indexOf(p.value);
|
|
901
911
|
}
|
|
902
|
-
return
|
|
912
|
+
return z.value.localeCompare(p.value);
|
|
903
913
|
});
|
|
904
914
|
} else
|
|
905
|
-
|
|
906
|
-
|
|
915
|
+
o.sort((h, z) => h.popularity === z.popularity ? h.value.localeCompare(z.value) : z.popularity - h.popularity);
|
|
916
|
+
ve(o);
|
|
917
|
+
}).catch((o) => {
|
|
918
|
+
console.error("[VehicleSearch] Error loading models:", o), ve([]);
|
|
907
919
|
});
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
|
|
920
|
+
} else
|
|
921
|
+
ve([]);
|
|
922
|
+
}, [e.make, d, y, m, e.year]), P(() => {
|
|
923
|
+
if (b.current && e.make && e.model) {
|
|
911
924
|
console.log(
|
|
912
925
|
"[VehicleSearch] Fetching year range for:",
|
|
913
926
|
e.make.refinement,
|
|
@@ -917,12 +930,12 @@ function _t({
|
|
|
917
930
|
let t = [
|
|
918
931
|
`model:${e.make.refinement} > ${e.model.refinement}`
|
|
919
932
|
];
|
|
920
|
-
|
|
933
|
+
w && (e.body && t.push(
|
|
921
934
|
`body:${e.make.refinement} > ${e.model.refinement} > ${e.body.refinement}`
|
|
922
935
|
), e.series && t.push(`series:${e.series.refinement}`), e.engine && t.push(`engine:${e.engine.refinement}`), e.engine_capacity && t.push(
|
|
923
936
|
`engine_capacity:${e.engine_capacity.refinement}`
|
|
924
|
-
)),
|
|
925
|
-
filter:
|
|
937
|
+
)), b.current.search("", {
|
|
938
|
+
filter: me(t, []),
|
|
926
939
|
attributesToRetrieve: ["year_from", "year_to", "otto_id"],
|
|
927
940
|
limit: 200
|
|
928
941
|
// Reduced from 1000 for faster queries
|
|
@@ -931,13 +944,13 @@ function _t({
|
|
|
931
944
|
"[VehicleSearch] Year search returned hits:",
|
|
932
945
|
r.length
|
|
933
946
|
);
|
|
934
|
-
const
|
|
947
|
+
const n = r.map((f) => f.year_from), o = Math.min(...n), l = r.map((f) => f.year_to), s = Math.max(...l);
|
|
935
948
|
let c = Array.apply(null, {
|
|
936
|
-
length:
|
|
937
|
-
}).map(function(
|
|
938
|
-
return
|
|
949
|
+
length: s + 1 - o
|
|
950
|
+
}).map(function(f, S) {
|
|
951
|
+
return S + o;
|
|
939
952
|
});
|
|
940
|
-
c = c.reverse().map((
|
|
953
|
+
c = c.reverse().map((f) => ({ value: f, refinement: f })), he(c);
|
|
941
954
|
}).catch((r) => {
|
|
942
955
|
console.error("[VehicleSearch] Error fetching years:", r);
|
|
943
956
|
});
|
|
@@ -945,49 +958,49 @@ function _t({
|
|
|
945
958
|
}, [
|
|
946
959
|
e.model,
|
|
947
960
|
e.make,
|
|
948
|
-
|
|
949
|
-
|
|
961
|
+
m,
|
|
962
|
+
w,
|
|
950
963
|
e.body,
|
|
951
964
|
e.series,
|
|
952
965
|
e.engine,
|
|
953
966
|
e.engine_capacity
|
|
954
|
-
]),
|
|
955
|
-
const t =
|
|
956
|
-
if (
|
|
967
|
+
]), P(() => {
|
|
968
|
+
const t = w ? e.make && e.model : e.year && e.make && e.model;
|
|
969
|
+
if (b.current && t) {
|
|
957
970
|
const r = e.year ? [
|
|
958
971
|
`year_from <= ${e.year.value}`,
|
|
959
972
|
`year_to >= ${e.year.value}`
|
|
960
973
|
] : [];
|
|
961
|
-
|
|
962
|
-
filter:
|
|
974
|
+
b.current.search("", {
|
|
975
|
+
filter: me(
|
|
963
976
|
[`model:${e.make.refinement} > ${e.model.refinement}`],
|
|
964
977
|
r
|
|
965
978
|
),
|
|
966
979
|
attributesToRetrieve: ["body", "otto_id"],
|
|
967
980
|
limit: 1e3
|
|
968
|
-
}).then(({ hits:
|
|
969
|
-
|
|
981
|
+
}).then(({ hits: n }) => {
|
|
982
|
+
n = [...new Map(n.map((o) => [o.body, o])).values()].map((o) => ({
|
|
970
983
|
value: o.body.match(/[^>]*$/)[0].trim(),
|
|
971
984
|
refinement: o.body.match(/[^>]*$/)[0].trim()
|
|
972
|
-
})).filter((o) => o.value),
|
|
985
|
+
})).filter((o) => o.value), ge(n);
|
|
973
986
|
});
|
|
974
987
|
}
|
|
975
|
-
}, [e.year, e.make, e.model,
|
|
976
|
-
const
|
|
988
|
+
}, [e.year, e.make, e.model, w]);
|
|
989
|
+
const ue = N(({ hits: t, attribute: r, stateCallback: n }) => {
|
|
977
990
|
let o = [
|
|
978
|
-
...new Map(t.map((
|
|
979
|
-
].map((
|
|
980
|
-
value:
|
|
981
|
-
refinement:
|
|
982
|
-
})).filter((
|
|
983
|
-
|
|
984
|
-
}, []),
|
|
985
|
-
const t =
|
|
991
|
+
...new Map(t.map((l) => [l[r], l])).values()
|
|
992
|
+
].map((l) => ({
|
|
993
|
+
value: l[r].match(/[^|]*$/)[0].trim(),
|
|
994
|
+
refinement: l[r].match(/[^|]*$/)[0].trim()
|
|
995
|
+
})).filter((l) => l.refinement);
|
|
996
|
+
n(o);
|
|
997
|
+
}, []), ct = N(() => {
|
|
998
|
+
const t = ke.current ? ke.current.length + 3 : 3, r = k ? t + 1 : t;
|
|
986
999
|
return `vs:lg:grid-cols-${r > 8 ? 8 : r}`;
|
|
987
|
-
}, [
|
|
988
|
-
|
|
989
|
-
const t =
|
|
990
|
-
if (
|
|
1000
|
+
}, [k]);
|
|
1001
|
+
P(() => {
|
|
1002
|
+
const t = w ? e.make && e.model : e.make && e.model && e.year;
|
|
1003
|
+
if (b.current && t) {
|
|
991
1004
|
let r = [
|
|
992
1005
|
`make:${e.make.refinement}`,
|
|
993
1006
|
`model:${e.make.refinement} > ${e.model.refinement}`,
|
|
@@ -997,12 +1010,12 @@ function _t({
|
|
|
997
1010
|
e.engine ? `engine:${e.engine.refinement}` : "",
|
|
998
1011
|
e.engine_capacity ? `engine_capacity:${e.engine_capacity.refinement}` : ""
|
|
999
1012
|
].filter((o) => o);
|
|
1000
|
-
const
|
|
1013
|
+
const n = e.year ? [
|
|
1001
1014
|
`year_from <= ${e.year.value}`,
|
|
1002
1015
|
`year_to >= ${e.year.value}`
|
|
1003
1016
|
] : [];
|
|
1004
|
-
|
|
1005
|
-
filter:
|
|
1017
|
+
b.current.search("", {
|
|
1018
|
+
filter: me(r, n),
|
|
1006
1019
|
attributesToRetrieve: [
|
|
1007
1020
|
"series",
|
|
1008
1021
|
"engine_capacity",
|
|
@@ -1013,22 +1026,22 @@ function _t({
|
|
|
1013
1026
|
],
|
|
1014
1027
|
limit: 1e3
|
|
1015
1028
|
}).then(({ hits: o }) => {
|
|
1016
|
-
|
|
1029
|
+
ue({
|
|
1017
1030
|
hits: o,
|
|
1018
1031
|
attribute: "series",
|
|
1019
|
-
stateCallback:
|
|
1020
|
-
}),
|
|
1032
|
+
stateCallback: be
|
|
1033
|
+
}), ue({
|
|
1021
1034
|
hits: o,
|
|
1022
1035
|
attribute: "variant",
|
|
1023
|
-
stateCallback:
|
|
1024
|
-
}),
|
|
1036
|
+
stateCallback: we
|
|
1037
|
+
}), ue({
|
|
1025
1038
|
hits: o,
|
|
1026
1039
|
attribute: "engine",
|
|
1027
|
-
stateCallback:
|
|
1028
|
-
}),
|
|
1040
|
+
stateCallback: ye
|
|
1041
|
+
}), ue({
|
|
1029
1042
|
hits: o,
|
|
1030
1043
|
attribute: "engine_capacity",
|
|
1031
|
-
stateCallback:
|
|
1044
|
+
stateCallback: xe
|
|
1032
1045
|
});
|
|
1033
1046
|
});
|
|
1034
1047
|
}
|
|
@@ -1038,20 +1051,20 @@ function _t({
|
|
|
1038
1051
|
e.variant,
|
|
1039
1052
|
e.engine,
|
|
1040
1053
|
e.engine_capacity,
|
|
1041
|
-
|
|
1054
|
+
ue,
|
|
1042
1055
|
e.make,
|
|
1043
1056
|
e.model,
|
|
1044
1057
|
e.year,
|
|
1045
|
-
|
|
1058
|
+
w
|
|
1046
1059
|
]);
|
|
1047
|
-
const [
|
|
1048
|
-
return
|
|
1049
|
-
if (
|
|
1050
|
-
return
|
|
1060
|
+
const [_e, Ee] = M(!1);
|
|
1061
|
+
return P(() => {
|
|
1062
|
+
if (R)
|
|
1063
|
+
return _e ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
1051
1064
|
document.body.style.overflow = "";
|
|
1052
1065
|
};
|
|
1053
|
-
}, [
|
|
1054
|
-
|
|
1066
|
+
}, [_e, R]), /* @__PURE__ */ $(Se, { children: [
|
|
1067
|
+
R && /* @__PURE__ */ a(
|
|
1055
1068
|
"button",
|
|
1056
1069
|
{
|
|
1057
1070
|
onClick: () => Ee(!0),
|
|
@@ -1060,16 +1073,16 @@ function _t({
|
|
|
1060
1073
|
"vehicle-search-btn vs:md:hidden!",
|
|
1061
1074
|
Y ? "vs:w-full! vs:flex! vs:shrink-0!" : "vs:w-auto! vs:inline-flex! vs:shrink!"
|
|
1062
1075
|
),
|
|
1063
|
-
children: /* @__PURE__ */
|
|
1076
|
+
children: /* @__PURE__ */ a("span", { children: i })
|
|
1064
1077
|
}
|
|
1065
1078
|
),
|
|
1066
|
-
|
|
1079
|
+
R && /* @__PURE__ */ a(
|
|
1067
1080
|
"div",
|
|
1068
1081
|
{
|
|
1069
1082
|
onClick: () => Ee(!1),
|
|
1070
1083
|
className: te(
|
|
1071
1084
|
"vs:z-10 vs:fixed vs:inset-0 vs:bg-stone-900 vs:transition-all vs:duration-300",
|
|
1072
|
-
|
|
1085
|
+
_e ? "vs:opacity-75" : "vs:pointer-events-none vs:opacity-0"
|
|
1073
1086
|
)
|
|
1074
1087
|
}
|
|
1075
1088
|
),
|
|
@@ -1077,13 +1090,13 @@ function _t({
|
|
|
1077
1090
|
"div",
|
|
1078
1091
|
{
|
|
1079
1092
|
className: te(
|
|
1080
|
-
|
|
1081
|
-
|
|
1093
|
+
"partbot-mmyvs-container",
|
|
1094
|
+
R && _e && "active",
|
|
1082
1095
|
"w-full"
|
|
1083
1096
|
),
|
|
1084
1097
|
children: [
|
|
1085
|
-
|
|
1086
|
-
/* @__PURE__ */
|
|
1098
|
+
R && /* @__PURE__ */ $("div", { className: "vs:flex vs:justify-between vs:items-center vs:pb-4 vs:font-bold vs:text-white vs:md:hidden", children: [
|
|
1099
|
+
/* @__PURE__ */ a("span", { children: "Select Vehicle" }),
|
|
1087
1100
|
/* @__PURE__ */ $(
|
|
1088
1101
|
"button",
|
|
1089
1102
|
{
|
|
@@ -1091,15 +1104,15 @@ function _t({
|
|
|
1091
1104
|
type: "button",
|
|
1092
1105
|
className: "vs:appearance-none vs:bg-transparent vs:border-none vs:ring-none vs:outline-none vs:hover:border-none vs:hover:ring-none vs:hover:outline-none",
|
|
1093
1106
|
children: [
|
|
1094
|
-
/* @__PURE__ */
|
|
1095
|
-
/* @__PURE__ */
|
|
1107
|
+
/* @__PURE__ */ a("span", { className: "vs:sr-only", children: "Close vehicle selection" }),
|
|
1108
|
+
/* @__PURE__ */ a("span", { className: "vs:h-5 vs:w-5 vs:text-white", children: /* @__PURE__ */ a(
|
|
1096
1109
|
"svg",
|
|
1097
1110
|
{
|
|
1098
1111
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1099
1112
|
fill: "currentColor",
|
|
1100
1113
|
viewBox: "0 0 256 256",
|
|
1101
1114
|
className: "vs:h-5 vs:w-5",
|
|
1102
|
-
children: /* @__PURE__ */
|
|
1115
|
+
children: /* @__PURE__ */ a("path", { d: "M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z" })
|
|
1103
1116
|
}
|
|
1104
1117
|
) })
|
|
1105
1118
|
]
|
|
@@ -1109,118 +1122,118 @@ function _t({
|
|
|
1109
1122
|
/* @__PURE__ */ $(
|
|
1110
1123
|
"div",
|
|
1111
1124
|
{
|
|
1112
|
-
ref:
|
|
1125
|
+
ref: B,
|
|
1113
1126
|
className: te(
|
|
1114
1127
|
"vs:grid vs:gap-3",
|
|
1115
|
-
I === "row" ? `${
|
|
1128
|
+
I === "row" ? `${ct()} vs:grid-cols-1 vs:md:grid-cols-3` : "vs:grid-cols-1 vs:md:max-w-[400px] vs:md:gap-5",
|
|
1116
1129
|
"vs:w-full vs:transition vs:lg:mx-auto"
|
|
1117
1130
|
),
|
|
1118
1131
|
children: [
|
|
1119
|
-
|
|
1120
|
-
/* @__PURE__ */
|
|
1121
|
-
|
|
1132
|
+
m ? /* @__PURE__ */ $(Se, { children: [
|
|
1133
|
+
/* @__PURE__ */ a(
|
|
1134
|
+
W,
|
|
1122
1135
|
{
|
|
1123
1136
|
label: "Year",
|
|
1124
|
-
items:
|
|
1125
|
-
refine:
|
|
1137
|
+
items: ce,
|
|
1138
|
+
refine: Fe,
|
|
1126
1139
|
selected: e.year,
|
|
1127
|
-
bgDark:
|
|
1128
|
-
showLabel:
|
|
1129
|
-
isMobile:
|
|
1140
|
+
bgDark: Z,
|
|
1141
|
+
showLabel: C,
|
|
1142
|
+
isMobile: K,
|
|
1130
1143
|
sortOptions: !1,
|
|
1131
|
-
loading:
|
|
1144
|
+
loading: ce.length === 0
|
|
1132
1145
|
}
|
|
1133
1146
|
),
|
|
1134
|
-
/* @__PURE__ */
|
|
1135
|
-
|
|
1147
|
+
/* @__PURE__ */ a(
|
|
1148
|
+
W,
|
|
1136
1149
|
{
|
|
1137
1150
|
label: "Make",
|
|
1138
|
-
items:
|
|
1139
|
-
refine:
|
|
1151
|
+
items: se,
|
|
1152
|
+
refine: Be,
|
|
1140
1153
|
selected: e.make,
|
|
1141
1154
|
showPopular: !0,
|
|
1142
|
-
bgDark:
|
|
1143
|
-
showLabel:
|
|
1144
|
-
isMobile:
|
|
1155
|
+
bgDark: Z,
|
|
1156
|
+
showLabel: C,
|
|
1157
|
+
isMobile: K,
|
|
1145
1158
|
sortOptions: !1,
|
|
1146
|
-
loading: e.year &&
|
|
1159
|
+
loading: e.year && se.length === 0
|
|
1147
1160
|
}
|
|
1148
1161
|
),
|
|
1149
|
-
/* @__PURE__ */
|
|
1150
|
-
|
|
1162
|
+
/* @__PURE__ */ a(
|
|
1163
|
+
W,
|
|
1151
1164
|
{
|
|
1152
1165
|
label: "Model",
|
|
1153
|
-
items:
|
|
1154
|
-
refine:
|
|
1166
|
+
items: le,
|
|
1167
|
+
refine: De,
|
|
1155
1168
|
selected: e.model,
|
|
1156
1169
|
showPopular: !0,
|
|
1157
|
-
bgDark:
|
|
1158
|
-
showLabel:
|
|
1159
|
-
isMobile:
|
|
1170
|
+
bgDark: Z,
|
|
1171
|
+
showLabel: C,
|
|
1172
|
+
isMobile: K,
|
|
1160
1173
|
sortOptions: !1,
|
|
1161
|
-
loading: e.make &&
|
|
1174
|
+
loading: e.make && le.length === 0
|
|
1162
1175
|
}
|
|
1163
1176
|
)
|
|
1164
|
-
] }) : /* @__PURE__ */ $(
|
|
1165
|
-
/* @__PURE__ */
|
|
1166
|
-
|
|
1177
|
+
] }) : /* @__PURE__ */ $(Se, { children: [
|
|
1178
|
+
/* @__PURE__ */ a(
|
|
1179
|
+
W,
|
|
1167
1180
|
{
|
|
1168
1181
|
label: "Make",
|
|
1169
|
-
items:
|
|
1170
|
-
refine:
|
|
1182
|
+
items: se,
|
|
1183
|
+
refine: Be,
|
|
1171
1184
|
selected: e.make,
|
|
1172
1185
|
showPopular: !0,
|
|
1173
|
-
bgDark:
|
|
1174
|
-
showLabel:
|
|
1175
|
-
isMobile:
|
|
1186
|
+
bgDark: Z,
|
|
1187
|
+
showLabel: C,
|
|
1188
|
+
isMobile: K,
|
|
1176
1189
|
sortOptions: !1,
|
|
1177
|
-
loading:
|
|
1190
|
+
loading: se.length === 0
|
|
1178
1191
|
}
|
|
1179
1192
|
),
|
|
1180
|
-
/* @__PURE__ */
|
|
1181
|
-
|
|
1193
|
+
/* @__PURE__ */ a(
|
|
1194
|
+
W,
|
|
1182
1195
|
{
|
|
1183
1196
|
label: "Model",
|
|
1184
|
-
items:
|
|
1185
|
-
refine:
|
|
1197
|
+
items: le,
|
|
1198
|
+
refine: De,
|
|
1186
1199
|
selected: e.model,
|
|
1187
1200
|
showPopular: !0,
|
|
1188
|
-
bgDark:
|
|
1189
|
-
showLabel:
|
|
1190
|
-
isMobile:
|
|
1201
|
+
bgDark: Z,
|
|
1202
|
+
showLabel: C,
|
|
1203
|
+
isMobile: K,
|
|
1191
1204
|
sortOptions: !1,
|
|
1192
|
-
loading: e.make &&
|
|
1205
|
+
loading: e.make && le.length === 0
|
|
1193
1206
|
}
|
|
1194
1207
|
),
|
|
1195
|
-
/* @__PURE__ */
|
|
1196
|
-
|
|
1208
|
+
/* @__PURE__ */ a(
|
|
1209
|
+
W,
|
|
1197
1210
|
{
|
|
1198
1211
|
label: "Year",
|
|
1199
|
-
items:
|
|
1200
|
-
refine:
|
|
1212
|
+
items: ce,
|
|
1213
|
+
refine: Fe,
|
|
1201
1214
|
selected: e.year,
|
|
1202
|
-
bgDark:
|
|
1203
|
-
showLabel:
|
|
1204
|
-
isMobile:
|
|
1215
|
+
bgDark: Z,
|
|
1216
|
+
showLabel: C,
|
|
1217
|
+
isMobile: K,
|
|
1205
1218
|
sortOptions: !1,
|
|
1206
|
-
loading: e.model &&
|
|
1219
|
+
loading: e.model && ce.length === 0
|
|
1207
1220
|
}
|
|
1208
1221
|
)
|
|
1209
1222
|
] }),
|
|
1210
|
-
|
|
1223
|
+
ke.current && ke.current.map((t) => {
|
|
1211
1224
|
let r = null;
|
|
1212
1225
|
switch (t) {
|
|
1213
1226
|
case "body":
|
|
1214
|
-
r = /* @__PURE__ */
|
|
1215
|
-
|
|
1227
|
+
r = /* @__PURE__ */ a(
|
|
1228
|
+
W,
|
|
1216
1229
|
{
|
|
1217
1230
|
label: "Body",
|
|
1218
|
-
items:
|
|
1219
|
-
refine:
|
|
1231
|
+
items: Te,
|
|
1232
|
+
refine: ot,
|
|
1220
1233
|
selected: e.body,
|
|
1221
|
-
bgDark:
|
|
1222
|
-
showLabel:
|
|
1223
|
-
isMobile:
|
|
1234
|
+
bgDark: Z,
|
|
1235
|
+
showLabel: C,
|
|
1236
|
+
isMobile: K,
|
|
1224
1237
|
loading: !1,
|
|
1225
1238
|
shouldBeActive: !!(e.make && e.model && e.year)
|
|
1226
1239
|
},
|
|
@@ -1228,16 +1241,16 @@ function _t({
|
|
|
1228
1241
|
);
|
|
1229
1242
|
break;
|
|
1230
1243
|
case "series":
|
|
1231
|
-
r = /* @__PURE__ */
|
|
1232
|
-
|
|
1244
|
+
r = /* @__PURE__ */ a(
|
|
1245
|
+
W,
|
|
1233
1246
|
{
|
|
1234
1247
|
label: "Series",
|
|
1235
|
-
items:
|
|
1236
|
-
refine:
|
|
1248
|
+
items: Ze,
|
|
1249
|
+
refine: at,
|
|
1237
1250
|
selected: e.series,
|
|
1238
|
-
bgDark:
|
|
1239
|
-
showLabel:
|
|
1240
|
-
isMobile:
|
|
1251
|
+
bgDark: Z,
|
|
1252
|
+
showLabel: C,
|
|
1253
|
+
isMobile: K,
|
|
1241
1254
|
loading: !1,
|
|
1242
1255
|
shouldBeActive: !!(e.make && e.model && e.year)
|
|
1243
1256
|
},
|
|
@@ -1245,16 +1258,16 @@ function _t({
|
|
|
1245
1258
|
);
|
|
1246
1259
|
break;
|
|
1247
1260
|
case "variant":
|
|
1248
|
-
r = /* @__PURE__ */
|
|
1249
|
-
|
|
1261
|
+
r = /* @__PURE__ */ a(
|
|
1262
|
+
W,
|
|
1250
1263
|
{
|
|
1251
1264
|
label: "Variant",
|
|
1252
|
-
items:
|
|
1253
|
-
refine:
|
|
1265
|
+
items: Oe,
|
|
1266
|
+
refine: nt,
|
|
1254
1267
|
selected: e.variant,
|
|
1255
|
-
bgDark:
|
|
1256
|
-
showLabel:
|
|
1257
|
-
isMobile:
|
|
1268
|
+
bgDark: Z,
|
|
1269
|
+
showLabel: C,
|
|
1270
|
+
isMobile: K,
|
|
1258
1271
|
loading: !1,
|
|
1259
1272
|
shouldBeActive: !!(e.make && e.model && e.year)
|
|
1260
1273
|
},
|
|
@@ -1262,16 +1275,16 @@ function _t({
|
|
|
1262
1275
|
);
|
|
1263
1276
|
break;
|
|
1264
1277
|
case "engine_capacity":
|
|
1265
|
-
r = /* @__PURE__ */
|
|
1266
|
-
|
|
1278
|
+
r = /* @__PURE__ */ a(
|
|
1279
|
+
W,
|
|
1267
1280
|
{
|
|
1268
1281
|
label: "Engine Capacity",
|
|
1269
|
-
items:
|
|
1270
|
-
refine:
|
|
1282
|
+
items: qe,
|
|
1283
|
+
refine: st,
|
|
1271
1284
|
selected: e.engine_capacity,
|
|
1272
|
-
bgDark:
|
|
1273
|
-
showLabel:
|
|
1274
|
-
isMobile:
|
|
1285
|
+
bgDark: Z,
|
|
1286
|
+
showLabel: C,
|
|
1287
|
+
isMobile: K,
|
|
1275
1288
|
loading: !1,
|
|
1276
1289
|
shouldBeActive: !!(e.make && e.model && e.year)
|
|
1277
1290
|
},
|
|
@@ -1279,16 +1292,16 @@ function _t({
|
|
|
1279
1292
|
);
|
|
1280
1293
|
break;
|
|
1281
1294
|
case "engine":
|
|
1282
|
-
r = /* @__PURE__ */
|
|
1283
|
-
|
|
1295
|
+
r = /* @__PURE__ */ a(
|
|
1296
|
+
W,
|
|
1284
1297
|
{
|
|
1285
1298
|
label: "Engine",
|
|
1286
|
-
items:
|
|
1287
|
-
refine:
|
|
1299
|
+
items: He,
|
|
1300
|
+
refine: it,
|
|
1288
1301
|
selected: e.engine,
|
|
1289
|
-
bgDark:
|
|
1290
|
-
showLabel:
|
|
1291
|
-
isMobile:
|
|
1302
|
+
bgDark: Z,
|
|
1303
|
+
showLabel: C,
|
|
1304
|
+
isMobile: K,
|
|
1292
1305
|
loading: !1,
|
|
1293
1306
|
shouldBeActive: !!(e.make && e.model && e.year)
|
|
1294
1307
|
},
|
|
@@ -1298,23 +1311,23 @@ function _t({
|
|
|
1298
1311
|
}
|
|
1299
1312
|
return r;
|
|
1300
1313
|
}),
|
|
1301
|
-
|
|
1314
|
+
k && /* @__PURE__ */ a("div", { className: "vs:flex vs:h-full vs:flex-col vs:justify-end vs:md:col-span-3 vs:lg:col-span-1", children: /* @__PURE__ */ $(
|
|
1302
1315
|
"button",
|
|
1303
1316
|
{
|
|
1304
1317
|
className: "vehicle-search-btn",
|
|
1305
1318
|
onClick: () => {
|
|
1306
|
-
Me(!0), D && !
|
|
1319
|
+
Me(!0), D && !H ? window.location.href = D + window.location.search : rt();
|
|
1307
1320
|
},
|
|
1308
1321
|
children: [
|
|
1309
|
-
/* @__PURE__ */
|
|
1310
|
-
|
|
1322
|
+
/* @__PURE__ */ a("span", { children: x }),
|
|
1323
|
+
Ke && /* @__PURE__ */ a(je, { className: "vs:w-[calc(var(--partbot-font-size)*0.9)]! vs:h-[calc(var(--partbot-font-size)*0.9)]! vs:animate-spin" })
|
|
1311
1324
|
]
|
|
1312
1325
|
}
|
|
1313
1326
|
) })
|
|
1314
1327
|
]
|
|
1315
1328
|
}
|
|
1316
1329
|
),
|
|
1317
|
-
U && /* @__PURE__ */
|
|
1330
|
+
U && /* @__PURE__ */ a(
|
|
1318
1331
|
"div",
|
|
1319
1332
|
{
|
|
1320
1333
|
className: te(
|
|
@@ -1329,10 +1342,10 @@ function _t({
|
|
|
1329
1342
|
typeof window < "u" ? window.location.href.split("/")[2] : "unknown"}&utm_source=vehicle-select&utm_medium=referral&utm_campaign=powered-by`,
|
|
1330
1343
|
target: "_blank",
|
|
1331
1344
|
rel: "noreferrer",
|
|
1332
|
-
className: `${
|
|
1345
|
+
className: `${Z ? "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`,
|
|
1333
1346
|
children: [
|
|
1334
|
-
/* @__PURE__ */
|
|
1335
|
-
/* @__PURE__ */
|
|
1347
|
+
/* @__PURE__ */ a("span", { children: "Powered by" }),
|
|
1348
|
+
/* @__PURE__ */ a(_t, { className: "vs:inline-flex vs:h-[13px]" })
|
|
1336
1349
|
]
|
|
1337
1350
|
}
|
|
1338
1351
|
)
|
|
@@ -1343,74 +1356,74 @@ function _t({
|
|
|
1343
1356
|
)
|
|
1344
1357
|
] });
|
|
1345
1358
|
}
|
|
1346
|
-
let
|
|
1347
|
-
function zt(
|
|
1348
|
-
var
|
|
1349
|
-
const
|
|
1350
|
-
if (!
|
|
1359
|
+
let Re = !1, fe = !1;
|
|
1360
|
+
function zt(y) {
|
|
1361
|
+
var R, G;
|
|
1362
|
+
const v = y.shadowRoot;
|
|
1363
|
+
if (!v) {
|
|
1351
1364
|
console.error("[ShadowDOMPatch] No shadow root found");
|
|
1352
1365
|
return;
|
|
1353
1366
|
}
|
|
1354
|
-
const
|
|
1355
|
-
if (!
|
|
1367
|
+
const d = v.children[1];
|
|
1368
|
+
if (!d) {
|
|
1356
1369
|
console.error("[ShadowDOMPatch] No mount point found in shadow root");
|
|
1357
1370
|
return;
|
|
1358
1371
|
}
|
|
1359
|
-
if (new MutationObserver((
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1372
|
+
if (new MutationObserver((u) => {
|
|
1373
|
+
u.forEach((x) => {
|
|
1374
|
+
x.addedNodes.forEach((k) => {
|
|
1375
|
+
k.nodeType === 1 && k.id === "headlessui-portal-root" && (d.appendChild(k), fe = !0);
|
|
1363
1376
|
});
|
|
1364
|
-
}),
|
|
1365
|
-
|
|
1366
|
-
|
|
1377
|
+
}), u.forEach((x) => {
|
|
1378
|
+
x.removedNodes.forEach((k) => {
|
|
1379
|
+
k.nodeType === 1 && k.id === "headlessui-portal-root" && (d.querySelector(
|
|
1367
1380
|
"#headlessui-portal-root"
|
|
1368
|
-
) || (
|
|
1381
|
+
) || (fe = !1));
|
|
1369
1382
|
});
|
|
1370
1383
|
});
|
|
1371
1384
|
}).observe(document.body, {
|
|
1372
1385
|
childList: !0
|
|
1373
|
-
}), new MutationObserver((
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1386
|
+
}), new MutationObserver((u) => {
|
|
1387
|
+
u.forEach((x) => {
|
|
1388
|
+
x.removedNodes.forEach((k) => {
|
|
1389
|
+
k.nodeType === 1 && k.id === "headlessui-portal-root" && (fe = !1);
|
|
1377
1390
|
});
|
|
1378
1391
|
});
|
|
1379
|
-
}).observe(
|
|
1392
|
+
}).observe(d, {
|
|
1380
1393
|
childList: !0,
|
|
1381
1394
|
subtree: !0
|
|
1382
|
-
}),
|
|
1395
|
+
}), Re)
|
|
1383
1396
|
return;
|
|
1384
|
-
const F = (
|
|
1397
|
+
const F = (R = Object.getOwnPropertyDescriptor(
|
|
1385
1398
|
Document.prototype,
|
|
1386
1399
|
"activeElement"
|
|
1387
|
-
)) == null ? void 0 :
|
|
1400
|
+
)) == null ? void 0 : R.get;
|
|
1388
1401
|
Object.defineProperty(Document.prototype, "activeElement", {
|
|
1389
1402
|
get: function() {
|
|
1390
|
-
const
|
|
1391
|
-
return
|
|
1403
|
+
const u = F == null ? void 0 : F.call(this);
|
|
1404
|
+
return u === y ? v.activeElement : u;
|
|
1392
1405
|
}
|
|
1393
1406
|
});
|
|
1394
|
-
const
|
|
1407
|
+
const j = (G = Object.getOwnPropertyDescriptor(
|
|
1395
1408
|
Event.prototype,
|
|
1396
1409
|
"target"
|
|
1397
|
-
)) == null ? void 0 :
|
|
1410
|
+
)) == null ? void 0 : G.get;
|
|
1398
1411
|
Object.defineProperty(Event.prototype, "target", {
|
|
1399
1412
|
get: function() {
|
|
1400
|
-
const
|
|
1401
|
-
return
|
|
1413
|
+
const u = j == null ? void 0 : j.call(this);
|
|
1414
|
+
return u === y ? this.composedPath()[0] : u;
|
|
1402
1415
|
}
|
|
1403
1416
|
});
|
|
1404
|
-
const U = (
|
|
1417
|
+
const U = (u) => {
|
|
1405
1418
|
try {
|
|
1406
|
-
return document.body &&
|
|
1419
|
+
return document.body && u === document.body.style;
|
|
1407
1420
|
} catch {
|
|
1408
1421
|
return !1;
|
|
1409
1422
|
}
|
|
1410
|
-
},
|
|
1411
|
-
CSSStyleDeclaration.prototype.setProperty = function(
|
|
1412
|
-
if (!(U(this) &&
|
|
1413
|
-
return
|
|
1423
|
+
}, C = CSSStyleDeclaration.prototype.setProperty;
|
|
1424
|
+
CSSStyleDeclaration.prototype.setProperty = function(u, x, k) {
|
|
1425
|
+
if (!(U(this) && u === "overflow" && x === "hidden" && fe))
|
|
1426
|
+
return C.call(this, u, x, k);
|
|
1414
1427
|
};
|
|
1415
1428
|
const Y = Object.getOwnPropertyDescriptor(
|
|
1416
1429
|
CSSStyleDeclaration.prototype,
|
|
@@ -1420,45 +1433,45 @@ function zt(m) {
|
|
|
1420
1433
|
get: function() {
|
|
1421
1434
|
return Y.get.call(this);
|
|
1422
1435
|
},
|
|
1423
|
-
set: function(
|
|
1424
|
-
if (!(U(this) &&
|
|
1425
|
-
return Y.set.call(this,
|
|
1436
|
+
set: function(u) {
|
|
1437
|
+
if (!(U(this) && u === "hidden" && fe))
|
|
1438
|
+
return Y.set.call(this, u);
|
|
1426
1439
|
}
|
|
1427
|
-
}),
|
|
1440
|
+
}), Re = !0;
|
|
1428
1441
|
}
|
|
1429
|
-
const
|
|
1430
|
-
class
|
|
1442
|
+
const Mt = "/css/vehicle-search.css", Rt = Mt;
|
|
1443
|
+
class $t extends HTMLElement {
|
|
1431
1444
|
connectedCallback() {
|
|
1432
1445
|
if (!document.getElementById("vehicle-search-inter-font")) {
|
|
1433
|
-
const
|
|
1434
|
-
|
|
1446
|
+
const E = document.createElement("link");
|
|
1447
|
+
E.id = "vehicle-search-inter-font", E.rel = "stylesheet", E.href = "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap", document.head.appendChild(E);
|
|
1435
1448
|
}
|
|
1436
|
-
let
|
|
1437
|
-
|
|
1438
|
-
const
|
|
1439
|
-
let
|
|
1440
|
-
if (this.hasAttribute(
|
|
1441
|
-
const
|
|
1442
|
-
if (/^#[0-9A-F]{6}$/i.test(
|
|
1443
|
-
const
|
|
1444
|
-
|
|
1449
|
+
let v = document.createElement("style");
|
|
1450
|
+
v.textContent = Ct;
|
|
1451
|
+
const d = document.createElement("div"), D = this.attachShadow({ mode: "open" }), I = (E, q, b) => {
|
|
1452
|
+
let A;
|
|
1453
|
+
if (this.hasAttribute(q)) {
|
|
1454
|
+
const m = this.getAttribute(q);
|
|
1455
|
+
if (/^#[0-9A-F]{6}$/i.test(m)) {
|
|
1456
|
+
const se = parseInt(m.slice(1, 3), 16), pe = parseInt(m.slice(3, 5), 16), le = parseInt(m.slice(5, 7), 16);
|
|
1457
|
+
A = `${se} ${pe} ${le}`;
|
|
1445
1458
|
}
|
|
1446
1459
|
}
|
|
1447
|
-
return
|
|
1460
|
+
return A = A || b, `:host { --${E}: ${A}; } .partbot-mmyvs-container { --${E}: ${A}; }`;
|
|
1448
1461
|
};
|
|
1449
1462
|
let F = I(
|
|
1450
1463
|
"partbot-theme",
|
|
1451
1464
|
"data-button-color",
|
|
1452
|
-
"
|
|
1453
|
-
),
|
|
1465
|
+
"0 0 0"
|
|
1466
|
+
), j = I(
|
|
1454
1467
|
"partbot-button-color",
|
|
1455
1468
|
"data-button-color",
|
|
1456
|
-
"
|
|
1469
|
+
"0 0 0"
|
|
1457
1470
|
), U = I(
|
|
1458
1471
|
"partbot-button-hover-color",
|
|
1459
1472
|
"data-button-hover-color",
|
|
1460
|
-
"
|
|
1461
|
-
),
|
|
1473
|
+
"0 0 0"
|
|
1474
|
+
), C = I(
|
|
1462
1475
|
"partbot-button-label-color",
|
|
1463
1476
|
"data-button-label-color",
|
|
1464
1477
|
"255 255 255"
|
|
@@ -1466,33 +1479,45 @@ class Mt extends HTMLElement {
|
|
|
1466
1479
|
"partbot-button-hover-label-color",
|
|
1467
1480
|
"data-button-hover-label-color",
|
|
1468
1481
|
"255 255 255"
|
|
1469
|
-
),
|
|
1482
|
+
), R = I(
|
|
1470
1483
|
"partbot-mobile-background-color",
|
|
1471
1484
|
"data-mobile-background-color",
|
|
1472
|
-
"
|
|
1473
|
-
),
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1485
|
+
"0 0 0"
|
|
1486
|
+
), G = `: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"}; }`, x = `: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'}; }`, k = `:host { --partbot-padding: ${this.getAttribute("data-padding") || "0.5rem"}; } .partbot-mmyvs-container { --partbot-padding: ${this.getAttribute("data-padding") || "0.5rem"}; }`;
|
|
1487
|
+
const H = this.getAttribute("data-input-shadow"), J = H === "none" ? "none" : H || "0 1px 2px 0 rgb(0 0 0 / 0.05)";
|
|
1488
|
+
let re = `:host { --partbot-input-shadow: ${J}; } .partbot-mmyvs-container { --partbot-input-shadow: ${J}; }`;
|
|
1489
|
+
const g = this.getAttribute("data-input-border-color");
|
|
1490
|
+
let L = "229 231 235";
|
|
1491
|
+
if (g)
|
|
1492
|
+
if (/^#[0-9A-F]{6}$/i.test(g)) {
|
|
1493
|
+
const E = parseInt(g.slice(1, 3), 16), q = parseInt(g.slice(3, 5), 16), b = parseInt(g.slice(5, 7), 16);
|
|
1494
|
+
L = `${E} ${q} ${b}`;
|
|
1495
|
+
} else /^\d+\s+\d+\s+\d+$/.test(g) && (L = g);
|
|
1496
|
+
let w = `:host { --partbot-input-border-color: ${L}; } .partbot-mmyvs-container { --partbot-input-border-color: ${L}; }`;
|
|
1497
|
+
const i = this.getAttribute("data-input-border-width") || "1px";
|
|
1498
|
+
let B = `:host { --partbot-input-border-width: ${i}; } .partbot-mmyvs-container { --partbot-input-border-width: ${i}; }`;
|
|
1499
|
+
v.textContent += F, v.textContent += j, v.textContent += U, v.textContent += C, v.textContent += Y, v.textContent += R, v.textContent += G, v.textContent += u, v.textContent += x, v.textContent += k, v.textContent += re, v.textContent += w, v.textContent += B, D.appendChild(v), D.appendChild(d);
|
|
1500
|
+
const _ = this.getAttribute("data-api-key");
|
|
1501
|
+
if (!_) {
|
|
1502
|
+
console.warn("Missing attributes: " + (_ ? "" : "data-api-key "));
|
|
1478
1503
|
return;
|
|
1479
1504
|
}
|
|
1480
|
-
const
|
|
1481
|
-
for (let
|
|
1482
|
-
const { name:
|
|
1483
|
-
if (
|
|
1484
|
-
const
|
|
1485
|
-
X[
|
|
1505
|
+
const oe = this.attributes, X = {};
|
|
1506
|
+
for (let E = 0; E < oe.length; E++) {
|
|
1507
|
+
const { name: q, value: b } = oe[E];
|
|
1508
|
+
if (q.startsWith("data-")) {
|
|
1509
|
+
const A = q.slice(5).replace(/-([a-z])/g, (m) => m[1].toUpperCase());
|
|
1510
|
+
X[A] = b === "true" ? !0 : b === "false" ? !1 : b;
|
|
1486
1511
|
}
|
|
1487
1512
|
}
|
|
1488
1513
|
zt(this);
|
|
1489
|
-
const
|
|
1490
|
-
vt.render(
|
|
1514
|
+
const T = /* @__PURE__ */ a(St, { ...X });
|
|
1515
|
+
vt.render(T, d);
|
|
1491
1516
|
}
|
|
1492
1517
|
}
|
|
1493
|
-
customElements.define("vehicle-search",
|
|
1518
|
+
customElements.define("vehicle-search", $t);
|
|
1494
1519
|
export {
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1520
|
+
St as VehicleSearch,
|
|
1521
|
+
St as default,
|
|
1522
|
+
Rt as vehicleSearchCssUrl
|
|
1498
1523
|
};
|