@ubnt/store.core 9.20.0-alpha.9 → 9.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (933) hide show
  1. package/CHANGELOG.md +3 -235
  2. package/lib/_virtual/_virtual_multi-entry.js +42 -61
  3. package/lib/_virtual/_virtual_multi-entry.js.map +1 -1
  4. package/lib/_virtual/_virtual_multi-entry.mjs +40 -48
  5. package/lib/_virtual/_virtual_multi-entry.mjs.map +1 -1
  6. package/lib/assets/close.svg +4 -1
  7. package/lib/assets/close2.svg +1 -3
  8. package/lib/assets/close3.svg +2 -3
  9. package/lib/{components/ModelCompareV3/assets/WiFi/mega-capacity.jpg.js → assets/icons/menu/icon-globe.svg.js} +6 -6
  10. package/lib/assets/icons/menu/icon-globe.svg.js.map +1 -0
  11. package/lib/assets/icons/menu/icon-globe.svg.mjs +3 -0
  12. package/lib/assets/icons/menu/icon-globe.svg.mjs.map +1 -0
  13. package/lib/assets/industrial.jpg +0 -0
  14. package/lib/assets/ucgMax.jpg +0 -0
  15. package/lib/assets/ucgMax2.jpg +0 -0
  16. package/lib/assets/ucgUltra.jpg +0 -0
  17. package/lib/assets/ucgUltra2.jpg +0 -0
  18. package/lib/assets/udmProMax.jpg +0 -0
  19. package/lib/assets/udmProMax2.jpg +0 -0
  20. package/lib/assets/udmProSpecial.jpg +0 -0
  21. package/lib/assets/udmProSpecial2.jpg +0 -0
  22. package/lib/components/Button/CartButton.d.ts +1 -3
  23. package/lib/components/Button/CartButton.js +2 -4
  24. package/lib/components/Button/CartButton.js.map +1 -1
  25. package/lib/components/Button/CartButton.mjs +2 -4
  26. package/lib/components/Button/CartButton.mjs.map +1 -1
  27. package/lib/components/CategoryTabs/CategoryTabs.styles.d.ts +1 -1
  28. package/lib/components/CategoryTabs/CategoryTabs.styles.js +3 -2
  29. package/lib/components/CategoryTabs/CategoryTabs.styles.js.map +1 -1
  30. package/lib/components/CategoryTabs/CategoryTabs.styles.mjs +3 -2
  31. package/lib/components/CategoryTabs/CategoryTabs.styles.mjs.map +1 -1
  32. package/lib/components/Compare/Compare.styles.d.ts +5 -5
  33. package/lib/components/Container/Container.d.ts +1 -1
  34. package/lib/components/Container/Container.js +3 -4
  35. package/lib/components/Container/Container.js.map +1 -1
  36. package/lib/components/Container/Container.mjs +4 -5
  37. package/lib/components/Container/Container.mjs.map +1 -1
  38. package/lib/components/CustomImage/CustomImage.js +1 -1
  39. package/lib/components/CustomImage/CustomImage.mjs +1 -1
  40. package/lib/components/FeaturesSection_deprecated/FeaturesSection.js +1 -1
  41. package/lib/components/FeaturesSection_deprecated/FeaturesSection.mjs +1 -1
  42. package/lib/components/FeaturesSection_deprecated/assets/close.svg.js +1 -1
  43. package/lib/components/FeaturesSection_deprecated/assets/close.svg.mjs +2 -2
  44. package/lib/components/GridGallery/GridModal/GridModal.js +1 -1
  45. package/lib/components/GridGallery/GridModal/GridModal.mjs +1 -1
  46. package/lib/components/Header/AccountMenu/AccountMenu.js +4 -14
  47. package/lib/components/Header/AccountMenu/AccountMenu.js.map +1 -1
  48. package/lib/components/Header/AccountMenu/AccountMenu.mjs +5 -15
  49. package/lib/components/Header/AccountMenu/AccountMenu.mjs.map +1 -1
  50. package/lib/components/Header/AccountMenu/AccountMenu.styles.d.ts +3 -3
  51. package/lib/components/Header/CartModalV2/CartModal.js +1 -1
  52. package/lib/components/Header/CartModalV2/CartModal.mjs +1 -1
  53. package/lib/components/Header/CartModalV2/Item/Item.styles.d.ts +1 -1
  54. package/lib/components/Header/Header.js +16 -16
  55. package/lib/components/Header/Header.js.map +1 -1
  56. package/lib/components/Header/Header.mjs +13 -13
  57. package/lib/components/Header/Header.mjs.map +1 -1
  58. package/lib/components/Header/Header.styles.d.ts +9 -2
  59. package/lib/components/Header/Header.styles.js +21 -2
  60. package/lib/components/Header/Header.styles.js.map +1 -1
  61. package/lib/components/Header/Header.styles.mjs +21 -3
  62. package/lib/components/Header/Header.styles.mjs.map +1 -1
  63. package/lib/components/Header/Header.types.d.ts +4 -12
  64. package/lib/components/Header/Header.types.js +1 -2
  65. package/lib/components/Header/Header.types.js.map +1 -1
  66. package/lib/components/Header/Header.types.mjs +1 -2
  67. package/lib/components/Header/Header.types.mjs.map +1 -1
  68. package/lib/components/Header/IsolatedHeader.js +38 -40
  69. package/lib/components/Header/IsolatedHeader.js.map +1 -1
  70. package/lib/components/Header/IsolatedHeader.mjs +39 -41
  71. package/lib/components/Header/IsolatedHeader.mjs.map +1 -1
  72. package/lib/components/Header/MenuItem/MenuItem.styles.d.ts +1 -1
  73. package/lib/components/Header/MenuItem/MenuItem.styles.js +3 -3
  74. package/lib/components/Header/MenuItem/MenuItem.styles.js.map +1 -1
  75. package/lib/components/Header/MenuItem/MenuItem.styles.mjs +3 -3
  76. package/lib/components/Header/MenuItem/MenuItem.styles.mjs.map +1 -1
  77. package/lib/components/Header/MenuItem/MenuItem.types.d.ts +0 -1
  78. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.d.ts +1 -1
  79. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.js +5 -7
  80. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.js.map +1 -1
  81. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.mjs +5 -7
  82. package/lib/components/Header/Navigation/MicrositeMenu/MicrositeMenu.styles.mjs.map +1 -1
  83. package/lib/components/Header/Navigation/MobileMenu/MobileMenu.styles.d.ts +1 -1
  84. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.d.ts +1 -1
  85. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js +101 -101
  86. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.js.map +1 -1
  87. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs +101 -101
  88. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.mjs.map +1 -1
  89. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.d.ts +0 -9
  90. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js +1 -15
  91. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.js.map +1 -1
  92. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs +2 -13
  93. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.styles.mjs.map +1 -1
  94. package/lib/components/Header/Navigation/ProMobileMenu/ProMobileMenu.types.d.ts +4 -10
  95. package/lib/components/Header/ProHeader/ProHeader.d.ts +4 -3
  96. package/lib/components/Header/ProHeader/ProHeader.js +125 -258
  97. package/lib/components/Header/ProHeader/ProHeader.js.map +1 -1
  98. package/lib/components/Header/ProHeader/ProHeader.mjs +127 -258
  99. package/lib/components/Header/ProHeader/ProHeader.mjs.map +1 -1
  100. package/lib/components/Header/ProHeader/ProHeader.styles.d.ts +4 -5
  101. package/lib/components/Header/ProHeader/ProHeader.styles.js +19 -25
  102. package/lib/components/Header/ProHeader/ProHeader.styles.js.map +1 -1
  103. package/lib/components/Header/ProHeader/ProHeader.styles.mjs +20 -23
  104. package/lib/components/Header/ProHeader/ProHeader.styles.mjs.map +1 -1
  105. package/lib/components/Header/translations/ar.json.js +1 -4
  106. package/lib/components/Header/translations/ar.json.js.map +1 -1
  107. package/lib/components/Header/translations/ar.json.mjs +2 -4
  108. package/lib/components/Header/translations/ar.json.mjs.map +1 -1
  109. package/lib/components/Header/translations/de.json.js +1 -4
  110. package/lib/components/Header/translations/de.json.js.map +1 -1
  111. package/lib/components/Header/translations/de.json.mjs +2 -4
  112. package/lib/components/Header/translations/de.json.mjs.map +1 -1
  113. package/lib/components/Header/translations/el.json.js +1 -4
  114. package/lib/components/Header/translations/el.json.js.map +1 -1
  115. package/lib/components/Header/translations/el.json.mjs +2 -4
  116. package/lib/components/Header/translations/el.json.mjs.map +1 -1
  117. package/lib/components/Header/translations/en.json.js +1 -4
  118. package/lib/components/Header/translations/en.json.js.map +1 -1
  119. package/lib/components/Header/translations/en.json.mjs +2 -4
  120. package/lib/components/Header/translations/en.json.mjs.map +1 -1
  121. package/lib/components/Header/translations/es.json.js +1 -4
  122. package/lib/components/Header/translations/es.json.js.map +1 -1
  123. package/lib/components/Header/translations/es.json.mjs +2 -4
  124. package/lib/components/Header/translations/es.json.mjs.map +1 -1
  125. package/lib/components/Header/translations/fr.json.js +1 -4
  126. package/lib/components/Header/translations/fr.json.js.map +1 -1
  127. package/lib/components/Header/translations/fr.json.mjs +2 -4
  128. package/lib/components/Header/translations/fr.json.mjs.map +1 -1
  129. package/lib/components/Header/translations/it.json.js +1 -4
  130. package/lib/components/Header/translations/it.json.js.map +1 -1
  131. package/lib/components/Header/translations/it.json.mjs +2 -4
  132. package/lib/components/Header/translations/it.json.mjs.map +1 -1
  133. package/lib/components/Header/translations/ja.json.js +1 -4
  134. package/lib/components/Header/translations/ja.json.js.map +1 -1
  135. package/lib/components/Header/translations/ja.json.mjs +2 -4
  136. package/lib/components/Header/translations/ja.json.mjs.map +1 -1
  137. package/lib/components/Header/translations/pt-BR.json.js +1 -4
  138. package/lib/components/Header/translations/pt-BR.json.js.map +1 -1
  139. package/lib/components/Header/translations/pt-BR.json.mjs +2 -4
  140. package/lib/components/Header/translations/pt-BR.json.mjs.map +1 -1
  141. package/lib/components/Header/translations/zh-Hans.json.js +1 -4
  142. package/lib/components/Header/translations/zh-Hans.json.js.map +1 -1
  143. package/lib/components/Header/translations/zh-Hans.json.mjs +2 -4
  144. package/lib/components/Header/translations/zh-Hans.json.mjs.map +1 -1
  145. package/lib/components/Header/translations/zh-Hant-TW.json.js +1 -4
  146. package/lib/components/Header/translations/zh-Hant-TW.json.js.map +1 -1
  147. package/lib/components/Header/translations/zh-Hant-TW.json.mjs +2 -4
  148. package/lib/components/Header/translations/zh-Hant-TW.json.mjs.map +1 -1
  149. package/lib/components/Hero/Hero.styles.d.ts +2 -2
  150. package/lib/components/HeroFadeGallery/HeroFadeGallery.styles.d.ts +1 -1
  151. package/lib/components/HowToUseSection/HowToUseSection.styles.d.ts +2 -2
  152. package/lib/components/InputSelect/InputSelect.styles.d.ts +1 -1
  153. package/lib/components/LandingPage/Cards/Cards.js +4 -4
  154. package/lib/components/LandingPage/Cards/Cards.js.map +1 -1
  155. package/lib/components/LandingPage/Cards/Cards.mjs +3 -3
  156. package/lib/components/LandingPage/Cards/Cards.mjs.map +1 -1
  157. package/lib/components/LandingPagePro/LandingPagePro.d.ts +0 -3
  158. package/lib/components/LandingPagePro/LandingPagePro.js +3 -3
  159. package/lib/components/LandingPagePro/LandingPagePro.js.map +1 -1
  160. package/lib/components/LandingPagePro/LandingPagePro.mjs +2 -2
  161. package/lib/components/LandingPagePro/LandingPagePro.mjs.map +1 -1
  162. package/lib/components/LandingPagePro/LandingPagePro.styles.d.ts +1 -1
  163. package/lib/components/LandingPageSidebar/LandingPageSidebar.js +1 -1
  164. package/lib/components/LandingPageSidebar/LandingPageSidebar.mjs +1 -1
  165. package/lib/components/LayoutRenderer/LayoutRenderer.styles.d.ts +1 -1
  166. package/lib/components/LayoutRendererV1/LayoutRenderer.styles.d.ts +3 -3
  167. package/lib/components/LayoutRendererV2/LayoutRenderer.styles.d.ts +3 -3
  168. package/lib/components/MicrositeSectionWrap/MicrositeSectionWrap.styles.d.ts +1 -1
  169. package/lib/components/MobileModal/MobileModal.js +1 -1
  170. package/lib/components/MobileModal/MobileModal.js.map +1 -1
  171. package/lib/components/MobileModal/MobileModal.mjs +1 -1
  172. package/lib/components/MobileModal/MobileModal.mjs.map +1 -1
  173. package/lib/{assets/icons → components/MobileModal/assets}/arrowDown.svg.js +1 -1
  174. package/lib/components/MobileModal/assets/arrowDown.svg.mjs +3 -0
  175. package/lib/components/ModelCompareV3/ModelCompareV3.types.d.ts +0 -4
  176. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgMax.jpg.js +5 -5
  177. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgMax.jpg.mjs +2 -2
  178. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgUltra.jpg.js +5 -5
  179. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/ucgUltra.jpg.mjs +2 -2
  180. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.js +5 -5
  181. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProMax.jpg.mjs +2 -2
  182. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.js +5 -5
  183. package/lib/components/ModelCompareV3/assets/Consoles/bigCompare/udmProSpecial.jpg.mjs +2 -2
  184. package/lib/components/ModelCompareV3/assets/Consoles/ucgMax.jpg.js +1 -1
  185. package/lib/components/ModelCompareV3/assets/Consoles/ucgMax.jpg.mjs +2 -2
  186. package/lib/components/ModelCompareV3/assets/Consoles/ucgUltra.jpg.js +1 -1
  187. package/lib/components/ModelCompareV3/assets/Consoles/ucgUltra.jpg.mjs +2 -2
  188. package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.js +1 -1
  189. package/lib/components/ModelCompareV3/assets/Consoles/udmProMax.jpg.mjs +2 -2
  190. package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.js +1 -1
  191. package/lib/components/ModelCompareV3/assets/Consoles/udmProSpecial.jpg.mjs +2 -2
  192. package/lib/components/ModelCompareV3/assets/Switching/industrial.jpg.js +1 -1
  193. package/lib/components/ModelCompareV3/assets/Switching/industrial.jpg.mjs +2 -2
  194. package/lib/components/ModelCompareV3/data/CloudGateways.js +12 -12
  195. package/lib/components/ModelCompareV3/data/CloudGateways.mjs +8 -8
  196. package/lib/components/ModelCompareV3/data/index.d.ts +17 -18
  197. package/lib/components/ModelCompareV3/data/index.js +34 -37
  198. package/lib/components/ModelCompareV3/data/index.js.map +1 -1
  199. package/lib/components/ModelCompareV3/data/index.mjs +34 -37
  200. package/lib/components/ModelCompareV3/data/index.mjs.map +1 -1
  201. package/lib/components/ModelCompareV3/data/products/industrial.js +1 -1
  202. package/lib/components/ModelCompareV3/data/products/industrial.mjs +1 -1
  203. package/lib/components/ModelCompareV3/data/products/ucgMax.js +1 -1
  204. package/lib/components/ModelCompareV3/data/products/ucgMax.mjs +1 -1
  205. package/lib/components/ModelCompareV3/data/products/ucgUltra.js +1 -1
  206. package/lib/components/ModelCompareV3/data/products/ucgUltra.mjs +1 -1
  207. package/lib/components/ModelCompareV3/data/products/udmProMax.js +1 -1
  208. package/lib/components/ModelCompareV3/data/products/udmProMax.mjs +1 -1
  209. package/lib/components/ModelCompareV3/data/products/udmProSpecial.js +1 -1
  210. package/lib/components/ModelCompareV3/data/products/udmProSpecial.mjs +1 -1
  211. package/lib/components/ModelCompareV3/data/products/udw.js +0 -1
  212. package/lib/components/ModelCompareV3/data/products/udw.js.map +1 -1
  213. package/lib/components/ModelCompareV3/data/products/udw.mjs +0 -1
  214. package/lib/components/ModelCompareV3/data/products/udw.mjs.map +1 -1
  215. package/lib/components/ModelCompareV3/translations/en.json.js +7 -60
  216. package/lib/components/ModelCompareV3/translations/en.json.js.map +1 -1
  217. package/lib/components/ModelCompareV3/translations/en.json.mjs +7 -60
  218. package/lib/components/ModelCompareV3/translations/en.json.mjs.map +1 -1
  219. package/lib/components/ModelCompareV3/translations/useModelCompareTranslation.d.ts +2 -2
  220. package/lib/components/ProductCardPopup/ProductCardPopup.styles.d.ts +1 -1
  221. package/lib/components/ProductGrid/ProductGrid.styles.d.ts +1 -1
  222. package/lib/components/ProductRecommendedAccessories/ProductRecommendedAccessories.styles.d.ts +3 -3
  223. package/lib/components/ProductSectionNavigation/ProductSectionNavigation.styles.d.ts +1 -1
  224. package/lib/components/ProductSectionNavigationV2/ProductSectionNavigation.styles.d.ts +1 -1
  225. package/lib/components/ProductTechSpecs/ProductTechSpecs.styles.d.ts +1 -1
  226. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.js +17 -313
  227. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.js.map +1 -1
  228. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.mjs +17 -311
  229. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.constants.mjs.map +1 -1
  230. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.d.ts +2 -3
  231. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.js +0 -2
  232. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.js.map +1 -1
  233. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.mjs +0 -2
  234. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/ComputeResourceCalculator.types.mjs.map +1 -1
  235. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.js +34 -120
  236. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.js.map +1 -1
  237. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.mjs +34 -120
  238. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.mjs.map +1 -1
  239. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.d.ts +2 -16
  240. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.js +12 -54
  241. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.js.map +1 -1
  242. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.mjs +11 -50
  243. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/DeviceSelect.styles.mjs.map +1 -1
  244. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/assets/ArrowLeftPrimary.svg.js +5 -5
  245. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/DeviceSelect/assets/ArrowRightPrimary.svg.js +5 -5
  246. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js +1 -1
  247. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.js.map +1 -1
  248. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs +1 -1
  249. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.mjs.map +1 -1
  250. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.js +0 -2
  251. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.js.map +1 -1
  252. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.mjs +0 -2
  253. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/components/InputCard/InputCard.styles.mjs.map +1 -1
  254. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.js +1 -1
  255. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.js.map +1 -1
  256. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.mjs +1 -1
  257. package/lib/components/ResourceCalculatorV1/ComputeResourceCalculator/useComputeResourceCalculator.mjs.map +1 -1
  258. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js +2 -2
  259. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.js.map +1 -1
  260. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs +2 -2
  261. package/lib/components/ResourceCalculatorV1/PoeCalculator/components/PoeConsumerConfigurator/PoeConsumerSelectModal/PoeConsumerSelectModal.mjs.map +1 -1
  262. package/lib/components/ResourceCalculatorV1/ResourceCalculator.js +2 -1
  263. package/lib/components/ResourceCalculatorV1/ResourceCalculator.js.map +1 -1
  264. package/lib/components/ResourceCalculatorV1/ResourceCalculator.mjs +2 -1
  265. package/lib/components/ResourceCalculatorV1/ResourceCalculator.mjs.map +1 -1
  266. package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/HorizontalOptionSelect.d.ts +1 -1
  267. package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/HorizontalOptionSelect.js +1 -3
  268. package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.js.map +1 -0
  269. package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/HorizontalOptionSelect.mjs +1 -3
  270. package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.mjs.map +1 -0
  271. package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/HorizontalOptionSelect.styles.d.ts +0 -1
  272. package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/HorizontalOptionSelect.styles.js +7 -10
  273. package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.js.map +1 -0
  274. package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/HorizontalOptionSelect.styles.mjs +7 -10
  275. package/lib/components/ResourceCalculatorV1/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.mjs.map +1 -0
  276. package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/HorizontalOptionSelect.types.d.ts +0 -1
  277. package/lib/components/ResourceCalculatorV1/components/index.d.ts +1 -0
  278. package/lib/components/ResourceCalculatorV1/components/index.js +5 -0
  279. package/lib/components/{Header/Navigation/ProMenu → ResourceCalculatorV1/components}/index.js.map +1 -1
  280. package/lib/components/{MicrositeHeader/components/Navigation → ResourceCalculatorV1/components}/index.mjs +1 -1
  281. package/lib/components/ResourceCalculatorV1/translations/en.json.js +4 -6
  282. package/lib/components/ResourceCalculatorV1/translations/en.json.js.map +1 -1
  283. package/lib/components/ResourceCalculatorV1/translations/en.json.mjs +4 -6
  284. package/lib/components/ResourceCalculatorV1/translations/en.json.mjs.map +1 -1
  285. package/lib/components/ResourceCalculatorV1/translations/useResourceCalculatorTranslation.d.ts +2 -2
  286. package/lib/components/Search/Input/Input.js +1 -1
  287. package/lib/components/Search/Input/Input.mjs +1 -1
  288. package/lib/components/Tooltip/Tooltip.styles.d.ts +5 -5
  289. package/lib/components/VariantSelectorV1/VariantSelector.styles.d.ts +3 -3
  290. package/lib/components/VariantSelectorV2/VariantSelector.styles.d.ts +3 -3
  291. package/lib/components/VideoPlayerNew/VideoPlayer.js +1 -1
  292. package/lib/components/VideoPlayerNew/VideoPlayer.mjs +1 -1
  293. package/lib/components/VideoPlayerNew/assets/close.svg.js +1 -1
  294. package/lib/components/VideoPlayerNew/assets/close.svg.mjs +2 -2
  295. package/lib/components/index.d.ts +0 -2
  296. package/lib/components/index.js +30 -34
  297. package/lib/components/index.js.map +1 -1
  298. package/lib/components/index.mjs +30 -34
  299. package/lib/components/index.mjs.map +1 -1
  300. package/lib/constants/icons/generic/carouselArrowRight.svg.js +5 -5
  301. package/lib/constants/icons/generic/close.svg.js +1 -1
  302. package/lib/constants/icons/generic/close.svg.mjs +2 -2
  303. package/lib/constants/icons/generic/index.js +4 -4
  304. package/lib/constants/icons/generic/index.mjs +1 -1
  305. package/lib/constants/icons/header/account.svg.js +5 -5
  306. package/lib/constants/icons/header/globe.svg.js +5 -5
  307. package/lib/constants/icons/header/index.js +9 -9
  308. package/lib/constants/icons/header/logoUnifi.svg.js +5 -5
  309. package/lib/constants/icons/menu/index.d.ts +0 -3
  310. package/lib/constants/icons/menu/index.js +0 -27
  311. package/lib/constants/icons/menu/index.js.map +1 -1
  312. package/lib/constants/icons/menu/index.mjs +0 -6
  313. package/lib/constants/icons/menu/index.mjs.map +1 -1
  314. package/lib/constants/icons/options/colors/black.svg.js +5 -5
  315. package/lib/constants/icons/options/colors/index.js +3 -3
  316. package/lib/constants/icons/options/styles/black.svg.js +5 -5
  317. package/lib/constants/icons/options/styles/index.js +3 -3
  318. package/lib/constants/optionIcons.js +6 -6
  319. package/lib/constants/optionIcons.mjs +4 -4
  320. package/lib/constants/proStoreCategories/mapping/index.d.ts +0 -1
  321. package/lib/constants/proStoreCategories/mapping/index.js +49 -54
  322. package/lib/constants/proStoreCategories/mapping/index.js.map +1 -1
  323. package/lib/constants/proStoreCategories/mapping/index.mjs +49 -54
  324. package/lib/constants/proStoreCategories/mapping/index.mjs.map +1 -1
  325. package/lib/constants/proStoreCategories/mapping/unifi.d.ts +1 -2
  326. package/lib/constants/proStoreCategories/mapping/unifi.js +0 -1
  327. package/lib/constants/proStoreCategories/mapping/unifi.js.map +1 -1
  328. package/lib/constants/proStoreCategories/mapping/unifi.mjs +0 -1
  329. package/lib/constants/proStoreCategories/mapping/unifi.mjs.map +1 -1
  330. package/lib/constants/proStoreCategories/translations/en.json.js +0 -3
  331. package/lib/constants/proStoreCategories/translations/en.json.js.map +1 -1
  332. package/lib/constants/proStoreCategories/translations/en.json.mjs +1 -3
  333. package/lib/constants/proStoreCategories/translations/en.json.mjs.map +1 -1
  334. package/lib/constants/proStoreCategories/translations/fr.json.js +1 -1
  335. package/lib/constants/proStoreCategories/translations/fr.json.mjs +1 -1
  336. package/lib/constants/proStoreCategories/translations/zh-Hans.json.js +1 -1
  337. package/lib/constants/proStoreCategories/translations/zh-Hans.json.mjs +1 -1
  338. package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.js +1 -1
  339. package/lib/constants/proStoreCategories/translations/zh-Hant-TW.json.mjs +1 -1
  340. package/lib/constants/theme.js +0 -4
  341. package/lib/constants/theme.js.map +1 -1
  342. package/lib/constants/theme.mjs +0 -4
  343. package/lib/constants/theme.mjs.map +1 -1
  344. package/lib/contexts/MenuContext/context.js +1 -1
  345. package/lib/contexts/MenuContext/context.js.map +1 -1
  346. package/lib/contexts/MenuContext/context.mjs +1 -1
  347. package/lib/contexts/MenuContext/context.mjs.map +1 -1
  348. package/lib/contexts/MenuContext/types.js.map +1 -1
  349. package/lib/contexts/MenuContext/types.mjs.map +1 -1
  350. package/lib/contexts/MenuContext/utils.d.ts +1 -6
  351. package/lib/contexts/MenuContext/utils.js +0 -16
  352. package/lib/contexts/MenuContext/utils.js.map +1 -1
  353. package/lib/contexts/MenuContext/utils.mjs +1 -16
  354. package/lib/contexts/MenuContext/utils.mjs.map +1 -1
  355. package/lib/contexts/index.d.ts +0 -1
  356. package/lib/contexts/index.js +0 -2
  357. package/lib/contexts/index.js.map +1 -1
  358. package/lib/contexts/index.mjs +0 -2
  359. package/lib/contexts/index.mjs.map +1 -1
  360. package/lib/helpers/index.d.ts +0 -1
  361. package/lib/helpers/index.js +0 -11
  362. package/lib/helpers/index.js.map +1 -1
  363. package/lib/helpers/index.mjs +0 -1
  364. package/lib/helpers/index.mjs.map +1 -1
  365. package/lib/helpers/ux.d.ts +1 -9
  366. package/lib/helpers/ux.js +0 -15
  367. package/lib/helpers/ux.js.map +1 -1
  368. package/lib/helpers/ux.mjs +1 -15
  369. package/lib/helpers/ux.mjs.map +1 -1
  370. package/lib/types/index.d.ts +0 -1
  371. package/lib/types/index.js +0 -2
  372. package/lib/types/index.js.map +1 -1
  373. package/lib/types/index.mjs +0 -1
  374. package/lib/types/index.mjs.map +1 -1
  375. package/lib/utils/array.d.ts +0 -4
  376. package/lib/utils/array.js +0 -10
  377. package/lib/utils/array.js.map +1 -1
  378. package/lib/utils/array.mjs +1 -10
  379. package/lib/utils/array.mjs.map +1 -1
  380. package/lib/utils/money/constants.d.ts +25 -56
  381. package/lib/utils/money/constants.js +7 -72
  382. package/lib/utils/money/constants.js.map +1 -1
  383. package/lib/utils/money/constants.mjs +7 -70
  384. package/lib/utils/money/constants.mjs.map +1 -1
  385. package/lib/utils/money/format.d.ts +5 -10
  386. package/lib/utils/money/format.js +14 -22
  387. package/lib/utils/money/format.js.map +1 -1
  388. package/lib/utils/money/format.mjs +16 -23
  389. package/lib/utils/money/format.mjs.map +1 -1
  390. package/lib/utils/money/index.d.ts +1 -4
  391. package/lib/utils/money/index.js +8 -26
  392. package/lib/utils/money/index.js.map +1 -1
  393. package/lib/utils/money/index.mjs +4 -8
  394. package/lib/utils/money/index.mjs.map +1 -1
  395. package/lib/utils/money/misc.d.ts +28 -68
  396. package/lib/utils/money/misc.js +64 -35
  397. package/lib/utils/money/misc.js.map +1 -1
  398. package/lib/utils/money/misc.mjs +43 -32
  399. package/lib/utils/money/misc.mjs.map +1 -1
  400. package/lib/utils/money/tax.d.ts +2 -38
  401. package/lib/utils/money/tax.js +10 -46
  402. package/lib/utils/money/tax.js.map +1 -1
  403. package/lib/utils/money/tax.mjs +11 -42
  404. package/lib/utils/money/tax.mjs.map +1 -1
  405. package/lib/utils/money/types.d.ts +3 -78
  406. package/lib/utils/number.d.ts +1 -1
  407. package/lib/utils/number.js +1 -1
  408. package/lib/utils/number.js.map +1 -1
  409. package/lib/utils/number.mjs +1 -1
  410. package/lib/utils/number.mjs.map +1 -1
  411. package/lib/utils/validations.d.ts +15 -0
  412. package/lib/utils/validations.js +23 -0
  413. package/lib/utils/validations.js.map +1 -0
  414. package/lib/utils/validations.mjs +21 -0
  415. package/lib/utils/validations.mjs.map +1 -0
  416. package/package.json +10 -10
  417. package/lib/assets/aggregation.png +0 -0
  418. package/lib/assets/bullet.png +0 -0
  419. package/lib/assets/camera-special-devices.png +0 -0
  420. package/lib/assets/cloud-gateway-overview.png +0 -0
  421. package/lib/assets/compact-switching.png +0 -0
  422. package/lib/assets/compact.png +0 -0
  423. package/lib/assets/consolidatedSpecialDevices.svg +0 -5
  424. package/lib/assets/digital-signage.png +0 -0
  425. package/lib/assets/dome-turret.png +0 -0
  426. package/lib/assets/door-access.png +0 -0
  427. package/lib/assets/doorAccess.svg +0 -5
  428. package/lib/assets/education.jpg +0 -0
  429. package/lib/assets/efg.png +0 -0
  430. package/lib/assets/enterprise-scale.png +0 -0
  431. package/lib/assets/enterprise.jpg +0 -0
  432. package/lib/assets/ev-charging.png +0 -0
  433. package/lib/assets/flagship.jpg +0 -0
  434. package/lib/assets/flexible-outdoor.jpg +0 -0
  435. package/lib/assets/gbe-1u-2.5and10.png +0 -0
  436. package/lib/assets/gbe-1u.png +0 -0
  437. package/lib/assets/hospitality.jpg +0 -0
  438. package/lib/assets/how-it-works.jpg +0 -0
  439. package/lib/assets/icon-location-pin.svg +0 -5
  440. package/lib/assets/icons/arrowDown.svg.mjs +0 -3
  441. package/lib/assets/icons/menu/icon-location-pin.svg.js +0 -27
  442. package/lib/assets/icons/menu/icon-location-pin.svg.js.map +0 -1
  443. package/lib/assets/icons/menu/icon-location-pin.svg.mjs +0 -3
  444. package/lib/assets/icons/menu/icon-location-pin.svg.mjs.map +0 -1
  445. package/lib/assets/icons/zoomOut.svg.js +0 -27
  446. package/lib/assets/icons/zoomOut.svg.js.map +0 -1
  447. package/lib/assets/icons/zoomOut.svg.mjs +0 -3
  448. package/lib/assets/icons/zoomOut.svg.mjs.map +0 -1
  449. package/lib/assets/industrial2.jpg +0 -0
  450. package/lib/assets/large-scale.png +0 -0
  451. package/lib/assets/managed-voip.png +0 -0
  452. package/lib/assets/mega-capacity.jpg +0 -0
  453. package/lib/assets/mobile-routing.png +0 -0
  454. package/lib/assets/nextai-camera.jpg +0 -0
  455. package/lib/assets/nextai-cyber.jpg +0 -0
  456. package/lib/assets/overview.svg +0 -3
  457. package/lib/assets/premium-audio.png +0 -0
  458. package/lib/assets/ptz.png +0 -0
  459. package/lib/assets/retail.jpg +0 -0
  460. package/lib/assets/sd-wan-sase.jpg +0 -0
  461. package/lib/assets/security-overview.png +0 -0
  462. package/lib/assets/site-manager.jpg +0 -0
  463. package/lib/assets/stadium.jpg +0 -0
  464. package/lib/assets/switching-overview.png +0 -0
  465. package/lib/assets/tco-calculator.jpg +0 -0
  466. package/lib/assets/ucg-max.png +0 -0
  467. package/lib/assets/unifi-drive.png +0 -0
  468. package/lib/assets/video-recorders.png +0 -0
  469. package/lib/assets/wall.jpg +0 -0
  470. package/lib/assets/wifi-bridging.png +0 -0
  471. package/lib/assets/wifi-flagship.png +0 -0
  472. package/lib/assets/wifi-integrated.png +0 -0
  473. package/lib/assets/wifi-mega-capacity.png +0 -0
  474. package/lib/assets/wifi-outdoor.png +0 -0
  475. package/lib/assets/wifi-overview.png +0 -0
  476. package/lib/assets/wifi-wall.png +0 -0
  477. package/lib/assets/zoomOut.svg +0 -3
  478. package/lib/components/Header/Navigation/ProMenu/ProMenu.d.ts +0 -2
  479. package/lib/components/Header/Navigation/ProMenu/ProMenu.js +0 -103
  480. package/lib/components/Header/Navigation/ProMenu/ProMenu.js.map +0 -1
  481. package/lib/components/Header/Navigation/ProMenu/ProMenu.mjs +0 -81
  482. package/lib/components/Header/Navigation/ProMenu/ProMenu.mjs.map +0 -1
  483. package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.d.ts +0 -23
  484. package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.js +0 -121
  485. package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.js.map +0 -1
  486. package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.mjs +0 -106
  487. package/lib/components/Header/Navigation/ProMenu/ProMenu.styles.mjs.map +0 -1
  488. package/lib/components/Header/Navigation/ProMenu/ProMenu.types.d.ts +0 -12
  489. package/lib/components/Header/Navigation/ProMenu/index.d.ts +0 -1
  490. package/lib/components/Header/Navigation/ProMenu/index.js +0 -6
  491. package/lib/components/Header/Navigation/ProMenu/index.mjs +0 -3
  492. package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.js.map +0 -1
  493. package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.mjs.map +0 -1
  494. package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.js.map +0 -1
  495. package/lib/components/HorizontalOptionSelect/HorizontalOptionSelect.styles.mjs.map +0 -1
  496. package/lib/components/MicrositeHeader/MicrositeHeader.d.ts +0 -2
  497. package/lib/components/MicrositeHeader/MicrositeHeader.js +0 -28
  498. package/lib/components/MicrositeHeader/MicrositeHeader.js.map +0 -1
  499. package/lib/components/MicrositeHeader/MicrositeHeader.mjs +0 -26
  500. package/lib/components/MicrositeHeader/MicrositeHeader.mjs.map +0 -1
  501. package/lib/components/MicrositeHeader/MicrositeHeader.styles.d.ts +0 -2
  502. package/lib/components/MicrositeHeader/MicrositeHeader.types.d.ts +0 -5
  503. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.d.ts +0 -2
  504. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.js +0 -139
  505. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.js.map +0 -1
  506. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.mjs +0 -130
  507. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.mjs.map +0 -1
  508. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.styles.d.ts +0 -59
  509. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.styles.js +0 -424
  510. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.styles.js.map +0 -1
  511. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.styles.mjs +0 -389
  512. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.styles.mjs.map +0 -1
  513. package/lib/components/MicrositeHeader/components/DropdownMenu/DropdownMenu.types.d.ts +0 -21
  514. package/lib/components/MicrositeHeader/components/DropdownMenu/index.d.ts +0 -1
  515. package/lib/components/MicrositeHeader/components/DropdownMenu/index.js +0 -6
  516. package/lib/components/MicrositeHeader/components/DropdownMenu/index.js.map +0 -1
  517. package/lib/components/MicrositeHeader/components/DropdownMenu/index.mjs +0 -3
  518. package/lib/components/MicrositeHeader/components/DropdownMenu/index.mjs.map +0 -1
  519. package/lib/components/MicrositeHeader/components/FirstLevelMenu/FirstLevelMenu.d.ts +0 -2
  520. package/lib/components/MicrositeHeader/components/FirstLevelMenu/FirstLevelMenu.styles.d.ts +0 -22
  521. package/lib/components/MicrositeHeader/components/FirstLevelMenu/FirstLevelMenu.styles.js +0 -148
  522. package/lib/components/MicrositeHeader/components/FirstLevelMenu/FirstLevelMenu.styles.js.map +0 -1
  523. package/lib/components/MicrositeHeader/components/FirstLevelMenu/FirstLevelMenu.styles.mjs +0 -126
  524. package/lib/components/MicrositeHeader/components/FirstLevelMenu/FirstLevelMenu.styles.mjs.map +0 -1
  525. package/lib/components/MicrositeHeader/components/FirstLevelMenu/FirstLevelMenu.types.d.ts +0 -10
  526. package/lib/components/MicrositeHeader/components/FirstLevelMenu/index.d.ts +0 -1
  527. package/lib/components/MicrositeHeader/components/Navigation/Navigation.d.ts +0 -3
  528. package/lib/components/MicrositeHeader/components/Navigation/Navigation.js +0 -224
  529. package/lib/components/MicrositeHeader/components/Navigation/Navigation.js.map +0 -1
  530. package/lib/components/MicrositeHeader/components/Navigation/Navigation.mjs +0 -214
  531. package/lib/components/MicrositeHeader/components/Navigation/Navigation.mjs.map +0 -1
  532. package/lib/components/MicrositeHeader/components/Navigation/Navigation.styles.d.ts +0 -36
  533. package/lib/components/MicrositeHeader/components/Navigation/Navigation.styles.js +0 -232
  534. package/lib/components/MicrositeHeader/components/Navigation/Navigation.styles.js.map +0 -1
  535. package/lib/components/MicrositeHeader/components/Navigation/Navigation.styles.mjs +0 -210
  536. package/lib/components/MicrositeHeader/components/Navigation/Navigation.styles.mjs.map +0 -1
  537. package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/NavigationItem.d.ts +0 -8
  538. package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/NavigationItem.js +0 -47
  539. package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/NavigationItem.js.map +0 -1
  540. package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/NavigationItem.mjs +0 -39
  541. package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/NavigationItem.mjs.map +0 -1
  542. package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/index.d.ts +0 -1
  543. package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/index.js +0 -6
  544. package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/index.js.map +0 -1
  545. package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/index.mjs +0 -3
  546. package/lib/components/MicrositeHeader/components/Navigation/_components/NavigationItem/index.mjs.map +0 -1
  547. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.d.ts +0 -5
  548. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.js +0 -92
  549. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.js.map +0 -1
  550. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.mjs +0 -84
  551. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.mjs.map +0 -1
  552. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.styles.d.ts +0 -32
  553. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.styles.js +0 -230
  554. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.styles.js.map +0 -1
  555. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.styles.mjs +0 -206
  556. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/SubNavigation.styles.mjs.map +0 -1
  557. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/index.d.ts +0 -1
  558. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/index.js +0 -6
  559. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/index.js.map +0 -1
  560. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/index.mjs +0 -3
  561. package/lib/components/MicrositeHeader/components/Navigation/_components/SubNavigation/index.mjs.map +0 -1
  562. package/lib/components/MicrositeHeader/components/Navigation/index.d.ts +0 -1
  563. package/lib/components/MicrositeHeader/components/Navigation/index.js +0 -6
  564. package/lib/components/MicrositeHeader/components/Navigation/index.js.map +0 -1
  565. package/lib/components/MicrositeHeader/components/Navigation/index.mjs.map +0 -1
  566. package/lib/components/MicrositeHeader/components/SecondLevelMenu/SecondLevelMenu.d.ts +0 -2
  567. package/lib/components/MicrositeHeader/components/SecondLevelMenu/SecondLevelMenu.styles.d.ts +0 -13
  568. package/lib/components/MicrositeHeader/components/SecondLevelMenu/SecondLevelMenu.types.d.ts +0 -11
  569. package/lib/components/MicrositeHeader/components/SecondLevelMenu/index.d.ts +0 -1
  570. package/lib/components/MicrositeHeader/components/SiteMapColumns/SiteMapColumns.d.ts +0 -17
  571. package/lib/components/MicrositeHeader/components/SiteMapColumns/SiteMapColumns.styles.d.ts +0 -13
  572. package/lib/components/MicrositeHeader/components/SiteMapColumns/index.d.ts +0 -1
  573. package/lib/components/MicrositeHeader/index.d.ts +0 -1
  574. package/lib/components/MicrositeHeader/index.js +0 -6
  575. package/lib/components/MicrositeHeader/index.js.map +0 -1
  576. package/lib/components/MicrositeHeader/index.mjs +0 -3
  577. package/lib/components/MicrositeHeader/index.mjs.map +0 -1
  578. package/lib/components/ModelCompareV3/assets/WiFi/flagship.jpg.js +0 -27
  579. package/lib/components/ModelCompareV3/assets/WiFi/flagship.jpg.js.map +0 -1
  580. package/lib/components/ModelCompareV3/assets/WiFi/flagship.jpg.mjs +0 -3
  581. package/lib/components/ModelCompareV3/assets/WiFi/flagship.jpg.mjs.map +0 -1
  582. package/lib/components/ModelCompareV3/assets/WiFi/flexible-outdoor.jpg.js +0 -27
  583. package/lib/components/ModelCompareV3/assets/WiFi/flexible-outdoor.jpg.js.map +0 -1
  584. package/lib/components/ModelCompareV3/assets/WiFi/flexible-outdoor.jpg.mjs +0 -3
  585. package/lib/components/ModelCompareV3/assets/WiFi/flexible-outdoor.jpg.mjs.map +0 -1
  586. package/lib/components/ModelCompareV3/assets/WiFi/mega-capacity.jpg.js.map +0 -1
  587. package/lib/components/ModelCompareV3/assets/WiFi/mega-capacity.jpg.mjs +0 -3
  588. package/lib/components/ModelCompareV3/assets/WiFi/mega-capacity.jpg.mjs.map +0 -1
  589. package/lib/components/ModelCompareV3/assets/WiFi/wall.jpg.js +0 -27
  590. package/lib/components/ModelCompareV3/assets/WiFi/wall.jpg.js.map +0 -1
  591. package/lib/components/ModelCompareV3/assets/WiFi/wall.jpg.mjs +0 -3
  592. package/lib/components/ModelCompareV3/assets/WiFi/wall.jpg.mjs.map +0 -1
  593. package/lib/components/ModelCompareV3/data/WiFi.d.ts +0 -2
  594. package/lib/components/ModelCompareV3/data/WiFi.js +0 -23
  595. package/lib/components/ModelCompareV3/data/WiFi.js.map +0 -1
  596. package/lib/components/ModelCompareV3/data/WiFi.mjs +0 -21
  597. package/lib/components/ModelCompareV3/data/WiFi.mjs.map +0 -1
  598. package/lib/components/ModelCompareV3/data/products/wifiFlagship.d.ts +0 -2
  599. package/lib/components/ModelCompareV3/data/products/wifiFlagship.js +0 -70
  600. package/lib/components/ModelCompareV3/data/products/wifiFlagship.js.map +0 -1
  601. package/lib/components/ModelCompareV3/data/products/wifiFlagship.mjs +0 -62
  602. package/lib/components/ModelCompareV3/data/products/wifiFlagship.mjs.map +0 -1
  603. package/lib/components/ModelCompareV3/data/products/wifiFlexibleOutdoor.d.ts +0 -2
  604. package/lib/components/ModelCompareV3/data/products/wifiFlexibleOutdoor.js +0 -73
  605. package/lib/components/ModelCompareV3/data/products/wifiFlexibleOutdoor.js.map +0 -1
  606. package/lib/components/ModelCompareV3/data/products/wifiFlexibleOutdoor.mjs +0 -65
  607. package/lib/components/ModelCompareV3/data/products/wifiFlexibleOutdoor.mjs.map +0 -1
  608. package/lib/components/ModelCompareV3/data/products/wifiMegaCapacity.d.ts +0 -2
  609. package/lib/components/ModelCompareV3/data/products/wifiMegaCapacity.js +0 -73
  610. package/lib/components/ModelCompareV3/data/products/wifiMegaCapacity.js.map +0 -1
  611. package/lib/components/ModelCompareV3/data/products/wifiMegaCapacity.mjs +0 -65
  612. package/lib/components/ModelCompareV3/data/products/wifiMegaCapacity.mjs.map +0 -1
  613. package/lib/components/ModelCompareV3/data/products/wifiWall.d.ts +0 -2
  614. package/lib/components/ModelCompareV3/data/products/wifiWall.js +0 -74
  615. package/lib/components/ModelCompareV3/data/products/wifiWall.js.map +0 -1
  616. package/lib/components/ModelCompareV3/data/products/wifiWall.mjs +0 -66
  617. package/lib/components/ModelCompareV3/data/products/wifiWall.mjs.map +0 -1
  618. package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.js +0 -27
  619. package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.js.map +0 -1
  620. package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.mjs +0 -3
  621. package/lib/components/ResourceCalculatorV1/assets/consoles/efg.png.mjs.map +0 -1
  622. package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.js +0 -27
  623. package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.js.map +0 -1
  624. package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.mjs +0 -3
  625. package/lib/components/ResourceCalculatorV1/assets/consoles/ucg-max.png.mjs.map +0 -1
  626. package/lib/constants/icons/menu/consolidatedSpecialDevices.svg.js +0 -27
  627. package/lib/constants/icons/menu/consolidatedSpecialDevices.svg.js.map +0 -1
  628. package/lib/constants/icons/menu/consolidatedSpecialDevices.svg.mjs +0 -3
  629. package/lib/constants/icons/menu/consolidatedSpecialDevices.svg.mjs.map +0 -1
  630. package/lib/constants/icons/menu/doorAccess.svg.js +0 -27
  631. package/lib/constants/icons/menu/doorAccess.svg.js.map +0 -1
  632. package/lib/constants/icons/menu/doorAccess.svg.mjs +0 -3
  633. package/lib/constants/icons/menu/doorAccess.svg.mjs.map +0 -1
  634. package/lib/constants/icons/menu/overview.svg.js +0 -27
  635. package/lib/constants/icons/menu/overview.svg.js.map +0 -1
  636. package/lib/constants/icons/menu/overview.svg.mjs +0 -3
  637. package/lib/constants/icons/menu/overview.svg.mjs.map +0 -1
  638. package/lib/contexts/MicrositeMenuContext/assets/aggregation.png.js +0 -27
  639. package/lib/contexts/MicrositeMenuContext/assets/aggregation.png.js.map +0 -1
  640. package/lib/contexts/MicrositeMenuContext/assets/aggregation.png.mjs +0 -3
  641. package/lib/contexts/MicrositeMenuContext/assets/aggregation.png.mjs.map +0 -1
  642. package/lib/contexts/MicrositeMenuContext/assets/bullet.png.js +0 -27
  643. package/lib/contexts/MicrositeMenuContext/assets/bullet.png.js.map +0 -1
  644. package/lib/contexts/MicrositeMenuContext/assets/bullet.png.mjs +0 -3
  645. package/lib/contexts/MicrositeMenuContext/assets/bullet.png.mjs.map +0 -1
  646. package/lib/contexts/MicrositeMenuContext/assets/camera-special-devices.png.js +0 -27
  647. package/lib/contexts/MicrositeMenuContext/assets/camera-special-devices.png.js.map +0 -1
  648. package/lib/contexts/MicrositeMenuContext/assets/camera-special-devices.png.mjs +0 -3
  649. package/lib/contexts/MicrositeMenuContext/assets/camera-special-devices.png.mjs.map +0 -1
  650. package/lib/contexts/MicrositeMenuContext/assets/cloud-gateway-overview.png.js +0 -27
  651. package/lib/contexts/MicrositeMenuContext/assets/cloud-gateway-overview.png.js.map +0 -1
  652. package/lib/contexts/MicrositeMenuContext/assets/cloud-gateway-overview.png.mjs +0 -3
  653. package/lib/contexts/MicrositeMenuContext/assets/cloud-gateway-overview.png.mjs.map +0 -1
  654. package/lib/contexts/MicrositeMenuContext/assets/compact-switching.png.js +0 -27
  655. package/lib/contexts/MicrositeMenuContext/assets/compact-switching.png.js.map +0 -1
  656. package/lib/contexts/MicrositeMenuContext/assets/compact-switching.png.mjs +0 -3
  657. package/lib/contexts/MicrositeMenuContext/assets/compact-switching.png.mjs.map +0 -1
  658. package/lib/contexts/MicrositeMenuContext/assets/compact.png.js +0 -27
  659. package/lib/contexts/MicrositeMenuContext/assets/compact.png.js.map +0 -1
  660. package/lib/contexts/MicrositeMenuContext/assets/compact.png.mjs +0 -3
  661. package/lib/contexts/MicrositeMenuContext/assets/compact.png.mjs.map +0 -1
  662. package/lib/contexts/MicrositeMenuContext/assets/digital-signage.png.js +0 -27
  663. package/lib/contexts/MicrositeMenuContext/assets/digital-signage.png.js.map +0 -1
  664. package/lib/contexts/MicrositeMenuContext/assets/digital-signage.png.mjs +0 -3
  665. package/lib/contexts/MicrositeMenuContext/assets/digital-signage.png.mjs.map +0 -1
  666. package/lib/contexts/MicrositeMenuContext/assets/dome-turret.png.js +0 -27
  667. package/lib/contexts/MicrositeMenuContext/assets/dome-turret.png.js.map +0 -1
  668. package/lib/contexts/MicrositeMenuContext/assets/dome-turret.png.mjs +0 -3
  669. package/lib/contexts/MicrositeMenuContext/assets/dome-turret.png.mjs.map +0 -1
  670. package/lib/contexts/MicrositeMenuContext/assets/door-access.png.js +0 -27
  671. package/lib/contexts/MicrositeMenuContext/assets/door-access.png.js.map +0 -1
  672. package/lib/contexts/MicrositeMenuContext/assets/door-access.png.mjs +0 -3
  673. package/lib/contexts/MicrositeMenuContext/assets/door-access.png.mjs.map +0 -1
  674. package/lib/contexts/MicrositeMenuContext/assets/education.jpg.js +0 -27
  675. package/lib/contexts/MicrositeMenuContext/assets/education.jpg.js.map +0 -1
  676. package/lib/contexts/MicrositeMenuContext/assets/education.jpg.mjs +0 -3
  677. package/lib/contexts/MicrositeMenuContext/assets/education.jpg.mjs.map +0 -1
  678. package/lib/contexts/MicrositeMenuContext/assets/enterprise-scale.png.js +0 -27
  679. package/lib/contexts/MicrositeMenuContext/assets/enterprise-scale.png.js.map +0 -1
  680. package/lib/contexts/MicrositeMenuContext/assets/enterprise-scale.png.mjs +0 -3
  681. package/lib/contexts/MicrositeMenuContext/assets/enterprise-scale.png.mjs.map +0 -1
  682. package/lib/contexts/MicrositeMenuContext/assets/enterprise.jpg.js +0 -27
  683. package/lib/contexts/MicrositeMenuContext/assets/enterprise.jpg.js.map +0 -1
  684. package/lib/contexts/MicrositeMenuContext/assets/enterprise.jpg.mjs +0 -3
  685. package/lib/contexts/MicrositeMenuContext/assets/enterprise.jpg.mjs.map +0 -1
  686. package/lib/contexts/MicrositeMenuContext/assets/ev-charging.png.js +0 -27
  687. package/lib/contexts/MicrositeMenuContext/assets/ev-charging.png.js.map +0 -1
  688. package/lib/contexts/MicrositeMenuContext/assets/ev-charging.png.mjs +0 -3
  689. package/lib/contexts/MicrositeMenuContext/assets/ev-charging.png.mjs.map +0 -1
  690. package/lib/contexts/MicrositeMenuContext/assets/gbe-1u-2.5and10.png.js +0 -27
  691. package/lib/contexts/MicrositeMenuContext/assets/gbe-1u-2.5and10.png.js.map +0 -1
  692. package/lib/contexts/MicrositeMenuContext/assets/gbe-1u-2.5and10.png.mjs +0 -3
  693. package/lib/contexts/MicrositeMenuContext/assets/gbe-1u-2.5and10.png.mjs.map +0 -1
  694. package/lib/contexts/MicrositeMenuContext/assets/gbe-1u.png.js +0 -27
  695. package/lib/contexts/MicrositeMenuContext/assets/gbe-1u.png.js.map +0 -1
  696. package/lib/contexts/MicrositeMenuContext/assets/gbe-1u.png.mjs +0 -3
  697. package/lib/contexts/MicrositeMenuContext/assets/gbe-1u.png.mjs.map +0 -1
  698. package/lib/contexts/MicrositeMenuContext/assets/hospitality.jpg.js +0 -27
  699. package/lib/contexts/MicrositeMenuContext/assets/hospitality.jpg.js.map +0 -1
  700. package/lib/contexts/MicrositeMenuContext/assets/hospitality.jpg.mjs +0 -3
  701. package/lib/contexts/MicrositeMenuContext/assets/hospitality.jpg.mjs.map +0 -1
  702. package/lib/contexts/MicrositeMenuContext/assets/how-it-works.jpg.js +0 -27
  703. package/lib/contexts/MicrositeMenuContext/assets/how-it-works.jpg.js.map +0 -1
  704. package/lib/contexts/MicrositeMenuContext/assets/how-it-works.jpg.mjs +0 -3
  705. package/lib/contexts/MicrositeMenuContext/assets/how-it-works.jpg.mjs.map +0 -1
  706. package/lib/contexts/MicrositeMenuContext/assets/index.d.ts +0 -41
  707. package/lib/contexts/MicrositeMenuContext/assets/index.js +0 -45
  708. package/lib/contexts/MicrositeMenuContext/assets/index.js.map +0 -1
  709. package/lib/contexts/MicrositeMenuContext/assets/index.mjs +0 -43
  710. package/lib/contexts/MicrositeMenuContext/assets/index.mjs.map +0 -1
  711. package/lib/contexts/MicrositeMenuContext/assets/industrial.jpg.js +0 -27
  712. package/lib/contexts/MicrositeMenuContext/assets/industrial.jpg.js.map +0 -1
  713. package/lib/contexts/MicrositeMenuContext/assets/industrial.jpg.mjs +0 -3
  714. package/lib/contexts/MicrositeMenuContext/assets/industrial.jpg.mjs.map +0 -1
  715. package/lib/contexts/MicrositeMenuContext/assets/large-scale.png.js +0 -27
  716. package/lib/contexts/MicrositeMenuContext/assets/large-scale.png.js.map +0 -1
  717. package/lib/contexts/MicrositeMenuContext/assets/large-scale.png.mjs +0 -3
  718. package/lib/contexts/MicrositeMenuContext/assets/large-scale.png.mjs.map +0 -1
  719. package/lib/contexts/MicrositeMenuContext/assets/managed-voip.png.js +0 -27
  720. package/lib/contexts/MicrositeMenuContext/assets/managed-voip.png.js.map +0 -1
  721. package/lib/contexts/MicrositeMenuContext/assets/managed-voip.png.mjs +0 -3
  722. package/lib/contexts/MicrositeMenuContext/assets/managed-voip.png.mjs.map +0 -1
  723. package/lib/contexts/MicrositeMenuContext/assets/mobile-routing.png.js +0 -27
  724. package/lib/contexts/MicrositeMenuContext/assets/mobile-routing.png.js.map +0 -1
  725. package/lib/contexts/MicrositeMenuContext/assets/mobile-routing.png.mjs +0 -3
  726. package/lib/contexts/MicrositeMenuContext/assets/mobile-routing.png.mjs.map +0 -1
  727. package/lib/contexts/MicrositeMenuContext/assets/nextai-camera.jpg.js +0 -27
  728. package/lib/contexts/MicrositeMenuContext/assets/nextai-camera.jpg.js.map +0 -1
  729. package/lib/contexts/MicrositeMenuContext/assets/nextai-camera.jpg.mjs +0 -3
  730. package/lib/contexts/MicrositeMenuContext/assets/nextai-camera.jpg.mjs.map +0 -1
  731. package/lib/contexts/MicrositeMenuContext/assets/nextai-cyber.jpg.js +0 -27
  732. package/lib/contexts/MicrositeMenuContext/assets/nextai-cyber.jpg.js.map +0 -1
  733. package/lib/contexts/MicrositeMenuContext/assets/nextai-cyber.jpg.mjs +0 -3
  734. package/lib/contexts/MicrositeMenuContext/assets/nextai-cyber.jpg.mjs.map +0 -1
  735. package/lib/contexts/MicrositeMenuContext/assets/premium-audio.png.js +0 -27
  736. package/lib/contexts/MicrositeMenuContext/assets/premium-audio.png.js.map +0 -1
  737. package/lib/contexts/MicrositeMenuContext/assets/premium-audio.png.mjs +0 -3
  738. package/lib/contexts/MicrositeMenuContext/assets/premium-audio.png.mjs.map +0 -1
  739. package/lib/contexts/MicrositeMenuContext/assets/ptz.png.js +0 -27
  740. package/lib/contexts/MicrositeMenuContext/assets/ptz.png.js.map +0 -1
  741. package/lib/contexts/MicrositeMenuContext/assets/ptz.png.mjs +0 -3
  742. package/lib/contexts/MicrositeMenuContext/assets/ptz.png.mjs.map +0 -1
  743. package/lib/contexts/MicrositeMenuContext/assets/retail.jpg.js +0 -27
  744. package/lib/contexts/MicrositeMenuContext/assets/retail.jpg.js.map +0 -1
  745. package/lib/contexts/MicrositeMenuContext/assets/retail.jpg.mjs +0 -3
  746. package/lib/contexts/MicrositeMenuContext/assets/retail.jpg.mjs.map +0 -1
  747. package/lib/contexts/MicrositeMenuContext/assets/sd-wan-sase.jpg.js +0 -27
  748. package/lib/contexts/MicrositeMenuContext/assets/sd-wan-sase.jpg.js.map +0 -1
  749. package/lib/contexts/MicrositeMenuContext/assets/sd-wan-sase.jpg.mjs +0 -3
  750. package/lib/contexts/MicrositeMenuContext/assets/sd-wan-sase.jpg.mjs.map +0 -1
  751. package/lib/contexts/MicrositeMenuContext/assets/security-overview.png.js +0 -27
  752. package/lib/contexts/MicrositeMenuContext/assets/security-overview.png.js.map +0 -1
  753. package/lib/contexts/MicrositeMenuContext/assets/security-overview.png.mjs +0 -3
  754. package/lib/contexts/MicrositeMenuContext/assets/security-overview.png.mjs.map +0 -1
  755. package/lib/contexts/MicrositeMenuContext/assets/site-manager.jpg.js +0 -27
  756. package/lib/contexts/MicrositeMenuContext/assets/site-manager.jpg.js.map +0 -1
  757. package/lib/contexts/MicrositeMenuContext/assets/site-manager.jpg.mjs +0 -3
  758. package/lib/contexts/MicrositeMenuContext/assets/site-manager.jpg.mjs.map +0 -1
  759. package/lib/contexts/MicrositeMenuContext/assets/stadium.jpg.js +0 -27
  760. package/lib/contexts/MicrositeMenuContext/assets/stadium.jpg.js.map +0 -1
  761. package/lib/contexts/MicrositeMenuContext/assets/stadium.jpg.mjs +0 -3
  762. package/lib/contexts/MicrositeMenuContext/assets/stadium.jpg.mjs.map +0 -1
  763. package/lib/contexts/MicrositeMenuContext/assets/switching-overview.png.js +0 -27
  764. package/lib/contexts/MicrositeMenuContext/assets/switching-overview.png.js.map +0 -1
  765. package/lib/contexts/MicrositeMenuContext/assets/switching-overview.png.mjs +0 -3
  766. package/lib/contexts/MicrositeMenuContext/assets/switching-overview.png.mjs.map +0 -1
  767. package/lib/contexts/MicrositeMenuContext/assets/tco-calculator.jpg.js +0 -27
  768. package/lib/contexts/MicrositeMenuContext/assets/tco-calculator.jpg.js.map +0 -1
  769. package/lib/contexts/MicrositeMenuContext/assets/tco-calculator.jpg.mjs +0 -3
  770. package/lib/contexts/MicrositeMenuContext/assets/tco-calculator.jpg.mjs.map +0 -1
  771. package/lib/contexts/MicrositeMenuContext/assets/unifi-drive.png.js +0 -27
  772. package/lib/contexts/MicrositeMenuContext/assets/unifi-drive.png.js.map +0 -1
  773. package/lib/contexts/MicrositeMenuContext/assets/unifi-drive.png.mjs +0 -3
  774. package/lib/contexts/MicrositeMenuContext/assets/unifi-drive.png.mjs.map +0 -1
  775. package/lib/contexts/MicrositeMenuContext/assets/video-recorders.png.js +0 -27
  776. package/lib/contexts/MicrositeMenuContext/assets/video-recorders.png.js.map +0 -1
  777. package/lib/contexts/MicrositeMenuContext/assets/video-recorders.png.mjs +0 -3
  778. package/lib/contexts/MicrositeMenuContext/assets/video-recorders.png.mjs.map +0 -1
  779. package/lib/contexts/MicrositeMenuContext/assets/wifi-bridging.png.js +0 -27
  780. package/lib/contexts/MicrositeMenuContext/assets/wifi-bridging.png.js.map +0 -1
  781. package/lib/contexts/MicrositeMenuContext/assets/wifi-bridging.png.mjs +0 -3
  782. package/lib/contexts/MicrositeMenuContext/assets/wifi-bridging.png.mjs.map +0 -1
  783. package/lib/contexts/MicrositeMenuContext/assets/wifi-flagship.png.js +0 -27
  784. package/lib/contexts/MicrositeMenuContext/assets/wifi-flagship.png.js.map +0 -1
  785. package/lib/contexts/MicrositeMenuContext/assets/wifi-flagship.png.mjs +0 -3
  786. package/lib/contexts/MicrositeMenuContext/assets/wifi-flagship.png.mjs.map +0 -1
  787. package/lib/contexts/MicrositeMenuContext/assets/wifi-integrated.png.js +0 -27
  788. package/lib/contexts/MicrositeMenuContext/assets/wifi-integrated.png.js.map +0 -1
  789. package/lib/contexts/MicrositeMenuContext/assets/wifi-integrated.png.mjs +0 -3
  790. package/lib/contexts/MicrositeMenuContext/assets/wifi-integrated.png.mjs.map +0 -1
  791. package/lib/contexts/MicrositeMenuContext/assets/wifi-mega-capacity.png.js +0 -27
  792. package/lib/contexts/MicrositeMenuContext/assets/wifi-mega-capacity.png.js.map +0 -1
  793. package/lib/contexts/MicrositeMenuContext/assets/wifi-mega-capacity.png.mjs +0 -3
  794. package/lib/contexts/MicrositeMenuContext/assets/wifi-mega-capacity.png.mjs.map +0 -1
  795. package/lib/contexts/MicrositeMenuContext/assets/wifi-outdoor.png.js +0 -27
  796. package/lib/contexts/MicrositeMenuContext/assets/wifi-outdoor.png.js.map +0 -1
  797. package/lib/contexts/MicrositeMenuContext/assets/wifi-outdoor.png.mjs +0 -3
  798. package/lib/contexts/MicrositeMenuContext/assets/wifi-outdoor.png.mjs.map +0 -1
  799. package/lib/contexts/MicrositeMenuContext/assets/wifi-overview.png.js +0 -27
  800. package/lib/contexts/MicrositeMenuContext/assets/wifi-overview.png.js.map +0 -1
  801. package/lib/contexts/MicrositeMenuContext/assets/wifi-overview.png.mjs +0 -3
  802. package/lib/contexts/MicrositeMenuContext/assets/wifi-overview.png.mjs.map +0 -1
  803. package/lib/contexts/MicrositeMenuContext/assets/wifi-wall.png.js +0 -27
  804. package/lib/contexts/MicrositeMenuContext/assets/wifi-wall.png.js.map +0 -1
  805. package/lib/contexts/MicrositeMenuContext/assets/wifi-wall.png.mjs +0 -3
  806. package/lib/contexts/MicrositeMenuContext/assets/wifi-wall.png.mjs.map +0 -1
  807. package/lib/contexts/MicrositeMenuContext/context.d.ts +0 -36
  808. package/lib/contexts/MicrositeMenuContext/context.js +0 -100
  809. package/lib/contexts/MicrositeMenuContext/context.js.map +0 -1
  810. package/lib/contexts/MicrositeMenuContext/context.mjs +0 -96
  811. package/lib/contexts/MicrositeMenuContext/context.mjs.map +0 -1
  812. package/lib/contexts/MicrositeMenuContext/index.d.ts +0 -1
  813. package/lib/contexts/MicrositeMenuContext/index.js +0 -8
  814. package/lib/contexts/MicrositeMenuContext/index.js.map +0 -1
  815. package/lib/contexts/MicrositeMenuContext/index.mjs +0 -3
  816. package/lib/contexts/MicrositeMenuContext/index.mjs.map +0 -1
  817. package/lib/contexts/MicrositeMenuContext/mapping.d.ts +0 -16
  818. package/lib/contexts/MicrositeMenuContext/mapping.js +0 -781
  819. package/lib/contexts/MicrositeMenuContext/mapping.js.map +0 -1
  820. package/lib/contexts/MicrositeMenuContext/mapping.mjs +0 -705
  821. package/lib/contexts/MicrositeMenuContext/mapping.mjs.map +0 -1
  822. package/lib/contexts/MicrositeMenuContext/translations/ar.json.js +0 -8
  823. package/lib/contexts/MicrositeMenuContext/translations/ar.json.js.map +0 -1
  824. package/lib/contexts/MicrositeMenuContext/translations/ar.json.mjs +0 -3
  825. package/lib/contexts/MicrositeMenuContext/translations/ar.json.mjs.map +0 -1
  826. package/lib/contexts/MicrositeMenuContext/translations/de.json.js +0 -8
  827. package/lib/contexts/MicrositeMenuContext/translations/de.json.js.map +0 -1
  828. package/lib/contexts/MicrositeMenuContext/translations/de.json.mjs +0 -3
  829. package/lib/contexts/MicrositeMenuContext/translations/de.json.mjs.map +0 -1
  830. package/lib/contexts/MicrositeMenuContext/translations/el.json.js +0 -8
  831. package/lib/contexts/MicrositeMenuContext/translations/el.json.js.map +0 -1
  832. package/lib/contexts/MicrositeMenuContext/translations/el.json.mjs +0 -3
  833. package/lib/contexts/MicrositeMenuContext/translations/el.json.mjs.map +0 -1
  834. package/lib/contexts/MicrositeMenuContext/translations/en.json.js +0 -128
  835. package/lib/contexts/MicrositeMenuContext/translations/en.json.js.map +0 -1
  836. package/lib/contexts/MicrositeMenuContext/translations/en.json.mjs +0 -123
  837. package/lib/contexts/MicrositeMenuContext/translations/en.json.mjs.map +0 -1
  838. package/lib/contexts/MicrositeMenuContext/translations/es.json.js +0 -8
  839. package/lib/contexts/MicrositeMenuContext/translations/es.json.js.map +0 -1
  840. package/lib/contexts/MicrositeMenuContext/translations/es.json.mjs +0 -3
  841. package/lib/contexts/MicrositeMenuContext/translations/es.json.mjs.map +0 -1
  842. package/lib/contexts/MicrositeMenuContext/translations/fr.json.js +0 -8
  843. package/lib/contexts/MicrositeMenuContext/translations/fr.json.js.map +0 -1
  844. package/lib/contexts/MicrositeMenuContext/translations/fr.json.mjs +0 -3
  845. package/lib/contexts/MicrositeMenuContext/translations/fr.json.mjs.map +0 -1
  846. package/lib/contexts/MicrositeMenuContext/translations/it.json.js +0 -8
  847. package/lib/contexts/MicrositeMenuContext/translations/it.json.js.map +0 -1
  848. package/lib/contexts/MicrositeMenuContext/translations/it.json.mjs +0 -3
  849. package/lib/contexts/MicrositeMenuContext/translations/it.json.mjs.map +0 -1
  850. package/lib/contexts/MicrositeMenuContext/translations/ja.json.js +0 -8
  851. package/lib/contexts/MicrositeMenuContext/translations/ja.json.js.map +0 -1
  852. package/lib/contexts/MicrositeMenuContext/translations/ja.json.mjs +0 -3
  853. package/lib/contexts/MicrositeMenuContext/translations/ja.json.mjs.map +0 -1
  854. package/lib/contexts/MicrositeMenuContext/translations/pt-BR.json.js +0 -8
  855. package/lib/contexts/MicrositeMenuContext/translations/pt-BR.json.js.map +0 -1
  856. package/lib/contexts/MicrositeMenuContext/translations/pt-BR.json.mjs +0 -3
  857. package/lib/contexts/MicrositeMenuContext/translations/pt-BR.json.mjs.map +0 -1
  858. package/lib/contexts/MicrositeMenuContext/translations/zh-Hans.json.js +0 -8
  859. package/lib/contexts/MicrositeMenuContext/translations/zh-Hans.json.js.map +0 -1
  860. package/lib/contexts/MicrositeMenuContext/translations/zh-Hans.json.mjs +0 -3
  861. package/lib/contexts/MicrositeMenuContext/translations/zh-Hans.json.mjs.map +0 -1
  862. package/lib/contexts/MicrositeMenuContext/translations/zh-Hant-TW.json.js +0 -8
  863. package/lib/contexts/MicrositeMenuContext/translations/zh-Hant-TW.json.js.map +0 -1
  864. package/lib/contexts/MicrositeMenuContext/translations/zh-Hant-TW.json.mjs +0 -3
  865. package/lib/contexts/MicrositeMenuContext/translations/zh-Hant-TW.json.mjs.map +0 -1
  866. package/lib/contexts/MicrositeMenuContext/translations.d.ts +0 -7
  867. package/lib/contexts/MicrositeMenuContext/translations.js +0 -47
  868. package/lib/contexts/MicrositeMenuContext/translations.js.map +0 -1
  869. package/lib/contexts/MicrositeMenuContext/translations.mjs +0 -25
  870. package/lib/contexts/MicrositeMenuContext/translations.mjs.map +0 -1
  871. package/lib/contexts/MicrositeMenuContext/types.d.ts +0 -101
  872. package/lib/contexts/MicrositeMenuContext/types.js +0 -16
  873. package/lib/contexts/MicrositeMenuContext/types.js.map +0 -1
  874. package/lib/contexts/MicrositeMenuContext/types.mjs +0 -15
  875. package/lib/contexts/MicrositeMenuContext/types.mjs.map +0 -1
  876. package/lib/helpers/product.d.ts +0 -87
  877. package/lib/helpers/product.js +0 -346
  878. package/lib/helpers/product.js.map +0 -1
  879. package/lib/helpers/product.mjs +0 -335
  880. package/lib/helpers/product.mjs.map +0 -1
  881. package/lib/types/product.d.ts +0 -87
  882. package/lib/types/product.js +0 -14
  883. package/lib/types/product.js.map +0 -1
  884. package/lib/types/product.mjs +0 -13
  885. package/lib/types/product.mjs.map +0 -1
  886. package/lib/utils/money/allocators/fixedAmount.d.ts +0 -26
  887. package/lib/utils/money/allocators/fixedAmount.js +0 -52
  888. package/lib/utils/money/allocators/fixedAmount.js.map +0 -1
  889. package/lib/utils/money/allocators/fixedAmount.mjs +0 -50
  890. package/lib/utils/money/allocators/fixedAmount.mjs.map +0 -1
  891. package/lib/utils/money/allocators/index.d.ts +0 -2
  892. package/lib/utils/money/allocators/index.js +0 -8
  893. package/lib/utils/money/allocators/index.js.map +0 -1
  894. package/lib/utils/money/allocators/index.mjs +0 -4
  895. package/lib/utils/money/allocators/index.mjs.map +0 -1
  896. package/lib/utils/money/allocators/productAmount.d.ts +0 -13
  897. package/lib/utils/money/allocators/productAmount.js +0 -98
  898. package/lib/utils/money/allocators/productAmount.js.map +0 -1
  899. package/lib/utils/money/allocators/productAmount.mjs +0 -96
  900. package/lib/utils/money/allocators/productAmount.mjs.map +0 -1
  901. package/lib/utils/money/exchangeRate.d.ts +0 -31
  902. package/lib/utils/money/exchangeRate.js +0 -27
  903. package/lib/utils/money/exchangeRate.js.map +0 -1
  904. package/lib/utils/money/exchangeRate.mjs +0 -23
  905. package/lib/utils/money/exchangeRate.mjs.map +0 -1
  906. package/lib/utils/money/misc.private.d.ts +0 -23
  907. package/lib/utils/money/misc.private.js +0 -46
  908. package/lib/utils/money/misc.private.js.map +0 -1
  909. package/lib/utils/money/misc.private.mjs +0 -21
  910. package/lib/utils/money/misc.private.mjs.map +0 -1
  911. package/lib/utils/money/shipping.d.ts +0 -5
  912. package/lib/utils/money/shipping.js +0 -8
  913. package/lib/utils/money/shipping.js.map +0 -1
  914. package/lib/utils/money/shipping.mjs +0 -6
  915. package/lib/utils/money/shipping.mjs.map +0 -1
  916. package/lib/utils/money/tax.private.d.ts +0 -17
  917. package/lib/utils/money/tax.private.js +0 -65
  918. package/lib/utils/money/tax.private.js.map +0 -1
  919. package/lib/utils/money/tax.private.mjs +0 -60
  920. package/lib/utils/money/tax.private.mjs.map +0 -1
  921. package/lib/utils/productSort.d.ts +0 -41
  922. package/lib/utils/productSort.js +0 -67
  923. package/lib/utils/productSort.js.map +0 -1
  924. package/lib/utils/productSort.mjs +0 -60
  925. package/lib/utils/productSort.mjs.map +0 -1
  926. /package/lib/{assets/icons → components/MobileModal/assets}/arrowDown.svg.js.map +0 -0
  927. /package/lib/{assets/icons → components/MobileModal/assets}/arrowDown.svg.mjs.map +0 -0
  928. /package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/index.d.ts +0 -0
  929. /package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/index.js +0 -0
  930. /package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/index.js.map +0 -0
  931. /package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/index.mjs +0 -0
  932. /package/lib/components/{HorizontalOptionSelect → ResourceCalculatorV1/components/HorizontalOptionSelect}/index.mjs.map +0 -0
  933. /package/lib/components/{Header/Navigation/ProMenu → ResourceCalculatorV1/components}/index.mjs.map +0 -0
