@roomstay/core 0.1.74 → 0.1.75-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node.js +1 -1
- package/dist/types/Addon/Addon.enum.d.ts +14 -0
- package/dist/types/Addon/Addon.type.d.ts +24 -0
- package/dist/types/Availability/Availability.types.d.ts +1 -0
- package/dist/types/Booking/IBookingPayment.type.d.ts +8 -1
- package/dist/types/GiftCards/GiftCard.types.d.ts +89 -2
- package/dist/types/GiftCards/GiftCardLogs.enum.d.ts +1 -1
- package/dist/types/Maintenance/IMaintenanceStatus.type.d.ts +4 -1
- package/dist/types/Policies/EGuaranteePolicy.enum.d.ts +5 -0
- package/dist/types/index.d.ts +12 -2
- package/dist/utils/roundMoney.d.ts +11 -1
- package/dist/web.js +1 -1
- package/package.json +1 -1
- package/dist/node.js.LICENSE.txt +0 -7
- package/dist/node.js.map +0 -1
- package/dist/types/Booking/IBookingCreateErrorResponse.d.ts +0 -11
- package/dist/types/Booking/IBookingStatus.type.d.ts +0 -5
- package/dist/types/Booking/IPrice.type.d.ts +0 -7
- package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +0 -15
- package/dist/types/components/DateRangePicker/DateRangePicker.type.d.ts +0 -8
- package/dist/types/components/DateRangePicker/DateRangePickerContext.d.ts +0 -16
- package/dist/types/components/DateRangePicker/DateRangePickerDay.d.ts +0 -22
- package/dist/types/components/DateRangePicker/DateRangePickerDays.d.ts +0 -7
- package/dist/types/components/DateRangePicker/DateRangePickerMonth.d.ts +0 -8
- package/dist/types/components/DateRangePicker/FloatingDateRangePicker.d.ts +0 -25
- package/dist/types/components/DateRangePicker/index.d.ts +0 -3
- package/dist/types/components/Icon/Icon.d.ts +0 -88
- package/dist/types/components/Icon/index.d.ts +0 -1
- package/dist/types/components/Overlay/Overlay.d.ts +0 -20
- package/dist/types/components/Overlay/index.d.ts +0 -1
- package/dist/types/components/Portal/Portal.d.ts +0 -7
- package/dist/types/components/Portal/index.d.ts +0 -1
- package/dist/types/components/Text/Text.d.ts +0 -15
- package/dist/types/components/Text/Text.type.d.ts +0 -14
- package/dist/types/components/Text/index.d.ts +0 -2
- package/dist/types/components/animations/Fade.d.ts +0 -13
- package/dist/types/components/animations/index.d.ts +0 -1
- package/dist/types/components/index.d.ts +0 -6
- package/dist/types/hooks/BodyClickHook.d.ts +0 -8
- package/dist/types/hooks/index.d.ts +0 -1
- package/dist/types/index.node.d.ts +0 -2
- package/dist/types/index.web.d.ts +0 -4
- package/dist/types/models/Client/Hotel/WeekdayStartsOn.types.d.ts +0 -4
- package/dist/types/models/Client/Hotel/index.d.ts +0 -1
- package/dist/types/models/Client/index.d.ts +0 -1
- package/dist/types/models/index.d.ts +0 -1
- package/dist/types/stories/DateRangePicker.stories.d.ts +0 -8
- package/dist/types/stories/FloatingDateRangePicker.stories.d.ts +0 -5
- package/dist/types/types/Booking/IBookingCreateErrorResponse.d.ts +0 -11
- package/dist/types/types/Booking/IBookingPayment.type.d.ts +0 -42
- package/dist/types/types/Booking/IBookingQuote.type.d.ts +0 -29
- package/dist/types/types/Booking/IBookingStatus.type.d.ts +0 -5
- package/dist/types/types/Booking/IPrice.type.d.ts +0 -7
- package/dist/types/types/Company/ECompanyProvider.enum.d.ts +0 -6
- package/dist/types/types/Company/IAdminCompany.type.d.ts +0 -31
- package/dist/types/types/Events/IRoomstayEvent.type.d.ts +0 -48
- package/dist/types/types/Hotel/EHotelPriceModel.enum.d.ts +0 -5
- package/dist/types/types/Hotel/EHotelWeekdayStartsOn.enum.d.ts +0 -4
- package/dist/types/types/Hotel/IAuxiliaryFilter.type.d.ts +0 -20
- package/dist/types/types/Hotel/IHotelColorScheme.type.d.ts +0 -11
- package/dist/types/types/Hotel/IHotelOverrides.type.d.ts +0 -18
- package/dist/types/types/Hotel/IHotelReplica.type.d.ts +0 -53
- package/dist/types/types/Hotel/IHotelService.type.d.ts +0 -6
- package/dist/types/types/Image/IRoomstayImage.type.d.ts +0 -8
- package/dist/types/types/Member/IRoomstayCognitoMember.type.d.ts +0 -4
- package/dist/types/types/Member/IRoomstayMember.type.d.ts +0 -17
- package/dist/types/types/Member/IRoomstayMemberBooking.type.d.ts +0 -28
- package/dist/types/types/Member/IRoomstayMemberBookingAddress.type.d.ts +0 -9
- package/dist/types/types/Member/IRoomstayMemberBookingItem.type.d.ts +0 -25
- package/dist/types/types/Member/IRoomstayMemberBookingProfile.type.d.ts +0 -11
- package/dist/types/types/Member/IRoomstayMemberCards.type.d.ts +0 -12
- package/dist/types/types/Member/ISession.type.d.ts +0 -4
- package/dist/types/types/Policies/EGuaranteePolicy.enum.d.ts +0 -5
- package/dist/types/types/RMS/ERMSDiscountType.enum.d.ts +0 -5
- package/dist/types/types/RMS/IRMSPropertyDiscount.type.d.ts +0 -28
- package/dist/types/types/RMS/IRMSRequirement.type.d.ts +0 -19
- package/dist/types/types/Room/IRoomGroup.type.d.ts +0 -11
- package/dist/types/types/index.d.ts +0 -56
- package/dist/types/utils/bookingTotal.d.ts +0 -7
- package/dist/types/utils/calendarHelper.d.ts +0 -16
- package/dist/types/utils/color.d.ts +0 -20
- package/dist/types/utils/index.node.d.ts +0 -2
- package/dist/types/utils/index.web.d.ts +0 -4
- package/dist/types/utils/roomstayImageResize.d.ts +0 -14
- package/dist/types/utils/uppercaseString.d.ts +0 -1
- package/dist/web.js.LICENSE.txt +0 -7
- package/dist/web.js.map +0 -1
package/dist/node.js
CHANGED
|
@@ -1 +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;e.r(t),e.d(t,{ADDON_PER_NIGHT_TYPES:()=>$,AddGiftCardSchema:()=>Po,BaseGiftCardSchema:()=>_o,CancelGiftCardTransactionSchema:()=>Io,CompleteGiftCardTransactionSchema:()=>Ao,DATE_FORMAT:()=>C,EAddonPricingType:()=>R,EAdminCompanyUserRole:()=>p,EBookingFlow:()=>i,EBookingPaymentMethod:()=>o,EBookingStatus:()=>n,ECompanyProvider:()=>l,EDistanceUnitType:()=>y,EFeeType:()=>S,EGiftCardTransactionType:()=>Eo,EGuaranteePolicyDepositMode:()=>w,EHotelCardProcessor:()=>r,EHotelPriceModel:()=>f,EHotelStateFieldConfiguration:()=>h,EHotelWeekdayStartsOn:()=>m,EIntegration:()=>g,ELogCategory:()=>Ro,ELogSeverity:()=>So,ELogType:()=>$o,EPlanpayBookingStatus:()=>a,EPromoCodeDiscountType:()=>E,ERMSAuthSyncHistoryStatus:()=>z,ERMSDiscountType:()=>_,ERMSSyncStrategy:()=>P,ERoomstayEventSource:()=>T,ERoomstayImageSize:()=>b,ETransactionStatus:()=>To,EditGiftCardSchema:()=>zo,GuestProfile:()=>d,HttpMethod:()=>A,IAuxiliaryFilterType:()=>v,IMaintenanceStatusService:()=>k,InternationalAddressSchema:()=>yo,ItineraryResponse:()=>c,PCIBookingCardProcessorTypes:()=>s,Package:()=>I,PurchaseGiftCardSchema:()=>bo,RedeemGiftCardSchema:()=>wo,RefreshGiftCardTokenSchema:()=>No,RegisterGiftCardAdminSchema:()=>Co,Reservation:()=>u,ReservedPackage:()=>N,TotalCalculator:()=>Wo,ValidateGiftCardSchema:()=>ko,calculateFeeAmount:()=>Do,calculateTotalForMemberBooking:()=>Oo,getFeeOptionValidity:()=>Vo,getFilteredBookingAddonFees:()=>Ho,getFilteredBookingFees:()=>Lo,getFilteredBookingRateFees:()=>Bo,maxString:()=>vo,nameof:()=>Qo,preprocessDate:()=>po,preprocessNumber:()=>lo,requireEmail:()=>ho,requireFutureDate:()=>go,requirePositiveAmount:()=>mo,requireString:()=>fo,resizeRoomstayImageUrl:()=>Yo,roundMoney:()=>Fo,subset:()=>qo,uppercaseString:()=>Jo,validateFormWithZod:()=>uo}),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.Card="Card",e.SavedCard="SavedCard",e.Planpay="Planpay",e.Adyen="Adyen",e.Afterpay="Afterpay",e.PCIBookingCard="PCIBookingCard",e.TrueRewards="TrueRewards"}(o||(o={})),function(e){e.Passthrough="Passthrough",e.Adyen="Adyen",e.Till="Till",e.RMSPay="RMSPay",e.Windcave="Windcave",e.Mastercard="Mastercard",e.Stripe="Stripe"}(r||(r={})),function(e){e.Unknown="unknown",e.Unpaid="unpaid",e.Accepted="accepted",e.Cancelled="cancelled",e.Refunded="refunded",e.Rejected="rejected"}(a||(a={}));const s=[];class c{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 u{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 d,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 d{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 l,p,f,h,m,g,v,y,_,P,z,b,k,w,E,T,A;!function(e){e.Synxis="Synxis",e.Availpro="Availpro",e.RMS="RMS",e.Siteminder="Siteminder",e.Roomstay="Roomstay",e.OHIP="OHIP"}(l||(l={})),function(e){e.SuperAdmin="SuperAdmin",e.Admin="Admin",e.Limited="Limited"}(p||(p={})),function(e){e.PerPerson="PerPerson",e.PerDay="PerDay",e.PerOccupancy="PerOccupancy"}(f||(f={})),function(e){e.NotIncluded="NotIncluded",e.Optional="Optional",e.Required="Required"}(h||(h={})),function(e){e.Monday="monday",e.Sunday="sunday"}(m||(m={})),function(e){e.Big4="Big4",e.RmsTop10="Top10",e.Top10="NewTop10",e.Gday="Gday",e.Salesforce="Salesforce",e.RAC="RAC"}(g||(g={})),function(e){e.AreaDwellingLength="AreaDwellingLength",e.AreaDwellingType="AreaDwellingType"}(v||(v={})),function(e){e.Metric="metric",e.Imperial="imperial"}(y||(y={})),function(e){e.Percentage="Percentage",e.Amount="Amount",e.Bogo="BOGO",e.NightlyRateOverride="NightlyRateOverride"}(_||(_={})),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.NewRateFetch="newRateFetch"}(P||(P={})),function(e){e.Success="success",e.Failure="failure",e.New="new",e.Queued="queued",e.InProgress="in_progress",e.RequireResume="require_resume"}(z||(z={})),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"}(b||(b={})),function(e){e.Frontend="frontend",e.Hotel="hotel",e.Events="events"}(k||(k={}));class I{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 N extends I{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"}(w||(w={})),function(e){e.FlatPercent="flatPercent",e.FlatQuantity="flatQuantity",e.FlatQuantityPerStay="flatQuantityPerStay"}(E||(E={})),function(e){e.Eventbrite="eventbrite",e.ATDW="atdw"}(T||(T={})),function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e.PATCH="PATCH",e.OPTIONS="OPTIONS",e.HEAD="HEAD"}(A||(A={}));const C="DD/MM/YYYY";let S,R;!function(e){e.PercentageOfBooking="PercentageOfBooking",e.FixedChargePerRoom="FixedChargePerRoom",e.NightlyChargePerRoom="NightlyChargePerRoom",e.FixedChargePerBooking="FixedChargePerBooking",e.DepositSurcharge="DepositSurcharge"}(S||(S={})),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"}(R||(R={}));const $=[R.PER_NIGHT,R.PER_PERSON_PER_NIGHT,R.PER_QUANTITY_NAME_PER_NIGHT,R.PER_ROOM_QUANTITY_PER_NIGHT,R.PER_PERSON_OCCUPANCY_PER_NIGHT,R.PER_ADULT_OCCUPANCY_PER_NIGHT,R.PER_CHILD_OCCUPANCY_PER_NIGHT,R.PER_ALL_PERSONS_PER_NIGHT];function O(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 x extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Z extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const F={};function D(e){return e&&Object.assign(F,e),F}const j=/^[cC][^\s-]{8,}$/,U=/^[0-9a-z]+$/,M=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,G=/^[0-9a-vA-V]{20}$/,L=/^[A-Za-z0-9]{27}$/,B=/^[a-zA-Z0-9_-]{21}$/,H=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,V=/^([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})$/,Q=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)$/,q=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Y=/^(?:(?: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])$/,W=/^(([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})$/,J=/^((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])$/,K=/^(([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])$/,X=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ee=/^[A-Za-z0-9_-]*$/,te=/^(?=.{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])?)*\.?$/,ne=/^\+(?:[0-9]){6,14}[0-9]$/,ie="(?:(?:\\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])))",oe=new RegExp(`^${ie}$`);function re(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 ae=/^\d+$/,se=/^-?\d+(?:\.\d+)?/i,ce=/true|false/i,ue=/^[^A-Z]*$/,de=/^[^a-z]*$/;function le(e,t){return"bigint"==typeof t?t.toString():t}function pe(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function fe(e){return null==e}function he(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const me=Symbol("evaluating");function ge(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==me)return void 0===i&&(i=me,i=n()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function ve(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ye(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function _e(e){return JSON.stringify(e)}const Pe="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ze(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const be=pe((()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}}));function ke(e){if(!1===ze(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!1!==ze(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function we(e){return ke(e)?{...e}:e}const Ee=new Set(["string","number","symbol"]);function Te(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ae(e,t,n){const i=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(i._zod.parent=e),i}function Ie(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 Ne={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 Ce(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 Se(e,t){return t.map((t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t}))}function Re(e){return"string"==typeof e?e:e?.message}function $e(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const o=Re(e.inst?._zod.def?.error?.(e))??Re(t?.error?.(e))??Re(n.customError?.(e))??Re(n.localeError?.(e))??"Invalid input";i.message=o}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function Oe(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function xe(...e){const[t,n,i]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:i}:{...t}}const Ze=O("$ZodCheck",((e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])})),Fe={number:"number",bigint:"bigint",object:"date"},De=O("$ZodCheckLessThan",((e,t)=>{Ze.init(e,t);const n=Fe[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})}})),je=O("$ZodCheckGreaterThan",((e,t)=>{Ze.init(e,t);const n=Fe[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})}})),Ue=O("$ZodCheckMultipleOf",((e,t)=>{Ze.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})}})),Me=O("$ZodCheckNumberFormat",((e,t)=>{Ze.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),i=n?"int":"number",[o,r]=Ne[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=ae)})),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})}})),Ge=O("$ZodCheckMaxLength",((e,t)=>{var n;Ze.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!fe(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=Oe(i);n.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}})),Le=O("$ZodCheckMinLength",((e,t)=>{var n;Ze.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!fe(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=Oe(i);n.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}})),Be=O("$ZodCheckLengthEquals",((e,t)=>{var n;Ze.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!fe(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=Oe(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})}})),He=O("$ZodCheckStringFormat",((e,t)=>{var n,i;Ze.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=()=>{})})),Ve=O("$ZodCheckRegex",((e,t)=>{He.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})}})),Qe=O("$ZodCheckLowerCase",((e,t)=>{t.pattern??(t.pattern=ue),He.init(e,t)})),qe=O("$ZodCheckUpperCase",((e,t)=>{t.pattern??(t.pattern=de),He.init(e,t)})),Ye=O("$ZodCheckIncludes",((e,t)=>{Ze.init(e,t);const n=Te(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})}})),We=O("$ZodCheckStartsWith",((e,t)=>{Ze.init(e,t);const n=new RegExp(`^${Te(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})}})),Je=O("$ZodCheckEndsWith",((e,t)=>{Ze.init(e,t);const n=new RegExp(`.*${Te(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})}})),Ke=O("$ZodCheckOverwrite",((e,t)=>{Ze.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}));class Xe{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 et=(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,le,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},tt=O("$ZodError",et),nt=O("$ZodError",et,{Parent:Error}),it=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 x;if(a.issues.length){const t=new(o?.Err??e)(a.issues.map((e=>$e(e,r,D()))));throw Pe(t,o?.callee),t}return a.value},ot=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=>$e(e,r,D()))));throw Pe(t,o?.callee),t}return a.value},rt=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 x;return r.issues.length?{success:!1,error:new(e??tt)(r.issues.map((e=>$e(e,o,D()))))}:{success:!0,data:r.value}},at=rt(nt),st=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=>$e(e,o,D()))))}:{success:!0,data:r.value}},ct=st(nt),ut=e=>(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return it(e)(t,n,o)},dt=e=>(t,n,i)=>it(e)(t,n,i),lt=e=>async(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return ot(e)(t,n,o)},pt=e=>async(t,n,i)=>ot(e)(t,n,i),ft=e=>(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return rt(e)(t,n,o)},ht=e=>(t,n,i)=>rt(e)(t,n,i),mt=e=>async(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return st(e)(t,n,o)},gt=e=>async(t,n,i)=>st(e)(t,n,i),vt={major:4,minor:1,patch:5},yt=O("$ZodType",((e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=vt;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=Ce(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 x;if(i||a instanceof Promise)i=(i??Promise.resolve()).then((async()=>{await a,e.issues.length!==t&&(o||(o=Ce(e,t)))}));else{if(e.issues.length===t)continue;o||(o=Ce(e,t))}}return i?i.then((()=>e)):e},n=(n,o,r)=>{if(Ce(n))return n.aborted=!0,n;const a=t(o,i,r);if(a instanceof Promise){if(!1===r.async)throw new x;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 x;return a.then((e=>t(e,i,r)))}return t(a,i,r)}}e["~standard"]={validate:t=>{try{const n=at(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return ct(e,t).then((e=>e.success?{value:e.data}:{issues:e.error?.issues}))}},vendor:"zod",version:1}})),_t=O("$ZodString",((e,t)=>{var n;yt.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}})),Pt=O("$ZodStringFormat",((e,t)=>{He.init(e,t),_t.init(e,t)})),zt=O("$ZodGUID",((e,t)=>{t.pattern??(t.pattern=V),Pt.init(e,t)})),bt=O("$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=Q(e))}else t.pattern??(t.pattern=Q());Pt.init(e,t)})),kt=O("$ZodEmail",((e,t)=>{t.pattern??(t.pattern=q),Pt.init(e,t)})),wt=O("$ZodURL",((e,t)=>{Pt.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:te.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})}}})),Et=O("$ZodEmoji",((e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Pt.init(e,t)})),Tt=O("$ZodNanoID",((e,t)=>{t.pattern??(t.pattern=B),Pt.init(e,t)})),At=O("$ZodCUID",((e,t)=>{t.pattern??(t.pattern=j),Pt.init(e,t)})),It=O("$ZodCUID2",((e,t)=>{t.pattern??(t.pattern=U),Pt.init(e,t)})),Nt=O("$ZodULID",((e,t)=>{t.pattern??(t.pattern=M),Pt.init(e,t)})),Ct=O("$ZodXID",((e,t)=>{t.pattern??(t.pattern=G),Pt.init(e,t)})),St=O("$ZodKSUID",((e,t)=>{t.pattern??(t.pattern=L),Pt.init(e,t)})),Rt=O("$ZodISODateTime",((e,t)=>{t.pattern??(t.pattern=function(e){const t=re({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(`^${ie}T(?:${i})$`)}(t)),Pt.init(e,t)})),$t=O("$ZodISODate",((e,t)=>{t.pattern??(t.pattern=oe),Pt.init(e,t)})),Ot=O("$ZodISOTime",((e,t)=>{t.pattern??(t.pattern=new RegExp(`^${re(t)}$`)),Pt.init(e,t)})),xt=O("$ZodISODuration",((e,t)=>{t.pattern??(t.pattern=H),Pt.init(e,t)})),Zt=O("$ZodIPv4",((e,t)=>{t.pattern??(t.pattern=Y),Pt.init(e,t),e._zod.onattach.push((e=>{e._zod.bag.format="ipv4"}))})),Ft=O("$ZodIPv6",((e,t)=>{t.pattern??(t.pattern=W),Pt.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})}}})),Dt=O("$ZodCIDRv4",((e,t)=>{t.pattern??(t.pattern=J),Pt.init(e,t)})),jt=O("$ZodCIDRv6",((e,t)=>{t.pattern??(t.pattern=K),Pt.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 Ut(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Mt=O("$ZodBase64",((e,t)=>{t.pattern??(t.pattern=X),Pt.init(e,t),e._zod.onattach.push((e=>{e._zod.bag.contentEncoding="base64"})),e._zod.check=n=>{Ut(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}})),Gt=O("$ZodBase64URL",((e,t)=>{t.pattern??(t.pattern=ee),Pt.init(e,t),e._zod.onattach.push((e=>{e._zod.bag.contentEncoding="base64url"})),e._zod.check=n=>{(function(e){if(!ee.test(e))return!1;const t=e.replace(/[-_]/g,(e=>"-"===e?"+":"/"));return Ut(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})}})),Lt=O("$ZodE164",((e,t)=>{t.pattern??(t.pattern=ne),Pt.init(e,t)})),Bt=O("$ZodJWT",((e,t)=>{Pt.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})}})),Ht=O("$ZodNumber",((e,t)=>{yt.init(e,t),e._zod.pattern=e._zod.bag.pattern??se,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}})),Vt=O("$ZodNumber",((e,t)=>{Me.init(e,t),Ht.init(e,t)})),Qt=O("$ZodBoolean",((e,t)=>{yt.init(e,t),e._zod.pattern=ce,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}})),qt=O("$ZodUnknown",((e,t)=>{yt.init(e,t),e._zod.parse=e=>e})),Yt=O("$ZodNever",((e,t)=>{yt.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)})),Wt=O("$ZodDate",((e,t)=>{yt.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 Jt(e,t,n){e.issues.length&&t.issues.push(...Se(n,e.issues)),t.value[n]=e.value}const Kt=O("$ZodArray",((e,t)=>{yt.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=>Jt(t,n,e)))):Jt(s,n,e)}return r.length?Promise.all(r).then((()=>n)):n}}));function Xt(e,t,n,i){e.issues.length&&t.issues.push(...Se(n,e.issues)),void 0===e.value?n in i&&(t.value[n]=void 0):t.value[n]=e.value}function en(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 tn(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=>Xt(e,n,o,t)))):Xt(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 nn=O("$ZodObject",((e,t)=>{yt.init(e,t);const n=pe((()=>en(t)));ge(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=ze,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=>Xt(n,t,e,s)))):Xt(n,t,e,s)}return o?tn(c,s,t,a,n.value,e):c.length?Promise.all(c).then((()=>t)):t}})),on=O("$ZodObjectJIT",((e,t)=>{nn.init(e,t);const n=e._zod.parse,i=pe((()=>en(t)));let o;const r=ze,a=!F.jitless,s=a&&be.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 Xe(["shape","payload","ctx"]),n=i.value,o=e=>{const t=_e(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=_e(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?tn([],p,d,l,u,e):d):n(d,l):(d.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),d)}}));function rn(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=>!Ce(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=>$e(e,i,D())))))}),t)}const an=O("$ZodUnion",((e,t)=>{yt.init(e,t),ge(e._zod,"optin",(()=>t.options.some((e=>"optional"===e._zod.optin))?"optional":void 0)),ge(e._zod,"optout",(()=>t.options.some((e=>"optional"===e._zod.optout))?"optional":void 0)),ge(e._zod,"values",(()=>{if(t.options.every((e=>e._zod.values)))return new Set(t.options.flatMap((e=>Array.from(e._zod.values))))})),ge(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=>he(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=>rn(t,o,e,r))):rn(s,o,e,r)}})),sn=O("$ZodIntersection",((e,t)=>{yt.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])=>un(e,t,n))):un(e,o,r)}}));function cn(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(ke(e)&&ke(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=cn(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=cn(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 un(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),Ce(e))return e;const i=cn(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 dn=O("$ZodEnum",((e,t)=>{yt.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=>Ee.has(typeof e))).map((e=>"string"==typeof e?Te(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}})),ln=O("$ZodTransform",((e,t)=>{yt.init(e,t),e._zod.parse=(n,i)=>{if("backward"===i.direction)throw new Z(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 x;return n.value=o,n}}));function pn(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const fn=O("$ZodOptional",((e,t)=>{yt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ge(e._zod,"values",(()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0)),ge(e._zod,"pattern",(()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${he(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=>pn(t,e.value))):pn(i,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}})),hn=O("$ZodNullable",((e,t)=>{yt.init(e,t),ge(e._zod,"optin",(()=>t.innerType._zod.optin)),ge(e._zod,"optout",(()=>t.innerType._zod.optout)),ge(e._zod,"pattern",(()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${he(e.source)}|null)$`):void 0})),ge(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)})),mn=O("$ZodDefault",((e,t)=>{yt.init(e,t),e._zod.optin="optional",ge(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=>gn(e,t))):gn(i,t)}}));function gn(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const vn=O("$ZodPrefault",((e,t)=>{yt.init(e,t),e._zod.optin="optional",ge(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))})),yn=O("$ZodNonOptional",((e,t)=>{yt.init(e,t),ge(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=>_n(t,e))):_n(o,e)}}));function _n(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 Pn=O("$ZodCatch",((e,t)=>{yt.init(e,t),ge(e._zod,"optin",(()=>t.innerType._zod.optin)),ge(e._zod,"optout",(()=>t.innerType._zod.optout)),ge(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=>$e(e,n,D())))},input:e.value}),e.issues=[]),e))):(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map((e=>$e(e,n,D())))},input:e.value}),e.issues=[]),e)}})),zn=O("$ZodPipe",((e,t)=>{yt.init(e,t),ge(e._zod,"values",(()=>t.in._zod.values)),ge(e._zod,"optin",(()=>t.in._zod.optin)),ge(e._zod,"optout",(()=>t.out._zod.optout)),ge(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=>bn(e,t.in,n))):bn(i,t.in,n)}const i=t.in._zod.run(e,n);return i instanceof Promise?i.then((e=>bn(e,t.out,n))):bn(i,t.out,n)}}));function bn(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const kn=O("$ZodReadonly",((e,t)=>{yt.init(e,t),ge(e._zod,"propValues",(()=>t.innerType._zod.propValues)),ge(e._zod,"values",(()=>t.innerType._zod.values)),ge(e._zod,"optin",(()=>t.innerType._zod.optin)),ge(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(wn):wn(i)}}));function wn(e){return e.value=Object.freeze(e.value),e}const En=O("$ZodCustom",((e,t)=>{Ze.init(e,t),yt.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=>Tn(t,n,i,e)));Tn(o,n,i,e)}}));function Tn(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(xe(e))}}Symbol("ZodOutput"),Symbol("ZodInput");class An{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 In(){return new An}const Nn=In();function Cn(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ie(t)})}function Sn(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ie(t)})}function Rn(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ie(t)})}function $n(e,t){return new De({check:"less_than",...Ie(t),value:e,inclusive:!1})}function On(e,t){return new De({check:"less_than",...Ie(t),value:e,inclusive:!0})}function xn(e,t){return new je({check:"greater_than",...Ie(t),value:e,inclusive:!1})}function Zn(e,t){return new je({check:"greater_than",...Ie(t),value:e,inclusive:!0})}function Fn(e,t){return new Ue({check:"multiple_of",...Ie(t),value:e})}function Dn(e,t){return new Ge({check:"max_length",...Ie(t),maximum:e})}function jn(e,t){return new Le({check:"min_length",...Ie(t),minimum:e})}function Un(e,t){return new Be({check:"length_equals",...Ie(t),length:e})}function Mn(e){return new Ke({check:"overwrite",tx:e})}const Gn=O("ZodISODateTime",((e,t)=>{Rt.init(e,t),di.init(e,t)}));const Ln=O("ZodISODate",((e,t)=>{$t.init(e,t),di.init(e,t)}));const Bn=O("ZodISOTime",((e,t)=>{Ot.init(e,t),di.init(e,t)}));const Hn=O("ZodISODuration",((e,t)=>{xt.init(e,t),di.init(e,t)}));const Vn=(e,t)=>{tt.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,le,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,le,2)}},isEmpty:{get:()=>0===e.issues.length}})},Qn=(O("ZodError",Vn),O("ZodError",Vn,{Parent:Error})),qn=it(Qn),Yn=ot(Qn),Wn=rt(Qn),Jn=st(Qn),Kn=ut(Qn),Xn=dt(Qn),ei=lt(Qn),ti=pt(Qn),ni=ft(Qn),ii=ht(Qn),oi=mt(Qn),ri=gt(Qn),ai=O("ZodType",((e,t)=>(yt.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)=>Ae(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>qn(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Wn(e,t,n),e.parseAsync=async(t,n)=>Yn(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Jn(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Kn(e,t,n),e.decode=(t,n)=>Xn(e,t,n),e.encodeAsync=async(t,n)=>ei(e,t,n),e.decodeAsync=async(t,n)=>ti(e,t,n),e.safeEncode=(t,n)=>ni(e,t,n),e.safeDecode=(t,n)=>ii(e,t,n),e.safeEncodeAsync=async(t,n)=>oi(e,t,n),e.safeDecodeAsync=async(t,n)=>ri(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,...Ie(n)})}(so,e,t)}(t,n)),e.superRefine=t=>e.check(function(e){const t=function(e,t){const n=new Ze({check:"custom",...Ie(void 0)});return n._zod.check=e,n}((n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(xe(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(xe(i))}},e(n.value,n))));return t}(t)),e.overwrite=t=>e.check(Mn(t)),e.optional=()=>Ji(e),e.nullable=()=>Xi(e),e.nullish=()=>Ji(Xi(e)),e.nonoptional=t=>function(e,t){return new no({type:"nonoptional",innerType:e,...Ie(t)})}(e,t),e.array=()=>Gi(e),e.or=t=>function(e,t){return new Hi({type:"union",options:e,...Ie(t)})}([e,t]),e.and=t=>new Vi({type:"intersection",left:e,right:t}),e.transform=t=>ro(e,Yi(t)),e.default=t=>{return n=t,new eo({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():we(n)}});var n},e.prefault=t=>{return n=t,new to({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():we(n)}});var n},e.catch=t=>{return new io({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>ro(e,t),e.readonly=()=>new ao({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return Nn.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>Nn.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return Nn.get(e);const n=e.clone();return Nn.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e))),si=O("_ZodString",((e,t)=>{_t.init(e,t),ai.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 Ve({check:"string_format",format:"regex",...Ie(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new Ye({check:"string_format",format:"includes",...Ie(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new We({check:"string_format",format:"starts_with",...Ie(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new Je({check:"string_format",format:"ends_with",...Ie(t),suffix:e})}(...t)),e.min=(...t)=>e.check(jn(...t)),e.max=(...t)=>e.check(Dn(...t)),e.length=(...t)=>e.check(Un(...t)),e.nonempty=(...t)=>e.check(jn(1,...t)),e.lowercase=t=>e.check(function(e){return new Qe({check:"string_format",format:"lowercase",...Ie(e)})}(t)),e.uppercase=t=>e.check(function(e){return new qe({check:"string_format",format:"uppercase",...Ie(e)})}(t)),e.trim=()=>e.check(Mn((e=>e.trim()))),e.normalize=(...t)=>e.check(function(e){return Mn((t=>t.normalize(e)))}(...t)),e.toLowerCase=()=>e.check(Mn((e=>e.toLowerCase()))),e.toUpperCase=()=>e.check(Mn((e=>e.toUpperCase())))})),ci=O("ZodString",((e,t)=>{_t.init(e,t),si.init(e,t),e.email=t=>e.check(Cn(li,t)),e.url=t=>e.check(function(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ie(t)})}(mi,t)),e.jwt=t=>e.check(function(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ie(t)})}(Ci,t)),e.emoji=t=>e.check(function(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ie(t)})}(gi,t)),e.guid=t=>e.check(Sn(fi,t)),e.uuid=t=>e.check(Rn(hi,t)),e.uuidv4=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ie(t)})}(hi,t)),e.uuidv6=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ie(t)})}(hi,t)),e.uuidv7=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ie(t)})}(hi,t)),e.nanoid=t=>e.check(function(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ie(t)})}(vi,t)),e.guid=t=>e.check(Sn(fi,t)),e.cuid=t=>e.check(function(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ie(t)})}(yi,t)),e.cuid2=t=>e.check(function(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ie(t)})}(_i,t)),e.ulid=t=>e.check(function(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ie(t)})}(Pi,t)),e.base64=t=>e.check(function(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ie(t)})}(Ai,t)),e.base64url=t=>e.check(function(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ie(t)})}(Ii,t)),e.xid=t=>e.check(function(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ie(t)})}(zi,t)),e.ksuid=t=>e.check(function(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ie(t)})}(bi,t)),e.ipv4=t=>e.check(function(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ie(t)})}(ki,t)),e.ipv6=t=>e.check(function(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ie(t)})}(wi,t)),e.cidrv4=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ie(t)})}(Ei,t)),e.cidrv6=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ie(t)})}(Ti,t)),e.e164=t=>e.check(function(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ie(t)})}(Ni,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,...Ie(t)})}(Gn,e)}(t)),e.date=t=>e.check(function(e){return function(e,t){return new e({type:"string",format:"date",check:"string_format",...Ie(t)})}(Ln,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,...Ie(t)})}(Bn,e)}(t)),e.duration=t=>e.check(function(e){return function(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ie(t)})}(Hn,e)}(t))}));function ui(e){return function(e,t){return new e({type:"string",...Ie(t)})}(ci,e)}const di=O("ZodStringFormat",((e,t)=>{Pt.init(e,t),si.init(e,t)})),li=O("ZodEmail",((e,t)=>{kt.init(e,t),di.init(e,t)}));function pi(e){return Cn(li,e)}const fi=O("ZodGUID",((e,t)=>{zt.init(e,t),di.init(e,t)})),hi=O("ZodUUID",((e,t)=>{bt.init(e,t),di.init(e,t)})),mi=O("ZodURL",((e,t)=>{wt.init(e,t),di.init(e,t)})),gi=O("ZodEmoji",((e,t)=>{Et.init(e,t),di.init(e,t)})),vi=O("ZodNanoID",((e,t)=>{Tt.init(e,t),di.init(e,t)})),yi=O("ZodCUID",((e,t)=>{At.init(e,t),di.init(e,t)})),_i=O("ZodCUID2",((e,t)=>{It.init(e,t),di.init(e,t)})),Pi=O("ZodULID",((e,t)=>{Nt.init(e,t),di.init(e,t)})),zi=O("ZodXID",((e,t)=>{Ct.init(e,t),di.init(e,t)})),bi=O("ZodKSUID",((e,t)=>{St.init(e,t),di.init(e,t)})),ki=O("ZodIPv4",((e,t)=>{Zt.init(e,t),di.init(e,t)})),wi=O("ZodIPv6",((e,t)=>{Ft.init(e,t),di.init(e,t)})),Ei=O("ZodCIDRv4",((e,t)=>{Dt.init(e,t),di.init(e,t)})),Ti=O("ZodCIDRv6",((e,t)=>{jt.init(e,t),di.init(e,t)})),Ai=O("ZodBase64",((e,t)=>{Mt.init(e,t),di.init(e,t)})),Ii=O("ZodBase64URL",((e,t)=>{Gt.init(e,t),di.init(e,t)})),Ni=O("ZodE164",((e,t)=>{Lt.init(e,t),di.init(e,t)})),Ci=O("ZodJWT",((e,t)=>{Bt.init(e,t),di.init(e,t)})),Si=O("ZodNumber",((e,t)=>{Ht.init(e,t),ai.init(e,t),e.gt=(t,n)=>e.check(xn(t,n)),e.gte=(t,n)=>e.check(Zn(t,n)),e.min=(t,n)=>e.check(Zn(t,n)),e.lt=(t,n)=>e.check($n(t,n)),e.lte=(t,n)=>e.check(On(t,n)),e.max=(t,n)=>e.check(On(t,n)),e.int=t=>e.check(Oi(t)),e.safe=t=>e.check(Oi(t)),e.positive=t=>e.check(xn(0,t)),e.nonnegative=t=>e.check(Zn(0,t)),e.negative=t=>e.check($n(0,t)),e.nonpositive=t=>e.check(On(0,t)),e.multipleOf=(t,n)=>e.check(Fn(t,n)),e.step=(t,n)=>e.check(Fn(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 Ri(e){return function(e,t){return new e({type:"number",checks:[],...Ie(t)})}(Si,e)}const $i=O("ZodNumberFormat",((e,t)=>{Vt.init(e,t),Si.init(e,t)}));function Oi(e){return function(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Ie(t)})}($i,e)}const xi=O("ZodBoolean",((e,t)=>{Qt.init(e,t),ai.init(e,t)}));const Zi=O("ZodUnknown",((e,t)=>{qt.init(e,t),ai.init(e,t)}));function Fi(){return new Zi({type:"unknown"})}const Di=O("ZodNever",((e,t)=>{Yt.init(e,t),ai.init(e,t)}));function ji(e){return function(e,t){return new e({type:"never",...Ie(t)})}(Di,e)}const Ui=O("ZodDate",((e,t)=>{Wt.init(e,t),ai.init(e,t),e.min=(t,n)=>e.check(Zn(t,n)),e.max=(t,n)=>e.check(On(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 Mi=O("ZodArray",((e,t)=>{Kt.init(e,t),ai.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(jn(t,n)),e.nonempty=t=>e.check(jn(1,t)),e.max=(t,n)=>e.check(Dn(t,n)),e.length=(t,n)=>e.check(Un(t,n)),e.unwrap=()=>e.element}));function Gi(e,t){return function(e,t,n){return new e({type:"array",element:t,...Ie(n)})}(Mi,e,t)}const Li=O("ZodObject",((e,t)=>{on.init(e,t),ai.init(e,t),ge(e,"shape",(()=>t.shape)),e.keyof=()=>function(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map((e=>[e,e]))):e;return new Qi({type:"enum",entries:n,...Ie(t)})}(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Fi()}),e.loose=()=>e.clone({...e._zod.def,catchall:Fi()}),e.strict=()=>e.clone({...e._zod.def,catchall:ji()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!ke(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=ye(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return ve(this,"shape",n),n},checks:[]});return Ae(e,i)}(e,t),e.safeExtend=t=>function(e,t){if(!ke(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 ve(this,"shape",n),n},checks:e._zod.def.checks};return Ae(e,n)}(e,t),e.merge=t=>function(e,t){const n=ye(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return ve(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return Ae(e,n)}(e,t),e.pick=t=>function(e,t){const n=e._zod.def;return Ae(e,ye(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 ve(this,"shape",e),e},checks:[]}))}(e,t),e.omit=t=>function(e,t){const n=e._zod.def,i=ye(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 ve(this,"shape",i),i},checks:[]});return Ae(e,i)}(e,t),e.partial=(...t)=>function(e,t,n){const i=ye(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 ve(this,"shape",o),o},checks:[]});return Ae(t,i)}(Wi,e,t[0]),e.required=(...t)=>function(e,t,n){const i=ye(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 ve(this,"shape",o),o},checks:[]});return Ae(t,i)}(no,e,t[0])}));function Bi(e,t){const n={type:"object",get shape(){var t;return ve(this,"shape",e?(t=e,Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))):{}),this.shape},...Ie(t)};return new Li(n)}const Hi=O("ZodUnion",((e,t)=>{an.init(e,t),ai.init(e,t),e.options=t.options}));const Vi=O("ZodIntersection",((e,t)=>{sn.init(e,t),ai.init(e,t)})),Qi=O("ZodEnum",((e,t)=>{dn.init(e,t),ai.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 Qi({...t,checks:[],...Ie(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 Qi({...t,checks:[],...Ie(i),entries:o})}}));const qi=O("ZodTransform",((e,t)=>{ln.init(e,t),ai.init(e,t),e._zod.parse=(n,i)=>{if("backward"===i.direction)throw new Z(e.constructor.name);n.addIssue=i=>{if("string"==typeof i)n.issues.push(xe(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(xe(t))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then((e=>(n.value=e,n))):(n.value=o,n)}}));function Yi(e){return new qi({type:"transform",transform:e})}const Wi=O("ZodOptional",((e,t)=>{fn.init(e,t),ai.init(e,t),e.unwrap=()=>e._zod.def.innerType}));function Ji(e){return new Wi({type:"optional",innerType:e})}const Ki=O("ZodNullable",((e,t)=>{hn.init(e,t),ai.init(e,t),e.unwrap=()=>e._zod.def.innerType}));function Xi(e){return new Ki({type:"nullable",innerType:e})}const eo=O("ZodDefault",((e,t)=>{mn.init(e,t),ai.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap})),to=O("ZodPrefault",((e,t)=>{vn.init(e,t),ai.init(e,t),e.unwrap=()=>e._zod.def.innerType})),no=O("ZodNonOptional",((e,t)=>{yn.init(e,t),ai.init(e,t),e.unwrap=()=>e._zod.def.innerType})),io=O("ZodCatch",((e,t)=>{Pn.init(e,t),ai.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap})),oo=O("ZodPipe",((e,t)=>{zn.init(e,t),ai.init(e,t),e.in=t.in,e.out=t.out}));function ro(e,t){return new oo({type:"pipe",in:e,out:t})}const ao=O("ZodReadonly",((e,t)=>{kn.init(e,t),ai.init(e,t),e.unwrap=()=>e._zod.def.innerType})),so=O("ZodCustom",((e,t)=>{En.init(e,t),ai.init(e,t)}));function co(e,t){return ro(Yi(e),t)}function uo(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 lo=e=>co((e=>{if(e){if("string"==typeof e){const t=Number(e);return isNaN(t)?e:t}return e}}),e),po=e=>co((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),fo=e=>ui().min(1,{error:"Required"}).max(e,`Maximum length is ${e} characters`),ho=()=>pi("Invalid email address").min(1,"Required"),mo=()=>lo(Ri("Valid amount required").positive("Positive amount required")),go=()=>po(function(e){return function(e,t){return new e({type:"date",...Ie(t)})}(Ui,e)}("Valid date required").min(new Date,"Date must be in the future")),vo=e=>ui().max(e,`Maximum length is ${e} characters`),yo=Bi({address1:fo(100),address2:vo(100).optional(),city:fo(50),state:vo(50).optional(),postcode:vo(20).optional(),country:fo(50)}),_o=Bi({amount:mo(),message:vo(500).nullish(),giverFirstName:fo(50),giverLastName:fo(50),giverEmail:ho(),giverPhone:fo(31),giverAddress:yo,cardHolder:fo(101),recipientFirstName:vo(50).nullish(),recipientLastName:vo(50).nullish(),recipientEmail:pi("Invalid email address").nullish(),recipientPhone:vo(31).nullish()}),Po=_o.extend({expiry:go(),notes:vo(500).nullish()}),zo=Bi({balance:mo(),expiry:go(),message:vo(500).nullish(),notes:vo(500).nullish(),giverFirstName:fo(50),giverLastName:fo(50),giverEmail:ho(),giverPhone:fo(31),cardHolder:fo(101),recipientEmail:pi("Invalid email address").nullish(),recipientPhone:vo(31).nullish()}),bo=_o.extend({companyId:Ri().int().positive(),sendViaEmail:function(e){return function(e,t){return new e({type:"boolean",...Ie(t)})}(xi,e)}().default(!0),payment:Bi({cardHolder:fo(30),cardNumberToken:fo(50),cardExpiry:fo(5),cardCvcToken:fo(50)}).optional()}),ko=Bi({companyId:Ri().int().positive().nullish(),code:fo(10),password:fo(10)}),wo=ko.extend({amount:mo(),description:fo(200)});let Eo,To;!function(e){e.Purchase="Purchase",e.Redemption="Redemption",e.Adjustment="Adjustment"}(Eo||(Eo={})),function(e){e.Pending="Pending",e.Complete="Complete",e.Cancelled="Cancelled",e.Expired="Expired"}(To||(To={}));const Ao=Bi({code:fo(10),token:fo(128)}),Io=Bi({companyId:Ri().int().positive(),code:fo(10),token:fo(128)}),No=Bi({grant_type:ui().readonly().default("refresh_token"),client_id:Rn(hi,undefined),client_secret:ui(),refresh_token:ui(),scope:ui().optional()});const Co=Bi({email:pi(),firstName:ui().max(100).optional(),lastName:ui().max(100).optional(),phone:ui().max(20).optional(),scopes:Gi(ui()).optional()});let So,Ro,$o;!function(e){e.Critical="Critical",e.Error="Error",e.Warn="Warn",e.Info="Info"}(So||(So={})),function(e){e.Debug="Diagnostics",e.Security="Security",e.Audit="Audit"}(Ro||(Ro={})),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 Captured",e.Email="Email Delivery",e.Transaction="Gift Card Transaction"}($o||($o={}));const Oo=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},xo=require("decimal.js");var Zo=e.n(xo);const Fo=e=>new(Zo())(e).toDecimalPlaces(2).toNumber();function Do(e,t={}){const{baseAmount:n=0,numberOfNights:i=1,feeIncludedInBaseAmount:o=!1,extractedFromRates:r=!1,removedPercentages:a=[]}=t,s=Fo(n);switch(e.feeType){case S.PercentageOfBooking:if(o)return Fo(s*e.amount/(100+e.amount));if(r){const t=a.reduce(((e,t)=>e+t/(100+t)),0);return Fo(s/(1-t)*e.amount/(100+e.amount))}return Fo(s*(e.amount/100));case S.FixedChargePerRoom:case S.FixedChargePerBooking:return e.amount;case S.NightlyChargePerRoom:return Fo(e.amount*i);default:return 0}}const jo=[S.FixedChargePerBooking],Uo=[S.PercentageOfBooking,S.FixedChargePerRoom,S.NightlyChargePerRoom],Mo=[S.PercentageOfBooking];function Go(e,t){return e.filter((e=>t.includes(e.feeType)))}function Lo(e){return Go(e,jo)}function Bo(e){return Go(e,Uo)}function Ho(e){return Go(e,Mo)}function Vo(e){return{includeInRates:[S.PercentageOfBooking,S.NightlyChargePerRoom].includes(e),extractFeeFromRates:e===S.PercentageOfBooking,appliesToAddons:e===S.PercentageOfBooking,includePreviousFeesInCalculation:e===S.PercentageOfBooking}}const Qo=e=>e,qo=(e,t)=>{const n={};return t.forEach((t=>{t in e&&(n[t]=e[t])})),n},Yo=(e,t)=>e.includes("cdn.app.roomstay.io")?e+"?w="+t:e;class Wo{}function Jo(e){return e.toUpperCase()}Wo.calculateBaseAddonTotal=(e,t)=>{let n=0,i=0,o=0;e.price&&e.quantity&&(n=e.quantity*Number(e.price)),e.pricingType===R.PER_ADULT_OCCUPANCY_PER_NIGHT&&e.adultQuantity?n*=e.adultQuantity:e.pricingType===R.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 $.includes(e.pricingType)&&e.nights&&!t&&(r*=e.nights),{indPrice:n,indAdultPrice:i,indChildPrice:o,addonTotal:r}},Wo.calculateBasketAddonTotal=(e,t=!1)=>(Array.isArray(e)||(e=[e]),e.reduce(((e,n)=>{const i=Wo.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))),$.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})),Wo.calculateReservationAddonTotal=(e,t=!1)=>(Array.isArray(e)||(e=[e]),e.reduce(((e,n)=>{const i=Wo.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})),Wo.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(n+=e.fees??0,e.addons?.length){const o=(e.addons??[]).map((e=>({...e,nights:i})));n+=Wo.calculateReservationAddonTotal(o,t)?.total}})),Fo(n)},module.exports=t})();
|
|
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;e.r(t),e.d(t,{ADDON_PER_NIGHT_TYPES:()=>jo,AddGiftCardSchema:()=>_o,AdyenEventCode:()=>Oo,AdyenResultCode:()=>Co,BaseGiftCardSchema:()=>yo,CancelGiftCardTransactionSchema:()=>Fo,CompleteGiftCardTransactionSchema:()=>xo,CreatePaymentSessionSchema:()=>bo,DATE_FORMAT:()=>R,EAddonPricingType:()=>Uo,EAdminCompanyUserRole:()=>p,EBookingFlow:()=>i,EBookingPaymentMethod:()=>o,EBookingStatus:()=>n,ECompanyProvider:()=>l,EDistanceUnitType:()=>y,EFeeType:()=>O,EGiftCardPaymentProvider:()=>Io,EGiftCardPaymentStatus:()=>Ro,EGiftCardPaymentType:()=>zo,EGiftCardTransactionType:()=>So,EGuaranteePolicyDepositMode:()=>w,EGuarantyPolicyPrepaymentType:()=>E,EHotelCardProcessor:()=>r,EHotelPriceModel:()=>f,EHotelStateFieldConfiguration:()=>h,EHotelWeekdayStartsOn:()=>m,EIntegration:()=>g,ELogCategory:()=>Mo,ELogSeverity:()=>Lo,ELogType:()=>Go,EPlanpayBookingStatus:()=>a,EPromoCodeDiscountType:()=>A,ERMSAuthSyncHistoryStatus:()=>z,ERMSDiscountType:()=>_,ERMSSyncStrategy:()=>P,ERoomstayEventSource:()=>T,ERoomstayImageSize:()=>b,ETransactionStatus:()=>$o,EditGiftCardSchema:()=>Po,GuestProfile:()=>d,HttpMethod:()=>C,IAuxiliaryFilterType:()=>v,IMaintenanceStatusService:()=>k,InternationalAddressSchema:()=>vo,ItineraryResponse:()=>c,PCIBookingCardProcessorTypes:()=>s,Package:()=>N,PassthroughPaymentDataSchema:()=>wo,PaymentProcessorDataSchema:()=>ko,PurchaseGiftCardSchema:()=>Eo,RedeemGiftCardSchema:()=>No,RefreshGiftCardTokenSchema:()=>Zo,RefundGiftCardSchema:()=>Ao,RegisterGiftCardAdminSchema:()=>Do,Reservation:()=>u,ReservedPackage:()=>I,RoundingType:()=>Qo,TotalCalculator:()=>sr,ValidateGiftCardSchema:()=>To,calculateFeeAmount:()=>Yo,calculateTotalForMemberBooking:()=>Ho,getFeeOptionValidity:()=>ir,getFilteredBookingAddonFees:()=>nr,getFilteredBookingFees:()=>er,getFilteredBookingRateFees:()=>tr,maxString:()=>go,nameof:()=>or,preprocessDate:()=>lo,preprocessNumber:()=>uo,requireEmail:()=>fo,requireFutureDate:()=>mo,requirePositiveAmount:()=>ho,requireString:()=>po,resizeRoomstayImageUrl:()=>ar,roundMoney:()=>qo,subset:()=>rr,uppercaseString:()=>cr,validateFormWithZod:()=>co}),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.Card="Card",e.SavedCard="SavedCard",e.Planpay="Planpay",e.Adyen="Adyen",e.Afterpay="Afterpay",e.PCIBookingCard="PCIBookingCard",e.TrueRewards="TrueRewards"}(o||(o={})),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"}(r||(r={})),function(e){e.Unknown="unknown",e.Unpaid="unpaid",e.Accepted="accepted",e.Cancelled="cancelled",e.Refunded="refunded",e.Rejected="rejected"}(a||(a={}));const s=[];class c{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 u{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 d,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 d{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 l,p,f,h,m,g,v,y,_,P,z,b,k,w,E,A,T;!function(e){e.Synxis="Synxis",e.Availpro="Availpro",e.RMS="RMS",e.Siteminder="Siteminder",e.Roomstay="Roomstay",e.OHIP="OHIP"}(l||(l={})),function(e){e.SuperAdmin="SuperAdmin",e.Admin="Admin",e.Limited="Limited"}(p||(p={})),function(e){e.PerPerson="PerPerson",e.PerDay="PerDay",e.PerOccupancy="PerOccupancy"}(f||(f={})),function(e){e.NotIncluded="NotIncluded",e.Optional="Optional",e.Required="Required"}(h||(h={})),function(e){e.Monday="monday",e.Sunday="sunday"}(m||(m={})),function(e){e.Big4="Big4",e.RmsTop10="Top10",e.Top10="NewTop10",e.Gday="Gday",e.Salesforce="Salesforce",e.RAC="RAC"}(g||(g={})),function(e){e.AreaDwellingLength="AreaDwellingLength",e.AreaDwellingType="AreaDwellingType"}(v||(v={})),function(e){e.Metric="metric",e.Imperial="imperial"}(y||(y={})),function(e){e.Percentage="Percentage",e.Amount="Amount",e.Bogo="BOGO",e.NightlyRateOverride="NightlyRateOverride"}(_||(_={})),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.NewRateFetch="newRateFetch"}(P||(P={})),function(e){e.Success="success",e.Failure="failure",e.New="new",e.Queued="queued",e.InProgress="in_progress",e.RequireResume="require_resume"}(z||(z={})),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"}(b||(b={})),function(e){e.Frontend="frontend",e.Hotel="hotel",e.Events="events"}(k||(k={}));class N{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 I extends N{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"}(w||(w={})),function(e){e.FixedAmount="fixed",e.Percentage="percentage",e.Nights="nights"}(E||(E={})),function(e){e.FlatPercent="flatPercent",e.FlatQuantity="flatQuantity",e.FlatQuantityPerStay="flatQuantityPerStay"}(A||(A={})),function(e){e.Eventbrite="eventbrite",e.ATDW="atdw"}(T||(T={}));const R="DD/MM/YYYY";let C,O;function S(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}!function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e.PATCH="PATCH",e.OPTIONS="OPTIONS",e.HEAD="HEAD"}(C||(C={})),function(e){e.PercentageOfBooking="PercentageOfBooking",e.FixedChargePerRoom="FixedChargePerRoom",e.NightlyChargePerRoom="NightlyChargePerRoom",e.FixedChargePerBooking="FixedChargePerBooking",e.DepositSurcharge="DepositSurcharge"}(O||(O={})),Object.freeze({status:"aborted"}),Symbol("zod_brand");class $ extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class x extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const F={};function Z(e){return e&&Object.assign(F,e),F}const D=/^[cC][^\s-]{8,}$/,U=/^[0-9a-z]+$/,j=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,L=/^[0-9a-vA-V]{20}$/,M=/^[A-Za-z0-9]{27}$/,G=/^[a-zA-Z0-9_-]{21}$/,H=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,B=/^([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})$/,V=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)$/,Q=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,q=/^(?:(?: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])$/,Y=/^(([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})$/,W=/^((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])$/,J=/^(([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])$/,K=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,X=/^[A-Za-z0-9_-]*$/,ee=/^(?=.{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])?)*\.?$/,te=/^\+(?:[0-9]){6,14}[0-9]$/,ne="(?:(?:\\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])))",ie=new RegExp(`^${ne}$`);function oe(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 re=/^\d+$/,ae=/^-?\d+(?:\.\d+)?/i,se=/true|false/i,ce=/^[^A-Z]*$/,ue=/^[^a-z]*$/;function de(e,t){return"bigint"==typeof t?t.toString():t}function le(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function pe(e){return null==e}function fe(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}const he=Symbol("evaluating");function me(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==he)return void 0===i&&(i=he,i=n()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function ge(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ve(...e){const t={};for(const n of e){const e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ye(e){return JSON.stringify(e)}const _e="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Pe(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const ze=le((()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}}));function be(e){if(!1===Pe(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!1!==Pe(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}function ke(e){return be(e)?{...e}:e}const we=new Set(["string","number","symbol"]);function Ee(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ae(e,t,n){const i=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(i._zod.parent=e),i}function Te(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 Ne={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 Ie(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 Re(e,t){return t.map((t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t}))}function Ce(e){return"string"==typeof e?e:e?.message}function Oe(e,t,n){const i={...e,path:e.path??[]};if(!e.message){const o=Ce(e.inst?._zod.def?.error?.(e))??Ce(t?.error?.(e))??Ce(n.customError?.(e))??Ce(n.localeError?.(e))??"Invalid input";i.message=o}return delete i.inst,delete i.continue,t?.reportInput||delete i.input,i}function Se(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function $e(...e){const[t,n,i]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:i}:{...t}}const xe=S("$ZodCheck",((e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])})),Fe={number:"number",bigint:"bigint",object:"date"},Ze=S("$ZodCheckLessThan",((e,t)=>{xe.init(e,t);const n=Fe[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})}})),De=S("$ZodCheckGreaterThan",((e,t)=>{xe.init(e,t);const n=Fe[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})}})),Ue=S("$ZodCheckMultipleOf",((e,t)=>{xe.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})}})),je=S("$ZodCheckNumberFormat",((e,t)=>{xe.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),i=n?"int":"number",[o,r]=Ne[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=re)})),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})}})),Le=S("$ZodCheckMaxLength",((e,t)=>{var n;xe.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!pe(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=Se(i);n.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}})),Me=S("$ZodCheckMinLength",((e,t)=>{var n;xe.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!pe(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=Se(i);n.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}})),Ge=S("$ZodCheckLengthEquals",((e,t)=>{var n;xe.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!pe(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=Se(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})}})),He=S("$ZodCheckStringFormat",((e,t)=>{var n,i;xe.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=()=>{})})),Be=S("$ZodCheckRegex",((e,t)=>{He.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})}})),Ve=S("$ZodCheckLowerCase",((e,t)=>{t.pattern??(t.pattern=ce),He.init(e,t)})),Qe=S("$ZodCheckUpperCase",((e,t)=>{t.pattern??(t.pattern=ue),He.init(e,t)})),qe=S("$ZodCheckIncludes",((e,t)=>{xe.init(e,t);const n=Ee(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})}})),Ye=S("$ZodCheckStartsWith",((e,t)=>{xe.init(e,t);const n=new RegExp(`^${Ee(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})}})),We=S("$ZodCheckEndsWith",((e,t)=>{xe.init(e,t);const n=new RegExp(`.*${Ee(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})}})),Je=S("$ZodCheckOverwrite",((e,t)=>{xe.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}));class Ke{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 Xe=(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,de,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},et=S("$ZodError",Xe),tt=S("$ZodError",Xe,{Parent:Error}),nt=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 $;if(a.issues.length){const t=new(o?.Err??e)(a.issues.map((e=>Oe(e,r,Z()))));throw _e(t,o?.callee),t}return a.value},it=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=>Oe(e,r,Z()))));throw _e(t,o?.callee),t}return a.value},ot=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 $;return r.issues.length?{success:!1,error:new(e??et)(r.issues.map((e=>Oe(e,o,Z()))))}:{success:!0,data:r.value}},rt=ot(tt),at=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=>Oe(e,o,Z()))))}:{success:!0,data:r.value}},st=at(tt),ct=e=>(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return nt(e)(t,n,o)},ut=e=>(t,n,i)=>nt(e)(t,n,i),dt=e=>async(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return it(e)(t,n,o)},lt=e=>async(t,n,i)=>it(e)(t,n,i),pt=e=>(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return ot(e)(t,n,o)},ft=e=>(t,n,i)=>ot(e)(t,n,i),ht=e=>async(t,n,i)=>{const o=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return at(e)(t,n,o)},mt=e=>async(t,n,i)=>at(e)(t,n,i),gt={major:4,minor:1,patch:5},vt=S("$ZodType",((e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=gt;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=Ie(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 $;if(i||a instanceof Promise)i=(i??Promise.resolve()).then((async()=>{await a,e.issues.length!==t&&(o||(o=Ie(e,t)))}));else{if(e.issues.length===t)continue;o||(o=Ie(e,t))}}return i?i.then((()=>e)):e},n=(n,o,r)=>{if(Ie(n))return n.aborted=!0,n;const a=t(o,i,r);if(a instanceof Promise){if(!1===r.async)throw new $;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 $;return a.then((e=>t(e,i,r)))}return t(a,i,r)}}e["~standard"]={validate:t=>{try{const n=rt(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return st(e,t).then((e=>e.success?{value:e.data}:{issues:e.error?.issues}))}},vendor:"zod",version:1}})),yt=S("$ZodString",((e,t)=>{var n;vt.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=S("$ZodStringFormat",((e,t)=>{He.init(e,t),yt.init(e,t)})),Pt=S("$ZodGUID",((e,t)=>{t.pattern??(t.pattern=B),_t.init(e,t)})),zt=S("$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=V(e))}else t.pattern??(t.pattern=V());_t.init(e,t)})),bt=S("$ZodEmail",((e,t)=>{t.pattern??(t.pattern=Q),_t.init(e,t)})),kt=S("$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:ee.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})}}})),wt=S("$ZodEmoji",((e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),_t.init(e,t)})),Et=S("$ZodNanoID",((e,t)=>{t.pattern??(t.pattern=G),_t.init(e,t)})),At=S("$ZodCUID",((e,t)=>{t.pattern??(t.pattern=D),_t.init(e,t)})),Tt=S("$ZodCUID2",((e,t)=>{t.pattern??(t.pattern=U),_t.init(e,t)})),Nt=S("$ZodULID",((e,t)=>{t.pattern??(t.pattern=j),_t.init(e,t)})),It=S("$ZodXID",((e,t)=>{t.pattern??(t.pattern=L),_t.init(e,t)})),Rt=S("$ZodKSUID",((e,t)=>{t.pattern??(t.pattern=M),_t.init(e,t)})),Ct=S("$ZodISODateTime",((e,t)=>{t.pattern??(t.pattern=function(e){const t=oe({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(`^${ne}T(?:${i})$`)}(t)),_t.init(e,t)})),Ot=S("$ZodISODate",((e,t)=>{t.pattern??(t.pattern=ie),_t.init(e,t)})),St=S("$ZodISOTime",((e,t)=>{t.pattern??(t.pattern=new RegExp(`^${oe(t)}$`)),_t.init(e,t)})),$t=S("$ZodISODuration",((e,t)=>{t.pattern??(t.pattern=H),_t.init(e,t)})),xt=S("$ZodIPv4",((e,t)=>{t.pattern??(t.pattern=q),_t.init(e,t),e._zod.onattach.push((e=>{e._zod.bag.format="ipv4"}))})),Ft=S("$ZodIPv6",((e,t)=>{t.pattern??(t.pattern=Y),_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})}}})),Zt=S("$ZodCIDRv4",((e,t)=>{t.pattern??(t.pattern=W),_t.init(e,t)})),Dt=S("$ZodCIDRv6",((e,t)=>{t.pattern??(t.pattern=J),_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 Ut(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const jt=S("$ZodBase64",((e,t)=>{t.pattern??(t.pattern=K),_t.init(e,t),e._zod.onattach.push((e=>{e._zod.bag.contentEncoding="base64"})),e._zod.check=n=>{Ut(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}})),Lt=S("$ZodBase64URL",((e,t)=>{t.pattern??(t.pattern=X),_t.init(e,t),e._zod.onattach.push((e=>{e._zod.bag.contentEncoding="base64url"})),e._zod.check=n=>{(function(e){if(!X.test(e))return!1;const t=e.replace(/[-_]/g,(e=>"-"===e?"+":"/"));return Ut(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})}})),Mt=S("$ZodE164",((e,t)=>{t.pattern??(t.pattern=te),_t.init(e,t)})),Gt=S("$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})}})),Ht=S("$ZodNumber",((e,t)=>{vt.init(e,t),e._zod.pattern=e._zod.bag.pattern??ae,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}})),Bt=S("$ZodNumber",((e,t)=>{je.init(e,t),Ht.init(e,t)})),Vt=S("$ZodBoolean",((e,t)=>{vt.init(e,t),e._zod.pattern=se,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}})),Qt=S("$ZodUnknown",((e,t)=>{vt.init(e,t),e._zod.parse=e=>e})),qt=S("$ZodNever",((e,t)=>{vt.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)})),Yt=S("$ZodDate",((e,t)=>{vt.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 Wt(e,t,n){e.issues.length&&t.issues.push(...Re(n,e.issues)),t.value[n]=e.value}const Jt=S("$ZodArray",((e,t)=>{vt.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=>Wt(t,n,e)))):Wt(s,n,e)}return r.length?Promise.all(r).then((()=>n)):n}}));function Kt(e,t,n,i){e.issues.length&&t.issues.push(...Re(n,e.issues)),void 0===e.value?n in i&&(t.value[n]=void 0):t.value[n]=e.value}function Xt(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 en(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=>Kt(e,n,o,t)))):Kt(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 tn=S("$ZodObject",((e,t)=>{vt.init(e,t);const n=le((()=>Xt(t)));me(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=Pe,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=>Kt(n,t,e,s)))):Kt(n,t,e,s)}return o?en(c,s,t,a,n.value,e):c.length?Promise.all(c).then((()=>t)):t}})),nn=S("$ZodObjectJIT",((e,t)=>{tn.init(e,t);const n=e._zod.parse,i=le((()=>Xt(t)));let o;const r=Pe,a=!F.jitless,s=a&&ze.value,c=t.catchall;let u;e._zod.parse=(d,l)=>{u??(u=i.value);const p=d.value;return r(p)?a&&s&&!1===l?.async&&!0!==l.jitless?(o||(o=(e=>{const t=new Ke(["shape","payload","ctx"]),n=i.value,o=e=>{const t=ye(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=ye(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?en([],p,d,l,u,e):d):n(d,l):(d.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),d)}}));function on(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=>!Ie(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=>Oe(e,i,Z())))))}),t)}const rn=S("$ZodUnion",((e,t)=>{vt.init(e,t),me(e._zod,"optin",(()=>t.options.some((e=>"optional"===e._zod.optin))?"optional":void 0)),me(e._zod,"optout",(()=>t.options.some((e=>"optional"===e._zod.optout))?"optional":void 0)),me(e._zod,"values",(()=>{if(t.options.every((e=>e._zod.values)))return new Set(t.options.flatMap((e=>Array.from(e._zod.values))))})),me(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=>fe(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=>on(t,o,e,r))):on(s,o,e,r)}})),an=S("$ZodIntersection",((e,t)=>{vt.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])=>cn(e,t,n))):cn(e,o,r)}}));function sn(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(be(e)&&be(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=sn(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=sn(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 cn(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),Ie(e))return e;const i=sn(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 un=S("$ZodEnum",((e,t)=>{vt.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=>we.has(typeof e))).map((e=>"string"==typeof e?Ee(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}})),dn=S("$ZodTransform",((e,t)=>{vt.init(e,t),e._zod.parse=(n,i)=>{if("backward"===i.direction)throw new x(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 $;return n.value=o,n}}));function ln(e,t){return e.issues.length&&void 0===t?{issues:[],value:void 0}:e}const pn=S("$ZodOptional",((e,t)=>{vt.init(e,t),e._zod.optin="optional",e._zod.optout="optional",me(e._zod,"values",(()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0)),me(e._zod,"pattern",(()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${fe(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=>ln(t,e.value))):ln(i,e.value)}return void 0===e.value?e:t.innerType._zod.run(e,n)}})),fn=S("$ZodNullable",((e,t)=>{vt.init(e,t),me(e._zod,"optin",(()=>t.innerType._zod.optin)),me(e._zod,"optout",(()=>t.innerType._zod.optout)),me(e._zod,"pattern",(()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${fe(e.source)}|null)$`):void 0})),me(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)})),hn=S("$ZodDefault",((e,t)=>{vt.init(e,t),e._zod.optin="optional",me(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=>mn(e,t))):mn(i,t)}}));function mn(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const gn=S("$ZodPrefault",((e,t)=>{vt.init(e,t),e._zod.optin="optional",me(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))})),vn=S("$ZodNonOptional",((e,t)=>{vt.init(e,t),me(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=>yn(t,e))):yn(o,e)}}));function yn(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=S("$ZodCatch",((e,t)=>{vt.init(e,t),me(e._zod,"optin",(()=>t.innerType._zod.optin)),me(e._zod,"optout",(()=>t.innerType._zod.optout)),me(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=>Oe(e,n,Z())))},input:e.value}),e.issues=[]),e))):(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map((e=>Oe(e,n,Z())))},input:e.value}),e.issues=[]),e)}})),Pn=S("$ZodPipe",((e,t)=>{vt.init(e,t),me(e._zod,"values",(()=>t.in._zod.values)),me(e._zod,"optin",(()=>t.in._zod.optin)),me(e._zod,"optout",(()=>t.out._zod.optout)),me(e._zod,"propValues",(()=>t.in._zod.propValues)),e._zod.parse=(e,n)=>{if("backward"===n.direction){const i=t.out._zod.run(e,n);return i instanceof Promise?i.then((e=>zn(e,t.in,n))):zn(i,t.in,n)}const i=t.in._zod.run(e,n);return i instanceof Promise?i.then((e=>zn(e,t.out,n))):zn(i,t.out,n)}}));function zn(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const bn=S("$ZodReadonly",((e,t)=>{vt.init(e,t),me(e._zod,"propValues",(()=>t.innerType._zod.propValues)),me(e._zod,"values",(()=>t.innerType._zod.values)),me(e._zod,"optin",(()=>t.innerType._zod.optin)),me(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(kn):kn(i)}}));function kn(e){return e.value=Object.freeze(e.value),e}const wn=S("$ZodCustom",((e,t)=>{xe.init(e,t),vt.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=>En(t,n,i,e)));En(o,n,i,e)}}));function En(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($e(e))}}Symbol("ZodOutput"),Symbol("ZodInput");class An{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 Tn(){return new An}const Nn=Tn();function In(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Te(t)})}function Rn(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Te(t)})}function Cn(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Te(t)})}function On(e,t){return new Ze({check:"less_than",...Te(t),value:e,inclusive:!1})}function Sn(e,t){return new Ze({check:"less_than",...Te(t),value:e,inclusive:!0})}function $n(e,t){return new De({check:"greater_than",...Te(t),value:e,inclusive:!1})}function xn(e,t){return new De({check:"greater_than",...Te(t),value:e,inclusive:!0})}function Fn(e,t){return new Ue({check:"multiple_of",...Te(t),value:e})}function Zn(e,t){return new Le({check:"max_length",...Te(t),maximum:e})}function Dn(e,t){return new Me({check:"min_length",...Te(t),minimum:e})}function Un(e,t){return new Ge({check:"length_equals",...Te(t),length:e})}function jn(e){return new Je({check:"overwrite",tx:e})}const Ln=S("ZodISODateTime",((e,t)=>{Ct.init(e,t),ui.init(e,t)}));const Mn=S("ZodISODate",((e,t)=>{Ot.init(e,t),ui.init(e,t)}));const Gn=S("ZodISOTime",((e,t)=>{St.init(e,t),ui.init(e,t)}));const Hn=S("ZodISODuration",((e,t)=>{$t.init(e,t),ui.init(e,t)}));const Bn=(e,t)=>{et.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,de,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,de,2)}},isEmpty:{get:()=>0===e.issues.length}})},Vn=(S("ZodError",Bn),S("ZodError",Bn,{Parent:Error})),Qn=nt(Vn),qn=it(Vn),Yn=ot(Vn),Wn=at(Vn),Jn=ct(Vn),Kn=ut(Vn),Xn=dt(Vn),ei=lt(Vn),ti=pt(Vn),ni=ft(Vn),ii=ht(Vn),oi=mt(Vn),ri=S("ZodType",((e,t)=>(vt.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)=>Ae(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>Qn(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Yn(e,t,n),e.parseAsync=async(t,n)=>qn(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Wn(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Jn(e,t,n),e.decode=(t,n)=>Kn(e,t,n),e.encodeAsync=async(t,n)=>Xn(e,t,n),e.decodeAsync=async(t,n)=>ei(e,t,n),e.safeEncode=(t,n)=>ti(e,t,n),e.safeDecode=(t,n)=>ni(e,t,n),e.safeEncodeAsync=async(t,n)=>ii(e,t,n),e.safeDecodeAsync=async(t,n)=>oi(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,...Te(n)})}(ao,e,t)}(t,n)),e.superRefine=t=>e.check(function(e){const t=function(e,t){const n=new xe({check:"custom",...Te(void 0)});return n._zod.check=e,n}((n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push($e(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($e(i))}},e(n.value,n))));return t}(t)),e.overwrite=t=>e.check(jn(t)),e.optional=()=>Wi(e),e.nullable=()=>Ki(e),e.nullish=()=>Wi(Ki(e)),e.nonoptional=t=>function(e,t){return new to({type:"nonoptional",innerType:e,...Te(t)})}(e,t),e.array=()=>Li(e),e.or=t=>function(e,t){return new Hi({type:"union",options:e,...Te(t)})}([e,t]),e.and=t=>new Bi({type:"intersection",left:e,right:t}),e.transform=t=>oo(e,qi(t)),e.default=t=>{return n=t,new Xi({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():ke(n)}});var n},e.prefault=t=>{return n=t,new eo({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():ke(n)}});var n},e.catch=t=>{return new no({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>oo(e,t),e.readonly=()=>new ro({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return Nn.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>Nn.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return Nn.get(e);const n=e.clone();return Nn.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e))),ai=S("_ZodString",((e,t)=>{yt.init(e,t),ri.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 Be({check:"string_format",format:"regex",...Te(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new qe({check:"string_format",format:"includes",...Te(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new Ye({check:"string_format",format:"starts_with",...Te(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new We({check:"string_format",format:"ends_with",...Te(t),suffix:e})}(...t)),e.min=(...t)=>e.check(Dn(...t)),e.max=(...t)=>e.check(Zn(...t)),e.length=(...t)=>e.check(Un(...t)),e.nonempty=(...t)=>e.check(Dn(1,...t)),e.lowercase=t=>e.check(function(e){return new Ve({check:"string_format",format:"lowercase",...Te(e)})}(t)),e.uppercase=t=>e.check(function(e){return new Qe({check:"string_format",format:"uppercase",...Te(e)})}(t)),e.trim=()=>e.check(jn((e=>e.trim()))),e.normalize=(...t)=>e.check(function(e){return jn((t=>t.normalize(e)))}(...t)),e.toLowerCase=()=>e.check(jn((e=>e.toLowerCase()))),e.toUpperCase=()=>e.check(jn((e=>e.toUpperCase())))})),si=S("ZodString",((e,t)=>{yt.init(e,t),ai.init(e,t),e.email=t=>e.check(In(di,t)),e.url=t=>e.check(function(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Te(t)})}(hi,t)),e.jwt=t=>e.check(function(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Te(t)})}(Ii,t)),e.emoji=t=>e.check(function(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Te(t)})}(mi,t)),e.guid=t=>e.check(Rn(pi,t)),e.uuid=t=>e.check(Cn(fi,t)),e.uuidv4=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Te(t)})}(fi,t)),e.uuidv6=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Te(t)})}(fi,t)),e.uuidv7=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Te(t)})}(fi,t)),e.nanoid=t=>e.check(function(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Te(t)})}(gi,t)),e.guid=t=>e.check(Rn(pi,t)),e.cuid=t=>e.check(function(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Te(t)})}(vi,t)),e.cuid2=t=>e.check(function(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Te(t)})}(yi,t)),e.ulid=t=>e.check(function(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Te(t)})}(_i,t)),e.base64=t=>e.check(function(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Te(t)})}(Ai,t)),e.base64url=t=>e.check(function(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Te(t)})}(Ti,t)),e.xid=t=>e.check(function(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Te(t)})}(Pi,t)),e.ksuid=t=>e.check(function(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Te(t)})}(zi,t)),e.ipv4=t=>e.check(function(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Te(t)})}(bi,t)),e.ipv6=t=>e.check(function(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Te(t)})}(ki,t)),e.cidrv4=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Te(t)})}(wi,t)),e.cidrv6=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Te(t)})}(Ei,t)),e.e164=t=>e.check(function(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Te(t)})}(Ni,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,...Te(t)})}(Ln,e)}(t)),e.date=t=>e.check(function(e){return function(e,t){return new e({type:"string",format:"date",check:"string_format",...Te(t)})}(Mn,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,...Te(t)})}(Gn,e)}(t)),e.duration=t=>e.check(function(e){return function(e,t){return new e({type:"string",format:"duration",check:"string_format",...Te(t)})}(Hn,e)}(t))}));function ci(e){return function(e,t){return new e({type:"string",...Te(t)})}(si,e)}const ui=S("ZodStringFormat",((e,t)=>{_t.init(e,t),ai.init(e,t)})),di=S("ZodEmail",((e,t)=>{bt.init(e,t),ui.init(e,t)}));function li(e){return In(di,e)}const pi=S("ZodGUID",((e,t)=>{Pt.init(e,t),ui.init(e,t)})),fi=S("ZodUUID",((e,t)=>{zt.init(e,t),ui.init(e,t)})),hi=S("ZodURL",((e,t)=>{kt.init(e,t),ui.init(e,t)})),mi=S("ZodEmoji",((e,t)=>{wt.init(e,t),ui.init(e,t)})),gi=S("ZodNanoID",((e,t)=>{Et.init(e,t),ui.init(e,t)})),vi=S("ZodCUID",((e,t)=>{At.init(e,t),ui.init(e,t)})),yi=S("ZodCUID2",((e,t)=>{Tt.init(e,t),ui.init(e,t)})),_i=S("ZodULID",((e,t)=>{Nt.init(e,t),ui.init(e,t)})),Pi=S("ZodXID",((e,t)=>{It.init(e,t),ui.init(e,t)})),zi=S("ZodKSUID",((e,t)=>{Rt.init(e,t),ui.init(e,t)})),bi=S("ZodIPv4",((e,t)=>{xt.init(e,t),ui.init(e,t)})),ki=S("ZodIPv6",((e,t)=>{Ft.init(e,t),ui.init(e,t)})),wi=S("ZodCIDRv4",((e,t)=>{Zt.init(e,t),ui.init(e,t)})),Ei=S("ZodCIDRv6",((e,t)=>{Dt.init(e,t),ui.init(e,t)})),Ai=S("ZodBase64",((e,t)=>{jt.init(e,t),ui.init(e,t)})),Ti=S("ZodBase64URL",((e,t)=>{Lt.init(e,t),ui.init(e,t)})),Ni=S("ZodE164",((e,t)=>{Mt.init(e,t),ui.init(e,t)})),Ii=S("ZodJWT",((e,t)=>{Gt.init(e,t),ui.init(e,t)})),Ri=S("ZodNumber",((e,t)=>{Ht.init(e,t),ri.init(e,t),e.gt=(t,n)=>e.check($n(t,n)),e.gte=(t,n)=>e.check(xn(t,n)),e.min=(t,n)=>e.check(xn(t,n)),e.lt=(t,n)=>e.check(On(t,n)),e.lte=(t,n)=>e.check(Sn(t,n)),e.max=(t,n)=>e.check(Sn(t,n)),e.int=t=>e.check(Si(t)),e.safe=t=>e.check(Si(t)),e.positive=t=>e.check($n(0,t)),e.nonnegative=t=>e.check(xn(0,t)),e.negative=t=>e.check(On(0,t)),e.nonpositive=t=>e.check(Sn(0,t)),e.multipleOf=(t,n)=>e.check(Fn(t,n)),e.step=(t,n)=>e.check(Fn(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 Ci(e){return function(e,t){return new e({type:"number",checks:[],...Te(t)})}(Ri,e)}const Oi=S("ZodNumberFormat",((e,t)=>{Bt.init(e,t),Ri.init(e,t)}));function Si(e){return function(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Te(t)})}(Oi,e)}const $i=S("ZodBoolean",((e,t)=>{Vt.init(e,t),ri.init(e,t)}));const xi=S("ZodUnknown",((e,t)=>{Qt.init(e,t),ri.init(e,t)}));function Fi(){return new xi({type:"unknown"})}const Zi=S("ZodNever",((e,t)=>{qt.init(e,t),ri.init(e,t)}));function Di(e){return function(e,t){return new e({type:"never",...Te(t)})}(Zi,e)}const Ui=S("ZodDate",((e,t)=>{Yt.init(e,t),ri.init(e,t),e.min=(t,n)=>e.check(xn(t,n)),e.max=(t,n)=>e.check(Sn(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 ji=S("ZodArray",((e,t)=>{Jt.init(e,t),ri.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(Dn(t,n)),e.nonempty=t=>e.check(Dn(1,t)),e.max=(t,n)=>e.check(Zn(t,n)),e.length=(t,n)=>e.check(Un(t,n)),e.unwrap=()=>e.element}));function Li(e,t){return function(e,t,n){return new e({type:"array",element:t,...Te(n)})}(ji,e,t)}const Mi=S("ZodObject",((e,t)=>{nn.init(e,t),ri.init(e,t),me(e,"shape",(()=>t.shape)),e.keyof=()=>function(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map((e=>[e,e]))):e;return new Vi({type:"enum",entries:n,...Te(t)})}(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Fi()}),e.loose=()=>e.clone({...e._zod.def,catchall:Fi()}),e.strict=()=>e.clone({...e._zod.def,catchall:Di()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!be(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=ve(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return ge(this,"shape",n),n},checks:[]});return Ae(e,i)}(e,t),e.safeExtend=t=>function(e,t){if(!be(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 ge(this,"shape",n),n},checks:e._zod.def.checks};return Ae(e,n)}(e,t),e.merge=t=>function(e,t){const n=ve(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return ge(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return Ae(e,n)}(e,t),e.pick=t=>function(e,t){const n=e._zod.def;return Ae(e,ve(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 ge(this,"shape",e),e},checks:[]}))}(e,t),e.omit=t=>function(e,t){const n=e._zod.def,i=ve(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 ge(this,"shape",i),i},checks:[]});return Ae(e,i)}(e,t),e.partial=(...t)=>function(e,t,n){const i=ve(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 ge(this,"shape",o),o},checks:[]});return Ae(t,i)}(Yi,e,t[0]),e.required=(...t)=>function(e,t,n){const i=ve(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 ge(this,"shape",o),o},checks:[]});return Ae(t,i)}(to,e,t[0])}));function Gi(e,t){const n={type:"object",get shape(){var t;return ge(this,"shape",e?(t=e,Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))):{}),this.shape},...Te(t)};return new Mi(n)}const Hi=S("ZodUnion",((e,t)=>{rn.init(e,t),ri.init(e,t),e.options=t.options}));const Bi=S("ZodIntersection",((e,t)=>{an.init(e,t),ri.init(e,t)})),Vi=S("ZodEnum",((e,t)=>{un.init(e,t),ri.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 Vi({...t,checks:[],...Te(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 Vi({...t,checks:[],...Te(i),entries:o})}}));const Qi=S("ZodTransform",((e,t)=>{dn.init(e,t),ri.init(e,t),e._zod.parse=(n,i)=>{if("backward"===i.direction)throw new x(e.constructor.name);n.addIssue=i=>{if("string"==typeof i)n.issues.push($e(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($e(t))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then((e=>(n.value=e,n))):(n.value=o,n)}}));function qi(e){return new Qi({type:"transform",transform:e})}const Yi=S("ZodOptional",((e,t)=>{pn.init(e,t),ri.init(e,t),e.unwrap=()=>e._zod.def.innerType}));function Wi(e){return new Yi({type:"optional",innerType:e})}const Ji=S("ZodNullable",((e,t)=>{fn.init(e,t),ri.init(e,t),e.unwrap=()=>e._zod.def.innerType}));function Ki(e){return new Ji({type:"nullable",innerType:e})}const Xi=S("ZodDefault",((e,t)=>{hn.init(e,t),ri.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap})),eo=S("ZodPrefault",((e,t)=>{gn.init(e,t),ri.init(e,t),e.unwrap=()=>e._zod.def.innerType})),to=S("ZodNonOptional",((e,t)=>{vn.init(e,t),ri.init(e,t),e.unwrap=()=>e._zod.def.innerType})),no=S("ZodCatch",((e,t)=>{_n.init(e,t),ri.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap})),io=S("ZodPipe",((e,t)=>{Pn.init(e,t),ri.init(e,t),e.in=t.in,e.out=t.out}));function oo(e,t){return new io({type:"pipe",in:e,out:t})}const ro=S("ZodReadonly",((e,t)=>{bn.init(e,t),ri.init(e,t),e.unwrap=()=>e._zod.def.innerType})),ao=S("ZodCustom",((e,t)=>{wn.init(e,t),ri.init(e,t)}));function so(e,t){return oo(qi(e),t)}function co(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 uo=e=>so((e=>{if(e){if("string"==typeof e){const t=Number(e);return isNaN(t)?e:t}return e}}),e),lo=e=>so((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),po=e=>ci().min(1,{error:"Required"}).max(e,`Maximum length is ${e} characters`),fo=()=>li("Invalid email address").min(1,"Required"),ho=()=>uo(Ci("Valid amount required").positive("Positive amount required")),mo=()=>lo(function(e){return function(e,t){return new e({type:"date",...Te(t)})}(Ui,e)}("Valid date required").min(new Date,"Date must be in the future")),go=e=>ci().max(e,`Maximum length is ${e} characters`),vo=Gi({address1:po(100),address2:go(100).optional(),city:po(50),state:go(50).optional(),postcode:go(20).optional(),country:po(50)}),yo=Gi({amount:ho(),message:go(500).nullish(),giverFirstName:po(50),giverLastName:po(50),giverEmail:fo(),giverPhone:po(31),giverAddress:vo,cardHolder:po(101),recipientFirstName:go(50).nullish(),recipientLastName:go(50).nullish(),recipientEmail:li("Invalid email address").nullish(),recipientPhone:go(31).nullish()}),_o=yo.extend({expiry:mo(),notes:go(500).nullish()}),Po=Gi({balance:ho(),expiry:mo(),message:go(500).nullish(),notes:go(500).nullish(),giverFirstName:po(50),giverLastName:po(50),giverEmail:fo(),giverPhone:po(31),cardHolder:po(101),recipientEmail:li("Invalid email address").nullish(),recipientPhone:go(31).nullish()});let zo;!function(e){e.Passthrough="Passthrough",e.PaymentProcessor="PaymentProcessor"}(zo||(zo={}));const bo=Gi({companyId:Ci().int().positive(),amount:ho(),currency:po(3).default("AUD")}),ko=Gi({sessionId:po(100),resultCode:po(50),pspReference:go(100).optional()}),wo=Gi({cardHolder:po(100),cardNumberToken:go(200),cardCvcToken:go(200),cardExpiry:go(5)}),Eo=yo.extend({companyId:Ci().int().positive(),sendViaEmail:function(e){return function(e,t){return new e({type:"boolean",...Te(t)})}($i,e)}().default(!0),payment:ko.optional(),passthroughPayment:wo.optional()}),Ao=Gi({giftCardId:Ci().int().positive(),reason:go(500).optional()}),To=Gi({companyId:Ci().int().positive().nullish(),code:po(10),password:po(10)}),No=To.extend({amount:ho(),description:po(200)});let Io,Ro,Co,Oo,So,$o;!function(e){e.Adyen="Adyen"}(Io||(Io={})),function(e){e.Pending="Pending",e.Authorized="Authorized",e.Captured="Captured",e.Failed="Failed",e.Refunded="Refunded"}(Ro||(Ro={})),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"}(Co||(Co={})),function(e){e.AUTHORISATION="AUTHORISATION",e.CAPTURE="CAPTURE",e.REFUND="REFUND",e.CANCELLATION="CANCELLATION",e.REFUND_FAILED="REFUND_FAILED",e.CAPTURE_FAILED="CAPTURE_FAILED"}(Oo||(Oo={})),function(e){e.Purchase="Purchase",e.Redemption="Redemption",e.Adjustment="Adjustment"}(So||(So={})),function(e){e.Pending="Pending",e.Complete="Complete",e.Cancelled="Cancelled",e.Expired="Expired"}($o||($o={}));const xo=Gi({code:po(10),token:po(128)}),Fo=Gi({companyId:Ci().int().positive(),code:po(10),token:po(128)}),Zo=Gi({grant_type:ci().readonly().default("refresh_token"),client_id:Cn(fi,undefined),client_secret:ci(),refresh_token:ci(),scope:ci().optional()});const Do=Gi({email:li(),firstName:ci().max(100).optional(),lastName:ci().max(100).optional(),phone:ci().max(20).optional(),scopes:Li(ci()).optional()});let Uo;!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"}(Uo||(Uo={}));const jo=[Uo.PER_NIGHT,Uo.PER_PERSON_PER_NIGHT,Uo.PER_QUANTITY_NAME_PER_NIGHT,Uo.PER_ROOM_QUANTITY_PER_NIGHT,Uo.PER_PERSON_OCCUPANCY_PER_NIGHT,Uo.PER_ADULT_OCCUPANCY_PER_NIGHT,Uo.PER_CHILD_OCCUPANCY_PER_NIGHT,Uo.PER_ALL_PERSONS_PER_NIGHT];let Lo,Mo,Go;!function(e){e.Critical="Critical",e.Error="Error",e.Warn="Warn",e.Info="Info"}(Lo||(Lo={})),function(e){e.Debug="Diagnostics",e.Security="Security",e.Audit="Audit"}(Mo||(Mo={})),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"}(Go||(Go={}));const Ho=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},Bo=require("decimal.js");var Vo=e.n(Bo);const Qo={UP:Vo().ROUND_UP,DOWN:Vo().ROUND_DOWN,CEIL:Vo().ROUND_CEIL,FLOOR:Vo().ROUND_FLOOR,HALF_UP:Vo().ROUND_HALF_UP,HALF_DOWN:Vo().ROUND_HALF_DOWN,HALF_EVEN:Vo().ROUND_HALF_EVEN,HALF_CEIL:Vo().ROUND_HALF_CEIL,HALF_FLOOR:Vo().ROUND_HALF_FLOOR},qo=(e,t)=>{const{precision:n=2,rounding:i=Qo.HALF_UP}=t||{};return new(Vo())(e).toDecimalPlaces(n,i).toNumber()};function Yo(e,t={}){const{baseAmount:n=0,numberOfNights:i=1,feeIncludedInBaseAmount:o=!1,extractedFromRates:r=!1,removedPercentages:a=[]}=t,s=qo(n);switch(e.feeType){case O.PercentageOfBooking:if(o)return qo(s*e.amount/(100+e.amount));if(r){const t=a.reduce(((e,t)=>e+t/(100+t)),0);return qo(s/(1-t)*e.amount/(100+e.amount))}return qo(s*(e.amount/100));case O.FixedChargePerRoom:case O.FixedChargePerBooking:return e.amount;case O.NightlyChargePerRoom:return qo(e.amount*i);default:return 0}}const Wo=[O.FixedChargePerBooking],Jo=[O.PercentageOfBooking,O.FixedChargePerRoom,O.NightlyChargePerRoom],Ko=[O.PercentageOfBooking];function Xo(e,t){return e.filter((e=>t.includes(e.feeType)))}function er(e){return Xo(e,Wo)}function tr(e){return Xo(e,Jo)}function nr(e){return Xo(e,Ko)}function ir(e){return{includeInRates:[O.PercentageOfBooking,O.NightlyChargePerRoom].includes(e),extractFeeFromRates:e===O.PercentageOfBooking,appliesToAddons:e===O.PercentageOfBooking,includePreviousFeesInCalculation:e===O.PercentageOfBooking}}const or=e=>e,rr=(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 sr{}function cr(e){return e.toUpperCase()}sr.calculateBaseAddonTotal=(e,t)=>{let n=0,i=0,o=0;e.price&&e.quantity&&(n=e.quantity*Number(e.price)),e.pricingType===Uo.PER_ADULT_OCCUPANCY_PER_NIGHT&&e.adultQuantity?n*=e.adultQuantity:e.pricingType===Uo.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 jo.includes(e.pricingType)&&e.nights&&!t&&(r*=e.nights),{indPrice:n,indAdultPrice:i,indChildPrice:o,addonTotal:r}},sr.calculateBasketAddonTotal=(e,t=!1)=>(Array.isArray(e)||(e=[e]),e.reduce(((e,n)=>{const i=sr.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))),jo.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})),sr.calculateReservationAddonTotal=(e,t=!1)=>(Array.isArray(e)||(e=[e]),e.reduce(((e,n)=>{const i=sr.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})),sr.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(n+=e.fees??0,e.addons?.length){const o=(e.addons??[]).map((e=>({...e,nights:i})));n+=sr.calculateReservationAddonTotal(o,t)?.total}})),qo(n)},module.exports=t})();
|
|
@@ -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
|
+
};
|
|
@@ -21,7 +21,8 @@ export declare enum EHotelCardProcessor {
|
|
|
21
21
|
RMSPay = "RMSPay",
|
|
22
22
|
Windcave = "Windcave",
|
|
23
23
|
Mastercard = "Mastercard",
|
|
24
|
-
Stripe = "Stripe"
|
|
24
|
+
Stripe = "Stripe",
|
|
25
|
+
PayPal = "PayPal"
|
|
25
26
|
}
|
|
26
27
|
export declare enum EPlanpayBookingStatus {
|
|
27
28
|
Unknown = "unknown",// incase plan.deposit.status is unavailable
|
|
@@ -92,6 +93,12 @@ export type IPaymentCheckoutDetails = {
|
|
|
92
93
|
publishableApiKey: string;
|
|
93
94
|
successUrl: string;
|
|
94
95
|
};
|
|
96
|
+
paypal?: {
|
|
97
|
+
orderId: string;
|
|
98
|
+
clientId: string;
|
|
99
|
+
successUrl: string;
|
|
100
|
+
currencyCode: string;
|
|
101
|
+
};
|
|
95
102
|
isSplitPayment?: boolean;
|
|
96
103
|
totalAuthorizedAmount?: number;
|
|
97
104
|
};
|
|
@@ -114,9 +114,40 @@ export declare const EditGiftCardSchema: z.ZodObject<{
|
|
|
114
114
|
recipientPhone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
115
115
|
}, z.core.$strip>;
|
|
116
116
|
export type IEditGiftCardRequest = z.infer<typeof EditGiftCardSchema>;
|
|
117
|
+
/**
|
|
118
|
+
* Payment type enum - defines how payment is processed
|
|
119
|
+
*/
|
|
120
|
+
export declare enum EGiftCardPaymentType {
|
|
121
|
+
Passthrough = "Passthrough",// VGS tokenization
|
|
122
|
+
PaymentProcessor = "PaymentProcessor"
|
|
123
|
+
}
|
|
117
124
|
/**
|
|
118
125
|
* Schema for validating purchasing a gift card.
|
|
119
126
|
*/
|
|
127
|
+
export declare const CreatePaymentSessionSchema: z.ZodObject<{
|
|
128
|
+
companyId: z.ZodNumber;
|
|
129
|
+
amount: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodType<number, unknown, z.core.$ZodTypeInternals<number, unknown>>>;
|
|
130
|
+
currency: z.ZodDefault<z.ZodString>;
|
|
131
|
+
}, z.core.$strip>;
|
|
132
|
+
export type ICreatePaymentSessionRequest = z.infer<typeof CreatePaymentSessionSchema>;
|
|
133
|
+
export type ICreatePaymentSessionResponse = {
|
|
134
|
+
sessionId: string;
|
|
135
|
+
sessionData: string;
|
|
136
|
+
clientKey: string;
|
|
137
|
+
};
|
|
138
|
+
export declare const PaymentProcessorDataSchema: z.ZodObject<{
|
|
139
|
+
sessionId: z.ZodString;
|
|
140
|
+
resultCode: z.ZodString;
|
|
141
|
+
pspReference: z.ZodOptional<z.ZodString>;
|
|
142
|
+
}, z.core.$strip>;
|
|
143
|
+
export type IPaymentProcessorData = z.infer<typeof PaymentProcessorDataSchema>;
|
|
144
|
+
export declare const PassthroughPaymentDataSchema: z.ZodObject<{
|
|
145
|
+
cardHolder: z.ZodString;
|
|
146
|
+
cardNumberToken: z.ZodString;
|
|
147
|
+
cardCvcToken: z.ZodString;
|
|
148
|
+
cardExpiry: z.ZodString;
|
|
149
|
+
}, z.core.$strip>;
|
|
150
|
+
export type IPassthroughPaymentData = z.infer<typeof PassthroughPaymentDataSchema>;
|
|
120
151
|
export declare const PurchaseGiftCardSchema: z.ZodObject<{
|
|
121
152
|
amount: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodType<number, unknown, z.core.$ZodTypeInternals<number, unknown>>>;
|
|
122
153
|
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -140,15 +171,34 @@ export declare const PurchaseGiftCardSchema: z.ZodObject<{
|
|
|
140
171
|
companyId: z.ZodNumber;
|
|
141
172
|
sendViaEmail: z.ZodDefault<z.ZodBoolean>;
|
|
142
173
|
payment: z.ZodOptional<z.ZodObject<{
|
|
174
|
+
sessionId: z.ZodString;
|
|
175
|
+
resultCode: z.ZodString;
|
|
176
|
+
pspReference: z.ZodOptional<z.ZodString>;
|
|
177
|
+
}, z.core.$strip>>;
|
|
178
|
+
passthroughPayment: z.ZodOptional<z.ZodObject<{
|
|
143
179
|
cardHolder: z.ZodString;
|
|
144
180
|
cardNumberToken: z.ZodString;
|
|
145
|
-
cardExpiry: z.ZodString;
|
|
146
181
|
cardCvcToken: z.ZodString;
|
|
182
|
+
cardExpiry: z.ZodString;
|
|
147
183
|
}, z.core.$strip>>;
|
|
148
184
|
}, z.core.$strip>;
|
|
149
185
|
export type IPurchaseGiftCardRequest = z.infer<typeof PurchaseGiftCardSchema>;
|
|
186
|
+
export type IPurchasePaymentData = {
|
|
187
|
+
payment: IPaymentProcessorData;
|
|
188
|
+
} | {
|
|
189
|
+
passthroughPayment: IPassthroughPaymentData;
|
|
190
|
+
};
|
|
150
191
|
export type IPurchaseGiftCardResponse = IGiftCardDTO & {
|
|
151
|
-
password: string;
|
|
192
|
+
password: string | null;
|
|
193
|
+
};
|
|
194
|
+
export declare const RefundGiftCardSchema: z.ZodObject<{
|
|
195
|
+
giftCardId: z.ZodNumber;
|
|
196
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
197
|
+
}, z.core.$strip>;
|
|
198
|
+
export type IRefundGiftCardRequest = z.infer<typeof RefundGiftCardSchema>;
|
|
199
|
+
export type IRefundGiftCardResponse = {
|
|
200
|
+
success: boolean;
|
|
201
|
+
refundReference: string;
|
|
152
202
|
};
|
|
153
203
|
export declare const ValidateGiftCardSchema: z.ZodObject<{
|
|
154
204
|
companyId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -164,6 +214,34 @@ export declare const RedeemGiftCardSchema: z.ZodObject<{
|
|
|
164
214
|
description: z.ZodString;
|
|
165
215
|
}, z.core.$strip>;
|
|
166
216
|
export type IRedeemGiftCardRequest = z.infer<typeof RedeemGiftCardSchema>;
|
|
217
|
+
export declare enum EGiftCardPaymentProvider {
|
|
218
|
+
Adyen = "Adyen"
|
|
219
|
+
}
|
|
220
|
+
export declare enum EGiftCardPaymentStatus {
|
|
221
|
+
Pending = "Pending",
|
|
222
|
+
Authorized = "Authorized",
|
|
223
|
+
Captured = "Captured",
|
|
224
|
+
Failed = "Failed",
|
|
225
|
+
Refunded = "Refunded"
|
|
226
|
+
}
|
|
227
|
+
export declare enum AdyenResultCode {
|
|
228
|
+
Authorised = "Authorised",
|
|
229
|
+
Refused = "Refused",
|
|
230
|
+
Cancelled = "Cancelled",
|
|
231
|
+
Pending = "Pending",
|
|
232
|
+
Received = "Received",
|
|
233
|
+
Error = "Error",
|
|
234
|
+
IdentifyShopper = "IdentifyShopper",
|
|
235
|
+
ChallengeShopper = "ChallengeShopper"
|
|
236
|
+
}
|
|
237
|
+
export declare enum AdyenEventCode {
|
|
238
|
+
AUTHORISATION = "AUTHORISATION",
|
|
239
|
+
CAPTURE = "CAPTURE",
|
|
240
|
+
REFUND = "REFUND",
|
|
241
|
+
CANCELLATION = "CANCELLATION",
|
|
242
|
+
REFUND_FAILED = "REFUND_FAILED",
|
|
243
|
+
CAPTURE_FAILED = "CAPTURE_FAILED"
|
|
244
|
+
}
|
|
167
245
|
export declare enum EGiftCardTransactionType {
|
|
168
246
|
Purchase = "Purchase",
|
|
169
247
|
Redemption = "Redemption",
|
|
@@ -236,3 +314,12 @@ export type IAdminGiftCardLogDTO = {
|
|
|
236
314
|
new: string;
|
|
237
315
|
}> | null;
|
|
238
316
|
};
|
|
317
|
+
/**
|
|
318
|
+
* Email branding configuration for gift card emails.
|
|
319
|
+
*/
|
|
320
|
+
export type IGiftCardEmailBranding = {
|
|
321
|
+
logoUrl: string;
|
|
322
|
+
primaryColor: string;
|
|
323
|
+
backgroundColor: string;
|
|
324
|
+
cardImageUrl: string;
|
|
325
|
+
};
|
|
@@ -28,7 +28,7 @@ export declare enum ELogType {
|
|
|
28
28
|
UserCreated = "User Created",
|
|
29
29
|
UserLinked = "User Linked to Company",
|
|
30
30
|
Purchase = "Gift Card Purchased",
|
|
31
|
-
Payment = "Payment
|
|
31
|
+
Payment = "Payment",
|
|
32
32
|
Email = "Email Delivery",
|
|
33
33
|
Transaction = "Gift Card Transaction"
|
|
34
34
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export type IMaintenanceStatus = {
|
|
2
|
-
uuid: string;
|
|
3
2
|
/**
|
|
4
3
|
* Which service is currently experiencing issues.
|
|
5
4
|
*/
|
|
@@ -10,6 +9,10 @@ export type IMaintenanceStatus = {
|
|
|
10
9
|
* @example 2023-10-01T00:00:00Z
|
|
11
10
|
*/
|
|
12
11
|
startDate: string;
|
|
12
|
+
/**
|
|
13
|
+
* UUID generated on create. Is not used as a primary key, or an index.
|
|
14
|
+
*/
|
|
15
|
+
uuid: string;
|
|
13
16
|
endDate: string;
|
|
14
17
|
/**
|
|
15
18
|
* Whether the status is currently in effect or not
|
package/dist/types/index.d.ts
CHANGED
|
@@ -91,11 +91,11 @@ export * from './Events/IRoomstayEvent.type';
|
|
|
91
91
|
/**
|
|
92
92
|
* General
|
|
93
93
|
*/
|
|
94
|
+
export * from './General/Format.types';
|
|
94
95
|
export * from './General/HttpMethod.enum';
|
|
95
96
|
export * from './General/IMessage.type';
|
|
96
|
-
export * from './General/Warning.type';
|
|
97
97
|
export * from './General/Pagination.types';
|
|
98
|
-
export * from './General/
|
|
98
|
+
export * from './General/Warning.type';
|
|
99
99
|
/**
|
|
100
100
|
* Media
|
|
101
101
|
*/
|
|
@@ -106,10 +106,20 @@ export * from './Media/IMedia.type';
|
|
|
106
106
|
export * from './Fees/EFeeType.enum';
|
|
107
107
|
export * from './Fees/IFee.type';
|
|
108
108
|
export * from './Fees/IFeeConfigurationOptions.type';
|
|
109
|
+
/**
|
|
110
|
+
* Api
|
|
111
|
+
*/
|
|
112
|
+
export * from './Api/Reservations.type';
|
|
113
|
+
export * from './Api/RoomNightRate.type';
|
|
109
114
|
/**
|
|
110
115
|
* Analytics
|
|
111
116
|
*/
|
|
112
117
|
export * from './Analytics/IBigQueryResults.type';
|
|
118
|
+
/**
|
|
119
|
+
* Gift Cards
|
|
120
|
+
*/
|
|
121
|
+
export * from './GiftCards/GiftCard.types';
|
|
122
|
+
export * from './GiftCards/GiftCardAuth.types';
|
|
113
123
|
/**
|
|
114
124
|
* Addons
|
|
115
125
|
*/
|