@duffel/components 2.7.20 → 3.0.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 (345) hide show
  1. package/.circleci/config.yml +67 -0
  2. package/.eslintrc.js +47 -0
  3. package/.github/renovate.json +16 -0
  4. package/.github/workflows/autoapprove.yml +18 -0
  5. package/.github/workflows/release.yml +89 -0
  6. package/.husky/post-commit +4 -0
  7. package/.husky/pre-commit +4 -0
  8. package/.nvmrc +1 -0
  9. package/.prettierignore +2 -0
  10. package/.storybook/Storyshots.test.js +3 -0
  11. package/.storybook/__snapshots__/Storyshots.test.js.snap +48318 -0
  12. package/.storybook/main.ts +33 -0
  13. package/.storybook/preview.tsx +28 -0
  14. package/.tool-versions +1 -0
  15. package/CONTRIBUTING.md +83 -0
  16. package/README.md +53 -15
  17. package/__mocks__/styleMock.js +6 -0
  18. package/babel.config.js +20 -0
  19. package/commitlint.config.js +4 -0
  20. package/config/esbuild.base.config.js +18 -0
  21. package/config/esbuild.cdn.config.js +51 -0
  22. package/config/esbuild.dev.config.js +46 -0
  23. package/config/esbuild.react.config.js +42 -0
  24. package/jest.config.ts +14 -0
  25. package/package.json +135 -193
  26. package/react-dist/components/DuffelAncillaries/Card.d.ts +14 -0
  27. package/react-dist/components/DuffelAncillaries/Counter.d.ts +10 -0
  28. package/react-dist/components/DuffelAncillaries/DuffelAncillaries.d.ts +3 -0
  29. package/react-dist/components/DuffelAncillaries/DuffelAncillariesCustomElement.d.ts +13 -0
  30. package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionCard.d.ts +11 -0
  31. package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionController.d.ts +13 -0
  32. package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModal.d.ts +11 -0
  33. package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalBody.d.ts +11 -0
  34. package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.d.ts +13 -0
  35. package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.d.ts +14 -0
  36. package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.d.ts +9 -0
  37. package/react-dist/components/DuffelAncillaries/bags/IncludedBaggageBanner.d.ts +7 -0
  38. package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.d.ts +10 -0
  39. package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.d.ts +11 -0
  40. package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.d.ts +7 -0
  41. package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.d.ts +4 -0
  42. package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.d.ts +11 -0
  43. package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.d.ts +2 -0
  44. package/react-dist/components/DuffelAncillaries/seats/Amenity.d.ts +6 -0
  45. package/react-dist/components/DuffelAncillaries/seats/DeckSelect.d.ts +15 -0
  46. package/react-dist/components/DuffelAncillaries/seats/Element.d.ts +15 -0
  47. package/react-dist/components/DuffelAncillaries/seats/EmptyElement.d.ts +2 -0
  48. package/react-dist/components/DuffelAncillaries/seats/ExitElement.d.ts +6 -0
  49. package/react-dist/components/DuffelAncillaries/seats/Legend.d.ts +12 -0
  50. package/react-dist/components/DuffelAncillaries/seats/Row.d.ts +13 -0
  51. package/react-dist/components/DuffelAncillaries/seats/RowSection.d.ts +17 -0
  52. package/react-dist/components/DuffelAncillaries/seats/SeatElement.d.ts +13 -0
  53. package/react-dist/components/DuffelAncillaries/seats/SeatInfo.d.ts +7 -0
  54. package/react-dist/components/DuffelAncillaries/seats/SeatMap.d.ts +12 -0
  55. package/react-dist/components/DuffelAncillaries/seats/SeatMapUnavailable.d.ts +2 -0
  56. package/react-dist/components/DuffelAncillaries/seats/SeatSelectionCard.d.ts +13 -0
  57. package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModal.d.ts +13 -0
  58. package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModalBody.d.ts +4 -0
  59. package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModalFooter.d.ts +16 -0
  60. package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModalHeader.d.ts +10 -0
  61. package/react-dist/components/DuffelAncillaries/seats/SeatUnavailable.d.ts +5 -0
  62. package/react-dist/components/DuffelPayments/DuffelPayments.d.ts +11 -0
  63. package/react-dist/components/DuffelPayments/DuffelPaymentsCustomElement.d.ts +14 -0
  64. package/react-dist/components/shared/AnimatedLoaderEllipsis.d.ts +2 -0
  65. package/react-dist/components/shared/Button.d.ts +23 -0
  66. package/react-dist/components/shared/ErrorBoundary.d.ts +13 -0
  67. package/react-dist/components/shared/FetchOfferErrorState.d.ts +5 -0
  68. package/react-dist/components/shared/Icon.d.ts +44 -0
  69. package/react-dist/components/shared/IconButton.d.ts +16 -0
  70. package/react-dist/components/shared/Modal.d.ts +11 -0
  71. package/react-dist/components/shared/NonIdealState.d.ts +4 -0
  72. package/react-dist/components/shared/Stamp.d.ts +7 -0
  73. package/react-dist/components/shared/Tabs.d.ts +16 -0
  74. package/react-dist/custom-elements.d.ts +6 -0
  75. package/react-dist/custom-elements.js +37 -0
  76. package/react-dist/custom-elements.js.map +7 -0
  77. package/react-dist/index.d.ts +7 -0
  78. package/react-dist/index.js +37 -0
  79. package/react-dist/index.js.map +7 -0
  80. package/react-dist/lib/captureErrorInSentry.d.ts +1 -0
  81. package/react-dist/lib/compileCreateOrderPayload.d.ts +14 -0
  82. package/react-dist/lib/createPriceFormatters.d.ts +12 -0
  83. package/react-dist/lib/fetchFromDuffelAPI.d.ts +8 -0
  84. package/react-dist/lib/fetchFromFixtures.d.ts +4 -0
  85. package/react-dist/lib/formatAvailableServices.d.ts +12 -0
  86. package/react-dist/lib/formatDate.d.ts +2 -0
  87. package/react-dist/lib/formatSeatMaps.d.ts +4 -0
  88. package/react-dist/lib/getBaggageServiceDescription.d.ts +2 -0
  89. package/react-dist/lib/getCabinsForSegmentAndDeck.d.ts +2 -0
  90. package/react-dist/lib/getCurrencyForSeatMaps.d.ts +10 -0
  91. package/react-dist/lib/getCurrencyForServices.d.ts +11 -0
  92. package/react-dist/lib/getFirstSeatElementMatchingCriteria.d.ts +3 -0
  93. package/react-dist/lib/getPassengerBySegmentList.d.ts +6 -0
  94. package/react-dist/lib/getPassengerInitials.d.ts +1 -0
  95. package/react-dist/lib/getPassengerMapById.d.ts +3 -0
  96. package/react-dist/lib/getPassengerName.d.ts +3 -0
  97. package/react-dist/lib/getRowNumber.d.ts +2 -0
  98. package/react-dist/lib/getSegmentList.d.ts +2 -0
  99. package/react-dist/lib/getServicePriceMapById.d.ts +3 -0
  100. package/react-dist/lib/getSymbols.d.ts +2 -0
  101. package/react-dist/lib/getTotalAmountForServices.d.ts +6 -0
  102. package/react-dist/lib/getTotalQuantity.d.ts +2 -0
  103. package/react-dist/lib/hasService.d.ts +2 -0
  104. package/react-dist/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.d.ts +3 -0
  105. package/react-dist/lib/hasWings.d.ts +2 -0
  106. package/react-dist/lib/isBaggageService.d.ts +2 -0
  107. package/react-dist/lib/isCancelForAnyReasonService.d.ts +2 -0
  108. package/react-dist/lib/isFixtureOfferId.d.ts +2 -0
  109. package/react-dist/lib/isPayloadComplete.d.ts +2 -0
  110. package/react-dist/lib/isSeatElement.d.ts +2 -0
  111. package/react-dist/lib/logging.d.ts +46 -0
  112. package/react-dist/lib/moneyStringFormatter.d.ts +8 -0
  113. package/react-dist/lib/offerIsExpired.d.ts +2 -0
  114. package/react-dist/lib/retrieveOffer.d.ts +2 -0
  115. package/react-dist/lib/retrieveOfferFromDuffelAPI.d.ts +1 -0
  116. package/react-dist/lib/retrieveSeatMaps.d.ts +2 -0
  117. package/react-dist/lib/retrieveSeatMapsFromDuffelAPI.d.ts +1 -0
  118. package/react-dist/lib/setBodyScrollability.d.ts +1 -0
  119. package/react-dist/lib/validateProps.d.ts +7 -0
  120. package/react-dist/lib/withPlural.d.ts +1 -0
  121. package/react-dist/types/Aircraft.d.ts +14 -0
  122. package/react-dist/types/Airline.d.ts +14 -0
  123. package/react-dist/types/Airport.d.ts +44 -0
  124. package/react-dist/types/City.d.ts +18 -0
  125. package/react-dist/types/CreateOrderPayload.d.ts +72 -0
  126. package/react-dist/types/CurrencyConversion.d.ts +10 -0
  127. package/react-dist/types/DuffelAncillariesProps.d.ts +70 -0
  128. package/react-dist/types/Offer.d.ts +711 -0
  129. package/react-dist/types/Order.d.ts +8 -0
  130. package/react-dist/types/Place.d.ts +8 -0
  131. package/react-dist/types/SeatMap.d.ts +190 -0
  132. package/react-dist/types/index.d.ts +11 -0
  133. package/scripts/generate-fixture.ts +200 -0
  134. package/scripts/upload-to-cdn.sh +34 -0
  135. package/scripts.tsconfig.json +11 -0
  136. package/src/components/DuffelAncillaries/Card.tsx +126 -0
  137. package/src/components/DuffelAncillaries/Counter.tsx +40 -0
  138. package/src/components/DuffelAncillaries/DuffelAncillaries.tsx +344 -0
  139. package/src/components/DuffelAncillaries/DuffelAncillariesCustomElement.tsx +124 -0
  140. package/src/components/DuffelAncillaries/bags/BaggageSelectionCard.tsx +96 -0
  141. package/src/components/DuffelAncillaries/bags/BaggageSelectionController.tsx +88 -0
  142. package/src/components/DuffelAncillaries/bags/BaggageSelectionModal.tsx +81 -0
  143. package/src/components/DuffelAncillaries/bags/BaggageSelectionModalBody.tsx +60 -0
  144. package/src/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.tsx +122 -0
  145. package/src/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.tsx +81 -0
  146. package/src/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.tsx +76 -0
  147. package/src/components/DuffelAncillaries/bags/IncludedBaggageBanner.tsx +51 -0
  148. package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.tsx +90 -0
  149. package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.tsx +63 -0
  150. package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.tsx +56 -0
  151. package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.tsx +11 -0
  152. package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.tsx +74 -0
  153. package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.tsx +9 -0
  154. package/src/components/DuffelAncillaries/seats/Amenity.tsx +21 -0
  155. package/src/components/DuffelAncillaries/seats/DeckSelect.tsx +27 -0
  156. package/src/components/DuffelAncillaries/seats/Element.tsx +52 -0
  157. package/src/components/DuffelAncillaries/seats/EmptyElement.tsx +5 -0
  158. package/src/components/DuffelAncillaries/seats/ExitElement.tsx +17 -0
  159. package/src/components/DuffelAncillaries/seats/Legend.tsx +60 -0
  160. package/src/components/DuffelAncillaries/seats/Row.tsx +47 -0
  161. package/src/components/DuffelAncillaries/seats/RowSection.tsx +78 -0
  162. package/src/components/DuffelAncillaries/seats/SeatElement.tsx +120 -0
  163. package/src/components/DuffelAncillaries/seats/SeatInfo.tsx +32 -0
  164. package/src/components/DuffelAncillaries/seats/SeatMap.tsx +81 -0
  165. package/src/components/DuffelAncillaries/seats/SeatMapUnavailable.tsx +21 -0
  166. package/src/components/DuffelAncillaries/seats/SeatSelectionCard.tsx +103 -0
  167. package/src/components/DuffelAncillaries/seats/SeatSelectionModal.tsx +142 -0
  168. package/src/components/DuffelAncillaries/seats/SeatSelectionModalBody.tsx +13 -0
  169. package/src/components/DuffelAncillaries/seats/SeatSelectionModalFooter.tsx +82 -0
  170. package/src/components/DuffelAncillaries/seats/SeatSelectionModalHeader.tsx +87 -0
  171. package/src/components/DuffelAncillaries/seats/SeatUnavailable.tsx +14 -0
  172. package/src/components/DuffelPayments/DuffelPayments.tsx +218 -0
  173. package/src/components/DuffelPayments/DuffelPaymentsCustomElement.tsx +130 -0
  174. package/src/components/shared/AnimatedLoaderEllipsis.tsx +5 -0
  175. package/src/components/shared/Button.tsx +63 -0
  176. package/src/components/shared/ErrorBoundary.tsx +54 -0
  177. package/src/components/shared/FetchOfferErrorState.tsx +35 -0
  178. package/src/components/shared/Icon.tsx +152 -0
  179. package/src/components/shared/IconButton.tsx +42 -0
  180. package/src/components/shared/Modal.tsx +40 -0
  181. package/src/components/shared/NonIdealState.tsx +28 -0
  182. package/src/components/shared/Stamp.tsx +29 -0
  183. package/src/components/shared/Tabs.tsx +36 -0
  184. package/src/custom-elements.ts +13 -0
  185. package/src/examples/client-side/README.md +30 -0
  186. package/src/examples/client-side/index.html +57 -0
  187. package/src/examples/full-stack/README.md +34 -0
  188. package/src/examples/full-stack/index.html +48 -0
  189. package/src/examples/full-stack/server.mjs +158 -0
  190. package/src/examples/just-typescript/README.md +37 -0
  191. package/src/examples/just-typescript/package.json +16 -0
  192. package/src/examples/just-typescript/src/index.html +23 -0
  193. package/src/examples/just-typescript/src/index.ts +36 -0
  194. package/src/examples/just-typescript/yarn.lock +154 -0
  195. package/src/examples/payments-custom-element/README.md +17 -0
  196. package/src/examples/payments-custom-element/index.html +43 -0
  197. package/src/examples/payments-just-typescript/README.md +37 -0
  198. package/src/examples/payments-just-typescript/package.json +16 -0
  199. package/src/examples/payments-just-typescript/src/index.html +23 -0
  200. package/src/examples/payments-just-typescript/src/index.ts +18 -0
  201. package/src/examples/payments-just-typescript/yarn.lock +154 -0
  202. package/src/examples/react-app/README.md +37 -0
  203. package/src/examples/react-app/package.json +20 -0
  204. package/src/examples/react-app/src/index.html +19 -0
  205. package/src/examples/react-app/src/index.tsx +48 -0
  206. package/src/examples/react-app/yarn.lock +219 -0
  207. package/src/fixtures/offers/off_0000AUde3KwTztSRK1cznH.json +497 -0
  208. package/src/fixtures/offers/off_0000AVx4lUFFKW8PsPeQeQ.json +307 -0
  209. package/src/fixtures/offers/off_1.json +497 -0
  210. package/src/fixtures/passengers/mock_passengers.ts +26 -0
  211. package/src/fixtures/seat-maps/off_0000AUde3KwTztSRK1cznH.json +6852 -0
  212. package/src/fixtures/seat-maps/off_0000AVx4lUFFKW8PsPeQeQ.json +1 -0
  213. package/src/fixtures/seat-maps/off_1.json +6852 -0
  214. package/src/index.ts +7 -0
  215. package/src/lib/captureErrorInSentry.ts +42 -0
  216. package/src/lib/compileCreateOrderPayload.ts +63 -0
  217. package/src/lib/createPriceFormatters.ts +73 -0
  218. package/src/lib/fetchFromDuffelAPI.ts +54 -0
  219. package/src/lib/fetchFromFixtures.ts +18 -0
  220. package/src/lib/formatAvailableServices.ts +91 -0
  221. package/src/lib/formatDate.ts +20 -0
  222. package/src/lib/formatSeatMaps.ts +81 -0
  223. package/src/lib/getBaggageServiceDescription.ts +42 -0
  224. package/src/lib/getCabinsForSegmentAndDeck.ts +4 -0
  225. package/src/lib/getCurrencyForSeatMaps.ts +22 -0
  226. package/src/lib/getCurrencyForServices.ts +24 -0
  227. package/src/lib/getFirstSeatElementMatchingCriteria.ts +22 -0
  228. package/src/lib/getPassengerBySegmentList.ts +10 -0
  229. package/src/lib/getPassengerInitials.ts +6 -0
  230. package/src/lib/getPassengerMapById.ts +17 -0
  231. package/src/lib/getPassengerName.ts +37 -0
  232. package/src/lib/getRowNumber.ts +16 -0
  233. package/src/lib/getSegmentList.ts +7 -0
  234. package/src/lib/getServicePriceMapById.ts +20 -0
  235. package/src/lib/getSymbols.ts +22 -0
  236. package/src/lib/getTotalAmountForServices.ts +72 -0
  237. package/src/lib/getTotalQuantity.ts +5 -0
  238. package/src/lib/hasService.ts +24 -0
  239. package/src/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.ts +35 -0
  240. package/src/lib/hasWings.ts +8 -0
  241. package/src/lib/isBaggageService.ts +8 -0
  242. package/src/lib/isCancelForAnyReasonService.ts +9 -0
  243. package/src/lib/isFixtureOfferId.ts +4 -0
  244. package/src/lib/isPayloadComplete.ts +11 -0
  245. package/src/lib/isSeatElement.ts +10 -0
  246. package/src/lib/logging.ts +120 -0
  247. package/src/lib/moneyStringFormatter.ts +34 -0
  248. package/src/lib/offerIsExpired.ts +5 -0
  249. package/src/lib/retrieveOffer.ts +54 -0
  250. package/src/lib/retrieveOfferFromDuffelAPI.ts +13 -0
  251. package/src/lib/retrieveSeatMaps.ts +55 -0
  252. package/src/lib/retrieveSeatMapsFromDuffelAPI.ts +13 -0
  253. package/src/lib/setBodyScrollability.ts +7 -0
  254. package/src/lib/validateProps.ts +37 -0
  255. package/src/lib/withPlural.ts +8 -0
  256. package/src/stories/BaggageSelectionModalHeader.stories.tsx +21 -0
  257. package/src/stories/Button.stories.tsx +69 -0
  258. package/src/stories/DuffelAncillaries.stories.tsx +126 -0
  259. package/src/stories/DuffelPayments.stories.tsx +34 -0
  260. package/src/stories/Icon.stories.tsx +35 -0
  261. package/src/stories/IconButton.stories.tsx +25 -0
  262. package/src/styles/colors.css +22 -0
  263. package/src/styles/components/Amenity.css +23 -0
  264. package/src/styles/components/BaggageDisplay.css +25 -0
  265. package/src/styles/components/Button.css +161 -0
  266. package/src/styles/components/Card.css +52 -0
  267. package/src/styles/components/CfarSelectionModal.css +34 -0
  268. package/src/styles/components/Counter.css +18 -0
  269. package/src/styles/components/DuffelPayments.css +42 -0
  270. package/src/styles/components/IconButton.css +63 -0
  271. package/src/styles/components/Legend.css +58 -0
  272. package/src/styles/components/Loader.css +37 -0
  273. package/src/styles/components/LoadingState.css +81 -0
  274. package/src/styles/components/Modal.css +84 -0
  275. package/src/styles/components/PassengerSelect.css +93 -0
  276. package/src/styles/components/PassengersLayout.css +90 -0
  277. package/src/styles/components/Row.css +70 -0
  278. package/src/styles/components/Seat.css +57 -0
  279. package/src/styles/components/SeatInfo.css +61 -0
  280. package/src/styles/components/SeatMap.css +24 -0
  281. package/src/styles/components/SeatSelect.css +92 -0
  282. package/src/styles/components/Segment.css +17 -0
  283. package/src/styles/components/SelectionSegment.css +10 -0
  284. package/src/styles/components/Summary.css +70 -0
  285. package/src/styles/components/Tabs.css +49 -0
  286. package/src/styles/flex.css +5 -0
  287. package/src/styles/font-families.css +47 -0
  288. package/src/styles/global.css +51 -0
  289. package/src/styles/margin.css +3 -0
  290. package/src/styles/spacing.css +18 -0
  291. package/src/styles/transitions.css +3 -0
  292. package/src/styles/typography.css +13 -0
  293. package/src/tests/components/DuffelAncillaries.test.tsx +342 -0
  294. package/src/tests/lib/createPriceFormatters.test.tsx +152 -0
  295. package/src/tests/lib/formatAvailableServices.test.tsx +79 -0
  296. package/src/tests/lib/formatSeatMaps.test.tsx +49 -0
  297. package/src/tests/lib/getCurrencyForServices.test.tsx +44 -0
  298. package/src/tests/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.test.ts +86 -0
  299. package/src/tests/lib/logging.test.tsx +32 -0
  300. package/src/tests/lib/moneyStringFormatter.test.tsx +12 -0
  301. package/src/tests/lib/validateProps.test.tsx +57 -0
  302. package/src/types/Aircraft.ts +16 -0
  303. package/src/types/Airline.ts +16 -0
  304. package/src/types/Airport.ts +54 -0
  305. package/src/types/City.ts +21 -0
  306. package/src/types/CreateOrderPayload.ts +99 -0
  307. package/src/types/CurrencyConversion.ts +10 -0
  308. package/src/types/DuffelAncillariesProps.ts +108 -0
  309. package/src/types/Offer.ts +851 -0
  310. package/src/types/Order.ts +6 -0
  311. package/src/types/Place.ts +6 -0
  312. package/src/types/SeatMap.ts +231 -0
  313. package/src/types/index.ts +11 -0
  314. package/tsconfig.json +52 -0
  315. package/LICENSE +0 -21
  316. package/dist/AdditionalBaggage.esm.js +0 -1
  317. package/dist/AdditionalBaggage.js +0 -1
  318. package/dist/AdditionalBaggage.min.css +0 -408
  319. package/dist/AdditionalBaggage.umd.min.js +0 -2
  320. package/dist/AdditionalBaggage.umd.min.js.LICENSE.txt +0 -60
  321. package/dist/AdditionalBaggageSelection.esm.js +0 -1
  322. package/dist/AdditionalBaggageSelection.js +0 -1
  323. package/dist/AdditionalBaggageSelection.min.css +0 -744
  324. package/dist/AdditionalBaggageSelection.umd.min.js +0 -2
  325. package/dist/AdditionalBaggageSelection.umd.min.js.LICENSE.txt +0 -93
  326. package/dist/CardPayment.esm.js +0 -2
  327. package/dist/CardPayment.esm.js.LICENSE.txt +0 -6
  328. package/dist/CardPayment.js +0 -2
  329. package/dist/CardPayment.js.LICENSE.txt +0 -6
  330. package/dist/CardPayment.min.css +0 -233
  331. package/dist/CardPayment.umd.min.js +0 -2
  332. package/dist/CardPayment.umd.min.js.LICENSE.txt +0 -61
  333. package/dist/SeatSelection.esm.js +0 -1
  334. package/dist/SeatSelection.js +0 -1
  335. package/dist/SeatSelection.min.css +0 -1127
  336. package/dist/SeatSelection.umd.min.js +0 -2
  337. package/dist/SeatSelection.umd.min.js.LICENSE.txt +0 -60
  338. package/dist/duffel-components.d.ts +0 -1614
  339. package/dist/duffel-components.esm.js +0 -2
  340. package/dist/duffel-components.esm.js.LICENSE.txt +0 -6
  341. package/dist/duffel-components.js +0 -2
  342. package/dist/duffel-components.js.LICENSE.txt +0 -6
  343. package/dist/duffel-components.min.css +0 -1280
  344. package/dist/duffel-components.umd.min.js +0 -2
  345. package/dist/duffel-components.umd.min.js.LICENSE.txt +0 -102
