@roomstay/core 0.2.0-0 → 0.2.0-2

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 (219) 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 +0 -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 +9 -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 +0 -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/{types/Events → Events}/ERoomstayEventSource.enum.d.ts +0 -1
  38. package/dist/types/{types/Events → Events}/IRoomstayEvent.type.d.ts +0 -1
  39. package/dist/types/{types/Fees → Fees}/EFeeType.enum.d.ts +0 -1
  40. package/dist/types/{types/Fees → Fees}/IFee.type.d.ts +0 -1
  41. package/dist/types/{types/Fees → Fees}/IFeeConfigurationOptions.type.d.ts +0 -1
  42. package/dist/types/Fees/IFeeOptions.type.d.ts +6 -0
  43. package/dist/types/{types/General → General}/Format.types.d.ts +0 -1
  44. package/dist/types/{types/General → General}/HttpMethod.enum.d.ts +0 -1
  45. package/dist/types/{types/General → General}/IMessage.type.d.ts +0 -1
  46. package/dist/types/{types/General → General}/Pagination.types.d.ts +0 -1
  47. package/dist/types/{types/General → General}/Warning.type.d.ts +0 -1
  48. package/dist/types/{types/GiftCards → GiftCards}/GiftCard.types.d.ts +9 -1
  49. package/dist/types/{types/GiftCards → GiftCards}/GiftCardAuth.types.d.ts +0 -1
  50. package/dist/types/{types/GiftCards → GiftCards}/GiftCardLogs.enum.d.ts +0 -1
  51. package/dist/types/{types/Hotel → Hotel}/EHotelAddressRequirement.enum.d.ts +0 -1
  52. package/dist/types/{types/Hotel → Hotel}/EHotelPriceModel.enum.d.ts +0 -1
  53. package/dist/types/{types/Hotel → Hotel}/EHotelStateFieldConfiguration.enum.d.ts +0 -1
  54. package/dist/types/{types/Hotel → Hotel}/EHotelWeekdayStartsOn.enum.d.ts +0 -1
  55. package/dist/types/{types/Hotel → Hotel}/EIntegration.enum.d.ts +2 -2
  56. package/dist/types/{types/Hotel → Hotel}/IAuxiliaryFilter.type.d.ts +0 -1
  57. package/dist/types/{types/Hotel → Hotel}/IHotelColorScheme.type.d.ts +0 -1
  58. package/dist/types/{types/Hotel → Hotel}/IHotelOverrides.type.d.ts +0 -1
  59. package/dist/types/{types/Hotel → Hotel}/IHotelReplica.type.d.ts +1 -2
  60. package/dist/types/{types/Hotel → Hotel}/IHotelService.type.d.ts +0 -1
  61. package/dist/types/{types/Image → Image}/IRoomstayImage.type.d.ts +0 -1
  62. package/dist/types/{types/Maintenance → Maintenance}/IMaintenanceStatus.type.d.ts +4 -2
  63. package/dist/types/{types/Media → Media}/IMedia.type.d.ts +0 -1
  64. package/dist/types/Member/EMembershipProvider.type.d.ts +10 -0
  65. package/dist/types/{types/Member → Member}/IMember.type.d.ts +0 -1
  66. package/dist/types/{types/Member → Member}/IMemberVerification.type.d.ts +0 -1
  67. package/dist/types/{types/Member → Member}/IRoomstayCognitoMember.type.d.ts +0 -1
  68. package/dist/types/{types/Member → Member}/IRoomstayMember.type.d.ts +2 -2
  69. package/dist/types/{types/Member → Member}/IRoomstayMemberBooking.type.d.ts +1 -2
  70. package/dist/types/{types/Member → Member}/IRoomstayMemberBookingAddress.type.d.ts +0 -1
  71. package/dist/types/{types/Member → Member}/IRoomstayMemberBookingItem.type.d.ts +1 -2
  72. package/dist/types/{types/Member → Member}/IRoomstayMemberBookingProfile.type.d.ts +1 -2
  73. package/dist/types/{types/Member → Member}/IRoomstayMemberCards.type.d.ts +0 -1
  74. package/dist/types/{types/Member → Member}/IRoomstayMemberJWTData.type.d.ts +0 -1
  75. package/dist/types/Member/IRoomstayMemberLoyalty.type.d.ts +16 -0
  76. package/dist/types/{types/Member → Member}/ISession.type.d.ts +0 -1
  77. package/dist/types/Member/LoyaltyTiers.d.ts +6 -0
  78. package/dist/types/Newbook/ENewbookRegion.enum.d.ts +7 -0
  79. package/dist/types/Newbook/ENewbookSiteSelectionFeeType.enum.d.ts +4 -0
  80. package/dist/types/Newbook/ENewbookSiteSelectionType.enum.d.ts +6 -0
  81. package/dist/types/Newbook/ENewbookSyncStrategy.enum.d.ts +7 -0
  82. package/dist/types/Newbook/ENewbookSyncType.enum.d.ts +3 -0
  83. package/dist/types/Newbook/INewbookSyncResponse.type.d.ts +9 -0
  84. package/dist/types/Newbook/index.d.ts +2 -0
  85. package/dist/types/{types/OHIP → OHIP}/IOHIPConfiguration.types.d.ts +0 -1
  86. package/dist/types/{types/OHIP → OHIP}/index.d.ts +0 -1
  87. package/dist/types/PMS/EPMSSyncStatus.enum.d.ts +8 -0
  88. package/dist/types/PMS/IPMSSyncResponse.type.d.ts +10 -0
  89. package/dist/types/PMS/index.d.ts +2 -0
  90. package/dist/types/PMSSync/EPMSSyncStatus.enum.d.ts +8 -0
  91. package/dist/types/PMSSync/IPMSSyncResponse.type.d.ts +10 -0
  92. package/dist/types/PMSSync/index.d.ts +17 -0
  93. package/dist/types/{types/Package → Package}/Package.types.d.ts +0 -1
  94. package/dist/types/{types/Policies → Policies}/EGuaranteePolicy.enum.d.ts +5 -1
  95. package/dist/types/{types/PromoCode → PromoCode}/EPromoCodeDiscountType.enum.d.ts +2 -2
  96. package/dist/types/{types/PromoCode → PromoCode}/PromoCodeStayDateRangeType.enum.d.ts +0 -1
  97. package/dist/types/{types/RMS → RMS}/ERMSAuthSyncHistoryStatus.type.d.ts +0 -1
  98. package/dist/types/{types/RMS → RMS}/ERMSDiscountType.enum.d.ts +0 -1
  99. package/dist/types/{types/RMS → RMS}/ERMSSyncStrategy.enum.d.ts +1 -1
  100. package/dist/types/{types/RMS → RMS}/IRMSPropertyDiscount.type.d.ts +0 -1
  101. package/dist/types/{types/RMS → RMS}/IRMSRequirement.type.d.ts +0 -1
  102. package/dist/types/{types/RMS → RMS}/IRMSSyncResponse.type.d.ts +0 -1
  103. package/dist/types/{types/RMS → RMS}/RMSBookingSource.type.d.ts +0 -1
  104. package/dist/types/RMS/RMSGuestDTO.type.d.ts +50 -0
  105. package/dist/types/{types/Room → Room}/IRoomGroup.type.d.ts +0 -1
  106. package/dist/types/index.d.ts +157 -3
  107. package/dist/{types/utils → utils}/TotalCalculator.d.ts +0 -1
  108. package/dist/{types/utils → utils}/bookingTotal.d.ts +1 -2
  109. package/dist/{types/utils → utils}/calculateFee.d.ts +1 -2
  110. package/dist/utils/feeOptionRules.d.ts +0 -0
  111. package/dist/{types/utils → utils}/feeTypes.d.ts +1 -2
  112. package/dist/{types/utils → utils}/index.d.ts +0 -1
  113. package/dist/{types/utils → utils}/reflection.d.ts +0 -1
  114. package/dist/{types/utils → utils}/roomstayImageResize.d.ts +1 -2
  115. package/dist/utils/roundMoney.d.ts +20 -0
  116. package/dist/{types/utils → utils}/typeUtils.d.ts +0 -1
  117. package/dist/{types/utils → utils}/uppercaseString.d.ts +0 -1
  118. package/dist/{types/utils → utils}/zodUtils.d.ts +0 -1
  119. package/dist/web.js +1 -0
  120. package/dist/web.js.LICENSE.txt +7 -0
  121. package/package.json +11 -15
  122. package/dist/browser/index.js +0 -3901
  123. package/dist/browser/index.js.map +0 -1
  124. package/dist/node/index.cjs +0 -25
  125. package/dist/node/index.cjs.map +0 -1
  126. package/dist/node/index.mjs +0 -3901
  127. package/dist/node/index.mjs.map +0 -1
  128. package/dist/types/index.d.ts.map +0 -1
  129. package/dist/types/types/Addons/Addon.enum.d.ts.map +0 -1
  130. package/dist/types/types/Addons/Addon.types.d.ts.map +0 -1
  131. package/dist/types/types/Analytics/IBigQueryResults.type.d.ts.map +0 -1
  132. package/dist/types/types/AnalyticsEvents/IAnalyticsEvent.type.d.ts +0 -65
  133. package/dist/types/types/AnalyticsEvents/IAnalyticsEvent.type.d.ts.map +0 -1
  134. package/dist/types/types/AnalyticsEvents/IAnalyticsSession.type.d.ts.map +0 -1
  135. package/dist/types/types/AnalyticsEvents/IRoomstayEventData.type.d.ts.map +0 -1
  136. package/dist/types/types/AnalyticsEvents/MetaCapiTransformer.d.ts.map +0 -1
  137. package/dist/types/types/Api/Reservations.type.d.ts.map +0 -1
  138. package/dist/types/types/Api/RoomNightRate.type.d.ts.map +0 -1
  139. package/dist/types/types/Availability/Availability.types.d.ts.map +0 -1
  140. package/dist/types/types/Booking/ConfirmBooking.types.d.ts.map +0 -1
  141. package/dist/types/types/Booking/EBooking.types.d.ts.map +0 -1
  142. package/dist/types/types/Booking/GetBooking.types.d.ts.map +0 -1
  143. package/dist/types/types/Booking/IBookingCreateErrorResponse.type.d.ts.map +0 -1
  144. package/dist/types/types/Booking/IBookingExtraFields.type.d.ts +0 -6
  145. package/dist/types/types/Booking/IBookingExtraFields.type.d.ts.map +0 -1
  146. package/dist/types/types/Booking/IBookingPayment.type.d.ts.map +0 -1
  147. package/dist/types/types/Booking/IBookingQuote.type.d.ts.map +0 -1
  148. package/dist/types/types/Booking/ICommonQueryParameters.type.d.ts.map +0 -1
  149. package/dist/types/types/Booking/Itinerary.types.d.ts.map +0 -1
  150. package/dist/types/types/Booking/PencilReservation.types.d.ts.map +0 -1
  151. package/dist/types/types/Booking/PlaceBooking.types.d.ts.map +0 -1
  152. package/dist/types/types/Company/ECompanyProvider.enum.d.ts.map +0 -1
  153. package/dist/types/types/Company/IAdminCompany.type.d.ts.map +0 -1
  154. package/dist/types/types/Company/IAdminCompanyUser.type.d.ts.map +0 -1
  155. package/dist/types/types/Events/ERoomstayEventSource.enum.d.ts.map +0 -1
  156. package/dist/types/types/Events/IRoomstayEvent.type.d.ts.map +0 -1
  157. package/dist/types/types/Fees/EFeeType.enum.d.ts.map +0 -1
  158. package/dist/types/types/Fees/IFee.type.d.ts.map +0 -1
  159. package/dist/types/types/Fees/IFeeConfigurationOptions.type.d.ts.map +0 -1
  160. package/dist/types/types/General/Format.types.d.ts.map +0 -1
  161. package/dist/types/types/General/HttpMethod.enum.d.ts.map +0 -1
  162. package/dist/types/types/General/IMessage.type.d.ts.map +0 -1
  163. package/dist/types/types/General/Pagination.types.d.ts.map +0 -1
  164. package/dist/types/types/General/Warning.type.d.ts.map +0 -1
  165. package/dist/types/types/GiftCards/GiftCard.types.d.ts.map +0 -1
  166. package/dist/types/types/GiftCards/GiftCardAuth.types.d.ts.map +0 -1
  167. package/dist/types/types/GiftCards/GiftCardLogs.enum.d.ts.map +0 -1
  168. package/dist/types/types/Hotel/EHotelAddressRequirement.enum.d.ts.map +0 -1
  169. package/dist/types/types/Hotel/EHotelPriceModel.enum.d.ts.map +0 -1
  170. package/dist/types/types/Hotel/EHotelStateFieldConfiguration.enum.d.ts.map +0 -1
  171. package/dist/types/types/Hotel/EHotelWeekdayStartsOn.enum.d.ts.map +0 -1
  172. package/dist/types/types/Hotel/EIntegration.enum.d.ts.map +0 -1
  173. package/dist/types/types/Hotel/IAuxiliaryFilter.type.d.ts.map +0 -1
  174. package/dist/types/types/Hotel/IHotelColorScheme.type.d.ts.map +0 -1
  175. package/dist/types/types/Hotel/IHotelOverrides.type.d.ts.map +0 -1
  176. package/dist/types/types/Hotel/IHotelReplica.type.d.ts.map +0 -1
  177. package/dist/types/types/Hotel/IHotelService.type.d.ts.map +0 -1
  178. package/dist/types/types/Image/IRoomstayImage.type.d.ts.map +0 -1
  179. package/dist/types/types/Maintenance/IMaintenanceStatus.type.d.ts.map +0 -1
  180. package/dist/types/types/Media/IMedia.type.d.ts.map +0 -1
  181. package/dist/types/types/Member/IMember.type.d.ts.map +0 -1
  182. package/dist/types/types/Member/IMemberVerification.type.d.ts.map +0 -1
  183. package/dist/types/types/Member/IRoomstayCognitoMember.type.d.ts.map +0 -1
  184. package/dist/types/types/Member/IRoomstayMember.type.d.ts.map +0 -1
  185. package/dist/types/types/Member/IRoomstayMemberBooking.type.d.ts.map +0 -1
  186. package/dist/types/types/Member/IRoomstayMemberBookingAddress.type.d.ts.map +0 -1
  187. package/dist/types/types/Member/IRoomstayMemberBookingItem.type.d.ts.map +0 -1
  188. package/dist/types/types/Member/IRoomstayMemberBookingProfile.type.d.ts.map +0 -1
  189. package/dist/types/types/Member/IRoomstayMemberCards.type.d.ts.map +0 -1
  190. package/dist/types/types/Member/IRoomstayMemberJWTData.type.d.ts.map +0 -1
  191. package/dist/types/types/Member/ISession.type.d.ts.map +0 -1
  192. package/dist/types/types/OHIP/IOHIPConfiguration.types.d.ts.map +0 -1
  193. package/dist/types/types/OHIP/index.d.ts.map +0 -1
  194. package/dist/types/types/Package/Package.types.d.ts.map +0 -1
  195. package/dist/types/types/Policies/EGuaranteePolicy.enum.d.ts.map +0 -1
  196. package/dist/types/types/PromoCode/EPromoCodeDiscountType.enum.d.ts.map +0 -1
  197. package/dist/types/types/PromoCode/PromoCodeStayDateRangeType.enum.d.ts.map +0 -1
  198. package/dist/types/types/RMS/ERMSAuthSyncHistoryStatus.type.d.ts.map +0 -1
  199. package/dist/types/types/RMS/ERMSDiscountType.enum.d.ts.map +0 -1
  200. package/dist/types/types/RMS/ERMSSyncStrategy.enum.d.ts.map +0 -1
  201. package/dist/types/types/RMS/IRMSPropertyDiscount.type.d.ts.map +0 -1
  202. package/dist/types/types/RMS/IRMSRequirement.type.d.ts.map +0 -1
  203. package/dist/types/types/RMS/IRMSSyncResponse.type.d.ts.map +0 -1
  204. package/dist/types/types/RMS/RMSBookingSource.type.d.ts.map +0 -1
  205. package/dist/types/types/Room/IRoomGroup.type.d.ts.map +0 -1
  206. package/dist/types/types/index.d.ts +0 -139
  207. package/dist/types/types/index.d.ts.map +0 -1
  208. package/dist/types/utils/TotalCalculator.d.ts.map +0 -1
  209. package/dist/types/utils/bookingTotal.d.ts.map +0 -1
  210. package/dist/types/utils/calculateFee.d.ts.map +0 -1
  211. package/dist/types/utils/feeTypes.d.ts.map +0 -1
  212. package/dist/types/utils/index.d.ts.map +0 -1
  213. package/dist/types/utils/reflection.d.ts.map +0 -1
  214. package/dist/types/utils/roomstayImageResize.d.ts.map +0 -1
  215. package/dist/types/utils/roundMoney.d.ts +0 -11
  216. package/dist/types/utils/roundMoney.d.ts.map +0 -1
  217. package/dist/types/utils/typeUtils.d.ts.map +0 -1
  218. package/dist/types/utils/uppercaseString.d.ts.map +0 -1
  219. 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;e.r(t),e.d(t,{ADDON_PER_NIGHT_TYPES:()=>ar,AddGiftCardSchema:()=>xo,AdyenEventCode:()=>Yo,AdyenResultCode:()=>Vo,BaseGiftCardSchema:()=>$o,CancelGiftCardTransactionSchema:()=>Ko,CompleteGiftCardTransactionSchema:()=>Jo,CreatePaymentSessionSchema:()=>Do,DATE_FORMAT:()=>D,EAddonPricingType:()=>rr,EAdminCompanyUserRole:()=>f,EBookingCustomFieldFormat:()=>o,EBookingFlow:()=>i,EBookingPaymentMethod:()=>r,EBookingStatus:()=>n,ECompanyProvider:()=>p,EDistanceUnitType:()=>P,EFeeType:()=>j,EGiftCardPaymentProvider:()=>Ho,EGiftCardPaymentStatus:()=>qo,EGiftCardPaymentType:()=>Zo,EGiftCardTransactionType:()=>Qo,EGuaranteePolicyDepositMode:()=>R,EGuarantyPolicyPrepaymentType:()=>I,EHotelAddressRequirement:()=>h,EHotelCardProcessor:()=>a,EHotelPriceModel:()=>m,EHotelStateFieldConfiguration:()=>g,EHotelWeekdayStartsOn:()=>v,EIntegration:()=>y,ELogCategory:()=>cr,ELogSeverity:()=>sr,ELogType:()=>ur,EMembershipProvider:()=>N,ENewbookRegion:()=>z,ENewbookSyncStrategy:()=>w,EPMSSyncStatus:()=>E,EPlanpayBookingStatus:()=>s,EPromoCodeDiscountType:()=>S,EPromoCodeStayDateRangeRepeatType:()=>$,EPromoCodeStayDateRangeType:()=>O,ERMSAuthSyncHistoryStatus:()=>A,ERMSDiscountType:()=>b,ERMSSyncStrategy:()=>k,ERoomstayEventName:()=>L,ERoomstayEventSource:()=>x,ERoomstayImageSize:()=>T,ETransactionStatus:()=>Wo,EditGiftCardSchema:()=>Fo,GetCompanyConfigSchema:()=>Xo,GuestProfile:()=>l,HttpMethod:()=>U,IAuxiliaryFilterType:()=>_,IMaintenanceStatusService:()=>C,InternationalAddressSchema:()=>Oo,ItineraryResponse:()=>u,META_USER_DATA_KEYS:()=>M,PCIBookingCardProcessorTypes:()=>c,Package:()=>F,PassthroughPaymentDataSchema:()=>jo,PaymentProcessorDataSchema:()=>Uo,PurchaseGiftCardSchema:()=>Lo,RedeemGiftCardSchema:()=>Bo,RefreshGiftCardTokenSchema:()=>ir,RefundGiftCardSchema:()=>Mo,RegisterGiftCardAdminSchema:()=>or,Reservation:()=>d,ReservedPackage:()=>Z,RoundingType:()=>fr,TotalCalculator:()=>Tr,UpdateAdyenConfigSchema:()=>nr,UpdateCompanyConfigSchema:()=>tr,ValidateGiftCardSchema:()=>Go,buildPixelEventOptions:()=>V,calculateFeeAmount:()=>mr,calculateTotalForMemberBooking:()=>dr,getFeeOptionValidity:()=>zr,getFilteredBookingAddonFees:()=>kr,getFilteredBookingFees:()=>Pr,getFilteredBookingRateFees:()=>br,maxString:()=>So,nameof:()=>wr,preprocessDate:()=>To,preprocessNumber:()=>Ao,requireEmail:()=>No,requireFutureDate:()=>Io,requirePositiveAmount:()=>Ro,requireString:()=>Co,resizeRoomstayImageUrl:()=>Ar,roundMoney:()=>hr,subset:()=>Er,toMetaEventName:()=>G,transformToMetaEventData:()=>H,transformToMetaUserData:()=>q,uppercaseString:()=>Cr,validateFormWithZod:()=>Eo}),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.Unknown="unknown",e.Unpaid="unpaid",e.Accepted="accepted",e.Cancelled="cancelled",e.Refunded="refunded",e.Rejected="rejected"}(s||(s={}));const c=[];class u{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 d{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 l,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 l{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 p,f,h,m,g,v,y,_,P,b,k,z,w,E,A,T,C,N,R,I,S,O,$,x;!function(e){e.Synxis="Synxis",e.Availpro="Availpro",e.RMS="RMS",e.Siteminder="Siteminder",e.Roomstay="Roomstay",e.OHIP="OHIP",e.Newbook="Newbook"}(p||(p={})),function(e){e.SuperAdmin="SuperAdmin",e.Admin="Admin",e.Limited="Limited"}(f||(f={})),function(e){e.FullAddressRequired="FullAddressRequired",e.AddressOptionalCountryRequired="AddressOptionalCountryRequired",e.AddressOptional="AddressOptional"}(h||(h={})),function(e){e.PerPerson="PerPerson",e.PerDay="PerDay",e.PerOccupancy="PerOccupancy"}(m||(m={})),function(e){e.NotIncluded="NotIncluded",e.Optional="Optional",e.Required="Required"}(g||(g={})),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"}(y||(y={})),function(e){e.AreaDwellingLength="AreaDwellingLength",e.AreaDwellingType="AreaDwellingType"}(_||(_={})),function(e){e.Metric="metric",e.Imperial="imperial"}(P||(P={})),function(e){e.Percentage="Percentage",e.Amount="Amount",e.Bogo="BOGO",e.NightlyRateOverride="NightlyRateOverride"}(b||(b={})),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"}(k||(k={})),function(e){e.Australia="au",e.AsiaPacific="ap",e.Europe="eu",e.UnitedStates="us",e.Staging="staging"}(z||(z={})),function(e){e.Rates="rates",e.Rooms="rooms",e.Availability="availability",e.Details="details",e.Tariffs="tariffs"}(w||(w={})),function(e){e.New="new",e.Queued="queued",e.InProgress="in_progress",e.Success="success",e.Failure="failure",e.RequireResume="require_resume"}(E||(E={})),function(e){e.Success="success",e.Failure="failure",e.New="new",e.Queued="queued",e.InProgress="in_progress",e.RequireResume="require_resume"}(A||(A={})),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"}(T||(T={})),function(e){e.Frontend="frontend",e.Hotel="hotel",e.Events="events"}(C||(C={})),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"}(N||(N={}));class F{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 Z extends F{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"}(R||(R={})),function(e){e.FixedAmount="fixed",e.Percentage="percentage",e.Nights="nights"}(I||(I={})),function(e){e.FlatPercent="flatPercent",e.FlatQuantity="flatQuantity",e.FlatQuantityPerStay="flatQuantityPerStay",e.FixedNightlyRate="fixedNightlyRate"}(S||(S={})),function(e){e.Allowed="Allowed",e.Blocked="Blocked"}(O||(O={})),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"}(x||(x={}));const D="DD/MM/YYYY";let U,j,L;!function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e.PATCH="PATCH",e.OPTIONS="OPTIONS",e.HEAD="HEAD"}(U||(U={})),function(e){e.PercentageOfBooking="PercentageOfBooking",e.FixedChargePerRoom="FixedChargePerRoom",e.NightlyChargePerRoom="NightlyChargePerRoom",e.FixedChargePerBooking="FixedChargePerBooking",e.DepositSurcharge="DepositSurcharge"}(j||(j={})),function(e){e.BasketAdd="Basket/Add",e.BasketAddAddon="Basket/AddAddon",e.ViewCheckout="View/Checkout",e.BookingCommitted="Booking/Committed"}(L||(L={}));const M=["em","ph","fn","ln","ct","st","zp","country","external_id"];function G(e){return{[L.BasketAdd]:"AddToCart",[L.BasketAddAddon]:"AddToCart",[L.ViewCheckout]:"InitiateCheckout",[L.BookingCommitted]:"Purchase"}[e]}function B(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 H(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 B([e.item],void 0,e.currency);if("items"in e){const t=e,n=B(t.items,t.addons,e.currency);return"itineraryNumber"in t&&(n.order_id=t.itineraryNumber),n}throw new Error("Invalid event data")}function q(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 V(e,t){const n={eventID:e};if(t)for(const e of M)t[e]&&(n[e]=t[e]);return n}function Y(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 Q extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class W extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const J={};function K(e){return e&&Object.assign(J,e),J}const X=/^[cC][^\s-]{8,}$/,ee=/^[0-9a-z]+$/,te=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ne=/^[0-9a-vA-V]{20}$/,ie=/^[A-Za-z0-9]{27}$/,oe=/^[a-zA-Z0-9_-]{21}$/,re=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ae=/^([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})$/,se=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)$/,ce=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ue=/^(?:(?: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])$/,de=/^(([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})$/,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])\/([0-9]|[1-2][0-9]|3[0-2])$/,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})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,fe=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,he=/^[A-Za-z0-9_-]*$/,me=/^(?=.{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])?)*\.?$/,ge=/^\+(?:[0-9]){6,14}[0-9]$/,ve="(?:(?:\\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])))",ye=new RegExp(`^${ve}$`);function _e(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 Pe=/^\d+$/,be=/^-?\d+(?:\.\d+)?/i,ke=/true|false/i,ze=/^[^A-Z]*$/,we=/^[^a-z]*$/;function Ee(e,t){return"bigint"==typeof t?t.toString():t}function Ae(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Te(e){return null==e}function Ce(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const Ne=Symbol("evaluating");function Re(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==Ne)return void 0===i&&(i=Ne,i=n()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Ie(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Se(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Oe(e){return JSON.stringify(e)}const $e="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function xe(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const Fe=Ae((()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}}));function Ze(e){if(!1===xe(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!1!==xe(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function De(e){return Ze(e)?{...e}:e}const Ue=new Set(["string","number","symbol"]);function je(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Le(e,t,n){const i=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(i._zod.parent=e),i}function Me(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 Ge={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 Be(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 He(e,t){return t.map((t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t}))}function qe(e){return"string"==typeof e?e:e?.message}function Ve(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const o=qe(e.inst?._zod.def?.error?.(e))??qe(t?.error?.(e))??qe(n.customError?.(e))??qe(n.localeError?.(e))??"Invalid input";i.message=o}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function Ye(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function Qe(...e){const[t,n,i]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:i}:{...t}}const We=Y("$ZodCheck",((e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])})),Je={number:"number",bigint:"bigint",object:"date"},Ke=Y("$ZodCheckLessThan",((e,t)=>{We.init(e,t);const n=Je[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})}})),Xe=Y("$ZodCheckGreaterThan",((e,t)=>{We.init(e,t);const n=Je[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})}})),et=Y("$ZodCheckMultipleOf",((e,t)=>{We.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})}})),tt=Y("$ZodCheckNumberFormat",((e,t)=>{We.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),i=n?"int":"number",[o,r]=Ge[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=Pe)})),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})}})),nt=Y("$ZodCheckMaxLength",((e,t)=>{var n;We.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Te(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=Ye(i);n.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}})),it=Y("$ZodCheckMinLength",((e,t)=>{var n;We.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Te(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=Ye(i);n.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}})),ot=Y("$ZodCheckLengthEquals",((e,t)=>{var n;We.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!Te(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=Ye(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})}})),rt=Y("$ZodCheckStringFormat",((e,t)=>{var n,i;We.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=()=>{})})),at=Y("$ZodCheckRegex",((e,t)=>{rt.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})}})),st=Y("$ZodCheckLowerCase",((e,t)=>{t.pattern??(t.pattern=ze),rt.init(e,t)})),ct=Y("$ZodCheckUpperCase",((e,t)=>{t.pattern??(t.pattern=we),rt.init(e,t)})),ut=Y("$ZodCheckIncludes",((e,t)=>{We.init(e,t);const n=je(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})}})),dt=Y("$ZodCheckStartsWith",((e,t)=>{We.init(e,t);const n=new RegExp(`^${je(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})}})),lt=Y("$ZodCheckEndsWith",((e,t)=>{We.init(e,t);const n=new RegExp(`.*${je(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})}})),pt=Y("$ZodCheckOverwrite",((e,t)=>{We.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}));class ft{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 ht=(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,Ee,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},mt=Y("$ZodError",ht),gt=Y("$ZodError",ht,{Parent:Error}),vt=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 Q;if(a.issues.length){const t=new(o?.Err??e)(a.issues.map((e=>Ve(e,r,K()))));throw $e(t,o?.callee),t}return a.value},yt=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=>Ve(e,r,K()))));throw $e(t,o?.callee),t}return a.value},_t=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 Q;return r.issues.length?{success:!1,error:new(e??mt)(r.issues.map((e=>Ve(e,o,K()))))}:{success:!0,data:r.value}},Pt=_t(gt),bt=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=>Ve(e,o,K()))))}:{success:!0,data:r.value}},kt=bt(gt),zt=e=>(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return vt(e)(t,n,o)},wt=e=>(t,n,i)=>vt(e)(t,n,i),Et=e=>async(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return yt(e)(t,n,o)},At=e=>async(t,n,i)=>yt(e)(t,n,i),Tt=e=>(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return _t(e)(t,n,o)},Ct=e=>(t,n,i)=>_t(e)(t,n,i),Nt=e=>async(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return bt(e)(t,n,o)},Rt=e=>async(t,n,i)=>bt(e)(t,n,i),It={major:4,minor:1,patch:5},St=Y("$ZodType",((e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=It;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=Be(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 Q;if(i||a instanceof Promise)i=(i??Promise.resolve()).then((async()=>{await a,e.issues.length!==t&&(o||(o=Be(e,t)))}));else{if(e.issues.length===t)continue;o||(o=Be(e,t))}}return i?i.then((()=>e)):e},n=(n,o,r)=>{if(Be(n))return n.aborted=!0,n;const a=t(o,i,r);if(a instanceof Promise){if(!1===r.async)throw new Q;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 Q;return a.then((e=>t(e,i,r)))}return t(a,i,r)}}e["~standard"]={validate:t=>{try{const n=Pt(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return kt(e,t).then((e=>e.success?{value:e.data}:{issues:e.error?.issues}))}},vendor:"zod",version:1}})),Ot=Y("$ZodString",((e,t)=>{var n;St.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=Y("$ZodStringFormat",((e,t)=>{rt.init(e,t),Ot.init(e,t)})),xt=Y("$ZodGUID",((e,t)=>{t.pattern??(t.pattern=ae),$t.init(e,t)})),Ft=Y("$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=se(e))}else t.pattern??(t.pattern=se());$t.init(e,t)})),Zt=Y("$ZodEmail",((e,t)=>{t.pattern??(t.pattern=ce),$t.init(e,t)})),Dt=Y("$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:me.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})}}})),Ut=Y("$ZodEmoji",((e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),$t.init(e,t)})),jt=Y("$ZodNanoID",((e,t)=>{t.pattern??(t.pattern=oe),$t.init(e,t)})),Lt=Y("$ZodCUID",((e,t)=>{t.pattern??(t.pattern=X),$t.init(e,t)})),Mt=Y("$ZodCUID2",((e,t)=>{t.pattern??(t.pattern=ee),$t.init(e,t)})),Gt=Y("$ZodULID",((e,t)=>{t.pattern??(t.pattern=te),$t.init(e,t)})),Bt=Y("$ZodXID",((e,t)=>{t.pattern??(t.pattern=ne),$t.init(e,t)})),Ht=Y("$ZodKSUID",((e,t)=>{t.pattern??(t.pattern=ie),$t.init(e,t)})),qt=Y("$ZodISODateTime",((e,t)=>{t.pattern??(t.pattern=function(e){const t=_e({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(`^${ve}T(?:${i})$`)}(t)),$t.init(e,t)})),Vt=Y("$ZodISODate",((e,t)=>{t.pattern??(t.pattern=ye),$t.init(e,t)})),Yt=Y("$ZodISOTime",((e,t)=>{t.pattern??(t.pattern=new RegExp(`^${_e(t)}$`)),$t.init(e,t)})),Qt=Y("$ZodISODuration",((e,t)=>{t.pattern??(t.pattern=re),$t.init(e,t)})),Wt=Y("$ZodIPv4",((e,t)=>{t.pattern??(t.pattern=ue),$t.init(e,t),e._zod.onattach.push((e=>{e._zod.bag.format="ipv4"}))})),Jt=Y("$ZodIPv6",((e,t)=>{t.pattern??(t.pattern=de),$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})}}})),Kt=Y("$ZodCIDRv4",((e,t)=>{t.pattern??(t.pattern=le),$t.init(e,t)})),Xt=Y("$ZodCIDRv6",((e,t)=>{t.pattern??(t.pattern=pe),$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 en(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const tn=Y("$ZodBase64",((e,t)=>{t.pattern??(t.pattern=fe),$t.init(e,t),e._zod.onattach.push((e=>{e._zod.bag.contentEncoding="base64"})),e._zod.check=n=>{en(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}})),nn=Y("$ZodBase64URL",((e,t)=>{t.pattern??(t.pattern=he),$t.init(e,t),e._zod.onattach.push((e=>{e._zod.bag.contentEncoding="base64url"})),e._zod.check=n=>{(function(e){if(!he.test(e))return!1;const t=e.replace(/[-_]/g,(e=>"-"===e?"+":"/"));return en(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})}})),on=Y("$ZodE164",((e,t)=>{t.pattern??(t.pattern=ge),$t.init(e,t)})),rn=Y("$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})}})),an=Y("$ZodNumber",((e,t)=>{St.init(e,t),e._zod.pattern=e._zod.bag.pattern??be,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}})),sn=Y("$ZodNumber",((e,t)=>{tt.init(e,t),an.init(e,t)})),cn=Y("$ZodBoolean",((e,t)=>{St.init(e,t),e._zod.pattern=ke,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}})),un=Y("$ZodUnknown",((e,t)=>{St.init(e,t),e._zod.parse=e=>e})),dn=Y("$ZodNever",((e,t)=>{St.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)})),ln=Y("$ZodDate",((e,t)=>{St.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 pn(e,t,n){e.issues.length&&t.issues.push(...He(n,e.issues)),t.value[n]=e.value}const fn=Y("$ZodArray",((e,t)=>{St.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=>pn(t,n,e)))):pn(s,n,e)}return r.length?Promise.all(r).then((()=>n)):n}}));function hn(e,t,n,i){e.issues.length&&t.issues.push(...He(n,e.issues)),void 0===e.value?n in i&&(t.value[n]=void 0):t.value[n]=e.value}function mn(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 gn(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=>hn(e,n,o,t)))):hn(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 vn=Y("$ZodObject",((e,t)=>{St.init(e,t);const n=Ae((()=>mn(t)));Re(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=xe,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=>hn(n,t,e,s)))):hn(n,t,e,s)}return o?gn(c,s,t,a,n.value,e):c.length?Promise.all(c).then((()=>t)):t}})),yn=Y("$ZodObjectJIT",((e,t)=>{vn.init(e,t);const n=e._zod.parse,i=Ae((()=>mn(t)));let o;const r=xe,a=!J.jitless,s=a&&Fe.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 ft(["shape","payload","ctx"]),n=i.value,o=e=>{const t=Oe(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=Oe(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?gn([],p,d,l,u,e):d):n(d,l):(d.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),d)}}));function _n(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=>!Be(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=>Ve(e,i,K())))))}),t)}const Pn=Y("$ZodUnion",((e,t)=>{St.init(e,t),Re(e._zod,"optin",(()=>t.options.some((e=>"optional"===e._zod.optin))?"optional":void 0)),Re(e._zod,"optout",(()=>t.options.some((e=>"optional"===e._zod.optout))?"optional":void 0)),Re(e._zod,"values",(()=>{if(t.options.every((e=>e._zod.values)))return new Set(t.options.flatMap((e=>Array.from(e._zod.values))))})),Re(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=>Ce(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=>_n(t,o,e,r))):_n(s,o,e,r)}})),bn=Y("$ZodIntersection",((e,t)=>{St.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])=>zn(e,t,n))):zn(e,o,r)}}));function kn(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(Ze(e)&&Ze(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=kn(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=kn(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 zn(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),Be(e))return e;const i=kn(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 wn=Y("$ZodEnum",((e,t)=>{St.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=>Ue.has(typeof e))).map((e=>"string"==typeof e?je(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}})),En=Y("$ZodTransform",((e,t)=>{St.init(e,t),e._zod.parse=(n,i)=>{if("backward"===i.direction)throw new W(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 Q;return n.value=o,n}}));function An(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const Tn=Y("$ZodOptional",((e,t)=>{St.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Re(e._zod,"values",(()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0)),Re(e._zod,"pattern",(()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${Ce(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=>An(t,e.value))):An(i,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}})),Cn=Y("$ZodNullable",((e,t)=>{St.init(e,t),Re(e._zod,"optin",(()=>t.innerType._zod.optin)),Re(e._zod,"optout",(()=>t.innerType._zod.optout)),Re(e._zod,"pattern",(()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${Ce(e.source)}|null)$`):void 0})),Re(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)})),Nn=Y("$ZodDefault",((e,t)=>{St.init(e,t),e._zod.optin="optional",Re(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=>Rn(e,t))):Rn(i,t)}}));function Rn(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const In=Y("$ZodPrefault",((e,t)=>{St.init(e,t),e._zod.optin="optional",Re(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))})),Sn=Y("$ZodNonOptional",((e,t)=>{St.init(e,t),Re(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=>On(t,e))):On(o,e)}}));function On(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=Y("$ZodCatch",((e,t)=>{St.init(e,t),Re(e._zod,"optin",(()=>t.innerType._zod.optin)),Re(e._zod,"optout",(()=>t.innerType._zod.optout)),Re(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=>Ve(e,n,K())))},input:e.value}),e.issues=[]),e))):(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map((e=>Ve(e,n,K())))},input:e.value}),e.issues=[]),e)}})),xn=Y("$ZodPipe",((e,t)=>{St.init(e,t),Re(e._zod,"values",(()=>t.in._zod.values)),Re(e._zod,"optin",(()=>t.in._zod.optin)),Re(e._zod,"optout",(()=>t.out._zod.optout)),Re(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=>Fn(e,t.in,n))):Fn(i,t.in,n)}const i=t.in._zod.run(e,n);return i instanceof Promise?i.then((e=>Fn(e,t.out,n))):Fn(i,t.out,n)}}));function Fn(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const Zn=Y("$ZodReadonly",((e,t)=>{St.init(e,t),Re(e._zod,"propValues",(()=>t.innerType._zod.propValues)),Re(e._zod,"values",(()=>t.innerType._zod.values)),Re(e._zod,"optin",(()=>t.innerType._zod.optin)),Re(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(Dn):Dn(i)}}));function Dn(e){return e.value=Object.freeze(e.value),e}const Un=Y("$ZodCustom",((e,t)=>{We.init(e,t),St.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=>jn(t,n,i,e)));jn(o,n,i,e)}}));function jn(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(Qe(e))}}Symbol("ZodOutput"),Symbol("ZodInput");class Ln{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 Mn(){return new Ln}const Gn=Mn();function Bn(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Me(t)})}function Hn(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Me(t)})}function qn(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Me(t)})}function Vn(e,t){return new Ke({check:"less_than",...Me(t),value:e,inclusive:!1})}function Yn(e,t){return new Ke({check:"less_than",...Me(t),value:e,inclusive:!0})}function Qn(e,t){return new Xe({check:"greater_than",...Me(t),value:e,inclusive:!1})}function Wn(e,t){return new Xe({check:"greater_than",...Me(t),value:e,inclusive:!0})}function Jn(e,t){return new et({check:"multiple_of",...Me(t),value:e})}function Kn(e,t){return new nt({check:"max_length",...Me(t),maximum:e})}function Xn(e,t){return new it({check:"min_length",...Me(t),minimum:e})}function ei(e,t){return new ot({check:"length_equals",...Me(t),length:e})}function ti(e){return new pt({check:"overwrite",tx:e})}const ni=Y("ZodISODateTime",((e,t)=>{qt.init(e,t),wi.init(e,t)}));const ii=Y("ZodISODate",((e,t)=>{Vt.init(e,t),wi.init(e,t)}));const oi=Y("ZodISOTime",((e,t)=>{Yt.init(e,t),wi.init(e,t)}));const ri=Y("ZodISODuration",((e,t)=>{Qt.init(e,t),wi.init(e,t)}));const ai=(e,t)=>{mt.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,Ee,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Ee,2)}},isEmpty:{get:()=>0===e.issues.length}})},si=(Y("ZodError",ai),Y("ZodError",ai,{Parent:Error})),ci=vt(si),ui=yt(si),di=_t(si),li=bt(si),pi=zt(si),fi=wt(si),hi=Et(si),mi=At(si),gi=Tt(si),vi=Ct(si),yi=Nt(si),_i=Rt(si),Pi=Y("ZodType",((e,t)=>(St.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)=>Le(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>ci(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>di(e,t,n),e.parseAsync=async(t,n)=>ui(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>li(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>pi(e,t,n),e.decode=(t,n)=>fi(e,t,n),e.encodeAsync=async(t,n)=>hi(e,t,n),e.decodeAsync=async(t,n)=>mi(e,t,n),e.safeEncode=(t,n)=>gi(e,t,n),e.safeDecode=(t,n)=>vi(e,t,n),e.safeEncodeAsync=async(t,n)=>yi(e,t,n),e.safeDecodeAsync=async(t,n)=>_i(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,...Me(n)})}(zo,e,t)}(t,n)),e.superRefine=t=>e.check(function(e){const t=function(e,t){const n=new We({check:"custom",...Me(void 0)});return n._zod.check=e,n}((n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(Qe(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(Qe(i))}},e(n.value,n))));return t}(t)),e.overwrite=t=>e.check(ti(t)),e.optional=()=>fo(e),e.nullable=()=>mo(e),e.nullish=()=>fo(mo(e)),e.nonoptional=t=>function(e,t){return new yo({type:"nonoptional",innerType:e,...Me(t)})}(e,t),e.array=()=>no(e),e.or=t=>function(e,t){return new ro({type:"union",options:e,...Me(t)})}([e,t]),e.and=t=>new ao({type:"intersection",left:e,right:t}),e.transform=t=>bo(e,lo(t)),e.default=t=>{return n=t,new go({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():De(n)}});var n},e.prefault=t=>{return n=t,new vo({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():De(n)}});var n},e.catch=t=>{return new _o({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>bo(e,t),e.readonly=()=>new ko({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return Gn.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>Gn.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return Gn.get(e);const n=e.clone();return Gn.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e))),bi=Y("_ZodString",((e,t)=>{Ot.init(e,t),Pi.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 at({check:"string_format",format:"regex",...Me(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new ut({check:"string_format",format:"includes",...Me(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new dt({check:"string_format",format:"starts_with",...Me(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new lt({check:"string_format",format:"ends_with",...Me(t),suffix:e})}(...t)),e.min=(...t)=>e.check(Xn(...t)),e.max=(...t)=>e.check(Kn(...t)),e.length=(...t)=>e.check(ei(...t)),e.nonempty=(...t)=>e.check(Xn(1,...t)),e.lowercase=t=>e.check(function(e){return new st({check:"string_format",format:"lowercase",...Me(e)})}(t)),e.uppercase=t=>e.check(function(e){return new ct({check:"string_format",format:"uppercase",...Me(e)})}(t)),e.trim=()=>e.check(ti((e=>e.trim()))),e.normalize=(...t)=>e.check(function(e){return ti((t=>t.normalize(e)))}(...t)),e.toLowerCase=()=>e.check(ti((e=>e.toLowerCase()))),e.toUpperCase=()=>e.check(ti((e=>e.toUpperCase())))})),ki=Y("ZodString",((e,t)=>{Ot.init(e,t),bi.init(e,t),e.email=t=>e.check(Bn(Ei,t)),e.url=t=>e.check(function(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Me(t)})}(Ni,t)),e.jwt=t=>e.check(function(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Me(t)})}(Bi,t)),e.emoji=t=>e.check(function(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Me(t)})}(Ri,t)),e.guid=t=>e.check(Hn(Ti,t)),e.uuid=t=>e.check(qn(Ci,t)),e.uuidv4=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Me(t)})}(Ci,t)),e.uuidv6=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Me(t)})}(Ci,t)),e.uuidv7=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Me(t)})}(Ci,t)),e.nanoid=t=>e.check(function(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Me(t)})}(Ii,t)),e.guid=t=>e.check(Hn(Ti,t)),e.cuid=t=>e.check(function(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Me(t)})}(Si,t)),e.cuid2=t=>e.check(function(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Me(t)})}(Oi,t)),e.ulid=t=>e.check(function(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Me(t)})}($i,t)),e.base64=t=>e.check(function(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Me(t)})}(Li,t)),e.base64url=t=>e.check(function(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Me(t)})}(Mi,t)),e.xid=t=>e.check(function(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Me(t)})}(xi,t)),e.ksuid=t=>e.check(function(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Me(t)})}(Fi,t)),e.ipv4=t=>e.check(function(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Me(t)})}(Zi,t)),e.ipv6=t=>e.check(function(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Me(t)})}(Di,t)),e.cidrv4=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Me(t)})}(Ui,t)),e.cidrv6=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Me(t)})}(ji,t)),e.e164=t=>e.check(function(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Me(t)})}(Gi,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,...Me(t)})}(ni,e)}(t)),e.date=t=>e.check(function(e){return function(e,t){return new e({type:"string",format:"date",check:"string_format",...Me(t)})}(ii,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,...Me(t)})}(oi,e)}(t)),e.duration=t=>e.check(function(e){return function(e,t){return new e({type:"string",format:"duration",check:"string_format",...Me(t)})}(ri,e)}(t))}));function zi(e){return function(e,t){return new e({type:"string",...Me(t)})}(ki,e)}const wi=Y("ZodStringFormat",((e,t)=>{$t.init(e,t),bi.init(e,t)})),Ei=Y("ZodEmail",((e,t)=>{Zt.init(e,t),wi.init(e,t)}));function Ai(e){return Bn(Ei,e)}const Ti=Y("ZodGUID",((e,t)=>{xt.init(e,t),wi.init(e,t)})),Ci=Y("ZodUUID",((e,t)=>{Ft.init(e,t),wi.init(e,t)})),Ni=Y("ZodURL",((e,t)=>{Dt.init(e,t),wi.init(e,t)})),Ri=Y("ZodEmoji",((e,t)=>{Ut.init(e,t),wi.init(e,t)})),Ii=Y("ZodNanoID",((e,t)=>{jt.init(e,t),wi.init(e,t)})),Si=Y("ZodCUID",((e,t)=>{Lt.init(e,t),wi.init(e,t)})),Oi=Y("ZodCUID2",((e,t)=>{Mt.init(e,t),wi.init(e,t)})),$i=Y("ZodULID",((e,t)=>{Gt.init(e,t),wi.init(e,t)})),xi=Y("ZodXID",((e,t)=>{Bt.init(e,t),wi.init(e,t)})),Fi=Y("ZodKSUID",((e,t)=>{Ht.init(e,t),wi.init(e,t)})),Zi=Y("ZodIPv4",((e,t)=>{Wt.init(e,t),wi.init(e,t)})),Di=Y("ZodIPv6",((e,t)=>{Jt.init(e,t),wi.init(e,t)})),Ui=Y("ZodCIDRv4",((e,t)=>{Kt.init(e,t),wi.init(e,t)})),ji=Y("ZodCIDRv6",((e,t)=>{Xt.init(e,t),wi.init(e,t)})),Li=Y("ZodBase64",((e,t)=>{tn.init(e,t),wi.init(e,t)})),Mi=Y("ZodBase64URL",((e,t)=>{nn.init(e,t),wi.init(e,t)})),Gi=Y("ZodE164",((e,t)=>{on.init(e,t),wi.init(e,t)})),Bi=Y("ZodJWT",((e,t)=>{rn.init(e,t),wi.init(e,t)})),Hi=Y("ZodNumber",((e,t)=>{an.init(e,t),Pi.init(e,t),e.gt=(t,n)=>e.check(Qn(t,n)),e.gte=(t,n)=>e.check(Wn(t,n)),e.min=(t,n)=>e.check(Wn(t,n)),e.lt=(t,n)=>e.check(Vn(t,n)),e.lte=(t,n)=>e.check(Yn(t,n)),e.max=(t,n)=>e.check(Yn(t,n)),e.int=t=>e.check(Yi(t)),e.safe=t=>e.check(Yi(t)),e.positive=t=>e.check(Qn(0,t)),e.nonnegative=t=>e.check(Wn(0,t)),e.negative=t=>e.check(Vn(0,t)),e.nonpositive=t=>e.check(Yn(0,t)),e.multipleOf=(t,n)=>e.check(Jn(t,n)),e.step=(t,n)=>e.check(Jn(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 qi(e){return function(e,t){return new e({type:"number",checks:[],...Me(t)})}(Hi,e)}const Vi=Y("ZodNumberFormat",((e,t)=>{sn.init(e,t),Hi.init(e,t)}));function Yi(e){return function(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Me(t)})}(Vi,e)}const Qi=Y("ZodBoolean",((e,t)=>{cn.init(e,t),Pi.init(e,t)}));const Wi=Y("ZodUnknown",((e,t)=>{un.init(e,t),Pi.init(e,t)}));function Ji(){return new Wi({type:"unknown"})}const Ki=Y("ZodNever",((e,t)=>{dn.init(e,t),Pi.init(e,t)}));function Xi(e){return function(e,t){return new e({type:"never",...Me(t)})}(Ki,e)}const eo=Y("ZodDate",((e,t)=>{ln.init(e,t),Pi.init(e,t),e.min=(t,n)=>e.check(Wn(t,n)),e.max=(t,n)=>e.check(Yn(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 to=Y("ZodArray",((e,t)=>{fn.init(e,t),Pi.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(Xn(t,n)),e.nonempty=t=>e.check(Xn(1,t)),e.max=(t,n)=>e.check(Kn(t,n)),e.length=(t,n)=>e.check(ei(t,n)),e.unwrap=()=>e.element}));function no(e,t){return function(e,t,n){return new e({type:"array",element:t,...Me(n)})}(to,e,t)}const io=Y("ZodObject",((e,t)=>{yn.init(e,t),Pi.init(e,t),Re(e,"shape",(()=>t.shape)),e.keyof=()=>co(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Ji()}),e.loose=()=>e.clone({...e._zod.def,catchall:Ji()}),e.strict=()=>e.clone({...e._zod.def,catchall:Xi()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!Ze(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=Se(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return Ie(this,"shape",n),n},checks:[]});return Le(e,i)}(e,t),e.safeExtend=t=>function(e,t){if(!Ze(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 Ie(this,"shape",n),n},checks:e._zod.def.checks};return Le(e,n)}(e,t),e.merge=t=>function(e,t){const n=Se(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return Ie(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return Le(e,n)}(e,t),e.pick=t=>function(e,t){const n=e._zod.def;return Le(e,Se(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 Ie(this,"shape",e),e},checks:[]}))}(e,t),e.omit=t=>function(e,t){const n=e._zod.def,i=Se(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 Ie(this,"shape",i),i},checks:[]});return Le(e,i)}(e,t),e.partial=(...t)=>function(e,t,n){const i=Se(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 Ie(this,"shape",o),o},checks:[]});return Le(t,i)}(po,e,t[0]),e.required=(...t)=>function(e,t,n){const i=Se(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 Ie(this,"shape",o),o},checks:[]});return Le(t,i)}(yo,e,t[0])}));function oo(e,t){const n={type:"object",get shape(){var t;return Ie(this,"shape",e?(t=e,Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))):{}),this.shape},...Me(t)};return new io(n)}const ro=Y("ZodUnion",((e,t)=>{Pn.init(e,t),Pi.init(e,t),e.options=t.options}));const ao=Y("ZodIntersection",((e,t)=>{bn.init(e,t),Pi.init(e,t)})),so=Y("ZodEnum",((e,t)=>{wn.init(e,t),Pi.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 so({...t,checks:[],...Me(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 so({...t,checks:[],...Me(i),entries:o})}}));function co(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map((e=>[e,e]))):e;return new so({type:"enum",entries:n,...Me(t)})}const uo=Y("ZodTransform",((e,t)=>{En.init(e,t),Pi.init(e,t),e._zod.parse=(n,i)=>{if("backward"===i.direction)throw new W(e.constructor.name);n.addIssue=i=>{if("string"==typeof i)n.issues.push(Qe(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(Qe(t))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then((e=>(n.value=e,n))):(n.value=o,n)}}));function lo(e){return new uo({type:"transform",transform:e})}const po=Y("ZodOptional",((e,t)=>{Tn.init(e,t),Pi.init(e,t),e.unwrap=()=>e._zod.def.innerType}));function fo(e){return new po({type:"optional",innerType:e})}const ho=Y("ZodNullable",((e,t)=>{Cn.init(e,t),Pi.init(e,t),e.unwrap=()=>e._zod.def.innerType}));function mo(e){return new ho({type:"nullable",innerType:e})}const go=Y("ZodDefault",((e,t)=>{Nn.init(e,t),Pi.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap})),vo=Y("ZodPrefault",((e,t)=>{In.init(e,t),Pi.init(e,t),e.unwrap=()=>e._zod.def.innerType})),yo=Y("ZodNonOptional",((e,t)=>{Sn.init(e,t),Pi.init(e,t),e.unwrap=()=>e._zod.def.innerType})),_o=Y("ZodCatch",((e,t)=>{$n.init(e,t),Pi.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap})),Po=Y("ZodPipe",((e,t)=>{xn.init(e,t),Pi.init(e,t),e.in=t.in,e.out=t.out}));function bo(e,t){return new Po({type:"pipe",in:e,out:t})}const ko=Y("ZodReadonly",((e,t)=>{Zn.init(e,t),Pi.init(e,t),e.unwrap=()=>e._zod.def.innerType})),zo=Y("ZodCustom",((e,t)=>{Un.init(e,t),Pi.init(e,t)}));function wo(e,t){return bo(lo(e),t)}function Eo(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 Ao=e=>wo((e=>{if(e){if("string"==typeof e){const t=Number(e);return isNaN(t)?e:t}return e}}),e),To=e=>wo((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),Co=e=>zi().min(1,{error:"Required"}).max(e,`Maximum length is ${e} characters`),No=()=>Ai("Invalid email address").min(1,"Required"),Ro=()=>Ao(qi("Valid amount required").positive("Positive amount required")),Io=()=>To(function(e){return function(e,t){return new e({type:"date",...Me(t)})}(eo,e)}("Valid date required").min(new Date,"Date must be in the future")),So=e=>zi().max(e,`Maximum length is ${e} characters`),Oo=oo({address1:Co(100),address2:So(100).optional(),city:Co(50),state:So(50).optional(),postcode:So(20).optional(),country:Co(50)}),$o=oo({amount:Ro(),message:So(500).nullish(),giverFirstName:Co(50),giverLastName:Co(50),giverEmail:No(),giverPhone:Co(31),giverAddress:Oo,cardHolder:Co(101),recipientFirstName:So(50).nullish(),recipientLastName:So(50).nullish(),recipientEmail:Ai("Invalid email address").nullish(),recipientPhone:So(31).nullish()}),xo=$o.extend({expiry:Io(),notes:So(500).nullish()}),Fo=oo({balance:Ro(),expiry:Io(),message:So(500).nullish(),notes:So(500).nullish(),giverFirstName:Co(50),giverLastName:Co(50),giverEmail:No(),giverPhone:Co(31),cardHolder:Co(101),recipientEmail:Ai("Invalid email address").nullish(),recipientPhone:So(31).nullish()});let Zo;!function(e){e.Passthrough="Passthrough",e.PaymentProcessor="PaymentProcessor"}(Zo||(Zo={}));const Do=oo({companyId:qi().int().positive(),amount:Ro(),currency:Co(3).default("AUD")}),Uo=oo({sessionId:Co(100),resultCode:Co(50),pspReference:So(100).optional()}),jo=oo({cardHolder:Co(100),cardNumberToken:So(200),cardCvcToken:So(200),cardExpiry:So(5)}),Lo=$o.extend({companyId:qi().int().positive(),sendViaEmail:function(e){return function(e,t){return new e({type:"boolean",...Me(t)})}(Qi,e)}().default(!0),payment:Uo.optional(),passthroughPayment:jo.optional()}),Mo=oo({giftCardId:qi().int().positive(),reason:So(500).optional()}),Go=oo({companyId:qi().int().positive().nullish(),code:Co(10),password:Co(10)}),Bo=Go.extend({amount:Ro(),description:Co(200)});let Ho,qo,Vo,Yo,Qo,Wo;!function(e){e.Adyen="Adyen"}(Ho||(Ho={})),function(e){e.Pending="Pending",e.Authorized="Authorized",e.Captured="Captured",e.Failed="Failed",e.Refunded="Refunded"}(qo||(qo={})),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"}(Vo||(Vo={})),function(e){e.AUTHORISATION="AUTHORISATION",e.CAPTURE="CAPTURE",e.REFUND="REFUND",e.CANCELLATION="CANCELLATION",e.REFUND_FAILED="REFUND_FAILED",e.CAPTURE_FAILED="CAPTURE_FAILED"}(Yo||(Yo={})),function(e){e.Purchase="Purchase",e.Redemption="Redemption",e.Adjustment="Adjustment"}(Qo||(Qo={})),function(e){e.Pending="Pending",e.Complete="Complete",e.Cancelled="Cancelled",e.Expired="Expired"}(Wo||(Wo={}));const Jo=oo({code:Co(10),token:Co(128)}),Ko=oo({companyId:qi().int().positive(),code:Co(10),token:Co(128)}),Xo=oo({companyId:(er=Hi,new er({type:"number",coerce:!0,checks:[],...Me(void 0)})).int().positive()});var er;const tr=oo({giftCardPaymentType:co([Zo.Passthrough,Zo.PaymentProcessor])}),nr=oo({merchantAccount:Co(100),clientKey:Co(100),apiKey:So(200).optional(),webhookHmacKey:So(200).optional()}),ir=oo({grant_type:zi().readonly().default("refresh_token"),client_id:qn(Ci,void 0),client_secret:zi(),refresh_token:zi(),scope:zi().optional()}),or=oo({email:Ai(),firstName:zi().max(100).optional(),lastName:zi().max(100).optional(),phone:zi().max(20).optional(),scopes:no(zi()).optional()});let rr;!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"}(rr||(rr={}));const ar=[rr.PER_NIGHT,rr.PER_PERSON_PER_NIGHT,rr.PER_QUANTITY_NAME_PER_NIGHT,rr.PER_ROOM_QUANTITY_PER_NIGHT,rr.PER_PERSON_OCCUPANCY_PER_NIGHT,rr.PER_ADULT_OCCUPANCY_PER_NIGHT,rr.PER_CHILD_OCCUPANCY_PER_NIGHT,rr.PER_ALL_PERSONS_PER_NIGHT];let sr,cr,ur;!function(e){e.Critical="Critical",e.Error="Error",e.Warn="Warn",e.Info="Info"}(sr||(sr={})),function(e){e.Debug="Diagnostics",e.Security="Security",e.Audit="Audit"}(cr||(cr={})),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"}(ur||(ur={}));const dr=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},lr=require("decimal.js");var pr=e.n(lr);const fr={UP:pr().ROUND_UP,DOWN:pr().ROUND_DOWN,CEIL:pr().ROUND_CEIL,FLOOR:pr().ROUND_FLOOR,HALF_UP:pr().ROUND_HALF_UP,HALF_DOWN:pr().ROUND_HALF_DOWN,HALF_EVEN:pr().ROUND_HALF_EVEN,HALF_CEIL:pr().ROUND_HALF_CEIL,HALF_FLOOR:pr().ROUND_HALF_FLOOR},hr=(e,t)=>{const{precision:n=2,rounding:i=fr.HALF_UP}=t||{};return new(pr())(e).toDecimalPlaces(n,i).toNumber()};function mr(e,t={}){const{baseAmount:n=0,numberOfNights:i=1,feeIncludedInBaseAmount:o=!1,extractedFromRates:r=!1,removedPercentages:a=[]}=t,s=hr(n);switch(e.feeType){case j.PercentageOfBooking:if(o)return hr(s*e.amount/(100+e.amount));if(r){const t=a.reduce(((e,t)=>e+t/(100+t)),0);return hr(s/(1-t)*e.amount/(100+e.amount))}return hr(s*(e.amount/100));case j.FixedChargePerRoom:case j.FixedChargePerBooking:return e.amount;case j.NightlyChargePerRoom:return hr(e.amount*i);default:return 0}}const gr=[j.FixedChargePerBooking],vr=[j.PercentageOfBooking,j.FixedChargePerRoom,j.NightlyChargePerRoom],yr=[j.PercentageOfBooking];function _r(e,t){return e.filter((e=>t.includes(e.feeType)))}function Pr(e){return _r(e,gr)}function br(e){return _r(e,vr)}function kr(e){return _r(e,yr)}function zr(e){return{includeInRates:[j.PercentageOfBooking,j.NightlyChargePerRoom].includes(e),extractFeeFromRates:e===j.PercentageOfBooking,appliesToAddons:e===j.PercentageOfBooking,includePreviousFeesInCalculation:e===j.PercentageOfBooking}}const wr=e=>e,Er=(e,t)=>{const n={};return t.forEach((t=>{t in e&&(n[t]=e[t])})),n},Ar=(e,t)=>e.includes("cdn.app.roomstay.io")?e+"?w="+t:e;class Tr{}function Cr(e){return e.toUpperCase()}Tr.calculateBaseAddonTotal=(e,t)=>{let n=0,i=0,o=0;e.price&&e.quantity&&(n=e.quantity*Number(e.price)),e.pricingType===rr.PER_ADULT_OCCUPANCY_PER_NIGHT&&e.adultQuantity?n*=e.adultQuantity:e.pricingType===rr.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 ar.includes(e.pricingType)&&e.nights&&!t&&(r*=e.nights),{indPrice:n,indAdultPrice:i,indChildPrice:o,addonTotal:r}},Tr.calculateBasketAddonTotal=(e,t=!1)=>(Array.isArray(e)||(e=[e]),e.reduce(((e,n)=>{const i=Tr.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))),ar.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})),Tr.calculateReservationAddonTotal=(e,t=!1)=>(Array.isArray(e)||(e=[e]),e.reduce(((e,n)=>{const i=Tr.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})),Tr.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+=Tr.calculateReservationAddonTotal(o,t)?.total}})),hr(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;
@@ -82,4 +82,3 @@ export type ReservationDTO = {
82
82
  };
83
83
  fees?: number;
84
84
  };
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
+ };
@@ -99,8 +99,16 @@ export type IPaymentCheckoutDetails = {
99
99
  successUrl: string;
100
100
  currencyCode: string;
101
101
  };
102
+ windcave?: {
103
+ links: {
104
+ href: string;
105
+ rel: string;
106
+ method: string;
107
+ }[];
108
+ successUrl: string;
109
+ useTesting: boolean;
110
+ };
102
111
  isSplitPayment?: boolean;
103
112
  totalAuthorizedAmount?: number;
104
113
  };
105
114
  export {};
106
- //# sourceMappingURL=IBookingPayment.type.d.ts.map
@@ -28,4 +28,3 @@ export type IBookingQuoteResponse = {
28
28
  quoteId: number;
29
29
  }[];
30
30
  } | null;
31
- //# sourceMappingURL=IBookingQuote.type.d.ts.map
@@ -0,0 +1,5 @@
1
+ export declare enum IBookingStatus {
2
+ Pending = "Pending",
3
+ Committed = "Committed",
4
+ Cancelled = "Cancelled"
5
+ }