adp-web-components 0.0.11

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.
Files changed (196) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/Loading-ee1a2ceb.js +16 -0
  3. package/dist/cjs/app-globals-3813fb46.js +9 -0
  4. package/dist/cjs/cn-f559f9e5.js +2588 -0
  5. package/dist/cjs/dead-stock-lookup.cjs.entry.js +103 -0
  6. package/dist/cjs/distributor-lookup.cjs.entry.js +109 -0
  7. package/dist/cjs/dynamic-claim.cjs.entry.js +306 -0
  8. package/dist/cjs/dynamic-redeem.cjs.entry.js +145 -0
  9. package/dist/cjs/form-input.cjs.entry.js +36 -0
  10. package/dist/cjs/general-inquiry-form.cjs.entry.js +2280 -0
  11. package/dist/cjs/image-expansion-a9c9c6f7.js +77 -0
  12. package/dist/cjs/index-d4b5214c.js +1331 -0
  13. package/dist/cjs/index.cjs.js +6 -0
  14. package/dist/cjs/loader-baf2418b.js +9 -0
  15. package/dist/cjs/loader.cjs.js +19 -0
  16. package/dist/cjs/manufacturer-lookup.cjs.entry.js +109 -0
  17. package/dist/cjs/paint-thickness.cjs.entry.js +131 -0
  18. package/dist/cjs/partInformation-2a6a018b.js +34 -0
  19. package/dist/cjs/service-history.cjs.entry.js +116 -0
  20. package/dist/cjs/shift-components.cjs.js +29 -0
  21. package/dist/cjs/vehicle-accessories.cjs.entry.js +135 -0
  22. package/dist/cjs/vehicle-specification.cjs.entry.js +111 -0
  23. package/dist/cjs/vehicleInformation-4c1dcaf2.js +52 -0
  24. package/dist/cjs/warranty-details.cjs.entry.js +281 -0
  25. package/dist/collection/collection-manifest.json +23 -0
  26. package/dist/collection/components/dynamic-claim/dynamic-claim.css +1 -0
  27. package/dist/collection/components/dynamic-claim/dynamic-claim.js +521 -0
  28. package/dist/collection/components/dynamic-claim/icons/cancelled.svg +8 -0
  29. package/dist/collection/components/dynamic-claim/icons/expired.svg +9 -0
  30. package/dist/collection/components/dynamic-claim/icons/pending.svg +9 -0
  31. package/dist/collection/components/dynamic-claim/icons/processed.svg +9 -0
  32. package/dist/collection/components/dynamic-redeem/dynamic-redeem.css +1 -0
  33. package/dist/collection/components/dynamic-redeem/dynamic-redeem.js +334 -0
  34. package/dist/collection/components/form-input/form-input.css +1 -0
  35. package/dist/collection/components/form-input/form-input.js +209 -0
  36. package/dist/collection/components/general-inquiry-form/general-inquiry-form.css +1 -0
  37. package/dist/collection/components/general-inquiry-form/general-inquiry-form.js +46 -0
  38. package/dist/collection/components/paint-thickness/paint-thickness.css +1 -0
  39. package/dist/collection/components/paint-thickness/paint-thickness.js +323 -0
  40. package/dist/collection/components/part-lookup/dead-stock-lookup.css +1 -0
  41. package/dist/collection/components/part-lookup/dead-stock-lookup.js +294 -0
  42. package/dist/collection/components/part-lookup/distributor-lookup.css +1 -0
  43. package/dist/collection/components/part-lookup/distributor-lookup.js +299 -0
  44. package/dist/collection/components/part-lookup/manufacturer-lookup.css +1 -0
  45. package/dist/collection/components/part-lookup/manufacturer-lookup.js +317 -0
  46. package/dist/collection/components/parts/Loading.js +10 -0
  47. package/dist/collection/components/service-history/service-history.css +1 -0
  48. package/dist/collection/components/service-history/service-history.js +306 -0
  49. package/dist/collection/components/vehicle-accessories/vehicle-accessories.css +1 -0
  50. package/dist/collection/components/vehicle-accessories/vehicle-accessories.js +327 -0
  51. package/dist/collection/components/vehicle-specification/vehicle-specification.css +1 -0
  52. package/dist/collection/components/vehicle-specification/vehicle-specification.js +301 -0
  53. package/dist/collection/components/warranty-details/assets/check.svg +4 -0
  54. package/dist/collection/components/warranty-details/assets/loader.svg +11 -0
  55. package/dist/collection/components/warranty-details/assets/x-mark.svg +4 -0
  56. package/dist/collection/components/warranty-details/components/CardsContainer.js +9 -0
  57. package/dist/collection/components/warranty-details/components/Loading.js +10 -0
  58. package/dist/collection/components/warranty-details/components/SSCTable.js +13 -0
  59. package/dist/collection/components/warranty-details/components/StatusCard.js +11 -0
  60. package/dist/collection/components/warranty-details/warranty-details.css +1 -0
  61. package/dist/collection/components/warranty-details/warranty-details.js +709 -0
  62. package/dist/collection/global/api/partInformation.js +30 -0
  63. package/dist/collection/global/api/vehicleInformation.js +48 -0
  64. package/dist/collection/global/assets/eye.svg +5 -0
  65. package/dist/collection/global/assets/loader.svg +11 -0
  66. package/dist/collection/global/lib/cn.js +9 -0
  67. package/dist/collection/global/lib/form-hook.js +118 -0
  68. package/dist/collection/global/lib/image-expansion.js +69 -0
  69. package/dist/collection/global/lib/utils.js +7 -0
  70. package/dist/collection/global/types/components.js +1 -0
  71. package/dist/collection/global/types/part-information.js +1 -0
  72. package/dist/collection/global/types/vehicle-information.js +5 -0
  73. package/dist/collection/index.js +1 -0
  74. package/dist/collection/templates/mock-data.js +4132 -0
  75. package/dist/collection/templates/parts/mock-data.js +221 -0
  76. package/dist/collection/templates/vehicle-lookup.js +218 -0
  77. package/dist/collection/templates/warranty-mock-data.js +2982 -0
  78. package/dist/components/dead-stock-lookup.d.ts +11 -0
  79. package/dist/components/dead-stock-lookup.js +5 -0
  80. package/dist/components/distributor-lookup.d.ts +11 -0
  81. package/dist/components/distributor-lookup.js +5 -0
  82. package/dist/components/dynamic-claim.d.ts +11 -0
  83. package/dist/components/dynamic-claim.js +5 -0
  84. package/dist/components/dynamic-redeem.d.ts +11 -0
  85. package/dist/components/dynamic-redeem.js +5 -0
  86. package/dist/components/form-input.d.ts +11 -0
  87. package/dist/components/form-input.js +5 -0
  88. package/dist/components/general-inquiry-form.d.ts +11 -0
  89. package/dist/components/general-inquiry-form.js +5 -0
  90. package/dist/components/index.d.ts +33 -0
  91. package/dist/components/index.js +5 -0
  92. package/dist/components/manufacturer-lookup.d.ts +11 -0
  93. package/dist/components/manufacturer-lookup.js +5 -0
  94. package/dist/components/p-2b0cc0c6.js +5 -0
  95. package/dist/components/p-4dc47f5f.js +5 -0
  96. package/dist/components/p-50f73226.js +5 -0
  97. package/dist/components/p-5df9bc5f.js +5 -0
  98. package/dist/components/p-8375923d.js +5 -0
  99. package/dist/components/p-98d9e7ab.js +5 -0
  100. package/dist/components/p-a454210b.js +5 -0
  101. package/dist/components/p-d265c109.js +5 -0
  102. package/dist/components/p-d5ff7544.js +5 -0
  103. package/dist/components/paint-thickness.d.ts +11 -0
  104. package/dist/components/paint-thickness.js +5 -0
  105. package/dist/components/service-history.d.ts +11 -0
  106. package/dist/components/service-history.js +5 -0
  107. package/dist/components/vehicle-accessories.d.ts +11 -0
  108. package/dist/components/vehicle-accessories.js +5 -0
  109. package/dist/components/vehicle-specification.d.ts +11 -0
  110. package/dist/components/vehicle-specification.js +5 -0
  111. package/dist/components/warranty-details.d.ts +11 -0
  112. package/dist/components/warranty-details.js +5 -0
  113. package/dist/esm/Loading-61648252.js +14 -0
  114. package/dist/esm/app-globals-8befa224.js +7 -0
  115. package/dist/esm/cn-cc419b94.js +2586 -0
  116. package/dist/esm/dead-stock-lookup.entry.js +99 -0
  117. package/dist/esm/distributor-lookup.entry.js +105 -0
  118. package/dist/esm/dynamic-claim.entry.js +302 -0
  119. package/dist/esm/dynamic-redeem.entry.js +141 -0
  120. package/dist/esm/form-input.entry.js +32 -0
  121. package/dist/esm/general-inquiry-form.entry.js +2276 -0
  122. package/dist/esm/image-expansion-08c4bf0d.js +73 -0
  123. package/dist/esm/index-ef54644b.js +1302 -0
  124. package/dist/esm/index.js +4 -0
  125. package/dist/esm/loader-027b88af.js +7 -0
  126. package/dist/esm/loader.js +15 -0
  127. package/dist/esm/manufacturer-lookup.entry.js +105 -0
  128. package/dist/esm/paint-thickness.entry.js +127 -0
  129. package/dist/esm/partInformation-73ece994.js +32 -0
  130. package/dist/esm/service-history.entry.js +112 -0
  131. package/dist/esm/shift-components.js +24 -0
  132. package/dist/esm/vehicle-accessories.entry.js +131 -0
  133. package/dist/esm/vehicle-specification.entry.js +107 -0
  134. package/dist/esm/vehicleInformation-f1081f83.js +50 -0
  135. package/dist/esm/warranty-details.entry.js +277 -0
  136. package/dist/index.cjs.js +1 -0
  137. package/dist/index.js +1 -0
  138. package/dist/shift-components/index.esm.js +4 -0
  139. package/dist/shift-components/p-15f86441.entry.js +5 -0
  140. package/dist/shift-components/p-1ae3a61f.entry.js +5 -0
  141. package/dist/shift-components/p-517b3e04.js +5 -0
  142. package/dist/shift-components/p-5df9bc5f.js +5 -0
  143. package/dist/shift-components/p-65e6ab8e.js +5 -0
  144. package/dist/shift-components/p-894e7518.entry.js +5 -0
  145. package/dist/shift-components/p-8c261972.entry.js +5 -0
  146. package/dist/shift-components/p-8e818568.entry.js +5 -0
  147. package/dist/shift-components/p-98d9e7ab.js +5 -0
  148. package/dist/shift-components/p-9bd4471c.entry.js +5 -0
  149. package/dist/shift-components/p-9f790b14.entry.js +5 -0
  150. package/dist/shift-components/p-a21e2e2e.js +5 -0
  151. package/dist/shift-components/p-c113792c.entry.js +5 -0
  152. package/dist/shift-components/p-d265c109.js +5 -0
  153. package/dist/shift-components/p-d5ff7544.js +5 -0
  154. package/dist/shift-components/p-dc9845ed.entry.js +5 -0
  155. package/dist/shift-components/p-e32b0798.entry.js +5 -0
  156. package/dist/shift-components/p-e97316d2.js +6 -0
  157. package/dist/shift-components/p-f759c597.entry.js +5 -0
  158. package/dist/shift-components/p-feb3df85.entry.js +5 -0
  159. package/dist/shift-components/shift-components.esm.js +5 -0
  160. package/dist/types/components/dynamic-claim/dynamic-claim.d.ts +48 -0
  161. package/dist/types/components/dynamic-redeem/dynamic-redeem.d.ts +34 -0
  162. package/dist/types/components/form-input/form-input.d.ts +14 -0
  163. package/dist/types/components/general-inquiry-form/general-inquiry-form.d.ts +21 -0
  164. package/dist/types/components/paint-thickness/paint-thickness.d.ts +28 -0
  165. package/dist/types/components/part-lookup/dead-stock-lookup.d.ts +25 -0
  166. package/dist/types/components/part-lookup/distributor-lookup.d.ts +23 -0
  167. package/dist/types/components/part-lookup/manufacturer-lookup.d.ts +24 -0
  168. package/dist/types/components/parts/Loading.d.ts +5 -0
  169. package/dist/types/components/service-history/service-history.d.ts +23 -0
  170. package/dist/types/components/vehicle-accessories/vehicle-accessories.d.ts +28 -0
  171. package/dist/types/components/vehicle-specification/vehicle-specification.d.ts +22 -0
  172. package/dist/types/components/warranty-details/components/CardsContainer.d.ts +8 -0
  173. package/dist/types/components/warranty-details/components/Loading.d.ts +5 -0
  174. package/dist/types/components/warranty-details/components/SSCTable.d.ts +6 -0
  175. package/dist/types/components/warranty-details/components/StatusCard.d.ts +10 -0
  176. package/dist/types/components/warranty-details/warranty-details.d.ts +51 -0
  177. package/dist/types/components.d.ts +388 -0
  178. package/dist/types/global/api/partInformation.d.ts +19 -0
  179. package/dist/types/global/api/vehicleInformation.d.ts +33 -0
  180. package/dist/types/global/lib/cn.d.ts +2 -0
  181. package/dist/types/global/lib/form-hook.d.ts +54 -0
  182. package/dist/types/global/lib/image-expansion.d.ts +9 -0
  183. package/dist/types/global/lib/utils.d.ts +1 -0
  184. package/dist/types/global/types/components.d.ts +4 -0
  185. package/dist/types/global/types/part-information.d.ts +30 -0
  186. package/dist/types/global/types/vehicle-information.d.ts +162 -0
  187. package/dist/types/index.d.ts +10 -0
  188. package/dist/types/stencil-public-runtime.d.ts +1680 -0
  189. package/loader/cdn.js +5 -0
  190. package/loader/index.cjs.js +5 -0
  191. package/loader/index.d.ts +24 -0
  192. package/loader/index.es2017.js +5 -0
  193. package/loader/index.js +6 -0
  194. package/loader/package.json +11 -0
  195. package/package.json +61 -0
  196. package/readme.md +104 -0
