@kohost/api-client 3.4.0 → 3.4.5
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/cjs/AMQPClient/index.js +1 -0
- package/dist/cjs/Client/index.js +812 -1622
- package/dist/cjs/schemas/definitions.json +1 -0
- package/dist/cjs/schemas/space.json +3 -0
- package/dist/esm/Client.js +839 -1664
- package/dist/esm/Client.js.map +2 -2
- package/dist/esm/Commands.js +16 -32
- package/dist/esm/Commands.js.map +1 -1
- package/dist/esm/Events.js +3 -6
- package/dist/esm/Events.js.map +1 -1
- package/dist/esm/Models.js +979 -1365
- package/dist/esm/Models.js.map +4 -4
- package/dist/esm/SocketIoClient.js +51 -61
- package/dist/esm/SocketIoClient.js.map +2 -2
- package/dist/esm/defs.js +31 -48
- package/dist/esm/defs.js.map +1 -1
- package/dist/esm/utils.js +982 -1369
- package/dist/esm/utils.js.map +4 -4
- package/dist/types/AMQPClient/index.d.ts +2 -2
- package/dist/types/AMQPClient/index.d.ts.map +1 -1
- package/dist/types/Client/index.d.ts +1 -2
- package/dist/types/Errors/index.d.ts +0 -36
- package/dist/types/Errors/index.d.ts.map +1 -1
- package/dist/types/Events/Event.d.ts +4 -12
- package/dist/types/Events/Event.d.ts.map +1 -1
- package/dist/types/Models/Entity.d.ts +1 -1
- package/dist/types/Models/Entity.d.ts.map +1 -1
- package/dist/types/Models/Ticket.d.ts +1 -1
- package/dist/types/Models/Ticket.d.ts.map +1 -1
- package/dist/types/Models/TimeSheet.d.ts +1 -1
- package/dist/types/Models/TimeSheet.d.ts.map +1 -1
- package/dist/types/Models/User.d.ts +1 -1
- package/dist/types/Models/User.d.ts.map +1 -1
- package/dist/types/SocketIoClient/index.d.ts +1 -2
- package/dist/types/defs/index.d.ts +0 -1
- package/dist/types/index.d.ts +0 -9
- package/dist/types/schemas/AlarmSchema.d.ts +1 -0
- package/dist/types/schemas/CameraSchema.d.ts +1 -0
- package/dist/types/schemas/CategorySchema.d.ts +1 -0
- package/dist/types/schemas/CourtesySchema.d.ts +1 -0
- package/dist/types/schemas/CredentialSchema.d.ts +1 -0
- package/dist/types/schemas/DimmerSchema.d.ts +1 -0
- package/dist/types/schemas/GatewaySchema.d.ts +1 -0
- package/dist/types/schemas/LockSchema.d.ts +1 -0
- package/dist/types/schemas/MediaSourceSchema.d.ts +1 -0
- package/dist/types/schemas/MotionSensorSchema.d.ts +1 -0
- package/dist/types/schemas/ProductSchema.d.ts +1 -0
- package/dist/types/schemas/ReservationSchema.d.ts +1 -0
- package/dist/types/schemas/RoomSchema.d.ts +10 -0
- package/dist/types/schemas/SpaceSchema.d.ts +2 -0
- package/dist/types/schemas/SwitchSchema.d.ts +1 -0
- package/dist/types/schemas/SystemUserSchema.d.ts +1 -0
- package/dist/types/schemas/ThermostatSchema.d.ts +1 -0
- package/dist/types/schemas/UserSchema.d.ts +1 -0
- package/dist/types/schemas/WindowCoveringSchema.d.ts +1 -0
- package/dist/types/utils/entityFactory.d.ts +1 -2
- package/dist/types/utils/entityFactory.d.ts.map +1 -1
- package/dist/types/utils/errorFactory.d.ts +1 -6
- package/dist/types/utils/errorFactory.d.ts.map +1 -1
- package/dist/types/utils/eventFactory.d.ts +1 -2
- package/dist/types/utils/eventFactory.d.ts.map +1 -1
- package/dist/useCases/AddDefaultScenesToRooms.js +4 -8
- package/dist/useCases/AddScenesToRoom.js +4 -8
- package/dist/useCases/AssignSpaceToReservation.js +4 -8
- package/dist/useCases/AutoAssociateDiscoveredDevices.js +4 -8
- package/dist/useCases/AutoCloseTickets.js +4 -8
- package/dist/useCases/BatchNotifyCheckIn.js +4 -8
- package/dist/useCases/BatchNotifyCheckOut.js +4 -8
- package/dist/useCases/BatchNotifyMissedCheckOut.js +4 -8
- package/dist/useCases/BatchNotifyPreArrival.js +4 -8
- package/dist/useCases/CheckInReservation.js +4 -8
- package/dist/useCases/CheckOutReservation.js +4 -8
- package/dist/useCases/CheckVerificationCode.js +4 -8
- package/dist/useCases/CreateAlarm.js +4 -8
- package/dist/useCases/CreateAnnouncement.js +4 -8
- package/dist/useCases/CreateCamera.js +4 -8
- package/dist/useCases/CreateCateory.js +4 -8
- package/dist/useCases/CreateCourtesy.js +4 -8
- package/dist/useCases/CreateDefaultScenes.js +4 -8
- package/dist/useCases/CreateDimmer.js +4 -8
- package/dist/useCases/CreateDiscoveredDevice.js +4 -8
- package/dist/useCases/CreateDiscoveredDeviceAssociation.js +4 -8
- package/dist/useCases/CreateDiscoveredDeviceAssociationMap.js +4 -8
- package/dist/useCases/CreateImageUploadEndpoint.js +4 -8
- package/dist/useCases/CreateLock.js +4 -8
- package/dist/useCases/CreateMediaSource.js +4 -8
- package/dist/useCases/CreateOrganization.js +4 -8
- package/dist/useCases/CreatePolicy.js +4 -8
- package/dist/useCases/CreateProperty.js +4 -8
- package/dist/useCases/CreateReservation.js +4 -8
- package/dist/useCases/CreateRoom.js +4 -8
- package/dist/useCases/CreateRoomInSpace.js +4 -8
- package/dist/useCases/CreateScene.js +4 -8
- package/dist/useCases/CreateSpace.js +4 -8
- package/dist/useCases/CreateSwitch.js +4 -8
- package/dist/useCases/CreateThermostat.js +4 -8
- package/dist/useCases/CreateTicket.js +4 -8
- package/dist/useCases/CreateTicketMessage.js +4 -8
- package/dist/useCases/CreateTimeSheet.js +4 -8
- package/dist/useCases/CreateTimeSheetTimeEntry.js +4 -8
- package/dist/useCases/CreateUser.js +4 -8
- package/dist/useCases/CreateUserMobileKey.js +4 -8
- package/dist/useCases/CreateWindowCovering.js +4 -8
- package/dist/useCases/DeleteAlarm.js +4 -8
- package/dist/useCases/DeleteAnnouncement.js +4 -8
- package/dist/useCases/DeleteCamera.js +4 -8
- package/dist/useCases/DeleteCategory.js +4 -8
- package/dist/useCases/DeleteCourtesy.js +4 -8
- package/dist/useCases/DeleteDimmer.js +4 -8
- package/dist/useCases/DeleteDiscoveredDevice.js +4 -8
- package/dist/useCases/DeleteLock.js +4 -8
- package/dist/useCases/DeleteMediaFile.js +4 -8
- package/dist/useCases/DeleteMediaSource.js +4 -8
- package/dist/useCases/DeletePolicy.js +4 -8
- package/dist/useCases/DeleteReservation.js +4 -8
- package/dist/useCases/DeleteRoom.js +4 -8
- package/dist/useCases/DeleteSpace.js +4 -8
- package/dist/useCases/DeleteSwitch.js +4 -8
- package/dist/useCases/DeleteThermostat.js +4 -8
- package/dist/useCases/DeleteTicket.js +4 -8
- package/dist/useCases/DeleteTimeSheet.js +4 -8
- package/dist/useCases/DeleteTimeSheetTimeEntry.js +4 -8
- package/dist/useCases/DeleteUser.js +4 -8
- package/dist/useCases/DeleteUserCredential.js +4 -8
- package/dist/useCases/DeleteWindowCovering.js +4 -8
- package/dist/useCases/DescribeAlarm.js +4 -8
- package/dist/useCases/DescribeAlarmConfig.js +4 -8
- package/dist/useCases/DescribeAnnouncement.js +4 -8
- package/dist/useCases/DescribeCamera.js +4 -8
- package/dist/useCases/DescribeCategory.js +4 -8
- package/dist/useCases/DescribeCourtesy.js +4 -8
- package/dist/useCases/DescribeDimmer.js +4 -8
- package/dist/useCases/DescribeDiscoveredDevice.js +4 -8
- package/dist/useCases/DescribeLock.js +4 -8
- package/dist/useCases/DescribeLockCredential.js +4 -8
- package/dist/useCases/DescribeMediaSource.js +4 -8
- package/dist/useCases/DescribeMyAuth.js +4 -8
- package/dist/useCases/DescribeMyMobileKeyApp.js +4 -8
- package/dist/useCases/DescribeMyOrganization.js +4 -8
- package/dist/useCases/DescribeMyPasskeyRegistrations.js +4 -8
- package/dist/useCases/DescribeOrganization.js +4 -8
- package/dist/useCases/DescribePolicy.js +4 -8
- package/dist/useCases/DescribeProduct.js +4 -8
- package/dist/useCases/DescribeProperty.js +4 -8
- package/dist/useCases/DescribeReservation.js +4 -8
- package/dist/useCases/DescribeReservationEarlyCheckInProducts.js +4 -8
- package/dist/useCases/DescribeReservationLateCheckOutProducts.js +4 -8
- package/dist/useCases/DescribeReservationPetProducts.js +4 -8
- package/dist/useCases/DescribeReservationPromos.js +4 -8
- package/dist/useCases/DescribeReservationRoomUpgrades.js +4 -8
- package/dist/useCases/DescribeRoom.js +4 -8
- package/dist/useCases/DescribeSOS.js +4 -8
- package/dist/useCases/DescribeSelf.js +4 -8
- package/dist/useCases/DescribeSpace.js +4 -8
- package/dist/useCases/DescribeSwitch.js +4 -8
- package/dist/useCases/DescribeThermostat.js +4 -8
- package/dist/useCases/DescribeTicket.js +4 -8
- package/dist/useCases/DescribeTicketStats.js +4 -8
- package/dist/useCases/DescribeTimeSheet.js +4 -8
- package/dist/useCases/DescribeTimeSheetStats.js +4 -8
- package/dist/useCases/DescribeUser.js +4 -8
- package/dist/useCases/DescribeWindowCovering.js +4 -8
- package/dist/useCases/DiscoverReservations.js +4 -8
- package/dist/useCases/EmailUserAccountSetup.js +4 -8
- package/dist/useCases/FinishRegisterPasskey.js +4 -8
- package/dist/useCases/ListAlarms.js +4 -8
- package/dist/useCases/ListAnnouncements.js +4 -8
- package/dist/useCases/ListCameras.js +4 -8
- package/dist/useCases/ListCategories.js +4 -8
- package/dist/useCases/ListCourtesy.js +4 -8
- package/dist/useCases/ListDimmers.js +4 -8
- package/dist/useCases/ListDiscoveredDevices.js +4 -8
- package/dist/useCases/ListLocks.js +4 -8
- package/dist/useCases/ListMediaSources.js +4 -8
- package/dist/useCases/ListMyOrders.js +4 -8
- package/dist/useCases/ListMyProperties.js +4 -8
- package/dist/useCases/ListMyReservations.js +4 -8
- package/dist/useCases/ListMySpaces.js +4 -8
- package/dist/useCases/ListMyTickets.js +4 -8
- package/dist/useCases/ListMyTimeSheets.js +4 -8
- package/dist/useCases/ListOrders.js +4 -8
- package/dist/useCases/ListOrganizations.js +4 -8
- package/dist/useCases/ListPolicies.js +4 -8
- package/dist/useCases/ListProducts.js +4 -8
- package/dist/useCases/ListProperties.js +4 -8
- package/dist/useCases/ListReservations.js +4 -8
- package/dist/useCases/ListRooms.js +4 -8
- package/dist/useCases/ListRoomsInSpace.js +4 -8
- package/dist/useCases/ListScenes.js +4 -8
- package/dist/useCases/ListSpaces.js +4 -8
- package/dist/useCases/ListSwitches.js +4 -8
- package/dist/useCases/ListTeam.js +4 -8
- package/dist/useCases/ListThermostats.js +4 -8
- package/dist/useCases/ListTickets.js +4 -8
- package/dist/useCases/ListTimeSheets.js +4 -8
- package/dist/useCases/ListUserMobileKeys.js +4 -8
- package/dist/useCases/ListUserOrders.js +4 -8
- package/dist/useCases/ListUserReservations.js +4 -8
- package/dist/useCases/ListUserSpaces.js +4 -8
- package/dist/useCases/ListUsers.js +4 -8
- package/dist/useCases/ListWindowCoverings.js +4 -8
- package/dist/useCases/LoginFinish.js +4 -8
- package/dist/useCases/LoginStart.js +4 -8
- package/dist/useCases/LogoutUser.js +4 -8
- package/dist/useCases/MatchUserIdentification.js +4 -8
- package/dist/useCases/OCRDocument.js +4 -8
- package/dist/useCases/PurchaseReservationEarlyCheckInProducts.js +4 -8
- package/dist/useCases/PurchaseReservationLateCheckOutProducts.js +4 -8
- package/dist/useCases/PurchaseReservationPetProducts.js +4 -8
- package/dist/useCases/PurchaseReservationPromos.js +4 -8
- package/dist/useCases/PurchaseReservationRoomUpgrades.js +4 -8
- package/dist/useCases/RefreshToken.js +4 -8
- package/dist/useCases/RequestLoginToken.js +4 -8
- package/dist/useCases/SendCheckInSMS.js +4 -8
- package/dist/useCases/SendCheckOutSMS.js +4 -8
- package/dist/useCases/SendPreArrivalEmail.js +4 -8
- package/dist/useCases/SendPreArrivalSMS.js +4 -8
- package/dist/useCases/SendRoomControlSMS.js +4 -8
- package/dist/useCases/SendVerificationCode.js +4 -8
- package/dist/useCases/SetAlarm.js +4 -8
- package/dist/useCases/SetCamera.js +4 -8
- package/dist/useCases/SetCourtesy.js +4 -8
- package/dist/useCases/SetDimmer.js +4 -8
- package/dist/useCases/SetLock.js +4 -8
- package/dist/useCases/SetMediaSource.js +4 -8
- package/dist/useCases/SetRoomScene.js +4 -8
- package/dist/useCases/SetScene.js +4 -8
- package/dist/useCases/SetSpaceScene.js +4 -8
- package/dist/useCases/SetSwitch.js +4 -8
- package/dist/useCases/SetThermostat.js +4 -8
- package/dist/useCases/SetWindowCovering.js +4 -8
- package/dist/useCases/StartRegisterPasskey.js +4 -8
- package/dist/useCases/StartSOS.js +4 -8
- package/dist/useCases/StopSOS.js +4 -8
- package/dist/useCases/TipUser.js +4 -8
- package/dist/useCases/UpdateAlarm.js +4 -8
- package/dist/useCases/UpdateAnnouncement.js +4 -8
- package/dist/useCases/UpdateCamera.js +4 -8
- package/dist/useCases/UpdateCategory.js +4 -8
- package/dist/useCases/UpdateCourtesy.js +4 -8
- package/dist/useCases/UpdateDimmer.js +4 -8
- package/dist/useCases/UpdateDiscoveredDevice.js +4 -8
- package/dist/useCases/UpdateLock.js +4 -8
- package/dist/useCases/UpdateMediaSource.js +4 -8
- package/dist/useCases/UpdateMessageReadStatus.js +4 -8
- package/dist/useCases/UpdateOrganization.js +4 -8
- package/dist/useCases/UpdatePolicy.js +4 -8
- package/dist/useCases/UpdateProperty.js +4 -8
- package/dist/useCases/UpdateReservation.js +4 -8
- package/dist/useCases/UpdateReservationExpectedArrivalTime.js +4 -8
- package/dist/useCases/UpdateRoom.js +4 -8
- package/dist/useCases/UpdateSelf.js +4 -8
- package/dist/useCases/UpdateSpace.js +4 -8
- package/dist/useCases/UpdateSwitch.js +4 -8
- package/dist/useCases/UpdateThermostat.js +4 -8
- package/dist/useCases/UpdateTicket.js +4 -8
- package/dist/useCases/UpdateTicketStatus.js +4 -8
- package/dist/useCases/UpdateTimeSheet.js +4 -8
- package/dist/useCases/UpdateTimeSheetTimeEntry.js +4 -8
- package/dist/useCases/UpdateUser.js +4 -8
- package/dist/useCases/UpdateWindowCovering.js +4 -8
- package/dist/useCases/UploadImage.js +4 -8
- package/dist/useCases/UpsertDiscoveredDevice.js +4 -8
- package/package.json +9 -10
package/dist/esm/utils.js
CHANGED
|
@@ -407,43 +407,43 @@ var require_codegen = __commonJS({
|
|
|
407
407
|
var code_1 = require_code();
|
|
408
408
|
var scope_1 = require_scope();
|
|
409
409
|
var code_2 = require_code();
|
|
410
|
-
Object.defineProperty(exports, "_", { enumerable: true, get: function() {
|
|
410
|
+
Object.defineProperty(exports, "_", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
411
411
|
return code_2._;
|
|
412
|
-
} });
|
|
413
|
-
Object.defineProperty(exports, "str", { enumerable: true, get: function() {
|
|
412
|
+
}, "get") });
|
|
413
|
+
Object.defineProperty(exports, "str", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
414
414
|
return code_2.str;
|
|
415
|
-
} });
|
|
416
|
-
Object.defineProperty(exports, "strConcat", { enumerable: true, get: function() {
|
|
415
|
+
}, "get") });
|
|
416
|
+
Object.defineProperty(exports, "strConcat", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
417
417
|
return code_2.strConcat;
|
|
418
|
-
} });
|
|
419
|
-
Object.defineProperty(exports, "nil", { enumerable: true, get: function() {
|
|
418
|
+
}, "get") });
|
|
419
|
+
Object.defineProperty(exports, "nil", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
420
420
|
return code_2.nil;
|
|
421
|
-
} });
|
|
422
|
-
Object.defineProperty(exports, "getProperty", { enumerable: true, get: function() {
|
|
421
|
+
}, "get") });
|
|
422
|
+
Object.defineProperty(exports, "getProperty", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
423
423
|
return code_2.getProperty;
|
|
424
|
-
} });
|
|
425
|
-
Object.defineProperty(exports, "stringify", { enumerable: true, get: function() {
|
|
424
|
+
}, "get") });
|
|
425
|
+
Object.defineProperty(exports, "stringify", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
426
426
|
return code_2.stringify;
|
|
427
|
-
} });
|
|
428
|
-
Object.defineProperty(exports, "regexpCode", { enumerable: true, get: function() {
|
|
427
|
+
}, "get") });
|
|
428
|
+
Object.defineProperty(exports, "regexpCode", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
429
429
|
return code_2.regexpCode;
|
|
430
|
-
} });
|
|
431
|
-
Object.defineProperty(exports, "Name", { enumerable: true, get: function() {
|
|
430
|
+
}, "get") });
|
|
431
|
+
Object.defineProperty(exports, "Name", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
432
432
|
return code_2.Name;
|
|
433
|
-
} });
|
|
433
|
+
}, "get") });
|
|
434
434
|
var scope_2 = require_scope();
|
|
435
|
-
Object.defineProperty(exports, "Scope", { enumerable: true, get: function() {
|
|
435
|
+
Object.defineProperty(exports, "Scope", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
436
436
|
return scope_2.Scope;
|
|
437
|
-
} });
|
|
438
|
-
Object.defineProperty(exports, "ValueScope", { enumerable: true, get: function() {
|
|
437
|
+
}, "get") });
|
|
438
|
+
Object.defineProperty(exports, "ValueScope", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
439
439
|
return scope_2.ValueScope;
|
|
440
|
-
} });
|
|
441
|
-
Object.defineProperty(exports, "ValueScopeName", { enumerable: true, get: function() {
|
|
440
|
+
}, "get") });
|
|
441
|
+
Object.defineProperty(exports, "ValueScopeName", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
442
442
|
return scope_2.ValueScopeName;
|
|
443
|
-
} });
|
|
444
|
-
Object.defineProperty(exports, "varKinds", { enumerable: true, get: function() {
|
|
443
|
+
}, "get") });
|
|
444
|
+
Object.defineProperty(exports, "varKinds", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
445
445
|
return scope_2.varKinds;
|
|
446
|
-
} });
|
|
446
|
+
}, "get") });
|
|
447
447
|
exports.operators = {
|
|
448
448
|
GT: new code_1._Code(">"),
|
|
449
449
|
GTE: new code_1._Code(">="),
|
|
@@ -1310,25 +1310,25 @@ var require_util = __commonJS({
|
|
|
1310
1310
|
__name(makeMergeEvaluated, "makeMergeEvaluated");
|
|
1311
1311
|
exports.mergeEvaluated = {
|
|
1312
1312
|
props: makeMergeEvaluated({
|
|
1313
|
-
mergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => {
|
|
1313
|
+
mergeNames: /* @__PURE__ */ __name((gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => {
|
|
1314
1314
|
gen.if((0, codegen_1._)`${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._)`${to} || {}`).code((0, codegen_1._)`Object.assign(${to}, ${from})`));
|
|
1315
|
-
}),
|
|
1316
|
-
mergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => {
|
|
1315
|
+
}), "mergeNames"),
|
|
1316
|
+
mergeToName: /* @__PURE__ */ __name((gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => {
|
|
1317
1317
|
if (from === true) {
|
|
1318
1318
|
gen.assign(to, true);
|
|
1319
1319
|
} else {
|
|
1320
1320
|
gen.assign(to, (0, codegen_1._)`${to} || {}`);
|
|
1321
1321
|
setEvaluated(gen, to, from);
|
|
1322
1322
|
}
|
|
1323
|
-
}),
|
|
1324
|
-
mergeValues: (from, to) => from === true ? true : { ...from, ...to },
|
|
1323
|
+
}), "mergeToName"),
|
|
1324
|
+
mergeValues: /* @__PURE__ */ __name((from, to) => from === true ? true : { ...from, ...to }, "mergeValues"),
|
|
1325
1325
|
resultToName: evaluatedPropsToName
|
|
1326
1326
|
}),
|
|
1327
1327
|
items: makeMergeEvaluated({
|
|
1328
|
-
mergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_1._)`${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)),
|
|
1329
|
-
mergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_1._)`${to} > ${from} ? ${to} : ${from}`)),
|
|
1330
|
-
mergeValues: (from, to) => from === true ? true : Math.max(from, to),
|
|
1331
|
-
resultToName: (gen, items) => gen.var("items", items)
|
|
1328
|
+
mergeNames: /* @__PURE__ */ __name((gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_1._)`${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)), "mergeNames"),
|
|
1329
|
+
mergeToName: /* @__PURE__ */ __name((gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_1._)`${to} > ${from} ? ${to} : ${from}`)), "mergeToName"),
|
|
1330
|
+
mergeValues: /* @__PURE__ */ __name((from, to) => from === true ? true : Math.max(from, to), "mergeValues"),
|
|
1331
|
+
resultToName: /* @__PURE__ */ __name((gen, items) => gen.var("items", items), "resultToName")
|
|
1332
1332
|
})
|
|
1333
1333
|
};
|
|
1334
1334
|
function evaluatedPropsToName(gen, ps) {
|
|
@@ -1431,10 +1431,10 @@ var require_errors = __commonJS({
|
|
|
1431
1431
|
var util_1 = require_util();
|
|
1432
1432
|
var names_1 = require_names();
|
|
1433
1433
|
exports.keywordError = {
|
|
1434
|
-
message: ({ keyword }) => (0, codegen_1.str)`must pass "${keyword}" keyword validation
|
|
1434
|
+
message: /* @__PURE__ */ __name(({ keyword }) => (0, codegen_1.str)`must pass "${keyword}" keyword validation`, "message")
|
|
1435
1435
|
};
|
|
1436
1436
|
exports.keyword$DataError = {
|
|
1437
|
-
message: ({ keyword, schemaType }) => schemaType ? (0, codegen_1.str)`"${keyword}" keyword must be ${schemaType} ($data)` : (0, codegen_1.str)`"${keyword}" keyword is invalid ($data)
|
|
1437
|
+
message: /* @__PURE__ */ __name(({ keyword, schemaType }) => schemaType ? (0, codegen_1.str)`"${keyword}" keyword must be ${schemaType} ($data)` : (0, codegen_1.str)`"${keyword}" keyword is invalid ($data)`, "message")
|
|
1438
1438
|
};
|
|
1439
1439
|
function reportError(cxt, error = exports.keywordError, errorPaths, overrideAllErrors) {
|
|
1440
1440
|
const { it } = cxt;
|
|
@@ -1835,8 +1835,8 @@ var require_dataType = __commonJS({
|
|
|
1835
1835
|
__name(checkDataTypes, "checkDataTypes");
|
|
1836
1836
|
exports.checkDataTypes = checkDataTypes;
|
|
1837
1837
|
var typeError = {
|
|
1838
|
-
message: ({ schema }) => `must be ${schema}`,
|
|
1839
|
-
params: ({ schema, schemaValue }) => typeof schema == "string" ? (0, codegen_1._)`{type: ${schema}}` : (0, codegen_1._)`{type: ${schemaValue}}
|
|
1838
|
+
message: /* @__PURE__ */ __name(({ schema }) => `must be ${schema}`, "message"),
|
|
1839
|
+
params: /* @__PURE__ */ __name(({ schema, schemaValue }) => typeof schema == "string" ? (0, codegen_1._)`{type: ${schema}}` : (0, codegen_1._)`{type: ${schemaValue}}`, "params")
|
|
1840
1840
|
};
|
|
1841
1841
|
function reportTypeError(it) {
|
|
1842
1842
|
const cxt = getTypeErrorContext(it);
|
|
@@ -2272,38 +2272,28 @@ var require_fast_deep_equal = __commonJS({
|
|
|
2272
2272
|
"node_modules/fast-deep-equal/index.js"(exports, module) {
|
|
2273
2273
|
"use strict";
|
|
2274
2274
|
module.exports = /* @__PURE__ */ __name(function equal(a, b) {
|
|
2275
|
-
if (a === b)
|
|
2276
|
-
return true;
|
|
2275
|
+
if (a === b) return true;
|
|
2277
2276
|
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
2278
|
-
if (a.constructor !== b.constructor)
|
|
2279
|
-
return false;
|
|
2277
|
+
if (a.constructor !== b.constructor) return false;
|
|
2280
2278
|
var length, i, keys;
|
|
2281
2279
|
if (Array.isArray(a)) {
|
|
2282
2280
|
length = a.length;
|
|
2283
|
-
if (length != b.length)
|
|
2284
|
-
return false;
|
|
2281
|
+
if (length != b.length) return false;
|
|
2285
2282
|
for (i = length; i-- !== 0; )
|
|
2286
|
-
if (!equal(a[i], b[i]))
|
|
2287
|
-
return false;
|
|
2283
|
+
if (!equal(a[i], b[i])) return false;
|
|
2288
2284
|
return true;
|
|
2289
2285
|
}
|
|
2290
|
-
if (a.constructor === RegExp)
|
|
2291
|
-
|
|
2292
|
-
if (a.
|
|
2293
|
-
return a.valueOf() === b.valueOf();
|
|
2294
|
-
if (a.toString !== Object.prototype.toString)
|
|
2295
|
-
return a.toString() === b.toString();
|
|
2286
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
2287
|
+
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
2288
|
+
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
2296
2289
|
keys = Object.keys(a);
|
|
2297
2290
|
length = keys.length;
|
|
2298
|
-
if (length !== Object.keys(b).length)
|
|
2299
|
-
return false;
|
|
2291
|
+
if (length !== Object.keys(b).length) return false;
|
|
2300
2292
|
for (i = length; i-- !== 0; )
|
|
2301
|
-
if (!Object.prototype.hasOwnProperty.call(b, keys[i]))
|
|
2302
|
-
return false;
|
|
2293
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
2303
2294
|
for (i = length; i-- !== 0; ) {
|
|
2304
2295
|
var key = keys[i];
|
|
2305
|
-
if (!equal(a[key], b[key]))
|
|
2306
|
-
return false;
|
|
2296
|
+
if (!equal(a[key], b[key])) return false;
|
|
2307
2297
|
}
|
|
2308
2298
|
return true;
|
|
2309
2299
|
}
|
|
@@ -3410,1070 +3400,702 @@ var require_data = __commonJS({
|
|
|
3410
3400
|
}
|
|
3411
3401
|
});
|
|
3412
3402
|
|
|
3413
|
-
// node_modules/uri
|
|
3414
|
-
var
|
|
3415
|
-
"node_modules/uri
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3403
|
+
// node_modules/fast-uri/lib/scopedChars.js
|
|
3404
|
+
var require_scopedChars = __commonJS({
|
|
3405
|
+
"node_modules/fast-uri/lib/scopedChars.js"(exports, module) {
|
|
3406
|
+
"use strict";
|
|
3407
|
+
var HEX = {
|
|
3408
|
+
0: 0,
|
|
3409
|
+
1: 1,
|
|
3410
|
+
2: 2,
|
|
3411
|
+
3: 3,
|
|
3412
|
+
4: 4,
|
|
3413
|
+
5: 5,
|
|
3414
|
+
6: 6,
|
|
3415
|
+
7: 7,
|
|
3416
|
+
8: 8,
|
|
3417
|
+
9: 9,
|
|
3418
|
+
a: 10,
|
|
3419
|
+
A: 10,
|
|
3420
|
+
b: 11,
|
|
3421
|
+
B: 11,
|
|
3422
|
+
c: 12,
|
|
3423
|
+
C: 12,
|
|
3424
|
+
d: 13,
|
|
3425
|
+
D: 13,
|
|
3426
|
+
e: 14,
|
|
3427
|
+
E: 14,
|
|
3428
|
+
f: 15,
|
|
3429
|
+
F: 15
|
|
3430
|
+
};
|
|
3431
|
+
module.exports = {
|
|
3432
|
+
HEX
|
|
3433
|
+
};
|
|
3434
|
+
}
|
|
3435
|
+
});
|
|
3436
|
+
|
|
3437
|
+
// node_modules/fast-uri/lib/utils.js
|
|
3438
|
+
var require_utils = __commonJS({
|
|
3439
|
+
"node_modules/fast-uri/lib/utils.js"(exports, module) {
|
|
3440
|
+
"use strict";
|
|
3441
|
+
var { HEX } = require_scopedChars();
|
|
3442
|
+
function normalizeIPv4(host) {
|
|
3443
|
+
if (findToken(host, ".") < 3) {
|
|
3444
|
+
return { host, isIPV4: false };
|
|
3445
|
+
}
|
|
3446
|
+
const matches = host.match(/^(?:(?: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])$/u) || [];
|
|
3447
|
+
const [address] = matches;
|
|
3448
|
+
if (address) {
|
|
3449
|
+
return { host: stripLeadingZeros(address, "."), isIPV4: true };
|
|
3450
|
+
} else {
|
|
3451
|
+
return { host, isIPV4: false };
|
|
3452
|
+
}
|
|
3453
|
+
}
|
|
3454
|
+
__name(normalizeIPv4, "normalizeIPv4");
|
|
3455
|
+
function stringArrayToHexStripped(input, keepZero = false) {
|
|
3456
|
+
let acc = "";
|
|
3457
|
+
let strip = true;
|
|
3458
|
+
for (const c of input) {
|
|
3459
|
+
if (HEX[c] === void 0) return void 0;
|
|
3460
|
+
if (c !== "0" && strip === true) strip = false;
|
|
3461
|
+
if (!strip) acc += c;
|
|
3462
|
+
}
|
|
3463
|
+
if (keepZero && acc.length === 0) acc = "0";
|
|
3464
|
+
return acc;
|
|
3465
|
+
}
|
|
3466
|
+
__name(stringArrayToHexStripped, "stringArrayToHexStripped");
|
|
3467
|
+
function getIPV6(input) {
|
|
3468
|
+
let tokenCount = 0;
|
|
3469
|
+
const output = { error: false, address: "", zone: "" };
|
|
3470
|
+
const address = [];
|
|
3471
|
+
const buffer = [];
|
|
3472
|
+
let isZone = false;
|
|
3473
|
+
let endipv6Encountered = false;
|
|
3474
|
+
let endIpv6 = false;
|
|
3475
|
+
function consume() {
|
|
3476
|
+
if (buffer.length) {
|
|
3477
|
+
if (isZone === false) {
|
|
3478
|
+
const hex = stringArrayToHexStripped(buffer);
|
|
3479
|
+
if (hex !== void 0) {
|
|
3480
|
+
address.push(hex);
|
|
3481
|
+
} else {
|
|
3482
|
+
output.error = true;
|
|
3483
|
+
return false;
|
|
3484
|
+
}
|
|
3485
|
+
}
|
|
3486
|
+
buffer.length = 0;
|
|
3423
3487
|
}
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3488
|
+
return true;
|
|
3489
|
+
}
|
|
3490
|
+
__name(consume, "consume");
|
|
3491
|
+
for (let i = 0; i < input.length; i++) {
|
|
3492
|
+
const cursor = input[i];
|
|
3493
|
+
if (cursor === "[" || cursor === "]") {
|
|
3494
|
+
continue;
|
|
3495
|
+
}
|
|
3496
|
+
if (cursor === ":") {
|
|
3497
|
+
if (endipv6Encountered === true) {
|
|
3498
|
+
endIpv6 = true;
|
|
3499
|
+
}
|
|
3500
|
+
if (!consume()) {
|
|
3501
|
+
break;
|
|
3502
|
+
}
|
|
3503
|
+
tokenCount++;
|
|
3504
|
+
address.push(":");
|
|
3505
|
+
if (tokenCount > 7) {
|
|
3506
|
+
output.error = true;
|
|
3507
|
+
break;
|
|
3429
3508
|
}
|
|
3430
|
-
|
|
3431
|
-
|
|
3509
|
+
if (i - 1 >= 0 && input[i - 1] === ":") {
|
|
3510
|
+
endipv6Encountered = true;
|
|
3511
|
+
}
|
|
3512
|
+
continue;
|
|
3513
|
+
} else if (cursor === "%") {
|
|
3514
|
+
if (!consume()) {
|
|
3515
|
+
break;
|
|
3516
|
+
}
|
|
3517
|
+
isZone = true;
|
|
3432
3518
|
} else {
|
|
3433
|
-
|
|
3519
|
+
buffer.push(cursor);
|
|
3520
|
+
continue;
|
|
3434
3521
|
}
|
|
3435
3522
|
}
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
__name(typeOf, "typeOf");
|
|
3445
|
-
function toUpperCase(str) {
|
|
3446
|
-
return str.toUpperCase();
|
|
3523
|
+
if (buffer.length) {
|
|
3524
|
+
if (isZone) {
|
|
3525
|
+
output.zone = buffer.join("");
|
|
3526
|
+
} else if (endIpv6) {
|
|
3527
|
+
address.push(buffer.join(""));
|
|
3528
|
+
} else {
|
|
3529
|
+
address.push(stringArrayToHexStripped(buffer));
|
|
3530
|
+
}
|
|
3447
3531
|
}
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3532
|
+
output.address = address.join("");
|
|
3533
|
+
return output;
|
|
3534
|
+
}
|
|
3535
|
+
__name(getIPV6, "getIPV6");
|
|
3536
|
+
function normalizeIPv6(host, opts = {}) {
|
|
3537
|
+
if (findToken(host, ":") < 2) {
|
|
3538
|
+
return { host, isIPV6: false };
|
|
3451
3539
|
}
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3540
|
+
const ipv6 = getIPV6(host);
|
|
3541
|
+
if (!ipv6.error) {
|
|
3542
|
+
let newHost = ipv6.address;
|
|
3543
|
+
let escapedHost = ipv6.address;
|
|
3544
|
+
if (ipv6.zone) {
|
|
3545
|
+
newHost += "%" + ipv6.zone;
|
|
3546
|
+
escapedHost += "%25" + ipv6.zone;
|
|
3459
3547
|
}
|
|
3460
|
-
return
|
|
3461
|
-
}
|
|
3462
|
-
|
|
3463
|
-
function buildExps(isIRI2) {
|
|
3464
|
-
var ALPHA$$ = "[A-Za-z]", CR$ = "[\\x0D]", DIGIT$$ = "[0-9]", DQUOTE$$ = "[\\x22]", HEXDIG$$2 = merge(DIGIT$$, "[A-Fa-f]"), LF$$ = "[\\x0A]", SP$$ = "[\\x20]", PCT_ENCODED$2 = subexp(subexp("%[EFef]" + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2) + "|" + subexp("%" + HEXDIG$$2 + HEXDIG$$2)), GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), UCSCHAR$$ = isIRI2 ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", IPRIVATE$$ = isIRI2 ? "[\\uE000-\\uF8FF]" : "[]", UNRESERVED$$2 = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), USERINFO$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge(UNRESERVED$$2, SUB_DELIMS$$, "[\\:]")) + "*"), DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), H16$ = subexp(HEXDIG$$2 + "{1,4}"), LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), ZONEID$ = subexp(subexp(UNRESERVED$$2 + "|" + PCT_ENCODED$2) + "+"), IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$2 + "{2})") + ZONEID$), IPVFUTURE$ = subexp("[vV]" + HEXDIG$$2 + "+\\." + merge(UNRESERVED$$2, SUB_DELIMS$$, "[\\:]") + "+"), IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), REG_NAME$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge(UNRESERVED$$2, SUB_DELIMS$$)) + "*"), HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")|" + REG_NAME$), PORT$ = subexp(DIGIT$$ + "*"), AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), PCHAR$ = subexp(PCT_ENCODED$2 + "|" + merge(UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@]")), SEGMENT$ = subexp(PCHAR$ + "*"), SEGMENT_NZ$ = subexp(PCHAR$ + "+"), SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge(UNRESERVED$$2, SUB_DELIMS$$, "[\\@]")) + "+"), PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), PATH_EMPTY$ = "(?!" + PCHAR$ + ")", PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$";
|
|
3465
|
-
return {
|
|
3466
|
-
NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"),
|
|
3467
|
-
NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$2, SUB_DELIMS$$), "g"),
|
|
3468
|
-
NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$2, SUB_DELIMS$$), "g"),
|
|
3469
|
-
NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$2, SUB_DELIMS$$), "g"),
|
|
3470
|
-
NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$2, SUB_DELIMS$$), "g"),
|
|
3471
|
-
NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"),
|
|
3472
|
-
NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"),
|
|
3473
|
-
ESCAPE: new RegExp(merge("[^]", UNRESERVED$$2, SUB_DELIMS$$), "g"),
|
|
3474
|
-
UNRESERVED: new RegExp(UNRESERVED$$2, "g"),
|
|
3475
|
-
OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$2, RESERVED$$), "g"),
|
|
3476
|
-
PCT_ENCODED: new RegExp(PCT_ENCODED$2, "g"),
|
|
3477
|
-
IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"),
|
|
3478
|
-
IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$2 + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$")
|
|
3479
|
-
//RFC 6874, with relaxed parsing rules
|
|
3480
|
-
};
|
|
3548
|
+
return { host: newHost, escapedHost, isIPV6: true };
|
|
3549
|
+
} else {
|
|
3550
|
+
return { host, isIPV6: false };
|
|
3481
3551
|
}
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
if (i && _arr.length === i)
|
|
3495
|
-
break;
|
|
3496
|
-
}
|
|
3497
|
-
} catch (err) {
|
|
3498
|
-
_d = true;
|
|
3499
|
-
_e = err;
|
|
3500
|
-
} finally {
|
|
3501
|
-
try {
|
|
3502
|
-
if (!_n && _i["return"])
|
|
3503
|
-
_i["return"]();
|
|
3504
|
-
} finally {
|
|
3505
|
-
if (_d)
|
|
3506
|
-
throw _e;
|
|
3507
|
-
}
|
|
3552
|
+
}
|
|
3553
|
+
__name(normalizeIPv6, "normalizeIPv6");
|
|
3554
|
+
function stripLeadingZeros(str, token) {
|
|
3555
|
+
let out = "";
|
|
3556
|
+
let skip = true;
|
|
3557
|
+
const l = str.length;
|
|
3558
|
+
for (let i = 0; i < l; i++) {
|
|
3559
|
+
const c = str[i];
|
|
3560
|
+
if (c === "0" && skip) {
|
|
3561
|
+
if (i + 1 <= l && str[i + 1] === token || i + 1 === l) {
|
|
3562
|
+
out += c;
|
|
3563
|
+
skip = false;
|
|
3508
3564
|
}
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
return function(arr, i) {
|
|
3513
|
-
if (Array.isArray(arr)) {
|
|
3514
|
-
return arr;
|
|
3515
|
-
} else if (Symbol.iterator in Object(arr)) {
|
|
3516
|
-
return sliceIterator(arr, i);
|
|
3565
|
+
} else {
|
|
3566
|
+
if (c === token) {
|
|
3567
|
+
skip = true;
|
|
3517
3568
|
} else {
|
|
3518
|
-
|
|
3519
|
-
}
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3569
|
+
skip = false;
|
|
3570
|
+
}
|
|
3571
|
+
out += c;
|
|
3572
|
+
}
|
|
3573
|
+
}
|
|
3574
|
+
return out;
|
|
3575
|
+
}
|
|
3576
|
+
__name(stripLeadingZeros, "stripLeadingZeros");
|
|
3577
|
+
function findToken(str, token) {
|
|
3578
|
+
let ind = 0;
|
|
3579
|
+
for (let i = 0; i < str.length; i++) {
|
|
3580
|
+
if (str[i] === token) ind++;
|
|
3581
|
+
}
|
|
3582
|
+
return ind;
|
|
3583
|
+
}
|
|
3584
|
+
__name(findToken, "findToken");
|
|
3585
|
+
var RDS1 = /^\.\.?\//u;
|
|
3586
|
+
var RDS2 = /^\/\.(?:\/|$)/u;
|
|
3587
|
+
var RDS3 = /^\/\.\.(?:\/|$)/u;
|
|
3588
|
+
var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/u;
|
|
3589
|
+
function removeDotSegments(input) {
|
|
3590
|
+
const output = [];
|
|
3591
|
+
while (input.length) {
|
|
3592
|
+
if (input.match(RDS1)) {
|
|
3593
|
+
input = input.replace(RDS1, "");
|
|
3594
|
+
} else if (input.match(RDS2)) {
|
|
3595
|
+
input = input.replace(RDS2, "/");
|
|
3596
|
+
} else if (input.match(RDS3)) {
|
|
3597
|
+
input = input.replace(RDS3, "/");
|
|
3598
|
+
output.pop();
|
|
3599
|
+
} else if (input === "." || input === "..") {
|
|
3600
|
+
input = "";
|
|
3527
3601
|
} else {
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
var tMin = 1;
|
|
3534
|
-
var tMax = 26;
|
|
3535
|
-
var skew = 38;
|
|
3536
|
-
var damp = 700;
|
|
3537
|
-
var initialBias = 72;
|
|
3538
|
-
var initialN = 128;
|
|
3539
|
-
var delimiter = "-";
|
|
3540
|
-
var regexPunycode = /^xn--/;
|
|
3541
|
-
var regexNonASCII = /[^\0-\x7E]/;
|
|
3542
|
-
var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g;
|
|
3543
|
-
var errors = {
|
|
3544
|
-
"overflow": "Overflow: input needs wider integers to process",
|
|
3545
|
-
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
3546
|
-
"invalid-input": "Invalid input"
|
|
3547
|
-
};
|
|
3548
|
-
var baseMinusTMin = base - tMin;
|
|
3549
|
-
var floor = Math.floor;
|
|
3550
|
-
var stringFromCharCode = String.fromCharCode;
|
|
3551
|
-
function error$1(type) {
|
|
3552
|
-
throw new RangeError(errors[type]);
|
|
3553
|
-
}
|
|
3554
|
-
__name(error$1, "error$1");
|
|
3555
|
-
function map(array, fn) {
|
|
3556
|
-
var result = [];
|
|
3557
|
-
var length = array.length;
|
|
3558
|
-
while (length--) {
|
|
3559
|
-
result[length] = fn(array[length]);
|
|
3560
|
-
}
|
|
3561
|
-
return result;
|
|
3562
|
-
}
|
|
3563
|
-
__name(map, "map");
|
|
3564
|
-
function mapDomain(string, fn) {
|
|
3565
|
-
var parts = string.split("@");
|
|
3566
|
-
var result = "";
|
|
3567
|
-
if (parts.length > 1) {
|
|
3568
|
-
result = parts[0] + "@";
|
|
3569
|
-
string = parts[1];
|
|
3570
|
-
}
|
|
3571
|
-
string = string.replace(regexSeparators, ".");
|
|
3572
|
-
var labels = string.split(".");
|
|
3573
|
-
var encoded = map(labels, fn).join(".");
|
|
3574
|
-
return result + encoded;
|
|
3575
|
-
}
|
|
3576
|
-
__name(mapDomain, "mapDomain");
|
|
3577
|
-
function ucs2decode(string) {
|
|
3578
|
-
var output = [];
|
|
3579
|
-
var counter = 0;
|
|
3580
|
-
var length = string.length;
|
|
3581
|
-
while (counter < length) {
|
|
3582
|
-
var value = string.charCodeAt(counter++);
|
|
3583
|
-
if (value >= 55296 && value <= 56319 && counter < length) {
|
|
3584
|
-
var extra = string.charCodeAt(counter++);
|
|
3585
|
-
if ((extra & 64512) == 56320) {
|
|
3586
|
-
output.push(((value & 1023) << 10) + (extra & 1023) + 65536);
|
|
3587
|
-
} else {
|
|
3588
|
-
output.push(value);
|
|
3589
|
-
counter--;
|
|
3590
|
-
}
|
|
3602
|
+
const im = input.match(RDS5);
|
|
3603
|
+
if (im) {
|
|
3604
|
+
const s = im[0];
|
|
3605
|
+
input = input.slice(s.length);
|
|
3606
|
+
output.push(s);
|
|
3591
3607
|
} else {
|
|
3592
|
-
|
|
3593
|
-
}
|
|
3594
|
-
}
|
|
3595
|
-
return output;
|
|
3596
|
-
}
|
|
3597
|
-
__name(ucs2decode, "ucs2decode");
|
|
3598
|
-
var ucs2encode = /* @__PURE__ */ __name(function ucs2encode2(array) {
|
|
3599
|
-
return String.fromCodePoint.apply(String, toConsumableArray(array));
|
|
3600
|
-
}, "ucs2encode");
|
|
3601
|
-
var basicToDigit = /* @__PURE__ */ __name(function basicToDigit2(codePoint) {
|
|
3602
|
-
if (codePoint - 48 < 10) {
|
|
3603
|
-
return codePoint - 22;
|
|
3604
|
-
}
|
|
3605
|
-
if (codePoint - 65 < 26) {
|
|
3606
|
-
return codePoint - 65;
|
|
3607
|
-
}
|
|
3608
|
-
if (codePoint - 97 < 26) {
|
|
3609
|
-
return codePoint - 97;
|
|
3610
|
-
}
|
|
3611
|
-
return base;
|
|
3612
|
-
}, "basicToDigit");
|
|
3613
|
-
var digitToBasic = /* @__PURE__ */ __name(function digitToBasic2(digit, flag) {
|
|
3614
|
-
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
|
|
3615
|
-
}, "digitToBasic");
|
|
3616
|
-
var adapt = /* @__PURE__ */ __name(function adapt2(delta, numPoints, firstTime) {
|
|
3617
|
-
var k = 0;
|
|
3618
|
-
delta = firstTime ? floor(delta / damp) : delta >> 1;
|
|
3619
|
-
delta += floor(delta / numPoints);
|
|
3620
|
-
for (
|
|
3621
|
-
;
|
|
3622
|
-
/* no initialization */
|
|
3623
|
-
delta > baseMinusTMin * tMax >> 1;
|
|
3624
|
-
k += base
|
|
3625
|
-
) {
|
|
3626
|
-
delta = floor(delta / baseMinusTMin);
|
|
3627
|
-
}
|
|
3628
|
-
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
|
|
3629
|
-
}, "adapt");
|
|
3630
|
-
var decode = /* @__PURE__ */ __name(function decode2(input) {
|
|
3631
|
-
var output = [];
|
|
3632
|
-
var inputLength = input.length;
|
|
3633
|
-
var i = 0;
|
|
3634
|
-
var n = initialN;
|
|
3635
|
-
var bias = initialBias;
|
|
3636
|
-
var basic = input.lastIndexOf(delimiter);
|
|
3637
|
-
if (basic < 0) {
|
|
3638
|
-
basic = 0;
|
|
3639
|
-
}
|
|
3640
|
-
for (var j = 0; j < basic; ++j) {
|
|
3641
|
-
if (input.charCodeAt(j) >= 128) {
|
|
3642
|
-
error$1("not-basic");
|
|
3643
|
-
}
|
|
3644
|
-
output.push(input.charCodeAt(j));
|
|
3645
|
-
}
|
|
3646
|
-
for (var index = basic > 0 ? basic + 1 : 0; index < inputLength; ) {
|
|
3647
|
-
var oldi = i;
|
|
3648
|
-
for (
|
|
3649
|
-
var w = 1, k = base;
|
|
3650
|
-
;
|
|
3651
|
-
/* no condition */
|
|
3652
|
-
k += base
|
|
3653
|
-
) {
|
|
3654
|
-
if (index >= inputLength) {
|
|
3655
|
-
error$1("invalid-input");
|
|
3656
|
-
}
|
|
3657
|
-
var digit = basicToDigit(input.charCodeAt(index++));
|
|
3658
|
-
if (digit >= base || digit > floor((maxInt - i) / w)) {
|
|
3659
|
-
error$1("overflow");
|
|
3660
|
-
}
|
|
3661
|
-
i += digit * w;
|
|
3662
|
-
var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
|
|
3663
|
-
if (digit < t) {
|
|
3664
|
-
break;
|
|
3665
|
-
}
|
|
3666
|
-
var baseMinusT = base - t;
|
|
3667
|
-
if (w > floor(maxInt / baseMinusT)) {
|
|
3668
|
-
error$1("overflow");
|
|
3669
|
-
}
|
|
3670
|
-
w *= baseMinusT;
|
|
3671
|
-
}
|
|
3672
|
-
var out = output.length + 1;
|
|
3673
|
-
bias = adapt(i - oldi, out, oldi == 0);
|
|
3674
|
-
if (floor(i / out) > maxInt - n) {
|
|
3675
|
-
error$1("overflow");
|
|
3676
|
-
}
|
|
3677
|
-
n += floor(i / out);
|
|
3678
|
-
i %= out;
|
|
3679
|
-
output.splice(i++, 0, n);
|
|
3680
|
-
}
|
|
3681
|
-
return String.fromCodePoint.apply(String, output);
|
|
3682
|
-
}, "decode");
|
|
3683
|
-
var encode = /* @__PURE__ */ __name(function encode2(input) {
|
|
3684
|
-
var output = [];
|
|
3685
|
-
input = ucs2decode(input);
|
|
3686
|
-
var inputLength = input.length;
|
|
3687
|
-
var n = initialN;
|
|
3688
|
-
var delta = 0;
|
|
3689
|
-
var bias = initialBias;
|
|
3690
|
-
var _iteratorNormalCompletion = true;
|
|
3691
|
-
var _didIteratorError = false;
|
|
3692
|
-
var _iteratorError = void 0;
|
|
3693
|
-
try {
|
|
3694
|
-
for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
3695
|
-
var _currentValue2 = _step.value;
|
|
3696
|
-
if (_currentValue2 < 128) {
|
|
3697
|
-
output.push(stringFromCharCode(_currentValue2));
|
|
3698
|
-
}
|
|
3699
|
-
}
|
|
3700
|
-
} catch (err) {
|
|
3701
|
-
_didIteratorError = true;
|
|
3702
|
-
_iteratorError = err;
|
|
3703
|
-
} finally {
|
|
3704
|
-
try {
|
|
3705
|
-
if (!_iteratorNormalCompletion && _iterator.return) {
|
|
3706
|
-
_iterator.return();
|
|
3707
|
-
}
|
|
3708
|
-
} finally {
|
|
3709
|
-
if (_didIteratorError) {
|
|
3710
|
-
throw _iteratorError;
|
|
3711
|
-
}
|
|
3608
|
+
throw new Error("Unexpected dot segment condition");
|
|
3712
3609
|
}
|
|
3713
3610
|
}
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
error$1("overflow");
|
|
3759
|
-
}
|
|
3760
|
-
if (_currentValue == n) {
|
|
3761
|
-
var q = delta;
|
|
3762
|
-
for (
|
|
3763
|
-
var k = base;
|
|
3764
|
-
;
|
|
3765
|
-
/* no condition */
|
|
3766
|
-
k += base
|
|
3767
|
-
) {
|
|
3768
|
-
var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
|
|
3769
|
-
if (q < t) {
|
|
3770
|
-
break;
|
|
3771
|
-
}
|
|
3772
|
-
var qMinusT = q - t;
|
|
3773
|
-
var baseMinusT = base - t;
|
|
3774
|
-
output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)));
|
|
3775
|
-
q = floor(qMinusT / baseMinusT);
|
|
3776
|
-
}
|
|
3777
|
-
output.push(stringFromCharCode(digitToBasic(q, 0)));
|
|
3778
|
-
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
|
|
3779
|
-
delta = 0;
|
|
3780
|
-
++handledCPCount;
|
|
3781
|
-
}
|
|
3782
|
-
}
|
|
3783
|
-
} catch (err) {
|
|
3784
|
-
_didIteratorError3 = true;
|
|
3785
|
-
_iteratorError3 = err;
|
|
3786
|
-
} finally {
|
|
3787
|
-
try {
|
|
3788
|
-
if (!_iteratorNormalCompletion3 && _iterator3.return) {
|
|
3789
|
-
_iterator3.return();
|
|
3790
|
-
}
|
|
3791
|
-
} finally {
|
|
3792
|
-
if (_didIteratorError3) {
|
|
3793
|
-
throw _iteratorError3;
|
|
3794
|
-
}
|
|
3795
|
-
}
|
|
3611
|
+
}
|
|
3612
|
+
return output.join("");
|
|
3613
|
+
}
|
|
3614
|
+
__name(removeDotSegments, "removeDotSegments");
|
|
3615
|
+
function normalizeComponentEncoding(components, esc) {
|
|
3616
|
+
const func = esc !== true ? escape : unescape;
|
|
3617
|
+
if (components.scheme !== void 0) {
|
|
3618
|
+
components.scheme = func(components.scheme);
|
|
3619
|
+
}
|
|
3620
|
+
if (components.userinfo !== void 0) {
|
|
3621
|
+
components.userinfo = func(components.userinfo);
|
|
3622
|
+
}
|
|
3623
|
+
if (components.host !== void 0) {
|
|
3624
|
+
components.host = func(components.host);
|
|
3625
|
+
}
|
|
3626
|
+
if (components.path !== void 0) {
|
|
3627
|
+
components.path = func(components.path);
|
|
3628
|
+
}
|
|
3629
|
+
if (components.query !== void 0) {
|
|
3630
|
+
components.query = func(components.query);
|
|
3631
|
+
}
|
|
3632
|
+
if (components.fragment !== void 0) {
|
|
3633
|
+
components.fragment = func(components.fragment);
|
|
3634
|
+
}
|
|
3635
|
+
return components;
|
|
3636
|
+
}
|
|
3637
|
+
__name(normalizeComponentEncoding, "normalizeComponentEncoding");
|
|
3638
|
+
function recomposeAuthority(components, options) {
|
|
3639
|
+
const uriTokens = [];
|
|
3640
|
+
if (components.userinfo !== void 0) {
|
|
3641
|
+
uriTokens.push(components.userinfo);
|
|
3642
|
+
uriTokens.push("@");
|
|
3643
|
+
}
|
|
3644
|
+
if (components.host !== void 0) {
|
|
3645
|
+
let host = unescape(components.host);
|
|
3646
|
+
const ipV4res = normalizeIPv4(host);
|
|
3647
|
+
if (ipV4res.isIPV4) {
|
|
3648
|
+
host = ipV4res.host;
|
|
3649
|
+
} else {
|
|
3650
|
+
const ipV6res = normalizeIPv6(ipV4res.host, { isIPV4: false });
|
|
3651
|
+
if (ipV6res.isIPV6 === true) {
|
|
3652
|
+
host = `[${ipV6res.escapedHost}]`;
|
|
3653
|
+
} else {
|
|
3654
|
+
host = components.host;
|
|
3796
3655
|
}
|
|
3797
|
-
++delta;
|
|
3798
|
-
++n;
|
|
3799
3656
|
}
|
|
3800
|
-
|
|
3801
|
-
}
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
"
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3657
|
+
uriTokens.push(host);
|
|
3658
|
+
}
|
|
3659
|
+
if (typeof components.port === "number" || typeof components.port === "string") {
|
|
3660
|
+
uriTokens.push(":");
|
|
3661
|
+
uriTokens.push(String(components.port));
|
|
3662
|
+
}
|
|
3663
|
+
return uriTokens.length ? uriTokens.join("") : void 0;
|
|
3664
|
+
}
|
|
3665
|
+
__name(recomposeAuthority, "recomposeAuthority");
|
|
3666
|
+
module.exports = {
|
|
3667
|
+
recomposeAuthority,
|
|
3668
|
+
normalizeComponentEncoding,
|
|
3669
|
+
removeDotSegments,
|
|
3670
|
+
normalizeIPv4,
|
|
3671
|
+
normalizeIPv6,
|
|
3672
|
+
stringArrayToHexStripped
|
|
3673
|
+
};
|
|
3674
|
+
}
|
|
3675
|
+
});
|
|
3676
|
+
|
|
3677
|
+
// node_modules/fast-uri/lib/schemes.js
|
|
3678
|
+
var require_schemes = __commonJS({
|
|
3679
|
+
"node_modules/fast-uri/lib/schemes.js"(exports, module) {
|
|
3680
|
+
"use strict";
|
|
3681
|
+
var UUID_REG = /^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu;
|
|
3682
|
+
var URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;
|
|
3683
|
+
function isSecure(wsComponents) {
|
|
3684
|
+
return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
|
|
3685
|
+
}
|
|
3686
|
+
__name(isSecure, "isSecure");
|
|
3687
|
+
function httpParse(components) {
|
|
3688
|
+
if (!components.host) {
|
|
3689
|
+
components.error = components.error || "HTTP URIs must have a host.";
|
|
3690
|
+
}
|
|
3691
|
+
return components;
|
|
3692
|
+
}
|
|
3693
|
+
__name(httpParse, "httpParse");
|
|
3694
|
+
function httpSerialize(components) {
|
|
3695
|
+
const secure = String(components.scheme).toLowerCase() === "https";
|
|
3696
|
+
if (components.port === (secure ? 443 : 80) || components.port === "") {
|
|
3697
|
+
components.port = void 0;
|
|
3698
|
+
}
|
|
3699
|
+
if (!components.path) {
|
|
3700
|
+
components.path = "/";
|
|
3701
|
+
}
|
|
3702
|
+
return components;
|
|
3703
|
+
}
|
|
3704
|
+
__name(httpSerialize, "httpSerialize");
|
|
3705
|
+
function wsParse(wsComponents) {
|
|
3706
|
+
wsComponents.secure = isSecure(wsComponents);
|
|
3707
|
+
wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : "");
|
|
3708
|
+
wsComponents.path = void 0;
|
|
3709
|
+
wsComponents.query = void 0;
|
|
3710
|
+
return wsComponents;
|
|
3711
|
+
}
|
|
3712
|
+
__name(wsParse, "wsParse");
|
|
3713
|
+
function wsSerialize(wsComponents) {
|
|
3714
|
+
if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
|
|
3715
|
+
wsComponents.port = void 0;
|
|
3716
|
+
}
|
|
3717
|
+
if (typeof wsComponents.secure === "boolean") {
|
|
3718
|
+
wsComponents.scheme = wsComponents.secure ? "wss" : "ws";
|
|
3719
|
+
wsComponents.secure = void 0;
|
|
3720
|
+
}
|
|
3721
|
+
if (wsComponents.resourceName) {
|
|
3722
|
+
const [path, query] = wsComponents.resourceName.split("?");
|
|
3723
|
+
wsComponents.path = path && path !== "/" ? path : void 0;
|
|
3724
|
+
wsComponents.query = query;
|
|
3725
|
+
wsComponents.resourceName = void 0;
|
|
3726
|
+
}
|
|
3727
|
+
wsComponents.fragment = void 0;
|
|
3728
|
+
return wsComponents;
|
|
3729
|
+
}
|
|
3730
|
+
__name(wsSerialize, "wsSerialize");
|
|
3731
|
+
function urnParse(urnComponents, options) {
|
|
3732
|
+
if (!urnComponents.path) {
|
|
3733
|
+
urnComponents.error = "URN can not be parsed";
|
|
3734
|
+
return urnComponents;
|
|
3735
|
+
}
|
|
3736
|
+
const matches = urnComponents.path.match(URN_REG);
|
|
3737
|
+
if (matches) {
|
|
3738
|
+
const scheme = options.scheme || urnComponents.scheme || "urn";
|
|
3739
|
+
urnComponents.nid = matches[1].toLowerCase();
|
|
3740
|
+
urnComponents.nss = matches[2];
|
|
3741
|
+
const urnScheme = `${scheme}:${options.nid || urnComponents.nid}`;
|
|
3742
|
+
const schemeHandler = SCHEMES[urnScheme];
|
|
3743
|
+
urnComponents.path = void 0;
|
|
3744
|
+
if (schemeHandler) {
|
|
3745
|
+
urnComponents = schemeHandler.parse(urnComponents, options);
|
|
3746
|
+
}
|
|
3747
|
+
} else {
|
|
3748
|
+
urnComponents.error = urnComponents.error || "URN can not be parsed.";
|
|
3749
|
+
}
|
|
3750
|
+
return urnComponents;
|
|
3751
|
+
}
|
|
3752
|
+
__name(urnParse, "urnParse");
|
|
3753
|
+
function urnSerialize(urnComponents, options) {
|
|
3754
|
+
const scheme = options.scheme || urnComponents.scheme || "urn";
|
|
3755
|
+
const nid = urnComponents.nid.toLowerCase();
|
|
3756
|
+
const urnScheme = `${scheme}:${options.nid || nid}`;
|
|
3757
|
+
const schemeHandler = SCHEMES[urnScheme];
|
|
3758
|
+
if (schemeHandler) {
|
|
3759
|
+
urnComponents = schemeHandler.serialize(urnComponents, options);
|
|
3760
|
+
}
|
|
3761
|
+
const uriComponents = urnComponents;
|
|
3762
|
+
const nss = urnComponents.nss;
|
|
3763
|
+
uriComponents.path = `${nid || options.nid}:${nss}`;
|
|
3764
|
+
options.skipEscape = true;
|
|
3765
|
+
return uriComponents;
|
|
3766
|
+
}
|
|
3767
|
+
__name(urnSerialize, "urnSerialize");
|
|
3768
|
+
function urnuuidParse(urnComponents, options) {
|
|
3769
|
+
const uuidComponents = urnComponents;
|
|
3770
|
+
uuidComponents.uuid = uuidComponents.nss;
|
|
3771
|
+
uuidComponents.nss = void 0;
|
|
3772
|
+
if (!options.tolerant && (!uuidComponents.uuid || !UUID_REG.test(uuidComponents.uuid))) {
|
|
3773
|
+
uuidComponents.error = uuidComponents.error || "UUID is not valid.";
|
|
3774
|
+
}
|
|
3775
|
+
return uuidComponents;
|
|
3776
|
+
}
|
|
3777
|
+
__name(urnuuidParse, "urnuuidParse");
|
|
3778
|
+
function urnuuidSerialize(uuidComponents) {
|
|
3779
|
+
const urnComponents = uuidComponents;
|
|
3780
|
+
urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
|
|
3781
|
+
return urnComponents;
|
|
3782
|
+
}
|
|
3783
|
+
__name(urnuuidSerialize, "urnuuidSerialize");
|
|
3784
|
+
var http = {
|
|
3785
|
+
scheme: "http",
|
|
3786
|
+
domainHost: true,
|
|
3787
|
+
parse: httpParse,
|
|
3788
|
+
serialize: httpSerialize
|
|
3789
|
+
};
|
|
3790
|
+
var https = {
|
|
3791
|
+
scheme: "https",
|
|
3792
|
+
domainHost: http.domainHost,
|
|
3793
|
+
parse: httpParse,
|
|
3794
|
+
serialize: httpSerialize
|
|
3795
|
+
};
|
|
3796
|
+
var ws = {
|
|
3797
|
+
scheme: "ws",
|
|
3798
|
+
domainHost: true,
|
|
3799
|
+
parse: wsParse,
|
|
3800
|
+
serialize: wsSerialize
|
|
3801
|
+
};
|
|
3802
|
+
var wss = {
|
|
3803
|
+
scheme: "wss",
|
|
3804
|
+
domainHost: ws.domainHost,
|
|
3805
|
+
parse: ws.parse,
|
|
3806
|
+
serialize: ws.serialize
|
|
3807
|
+
};
|
|
3808
|
+
var urn = {
|
|
3809
|
+
scheme: "urn",
|
|
3810
|
+
parse: urnParse,
|
|
3811
|
+
serialize: urnSerialize,
|
|
3812
|
+
skipNormalize: true
|
|
3813
|
+
};
|
|
3814
|
+
var urnuuid = {
|
|
3815
|
+
scheme: "urn:uuid",
|
|
3816
|
+
parse: urnuuidParse,
|
|
3817
|
+
serialize: urnuuidSerialize,
|
|
3818
|
+
skipNormalize: true
|
|
3819
|
+
};
|
|
3820
|
+
var SCHEMES = {
|
|
3821
|
+
http,
|
|
3822
|
+
https,
|
|
3823
|
+
ws,
|
|
3824
|
+
wss,
|
|
3825
|
+
urn,
|
|
3826
|
+
"urn:uuid": urnuuid
|
|
3827
|
+
};
|
|
3828
|
+
module.exports = SCHEMES;
|
|
3829
|
+
}
|
|
3830
|
+
});
|
|
3831
|
+
|
|
3832
|
+
// node_modules/fast-uri/index.js
|
|
3833
|
+
var require_fast_uri = __commonJS({
|
|
3834
|
+
"node_modules/fast-uri/index.js"(exports, module) {
|
|
3835
|
+
"use strict";
|
|
3836
|
+
var { normalizeIPv6, normalizeIPv4, removeDotSegments, recomposeAuthority, normalizeComponentEncoding } = require_utils();
|
|
3837
|
+
var SCHEMES = require_schemes();
|
|
3838
|
+
function normalize(uri, options) {
|
|
3839
|
+
if (typeof uri === "string") {
|
|
3840
|
+
uri = serialize(parse(uri, options), options);
|
|
3841
|
+
} else if (typeof uri === "object") {
|
|
3842
|
+
uri = parse(serialize(uri, options), options);
|
|
3843
|
+
}
|
|
3844
|
+
return uri;
|
|
3845
|
+
}
|
|
3846
|
+
__name(normalize, "normalize");
|
|
3847
|
+
function resolve(baseURI, relativeURI, options) {
|
|
3848
|
+
const schemelessOptions = Object.assign({ scheme: "null" }, options);
|
|
3849
|
+
const resolved = resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true);
|
|
3850
|
+
return serialize(resolved, { ...schemelessOptions, skipEscape: true });
|
|
3851
|
+
}
|
|
3852
|
+
__name(resolve, "resolve");
|
|
3853
|
+
function resolveComponents(base, relative, options, skipNormalization) {
|
|
3854
|
+
const target = {};
|
|
3855
|
+
if (!skipNormalization) {
|
|
3856
|
+
base = parse(serialize(base, options), options);
|
|
3857
|
+
relative = parse(serialize(relative, options), options);
|
|
3858
|
+
}
|
|
3859
|
+
options = options || {};
|
|
3860
|
+
if (!options.tolerant && relative.scheme) {
|
|
3861
|
+
target.scheme = relative.scheme;
|
|
3862
|
+
target.userinfo = relative.userinfo;
|
|
3863
|
+
target.host = relative.host;
|
|
3864
|
+
target.port = relative.port;
|
|
3865
|
+
target.path = removeDotSegments(relative.path || "");
|
|
3866
|
+
target.query = relative.query;
|
|
3867
|
+
} else {
|
|
3868
|
+
if (relative.userinfo !== void 0 || relative.host !== void 0 || relative.port !== void 0) {
|
|
3869
|
+
target.userinfo = relative.userinfo;
|
|
3870
|
+
target.host = relative.host;
|
|
3871
|
+
target.port = relative.port;
|
|
3872
|
+
target.path = removeDotSegments(relative.path || "");
|
|
3873
|
+
target.query = relative.query;
|
|
3874
|
+
} else {
|
|
3875
|
+
if (!relative.path) {
|
|
3876
|
+
target.path = base.path;
|
|
3877
|
+
if (relative.query !== void 0) {
|
|
3878
|
+
target.query = relative.query;
|
|
3872
3879
|
} else {
|
|
3873
|
-
|
|
3880
|
+
target.query = base.query;
|
|
3874
3881
|
}
|
|
3875
|
-
i += 9;
|
|
3876
3882
|
} else {
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
function _normalizeComponentEncoding(components, protocol) {
|
|
3885
|
-
function decodeUnreserved2(str) {
|
|
3886
|
-
var decStr = pctDecChars(str);
|
|
3887
|
-
return !decStr.match(protocol.UNRESERVED) ? str : decStr;
|
|
3888
|
-
}
|
|
3889
|
-
__name(decodeUnreserved2, "decodeUnreserved");
|
|
3890
|
-
if (components.scheme)
|
|
3891
|
-
components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved2).toLowerCase().replace(protocol.NOT_SCHEME, "");
|
|
3892
|
-
if (components.userinfo !== void 0)
|
|
3893
|
-
components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
3894
|
-
if (components.host !== void 0)
|
|
3895
|
-
components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved2).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
3896
|
-
if (components.path !== void 0)
|
|
3897
|
-
components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
3898
|
-
if (components.query !== void 0)
|
|
3899
|
-
components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
3900
|
-
if (components.fragment !== void 0)
|
|
3901
|
-
components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved2).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
|
3902
|
-
return components;
|
|
3903
|
-
}
|
|
3904
|
-
__name(_normalizeComponentEncoding, "_normalizeComponentEncoding");
|
|
3905
|
-
function _stripLeadingZeros(str) {
|
|
3906
|
-
return str.replace(/^0*(.*)/, "$1") || "0";
|
|
3907
|
-
}
|
|
3908
|
-
__name(_stripLeadingZeros, "_stripLeadingZeros");
|
|
3909
|
-
function _normalizeIPv4(host, protocol) {
|
|
3910
|
-
var matches = host.match(protocol.IPV4ADDRESS) || [];
|
|
3911
|
-
var _matches = slicedToArray(matches, 2), address = _matches[1];
|
|
3912
|
-
if (address) {
|
|
3913
|
-
return address.split(".").map(_stripLeadingZeros).join(".");
|
|
3914
|
-
} else {
|
|
3915
|
-
return host;
|
|
3916
|
-
}
|
|
3917
|
-
}
|
|
3918
|
-
__name(_normalizeIPv4, "_normalizeIPv4");
|
|
3919
|
-
function _normalizeIPv6(host, protocol) {
|
|
3920
|
-
var matches = host.match(protocol.IPV6ADDRESS) || [];
|
|
3921
|
-
var _matches2 = slicedToArray(matches, 3), address = _matches2[1], zone = _matches2[2];
|
|
3922
|
-
if (address) {
|
|
3923
|
-
var _address$toLowerCase$ = address.toLowerCase().split("::").reverse(), _address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2), last = _address$toLowerCase$2[0], first = _address$toLowerCase$2[1];
|
|
3924
|
-
var firstFields = first ? first.split(":").map(_stripLeadingZeros) : [];
|
|
3925
|
-
var lastFields = last.split(":").map(_stripLeadingZeros);
|
|
3926
|
-
var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);
|
|
3927
|
-
var fieldCount = isLastFieldIPv4Address ? 7 : 8;
|
|
3928
|
-
var lastFieldsStart = lastFields.length - fieldCount;
|
|
3929
|
-
var fields = Array(fieldCount);
|
|
3930
|
-
for (var x = 0; x < fieldCount; ++x) {
|
|
3931
|
-
fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || "";
|
|
3932
|
-
}
|
|
3933
|
-
if (isLastFieldIPv4Address) {
|
|
3934
|
-
fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);
|
|
3935
|
-
}
|
|
3936
|
-
var allZeroFields = fields.reduce(function(acc, field, index) {
|
|
3937
|
-
if (!field || field === "0") {
|
|
3938
|
-
var lastLongest = acc[acc.length - 1];
|
|
3939
|
-
if (lastLongest && lastLongest.index + lastLongest.length === index) {
|
|
3940
|
-
lastLongest.length++;
|
|
3883
|
+
if (relative.path.charAt(0) === "/") {
|
|
3884
|
+
target.path = removeDotSegments(relative.path);
|
|
3885
|
+
} else {
|
|
3886
|
+
if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) {
|
|
3887
|
+
target.path = "/" + relative.path;
|
|
3888
|
+
} else if (!base.path) {
|
|
3889
|
+
target.path = relative.path;
|
|
3941
3890
|
} else {
|
|
3942
|
-
|
|
3891
|
+
target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
|
|
3943
3892
|
}
|
|
3893
|
+
target.path = removeDotSegments(target.path);
|
|
3944
3894
|
}
|
|
3945
|
-
|
|
3946
|
-
}, []);
|
|
3947
|
-
var longestZeroFields = allZeroFields.sort(function(a, b) {
|
|
3948
|
-
return b.length - a.length;
|
|
3949
|
-
})[0];
|
|
3950
|
-
var newHost = void 0;
|
|
3951
|
-
if (longestZeroFields && longestZeroFields.length > 1) {
|
|
3952
|
-
var newFirst = fields.slice(0, longestZeroFields.index);
|
|
3953
|
-
var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);
|
|
3954
|
-
newHost = newFirst.join(":") + "::" + newLast.join(":");
|
|
3955
|
-
} else {
|
|
3956
|
-
newHost = fields.join(":");
|
|
3895
|
+
target.query = relative.query;
|
|
3957
3896
|
}
|
|
3958
|
-
|
|
3959
|
-
|
|
3897
|
+
target.userinfo = base.userinfo;
|
|
3898
|
+
target.host = base.host;
|
|
3899
|
+
target.port = base.port;
|
|
3900
|
+
}
|
|
3901
|
+
target.scheme = base.scheme;
|
|
3902
|
+
}
|
|
3903
|
+
target.fragment = relative.fragment;
|
|
3904
|
+
return target;
|
|
3905
|
+
}
|
|
3906
|
+
__name(resolveComponents, "resolveComponents");
|
|
3907
|
+
function equal(uriA, uriB, options) {
|
|
3908
|
+
if (typeof uriA === "string") {
|
|
3909
|
+
uriA = unescape(uriA);
|
|
3910
|
+
uriA = serialize(normalizeComponentEncoding(parse(uriA, options), true), { ...options, skipEscape: true });
|
|
3911
|
+
} else if (typeof uriA === "object") {
|
|
3912
|
+
uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true });
|
|
3913
|
+
}
|
|
3914
|
+
if (typeof uriB === "string") {
|
|
3915
|
+
uriB = unescape(uriB);
|
|
3916
|
+
uriB = serialize(normalizeComponentEncoding(parse(uriB, options), true), { ...options, skipEscape: true });
|
|
3917
|
+
} else if (typeof uriB === "object") {
|
|
3918
|
+
uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true });
|
|
3919
|
+
}
|
|
3920
|
+
return uriA.toLowerCase() === uriB.toLowerCase();
|
|
3921
|
+
}
|
|
3922
|
+
__name(equal, "equal");
|
|
3923
|
+
function serialize(cmpts, opts) {
|
|
3924
|
+
const components = {
|
|
3925
|
+
host: cmpts.host,
|
|
3926
|
+
scheme: cmpts.scheme,
|
|
3927
|
+
userinfo: cmpts.userinfo,
|
|
3928
|
+
port: cmpts.port,
|
|
3929
|
+
path: cmpts.path,
|
|
3930
|
+
query: cmpts.query,
|
|
3931
|
+
nid: cmpts.nid,
|
|
3932
|
+
nss: cmpts.nss,
|
|
3933
|
+
uuid: cmpts.uuid,
|
|
3934
|
+
fragment: cmpts.fragment,
|
|
3935
|
+
reference: cmpts.reference,
|
|
3936
|
+
resourceName: cmpts.resourceName,
|
|
3937
|
+
secure: cmpts.secure,
|
|
3938
|
+
error: ""
|
|
3939
|
+
};
|
|
3940
|
+
const options = Object.assign({}, opts);
|
|
3941
|
+
const uriTokens = [];
|
|
3942
|
+
const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
|
|
3943
|
+
if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);
|
|
3944
|
+
if (components.path !== void 0) {
|
|
3945
|
+
if (!options.skipEscape) {
|
|
3946
|
+
components.path = escape(components.path);
|
|
3947
|
+
if (components.scheme !== void 0) {
|
|
3948
|
+
components.path = components.path.split("%3A").join(":");
|
|
3960
3949
|
}
|
|
3961
|
-
return newHost;
|
|
3962
3950
|
} else {
|
|
3963
|
-
|
|
3964
|
-
}
|
|
3965
|
-
}
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
if (
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
3951
|
+
components.path = unescape(components.path);
|
|
3952
|
+
}
|
|
3953
|
+
}
|
|
3954
|
+
if (options.reference !== "suffix" && components.scheme) {
|
|
3955
|
+
uriTokens.push(components.scheme);
|
|
3956
|
+
uriTokens.push(":");
|
|
3957
|
+
}
|
|
3958
|
+
const authority = recomposeAuthority(components, options);
|
|
3959
|
+
if (authority !== void 0) {
|
|
3960
|
+
if (options.reference !== "suffix") {
|
|
3961
|
+
uriTokens.push("//");
|
|
3962
|
+
}
|
|
3963
|
+
uriTokens.push(authority);
|
|
3964
|
+
if (components.path && components.path.charAt(0) !== "/") {
|
|
3965
|
+
uriTokens.push("/");
|
|
3966
|
+
}
|
|
3967
|
+
}
|
|
3968
|
+
if (components.path !== void 0) {
|
|
3969
|
+
let s = components.path;
|
|
3970
|
+
if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
|
|
3971
|
+
s = removeDotSegments(s);
|
|
3972
|
+
}
|
|
3973
|
+
if (authority === void 0) {
|
|
3974
|
+
s = s.replace(/^\/\//u, "/%2F");
|
|
3975
|
+
}
|
|
3976
|
+
uriTokens.push(s);
|
|
3977
|
+
}
|
|
3978
|
+
if (components.query !== void 0) {
|
|
3979
|
+
uriTokens.push("?");
|
|
3980
|
+
uriTokens.push(components.query);
|
|
3981
|
+
}
|
|
3982
|
+
if (components.fragment !== void 0) {
|
|
3983
|
+
uriTokens.push("#");
|
|
3984
|
+
uriTokens.push(components.fragment);
|
|
3985
|
+
}
|
|
3986
|
+
return uriTokens.join("");
|
|
3987
|
+
}
|
|
3988
|
+
__name(serialize, "serialize");
|
|
3989
|
+
var hexLookUp = Array.from({ length: 127 }, (v, k) => /[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(k)));
|
|
3990
|
+
function nonSimpleDomain(value) {
|
|
3991
|
+
let code = 0;
|
|
3992
|
+
for (let i = 0, len = value.length; i < len; ++i) {
|
|
3993
|
+
code = value.charCodeAt(i);
|
|
3994
|
+
if (code > 126 || hexLookUp[code]) {
|
|
3995
|
+
return true;
|
|
3996
|
+
}
|
|
3997
|
+
}
|
|
3998
|
+
return false;
|
|
3999
|
+
}
|
|
4000
|
+
__name(nonSimpleDomain, "nonSimpleDomain");
|
|
4001
|
+
var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
4002
|
+
function parse(uri, opts) {
|
|
4003
|
+
const options = Object.assign({}, opts);
|
|
4004
|
+
const parsed = {
|
|
4005
|
+
scheme: void 0,
|
|
4006
|
+
userinfo: void 0,
|
|
4007
|
+
host: "",
|
|
4008
|
+
port: void 0,
|
|
4009
|
+
path: "",
|
|
4010
|
+
query: void 0,
|
|
4011
|
+
fragment: void 0
|
|
4012
|
+
};
|
|
4013
|
+
const gotEncoding = uri.indexOf("%") !== -1;
|
|
4014
|
+
let isIP = false;
|
|
4015
|
+
if (options.reference === "suffix") uri = (options.scheme ? options.scheme + ":" : "") + "//" + uri;
|
|
4016
|
+
const matches = uri.match(URI_PARSE);
|
|
4017
|
+
if (matches) {
|
|
4018
|
+
parsed.scheme = matches[1];
|
|
4019
|
+
parsed.userinfo = matches[3];
|
|
4020
|
+
parsed.host = matches[4];
|
|
4021
|
+
parsed.port = parseInt(matches[5], 10);
|
|
4022
|
+
parsed.path = matches[6] || "";
|
|
4023
|
+
parsed.query = matches[7];
|
|
4024
|
+
parsed.fragment = matches[8];
|
|
4025
|
+
if (isNaN(parsed.port)) {
|
|
4026
|
+
parsed.port = matches[5];
|
|
4027
|
+
}
|
|
4028
|
+
if (parsed.host) {
|
|
4029
|
+
const ipv4result = normalizeIPv4(parsed.host);
|
|
4030
|
+
if (ipv4result.isIPV4 === false) {
|
|
4031
|
+
const ipv6result = normalizeIPv6(ipv4result.host, { isIPV4: false });
|
|
4032
|
+
parsed.host = ipv6result.host.toLowerCase();
|
|
4033
|
+
isIP = ipv6result.isIPV6;
|
|
4025
4034
|
} else {
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
if (schemeHandler && schemeHandler.parse) {
|
|
4029
|
-
schemeHandler.parse(components, options);
|
|
4035
|
+
parsed.host = ipv4result.host;
|
|
4036
|
+
isIP = true;
|
|
4030
4037
|
}
|
|
4038
|
+
}
|
|
4039
|
+
if (parsed.scheme === void 0 && parsed.userinfo === void 0 && parsed.host === void 0 && parsed.port === void 0 && !parsed.path && parsed.query === void 0) {
|
|
4040
|
+
parsed.reference = "same-document";
|
|
4041
|
+
} else if (parsed.scheme === void 0) {
|
|
4042
|
+
parsed.reference = "relative";
|
|
4043
|
+
} else if (parsed.fragment === void 0) {
|
|
4044
|
+
parsed.reference = "absolute";
|
|
4031
4045
|
} else {
|
|
4032
|
-
|
|
4033
|
-
}
|
|
4034
|
-
return components;
|
|
4035
|
-
}
|
|
4036
|
-
__name(parse, "parse");
|
|
4037
|
-
function _recomposeAuthority(components, options) {
|
|
4038
|
-
var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;
|
|
4039
|
-
var uriTokens = [];
|
|
4040
|
-
if (components.userinfo !== void 0) {
|
|
4041
|
-
uriTokens.push(components.userinfo);
|
|
4042
|
-
uriTokens.push("@");
|
|
4043
|
-
}
|
|
4044
|
-
if (components.host !== void 0) {
|
|
4045
|
-
uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function(_, $1, $2) {
|
|
4046
|
-
return "[" + $1 + ($2 ? "%25" + $2 : "") + "]";
|
|
4047
|
-
}));
|
|
4048
|
-
}
|
|
4049
|
-
if (typeof components.port === "number" || typeof components.port === "string") {
|
|
4050
|
-
uriTokens.push(":");
|
|
4051
|
-
uriTokens.push(String(components.port));
|
|
4052
|
-
}
|
|
4053
|
-
return uriTokens.length ? uriTokens.join("") : void 0;
|
|
4054
|
-
}
|
|
4055
|
-
__name(_recomposeAuthority, "_recomposeAuthority");
|
|
4056
|
-
var RDS1 = /^\.\.?\//;
|
|
4057
|
-
var RDS2 = /^\/\.(\/|$)/;
|
|
4058
|
-
var RDS3 = /^\/\.\.(\/|$)/;
|
|
4059
|
-
var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/;
|
|
4060
|
-
function removeDotSegments(input) {
|
|
4061
|
-
var output = [];
|
|
4062
|
-
while (input.length) {
|
|
4063
|
-
if (input.match(RDS1)) {
|
|
4064
|
-
input = input.replace(RDS1, "");
|
|
4065
|
-
} else if (input.match(RDS2)) {
|
|
4066
|
-
input = input.replace(RDS2, "/");
|
|
4067
|
-
} else if (input.match(RDS3)) {
|
|
4068
|
-
input = input.replace(RDS3, "/");
|
|
4069
|
-
output.pop();
|
|
4070
|
-
} else if (input === "." || input === "..") {
|
|
4071
|
-
input = "";
|
|
4072
|
-
} else {
|
|
4073
|
-
var im = input.match(RDS5);
|
|
4074
|
-
if (im) {
|
|
4075
|
-
var s = im[0];
|
|
4076
|
-
input = input.slice(s.length);
|
|
4077
|
-
output.push(s);
|
|
4078
|
-
} else {
|
|
4079
|
-
throw new Error("Unexpected dot segment condition");
|
|
4080
|
-
}
|
|
4081
|
-
}
|
|
4046
|
+
parsed.reference = "uri";
|
|
4082
4047
|
}
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
var uriTokens = [];
|
|
4090
|
-
var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
|
|
4091
|
-
if (schemeHandler && schemeHandler.serialize)
|
|
4092
|
-
schemeHandler.serialize(components, options);
|
|
4093
|
-
if (components.host) {
|
|
4094
|
-
if (protocol.IPV6ADDRESS.test(components.host)) {
|
|
4095
|
-
} else if (options.domainHost || schemeHandler && schemeHandler.domainHost) {
|
|
4048
|
+
if (options.reference && options.reference !== "suffix" && options.reference !== parsed.reference) {
|
|
4049
|
+
parsed.error = parsed.error || "URI is not a " + options.reference + " reference.";
|
|
4050
|
+
}
|
|
4051
|
+
const schemeHandler = SCHEMES[(options.scheme || parsed.scheme || "").toLowerCase()];
|
|
4052
|
+
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
|
|
4053
|
+
if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
|
|
4096
4054
|
try {
|
|
4097
|
-
|
|
4055
|
+
parsed.host = URL.domainToASCII(parsed.host.toLowerCase());
|
|
4098
4056
|
} catch (e) {
|
|
4099
|
-
|
|
4057
|
+
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
|
|
4100
4058
|
}
|
|
4101
4059
|
}
|
|
4102
4060
|
}
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
uriTokens.push(":");
|
|
4107
|
-
}
|
|
4108
|
-
var authority = _recomposeAuthority(components, options);
|
|
4109
|
-
if (authority !== void 0) {
|
|
4110
|
-
if (options.reference !== "suffix") {
|
|
4111
|
-
uriTokens.push("//");
|
|
4061
|
+
if (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {
|
|
4062
|
+
if (gotEncoding && parsed.scheme !== void 0) {
|
|
4063
|
+
parsed.scheme = unescape(parsed.scheme);
|
|
4112
4064
|
}
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
uriTokens.push("/");
|
|
4065
|
+
if (gotEncoding && parsed.userinfo !== void 0) {
|
|
4066
|
+
parsed.userinfo = unescape(parsed.userinfo);
|
|
4116
4067
|
}
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
var s = components.path;
|
|
4120
|
-
if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
|
|
4121
|
-
s = removeDotSegments(s);
|
|
4068
|
+
if (gotEncoding && parsed.host !== void 0) {
|
|
4069
|
+
parsed.host = unescape(parsed.host);
|
|
4122
4070
|
}
|
|
4123
|
-
if (
|
|
4124
|
-
|
|
4071
|
+
if (parsed.path !== void 0 && parsed.path.length) {
|
|
4072
|
+
parsed.path = escape(unescape(parsed.path));
|
|
4073
|
+
}
|
|
4074
|
+
if (parsed.fragment !== void 0 && parsed.fragment.length) {
|
|
4075
|
+
parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
|
|
4125
4076
|
}
|
|
4126
|
-
uriTokens.push(s);
|
|
4127
|
-
}
|
|
4128
|
-
if (components.query !== void 0) {
|
|
4129
|
-
uriTokens.push("?");
|
|
4130
|
-
uriTokens.push(components.query);
|
|
4131
4077
|
}
|
|
4132
|
-
if (
|
|
4133
|
-
|
|
4134
|
-
uriTokens.push(components.fragment);
|
|
4078
|
+
if (schemeHandler && schemeHandler.parse) {
|
|
4079
|
+
schemeHandler.parse(parsed, options);
|
|
4135
4080
|
}
|
|
4136
|
-
|
|
4081
|
+
} else {
|
|
4082
|
+
parsed.error = parsed.error || "URI can not be parsed.";
|
|
4137
4083
|
}
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
target.path = removeDotSegments(relative.path || "");
|
|
4154
|
-
target.query = relative.query;
|
|
4155
|
-
} else {
|
|
4156
|
-
if (relative.userinfo !== void 0 || relative.host !== void 0 || relative.port !== void 0) {
|
|
4157
|
-
target.userinfo = relative.userinfo;
|
|
4158
|
-
target.host = relative.host;
|
|
4159
|
-
target.port = relative.port;
|
|
4160
|
-
target.path = removeDotSegments(relative.path || "");
|
|
4161
|
-
target.query = relative.query;
|
|
4162
|
-
} else {
|
|
4163
|
-
if (!relative.path) {
|
|
4164
|
-
target.path = base2.path;
|
|
4165
|
-
if (relative.query !== void 0) {
|
|
4166
|
-
target.query = relative.query;
|
|
4167
|
-
} else {
|
|
4168
|
-
target.query = base2.query;
|
|
4169
|
-
}
|
|
4170
|
-
} else {
|
|
4171
|
-
if (relative.path.charAt(0) === "/") {
|
|
4172
|
-
target.path = removeDotSegments(relative.path);
|
|
4173
|
-
} else {
|
|
4174
|
-
if ((base2.userinfo !== void 0 || base2.host !== void 0 || base2.port !== void 0) && !base2.path) {
|
|
4175
|
-
target.path = "/" + relative.path;
|
|
4176
|
-
} else if (!base2.path) {
|
|
4177
|
-
target.path = relative.path;
|
|
4178
|
-
} else {
|
|
4179
|
-
target.path = base2.path.slice(0, base2.path.lastIndexOf("/") + 1) + relative.path;
|
|
4180
|
-
}
|
|
4181
|
-
target.path = removeDotSegments(target.path);
|
|
4182
|
-
}
|
|
4183
|
-
target.query = relative.query;
|
|
4184
|
-
}
|
|
4185
|
-
target.userinfo = base2.userinfo;
|
|
4186
|
-
target.host = base2.host;
|
|
4187
|
-
target.port = base2.port;
|
|
4188
|
-
}
|
|
4189
|
-
target.scheme = base2.scheme;
|
|
4190
|
-
}
|
|
4191
|
-
target.fragment = relative.fragment;
|
|
4192
|
-
return target;
|
|
4193
|
-
}
|
|
4194
|
-
__name(resolveComponents, "resolveComponents");
|
|
4195
|
-
function resolve(baseURI, relativeURI, options) {
|
|
4196
|
-
var schemelessOptions = assign({ scheme: "null" }, options);
|
|
4197
|
-
return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);
|
|
4198
|
-
}
|
|
4199
|
-
__name(resolve, "resolve");
|
|
4200
|
-
function normalize(uri, options) {
|
|
4201
|
-
if (typeof uri === "string") {
|
|
4202
|
-
uri = serialize(parse(uri, options), options);
|
|
4203
|
-
} else if (typeOf(uri) === "object") {
|
|
4204
|
-
uri = parse(serialize(uri, options), options);
|
|
4205
|
-
}
|
|
4206
|
-
return uri;
|
|
4207
|
-
}
|
|
4208
|
-
__name(normalize, "normalize");
|
|
4209
|
-
function equal(uriA, uriB, options) {
|
|
4210
|
-
if (typeof uriA === "string") {
|
|
4211
|
-
uriA = serialize(parse(uriA, options), options);
|
|
4212
|
-
} else if (typeOf(uriA) === "object") {
|
|
4213
|
-
uriA = serialize(uriA, options);
|
|
4214
|
-
}
|
|
4215
|
-
if (typeof uriB === "string") {
|
|
4216
|
-
uriB = serialize(parse(uriB, options), options);
|
|
4217
|
-
} else if (typeOf(uriB) === "object") {
|
|
4218
|
-
uriB = serialize(uriB, options);
|
|
4219
|
-
}
|
|
4220
|
-
return uriA === uriB;
|
|
4221
|
-
}
|
|
4222
|
-
__name(equal, "equal");
|
|
4223
|
-
function escapeComponent(str, options) {
|
|
4224
|
-
return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar);
|
|
4225
|
-
}
|
|
4226
|
-
__name(escapeComponent, "escapeComponent");
|
|
4227
|
-
function unescapeComponent(str, options) {
|
|
4228
|
-
return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars);
|
|
4229
|
-
}
|
|
4230
|
-
__name(unescapeComponent, "unescapeComponent");
|
|
4231
|
-
var handler = {
|
|
4232
|
-
scheme: "http",
|
|
4233
|
-
domainHost: true,
|
|
4234
|
-
parse: /* @__PURE__ */ __name(function parse2(components, options) {
|
|
4235
|
-
if (!components.host) {
|
|
4236
|
-
components.error = components.error || "HTTP URIs must have a host.";
|
|
4237
|
-
}
|
|
4238
|
-
return components;
|
|
4239
|
-
}, "parse"),
|
|
4240
|
-
serialize: /* @__PURE__ */ __name(function serialize2(components, options) {
|
|
4241
|
-
var secure = String(components.scheme).toLowerCase() === "https";
|
|
4242
|
-
if (components.port === (secure ? 443 : 80) || components.port === "") {
|
|
4243
|
-
components.port = void 0;
|
|
4244
|
-
}
|
|
4245
|
-
if (!components.path) {
|
|
4246
|
-
components.path = "/";
|
|
4247
|
-
}
|
|
4248
|
-
return components;
|
|
4249
|
-
}, "serialize")
|
|
4250
|
-
};
|
|
4251
|
-
var handler$1 = {
|
|
4252
|
-
scheme: "https",
|
|
4253
|
-
domainHost: handler.domainHost,
|
|
4254
|
-
parse: handler.parse,
|
|
4255
|
-
serialize: handler.serialize
|
|
4256
|
-
};
|
|
4257
|
-
function isSecure(wsComponents) {
|
|
4258
|
-
return typeof wsComponents.secure === "boolean" ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === "wss";
|
|
4259
|
-
}
|
|
4260
|
-
__name(isSecure, "isSecure");
|
|
4261
|
-
var handler$2 = {
|
|
4262
|
-
scheme: "ws",
|
|
4263
|
-
domainHost: true,
|
|
4264
|
-
parse: /* @__PURE__ */ __name(function parse2(components, options) {
|
|
4265
|
-
var wsComponents = components;
|
|
4266
|
-
wsComponents.secure = isSecure(wsComponents);
|
|
4267
|
-
wsComponents.resourceName = (wsComponents.path || "/") + (wsComponents.query ? "?" + wsComponents.query : "");
|
|
4268
|
-
wsComponents.path = void 0;
|
|
4269
|
-
wsComponents.query = void 0;
|
|
4270
|
-
return wsComponents;
|
|
4271
|
-
}, "parse"),
|
|
4272
|
-
serialize: /* @__PURE__ */ __name(function serialize2(wsComponents, options) {
|
|
4273
|
-
if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === "") {
|
|
4274
|
-
wsComponents.port = void 0;
|
|
4275
|
-
}
|
|
4276
|
-
if (typeof wsComponents.secure === "boolean") {
|
|
4277
|
-
wsComponents.scheme = wsComponents.secure ? "wss" : "ws";
|
|
4278
|
-
wsComponents.secure = void 0;
|
|
4279
|
-
}
|
|
4280
|
-
if (wsComponents.resourceName) {
|
|
4281
|
-
var _wsComponents$resourc = wsComponents.resourceName.split("?"), _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), path = _wsComponents$resourc2[0], query = _wsComponents$resourc2[1];
|
|
4282
|
-
wsComponents.path = path && path !== "/" ? path : void 0;
|
|
4283
|
-
wsComponents.query = query;
|
|
4284
|
-
wsComponents.resourceName = void 0;
|
|
4285
|
-
}
|
|
4286
|
-
wsComponents.fragment = void 0;
|
|
4287
|
-
return wsComponents;
|
|
4288
|
-
}, "serialize")
|
|
4289
|
-
};
|
|
4290
|
-
var handler$3 = {
|
|
4291
|
-
scheme: "wss",
|
|
4292
|
-
domainHost: handler$2.domainHost,
|
|
4293
|
-
parse: handler$2.parse,
|
|
4294
|
-
serialize: handler$2.serialize
|
|
4295
|
-
};
|
|
4296
|
-
var O = {};
|
|
4297
|
-
var isIRI = true;
|
|
4298
|
-
var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]";
|
|
4299
|
-
var HEXDIG$$ = "[0-9A-Fa-f]";
|
|
4300
|
-
var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$));
|
|
4301
|
-
var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";
|
|
4302
|
-
var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";
|
|
4303
|
-
var VCHAR$$ = merge(QTEXT$$, '[\\"\\\\]');
|
|
4304
|
-
var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";
|
|
4305
|
-
var UNRESERVED = new RegExp(UNRESERVED$$, "g");
|
|
4306
|
-
var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g");
|
|
4307
|
-
var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g");
|
|
4308
|
-
var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g");
|
|
4309
|
-
var NOT_HFVALUE = NOT_HFNAME;
|
|
4310
|
-
function decodeUnreserved(str) {
|
|
4311
|
-
var decStr = pctDecChars(str);
|
|
4312
|
-
return !decStr.match(UNRESERVED) ? str : decStr;
|
|
4313
|
-
}
|
|
4314
|
-
__name(decodeUnreserved, "decodeUnreserved");
|
|
4315
|
-
var handler$4 = {
|
|
4316
|
-
scheme: "mailto",
|
|
4317
|
-
parse: /* @__PURE__ */ __name(function parse$$1(components, options) {
|
|
4318
|
-
var mailtoComponents = components;
|
|
4319
|
-
var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : [];
|
|
4320
|
-
mailtoComponents.path = void 0;
|
|
4321
|
-
if (mailtoComponents.query) {
|
|
4322
|
-
var unknownHeaders = false;
|
|
4323
|
-
var headers = {};
|
|
4324
|
-
var hfields = mailtoComponents.query.split("&");
|
|
4325
|
-
for (var x = 0, xl = hfields.length; x < xl; ++x) {
|
|
4326
|
-
var hfield = hfields[x].split("=");
|
|
4327
|
-
switch (hfield[0]) {
|
|
4328
|
-
case "to":
|
|
4329
|
-
var toAddrs = hfield[1].split(",");
|
|
4330
|
-
for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) {
|
|
4331
|
-
to.push(toAddrs[_x]);
|
|
4332
|
-
}
|
|
4333
|
-
break;
|
|
4334
|
-
case "subject":
|
|
4335
|
-
mailtoComponents.subject = unescapeComponent(hfield[1], options);
|
|
4336
|
-
break;
|
|
4337
|
-
case "body":
|
|
4338
|
-
mailtoComponents.body = unescapeComponent(hfield[1], options);
|
|
4339
|
-
break;
|
|
4340
|
-
default:
|
|
4341
|
-
unknownHeaders = true;
|
|
4342
|
-
headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
|
|
4343
|
-
break;
|
|
4344
|
-
}
|
|
4345
|
-
}
|
|
4346
|
-
if (unknownHeaders)
|
|
4347
|
-
mailtoComponents.headers = headers;
|
|
4348
|
-
}
|
|
4349
|
-
mailtoComponents.query = void 0;
|
|
4350
|
-
for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) {
|
|
4351
|
-
var addr = to[_x2].split("@");
|
|
4352
|
-
addr[0] = unescapeComponent(addr[0]);
|
|
4353
|
-
if (!options.unicodeSupport) {
|
|
4354
|
-
try {
|
|
4355
|
-
addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());
|
|
4356
|
-
} catch (e) {
|
|
4357
|
-
mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e;
|
|
4358
|
-
}
|
|
4359
|
-
} else {
|
|
4360
|
-
addr[1] = unescapeComponent(addr[1], options).toLowerCase();
|
|
4361
|
-
}
|
|
4362
|
-
to[_x2] = addr.join("@");
|
|
4363
|
-
}
|
|
4364
|
-
return mailtoComponents;
|
|
4365
|
-
}, "parse$$1"),
|
|
4366
|
-
serialize: /* @__PURE__ */ __name(function serialize$$1(mailtoComponents, options) {
|
|
4367
|
-
var components = mailtoComponents;
|
|
4368
|
-
var to = toArray(mailtoComponents.to);
|
|
4369
|
-
if (to) {
|
|
4370
|
-
for (var x = 0, xl = to.length; x < xl; ++x) {
|
|
4371
|
-
var toAddr = String(to[x]);
|
|
4372
|
-
var atIdx = toAddr.lastIndexOf("@");
|
|
4373
|
-
var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);
|
|
4374
|
-
var domain = toAddr.slice(atIdx + 1);
|
|
4375
|
-
try {
|
|
4376
|
-
domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain);
|
|
4377
|
-
} catch (e) {
|
|
4378
|
-
components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
|
|
4379
|
-
}
|
|
4380
|
-
to[x] = localPart + "@" + domain;
|
|
4381
|
-
}
|
|
4382
|
-
components.path = to.join(",");
|
|
4383
|
-
}
|
|
4384
|
-
var headers = mailtoComponents.headers = mailtoComponents.headers || {};
|
|
4385
|
-
if (mailtoComponents.subject)
|
|
4386
|
-
headers["subject"] = mailtoComponents.subject;
|
|
4387
|
-
if (mailtoComponents.body)
|
|
4388
|
-
headers["body"] = mailtoComponents.body;
|
|
4389
|
-
var fields = [];
|
|
4390
|
-
for (var name in headers) {
|
|
4391
|
-
if (headers[name] !== O[name]) {
|
|
4392
|
-
fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar));
|
|
4393
|
-
}
|
|
4394
|
-
}
|
|
4395
|
-
if (fields.length) {
|
|
4396
|
-
components.query = fields.join("&");
|
|
4397
|
-
}
|
|
4398
|
-
return components;
|
|
4399
|
-
}, "serialize$$1")
|
|
4400
|
-
};
|
|
4401
|
-
var URN_PARSE = /^([^\:]+)\:(.*)/;
|
|
4402
|
-
var handler$5 = {
|
|
4403
|
-
scheme: "urn",
|
|
4404
|
-
parse: /* @__PURE__ */ __name(function parse$$1(components, options) {
|
|
4405
|
-
var matches = components.path && components.path.match(URN_PARSE);
|
|
4406
|
-
var urnComponents = components;
|
|
4407
|
-
if (matches) {
|
|
4408
|
-
var scheme = options.scheme || urnComponents.scheme || "urn";
|
|
4409
|
-
var nid = matches[1].toLowerCase();
|
|
4410
|
-
var nss = matches[2];
|
|
4411
|
-
var urnScheme = scheme + ":" + (options.nid || nid);
|
|
4412
|
-
var schemeHandler = SCHEMES[urnScheme];
|
|
4413
|
-
urnComponents.nid = nid;
|
|
4414
|
-
urnComponents.nss = nss;
|
|
4415
|
-
urnComponents.path = void 0;
|
|
4416
|
-
if (schemeHandler) {
|
|
4417
|
-
urnComponents = schemeHandler.parse(urnComponents, options);
|
|
4418
|
-
}
|
|
4419
|
-
} else {
|
|
4420
|
-
urnComponents.error = urnComponents.error || "URN can not be parsed.";
|
|
4421
|
-
}
|
|
4422
|
-
return urnComponents;
|
|
4423
|
-
}, "parse$$1"),
|
|
4424
|
-
serialize: /* @__PURE__ */ __name(function serialize$$1(urnComponents, options) {
|
|
4425
|
-
var scheme = options.scheme || urnComponents.scheme || "urn";
|
|
4426
|
-
var nid = urnComponents.nid;
|
|
4427
|
-
var urnScheme = scheme + ":" + (options.nid || nid);
|
|
4428
|
-
var schemeHandler = SCHEMES[urnScheme];
|
|
4429
|
-
if (schemeHandler) {
|
|
4430
|
-
urnComponents = schemeHandler.serialize(urnComponents, options);
|
|
4431
|
-
}
|
|
4432
|
-
var uriComponents = urnComponents;
|
|
4433
|
-
var nss = urnComponents.nss;
|
|
4434
|
-
uriComponents.path = (nid || options.nid) + ":" + nss;
|
|
4435
|
-
return uriComponents;
|
|
4436
|
-
}, "serialize$$1")
|
|
4437
|
-
};
|
|
4438
|
-
var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;
|
|
4439
|
-
var handler$6 = {
|
|
4440
|
-
scheme: "urn:uuid",
|
|
4441
|
-
parse: /* @__PURE__ */ __name(function parse2(urnComponents, options) {
|
|
4442
|
-
var uuidComponents = urnComponents;
|
|
4443
|
-
uuidComponents.uuid = uuidComponents.nss;
|
|
4444
|
-
uuidComponents.nss = void 0;
|
|
4445
|
-
if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {
|
|
4446
|
-
uuidComponents.error = uuidComponents.error || "UUID is not valid.";
|
|
4447
|
-
}
|
|
4448
|
-
return uuidComponents;
|
|
4449
|
-
}, "parse"),
|
|
4450
|
-
serialize: /* @__PURE__ */ __name(function serialize2(uuidComponents, options) {
|
|
4451
|
-
var urnComponents = uuidComponents;
|
|
4452
|
-
urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
|
|
4453
|
-
return urnComponents;
|
|
4454
|
-
}, "serialize")
|
|
4455
|
-
};
|
|
4456
|
-
SCHEMES[handler.scheme] = handler;
|
|
4457
|
-
SCHEMES[handler$1.scheme] = handler$1;
|
|
4458
|
-
SCHEMES[handler$2.scheme] = handler$2;
|
|
4459
|
-
SCHEMES[handler$3.scheme] = handler$3;
|
|
4460
|
-
SCHEMES[handler$4.scheme] = handler$4;
|
|
4461
|
-
SCHEMES[handler$5.scheme] = handler$5;
|
|
4462
|
-
SCHEMES[handler$6.scheme] = handler$6;
|
|
4463
|
-
exports2.SCHEMES = SCHEMES;
|
|
4464
|
-
exports2.pctEncChar = pctEncChar;
|
|
4465
|
-
exports2.pctDecChars = pctDecChars;
|
|
4466
|
-
exports2.parse = parse;
|
|
4467
|
-
exports2.removeDotSegments = removeDotSegments;
|
|
4468
|
-
exports2.serialize = serialize;
|
|
4469
|
-
exports2.resolveComponents = resolveComponents;
|
|
4470
|
-
exports2.resolve = resolve;
|
|
4471
|
-
exports2.normalize = normalize;
|
|
4472
|
-
exports2.equal = equal;
|
|
4473
|
-
exports2.escapeComponent = escapeComponent;
|
|
4474
|
-
exports2.unescapeComponent = unescapeComponent;
|
|
4475
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4476
|
-
});
|
|
4084
|
+
return parsed;
|
|
4085
|
+
}
|
|
4086
|
+
__name(parse, "parse");
|
|
4087
|
+
var fastUri = {
|
|
4088
|
+
SCHEMES,
|
|
4089
|
+
normalize,
|
|
4090
|
+
resolve,
|
|
4091
|
+
resolveComponents,
|
|
4092
|
+
equal,
|
|
4093
|
+
serialize,
|
|
4094
|
+
parse
|
|
4095
|
+
};
|
|
4096
|
+
module.exports = fastUri;
|
|
4097
|
+
module.exports.default = fastUri;
|
|
4098
|
+
module.exports.fastUri = fastUri;
|
|
4477
4099
|
}
|
|
4478
4100
|
});
|
|
4479
4101
|
|
|
@@ -4482,7 +4104,7 @@ var require_uri = __commonJS({
|
|
|
4482
4104
|
"node_modules/ajv/dist/runtime/uri.js"(exports) {
|
|
4483
4105
|
"use strict";
|
|
4484
4106
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4485
|
-
var uri =
|
|
4107
|
+
var uri = require_fast_uri();
|
|
4486
4108
|
uri.code = 'require("ajv/dist/runtime/uri").default';
|
|
4487
4109
|
exports.default = uri;
|
|
4488
4110
|
}
|
|
@@ -4495,28 +4117,28 @@ var require_core = __commonJS({
|
|
|
4495
4117
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4496
4118
|
exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;
|
|
4497
4119
|
var validate_1 = require_validate();
|
|
4498
|
-
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() {
|
|
4120
|
+
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
4499
4121
|
return validate_1.KeywordCxt;
|
|
4500
|
-
} });
|
|
4122
|
+
}, "get") });
|
|
4501
4123
|
var codegen_1 = require_codegen();
|
|
4502
|
-
Object.defineProperty(exports, "_", { enumerable: true, get: function() {
|
|
4124
|
+
Object.defineProperty(exports, "_", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
4503
4125
|
return codegen_1._;
|
|
4504
|
-
} });
|
|
4505
|
-
Object.defineProperty(exports, "str", { enumerable: true, get: function() {
|
|
4126
|
+
}, "get") });
|
|
4127
|
+
Object.defineProperty(exports, "str", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
4506
4128
|
return codegen_1.str;
|
|
4507
|
-
} });
|
|
4508
|
-
Object.defineProperty(exports, "stringify", { enumerable: true, get: function() {
|
|
4129
|
+
}, "get") });
|
|
4130
|
+
Object.defineProperty(exports, "stringify", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
4509
4131
|
return codegen_1.stringify;
|
|
4510
|
-
} });
|
|
4511
|
-
Object.defineProperty(exports, "nil", { enumerable: true, get: function() {
|
|
4132
|
+
}, "get") });
|
|
4133
|
+
Object.defineProperty(exports, "nil", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
4512
4134
|
return codegen_1.nil;
|
|
4513
|
-
} });
|
|
4514
|
-
Object.defineProperty(exports, "Name", { enumerable: true, get: function() {
|
|
4135
|
+
}, "get") });
|
|
4136
|
+
Object.defineProperty(exports, "Name", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
4515
4137
|
return codegen_1.Name;
|
|
4516
|
-
} });
|
|
4517
|
-
Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function() {
|
|
4138
|
+
}, "get") });
|
|
4139
|
+
Object.defineProperty(exports, "CodeGen", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
4518
4140
|
return codegen_1.CodeGen;
|
|
4519
|
-
} });
|
|
4141
|
+
}, "get") });
|
|
4520
4142
|
var validation_error_1 = require_validation_error();
|
|
4521
4143
|
var ref_error_1 = require_ref_error();
|
|
4522
4144
|
var rules_1 = require_rules();
|
|
@@ -5302,8 +4924,8 @@ var require_limitNumber = __commonJS({
|
|
|
5302
4924
|
exclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE }
|
|
5303
4925
|
};
|
|
5304
4926
|
var error = {
|
|
5305
|
-
message: ({ keyword, schemaCode }) => (0, codegen_1.str)`must be ${KWDs[keyword].okStr} ${schemaCode}`,
|
|
5306
|
-
params: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}
|
|
4927
|
+
message: /* @__PURE__ */ __name(({ keyword, schemaCode }) => (0, codegen_1.str)`must be ${KWDs[keyword].okStr} ${schemaCode}`, "message"),
|
|
4928
|
+
params: /* @__PURE__ */ __name(({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`, "params")
|
|
5307
4929
|
};
|
|
5308
4930
|
var def = {
|
|
5309
4931
|
keyword: Object.keys(KWDs),
|
|
@@ -5327,8 +4949,8 @@ var require_multipleOf = __commonJS({
|
|
|
5327
4949
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5328
4950
|
var codegen_1 = require_codegen();
|
|
5329
4951
|
var error = {
|
|
5330
|
-
message: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`,
|
|
5331
|
-
params: ({ schemaCode }) => (0, codegen_1._)`{multipleOf: ${schemaCode}}
|
|
4952
|
+
message: /* @__PURE__ */ __name(({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`, "message"),
|
|
4953
|
+
params: /* @__PURE__ */ __name(({ schemaCode }) => (0, codegen_1._)`{multipleOf: ${schemaCode}}`, "params")
|
|
5332
4954
|
};
|
|
5333
4955
|
var def = {
|
|
5334
4956
|
keyword: "multipleOf",
|
|
@@ -5388,7 +5010,7 @@ var require_limitLength = __commonJS({
|
|
|
5388
5010
|
const comp = keyword === "maxLength" ? "more" : "fewer";
|
|
5389
5011
|
return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`;
|
|
5390
5012
|
},
|
|
5391
|
-
params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}
|
|
5013
|
+
params: /* @__PURE__ */ __name(({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`, "params")
|
|
5392
5014
|
};
|
|
5393
5015
|
var def = {
|
|
5394
5016
|
keyword: ["maxLength", "minLength"],
|
|
@@ -5415,8 +5037,8 @@ var require_pattern = __commonJS({
|
|
|
5415
5037
|
var code_1 = require_code2();
|
|
5416
5038
|
var codegen_1 = require_codegen();
|
|
5417
5039
|
var error = {
|
|
5418
|
-
message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`,
|
|
5419
|
-
params: ({ schemaCode }) => (0, codegen_1._)`{pattern: ${schemaCode}}
|
|
5040
|
+
message: /* @__PURE__ */ __name(({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`, "message"),
|
|
5041
|
+
params: /* @__PURE__ */ __name(({ schemaCode }) => (0, codegen_1._)`{pattern: ${schemaCode}}`, "params")
|
|
5420
5042
|
};
|
|
5421
5043
|
var def = {
|
|
5422
5044
|
keyword: "pattern",
|
|
@@ -5446,7 +5068,7 @@ var require_limitProperties = __commonJS({
|
|
|
5446
5068
|
const comp = keyword === "maxProperties" ? "more" : "fewer";
|
|
5447
5069
|
return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`;
|
|
5448
5070
|
},
|
|
5449
|
-
params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}
|
|
5071
|
+
params: /* @__PURE__ */ __name(({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`, "params")
|
|
5450
5072
|
};
|
|
5451
5073
|
var def = {
|
|
5452
5074
|
keyword: ["maxProperties", "minProperties"],
|
|
@@ -5473,8 +5095,8 @@ var require_required = __commonJS({
|
|
|
5473
5095
|
var codegen_1 = require_codegen();
|
|
5474
5096
|
var util_1 = require_util();
|
|
5475
5097
|
var error = {
|
|
5476
|
-
message: ({ params: { missingProperty } }) => (0, codegen_1.str)`must have required property '${missingProperty}'`,
|
|
5477
|
-
params: ({ params: { missingProperty } }) => (0, codegen_1._)`{missingProperty: ${missingProperty}}
|
|
5098
|
+
message: /* @__PURE__ */ __name(({ params: { missingProperty } }) => (0, codegen_1.str)`must have required property '${missingProperty}'`, "message"),
|
|
5099
|
+
params: /* @__PURE__ */ __name(({ params: { missingProperty } }) => (0, codegen_1._)`{missingProperty: ${missingProperty}}`, "params")
|
|
5478
5100
|
};
|
|
5479
5101
|
var def = {
|
|
5480
5102
|
keyword: "required",
|
|
@@ -5561,7 +5183,7 @@ var require_limitItems = __commonJS({
|
|
|
5561
5183
|
const comp = keyword === "maxItems" ? "more" : "fewer";
|
|
5562
5184
|
return (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`;
|
|
5563
5185
|
},
|
|
5564
|
-
params: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}
|
|
5186
|
+
params: /* @__PURE__ */ __name(({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`, "params")
|
|
5565
5187
|
};
|
|
5566
5188
|
var def = {
|
|
5567
5189
|
keyword: ["maxItems", "minItems"],
|
|
@@ -5600,8 +5222,8 @@ var require_uniqueItems = __commonJS({
|
|
|
5600
5222
|
var util_1 = require_util();
|
|
5601
5223
|
var equal_1 = require_equal();
|
|
5602
5224
|
var error = {
|
|
5603
|
-
message: ({ params: { i, j } }) => (0, codegen_1.str)`must NOT have duplicate items (items ## ${j} and ${i} are identical)`,
|
|
5604
|
-
params: ({ params: { i, j } }) => (0, codegen_1._)`{i: ${i}, j: ${j}}
|
|
5225
|
+
message: /* @__PURE__ */ __name(({ params: { i, j } }) => (0, codegen_1.str)`must NOT have duplicate items (items ## ${j} and ${i} are identical)`, "message"),
|
|
5226
|
+
params: /* @__PURE__ */ __name(({ params: { i, j } }) => (0, codegen_1._)`{i: ${i}, j: ${j}}`, "params")
|
|
5605
5227
|
};
|
|
5606
5228
|
var def = {
|
|
5607
5229
|
keyword: "uniqueItems",
|
|
@@ -5671,7 +5293,7 @@ var require_const = __commonJS({
|
|
|
5671
5293
|
var equal_1 = require_equal();
|
|
5672
5294
|
var error = {
|
|
5673
5295
|
message: "must be equal to constant",
|
|
5674
|
-
params: ({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}
|
|
5296
|
+
params: /* @__PURE__ */ __name(({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}`, "params")
|
|
5675
5297
|
};
|
|
5676
5298
|
var def = {
|
|
5677
5299
|
keyword: "const",
|
|
@@ -5700,7 +5322,7 @@ var require_enum = __commonJS({
|
|
|
5700
5322
|
var equal_1 = require_equal();
|
|
5701
5323
|
var error = {
|
|
5702
5324
|
message: "must be equal to one of the allowed values",
|
|
5703
|
-
params: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}
|
|
5325
|
+
params: /* @__PURE__ */ __name(({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}`, "params")
|
|
5704
5326
|
};
|
|
5705
5327
|
var def = {
|
|
5706
5328
|
keyword: "enum",
|
|
@@ -5788,8 +5410,8 @@ var require_additionalItems = __commonJS({
|
|
|
5788
5410
|
var codegen_1 = require_codegen();
|
|
5789
5411
|
var util_1 = require_util();
|
|
5790
5412
|
var error = {
|
|
5791
|
-
message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
|
|
5792
|
-
params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}
|
|
5413
|
+
message: /* @__PURE__ */ __name(({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`, "message"),
|
|
5414
|
+
params: /* @__PURE__ */ __name(({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`, "params")
|
|
5793
5415
|
};
|
|
5794
5416
|
var def = {
|
|
5795
5417
|
keyword: "additionalItems",
|
|
@@ -5904,7 +5526,7 @@ var require_prefixItems = __commonJS({
|
|
|
5904
5526
|
type: "array",
|
|
5905
5527
|
schemaType: ["array"],
|
|
5906
5528
|
before: "uniqueItems",
|
|
5907
|
-
code: (cxt) => (0, items_1.validateTuple)(cxt, "items")
|
|
5529
|
+
code: /* @__PURE__ */ __name((cxt) => (0, items_1.validateTuple)(cxt, "items"), "code")
|
|
5908
5530
|
};
|
|
5909
5531
|
exports.default = def;
|
|
5910
5532
|
}
|
|
@@ -5920,8 +5542,8 @@ var require_items2020 = __commonJS({
|
|
|
5920
5542
|
var code_1 = require_code2();
|
|
5921
5543
|
var additionalItems_1 = require_additionalItems();
|
|
5922
5544
|
var error = {
|
|
5923
|
-
message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
|
|
5924
|
-
params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}
|
|
5545
|
+
message: /* @__PURE__ */ __name(({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`, "message"),
|
|
5546
|
+
params: /* @__PURE__ */ __name(({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`, "params")
|
|
5925
5547
|
};
|
|
5926
5548
|
var def = {
|
|
5927
5549
|
keyword: "items",
|
|
@@ -5953,8 +5575,8 @@ var require_contains = __commonJS({
|
|
|
5953
5575
|
var codegen_1 = require_codegen();
|
|
5954
5576
|
var util_1 = require_util();
|
|
5955
5577
|
var error = {
|
|
5956
|
-
message: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1.str)`must contain at least ${min} valid item(s)` : (0, codegen_1.str)`must contain at least ${min} and no more than ${max} valid item(s)`,
|
|
5957
|
-
params: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1._)`{minContains: ${min}}` : (0, codegen_1._)`{minContains: ${min}, maxContains: ${max}}
|
|
5578
|
+
message: /* @__PURE__ */ __name(({ params: { min, max } }) => max === void 0 ? (0, codegen_1.str)`must contain at least ${min} valid item(s)` : (0, codegen_1.str)`must contain at least ${min} and no more than ${max} valid item(s)`, "message"),
|
|
5579
|
+
params: /* @__PURE__ */ __name(({ params: { min, max } }) => max === void 0 ? (0, codegen_1._)`{minContains: ${min}}` : (0, codegen_1._)`{minContains: ${min}, maxContains: ${max}}`, "params")
|
|
5958
5580
|
};
|
|
5959
5581
|
var def = {
|
|
5960
5582
|
keyword: "contains",
|
|
@@ -6052,14 +5674,14 @@ var require_dependencies = __commonJS({
|
|
|
6052
5674
|
var util_1 = require_util();
|
|
6053
5675
|
var code_1 = require_code2();
|
|
6054
5676
|
exports.error = {
|
|
6055
|
-
message: ({ params: { property, depsCount, deps } }) => {
|
|
5677
|
+
message: /* @__PURE__ */ __name(({ params: { property, depsCount, deps } }) => {
|
|
6056
5678
|
const property_ies = depsCount === 1 ? "property" : "properties";
|
|
6057
5679
|
return (0, codegen_1.str)`must have ${property_ies} ${deps} when property ${property} is present`;
|
|
6058
|
-
},
|
|
6059
|
-
params: ({ params: { property, depsCount, deps, missingProperty } }) => (0, codegen_1._)`{property: ${property},
|
|
5680
|
+
}, "message"),
|
|
5681
|
+
params: /* @__PURE__ */ __name(({ params: { property, depsCount, deps, missingProperty } }) => (0, codegen_1._)`{property: ${property},
|
|
6060
5682
|
missingProperty: ${missingProperty},
|
|
6061
5683
|
depsCount: ${depsCount},
|
|
6062
|
-
deps: ${deps}}
|
|
5684
|
+
deps: ${deps}}`, "params")
|
|
6063
5685
|
// TODO change to reference
|
|
6064
5686
|
};
|
|
6065
5687
|
var def = {
|
|
@@ -6148,7 +5770,7 @@ var require_propertyNames = __commonJS({
|
|
|
6148
5770
|
var util_1 = require_util();
|
|
6149
5771
|
var error = {
|
|
6150
5772
|
message: "property name must be valid",
|
|
6151
|
-
params: ({ params }) => (0, codegen_1._)`{propertyName: ${params.propertyName}}
|
|
5773
|
+
params: /* @__PURE__ */ __name(({ params }) => (0, codegen_1._)`{propertyName: ${params.propertyName}}`, "params")
|
|
6152
5774
|
};
|
|
6153
5775
|
var def = {
|
|
6154
5776
|
keyword: "propertyNames",
|
|
@@ -6193,7 +5815,7 @@ var require_additionalProperties = __commonJS({
|
|
|
6193
5815
|
var util_1 = require_util();
|
|
6194
5816
|
var error = {
|
|
6195
5817
|
message: "must NOT have additional properties",
|
|
6196
|
-
params: ({ params }) => (0, codegen_1._)`{additionalProperty: ${params.additionalProperty}}
|
|
5818
|
+
params: /* @__PURE__ */ __name(({ params }) => (0, codegen_1._)`{additionalProperty: ${params.additionalProperty}}`, "params")
|
|
6197
5819
|
};
|
|
6198
5820
|
var def = {
|
|
6199
5821
|
keyword: "additionalProperties",
|
|
@@ -6487,7 +6109,7 @@ var require_oneOf = __commonJS({
|
|
|
6487
6109
|
var util_1 = require_util();
|
|
6488
6110
|
var error = {
|
|
6489
6111
|
message: "must match exactly one schema in oneOf",
|
|
6490
|
-
params: ({ params }) => (0, codegen_1._)`{passingSchemas: ${params.passing}}
|
|
6112
|
+
params: /* @__PURE__ */ __name(({ params }) => (0, codegen_1._)`{passingSchemas: ${params.passing}}`, "params")
|
|
6491
6113
|
};
|
|
6492
6114
|
var def = {
|
|
6493
6115
|
keyword: "oneOf",
|
|
@@ -6572,8 +6194,8 @@ var require_if = __commonJS({
|
|
|
6572
6194
|
var codegen_1 = require_codegen();
|
|
6573
6195
|
var util_1 = require_util();
|
|
6574
6196
|
var error = {
|
|
6575
|
-
message: ({ params }) => (0, codegen_1.str)`must match "${params.ifClause}" schema`,
|
|
6576
|
-
params: ({ params }) => (0, codegen_1._)`{failingKeyword: ${params.ifClause}}
|
|
6197
|
+
message: /* @__PURE__ */ __name(({ params }) => (0, codegen_1.str)`must match "${params.ifClause}" schema`, "message"),
|
|
6198
|
+
params: /* @__PURE__ */ __name(({ params }) => (0, codegen_1._)`{failingKeyword: ${params.ifClause}}`, "params")
|
|
6577
6199
|
};
|
|
6578
6200
|
var def = {
|
|
6579
6201
|
keyword: "if",
|
|
@@ -6710,8 +6332,8 @@ var require_format = __commonJS({
|
|
|
6710
6332
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6711
6333
|
var codegen_1 = require_codegen();
|
|
6712
6334
|
var error = {
|
|
6713
|
-
message: ({ schemaCode }) => (0, codegen_1.str)`must match format "${schemaCode}"`,
|
|
6714
|
-
params: ({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}
|
|
6335
|
+
message: /* @__PURE__ */ __name(({ schemaCode }) => (0, codegen_1.str)`must match format "${schemaCode}"`, "message"),
|
|
6336
|
+
params: /* @__PURE__ */ __name(({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}`, "params")
|
|
6715
6337
|
};
|
|
6716
6338
|
var def = {
|
|
6717
6339
|
keyword: "format",
|
|
@@ -6882,8 +6504,8 @@ var require_discriminator = __commonJS({
|
|
|
6882
6504
|
var ref_error_1 = require_ref_error();
|
|
6883
6505
|
var util_1 = require_util();
|
|
6884
6506
|
var error = {
|
|
6885
|
-
message: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`,
|
|
6886
|
-
params: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}
|
|
6507
|
+
message: /* @__PURE__ */ __name(({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag "${tagName}" must be string` : `value of tag "${tagName}" must be in oneOf`, "message"),
|
|
6508
|
+
params: /* @__PURE__ */ __name(({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`, "params")
|
|
6887
6509
|
};
|
|
6888
6510
|
var def = {
|
|
6889
6511
|
keyword: "discriminator",
|
|
@@ -7179,36 +6801,36 @@ var require_ajv = __commonJS({
|
|
|
7179
6801
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7180
6802
|
exports.default = Ajv;
|
|
7181
6803
|
var validate_1 = require_validate();
|
|
7182
|
-
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() {
|
|
6804
|
+
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
7183
6805
|
return validate_1.KeywordCxt;
|
|
7184
|
-
} });
|
|
6806
|
+
}, "get") });
|
|
7185
6807
|
var codegen_1 = require_codegen();
|
|
7186
|
-
Object.defineProperty(exports, "_", { enumerable: true, get: function() {
|
|
6808
|
+
Object.defineProperty(exports, "_", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
7187
6809
|
return codegen_1._;
|
|
7188
|
-
} });
|
|
7189
|
-
Object.defineProperty(exports, "str", { enumerable: true, get: function() {
|
|
6810
|
+
}, "get") });
|
|
6811
|
+
Object.defineProperty(exports, "str", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
7190
6812
|
return codegen_1.str;
|
|
7191
|
-
} });
|
|
7192
|
-
Object.defineProperty(exports, "stringify", { enumerable: true, get: function() {
|
|
6813
|
+
}, "get") });
|
|
6814
|
+
Object.defineProperty(exports, "stringify", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
7193
6815
|
return codegen_1.stringify;
|
|
7194
|
-
} });
|
|
7195
|
-
Object.defineProperty(exports, "nil", { enumerable: true, get: function() {
|
|
6816
|
+
}, "get") });
|
|
6817
|
+
Object.defineProperty(exports, "nil", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
7196
6818
|
return codegen_1.nil;
|
|
7197
|
-
} });
|
|
7198
|
-
Object.defineProperty(exports, "Name", { enumerable: true, get: function() {
|
|
6819
|
+
}, "get") });
|
|
6820
|
+
Object.defineProperty(exports, "Name", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
7199
6821
|
return codegen_1.Name;
|
|
7200
|
-
} });
|
|
7201
|
-
Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function() {
|
|
6822
|
+
}, "get") });
|
|
6823
|
+
Object.defineProperty(exports, "CodeGen", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
7202
6824
|
return codegen_1.CodeGen;
|
|
7203
|
-
} });
|
|
6825
|
+
}, "get") });
|
|
7204
6826
|
var validation_error_1 = require_validation_error();
|
|
7205
|
-
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function() {
|
|
6827
|
+
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
7206
6828
|
return validation_error_1.default;
|
|
7207
|
-
} });
|
|
6829
|
+
}, "get") });
|
|
7208
6830
|
var ref_error_1 = require_ref_error();
|
|
7209
|
-
Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function() {
|
|
6831
|
+
Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: /* @__PURE__ */ __name(function() {
|
|
7210
6832
|
return ref_error_1.default;
|
|
7211
|
-
} });
|
|
6833
|
+
}, "get") });
|
|
7212
6834
|
}
|
|
7213
6835
|
});
|
|
7214
6836
|
|
|
@@ -7226,8 +6848,10 @@ var require_formats = __commonJS({
|
|
|
7226
6848
|
// date: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
7227
6849
|
date: fmtDef(date, compareDate),
|
|
7228
6850
|
// date-time: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
7229
|
-
time: fmtDef(
|
|
7230
|
-
"date-time": fmtDef(
|
|
6851
|
+
time: fmtDef(getTime(true), compareTime),
|
|
6852
|
+
"date-time": fmtDef(getDateTime(true), compareDateTime),
|
|
6853
|
+
"iso-time": fmtDef(getTime(), compareIsoTime),
|
|
6854
|
+
"iso-date-time": fmtDef(getDateTime(), compareIsoDateTime),
|
|
7231
6855
|
// duration: https://tools.ietf.org/html/rfc3339#appendix-A
|
|
7232
6856
|
duration: /^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,
|
|
7233
6857
|
uri,
|
|
@@ -7240,7 +6864,7 @@ var require_formats = __commonJS({
|
|
|
7240
6864
|
email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,
|
|
7241
6865
|
hostname: /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,
|
|
7242
6866
|
// optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
|
|
7243
|
-
ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[
|
|
6867
|
+
ipv4: /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,
|
|
7244
6868
|
ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,
|
|
7245
6869
|
regex,
|
|
7246
6870
|
// uuid: http://tools.ietf.org/html/rfc4122
|
|
@@ -7270,8 +6894,10 @@ var require_formats = __commonJS({
|
|
|
7270
6894
|
exports.fastFormats = {
|
|
7271
6895
|
...exports.fullFormats,
|
|
7272
6896
|
date: fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/, compareDate),
|
|
7273
|
-
time: fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)
|
|
7274
|
-
"date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\
|
|
6897
|
+
time: fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareTime),
|
|
6898
|
+
"date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i, compareDateTime),
|
|
6899
|
+
"iso-time": fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoTime),
|
|
6900
|
+
"iso-date-time": fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i, compareIsoDateTime),
|
|
7275
6901
|
// uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js
|
|
7276
6902
|
uri: /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,
|
|
7277
6903
|
"uri-reference": /^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,
|
|
@@ -7307,41 +6933,75 @@ var require_formats = __commonJS({
|
|
|
7307
6933
|
return 0;
|
|
7308
6934
|
}
|
|
7309
6935
|
__name(compareDate, "compareDate");
|
|
7310
|
-
var TIME = /^(\d\d):(\d\d):(\d\d
|
|
7311
|
-
function
|
|
7312
|
-
|
|
7313
|
-
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
-
|
|
7318
|
-
|
|
7319
|
-
|
|
7320
|
-
|
|
7321
|
-
|
|
7322
|
-
|
|
6936
|
+
var TIME = /^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;
|
|
6937
|
+
function getTime(strictTimeZone) {
|
|
6938
|
+
return /* @__PURE__ */ __name(function time(str) {
|
|
6939
|
+
const matches = TIME.exec(str);
|
|
6940
|
+
if (!matches)
|
|
6941
|
+
return false;
|
|
6942
|
+
const hr = +matches[1];
|
|
6943
|
+
const min = +matches[2];
|
|
6944
|
+
const sec = +matches[3];
|
|
6945
|
+
const tz = matches[4];
|
|
6946
|
+
const tzSign = matches[5] === "-" ? -1 : 1;
|
|
6947
|
+
const tzH = +(matches[6] || 0);
|
|
6948
|
+
const tzM = +(matches[7] || 0);
|
|
6949
|
+
if (tzH > 23 || tzM > 59 || strictTimeZone && !tz)
|
|
6950
|
+
return false;
|
|
6951
|
+
if (hr <= 23 && min <= 59 && sec < 60)
|
|
6952
|
+
return true;
|
|
6953
|
+
const utcMin = min - tzM * tzSign;
|
|
6954
|
+
const utcHr = hr - tzH * tzSign - (utcMin < 0 ? 1 : 0);
|
|
6955
|
+
return (utcHr === 23 || utcHr === -1) && (utcMin === 59 || utcMin === -1) && sec < 61;
|
|
6956
|
+
}, "time");
|
|
6957
|
+
}
|
|
6958
|
+
__name(getTime, "getTime");
|
|
6959
|
+
function compareTime(s1, s2) {
|
|
6960
|
+
if (!(s1 && s2))
|
|
6961
|
+
return void 0;
|
|
6962
|
+
const t1 = (/* @__PURE__ */ new Date("2020-01-01T" + s1)).valueOf();
|
|
6963
|
+
const t2 = (/* @__PURE__ */ new Date("2020-01-01T" + s2)).valueOf();
|
|
6964
|
+
if (!(t1 && t2))
|
|
6965
|
+
return void 0;
|
|
6966
|
+
return t1 - t2;
|
|
6967
|
+
}
|
|
6968
|
+
__name(compareTime, "compareTime");
|
|
6969
|
+
function compareIsoTime(t1, t2) {
|
|
7323
6970
|
if (!(t1 && t2))
|
|
7324
6971
|
return void 0;
|
|
7325
6972
|
const a1 = TIME.exec(t1);
|
|
7326
6973
|
const a2 = TIME.exec(t2);
|
|
7327
6974
|
if (!(a1 && a2))
|
|
7328
6975
|
return void 0;
|
|
7329
|
-
t1 = a1[1] + a1[2] + a1[3]
|
|
7330
|
-
t2 = a2[1] + a2[2] + a2[3]
|
|
6976
|
+
t1 = a1[1] + a1[2] + a1[3];
|
|
6977
|
+
t2 = a2[1] + a2[2] + a2[3];
|
|
7331
6978
|
if (t1 > t2)
|
|
7332
6979
|
return 1;
|
|
7333
6980
|
if (t1 < t2)
|
|
7334
6981
|
return -1;
|
|
7335
6982
|
return 0;
|
|
7336
6983
|
}
|
|
7337
|
-
__name(
|
|
6984
|
+
__name(compareIsoTime, "compareIsoTime");
|
|
7338
6985
|
var DATE_TIME_SEPARATOR = /t|\s/i;
|
|
7339
|
-
function
|
|
7340
|
-
const
|
|
7341
|
-
return
|
|
7342
|
-
|
|
7343
|
-
|
|
6986
|
+
function getDateTime(strictTimeZone) {
|
|
6987
|
+
const time = getTime(strictTimeZone);
|
|
6988
|
+
return /* @__PURE__ */ __name(function date_time(str) {
|
|
6989
|
+
const dateTime = str.split(DATE_TIME_SEPARATOR);
|
|
6990
|
+
return dateTime.length === 2 && date(dateTime[0]) && time(dateTime[1]);
|
|
6991
|
+
}, "date_time");
|
|
6992
|
+
}
|
|
6993
|
+
__name(getDateTime, "getDateTime");
|
|
7344
6994
|
function compareDateTime(dt1, dt2) {
|
|
6995
|
+
if (!(dt1 && dt2))
|
|
6996
|
+
return void 0;
|
|
6997
|
+
const d1 = new Date(dt1).valueOf();
|
|
6998
|
+
const d2 = new Date(dt2).valueOf();
|
|
6999
|
+
if (!(d1 && d2))
|
|
7000
|
+
return void 0;
|
|
7001
|
+
return d1 - d2;
|
|
7002
|
+
}
|
|
7003
|
+
__name(compareDateTime, "compareDateTime");
|
|
7004
|
+
function compareIsoDateTime(dt1, dt2) {
|
|
7345
7005
|
if (!(dt1 && dt2))
|
|
7346
7006
|
return void 0;
|
|
7347
7007
|
const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR);
|
|
@@ -7351,7 +7011,7 @@ var require_formats = __commonJS({
|
|
|
7351
7011
|
return void 0;
|
|
7352
7012
|
return res || compareTime(t1, t2);
|
|
7353
7013
|
}
|
|
7354
|
-
__name(
|
|
7014
|
+
__name(compareIsoDateTime, "compareIsoDateTime");
|
|
7355
7015
|
var NOT_URI_FRAGMENT = /\/|:/;
|
|
7356
7016
|
var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
|
7357
7017
|
function uri(str) {
|
|
@@ -7409,8 +7069,8 @@ var require_limit = __commonJS({
|
|
|
7409
7069
|
formatExclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE }
|
|
7410
7070
|
};
|
|
7411
7071
|
var error = {
|
|
7412
|
-
message: ({ keyword, schemaCode }) => codegen_1.str`should be ${KWDs[keyword].okStr} ${schemaCode}`,
|
|
7413
|
-
params: ({ keyword, schemaCode }) => codegen_1._`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}
|
|
7072
|
+
message: /* @__PURE__ */ __name(({ keyword, schemaCode }) => (0, codegen_1.str)`should be ${KWDs[keyword].okStr} ${schemaCode}`, "message"),
|
|
7073
|
+
params: /* @__PURE__ */ __name(({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`, "params")
|
|
7414
7074
|
};
|
|
7415
7075
|
exports.formatLimitDefinition = {
|
|
7416
7076
|
keyword: Object.keys(KWDs),
|
|
@@ -7433,8 +7093,8 @@ var require_limit = __commonJS({
|
|
|
7433
7093
|
ref: self.formats,
|
|
7434
7094
|
code: opts.code.formats
|
|
7435
7095
|
});
|
|
7436
|
-
const fmt = gen.const("fmt", codegen_1._`${fmts}[${fCxt.schemaCode}]`);
|
|
7437
|
-
cxt.fail$data(codegen_1.or(codegen_1._`typeof ${fmt} != "object"`, codegen_1._`${fmt} instanceof RegExp`, codegen_1._`typeof ${fmt}.compare != "function"`, compareCode(fmt)));
|
|
7096
|
+
const fmt = gen.const("fmt", (0, codegen_1._)`${fmts}[${fCxt.schemaCode}]`);
|
|
7097
|
+
cxt.fail$data((0, codegen_1.or)((0, codegen_1._)`typeof ${fmt} != "object"`, (0, codegen_1._)`${fmt} instanceof RegExp`, (0, codegen_1._)`typeof ${fmt}.compare != "function"`, compareCode(fmt)));
|
|
7438
7098
|
}
|
|
7439
7099
|
__name(validate$DataFormat, "validate$DataFormat");
|
|
7440
7100
|
function validateFormat() {
|
|
@@ -7448,13 +7108,13 @@ var require_limit = __commonJS({
|
|
|
7448
7108
|
const fmt = gen.scopeValue("formats", {
|
|
7449
7109
|
key: format,
|
|
7450
7110
|
ref: fmtDef,
|
|
7451
|
-
code: opts.code.formats ? codegen_1._`${opts.code.formats}${codegen_1.getProperty(format)}` : void 0
|
|
7111
|
+
code: opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(format)}` : void 0
|
|
7452
7112
|
});
|
|
7453
7113
|
cxt.fail$data(compareCode(fmt));
|
|
7454
7114
|
}
|
|
7455
7115
|
__name(validateFormat, "validateFormat");
|
|
7456
7116
|
function compareCode(fmt) {
|
|
7457
|
-
return codegen_1._`${fmt}.compare(${data}, ${schemaCode}) ${KWDs[keyword].fail} 0`;
|
|
7117
|
+
return (0, codegen_1._)`${fmt}.compare(${data}, ${schemaCode}) ${KWDs[keyword].fail} 0`;
|
|
7458
7118
|
}
|
|
7459
7119
|
__name(compareCode, "compareCode");
|
|
7460
7120
|
},
|
|
@@ -7487,7 +7147,7 @@ var require_dist = __commonJS({
|
|
|
7487
7147
|
const list = opts.formats || formats_1.formatNames;
|
|
7488
7148
|
addFormats(ajv, list, formats, exportName);
|
|
7489
7149
|
if (opts.keywords)
|
|
7490
|
-
limit_1.default(ajv);
|
|
7150
|
+
(0, limit_1.default)(ajv);
|
|
7491
7151
|
return ajv;
|
|
7492
7152
|
}, "formatsPlugin");
|
|
7493
7153
|
formatsPlugin.get = (name, mode = "full") => {
|
|
@@ -7500,7 +7160,7 @@ var require_dist = __commonJS({
|
|
|
7500
7160
|
function addFormats(ajv, list, fs, exportName) {
|
|
7501
7161
|
var _a;
|
|
7502
7162
|
var _b;
|
|
7503
|
-
(_a = (_b = ajv.opts.code).formats) !== null && _a !== void 0 ? _a : _b.formats = codegen_1._`require("ajv-formats/dist/formats").${exportName}`;
|
|
7163
|
+
(_a = (_b = ajv.opts.code).formats) !== null && _a !== void 0 ? _a : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
|
|
7504
7164
|
for (const f of list)
|
|
7505
7165
|
ajv.addFormat(f, fs[f]);
|
|
7506
7166
|
}
|
|
@@ -7631,6 +7291,7 @@ var require_definitions = __commonJS({
|
|
|
7631
7291
|
"stay-n-touch",
|
|
7632
7292
|
"storable",
|
|
7633
7293
|
"twilio",
|
|
7294
|
+
"unifi",
|
|
7634
7295
|
"valcom",
|
|
7635
7296
|
"vizio",
|
|
7636
7297
|
"wisenet",
|
|
@@ -8028,8 +7689,7 @@ var require_errorFactory = __commonJS({
|
|
|
8028
7689
|
module.exports = /* @__PURE__ */ __name(function errorFactory(errName) {
|
|
8029
7690
|
const AllErrors = Object.values(Errors);
|
|
8030
7691
|
const TheError = AllErrors.find((E) => E.prototype.name === errName);
|
|
8031
|
-
if (!TheError)
|
|
8032
|
-
return new Error("Invalid error name: " + errName);
|
|
7692
|
+
if (!TheError) return new Error("Invalid error name: " + errName);
|
|
8033
7693
|
return TheError;
|
|
8034
7694
|
}, "errorFactory");
|
|
8035
7695
|
}
|
|
@@ -8218,8 +7878,7 @@ var init_index_browser = __esm({
|
|
|
8218
7878
|
let j = step;
|
|
8219
7879
|
while (j--) {
|
|
8220
7880
|
id += alphabet[bytes[j] & mask] || "";
|
|
8221
|
-
if (id.length === size)
|
|
8222
|
-
return id;
|
|
7881
|
+
if (id.length === size) return id;
|
|
8223
7882
|
}
|
|
8224
7883
|
}
|
|
8225
7884
|
};
|
|
@@ -8270,8 +7929,7 @@ var require_Entity = __commonJS({
|
|
|
8270
7929
|
return Object.keys(this.validator.schema.properties);
|
|
8271
7930
|
}
|
|
8272
7931
|
#_setId(data) {
|
|
8273
|
-
if (data._id)
|
|
8274
|
-
data.id = data._id;
|
|
7932
|
+
if (data._id) data.id = data._id;
|
|
8275
7933
|
if (!data.id) {
|
|
8276
7934
|
data.id = this.constructor.generateId();
|
|
8277
7935
|
}
|
|
@@ -8279,8 +7937,7 @@ var require_Entity = __commonJS({
|
|
|
8279
7937
|
}
|
|
8280
7938
|
#_setProperties(data) {
|
|
8281
7939
|
this.schemaProperties.forEach((key) => {
|
|
8282
|
-
if (data[key] !== void 0)
|
|
8283
|
-
this[key] = data[key];
|
|
7940
|
+
if (data[key] !== void 0) this[key] = data[key];
|
|
8284
7941
|
});
|
|
8285
7942
|
}
|
|
8286
7943
|
#_setTimestamps(isNew) {
|
|
@@ -8415,9 +8072,9 @@ var require_Reservation = __commonJS({
|
|
|
8415
8072
|
value: schema
|
|
8416
8073
|
});
|
|
8417
8074
|
Object.defineProperty(Reservation.prototype, "validator", {
|
|
8418
|
-
get: function() {
|
|
8075
|
+
get: /* @__PURE__ */ __name(function() {
|
|
8419
8076
|
return validator;
|
|
8420
|
-
}
|
|
8077
|
+
}, "get")
|
|
8421
8078
|
});
|
|
8422
8079
|
Object.defineProperty(Reservation, "validProperties", {
|
|
8423
8080
|
value: Object.keys(schema.properties)
|
|
@@ -8532,8 +8189,7 @@ var require_MediaFile = __commonJS({
|
|
|
8532
8189
|
createImageVariant(params) {
|
|
8533
8190
|
if (this.mimeType != "image/*")
|
|
8534
8191
|
throw new RequestError("Only dynamic images can have variants");
|
|
8535
|
-
if (!this.url)
|
|
8536
|
-
throw new RequestError("MediaFile has no url");
|
|
8192
|
+
if (!this.url) throw new RequestError("MediaFile has no url");
|
|
8537
8193
|
const query = Object.keys(params).map((key) => `${key}=${params[key]}`).join(",");
|
|
8538
8194
|
return this.url.replace(/\/public$/, `/${query}`);
|
|
8539
8195
|
}
|
|
@@ -8542,9 +8198,9 @@ var require_MediaFile = __commonJS({
|
|
|
8542
8198
|
value: schema
|
|
8543
8199
|
});
|
|
8544
8200
|
Object.defineProperty(MediaFile.prototype, "validator", {
|
|
8545
|
-
get: function() {
|
|
8201
|
+
get: /* @__PURE__ */ __name(function() {
|
|
8546
8202
|
return validator;
|
|
8547
|
-
}
|
|
8203
|
+
}, "get")
|
|
8548
8204
|
});
|
|
8549
8205
|
Object.defineProperty(MediaFile, "validProperties", {
|
|
8550
8206
|
value: Object.keys(schema.properties)
|
|
@@ -8629,9 +8285,9 @@ var require_Switch = __commonJS({
|
|
|
8629
8285
|
value: schema
|
|
8630
8286
|
});
|
|
8631
8287
|
Object.defineProperty(Switch.prototype, "validator", {
|
|
8632
|
-
get: function() {
|
|
8288
|
+
get: /* @__PURE__ */ __name(function() {
|
|
8633
8289
|
return validator;
|
|
8634
|
-
}
|
|
8290
|
+
}, "get")
|
|
8635
8291
|
});
|
|
8636
8292
|
Object.defineProperty(Switch, "validProperties", {
|
|
8637
8293
|
value: Object.keys(schema.properties)
|
|
@@ -8760,9 +8416,9 @@ var require_Alarm = __commonJS({
|
|
|
8760
8416
|
value: schema
|
|
8761
8417
|
});
|
|
8762
8418
|
Object.defineProperty(Alarm.prototype, "validator", {
|
|
8763
|
-
get: function() {
|
|
8419
|
+
get: /* @__PURE__ */ __name(function() {
|
|
8764
8420
|
return validator;
|
|
8765
|
-
}
|
|
8421
|
+
}, "get")
|
|
8766
8422
|
});
|
|
8767
8423
|
Object.defineProperty(Alarm, "validProperties", {
|
|
8768
8424
|
value: Object.keys(schema.properties)
|
|
@@ -8860,9 +8516,9 @@ var require_Dimmer = __commonJS({
|
|
|
8860
8516
|
value: schema
|
|
8861
8517
|
});
|
|
8862
8518
|
Object.defineProperty(Dimmer.prototype, "validator", {
|
|
8863
|
-
get: function() {
|
|
8519
|
+
get: /* @__PURE__ */ __name(function() {
|
|
8864
8520
|
return validator;
|
|
8865
|
-
}
|
|
8521
|
+
}, "get")
|
|
8866
8522
|
});
|
|
8867
8523
|
Object.defineProperty(Dimmer, "validProperties", {
|
|
8868
8524
|
value: Object.keys(schema.properties)
|
|
@@ -8956,9 +8612,9 @@ var require_Lock = __commonJS({
|
|
|
8956
8612
|
value: schema
|
|
8957
8613
|
});
|
|
8958
8614
|
Object.defineProperty(Lock.prototype, "validator", {
|
|
8959
|
-
get: function() {
|
|
8615
|
+
get: /* @__PURE__ */ __name(function() {
|
|
8960
8616
|
return validator;
|
|
8961
|
-
}
|
|
8617
|
+
}, "get")
|
|
8962
8618
|
});
|
|
8963
8619
|
Object.defineProperty(Lock, "validProperties", {
|
|
8964
8620
|
value: Object.keys(schema.properties)
|
|
@@ -9165,8 +8821,7 @@ var require_Thermostat = __commonJS({
|
|
|
9165
8821
|
switch (action) {
|
|
9166
8822
|
case "hvacMode":
|
|
9167
8823
|
case "fanMode": {
|
|
9168
|
-
if (old[action] !== _new[action])
|
|
9169
|
-
delta[action] = 1;
|
|
8824
|
+
if (old[action] !== _new[action]) delta[action] = 1;
|
|
9170
8825
|
break;
|
|
9171
8826
|
}
|
|
9172
8827
|
case "setpoints": {
|
|
@@ -9192,9 +8847,9 @@ var require_Thermostat = __commonJS({
|
|
|
9192
8847
|
value: schema
|
|
9193
8848
|
});
|
|
9194
8849
|
Object.defineProperty(Thermostat.prototype, "validator", {
|
|
9195
|
-
get: function() {
|
|
8850
|
+
get: /* @__PURE__ */ __name(function() {
|
|
9196
8851
|
return validator;
|
|
9197
|
-
}
|
|
8852
|
+
}, "get")
|
|
9198
8853
|
});
|
|
9199
8854
|
Object.defineProperty(Thermostat, "validProperties", {
|
|
9200
8855
|
value: Object.keys(schema.properties)
|
|
@@ -9301,9 +8956,9 @@ var require_WindowCovering = __commonJS({
|
|
|
9301
8956
|
value: schema
|
|
9302
8957
|
});
|
|
9303
8958
|
Object.defineProperty(WindowCovering.prototype, "validator", {
|
|
9304
|
-
get: function() {
|
|
8959
|
+
get: /* @__PURE__ */ __name(function() {
|
|
9305
8960
|
return validator;
|
|
9306
|
-
}
|
|
8961
|
+
}, "get")
|
|
9307
8962
|
});
|
|
9308
8963
|
Object.defineProperty(WindowCovering, "validProperties", {
|
|
9309
8964
|
value: Object.keys(schema.properties)
|
|
@@ -9411,9 +9066,9 @@ var require_Identification = __commonJS({
|
|
|
9411
9066
|
value: schema
|
|
9412
9067
|
});
|
|
9413
9068
|
Object.defineProperty(Identification.prototype, "validator", {
|
|
9414
|
-
get: function() {
|
|
9069
|
+
get: /* @__PURE__ */ __name(function() {
|
|
9415
9070
|
return validator;
|
|
9416
|
-
}
|
|
9071
|
+
}, "get")
|
|
9417
9072
|
});
|
|
9418
9073
|
Object.defineProperty(Identification, "validProperties", {
|
|
9419
9074
|
value: Object.keys(schema.properties)
|
|
@@ -9516,9 +9171,9 @@ var require_Policy = __commonJS({
|
|
|
9516
9171
|
value: schema
|
|
9517
9172
|
});
|
|
9518
9173
|
Object.defineProperty(Policy.prototype, "validator", {
|
|
9519
|
-
get: function() {
|
|
9174
|
+
get: /* @__PURE__ */ __name(function() {
|
|
9520
9175
|
return validator;
|
|
9521
|
-
}
|
|
9176
|
+
}, "get")
|
|
9522
9177
|
});
|
|
9523
9178
|
Object.defineProperty(Policy, "validProperties", {
|
|
9524
9179
|
value: Object.keys(schema.properties)
|
|
@@ -9796,8 +9451,7 @@ var init_index_browser2 = __esm({
|
|
|
9796
9451
|
let i = step;
|
|
9797
9452
|
while (i--) {
|
|
9798
9453
|
id += alphabet[bytes[i] & mask] || "";
|
|
9799
|
-
if (id.length === size)
|
|
9800
|
-
return id;
|
|
9454
|
+
if (id.length === size) return id;
|
|
9801
9455
|
}
|
|
9802
9456
|
}
|
|
9803
9457
|
};
|
|
@@ -9848,8 +9502,7 @@ var require_User = __commonJS({
|
|
|
9848
9502
|
* @param {UserType} user - The user object of type User.
|
|
9849
9503
|
*/
|
|
9850
9504
|
constructor(user) {
|
|
9851
|
-
if (user.photo)
|
|
9852
|
-
user.photo = new MediaFile(user.photo);
|
|
9505
|
+
if (user.photo) user.photo = new MediaFile(user.photo);
|
|
9853
9506
|
if (user.reservations) {
|
|
9854
9507
|
user.reservations = user.reservations.map((res) => new Reservation(res));
|
|
9855
9508
|
}
|
|
@@ -9886,20 +9539,20 @@ var require_User = __commonJS({
|
|
|
9886
9539
|
value: schema
|
|
9887
9540
|
});
|
|
9888
9541
|
Object.defineProperty(User.prototype, "validator", {
|
|
9889
|
-
get: function() {
|
|
9542
|
+
get: /* @__PURE__ */ __name(function() {
|
|
9890
9543
|
return validator;
|
|
9891
|
-
}
|
|
9544
|
+
}, "get")
|
|
9892
9545
|
});
|
|
9893
9546
|
Object.defineProperty(User, "validProperties", {
|
|
9894
9547
|
value: Object.keys(schema.properties)
|
|
9895
9548
|
});
|
|
9896
9549
|
Object.defineProperty(User.prototype, "fullName", {
|
|
9897
|
-
get: function() {
|
|
9550
|
+
get: /* @__PURE__ */ __name(function() {
|
|
9898
9551
|
return `${this.firstName} ${this.lastName}`;
|
|
9899
|
-
}
|
|
9552
|
+
}, "get")
|
|
9900
9553
|
});
|
|
9901
9554
|
Object.defineProperty(User.prototype, "roles", {
|
|
9902
|
-
get: function() {
|
|
9555
|
+
get: /* @__PURE__ */ __name(function() {
|
|
9903
9556
|
const roles = /* @__PURE__ */ new Set();
|
|
9904
9557
|
if (this.permissions) {
|
|
9905
9558
|
for (const permission of this.permissions) {
|
|
@@ -9907,32 +9560,32 @@ var require_User = __commonJS({
|
|
|
9907
9560
|
}
|
|
9908
9561
|
}
|
|
9909
9562
|
return Array.from(roles);
|
|
9910
|
-
}
|
|
9563
|
+
}, "get")
|
|
9911
9564
|
});
|
|
9912
9565
|
Object.defineProperty(User.prototype, "isSuperAdmin", {
|
|
9913
|
-
get: function() {
|
|
9566
|
+
get: /* @__PURE__ */ __name(function() {
|
|
9914
9567
|
return this.roles.includes("SuperAdmin");
|
|
9915
|
-
}
|
|
9568
|
+
}, "get")
|
|
9916
9569
|
});
|
|
9917
9570
|
Object.defineProperty(User.prototype, "isAdmin", {
|
|
9918
|
-
get: function() {
|
|
9571
|
+
get: /* @__PURE__ */ __name(function() {
|
|
9919
9572
|
return this.roles.includes("Admin") || this.roles.includes("Administrator");
|
|
9920
|
-
}
|
|
9573
|
+
}, "get")
|
|
9921
9574
|
});
|
|
9922
9575
|
Object.defineProperty(User.prototype, "isManager", {
|
|
9923
|
-
get: function() {
|
|
9576
|
+
get: /* @__PURE__ */ __name(function() {
|
|
9924
9577
|
return this.roles.includes("Manager");
|
|
9925
|
-
}
|
|
9578
|
+
}, "get")
|
|
9926
9579
|
});
|
|
9927
9580
|
Object.defineProperty(User.prototype, "isUser", {
|
|
9928
|
-
get: function() {
|
|
9581
|
+
get: /* @__PURE__ */ __name(function() {
|
|
9929
9582
|
return this.roles.includes("User");
|
|
9930
|
-
}
|
|
9583
|
+
}, "get")
|
|
9931
9584
|
});
|
|
9932
9585
|
Object.defineProperty(User.prototype, "isGuest", {
|
|
9933
|
-
get: function() {
|
|
9586
|
+
get: /* @__PURE__ */ __name(function() {
|
|
9934
9587
|
return this.roles.includes("Guest");
|
|
9935
|
-
}
|
|
9588
|
+
}, "get")
|
|
9936
9589
|
});
|
|
9937
9590
|
module.exports = User;
|
|
9938
9591
|
}
|
|
@@ -10084,17 +9737,17 @@ var require_SystemUser = __commonJS({
|
|
|
10084
9737
|
value: schema
|
|
10085
9738
|
});
|
|
10086
9739
|
Object.defineProperty(SystemUser.prototype, "validator", {
|
|
10087
|
-
get: function() {
|
|
9740
|
+
get: /* @__PURE__ */ __name(function() {
|
|
10088
9741
|
return validator;
|
|
10089
|
-
}
|
|
9742
|
+
}, "get")
|
|
10090
9743
|
});
|
|
10091
9744
|
Object.defineProperty(SystemUser, "validProperties", {
|
|
10092
9745
|
value: Object.keys(schema.properties)
|
|
10093
9746
|
});
|
|
10094
9747
|
Object.defineProperty(SystemUser.prototype, "fullName", {
|
|
10095
|
-
get: function() {
|
|
9748
|
+
get: /* @__PURE__ */ __name(function() {
|
|
10096
9749
|
return `${this.firstName} ${this.lastName}`;
|
|
10097
|
-
}
|
|
9750
|
+
}, "get")
|
|
10098
9751
|
});
|
|
10099
9752
|
module.exports = SystemUser;
|
|
10100
9753
|
}
|
|
@@ -10180,9 +9833,9 @@ var require_Courtesy = __commonJS({
|
|
|
10180
9833
|
value: schema
|
|
10181
9834
|
});
|
|
10182
9835
|
Object.defineProperty(Courtesy.prototype, "validator", {
|
|
10183
|
-
get: function() {
|
|
9836
|
+
get: /* @__PURE__ */ __name(function() {
|
|
10184
9837
|
return validator;
|
|
10185
|
-
}
|
|
9838
|
+
}, "get")
|
|
10186
9839
|
});
|
|
10187
9840
|
Object.defineProperty(Courtesy, "validProperties", {
|
|
10188
9841
|
value: Object.keys(schema.properties)
|
|
@@ -10323,9 +9976,9 @@ var require_Camera = __commonJS({
|
|
|
10323
9976
|
value: schema
|
|
10324
9977
|
});
|
|
10325
9978
|
Object.defineProperty(Camera.prototype, "validator", {
|
|
10326
|
-
get: function() {
|
|
9979
|
+
get: /* @__PURE__ */ __name(function() {
|
|
10327
9980
|
return validator;
|
|
10328
|
-
}
|
|
9981
|
+
}, "get")
|
|
10329
9982
|
});
|
|
10330
9983
|
Object.defineProperty(Camera, "validProperties", {
|
|
10331
9984
|
value: Object.keys(schema.properties)
|
|
@@ -10398,9 +10051,9 @@ var require_MotionSensor = __commonJS({
|
|
|
10398
10051
|
value: schema
|
|
10399
10052
|
});
|
|
10400
10053
|
Object.defineProperty(MotionSensor.prototype, "validator", {
|
|
10401
|
-
get: function() {
|
|
10054
|
+
get: /* @__PURE__ */ __name(function() {
|
|
10402
10055
|
return validator;
|
|
10403
|
-
}
|
|
10056
|
+
}, "get")
|
|
10404
10057
|
});
|
|
10405
10058
|
Object.defineProperty(MotionSensor, "validProperties", {
|
|
10406
10059
|
value: Object.keys(schema.properties)
|
|
@@ -10685,9 +10338,9 @@ var require_MediaSource = __commonJS({
|
|
|
10685
10338
|
value: schema
|
|
10686
10339
|
});
|
|
10687
10340
|
Object.defineProperty(MediaSource.prototype, "validator", {
|
|
10688
|
-
get: function() {
|
|
10341
|
+
get: /* @__PURE__ */ __name(function() {
|
|
10689
10342
|
return validator;
|
|
10690
|
-
}
|
|
10343
|
+
}, "get")
|
|
10691
10344
|
});
|
|
10692
10345
|
Object.defineProperty(MediaSource, "validProperties", {
|
|
10693
10346
|
value: Object.keys(schema.properties)
|
|
@@ -10985,8 +10638,7 @@ var require_Scene = __commonJS({
|
|
|
10985
10638
|
for (const deviceType in sceneDevices) {
|
|
10986
10639
|
const sceneData = sceneDevices[deviceType];
|
|
10987
10640
|
const roomDevices = room[deviceType];
|
|
10988
|
-
if (sceneId === "1" && restore && deviceType !== "thermostats")
|
|
10989
|
-
continue;
|
|
10641
|
+
if (sceneId === "1" && restore && deviceType !== "thermostats") continue;
|
|
10990
10642
|
for (const data of sceneData) {
|
|
10991
10643
|
const { id, ...deviceProps } = data;
|
|
10992
10644
|
if (id === "*") {
|
|
@@ -11094,9 +10746,9 @@ var require_Scene = __commonJS({
|
|
|
11094
10746
|
value: schema
|
|
11095
10747
|
});
|
|
11096
10748
|
Object.defineProperty(Scene.prototype, "validator", {
|
|
11097
|
-
get: function() {
|
|
10749
|
+
get: /* @__PURE__ */ __name(function() {
|
|
11098
10750
|
return validator;
|
|
11099
|
-
}
|
|
10751
|
+
}, "get")
|
|
11100
10752
|
});
|
|
11101
10753
|
Object.defineProperty(Scene, "validProperties", {
|
|
11102
10754
|
value: Object.keys(schema.properties)
|
|
@@ -11234,9 +10886,9 @@ var require_Room = __commonJS({
|
|
|
11234
10886
|
value: schema
|
|
11235
10887
|
});
|
|
11236
10888
|
Object.defineProperty(Room.prototype, "validator", {
|
|
11237
|
-
get: function() {
|
|
10889
|
+
get: /* @__PURE__ */ __name(function() {
|
|
11238
10890
|
return validator;
|
|
11239
|
-
}
|
|
10891
|
+
}, "get")
|
|
11240
10892
|
});
|
|
11241
10893
|
Object.defineProperty(Room, "validProperties", {
|
|
11242
10894
|
value: Object.keys(schema.properties)
|
|
@@ -11244,70 +10896,48 @@ var require_Room = __commonJS({
|
|
|
11244
10896
|
function mapRoomData(data) {
|
|
11245
10897
|
const roomData = structuredClone(data);
|
|
11246
10898
|
roomData.dimmers?.map((dimmer) => {
|
|
11247
|
-
if (dimmer instanceof Dimmer)
|
|
11248
|
-
|
|
11249
|
-
else
|
|
11250
|
-
return new Dimmer(dimmer);
|
|
10899
|
+
if (dimmer instanceof Dimmer) return dimmer;
|
|
10900
|
+
else return new Dimmer(dimmer);
|
|
11251
10901
|
});
|
|
11252
10902
|
roomData.switches?.map((switch_) => {
|
|
11253
|
-
if (switch_ instanceof Switch)
|
|
11254
|
-
|
|
11255
|
-
else
|
|
11256
|
-
return new Switch(switch_);
|
|
10903
|
+
if (switch_ instanceof Switch) return switch_;
|
|
10904
|
+
else return new Switch(switch_);
|
|
11257
10905
|
});
|
|
11258
10906
|
roomData.windowCoverings?.map((windowCovering) => {
|
|
11259
|
-
if (windowCovering instanceof WindowCovering)
|
|
11260
|
-
|
|
11261
|
-
else
|
|
11262
|
-
return new WindowCovering(windowCovering);
|
|
10907
|
+
if (windowCovering instanceof WindowCovering) return windowCovering;
|
|
10908
|
+
else return new WindowCovering(windowCovering);
|
|
11263
10909
|
});
|
|
11264
10910
|
roomData.thermostats?.map((thermostat) => {
|
|
11265
|
-
if (thermostat instanceof Thermostat)
|
|
11266
|
-
|
|
11267
|
-
else
|
|
11268
|
-
return new Thermostat(thermostat);
|
|
10911
|
+
if (thermostat instanceof Thermostat) return thermostat;
|
|
10912
|
+
else return new Thermostat(thermostat);
|
|
11269
10913
|
});
|
|
11270
10914
|
roomData.locks?.map((lock) => {
|
|
11271
|
-
if (lock instanceof Lock)
|
|
11272
|
-
|
|
11273
|
-
else
|
|
11274
|
-
return new Lock(lock);
|
|
10915
|
+
if (lock instanceof Lock) return lock;
|
|
10916
|
+
else return new Lock(lock);
|
|
11275
10917
|
});
|
|
11276
10918
|
roomData.courtesy?.map((courtesy) => {
|
|
11277
|
-
if (courtesy instanceof Courtesy)
|
|
11278
|
-
|
|
11279
|
-
else
|
|
11280
|
-
return new Courtesy(courtesy);
|
|
10919
|
+
if (courtesy instanceof Courtesy) return courtesy;
|
|
10920
|
+
else return new Courtesy(courtesy);
|
|
11281
10921
|
});
|
|
11282
10922
|
roomData.mediaSources?.map((source) => {
|
|
11283
|
-
if (source instanceof MediaSource)
|
|
11284
|
-
|
|
11285
|
-
else
|
|
11286
|
-
return new MediaSource(source);
|
|
10923
|
+
if (source instanceof MediaSource) return source;
|
|
10924
|
+
else return new MediaSource(source);
|
|
11287
10925
|
});
|
|
11288
10926
|
roomData.cameras?.map((camera) => {
|
|
11289
|
-
if (camera instanceof Camera)
|
|
11290
|
-
|
|
11291
|
-
else
|
|
11292
|
-
return new Camera(camera);
|
|
10927
|
+
if (camera instanceof Camera) return camera;
|
|
10928
|
+
else return new Camera(camera);
|
|
11293
10929
|
});
|
|
11294
10930
|
roomData.alarms?.map((alarm) => {
|
|
11295
|
-
if (alarm instanceof Alarm)
|
|
11296
|
-
|
|
11297
|
-
else
|
|
11298
|
-
return new Alarm(alarm);
|
|
10931
|
+
if (alarm instanceof Alarm) return alarm;
|
|
10932
|
+
else return new Alarm(alarm);
|
|
11299
10933
|
});
|
|
11300
10934
|
roomData.motionSensors?.map((motionSensor) => {
|
|
11301
|
-
if (motionSensor instanceof MotionSensor)
|
|
11302
|
-
|
|
11303
|
-
else
|
|
11304
|
-
return new MotionSensor(motionSensor);
|
|
10935
|
+
if (motionSensor instanceof MotionSensor) return motionSensor;
|
|
10936
|
+
else return new MotionSensor(motionSensor);
|
|
11305
10937
|
});
|
|
11306
10938
|
roomData.scenes?.map((scene) => {
|
|
11307
|
-
if (scene instanceof Scene)
|
|
11308
|
-
|
|
11309
|
-
else
|
|
11310
|
-
return new Scene(scene);
|
|
10939
|
+
if (scene instanceof Scene) return scene;
|
|
10940
|
+
else return new Scene(scene);
|
|
11311
10941
|
});
|
|
11312
10942
|
return roomData;
|
|
11313
10943
|
}
|
|
@@ -11375,6 +11005,9 @@ var require_space = __commonJS({
|
|
|
11375
11005
|
occupied: {
|
|
11376
11006
|
type: "boolean"
|
|
11377
11007
|
},
|
|
11008
|
+
inUse: {
|
|
11009
|
+
type: "boolean"
|
|
11010
|
+
},
|
|
11378
11011
|
eco: {
|
|
11379
11012
|
type: "object",
|
|
11380
11013
|
additionalProperties: false,
|
|
@@ -11500,8 +11133,7 @@ var require_Space = __commonJS({
|
|
|
11500
11133
|
get floor() {
|
|
11501
11134
|
const floors = /* @__PURE__ */ new Set();
|
|
11502
11135
|
this.room.forEach((room) => {
|
|
11503
|
-
if (room.floor)
|
|
11504
|
-
floors.add(room.floor);
|
|
11136
|
+
if (room.floor) floors.add(room.floor);
|
|
11505
11137
|
});
|
|
11506
11138
|
return floors.size == 1 ? [...floors][0] : void 0;
|
|
11507
11139
|
}
|
|
@@ -11537,9 +11169,9 @@ var require_Space = __commonJS({
|
|
|
11537
11169
|
value: schema
|
|
11538
11170
|
});
|
|
11539
11171
|
Object.defineProperty(Space.prototype, "validator", {
|
|
11540
|
-
get: function() {
|
|
11172
|
+
get: /* @__PURE__ */ __name(function() {
|
|
11541
11173
|
return validator;
|
|
11542
|
-
}
|
|
11174
|
+
}, "get")
|
|
11543
11175
|
});
|
|
11544
11176
|
Object.defineProperty(Space, "validProperties", {
|
|
11545
11177
|
value: Object.keys(schema.properties)
|
|
@@ -11548,10 +11180,8 @@ var require_Space = __commonJS({
|
|
|
11548
11180
|
const spaceData = structuredClone(data);
|
|
11549
11181
|
if (spaceData.rooms?.length) {
|
|
11550
11182
|
spaceData.rooms.map((room) => {
|
|
11551
|
-
if (typeof room === "string")
|
|
11552
|
-
|
|
11553
|
-
if (room instanceof Room)
|
|
11554
|
-
return room;
|
|
11183
|
+
if (typeof room === "string") return room;
|
|
11184
|
+
if (room instanceof Room) return room;
|
|
11555
11185
|
return new Room(room);
|
|
11556
11186
|
});
|
|
11557
11187
|
}
|
|
@@ -11636,9 +11266,9 @@ var require_Category = __commonJS({
|
|
|
11636
11266
|
value: schema
|
|
11637
11267
|
});
|
|
11638
11268
|
Object.defineProperty(Category.prototype, "validator", {
|
|
11639
|
-
get: function() {
|
|
11269
|
+
get: /* @__PURE__ */ __name(function() {
|
|
11640
11270
|
return validator;
|
|
11641
|
-
}
|
|
11271
|
+
}, "get")
|
|
11642
11272
|
});
|
|
11643
11273
|
Object.defineProperty(Category, "validProperties", {
|
|
11644
11274
|
value: Object.keys(schema.properties)
|
|
@@ -11888,17 +11518,16 @@ var require_Ticket = __commonJS({
|
|
|
11888
11518
|
value: schema
|
|
11889
11519
|
});
|
|
11890
11520
|
Object.defineProperty(Ticket.prototype, "validator", {
|
|
11891
|
-
get: function() {
|
|
11521
|
+
get: /* @__PURE__ */ __name(function() {
|
|
11892
11522
|
return validator;
|
|
11893
|
-
}
|
|
11523
|
+
}, "get")
|
|
11894
11524
|
});
|
|
11895
11525
|
Object.defineProperty(Ticket, "validProperties", {
|
|
11896
11526
|
value: Object.keys(schema.properties)
|
|
11897
11527
|
});
|
|
11898
11528
|
function mapConversationData(data) {
|
|
11899
11529
|
const ticketData = structuredClone(data);
|
|
11900
|
-
if (!ticketData.conversation)
|
|
11901
|
-
ticketData.conversation = [];
|
|
11530
|
+
if (!ticketData.conversation) ticketData.conversation = [];
|
|
11902
11531
|
ticketData.conversation = ticketData.conversation.map((msg) => {
|
|
11903
11532
|
if (msg.media) {
|
|
11904
11533
|
msg.media = new MediaFile(msg.media);
|
|
@@ -11978,9 +11607,9 @@ var require_Gateway = __commonJS({
|
|
|
11978
11607
|
value: schema
|
|
11979
11608
|
});
|
|
11980
11609
|
Object.defineProperty(Gateway.prototype, "validator", {
|
|
11981
|
-
get: function() {
|
|
11610
|
+
get: /* @__PURE__ */ __name(function() {
|
|
11982
11611
|
return validator;
|
|
11983
|
-
}
|
|
11612
|
+
}, "get")
|
|
11984
11613
|
});
|
|
11985
11614
|
Object.defineProperty(Gateway, "validProperties", {
|
|
11986
11615
|
value: Object.keys(schema.properties)
|
|
@@ -12066,9 +11695,9 @@ var require_Product = __commonJS({
|
|
|
12066
11695
|
value: schema
|
|
12067
11696
|
});
|
|
12068
11697
|
Object.defineProperty(Product.prototype, "validator", {
|
|
12069
|
-
get: function() {
|
|
11698
|
+
get: /* @__PURE__ */ __name(function() {
|
|
12070
11699
|
return validator;
|
|
12071
|
-
}
|
|
11700
|
+
}, "get")
|
|
12072
11701
|
});
|
|
12073
11702
|
Object.defineProperty(Product, "validProperties", {
|
|
12074
11703
|
value: Object.keys(schema.properties)
|
|
@@ -12302,14 +11931,11 @@ var require_Order = __commonJS({
|
|
|
12302
11931
|
}
|
|
12303
11932
|
getTaxTotal() {
|
|
12304
11933
|
const taxes = this.taxes;
|
|
12305
|
-
if (!taxes)
|
|
12306
|
-
return 0;
|
|
11934
|
+
if (!taxes) return 0;
|
|
12307
11935
|
return this.items.reduce((acc, item) => {
|
|
12308
|
-
if (!item.taxClass)
|
|
12309
|
-
return acc;
|
|
11936
|
+
if (!item.taxClass) return acc;
|
|
12310
11937
|
const tax = taxes.find((t) => t.class === item.taxClass);
|
|
12311
|
-
if (!tax)
|
|
12312
|
-
return acc;
|
|
11938
|
+
if (!tax) return acc;
|
|
12313
11939
|
const { rateType, rate } = tax;
|
|
12314
11940
|
if (rateType === "percentage") {
|
|
12315
11941
|
return acc + item.price * rate;
|
|
@@ -12319,14 +11945,11 @@ var require_Order = __commonJS({
|
|
|
12319
11945
|
}
|
|
12320
11946
|
getDeliveryTotal() {
|
|
12321
11947
|
const delivery = this.delivery;
|
|
12322
|
-
if (!delivery)
|
|
12323
|
-
return 0;
|
|
11948
|
+
if (!delivery) return 0;
|
|
12324
11949
|
return this.items.reduce((acc, item) => {
|
|
12325
|
-
if (!item.deliveryClass)
|
|
12326
|
-
return acc;
|
|
11950
|
+
if (!item.deliveryClass) return acc;
|
|
12327
11951
|
const d = delivery.find((d2) => d2.class === item.deliveryClass);
|
|
12328
|
-
if (!d)
|
|
12329
|
-
return acc;
|
|
11952
|
+
if (!d) return acc;
|
|
12330
11953
|
const { rateType, rate } = d;
|
|
12331
11954
|
if (rateType === "percentage") {
|
|
12332
11955
|
return acc + item.price * rate;
|
|
@@ -12356,9 +11979,9 @@ var require_Order = __commonJS({
|
|
|
12356
11979
|
value: schema
|
|
12357
11980
|
});
|
|
12358
11981
|
Object.defineProperty(Order.prototype, "validator", {
|
|
12359
|
-
get: function() {
|
|
11982
|
+
get: /* @__PURE__ */ __name(function() {
|
|
12360
11983
|
return validator;
|
|
12361
|
-
}
|
|
11984
|
+
}, "get")
|
|
12362
11985
|
});
|
|
12363
11986
|
Object.defineProperty(Order, "validProperties", {
|
|
12364
11987
|
value: Object.keys(schema.properties)
|
|
@@ -12438,9 +12061,9 @@ var require_DiscoveredDevice = __commonJS({
|
|
|
12438
12061
|
value: schema
|
|
12439
12062
|
});
|
|
12440
12063
|
Object.defineProperty(DiscoveredDevice.prototype, "validator", {
|
|
12441
|
-
get: function() {
|
|
12064
|
+
get: /* @__PURE__ */ __name(function() {
|
|
12442
12065
|
return validator;
|
|
12443
|
-
}
|
|
12066
|
+
}, "get")
|
|
12444
12067
|
});
|
|
12445
12068
|
Object.defineProperty(DiscoveredDevice, "validProperties", {
|
|
12446
12069
|
value: Object.keys(schema.properties)
|
|
@@ -12510,9 +12133,9 @@ var require_DeviceRouter = __commonJS({
|
|
|
12510
12133
|
value: schema
|
|
12511
12134
|
});
|
|
12512
12135
|
Object.defineProperty(DeviceRouter.prototype, "validator", {
|
|
12513
|
-
get: function() {
|
|
12136
|
+
get: /* @__PURE__ */ __name(function() {
|
|
12514
12137
|
return validator;
|
|
12515
|
-
}
|
|
12138
|
+
}, "get")
|
|
12516
12139
|
});
|
|
12517
12140
|
Object.defineProperty(DeviceRouter, "validProperties", {
|
|
12518
12141
|
value: Object.keys(schema.properties)
|
|
@@ -12607,9 +12230,9 @@ var require_Credential = __commonJS({
|
|
|
12607
12230
|
value: schema
|
|
12608
12231
|
});
|
|
12609
12232
|
Object.defineProperty(Credential.prototype, "validator", {
|
|
12610
|
-
get: function() {
|
|
12233
|
+
get: /* @__PURE__ */ __name(function() {
|
|
12611
12234
|
return validator;
|
|
12612
|
-
}
|
|
12235
|
+
}, "get")
|
|
12613
12236
|
});
|
|
12614
12237
|
Object.defineProperty(Credential, "validProperties", {
|
|
12615
12238
|
value: Object.keys(schema.properties)
|
|
@@ -12681,9 +12304,9 @@ var require_ShortLink = __commonJS({
|
|
|
12681
12304
|
value: schema
|
|
12682
12305
|
});
|
|
12683
12306
|
Object.defineProperty(ShortLink.prototype, "validator", {
|
|
12684
|
-
get: function() {
|
|
12307
|
+
get: /* @__PURE__ */ __name(function() {
|
|
12685
12308
|
return validator;
|
|
12686
|
-
}
|
|
12309
|
+
}, "get")
|
|
12687
12310
|
});
|
|
12688
12311
|
Object.defineProperty(ShortLink, "validProperties", {
|
|
12689
12312
|
value: Object.keys(schema.properties)
|
|
@@ -12799,9 +12422,9 @@ var require_EnergyReportShard = __commonJS({
|
|
|
12799
12422
|
value: schema
|
|
12800
12423
|
});
|
|
12801
12424
|
Object.defineProperty(EnergyReportShard.prototype, "validator", {
|
|
12802
|
-
get: function() {
|
|
12425
|
+
get: /* @__PURE__ */ __name(function() {
|
|
12803
12426
|
return validator;
|
|
12804
|
-
}
|
|
12427
|
+
}, "get")
|
|
12805
12428
|
});
|
|
12806
12429
|
Object.defineProperty(EnergyReportShard, "validProperties", {
|
|
12807
12430
|
value: Object.keys(schema.properties)
|
|
@@ -12928,9 +12551,9 @@ var require_EnergyReport = __commonJS({
|
|
|
12928
12551
|
value: schema
|
|
12929
12552
|
});
|
|
12930
12553
|
Object.defineProperty(EnergyReport.prototype, "validator", {
|
|
12931
|
-
get: function() {
|
|
12554
|
+
get: /* @__PURE__ */ __name(function() {
|
|
12932
12555
|
return validator;
|
|
12933
|
-
}
|
|
12556
|
+
}, "get")
|
|
12934
12557
|
});
|
|
12935
12558
|
Object.defineProperty(EnergyReport, "validProperties", {
|
|
12936
12559
|
value: Object.keys(schema.properties)
|
|
@@ -13033,9 +12656,9 @@ var require_SmsMessage = __commonJS({
|
|
|
13033
12656
|
value: schema
|
|
13034
12657
|
});
|
|
13035
12658
|
Object.defineProperty(SMSMessage.prototype, "validator", {
|
|
13036
|
-
get: function() {
|
|
12659
|
+
get: /* @__PURE__ */ __name(function() {
|
|
13037
12660
|
return validator;
|
|
13038
|
-
}
|
|
12661
|
+
}, "get")
|
|
13039
12662
|
});
|
|
13040
12663
|
Object.defineProperty(SMSMessage, "validProperties", {
|
|
13041
12664
|
value: Object.keys(schema.properties)
|
|
@@ -13148,9 +12771,9 @@ var require_EmailMessage = __commonJS({
|
|
|
13148
12771
|
value: schema
|
|
13149
12772
|
});
|
|
13150
12773
|
Object.defineProperty(EmailMessage.prototype, "validator", {
|
|
13151
|
-
get: function() {
|
|
12774
|
+
get: /* @__PURE__ */ __name(function() {
|
|
13152
12775
|
return validator;
|
|
13153
|
-
}
|
|
12776
|
+
}, "get")
|
|
13154
12777
|
});
|
|
13155
12778
|
Object.defineProperty(EmailMessage, "validProperties", {
|
|
13156
12779
|
value: Object.keys(schema.properties)
|
|
@@ -13238,9 +12861,9 @@ var require_Announcement = __commonJS({
|
|
|
13238
12861
|
value: schema
|
|
13239
12862
|
});
|
|
13240
12863
|
Object.defineProperty(Announcement.prototype, "validator", {
|
|
13241
|
-
get: function() {
|
|
12864
|
+
get: /* @__PURE__ */ __name(function() {
|
|
13242
12865
|
return validator;
|
|
13243
|
-
}
|
|
12866
|
+
}, "get")
|
|
13244
12867
|
});
|
|
13245
12868
|
Object.defineProperty(Announcement, "validProperties", {
|
|
13246
12869
|
value: Object.keys(schema.properties)
|
|
@@ -13341,19 +12964,14 @@ var require_TimeSheet = __commonJS({
|
|
|
13341
12964
|
}
|
|
13342
12965
|
if (timesheet.timeEntries && Array.isArray(timesheet.timeEntries)) {
|
|
13343
12966
|
timesheet.timeEntries = timesheet.timeEntries.map((t) => {
|
|
13344
|
-
if (!t.id)
|
|
13345
|
-
|
|
13346
|
-
if (t.
|
|
13347
|
-
t.start = new Date(t.start);
|
|
13348
|
-
if (t.end)
|
|
13349
|
-
t.end = new Date(t.end);
|
|
12967
|
+
if (!t.id) t.id = _TimeSheet.generateTimeEntryId();
|
|
12968
|
+
if (t.start) t.start = new Date(t.start);
|
|
12969
|
+
if (t.end) t.end = new Date(t.end);
|
|
13350
12970
|
return t;
|
|
13351
12971
|
});
|
|
13352
12972
|
timesheet.timeEntries.sort((a, b) => {
|
|
13353
|
-
if (a.start < b.start)
|
|
13354
|
-
|
|
13355
|
-
if (a.start > b.start)
|
|
13356
|
-
return 1;
|
|
12973
|
+
if (a.start < b.start) return -1;
|
|
12974
|
+
if (a.start > b.start) return 1;
|
|
13357
12975
|
return 0;
|
|
13358
12976
|
});
|
|
13359
12977
|
}
|
|
@@ -13367,9 +12985,9 @@ var require_TimeSheet = __commonJS({
|
|
|
13367
12985
|
value: schema
|
|
13368
12986
|
});
|
|
13369
12987
|
Object.defineProperty(TimeSheet.prototype, "validator", {
|
|
13370
|
-
get: function() {
|
|
12988
|
+
get: /* @__PURE__ */ __name(function() {
|
|
13371
12989
|
return validator;
|
|
13372
|
-
}
|
|
12990
|
+
}, "get")
|
|
13373
12991
|
});
|
|
13374
12992
|
Object.defineProperty(TimeSheet, "validProperties", {
|
|
13375
12993
|
value: Object.keys(schema.properties)
|
|
@@ -13812,9 +13430,9 @@ var require_Property = __commonJS({
|
|
|
13812
13430
|
value: schema
|
|
13813
13431
|
});
|
|
13814
13432
|
Object.defineProperty(Property.prototype, "validator", {
|
|
13815
|
-
get: function() {
|
|
13433
|
+
get: /* @__PURE__ */ __name(function() {
|
|
13816
13434
|
return validator;
|
|
13817
|
-
}
|
|
13435
|
+
}, "get")
|
|
13818
13436
|
});
|
|
13819
13437
|
Object.defineProperty(Property, "validProperties", {
|
|
13820
13438
|
value: Object.keys(schema.properties)
|
|
@@ -14013,9 +13631,9 @@ var require_Organization = __commonJS({
|
|
|
14013
13631
|
value: schema
|
|
14014
13632
|
});
|
|
14015
13633
|
Object.defineProperty(Organization.prototype, "validator", {
|
|
14016
|
-
get: function() {
|
|
13634
|
+
get: /* @__PURE__ */ __name(function() {
|
|
14017
13635
|
return validator;
|
|
14018
|
-
}
|
|
13636
|
+
}, "get")
|
|
14019
13637
|
});
|
|
14020
13638
|
Object.defineProperty(Organization, "validProperties", {
|
|
14021
13639
|
value: Object.keys(schema.properties)
|
|
@@ -14192,7 +13810,7 @@ var require_entityFactory = __commonJS({
|
|
|
14192
13810
|
});
|
|
14193
13811
|
|
|
14194
13812
|
// src/utils/index.js
|
|
14195
|
-
var
|
|
13813
|
+
var require_utils2 = __commonJS({
|
|
14196
13814
|
"src/utils/index.js"(exports, module) {
|
|
14197
13815
|
var getFormalDeviceType = require_getFormalDeviceType();
|
|
14198
13816
|
var getDeviceTypes = require_getDeviceTypes();
|
|
@@ -14208,10 +13826,5 @@ var require_utils = __commonJS({
|
|
|
14208
13826
|
};
|
|
14209
13827
|
}
|
|
14210
13828
|
});
|
|
14211
|
-
export default
|
|
14212
|
-
/*! Bundled license information:
|
|
14213
|
-
|
|
14214
|
-
uri-js/dist/es5/uri.all.js:
|
|
14215
|
-
(** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js *)
|
|
14216
|
-
*/
|
|
13829
|
+
export default require_utils2();
|
|
14217
13830
|
//# sourceMappingURL=utils.js.map
|