@@ -0,0 +1,6 @@
1
+ export type Order = {
2
+ id: string;
3
+ [any: string]: any;
4
+ slices: { segments: any[] }[];
5
+ };
6
+ export type OrderAvailableService = any;
@@ -0,0 +1,6 @@
1
+ import { Airport } from "./Airport";
2
+ import { City } from "./City";
3
+
4
+ export type Place =
5
+ | (Airport & { type?: "airport"; airports?: Airport[] | null })
6
+ | (City & { type?: "city" });
@@ -0,0 +1,231 @@
1
+ /**
2
+ * Seat maps are used to build a rich experience for your customers so they can select a seat as part of an order.
3
+ * A seat map includes the data for rendering seats in the relevant cabins, along with their total cost and other information such as disclosures.
4
+ * @link https://duffel.com/docs/api/seat-maps/schema
5
+ */
6
+ export interface SeatMap {
7
+ /**
8
+ * Duffel's unique identifier for the seat map
9
+ */
10
+ id: string;
11
+
12
+ /**
13
+ * Duffel's unique identifier for the slice. It identifies the slice of an offer (i.e. the same slice across offers will have different ids.)
14
+ */
15
+ slice_id: string;
16
+
17
+ /**
18
+ * Duffel's unique identifier for the segment. It identifies the segment of an offer (i.e. the same segment across offers will have different ids).
19
+ */
20
+ segment_id: string;
21
+
22
+ /**
23
+ * The list of cabins in this seat map.
24
+ * Cabins are ordered by deck from lowest to highest, and then within each deck from the front to back of the aircraft.
25
+ */
26
+ cabins: SeatMapCabin[];
27
+ }
28
+
29
+ export interface SeatMapCabin {
30
+ /**
31
+ * Level 0 is the main deck and level 1 is the upper deck above that, which is found on some large aircraft.
32
+ */
33
+ deck: number;
34
+
35
+ /**
36
+ * The cabin class that the passenger will travel in on this segment
37
+ */
38
+ cabin_class: string;
39
+
40
+ /**
41
+ * Where the wings of the aircraft are in relation to rows in the cabin.
42
+ * The numbers correspond to the indices of the first and the last row which are overwing. You can use this to draw a visual representation of the wings to help users get a better idea of what they will see outside their window.
43
+ * The indices are 0 th-based and are for all rows, not just those that have seats.
44
+ * This is null when no rows of the cabin are overwing.
45
+ */
46
+ wings: {
47
+ /**
48
+ * The index of the first row which is overwing, starting from the front of the aircraft.
49
+ */
50
+ first_row_index: number;
51
+
52
+ /**
53
+ * The index of the last row which is overwing, starting from the front of the aircraft.
54
+ */
55
+ last_row_index: number;
56
+ } | null;
57
+
58
+ /**
59
+ * The number of aisles in this cabin.
60
+ * If this is set to 1, each row of the cabin is split into two sections. If this is set to 2, each row of the cabin is split into three section.
61
+ */
62
+ aisles: number;
63
+
64
+ /**
65
+ * A list of rows in this cabin.
66
+ * Row sections are broken up by aisles. Rows are ordered from front to back of the aircraft.
67
+ */
68
+ rows: SeatMapCabinRow[];
69
+ }
70
+
71
+ export interface SeatMapCabinRow {
72
+ /**
73
+ * A list of sections.
74
+ * Each row is divided into sections by one or more aisles.
75
+ */
76
+ sections: SeatMapCabinRowSection[];
77
+ }
78
+
79
+ export interface SeatMapCabinRowSection {
80
+ /**
81
+ * The elements that make up this section.
82
+ */
83
+ elements: SeatMapCabinRowSectionElement[];
84
+ }
85
+
86
+ /**
87
+ * A seat for a passenger. If the available_services list is empty (which will be represented as an empty list : []), the seat is unavailable.
88
+ * For display, all seats should be displayed with the same static width.
89
+ */
90
+ export interface SeatMapCabinRowSectionElementSeat {
91
+ /**
92
+ * The type of this element.
93
+ */
94
+ type: "seat";
95
+
96
+ /**
97
+ * The designator used to uniquely identify the seat, usually made up of a row number and a column letter
98
+ */
99
+ designator: string;
100
+
101
+ /**
102
+ * A name which describes the type of seat, which you can display in your user interface to help customers to understand its features
103
+ */
104
+ name?: string;
105
+
106
+ /**
107
+ * Each disclosure is text, in English, provided by the airline that describes the terms and conditions of this seat. We recommend showing this in your user interface to make sure that customers understand any restrictions and limitations.
108
+ */
109
+ disclosures: string[];
110
+
111
+ /**
112
+ * Seats are considered a special kind of service. There will be at most one service per seat per passenger. A seat can only be booked for one passenger. If a seat has no available services (which will be represented as an empty list : []) then it's unavailable.
113
+ */
114
+ available_services: SeatMapCabinRowSectionAvailableService[];
115
+ }
116
+
117
+ export interface SeatMapCabinRowSectionAvailableService {
118
+ /**
119
+ * Duffel's unique identifier for the service
120
+ */
121
+ id: string;
122
+
123
+ /**
124
+ * The passenger that this seat is for
125
+ */
126
+ passenger_id: string;
127
+
128
+ /**
129
+ * The total price of the seat, including taxes
130
+ */
131
+ total_amount: string;
132
+
133
+ /**
134
+ * The currency of the total_amount, as an ISO 4217 currency code
135
+ */
136
+ total_currency: string;
137
+ }
138
+
139
+ /**
140
+ * A bassinet is a child's cradle. This element will be aligned with the corresponding seat in the following row.
141
+ * For display, this element should have the same width as a seat for proper alignment.
142
+ */
143
+ export interface SeatMapCabinRowSectionElementBassinet {
144
+ /**
145
+ * The type of this element.
146
+ */
147
+ type: "bassinet";
148
+ }
149
+
150
+ /**
151
+ * An empty space used for padding in some non-standard seat arrangements.
152
+ * For display, this element should have the same dimensions as a seat for proper alignment.
153
+ */
154
+ export interface SeatMapCabinRowSectionElementEmpty {
155
+ /**
156
+ * The type of this element.
157
+ */
158
+ type: "empty";
159
+ }
160
+
161
+ /**
162
+ * An exit row represents the extra wide legroom used to reach aircraft exits. There is one exit_row element per row section.
163
+ * Exit row elements only occur in their own row, so they can be displayed as one element across the whole row. Displaying an exit row element filling all available space in its section or using the same width as the seat is also reasonable.
164
+ */
165
+ export interface SeatMapCabinRowSectionElementExitRow {
166
+ /**
167
+ * The type of this element.
168
+ */
169
+ type: "exit_row";
170
+ }
171
+
172
+ /**
173
+ * A lavatory for use by passengers.
174
+ * For display, this element should ideally fill or shrink to available space in a row section. Displaying it with the same width as seat is also reasonable.
175
+ */
176
+ export interface SeatMapCabinRowSectionElementLavatory {
177
+ /**
178
+ * The type of this element.
179
+ */
180
+ type: "lavatory";
181
+ }
182
+
183
+ /**
184
+ * A galley is the compartment where food is cooked or prepared. These are conventionally marked with a teacup symbol.
185
+ * For display, this element should ideally fill or shrink to available space in a row section. Displaying it with the same width as seat is also reasonable.
186
+ */
187
+ export interface SeatMapCabinRowSectionElementGalley {
188
+ /**
189
+ * The type of this element.
190
+ */
191
+ type: "galley";
192
+ }
193
+
194
+ /**
195
+ * A closet used for storage. These are conventionally marked with a clothes hanger symbol.
196
+ * For display, this element should ideally fill or shrink to available space in a row section. Displaying it with the same width as seat is also reasonable.
197
+ */
198
+ export interface SeatMapCabinRowSectionElementCloset {
199
+ /**
200
+ * The type of this element.
201
+ */
202
+ type: "closet";
203
+ }
204
+
205
+ /**
206
+ * A set of stairs to another deck.
207
+ * For display, this element should ideally fill or shrink to available space in a row section. Displaying it with the same width as seat is also reasonable.
208
+ */
209
+ export interface SeatMapCabinRowSectionElementStairs {
210
+ /**
211
+ * The type of this element.
212
+ */
213
+ type: "stairs";
214
+ }
215
+
216
+ export type SeatMapCabinRowSectionElement =
217
+ | SeatMapCabinRowSectionElementSeat
218
+ | SeatMapCabinRowSectionElementBassinet
219
+ | SeatMapCabinRowSectionElementEmpty
220
+ | SeatMapCabinRowSectionElementExitRow
221
+ | SeatMapCabinRowSectionElementLavatory
222
+ | SeatMapCabinRowSectionElementGalley
223
+ | SeatMapCabinRowSectionElementCloset
224
+ | SeatMapCabinRowSectionElementStairs;
225
+
226
+ export type SeatMapCabinRowSectionElementType =
227
+ SeatMapCabinRowSectionElement["type"];
228
+ export type SeatMapCabinRowSectionElementAmenity = Exclude<
229
+ SeatMapCabinRowSectionElementType,
230
+ "empty" | "seat"
231
+ >;
@@ -0,0 +1,11 @@
1
+ export * from "./Aircraft";
2
+ export * from "./Airline";
3
+ export * from "./Airport";
4
+ export * from "./City";
5
+ export * from "./CreateOrderPayload";
6
+ export * from "./CurrencyConversion";
7
+ export * from "./DuffelAncillariesProps";
8
+ export * from "./Offer";
9
+ export * from "./Order";
10
+ export * from "./Place";
11
+ export * from "./SeatMap";
package/tsconfig.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "compilerOptions": {
3
+ "baseUrl": ".",
4
+ "target": "esnext",
5
+ "module": "esnext",
6
+ "lib": [
7
+ "dom",
8
+ "es5",
9
+ "es2015",
10
+ "es2016",
11
+ "es2017",
12
+ "es2018",
13
+ "es2019",
14
+ "es2020",
15
+ "esnext"
16
+ ],
17
+ "sourceMap": true,
18
+ "allowJs": true,
19
+ "isolatedModules": true,
20
+ "strict": true,
21
+ "noImplicitAny": true,
22
+ "alwaysStrict": true,
23
+ "noUnusedParameters": true,
24
+ "noFallthroughCasesInSwitch": true,
25
+ "moduleResolution": "node",
26
+ "paths": {
27
+ "@components/*": ["./src/components/*"],
28
+ "@lib/*": ["./src/lib/*"]
29
+ },
30
+ "jsx": "react-jsx",
31
+ "esModuleInterop": true,
32
+ "forceConsistentCasingInFileNames": true,
33
+ "downlevelIteration": true,
34
+ "typeRoots": ["node_modules/@types", "node_modules/**/types"],
35
+ "incremental": true,
36
+ "declaration": true,
37
+ "emitDeclarationOnly": true,
38
+ "outDir": "react-dist",
39
+ "declarationDir": "react-dist"
40
+ },
41
+ "include": ["src"],
42
+ "exclude": [
43
+ "node_modules",
44
+ "**/**.css.js",
45
+ "./cdn-dist/**/*",
46
+ "./react-dist/**/*",
47
+ "./src/examples/**/*",
48
+ "./src/stories/**/*",
49
+ "./src/fixtures/**/*",
50
+ "./src/tests/**/*"
51
+ ]
52
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2021 Duffel
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1 +0,0 @@
1
- var e={311:(e,a,t)=>{t.d(a,{z:()=>c});var n=t(997),r=t(689),i=t(3),s=t.n(i),o=t(639);const c=r.forwardRef(((e,a)=>{let{className:t,disabled:r=!1,iconAfter:i,iconBefore:c,iconOnly:l,intent:d="PRIMARY",text:C,type:u="button",id:m,...g}=e;const p=s()("duffel-button","duffel-button--solid",t,{"duffel-button--primary":"PRIMARY"===d,"duffel-button--muted":"MUTED"===d,"duffel-button--icon-only":l,"duffel-button--is-disabled":r});return(0,n.jsxs)("button",{ref:a,type:u,className:p,disabled:r,"aria-label":C,"data-testid":m,id:m,...g,children:[c&&(0,n.jsx)(o.J,{className:"duffel-button__icon duffel-button__icon--before",name:c}),l&&(0,n.jsx)(o.J,{className:"duffel-button__icon",name:l}),!l&&(0,n.jsx)("span",{className:"duffel-button__text",children:C}),i&&(0,n.jsx)(o.J,{className:"duffel-button__icon duffel-button__icon--after",name:i})]})}))},639:(e,a,t)=>{t.d(a,{J:()=>l});var n=t(997),r=t(3),i=t.n(r),s=(t(689),t(108));const o={add:(0,n.jsx)("path",{d:"M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"}),arrow_forward:(0,n.jsx)("path",{d:"M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42.39.39 1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1z"}),arrow_left:(0,n.jsx)("path",{d:"M9 19L2 12L9 5L10.425 6.4L5.825 11H22V13H5.825L10.4 17.6L9 19Z"}),arrow_right:(0,n.jsx)("path",{d:"M15 19L13.6 17.6L18.2 13H2V11H18.2L13.6 6.4L15 5L22 12L15 19Z"}),bassinet:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("path",{d:"M19 12C19 14.1217 18.1571 16.1566 16.6569 17.6569C15.1566 19.1571 13.1217 20 11 20C8.87827 20 6.84344 19.1571 5.34315 17.6569C3.84286 16.1566 3 14.1217 3 12L11 12H19Z"}),(0,n.jsx)("path",{d:"M16.1347 5.86529L11 11V4C12.0506 4 13.0909 4.20693 14.0615 4.60896C14.8136 4.92052 15.5125 5.34451 16.1347 5.86529ZM16.8602 6.55405L12.4142 11H18.9373C18.8482 10.293 18.6649 9.59962 18.391 8.93853C18.0264 8.05823 17.5077 7.25087 16.8602 6.55405Z"})]}),cabin_bag:(0,n.jsx)("path",{d:"M16.8993 6.11988H14.9393V3.18053C14.9387 2.92099 14.8353 2.67229 14.6517 2.48877C14.4682 2.30525 14.2195 2.20185 13.96 2.20117H10.04C9.78045 2.20185 9.53174 2.30525 9.34822 2.48877C9.16471 2.67229 9.06131 2.92099 9.06063 3.18053V6.11988H7.10062C6.58132 6.12158 6.08378 6.32863 5.71657 6.69583C5.34937 7.06303 5.14233 7.56058 5.14062 8.07988V18.8592C5.14369 19.3775 5.35137 19.8736 5.71847 20.2395C6.08556 20.6054 6.58233 20.8114 7.10062 20.8128C7.09585 20.9445 7.11766 21.0758 7.16475 21.1988C7.21185 21.3219 7.28327 21.4342 7.37474 21.5291C7.46621 21.6239 7.57587 21.6994 7.69715 21.7509C7.81843 21.8024 7.94885 21.829 8.08062 21.829C8.2124 21.829 8.34282 21.8024 8.4641 21.7509C8.58538 21.6994 8.69504 21.6239 8.78651 21.5291C8.87798 21.4342 8.9494 21.3219 8.9965 21.1988C9.04359 21.0758 9.0654 20.9445 9.06063 20.8128H14.9393C14.9346 20.9445 14.9564 21.0758 15.0035 21.1988C15.0506 21.3219 15.122 21.4342 15.2135 21.5291C15.3049 21.6239 15.4146 21.6994 15.5359 21.7509C15.6571 21.8024 15.7876 21.829 15.9193 21.829C16.0511 21.829 16.1815 21.8024 16.3028 21.7509C16.4241 21.6994 16.5337 21.6239 16.6252 21.5291C16.7167 21.4342 16.7881 21.3219 16.8352 21.1988C16.8823 21.0758 16.9041 20.9445 16.8993 20.8128C17.4185 20.8114 17.9161 20.6047 18.2833 20.2377C18.6505 19.8707 18.8576 19.3733 18.8593 18.8541V8.07988C18.858 7.56048 18.651 7.06273 18.2838 6.69545C17.9165 6.32818 17.4187 6.12124 16.8993 6.11988V6.11988ZM9.59611 17.8786H8.03095V9.06053H9.59611V17.8786ZM10.5303 3.67085H13.4697V6.12246H10.5303V3.67085ZM15.9677 17.8786H14.3974V9.06053H15.9677V17.8786Z"}),checked_bag:(0,n.jsx)("path",{d:"M22 19H2V21H22V19M4 15C4 15.5 4.2 16 4.6 16.4C5 16.8 5.5 17 6 17V6C5.5 6 5 6.2 4.6 6.6C4.2 7 4 7.5 4 8V15M13.5 6H10.5C10.5 5.6 10.6 5.2 10.9 4.9C11.2 4.6 11.5 4.5 12 4.5C12.4 4.5 12.8 4.6 13.1 4.9C13.3 5.2 13.5 5.6 13.5 6M7 6V17H17V6H15C15 5.2 14.7 4.5 14.1 3.9S12.8 3 12 3C11.2 3 10.5 3.3 9.9 3.9C9.3 4.5 9 5.2 9 6H7M18 17C18.5 17 19 16.8 19.4 16.4C19.8 16 20 15.5 20 15V8C20 7.5 19.8 7 19.4 6.6C19 6.2 18.5 6 18 6V17Z"}),chevron:(0,n.jsx)("path",{d:"M5 13H16.17L11.29 17.88C10.9 18.27 10.9 18.91 11.29 19.3C11.68 19.69 12.31 19.69 12.7 19.3L19.29 12.71C19.68 12.32 19.68 11.69 19.29 11.3L12.71 4.7C12.32 4.31 11.69 4.31 11.3 4.7C10.91 5.09 10.91 5.72 11.3 6.11L16.17 11H5C4.45 11 4 11.45 4 12C4 12.55 4.45 13 5 13Z"}),close:(0,n.jsx)("path",{d:"M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"}),closet:(0,n.jsx)("path",{d:"M12 4C11.0717 4 10.1815 4.36875 9.52513 5.02513C8.86875 5.6815 8.5 6.57174 8.5 7.5H10.5C10.5 7.10218 10.658 6.72064 10.9393 6.43934C11.2206 6.15804 11.6022 6 12 6C12.3978 6 12.7794 6.15804 13.0607 6.43934C13.342 6.72064 13.5 7.10218 13.5 7.5C13.5 7.89782 13.342 8.27936 13.0607 8.56066C12.7794 8.84196 12.3978 9 12 9C11.45 9 11 9.45 11 10V11.75L2.4 18.2C2.23209 18.3259 2.10807 18.5015 2.04549 18.7018C1.98291 18.9022 1.98495 19.1171 2.05132 19.3162C2.11769 19.5153 2.24502 19.6885 2.41529 19.8112C2.58556 19.934 2.79012 20 3 20H21C21.2099 20 21.4144 19.934 21.5847 19.8112C21.755 19.6885 21.8823 19.5153 21.9487 19.3162C22.0151 19.1171 22.0171 18.9022 21.9545 18.7018C21.8919 18.5015 21.7679 18.3259 21.6 18.2L13 11.75V10.85C13.7216 10.6349 14.3546 10.1927 14.805 9.58919C15.2554 8.98569 15.4991 8.25303 15.5 7.5C15.5 6.57174 15.1313 5.6815 14.4749 5.02513C13.8185 4.36875 12.9283 4 12 4ZM12 13.5L18 18H6L12 13.5Z"}),exit_row:(0,n.jsx)("path",{d:"M20 11H6.83001L9.71001 8.12001C10.1 7.73001 10.1 7.10001 9.71001 6.71001C9.32001 6.32001 8.69001 6.32001 8.30001 6.71001L3.71001 11.3C3.32001 11.69 3.32001 12.32 3.71001 12.71L8.30001 17.3C8.69001 17.69 9.32001 17.69 9.71001 17.3C10.1 16.91 10.1 16.28 9.71001 15.89L6.83001 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11Z"}),exit_row_right:(0,n.jsx)("path",{d:"M4 11H17.17L14.29 8.12001C13.9 7.73001 13.9 7.10001 14.29 6.71001C14.68 6.32001 15.31 6.32001 15.7 6.71001L20.29 11.3C20.68 11.69 20.68 12.32 20.29 12.71L15.7 17.3C15.31 17.69 14.68 17.69 14.29 17.3C13.9 16.91 13.9 16.28 14.29 15.89L17.17 13H4C3.45 13 3 12.55 3 12C3 11.45 3.45 11 4 11Z"}),galley:(0,n.jsx)("path",{d:"M20 3H4v10c0 2.21 1.79 4 4 4h6c2.21 0 4-1.79 4-4v-3h2c1.11 0 2-.9 2-2V5c0-1.11-.89-2-2-2zm0 5h-2V5h2v3zM4 19h16v2H4z"}),lavatory:(0,n.jsx)("path",{d:"M5.5 22v-7.5H4V9c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5.5H9.5V22h-4zM18 22v-6h3l-2.54-7.63C18.18 7.55 17.42 7 16.56 7h-.12c-.86 0-1.63.55-1.9 1.37L12 16h3v6h3zM7.5 6c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2zm9 0c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2z"}),lie_flat_seat:(0,n.jsx)("path",{d:"M6.16667 12.8333C6.81667 12.8333 7.45834 12.5833 7.95001 12.0833C8.91667 11.0916 8.90001 9.51659 7.91667 8.54992C7.42501 8.07492 6.79167 7.83325 6.16667 7.83325C5.51667 7.83325 4.87501 8.08325 4.38334 8.58325C3.41667 9.57492 3.43334 11.1499 4.41667 12.1166C4.90834 12.5916 5.54167 12.8333 6.16667 12.8333ZM5.57501 9.74992C5.73334 9.59159 5.94167 9.49992 6.16667 9.49992C6.38334 9.49992 6.59167 9.58325 6.75001 9.73325C7.08334 10.0583 7.08334 10.5749 6.76667 10.9083C6.60001 11.0749 6.39167 11.1666 6.16667 11.1666C5.95001 11.1666 5.74167 11.0833 5.58334 10.9333C5.25001 10.5999 5.25001 10.0833 5.57501 9.74992ZM17 7.83325H9.50001V12.8333H20.3333V11.1666C20.3333 9.32492 18.8417 7.83325 17 7.83325ZM11.1667 11.1666V9.49992H17C17.9167 9.49992 18.6667 10.2499 18.6667 11.1666H11.1667ZM3.66667 15.3333H8.66667V16.9999H15.3333V15.3333H20.3333V13.6666H3.66667V15.3333Z"}),minus:(0,n.jsx)("path",{d:"M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1z"}),no_airplane:(0,n.jsx)("path",{d:"M14.6674 10.0001V2.66675C14.6674 1.56008 13.7741 0.666748 12.6674 0.666748C11.5607 0.666748 10.6674 1.56008 10.6674 2.66675V7.57341L21.1074 18.0134L25.3341 19.3334V16.6667L14.6674 10.0001ZM1.33407 5.02675L7.9874 11.6801L0.000732422 16.6667V19.3334L10.6674 16.0001V23.3334L8.00073 25.3334V27.3334L12.6674 26.0001L17.3341 27.3334V25.3334L14.6674 23.3334V18.3601L22.3074 26.0001L24.0007 24.3067L3.0274 3.33341L1.33407 5.02675Z"}),no_bag:(0,n.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.8992 6.12037H14.9392V3.18101C14.9385 2.92148 14.8351 2.67278 14.6516 2.48926C14.4681 2.30574 14.2194 2.20234 13.9599 2.20166H10.0399C9.78034 2.20234 9.53163 2.30574 9.34811 2.48926C9.16459 2.67278 9.06119 2.92148 9.06051 3.18101V6.12037H8.20711L8.34715 6.25804L14.3973 12.0871V9.06102H15.9676V13.6L17.3022 14.8859L18.8592 16.4748V8.08037C18.8579 7.56096 18.6509 7.06322 18.2836 6.69594C17.9164 6.32867 17.4186 6.12173 16.8992 6.12037ZM5.14051 8.09559L3.77173 6.71825L5.00821 5.48945L7.16586 7.6606L13.9581 14.4953L15.8932 16.4426L19.7441 20.3175L20.2279 20.8043L18.9914 22.0331L17.635 20.6683C17.4035 20.7625 17.154 20.8126 16.8992 20.8133C16.904 20.945 16.8822 21.0763 16.8351 21.1993C16.788 21.3224 16.7166 21.4347 16.6251 21.5296C16.5336 21.6244 16.424 21.6999 16.3027 21.7514C16.1814 21.8029 16.051 21.8295 15.9192 21.8295C15.7874 21.8295 15.657 21.8029 15.5357 21.7514C15.4145 21.6999 15.3048 21.6244 15.2133 21.5296C15.1219 21.4347 15.0504 21.3224 15.0034 21.1993C14.9563 21.0763 14.9344 20.945 14.9392 20.8133H9.06051C9.06529 20.945 9.04348 21.0763 8.99638 21.1993C8.94929 21.3224 8.87787 21.4347 8.7864 21.5296C8.69492 21.6244 8.58527 21.6999 8.46399 21.7514C8.34271 21.8029 8.21229 21.8295 8.08051 21.8295C7.94874 21.8295 7.81832 21.8029 7.69703 21.7514C7.57575 21.6999 7.4661 21.6244 7.37463 21.5296C7.28316 21.4347 7.21174 21.3224 7.16464 21.1993C7.11754 21.0763 7.09573 20.945 7.10051 20.8133C6.58222 20.8119 6.08545 20.6059 5.71835 20.24C5.35126 19.8741 5.14357 19.378 5.14051 18.8597V8.09559ZM14.8632 17.8791L14.3973 17.4103V17.8791H14.8632ZM9.596 12.579V17.8791H8.03083V11.004L9.596 12.579ZM10.5302 3.67134H13.4695V6.12295H10.5302V3.67134Z"}),no_seat:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("path",{d:"M25.1667 21.9733L23.4733 23.6667L2.5 2.69333L4.19333 1L7.16667 3.97333L16.5267 13.3333L19.1933 16L24.5 21.3067L25.1667 21.9733Z"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.16667 24H3.16667V16H19.1933L24.5 21.3067V24H20.5V20H7.16667V24ZM27.1667 9.33333H23.1667V13.3333H27.1667V9.33333ZM4.5 9.33333H0.5V13.3333H4.5V9.33333ZM20.3333 13.3333H20.5V2.66667C20.5 1.2 19.3 0 17.8333 0H9.83333C9.05784 0 8.3569 0.335483 7.86848 0.868484L20.3333 13.3333ZM16.5267 13.3333L7.16667 3.97333V13.3333H16.5267Z"})]}),seat:(0,n.jsx)("path",{d:"M7.59 5.41012C6.81 4.63012 6.81 3.36012 7.59 2.58012C8.37 1.80012 9.64 1.80012 10.42 2.58012C11.2 3.36012 11.2 4.63012 10.42 5.41012C9.63 6.20012 8.37 6.20012 7.59 5.41012ZM6 16.0001V8.00012C6 7.45012 5.55 7.00012 5 7.00012C4.45 7.00012 4 7.45012 4 8.00012V16.0001C4 18.7601 6.24 21.0001 9 21.0001H14C14.55 21.0001 15 20.5501 15 20.0001C15 19.4501 14.55 19.0001 14 19.0001H9C7.34 19.0001 6 17.6601 6 16.0001ZM19.28 19.3501L15.51 15.5801C15.14 15.2101 14.63 15.0001 14.1 15.0001H11.5V11.3201C12.59 12.2101 14.16 13.0201 15.7 13.3401C16.37 13.4801 17 12.9801 17 12.3001C17 11.7701 16.61 11.3401 16.08 11.2501C14.66 11.0101 13.2 10.2401 12.33 9.28012L10.93 7.73012C10.74 7.52012 10.5 7.35012 10.24 7.23012C9.95 7.09012 9.62 7.00012 9.28 7.00012H9.25C8.01 7.00012 7 8.01012 7 9.25012V15.0001C7 16.6601 8.34 18.0001 10 18.0001H15.07L17.85 20.7801C18.24 21.1701 18.89 21.1701 19.28 20.7801C19.68 20.3901 19.68 19.7501 19.28 19.3501Z"}),seat_paid_indicator:(0,n.jsx)("path",{d:"M11.7686 0.731368C12.7766 -0.276576 14.5 0.437294 14.5 1.86274V10.8C14.5 12.5673 13.0673 14 11.3 14H2.36274C0.937294 14 0.223427 12.2766 1.23137 11.2686L11.7686 0.731368Z"}),stairs:(0,n.jsx)("path",{d:"M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M18,8h-2.42v3.33H13v3.33h-2.58 V18H6v-2h2.42v-3.33H11V9.33h2.58V6H18V8z"}),wifi:(0,n.jsx)("path",{d:"M2.83333 9.50005L4.49999 11.1667C8.64166 7.02505 15.3583 7.02505 19.5 11.1667L21.1667 9.50005C16.1083 4.44172 7.89999 4.44172 2.83333 9.50005ZM9.49999 16.1667L12 18.6667L14.5 16.1667C13.125 14.7834 10.8833 14.7834 9.49999 16.1667ZM6.16666 12.8334L7.83333 14.5C10.1333 12.2 13.8667 12.2 16.1667 14.5L17.8333 12.8334C14.6167 9.61672 9.39166 9.61672 6.16666 12.8334Z"})},c=e=>e in o?o[e]:(s.warn("The icon ".concat(e)),null),l=e=>{let{name:a,size:t,className:r,viewBox:s}=e;return(0,n.jsx)("svg",{className:i()("ff-icon",r),width:t||24,height:t||24,viewBox:s||"0 0 24 24","aria-label":a,"data-testid":a,children:c(a)})}},299:(e,a,t)=>{t(997),t(689),t(673)},673:(e,a,t)=>{t(459),t(405)},638:(e,a,t)=>{t.d(a,{JO:()=>n.J}),t(311);var n=t(639);t(299),t(673),t(997),t(689),t(3)},896:(e,a,t)=>{t.d(a,{c:()=>i});var n=t(760),r=t(200);const i=function(e,a){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const s=new r.Decimal(e).times(new r.Decimal(t)).toNumber();return i?(0,n.Xy)(a)(s):(0,n.vs)(a)(s)}},122:(e,a,t)=>{t.d(a,{k:()=>r});var n=t(204);const r=e=>({duffel_component_used:e,duffel_components_version:n.D})},899:(e,a,t)=>{t.d(a,{kn:()=>n.k}),t(200),require("lodash/cloneDeep");var n=t(122);t(896)},760:(e,a,t)=>{t.d(a,{Xy:()=>r,vs:()=>n});const n=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-GB",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=new Intl.NumberFormat(a,{style:"currency",currency:e,...t});return e=>{const a=n.format(e);return t&&t.signDisplay&&("always"===t.signDisplay||"exceptZero"===t.signDisplay&&0!==e)?a.replace(/^([+-])/,"$1 "):a}},r=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-GB";const t=new Intl.NumberFormat(a,{style:"currency",currency:e,currencyDisplay:"code"});return e=>t.format(e).replace(/[a-z]{3}/i,"").trim()}},459:(e,a,t)=>{t(689),require("react-popper")},204:(e,a,t)=>{t.d(a,{D:()=>n});const n="2.7.19"},108:(e,a,t)=>{var n=t(464),r=t(84);function i(){return(new Date).getTime()}var s,o=Array.prototype.slice,c={};s=void 0!==t.g&&t.g.console?t.g.console:"undefined"!=typeof window&&window.console?window.console:{};for(var l=[[function(){},"log"],[function(){s.log.apply(s,arguments)},"info"],[function(){s.log.apply(s,arguments)},"warn"],[function(){s.warn.apply(s,arguments)},"error"],[function(e){c[e]=i()},"time"],[function(e){var a=c[e];if(!a)throw new Error("No such label: "+e);delete c[e];var t=i()-a;s.log(e+": "+t+"ms")},"timeEnd"],[function(){var e=new Error;e.name="Trace",e.message=n.format.apply(null,arguments),s.error(e.stack)},"trace"],[function(e){s.log(n.inspect(e)+"\n")},"dir"],[function(e){if(!e){var a=o.call(arguments,1);r.ok(!1,n.format.apply(null,a))}},"assert"]],d=0;d<l.length;d++){var C=l[d],u=C[0],m=C[1];s[m]||(s[m]=u)}e.exports=s},84:e=>{e.exports=require("assert")},3:e=>{e.exports=require("classnames")},200:e=>{e.exports=require("decimal.js")},580:e=>{e.exports=require("prop-types")},689:e=>{e.exports=require("react")},405:e=>{e.exports=require("react-dom")},997:e=>{e.exports=require("react/jsx-runtime")},464:e=>{e.exports=require("util")}},a={};function t(n){var r=a[n];if(void 0!==r)return r.exports;var i=a[n]={exports:{}};return e[n](i,i.exports,t),i.exports}t.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return t.d(a,{a}),a},t.d=(e,a)=>{for(var n in a)t.o(a,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:a[n]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),t.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a);var n={};(()=>{t.d(n,{U:()=>u});var e=t(997),a=(t(689),t(580)),r=t.n(a),i=t(899),s=t(638),o=t(311);const c=a=>{let{id:t,min:n,max:r,value:i,onChange:s,onTabLast:c}=a;return(0,e.jsxs)("div",{className:"counter",id:t,children:[(0,e.jsx)(o.z,{type:"button",disabled:i<=n,onClick:()=>s(Math.max(i-1,n)),iconOnly:"minus",text:"Minus",id:"".concat(t,"-minus")}),(0,e.jsx)("div",{className:"counter__count-label",children:i}),(0,e.jsx)(o.z,{text:"Plus",iconOnly:"add",type:"button",disabled:i>=r,onClick:()=>s(Math.min(i+1,r)),onKeyDown:e=>{"Tab"===e.key&&c&&c(e)},id:"".concat(t,"-plus")})]})};var l=t(639);const d=a=>{let{metadata:t,price:n}=a;const{type:r,maximum_weight_kg:i,maximum_depth_cm:s,maximum_height_cm:o,maximum_length_cm:c}=t,d="carry_on"===r?"cabin_bag":"checked_bag",C="carry_on"===r?"Carry on bag":"Checked bag",u=s&&o&&c?"".concat(o," x ").concat(c," x ").concat(s," cm"):null;return(0,e.jsxs)("div",{className:"baggage-display",children:[(0,e.jsx)(l.J,{name:d}),(0,e.jsxs)("div",{className:"baggage-display__content",children:[(0,e.jsx)("span",{className:"baggage-display__label",children:C}),(0,e.jsx)("span",{className:"baggage-display__price",children:n}),(i||u)&&(0,e.jsxs)("div",{className:"baggage-display__specs",children:[i&&"Up to ".concat(i,"kg"),i&&u&&" / ",u]})]})]})};var C=t(896);const u=a=>{let{availableServices:t,additionalBaggages:n=[],onChange:r,currencyConversion:o}=a;const l=t.filter((e=>{let{type:a,metadata:t}=e;return"baggage"===a&&t}));return l.length?(0,e.jsx)("div",{className:"duffel-components",children:l.map((a=>{var t,s,l;let{metadata:u,id:m,total_amount:g,total_currency:p,maximum_quantity:h}=a;return(0,e.jsxs)("div",{className:"baggage-selection__control-container",children:[(0,e.jsx)(d,{metadata:u,price:(0,C.c)(g,null!==(t=null==o?void 0:o.currency)&&void 0!==t?t:p,null==o?void 0:o.rate)},m),(0,e.jsx)("div",{className:"baggage-selection__control",children:(0,e.jsx)(c,{id:"baggage-selection-counter-".concat(m),min:0,max:h,value:null!==(s=null===(l=n.find((e=>e.id===m)))||void 0===l?void 0:l.quantity)&&void 0!==s?s:0,onChange:e=>{const a=(s=m,o=e,(t=n).find((e=>e.id===s))?t.map((e=>e.id===s?{...e,quantity:o,metadata:(0,i.kn)("additional_baggage")}:e)):[...t,{id:s,quantity:o,metadata:(0,i.kn)("additional_baggage")}]);var t,s,o;return r(a,{id:m,quantity:e})}})})]},m)}))}):(0,e.jsxs)("div",{className:"baggage-selection__no-bag",children:[(0,e.jsx)("div",{className:"baggage-selection__no-bag-circle",children:(0,e.jsx)(s.JO,{name:"no_bag",className:"baggage-selection__no-bag-icon"})}),(0,e.jsx)("div",{children:"Extra bags are not available for this flight"})]})};u.propTypes={availableServices:r().arrayOf(r().shape({id:r().string.isRequired,maximum_quantity:r().number.isRequired,metadata:r().shape({maximum_weight_kg:r().number,maximum_height_cm:r().number,maximum_length_cm:r().number,maximum_depth_cm:r().number,type:r().oneOf(["carry_on","checked"]).isRequired}).isRequired,passenger_ids:r().arrayOf(r().string.isRequired).isRequired,segment_ids:r().arrayOf(r().string.isRequired).isRequired,total_amount:r().string.isRequired,total_currency:r().string.isRequired,type:r().oneOf(["baggage"]).isRequired}).isRequired).isRequired,additionalBaggages:r().arrayOf(r().shape({id:r().string.isRequired,quantity:r().number.isRequired}).isRequired).isRequired,onChange:r().func.isRequired,currencyConversion:r().shape({rate:r().number.isRequired,currency:r().string.isRequired})}})();var r=n.U;export{r as AdditionalBaggage};
@@ -1 +0,0 @@
1
- (()=>{var e={311:(e,t,a)=>{"use strict";a.d(t,{z:()=>o});var n=a(997),r=a(689),s=a(3),i=a.n(s),c=a(639);const o=r.forwardRef(((e,t)=>{let{className:a,disabled:r=!1,iconAfter:s,iconBefore:o,iconOnly:l,intent:d="PRIMARY",text:u,type:C="button",id:m,...g}=e;const p=i()("duffel-button","duffel-button--solid",a,{"duffel-button--primary":"PRIMARY"===d,"duffel-button--muted":"MUTED"===d,"duffel-button--icon-only":l,"duffel-button--is-disabled":r});return(0,n.jsxs)("button",{ref:t,type:C,className:p,disabled:r,"aria-label":u,"data-testid":m,id:m,...g,children:[o&&(0,n.jsx)(c.J,{className:"duffel-button__icon duffel-button__icon--before",name:o}),l&&(0,n.jsx)(c.J,{className:"duffel-button__icon",name:l}),!l&&(0,n.jsx)("span",{className:"duffel-button__text",children:u}),s&&(0,n.jsx)(c.J,{className:"duffel-button__icon duffel-button__icon--after",name:s})]})}))},639:(e,t,a)=>{"use strict";a.d(t,{J:()=>l});var n=a(997),r=a(3),s=a.n(r),i=(a(689),a(108));const c={add:(0,n.jsx)("path",{d:"M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"}),arrow_forward:(0,n.jsx)("path",{d:"M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42.39.39 1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1z"}),arrow_left:(0,n.jsx)("path",{d:"M9 19L2 12L9 5L10.425 6.4L5.825 11H22V13H5.825L10.4 17.6L9 19Z"}),arrow_right:(0,n.jsx)("path",{d:"M15 19L13.6 17.6L18.2 13H2V11H18.2L13.6 6.4L15 5L22 12L15 19Z"}),bassinet:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("path",{d:"M19 12C19 14.1217 18.1571 16.1566 16.6569 17.6569C15.1566 19.1571 13.1217 20 11 20C8.87827 20 6.84344 19.1571 5.34315 17.6569C3.84286 16.1566 3 14.1217 3 12L11 12H19Z"}),(0,n.jsx)("path",{d:"M16.1347 5.86529L11 11V4C12.0506 4 13.0909 4.20693 14.0615 4.60896C14.8136 4.92052 15.5125 5.34451 16.1347 5.86529ZM16.8602 6.55405L12.4142 11H18.9373C18.8482 10.293 18.6649 9.59962 18.391 8.93853C18.0264 8.05823 17.5077 7.25087 16.8602 6.55405Z"})]}),cabin_bag:(0,n.jsx)("path",{d:"M16.8993 6.11988H14.9393V3.18053C14.9387 2.92099 14.8353 2.67229 14.6517 2.48877C14.4682 2.30525 14.2195 2.20185 13.96 2.20117H10.04C9.78045 2.20185 9.53174 2.30525 9.34822 2.48877C9.16471 2.67229 9.06131 2.92099 9.06063 3.18053V6.11988H7.10062C6.58132 6.12158 6.08378 6.32863 5.71657 6.69583C5.34937 7.06303 5.14233 7.56058 5.14062 8.07988V18.8592C5.14369 19.3775 5.35137 19.8736 5.71847 20.2395C6.08556 20.6054 6.58233 20.8114 7.10062 20.8128C7.09585 20.9445 7.11766 21.0758 7.16475 21.1988C7.21185 21.3219 7.28327 21.4342 7.37474 21.5291C7.46621 21.6239 7.57587 21.6994 7.69715 21.7509C7.81843 21.8024 7.94885 21.829 8.08062 21.829C8.2124 21.829 8.34282 21.8024 8.4641 21.7509C8.58538 21.6994 8.69504 21.6239 8.78651 21.5291C8.87798 21.4342 8.9494 21.3219 8.9965 21.1988C9.04359 21.0758 9.0654 20.9445 9.06063 20.8128H14.9393C14.9346 20.9445 14.9564 21.0758 15.0035 21.1988C15.0506 21.3219 15.122 21.4342 15.2135 21.5291C15.3049 21.6239 15.4146 21.6994 15.5359 21.7509C15.6571 21.8024 15.7876 21.829 15.9193 21.829C16.0511 21.829 16.1815 21.8024 16.3028 21.7509C16.4241 21.6994 16.5337 21.6239 16.6252 21.5291C16.7167 21.4342 16.7881 21.3219 16.8352 21.1988C16.8823 21.0758 16.9041 20.9445 16.8993 20.8128C17.4185 20.8114 17.9161 20.6047 18.2833 20.2377C18.6505 19.8707 18.8576 19.3733 18.8593 18.8541V8.07988C18.858 7.56048 18.651 7.06273 18.2838 6.69545C17.9165 6.32818 17.4187 6.12124 16.8993 6.11988V6.11988ZM9.59611 17.8786H8.03095V9.06053H9.59611V17.8786ZM10.5303 3.67085H13.4697V6.12246H10.5303V3.67085ZM15.9677 17.8786H14.3974V9.06053H15.9677V17.8786Z"}),checked_bag:(0,n.jsx)("path",{d:"M22 19H2V21H22V19M4 15C4 15.5 4.2 16 4.6 16.4C5 16.8 5.5 17 6 17V6C5.5 6 5 6.2 4.6 6.6C4.2 7 4 7.5 4 8V15M13.5 6H10.5C10.5 5.6 10.6 5.2 10.9 4.9C11.2 4.6 11.5 4.5 12 4.5C12.4 4.5 12.8 4.6 13.1 4.9C13.3 5.2 13.5 5.6 13.5 6M7 6V17H17V6H15C15 5.2 14.7 4.5 14.1 3.9S12.8 3 12 3C11.2 3 10.5 3.3 9.9 3.9C9.3 4.5 9 5.2 9 6H7M18 17C18.5 17 19 16.8 19.4 16.4C19.8 16 20 15.5 20 15V8C20 7.5 19.8 7 19.4 6.6C19 6.2 18.5 6 18 6V17Z"}),chevron:(0,n.jsx)("path",{d:"M5 13H16.17L11.29 17.88C10.9 18.27 10.9 18.91 11.29 19.3C11.68 19.69 12.31 19.69 12.7 19.3L19.29 12.71C19.68 12.32 19.68 11.69 19.29 11.3L12.71 4.7C12.32 4.31 11.69 4.31 11.3 4.7C10.91 5.09 10.91 5.72 11.3 6.11L16.17 11H5C4.45 11 4 11.45 4 12C4 12.55 4.45 13 5 13Z"}),close:(0,n.jsx)("path",{d:"M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"}),closet:(0,n.jsx)("path",{d:"M12 4C11.0717 4 10.1815 4.36875 9.52513 5.02513C8.86875 5.6815 8.5 6.57174 8.5 7.5H10.5C10.5 7.10218 10.658 6.72064 10.9393 6.43934C11.2206 6.15804 11.6022 6 12 6C12.3978 6 12.7794 6.15804 13.0607 6.43934C13.342 6.72064 13.5 7.10218 13.5 7.5C13.5 7.89782 13.342 8.27936 13.0607 8.56066C12.7794 8.84196 12.3978 9 12 9C11.45 9 11 9.45 11 10V11.75L2.4 18.2C2.23209 18.3259 2.10807 18.5015 2.04549 18.7018C1.98291 18.9022 1.98495 19.1171 2.05132 19.3162C2.11769 19.5153 2.24502 19.6885 2.41529 19.8112C2.58556 19.934 2.79012 20 3 20H21C21.2099 20 21.4144 19.934 21.5847 19.8112C21.755 19.6885 21.8823 19.5153 21.9487 19.3162C22.0151 19.1171 22.0171 18.9022 21.9545 18.7018C21.8919 18.5015 21.7679 18.3259 21.6 18.2L13 11.75V10.85C13.7216 10.6349 14.3546 10.1927 14.805 9.58919C15.2554 8.98569 15.4991 8.25303 15.5 7.5C15.5 6.57174 15.1313 5.6815 14.4749 5.02513C13.8185 4.36875 12.9283 4 12 4ZM12 13.5L18 18H6L12 13.5Z"}),exit_row:(0,n.jsx)("path",{d:"M20 11H6.83001L9.71001 8.12001C10.1 7.73001 10.1 7.10001 9.71001 6.71001C9.32001 6.32001 8.69001 6.32001 8.30001 6.71001L3.71001 11.3C3.32001 11.69 3.32001 12.32 3.71001 12.71L8.30001 17.3C8.69001 17.69 9.32001 17.69 9.71001 17.3C10.1 16.91 10.1 16.28 9.71001 15.89L6.83001 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11Z"}),exit_row_right:(0,n.jsx)("path",{d:"M4 11H17.17L14.29 8.12001C13.9 7.73001 13.9 7.10001 14.29 6.71001C14.68 6.32001 15.31 6.32001 15.7 6.71001L20.29 11.3C20.68 11.69 20.68 12.32 20.29 12.71L15.7 17.3C15.31 17.69 14.68 17.69 14.29 17.3C13.9 16.91 13.9 16.28 14.29 15.89L17.17 13H4C3.45 13 3 12.55 3 12C3 11.45 3.45 11 4 11Z"}),galley:(0,n.jsx)("path",{d:"M20 3H4v10c0 2.21 1.79 4 4 4h6c2.21 0 4-1.79 4-4v-3h2c1.11 0 2-.9 2-2V5c0-1.11-.89-2-2-2zm0 5h-2V5h2v3zM4 19h16v2H4z"}),lavatory:(0,n.jsx)("path",{d:"M5.5 22v-7.5H4V9c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2v5.5H9.5V22h-4zM18 22v-6h3l-2.54-7.63C18.18 7.55 17.42 7 16.56 7h-.12c-.86 0-1.63.55-1.9 1.37L12 16h3v6h3zM7.5 6c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2zm9 0c1.11 0 2-.89 2-2s-.89-2-2-2-2 .89-2 2 .89 2 2 2z"}),lie_flat_seat:(0,n.jsx)("path",{d:"M6.16667 12.8333C6.81667 12.8333 7.45834 12.5833 7.95001 12.0833C8.91667 11.0916 8.90001 9.51659 7.91667 8.54992C7.42501 8.07492 6.79167 7.83325 6.16667 7.83325C5.51667 7.83325 4.87501 8.08325 4.38334 8.58325C3.41667 9.57492 3.43334 11.1499 4.41667 12.1166C4.90834 12.5916 5.54167 12.8333 6.16667 12.8333ZM5.57501 9.74992C5.73334 9.59159 5.94167 9.49992 6.16667 9.49992C6.38334 9.49992 6.59167 9.58325 6.75001 9.73325C7.08334 10.0583 7.08334 10.5749 6.76667 10.9083C6.60001 11.0749 6.39167 11.1666 6.16667 11.1666C5.95001 11.1666 5.74167 11.0833 5.58334 10.9333C5.25001 10.5999 5.25001 10.0833 5.57501 9.74992ZM17 7.83325H9.50001V12.8333H20.3333V11.1666C20.3333 9.32492 18.8417 7.83325 17 7.83325ZM11.1667 11.1666V9.49992H17C17.9167 9.49992 18.6667 10.2499 18.6667 11.1666H11.1667ZM3.66667 15.3333H8.66667V16.9999H15.3333V15.3333H20.3333V13.6666H3.66667V15.3333Z"}),minus:(0,n.jsx)("path",{d:"M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1z"}),no_airplane:(0,n.jsx)("path",{d:"M14.6674 10.0001V2.66675C14.6674 1.56008 13.7741 0.666748 12.6674 0.666748C11.5607 0.666748 10.6674 1.56008 10.6674 2.66675V7.57341L21.1074 18.0134L25.3341 19.3334V16.6667L14.6674 10.0001ZM1.33407 5.02675L7.9874 11.6801L0.000732422 16.6667V19.3334L10.6674 16.0001V23.3334L8.00073 25.3334V27.3334L12.6674 26.0001L17.3341 27.3334V25.3334L14.6674 23.3334V18.3601L22.3074 26.0001L24.0007 24.3067L3.0274 3.33341L1.33407 5.02675Z"}),no_bag:(0,n.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.8992 6.12037H14.9392V3.18101C14.9385 2.92148 14.8351 2.67278 14.6516 2.48926C14.4681 2.30574 14.2194 2.20234 13.9599 2.20166H10.0399C9.78034 2.20234 9.53163 2.30574 9.34811 2.48926C9.16459 2.67278 9.06119 2.92148 9.06051 3.18101V6.12037H8.20711L8.34715 6.25804L14.3973 12.0871V9.06102H15.9676V13.6L17.3022 14.8859L18.8592 16.4748V8.08037C18.8579 7.56096 18.6509 7.06322 18.2836 6.69594C17.9164 6.32867 17.4186 6.12173 16.8992 6.12037ZM5.14051 8.09559L3.77173 6.71825L5.00821 5.48945L7.16586 7.6606L13.9581 14.4953L15.8932 16.4426L19.7441 20.3175L20.2279 20.8043L18.9914 22.0331L17.635 20.6683C17.4035 20.7625 17.154 20.8126 16.8992 20.8133C16.904 20.945 16.8822 21.0763 16.8351 21.1993C16.788 21.3224 16.7166 21.4347 16.6251 21.5296C16.5336 21.6244 16.424 21.6999 16.3027 21.7514C16.1814 21.8029 16.051 21.8295 15.9192 21.8295C15.7874 21.8295 15.657 21.8029 15.5357 21.7514C15.4145 21.6999 15.3048 21.6244 15.2133 21.5296C15.1219 21.4347 15.0504 21.3224 15.0034 21.1993C14.9563 21.0763 14.9344 20.945 14.9392 20.8133H9.06051C9.06529 20.945 9.04348 21.0763 8.99638 21.1993C8.94929 21.3224 8.87787 21.4347 8.7864 21.5296C8.69492 21.6244 8.58527 21.6999 8.46399 21.7514C8.34271 21.8029 8.21229 21.8295 8.08051 21.8295C7.94874 21.8295 7.81832 21.8029 7.69703 21.7514C7.57575 21.6999 7.4661 21.6244 7.37463 21.5296C7.28316 21.4347 7.21174 21.3224 7.16464 21.1993C7.11754 21.0763 7.09573 20.945 7.10051 20.8133C6.58222 20.8119 6.08545 20.6059 5.71835 20.24C5.35126 19.8741 5.14357 19.378 5.14051 18.8597V8.09559ZM14.8632 17.8791L14.3973 17.4103V17.8791H14.8632ZM9.596 12.579V17.8791H8.03083V11.004L9.596 12.579ZM10.5302 3.67134H13.4695V6.12295H10.5302V3.67134Z"}),no_seat:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("path",{d:"M25.1667 21.9733L23.4733 23.6667L2.5 2.69333L4.19333 1L7.16667 3.97333L16.5267 13.3333L19.1933 16L24.5 21.3067L25.1667 21.9733Z"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.16667 24H3.16667V16H19.1933L24.5 21.3067V24H20.5V20H7.16667V24ZM27.1667 9.33333H23.1667V13.3333H27.1667V9.33333ZM4.5 9.33333H0.5V13.3333H4.5V9.33333ZM20.3333 13.3333H20.5V2.66667C20.5 1.2 19.3 0 17.8333 0H9.83333C9.05784 0 8.3569 0.335483 7.86848 0.868484L20.3333 13.3333ZM16.5267 13.3333L7.16667 3.97333V13.3333H16.5267Z"})]}),seat:(0,n.jsx)("path",{d:"M7.59 5.41012C6.81 4.63012 6.81 3.36012 7.59 2.58012C8.37 1.80012 9.64 1.80012 10.42 2.58012C11.2 3.36012 11.2 4.63012 10.42 5.41012C9.63 6.20012 8.37 6.20012 7.59 5.41012ZM6 16.0001V8.00012C6 7.45012 5.55 7.00012 5 7.00012C4.45 7.00012 4 7.45012 4 8.00012V16.0001C4 18.7601 6.24 21.0001 9 21.0001H14C14.55 21.0001 15 20.5501 15 20.0001C15 19.4501 14.55 19.0001 14 19.0001H9C7.34 19.0001 6 17.6601 6 16.0001ZM19.28 19.3501L15.51 15.5801C15.14 15.2101 14.63 15.0001 14.1 15.0001H11.5V11.3201C12.59 12.2101 14.16 13.0201 15.7 13.3401C16.37 13.4801 17 12.9801 17 12.3001C17 11.7701 16.61 11.3401 16.08 11.2501C14.66 11.0101 13.2 10.2401 12.33 9.28012L10.93 7.73012C10.74 7.52012 10.5 7.35012 10.24 7.23012C9.95 7.09012 9.62 7.00012 9.28 7.00012H9.25C8.01 7.00012 7 8.01012 7 9.25012V15.0001C7 16.6601 8.34 18.0001 10 18.0001H15.07L17.85 20.7801C18.24 21.1701 18.89 21.1701 19.28 20.7801C19.68 20.3901 19.68 19.7501 19.28 19.3501Z"}),seat_paid_indicator:(0,n.jsx)("path",{d:"M11.7686 0.731368C12.7766 -0.276576 14.5 0.437294 14.5 1.86274V10.8C14.5 12.5673 13.0673 14 11.3 14H2.36274C0.937294 14 0.223427 12.2766 1.23137 11.2686L11.7686 0.731368Z"}),stairs:(0,n.jsx)("path",{d:"M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M18,8h-2.42v3.33H13v3.33h-2.58 V18H6v-2h2.42v-3.33H11V9.33h2.58V6H18V8z"}),wifi:(0,n.jsx)("path",{d:"M2.83333 9.50005L4.49999 11.1667C8.64166 7.02505 15.3583 7.02505 19.5 11.1667L21.1667 9.50005C16.1083 4.44172 7.89999 4.44172 2.83333 9.50005ZM9.49999 16.1667L12 18.6667L14.5 16.1667C13.125 14.7834 10.8833 14.7834 9.49999 16.1667ZM6.16666 12.8334L7.83333 14.5C10.1333 12.2 13.8667 12.2 16.1667 14.5L17.8333 12.8334C14.6167 9.61672 9.39166 9.61672 6.16666 12.8334Z"})},o=e=>e in c?c[e]:(i.warn("The icon ".concat(e)),null),l=e=>{let{name:t,size:a,className:r,viewBox:i}=e;return(0,n.jsx)("svg",{className:s()("ff-icon",r),width:a||24,height:a||24,viewBox:i||"0 0 24 24","aria-label":t,"data-testid":t,children:o(t)})}},299:(e,t,a)=>{"use strict";a(997),a(689),a(673)},673:(e,t,a)=>{"use strict";a(459),a(405)},638:(e,t,a)=>{"use strict";a.d(t,{JO:()=>n.J}),a(311);var n=a(639);a(299),a(673),a(997),a(689),a(3)},896:(e,t,a)=>{"use strict";a.d(t,{c:()=>s});var n=a(760),r=a(200);const s=function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=new r.Decimal(e).times(new r.Decimal(a)).toNumber();return s?(0,n.Xy)(t)(i):(0,n.vs)(t)(i)}},122:(e,t,a)=>{"use strict";a.d(t,{k:()=>r});var n=a(204);const r=e=>({duffel_component_used:e,duffel_components_version:n.D})},899:(e,t,a)=>{"use strict";a.d(t,{kn:()=>n.k}),a(200),require("lodash/cloneDeep");var n=a(122);a(896)},760:(e,t,a)=>{"use strict";a.d(t,{Xy:()=>r,vs:()=>n});const n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-GB",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=new Intl.NumberFormat(t,{style:"currency",currency:e,...a});return e=>{const t=n.format(e);return a&&a.signDisplay&&("always"===a.signDisplay||"exceptZero"===a.signDisplay&&0!==e)?t.replace(/^([+-])/,"$1 "):t}},r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-GB";const a=new Intl.NumberFormat(t,{style:"currency",currency:e,currencyDisplay:"code"});return e=>a.format(e).replace(/[a-z]{3}/i,"").trim()}},459:(e,t,a)=>{"use strict";a(689),require("react-popper")},204:(e,t,a)=>{"use strict";a.d(t,{D:()=>n});const n="2.7.19"},108:(e,t,a)=>{var n=a(464),r=a(84);function s(){return(new Date).getTime()}var i,c=Array.prototype.slice,o={};i=void 0!==a.g&&a.g.console?a.g.console:"undefined"!=typeof window&&window.console?window.console:{};for(var l=[[function(){},"log"],[function(){i.log.apply(i,arguments)},"info"],[function(){i.log.apply(i,arguments)},"warn"],[function(){i.warn.apply(i,arguments)},"error"],[function(e){o[e]=s()},"time"],[function(e){var t=o[e];if(!t)throw new Error("No such label: "+e);delete o[e];var a=s()-t;i.log(e+": "+a+"ms")},"timeEnd"],[function(){var e=new Error;e.name="Trace",e.message=n.format.apply(null,arguments),i.error(e.stack)},"trace"],[function(e){i.log(n.inspect(e)+"\n")},"dir"],[function(e){if(!e){var t=c.call(arguments,1);r.ok(!1,n.format.apply(null,t))}},"assert"]],d=0;d<l.length;d++){var u=l[d],C=u[0],m=u[1];i[m]||(i[m]=C)}e.exports=i},84:e=>{"use strict";e.exports=require("assert")},3:e=>{"use strict";e.exports=require("classnames")},200:e=>{"use strict";e.exports=require("decimal.js")},580:e=>{"use strict";e.exports=require("prop-types")},689:e=>{"use strict";e.exports=require("react")},405:e=>{"use strict";e.exports=require("react-dom")},997:e=>{"use strict";e.exports=require("react/jsx-runtime")},464:e=>{"use strict";e.exports=require("util")}},t={};function a(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,a),s.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";a.r(n),a.d(n,{AdditionalBaggage:()=>C});var e=a(997),t=(a(689),a(580)),r=a.n(t),s=a(899),i=a(638),c=a(311);const o=t=>{let{id:a,min:n,max:r,value:s,onChange:i,onTabLast:o}=t;return(0,e.jsxs)("div",{className:"counter",id:a,children:[(0,e.jsx)(c.z,{type:"button",disabled:s<=n,onClick:()=>i(Math.max(s-1,n)),iconOnly:"minus",text:"Minus",id:"".concat(a,"-minus")}),(0,e.jsx)("div",{className:"counter__count-label",children:s}),(0,e.jsx)(c.z,{text:"Plus",iconOnly:"add",type:"button",disabled:s>=r,onClick:()=>i(Math.min(s+1,r)),onKeyDown:e=>{"Tab"===e.key&&o&&o(e)},id:"".concat(a,"-plus")})]})};var l=a(639);const d=t=>{let{metadata:a,price:n}=t;const{type:r,maximum_weight_kg:s,maximum_depth_cm:i,maximum_height_cm:c,maximum_length_cm:o}=a,d="carry_on"===r?"cabin_bag":"checked_bag",u="carry_on"===r?"Carry on bag":"Checked bag",C=i&&c&&o?"".concat(c," x ").concat(o," x ").concat(i," cm"):null;return(0,e.jsxs)("div",{className:"baggage-display",children:[(0,e.jsx)(l.J,{name:d}),(0,e.jsxs)("div",{className:"baggage-display__content",children:[(0,e.jsx)("span",{className:"baggage-display__label",children:u}),(0,e.jsx)("span",{className:"baggage-display__price",children:n}),(s||C)&&(0,e.jsxs)("div",{className:"baggage-display__specs",children:[s&&"Up to ".concat(s,"kg"),s&&C&&" / ",C]})]})]})};var u=a(896);const C=t=>{let{availableServices:a,additionalBaggages:n=[],onChange:r,currencyConversion:c}=t;const l=a.filter((e=>{let{type:t,metadata:a}=e;return"baggage"===t&&a}));return l.length?(0,e.jsx)("div",{className:"duffel-components",children:l.map((t=>{var a,i,l;let{metadata:C,id:m,total_amount:g,total_currency:p,maximum_quantity:h}=t;return(0,e.jsxs)("div",{className:"baggage-selection__control-container",children:[(0,e.jsx)(d,{metadata:C,price:(0,u.c)(g,null!==(a=null==c?void 0:c.currency)&&void 0!==a?a:p,null==c?void 0:c.rate)},m),(0,e.jsx)("div",{className:"baggage-selection__control",children:(0,e.jsx)(o,{id:"baggage-selection-counter-".concat(m),min:0,max:h,value:null!==(i=null===(l=n.find((e=>e.id===m)))||void 0===l?void 0:l.quantity)&&void 0!==i?i:0,onChange:e=>{const t=(i=m,c=e,(a=n).find((e=>e.id===i))?a.map((e=>e.id===i?{...e,quantity:c,metadata:(0,s.kn)("additional_baggage")}:e)):[...a,{id:i,quantity:c,metadata:(0,s.kn)("additional_baggage")}]);var a,i,c;return r(t,{id:m,quantity:e})}})})]},m)}))}):(0,e.jsxs)("div",{className:"baggage-selection__no-bag",children:[(0,e.jsx)("div",{className:"baggage-selection__no-bag-circle",children:(0,e.jsx)(i.JO,{name:"no_bag",className:"baggage-selection__no-bag-icon"})}),(0,e.jsx)("div",{children:"Extra bags are not available for this flight"})]})};C.propTypes={availableServices:r().arrayOf(r().shape({id:r().string.isRequired,maximum_quantity:r().number.isRequired,metadata:r().shape({maximum_weight_kg:r().number,maximum_height_cm:r().number,maximum_length_cm:r().number,maximum_depth_cm:r().number,type:r().oneOf(["carry_on","checked"]).isRequired}).isRequired,passenger_ids:r().arrayOf(r().string.isRequired).isRequired,segment_ids:r().arrayOf(r().string.isRequired).isRequired,total_amount:r().string.isRequired,total_currency:r().string.isRequired,type:r().oneOf(["baggage"]).isRequired}).isRequired).isRequired,additionalBaggages:r().arrayOf(r().shape({id:r().string.isRequired,quantity:r().number.isRequired}).isRequired).isRequired,onChange:r().func.isRequired,currencyConversion:r().shape({rate:r().number.isRequired,currency:r().string.isRequired})}})();var r=exports;for(var s in n)r[s]=n[s];n.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();