@roomstay/core 0.2.0-0 → 0.2.0-10

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 (225) hide show
  1. package/dist/index.d.ts +2 -0
  2. package/dist/node.js +1 -0
  3. package/dist/node.js.LICENSE.txt +7 -0
  4. package/dist/types/Addon/Addon.enum.d.ts +14 -0
  5. package/dist/types/Addon/Addon.type.d.ts +24 -0
  6. package/dist/types/{types/Addons → Addons}/Addon.enum.d.ts +0 -1
  7. package/dist/types/{types/Addons → Addons}/Addon.types.d.ts +0 -1
  8. package/dist/types/Analytics/IAnalyticsEvent.type.d.ts +35 -0
  9. package/dist/types/Analytics/IAnalyticsSession.type.d.ts +11 -0
  10. package/dist/types/Analytics/IBigQueryResponse.type.d.ts +24 -0
  11. package/dist/types/{types/Analytics → Analytics}/IBigQueryResults.type.d.ts +0 -1
  12. package/dist/types/AnalyticsEvents/IAnalyticsEvent.type.d.ts +90 -0
  13. package/dist/types/{types/AnalyticsEvents → AnalyticsEvents}/IAnalyticsSession.type.d.ts +0 -1
  14. package/dist/types/{types/AnalyticsEvents → AnalyticsEvents}/IRoomstayEventData.type.d.ts +27 -3
  15. package/dist/types/{types/AnalyticsEvents → AnalyticsEvents}/MetaCapiTransformer.d.ts +6 -3
  16. package/dist/types/{types/Api → Api}/Reservations.type.d.ts +1 -1
  17. package/dist/types/{types/Api → Api}/RoomNightRate.type.d.ts +0 -1
  18. package/dist/types/{types/Availability → Availability}/Availability.types.d.ts +1 -2
  19. package/dist/types/{types/Booking → Booking}/ConfirmBooking.types.d.ts +0 -1
  20. package/dist/types/{types/Booking → Booking}/EBooking.types.d.ts +0 -1
  21. package/dist/types/{types/Booking → Booking}/GetBooking.types.d.ts +0 -1
  22. package/dist/types/Booking/IBookingCreateErrorResponse.d.ts +11 -0
  23. package/dist/types/{types/Booking → Booking}/IBookingCreateErrorResponse.type.d.ts +0 -1
  24. package/dist/types/Booking/IBookingExtraFields.type.d.ts +19 -0
  25. package/dist/types/{types/Booking → Booking}/IBookingPayment.type.d.ts +13 -1
  26. package/dist/types/{types/Booking → Booking}/IBookingQuote.type.d.ts +0 -1
  27. package/dist/types/Booking/IBookingStatus.type.d.ts +5 -0
  28. package/dist/types/{types/Booking → Booking}/ICommonQueryParameters.type.d.ts +0 -1
  29. package/dist/types/Booking/IPrice.type.d.ts +7 -0
  30. package/dist/types/Booking/ISplitPayment.type.d.ts +89 -0
  31. package/dist/types/{types/Booking → Booking}/Itinerary.types.d.ts +1 -1
  32. package/dist/types/{types/Booking → Booking}/PencilReservation.types.d.ts +0 -1
  33. package/dist/types/{types/Booking → Booking}/PlaceBooking.types.d.ts +3 -3
  34. package/dist/types/{types/Company → Company}/ECompanyProvider.enum.d.ts +2 -2
  35. package/dist/types/{types/Company → Company}/IAdminCompany.type.d.ts +7 -2
  36. package/dist/types/{types/Company → Company}/IAdminCompanyUser.type.d.ts +0 -1
  37. package/dist/types/DisplayPolicy/EDisplayPolicyRuleType.enum.d.ts +6 -0
  38. package/dist/types/DisplayPolicy/IDisplayPolicy.type.d.ts +42 -0
  39. package/dist/types/{types/Events → Events}/ERoomstayEventSource.enum.d.ts +0 -1
  40. package/dist/types/{types/Events → Events}/IRoomstayEvent.type.d.ts +0 -1
  41. package/dist/types/{types/Fees → Fees}/EFeeType.enum.d.ts +0 -1
  42. package/dist/types/{types/Fees → Fees}/IFee.type.d.ts +0 -1
  43. package/dist/types/{types/Fees → Fees}/IFeeConfigurationOptions.type.d.ts +0 -1
  44. package/dist/types/Fees/IFeeOptions.type.d.ts +6 -0
  45. package/dist/types/{types/General → General}/Format.types.d.ts +0 -1
  46. package/dist/types/{types/General → General}/HttpMethod.enum.d.ts +0 -1
  47. package/dist/types/{types/General → General}/IMessage.type.d.ts +0 -1
  48. package/dist/types/{types/General → General}/Pagination.types.d.ts +0 -1
  49. package/dist/types/{types/General → General}/Warning.type.d.ts +0 -1
  50. package/dist/types/{types/GiftCards → GiftCards}/GiftCard.types.d.ts +9 -1
  51. package/dist/types/{types/GiftCards → GiftCards}/GiftCardAuth.types.d.ts +0 -1
  52. package/dist/types/{types/GiftCards → GiftCards}/GiftCardLogs.enum.d.ts +0 -1
  53. package/dist/types/{types/Hotel → Hotel}/EHotelAddressRequirement.enum.d.ts +0 -1
  54. package/dist/types/{types/Hotel → Hotel}/EHotelPriceModel.enum.d.ts +0 -1
  55. package/dist/types/{types/Hotel → Hotel}/EHotelStateFieldConfiguration.enum.d.ts +0 -1
  56. package/dist/types/{types/Hotel → Hotel}/EHotelWeekdayStartsOn.enum.d.ts +0 -1
  57. package/dist/types/{types/Hotel → Hotel}/EIntegration.enum.d.ts +2 -2
  58. package/dist/types/{types/Hotel → Hotel}/IAuxiliaryFilter.type.d.ts +0 -1
  59. package/dist/types/{types/Hotel → Hotel}/IHotelColorScheme.type.d.ts +0 -1
  60. package/dist/types/{types/Hotel → Hotel}/IHotelOverrides.type.d.ts +0 -1
  61. package/dist/types/{types/Hotel → Hotel}/IHotelReplica.type.d.ts +1 -2
  62. package/dist/types/{types/Hotel → Hotel}/IHotelService.type.d.ts +0 -1
  63. package/dist/types/{types/Image → Image}/IRoomstayImage.type.d.ts +0 -1
  64. package/dist/types/{types/Maintenance → Maintenance}/IMaintenanceStatus.type.d.ts +4 -2
  65. package/dist/types/{types/Media → Media}/IMedia.type.d.ts +0 -1
  66. package/dist/types/Member/EMembershipProvider.type.d.ts +10 -0
  67. package/dist/types/{types/Member → Member}/IMember.type.d.ts +0 -1
  68. package/dist/types/{types/Member → Member}/IMemberVerification.type.d.ts +3 -1
  69. package/dist/types/{types/Member → Member}/IRoomstayCognitoMember.type.d.ts +0 -1
  70. package/dist/types/{types/Member → Member}/IRoomstayMember.type.d.ts +2 -2
  71. package/dist/types/{types/Member → Member}/IRoomstayMemberBooking.type.d.ts +1 -2
  72. package/dist/types/{types/Member → Member}/IRoomstayMemberBookingAddress.type.d.ts +0 -1
  73. package/dist/types/{types/Member → Member}/IRoomstayMemberBookingItem.type.d.ts +1 -2
  74. package/dist/types/{types/Member → Member}/IRoomstayMemberBookingProfile.type.d.ts +1 -2
  75. package/dist/types/{types/Member → Member}/IRoomstayMemberCards.type.d.ts +0 -1
  76. package/dist/types/{types/Member → Member}/IRoomstayMemberJWTData.type.d.ts +0 -1
  77. package/dist/types/Member/IRoomstayMemberLoyalty.type.d.ts +16 -0
  78. package/dist/types/{types/Member → Member}/ISession.type.d.ts +0 -1
  79. package/dist/types/Member/LoyaltyTiers.d.ts +6 -0
  80. package/dist/types/Metasearch/IMetasearchDailyRow.type.d.ts +8 -0
  81. package/dist/types/Newbook/ENewbookDiscountType.enum.d.ts +5 -0
  82. package/dist/types/Newbook/ENewbookRegion.enum.d.ts +7 -0
  83. package/dist/types/Newbook/ENewbookSiteSelectionFeeType.enum.d.ts +4 -0
  84. package/dist/types/Newbook/ENewbookSiteSelectionType.enum.d.ts +6 -0
  85. package/dist/types/Newbook/ENewbookSyncStrategy.enum.d.ts +11 -0
  86. package/dist/types/Newbook/ENewbookSyncType.enum.d.ts +3 -0
  87. package/dist/types/Newbook/INewbookDiscount.type.d.ts +9 -0
  88. package/dist/types/Newbook/INewbookInventoryItem.type.d.ts +9 -0
  89. package/dist/types/Newbook/INewbookSyncResponse.type.d.ts +9 -0
  90. package/dist/types/Newbook/index.d.ts +5 -0
  91. package/dist/types/{types/OHIP → OHIP}/IOHIPConfiguration.types.d.ts +0 -1
  92. package/dist/types/{types/OHIP → OHIP}/index.d.ts +0 -1
  93. package/dist/types/PMS/EPMSSyncStatus.enum.d.ts +8 -0
  94. package/dist/types/PMS/IPMSSyncResponse.type.d.ts +10 -0
  95. package/dist/types/PMS/index.d.ts +2 -0
  96. package/dist/types/PMSSync/EPMSSyncStatus.enum.d.ts +8 -0
  97. package/dist/types/PMSSync/IPMSSyncResponse.type.d.ts +10 -0
  98. package/dist/types/PMSSync/index.d.ts +17 -0
  99. package/dist/types/{types/Package → Package}/Package.types.d.ts +0 -1
  100. package/dist/types/{types/Policies → Policies}/EGuaranteePolicy.enum.d.ts +5 -1
  101. package/dist/types/{types/PromoCode → PromoCode}/EPromoCodeDiscountType.enum.d.ts +2 -2
  102. package/dist/types/{types/PromoCode → PromoCode}/PromoCodeStayDateRangeType.enum.d.ts +0 -1
  103. package/dist/types/{types/RMS → RMS}/ERMSAuthSyncHistoryStatus.type.d.ts +0 -1
  104. package/dist/types/{types/RMS → RMS}/ERMSDiscountType.enum.d.ts +0 -1
  105. package/dist/types/{types/RMS → RMS}/ERMSSyncStrategy.enum.d.ts +1 -1
  106. package/dist/types/{types/RMS → RMS}/IRMSPropertyDiscount.type.d.ts +0 -1
  107. package/dist/types/{types/RMS → RMS}/IRMSRequirement.type.d.ts +0 -1
  108. package/dist/types/{types/RMS → RMS}/IRMSSyncResponse.type.d.ts +0 -1
  109. package/dist/types/{types/RMS → RMS}/RMSBookingSource.type.d.ts +0 -1
  110. package/dist/types/RMS/RMSGuestDTO.type.d.ts +50 -0
  111. package/dist/types/{types/Room → Room}/IRoomGroup.type.d.ts +0 -1
  112. package/dist/types/index.d.ts +166 -3
  113. package/dist/{types/utils → utils}/TotalCalculator.d.ts +0 -1
  114. package/dist/{types/utils → utils}/bookingTotal.d.ts +1 -2
  115. package/dist/{types/utils → utils}/calculateFee.d.ts +1 -2
  116. package/dist/utils/feeOptionRules.d.ts +0 -0
  117. package/dist/{types/utils → utils}/feeTypes.d.ts +1 -2
  118. package/dist/{types/utils → utils}/index.d.ts +0 -1
  119. package/dist/{types/utils → utils}/reflection.d.ts +0 -1
  120. package/dist/{types/utils → utils}/roomstayImageResize.d.ts +1 -2
  121. package/dist/utils/roundMoney.d.ts +20 -0
  122. package/dist/{types/utils → utils}/typeUtils.d.ts +0 -1
  123. package/dist/{types/utils → utils}/uppercaseString.d.ts +0 -1
  124. package/dist/{types/utils → utils}/zodUtils.d.ts +0 -1
  125. package/dist/web.js +1 -0
  126. package/dist/web.js.LICENSE.txt +7 -0
  127. package/package.json +11 -15
  128. package/dist/browser/index.js +0 -3901
  129. package/dist/browser/index.js.map +0 -1
  130. package/dist/node/index.cjs +0 -25
  131. package/dist/node/index.cjs.map +0 -1
  132. package/dist/node/index.mjs +0 -3901
  133. package/dist/node/index.mjs.map +0 -1
  134. package/dist/types/index.d.ts.map +0 -1
  135. package/dist/types/types/Addons/Addon.enum.d.ts.map +0 -1
  136. package/dist/types/types/Addons/Addon.types.d.ts.map +0 -1
  137. package/dist/types/types/Analytics/IBigQueryResults.type.d.ts.map +0 -1
  138. package/dist/types/types/AnalyticsEvents/IAnalyticsEvent.type.d.ts +0 -65
  139. package/dist/types/types/AnalyticsEvents/IAnalyticsEvent.type.d.ts.map +0 -1
  140. package/dist/types/types/AnalyticsEvents/IAnalyticsSession.type.d.ts.map +0 -1
  141. package/dist/types/types/AnalyticsEvents/IRoomstayEventData.type.d.ts.map +0 -1
  142. package/dist/types/types/AnalyticsEvents/MetaCapiTransformer.d.ts.map +0 -1
  143. package/dist/types/types/Api/Reservations.type.d.ts.map +0 -1
  144. package/dist/types/types/Api/RoomNightRate.type.d.ts.map +0 -1
  145. package/dist/types/types/Availability/Availability.types.d.ts.map +0 -1
  146. package/dist/types/types/Booking/ConfirmBooking.types.d.ts.map +0 -1
  147. package/dist/types/types/Booking/EBooking.types.d.ts.map +0 -1
  148. package/dist/types/types/Booking/GetBooking.types.d.ts.map +0 -1
  149. package/dist/types/types/Booking/IBookingCreateErrorResponse.type.d.ts.map +0 -1
  150. package/dist/types/types/Booking/IBookingExtraFields.type.d.ts +0 -6
  151. package/dist/types/types/Booking/IBookingExtraFields.type.d.ts.map +0 -1
  152. package/dist/types/types/Booking/IBookingPayment.type.d.ts.map +0 -1
  153. package/dist/types/types/Booking/IBookingQuote.type.d.ts.map +0 -1
  154. package/dist/types/types/Booking/ICommonQueryParameters.type.d.ts.map +0 -1
  155. package/dist/types/types/Booking/Itinerary.types.d.ts.map +0 -1
  156. package/dist/types/types/Booking/PencilReservation.types.d.ts.map +0 -1
  157. package/dist/types/types/Booking/PlaceBooking.types.d.ts.map +0 -1
  158. package/dist/types/types/Company/ECompanyProvider.enum.d.ts.map +0 -1
  159. package/dist/types/types/Company/IAdminCompany.type.d.ts.map +0 -1
  160. package/dist/types/types/Company/IAdminCompanyUser.type.d.ts.map +0 -1
  161. package/dist/types/types/Events/ERoomstayEventSource.enum.d.ts.map +0 -1
  162. package/dist/types/types/Events/IRoomstayEvent.type.d.ts.map +0 -1
  163. package/dist/types/types/Fees/EFeeType.enum.d.ts.map +0 -1
  164. package/dist/types/types/Fees/IFee.type.d.ts.map +0 -1
  165. package/dist/types/types/Fees/IFeeConfigurationOptions.type.d.ts.map +0 -1
  166. package/dist/types/types/General/Format.types.d.ts.map +0 -1
  167. package/dist/types/types/General/HttpMethod.enum.d.ts.map +0 -1
  168. package/dist/types/types/General/IMessage.type.d.ts.map +0 -1
  169. package/dist/types/types/General/Pagination.types.d.ts.map +0 -1
  170. package/dist/types/types/General/Warning.type.d.ts.map +0 -1
  171. package/dist/types/types/GiftCards/GiftCard.types.d.ts.map +0 -1
  172. package/dist/types/types/GiftCards/GiftCardAuth.types.d.ts.map +0 -1
  173. package/dist/types/types/GiftCards/GiftCardLogs.enum.d.ts.map +0 -1
  174. package/dist/types/types/Hotel/EHotelAddressRequirement.enum.d.ts.map +0 -1
  175. package/dist/types/types/Hotel/EHotelPriceModel.enum.d.ts.map +0 -1
  176. package/dist/types/types/Hotel/EHotelStateFieldConfiguration.enum.d.ts.map +0 -1
  177. package/dist/types/types/Hotel/EHotelWeekdayStartsOn.enum.d.ts.map +0 -1
  178. package/dist/types/types/Hotel/EIntegration.enum.d.ts.map +0 -1
  179. package/dist/types/types/Hotel/IAuxiliaryFilter.type.d.ts.map +0 -1
  180. package/dist/types/types/Hotel/IHotelColorScheme.type.d.ts.map +0 -1
  181. package/dist/types/types/Hotel/IHotelOverrides.type.d.ts.map +0 -1
  182. package/dist/types/types/Hotel/IHotelReplica.type.d.ts.map +0 -1
  183. package/dist/types/types/Hotel/IHotelService.type.d.ts.map +0 -1
  184. package/dist/types/types/Image/IRoomstayImage.type.d.ts.map +0 -1
  185. package/dist/types/types/Maintenance/IMaintenanceStatus.type.d.ts.map +0 -1
  186. package/dist/types/types/Media/IMedia.type.d.ts.map +0 -1
  187. package/dist/types/types/Member/IMember.type.d.ts.map +0 -1
  188. package/dist/types/types/Member/IMemberVerification.type.d.ts.map +0 -1
  189. package/dist/types/types/Member/IRoomstayCognitoMember.type.d.ts.map +0 -1
  190. package/dist/types/types/Member/IRoomstayMember.type.d.ts.map +0 -1
  191. package/dist/types/types/Member/IRoomstayMemberBooking.type.d.ts.map +0 -1
  192. package/dist/types/types/Member/IRoomstayMemberBookingAddress.type.d.ts.map +0 -1
  193. package/dist/types/types/Member/IRoomstayMemberBookingItem.type.d.ts.map +0 -1
  194. package/dist/types/types/Member/IRoomstayMemberBookingProfile.type.d.ts.map +0 -1
  195. package/dist/types/types/Member/IRoomstayMemberCards.type.d.ts.map +0 -1
  196. package/dist/types/types/Member/IRoomstayMemberJWTData.type.d.ts.map +0 -1
  197. package/dist/types/types/Member/ISession.type.d.ts.map +0 -1
  198. package/dist/types/types/OHIP/IOHIPConfiguration.types.d.ts.map +0 -1
  199. package/dist/types/types/OHIP/index.d.ts.map +0 -1
  200. package/dist/types/types/Package/Package.types.d.ts.map +0 -1
  201. package/dist/types/types/Policies/EGuaranteePolicy.enum.d.ts.map +0 -1
  202. package/dist/types/types/PromoCode/EPromoCodeDiscountType.enum.d.ts.map +0 -1
  203. package/dist/types/types/PromoCode/PromoCodeStayDateRangeType.enum.d.ts.map +0 -1
  204. package/dist/types/types/RMS/ERMSAuthSyncHistoryStatus.type.d.ts.map +0 -1
  205. package/dist/types/types/RMS/ERMSDiscountType.enum.d.ts.map +0 -1
  206. package/dist/types/types/RMS/ERMSSyncStrategy.enum.d.ts.map +0 -1
  207. package/dist/types/types/RMS/IRMSPropertyDiscount.type.d.ts.map +0 -1
  208. package/dist/types/types/RMS/IRMSRequirement.type.d.ts.map +0 -1
  209. package/dist/types/types/RMS/IRMSSyncResponse.type.d.ts.map +0 -1
  210. package/dist/types/types/RMS/RMSBookingSource.type.d.ts.map +0 -1
  211. package/dist/types/types/Room/IRoomGroup.type.d.ts.map +0 -1
  212. package/dist/types/types/index.d.ts +0 -139
  213. package/dist/types/types/index.d.ts.map +0 -1
  214. package/dist/types/utils/TotalCalculator.d.ts.map +0 -1
  215. package/dist/types/utils/bookingTotal.d.ts.map +0 -1
  216. package/dist/types/utils/calculateFee.d.ts.map +0 -1
  217. package/dist/types/utils/feeTypes.d.ts.map +0 -1
  218. package/dist/types/utils/index.d.ts.map +0 -1
  219. package/dist/types/utils/reflection.d.ts.map +0 -1
  220. package/dist/types/utils/roomstayImageResize.d.ts.map +0 -1
  221. package/dist/types/utils/roundMoney.d.ts +0 -11
  222. package/dist/types/utils/roundMoney.d.ts.map +0 -1
  223. package/dist/types/utils/typeUtils.d.ts.map +0 -1
  224. package/dist/types/utils/uppercaseString.d.ts.map +0 -1
  225. package/dist/types/utils/zodUtils.d.ts.map +0 -1