@@ -0,0 +1,135 @@
1
+ /*!
2
+ * Built by ShiftSoftware
3
+ * Copyright (c)
4
+ */
5
+ 'use strict';
6
+
7
+ Object.defineProperty(exports, '__esModule', { value: true });
8
+
9
+ const index = require('./index-d4b5214c.js');
10
+ const vehicleInformation = require('./vehicleInformation-4c1dcaf2.js');
11
+ const cn = require('./cn-f559f9e5.js');
12
+ const Loading = require('./Loading-ee1a2ceb.js');
13
+ const imageExpansion = require('./image-expansion-a9c9c6f7.js');
14
+ require('./loader-baf2418b.js');
15
+
16
+ const vehicleAccessoriesCss = "*,: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}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.left-0{left:0}.top-0{top:0}.z-40{z-index:40}.z-50{z-index:50}.float-right{float:right}.mx-auto{margin-left:auto;margin-right:auto}.mr-\\[16px\\]{margin-right:16px}.mt-\\[12px\\]{margin-top:12px}.mt-\\[16px\\]{margin-top:16px}.flex{display:flex}.table{display:table}.size-12{height:3rem;width:3rem}.size-full{height:100%;width:100%}.h-0{height:0}.h-1{height:.25rem}.h-\\[100dvh\\]{height:100dvh}.h-\\[40px\\]{height:40px}.h-\\[80px\\]{height:80px}.h-auto{height:auto}.max-h-\\[133px\\]{max-height:133px}.max-h-\\[70dvh\\]{max-height:70dvh}.min-h-\\[100px\\]{min-height:100px}.w-12{width:3rem}.w-\\[100dvw\\]{width:100dvw}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[133px\\]{max-width:133px}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-rotate-45{--tw-rotate:-45deg}.-rotate-45,.rotate-45{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))}.rotate-45{--tw-rotate:45deg}.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))}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-\\[4px\\]{gap:4px}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[8px\\]{border-radius:8px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.\\!border-none{border-style:none!important}.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-black\\/40{background-color:rgba(0,0,0,.4)}.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-\\[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}.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))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.opacity-100{opacity:1}.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)}.shadow,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-0{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.blur{--tw-blur:blur(8px);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)}.delay-200{transition-delay:.2s}.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}.hover\\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.hover\\:opacity-100:hover{opacity:1}.\\[\\&_div\\]\\:hover\\:\\!opacity-100:hover div{opacity:1!important}.\\[\\&_img\\]\\:hover\\:shadow-lg:hover img{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.size-\\[40px\\]{height:40px;width:40px}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin-2s{animation:spin 2s linear infinite}";
17
+ const VehicleAccessoriesStyle0 = vehicleAccessoriesCss;
18
+
19
+ let mockData = {};
20
+ const VehicleAccessories = class {
21
+ constructor(hostRef) {
22
+ index.registerInstance(this, hostRef);
23
+ this.closeImageListener = (event) => {
24
+ this.closeImage(event);
25
+ };
26
+ this.openImage = (target, imageSrc) => {
27
+ imageExpansion.openImageViewer(this, target, imageSrc);
28
+ };
29
+ this.closeImage = (event) => {
30
+ imageExpansion.closeImageViewer(this, event);
31
+ };
32
+ this.baseUrl = '';
33
+ this.isDev = false;
34
+ this.queryString = '';
35
+ this.loadingStateChange = undefined;
36
+ this.loadedResponse = undefined;
37
+ this.state = 'idle';
38
+ this.externalVin = null;
39
+ this.errorMessage = null;
40
+ this.expandedImage = null;
41
+ this.vehicleInformation = undefined;
42
+ }
43
+ handleSettingData(response) {
44
+ if (!response.accessories || !Array.isArray(response.accessories))
45
+ response.accessories = [];
46
+ this.vehicleInformation = response;
47
+ }
48
+ async setData(newData) {
49
+ clearTimeout(this.networkTimeoutRef);
50
+ if (this.abortController)
51
+ this.abortController.abort();
52
+ this.abortController = new AbortController();
53
+ let scopedTimeoutRef;
54
+ const isVinRequest = typeof newData === 'string';
55
+ const vin = isVinRequest ? newData : newData === null || newData === void 0 ? void 0 : newData.vin;
56
+ this.externalVin = vin;
57
+ try {
58
+ if (!vin || vin.trim().length === 0) {
59
+ //this.componentHeight = '0px';
60
+ this.state = 'idle';
61
+ return;
62
+ }
63
+ if (this.state === 'data' || this.state === 'error') {
64
+ this.state = (this.state + '-loading');
65
+ }
66
+ else
67
+ this.state = 'loading';
68
+ await new Promise(r => {
69
+ scopedTimeoutRef = setTimeout(r, 700);
70
+ this.networkTimeoutRef = scopedTimeoutRef;
71
+ });
72
+ const vehicleResponse = isVinRequest ? await vehicleInformation.getVehicleInformation(this, { scopedTimeoutRef, vin, mockData }) : newData;
73
+ if (this.networkTimeoutRef === scopedTimeoutRef) {
74
+ if (!vehicleResponse)
75
+ throw new Error('Wrong response format');
76
+ this.handleSettingData(vehicleResponse);
77
+ }
78
+ this.errorMessage = null;
79
+ this.state = 'data';
80
+ }
81
+ catch (error) {
82
+ if (error && (error === null || error === void 0 ? void 0 : error.name) === 'AbortError')
83
+ return;
84
+ this.state = 'error';
85
+ this.vehicleInformation = null;
86
+ this.errorMessage = error.message;
87
+ }
88
+ }
89
+ async fetchData(requestedVin = this.externalVin) {
90
+ await this.setData(requestedVin);
91
+ }
92
+ //calculateHeight(componentState: string) {
93
+ // if (componentState.includes('loading') && this.componentHeight === '0px') {
94
+ // this.componentHeight = '100px';
95
+ // } else if (componentState !== 'idle') {
96
+ // setTimeout(() => {
97
+ // this.componentHeight = `${this.wrapperRef.clientHeight}px`;
98
+ // }, 50);
99
+ // } else {
100
+ // this.componentHeight = '0px';
101
+ // }
102
+ //}
103
+ async loadingListener() {
104
+ //this.calculateHeight(newState);
105
+ if (this.loadingStateChange)
106
+ this.loadingStateChange(this.state.includes('loading'));
107
+ }
108
+ async setMockData(newMockData) {
109
+ mockData = newMockData;
110
+ }
111
+ render() {
112
+ var _a, _b;
113
+ const accessories = (this === null || this === void 0 ? void 0 : this.vehicleInformation) ? (_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.accessories : [];
114
+ return (index.h(index.Host, { key: '37762a5db052f532c697bb8442cc4ba3c6cf4068' }, index.h("div", { key: '2dc64881477dc8948a35c120255a37476f4476ab', class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, index.h("div", { key: '31ec8d8d61838d2932401ce9fcf43cb2602865d0' }, index.h(Loading.Loading, { key: '144ffe00641e5b7325a9d6d5794d6ec46db3943d', isLoading: this.state.includes('loading') }), index.h("div", { key: '015d6a3b491612e038b6fecc501f3a97eb74984b', class: cn.cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, index.h("div", { key: 'bf9bb4858401dc551fb6dd80792f9ebae8f2116d', class: cn.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) && (index.h("div", { key: '647c4b2ae83cf076f6abb5a693b58883eccea2f6', class: "py-[16px]" }, index.h("div", { key: 'fb00fc12a5247809212c54bfc656e12079a8277c', class: " px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto" }, this.errorMessage))), ['data', 'data-loading'].includes(this.state) && (index.h("div", { key: '3d049da77eac32bf3064f46d38d2e869531acc99', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, index.h("div", { key: '4212b8aeb910f96d3d5c0a7485629efd29f8a0e0', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, "Vehicle Accessories"), index.h("div", { key: '98b7d10413870e3e2e61fb3f9749ec00b4a117c5', class: "h-0 overflow-auto flex-1" }, !accessories.length && index.h("div", { key: '478659190641f3bd10a66697bb55b18adf8bd2f9', class: "h-[80px] flex items-center justify-center text-[18px]" }, "No data is available."), !!accessories.length && (index.h("table", { key: 'ab44323dda807276272dc900dd9e9c3c1482a75f', class: "w-full overflow-auto relative border-collapse" }, index.h("thead", { key: 'e43c0538bdb9b162b9e5ab00fb4032463bc47118', class: "top-0 font-bold z-40 sticky bg-white" }, index.h("tr", { key: 'b133f2fc56118b78fa7a8016245a405b4437fc76' }, ['Part Number', 'Description', 'Image'].map(title => (index.h("th", { key: title, class: "px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]" }, title))))), index.h("tbody", { key: '87bec24b165b4928cd36751bf7237016133f145e' }, accessories.map((accessory, idx) => {
115
+ var _a;
116
+ return (index.h("tr", { class: "transition-colors duration-100 hover:bg-slate-100", key: accessory.partNumber }, ['partNumber', 'description'].map(key => {
117
+ var _a;
118
+ return (index.h("td", { key: accessory.partNumber + key, class: cn.cn('px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]', {
119
+ '!border-none': idx === ((_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.serviceHistory.length) - 1,
120
+ }) }, accessory[key] || '...'));
121
+ }), index.h("td", { class: cn.cn('px-[10px] py-[10px] text-center whitespace-nowrap border-b border-[#d6d8dc]', {
122
+ '!border-none': idx === ((_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.serviceHistory.length) - 1,
123
+ }) }, index.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" }, index.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" }, index.h("img", { src: imageExpansion.eyeSvg }), index.h("span", { class: "text-white" }, "Expand")), index.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 })))));
124
+ })), index.h("div", { key: '2f132b70d008c91456c604cd6bd5d34b59626151', onClick: () => this.closeImage(), style: { backdropFilter: this.expandedImage ? 'blur(3px)' : 'blur(0px)' }, class: cn.cn('pointer-events-none w-[100dvw] h-[100dvh] fixed top-0 z-50 left-0 opacity-0 bg-black/40 transition-all duration-400', {
125
+ 'pointer-events-auto opacity-100 delay-200': this.expandedImage,
126
+ }) }, index.h("button", { key: '1007182cd1ce49a92c134c8d90998f4fb601fdad', class: "flex flex-col mt-[16px] items-center justify-center size-12 float-right mr-[16px]", onClick: () => this.closeImage() }, index.h("div", { key: 'c76af11f89e4735fa919167138093dc00eba7841', class: "h-1 w-12 rounded-full rotate-45 absolute bg-white" }), index.h("div", { key: 'c312b71d24988ae6f6ec1a5dfffc5a2d79e07660', class: "h-1 w-12 rounded-full -rotate-45 absolute bg-white" }))), index.h("img", { key: 'e14cb22e566105d7b977ed191ddd63174b24e54a', alt: "", id: "expanded-image", class: "fixed opacity-0 z-50 transition-all rounded-lg" })))))))))));
127
+ }
128
+ get el() { return index.getElement(this); }
129
+ static get watchers() { return {
130
+ "state": ["loadingListener"]
131
+ }; }
132
+ };
133
+ VehicleAccessories.style = VehicleAccessoriesStyle0;
134
+
135
+ exports.vehicle_accessories = VehicleAccessories;
@@ -0,0 +1,111 @@
1
+ /*!
2
+ * Built by ShiftSoftware
3
+ * Copyright (c)
4
+ */
5
+ 'use strict';
6
+
7
+ Object.defineProperty(exports, '__esModule', { value: true });
8
+
9
+ const index = require('./index-d4b5214c.js');
10
+ const Loading = require('./Loading-ee1a2ceb.js');
11
+ const cn = require('./cn-f559f9e5.js');
12
+ const vehicleInformation = require('./vehicleInformation-4c1dcaf2.js');
13
+ require('./loader-baf2418b.js');
14
+
15
+ const vehicleSpecificationCss = "*,: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}.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}.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))}.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}.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}";
16
+ const VehicleSpecificationStyle0 = vehicleSpecificationCss;
17
+
18
+ let mockData = {};
19
+ const VehicleSpecification = class {
20
+ constructor(hostRef) {
21
+ index.registerInstance(this, hostRef);
22
+ this.baseUrl = '';
23
+ this.isDev = false;
24
+ this.queryString = '';
25
+ this.loadingStateChange = undefined;
26
+ this.loadedResponse = undefined;
27
+ this.state = 'idle';
28
+ this.externalVin = null;
29
+ this.errorMessage = null;
30
+ this.vehicleInformation = undefined;
31
+ }
32
+ async setData(newData) {
33
+ clearTimeout(this.networkTimeoutRef);
34
+ if (this.abortController)
35
+ this.abortController.abort();
36
+ this.abortController = new AbortController();
37
+ let scopedTimeoutRef;
38
+ const isVinRequest = typeof newData === 'string';
39
+ const vin = isVinRequest ? newData : newData === null || newData === void 0 ? void 0 : newData.vin;
40
+ this.externalVin = vin;
41
+ try {
42
+ if (!vin || vin.trim().length === 0) {
43
+ //this.componentHeight = '0px';
44
+ this.state = 'idle';
45
+ return;
46
+ }
47
+ if (this.state === 'data' || this.state === 'error') {
48
+ this.state = (this.state + '-loading');
49
+ }
50
+ else
51
+ this.state = 'loading';
52
+ await new Promise(r => {
53
+ scopedTimeoutRef = setTimeout(r, 700);
54
+ this.networkTimeoutRef = scopedTimeoutRef;
55
+ });
56
+ const vehicleResponse = isVinRequest ? await vehicleInformation.getVehicleInformation(this, { scopedTimeoutRef, vin, mockData }) : newData;
57
+ if (this.networkTimeoutRef === scopedTimeoutRef) {
58
+ if (!vehicleResponse)
59
+ throw new Error('Wrong response format');
60
+ this.vehicleInformation = vehicleResponse;
61
+ }
62
+ this.errorMessage = null;
63
+ this.state = 'data';
64
+ }
65
+ catch (error) {
66
+ if (error && (error === null || error === void 0 ? void 0 : error.name) === 'AbortError')
67
+ return;
68
+ this.state = 'error';
69
+ this.vehicleInformation = null;
70
+ this.errorMessage = error.message;
71
+ }
72
+ }
73
+ async fetchData(requestedVin = this.externalVin) {
74
+ await this.setData(requestedVin);
75
+ }
76
+ //calculateHeight(componentState: string) {
77
+ // if (componentState.includes('loading') && this.componentHeight === '0px') {
78
+ // this.componentHeight = '100px';
79
+ // } else if (componentState !== 'idle') {
80
+ // setTimeout(() => {
81
+ // this.componentHeight = `${this.wrapperRef.clientHeight}px`;
82
+ // }, 50);
83
+ // } else {
84
+ // this.componentHeight = '0px';
85
+ // }
86
+ //}
87
+ async loadingListener() {
88
+ //this.calculateHeight(newState);
89
+ if (this.loadingStateChange)
90
+ this.loadingStateChange(this.state.includes('loading'));
91
+ }
92
+ async setMockData(newMockData) {
93
+ mockData = newMockData;
94
+ }
95
+ render() {
96
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
97
+ return (index.h(index.Host, { key: 'c3226e500c814d9a0a471bafaaddc1d472cc801b' }, index.h("div", { key: '9bae679376567109beedf83d8717a6a1592db545', class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, index.h("div", { key: '2c779d68d7f0cb59a8e593c4e98274aac4d75cd6' }, index.h(Loading.Loading, { key: 'b485ab8d8f56e1e2c983880ef167ebf287f82313', isLoading: this.state.includes('loading') }), index.h("div", { key: '62f31f43fa3bc2cba6d4e50637ced77565a8d77d', class: cn.cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, index.h("div", { key: '8a55f5cb8e187eee0fe5f7127fb8969ec356fb9d', class: cn.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) && (index.h("div", { key: '27154f476b6e7644d8efe0e9c9361b80b5fbd8e3', class: "py-4" }, index.h("div", { key: '47b9dbfa0cda5b174533462cca3a43318b8f0a83', class: " px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto" }, this.errorMessage))), ['data', 'data-loading'].includes(this.state) && (index.h("div", { key: '7b9accc6c8b567f139c79a6d99f4d5b7619c4648', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, index.h("div", { key: 'c9be064f1916c47788aaaa9fa06438d4ea91befa', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, "Vehicle Specifications"), index.h("div", { key: '72a8a9d92a28f01e8c28da0ce7af9e41ee463844', class: "h-0 overflow-auto flex-1" }, !((_b = this.vehicleInformation) === null || _b === void 0 ? void 0 : _b.vehicleSpecification) && index.h("div", { key: '37d13e85758052df6d04cb32f133a056cad6c9b3', 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) && (index.h("table", { key: 'd83e8aa7d3f07731b790c1d49b7e25491a1456e7', class: "w-full overflow-auto relative border-collapse" }, index.h("thead", { key: '9ef18b80c3530ddc36b7fe0254183d6aecedc368', class: "top-0 font-bold sticky bg-white" }, index.h("tr", { key: '2d4fbe31a35e1879c00e8929eb7b0fec0a7aa3fa' }, ['Model', 'Variant', 'Katashiki', 'Model Year', 'SFX'].map(title => (index.h("th", { key: title, class: "px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]" }, title))))), index.h("tbody", { key: '5d00ede02f2d39afca384c1f595bb02face893e0' }, index.h("tr", { key: '7f833ffbb80982b4ecd1577bdcba412a02fe3f9e' }, index.h("td", { key: '26902ab5dd74303aa1ca9b066e6518244e7b78a3', 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) || '...', " ", index.h("br", { key: '53a6142f257d4a17f53ffc6db4d22139b6cd590b', 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) || '...'), index.h("td", { key: 'e5b903f69a43c47866d23583570060126fb48b2a', 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) || '...', " ", index.h("br", { key: '6245cf13d3d9770280507a6753bf6e8c77cc1e71' }), ((_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 => {
98
+ var _a;
99
+ const [place, field] = infoPath.split('.');
100
+ const cellValue = (_a = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _a === void 0 ? void 0 : _a[place][field].toString();
101
+ return (index.h("td", { key: infoPath, class: cn.cn('px-[10px] py-[20px] text-center whitespace-nowrap') }, cellValue.trim() ? cellValue : '...'));
102
+ })))))))))))));
103
+ }
104
+ get el() { return index.getElement(this); }
105
+ static get watchers() { return {
106
+ "state": ["loadingListener"]
107
+ }; }
108
+ };
109
+ VehicleSpecification.style = VehicleSpecificationStyle0;
110
+
111
+ exports.vehicle_specification = VehicleSpecification;
@@ -0,0 +1,52 @@
1
+ /*!
2
+ * Built by ShiftSoftware
3
+ * Copyright (c)
4
+ */
5
+ 'use strict';
6
+
7
+ const vehicleRequestHeaders = {
8
+ cityId: 'City-Id',
9
+ userId: 'User-Id',
10
+ companyId: 'Company-Id',
11
+ customerName: 'Customer-Name',
12
+ customerPhone: 'Customer-Phone',
13
+ customerEmail: 'Customer-Email',
14
+ companyBranchId: 'Company-Branch-Id',
15
+ cityIntegrationId: 'City-Integration-Id',
16
+ brandIntegrationId: 'Brand-Integration-Id',
17
+ companyIntegrationId: 'Company-Integration-Id',
18
+ companyBranchIntegrationId: 'Company-Branch-Integration-Id',
19
+ };
20
+ const getVehicleInformation = async (component, generalProps) => {
21
+ const { notAvailableMessage, mockData, vin, scopedTimeoutRef, middlewareCallback } = generalProps;
22
+ const { isDev, baseUrl, queryString, abortController, networkTimeoutRef, loadedResponse } = component;
23
+ const handleResult = (newVehicleInformation) => {
24
+ if (networkTimeoutRef === scopedTimeoutRef) {
25
+ if (!newVehicleInformation && vin)
26
+ throw new Error(notAvailableMessage || 'Wrong response format');
27
+ if (loadedResponse)
28
+ loadedResponse(newVehicleInformation);
29
+ if (middlewareCallback)
30
+ middlewareCallback(newVehicleInformation);
31
+ return newVehicleInformation;
32
+ }
33
+ };
34
+ if (isDev) {
35
+ const newData = mockData[vin];
36
+ return handleResult(newData);
37
+ }
38
+ else {
39
+ if (!baseUrl)
40
+ throw new Error('Please provide base-url');
41
+ const headers = {};
42
+ Object.entries(vehicleRequestHeaders).forEach(([componentHeaderKey, headerField]) => {
43
+ if (component[componentHeaderKey])
44
+ headers[headerField] = component[componentHeaderKey];
45
+ });
46
+ const response = await fetch(`${baseUrl}${vin}?${queryString}`, { signal: abortController.signal, headers: headers });
47
+ const newData = (await response.json());
48
+ return handleResult(newData);
49
+ }
50
+ };
51
+
52
+ exports.getVehicleInformation = getVehicleInformation;
@@ -0,0 +1,281 @@
1
+ /*!
2
+ * Built by ShiftSoftware
3
+ * Copyright (c)
4
+ */
5
+ 'use strict';
6
+
7
+ Object.defineProperty(exports, '__esModule', { value: true });
8
+
9
+ const index = require('./index-d4b5214c.js');
10
+ const cn = require('./cn-f559f9e5.js');
11
+ const loader = require('./loader-baf2418b.js');
12
+ const vehicleInformation = require('./vehicleInformation-4c1dcaf2.js');
13
+
14
+ const loaderSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIKICAgIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1sb2FkZXIiPgogICAgPHBhdGggZD0iTTEyIDJ2NCIgLz4KICAgIDxwYXRoIGQ9Im0xNi4yIDcuOCAyLjktMi45IiAvPgogICAgPHBhdGggZD0iTTE4IDEyaDQiIC8+CiAgICA8cGF0aCBkPSJtMTYuMiAxNi4yIDIuOSAyLjkiIC8+CiAgICA8cGF0aCBkPSJNMTIgMTh2NCIgLz4KICAgIDxwYXRoIGQ9Im00LjkgMTkuMSAyLjktMi45IiAvPgogICAgPHBhdGggZD0iTTIgMTJoNCIgLz4KICAgIDxwYXRoIGQ9Im00LjkgNC45IDIuOSAyLjkiIC8+Cjwvc3ZnPg==';
15
+
16
+ function Loading({ isLoading }) {
17
+ return (index.h("div", { class: cn.cn('loading-spinner absolute', { hide: !isLoading }) },
18
+ index.h("img", { class: "spin", src: loaderSvg })));
19
+ }
20
+
21
+ const checkSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj4KICAgIDxwYXRoIGZpbGw9IiMwYjM1MjEiCiAgICAgICAgZD0iTTI1NiA1MTJBMjU2IDI1NiAwIDEgMCAyNTYgMGEyNTYgMjU2IDAgMSAwIDAgNTEyek0zNjkgMjA5TDI0MSAzMzdjLTkuNCA5LjQtMjQuNiA5LjQtMzMuOSAwbC02NC02NGMtOS40LTkuNC05LjQtMjQuNiAwLTMzLjlzMjQuNi05LjQgMzMuOSAwbDQ3IDQ3TDMzNSAxNzVjOS40LTkuNCAyNC42LTkuNCAzMy45IDBzOS40IDI0LjYgMCAzMy45eiIgLz4KPC9zdmc+';
22
+
23
+ const xMarkSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEyIj4KICAgIDxwYXRoIGZpbGw9IiM1ODE1MWMiCiAgICAgICAgZD0iTTI1NiA1MTJBMjU2IDI1NiAwIDEgMCAyNTYgMGEyNTYgMjU2IDAgMSAwIDAgNTEyek0xNzUgMTc1YzkuNC05LjQgMjQuNi05LjQgMzMuOSAwbDQ3IDQ3IDQ3LTQ3YzkuNC05LjQgMjQuNi05LjQgMzMuOSAwczkuNCAyNC42IDAgMzMuOWwtNDcgNDcgNDcgNDdjOS40IDkuNCA5LjQgMjQuNiAwIDMzLjlzLTI0LjYgOS40LTMzLjkgMGwtNDctNDctNDcgNDdjLTkuNCA5LjQtMjQuNiA5LjQtMzMuOSAwcy05LjQtMjQuNiAwLTMzLjlsNDctNDctNDctNDdjLTkuNC05LjQtOS40LTI0LjYgMC0zMy45eiIgLz4KPC9zdmc+';
24
+
25
+ function StatusCard({ desc, className, from, to, state = 'idle', icon = true }) {
26
+ return (index.h("div", { class: cn.cn('card', className, `${state}-card`) },
27
+ icon && state === 'reject' && index.h("img", { src: xMarkSvg }),
28
+ icon && state === 'warning' && index.h("img", { src: xMarkSvg }),
29
+ icon && state === 'success' && index.h("img", { src: checkSvg }),
30
+ from && (index.h("p", { class: "no-padding" },
31
+ index.h("span", { class: "font-semibold pr-1" }, "From:"),
32
+ " ",
33
+ desc)),
34
+ to && (index.h("p", { class: "no-padding" },
35
+ index.h("span", { class: "font-semibold pr-1" }, "To:"),
36
+ " ",
37
+ desc)),
38
+ !from && !to && index.h("p", { class: state === 'idle' ? 'no-padding' : '' }, desc)));
39
+ }
40
+
41
+ function CardsContainer({ warranty, isAuthorized, unInvoicedByBrokerName }) {
42
+ return (index.h("div", { class: "warranty-tags mx-auto pt-3" },
43
+ index.h(StatusCard, { state: isAuthorized ? 'success' : 'reject', desc: isAuthorized ? 'Authorized' : 'Unauthorized' }),
44
+ index.h(StatusCard, { state: warranty.hasActiveWarranty ? 'success' : 'reject', desc: warranty.hasActiveWarranty ? 'Has Active Warranty' : "Doesn't Have Active Warranty" }),
45
+ unInvoicedByBrokerName && index.h(StatusCard, { className: 'span-entire-2nd-row', state: 'warning', icon: true, desc: `Warranty is not Active because this Vehicle is not Invoiced by the following Trusted Business Partner: ${unInvoicedByBrokerName}` }),
46
+ warranty.warrantyStartDate && index.h(StatusCard, { state: (warranty === null || warranty === void 0 ? void 0 : warranty.hasActiveWarranty) ? 'success' : 'reject', icon: false, from: true, desc: warranty.warrantyStartDate }),
47
+ warranty.warrantyEndDate && index.h(StatusCard, { state: (warranty === null || warranty === void 0 ? void 0 : warranty.hasActiveWarranty) ? 'success' : 'reject', icon: false, to: true, desc: warranty.warrantyEndDate })));
48
+ }
49
+
50
+ function SSCTable({ ssc }) {
51
+ return (index.h("div", { class: "wrapper-table" },
52
+ index.h("div", { class: "header" }, "SSC Campings"),
53
+ index.h("div", { class: "ssc-table-container" },
54
+ index.h("table", { class: "ssc-table" },
55
+ index.h("thead", null,
56
+ index.h("tr", null,
57
+ index.h("th", null, "Code"),
58
+ index.h("th", null, "Description"),
59
+ index.h("th", null, "Repair Status"),
60
+ index.h("th", null, "OP-Codes"),
61
+ index.h("th", null, "Part Number"))),
62
+ index.h("tbody", null, ssc.map(sscItem => (index.h("tr", { class: "transition", key: sscItem.sscCode },
63
+ index.h("td", null, sscItem.sscCode),
64
+ index.h("td", null, sscItem.description),
65
+ index.h("td", null,
66
+ index.h("div", { class: "table-cell-container" },
67
+ index.h("img", { class: "table-status-icon", src: sscItem.repaired ? checkSvg : xMarkSvg }),
68
+ " ", sscItem === null || sscItem === void 0 ? void 0 :
69
+ sscItem.repairDate)),
70
+ index.h("td", null, sscItem.opCode),
71
+ index.h("td", null,
72
+ index.h("div", { class: "table-cell-container table-cell-parts-container" }, !!sscItem.parts.length
73
+ ? sscItem.parts.map(part => (index.h("div", { key: part.partNumber, class: part.isAvailable ? 'success' : 'reject' }, part.partNumber)))
74
+ : '...'))))))))));
75
+ }
76
+
77
+ const warrantyDetailsCss = "*,: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}.collapse{visibility:collapse}.absolute{left:0;position:absolute;top:0}.relative{position:relative}.sticky{position:sticky}.mx-auto{margin-left:auto;margin-right:auto}.mt-4{margin-top:1rem}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-0{height:0;height:0!important}.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))}.flex-wrap{flex-wrap:wrap}.border{border-width:1px}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pr-1{padding-right:4px}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.font-semibold{font-weight:600}.transition{transition:all;transition-duration:.3s;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)}.duration-1000{transition-duration:1s}.duration-500{transition-duration:.5s}.duration-700{transition-duration:.7s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.success-card{background:#d0e7de;background-color:#d0e7de;border-color:#a2d0bb!important;border-color:#a2d0bb;color:#0b3521}.reject-card{background:#f7d7d8;background-color:#f7d7d8;border-color:#f2aeb5!important;border-color:#f2aeb5;color:#58151c}:host{all:initial!important;display:block}*{font-family:Arial}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.fade-in{animation:fadeIn .3s ease-in forwards;opacity:0}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.fade-out{animation:fadeIn .3s ease-in forwards;opacity:1}.spin{animation:spin 2s linear infinite}.loading-spinner{align-items:center;display:flex;height:100%;justify-content:center;pointer-events:none;transition:all;transition-duration:.1s;width:100%}.loading-spinner img{height:40px;width:40px}.warranty{overflow:hidden;position:relative;transition:all;transition-duration:.3s}.hide{opacity:0}.card{border:1px solid;border-radius:6px;flex-shrink:0;gap:8px;padding:8px 12px}.card,.card p{align-items:center;display:flex}.card p{flex:1 1 0%;font-size:16px;height:25px;margin:0;padding-left:50px}.card p.no-padding{padding-left:4px}.card img{height:25px;width:25px}.recaptcha-response{border:1px solid;border-radius:8px;font-size:20px;margin:16px auto 0;padding:8px 16px;width:-moz-fit-content;width:fit-content}.warning-card{background:#fcf8e3;border-color:#faebcc!important;color:#8a6d3b}.span-entire-2nd-row{grid-column:1/3;grid-row:2/3}.warranty-tags{display:grid;gap:12px;grid-template-columns:1fr 1fr;max-width:1000px}.pt-3,.py-3{padding-top:12px}.pb-3,.py-3{padding-bottom:12px}.pt-4,.py-4{padding-top:16px}.pb-4,.py-4{padding-bottom:16px}.max-w-500{max-width:500px}.mt-4,.my-4{margin-bottom:16px;margin-top:16px}.warranty *{box-sizing:border-box}.wrapper-table{border:1px solid #d6d8dc;border-radius:4px;display:flex;flex-direction:column;margin-top:12px;max-height:70vh;overflow:hidden}.ssc-table-container{flex:1 1 0%;height:0;overflow:auto}.wrapper-table .header{align-items:center;background:#e1e3e5;color:#383c43;display:flex;flex-shrink:0;font-size:18px;height:40px;justify-content:center;width:100%}.ssc-table{border-collapse:collapse;overflow:auto;position:relative;width:100%}.ssc-table thead{background-color:#fff;font-weight:700;position:sticky;top:0}.ssc-table td,.ssc-table th{border-bottom:1px solid #d6d8dc;padding:10px 20px;text-align:center;transition:all;transition-duration:.3s;white-space:nowrap}.ssc-table tr:hover{background:#f4f4f4}.ssc-table tr:last-child td{border:none}.table-cell-container{align-items:center;display:flex;gap:8px;justify-content:center;width:100%}.table-cell-parts-container{flex-wrap:wrap}.table-cell-parts-container div{border-radius:4px;font-size:14px;padding:4px 8px}.table-cell-parts-container div.success{background:#d0e7de}.table-cell-parts-container div.reject{background:#f7d7d8}.table-status-icon{height:20px;width:20px}.warranty-vin{font-size:20px;padding-top:4px;text-align:center}.recaptcha-container{display:flex;justify-content:center;overflow:hidden}.static{position:static}.min-h-\\[100px\\]{min-height:100px}.py-4{padding-bottom:1rem;padding-top:1rem}.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)}";
78
+ const WarrantyDetailsStyle0 = warrantyDetailsCss;
79
+
80
+ let mockData = {};
81
+ const WarrantyDetails = class {
82
+ constructor(hostRef) {
83
+ index.registerInstance(this, hostRef);
84
+ this.baseUrl = '';
85
+ this.unauthorizedSscLookupBaseUrl = '';
86
+ this.isDev = false;
87
+ this.showSsc = false;
88
+ this.queryString = '';
89
+ this.unauthorizedSscLookupQueryString = '';
90
+ this.recaptchaKey = '';
91
+ this.showWarranty = false;
92
+ this.cityId = null;
93
+ this.cityIntegrationId = null;
94
+ this.companyId = null;
95
+ this.companyIntegrationId = null;
96
+ this.companyBranchId = null;
97
+ this.companyBranchIntegrationId = null;
98
+ this.userId = null;
99
+ this.brandIntegrationId = null;
100
+ this.customerName = null;
101
+ this.customerPhone = null;
102
+ this.customerEmail = null;
103
+ this.loadingStateChange = undefined;
104
+ this.loadedResponse = undefined;
105
+ this.state = 'idle';
106
+ this.externalVin = null;
107
+ this.errorMessage = null;
108
+ this.showRecaptcha = false;
109
+ this.unInvoicedByBrokerName = null;
110
+ this.vehicleInformation = undefined;
111
+ this.checkingUnauthorizedSSC = false;
112
+ this.recaptchaRes = null;
113
+ }
114
+ handleSettingData(response) {
115
+ var _a, _b, _c;
116
+ if (response.warranty === null)
117
+ response.warranty = {
118
+ warrantyEndDate: '',
119
+ warrantyStartDate: '',
120
+ hasActiveWarranty: false,
121
+ hasExtendedWarranty: false,
122
+ extendedWarrantyEndDate: '',
123
+ extendedWarrantyStartDate: '',
124
+ };
125
+ if (response.ssc === null)
126
+ response.ssc = [];
127
+ this.unInvoicedByBrokerName = null;
128
+ if (((_a = response === null || response === void 0 ? void 0 : response.saleInformation) === null || _a === void 0 ? void 0 : _a.broker) !== null && ((_c = (_b = response === null || response === void 0 ? void 0 : response.saleInformation) === null || _b === void 0 ? void 0 : _b.broker) === null || _c === void 0 ? void 0 : _c.invoiceDate) === null)
129
+ this.unInvoicedByBrokerName = response.saleInformation.broker.brokerName;
130
+ this.vehicleInformation = response;
131
+ }
132
+ async handleInitializingRecaptcha(vin, scopedTimeoutRef) {
133
+ var _a;
134
+ if (((_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.isAuthorized) === false && this.showSsc && this.recaptchaKey !== '') {
135
+ grecaptcha.reset();
136
+ await new Promise(r => setTimeout(r, 400));
137
+ this.recaptchaIntervalRef = setInterval(async () => {
138
+ var _a;
139
+ const recaptchaResponse = grecaptcha.getResponse();
140
+ if (recaptchaResponse) {
141
+ clearInterval(this.recaptchaIntervalRef);
142
+ if (this.isDev) {
143
+ this.checkingUnauthorizedSSC = true;
144
+ this.showRecaptcha = false;
145
+ //this.calculateHeight(this.state);
146
+ await new Promise(r => setTimeout(r, 3000));
147
+ this.checkingUnauthorizedSSC = false;
148
+ const hasPendingSSC = Math.random() < 0.5 ? false : true;
149
+ this.recaptchaRes = {
150
+ hasSSC: hasPendingSSC,
151
+ message: hasPendingSSC ? 'This Vehicle has a Pending SSC' : 'No Pending SSC',
152
+ };
153
+ //this.calculateHeight(this.state);
154
+ }
155
+ else {
156
+ this.checkingUnauthorizedSSC = true;
157
+ this.showRecaptcha = false;
158
+ //this.calculateHeight(this.state);
159
+ const response = await fetch(`${this.unauthorizedSscLookupBaseUrl}${vin}/${(_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.sscLogId}?${this.unauthorizedSscLookupQueryString}`, {
160
+ signal: this.abortController.signal,
161
+ headers: {
162
+ 'Ssc-Recaptcha-Token': recaptchaResponse,
163
+ },
164
+ });
165
+ const vinResponse = await response.json();
166
+ if (vinResponse && this.networkTimeoutRef === scopedTimeoutRef) {
167
+ this.checkingUnauthorizedSSC = false;
168
+ const hasPendingSSC = vinResponse.sscLookupStatus === 1;
169
+ this.recaptchaRes = {
170
+ hasSSC: hasPendingSSC,
171
+ message: hasPendingSSC ? 'This Vehicle has a Pending SSC' : 'No Pending SSC',
172
+ };
173
+ //this.calculateHeight(this.state);
174
+ }
175
+ else
176
+ throw new Error('Wrong response format');
177
+ }
178
+ }
179
+ }, 500);
180
+ this.showRecaptcha = true;
181
+ }
182
+ else {
183
+ this.showRecaptcha = false;
184
+ }
185
+ }
186
+ async setData(newData) {
187
+ this.recaptchaRes = null;
188
+ clearTimeout(this.networkTimeoutRef);
189
+ clearInterval(this.recaptchaIntervalRef);
190
+ if (this.abortController)
191
+ this.abortController.abort();
192
+ this.abortController = new AbortController();
193
+ let scopedTimeoutRef;
194
+ const isVinRequest = typeof newData === 'string';
195
+ const vin = isVinRequest ? newData : newData === null || newData === void 0 ? void 0 : newData.vin;
196
+ this.externalVin = vin;
197
+ try {
198
+ if (!vin || vin.trim().length === 0) {
199
+ //this.componentHeight = '0px';
200
+ this.state = 'idle';
201
+ return;
202
+ }
203
+ if (this.state === 'data' || this.state === 'error') {
204
+ this.state = (this.state + '-loading');
205
+ }
206
+ else
207
+ this.state = 'loading';
208
+ await new Promise(r => {
209
+ scopedTimeoutRef = setTimeout(r, 600);
210
+ this.networkTimeoutRef = scopedTimeoutRef;
211
+ });
212
+ const vehicleResponse = isVinRequest ? await vehicleInformation.getVehicleInformation(this, { scopedTimeoutRef, vin, mockData }) : newData;
213
+ if (this.networkTimeoutRef === scopedTimeoutRef) {
214
+ if (!vehicleResponse)
215
+ throw new Error('Wrong response format');
216
+ this.handleSettingData(vehicleResponse);
217
+ this.handleInitializingRecaptcha(vin, scopedTimeoutRef);
218
+ }
219
+ this.errorMessage = null;
220
+ this.state = 'data';
221
+ }
222
+ catch (error) {
223
+ if (error && (error === null || error === void 0 ? void 0 : error.name) === 'AbortError')
224
+ return;
225
+ this.state = 'error';
226
+ this.vehicleInformation = null;
227
+ this.errorMessage = error.message;
228
+ }
229
+ }
230
+ async fetchData(requestedVin = this.externalVin) {
231
+ await this.setData(requestedVin);
232
+ }
233
+ async componentDidLoad() {
234
+ if (this.recaptchaKey !== '') {
235
+ const script = document.createElement('script');
236
+ script.src = 'https://www.google.com/recaptcha/api.js';
237
+ script.async = true;
238
+ script.defer = true;
239
+ script.onload = () => console.log('reCAPTCHA script loaded');
240
+ document.head.appendChild(script);
241
+ }
242
+ }
243
+ //calculateHeight(componentState: string) {
244
+ // if (componentState.includes('loading') && this.componentHeight === '0px') {
245
+ // this.componentHeight = '100px';
246
+ // } else if (componentState !== 'idle') {
247
+ // setTimeout(() => {
248
+ // this.componentHeight = `${this.wrapperRef.clientHeight}px`;
249
+ // }, 50);
250
+ // } else {
251
+ // this.componentHeight = '0px';
252
+ // }
253
+ //}
254
+ async setMockData(newMockData) {
255
+ mockData = newMockData;
256
+ }
257
+ onShowSscChange() {
258
+ //this.calculateHeight(this.state);
259
+ }
260
+ onShowWarrantyChange() {
261
+ //this.calculateHeight(this.state);
262
+ }
263
+ async loadingListener() {
264
+ //this.calculateHeight(newState);
265
+ if (this.loadingStateChange)
266
+ this.loadingStateChange(this.state.includes('loading'));
267
+ }
268
+ render() {
269
+ var _a, _b, _c, _d, _e;
270
+ return (index.h(index.Host, { key: '9f7b4391eb2ac41ecb6b620adb733d06cad61e01' }, index.h("div", { key: 'a120fa5f7b7ec6b586ae1553ddd5f1270b4bafdf', class: "min-h-[100px] warranty" }, index.h("div", { key: 'a3e41d8aad2f04cd6f0fc7cc0ce952ec80eb67e9' }, index.h(Loading, { key: '548ba51ad8f41ebba0d4591f22294c4a0ceeddca', isLoading: this.state.includes('loading') }), index.h("div", { key: 'fa06505b9ad363d070e98c384ca08be6fab23e3a', 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) && (index.h("div", { key: 'dd5cae430e26d6b99de558414bc54ae61037b6ee', 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) && (index.h("div", { key: '2aa3678b9daedb664cb83908bab1a3ae79d26ca4', class: "py-4" }, index.h(StatusCard, { key: '9fb71c4271b607184140207e737f9db6955446a1', desc: this.errorMessage, className: "mx-auto reject-card max-w-500" }), ' ')), this.showWarranty && ['data', 'data-loading'].includes(this.state) && (index.h(CardsContainer, { key: 'd14715477bfd2a7a07ed203794cdd90bf3dc7f77', 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 })), index.h("div", { key: '7d24f6ed652cfd6e23ff88471a8c134810909522', style: Object.assign({}, (this.showRecaptcha ? { height: 'auto', padding: '16px 16px 0px 16px' } : { height: '0px' })), class: "recaptcha-container" }, index.h("slot", { key: '09944b5683a9c564bba4a7bf7b02bf45578b1a01' })), ['data', 'data-loading'].includes(this.state) && this.recaptchaRes && (index.h("div", { key: '3503fc5ab15f118a4614f0aa4a0cbc98dffd341b', class: cn.cn('recaptcha-response', !this.recaptchaRes.hasSSC ? 'success-card' : 'reject-card ') }, this.recaptchaRes.message)), this.checkingUnauthorizedSSC && (index.h("div", { key: '2d307b6517e8734a86b366d24550870d141559f5', class: "loading-spinner", style: { marginTop: '20px', flexDirection: 'column' } }, index.h("div", { key: '3ce58c58e769399b08909d24b49dfb16020beaa4' }, index.h("strong", { key: '7a09f45c291d5561410116ffb6cfb4de417c51ce' }, "Checking TMC")), index.h("img", { key: '6ff6d07a3834f1f02d1a54d2d45cfff712d8ec53', class: "spin", src: loader.loaderSvg }))), 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) && (index.h(SSCTable, { key: 'f67095d616937712e31ed0421811f1cf3c7982ed', ssc: this.vehicleInformation.ssc })))))));
271
+ }
272
+ get el() { return index.getElement(this); }
273
+ static get watchers() { return {
274
+ "showSsc": ["onShowSscChange"],
275
+ "showWarranty": ["onShowWarrantyChange"],
276
+ "state": ["loadingListener"]
277
+ }; }
278
+ };
279
+ WarrantyDetails.style = WarrantyDetailsStyle0;
280
+
281
+ exports.warranty_details = WarrantyDetails;