@@ -1,50 +0,0 @@
1
- import { allocate, subtract, greaterThan } from 'dinero.js';
2
- import { assert } from '../../errors.mjs';
3
- import { getDinero, getDineroCurrency, amount } from '../misc.mjs';
4
- "use strict";
5
- var __defProp = Object.defineProperty;
6
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
7
- enumerable: true,
8
- configurable: true,
9
- writable: true,
10
- value
11
- }) : obj[key] = value;
12
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
13
- class FixedAmountAllocator {
14
- constructor({
15
- initialAllocateAmount,
16
- initialTotalAmount,
17
- currency
18
- }) {
19
- /**
20
- * How much we have left to allocate for given allocation from the remaining total
21
- */
22
- __publicField(this, "remainingAllocationAmount");
23
- /**
24
- * How much we have left to allocate in total
25
- */
26
- __publicField(this, "remainingTotalAmount");
27
- __publicField(this, "currency");
28
- this.remainingAllocationAmount = getDinero(initialAllocateAmount, currency);
29
- this.remainingTotalAmount = getDinero(initialTotalAmount, currency);
30
- this.currency = getDineroCurrency(currency);
31
- }
32
- /**
33
- * We always allocate biggest share to first item
34
- */
35
- allocate(lineItemTotal, currency) {
36
- assert(this.currency.code === currency, `Currency mismatch, expected ${currency}, got ${this.currency.code}`);
37
- const lineItemTotalDinero = getDinero(lineItemTotal, currency);
38
- if (lineItemTotal === 0) {
39
- return lineItemTotalDinero;
40
- }
41
- const [allocationAmount, remainingAllocationAmount] = allocate(this.remainingAllocationAmount, [lineItemTotal, Math.max(amount(this.remainingTotalAmount) - lineItemTotal, 0)]);
42
- assert(!!allocationAmount, "Allocation amount is zero");
43
- assert(!!remainingAllocationAmount, "Remaining allocation remainder is zero");
44
- this.remainingAllocationAmount = remainingAllocationAmount;
45
- this.remainingTotalAmount = subtract(this.remainingTotalAmount, lineItemTotalDinero);
46
- return greaterThan(allocationAmount, lineItemTotalDinero) ? lineItemTotalDinero : allocationAmount;
47
- }
48
- }
49
- export { FixedAmountAllocator };
50
- //# sourceMappingURL=fixedAmount.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fixedAmount.mjs","sources":["../../../../src/utils/money/allocators/fixedAmount.ts"],"sourcesContent":["import { allocate, greaterThan, subtract } from \"dinero.js\";\n\nimport type { Currency } from \"../../../types\";\nimport { assert } from \"../../errors\";\nimport { amount, getDinero, getDineroCurrency } from \"../misc\";\nimport type { Cents, Dino, DinoCurrency } from \"../types\";\n\n/**\n * Helper class to distribute a fixed amount (e.g. discount) between multiple items.\n * For example when trying to apply 5$ discount to 3 items, we need to distribute it evenly as possible\n */\nexport class FixedAmountAllocator {\n /**\n * How much we have left to allocate for given allocation from the remaining total\n */\n public remainingAllocationAmount: Dino;\n /**\n * How much we have left to allocate in total\n */\n public remainingTotalAmount: Dino;\n public currency: DinoCurrency;\n\n constructor({\n initialAllocateAmount,\n initialTotalAmount,\n currency,\n }: {\n initialAllocateAmount: Cents;\n initialTotalAmount: Cents;\n currency: Currency;\n }) {\n this.remainingAllocationAmount = getDinero(initialAllocateAmount, currency);\n this.remainingTotalAmount = getDinero(initialTotalAmount, currency);\n this.currency = getDineroCurrency(currency);\n }\n\n /**\n * We always allocate biggest share to first item\n */\n allocate(lineItemTotal: Cents, currency: Currency): Dino {\n assert(\n this.currency.code === currency,\n `Currency mismatch, expected ${currency}, got ${this.currency.code}`,\n );\n const lineItemTotalDinero = getDinero(lineItemTotal, currency);\n /**\n * If total price of line items is zero, it means it's free, thus no discount\n * can be calculated (it's either 0 or infinity, but let's go with 0)\n */\n if (lineItemTotal === 0) {\n return lineItemTotalDinero;\n }\n\n const [allocationAmount, remainingAllocationAmount] = allocate(\n this.remainingAllocationAmount,\n [\n lineItemTotal,\n Math.max(amount(this.remainingTotalAmount) - lineItemTotal, 0),\n ],\n );\n\n assert(!!allocationAmount, \"Allocation amount is zero\");\n assert(\n !!remainingAllocationAmount,\n \"Remaining allocation remainder is zero\",\n );\n\n this.remainingAllocationAmount = remainingAllocationAmount;\n this.remainingTotalAmount = subtract(\n this.remainingTotalAmount,\n lineItemTotalDinero,\n );\n\n /**\n * The discount amount is evenly split but can still be higher than the line item total\n * Need to ceil the price to be not more than the line item total\n */\n return greaterThan(allocationAmount, lineItemTotalDinero)\n ? lineItemTotalDinero\n : allocationAmount;\n }\n}\n"],"names":["FixedAmountAllocator","constructor","initialAllocateAmount","initialTotalAmount","currency","__publicField","remainingAllocationAmount","getDinero","remainingTotalAmount","getDineroCurrency","allocate","lineItemTotal","assert","code","lineItemTotalDinero","allocationAmount","Math","max","amount","subtract","greaterThan"],"mappings":";;;;;;;;;;;;AAWO,MAAMA,oBAAqB,CAAA;EAWhCC,WAAYA,CAAA;IACVC,qBAAA;IACAC,kBAAA;IACAC;EAAA,CAKC,EAAA;IAfH;AAAA;AAAA;IAAOC,aAAA,CAAA,IAAA,EAAA,2BAAA,CAAA;IAIP;AAAA;AAAA;IAAOA,aAAA,CAAA,IAAA,EAAA,sBAAA,CAAA;IACAA,aAAA,CAAA,IAAA,EAAA,UAAA,CAAA;IAWA,IAAA,CAAAC,yBAAA,GAA4BC,SAAU,CAAAL,qBAAA,EAAuBE,QAAQ,CAAA;IACrE,IAAA,CAAAI,oBAAA,GAAuBD,SAAU,CAAAJ,kBAAA,EAAoBC,QAAQ,CAAA;IAC7D,IAAA,CAAAA,QAAA,GAAWK,kBAAkBL,QAAQ,CAAA;EAC5C;EAAA;AAAA;AAAA;EAKAM,QAAAA,CAASC,eAAsBP,QAA0B,EAAA;IACvDQ,MAAA,CACE,IAAA,CAAKR,SAASS,IAAS,KAAAT,QAAA,EACQ,+BAAAA,QAAiB,SAAA,IAAA,CAAKA,SAASS,IAAI,EAAA,CACpE;IACM,MAAAC,mBAAA,GAAsBP,SAAU,CAAAI,aAAA,EAAeP,QAAQ,CAAA;IAK7D,IAAIO,kBAAkB,CAAG,EAAA;MAChB,OAAAG,mBAAA;IACT;IAEM,MAAA,CAACC,gBAAkB,EAAAT,yBAAyB,CAAI,GAAAI,QAAA,CACpD,IAAK,CAAAJ,yBAAA,EACL,CACEK,aAAA,EACAK,KAAKC,GAAI,CAAAC,MAAA,CAAO,KAAKV,oBAAoB,CAAA,GAAIG,eAAe,CAAC,CAAA,CAC/D,CACF;IAEOC,MAAA,CAAA,CAAC,CAACG,gBAAA,EAAkB,2BAA2B,CAAA;IACtDH,MAAA,CACE,CAAC,CAACN,yBAAA,EACF,wCAAA,CACF;IAEA,IAAA,CAAKA,yBAA4B,GAAAA,yBAAA;IACjC,IAAA,CAAKE,oBAAuB,GAAAW,QAAA,CAC1B,IAAK,CAAAX,oBAAA,EACLM,mBAAA,CACF;IAMA,OAAOM,WAAY,CAAAL,gBAAA,EAAkBD,mBAAmB,CAAA,GACpDA,mBACA,GAAAC,gBAAA;EACN;AACF;"}
@@ -1,2 +0,0 @@
1
- export * from "./fixedAmount";
2
- export * from "./productAmount";
@@ -1,8 +0,0 @@
1
- 'use strict';
2
-
3
- var fixedAmount = require('./fixedAmount.js');
4
- var productAmount = require('./productAmount.js');
5
- "use strict";
6
- exports.FixedAmountAllocator = fixedAmount.FixedAmountAllocator;
7
- exports.ProductAmountAllocator = productAmount.ProductAmountAllocator;
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1,4 +0,0 @@
1
- export { FixedAmountAllocator } from './fixedAmount.mjs';
2
- export { ProductAmountAllocator } from './productAmount.mjs';
3
- "use strict";
4
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1,13 +0,0 @@
1
- import type { FullLineItemSummary } from "../types";
2
- /**
3
- * Helper class to distribute a total amount for a product
4
- */
5
- export declare class ProductAmountAllocator {
6
- #private;
7
- /**
8
- * Remaining quantity to allocate
9
- */
10
- quantity: number;
11
- constructor(productSummary: FullLineItemSummary);
12
- allocateQty(quantity: number): FullLineItemSummary;
13
- }
@@ -1,98 +0,0 @@
1
- 'use strict';
2
-
3
- var misc = require('../misc.js');
4
- var fixedAmount = require('./fixedAmount.js');
5
- "use strict";
6
- var __defProp = Object.defineProperty;
7
- var __typeError = msg => {
8
- throw TypeError(msg);
9
- };
10
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
11
- enumerable: true,
12
- configurable: true,
13
- writable: true,
14
- value
15
- }) : obj[key] = value;
16
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
17
- var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
18
- var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
19
- var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
20
- var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
21
- var _itemPrice, _currency, _subtotal, _discountAmount, _taxableAmount, _tax, _total;
22
- class ProductAmountAllocator {
23
- constructor(productSummary) {
24
- // #############################################################################
25
- // Fixed values
26
- // #############################################################################
27
- __privateAdd(this, _itemPrice);
28
- __privateAdd(this, _currency);
29
- // #############################################################################
30
- /**
31
- * Remaining quantity to allocate
32
- */
33
- __publicField(this, "quantity");
34
- // #############################################################################
35
- // Specific amount allocators
36
- // #############################################################################
37
- __privateAdd(this, _subtotal);
38
- __privateAdd(this, _discountAmount);
39
- __privateAdd(this, _taxableAmount);
40
- __privateAdd(this, _tax);
41
- __privateAdd(this, _total);
42
- const currency = productSummary.currency;
43
- const priceForAllocation = productSummary.itemPrice * productSummary.quantity;
44
- __privateSet(this, _itemPrice, productSummary.itemPrice);
45
- __privateSet(this, _currency, currency);
46
- this.quantity = productSummary.quantity;
47
- __privateSet(this, _subtotal, new fixedAmount.FixedAmountAllocator({
48
- initialAllocateAmount: productSummary.subtotal,
49
- initialTotalAmount: priceForAllocation,
50
- currency
51
- }));
52
- __privateSet(this, _discountAmount, new fixedAmount.FixedAmountAllocator({
53
- initialAllocateAmount: productSummary.discountAmount,
54
- initialTotalAmount: priceForAllocation,
55
- currency
56
- }));
57
- __privateSet(this, _taxableAmount, new fixedAmount.FixedAmountAllocator({
58
- initialAllocateAmount: productSummary.taxableAmount,
59
- initialTotalAmount: priceForAllocation,
60
- currency
61
- }));
62
- __privateSet(this, _tax, new fixedAmount.FixedAmountAllocator({
63
- initialAllocateAmount: productSummary.tax,
64
- initialTotalAmount: priceForAllocation,
65
- currency
66
- }));
67
- __privateSet(this, _total, new fixedAmount.FixedAmountAllocator({
68
- initialAllocateAmount: productSummary.total,
69
- initialTotalAmount: priceForAllocation,
70
- currency
71
- }));
72
- }
73
- allocateQty(quantity) {
74
- let quantityNormalized = Math.max(quantity, 0);
75
- quantityNormalized = this.quantity - quantityNormalized >= 0 ? quantityNormalized : 0;
76
- this.quantity = Math.max(this.quantity - quantityNormalized, 0);
77
- const itemQuantityPrice = __privateGet(this, _itemPrice) * quantityNormalized;
78
- return {
79
- itemPrice: __privateGet(this, _itemPrice),
80
- currency: __privateGet(this, _currency),
81
- quantity: quantityNormalized,
82
- subtotal: misc.amount(__privateGet(this, _subtotal).allocate(itemQuantityPrice, __privateGet(this, _currency))),
83
- discountAmount: misc.amount(__privateGet(this, _discountAmount).allocate(itemQuantityPrice, __privateGet(this, _currency))),
84
- taxableAmount: misc.amount(__privateGet(this, _taxableAmount).allocate(itemQuantityPrice, __privateGet(this, _currency))),
85
- tax: misc.amount(__privateGet(this, _tax).allocate(itemQuantityPrice, __privateGet(this, _currency))),
86
- total: misc.amount(__privateGet(this, _total).allocate(itemQuantityPrice, __privateGet(this, _currency)))
87
- };
88
- }
89
- }
90
- _itemPrice = new WeakMap();
91
- _currency = new WeakMap();
92
- _subtotal = new WeakMap();
93
- _discountAmount = new WeakMap();
94
- _taxableAmount = new WeakMap();
95
- _tax = new WeakMap();
96
- _total = new WeakMap();
97
- exports.ProductAmountAllocator = ProductAmountAllocator;
98
- //# sourceMappingURL=productAmount.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"productAmount.js","sources":["../../../../src/utils/money/allocators/productAmount.ts"],"sourcesContent":["import type { Currency } from \"../../../types\";\nimport { amount } from \"../misc\";\nimport type { Cents, FullLineItemSummary } from \"../types\";\nimport { FixedAmountAllocator } from \"./fixedAmount\";\n\n/**\n * Helper class to distribute a total amount for a product\n */\nexport class ProductAmountAllocator {\n // #############################################################################\n // Fixed values\n // #############################################################################\n readonly #itemPrice: Cents;\n readonly #currency: Currency;\n // #############################################################################\n /**\n * Remaining quantity to allocate\n */\n quantity: number;\n // #############################################################################\n // Specific amount allocators\n // #############################################################################\n #subtotal: FixedAmountAllocator;\n #discountAmount: FixedAmountAllocator;\n #taxableAmount: FixedAmountAllocator;\n #tax: FixedAmountAllocator;\n #total: FixedAmountAllocator;\n\n constructor(productSummary: FullLineItemSummary) {\n const currency = productSummary.currency;\n\n /**\n * Somewhat hackish, just need a stable price that can easily divide later by quantity\n */\n const priceForAllocation =\n productSummary.itemPrice * productSummary.quantity;\n\n this.#itemPrice = productSummary.itemPrice;\n this.#currency = currency;\n this.quantity = productSummary.quantity;\n this.#subtotal = new FixedAmountAllocator({\n initialAllocateAmount: productSummary.subtotal,\n initialTotalAmount: priceForAllocation,\n currency,\n });\n this.#discountAmount = new FixedAmountAllocator({\n initialAllocateAmount: productSummary.discountAmount,\n initialTotalAmount: priceForAllocation,\n currency,\n });\n this.#taxableAmount = new FixedAmountAllocator({\n initialAllocateAmount: productSummary.taxableAmount,\n initialTotalAmount: priceForAllocation,\n currency,\n });\n this.#tax = new FixedAmountAllocator({\n initialAllocateAmount: productSummary.tax,\n initialTotalAmount: priceForAllocation,\n currency,\n });\n this.#total = new FixedAmountAllocator({\n initialAllocateAmount: productSummary.total,\n initialTotalAmount: priceForAllocation,\n currency,\n });\n }\n\n allocateQty(quantity: number): FullLineItemSummary {\n // Calculate remaining allocatable quantity\n let quantityNormalized = Math.max(quantity, 0);\n quantityNormalized =\n this.quantity - quantityNormalized >= 0 ? quantityNormalized : 0;\n\n // Adjust remaining qty\n this.quantity = Math.max(this.quantity - quantityNormalized, 0);\n\n // How big of a slice of the total price we need to allocate\n const itemQuantityPrice = this.#itemPrice * quantityNormalized;\n\n return {\n itemPrice: this.#itemPrice,\n currency: this.#currency,\n quantity: quantityNormalized,\n subtotal: amount(\n this.#subtotal.allocate(itemQuantityPrice, this.#currency),\n ),\n discountAmount: amount(\n this.#discountAmount.allocate(itemQuantityPrice, this.#currency),\n ),\n taxableAmount: amount(\n this.#taxableAmount.allocate(itemQuantityPrice, this.#currency),\n ),\n tax: amount(this.#tax.allocate(itemQuantityPrice, this.#currency)),\n total: amount(this.#total.allocate(itemQuantityPrice, this.#currency)),\n } satisfies FullLineItemSummary;\n }\n}\n"],"names":["_itemPrice","_currency","_subtotal","_discountAmount","_taxableAmount","_tax","_total","ProductAmountAllocator","constructor","productSummary","__privateAdd","__publicField","currency","priceForAllocation","itemPrice","quantity","__privateSet","FixedAmountAllocator","initialAllocateAmount","subtotal","initialTotalAmount","discountAmount","taxableAmount","tax","total","allocateQty","quantityNormalized","Math","max","itemQuantityPrice","__privateGet","amount","allocate","WeakMap"],"mappings":"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"}
@@ -1,96 +0,0 @@
1
- import { amount } from '../misc.mjs';
2
- import { FixedAmountAllocator } from './fixedAmount.mjs';
3
- "use strict";
4
- var __defProp = Object.defineProperty;
5
- var __typeError = msg => {
6
- throw TypeError(msg);
7
- };
8
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
9
- enumerable: true,
10
- configurable: true,
11
- writable: true,
12
- value
13
- }) : obj[key] = value;
14
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
15
- var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
16
- var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
17
- var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
18
- var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
19
- var _itemPrice, _currency, _subtotal, _discountAmount, _taxableAmount, _tax, _total;
20
- class ProductAmountAllocator {
21
- constructor(productSummary) {
22
- // #############################################################################
23
- // Fixed values
24
- // #############################################################################
25
- __privateAdd(this, _itemPrice);
26
- __privateAdd(this, _currency);
27
- // #############################################################################
28
- /**
29
- * Remaining quantity to allocate
30
- */
31
- __publicField(this, "quantity");
32
- // #############################################################################
33
- // Specific amount allocators
34
- // #############################################################################
35
- __privateAdd(this, _subtotal);
36
- __privateAdd(this, _discountAmount);
37
- __privateAdd(this, _taxableAmount);
38
- __privateAdd(this, _tax);
39
- __privateAdd(this, _total);
40
- const currency = productSummary.currency;
41
- const priceForAllocation = productSummary.itemPrice * productSummary.quantity;
42
- __privateSet(this, _itemPrice, productSummary.itemPrice);
43
- __privateSet(this, _currency, currency);
44
- this.quantity = productSummary.quantity;
45
- __privateSet(this, _subtotal, new FixedAmountAllocator({
46
- initialAllocateAmount: productSummary.subtotal,
47
- initialTotalAmount: priceForAllocation,
48
- currency
49
- }));
50
- __privateSet(this, _discountAmount, new FixedAmountAllocator({
51
- initialAllocateAmount: productSummary.discountAmount,
52
- initialTotalAmount: priceForAllocation,
53
- currency
54
- }));
55
- __privateSet(this, _taxableAmount, new FixedAmountAllocator({
56
- initialAllocateAmount: productSummary.taxableAmount,
57
- initialTotalAmount: priceForAllocation,
58
- currency
59
- }));
60
- __privateSet(this, _tax, new FixedAmountAllocator({
61
- initialAllocateAmount: productSummary.tax,
62
- initialTotalAmount: priceForAllocation,
63
- currency
64
- }));
65
- __privateSet(this, _total, new FixedAmountAllocator({
66
- initialAllocateAmount: productSummary.total,
67
- initialTotalAmount: priceForAllocation,
68
- currency
69
- }));
70
- }
71
- allocateQty(quantity) {
72
- let quantityNormalized = Math.max(quantity, 0);
73
- quantityNormalized = this.quantity - quantityNormalized >= 0 ? quantityNormalized : 0;
74
- this.quantity = Math.max(this.quantity - quantityNormalized, 0);
75
- const itemQuantityPrice = __privateGet(this, _itemPrice) * quantityNormalized;
76
- return {
77
- itemPrice: __privateGet(this, _itemPrice),
78
- currency: __privateGet(this, _currency),
79
- quantity: quantityNormalized,
80
- subtotal: amount(__privateGet(this, _subtotal).allocate(itemQuantityPrice, __privateGet(this, _currency))),
81
- discountAmount: amount(__privateGet(this, _discountAmount).allocate(itemQuantityPrice, __privateGet(this, _currency))),
82
- taxableAmount: amount(__privateGet(this, _taxableAmount).allocate(itemQuantityPrice, __privateGet(this, _currency))),
83
- tax: amount(__privateGet(this, _tax).allocate(itemQuantityPrice, __privateGet(this, _currency))),
84
- total: amount(__privateGet(this, _total).allocate(itemQuantityPrice, __privateGet(this, _currency)))
85
- };
86
- }
87
- }
88
- _itemPrice = new WeakMap();
89
- _currency = new WeakMap();
90
- _subtotal = new WeakMap();
91
- _discountAmount = new WeakMap();
92
- _taxableAmount = new WeakMap();
93
- _tax = new WeakMap();
94
- _total = new WeakMap();
95
- export { ProductAmountAllocator };
96
- //# sourceMappingURL=productAmount.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"productAmount.mjs","sources":["../../../../src/utils/money/allocators/productAmount.ts"],"sourcesContent":["import type { Currency } from \"../../../types\";\nimport { amount } from \"../misc\";\nimport type { Cents, FullLineItemSummary } from \"../types\";\nimport { FixedAmountAllocator } from \"./fixedAmount\";\n\n/**\n * Helper class to distribute a total amount for a product\n */\nexport class ProductAmountAllocator {\n // #############################################################################\n // Fixed values\n // #############################################################################\n readonly #itemPrice: Cents;\n readonly #currency: Currency;\n // #############################################################################\n /**\n * Remaining quantity to allocate\n */\n quantity: number;\n // #############################################################################\n // Specific amount allocators\n // #############################################################################\n #subtotal: FixedAmountAllocator;\n #discountAmount: FixedAmountAllocator;\n #taxableAmount: FixedAmountAllocator;\n #tax: FixedAmountAllocator;\n #total: FixedAmountAllocator;\n\n constructor(productSummary: FullLineItemSummary) {\n const currency = productSummary.currency;\n\n /**\n * Somewhat hackish, just need a stable price that can easily divide later by quantity\n */\n const priceForAllocation =\n productSummary.itemPrice * productSummary.quantity;\n\n this.#itemPrice = productSummary.itemPrice;\n this.#currency = currency;\n this.quantity = productSummary.quantity;\n this.#subtotal = new FixedAmountAllocator({\n initialAllocateAmount: productSummary.subtotal,\n initialTotalAmount: priceForAllocation,\n currency,\n });\n this.#discountAmount = new FixedAmountAllocator({\n initialAllocateAmount: productSummary.discountAmount,\n initialTotalAmount: priceForAllocation,\n currency,\n });\n this.#taxableAmount = new FixedAmountAllocator({\n initialAllocateAmount: productSummary.taxableAmount,\n initialTotalAmount: priceForAllocation,\n currency,\n });\n this.#tax = new FixedAmountAllocator({\n initialAllocateAmount: productSummary.tax,\n initialTotalAmount: priceForAllocation,\n currency,\n });\n this.#total = new FixedAmountAllocator({\n initialAllocateAmount: productSummary.total,\n initialTotalAmount: priceForAllocation,\n currency,\n });\n }\n\n allocateQty(quantity: number): FullLineItemSummary {\n // Calculate remaining allocatable quantity\n let quantityNormalized = Math.max(quantity, 0);\n quantityNormalized =\n this.quantity - quantityNormalized >= 0 ? quantityNormalized : 0;\n\n // Adjust remaining qty\n this.quantity = Math.max(this.quantity - quantityNormalized, 0);\n\n // How big of a slice of the total price we need to allocate\n const itemQuantityPrice = this.#itemPrice * quantityNormalized;\n\n return {\n itemPrice: this.#itemPrice,\n currency: this.#currency,\n quantity: quantityNormalized,\n subtotal: amount(\n this.#subtotal.allocate(itemQuantityPrice, this.#currency),\n ),\n discountAmount: amount(\n this.#discountAmount.allocate(itemQuantityPrice, this.#currency),\n ),\n taxableAmount: amount(\n this.#taxableAmount.allocate(itemQuantityPrice, this.#currency),\n ),\n tax: amount(this.#tax.allocate(itemQuantityPrice, this.#currency)),\n total: amount(this.#total.allocate(itemQuantityPrice, this.#currency)),\n } satisfies FullLineItemSummary;\n }\n}\n"],"names":["_itemPrice","_currency","_subtotal","_discountAmount","_taxableAmount","_tax","_total","ProductAmountAllocator","constructor","productSummary","__privateAdd","__publicField","currency","priceForAllocation","itemPrice","quantity","__privateSet","FixedAmountAllocator","initialAllocateAmount","subtotal","initialTotalAmount","discountAmount","taxableAmount","tax","total","allocateQty","quantityNormalized","Math","max","itemQuantityPrice","__privateGet","amount","allocate","WeakMap"],"mappings":"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"}
@@ -1,31 +0,0 @@
1
- import type { Cents, TaxRate } from "./types";
2
- /**
3
- * Parse exchange rate to dinero friendly amount and scale.
4
- *
5
- * Used to prepare exchange rate for sending over API.
6
- *
7
- * @example
8
- * toSnapshotExchangeRate(0.22); // {amount: 22000, scale: 6}
9
- */
10
- export declare const toSnapshotExchangeRate: (exchangeRate: TaxRate) => {
11
- amount: Cents;
12
- scale: number;
13
- };
14
- /**
15
- * Converts an arbitrary exchange rate to a fixed decimal place number.
16
- *
17
- * Used to take in an input and convert it for storage in the database.
18
- *
19
- * @example
20
- * toFixedExchangeRate("0.123456789") // "0.123457"
21
- * toFixedExchangeRate("0.123456789", true) // 0.123457
22
- */
23
- export declare function toFixedExchangeRate(rate: string | number, asNumber?: boolean): string;
24
- export declare function toFixedExchangeRate(rate: string | number, asNumber: true): number;
25
- /**
26
- * Invert an exchange rate by doing 1 / rate
27
- * Used to fake a reverse exchange rate in case we don't have it
28
- * @example
29
- * invertExchangeRate("0.22") // "4.545455"
30
- */
31
- export declare function invertExchangeRate(rate: string | number): string;
@@ -1,27 +0,0 @@
1
- 'use strict';
2
-
3
- var errors = require('../errors.js');
4
- var number = require('../number.js');
5
- var constants = require('./constants.js');
6
- var misc_private = require('./misc.private.js');
7
- "use strict";
8
- const toSnapshotExchangeRate = exchangeRate => {
9
- number.isFloat(exchangeRate, "Exchange rate");
10
- errors.assert(exchangeRate > 0, "Exchange rate must be greater than 0");
11
- const rateInt = misc_private.floatToInt(exchangeRate, constants.EXCHANGE_RATE_DINERO_CURRENCY.base, constants.EXCHANGE_RATE_DINERO_CURRENCY.exponent);
12
- return {
13
- amount: rateInt,
14
- scale: constants.EXCHANGE_RATE_DINERO_CURRENCY.exponent
15
- };
16
- };
17
- function toFixedExchangeRate(rate, asNumber) {
18
- return number.toFixedRate(typeof rate === "string" ? +rate : rate, constants.EXCHANGE_RATE_DINERO_CURRENCY.exponent, asNumber);
19
- }
20
- function invertExchangeRate(rate) {
21
- const exchangeRate = toFixedExchangeRate(rate, true);
22
- return toFixedExchangeRate(1 / exchangeRate, false);
23
- }
24
- exports.invertExchangeRate = invertExchangeRate;
25
- exports.toFixedExchangeRate = toFixedExchangeRate;
26
- exports.toSnapshotExchangeRate = toSnapshotExchangeRate;
27
- //# sourceMappingURL=exchangeRate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exchangeRate.js","sources":["../../../src/utils/money/exchangeRate.ts"],"sourcesContent":["import { assert } from \"../errors\";\nimport { isFloat, toFixedRate } from \"../number\";\nimport { EXCHANGE_RATE_DINERO_CURRENCY } from \"./constants\";\nimport { floatToInt } from \"./misc.private\";\nimport type { Cents, TaxRate } from \"./types\";\n\n// FIXME: reconsider if needed her as only used in BE for exchange rate Graph other places in code use Float|number\n/**\n * Parse exchange rate to dinero friendly amount and scale.\n *\n * Used to prepare exchange rate for sending over API.\n *\n * @example\n * toSnapshotExchangeRate(0.22); // {amount: 22000, scale: 6}\n */\nexport const toSnapshotExchangeRate = (\n exchangeRate: TaxRate,\n): {\n amount: Cents;\n scale: number;\n} => {\n // Validate input\n isFloat(exchangeRate, \"Exchange rate\");\n assert(exchangeRate > 0, \"Exchange rate must be greater than 0\");\n\n // Get scale of exchange rate\n const rateInt = floatToInt(\n exchangeRate,\n EXCHANGE_RATE_DINERO_CURRENCY.base,\n EXCHANGE_RATE_DINERO_CURRENCY.exponent,\n );\n\n // Return dinero friendly amount and scale\n return {\n amount: rateInt,\n scale: EXCHANGE_RATE_DINERO_CURRENCY.exponent,\n };\n};\n\n/**\n * Converts an arbitrary exchange rate to a fixed decimal place number.\n *\n * Used to take in an input and convert it for storage in the database.\n *\n * @example\n * toFixedExchangeRate(\"0.123456789\") // \"0.123457\"\n * toFixedExchangeRate(\"0.123456789\", true) // 0.123457\n */\nexport function toFixedExchangeRate(\n rate: string | number,\n asNumber?: boolean,\n): string;\nexport function toFixedExchangeRate(\n rate: string | number,\n asNumber: true,\n): number;\nexport function toFixedExchangeRate(\n rate: string | number,\n asNumber?: boolean,\n): string | number {\n // FIXME: Remove + but instead add proper parsing of the string --> number\n // https://stackoverflow.com/a/12862627/1378261\n return toFixedRate(\n typeof rate === \"string\" ? +rate : rate,\n EXCHANGE_RATE_DINERO_CURRENCY.exponent,\n asNumber,\n );\n}\n\n/**\n * Invert an exchange rate by doing 1 / rate\n * Used to fake a reverse exchange rate in case we don't have it\n * @example\n * invertExchangeRate(\"0.22\") // \"4.545455\"\n */\nexport function invertExchangeRate(rate: string | number) {\n const exchangeRate = toFixedExchangeRate(rate, true);\n return toFixedExchangeRate(1 / exchangeRate, false);\n}\n"],"names":["toSnapshotExchangeRate","exchangeRate","isFloat","assert","rateInt","floatToInt","EXCHANGE_RATE_DINERO_CURRENCY","base","exponent","amount","scale","toFixedExchangeRate","rate","asNumber","toFixedRate","invertExchangeRate"],"mappings":";;;;;;;AAea,MAAAA,sBAAA,GACXC,YAIG,IAAA;EAEHC,cAAA,CAAQD,cAAc,eAAe,CAAA;EAC9BE,MAAAA,CAAAA,MAAA,CAAAF,YAAA,GAAe,GAAG,sCAAsC,CAAA;EAG/D,MAAMG,OAAU,GAAAC,YAAA,CAAAA,UAAA,CACdJ,YAAA,EACAK,SAAAA,CAAAA,6BAA8B,CAAAC,IAAA,EAC9BD,SAAAA,CAAAA,6BAA8B,CAAAE,QAAA,CAChC;EAGO,OAAA;IACLC,MAAQ,EAAAL,OAAA;IACRM,OAAOJ,SAA8B,CAAAA,6BAAA,CAAAE;EAAA,CACvC;AACF,CAAA;AAmBgB,SAAAG,mBAAAA,CACdC,MACAC,QACiB,EAAA;EAGV,OAAAC,MAAA,CAAAA,WAAA,CACL,OAAOF,IAAA,KAAS,QAAW,GAAA,CAACA,IAAO,GAAAA,IAAA,EACnCN,SAAAA,CAAAA,6BAA8B,CAAAE,QAAA,EAC9BK,QAAA,CACF;AACF;AAQO,SAASE,mBAAmBH,IAAuB,EAAA;EAClD,MAAAX,YAAA,GAAeU,mBAAoB,CAAAC,IAAA,EAAM,IAAI,CAAA;EAC5C,OAAAD,mBAAA,CAAoB,CAAI,GAAAV,YAAA,EAAc,KAAK,CAAA;AACpD;;;"}
@@ -1,23 +0,0 @@
1
- import { assert } from '../errors.mjs';
2
- import { isFloat, toFixedRate } from '../number.mjs';
3
- import { EXCHANGE_RATE_DINERO_CURRENCY } from './constants.mjs';
4
- import { floatToInt } from './misc.private.mjs';
5
- "use strict";
6
- const toSnapshotExchangeRate = exchangeRate => {
7
- isFloat(exchangeRate, "Exchange rate");
8
- assert(exchangeRate > 0, "Exchange rate must be greater than 0");
9
- const rateInt = floatToInt(exchangeRate, EXCHANGE_RATE_DINERO_CURRENCY.base, EXCHANGE_RATE_DINERO_CURRENCY.exponent);
10
- return {
11
- amount: rateInt,
12
- scale: EXCHANGE_RATE_DINERO_CURRENCY.exponent
13
- };
14
- };
15
- function toFixedExchangeRate(rate, asNumber) {
16
- return toFixedRate(typeof rate === "string" ? +rate : rate, EXCHANGE_RATE_DINERO_CURRENCY.exponent, asNumber);
17
- }
18
- function invertExchangeRate(rate) {
19
- const exchangeRate = toFixedExchangeRate(rate, true);
20
- return toFixedExchangeRate(1 / exchangeRate, false);
21
- }
22
- export { invertExchangeRate, toFixedExchangeRate, toSnapshotExchangeRate };
23
- //# sourceMappingURL=exchangeRate.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exchangeRate.mjs","sources":["../../../src/utils/money/exchangeRate.ts"],"sourcesContent":["import { assert } from \"../errors\";\nimport { isFloat, toFixedRate } from \"../number\";\nimport { EXCHANGE_RATE_DINERO_CURRENCY } from \"./constants\";\nimport { floatToInt } from \"./misc.private\";\nimport type { Cents, TaxRate } from \"./types\";\n\n// FIXME: reconsider if needed her as only used in BE for exchange rate Graph other places in code use Float|number\n/**\n * Parse exchange rate to dinero friendly amount and scale.\n *\n * Used to prepare exchange rate for sending over API.\n *\n * @example\n * toSnapshotExchangeRate(0.22); // {amount: 22000, scale: 6}\n */\nexport const toSnapshotExchangeRate = (\n exchangeRate: TaxRate,\n): {\n amount: Cents;\n scale: number;\n} => {\n // Validate input\n isFloat(exchangeRate, \"Exchange rate\");\n assert(exchangeRate > 0, \"Exchange rate must be greater than 0\");\n\n // Get scale of exchange rate\n const rateInt = floatToInt(\n exchangeRate,\n EXCHANGE_RATE_DINERO_CURRENCY.base,\n EXCHANGE_RATE_DINERO_CURRENCY.exponent,\n );\n\n // Return dinero friendly amount and scale\n return {\n amount: rateInt,\n scale: EXCHANGE_RATE_DINERO_CURRENCY.exponent,\n };\n};\n\n/**\n * Converts an arbitrary exchange rate to a fixed decimal place number.\n *\n * Used to take in an input and convert it for storage in the database.\n *\n * @example\n * toFixedExchangeRate(\"0.123456789\") // \"0.123457\"\n * toFixedExchangeRate(\"0.123456789\", true) // 0.123457\n */\nexport function toFixedExchangeRate(\n rate: string | number,\n asNumber?: boolean,\n): string;\nexport function toFixedExchangeRate(\n rate: string | number,\n asNumber: true,\n): number;\nexport function toFixedExchangeRate(\n rate: string | number,\n asNumber?: boolean,\n): string | number {\n // FIXME: Remove + but instead add proper parsing of the string --> number\n // https://stackoverflow.com/a/12862627/1378261\n return toFixedRate(\n typeof rate === \"string\" ? +rate : rate,\n EXCHANGE_RATE_DINERO_CURRENCY.exponent,\n asNumber,\n );\n}\n\n/**\n * Invert an exchange rate by doing 1 / rate\n * Used to fake a reverse exchange rate in case we don't have it\n * @example\n * invertExchangeRate(\"0.22\") // \"4.545455\"\n */\nexport function invertExchangeRate(rate: string | number) {\n const exchangeRate = toFixedExchangeRate(rate, true);\n return toFixedExchangeRate(1 / exchangeRate, false);\n}\n"],"names":["toSnapshotExchangeRate","exchangeRate","isFloat","assert","rateInt","floatToInt","EXCHANGE_RATE_DINERO_CURRENCY","base","exponent","amount","scale","toFixedExchangeRate","rate","asNumber","toFixedRate","invertExchangeRate"],"mappings":";;;;;AAea,MAAAA,sBAAA,GACXC,YAIG,IAAA;EAEHC,OAAA,CAAQD,cAAc,eAAe,CAAA;EAC9BE,MAAA,CAAAF,YAAA,GAAe,GAAG,sCAAsC,CAAA;EAG/D,MAAMG,OAAU,GAAAC,UAAA,CACdJ,YAAA,EACAK,6BAA8B,CAAAC,IAAA,EAC9BD,6BAA8B,CAAAE,QAAA,CAChC;EAGO,OAAA;IACLC,MAAQ,EAAAL,OAAA;IACRM,OAAOJ,6BAA8B,CAAAE;EAAA,CACvC;AACF,CAAA;AAmBgB,SAAAG,mBAAAA,CACdC,MACAC,QACiB,EAAA;EAGV,OAAAC,WAAA,CACL,OAAOF,IAAA,KAAS,QAAW,GAAA,CAACA,IAAO,GAAAA,IAAA,EACnCN,6BAA8B,CAAAE,QAAA,EAC9BK,QAAA,CACF;AACF;AAQO,SAASE,mBAAmBH,IAAuB,EAAA;EAClD,MAAAX,YAAA,GAAeU,mBAAoB,CAAAC,IAAA,EAAM,IAAI,CAAA;EAC5C,OAAAD,mBAAA,CAAoB,CAAI,GAAAV,YAAA,EAAc,KAAK,CAAA;AACpD;"}
@@ -1,23 +0,0 @@
1
- import * as currencies from "@dinero.js/currencies";
2
- import type { DinoCurrency } from "./types";
3
- /**
4
- * Fast lookup for our custom currency enum to check that given currency is valid
5
- */
6
- export declare const currencyLookup: Set<string>;
7
- /**
8
- * Dinero currency lookup to check that given currency is valid
9
- */
10
- export declare const dineroCurrenciesLookup: Map<string, currencies.Currency<number>>;
11
- /**
12
- * Private util to convert a float value into a int. Also applies financial rounding to the value if needed.
13
- * Inspired by https://v2.dinerojs.com/docs/faq/how-can-i-create-dinero-objects-from-floats
14
- * @example
15
- * floatToInt(69.10, 10, 2); // 6910
16
- * floatToInt(42, 10, 2); // 4200
17
- * floatToInt(0.22, 10, 6); // 220000
18
- */
19
- export declare const floatToInt: (floatAmount: number, base: number, exponent: number) => number;
20
- /**
21
- * FIXME: is it private tho?!
22
- */
23
- export declare const decimalToDinero: (decimalAmount: string | number, currency: DinoCurrency) => import("dinero.js").Dinero<number>;
@@ -1,46 +0,0 @@
1
- 'use strict';
2
-
3
- var currencies = require('@dinero.js/currencies');
4
- var dinero_js = require('dinero.js');
5
- require('../../types/index.js');
6
- var number = require('../number.js');
7
- var constants = require('./constants.js');
8
- var generated = require('../../types/generated.js');
9
- function _interopNamespace(e) {
10
- if (e && e.__esModule) return e;
11
- var n = Object.create(null);
12
- if (e) {
13
- Object.keys(e).forEach(function (k) {
14
- if (k !== 'default') {
15
- var d = Object.getOwnPropertyDescriptor(e, k);
16
- Object.defineProperty(n, k, d.get ? d : {
17
- enumerable: true,
18
- get: function () {
19
- return e[k];
20
- }
21
- });
22
- }
23
- });
24
- }
25
- n["default"] = e;
26
- return Object.freeze(n);
27
- }
28
- var currencies__namespace = /*#__PURE__*/_interopNamespace(currencies);
29
- "use strict";
30
- const currencyLookup = new Set(Object.keys(generated.Currency).map(el => el.toString()));
31
- const dineroCurrenciesLookup = new Map(Object.values(currencies__namespace).map(currency => [currency.code, currency]));
32
- const floatToInt = (floatAmount, base, exponent) => constants.Round.Financial(floatAmount * Math.pow(base, exponent));
33
- const decimalToDinero = (decimalAmount, currency) => {
34
- const parsedNumber = typeof decimalAmount === "number" ? decimalAmount : Number.parseFloat(decimalAmount);
35
- number.isFloat(parsedNumber);
36
- const parsedNumberInt = Number.parseInt((parsedNumber * Math.pow(10, currency.exponent)).toFixed(0));
37
- return dinero_js.dinero({
38
- amount: parsedNumberInt,
39
- currency
40
- });
41
- };
42
- exports.currencyLookup = currencyLookup;
43
- exports.decimalToDinero = decimalToDinero;
44
- exports.dineroCurrenciesLookup = dineroCurrenciesLookup;
45
- exports.floatToInt = floatToInt;
46
- //# sourceMappingURL=misc.private.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"misc.private.js","sources":["../../../src/utils/money/misc.private.ts"],"sourcesContent":["// #############################################################################\n// Internal helper functions not for consumption outside of store.core!\n// Wrote as separate files so that they can be easily unit tested without exposing them\n// #############################################################################\nimport * as currencies from \"@dinero.js/currencies\";\nimport { dinero } from \"dinero.js\";\n\nimport { Currency } from \"../../types\";\nimport { isFloat } from \"../number\";\nimport { Round } from \"./constants\";\nimport type { DinoCurrency } from \"./types\";\n\n/**\n * Fast lookup for our custom currency enum to check that given currency is valid\n */\nexport const currencyLookup = new Set(\n Object.keys(Currency).map((el) => el.toString()),\n);\n\n/**\n * Dinero currency lookup to check that given currency is valid\n */\nexport const dineroCurrenciesLookup = new Map(\n Object.values(currencies).map((currency) => [currency.code, currency]),\n);\n\n/**\n * Private util to convert a float value into a int. Also applies financial rounding to the value if needed.\n * Inspired by https://v2.dinerojs.com/docs/faq/how-can-i-create-dinero-objects-from-floats\n * @example\n * floatToInt(69.10, 10, 2); // 6910\n * floatToInt(42, 10, 2); // 4200\n * floatToInt(0.22, 10, 6); // 220000\n */\nexport const floatToInt = (\n floatAmount: number,\n base: number,\n exponent: number,\n // FIXME: pass in the rounding method and or use roundDinero\n): number => Round.Financial(floatAmount * Math.pow(base, exponent));\n\n/**\n * FIXME: is it private tho?!\n */\nexport const decimalToDinero = (\n decimalAmount: string | number,\n currency: DinoCurrency,\n // FIXME: rounding method?!\n) => {\n const parsedNumber =\n typeof decimalAmount === \"number\"\n ? decimalAmount\n : Number.parseFloat(decimalAmount);\n isFloat(parsedNumber);\n\n const parsedNumberInt = Number.parseInt(\n (parsedNumber * Math.pow(10, currency.exponent)).toFixed(0),\n );\n return dinero({\n amount: parsedNumberInt,\n currency,\n });\n};\n"],"names":["currencyLookup","Set","Object","keys","Currency","map","el","toString","dineroCurrenciesLookup","Map","values","currencies","currency","code","floatToInt","floatAmount","base","exponent","Round","Financial","Math","pow","decimalToDinero","decimalAmount","parsedNumber","Number","parseFloat","isFloat","parsedNumberInt","parseInt","toFixed","dinero","amount"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeO,MAAMA,iBAAiB,IAAIC,GAAA,CAChCC,MAAA,CAAOC,KAAKC,SAAAA,CAAAA,QAAQ,CAAA,CAAEC,IAAKC,EAAA,IAAOA,EAAG,CAAAC,QAAA,EAAU,CACjD,CAAA;AAKO,MAAMC,yBAAyB,IAAIC,GAAA,CACxCP,MAAA,CAAOQ,MAAO,CAAAC,qBAAU,CAAE,CAAAN,GAAA,CAAKO,QAAA,IAAa,CAACA,QAAA,CAASC,IAAM,EAAAD,QAAQ,CAAC,CACvE,CAAA;AAUO,MAAME,UAAa,GAAAA,CACxBC,WACA,EAAAC,IAAA,EACAC,QAEW,KAAAC,SAAA,CAAAA,KAAA,CAAMC,SAAU,CAAAJ,WAAA,GAAcK,IAAK,CAAAC,GAAA,CAAIL,IAAM,EAAAC,QAAQ,CAAC,CAAA;AAKtD,MAAAK,eAAA,GAAkBA,CAC7BC,aAAA,EACAX,QAEG,KAAA;EACH,MAAMY,eACJ,OAAOD,aAAA,KAAkB,WACrBA,aACA,GAAAE,MAAA,CAAOC,WAAWH,aAAa,CAAA;EACrCI,MAAA,CAAAA,OAAA,CAAQH,YAAY,CAAA;EAEpB,MAAMI,kBAAkBH,MAAO,CAAAI,QAAA,CAC5B,CAAAL,YAAA,GAAeJ,KAAKC,GAAI,CAAA,EAAA,EAAIT,SAASK,QAAQ,CAAA,EAAGa,QAAQ,CAAC,CAAA,CAC5D;EACA,OAAOC,gBAAO,CAAA;IACZC,MAAQ,EAAAJ,eAAA;IACRhB;EAAA,CACD,CAAA;AACH,CAAA;;;;"}
@@ -1,21 +0,0 @@
1
- import * as currencies from '@dinero.js/currencies';
2
- import { dinero } from 'dinero.js';
3
- import '../../types/index.mjs';
4
- import { isFloat } from '../number.mjs';
5
- import { Round } from './constants.mjs';
6
- import { Currency } from '../../types/generated.mjs';
7
- "use strict";
8
- const currencyLookup = new Set(Object.keys(Currency).map(el => el.toString()));
9
- const dineroCurrenciesLookup = new Map(Object.values(currencies).map(currency => [currency.code, currency]));
10
- const floatToInt = (floatAmount, base, exponent) => Round.Financial(floatAmount * Math.pow(base, exponent));
11
- const decimalToDinero = (decimalAmount, currency) => {
12
- const parsedNumber = typeof decimalAmount === "number" ? decimalAmount : Number.parseFloat(decimalAmount);
13
- isFloat(parsedNumber);
14
- const parsedNumberInt = Number.parseInt((parsedNumber * Math.pow(10, currency.exponent)).toFixed(0));
15
- return dinero({
16
- amount: parsedNumberInt,
17
- currency
18
- });
19
- };
20
- export { currencyLookup, decimalToDinero, dineroCurrenciesLookup, floatToInt };
21
- //# sourceMappingURL=misc.private.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"misc.private.mjs","sources":["../../../src/utils/money/misc.private.ts"],"sourcesContent":["// #############################################################################\n// Internal helper functions not for consumption outside of store.core!\n// Wrote as separate files so that they can be easily unit tested without exposing them\n// #############################################################################\nimport * as currencies from \"@dinero.js/currencies\";\nimport { dinero } from \"dinero.js\";\n\nimport { Currency } from \"../../types\";\nimport { isFloat } from \"../number\";\nimport { Round } from \"./constants\";\nimport type { DinoCurrency } from \"./types\";\n\n/**\n * Fast lookup for our custom currency enum to check that given currency is valid\n */\nexport const currencyLookup = new Set(\n Object.keys(Currency).map((el) => el.toString()),\n);\n\n/**\n * Dinero currency lookup to check that given currency is valid\n */\nexport const dineroCurrenciesLookup = new Map(\n Object.values(currencies).map((currency) => [currency.code, currency]),\n);\n\n/**\n * Private util to convert a float value into a int. Also applies financial rounding to the value if needed.\n * Inspired by https://v2.dinerojs.com/docs/faq/how-can-i-create-dinero-objects-from-floats\n * @example\n * floatToInt(69.10, 10, 2); // 6910\n * floatToInt(42, 10, 2); // 4200\n * floatToInt(0.22, 10, 6); // 220000\n */\nexport const floatToInt = (\n floatAmount: number,\n base: number,\n exponent: number,\n // FIXME: pass in the rounding method and or use roundDinero\n): number => Round.Financial(floatAmount * Math.pow(base, exponent));\n\n/**\n * FIXME: is it private tho?!\n */\nexport const decimalToDinero = (\n decimalAmount: string | number,\n currency: DinoCurrency,\n // FIXME: rounding method?!\n) => {\n const parsedNumber =\n typeof decimalAmount === \"number\"\n ? decimalAmount\n : Number.parseFloat(decimalAmount);\n isFloat(parsedNumber);\n\n const parsedNumberInt = Number.parseInt(\n (parsedNumber * Math.pow(10, currency.exponent)).toFixed(0),\n );\n return dinero({\n amount: parsedNumberInt,\n currency,\n });\n};\n"],"names":["currencyLookup","Set","Object","keys","Currency","map","el","toString","dineroCurrenciesLookup","Map","values","currencies","currency","code","floatToInt","floatAmount","base","exponent","Round","Financial","Math","pow","decimalToDinero","decimalAmount","parsedNumber","Number","parseFloat","isFloat","parsedNumberInt","parseInt","toFixed","dinero","amount"],"mappings":";;;;;;;AAeO,MAAMA,iBAAiB,IAAIC,GAAA,CAChCC,MAAA,CAAOC,KAAKC,QAAQ,CAAA,CAAEC,IAAKC,EAAA,IAAOA,EAAG,CAAAC,QAAA,EAAU,CACjD,CAAA;AAKO,MAAMC,yBAAyB,IAAIC,GAAA,CACxCP,MAAA,CAAOQ,MAAO,CAAAC,UAAU,CAAE,CAAAN,GAAA,CAAKO,QAAA,IAAa,CAACA,QAAA,CAASC,IAAM,EAAAD,QAAQ,CAAC,CACvE,CAAA;AAUO,MAAME,UAAa,GAAAA,CACxBC,WACA,EAAAC,IAAA,EACAC,QAEW,KAAAC,KAAA,CAAMC,SAAU,CAAAJ,WAAA,GAAcK,IAAK,CAAAC,GAAA,CAAIL,IAAM,EAAAC,QAAQ,CAAC,CAAA;AAKtD,MAAAK,eAAA,GAAkBA,CAC7BC,aAAA,EACAX,QAEG,KAAA;EACH,MAAMY,eACJ,OAAOD,aAAA,KAAkB,WACrBA,aACA,GAAAE,MAAA,CAAOC,WAAWH,aAAa,CAAA;EACrCI,OAAA,CAAQH,YAAY,CAAA;EAEpB,MAAMI,kBAAkBH,MAAO,CAAAI,QAAA,CAC5B,CAAAL,YAAA,GAAeJ,KAAKC,GAAI,CAAA,EAAA,EAAIT,SAASK,QAAQ,CAAA,EAAGa,QAAQ,CAAC,CAAA,CAC5D;EACA,OAAOC,MAAO,CAAA;IACZC,MAAQ,EAAAJ,eAAA;IACRhB;EAAA,CACD,CAAA;AACH,CAAA;"}
@@ -1,5 +0,0 @@
1
- import type { Dino } from "./types";
2
- /**
3
- * Rounding for shipping price used only after applying
4
- */
5
- export declare const roundShippingPrice: (price: Dino) => Dino;
@@ -1,8 +0,0 @@
1
- 'use strict';
2
-
3
- var constants = require('./constants.js');
4
- var misc = require('./misc.js');
5
- "use strict";
6
- const roundShippingPrice = price => misc.roundDinero(price, constants.Round.Shipping);
7
- exports.roundShippingPrice = roundShippingPrice;
8
- //# sourceMappingURL=shipping.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shipping.js","sources":["../../../src/utils/money/shipping.ts"],"sourcesContent":["import { Round } from \"./constants\";\nimport { roundDinero } from \"./misc\";\nimport type { Dino } from \"./types\";\n\n/**\n * Rounding for shipping price used only after applying\n */\nexport const roundShippingPrice = (price: Dino) =>\n roundDinero(price, Round.Shipping);\n"],"names":["roundShippingPrice","price","roundDinero","Round","Shipping"],"mappings":";;;;;AAOO,MAAMA,qBAAsBC,KAAA,IACjCC,IAAY,CAAAA,WAAA,CAAAD,KAAA,EAAOE,gBAAMC,QAAQ,CAAA;"}
@@ -1,6 +0,0 @@
1
- import { Round } from './constants.mjs';
2
- import { roundDinero } from './misc.mjs';
3
- "use strict";
4
- const roundShippingPrice = price => roundDinero(price, Round.Shipping);
5
- export { roundShippingPrice };
6
- //# sourceMappingURL=shipping.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shipping.mjs","sources":["../../../src/utils/money/shipping.ts"],"sourcesContent":["import { Round } from \"./constants\";\nimport { roundDinero } from \"./misc\";\nimport type { Dino } from \"./types\";\n\n/**\n * Rounding for shipping price used only after applying\n */\nexport const roundShippingPrice = (price: Dino) =>\n roundDinero(price, Round.Shipping);\n"],"names":["roundShippingPrice","price","roundDinero","Round","Shipping"],"mappings":";;;AAOO,MAAMA,qBAAsBC,KAAA,IACjCC,WAAY,CAAAD,KAAA,EAAOE,MAAMC,QAAQ,CAAA;"}
@@ -1,17 +0,0 @@
1
- import type { Dinero } from "dinero.js";
2
- import type { Cents, LineItemSummary, SingleLineItemSummary, TaxRate } from "./types";
3
- /**
4
- * Private helper to convert a floating number to a dinero friendly allocation integer pair
5
- * @see https://v2.dinerojs.com/docs/api/mutations/allocate
6
- * @example
7
- * taxRateToDineroAllocation(0.1) // [1, 9]
8
- * taxRateToDineroAllocation(0.5) // [5, 5]
9
- */
10
- export declare const taxRateToDineroAllocation: (taxRate: TaxRate) => [number, number];
11
- /**
12
- * Reverse engineer the taxable amount from "whole item" taxable amount into "per item" taxable amount for custom tax
13
- * rate calculations
14
- */
15
- export declare const allocatePerItemTaxableAmount: (itemSummary: LineItemSummary) => SingleLineItemSummary[];
16
- export declare const calculateWholeQtyLineItemTax: (itemSummary: LineItemSummary, taxRate: TaxRate) => Dinero<Cents>;
17
- export declare const calculatePerQtyLineItemTax: (itemSummary: LineItemSummary, taxRate: TaxRate) => Dinero<Cents>;