@@ -0,0 +1,2 @@
1
+ export * from './types/index';
2
+ export * from './utils/index';
package/dist/node.js ADDED
@@ -0,0 +1 @@
1
+ (()=>{"use strict";var e={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return e.d(n,{a:n}),n},d:(t,n)=>{for(var i in n)e.o(n,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:n[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};let n,i,o,r,a,s,c;e.r(t),e.d(t,{ADDON_PER_NIGHT_TYPES:()=>cr,AddGiftCardSchema:()=>Do,AdyenEventCode:()=>Wo,AdyenResultCode:()=>Qo,BaseGiftCardSchema:()=>$o,CancelGiftCardTransactionSchema:()=>er,CompleteGiftCardTransactionSchema:()=>Xo,CreatePaymentSessionSchema:()=>jo,DATE_FORMAT:()=>j,EAddonPricingType:()=>sr,EAdminCompanyUserRole:()=>h,EBookingCustomFieldFormat:()=>o,EBookingFlow:()=>i,EBookingPaymentMethod:()=>r,EBookingStatus:()=>n,ECompanyProvider:()=>f,EDisplayPolicyDeviceTarget:()=>pr,EDisplayPolicyRuleType:()=>fr,EDistanceUnitType:()=>b,EFeeType:()=>M,EGiftCardPaymentProvider:()=>Vo,EGiftCardPaymentStatus:()=>Yo,EGiftCardPaymentType:()=>Uo,EGiftCardTransactionType:()=>Jo,EGuaranteePolicyDepositMode:()=>S,EGuarantyPolicyPrepaymentType:()=>O,EHotelAddressRequirement:()=>m,EHotelCardProcessor:()=>a,EHotelCardProcessorPaymentType:()=>s,EHotelPriceModel:()=>g,EHotelStateFieldConfiguration:()=>y,EHotelWeekdayStartsOn:()=>v,EIntegration:()=>_,ELogCategory:()=>dr,ELogSeverity:()=>ur,ELogType:()=>lr,EMembershipProvider:()=>I,ENewbookDiscountType:()=>w,ENewbookRegion:()=>E,ENewbookSyncStrategy:()=>A,EPMSSyncStatus:()=>T,EPlanpayBookingStatus:()=>c,EPromoCodeDiscountType:()=>x,EPromoCodeStayDateRangeRepeatType:()=>$,EPromoCodeStayDateRangeType:()=>F,ERMSAuthSyncHistoryStatus:()=>C,ERMSDiscountType:()=>k,ERMSSyncStrategy:()=>z,ERoomstayEventName:()=>G,ERoomstayEventSource:()=>D,ERoomstayImageSize:()=>N,ETransactionStatus:()=>Ko,EditGiftCardSchema:()=>Zo,GetCompanyConfigSchema:()=>tr,GuestProfile:()=>p,HttpMethod:()=>L,IAuxiliaryFilterType:()=>P,IMaintenanceStatusService:()=>R,InternationalAddressSchema:()=>Fo,ItineraryResponse:()=>d,META_USER_DATA_KEYS:()=>B,PCIBookingCardProcessorTypes:()=>u,Package:()=>Z,PassthroughPaymentDataSchema:()=>Mo,PaymentProcessorDataSchema:()=>Lo,PurchaseGiftCardSchema:()=>Go,RedeemGiftCardSchema:()=>qo,RefreshGiftCardTokenSchema:()=>rr,RefundGiftCardSchema:()=>Bo,RegisterGiftCardAdminSchema:()=>ar,Reservation:()=>l,ReservedPackage:()=>U,RoundingType:()=>yr,TotalCalculator:()=>Ir,UpdateAdyenConfigSchema:()=>or,UpdateCompanyConfigSchema:()=>ir,ValidateGiftCardSchema:()=>Ho,buildPixelEventOptions:()=>Q,calculateFeeAmount:()=>_r,calculateTotalForMemberBooking:()=>hr,getFeeOptionValidity:()=>Tr,getFilteredBookingAddonFees:()=>Ar,getFilteredBookingFees:()=>wr,getFilteredBookingRateFees:()=>Er,maxString:()=>xo,nameof:()=>Cr,preprocessDate:()=>No,preprocessNumber:()=>Co,requireEmail:()=>Io,requireFutureDate:()=>Oo,requirePositiveAmount:()=>So,requireString:()=>Ro,resizeRoomstayImageUrl:()=>Rr,roundMoney:()=>vr,subset:()=>Nr,toMetaEventName:()=>H,transformToMetaEventData:()=>V,transformToMetaUserData:()=>Y,uppercaseString:()=>Sr,validateFormWithZod:()=>To}),function(e){e.Pending="Pending",e.Processing="Processing",e.Committed="Committed",e.Cancelled="Cancelled",e.Reverted="Reverted"}(n||(n={})),function(e){e.Default="Default",e.PreCheckoutPencil="PreCheckoutPencil",e.PostCheckoutPencil="PostCheckoutPencil"}(i||(i={})),function(e){e.Number="number",e.Text="text",e.Date="date",e.CarReg="carreg"}(o||(o={})),function(e){e.Card="Card",e.SavedCard="SavedCard",e.Planpay="Planpay",e.Adyen="Adyen",e.Afterpay="Afterpay",e.PCIBookingCard="PCIBookingCard",e.TrueRewards="TrueRewards"}(r||(r={})),function(e){e.Passthrough="Passthrough",e.Adyen="Adyen",e.Till="Till",e.RMSPay="RMSPay",e.Windcave="Windcave",e.Mastercard="Mastercard",e.Stripe="Stripe",e.PayPal="PayPal"}(a||(a={})),function(e){e.Card="card",e.Account2Account="account2account"}(s||(s={})),function(e){e.Unknown="unknown",e.Unpaid="unpaid",e.Accepted="accepted",e.Cancelled="cancelled",e.Refunded="refunded",e.Rejected="rejected"}(c||(c={}));const u=[];class d{constructor(){this.roomstayId=void 0,this.itineraryNumber=void 0,this.total=void 0,this.hotelFrontendId=void 0,this.reservations=[],this.payment=void 0,this.feesSummary=void 0,this.itemisedFees=void 0,this.warnings=void 0}}class l{constructor(){this.reservationNumber=void 0,this.roomType=void 0,this.roomCode=void 0,this.rate=void 0,this.rateCode=void 0,this.images=void 0,this.guaranteePolicy=void 0,this.cancellationPolicy=void 0,this.checkInDate=void 0,this.checkOutDate=void 0,this.nights={},this.guestCounts={adults:1,children:0},this.guest=new p,this.paymentCard=void 0,this.paymentMethod=void 0,this.total=void 0,this.status=void 0,this.isCancelable=void 0,this.addons=void 0,this.comments=void 0,this.specialRequests=void 0,this.promoCode=void 0,this.guaranteePolicyLongDescription=void 0,this.cancellationPolicyLongDescription=void 0,this.itemisedFees=void 0}}class p{constructor(){this.title=void 0,this.firstName=void 0,this.middleName=void 0,this.lastName=void 0,this.nameSuffix=void 0,this.phone=void 0,this.email=void 0,this.address={},this.marketingOptIn=void 0,this.country=void 0}}let f,h,m,g,y,v,_,P,b,k,z,w,E,A,T,C,N,R,I,S,O,x,F,$,D;!function(e){e.Synxis="Synxis",e.Availpro="Availpro",e.RMS="RMS",e.Siteminder="Siteminder",e.Roomstay="Roomstay",e.OHIP="OHIP",e.Newbook="Newbook"}(f||(f={})),function(e){e.SuperAdmin="SuperAdmin",e.Admin="Admin",e.Limited="Limited"}(h||(h={})),function(e){e.FullAddressRequired="FullAddressRequired",e.AddressOptionalCountryRequired="AddressOptionalCountryRequired",e.AddressOptional="AddressOptional"}(m||(m={})),function(e){e.PerPerson="PerPerson",e.PerDay="PerDay",e.PerOccupancy="PerOccupancy"}(g||(g={})),function(e){e.NotIncluded="NotIncluded",e.Optional="Optional",e.Required="Required"}(y||(y={})),function(e){e.Monday="monday",e.Sunday="sunday"}(v||(v={})),function(e){e.Big4="Big4",e.RmsTop10="Top10",e.Top10="NewTop10",e.Gday="Gday",e.Salesforce="Salesforce",e.RAC="RAC",e.AnalyticsEvents="AnalyticsEvents",e.MemberJungle="MemberJungle"}(_||(_={})),function(e){e.AreaDwellingLength="AreaDwellingLength",e.AreaDwellingType="AreaDwellingType"}(P||(P={})),function(e){e.Metric="metric",e.Imperial="imperial"}(b||(b={})),function(e){e.Percentage="Percentage",e.Amount="Amount",e.Bogo="BOGO",e.NightlyRateOverride="NightlyRateOverride"}(k||(k={})),function(e){e.Hotel="hotel",e.HotelImages="hotelImages",e.Cancellation="cancellation",e.Room="room",e.Rates="rates",e.OneGuaranteePolicy="oneGuaranteePolicy",e.RoomRates="roomRates",e.RoomImages="roomImages",e.BookingSources="booking-sources",e.Areas="areas",e.Dwellings="dwellings",e.AreaDwellings="areaDwellings",e.ConvertDwellingConfigToAuxInput="convertDwellingConfigToAuxInput",e.Discounts="discounts",e.PropertyDiscounts="propertyDiscounts",e.RoomDiscounts="roomDiscounts",e.PropertySundries="propertySundries",e.PropertyFees="propertyFees",e.PropertyCards="property-cards",e.Countries="countries",e.Addons="addons",e.Requirements="requirements",e.RoomAddons="room-addons",e.ClientFacingPromoSync="clientFacingPromoSync",e.ClientFacingRoomSync="clientFacingRoomSync",e.ClientFacingRateSync="clientFacingRateSync",e.ClientFacingAreaSync="clientFacingAreaSync",e.NewRateFetch="newRateFetch"}(z||(z={})),function(e){e.Percentage="percentage",e.FixedPerNight="fixed_per_night",e.Fixed="fixed"}(w||(w={})),function(e){e.Australia="au",e.AsiaPacific="ap",e.Europe="eu",e.UnitedStates="us",e.Staging="staging"}(E||(E={})),function(e){e.Rates="rates",e.Rooms="rooms",e.Availability="availability",e.Details="details",e.Tariffs="tariffs",e.Discounts="discounts",e.InventoryItems="inventoryItems",e.Sites="sites",e.SitesToAuxInputs="sitesToAuxInputs"}(A||(A={})),function(e){e.New="new",e.Queued="queued",e.InProgress="in_progress",e.Success="success",e.Failure="failure",e.RequireResume="require_resume"}(T||(T={})),function(e){e.Success="success",e.Failure="failure",e.New="new",e.Queued="queued",e.InProgress="in_progress",e.RequireResume="require_resume"}(C||(C={})),function(e){e[e.Icon=128]="Icon",e[e.Tiny=256]="Tiny",e[e.Small=512]="Small",e[e.Medium=768]="Medium",e[e.Large=1024]="Large",e[e.ExtraLarge=1600]="ExtraLarge"}(N||(N={})),function(e){e.Frontend="frontend",e.Hotel="hotel",e.Events="events"}(R||(R={})),function(e){e.Big4="Big4",e.Gday="Gday",e.Internal="Internal",e.MemberJungle="MemberJungle",e.RAC="RAC",e.RmsTop10="RmsTop10",e.Salesforce="Salesforce",e.Top10="Top10"}(I||(I={}));class Z{constructor(){this.ratePlanCode=void 0,this.name=void 0,this.description=void 0,this.inclusive=void 0,this.image=void 0,this.url=void 0,this.pricingType=void 0,this.quantity=void 0,this.category=void 0,this.cancelPenalty=void 0,this.guaranteeDescription=void 0,this.availability={}}}class U extends Z{constructor(...e){super(...e),this.code=void 0,this.price=void 0,this.fees=void 0,this.itemisedFees=void 0,this.adultQuantity=void 0,this.childQuantity=void 0,this.adultPrice=void 0,this.childPrice=void 0,this.startDate=void 0,this.startTime=void 0,this.hideDatePicker=!1,this.hideQuantity=!1,this.order=void 0,this.discount=void 0,this.total=void 0}}!function(e){e.Full="Full",e.Percentage="Percentage",e.FirstNight="FirstNight",e.None="None"}(S||(S={})),function(e){e.FixedAmount="fixed",e.Percentage="percentage",e.Nights="nights"}(O||(O={})),function(e){e.FlatPercent="flatPercent",e.FlatQuantity="flatQuantity",e.FlatQuantityPerStay="flatQuantityPerStay",e.FixedNightlyRate="fixedNightlyRate"}(x||(x={})),function(e){e.Allowed="Allowed",e.Blocked="Blocked"}(F||(F={})),function(e){e.None="None",e.Weekly="Weekly",e.MonthlyDayOfWeek="MonthlyDayOfWeek",e.MonthlyDate="MonthlyDate",e.Yearly="Yearly"}($||($={})),function(e){e.Eventbrite="eventbrite",e.ATDW="atdw"}(D||(D={}));const j="DD/MM/YYYY";let L,M,G;!function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e.PATCH="PATCH",e.OPTIONS="OPTIONS",e.HEAD="HEAD"}(L||(L={})),function(e){e.PercentageOfBooking="PercentageOfBooking",e.FixedChargePerRoom="FixedChargePerRoom",e.NightlyChargePerRoom="NightlyChargePerRoom",e.FixedChargePerBooking="FixedChargePerBooking",e.DepositSurcharge="DepositSurcharge"}(M||(M={})),function(e){e.BasketAdd="Basket/Add",e.BasketAddAddon="Basket/AddAddon",e.ViewCheckout="View/Checkout",e.BookingCommitted="Booking/Committed"}(G||(G={}));const B=["em","ph","fn","ln","ct","st","zp","country","external_id"];function H(e){return{[G.BasketAdd]:"AddToCart",[G.BasketAddAddon]:"AddToCart",[G.ViewCheckout]:"InitiateCheckout",[G.BookingCommitted]:"Purchase"}[e]}function q(e,t,n){let i=0;const o=[],r=[];for(const t of e)i+=t.totalPrice,t.roomCode&&(o.push(t.roomCode),r.push({id:t.roomCode,quantity:1,item_price:t.totalPrice}));if(t)for(const e of t)i+=e.totalPrice,e.addonCode&&(o.push(e.addonCode),r.push({id:e.addonCode,quantity:e.quantity,item_price:e.unitPrice}));return{currency:n,value:i,content_ids:o,content_type:"hotel",contents:r,num_items:e.length+(t?.length??0)}}function V(e){if("addon"in e)return t=e.addon,{currency:e.currency,value:t.totalPrice,content_ids:t.addonCode?[t.addonCode]:[],content_type:"hotel",contents:t.addonCode?[{id:t.addonCode,quantity:t.quantity,item_price:t.unitPrice}]:[],num_items:1};var t;if("item"in e)return q([e.item],void 0,e.currency);if("items"in e){const t=e,n=q(t.items,t.addons,e.currency);return"itineraryNumber"in t&&(n.order_id=t.itineraryNumber),n}throw new Error("Invalid event data")}function Y(e){return{em:e.email,ph:e.phone,fn:e.firstName,ln:e.lastName,ct:e.city,st:e.state,zp:e.postalCode,country:e.country,external_id:e.externalId}}function Q(e,t){const n={eventID:e};if(t)for(const e of B)t[e]&&(n[e]=t[e]);return n}function W(e,t,n){function i(n,i){var o;Object.defineProperty(n,"_zod",{value:n._zod??{},enumerable:!1}),(o=n._zod).traits??(o.traits=new Set),n._zod.traits.add(e),t(n,i);for(const e in a.prototype)e in n||Object.defineProperty(n,e,{value:a.prototype[e].bind(n)});n._zod.constr=a,n._zod.def=i}const o=n?.Parent??Object;class r extends o{}function a(e){var t;const o=n?.Parent?new r:this;i(o,e),(t=o._zod).deferred??(t.deferred=[]);for(const e of o._zod.deferred)e();return o}return Object.defineProperty(r,"name",{value:e}),Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}Object.freeze({status:"aborted"}),Symbol("zod_brand");class J extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class K extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const X={};function ee(e){return e&&Object.assign(X,e),X}const te=/^[cC][^\s-]{8,}$/,ne=/^[0-9a-z]+$/,ie=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,oe=/^[0-9a-vA-V]{20}$/,re=/^[A-Za-z0-9]{27}$/,ae=/^[a-zA-Z0-9_-]{21}$/,se=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ce=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ue=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,de=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,le=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,pe=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,fe=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,he=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,me=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ge=/^[A-Za-z0-9_-]*$/,ye=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,ve=/^\+(?:[0-9]){6,14}[0-9]$/,_e="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Pe=new RegExp(`^${_e}$`);function be(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}const ke=/^\d+$/,ze=/^-?\d+(?:\.\d+)?/i,we=/true|false/i,Ee=/^[^A-Z]*$/,Ae=/^[^a-z]*$/;function Te(e,t){return"bigint"==typeof t?t.toString():t}function Ce(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Ne(e){return null==e}function Re(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const Ie=Symbol("evaluating");function Se(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==Ie)return void 0===i&&(i=Ie,i=n()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Oe(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function xe(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Fe(e){return JSON.stringify(e)}const $e="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function De(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const Ze=Ce((()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}}));function Ue(e){if(!1===De(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!1!==De(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function je(e){return Ue(e)?{...e}:e}const Le=new Set(["string","number","symbol"]);function Me(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ge(e,t,n){const i=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(i._zod.parent=e),i}function Be(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}new Set(["string","number","bigint","boolean","symbol","undefined"]);const He={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function qe(e,t=0){if(!0===e.aborted)return!0;for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function Ve(e,t){return t.map((t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t}))}function Ye(e){return"string"==typeof e?e:e?.message}function Qe(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const o=Ye(e.inst?._zod.def?.error?.(e))??Ye(t?.error?.(e))??Ye(n.customError?.(e))??Ye(n.localeError?.(e))??"Invalid input";i.message=o}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function We(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function Je(...e){const[t,n,i]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:i}:{...t}}const Ke=W("$ZodCheck",((e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])})),Xe={number:"number",bigint:"bigint",object:"date"},et=W("$ZodCheckLessThan",((e,t)=>{Ke.init(e,t);const n=Xe[typeof t.value];e._zod.onattach.push((e=>{const n=e._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)})),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}})),tt=W("$ZodCheckGreaterThan",((e,t)=>{Ke.init(e,t);const n=Xe[typeof t.value];e._zod.onattach.push((e=>{const n=e._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)})),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}})),nt=W("$ZodCheckMultipleOf",((e,t)=>{Ke.init(e,t),e._zod.onattach.push((e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)})),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===function(e,t){const n=(e.toString().split(".")[1]||"").length,i=t.toString();let o=(i.split(".")[1]||"").length;if(0===o&&/\d?e-\d?/.test(i)){const e=i.match(/\d?e-(\d?)/);e?.[1]&&(o=Number.parseInt(e[1]))}const r=n>o?n:o;return Number.parseInt(e.toFixed(r).replace(".",""))%Number.parseInt(t.toFixed(r).replace(".",""))/10**r}(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}})),it=W("$ZodCheckNumberFormat",((e,t)=>{Ke.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),i=n?"int":"number",[o,r]=He[t.format];e._zod.onattach.push((e=>{const i=e._zod.bag;i.format=t.format,i.minimum=o,i.maximum=r,n&&(i.pattern=ke)})),e._zod.check=a=>{const s=a.value;if(n){if(!Number.isInteger(s))return void a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,continue:!t.abort}))}s<o&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),s>r&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:r,inst:e})}})),ot=W("$ZodCheckMaxLength",((e,t)=>{var n;Ke.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Ne(t)&&void 0!==t.length}),e._zod.onattach.push((e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)})),e._zod.check=n=>{const i=n.value;if(i.length<=t.maximum)return;const o=We(i);n.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}})),rt=W("$ZodCheckMinLength",((e,t)=>{var n;Ke.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Ne(t)&&void 0!==t.length}),e._zod.onattach.push((e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)})),e._zod.check=n=>{const i=n.value;if(i.length>=t.minimum)return;const o=We(i);n.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}})),at=W("$ZodCheckLengthEquals",((e,t)=>{var n;Ke.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Ne(t)&&void 0!==t.length}),e._zod.onattach.push((e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length})),e._zod.check=n=>{const i=n.value,o=i.length;if(o===t.length)return;const r=We(i),a=o>t.length;n.issues.push({origin:r,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}})),st=W("$ZodCheckStringFormat",((e,t)=>{var n,i;Ke.init(e,t),e._zod.onattach.push((e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))})),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})})),ct=W("$ZodCheckRegex",((e,t)=>{st.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}})),ut=W("$ZodCheckLowerCase",((e,t)=>{t.pattern??(t.pattern=Ee),st.init(e,t)})),dt=W("$ZodCheckUpperCase",((e,t)=>{t.pattern??(t.pattern=Ae),st.init(e,t)})),lt=W("$ZodCheckIncludes",((e,t)=>{Ke.init(e,t);const n=Me(t.includes),i=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push((e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(i)})),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}})),pt=W("$ZodCheckStartsWith",((e,t)=>{Ke.init(e,t);const n=new RegExp(`^${Me(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push((e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)})),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}})),ft=W("$ZodCheckEndsWith",((e,t)=>{Ke.init(e,t);const n=new RegExp(`.*${Me(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push((e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)})),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}})),ht=W("$ZodCheckOverwrite",((e,t)=>{Ke.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}));class mt{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter((e=>e)),n=Math.min(...t.map((e=>e.length-e.trimStart().length))),i=t.map((e=>e.slice(n))).map((e=>" ".repeat(2*this.indent)+e));for(const e of i)this.content.push(e)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map((e=>` ${e}`))].join("\n"))}}const gt=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Te,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},yt=W("$ZodError",gt),vt=W("$ZodError",gt,{Parent:Error}),_t=e=>(t,n,i,o)=>{const r=i?Object.assign(i,{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},r);if(a instanceof Promise)throw new J;if(a.issues.length){const t=new(o?.Err??e)(a.issues.map((e=>Qe(e,r,ee()))));throw $e(t,o?.callee),t}return a.value},Pt=e=>async(t,n,i,o)=>{const r=i?Object.assign(i,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},r);if(a instanceof Promise&&(a=await a),a.issues.length){const t=new(o?.Err??e)(a.issues.map((e=>Qe(e,r,ee()))));throw $e(t,o?.callee),t}return a.value},bt=e=>(t,n,i)=>{const o=i?{...i,async:!1}:{async:!1},r=t._zod.run({value:n,issues:[]},o);if(r instanceof Promise)throw new J;return r.issues.length?{success:!1,error:new(e??yt)(r.issues.map((e=>Qe(e,o,ee()))))}:{success:!0,data:r.value}},kt=bt(vt),zt=e=>async(t,n,i)=>{const o=i?Object.assign(i,{async:!0}):{async:!0};let r=t._zod.run({value:n,issues:[]},o);return r instanceof Promise&&(r=await r),r.issues.length?{success:!1,error:new e(r.issues.map((e=>Qe(e,o,ee()))))}:{success:!0,data:r.value}},wt=zt(vt),Et=e=>(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return _t(e)(t,n,o)},At=e=>(t,n,i)=>_t(e)(t,n,i),Tt=e=>async(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Pt(e)(t,n,o)},Ct=e=>async(t,n,i)=>Pt(e)(t,n,i),Nt=e=>(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return bt(e)(t,n,o)},Rt=e=>(t,n,i)=>bt(e)(t,n,i),It=e=>async(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return zt(e)(t,n,o)},St=e=>async(t,n,i)=>zt(e)(t,n,i),Ot={major:4,minor:1,patch:5},xt=W("$ZodType",((e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ot;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const t of i)for(const n of t._zod.onattach)n(e);if(0===i.length)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push((()=>{e._zod.run=e._zod.parse}));else{const t=(e,t,n)=>{let i,o=qe(e);for(const r of t){if(r._zod.def.when){if(!r._zod.def.when(e))continue}else if(o)continue;const t=e.issues.length,a=r._zod.check(e);if(a instanceof Promise&&!1===n?.async)throw new J;if(i||a instanceof Promise)i=(i??Promise.resolve()).then((async()=>{await a,e.issues.length!==t&&(o||(o=qe(e,t)))}));else{if(e.issues.length===t)continue;o||(o=qe(e,t))}}return i?i.then((()=>e)):e},n=(n,o,r)=>{if(qe(n))return n.aborted=!0,n;const a=t(o,i,r);if(a instanceof Promise){if(!1===r.async)throw new J;return a.then((t=>e._zod.parse(t,r)))}return e._zod.parse(a,r)};e._zod.run=(o,r)=>{if(r.skipChecks)return e._zod.parse(o,r);if("backward"===r.direction){const t=e._zod.parse({value:o.value,issues:[]},{...r,skipChecks:!0});return t instanceof Promise?t.then((e=>n(e,o,r))):n(t,o,r)}const a=e._zod.parse(o,r);if(a instanceof Promise){if(!1===r.async)throw new J;return a.then((e=>t(e,i,r)))}return t(a,i,r)}}e["~standard"]={validate:t=>{try{const n=kt(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return wt(e,t).then((e=>e.success?{value:e.data}:{issues:e.error?.issues}))}},vendor:"zod",version:1}})),Ft=W("$ZodString",((e,t)=>{var n;xt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(n=e._zod.bag,new RegExp(`^${n?`[\\s\\S]{${n?.minimum??0},${n?.maximum??""}}`:"[\\s\\S]*"}$`)),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch(i){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}})),$t=W("$ZodStringFormat",((e,t)=>{st.init(e,t),Ft.init(e,t)})),Dt=W("$ZodGUID",((e,t)=>{t.pattern??(t.pattern=ce),$t.init(e,t)})),Zt=W("$ZodUUID",((e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=ue(e))}else t.pattern??(t.pattern=ue());$t.init(e,t)})),Ut=W("$ZodEmail",((e,t)=>{t.pattern??(t.pattern=de),$t.init(e,t)})),jt=W("$ZodURL",((e,t)=>{$t.init(e,t),e._zod.check=n=>{try{const i=n.value.trim(),o=new URL(i);return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:ye.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(t.normalize?n.value=o.href:n.value=i)}catch(i){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}})),Lt=W("$ZodEmoji",((e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),$t.init(e,t)})),Mt=W("$ZodNanoID",((e,t)=>{t.pattern??(t.pattern=ae),$t.init(e,t)})),Gt=W("$ZodCUID",((e,t)=>{t.pattern??(t.pattern=te),$t.init(e,t)})),Bt=W("$ZodCUID2",((e,t)=>{t.pattern??(t.pattern=ne),$t.init(e,t)})),Ht=W("$ZodULID",((e,t)=>{t.pattern??(t.pattern=ie),$t.init(e,t)})),qt=W("$ZodXID",((e,t)=>{t.pattern??(t.pattern=oe),$t.init(e,t)})),Vt=W("$ZodKSUID",((e,t)=>{t.pattern??(t.pattern=re),$t.init(e,t)})),Yt=W("$ZodISODateTime",((e,t)=>{t.pattern??(t.pattern=function(e){const t=be({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${t}(?:${n.join("|")})`;return new RegExp(`^${_e}T(?:${i})$`)}(t)),$t.init(e,t)})),Qt=W("$ZodISODate",((e,t)=>{t.pattern??(t.pattern=Pe),$t.init(e,t)})),Wt=W("$ZodISOTime",((e,t)=>{t.pattern??(t.pattern=new RegExp(`^${be(t)}$`)),$t.init(e,t)})),Jt=W("$ZodISODuration",((e,t)=>{t.pattern??(t.pattern=se),$t.init(e,t)})),Kt=W("$ZodIPv4",((e,t)=>{t.pattern??(t.pattern=le),$t.init(e,t),e._zod.onattach.push((e=>{e._zod.bag.format="ipv4"}))})),Xt=W("$ZodIPv6",((e,t)=>{t.pattern??(t.pattern=pe),$t.init(e,t),e._zod.onattach.push((e=>{e._zod.bag.format="ipv6"})),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}})),en=W("$ZodCIDRv4",((e,t)=>{t.pattern??(t.pattern=fe),$t.init(e,t)})),tn=W("$ZodCIDRv6",((e,t)=>{t.pattern??(t.pattern=he),$t.init(e,t),e._zod.check=n=>{const[i,o]=n.value.split("/");try{if(!o)throw new Error;const e=Number(o);if(`${e}`!==o)throw new Error;if(e<0||e>128)throw new Error;new URL(`http://[${i}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}}));function nn(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const on=W("$ZodBase64",((e,t)=>{t.pattern??(t.pattern=me),$t.init(e,t),e._zod.onattach.push((e=>{e._zod.bag.contentEncoding="base64"})),e._zod.check=n=>{nn(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}})),rn=W("$ZodBase64URL",((e,t)=>{t.pattern??(t.pattern=ge),$t.init(e,t),e._zod.onattach.push((e=>{e._zod.bag.contentEncoding="base64url"})),e._zod.check=n=>{(function(e){if(!ge.test(e))return!1;const t=e.replace(/[-_]/g,(e=>"-"===e?"+":"/"));return nn(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}})),an=W("$ZodE164",((e,t)=>{t.pattern??(t.pattern=ve),$t.init(e,t)})),sn=W("$ZodJWT",((e,t)=>{$t.init(e,t),e._zod.check=n=>{(function(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[i]=n;if(!i)return!1;const o=JSON.parse(atob(i));return!("typ"in o&&"JWT"!==o?.typ||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}})),cn=W("$ZodNumber",((e,t)=>{xt.init(e,t),e._zod.pattern=e._zod.bag.pattern??ze,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const o=n.value;if("number"==typeof o&&!Number.isNaN(o)&&Number.isFinite(o))return n;const r="number"==typeof o?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...r?{received:r}:{}}),n}})),un=W("$ZodNumber",((e,t)=>{it.init(e,t),cn.init(e,t)})),dn=W("$ZodBoolean",((e,t)=>{xt.init(e,t),e._zod.pattern=we,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const o=n.value;return"boolean"==typeof o||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}})),ln=W("$ZodUnknown",((e,t)=>{xt.init(e,t),e._zod.parse=e=>e})),pn=W("$ZodNever",((e,t)=>{xt.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)})),fn=W("$ZodDate",((e,t)=>{xt.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch(e){}const o=n.value,r=o instanceof Date;return r&&!Number.isNaN(o.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:o,...r?{received:"Invalid Date"}:{},inst:e}),n}}));function hn(e,t,n){e.issues.length&&t.issues.push(...Ve(n,e.issues)),t.value[n]=e.value}const mn=W("$ZodArray",((e,t)=>{xt.init(e,t),e._zod.parse=(n,i)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const r=[];for(let e=0;e<o.length;e++){const a=o[e],s=t.element._zod.run({value:a,issues:[]},i);s instanceof Promise?r.push(s.then((t=>hn(t,n,e)))):hn(s,n,e)}return r.length?Promise.all(r).then((()=>n)):n}}));function gn(e,t,n,i){e.issues.length&&t.issues.push(...Ve(n,e.issues)),void 0===e.value?n in i&&(t.value[n]=void 0):t.value[n]=e.value}function yn(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape[n]._zod.traits.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=(i=e.shape,Object.keys(i).filter((e=>"optional"===i[e]._zod.optin&&"optional"===i[e]._zod.optout)));var i;return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function vn(e,t,n,i,o,r){const a=[],s=o.keySet,c=o.catchall._zod,u=c.def.type;for(const o of Object.keys(t)){if(s.has(o))continue;if("never"===u){a.push(o);continue}const r=c.run({value:t[o],issues:[]},i);r instanceof Promise?e.push(r.then((e=>gn(e,n,o,t)))):gn(r,n,o,t)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:r}),e.length?Promise.all(e).then((()=>n)):n}const _n=W("$ZodObject",((e,t)=>{xt.init(e,t);const n=Ce((()=>yn(t)));Se(e._zod,"propValues",(()=>{const e=t.shape,n={};for(const t in e){const i=e[t]._zod;if(i.values){n[t]??(n[t]=new Set);for(const e of i.values)n[t].add(e)}}return n}));const i=De,o=t.catchall;let r;e._zod.parse=(t,a)=>{r??(r=n.value);const s=t.value;if(!i(s))return t.issues.push({expected:"object",code:"invalid_type",input:s,inst:e}),t;t.value={};const c=[],u=r.shape;for(const e of r.keys){const n=u[e]._zod.run({value:s[e],issues:[]},a);n instanceof Promise?c.push(n.then((n=>gn(n,t,e,s)))):gn(n,t,e,s)}return o?vn(c,s,t,a,n.value,e):c.length?Promise.all(c).then((()=>t)):t}})),Pn=W("$ZodObjectJIT",((e,t)=>{_n.init(e,t);const n=e._zod.parse,i=Ce((()=>yn(t)));let o;const r=De,a=!X.jitless,s=a&&Ze.value,c=t.catchall;let u;e._zod.parse=(d,l)=>{u??(u=i.value);const p=d.value;return r(p)?a&&s&&!1===l?.async&&!0!==l.jitless?(o||(o=(e=>{const t=new mt(["shape","payload","ctx"]),n=i.value,o=e=>{const t=Fe(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const r=Object.create(null);let a=0;for(const e of n.keys)r[e]="key_"+a++;t.write("const newResult = {}");for(const e of n.keys){const n=r[e],i=Fe(e);t.write(`const ${n} = ${o(e)};`),t.write(`\n if (${n}.issues.length) {\n payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${i}, ...iss.path] : [${i}]\n })));\n }\n \n if (${n}.value === undefined) {\n if (${i} in input) {\n newResult[${i}] = undefined;\n }\n } else {\n newResult[${i}] = ${n}.value;\n }\n `)}t.write("payload.value = newResult;"),t.write("return payload;");const s=t.compile();return(t,n)=>s(e,t,n)})(t.shape)),d=o(d,l),c?vn([],p,d,l,u,e):d):n(d,l):(d.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),d)}}));function bn(e,t,n,i){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;const o=e.filter((e=>!qe(e)));return 1===o.length?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map((e=>e.issues.map((e=>Qe(e,i,ee())))))}),t)}const kn=W("$ZodUnion",((e,t)=>{xt.init(e,t),Se(e._zod,"optin",(()=>t.options.some((e=>"optional"===e._zod.optin))?"optional":void 0)),Se(e._zod,"optout",(()=>t.options.some((e=>"optional"===e._zod.optout))?"optional":void 0)),Se(e._zod,"values",(()=>{if(t.options.every((e=>e._zod.values)))return new Set(t.options.flatMap((e=>Array.from(e._zod.values))))})),Se(e._zod,"pattern",(()=>{if(t.options.every((e=>e._zod.pattern))){const e=t.options.map((e=>e._zod.pattern));return new RegExp(`^(${e.map((e=>Re(e.source))).join("|")})$`)}}));const n=1===t.options.length,i=t.options[0]._zod.run;e._zod.parse=(o,r)=>{if(n)return i(o,r);let a=!1;const s=[];for(const e of t.options){const t=e._zod.run({value:o.value,issues:[]},r);if(t instanceof Promise)s.push(t),a=!0;else{if(0===t.issues.length)return t;s.push(t)}}return a?Promise.all(s).then((t=>bn(t,o,e,r))):bn(s,o,e,r)}})),zn=W("$ZodIntersection",((e,t)=>{xt.init(e,t),e._zod.parse=(e,n)=>{const i=e.value,o=t.left._zod.run({value:i,issues:[]},n),r=t.right._zod.run({value:i,issues:[]},n);return o instanceof Promise||r instanceof Promise?Promise.all([o,r]).then((([t,n])=>En(e,t,n))):En(e,o,r)}}));function wn(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ue(e)&&Ue(t)){const n=Object.keys(t),i=Object.keys(e).filter((e=>-1!==n.indexOf(e))),o={...e,...t};for(const n of i){const i=wn(e[n],t[n]);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};o[n]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let i=0;i<e.length;i++){const o=wn(e[i],t[i]);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function En(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),qe(e))return e;const i=wn(t.value,n.value);if(!i.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}const An=W("$ZodEnum",((e,t)=>{xt.init(e,t);const n=function(e){const t=Object.values(e).filter((e=>"number"==typeof e));return Object.entries(e).filter((([e,n])=>-1===t.indexOf(+e))).map((([e,t])=>t))}(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter((e=>Le.has(typeof e))).map((e=>"string"==typeof e?Me(e):e.toString())).join("|")})$`),e._zod.parse=(t,o)=>{const r=t.value;return i.has(r)||t.issues.push({code:"invalid_value",values:n,input:r,inst:e}),t}})),Tn=W("$ZodTransform",((e,t)=>{xt.init(e,t),e._zod.parse=(n,i)=>{if("backward"===i.direction)throw new K(e.constructor.name);const o=t.transform(n.value,n);if(i.async)return(o instanceof Promise?o:Promise.resolve(o)).then((e=>(n.value=e,n)));if(o instanceof Promise)throw new J;return n.value=o,n}}));function Cn(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const Nn=W("$ZodOptional",((e,t)=>{xt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Se(e._zod,"values",(()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0)),Se(e._zod,"pattern",(()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${Re(e.source)})?$`):void 0})),e._zod.parse=(e,n)=>{if("optional"===t.innerType._zod.optin){const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then((t=>Cn(t,e.value))):Cn(i,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}})),Rn=W("$ZodNullable",((e,t)=>{xt.init(e,t),Se(e._zod,"optin",(()=>t.innerType._zod.optin)),Se(e._zod,"optout",(()=>t.innerType._zod.optout)),Se(e._zod,"pattern",(()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${Re(e.source)}|null)$`):void 0})),Se(e._zod,"values",(()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0)),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)})),In=W("$ZodDefault",((e,t)=>{xt.init(e,t),e._zod.optin="optional",Se(e._zod,"values",(()=>t.innerType._zod.values)),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);if(void 0===e.value)return e.value=t.defaultValue,e;const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then((e=>Sn(e,t))):Sn(i,t)}}));function Sn(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const On=W("$ZodPrefault",((e,t)=>{xt.init(e,t),e._zod.optin="optional",Se(e._zod,"values",(()=>t.innerType._zod.values)),e._zod.parse=(e,n)=>("backward"===n.direction||void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))})),xn=W("$ZodNonOptional",((e,t)=>{xt.init(e,t),Se(e._zod,"values",(()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter((e=>void 0!==e))):void 0})),e._zod.parse=(n,i)=>{const o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then((t=>Fn(t,e))):Fn(o,e)}}));function Fn(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const $n=W("$ZodCatch",((e,t)=>{xt.init(e,t),Se(e._zod,"optin",(()=>t.innerType._zod.optin)),Se(e._zod,"optout",(()=>t.innerType._zod.optout)),Se(e._zod,"values",(()=>t.innerType._zod.values)),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then((i=>(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map((e=>Qe(e,n,ee())))},input:e.value}),e.issues=[]),e))):(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map((e=>Qe(e,n,ee())))},input:e.value}),e.issues=[]),e)}})),Dn=W("$ZodPipe",((e,t)=>{xt.init(e,t),Se(e._zod,"values",(()=>t.in._zod.values)),Se(e._zod,"optin",(()=>t.in._zod.optin)),Se(e._zod,"optout",(()=>t.out._zod.optout)),Se(e._zod,"propValues",(()=>t.in._zod.propValues)),e._zod.parse=(e,n)=>{if("backward"===n.direction){const i=t.out._zod.run(e,n);return i instanceof Promise?i.then((e=>Zn(e,t.in,n))):Zn(i,t.in,n)}const i=t.in._zod.run(e,n);return i instanceof Promise?i.then((e=>Zn(e,t.out,n))):Zn(i,t.out,n)}}));function Zn(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Un=W("$ZodReadonly",((e,t)=>{xt.init(e,t),Se(e._zod,"propValues",(()=>t.innerType._zod.propValues)),Se(e._zod,"values",(()=>t.innerType._zod.values)),Se(e._zod,"optin",(()=>t.innerType._zod.optin)),Se(e._zod,"optout",(()=>t.innerType._zod.optout)),e._zod.parse=(e,n)=>{if("backward"===n.direction)return t.innerType._zod.run(e,n);const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(jn):jn(i)}}));function jn(e){return e.value=Object.freeze(e.value),e}const Ln=W("$ZodCustom",((e,t)=>{Ke.init(e,t),xt.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const i=n.value,o=t.fn(i);if(o instanceof Promise)return o.then((t=>Mn(t,n,i,e)));Mn(o,n,i,e)}}));function Mn(e,t,n,i){if(!e){const e={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(e.params=i._zod.def.params),t.issues.push(Je(e))}}Symbol("ZodOutput"),Symbol("ZodInput");class Gn{constructor(){this._map=new Map,this._idmap=new Map}add(e,...t){const n=t[0];if(this._map.set(e,n),n&&"object"==typeof n&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const i={...n,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function Bn(){return new Gn}const Hn=Bn();function qn(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Be(t)})}function Vn(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Be(t)})}function Yn(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Be(t)})}function Qn(e,t){return new et({check:"less_than",...Be(t),value:e,inclusive:!1})}function Wn(e,t){return new et({check:"less_than",...Be(t),value:e,inclusive:!0})}function Jn(e,t){return new tt({check:"greater_than",...Be(t),value:e,inclusive:!1})}function Kn(e,t){return new tt({check:"greater_than",...Be(t),value:e,inclusive:!0})}function Xn(e,t){return new nt({check:"multiple_of",...Be(t),value:e})}function ei(e,t){return new ot({check:"max_length",...Be(t),maximum:e})}function ti(e,t){return new rt({check:"min_length",...Be(t),minimum:e})}function ni(e,t){return new at({check:"length_equals",...Be(t),length:e})}function ii(e){return new ht({check:"overwrite",tx:e})}const oi=W("ZodISODateTime",((e,t)=>{Yt.init(e,t),Ai.init(e,t)}));const ri=W("ZodISODate",((e,t)=>{Qt.init(e,t),Ai.init(e,t)}));const ai=W("ZodISOTime",((e,t)=>{Wt.init(e,t),Ai.init(e,t)}));const si=W("ZodISODuration",((e,t)=>{Jt.init(e,t),Ai.init(e,t)}));const ci=(e,t)=>{yt.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>function(e,t){const n=t||function(e){return e.message},i={_errors:[]},o=e=>{for(const t of e.issues)if("invalid_union"===t.code&&t.errors.length)t.errors.map((e=>o({issues:e})));else if("invalid_key"===t.code)o({issues:t.issues});else if("invalid_element"===t.code)o({issues:t.issues});else if(0===t.path.length)i._errors.push(n(t));else{let e=i,o=0;for(;o<t.path.length;){const i=t.path[o];o===t.path.length-1?(e[i]=e[i]||{_errors:[]},e[i]._errors.push(n(t))):e[i]=e[i]||{_errors:[]},e=e[i],o++}}};return o(e),i}(e,t)},flatten:{value:t=>function(e,t=(e=>e.message)){const n={},i=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):i.push(t(o));return{formErrors:i,fieldErrors:n}}(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Te,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Te,2)}},isEmpty:{get:()=>0===e.issues.length}})},ui=(W("ZodError",ci),W("ZodError",ci,{Parent:Error})),di=_t(ui),li=Pt(ui),pi=bt(ui),fi=zt(ui),hi=Et(ui),mi=At(ui),gi=Tt(ui),yi=Ct(ui),vi=Nt(ui),_i=Rt(ui),Pi=It(ui),bi=St(ui),ki=W("ZodType",((e,t)=>(xt.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map((e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e))]}),e.clone=(t,n)=>Ge(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>di(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>pi(e,t,n),e.parseAsync=async(t,n)=>li(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>fi(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>hi(e,t,n),e.decode=(t,n)=>mi(e,t,n),e.encodeAsync=async(t,n)=>gi(e,t,n),e.decodeAsync=async(t,n)=>yi(e,t,n),e.safeEncode=(t,n)=>vi(e,t,n),e.safeDecode=(t,n)=>_i(e,t,n),e.safeEncodeAsync=async(t,n)=>Pi(e,t,n),e.safeDecodeAsync=async(t,n)=>bi(e,t,n),e.refine=(t,n)=>e.check(function(e,t={}){return function(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Be(n)})}(Eo,e,t)}(t,n)),e.superRefine=t=>e.check(function(e){const t=function(e,t){const n=new Ke({check:"custom",...Be(void 0)});return n._zod.check=e,n}((n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(Je(e,n.value,t._zod.def));else{const i=e;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(Je(i))}},e(n.value,n))));return t}(t)),e.overwrite=t=>e.check(ii(t)),e.optional=()=>mo(e),e.nullable=()=>yo(e),e.nullish=()=>mo(yo(e)),e.nonoptional=t=>function(e,t){return new Po({type:"nonoptional",innerType:e,...Be(t)})}(e,t),e.array=()=>oo(e),e.or=t=>function(e,t){return new so({type:"union",options:e,...Be(t)})}([e,t]),e.and=t=>new co({type:"intersection",left:e,right:t}),e.transform=t=>zo(e,fo(t)),e.default=t=>{return n=t,new vo({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():je(n)}});var n},e.prefault=t=>{return n=t,new _o({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():je(n)}});var n},e.catch=t=>{return new bo({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>zo(e,t),e.readonly=()=>new wo({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return Hn.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>Hn.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return Hn.get(e);const n=e.clone();return Hn.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e))),zi=W("_ZodString",((e,t)=>{Ft.init(e,t),ki.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(function(e,t){return new ct({check:"string_format",format:"regex",...Be(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new lt({check:"string_format",format:"includes",...Be(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new pt({check:"string_format",format:"starts_with",...Be(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new ft({check:"string_format",format:"ends_with",...Be(t),suffix:e})}(...t)),e.min=(...t)=>e.check(ti(...t)),e.max=(...t)=>e.check(ei(...t)),e.length=(...t)=>e.check(ni(...t)),e.nonempty=(...t)=>e.check(ti(1,...t)),e.lowercase=t=>e.check(function(e){return new ut({check:"string_format",format:"lowercase",...Be(e)})}(t)),e.uppercase=t=>e.check(function(e){return new dt({check:"string_format",format:"uppercase",...Be(e)})}(t)),e.trim=()=>e.check(ii((e=>e.trim()))),e.normalize=(...t)=>e.check(function(e){return ii((t=>t.normalize(e)))}(...t)),e.toLowerCase=()=>e.check(ii((e=>e.toLowerCase()))),e.toUpperCase=()=>e.check(ii((e=>e.toUpperCase())))})),wi=W("ZodString",((e,t)=>{Ft.init(e,t),zi.init(e,t),e.email=t=>e.check(qn(Ti,t)),e.url=t=>e.check(function(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Be(t)})}(Ii,t)),e.jwt=t=>e.check(function(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Be(t)})}(qi,t)),e.emoji=t=>e.check(function(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Be(t)})}(Si,t)),e.guid=t=>e.check(Vn(Ni,t)),e.uuid=t=>e.check(Yn(Ri,t)),e.uuidv4=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Be(t)})}(Ri,t)),e.uuidv6=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Be(t)})}(Ri,t)),e.uuidv7=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Be(t)})}(Ri,t)),e.nanoid=t=>e.check(function(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Be(t)})}(Oi,t)),e.guid=t=>e.check(Vn(Ni,t)),e.cuid=t=>e.check(function(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Be(t)})}(xi,t)),e.cuid2=t=>e.check(function(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Be(t)})}(Fi,t)),e.ulid=t=>e.check(function(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Be(t)})}($i,t)),e.base64=t=>e.check(function(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Be(t)})}(Gi,t)),e.base64url=t=>e.check(function(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Be(t)})}(Bi,t)),e.xid=t=>e.check(function(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Be(t)})}(Di,t)),e.ksuid=t=>e.check(function(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Be(t)})}(Zi,t)),e.ipv4=t=>e.check(function(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Be(t)})}(Ui,t)),e.ipv6=t=>e.check(function(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Be(t)})}(ji,t)),e.cidrv4=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Be(t)})}(Li,t)),e.cidrv6=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Be(t)})}(Mi,t)),e.e164=t=>e.check(function(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Be(t)})}(Hi,t)),e.datetime=t=>e.check(function(e){return function(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Be(t)})}(oi,e)}(t)),e.date=t=>e.check(function(e){return function(e,t){return new e({type:"string",format:"date",check:"string_format",...Be(t)})}(ri,e)}(t)),e.time=t=>e.check(function(e){return function(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Be(t)})}(ai,e)}(t)),e.duration=t=>e.check(function(e){return function(e,t){return new e({type:"string",format:"duration",check:"string_format",...Be(t)})}(si,e)}(t))}));function Ei(e){return function(e,t){return new e({type:"string",...Be(t)})}(wi,e)}const Ai=W("ZodStringFormat",((e,t)=>{$t.init(e,t),zi.init(e,t)})),Ti=W("ZodEmail",((e,t)=>{Ut.init(e,t),Ai.init(e,t)}));function Ci(e){return qn(Ti,e)}const Ni=W("ZodGUID",((e,t)=>{Dt.init(e,t),Ai.init(e,t)})),Ri=W("ZodUUID",((e,t)=>{Zt.init(e,t),Ai.init(e,t)})),Ii=W("ZodURL",((e,t)=>{jt.init(e,t),Ai.init(e,t)})),Si=W("ZodEmoji",((e,t)=>{Lt.init(e,t),Ai.init(e,t)})),Oi=W("ZodNanoID",((e,t)=>{Mt.init(e,t),Ai.init(e,t)})),xi=W("ZodCUID",((e,t)=>{Gt.init(e,t),Ai.init(e,t)})),Fi=W("ZodCUID2",((e,t)=>{Bt.init(e,t),Ai.init(e,t)})),$i=W("ZodULID",((e,t)=>{Ht.init(e,t),Ai.init(e,t)})),Di=W("ZodXID",((e,t)=>{qt.init(e,t),Ai.init(e,t)})),Zi=W("ZodKSUID",((e,t)=>{Vt.init(e,t),Ai.init(e,t)})),Ui=W("ZodIPv4",((e,t)=>{Kt.init(e,t),Ai.init(e,t)})),ji=W("ZodIPv6",((e,t)=>{Xt.init(e,t),Ai.init(e,t)})),Li=W("ZodCIDRv4",((e,t)=>{en.init(e,t),Ai.init(e,t)})),Mi=W("ZodCIDRv6",((e,t)=>{tn.init(e,t),Ai.init(e,t)})),Gi=W("ZodBase64",((e,t)=>{on.init(e,t),Ai.init(e,t)})),Bi=W("ZodBase64URL",((e,t)=>{rn.init(e,t),Ai.init(e,t)})),Hi=W("ZodE164",((e,t)=>{an.init(e,t),Ai.init(e,t)})),qi=W("ZodJWT",((e,t)=>{sn.init(e,t),Ai.init(e,t)})),Vi=W("ZodNumber",((e,t)=>{cn.init(e,t),ki.init(e,t),e.gt=(t,n)=>e.check(Jn(t,n)),e.gte=(t,n)=>e.check(Kn(t,n)),e.min=(t,n)=>e.check(Kn(t,n)),e.lt=(t,n)=>e.check(Qn(t,n)),e.lte=(t,n)=>e.check(Wn(t,n)),e.max=(t,n)=>e.check(Wn(t,n)),e.int=t=>e.check(Wi(t)),e.safe=t=>e.check(Wi(t)),e.positive=t=>e.check(Jn(0,t)),e.nonnegative=t=>e.check(Kn(0,t)),e.negative=t=>e.check(Qn(0,t)),e.nonpositive=t=>e.check(Wn(0,t)),e.multipleOf=(t,n)=>e.check(Xn(t,n)),e.step=(t,n)=>e.check(Xn(t,n)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null}));function Yi(e){return function(e,t){return new e({type:"number",checks:[],...Be(t)})}(Vi,e)}const Qi=W("ZodNumberFormat",((e,t)=>{un.init(e,t),Vi.init(e,t)}));function Wi(e){return function(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Be(t)})}(Qi,e)}const Ji=W("ZodBoolean",((e,t)=>{dn.init(e,t),ki.init(e,t)}));const Ki=W("ZodUnknown",((e,t)=>{ln.init(e,t),ki.init(e,t)}));function Xi(){return new Ki({type:"unknown"})}const eo=W("ZodNever",((e,t)=>{pn.init(e,t),ki.init(e,t)}));function to(e){return function(e,t){return new e({type:"never",...Be(t)})}(eo,e)}const no=W("ZodDate",((e,t)=>{fn.init(e,t),ki.init(e,t),e.min=(t,n)=>e.check(Kn(t,n)),e.max=(t,n)=>e.check(Wn(t,n));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null}));const io=W("ZodArray",((e,t)=>{mn.init(e,t),ki.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(ti(t,n)),e.nonempty=t=>e.check(ti(1,t)),e.max=(t,n)=>e.check(ei(t,n)),e.length=(t,n)=>e.check(ni(t,n)),e.unwrap=()=>e.element}));function oo(e,t){return function(e,t,n){return new e({type:"array",element:t,...Be(n)})}(io,e,t)}const ro=W("ZodObject",((e,t)=>{Pn.init(e,t),ki.init(e,t),Se(e,"shape",(()=>t.shape)),e.keyof=()=>lo(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Xi()}),e.loose=()=>e.clone({...e._zod.def,catchall:Xi()}),e.strict=()=>e.clone({...e._zod.def,catchall:to()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!Ue(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const i=xe(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Oe(this,"shape",n),n},checks:[]});return Ge(e,i)}(e,t),e.safeExtend=t=>function(e,t){if(!Ue(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return Oe(this,"shape",n),n},checks:e._zod.def.checks};return Ge(e,n)}(e,t),e.merge=t=>function(e,t){const n=xe(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return Oe(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return Ge(e,n)}(e,t),e.pick=t=>function(e,t){const n=e._zod.def;return Ge(e,xe(e._zod.def,{get shape(){const e={};for(const i in t){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(e[i]=n.shape[i])}return Oe(this,"shape",e),e},checks:[]}))}(e,t),e.omit=t=>function(e,t){const n=e._zod.def,i=xe(e._zod.def,{get shape(){const i={...e._zod.def.shape};for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete i[e]}return Oe(this,"shape",i),i},checks:[]});return Ge(e,i)}(e,t),e.partial=(...t)=>function(e,t,n){const i=xe(t._zod.def,{get shape(){const i=t._zod.def.shape,o={...i};if(n)for(const t in n){if(!(t in i))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(o[t]=e?new e({type:"optional",innerType:i[t]}):i[t])}else for(const t in i)o[t]=e?new e({type:"optional",innerType:i[t]}):i[t];return Oe(this,"shape",o),o},checks:[]});return Ge(t,i)}(ho,e,t[0]),e.required=(...t)=>function(e,t,n){const i=xe(t._zod.def,{get shape(){const i=t._zod.def.shape,o={...i};if(n)for(const t in n){if(!(t in o))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(o[t]=new e({type:"nonoptional",innerType:i[t]}))}else for(const t in i)o[t]=new e({type:"nonoptional",innerType:i[t]});return Oe(this,"shape",o),o},checks:[]});return Ge(t,i)}(Po,e,t[0])}));function ao(e,t){const n={type:"object",get shape(){var t;return Oe(this,"shape",e?(t=e,Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))):{}),this.shape},...Be(t)};return new ro(n)}const so=W("ZodUnion",((e,t)=>{kn.init(e,t),ki.init(e,t),e.options=t.options}));const co=W("ZodIntersection",((e,t)=>{zn.init(e,t),ki.init(e,t)})),uo=W("ZodEnum",((e,t)=>{An.init(e,t),ki.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,i)=>{const o={};for(const i of e){if(!n.has(i))throw new Error(`Key ${i} not found in enum`);o[i]=t.entries[i]}return new uo({...t,checks:[],...Be(i),entries:o})},e.exclude=(e,i)=>{const o={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete o[t]}return new uo({...t,checks:[],...Be(i),entries:o})}}));function lo(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map((e=>[e,e]))):e;return new uo({type:"enum",entries:n,...Be(t)})}const po=W("ZodTransform",((e,t)=>{Tn.init(e,t),ki.init(e,t),e._zod.parse=(n,i)=>{if("backward"===i.direction)throw new K(e.constructor.name);n.addIssue=i=>{if("string"==typeof i)n.issues.push(Je(i,n.value,t));else{const t=i;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),n.issues.push(Je(t))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then((e=>(n.value=e,n))):(n.value=o,n)}}));function fo(e){return new po({type:"transform",transform:e})}const ho=W("ZodOptional",((e,t)=>{Nn.init(e,t),ki.init(e,t),e.unwrap=()=>e._zod.def.innerType}));function mo(e){return new ho({type:"optional",innerType:e})}const go=W("ZodNullable",((e,t)=>{Rn.init(e,t),ki.init(e,t),e.unwrap=()=>e._zod.def.innerType}));function yo(e){return new go({type:"nullable",innerType:e})}const vo=W("ZodDefault",((e,t)=>{In.init(e,t),ki.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap})),_o=W("ZodPrefault",((e,t)=>{On.init(e,t),ki.init(e,t),e.unwrap=()=>e._zod.def.innerType})),Po=W("ZodNonOptional",((e,t)=>{xn.init(e,t),ki.init(e,t),e.unwrap=()=>e._zod.def.innerType})),bo=W("ZodCatch",((e,t)=>{$n.init(e,t),ki.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap})),ko=W("ZodPipe",((e,t)=>{Dn.init(e,t),ki.init(e,t),e.in=t.in,e.out=t.out}));function zo(e,t){return new ko({type:"pipe",in:e,out:t})}const wo=W("ZodReadonly",((e,t)=>{Un.init(e,t),ki.init(e,t),e.unwrap=()=>e._zod.def.innerType})),Eo=W("ZodCustom",((e,t)=>{Ln.init(e,t),ki.init(e,t)}));function Ao(e,t){return zo(fo(e),t)}function To(e,t,n){const i=t.safeParse(n);return i.success?i.data:(i.error.issues.forEach((t=>{const n=t.path.join(".");e.getFieldState(n)?e.setError(n,{type:"manual",message:t.message}):e.setError("root",{type:"manual",message:t.message})})),null)}const Co=e=>Ao((e=>{if(e){if("string"==typeof e){const t=Number(e);return isNaN(t)?e:t}return e}}),e),No=e=>Ao((e=>{if(!e)return;let t;return"string"==typeof e&&(t=new Date(e)),e instanceof Date&&(t=e),t?(t.setUTCHours(0,0,0,0),t):e}),e),Ro=e=>Ei().min(1,{error:"Required"}).max(e,`Maximum length is ${e} characters`),Io=()=>Ci("Invalid email address").min(1,"Required"),So=()=>Co(Yi("Valid amount required").positive("Positive amount required")),Oo=()=>No(function(e){return function(e,t){return new e({type:"date",...Be(t)})}(no,e)}("Valid date required").min(new Date,"Date must be in the future")),xo=e=>Ei().max(e,`Maximum length is ${e} characters`),Fo=ao({address1:Ro(100),address2:xo(100).optional(),city:Ro(50),state:xo(50).optional(),postcode:xo(20).optional(),country:Ro(50)}),$o=ao({amount:So(),message:xo(500).nullish(),giverFirstName:Ro(50),giverLastName:Ro(50),giverEmail:Io(),giverPhone:Ro(31),giverAddress:Fo,cardHolder:Ro(101),recipientFirstName:xo(50).nullish(),recipientLastName:xo(50).nullish(),recipientEmail:Ci("Invalid email address").nullish(),recipientPhone:xo(31).nullish()}),Do=$o.extend({expiry:Oo(),notes:xo(500).nullish()}),Zo=ao({balance:So(),expiry:Oo(),message:xo(500).nullish(),notes:xo(500).nullish(),giverFirstName:Ro(50),giverLastName:Ro(50),giverEmail:Io(),giverPhone:Ro(31),cardHolder:Ro(101),recipientEmail:Ci("Invalid email address").nullish(),recipientPhone:xo(31).nullish()});let Uo;!function(e){e.Passthrough="Passthrough",e.PaymentProcessor="PaymentProcessor"}(Uo||(Uo={}));const jo=ao({companyId:Yi().int().positive(),amount:So(),currency:Ro(3).default("AUD")}),Lo=ao({sessionId:Ro(100),resultCode:Ro(50),pspReference:xo(100).optional()}),Mo=ao({cardHolder:Ro(100),cardNumberToken:xo(200),cardCvcToken:xo(200),cardExpiry:xo(5)}),Go=$o.extend({companyId:Yi().int().positive(),sendViaEmail:function(e){return function(e,t){return new e({type:"boolean",...Be(t)})}(Ji,e)}().default(!0),payment:Lo.optional(),passthroughPayment:Mo.optional()}),Bo=ao({giftCardId:Yi().int().positive(),reason:xo(500).optional()}),Ho=ao({companyId:Yi().int().positive().nullish(),code:Ro(10),password:Ro(10)}),qo=Ho.extend({amount:So(),description:Ro(200)});let Vo,Yo,Qo,Wo,Jo,Ko;!function(e){e.Adyen="Adyen"}(Vo||(Vo={})),function(e){e.Pending="Pending",e.Authorized="Authorized",e.Captured="Captured",e.Failed="Failed",e.Refunded="Refunded"}(Yo||(Yo={})),function(e){e.Authorised="Authorised",e.Refused="Refused",e.Cancelled="Cancelled",e.Pending="Pending",e.Received="Received",e.Error="Error",e.IdentifyShopper="IdentifyShopper",e.ChallengeShopper="ChallengeShopper"}(Qo||(Qo={})),function(e){e.AUTHORISATION="AUTHORISATION",e.CAPTURE="CAPTURE",e.REFUND="REFUND",e.CANCELLATION="CANCELLATION",e.REFUND_FAILED="REFUND_FAILED",e.CAPTURE_FAILED="CAPTURE_FAILED"}(Wo||(Wo={})),function(e){e.Purchase="Purchase",e.Redemption="Redemption",e.Adjustment="Adjustment"}(Jo||(Jo={})),function(e){e.Pending="Pending",e.Complete="Complete",e.Cancelled="Cancelled",e.Expired="Expired"}(Ko||(Ko={}));const Xo=ao({code:Ro(10),token:Ro(128)}),er=ao({companyId:Yi().int().positive(),code:Ro(10),token:Ro(128)}),tr=ao({companyId:(nr=Vi,new nr({type:"number",coerce:!0,checks:[],...Be(void 0)})).int().positive()});var nr;const ir=ao({giftCardPaymentType:lo([Uo.Passthrough,Uo.PaymentProcessor])}),or=ao({merchantAccount:Ro(100),clientKey:Ro(100),apiKey:xo(200).optional(),webhookHmacKey:xo(200).optional()}),rr=ao({grant_type:Ei().readonly().default("refresh_token"),client_id:Yn(Ri,void 0),client_secret:Ei(),refresh_token:Ei(),scope:Ei().optional()}),ar=ao({email:Ci(),firstName:Ei().max(100).optional(),lastName:Ei().max(100).optional(),phone:Ei().max(20).optional(),scopes:oo(Ei()).optional()});let sr;!function(e){e.PER_STAY="Per stay",e.PER_NIGHT="Per night",e.PER_PERSON="Per person",e.PER_PERSON_PER_NIGHT="Per person per night",e.PER_ALL_PERSONS="Per all persons",e.PER_ALL_PERSONS_PER_NIGHT="Per all persons per night",e.PER_QUANTITY_NAME_PER_NIGHT="Per Quantity Name Per Night",e.PER_ROOM_QUANTITY_PER_NIGHT="Per Room Quantity Per Night",e.PER_PERSON_OCCUPANCY_PER_NIGHT="Per Person Occupancy Per Night",e.PER_ADULT_OCCUPANCY_PER_NIGHT="Per Adult Occupancy Per Night",e.PER_CHILD_OCCUPANCY_PER_NIGHT="Per Child Occupancy Per Night"}(sr||(sr={}));const cr=[sr.PER_NIGHT,sr.PER_PERSON_PER_NIGHT,sr.PER_QUANTITY_NAME_PER_NIGHT,sr.PER_ROOM_QUANTITY_PER_NIGHT,sr.PER_PERSON_OCCUPANCY_PER_NIGHT,sr.PER_ADULT_OCCUPANCY_PER_NIGHT,sr.PER_CHILD_OCCUPANCY_PER_NIGHT,sr.PER_ALL_PERSONS_PER_NIGHT];let ur,dr,lr,pr,fr;!function(e){e.Critical="Critical",e.Error="Error",e.Warn="Warn",e.Info="Info"}(ur||(ur={})),function(e){e.Debug="Diagnostics",e.Security="Security",e.Audit="Audit"}(dr||(dr={})),function(e){e.General="General",e.Authenticated="Token Authenticated",e.Unauthorized="Unauthorized Access",e.RefreshToken="Refresh Token Created",e.AccessToken="Access Token Created",e.Revoked="Token Revoked",e.UserCreated="User Created",e.UserLinked="User Linked to Company",e.Purchase="Gift Card Purchased",e.Payment="Payment",e.Email="Email Delivery",e.Transaction="Gift Card Transaction"}(lr||(lr={})),function(e){e.Desktop="desktop",e.Mobile="mobile"}(pr||(pr={})),function(e){e.Schedule="Schedule",e.DeviceTarget="DeviceTarget",e.GeoLock="GeoLock",e.CheapestOf="CheapestOf"}(fr||(fr={}));const hr=e=>{let t=0;const n=Object.values(e.itinerary);for(const e of n){const n=Object.keys(e.nights);for(const i of n)t+=e.nights[i].total}return t},mr=require("decimal.js");var gr=e.n(mr);const yr={UP:gr().ROUND_UP,DOWN:gr().ROUND_DOWN,CEIL:gr().ROUND_CEIL,FLOOR:gr().ROUND_FLOOR,HALF_UP:gr().ROUND_HALF_UP,HALF_DOWN:gr().ROUND_HALF_DOWN,HALF_EVEN:gr().ROUND_HALF_EVEN,HALF_CEIL:gr().ROUND_HALF_CEIL,HALF_FLOOR:gr().ROUND_HALF_FLOOR},vr=(e,t)=>{const{precision:n=2,rounding:i=yr.HALF_UP}=t||{};return new(gr())(e).toDecimalPlaces(n,i).toNumber()};function _r(e,t={}){const{baseAmount:n=0,numberOfNights:i=1,feeIncludedInBaseAmount:o=!1,extractedFromRates:r=!1,removedPercentages:a=[]}=t,s=vr(n);switch(e.feeType){case M.PercentageOfBooking:if(o)return vr(s*e.amount/(100+e.amount));if(r){const t=a.reduce(((e,t)=>e+t/(100+t)),0);return vr(s/(1-t)*e.amount/(100+e.amount))}return vr(s*(e.amount/100));case M.FixedChargePerRoom:case M.FixedChargePerBooking:return e.amount;case M.NightlyChargePerRoom:return vr(e.amount*i);default:return 0}}const Pr=[M.FixedChargePerBooking],br=[M.PercentageOfBooking,M.FixedChargePerRoom,M.NightlyChargePerRoom],kr=[M.PercentageOfBooking];function zr(e,t){return e.filter((e=>t.includes(e.feeType)))}function wr(e){return zr(e,Pr)}function Er(e){return zr(e,br)}function Ar(e){return zr(e,kr)}function Tr(e){return{includeInRates:[M.PercentageOfBooking,M.NightlyChargePerRoom].includes(e),extractFeeFromRates:e===M.PercentageOfBooking,appliesToAddons:e===M.PercentageOfBooking,includePreviousFeesInCalculation:e===M.PercentageOfBooking}}const Cr=e=>e,Nr=(e,t)=>{const n={};return t.forEach((t=>{t in e&&(n[t]=e[t])})),n},Rr=(e,t)=>e.includes("cdn.app.roomstay.io")?e+"?w="+t:e;class Ir{}function Sr(e){return e.toUpperCase()}Ir.calculateBaseAddonTotal=(e,t)=>{let n=0,i=0,o=0;e.price&&e.quantity&&(n=e.quantity*Number(e.price)),e.pricingType===sr.PER_ADULT_OCCUPANCY_PER_NIGHT&&e.adultQuantity?n*=e.adultQuantity:e.pricingType===sr.PER_CHILD_OCCUPANCY_PER_NIGHT&&e.childQuantity&&(n*=e.childQuantity),e.adultPrice&&e.adultQuantity&&(i=e.adultQuantity*Number(e.adultPrice)),e.childPrice&&e.childQuantity&&(o=e.childQuantity*Number(e.childPrice));let r=n+i+o;return cr.includes(e.pricingType)&&e.nights&&!t&&(r*=e.nights),{indPrice:n,indAdultPrice:i,indChildPrice:o,addonTotal:r}},Ir.calculateBasketAddonTotal=(e,t=!1)=>(Array.isArray(e)||(e=[e]),e.reduce(((e,n)=>{const i=Ir.calculateBaseAddonTotal(n,t);let o=0;return(n.fee||n.fees?.length)&&n.quantity?n.fees?.length?n.fees.forEach((e=>{o+=n.quantity*e.amount})):o=n.quantity*Number(n.fee):((n.adultFee||n.adultFees?.length)&&n.adultQuantity&&(n.adultFees?.length?n.adultFees.forEach((e=>{o+=n.adultQuantity*e.amount})):o+=n.adultQuantity??1*Number(n.adultFee)),(n.childFee||n.childFees?.length)&&n.childQuantity&&(n.childFees?.length?n.childFees.forEach((e=>{o+=n.childQuantity??1*e.amount})):o+=n.childQuantity*Number(n.childFee))),cr.includes(n.pricingType)&&n.nights&&!t&&(o*=n.nights),{price:e.price+i.indPrice,adultPrice:e.adultPrice+i.indAdultPrice,childPrice:e.childPrice+i.indChildPrice,totalFees:e.totalFees+o,total:e.total+i.addonTotal+o}}),{price:0,adultPrice:0,childPrice:0,totalFees:0,total:0})),Ir.calculateReservationAddonTotal=(e,t=!1)=>(Array.isArray(e)||(e=[e]),e.reduce(((e,n)=>{const i=Ir.calculateBaseAddonTotal(n,t);let o,r=n.discount||0;o=void 0!==n.total&&null!==n.total?n.total:i.addonTotal-r;let a=n.fees||0;n.itemisedFees?.length&&(a=n.itemisedFees.reduce(((e,t)=>e+t.amount),0));const s=n.itemisedFees?.length?o:o+a;return{price:e.price+i.indPrice,adultPrice:e.adultPrice+i.indAdultPrice,childPrice:e.childPrice+i.indChildPrice,totalFees:e.totalFees+a,total:e.total+o+a,displayPrice:e.displayPrice+s}}),{price:0,adultPrice:0,childPrice:0,totalFees:0,total:0,displayPrice:0})),Ir.calculateTotalForReservation=(e,t=!1)=>{let n=0;return e.itemisedFees?.forEach((e=>{n+=e.amount})),e.reservations.forEach((e=>{n+=e.total.afterTax;const i=Object.keys(e.nights)?.length??0;if(e.addons?.length){const o=(e.addons??[]).map((e=>({...e,nights:i})));n+=Ir.calculateReservationAddonTotal(o,t)?.total}})),vr(n)},module.exports=t})();
@@ -0,0 +1,7 @@
1
+ /*!
2
+ * decimal.js v10.4.3
3
+ * An arbitrary-precision Decimal type for JavaScript.
4
+ * https://github.com/MikeMcl/decimal.js
5
+ * Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
6
+ * MIT Licence
7
+ */
@@ -0,0 +1,14 @@
1
+ export declare enum AddonPricingType {
2
+ PER_STAY = "Per stay",
3
+ PER_NIGHT = "Per night",
4
+ PER_PERSON = "Per person",
5
+ PER_PERSON_PER_NIGHT = "Per person per night",
6
+ PER_ALL_PERSONS = "Per all persons",
7
+ PER_ALL_PERSONS_PER_NIGHT = "Per all persons per night",
8
+ PER_QUANTITY_NAME_PER_NIGHT = "Per Quantity Name Per Night",
9
+ PER_ROOM_QUANTITY_PER_NIGHT = "Per Room Quantity Per Night",
10
+ PER_PERSON_OCCUPANCY_PER_NIGHT = "Per Person Occupancy Per Night",
11
+ PER_ADULT_OCCUPANCY_PER_NIGHT = "Per Adult Occupancy Per Night",
12
+ PER_CHILD_OCCUPANCY_PER_NIGHT = "Per Child Occupancy Per Night"
13
+ }
14
+ export declare const ADDON_PER_NIGHT_TYPES: AddonPricingType[];
@@ -0,0 +1,24 @@
1
+ import { SimpleItemisedFee } from "types/Fees/IFee.type";
2
+ export type BasketAddonDTO = {
3
+ availability: any;
4
+ code: string;
5
+ inclusive: false;
6
+ pricingType: string;
7
+ quantity: number;
8
+ adultQuantity: number;
9
+ childQuantity?: number;
10
+ description: string;
11
+ name: string;
12
+ category: string;
13
+ image: string;
14
+ price: number;
15
+ adultPrice?: number;
16
+ childPrice?: number;
17
+ fee: number;
18
+ adultFee?: number;
19
+ childFee?: number;
20
+ fees?: SimpleItemisedFee[];
21
+ adultFees?: SimpleItemisedFee[];
22
+ childFees?: SimpleItemisedFee[];
23
+ nights?: number;
24
+ };
@@ -1,3 +1,2 @@
1
1
  import { EAddonPricingType } from './Addon.types';
2
2
  export declare const ADDON_PER_NIGHT_TYPES: EAddonPricingType[];
3
- //# sourceMappingURL=Addon.enum.d.ts.map
@@ -53,4 +53,3 @@ export type BasketAddonDTO = {
53
53
  discount?: number;
54
54
  nights?: number;
55
55
  };
56
- //# sourceMappingURL=Addon.types.d.ts.map
@@ -0,0 +1,35 @@
1
+ export type AnalyticsEventName = 'AddToCart' | 'InitiateCheckout' | 'Purchase';
2
+ export interface IAnalyticsEventData {
3
+ currency: string;
4
+ value: number;
5
+ contentIds?: string[];
6
+ contentType?: string;
7
+ contents?: Array<{
8
+ id: string;
9
+ quantity: number;
10
+ itemPrice: number;
11
+ }>;
12
+ numItems?: number;
13
+ }
14
+ export interface IAnalyticsUserData {
15
+ email?: string;
16
+ phone?: string;
17
+ firstName?: string;
18
+ lastName?: string;
19
+ city?: string;
20
+ state?: string;
21
+ zipCode?: string;
22
+ country?: string;
23
+ externalId?: string;
24
+ }
25
+ export interface IAnalyticsEvent {
26
+ eventId: string;
27
+ sessionId: string;
28
+ hotelId: string;
29
+ eventName: AnalyticsEventName;
30
+ eventTime: number;
31
+ eventData: IAnalyticsEventData;
32
+ userData?: IAnalyticsUserData;
33
+ createdAt: number;
34
+ ttl: number;
35
+ }
@@ -0,0 +1,11 @@
1
+ export interface IAnalyticsSession {
2
+ sessionId: string;
3
+ hotelId: string;
4
+ fbc?: string;
5
+ fbp?: string;
6
+ externalId?: string;
7
+ userAgent?: string;
8
+ ipAddress?: string;
9
+ createdAt: number;
10
+ ttl: number;
11
+ }
@@ -0,0 +1,24 @@
1
+ export type IDailyRevenue = {
2
+ date: string;
3
+ revenue: number;
4
+ };
5
+ export type IDailyRoomBreakdown = {
6
+ date: string;
7
+ roomName: string;
8
+ purchases: number;
9
+ };
10
+ export type IRegionBreakdown = {
11
+ country: string;
12
+ region: string;
13
+ purchases: number;
14
+ revenue: number;
15
+ };
16
+ export type IBigQueryResponse = {
17
+ purchases: number;
18
+ cancellations: number;
19
+ revenue: number;
20
+ conversionRate: number;
21
+ dailyRevenue: IDailyRevenue[];
22
+ dailyRoomsBreakdown: IDailyRoomBreakdown[];
23
+ regionBreakdown: IRegionBreakdown[];
24
+ };
@@ -43,4 +43,3 @@ export interface IRoomstayAnalyticsResult {
43
43
  regionBreakdown: IRegionBreakdown[];
44
44
  dailyMetrics: IDailyMetrics[];
45
45
  }
46
- //# sourceMappingURL=IBigQueryResults.type.d.ts.map
@@ -0,0 +1,90 @@
1
+ import { IRoomstayEventData } from './IRoomstayEventData.type';
2
+ /**
3
+ * Roomstay event names
4
+ */
5
+ export declare enum ERoomstayEventName {
6
+ BasketAdd = "Basket/Add",
7
+ BasketAddAddon = "Basket/AddAddon",
8
+ ViewCheckout = "View/Checkout",
9
+ BookingCommitted = "Booking/Committed"
10
+ }
11
+ /**
12
+ * Meta custom_data format
13
+ */
14
+ export interface IMetaEventData {
15
+ currency: string;
16
+ value: number;
17
+ order_id?: string;
18
+ content_ids?: string[];
19
+ content_type?: string;
20
+ contents?: Array<{
21
+ id: string;
22
+ quantity: number;
23
+ item_price: number;
24
+ }>;
25
+ num_items?: number;
26
+ }
27
+ /**
28
+ * Meta user data field keys
29
+ */
30
+ export declare const META_USER_DATA_KEYS: readonly ["em", "ph", "fn", "ln", "ct", "st", "zp", "country", "external_id"];
31
+ /**
32
+ * Meta user data format - all fields are optional strings
33
+ */
34
+ export type IMetaUserData = {
35
+ [K in (typeof META_USER_DATA_KEYS)[number]]?: string;
36
+ };
37
+ /**
38
+ * Meta Pixel fbq() event options - eventID for deduplication plus optional user data
39
+ */
40
+ export type IMetaPixelEventOptions = {
41
+ eventID: string;
42
+ } & IMetaUserData;
43
+ /**
44
+ * Analytics event request payload
45
+ */
46
+ export interface IAnalyticsEventRequest {
47
+ eventId: string;
48
+ sessionId: string;
49
+ eventName: ERoomstayEventName;
50
+ eventTime: number;
51
+ hotelFrontendId: string;
52
+ fbc?: string;
53
+ fbp?: string;
54
+ sourceUrl?: string;
55
+ eventData: IRoomstayEventData;
56
+ }
57
+ /**
58
+ * Analytics event stored in DynamoDB
59
+ */
60
+ export interface IAnalyticsEvent {
61
+ eventId: string;
62
+ sessionId: string;
63
+ hotelFrontendId: string;
64
+ eventName: ERoomstayEventName;
65
+ eventTime: number;
66
+ sourceUrl?: string;
67
+ eventData: IRoomstayEventData;
68
+ createdAt: number;
69
+ ttl: number;
70
+ }
71
+ /**
72
+ * Analytics event message sent to SQS queue for async processing.
73
+ * Includes both event data and session context needed for downstream processors (Meta CAPI, etc.)
74
+ */
75
+ export interface IAnalyticsEventQueueMessage {
76
+ eventId: string;
77
+ sessionId: string;
78
+ hotelFrontendId: string;
79
+ eventName: ERoomstayEventName;
80
+ eventTime: number;
81
+ sourceUrl?: string;
82
+ eventData: IRoomstayEventData;
83
+ session: {
84
+ fbc?: string;
85
+ fbp?: string;
86
+ userAgent?: string;
87
+ ipAddress?: string;
88
+ externalId?: string;
89
+ };
90
+ }
@@ -18,4 +18,3 @@ export interface IAnalyticsSessionRequest {
18
18
  fbc?: string;
19
19
  fbp?: string;
20
20
  }
21
- //# sourceMappingURL=IAnalyticsSession.type.d.ts.map
@@ -20,6 +20,16 @@ export interface IRoomstayBasketItem {
20
20
  averageNightlyRate: number;
21
21
  promoCode?: string;
22
22
  }
23
+ /**
24
+ * Serialized representation of a BasketAddonRow for analytics events.
25
+ */
26
+ export interface IRoomstayBasketAddonItem {
27
+ addonCode: string;
28
+ addonName: string;
29
+ quantity: number;
30
+ unitPrice: number;
31
+ totalPrice: number;
32
+ }
23
33
  /**
24
34
  * Guest/user information for analytics events.
25
35
  * Used for Booking/Committed events where we have guest details.
@@ -36,17 +46,25 @@ export interface IRoomstayGuestData {
36
46
  externalId?: string;
37
47
  }
38
48
  /**
39
- * Event data for Basket/Add event
49
+ * Event data for Basket/Add event (room added to cart)
40
50
  */
41
51
  export interface IRoomstayBasketAddEventData {
42
52
  item: IRoomstayBasketItem;
43
53
  currency: string;
44
54
  }
55
+ /**
56
+ * Event data for Basket/AddAddon event (addon added to cart)
57
+ */
58
+ export interface IRoomstayAddonAddEventData {
59
+ addon: IRoomstayBasketAddonItem;
60
+ currency: string;
61
+ }
45
62
  /**
46
63
  * Event data for View/Checkout event
47
64
  */
48
65
  export interface IRoomstayCheckoutViewEventData {
49
66
  items: IRoomstayBasketItem[];
67
+ addons?: IRoomstayBasketAddonItem[];
50
68
  currency: string;
51
69
  totalValue: number;
52
70
  }
@@ -55,6 +73,7 @@ export interface IRoomstayCheckoutViewEventData {
55
73
  */
56
74
  export interface IRoomstayBookingCommittedEventData {
57
75
  items: IRoomstayBasketItem[];
76
+ addons?: IRoomstayBasketAddonItem[];
58
77
  currency: string;
59
78
  totalValue: number;
60
79
  roomstayId: string;
@@ -62,5 +81,10 @@ export interface IRoomstayBookingCommittedEventData {
62
81
  reservationNumbers: string[];
63
82
  guest: IRoomstayGuestData;
64
83
  }
65
- export type IRoomstayEventData = IRoomstayBasketAddEventData | IRoomstayCheckoutViewEventData | IRoomstayBookingCommittedEventData;
66
- //# sourceMappingURL=IRoomstayEventData.type.d.ts.map
84
+ export type IRoomstayEventData = IRoomstayBasketAddEventData | IRoomstayAddonAddEventData | IRoomstayCheckoutViewEventData | IRoomstayBookingCommittedEventData;
85
+ /**
86
+ * Generic type for any event data that includes guest information.
87
+ */
88
+ export interface IRoomstayEventDataWithGuest {
89
+ guest: IRoomstayGuestData;
90
+ }
@@ -4,7 +4,7 @@
4
4
  * Transforms Roomstay event data to Meta CAPI format.
5
5
  * Used both client-side (for Meta Pixel) and server-side (for Meta CAPI).
6
6
  */
7
- import { ERoomstayEventName, IMetaEventData, IMetaUserData } from './IAnalyticsEvent.type';
7
+ import { ERoomstayEventName, IMetaEventData, IMetaPixelEventOptions, IMetaUserData } from './IAnalyticsEvent.type';
8
8
  import { IRoomstayEventData, IRoomstayGuestData } from './IRoomstayEventData.type';
9
9
  /**
10
10
  * Maps Roomstay event names to Meta CAPI event names
@@ -12,11 +12,14 @@ import { IRoomstayEventData, IRoomstayGuestData } from './IRoomstayEventData.typ
12
12
  export declare function toMetaEventName(eventName: ERoomstayEventName): string;
13
13
  /**
14
14
  * Transform roomstay event to Meta pixel/CAPI event.
15
- * Note: ViewBookingEngine events should not be transformed - they are for session init only.
16
15
  */
17
16
  export declare function transformToMetaEventData(eventData: IRoomstayEventData): IMetaEventData;
18
17
  /**
19
18
  * Transform guest data to Meta user_data format.
20
19
  */
21
20
  export declare function transformToMetaUserData(guest: IRoomstayGuestData): IMetaUserData;
22
- //# sourceMappingURL=MetaCapiTransformer.d.ts.map
21
+ /**
22
+ * Build Meta Pixel options object with user data.
23
+ * Meta Pixel automatically hashes the user data values.
24
+ */
25
+ export declare function buildPixelEventOptions(eventId: string, userData?: IMetaUserData): IMetaPixelEventOptions;
@@ -79,7 +79,7 @@ export type ReservationDTO = {
79
79
  beforeTax: number;
80
80
  afterTax: number;
81
81
  beforeFees?: number;
82
+ deposit?: number;
82
83
  };
83
84
  fees?: number;
84
85
  };
85
- //# sourceMappingURL=Reservations.type.d.ts.map
@@ -5,4 +5,3 @@ export type RoomNightRateDTO = {
5
5
  total: string;
6
6
  discount: string;
7
7
  };
8
- //# sourceMappingURL=RoomNightRate.type.d.ts.map
@@ -1,4 +1,4 @@
1
- import { Warning } from '@types';
1
+ import { Warning } from '../index.js';
2
2
  import { IItemisedBookingFeeResponse } from '../Booking/Itinerary.types';
3
3
  import { EGuaranteePolicyDepositMode } from '../Policies/EGuaranteePolicy.enum';
4
4
  import { EPromoCodeDiscountType } from '../PromoCode/EPromoCodeDiscountType.enum';
@@ -119,4 +119,3 @@ export type IRateLabelsByDay = {
119
119
  Saturday: boolean;
120
120
  Sunday: boolean;
121
121
  };
122
- //# sourceMappingURL=Availability.types.d.ts.map
@@ -19,4 +19,3 @@ export type ICancelBookingRequest = {
19
19
  companyUserId?: number;
20
20
  cancellationReason?: string;
21
21
  } & ICommonQueryParameters;
22
- //# sourceMappingURL=ConfirmBooking.types.d.ts.map
@@ -10,4 +10,3 @@ export declare enum EBookingFlow {
10
10
  PreCheckoutPencil = "PreCheckoutPencil",
11
11
  PostCheckoutPencil = "PostCheckoutPencil"
12
12
  }
13
- //# sourceMappingURL=EBooking.types.d.ts.map
@@ -5,4 +5,3 @@ export type IGetBookingRequest = {
5
5
  reservationId: string;
6
6
  } & ICommonQueryParameters;
7
7
  export type IGetBookingResponse = ItineraryResponse;
8
- //# sourceMappingURL=GetBooking.types.d.ts.map
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This is the response body that comes down if a booking fails anywhere in the booking flow.
3
+ *
4
+ * Object will contain a public message only, with partial reservation data to be able to attempt to "resume" the booking
5
+ */
6
+ export type IBookingCreateErrorResponse = {
7
+ canRetryPayment: boolean;
8
+ isPaymentTaken: boolean;
9
+ publicMessage: string;
10
+ roomstayId: string;
11
+ };
@@ -11,4 +11,3 @@ export type IBookingCreateErrorResponse = {
11
11
  publicMessage: string;
12
12
  roomstayId: string;
13
13
  };
14
- //# sourceMappingURL=IBookingCreateErrorResponse.type.d.ts.map
@@ -0,0 +1,19 @@
1
+ export declare enum EBookingCustomFieldFormat {
2
+ Number = "number",
3
+ Text = "text",
4
+ Date = "date",
5
+ CarReg = "carreg"
6
+ }
7
+ export type IBookingCustomFields = {
8
+ externalId: number;
9
+ label: string;
10
+ value: string;
11
+ format: EBookingCustomFieldFormat;
12
+ };
13
+ export type IBookingExtraFields = {
14
+ perRow: {
15
+ childAges?: number[];
16
+ }[];
17
+ customFields?: IBookingCustomFields[];
18
+ eta?: string;
19
+ };
@@ -24,6 +24,10 @@ export declare enum EHotelCardProcessor {
24
24
  Stripe = "Stripe",
25
25
  PayPal = "PayPal"
26
26
  }
27
+ export declare enum EHotelCardProcessorPaymentType {
28
+ Card = "card",
29
+ Account2Account = "account2account"
30
+ }
27
31
  export declare enum EPlanpayBookingStatus {
28
32
  Unknown = "unknown",// incase plan.deposit.status is unavailable
29
33
  Unpaid = "unpaid",
@@ -99,8 +103,16 @@ export type IPaymentCheckoutDetails = {
99
103
  successUrl: string;
100
104
  currencyCode: string;
101
105
  };
106
+ windcave?: {
107
+ links: {
108
+ href: string;
109
+ rel: string;
110
+ method: string;
111
+ }[];
112
+ successUrl: string;
113
+ useTesting: boolean;
114
+ };
102
115
  isSplitPayment?: boolean;
103
116
  totalAuthorizedAmount?: number;
104
117
  };
105
118
  export {};
106
- //# sourceMappingURL=IBookingPayment.type.d.ts.map