adp-web-components 0.0.26 → 0.0.27
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/cjs/dead-stock-lookup.cjs.entry.js +2 -2
- package/dist/cjs/distributor-lookup.cjs.entry.js +9 -7
- package/dist/cjs/dynamic-claim_6.cjs.entry.js +12 -12
- package/dist/cjs/dynamic-redeem.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/manufacturer-lookup.cjs.entry.js +10 -8
- package/dist/cjs/shift-components.cjs.js +1 -1
- package/dist/cjs/vehicle-lookup.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +7 -7
- package/dist/collection/components/part-lookup/dead-stock-lookup.js +2 -2
- package/dist/collection/components/part-lookup/distributor-lookup.js +45 -7
- package/dist/collection/components/part-lookup/manufacturer-lookup.js +46 -8
- package/dist/collection/components/{dynamic-claim → vehicle-lookup}/dynamic-claim.js +6 -6
- package/dist/collection/components/{dynamic-redeem → vehicle-lookup}/dynamic-redeem.js +3 -3
- package/dist/collection/components/{paint-thickness → vehicle-lookup}/paint-thickness.js +4 -4
- package/dist/collection/components/{service-history → vehicle-lookup}/service-history.js +2 -2
- package/dist/collection/components/{vehicle-accessories → vehicle-lookup}/vehicle-accessories.js +4 -4
- package/dist/collection/components/vehicle-lookup/vehicle-lookup.js +1 -1
- package/dist/collection/components/{vehicle-specification → vehicle-lookup}/vehicle-specification.js +2 -2
- package/dist/collection/components/{warranty-details → vehicle-lookup}/warranty-details.js +1 -1
- package/dist/components/dead-stock-lookup.js +1 -1
- package/dist/components/distributor-lookup.js +1 -1
- package/dist/components/dynamic-claim.js +1 -1
- package/dist/components/dynamic-redeem.js +1 -1
- package/dist/components/manufacturer-lookup.js +1 -1
- package/dist/components/{p-325b6857.js → p-2741b156.js} +1 -1
- package/dist/components/{p-f1ffc23d.js → p-2ea90585.js} +1 -1
- package/dist/components/{p-84427fef.js → p-4bf4435e.js} +1 -1
- package/dist/components/{p-da533bd7.js → p-6ffb4e5d.js} +1 -1
- package/dist/components/{p-044025a6.js → p-9245caae.js} +1 -1
- package/dist/components/{p-442f4eff.js → p-d4718f3b.js} +1 -1
- package/dist/components/{p-05871c28.js → p-d999f3c4.js} +1 -1
- package/dist/components/paint-thickness.js +1 -1
- package/dist/components/service-history.js +1 -1
- package/dist/components/vehicle-accessories.js +1 -1
- package/dist/components/vehicle-lookup.js +1 -1
- package/dist/components/vehicle-specification.js +1 -1
- package/dist/components/warranty-details.js +1 -1
- package/dist/esm/dead-stock-lookup.entry.js +2 -2
- package/dist/esm/distributor-lookup.entry.js +9 -7
- package/dist/esm/dynamic-claim_6.entry.js +12 -12
- package/dist/esm/dynamic-redeem.entry.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/manufacturer-lookup.entry.js +10 -8
- package/dist/esm/shift-components.js +1 -1
- package/dist/esm/vehicle-lookup.entry.js +1 -1
- package/dist/shift-components/{p-2f7785d3.entry.js → p-1719e164.entry.js} +1 -1
- package/dist/shift-components/{p-73fa9b86.entry.js → p-26b9d31a.entry.js} +1 -1
- package/dist/shift-components/p-33e4c335.entry.js +5 -0
- package/dist/shift-components/{p-2bb4415e.entry.js → p-d03dade1.entry.js} +1 -1
- package/dist/shift-components/{p-48efd004.entry.js → p-d1ffe0eb.entry.js} +1 -1
- package/dist/shift-components/p-f6764fb5.entry.js +5 -0
- package/dist/shift-components/shift-components.esm.js +1 -1
- package/dist/types/components/part-lookup/distributor-lookup.d.ts +2 -0
- package/dist/types/components/part-lookup/manufacturer-lookup.d.ts +2 -0
- package/dist/types/components/{dynamic-claim → vehicle-lookup}/dynamic-claim.d.ts +1 -1
- package/dist/types/components/vehicle-lookup/vehicle-lookup.d.ts +6 -6
- package/dist/types/components.d.ts +8 -0
- package/dist/types/global/types/part-information.d.ts +0 -3
- package/package.json +1 -1
- package/dist/shift-components/p-2872727e.entry.js +0 -5
- package/dist/shift-components/p-8065a7e3.entry.js +0 -5
- /package/dist/cjs/{Loading-20e4ef35.js → Loading-14fca13b.js} +0 -0
- /package/dist/collection/components/{parts → components}/Loading.js +0 -0
- /package/dist/collection/components/{dynamic-claim/icons → vehicle-lookup/assets}/cancelled.svg +0 -0
- /package/dist/collection/components/{warranty-details → vehicle-lookup}/assets/check.svg +0 -0
- /package/dist/collection/components/{dynamic-claim/icons → vehicle-lookup/assets}/expired.svg +0 -0
- /package/dist/collection/components/{warranty-details → vehicle-lookup}/assets/loader.svg +0 -0
- /package/dist/collection/components/{dynamic-claim/icons → vehicle-lookup/assets}/pending.svg +0 -0
- /package/dist/collection/components/{dynamic-claim/icons → vehicle-lookup/assets}/processed.svg +0 -0
- /package/dist/collection/components/{warranty-details → vehicle-lookup}/assets/x-mark.svg +0 -0
- /package/dist/collection/components/{warranty-details → vehicle-lookup}/components/CardsContainer.js +0 -0
- /package/dist/collection/components/{warranty-details → vehicle-lookup}/components/Loading.js +0 -0
- /package/dist/collection/components/{warranty-details → vehicle-lookup}/components/SSCTable.js +0 -0
- /package/dist/collection/components/{warranty-details → vehicle-lookup}/components/StatusCard.js +0 -0
- /package/dist/collection/components/{dynamic-claim → vehicle-lookup}/dynamic-claim.css +0 -0
- /package/dist/collection/components/{dynamic-redeem → vehicle-lookup}/dynamic-redeem.css +0 -0
- /package/dist/collection/components/{paint-thickness → vehicle-lookup}/paint-thickness.css +0 -0
- /package/dist/collection/components/{service-history → vehicle-lookup}/service-history.css +0 -0
- /package/dist/collection/components/{vehicle-accessories → vehicle-lookup}/vehicle-accessories.css +0 -0
- /package/dist/collection/components/{vehicle-specification → vehicle-lookup}/vehicle-specification.css +0 -0
- /package/dist/collection/components/{warranty-details → vehicle-lookup}/warranty-details.css +0 -0
- /package/dist/collection/templates/{parts-lookup → part-lookup}/mock-data.js +0 -0
- /package/dist/collection/templates/{mock-data.js → vehicle-lookup/mock-data.js} +0 -0
- /package/dist/collection/templates/{vehicle-lookup.js → vehicle-lookup/vehicle-lookup.js} +0 -0
- /package/dist/collection/templates/{warranty-mock-data.js → vehicle-lookup/warranty-mock-data.js} +0 -0
- /package/dist/components/{p-8385e385.js → p-c62be897.js} +0 -0
- /package/dist/esm/{Loading-d050617c.js → Loading-2b8a745c.js} +0 -0
- /package/dist/shift-components/{p-65939a2f.js → p-e35e44a4.js} +0 -0
- /package/dist/types/components/{parts → components}/Loading.d.ts +0 -0
- /package/dist/types/components/{warranty-details → vehicle-lookup}/components/CardsContainer.d.ts +0 -0
- /package/dist/types/components/{warranty-details → vehicle-lookup}/components/Loading.d.ts +0 -0
- /package/dist/types/components/{warranty-details → vehicle-lookup}/components/SSCTable.d.ts +0 -0
- /package/dist/types/components/{warranty-details → vehicle-lookup}/components/StatusCard.d.ts +0 -0
- /package/dist/types/components/{dynamic-redeem → vehicle-lookup}/dynamic-redeem.d.ts +0 -0
- /package/dist/types/components/{paint-thickness → vehicle-lookup}/paint-thickness.d.ts +0 -0
- /package/dist/types/components/{service-history → vehicle-lookup}/service-history.d.ts +0 -0
- /package/dist/types/components/{vehicle-accessories → vehicle-lookup}/vehicle-accessories.d.ts +0 -0
- /package/dist/types/components/{vehicle-specification → vehicle-lookup}/vehicle-specification.d.ts +0 -0
- /package/dist/types/components/{warranty-details → vehicle-lookup}/warranty-details.d.ts +0 -0
package/dist/collection/components/{vehicle-accessories → vehicle-lookup}/vehicle-accessories.js
RENAMED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { Host, h } from "@stencil/core";
|
|
6
6
|
import { getVehicleInformation } from "../../global/api/vehicleInformation";
|
|
7
7
|
import cn from "../../global/lib/cn";
|
|
8
|
-
import Loading from "../
|
|
8
|
+
import Loading from "../components/Loading";
|
|
9
9
|
import Eye from "~assets/eye.svg";
|
|
10
10
|
import { closeImageViewer, openImageViewer } from "../../global/lib/image-expansion";
|
|
11
11
|
let mockData = {};
|
|
@@ -89,7 +89,7 @@ export class VehicleAccessories {
|
|
|
89
89
|
render() {
|
|
90
90
|
var _a, _b;
|
|
91
91
|
const accessories = (this === null || this === void 0 ? void 0 : this.vehicleInformation) ? (_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.accessories : [];
|
|
92
|
-
return (h(Host, { key: '
|
|
92
|
+
return (h(Host, { key: '809010a784fce81c13a9f653768bcb2f792b2a8b' }, h("div", { key: '68da5c8fccf4b24c2d3a42cf4cc3fefb7dd560ab', class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: '947bbad37c5117df4f79f2c896936a22f00b0531' }, h(Loading, { key: '855aa5567d59bbfac43495c5baba708fb5600c1c', isLoading: this.state.includes('loading') }), h("div", { key: '1fe9e47793a7f58b8b0f4251ced6f7ff49f93240', class: cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, h("div", { key: '7ed9356bf45e5b27c4c5ad032d44d3fdbf60631a', class: cn('text-center pt-[4px] text-[20px]', { 'text-red-600': !!this.errorMessage }) }, (_b = this.vehicleInformation) === null || _b === void 0 ? void 0 : _b.vin), ['error', 'error-loading'].includes(this.state) && (h("div", { key: 'dd349e9113ddde6a1447dd7b56d1045db29eecb6', class: "py-[16px]" }, h("div", { key: '0d720a59842a2f1e4adfdcf82bd2b443625d9c14', class: " px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto" }, this.errorMessage))), ['data', 'data-loading'].includes(this.state) && (h("div", { key: '48030f4b6938c6174df0e80cea90221efcd80135', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: 'be06d52f77788855c3763833868bf8c5aa9fa259', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, "Vehicle Accessories"), h("div", { key: 'e38e31796058e2094531f1b364339dfbe6acdf77', class: "h-0 overflow-auto flex-1" }, !accessories.length && h("div", { key: 'f95c52c80f0a2dab3f0ee7e439c100b6b94a21b0', class: "h-[80px] flex items-center justify-center text-[18px]" }, "No data is available."), !!accessories.length && (h("table", { key: 'a207dd43d39984d701a654550040224866bf583b', class: "w-full overflow-auto relative border-collapse" }, h("thead", { key: 'ce3b75261934c67c9297a818fe8cfa7feaaa936c', class: "top-0 font-bold z-40 sticky bg-white" }, h("tr", { key: 'ab5f928cd658c193f9464974392dac8f937150b4' }, ['Part Number', 'Description', 'Image'].map(title => (h("th", { key: title, class: "px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]" }, title))))), h("tbody", { key: '359c90cabf19855f2fc0464c04899bdbf3890afa' }, accessories.map((accessory, idx) => {
|
|
93
93
|
var _a;
|
|
94
94
|
return (h("tr", { class: "transition-colors duration-100 hover:bg-slate-100", key: accessory.partNumber }, ['partNumber', 'description'].map(key => {
|
|
95
95
|
var _a;
|
|
@@ -99,9 +99,9 @@ export class VehicleAccessories {
|
|
|
99
99
|
}), h("td", { class: cn('px-[10px] py-[10px] text-center whitespace-nowrap border-b border-[#d6d8dc]', {
|
|
100
100
|
'!border-none': idx === ((_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.serviceHistory.length) - 1,
|
|
101
101
|
}) }, h("button", { onClick: ({ target }) => this.openImage(target, accessory.image), class: "shrink-0 relative ring-0 outline-none w-fit mx-auto [&_img]:hover:shadow-lg [&_div]:hover:!opacity-100 cursor-pointer" }, h("div", { class: "absolute flex-col justify-center gap-[4px] size-full flex items-center pointer-events-none hover:opacity-100 rounded-lg opacity-0 bg-black/40 transition-all duration-300" }, h("img", { src: Eye }), h("span", { class: "text-white" }, "Expand")), h("img", { class: "w-auto h-auto max-w-[133px] max-h-[133px] cursor-pointer shadow-sm rounded-lg transition-all duration-300", src: accessory.image })))));
|
|
102
|
-
})), h("div", { key: '
|
|
102
|
+
})), h("div", { key: '8dbd610b0699e78ff72321b3542d8a5bebaac697', onClick: () => this.closeImage(), style: { backdropFilter: this.expandedImage ? 'blur(3px)' : 'blur(0px)' }, class: cn('pointer-events-none w-[100dvw] h-[100dvh] fixed top-0 z-50 left-0 opacity-0 bg-black/40 transition-all duration-400', {
|
|
103
103
|
'pointer-events-auto opacity-100 delay-200': this.expandedImage,
|
|
104
|
-
}) }, h("button", { key: '
|
|
104
|
+
}) }, h("button", { key: '504e17f2df3bbffe428e75e71b44fde9a681084e', class: "flex flex-col mt-[16px] items-center justify-center size-12 float-right mr-[16px]", onClick: () => this.closeImage() }, h("div", { key: 'ea82b4f6759a5593d057a42a18f7e116d86ee921', class: "h-1 w-12 rounded-full rotate-45 absolute bg-white" }), h("div", { key: '6aabdfaf3e10b744c6ade52e12a5b1c9bc81f5f7', class: "h-1 w-12 rounded-full -rotate-45 absolute bg-white" }))), h("img", { key: 'b0d0a64346461b81c2113f4928bb2de08abeb440', alt: "", id: "expanded-image", class: "fixed opacity-0 z-50 transition-all rounded-lg" })))))))))));
|
|
105
105
|
}
|
|
106
106
|
static get is() { return "vehicle-accessories"; }
|
|
107
107
|
static get encapsulation() { return "shadow"; }
|
|
@@ -94,7 +94,7 @@ export class VehicleLookup {
|
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
render() {
|
|
97
|
-
return (h(Host, { key: '
|
|
97
|
+
return (h(Host, { key: 'c0ae0086435cd2bfc4a4838223c29796960bbbf6' }, h("div", { key: 'c989c8199a556448887c2018cae79eed02813f46', class: cn('w-full', { hidden: this.activeElement !== 'vehicle-specification' }) }, h("vehicle-specification", { key: 'dc99a0489d6a8c0306cb7aaef7749997553e023b', isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString })), h("div", { key: 'c8a8a7eec552f9fd0234dab9d85df14e43102041', class: cn('w-full', { hidden: this.activeElement !== 'vehicle-accessories' }) }, h("vehicle-accessories", { key: '624acb4beb19b22e82d79250594e350a21e7f8bf', isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString })), h("div", { key: '834807eace640d41d904f7511003ede16b2bfc95', class: cn('w-full', { hidden: this.activeElement !== 'warranty-details' }) }, h("warranty-details", { key: 'a74777497db827ce84dcea65823f467af80fa5fa', "show-ssc": "true", "show-warranty": "true", isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString }, h("slot", { key: 'c4f0f9387d20481c503d6fe9c38532ede6f71a95' }))), h("div", { key: '33b0b26eb268027789d8d8cecc00247f073a333a', class: cn('w-full', { hidden: this.activeElement !== 'service-history' }) }, h("service-history", { key: '2d4315c0e2091666e4514ce3b24c8f9f3120850c', isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString })), h("div", { key: '21620c7e04ade2da21a8d4aee3c28eb1f8d1e8fa', class: cn('w-full', { hidden: this.activeElement !== 'paint-thickness' }) }, h("paint-thickness", { key: '93e0597fbf83490189fa448fd9765b6fa76cf214', isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString })), h("div", { key: 'd5b2313cb8faac74fc9304c1e4c311b766c57259', class: cn('w-full', { hidden: this.activeElement !== 'dynamic-claim' }) }, h("dynamic-claim", { key: '10e9015d5288618f10fd92e5a72774ac0d8a7f59', isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString }))));
|
|
98
98
|
}
|
|
99
99
|
static get is() { return "vehicle-lookup"; }
|
|
100
100
|
static get originalStyleUrls() {
|
package/dist/collection/components/{vehicle-specification → vehicle-lookup}/vehicle-specification.js
RENAMED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright (c)
|
|
4
4
|
*/
|
|
5
5
|
import { Host, h } from "@stencil/core";
|
|
6
|
-
import Loading from "../
|
|
6
|
+
import Loading from "../components/Loading";
|
|
7
7
|
import cn from "../../global/lib/cn";
|
|
8
8
|
import { getVehicleInformation } from "../../global/api/vehicleInformation";
|
|
9
9
|
let mockData = {};
|
|
@@ -71,7 +71,7 @@ export class VehicleSpecification {
|
|
|
71
71
|
}
|
|
72
72
|
render() {
|
|
73
73
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
74
|
-
return (h(Host, { key: '
|
|
74
|
+
return (h(Host, { key: 'e96ba82b8f58b3812bfb539e6e20020635d17c13' }, h("div", { key: '65896e18a4b328b657dc7ae37506f3f090be58ef', class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: '85b32b58705d8ede8161f4bf429e4eea2eeab113' }, h(Loading, { key: '102144466024234e3b3d67f40a2ed613d8decb8f', isLoading: this.state.includes('loading') }), h("div", { key: 'ea3201bce6b9471c1c1b3cf2336bb4d3d820345a', class: cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, h("div", { key: '063a8e9ae6202a207ee9e03bb8e21c8d269f105f', class: cn('text-center pt-[4px] text-[20px]', { 'text-red-600': !!this.errorMessage }) }, (_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.vin), ['error', 'error-loading'].includes(this.state) && (h("div", { key: '5b6e0c8f594a4609ebe476e39c607ddd16221c2a', class: "py-4" }, h("div", { key: 'cd11ab7ea9c2b17b870bce21b793b06707b729ea', class: " px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto" }, this.errorMessage))), ['data', 'data-loading'].includes(this.state) && (h("div", { key: '9afcbe4ffc5e11f39c2ff6f284d2f0b6b9f24df4', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: '324be66504bbe49d03d3e777d5fa5b14c8129975', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, "Vehicle Specifications"), h("div", { key: '0875021cb9dcf017b98d516e5898c05b5803a1ba', class: "h-0 overflow-auto flex-1" }, !((_b = this.vehicleInformation) === null || _b === void 0 ? void 0 : _b.vehicleSpecification) && h("div", { key: '9132eb142b5f67fbb5310936bfba4517174eafcf', class: "h-[80px] flex items-center justify-center text-[18px]" }, "No data is available."), !!((_c = this.vehicleInformation) === null || _c === void 0 ? void 0 : _c.vehicleSpecification) && (h("table", { key: 'ed324bef37bc05379b5bf9f7c2e86b9a45ec732e', class: "w-full overflow-auto relative border-collapse" }, h("thead", { key: '1fc091f01a228617523d213dcdf295368f875279', class: "top-0 font-bold sticky bg-white" }, h("tr", { key: '308569c58472d2680c5e7b9ed444d0e7360948f5' }, ['Model', 'Variant', 'Katashiki', 'Model Year', 'SFX'].map(title => (h("th", { key: title, class: "px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]" }, title))))), h("tbody", { key: '9d44d2b25f0cd37603d10d4632c1adf78cbaabeb' }, h("tr", { key: 'ce399b783d636d8f7e4cb5dac62ef08ca0e2383c' }, h("td", { key: '2f3fdaac2635377722caea73a05d097686606cb7', class: "px-[10px] py-[20px] text-center whitespace-nowrap" }, ((_e = (_d = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _d === void 0 ? void 0 : _d.vehicleVariantInfo) === null || _e === void 0 ? void 0 : _e.modelCode) || '...', " ", h("br", { key: 'f7b14609c4be0a16414311c9c42f594f37bf9a5d', class: "my-2" }), ((_g = (_f = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _f === void 0 ? void 0 : _f.vehicleSpecification) === null || _g === void 0 ? void 0 : _g.modelDesc) || '...'), h("td", { key: 'a20ed93430b4d33734e068b4495623ea0cbc1872', class: "px-[10px] py-[20px] text-center whitespace-nowrap" }, ((_j = (_h = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _h === void 0 ? void 0 : _h.identifiers) === null || _j === void 0 ? void 0 : _j.variant) || '...', " ", h("br", { key: '8b77dac46b0161eca0b5d1806f643d72d787b821' }), ((_l = (_k = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _k === void 0 ? void 0 : _k.vehicleSpecification) === null || _l === void 0 ? void 0 : _l.variantDesc) || '...'), ['identifiers.katashiki', 'vehicleVariantInfo.modelYear', 'vehicleVariantInfo.sfx'].map(infoPath => {
|
|
75
75
|
var _a;
|
|
76
76
|
const [place, field] = infoPath.split('.');
|
|
77
77
|
const cellValue = (_a = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _a === void 0 ? void 0 : _a[place][field].toString();
|
|
@@ -177,7 +177,7 @@ export class WarrantyDetails {
|
|
|
177
177
|
}
|
|
178
178
|
render() {
|
|
179
179
|
var _a, _b, _c, _d, _e;
|
|
180
|
-
return (h(Host, { key: '
|
|
180
|
+
return (h(Host, { key: '590b86e8c3fc8993794c24edabf8169c7e8105a4' }, h("div", { key: 'a3f2b266e72f75c6aecec054d0eef277a16807f7', class: "min-h-[100px] warranty" }, h("div", { key: 'a272392f3848b40df31b2f3ea47665e9d9b6fab6' }, h(Loading, { key: '9651e47db177da1e7097f037e63dcc208bee4ff6', isLoading: this.state.includes('loading') }), h("div", { key: 'f06b83e2903199b624780923a83ce3c005cc4e04', class: "transition duration-700", style: { transform: this.state.includes('loading') || this.state === 'idle' ? 'scale(0)' : 'scale(1)', opacity: this.state.includes('loading') ? '0' : '1' } }, (this.showSsc || this.showWarranty) && (h("div", { key: '09086f9a3e4d301fa2c0283de6c4a458a1f37bfa', style: { color: !!this.errorMessage ? 'red' : 'black' }, class: "warranty-vin" }, (_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.vin)), ['error', 'error-loading'].includes(this.state) && (h("div", { key: 'd781b9b96fe9151fdc711127fd6e95eec3d2c27a', class: "py-4" }, h(StatusCard, { key: '2d5056b842c7c5276dd9068a9c15f7b4c3934271', desc: this.errorMessage, className: "mx-auto reject-card max-w-500" }), ' ')), this.showWarranty && ['data', 'data-loading'].includes(this.state) && (h(CardsContainer, { key: '3e3fe57c08277d0c4b113638f5c7b1c8bf67c1da', isAuthorized: (_b = this.vehicleInformation) === null || _b === void 0 ? void 0 : _b.isAuthorized, unInvoicedByBrokerName: this.unInvoicedByBrokerName, warranty: (_c = this.vehicleInformation) === null || _c === void 0 ? void 0 : _c.warranty })), h("div", { key: '45b368d2f868d6968bc378933dbcb43ed3f769b8', style: Object.assign({}, (this.showRecaptcha ? { height: 'auto', padding: '16px 16px 0px 16px' } : { height: '0px' })), class: "recaptcha-container" }, h("slot", { key: '18cc24a9b1432f305e3af6e08a166e4418d2074d' })), ['data', 'data-loading'].includes(this.state) && this.recaptchaRes && (h("div", { key: 'db95680aa9342d5c19413520d743ac27954601cc', class: cn('recaptcha-response', !this.recaptchaRes.hasSSC ? 'success-card' : 'reject-card ') }, this.recaptchaRes.message)), this.checkingUnauthorizedSSC && (h("div", { key: 'a2874a0311723a32f2c4ace8ac59e6eca21c068d', class: "loading-spinner", style: { marginTop: '20px', flexDirection: 'column' } }, h("div", { key: '5e8a3b3db4bed8820ba077c829ae1ba02acc69b1' }, h("strong", { key: '945a36e3f1c7a814924d36356699b22149693f1f' }, "Checking TMC")), h("img", { key: 'fe2abdbb699dc69083e439b56e336534d2b29e34', class: "spin", src: Loader }))), this.showSsc && ['data', 'data-loading'].includes(this.state) && ((_d = this.vehicleInformation) === null || _d === void 0 ? void 0 : _d.ssc) !== null && !!((_e = this.vehicleInformation) === null || _e === void 0 ? void 0 : _e.ssc.length) && (h(SSCTable, { key: '2c536e2020a6bbf952e43f1f93df185c44b4ce2e', ssc: this.vehicleInformation.ssc })))))));
|
|
181
181
|
}
|
|
182
182
|
static get is() { return "warranty-details"; }
|
|
183
183
|
static get encapsulation() { return "shadow"; }
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built by ShiftSoftware
|
|
3
3
|
* Copyright (c)
|
|
4
4
|
*/
|
|
5
|
-
import{p as t,H as e,h as i,c as o}from"./p-be0a5ab5.js";import{g as a}from"./p-4f08bcb8.js";import{L as r}from"./p-8385e385.js";import{c as n}from"./p-98d9e7ab.js";let s={};const d="46px",l=t(class extends e{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.baseUrl="",this.isDev=!1,this.queryString="",this.loadingStateChange=void 0,this.loadedResponse=void 0,this.state="idle",this.externalPartNumber=null,this.errorMessage=null,this.partInformation=void 0}handleSettingData(t){this.partInformation=t}async setData(t,e={}){let i;clearTimeout(this.networkTimeoutRef),this.abortController&&this.abortController.abort(),this.abortController=new AbortController;const o="string"==typeof t,r=o?t:null==t?void 0:t.partNumber;this.externalPartNumber=r;try{if(!r||0===r.trim().length)return void(this.state="idle");this.state="data"===this.state||"error"===this.state?this.state+"-loading":"loading",await new Promise((t=>{i=setTimeout(t,700),this.networkTimeoutRef=i}));const n=o?await a(this,{scopedTimeoutRef:i,partNumber:r,mockData:s},e):t;if(this.networkTimeoutRef===i){if(!n)throw Error("Wrong response format");this.handleSettingData(n)}this.errorMessage=null,this.state="data"}catch(t){if(t&&"AbortError"===(null==t?void 0:t.name))return;this.state="error",this.partInformation=null,this.errorMessage=t.message}}async fetchData(t=this.externalPartNumber,e={}){await this.setData(t,e)}async loadingListener(){this.loadingStateChange&&this.loadingStateChange(this.state.includes("loading"))}async setMockData(t){s=t}toggleAccordion(t){const e=t.target.parentElement,i=e.getElementsByClassName("icon")[0];if("true"===e.getAttribute("aria-expanded"))e.style.height=d,i.style.transform="rotate(0deg)",e.setAttribute("aria-expanded","false");else{const t=46+e.getElementsByClassName("content")[0].getClientRects()[0].height;e.style.height=t+"px",i.style.transform="rotate(180deg)",e.setAttribute("aria-expanded","true")}}render(){var t,e;return i(o,{key:"03372a6f91fd6291de7e6fc51ab5012bc5ab2b98"},i("div",{key:"e926503adba0274834ab8b06ce370faace79447b",class:"min-h-[100px] relative transition-all duration-300 overflow-hidden"},i("div",{key:"f3883fc0b09366baf94ed65f8b13590ac1adb975"},i(r,{key:"d01c5df2db30920852b35a6e6d6cb06cde76f395",isLoading:this.state.includes("loading")}),i("div",{key:"de52273e824e9499aa77b3763871d010184232b8",class:n("transition-all duration-700",{"scale-0":this.state.includes("loading")||"idle"===this.state,"opacity-0":this.state.includes("loading")})},["error","error-loading"].includes(this.state)&&i("div",{key:"4995acd3f10a212d93838e2d5e89693829fbb10a",class:"py-[16px]"},i("div",{key:"38064e79243ba14260cbaea211b6d82cbd299f5e",class:" px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto"},this.errorMessage)),["data","data-loading"].includes(this.state)&&i("div",{key:"156cbe984af29e94d697eac435226a8d69c05545"},i("div",{key:"573d44fd10f287903f04de74c78302cc0ffe90f1",class:"flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]"},i("div",{key:"93f6aa85947fb2fa924478fa5167a0e894188958",class:"w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]"},"Dead stock"),null===(e=null===(t=this.partInformation)||void 0===t?void 0:t.deadStock)||void 0===e?void 0:e.map((t=>i("div",{key:t.companyIntegrationID,class:"py-[10px] px-[20px]"},i("div",{"aria-expanded":"false",style:{height:d},class:"border shadow transition-all duration-500 overflow-hidden rounded-md mb-[10px] border-[#d6d8dc]"},i("button",{onClick:this.toggleAccordion,style:{height:d},class:"w-full flex px-[10px] justify-between items-center text-slate-800"},i("strong",null,t.companyName),i("span",{class:"icon text-slate-800 transition-transform duration-500"},i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",class:"size-[22px]"},i("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.78 9.78a.75.75 0 0 1-1.06 0L8 7.06 5.28 9.78a.75.75 0 0 1-1.06-1.06l3.25-3.25a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06Z"})))),i("div",{class:"content"},i("table",{class:"w-full overflow-auto relative border-collapse"},i("thead",null,i("tr",null,i("th",{class:"py-[20px] px-[10px] text-left whitespace-nowrap border-b border-[#d6d8dc]"},"Branch"),i("th",{class:"py-[20px] px-[10px] text-left whitespace-nowrap border-b border-[#d6d8dc]"},"Available Qty"))),i("tbody",null,null==t?void 0:t.branchDeadStock.map((t=>i("tr",{class:"transition-colors border-b border-[#d6d8dc] last:border-none duration-100 hover:bg-slate-100",key:t.companyBranchIntegrationID},i("td",{class:n("py-[20px] px-[10px] text-left whitespace-nowrap")},t.companyBranchName),i("td",{class:n("py-[20px] px-[10px] text-left whitespace-nowrap")},i("strong",null,t.quantity))))))))))))))))))}get el(){return this}static get watchers(){return{state:["loadingListener"]}}static get style(){return'*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.relative{position:relative}.mx-auto{margin-left:auto;margin-right:auto}.mb-\\[10px\\]{margin-bottom:10px}.mt-\\[12px\\]{margin-top:12px}.flex{display:flex}.table{display:table}.size-\\[22px\\]{height:22px;width:22px}.h-\\[40px\\]{height:40px}.max-h-\\[70dvh\\]{max-height:70dvh}.min-h-\\[100px\\]{min-height:100px}.w-fit{width:fit-content}.w-full{width:100%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.scale-0{--tw-scale-x:0;--tw-scale-y:0}.scale-0,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[8px\\]{border-radius:8px}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-\\[\\#d6d8dc\\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.bg-\\[\\#e1e3e5\\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.px-\\[10px\\]{padding-left:10px;padding-right:10px}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.px-\\[20px\\]{padding-left:20px;padding-right:20px}.py-\\[10px\\]{padding-bottom:10px;padding-top:10px}.py-\\[16px\\]{padding-bottom:16px;padding-top:16px}.py-\\[20px\\]{padding-bottom:20px;padding-top:20px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.text-left{text-align:left}.text-center{text-align:center}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.text-\\[\\#383c43\\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.last\\:border-none:last-child{border-style:none}.hover\\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.z-50{z-index:50}.size-\\[40px\\]{height:40px;width:40px}.size-full{height:100%;width:100%}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin-2s{animation:spin 2s linear infinite}'}},[1,"dead-stock-lookup",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],loadingStateChange:[16],loadedResponse:[16],state:[32],externalPartNumber:[32],errorMessage:[32],partInformation:[32],setData:[64],fetchData:[64],setMockData:[64]},void 0,{state:["loadingListener"]}]);function p(){"undefined"!=typeof customElements&&["dead-stock-lookup"].forEach((t=>{"dead-stock-lookup"===t&&(customElements.get(t)||customElements.define(t,l))}))}p();const c=l,h=p;export{c as DeadStockLookup,h as defineCustomElement}
|
|
5
|
+
import{p as t,H as e,h as i,c as o}from"./p-be0a5ab5.js";import{g as a}from"./p-4f08bcb8.js";import{L as r}from"./p-c62be897.js";import{c as n}from"./p-98d9e7ab.js";let s={};const d="46px",l=t(class extends e{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.baseUrl="",this.isDev=!1,this.queryString="",this.loadingStateChange=void 0,this.loadedResponse=void 0,this.state="idle",this.externalPartNumber=null,this.errorMessage=null,this.partInformation=void 0}handleSettingData(t){this.partInformation=t}async setData(t,e={}){let i;clearTimeout(this.networkTimeoutRef),this.abortController&&this.abortController.abort(),this.abortController=new AbortController;const o="string"==typeof t,r=o?t:null==t?void 0:t.partNumber;this.externalPartNumber=r;try{if(!r||0===r.trim().length)return void(this.state="idle");this.state="data"===this.state||"error"===this.state?this.state+"-loading":"loading",await new Promise((t=>{i=setTimeout(t,700),this.networkTimeoutRef=i}));const n=o?await a(this,{scopedTimeoutRef:i,partNumber:r,mockData:s},e):t;if(this.networkTimeoutRef===i){if(!n)throw Error("Wrong response format");this.handleSettingData(n)}this.errorMessage=null,this.state="data"}catch(t){if(t&&"AbortError"===(null==t?void 0:t.name))return;this.state="error",this.partInformation=null,this.errorMessage=t.message}}async fetchData(t=this.externalPartNumber,e={}){await this.setData(t,e)}async loadingListener(){this.loadingStateChange&&this.loadingStateChange(this.state.includes("loading"))}async setMockData(t){s=t}toggleAccordion(t){const e=t.target.parentElement,i=e.getElementsByClassName("icon")[0];if("true"===e.getAttribute("aria-expanded"))e.style.height=d,i.style.transform="rotate(0deg)",e.setAttribute("aria-expanded","false");else{const t=46+e.getElementsByClassName("content")[0].getClientRects()[0].height;e.style.height=t+"px",i.style.transform="rotate(180deg)",e.setAttribute("aria-expanded","true")}}render(){var t,e;return i(o,{key:"28085ac7a954bfdf05ea5d3724530c9d62100bb7"},i("div",{key:"f9f5e65102e89847011cd931c2b9acd7a2389335",class:"min-h-[100px] relative transition-all duration-300 overflow-hidden"},i("div",{key:"9fcc43106e15147a6bad64ac597133c0809eee00"},i(r,{key:"9a33038473f140166debf1bc2fa11299e10ebfcd",isLoading:this.state.includes("loading")}),i("div",{key:"3462deafa07da32d76a1ea6b194ba728fbb12335",class:n("transition-all duration-700",{"scale-0":this.state.includes("loading")||"idle"===this.state,"opacity-0":this.state.includes("loading")})},["error","error-loading"].includes(this.state)&&i("div",{key:"ff6d5801bca6a1dab34ff99ac4e2e211e47f4a13",class:"py-[16px]"},i("div",{key:"4c9221e53ebecc13e3a51d4976c83acf9cf204fd",class:" px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto"},this.errorMessage)),["data","data-loading"].includes(this.state)&&i("div",{key:"4f4bd9eea235444cf091070303ca29c5f2ed4320"},i("div",{key:"03c29418532b04da39db959c6698cbd6f8e3b178",class:"flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]"},i("div",{key:"b489e74211486b2ead5eb4163e0e5492af13e1a0",class:"w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]"},"Dead stock"),null===(e=null===(t=this.partInformation)||void 0===t?void 0:t.deadStock)||void 0===e?void 0:e.map((t=>i("div",{key:t.companyIntegrationID,class:"py-[10px] px-[20px]"},i("div",{"aria-expanded":"false",style:{height:d},class:"border shadow transition-all duration-500 overflow-hidden rounded-md mb-[10px] border-[#d6d8dc]"},i("button",{onClick:this.toggleAccordion,style:{height:d},class:"w-full flex px-[10px] justify-between items-center text-slate-800"},i("strong",null,t.companyName),i("span",{class:"icon text-slate-800 transition-transform duration-500"},i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",class:"size-[22px]"},i("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.78 9.78a.75.75 0 0 1-1.06 0L8 7.06 5.28 9.78a.75.75 0 0 1-1.06-1.06l3.25-3.25a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06Z"})))),i("div",{class:"content"},i("table",{class:"w-full overflow-auto relative border-collapse"},i("thead",null,i("tr",null,i("th",{class:"py-[20px] px-[10px] text-left whitespace-nowrap border-b border-[#d6d8dc]"},"Branch"),i("th",{class:"py-[20px] px-[10px] text-left whitespace-nowrap border-b border-[#d6d8dc]"},"Available Qty"))),i("tbody",null,null==t?void 0:t.branchDeadStock.map((t=>i("tr",{class:"transition-colors border-b border-[#d6d8dc] last:border-none duration-100 hover:bg-slate-100",key:t.companyBranchIntegrationID},i("td",{class:n("py-[20px] px-[10px] text-left whitespace-nowrap")},t.companyBranchName),i("td",{class:n("py-[20px] px-[10px] text-left whitespace-nowrap")},i("strong",null,t.quantity))))))))))))))))))}get el(){return this}static get watchers(){return{state:["loadingListener"]}}static get style(){return'*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.relative{position:relative}.mx-auto{margin-left:auto;margin-right:auto}.mb-\\[10px\\]{margin-bottom:10px}.mt-\\[12px\\]{margin-top:12px}.flex{display:flex}.table{display:table}.size-\\[22px\\]{height:22px;width:22px}.h-\\[40px\\]{height:40px}.max-h-\\[70dvh\\]{max-height:70dvh}.min-h-\\[100px\\]{min-height:100px}.w-fit{width:fit-content}.w-full{width:100%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.scale-0{--tw-scale-x:0;--tw-scale-y:0}.scale-0,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[8px\\]{border-radius:8px}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-\\[\\#d6d8dc\\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.bg-\\[\\#e1e3e5\\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.px-\\[10px\\]{padding-left:10px;padding-right:10px}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.px-\\[20px\\]{padding-left:20px;padding-right:20px}.py-\\[10px\\]{padding-bottom:10px;padding-top:10px}.py-\\[16px\\]{padding-bottom:16px;padding-top:16px}.py-\\[20px\\]{padding-bottom:20px;padding-top:20px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.text-left{text-align:left}.text-center{text-align:center}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.text-\\[\\#383c43\\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.last\\:border-none:last-child{border-style:none}.hover\\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.z-50{z-index:50}.size-\\[40px\\]{height:40px;width:40px}.size-full{height:100%;width:100%}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin-2s{animation:spin 2s linear infinite}'}},[1,"dead-stock-lookup",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],loadingStateChange:[16],loadedResponse:[16],state:[32],externalPartNumber:[32],errorMessage:[32],partInformation:[32],setData:[64],fetchData:[64],setMockData:[64]},void 0,{state:["loadingListener"]}]);function p(){"undefined"!=typeof customElements&&["dead-stock-lookup"].forEach((t=>{"dead-stock-lookup"===t&&(customElements.get(t)||customElements.define(t,l))}))}p();const c=l,h=p;export{c as DeadStockLookup,h as defineCustomElement}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built by ShiftSoftware
|
|
3
3
|
* Copyright (c)
|
|
4
4
|
*/
|
|
5
|
-
import{p as t,H as e,h as i,c as o}from"./p-be0a5ab5.js";import{c as a}from"./p-98d9e7ab.js";import{c as r}from"./p-1344d377.js";import{g as s}from"./p-4f08bcb8.js";import{L as n}from"./p-8385e385.js";let l={};const d=t(class extends e{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.baseUrl="",this.isDev=!1,this.queryString="",this.loadingStateChange=void 0,this.loadedResponse=void 0,this.state="idle",this.externalPartNumber=null,this.errorMessage=null,this.partInformation=void 0}handleSettingData(t){this.partInformation=t}async setData(t,e={}){let i;clearTimeout(this.networkTimeoutRef),this.abortController&&this.abortController.abort(),this.abortController=new AbortController;const o="string"==typeof t,a=o?t:null==t?void 0:t.partNumber;this.externalPartNumber=a;try{if(!a||0===a.trim().length)return void(this.state="idle");this.state="data"===this.state||"error"===this.state?this.state+"-loading":"loading",await new Promise((t=>{i=setTimeout(t,700),this.networkTimeoutRef=i}));const r=o?await s(this,{scopedTimeoutRef:i,partNumber:a,mockData:l},e):t;if(this.networkTimeoutRef===i){if(!r)throw Error("Wrong response format");this.handleSettingData(r)}this.errorMessage=null,this.state="data"}catch(t){if(t&&"AbortError"===(null==t?void 0:t.name))return;this.state="error",this.partInformation=null,this.errorMessage=t.message}}async fetchData(t=this.externalPartNumber,e={}){await this.setData(t,e)}async loadingListener(){this.loadingStateChange&&this.loadingStateChange(this.state.includes("loading"))}async setMockData(t){l=t}render(){var t,e,s,l,d;const c=this.partInformation&&(null===(t=this.partInformation)||void 0===t?void 0:t.localName)||"russian",p=this.partInformation&&(null===(e=this.partInformation.stockParts[0])||void 0===e?void 0:e.hiddenFields)||[],b=(this.partInformation?[{label:"Description",key:"partDescription",value:this.partInformation.stockParts[0].partDescription},{label:"Product Group",key:"group",value:this.partInformation.stockParts[0].group},{label:r(c)+" Description",key:"localDescription",value:this.partInformation.stockParts[0].localDescription},{label:"Dealer Purchase price",key:"fob",value:null===(s=this.partInformation.stockParts[0].fob)||void 0===s?void 0:s.toFixed(2)},{label:"Recommended Retail price",key:"price",value:null===(l=this.partInformation.stockParts[0].price)||void 0===l?void 0:l.toFixed(2)},{label:"Superseded From",key:"supersededFrom",value:this.partInformation.stockParts[0].supersededFrom},{label:"Superseded To",key:"supersededTo",value:this.partInformation.stockParts[0].supersededTo}]:[]).filter((t=>!p.includes(t.key))),h=!!this.partInformation&&!this.partInformation.stockParts.some((({quantityLookUpResult:t})=>"LookupIsSkipped"===t||"QuantityNotWithinLookupThreshold"===t));return i(o,{key:"2d5325fe5c9de1a091b026c47f2cff9ea395c819"},i("div",{key:"4a59866ed5ff95e2737d56dbf446ba9435c44665",class:"min-h-[100px] relative transition-all duration-300 overflow-hidden"},i("div",{key:"cb98c5441b5a402b1a88ca68c48bf2deee662a32"},i(n,{key:"39e40484976ad5804d04424f7049e83d845114d9",isLoading:this.state.includes("loading")}),i("div",{key:"27c0ceb663e66b16028b7fb1c32277a39745be07",class:a("transition-all duration-700",{"scale-0":this.state.includes("loading")||"idle"===this.state,"opacity-0":this.state.includes("loading")})},["error","error-loading"].includes(this.state)&&i("div",{key:"640b12bc46933ae8cadae07d92290b16a3228a1d",class:"py-[16px]"},i("div",{key:"c9aefd71f32e36f28b3388d1ad7aed636bc26b59",class:" px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto"},this.errorMessage)),["data","data-loading"].includes(this.state)&&i("div",{key:"e9a73eb2d8841effe26dd7eb15feb456dc8540ec"},i("div",{key:"8f30a901633ff6ccce7721e773201f4934a69f23",class:"flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]"},i("div",{key:"8aa933eb7ec7fa687e74f7492fc4fc442e1937ca",class:"w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]"},"Info"),i("div",{key:"e65a07ca60cb81b1770211c832c813a49197e577",class:"py-[10px] px-[30px] flex flex-col gap-[15px]"},i("div",{key:"dc21d61f0998a6a41a27b380143b5fbfa4bcc794",class:"grid grid-cols-3 gap-[50px]"},b.map((({label:t,value:e,key:o})=>i("div",{key:o,class:"flex flex-col flex-1"},i("strong",{class:"py-[10px] px-0 border-b-[gray] border-b"},t),i("div",{class:"py-[10px] px-0"},e))))))),h&&i("div",{key:"5e99f34240027ed1945f6dd2d991640d13460521",class:"flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]"},i("div",{key:"aba50f7957b0a8d8bc7152c94184d9cfcb91078f",class:"w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]"},"Distributor Stock"),i("div",{key:"08867b8035baa06558f13ab719a371468d95b6c7",class:"flex flex-col gap-[15px]"},i("table",{key:"a2e56371be24bc625b551520cdecc344651c6042",class:"w-full overflow-auto relative border-collapse"},i("thead",{key:"da5c40f1e778a6edd56ec5722ef8f97ee3db7585",class:"top-0 font-bold sticky bg-white"},i("tr",{key:"662ac441024e2afba028365c19f42680774c6301"},["Location","Availability"].map((t=>i("th",{key:t,class:"px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]"},t))))),i("tbody",{key:"e637cc0a5636ddf73c6d9709ce0ad90c15a34fdc"},null===(d=this.partInformation)||void 0===d?void 0:d.stockParts.map((t=>i("tr",{class:"transition-colors duration-100 border-b border-[#d6d8dc] last:border-none hover:bg-slate-100",key:t.locationID},i("td",{class:a("px-[10px] py-[20px] text-center whitespace-nowrap")},t.locationName),i("td",{class:a("px-[10px] py-[20px] text-center whitespace-nowrap")},i("div",{class:a("text-[red]",{"text-[green]":"Available"===t.quantityLookUpResult,"text-[orange]":"PartiallyAvailable"===t.quantityLookUpResult})},i("strong",null,"Available"===t.quantityLookUpResult?"Available":"PartiallyAvailable"===t.quantityLookUpResult?"Partially Available":"Not Available")))))))))))))))}get el(){return this}static get watchers(){return{state:["loadingListener"]}}static get style(){return'*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.mx-auto{margin-left:auto;margin-right:auto}.mt-\\[12px\\]{margin-top:12px}.flex{display:flex}.table{display:table}.grid{display:grid}.h-\\[40px\\]{height:40px}.max-h-\\[70dvh\\]{max-height:70dvh}.min-h-\\[100px\\]{min-height:100px}.w-fit{width:fit-content}.w-full{width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.scale-0{--tw-scale-x:0;--tw-scale-y:0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-\\[15px\\]{gap:15px}.gap-\\[50px\\]{gap:50px}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[8px\\]{border-radius:8px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-\\[\\#d6d8dc\\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.border-b-\\[gray\\]{--tw-border-opacity:1;border-bottom-color:rgb(128 128 128/var(--tw-border-opacity,1))}.bg-\\[\\#e1e3e5\\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.px-0{padding-left:0;padding-right:0}.px-\\[10px\\]{padding-left:10px;padding-right:10px}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.px-\\[30px\\]{padding-left:30px;padding-right:30px}.py-\\[10px\\]{padding-bottom:10px;padding-top:10px}.py-\\[16px\\]{padding-bottom:16px;padding-top:16px}.py-\\[20px\\]{padding-bottom:20px;padding-top:20px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.text-center{text-align:center}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.font-bold{font-weight:700}.capitalize{text-transform:capitalize}.text-\\[\\#383c43\\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.text-\\[green\\]{--tw-text-opacity:1;color:rgb(0 128 0/var(--tw-text-opacity,1))}.text-\\[orange\\]{--tw-text-opacity:1;color:rgb(255 165 0/var(--tw-text-opacity,1))}.text-\\[red\\]{--tw-text-opacity:1;color:rgb(255 0 0/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.last\\:border-none:last-child{border-style:none}.hover\\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.z-50{z-index:50}.size-\\[40px\\]{height:40px;width:40px}.size-full{height:100%;width:100%}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin-2s{animation:spin 2s linear infinite}'}},[1,"distributor-lookup",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],loadingStateChange:[16],loadedResponse:[16],state:[32],externalPartNumber:[32],errorMessage:[32],partInformation:[32],setData:[64],fetchData:[64],setMockData:[64]},void 0,{state:["loadingListener"]}]);function c(){"undefined"!=typeof customElements&&["distributor-lookup"].forEach((t=>{"distributor-lookup"===t&&(customElements.get(t)||customElements.define(t,d))}))}c();const p=d,b=c;export{p as DistributorLookup,b as defineCustomElement}
|
|
5
|
+
import{p as t,H as e,h as i,c as o}from"./p-be0a5ab5.js";import{c as a}from"./p-98d9e7ab.js";import{c as r}from"./p-1344d377.js";import{g as s}from"./p-4f08bcb8.js";import{L as n}from"./p-c62be897.js";let d={};const l=t(class extends e{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.baseUrl="",this.isDev=!1,this.queryString="",this.hiddenFields="",this.localizationName="",this.loadingStateChange=void 0,this.loadedResponse=void 0,this.state="idle",this.externalPartNumber=null,this.errorMessage=null,this.partInformation=void 0}handleSettingData(t){this.partInformation=t}async setData(t,e={}){let i;clearTimeout(this.networkTimeoutRef),this.abortController&&this.abortController.abort(),this.abortController=new AbortController;const o="string"==typeof t,a=o?t:null==t?void 0:t.partNumber;this.externalPartNumber=a;try{if(!a||0===a.trim().length)return void(this.state="idle");this.state="data"===this.state||"error"===this.state?this.state+"-loading":"loading",await new Promise((t=>{i=setTimeout(t,700),this.networkTimeoutRef=i}));const r=o?await s(this,{scopedTimeoutRef:i,partNumber:a,mockData:d},e):t;if(this.networkTimeoutRef===i){if(!r)throw Error("Wrong response format");this.handleSettingData(r)}this.errorMessage=null,this.state="data"}catch(t){if(t&&"AbortError"===(null==t?void 0:t.name))return;this.state="error",this.partInformation=null,this.errorMessage=t.message}}async fetchData(t=this.externalPartNumber,e={}){await this.setData(t,e)}async loadingListener(){this.loadingStateChange&&this.loadingStateChange(this.state.includes("loading"))}async setMockData(t){d=t}render(){var t,e,s;const d=this.partInformation&&this.localizationName||"russian",l=this.partInformation&&this.hiddenFields.split(",").map((t=>t.trim()))||[],c=(this.partInformation?[{label:"Description",key:"partDescription",value:this.partInformation.stockParts[0].partDescription},{label:"Product Group",key:"group",value:this.partInformation.stockParts[0].group},{label:r(d)+" Description",key:"localDescription",value:this.partInformation.stockParts[0].localDescription},{label:"Dealer Purchase price",key:"fob",value:null===(t=this.partInformation.stockParts[0].fob)||void 0===t?void 0:t.toFixed(2)},{label:"Recommended Retail price",key:"price",value:null===(e=this.partInformation.stockParts[0].price)||void 0===e?void 0:e.toFixed(2)},{label:"Superseded From",key:"supersededFrom",value:this.partInformation.stockParts[0].supersededFrom},{label:"Superseded To",key:"supersededTo",value:this.partInformation.stockParts[0].supersededTo}]:[]).filter((t=>!l.includes(t.key))),p=!!this.partInformation&&!this.partInformation.stockParts.some((({quantityLookUpResult:t})=>"LookupIsSkipped"===t||"QuantityNotWithinLookupThreshold"===t));return i(o,{key:"fa76bb6b6dab895fc0ff1c05e495c67b1e786ea8"},i("div",{key:"e0c11116a2ebc7f728284dbe11c18d014e7cc36e",class:"min-h-[100px] relative transition-all duration-300 overflow-hidden"},i("div",{key:"9bcfd5c07807eb536562ce2384e3541ed3fcdab3"},i(n,{key:"3b5fec76b359d7b0f55933e5729bad6f0d9c3f4a",isLoading:this.state.includes("loading")}),i("div",{key:"1c610d9d994938b0769e4a963e8221681fd813fc",class:a("transition-all duration-700",{"scale-0":this.state.includes("loading")||"idle"===this.state,"opacity-0":this.state.includes("loading")})},["error","error-loading"].includes(this.state)&&i("div",{key:"7052616da32a34c981ef66145edbe2ab67afa50a",class:"py-[16px]"},i("div",{key:"dc1e12e4a947f49ff1555a3370b9485d9027ab13",class:" px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto"},this.errorMessage)),["data","data-loading"].includes(this.state)&&i("div",{key:"067b10f736c0997ee89dde521d6347e502df1efb"},i("div",{key:"2e68ffd0e757ed385d6b4c1821a274905a859736",class:"flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]"},i("div",{key:"5d2acdf14db3c2e9d2d629235ab2c19889eda284",class:"w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]"},"Info"),i("div",{key:"fe366d9127cc75bc7a3cd65f875fd54b69f53e56",class:"py-[10px] px-[30px] flex flex-col gap-[15px]"},i("div",{key:"537a4941c4987dc8a2bd1a70fe81c690f7036b63",class:"grid grid-cols-3 gap-[50px]"},c.map((({label:t,value:e,key:o})=>i("div",{key:o,class:"flex flex-col flex-1"},i("strong",{class:"py-[10px] px-0 border-b-[gray] border-b"},t),i("div",{class:"py-[10px] px-0"},e))))))),p&&i("div",{key:"1281450dd7b8aba827ccb50268a03b0a95c6e1f9",class:"flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]"},i("div",{key:"ac7f771f521828a2ce26132e37157e233ca0e784",class:"w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]"},"Distributor Stock"),i("div",{key:"fae623ee5b973ce06b0d6bdf4374661d9d3797e3",class:"flex flex-col gap-[15px]"},i("table",{key:"de70dc69228c6289ffb5e6b403da955e9c1a4393",class:"w-full overflow-auto relative border-collapse"},i("thead",{key:"4ce5f815c60a6f32b04ed5472d0ff694d19b6d87",class:"top-0 font-bold sticky bg-white"},i("tr",{key:"48b6674d15b88588147756aeced1518a06746041"},["Location","Availability"].map((t=>i("th",{key:t,class:"px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]"},t))))),i("tbody",{key:"f80cb4732d9ce25e6b5b6162d6d8ebf08f7525a4"},null===(s=this.partInformation)||void 0===s?void 0:s.stockParts.map((t=>i("tr",{class:"transition-colors duration-100 border-b border-[#d6d8dc] last:border-none hover:bg-slate-100",key:t.locationID},i("td",{class:a("px-[10px] py-[20px] text-center whitespace-nowrap")},t.locationName),i("td",{class:a("px-[10px] py-[20px] text-center whitespace-nowrap")},i("div",{class:a("text-[red]",{"text-[green]":"Available"===t.quantityLookUpResult,"text-[orange]":"PartiallyAvailable"===t.quantityLookUpResult})},i("strong",null,"Available"===t.quantityLookUpResult?"Available":"PartiallyAvailable"===t.quantityLookUpResult?"Partially Available":"Not Available")))))))))))))))}get el(){return this}static get watchers(){return{state:["loadingListener"]}}static get style(){return'*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.mx-auto{margin-left:auto;margin-right:auto}.mt-\\[12px\\]{margin-top:12px}.flex{display:flex}.table{display:table}.grid{display:grid}.h-\\[40px\\]{height:40px}.max-h-\\[70dvh\\]{max-height:70dvh}.min-h-\\[100px\\]{min-height:100px}.w-fit{width:fit-content}.w-full{width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.scale-0{--tw-scale-x:0;--tw-scale-y:0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-\\[15px\\]{gap:15px}.gap-\\[50px\\]{gap:50px}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[8px\\]{border-radius:8px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-\\[\\#d6d8dc\\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.border-b-\\[gray\\]{--tw-border-opacity:1;border-bottom-color:rgb(128 128 128/var(--tw-border-opacity,1))}.bg-\\[\\#e1e3e5\\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.px-0{padding-left:0;padding-right:0}.px-\\[10px\\]{padding-left:10px;padding-right:10px}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.px-\\[30px\\]{padding-left:30px;padding-right:30px}.py-\\[10px\\]{padding-bottom:10px;padding-top:10px}.py-\\[16px\\]{padding-bottom:16px;padding-top:16px}.py-\\[20px\\]{padding-bottom:20px;padding-top:20px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.text-center{text-align:center}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.font-bold{font-weight:700}.capitalize{text-transform:capitalize}.text-\\[\\#383c43\\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.text-\\[green\\]{--tw-text-opacity:1;color:rgb(0 128 0/var(--tw-text-opacity,1))}.text-\\[orange\\]{--tw-text-opacity:1;color:rgb(255 165 0/var(--tw-text-opacity,1))}.text-\\[red\\]{--tw-text-opacity:1;color:rgb(255 0 0/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.last\\:border-none:last-child{border-style:none}.hover\\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.z-50{z-index:50}.size-\\[40px\\]{height:40px;width:40px}.size-full{height:100%;width:100%}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin-2s{animation:spin 2s linear infinite}'}},[1,"distributor-lookup",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],hiddenFields:[1,"hidden-fields"],localizationName:[1,"localization-name"],loadingStateChange:[16],loadedResponse:[16],state:[32],externalPartNumber:[32],errorMessage:[32],partInformation:[32],setData:[64],fetchData:[64],setMockData:[64]},void 0,{state:["loadingListener"]}]);function c(){"undefined"!=typeof customElements&&["distributor-lookup"].forEach((t=>{"distributor-lookup"===t&&(customElements.get(t)||customElements.define(t,l))}))}c();const p=l,b=c;export{p as DistributorLookup,b as defineCustomElement}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built by ShiftSoftware
|
|
3
3
|
* Copyright (c)
|
|
4
4
|
*/
|
|
5
|
-
import{p as t,H as e,h as i,c as a}from"./p-be0a5ab5.js";import{L as o}from"./p-8385e385.js";import{c as r}from"./p-98d9e7ab.js";import{g as s}from"./p-4f08bcb8.js";import{c as n}from"./p-1344d377.js";let l={};const d=t(class extends e{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.baseUrl="",this.isDev=!1,this.queryString="",this.headerTitle="Manufacturer",this.loadingStateChange=void 0,this.loadedResponse=void 0,this.state="idle",this.externalPartNumber=null,this.errorMessage=null,this.partInformation=void 0}handleSettingData(t){this.partInformation=t}async setData(t,e={}){let i;clearTimeout(this.networkTimeoutRef),this.abortController&&this.abortController.abort(),this.abortController=new AbortController;const a="string"==typeof t,o=a?t:null==t?void 0:t.partNumber;this.externalPartNumber=o;try{if(!o||0===o.trim().length)return void(this.state="idle");this.state="data"===this.state||"error"===this.state?this.state+"-loading":"loading",await new Promise((t=>{i=setTimeout(t,700),this.networkTimeoutRef=i}));const r=a?await s(this,{scopedTimeoutRef:i,partNumber:o,mockData:l},e):t;if(this.networkTimeoutRef===i){if(!r)throw Error("Wrong response format");this.handleSettingData(r)}this.errorMessage=null,this.state="data"}catch(t){if(t&&"AbortError"===(null==t?void 0:t.name))return;this.state="error",this.partInformation=null,this.errorMessage=t.message}}async fetchData(t=this.externalPartNumber,e={}){await this.setData(t,e)}async loadingListener(){this.loadingStateChange&&this.loadingStateChange(this.state.includes("loading"))}async setMockData(t){l=t}render(){var t,e,s,l,d;const c=this.partInformation&&(null===(t=this.partInformation)||void 0===t?void 0:t.localName)||"russian",p=this.partInformation&&(null===(e=this.partInformation.tmcPart)||void 0===e?void 0:e.hiddenFields)||[],h=(this.partInformation?[{label:"Origin",key:"origin",value:this.partInformation.tmcPart.origin},{label:"Warranty Price",key:"warrantyPrice",value:null===(s=this.partInformation.tmcPart.warrantyPrice)||void 0===s?void 0:s.toFixed(2)},{label:"Special Price",key:"specialPrice",value:null===(l=this.partInformation.tmcPart.specialPrice)||void 0===l?void 0:l.toFixed(2)},{label:"Wholesales Price",key:"salesPrice",value:null===(d=this.partInformation.tmcPart.salesPrice)||void 0===d?void 0:d.toFixed(2)},{label:"PNC",key:"pnc",value:this.partInformation.tmcPart.pnc},{label:`PNC ${n(c)} Name`,key:"pncLocalName",value:this.partInformation.tmcPart.pncLocalName},{label:"Bin Code",key:"binCode",value:this.partInformation.tmcPart.binCode},{label:"Dimension 1",key:"dimension1",value:this.partInformation.tmcPart.dimension1},{label:"Dimension 2",key:"dimension2",value:this.partInformation.tmcPart.dimension2},{label:"Dimension 3",key:"dimension3",value:this.partInformation.tmcPart.dimension3},{label:"Net Weight",key:"netWeight",value:this.partInformation.tmcPart.netWeight},{label:"Gross Weight",key:"grossWeight",value:this.partInformation.tmcPart.grossWeight},{label:"Cubic Measure",key:"cubicMeasure",value:this.partInformation.tmcPart.cubicMeasure},{label:"HS Code",key:"hsCode",value:this.partInformation.tmcPart.hsCode},{label:"UZ HS Code",key:"uzHsCode",value:this.partInformation.tmcPart.uzHsCode}]:[]).filter((t=>!p.includes(t.key)));return i(a,{key:"87e9cab3e4a31d7ae4f5111dc9c2084005611dda"},i("div",{key:"18d25225ec6816c736d7e83b400242ff7bc79689",class:"min-h-[100px] relative transition-all duration-300 overflow-hidden"},i("div",{key:"33f32bf2c16a9816ece826e15d36f30033995c36"},i(o,{key:"12428ed032543b7a2eadedb98f3c6d038fcb718f",isLoading:this.state.includes("loading")}),i("div",{key:"2395b76829cf167bd0c2dc90fc673d4f377de245",class:r("transition-all duration-700",{"scale-0":this.state.includes("loading")||"idle"===this.state,"opacity-0":this.state.includes("loading")})},["error","error-loading"].includes(this.state)&&i("div",{key:"1312772acaf6d2ca7cec5362a68d1a7381022be1",class:"py-[16px]"},i("div",{key:"742f76a23e9b2b3a5d29e6d5ab3026a793669d85",class:" px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto"},this.errorMessage)),["data","data-loading"].includes(this.state)&&i("div",{key:"b2d639d00ca896a1dacc58357223ef8b69eafd43"},i("div",{key:"3a63a5357fcab91410199ee9eb0e3775b67266c7",class:"flex mt-[12px] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]"},i("div",{key:"bb82e17a98e1175fb0933bc51ee446af98619039",class:"w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]"},this.headerTitle),i("div",{key:"73a9c933212b7b20886a55fb40be31ed44dfb59d",class:"px-[30px] py-[10px] flex flex-col gap-[15px]"},i("div",{key:"f882dbf62c5271fc5818f444f69bb3f2b4480e46",class:"grid grid-cols-3 gap-[50px]"},h.map((({label:t,value:e,key:a})=>i("div",{key:a,class:"flex flex-col flex-1"},i("strong",{class:"py-[10px] px-0 border-b-[gray] border-b"},t),i("div",{class:"py-[10px] px-0"},e))))))))))))}get el(){return this}static get watchers(){return{state:["loadingListener"]}}static get style(){return'*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.relative{position:relative}.mx-auto{margin-left:auto;margin-right:auto}.mt-\\[12px\\]{margin-top:12px}.flex{display:flex}.grid{display:grid}.h-\\[40px\\]{height:40px}.min-h-\\[100px\\]{min-height:100px}.w-fit{width:fit-content}.w-full{width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.scale-0{--tw-scale-x:0;--tw-scale-y:0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-\\[15px\\]{gap:15px}.gap-\\[50px\\]{gap:50px}.overflow-hidden{overflow:hidden}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[8px\\]{border-radius:8px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-\\[\\#d6d8dc\\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.border-b-\\[gray\\]{--tw-border-opacity:1;border-bottom-color:rgb(128 128 128/var(--tw-border-opacity,1))}.bg-\\[\\#e1e3e5\\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.px-0{padding-left:0;padding-right:0}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.px-\\[30px\\]{padding-left:30px;padding-right:30px}.py-\\[10px\\]{padding-bottom:10px;padding-top:10px}.py-\\[16px\\]{padding-bottom:16px;padding-top:16px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.text-center{text-align:center}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.capitalize{text-transform:capitalize}.text-\\[\\#383c43\\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.z-50{z-index:50}.size-\\[40px\\]{height:40px;width:40px}.size-full{height:100%;width:100%}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin-2s{animation:spin 2s linear infinite}.duration-100{transition-duration:.1s}'}},[1,"manufacturer-lookup",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],headerTitle:[1,"header-title"],loadingStateChange:[16],loadedResponse:[16],state:[32],externalPartNumber:[32],errorMessage:[32],partInformation:[32],setData:[64],fetchData:[64],setMockData:[64]},void 0,{state:["loadingListener"]}]);function c(){"undefined"!=typeof customElements&&["manufacturer-lookup"].forEach((t=>{"manufacturer-lookup"===t&&(customElements.get(t)||customElements.define(t,d))}))}c();const p=d,h=c;export{p as ManufacturerLookup,h as defineCustomElement}
|
|
5
|
+
import{p as t,H as e,h as i,c as a}from"./p-be0a5ab5.js";import{L as o}from"./p-c62be897.js";import{c as r}from"./p-98d9e7ab.js";import{g as s}from"./p-4f08bcb8.js";import{c as n}from"./p-1344d377.js";let l={};const d=t(class extends e{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.baseUrl="",this.isDev=!1,this.queryString="",this.hiddenFields="",this.localizationName="",this.headerTitle="Manufacturer",this.loadingStateChange=void 0,this.loadedResponse=void 0,this.state="idle",this.externalPartNumber=null,this.errorMessage=null,this.partInformation=void 0}handleSettingData(t){this.partInformation=t}async setData(t,e={}){let i;clearTimeout(this.networkTimeoutRef),this.abortController&&this.abortController.abort(),this.abortController=new AbortController;const a="string"==typeof t,o=a?t:null==t?void 0:t.partNumber;this.externalPartNumber=o;try{if(!o||0===o.trim().length)return void(this.state="idle");this.state="data"===this.state||"error"===this.state?this.state+"-loading":"loading",await new Promise((t=>{i=setTimeout(t,700),this.networkTimeoutRef=i}));const r=a?await s(this,{scopedTimeoutRef:i,partNumber:o,mockData:l},e):t;if(this.networkTimeoutRef===i){if(!r)throw Error("Wrong response format");this.handleSettingData(r)}this.errorMessage=null,this.state="data"}catch(t){if(t&&"AbortError"===(null==t?void 0:t.name))return;this.state="error",this.partInformation=null,this.errorMessage=t.message}}async fetchData(t=this.externalPartNumber,e={}){await this.setData(t,e)}async loadingListener(){this.loadingStateChange&&this.loadingStateChange(this.state.includes("loading"))}async setMockData(t){l=t}render(){var t,e,s;const l=this.partInformation&&this.localizationName||"russian",d=this.partInformation&&this.hiddenFields.split(",").map((t=>t.trim()))||[],c=(this.partInformation?[{label:"Origin",key:"origin",value:this.partInformation.tmcPart.origin},{label:"Warranty Price",key:"warrantyPrice",value:null===(t=this.partInformation.tmcPart.warrantyPrice)||void 0===t?void 0:t.toFixed(2)},{label:"Special Price",key:"specialPrice",value:null===(e=this.partInformation.tmcPart.specialPrice)||void 0===e?void 0:e.toFixed(2)},{label:"Wholesales Price",key:"salesPrice",value:null===(s=this.partInformation.tmcPart.salesPrice)||void 0===s?void 0:s.toFixed(2)},{label:"PNC",key:"pnc",value:this.partInformation.tmcPart.pnc},{label:`PNC ${n(l)} Name`,key:"pncLocalName",value:this.partInformation.tmcPart.pncLocalName},{label:"Bin Code",key:"binCode",value:this.partInformation.tmcPart.binCode},{label:"Dimension 1",key:"dimension1",value:this.partInformation.tmcPart.dimension1},{label:"Dimension 2",key:"dimension2",value:this.partInformation.tmcPart.dimension2},{label:"Dimension 3",key:"dimension3",value:this.partInformation.tmcPart.dimension3},{label:"Net Weight",key:"netWeight",value:this.partInformation.tmcPart.netWeight},{label:"Gross Weight",key:"grossWeight",value:this.partInformation.tmcPart.grossWeight},{label:"Cubic Measure",key:"cubicMeasure",value:this.partInformation.tmcPart.cubicMeasure},{label:"HS Code",key:"hsCode",value:this.partInformation.tmcPart.hsCode},{label:"UZ HS Code",key:"uzHsCode",value:this.partInformation.tmcPart.uzHsCode}]:[]).filter((t=>!d.includes(t.key)));return i(a,{key:"1ad38e17ff3255b89145ba040254f198974deb53"},i("div",{key:"b0c5cc452c93236ad41e2431bf18541db67827d0",class:"min-h-[100px] relative transition-all duration-300 overflow-hidden"},i("div",{key:"ceffa481201dc0b881fa583f43c7da445f8e9cc8"},i(o,{key:"16bdf498e39fe381050ea33dac6d00df4b3ae05f",isLoading:this.state.includes("loading")}),i("div",{key:"51222801ac0728fcde2472ec74022c16e1157ce9",class:r("transition-all duration-700",{"scale-0":this.state.includes("loading")||"idle"===this.state,"opacity-0":this.state.includes("loading")})},["error","error-loading"].includes(this.state)&&i("div",{key:"cc6965c0ade12609bb6f9a61c250a550f4d70007",class:"py-[16px]"},i("div",{key:"fc6558de2bc351f09a04b7547dd690fcfcfc7ec3",class:" px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto"},this.errorMessage)),["data","data-loading"].includes(this.state)&&i("div",{key:"985204509c072b21dc94b2a3005fea81d712b30d"},i("div",{key:"42ce83c26e55f8d6eb00455820f67670f44b712d",class:"flex mt-[12px] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]"},i("div",{key:"35ff95092d996eda5d81e68e5d80db32588b77ea",class:"w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]"},this.headerTitle),i("div",{key:"8f825747cb1ccce7575ea097a34dfb4944993a9a",class:"px-[30px] py-[10px] flex flex-col gap-[15px]"},i("div",{key:"94ced9aec06e6c09e942366e3271a6d895f4b68b",class:"grid grid-cols-3 gap-[50px]"},c.map((({label:t,value:e,key:a})=>i("div",{key:a,class:"flex flex-col flex-1"},i("strong",{class:"py-[10px] px-0 border-b-[gray] border-b"},t),i("div",{class:"py-[10px] px-0"},e))))))))))))}get el(){return this}static get watchers(){return{state:["loadingListener"]}}static get style(){return'*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.relative{position:relative}.mx-auto{margin-left:auto;margin-right:auto}.mt-\\[12px\\]{margin-top:12px}.flex{display:flex}.grid{display:grid}.h-\\[40px\\]{height:40px}.min-h-\\[100px\\]{min-height:100px}.w-fit{width:fit-content}.w-full{width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.scale-0{--tw-scale-x:0;--tw-scale-y:0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-\\[15px\\]{gap:15px}.gap-\\[50px\\]{gap:50px}.overflow-hidden{overflow:hidden}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[8px\\]{border-radius:8px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-\\[\\#d6d8dc\\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.border-b-\\[gray\\]{--tw-border-opacity:1;border-bottom-color:rgb(128 128 128/var(--tw-border-opacity,1))}.bg-\\[\\#e1e3e5\\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.px-0{padding-left:0;padding-right:0}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.px-\\[30px\\]{padding-left:30px;padding-right:30px}.py-\\[10px\\]{padding-bottom:10px;padding-top:10px}.py-\\[16px\\]{padding-bottom:16px;padding-top:16px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.text-center{text-align:center}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.capitalize{text-transform:capitalize}.text-\\[\\#383c43\\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.z-50{z-index:50}.size-\\[40px\\]{height:40px;width:40px}.size-full{height:100%;width:100%}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin-2s{animation:spin 2s linear infinite}.duration-100{transition-duration:.1s}'}},[1,"manufacturer-lookup",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],hiddenFields:[1,"hidden-fields"],localizationName:[1,"localization-name"],headerTitle:[1,"header-title"],loadingStateChange:[16],loadedResponse:[16],state:[32],externalPartNumber:[32],errorMessage:[32],partInformation:[32],setData:[64],fetchData:[64],setMockData:[64]},void 0,{state:["loadingListener"]}]);function c(){"undefined"!=typeof customElements&&["manufacturer-lookup"].forEach((t=>{"manufacturer-lookup"===t&&(customElements.get(t)||customElements.define(t,d))}))}c();const p=d,h=c;export{p as ManufacturerLookup,h as defineCustomElement}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built by ShiftSoftware
|
|
3
3
|
* Copyright (c)
|
|
4
4
|
*/
|
|
5
|
-
import{p as t,H as e,h as o,c as i}from"./p-be0a5ab5.js";import{L as r}from"./p-8385e385.js";import{c as a}from"./p-98d9e7ab.js";import{g as n}from"./p-c4fad245.js";let s={};const d=t(class extends e{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.baseUrl="",this.isDev=!1,this.queryString="",this.loadingStateChange=void 0,this.loadedResponse=void 0,this.state="idle",this.externalVin=null,this.errorMessage=null,this.vehicleInformation=void 0}handleSettingData(t){null===t.serviceHistory&&(t.serviceHistory=[]),this.vehicleInformation=t}async setData(t,e={}){let o;clearTimeout(this.networkTimeoutRef),this.abortController&&this.abortController.abort(),this.abortController=new AbortController;const i="string"==typeof t,r=i?t:null==t?void 0:t.vin;this.externalVin=r;try{if(!r||0===r.trim().length)return void(this.state="idle");this.state="data"===this.state||"error"===this.state?this.state+"-loading":"loading",await new Promise((t=>{o=setTimeout(t,700),this.networkTimeoutRef=o}));const a=i?await n(this,{scopedTimeoutRef:o,vin:r,mockData:s},e):t;if(this.networkTimeoutRef===o){if(!a)throw new Error("Wrong response format");this.handleSettingData(a)}this.errorMessage=null,this.state="data"}catch(t){if(t&&"AbortError"===(null==t?void 0:t.name))return;this.state="error",this.vehicleInformation=null,this.errorMessage=t.message}}async fetchData(t=this.externalVin,e={}){await this.setData(t,e)}async loadingListener(){this.loadingStateChange&&this.loadingStateChange(this.state.includes("loading"))}async setMockData(t){s=t}render(){var t,e,n,s;return o(i,{key:"52935e6fb3255892bdd284214cfc5400512ffdc3"},o("div",{key:"13ebe565c3622e164a4c3341961fa09f197eff07",class:"min-h-[100px] relative transition-all duration-300 overflow-hidden"},o("div",{key:"17409d800ef7272d68ee4b87ac5290a7840da6b8"},o(r,{key:"ab181a9f94a683a0c9a63022f91bf0be576407e4",isLoading:this.state.includes("loading")}),o("div",{key:"5c4fba056616fd0c73c4621796c03fce922ec585",class:a("transition-all duration-700",{"scale-0":this.state.includes("loading")||"idle"===this.state,"opacity-0":this.state.includes("loading")})},o("div",{key:"d2274baa55784519e27959977137d1df96180176",class:a("text-center pt-[4px] text-[20px]",{"text-red-600":!!this.errorMessage})},null===(t=this.vehicleInformation)||void 0===t?void 0:t.vin),["error","error-loading"].includes(this.state)&&o("div",{key:"e5bbed2b50658ea403a8313ae462bad757538174",class:"py-[16px]"},o("div",{key:"7b591a9617de72e12f8d3d3dc3f20c4028cedb9c",class:" px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto"},this.errorMessage)),["data","data-loading"].includes(this.state)&&o("div",{key:"02488e145ec167f0b6de715d13439029ea11a45a",class:"flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]"},o("div",{key:"1084269343da542e74cb1e9741d06067a3739af1",class:"w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]"},"Service History"),o("div",{key:"38cde65fb146f9b0c0e045f221eea6950ccc66d7",class:"h-0 overflow-auto flex-1"},!(null===(e=this.vehicleInformation)||void 0===e?void 0:e.serviceHistory.length)&&o("div",{key:"a8180a5375a84bc95451df88fcee439713a6c529",class:"h-[80px] flex items-center justify-center text-[18px]"},"No data is available."),!!(null===(n=this.vehicleInformation)||void 0===n?void 0:n.serviceHistory.length)&&o("table",{key:"2e8edb3e5f49dacf3b14ea1259cf464e50c96686",class:"w-full overflow-auto relative border-collapse"},o("thead",{key:"b99cee125c4899a88b0ec6650c0a2e40e9a30617",class:"top-0 font-bold sticky bg-white"},o("tr",{key:"6bd167c617c04d30daefc4b0c20fa688ab6ffc0f"},["Branch","Dealer","Invoice No.","Date","Service Type","Odometer"].map((t=>o("th",{key:t,class:"px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]"},t))))),o("tbody",{key:"bd25354c05ee8b813be63a2278379910842ce24a"},null===(s=this.vehicleInformation)||void 0===s?void 0:s.serviceHistory.map(((t,e)=>o("tr",{class:"transition-colors duration-100 hover:bg-slate-100",key:t.invoiceNumber},["branchName","companyName","invoiceNumber","serviceDate","serviceType","mileage"].map((i=>{var r;return o("td",{key:t.invoiceNumber+i,class:a("px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]",{"!border-none":e===(null===(r=this.vehicleInformation)||void 0===r?void 0:r.serviceHistory.length)-1})},t[i]||"...")})))))))))))))}get el(){return this}static get watchers(){return{state:["loadingListener"]}}static get style(){return'*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.hidden{display:none}.w-full{width:100%}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-bottom:.5rem;margin-top:.5rem}.mt-\\[12px\\]{margin-top:12px}.flex{display:flex}.table{display:table}.h-0{height:0}.h-\\[40px\\]{height:40px}.h-\\[80px\\]{height:80px}.max-h-\\[70dvh\\]{max-height:70dvh}.min-h-\\[100px\\]{min-height:100px}.w-fit{width:fit-content}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.scale-0{--tw-scale-x:0;--tw-scale-y:0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[8px\\]{border-radius:8px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-\\[\\#d6d8dc\\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.bg-\\[\\#e1e3e5\\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.px-\\[10px\\]{padding-left:10px;padding-right:10px}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.py-4{padding-bottom:1rem;padding-top:1rem}.py-\\[20px\\]{padding-bottom:20px;padding-top:20px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.pt-\\[4px\\]{padding-top:4px}.text-center{text-align:center}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.font-bold{font-weight:700}.text-\\[\\#383c43\\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.success-card{background-color:#d0e7de;border-color:#a2d0bb;color:#0b3521}.\\!border-none{border-style:none!important}.py-\\[16px\\]{padding-bottom:16px;padding-top:16px}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.hover\\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.z-50{z-index:50}.size-\\[40px\\]{height:40px;width:40px}.size-full{height:100%;width:100%}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin-2s{animation:spin 2s linear infinite}'}},[1,"service-history",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],loadingStateChange:[16],loadedResponse:[16],state:[32],externalVin:[32],errorMessage:[32],vehicleInformation:[32],setData:[64],fetchData:[64],setMockData:[64]},void 0,{state:["loadingListener"]}]);function l(){"undefined"!=typeof customElements&&["service-history"].forEach((t=>{"service-history"===t&&(customElements.get(t)||customElements.define(t,d))}))}l();export{d as S,l as d}
|
|
5
|
+
import{p as t,H as e,h as o,c as i}from"./p-be0a5ab5.js";import{L as a}from"./p-c62be897.js";import{c as r}from"./p-98d9e7ab.js";import{g as n}from"./p-c4fad245.js";let s={};const d=t(class extends e{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.baseUrl="",this.isDev=!1,this.queryString="",this.loadingStateChange=void 0,this.loadedResponse=void 0,this.state="idle",this.externalVin=null,this.errorMessage=null,this.vehicleInformation=void 0}handleSettingData(t){null===t.serviceHistory&&(t.serviceHistory=[]),this.vehicleInformation=t}async setData(t,e={}){let o;clearTimeout(this.networkTimeoutRef),this.abortController&&this.abortController.abort(),this.abortController=new AbortController;const i="string"==typeof t,a=i?t:null==t?void 0:t.vin;this.externalVin=a;try{if(!a||0===a.trim().length)return void(this.state="idle");this.state="data"===this.state||"error"===this.state?this.state+"-loading":"loading",await new Promise((t=>{o=setTimeout(t,700),this.networkTimeoutRef=o}));const r=i?await n(this,{scopedTimeoutRef:o,vin:a,mockData:s},e):t;if(this.networkTimeoutRef===o){if(!r)throw new Error("Wrong response format");this.handleSettingData(r)}this.errorMessage=null,this.state="data"}catch(t){if(t&&"AbortError"===(null==t?void 0:t.name))return;this.state="error",this.vehicleInformation=null,this.errorMessage=t.message}}async fetchData(t=this.externalVin,e={}){await this.setData(t,e)}async loadingListener(){this.loadingStateChange&&this.loadingStateChange(this.state.includes("loading"))}async setMockData(t){s=t}render(){var t,e,n,s;return o(i,{key:"1b058ba5baea7e3249a66e5b7a040a673b140345"},o("div",{key:"414432d67e85b8ad11a0f9a3bf9cf6336e06c8ce",class:"min-h-[100px] relative transition-all duration-300 overflow-hidden"},o("div",{key:"d4129e8101efd34c820d64661c90c5d81a65a90c"},o(a,{key:"ff1d26799aceb06a1c7b22c556cc1391e3585481",isLoading:this.state.includes("loading")}),o("div",{key:"09a740c1f863f0bd90ea52e6f94c8c9add2901f4",class:r("transition-all duration-700",{"scale-0":this.state.includes("loading")||"idle"===this.state,"opacity-0":this.state.includes("loading")})},o("div",{key:"1e40aeba7672c94cb70479d8cf4ca28e217a1ac2",class:r("text-center pt-[4px] text-[20px]",{"text-red-600":!!this.errorMessage})},null===(t=this.vehicleInformation)||void 0===t?void 0:t.vin),["error","error-loading"].includes(this.state)&&o("div",{key:"4b2102507916ecdd06ce0fbc8fe5b82cf9463fe3",class:"py-[16px]"},o("div",{key:"89a48cf522a860d2840e772ca0a2750ffd6f6652",class:" px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto"},this.errorMessage)),["data","data-loading"].includes(this.state)&&o("div",{key:"42b2403fae1685bf6a49f756ac3a6aae31a6423d",class:"flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]"},o("div",{key:"462678b7179bb278d9a51845fda8c98deff3a790",class:"w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]"},"Service History"),o("div",{key:"a3a484027fa040a6f80b94cdd3c8fcaf5d36a977",class:"h-0 overflow-auto flex-1"},!(null===(e=this.vehicleInformation)||void 0===e?void 0:e.serviceHistory.length)&&o("div",{key:"4562aaa28b8941799d7203c49d0a457feb881616",class:"h-[80px] flex items-center justify-center text-[18px]"},"No data is available."),!!(null===(n=this.vehicleInformation)||void 0===n?void 0:n.serviceHistory.length)&&o("table",{key:"cbb4515b99b33e65536d2f577439bf5c4bd19c61",class:"w-full overflow-auto relative border-collapse"},o("thead",{key:"a6829bbcb8578d51a4be89b02b4095b21966ed9f",class:"top-0 font-bold sticky bg-white"},o("tr",{key:"d6bfa489b6797e499173b8e67b28f0eb519e70ac"},["Branch","Dealer","Invoice No.","Date","Service Type","Odometer"].map((t=>o("th",{key:t,class:"px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]"},t))))),o("tbody",{key:"27f91e98246790262d844c68290f12abdad7ba74"},null===(s=this.vehicleInformation)||void 0===s?void 0:s.serviceHistory.map(((t,e)=>o("tr",{class:"transition-colors duration-100 hover:bg-slate-100",key:t.invoiceNumber},["branchName","companyName","invoiceNumber","serviceDate","serviceType","mileage"].map((i=>{var a;return o("td",{key:t.invoiceNumber+i,class:r("px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]",{"!border-none":e===(null===(a=this.vehicleInformation)||void 0===a?void 0:a.serviceHistory.length)-1})},t[i]||"...")})))))))))))))}get el(){return this}static get watchers(){return{state:["loadingListener"]}}static get style(){return'*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.hidden{display:none}.w-full{width:100%}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-bottom:.5rem;margin-top:.5rem}.mt-\\[12px\\]{margin-top:12px}.flex{display:flex}.table{display:table}.h-0{height:0}.h-\\[40px\\]{height:40px}.h-\\[80px\\]{height:80px}.max-h-\\[70dvh\\]{max-height:70dvh}.min-h-\\[100px\\]{min-height:100px}.w-fit{width:fit-content}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.scale-0{--tw-scale-x:0;--tw-scale-y:0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[8px\\]{border-radius:8px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-\\[\\#d6d8dc\\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.bg-\\[\\#e1e3e5\\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.px-\\[10px\\]{padding-left:10px;padding-right:10px}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.py-4{padding-bottom:1rem;padding-top:1rem}.py-\\[20px\\]{padding-bottom:20px;padding-top:20px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.pt-\\[4px\\]{padding-top:4px}.text-center{text-align:center}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.font-bold{font-weight:700}.text-\\[\\#383c43\\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.success-card{background-color:#d0e7de;border-color:#a2d0bb;color:#0b3521}.\\!border-none{border-style:none!important}.py-\\[16px\\]{padding-bottom:16px;padding-top:16px}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.hover\\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.z-50{z-index:50}.size-\\[40px\\]{height:40px;width:40px}.size-full{height:100%;width:100%}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin-2s{animation:spin 2s linear infinite}'}},[1,"service-history",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],loadingStateChange:[16],loadedResponse:[16],state:[32],externalVin:[32],errorMessage:[32],vehicleInformation:[32],setData:[64],fetchData:[64],setMockData:[64]},void 0,{state:["loadingListener"]}]);function l(){"undefined"!=typeof customElements&&["service-history"].forEach((t=>{"service-history"===t&&(customElements.get(t)||customElements.define(t,d))}))}l();export{d as S,l as d}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built by ShiftSoftware
|
|
3
3
|
* Copyright (c)
|
|
4
4
|
*/
|
|
5
|
-
import{p as i,H as t,h as e,c as a}from"./p-be0a5ab5.js";import{c as o}from"./p-98d9e7ab.js";import{g as n}from"./p-c4fad245.js";import{d as r}from"./p-da533bd7.js";let l={};const s={expired:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzBweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjAiIC8+CiAgICA8ZyBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIC8+CiAgICA8Zz4KICAgICAgICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSI4IiBmaWxsLW9wYWNpdHk9IjAuMjQiIGZpbGw9ImJsYWNrIiBzdHJva2U9ImJsYWNrIiAvPgogICAgICAgIDxwYXRoIGQ9Ik0xNiAxNkw4IDgiIHN0cm9rZS13aWR0aD0iMS4yIiBzdHJva2U9ImJsYWNrIiAvPgogICAgICAgIDxwYXRoIGQ9Ik0xNiA4TDggMTYiIHN0cm9rZS13aWR0aD0iMS4yIiBzdHJva2U9ImJsYWNrIiAvPgogICAgPC9nPgo8L3N2Zz4=",pending:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzBweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjAiIC8+CiAgICA8ZyBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIC8+CiAgICA8Zz4KICAgICAgICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSI4IiBmaWxsLW9wYWNpdHk9IjAuMjQiIGZpbGw9IiNhMWExYTEiIHN0cm9rZT0iI2ExYTFhMSIgLz4KICAgICAgICA8cmVjdCB4PSI5LjUiIHk9IjgiIHdpZHRoPSIyIiBoZWlnaHQ9IjgiIGZpbGw9IiNhMWExYTEiIC8+CiAgICAgICAgPHJlY3QgeD0iMTIuNSIgeT0iOCIgd2lkdGg9IjIiIGhlaWdodD0iOCIgZmlsbD0iI2ExYTFhMSIgLz4KICAgIDwvZz4KPC9zdmc+",processed:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzBweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjAiIC8+CiAgICA8ZyBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIC8+CiAgICA8Zz4KICAgICAgICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSI4IiBmaWxsLW9wYWNpdHk9IjAuMjQiIGZpbGw9IiMzMDcxYTkiIHN0cm9rZT0iIzMwNzFhOSIgLz4KICAgICAgICA8cGF0aCBkPSJNOC41IDExTDExLjM5MzkgMTMuODkzOUMxMS40NTI1IDEzLjk1MjUgMTEuNTQ3NSAxMy45NTI1IDExLjYwNjEgMTMuODkzOUwxOS41IDYiIHN0cm9rZT0iIzMwNzFhOSIKICAgICAgICAgICAgc3Ryb2tlLXdpZHRoPSIxLjIiIC8+CiAgICA8L2c+Cjwvc3ZnPg==",cancelled:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzBweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjAiIC8+CiAgICA8ZyBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIC8+CiAgICA8Zz4KICAgICAgICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSI4IiBmaWxsLW9wYWNpdHk9IjAuMjQiIGZpbGw9IiNhODAwMDAiIHN0cm9rZT0iI2E4MDAwMCIgLz4KICAgICAgICA8cGF0aCBkPSJNMTggMThMNiA2IiBzdHJva2Utd2lkdGg9IjEuMiIgc3Ryb2tlPSIjYTgwMDAwIiAvPgogICAgPC9nPgo8L3N2Zz4="},d=i(class extends t{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.pendingItemHighlighted=!1,this.onMouseLeave=()=>{clearTimeout(this.timeoutRef),this.popupClasses="",this.timeoutRef=setTimeout((()=>{this.activePopupIndex=null}),400)},this.onMouseEnter=(i,t)=>{clearTimeout(this.timeoutRef),this.activePopupIndex=t,this.timeoutRef=setTimeout((()=>{const t=i.querySelector(".popup-position-ref");this.popupPositionRef=t,this.calculatePopupPos(this.el.shadowRoot),this.popupClasses="show"}),50)},this.baseUrl=void 0,this.isDev=!1,this.queryString="",this.isIdle=!0,this.popupClasses="",this.externalVin=null,this.activePopupIndex=null,this.vehicleInformation=void 0,this.errorMessage=null,this.isLoading=!1,this.loadingStateChange=void 0,this.loadedResponse=void 0}async componentDidLoad(){this.dynamicClaimBody=this.el.shadowRoot.querySelector(".dynamic-claim-body"),this.dynamicRedeem=this.el.shadowRoot.getElementById("dynamic-redeem"),this.dynamicClaimProgressBar=this.el.shadowRoot.querySelector(".dynamic-claim-progress-bar")}async setMockData(i){l=i}async setData(i,t={}){let e;clearTimeout(this.networkTimeoutRef),this.abortController&&this.abortController.abort(),this.abortController=new AbortController;const a="string"==typeof i,o=a?i:null==i?void 0:i.vin;this.externalVin=o;try{if(!o||0===o.trim().length)return void(this.isIdle=!0);this.isLoading=!0,this.isIdle=!1,await new Promise((i=>{e=setTimeout(i,1e3),this.networkTimeoutRef=e}));const r=a?await n(this,{scopedTimeoutRef:e,vin:o,mockData:l},t):i;if(this.networkTimeoutRef===e){if(!r)throw new Error("Wrong response format");if(!Array.isArray(r.serviceItems))throw new Error("No Service Available");this.vehicleInformation=r}this.errorMessage=null,this.isLoading=!1}catch(i){if(i&&"AbortError"===(null==i?void 0:i.name))return;this.isLoading=!1,this.vehicleInformation=null,this.errorMessage=i.message}}async fetchData(i=this.externalVin,t={}){await this.setData(i,t)}onLoadingChange(i){this.loadingStateChange&&this.loadingStateChange(i),this.setLoadingUi(i)}async setLoadingUi(i){i||(this.dynamicClaimProgressBar.style.width="0",await new Promise((i=>setTimeout(i,200))),this.updateProgressBar())}updateProgressBar(){var i;const t=(null===(i=this.vehicleInformation)||void 0===i?void 0:i.serviceItems)||[];if(0===t.filter((i=>"pending"===i.status)).length)this.dynamicClaimProgressBar.style.width=0===t.length?"0%":"100%",this.dynamicClaimBody.scrollTo({left:this.dynamicClaimBody.scrollWidth,behavior:"smooth"});else{const i=t.find((i=>"pending"===i.status)),e=t.indexOf(i)+1,a=this.dynamicClaimBody.getElementsByClassName("dynamic-claim-item")[e-1];this.dynamicClaimProgressBar.style.width=100*(e/t.length-1/(2*t.length))+"%",this.dynamicClaimBody.scrollTo({left:a.offsetLeft-3*a.clientWidth,behavior:"smooth"})}}resetProgressBar(){setTimeout((()=>{this.updateProgressBar()}),100)}windowScrollListener(i){i?(this.scrollListenerRef=()=>this.calculatePopupPos(this.el.shadowRoot),window.addEventListener("scroll",this.scrollListenerRef),this.dynamicClaimBody.addEventListener("scroll",this.scrollListenerRef)):(window.removeEventListener("scroll",this.scrollListenerRef),this.dynamicClaimBody.removeEventListener("scroll",this.scrollListenerRef))}calculatePopupPos(i){const t=i.querySelector(".popup-position-ref");let{x:e,y:a}=t.getBoundingClientRect();const o=t.querySelector(".popup-container"),{width:n}=o.getBoundingClientRect(),r=o.querySelector(".dynamic-claim-item-popup-info"),l=window.innerWidth;o.style.top=`${a}px`,o.style.left=e-n/2+"px";const s=e-n/2,d=l-(e+n/2);let c=0;d<16?c=d-16:s<16&&(c=Math.abs(s-16)),r.style.transform=`translateX(${c}px)`}removeLoadAnimationClass(i){i.target.classList.remove("load-animation")}async completeClaim(){var i;const t=(null===(i=this.vehicleInformation)||void 0===i?void 0:i.serviceItems)||[],e=this.cachedClaimItem,a=JSON.parse(JSON.stringify(t)),o=t.indexOf(e),n=a.slice(0,o).filter((i=>"pending"===i.status));a[o].status="processed",n.forEach((function(i){i.status="cancelled"})),this.pendingItemHighlighted=!1;const r=JSON.parse(JSON.stringify(this.vehicleInformation));r.serviceItems=a,this.vehicleInformation=JSON.parse(JSON.stringify(r))}claim(i){var t;const e=(null===(t=this.vehicleInformation)||void 0===t?void 0:t.serviceItems)||[],a=JSON.parse(JSON.stringify(e)),o=e.indexOf(i);let n=a.slice(0,o).filter((i=>"pending"===i.status));this.cachedClaimItem=i,null===i.maximumMileage&&(n=[]),this.onMouseLeave(),this.openRedeem(i,n)}async handleRedeemScanner(){this.dynamicRedeem.handleScanner=this.isDev?async()=>{await new Promise((i=>setTimeout(i,500))),this.dynamicRedeem.quite(),this.completeClaim(),this.dynamicRedeem.handleScanner=null}:async i=>{try{const t=this.vehicleInformation,e={vin:t.vin,brandIntegrationID:t.identifiers.brandIntegrationID,invoice:i,saleInformation:t.saleInformation,serviceItem:this.dynamicRedeem.item,cancelledServiceItems:this.dynamicRedeem.canceledItems},a=await fetch("/api/vehicle/swift-claim",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),o=await a.json();if(!o.Success)return alert(o.Message),this.dynamicRedeem.quite(),void(this.dynamicRedeem.handleScanner=null);this.dynamicRedeem.quite(),this.completeClaim(),this.dynamicRedeem.handleScanner=null}catch(i){console.error(i),alert("Request failed please try again later"),this.dynamicRedeem.quite(),this.dynamicRedeem.handleScanner=null}}}openRedeem(i,t){var e,a,o,n,r;const l=this.vehicleInformation;this.dynamicRedeem.vin=null==l?void 0:l.vin,this.dynamicRedeem.item=i,this.dynamicRedeem.canceledItems=t,this.dynamicRedeem.unInvoicedByBrokerName=null!==(null===(e=null==l?void 0:l.saleInformation)||void 0===e?void 0:e.broker)&&null===(null===(o=null===(a=null==l?void 0:l.saleInformation)||void 0===a?void 0:a.broker)||void 0===o?void 0:o.invoiceDate)?null===(r=null===(n=null==l?void 0:l.saleInformation)||void 0===n?void 0:n.broker)||void 0===r?void 0:r.brokerName:null,this.handleRedeemScanner()}createPopup(i){return e("div",{class:"popup-position-ref"},e("div",{class:"popup-container"},e("div",{class:o("dynamic-claim-item-popup-info-triangle",this.popupClasses)},e("div",{class:"dynamic-claim-item-popup-info-triangle-up"}),e("div",{class:"dynamic-claim-item-popup-info-triangle-up2"})),e("div",{class:o("dynamic-claim-item-popup-info",this.popupClasses)},e("table",null,e("tbody",null,e("tr",null,e("th",null,"Service Type:"),e("td",null,i.type.charAt(0).toUpperCase()+i.type.slice(1))),e("tr",null,e("th",null,"Activation Date"),e("td",null,i.activatedAt)),e("tr",null,e("th",null,"Expiry Date"),e("td",null,i.expiresAt)),e("tr",null,e("th",null,"Claimed At"),e("td",null,i.redeemDate)),e("tr",null,e("th",null,"Redeeming Dealer"),e("td",null,i.dealerName)),e("tr",null,e("th",null,"Invoice Number"),e("td",null,i.invoiceNumber)),e("tr",null,e("th",null,"WIP"),e("td",null,i.wip)),e("tr",null,e("th",null,"Menu Code"),e("td",null,i.menuCode)))),"pending"===i.status&&e("button",{onClick:()=>this.claim(i),class:"dynamic-claim-button claim-button"},e("svg",{width:"30px",height:"30px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("g",{"stroke-width":"0"}),e("g",{"stroke-linecap":"round","stroke-linejoin":"round"}),e("g",null,e("circle",{cx:"12",cy:"12",r:"8","fill-opacity":"0.24"}),e("path",{d:"M8.5 11L11.3939 13.8939C11.4525 13.9525 11.5475 13.9525 11.6061 13.8939L19.5 6","stroke-width":"1.2"}))),e("span",null,"Claim")))))}render(){var i,t;const n=(null===(i=this.vehicleInformation)||void 0===i?void 0:i.serviceItems)||[];return e(a,{key:"541c3dd78435e13a8d8bbd9d9e1bdd3e421ff700"},e("dynamic-redeem",{key:"98a8918ed4ee9b3c65eb76c6d219c397dc038938",id:"dynamic-redeem"}),e("div",{key:"21b931d1ac7ff57a75cc235e5a9d7383a60bcce9",class:o("dynamic-claim-wrapper",{loading:this.isLoading,idle:this.isIdle})},e("div",{key:"7a11a3db11737b27f570b7722c84c264a9927cb5",class:"dynamic-claim-header"},e("strong",{key:"90134387cef16786e348a6cee3949113c6b789cc",onAnimationEnd:this.removeLoadAnimationClass,class:"dynamic-claim-header-vin load-animation"},this.errorMessage&&e("span",{key:"848036da3b9fe9ef737e2a461dc6475651ee9b3c",style:{color:"red"}},this.errorMessage),!this.errorMessage&&(null===(t=this.vehicleInformation)||void 0===t?void 0:t.vin))),e("div",{key:"046d01dbbf1c91fc735ce41c6f2ffaa41000f7ad",class:"dynamic-claim-body"},e("div",{key:"83bc44663ebdf506306b04c7cee43d3051bc52b8",class:"loading-lane"},e("div",{key:"4b7c8ac724afdc40379d58c7d77810bc1a10704b",class:"dynamic-claim-loading-slider"},e("div",{key:"8404f36fd0afc3f0d052c5144b5698e19a8f25bb",class:"dynamic-claim-loading-slider-line"}),e("div",{key:"0c0b553b1139c65ce4261ef7382791931f9558ac",class:"dynamic-claim-loading-slider-subline dynamic-claim-inc"}),e("div",{key:"afcad75d078227301ffc7738a536cd765f5696b8",class:"dynamic-claim-loading-slider-subline dynamic-claim-dec"}))),e("div",{key:"4885864414ed5efe3928e331cf8fbd46ba705467",class:"dynamic-claim-progress-lane"},n.map(((i,t)=>{let a="";return"pending"===i.status?n.findIndex((i=>"pending"===i.status))===t&&(a=i.status):a=i.status,e("div",{key:i.name,class:o("dynamic-claim-item",a),onMouseLeave:this.onMouseLeave},e("div",{onAnimationEnd:this.removeLoadAnimationClass,class:"dynamic-claim-item-header load-animation",onMouseEnter:i=>this.onMouseEnter(i.target,t)},e("img",{src:s[i.status],alt:"status icon"}),e("span",null,i.status.charAt(0).toUpperCase()+i.status.slice(1)),this.activePopupIndex===t&&this.createPopup(i)),e("div",{onAnimationEnd:this.removeLoadAnimationClass,class:"dynamic-claim-item-circle load-animation"}),e("p",{onAnimationEnd:this.removeLoadAnimationClass,class:"dynamic-claim-item-footer load-animation"},i.name))})),e("div",{key:"1bc2d25dae363c03425128ea08be4b076ae11c66",class:"dynamic-claim-progress-bar"})))))}get el(){return this}static get watchers(){return{isLoading:["onLoadingChange"],vehicleInformation:["resetProgressBar"],popupClasses:["windowScrollListener"]}}static get style(){return'*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.visible{visibility:visible}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.block{display:block}.flex{display:flex}.table{display:table}.hidden{display:none}.flex-shrink{flex-shrink:1}.border-collapse{border-collapse:collapse}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.border{border-width:1px}.outline{outline-style:solid}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}:host{all:initial!important;display:block;flex:1 1 0!important;flex-shrink:0!important;width:100%!important}*{box-sizing:content-box;font-family:Arial;margin:revert;padding:revert}.dynamic-claim-wrapper{background:#fdfdfd;border:1px solid #dcdcdc;border-radius:5px;box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 hsla(0,0%,100%,.1);overflow:hidden;padding:0;position:relative}.dynamic-claim-header{background:#f6f6f6;border:1px solid #ededed;padding:15px 0;text-align:center}.dynamic-claim-header-vin{display:inline-block;transition:.4s}.idle .dynamic-claim-header-vin,.loading .dynamic-claim-header-vin{opacity:0;transform:scale(150%);visibility:hidden}.dynamic-claim-body{display:flex;overflow-x:scroll;padding:100px 30px;transition:scrollbar-color .5s ease}.idle .dynamic-claim-body,.loading .dynamic-claim-body{pointer-events:none}.dynamic-claim-wrapper ::-webkit-scrollbar{height:10px;width:10px}.dynamic-claim-wrapper ::-webkit-scrollbar-track{background:#f6f6f6;border-radius:5px;border-top:1px solid #dcdcdc;border-top-left-radius:0;border-top-right-radius:0}.idle .dynamic-claim-body::-webkit-scrollbar-thumb,.loading .dynamic-claim-body::-webkit-scrollbar-thumb{background:transparent}.dynamic-claim-wrapper ::-webkit-scrollbar-thumb{background:#c5c5c5;border-radius:10px}.dynamic-claim-wrapper ::-webkit-scrollbar-thumb:hover{background:#a1a1a1}.dynamic-claim-progress-lane,.loading-lane{align-items:center;background-color:#f2f2f2;border:1px solid #ddd;border-radius:10px;display:flex;flex:1;flex-direction:row;height:10px;justify-content:space-around;position:relative}.idle .dynamic-claim-progress-lane,.loading .dynamic-claim-progress-lane{background-color:transparent;border:1px solid transparent}.loading-lane{position:absolute;visibility:hidden;width:calc(100% - 60px)}.loading .loading-lane{visibility:visible}.dynamic-claim-progress-bar{background-image:linear-gradient(180deg,#428bca,#3071a9);border:1px solid #ddd;border-radius:10px;height:10px;left:0;position:absolute;transition:all;transition-duration:.5s;transition-timing-function:ease-in-out;width:0;z-index:0}.idle .dynamic-claim-progress-bar,.loading .dynamic-claim-progress-bar{opacity:0;width:0!important}.dynamic-claim-item{align-items:center;display:flex;flex-direction:column;font-size:14px;gap:5px;min-width:250px}.popup-position-ref{bottom:0;display:flex;height:0;justify-content:center;position:absolute;width:0}.popup-container{position:fixed;z-index:100}.dynamic-claim-item-popup-info{background-color:#f9f9f9;border:1px solid #ddd;border-radius:5px;color:#282828;opacity:0;padding:20px;transition:.4s;visibility:hidden;width:auto}.dynamic-claim-item-popup-info-triangle.show,.dynamic-claim-item-popup-info.show{opacity:1;visibility:visible}.dynamic-claim-item-popup-info table{border-collapse:collapse;width:100%}.dynamic-claim-item-popup-info table td,.dynamic-claim-item-popup-info table th{border-bottom:1px solid #ddd;padding:10px 50px 10px 10px;text-align:left;white-space:nowrap}.dynamic-claim-item-popup-info table td{font-weight:400}.dynamic-claim-item-popup-info .claim-button{justify-content:center;margin:15px auto auto;width:80%}.dynamic-claim-item-popup-info-triangle{display:flex;justify-content:center;opacity:0;position:relative;transform:translateY(-9px);transition:.4s;visibility:hidden;width:100%;z-index:101}.dynamic-claim-item-popup-info-triangle-up{border-bottom:10px solid #ddd}.dynamic-claim-item-popup-info-triangle-up,.dynamic-claim-item-popup-info-triangle-up2{border-left:10px solid transparent;border-right:10px solid transparent;height:0;position:absolute;width:0}.dynamic-claim-item-popup-info-triangle-up2{border-bottom:10px solid #f9f9f9;margin-top:1px}.dynamic-claim-item-header{align-items:center;cursor:pointer;display:flex;flex-direction:column;height:3em;line-height:1em;padding:10px 0;position:relative;transition:.4s}.dynamic-claim-item-header.load-animation{animation:item-header-fade-in .65s ease forwards}@keyframes item-header-fade-in{0%{opacity:0;transform:translateY(-5px) scale(70%)}to{opacity:1;transform:translateY(0) scale(100%)}}.dynamic-claim-item-header span{font-weight:700}.dynamic-claim-item-header img{transition:.4s}.dynamic-claim-item-header:hover>img{transform:rotate(1turn) scale(125%)}.idle .dynamic-claim-item-header,.loading .dynamic-claim-item-header{opacity:0;transform:translateY(-5px) scale(70%)}.dynamic-claim-item-footer{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;height:4.5em;line-height:1.5em;margin:0;overflow:hidden;padding:0 20px;text-align:center;text-overflow:ellipsis;transition:.4s}.dynamic-claim-item-footer.load-animation{animation:item-footer-fade-in .65s ease forwards}@keyframes item-footer-fade-in{0%{opacity:0;transform:translateY(5px) scale(70%);visibility:hidden}to{opacity:1;transform:translateY(0) scale(100%);visibility:visible}}.idle .dynamic-claim-item-footer,.loading .dynamic-claim-item-footer{opacity:0;transform:translateY(5px) scale(70%);visibility:hidden}.dynamic-claim-item-circle{background-color:#a1a1a1;border:5px double #ececec;border-radius:50%;height:18px;transition:.4s;width:18px;z-index:1}.dynamic-claim-item-circle.load-animation{animation:item-circle-fade-in .65s ease forwards}@keyframes item-circle-fade-in{0%{opacity:0;transform:scale(150%);visibility:hidden}to{opacity:1;transform:scale(100%);visibility:visible}}.idle .dynamic-claim-item-circle,.loading .dynamic-claim-item-circle{opacity:0;transform:scale(150%);visibility:hidden}.dynamic-claim-item.processed .dynamic-claim-item-circle{background-color:#3071a9}.dynamic-claim-item.processed .dynamic-claim-item-header{color:#3071a9}.dynamic-claim-item.expired .dynamic-claim-item-circle{background-color:#282828}.dynamic-claim-item.expired .dynamic-claim-item-headaer{color:#282828}.dynamic-claim-item.cancelled .dynamic-claim-item-circle{background-color:#a80000}.dynamic-claim-item.cancelled .dynamic-claim-item-header{color:#a80000}.dynamic-claim-item.pending .dynamic-claim-item-circle{background-color:#00a300}.dynamic-claim-item.pending .dynamic-claim-item-header{color:#00a300}.dynamic-claim-loading-slider{border-radius:4px;height:10px;left:0;overflow-x:hidden;position:relative;position:absolute;top:0;width:100%}.dynamic-claim-loading-slider-line{background:#ddd;height:10px;opacity:0;position:absolute;width:150%}.dynamic-claim-loading-slider-subline{background-image:linear-gradient(180deg,#428bca,#3071a9);height:10px;position:absolute}.dynamic-claim-wrapper.loading .dynamic-claim-inc{animation:dynamic-claim-increase 2.5s ease infinite}.dynamic-claim-wrapper.loading .dynamic-claim-dec{animation:dynamic-claim-decrease 2.5s ease 1s infinite}@keyframes dynamic-claim-increase{0%{left:-5%;width:5%}to{left:130%;width:100%}}@keyframes dynamic-claim-decrease{0%{left:-80%;width:80%}to{left:110%;width:10%}}.dynamic-claim-button{align-items:center;border:none;border-radius:5px;color:#fff;cursor:pointer;display:flex;font-weight:700;gap:3px;outline:none;padding:0 10px 0 0;transition:.3s}.dynamic-claim-button svg{transition:.2s}.claim-button{stroke:#27ae60;fill:#27ae60;background-color:transparent;border:1px solid #27ae60;color:#27ae60}.claim-button circle{fill:#2ecc71}.claim-button:hover{stroke:#fff;fill:#fff;background-color:#2ecc71;color:#fff}.claim-button:hover circle{fill:#fff}.claim-button:active{background-color:#27ae60}.claim-button:active svg{transform:scale(125%)}.cancel-button{stroke:#c0392b;fill:#c0392b;background-color:transparent;border:1px solid #c0392b;color:#c0392b}.cancel-button circle{fill:#c0392b;transition:.1s}.cancel-button:hover{stroke:#fff;fill:#fff;background-color:#e74c3c;color:#fff}.cancel-button:hover circle{fill:#fff}.static{position:static}.w-full{width:100%}.sticky{position:sticky}.top-0{top:0}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-bottom:.5rem;margin-top:.5rem}.mt-\\[12px\\]{margin-top:12px}.h-0{height:0}.h-\\[40px\\]{height:40px}.h-\\[80px\\]{height:80px}.max-h-\\[70dvh\\]{max-height:70dvh}.min-h-\\[100px\\]{min-height:100px}.w-fit{width:fit-content}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.scale-0{--tw-scale-x:0;--tw-scale-y:0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[8px\\]{border-radius:8px}.border-b{border-bottom-width:1px}.border-\\[\\#d6d8dc\\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.bg-\\[\\#e1e3e5\\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.px-\\[10px\\]{padding-left:10px;padding-right:10px}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.py-4{padding-bottom:1rem;padding-top:1rem}.py-\\[20px\\]{padding-bottom:20px;padding-top:20px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.pt-\\[4px\\]{padding-top:4px}.text-center{text-align:center}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.font-bold{font-weight:700}.text-\\[\\#383c43\\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.success-card{background-color:#d0e7de;border-color:#a2d0bb;color:#0b3521}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.m-\\[3px\\]{margin:3px}.my-4{margin-bottom:1rem;margin-top:1rem}.ml-1{margin-left:.25rem}.border-separate{border-collapse:separate}.list-disc{list-style-type:disc}.gap-1{gap:.25rem}.pl-10{padding-left:2.5rem}'}},[1,"dynamic-claim",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],loadingStateChange:[16],loadedResponse:[16],isIdle:[32],popupClasses:[32],externalVin:[32],activePopupIndex:[32],vehicleInformation:[32],errorMessage:[32],isLoading:[32],setMockData:[64],setData:[64],fetchData:[64],completeClaim:[64]},void 0,{isLoading:["onLoadingChange"],vehicleInformation:["resetProgressBar"],popupClasses:["windowScrollListener"]}]);function c(){"undefined"!=typeof customElements&&["dynamic-claim","dynamic-redeem"].forEach((i=>{switch(i){case"dynamic-claim":customElements.get(i)||customElements.define(i,d);break;case"dynamic-redeem":customElements.get(i)||r()}}))}c();export{d as D,c as d}
|
|
5
|
+
import{p as i,H as t,h as e,c as a}from"./p-be0a5ab5.js";import{c as o}from"./p-98d9e7ab.js";import{g as n}from"./p-c4fad245.js";import{d as r}from"./p-6ffb4e5d.js";let l={};const s={expired:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzBweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjAiIC8+CiAgICA8ZyBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIC8+CiAgICA8Zz4KICAgICAgICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSI4IiBmaWxsLW9wYWNpdHk9IjAuMjQiIGZpbGw9ImJsYWNrIiBzdHJva2U9ImJsYWNrIiAvPgogICAgICAgIDxwYXRoIGQ9Ik0xNiAxNkw4IDgiIHN0cm9rZS13aWR0aD0iMS4yIiBzdHJva2U9ImJsYWNrIiAvPgogICAgICAgIDxwYXRoIGQ9Ik0xNiA4TDggMTYiIHN0cm9rZS13aWR0aD0iMS4yIiBzdHJva2U9ImJsYWNrIiAvPgogICAgPC9nPgo8L3N2Zz4=",pending:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzBweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjAiIC8+CiAgICA8ZyBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIC8+CiAgICA8Zz4KICAgICAgICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSI4IiBmaWxsLW9wYWNpdHk9IjAuMjQiIGZpbGw9IiNhMWExYTEiIHN0cm9rZT0iI2ExYTFhMSIgLz4KICAgICAgICA8cmVjdCB4PSI5LjUiIHk9IjgiIHdpZHRoPSIyIiBoZWlnaHQ9IjgiIGZpbGw9IiNhMWExYTEiIC8+CiAgICAgICAgPHJlY3QgeD0iMTIuNSIgeT0iOCIgd2lkdGg9IjIiIGhlaWdodD0iOCIgZmlsbD0iI2ExYTFhMSIgLz4KICAgIDwvZz4KPC9zdmc+",processed:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzBweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjAiIC8+CiAgICA8ZyBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIC8+CiAgICA8Zz4KICAgICAgICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSI4IiBmaWxsLW9wYWNpdHk9IjAuMjQiIGZpbGw9IiMzMDcxYTkiIHN0cm9rZT0iIzMwNzFhOSIgLz4KICAgICAgICA8cGF0aCBkPSJNOC41IDExTDExLjM5MzkgMTMuODkzOUMxMS40NTI1IDEzLjk1MjUgMTEuNTQ3NSAxMy45NTI1IDExLjYwNjEgMTMuODkzOUwxOS41IDYiIHN0cm9rZT0iIzMwNzFhOSIKICAgICAgICAgICAgc3Ryb2tlLXdpZHRoPSIxLjIiIC8+CiAgICA8L2c+Cjwvc3ZnPg==",cancelled:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzBweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjAiIC8+CiAgICA8ZyBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIC8+CiAgICA8Zz4KICAgICAgICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSI4IiBmaWxsLW9wYWNpdHk9IjAuMjQiIGZpbGw9IiNhODAwMDAiIHN0cm9rZT0iI2E4MDAwMCIgLz4KICAgICAgICA8cGF0aCBkPSJNMTggMThMNiA2IiBzdHJva2Utd2lkdGg9IjEuMiIgc3Ryb2tlPSIjYTgwMDAwIiAvPgogICAgPC9nPgo8L3N2Zz4="},d=i(class extends t{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.pendingItemHighlighted=!1,this.onMouseLeave=()=>{clearTimeout(this.timeoutRef),this.popupClasses="",this.timeoutRef=setTimeout((()=>{this.activePopupIndex=null}),400)},this.onMouseEnter=(i,t)=>{clearTimeout(this.timeoutRef),this.activePopupIndex=t,this.timeoutRef=setTimeout((()=>{const t=i.querySelector(".popup-position-ref");this.popupPositionRef=t,this.calculatePopupPos(this.el.shadowRoot),this.popupClasses="show"}),50)},this.baseUrl=void 0,this.isDev=!1,this.queryString="",this.isIdle=!0,this.popupClasses="",this.externalVin=null,this.activePopupIndex=null,this.vehicleInformation=void 0,this.errorMessage=null,this.isLoading=!1,this.loadingStateChange=void 0,this.loadedResponse=void 0}async componentDidLoad(){this.dynamicClaimBody=this.el.shadowRoot.querySelector(".dynamic-claim-body"),this.dynamicRedeem=this.el.shadowRoot.getElementById("dynamic-redeem"),this.dynamicClaimProgressBar=this.el.shadowRoot.querySelector(".dynamic-claim-progress-bar")}async setMockData(i){l=i}async setData(i,t={}){let e;clearTimeout(this.networkTimeoutRef),this.abortController&&this.abortController.abort(),this.abortController=new AbortController;const a="string"==typeof i,o=a?i:null==i?void 0:i.vin;this.externalVin=o;try{if(!o||0===o.trim().length)return void(this.isIdle=!0);this.isLoading=!0,this.isIdle=!1,await new Promise((i=>{e=setTimeout(i,1e3),this.networkTimeoutRef=e}));const r=a?await n(this,{scopedTimeoutRef:e,vin:o,mockData:l},t):i;if(this.networkTimeoutRef===e){if(!r)throw new Error("Wrong response format");if(!Array.isArray(r.serviceItems))throw new Error("No Service Available");this.vehicleInformation=r}this.errorMessage=null,this.isLoading=!1}catch(i){if(i&&"AbortError"===(null==i?void 0:i.name))return;this.isLoading=!1,this.vehicleInformation=null,this.errorMessage=i.message}}async fetchData(i=this.externalVin,t={}){await this.setData(i,t)}onLoadingChange(i){this.loadingStateChange&&this.loadingStateChange(i),this.setLoadingUi(i)}async setLoadingUi(i){i||(this.dynamicClaimProgressBar.style.width="0",await new Promise((i=>setTimeout(i,200))),this.updateProgressBar())}updateProgressBar(){var i;const t=(null===(i=this.vehicleInformation)||void 0===i?void 0:i.serviceItems)||[];if(0===t.filter((i=>"pending"===i.status)).length)this.dynamicClaimProgressBar.style.width=0===t.length?"0%":"100%",this.dynamicClaimBody.scrollTo({left:this.dynamicClaimBody.scrollWidth,behavior:"smooth"});else{const i=t.find((i=>"pending"===i.status)),e=t.indexOf(i)+1,a=this.dynamicClaimBody.getElementsByClassName("dynamic-claim-item")[e-1];this.dynamicClaimProgressBar.style.width=100*(e/t.length-1/(2*t.length))+"%",this.dynamicClaimBody.scrollTo({left:a.offsetLeft-3*a.clientWidth,behavior:"smooth"})}}resetProgressBar(){setTimeout((()=>{this.updateProgressBar()}),100)}windowScrollListener(i){i?(this.scrollListenerRef=()=>this.calculatePopupPos(this.el.shadowRoot),window.addEventListener("scroll",this.scrollListenerRef),this.dynamicClaimBody.addEventListener("scroll",this.scrollListenerRef)):(window.removeEventListener("scroll",this.scrollListenerRef),this.dynamicClaimBody.removeEventListener("scroll",this.scrollListenerRef))}calculatePopupPos(i){const t=i.querySelector(".popup-position-ref");let{x:e,y:a}=t.getBoundingClientRect();const o=t.querySelector(".popup-container"),{width:n}=o.getBoundingClientRect(),r=o.querySelector(".dynamic-claim-item-popup-info"),l=window.innerWidth;o.style.top=`${a}px`,o.style.left=e-n/2+"px";const s=e-n/2,d=l-(e+n/2);let c=0;d<16?c=d-16:s<16&&(c=Math.abs(s-16)),r.style.transform=`translateX(${c}px)`}removeLoadAnimationClass(i){i.target.classList.remove("load-animation")}async completeClaim(){var i;const t=(null===(i=this.vehicleInformation)||void 0===i?void 0:i.serviceItems)||[],e=this.cachedClaimItem,a=JSON.parse(JSON.stringify(t)),o=t.indexOf(e),n=a.slice(0,o).filter((i=>"pending"===i.status));a[o].status="processed",n.forEach((function(i){i.status="cancelled"})),this.pendingItemHighlighted=!1;const r=JSON.parse(JSON.stringify(this.vehicleInformation));r.serviceItems=a,this.vehicleInformation=JSON.parse(JSON.stringify(r))}claim(i){var t;const e=(null===(t=this.vehicleInformation)||void 0===t?void 0:t.serviceItems)||[],a=JSON.parse(JSON.stringify(e)),o=e.indexOf(i);let n=a.slice(0,o).filter((i=>"pending"===i.status));this.cachedClaimItem=i,null===i.maximumMileage&&(n=[]),this.onMouseLeave(),this.openRedeem(i,n)}async handleRedeemScanner(){this.dynamicRedeem.handleScanner=this.isDev?async()=>{await new Promise((i=>setTimeout(i,500))),this.dynamicRedeem.quite(),this.completeClaim(),this.dynamicRedeem.handleScanner=null}:async i=>{try{const t=this.vehicleInformation,e={vin:t.vin,brandIntegrationID:t.identifiers.brandIntegrationID,invoice:i,saleInformation:t.saleInformation,serviceItem:this.dynamicRedeem.item,cancelledServiceItems:this.dynamicRedeem.canceledItems},a=await fetch("/api/vehicle/swift-claim",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),o=await a.json();if(!o.Success)return alert(o.Message),this.dynamicRedeem.quite(),void(this.dynamicRedeem.handleScanner=null);this.dynamicRedeem.quite(),this.completeClaim(),this.dynamicRedeem.handleScanner=null}catch(i){console.error(i),alert("Request failed please try again later"),this.dynamicRedeem.quite(),this.dynamicRedeem.handleScanner=null}}}openRedeem(i,t){var e,a,o,n,r;const l=this.vehicleInformation;this.dynamicRedeem.vin=null==l?void 0:l.vin,this.dynamicRedeem.item=i,this.dynamicRedeem.canceledItems=t,this.dynamicRedeem.unInvoicedByBrokerName=null!==(null===(e=null==l?void 0:l.saleInformation)||void 0===e?void 0:e.broker)&&null===(null===(o=null===(a=null==l?void 0:l.saleInformation)||void 0===a?void 0:a.broker)||void 0===o?void 0:o.invoiceDate)?null===(r=null===(n=null==l?void 0:l.saleInformation)||void 0===n?void 0:n.broker)||void 0===r?void 0:r.brokerName:null,this.handleRedeemScanner()}createPopup(i){return e("div",{class:"popup-position-ref"},e("div",{class:"popup-container"},e("div",{class:o("dynamic-claim-item-popup-info-triangle",this.popupClasses)},e("div",{class:"dynamic-claim-item-popup-info-triangle-up"}),e("div",{class:"dynamic-claim-item-popup-info-triangle-up2"})),e("div",{class:o("dynamic-claim-item-popup-info",this.popupClasses)},e("table",null,e("tbody",null,e("tr",null,e("th",null,"Service Type:"),e("td",null,i.type.charAt(0).toUpperCase()+i.type.slice(1))),e("tr",null,e("th",null,"Activation Date"),e("td",null,i.activatedAt)),e("tr",null,e("th",null,"Expiry Date"),e("td",null,i.expiresAt)),e("tr",null,e("th",null,"Claimed At"),e("td",null,i.redeemDate)),e("tr",null,e("th",null,"Redeeming Dealer"),e("td",null,i.dealerName)),e("tr",null,e("th",null,"Invoice Number"),e("td",null,i.invoiceNumber)),e("tr",null,e("th",null,"WIP"),e("td",null,i.wip)),e("tr",null,e("th",null,"Menu Code"),e("td",null,i.menuCode)))),"pending"===i.status&&e("button",{onClick:()=>this.claim(i),class:"dynamic-claim-button claim-button"},e("svg",{width:"30px",height:"30px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("g",{"stroke-width":"0"}),e("g",{"stroke-linecap":"round","stroke-linejoin":"round"}),e("g",null,e("circle",{cx:"12",cy:"12",r:"8","fill-opacity":"0.24"}),e("path",{d:"M8.5 11L11.3939 13.8939C11.4525 13.9525 11.5475 13.9525 11.6061 13.8939L19.5 6","stroke-width":"1.2"}))),e("span",null,"Claim")))))}render(){var i,t;const n=(null===(i=this.vehicleInformation)||void 0===i?void 0:i.serviceItems)||[];return e(a,{key:"6e978e300bae2dd76b153421a56180adac9b0181"},e("dynamic-redeem",{key:"98762e62d38fedf77d328e8dc2da6c832b927f0c",id:"dynamic-redeem"}),e("div",{key:"46b817f023ce25c860c79c4fafe7c963b9acd6be",class:o("dynamic-claim-wrapper",{loading:this.isLoading,idle:this.isIdle})},e("div",{key:"3e93ee7b596ab9d4fb338e5a7c5973d102d6db2b",class:"dynamic-claim-header"},e("strong",{key:"037bbee7e1aa4c3cf36d93fdc20c01959f194fca",onAnimationEnd:this.removeLoadAnimationClass,class:"dynamic-claim-header-vin load-animation"},this.errorMessage&&e("span",{key:"d68269004e338abd8d08c8bb840e5084a3b428a7",style:{color:"red"}},this.errorMessage),!this.errorMessage&&(null===(t=this.vehicleInformation)||void 0===t?void 0:t.vin))),e("div",{key:"7cc8f93760c08f55af3d56515c928c2a888c8f18",class:"dynamic-claim-body"},e("div",{key:"471ede9a4acb83195d9b0f78a36d00364abd99cf",class:"loading-lane"},e("div",{key:"f734fcaca3e8653870e76a3e72c45a1cbb2bd320",class:"dynamic-claim-loading-slider"},e("div",{key:"747118edb9777ee3833bcb27c01d3f8b19cef6c6",class:"dynamic-claim-loading-slider-line"}),e("div",{key:"3e65f85d83ba6aaa062e83989683675ad0ec5b7c",class:"dynamic-claim-loading-slider-subline dynamic-claim-inc"}),e("div",{key:"48a3aa105f30e70ff0bdb1f335a404e0a88fd791",class:"dynamic-claim-loading-slider-subline dynamic-claim-dec"}))),e("div",{key:"9009de9a5e02782908f0b4d79fa89aaf43dbba2d",class:"dynamic-claim-progress-lane"},n.map(((i,t)=>{let a="";return"pending"===i.status?n.findIndex((i=>"pending"===i.status))===t&&(a=i.status):a=i.status,e("div",{key:i.name,class:o("dynamic-claim-item",a),onMouseLeave:this.onMouseLeave},e("div",{onAnimationEnd:this.removeLoadAnimationClass,class:"dynamic-claim-item-header load-animation",onMouseEnter:i=>this.onMouseEnter(i.target,t)},e("img",{src:s[i.status],alt:"status icon"}),e("span",null,i.status.charAt(0).toUpperCase()+i.status.slice(1)),this.activePopupIndex===t&&this.createPopup(i)),e("div",{onAnimationEnd:this.removeLoadAnimationClass,class:"dynamic-claim-item-circle load-animation"}),e("p",{onAnimationEnd:this.removeLoadAnimationClass,class:"dynamic-claim-item-footer load-animation"},i.name))})),e("div",{key:"1e05a3af9851d7418c31e4fd16d9ec4836930bdc",class:"dynamic-claim-progress-bar"})))))}get el(){return this}static get watchers(){return{isLoading:["onLoadingChange"],vehicleInformation:["resetProgressBar"],popupClasses:["windowScrollListener"]}}static get style(){return'*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.visible{visibility:visible}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.block{display:block}.flex{display:flex}.table{display:table}.hidden{display:none}.flex-shrink{flex-shrink:1}.border-collapse{border-collapse:collapse}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.border{border-width:1px}.outline{outline-style:solid}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}:host{all:initial!important;display:block;flex:1 1 0!important;flex-shrink:0!important;width:100%!important}*{box-sizing:content-box;font-family:Arial;margin:revert;padding:revert}.dynamic-claim-wrapper{background:#fdfdfd;border:1px solid #dcdcdc;border-radius:5px;box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 hsla(0,0%,100%,.1);overflow:hidden;padding:0;position:relative}.dynamic-claim-header{background:#f6f6f6;border:1px solid #ededed;padding:15px 0;text-align:center}.dynamic-claim-header-vin{display:inline-block;transition:.4s}.idle .dynamic-claim-header-vin,.loading .dynamic-claim-header-vin{opacity:0;transform:scale(150%);visibility:hidden}.dynamic-claim-body{display:flex;overflow-x:scroll;padding:100px 30px;transition:scrollbar-color .5s ease}.idle .dynamic-claim-body,.loading .dynamic-claim-body{pointer-events:none}.dynamic-claim-wrapper ::-webkit-scrollbar{height:10px;width:10px}.dynamic-claim-wrapper ::-webkit-scrollbar-track{background:#f6f6f6;border-radius:5px;border-top:1px solid #dcdcdc;border-top-left-radius:0;border-top-right-radius:0}.idle .dynamic-claim-body::-webkit-scrollbar-thumb,.loading .dynamic-claim-body::-webkit-scrollbar-thumb{background:transparent}.dynamic-claim-wrapper ::-webkit-scrollbar-thumb{background:#c5c5c5;border-radius:10px}.dynamic-claim-wrapper ::-webkit-scrollbar-thumb:hover{background:#a1a1a1}.dynamic-claim-progress-lane,.loading-lane{align-items:center;background-color:#f2f2f2;border:1px solid #ddd;border-radius:10px;display:flex;flex:1;flex-direction:row;height:10px;justify-content:space-around;position:relative}.idle .dynamic-claim-progress-lane,.loading .dynamic-claim-progress-lane{background-color:transparent;border:1px solid transparent}.loading-lane{position:absolute;visibility:hidden;width:calc(100% - 60px)}.loading .loading-lane{visibility:visible}.dynamic-claim-progress-bar{background-image:linear-gradient(180deg,#428bca,#3071a9);border:1px solid #ddd;border-radius:10px;height:10px;left:0;position:absolute;transition:all;transition-duration:.5s;transition-timing-function:ease-in-out;width:0;z-index:0}.idle .dynamic-claim-progress-bar,.loading .dynamic-claim-progress-bar{opacity:0;width:0!important}.dynamic-claim-item{align-items:center;display:flex;flex-direction:column;font-size:14px;gap:5px;min-width:250px}.popup-position-ref{bottom:0;display:flex;height:0;justify-content:center;position:absolute;width:0}.popup-container{position:fixed;z-index:100}.dynamic-claim-item-popup-info{background-color:#f9f9f9;border:1px solid #ddd;border-radius:5px;color:#282828;opacity:0;padding:20px;transition:.4s;visibility:hidden;width:auto}.dynamic-claim-item-popup-info-triangle.show,.dynamic-claim-item-popup-info.show{opacity:1;visibility:visible}.dynamic-claim-item-popup-info table{border-collapse:collapse;width:100%}.dynamic-claim-item-popup-info table td,.dynamic-claim-item-popup-info table th{border-bottom:1px solid #ddd;padding:10px 50px 10px 10px;text-align:left;white-space:nowrap}.dynamic-claim-item-popup-info table td{font-weight:400}.dynamic-claim-item-popup-info .claim-button{justify-content:center;margin:15px auto auto;width:80%}.dynamic-claim-item-popup-info-triangle{display:flex;justify-content:center;opacity:0;position:relative;transform:translateY(-9px);transition:.4s;visibility:hidden;width:100%;z-index:101}.dynamic-claim-item-popup-info-triangle-up{border-bottom:10px solid #ddd}.dynamic-claim-item-popup-info-triangle-up,.dynamic-claim-item-popup-info-triangle-up2{border-left:10px solid transparent;border-right:10px solid transparent;height:0;position:absolute;width:0}.dynamic-claim-item-popup-info-triangle-up2{border-bottom:10px solid #f9f9f9;margin-top:1px}.dynamic-claim-item-header{align-items:center;cursor:pointer;display:flex;flex-direction:column;height:3em;line-height:1em;padding:10px 0;position:relative;transition:.4s}.dynamic-claim-item-header.load-animation{animation:item-header-fade-in .65s ease forwards}@keyframes item-header-fade-in{0%{opacity:0;transform:translateY(-5px) scale(70%)}to{opacity:1;transform:translateY(0) scale(100%)}}.dynamic-claim-item-header span{font-weight:700}.dynamic-claim-item-header img{transition:.4s}.dynamic-claim-item-header:hover>img{transform:rotate(1turn) scale(125%)}.idle .dynamic-claim-item-header,.loading .dynamic-claim-item-header{opacity:0;transform:translateY(-5px) scale(70%)}.dynamic-claim-item-footer{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;height:4.5em;line-height:1.5em;margin:0;overflow:hidden;padding:0 20px;text-align:center;text-overflow:ellipsis;transition:.4s}.dynamic-claim-item-footer.load-animation{animation:item-footer-fade-in .65s ease forwards}@keyframes item-footer-fade-in{0%{opacity:0;transform:translateY(5px) scale(70%);visibility:hidden}to{opacity:1;transform:translateY(0) scale(100%);visibility:visible}}.idle .dynamic-claim-item-footer,.loading .dynamic-claim-item-footer{opacity:0;transform:translateY(5px) scale(70%);visibility:hidden}.dynamic-claim-item-circle{background-color:#a1a1a1;border:5px double #ececec;border-radius:50%;height:18px;transition:.4s;width:18px;z-index:1}.dynamic-claim-item-circle.load-animation{animation:item-circle-fade-in .65s ease forwards}@keyframes item-circle-fade-in{0%{opacity:0;transform:scale(150%);visibility:hidden}to{opacity:1;transform:scale(100%);visibility:visible}}.idle .dynamic-claim-item-circle,.loading .dynamic-claim-item-circle{opacity:0;transform:scale(150%);visibility:hidden}.dynamic-claim-item.processed .dynamic-claim-item-circle{background-color:#3071a9}.dynamic-claim-item.processed .dynamic-claim-item-header{color:#3071a9}.dynamic-claim-item.expired .dynamic-claim-item-circle{background-color:#282828}.dynamic-claim-item.expired .dynamic-claim-item-headaer{color:#282828}.dynamic-claim-item.cancelled .dynamic-claim-item-circle{background-color:#a80000}.dynamic-claim-item.cancelled .dynamic-claim-item-header{color:#a80000}.dynamic-claim-item.pending .dynamic-claim-item-circle{background-color:#00a300}.dynamic-claim-item.pending .dynamic-claim-item-header{color:#00a300}.dynamic-claim-loading-slider{border-radius:4px;height:10px;left:0;overflow-x:hidden;position:relative;position:absolute;top:0;width:100%}.dynamic-claim-loading-slider-line{background:#ddd;height:10px;opacity:0;position:absolute;width:150%}.dynamic-claim-loading-slider-subline{background-image:linear-gradient(180deg,#428bca,#3071a9);height:10px;position:absolute}.dynamic-claim-wrapper.loading .dynamic-claim-inc{animation:dynamic-claim-increase 2.5s ease infinite}.dynamic-claim-wrapper.loading .dynamic-claim-dec{animation:dynamic-claim-decrease 2.5s ease 1s infinite}@keyframes dynamic-claim-increase{0%{left:-5%;width:5%}to{left:130%;width:100%}}@keyframes dynamic-claim-decrease{0%{left:-80%;width:80%}to{left:110%;width:10%}}.dynamic-claim-button{align-items:center;border:none;border-radius:5px;color:#fff;cursor:pointer;display:flex;font-weight:700;gap:3px;outline:none;padding:0 10px 0 0;transition:.3s}.dynamic-claim-button svg{transition:.2s}.claim-button{stroke:#27ae60;fill:#27ae60;background-color:transparent;border:1px solid #27ae60;color:#27ae60}.claim-button circle{fill:#2ecc71}.claim-button:hover{stroke:#fff;fill:#fff;background-color:#2ecc71;color:#fff}.claim-button:hover circle{fill:#fff}.claim-button:active{background-color:#27ae60}.claim-button:active svg{transform:scale(125%)}.cancel-button{stroke:#c0392b;fill:#c0392b;background-color:transparent;border:1px solid #c0392b;color:#c0392b}.cancel-button circle{fill:#c0392b;transition:.1s}.cancel-button:hover{stroke:#fff;fill:#fff;background-color:#e74c3c;color:#fff}.cancel-button:hover circle{fill:#fff}.static{position:static}.w-full{width:100%}.sticky{position:sticky}.top-0{top:0}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-bottom:.5rem;margin-top:.5rem}.mt-\\[12px\\]{margin-top:12px}.h-0{height:0}.h-\\[40px\\]{height:40px}.h-\\[80px\\]{height:80px}.max-h-\\[70dvh\\]{max-height:70dvh}.min-h-\\[100px\\]{min-height:100px}.w-fit{width:fit-content}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.scale-0{--tw-scale-x:0;--tw-scale-y:0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[8px\\]{border-radius:8px}.border-b{border-bottom-width:1px}.border-\\[\\#d6d8dc\\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.bg-\\[\\#e1e3e5\\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.px-\\[10px\\]{padding-left:10px;padding-right:10px}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.py-4{padding-bottom:1rem;padding-top:1rem}.py-\\[20px\\]{padding-bottom:20px;padding-top:20px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.pt-\\[4px\\]{padding-top:4px}.text-center{text-align:center}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.font-bold{font-weight:700}.text-\\[\\#383c43\\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.success-card{background-color:#d0e7de;border-color:#a2d0bb;color:#0b3521}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.m-\\[3px\\]{margin:3px}.my-4{margin-bottom:1rem;margin-top:1rem}.ml-1{margin-left:.25rem}.border-separate{border-collapse:separate}.list-disc{list-style-type:disc}.gap-1{gap:.25rem}.pl-10{padding-left:2.5rem}'}},[1,"dynamic-claim",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],loadingStateChange:[16],loadedResponse:[16],isIdle:[32],popupClasses:[32],externalVin:[32],activePopupIndex:[32],vehicleInformation:[32],errorMessage:[32],isLoading:[32],setMockData:[64],setData:[64],fetchData:[64],completeClaim:[64]},void 0,{isLoading:["onLoadingChange"],vehicleInformation:["resetProgressBar"],popupClasses:["windowScrollListener"]}]);function c(){"undefined"!=typeof customElements&&["dynamic-claim","dynamic-redeem"].forEach((i=>{switch(i){case"dynamic-claim":customElements.get(i)||customElements.define(i,d);break;case"dynamic-redeem":customElements.get(i)||r()}}))}c();export{d as D,c as d}
|