@ug.software/opposer 3.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +504 -0
- package/lib/bin/commands/build.js +75 -0
- package/lib/bin/commands/generate/api-key.js +28 -0
- package/lib/bin/commands/generate/jwt-key.js +46 -0
- package/lib/bin/commands/init.js +169 -0
- package/lib/bin/helpers/crypto.js +33 -0
- package/lib/bin/opposer.js +26 -0
- package/lib/cjs/examples/full-app/index.d.ts +1 -0
- package/lib/cjs/examples/full-app/index.js +102 -0
- package/lib/cjs/examples/full-app/models/author.d.ts +7 -0
- package/lib/cjs/examples/full-app/models/author.js +42 -0
- package/lib/cjs/examples/full-app/models/book.d.ts +9 -0
- package/lib/cjs/examples/full-app/models/book.js +51 -0
- package/lib/cjs/examples/full-app/models/category.d.ts +4 -0
- package/lib/cjs/examples/full-app/models/category.js +26 -0
- package/lib/cjs/examples/full-app/schedules/catalog-refresh.d.ts +28 -0
- package/lib/cjs/examples/full-app/schedules/catalog-refresh.js +149 -0
- package/lib/cjs/examples/full-app/schedules/inventory-sync.d.ts +12 -0
- package/lib/cjs/examples/full-app/schedules/inventory-sync.js +61 -0
- package/lib/cjs/examples/full-app/schedules/library-alerts.d.ts +11 -0
- package/lib/cjs/examples/full-app/schedules/library-alerts.js +55 -0
- package/lib/cjs/examples/minimal/src/handlers/book.d.ts +11 -0
- package/lib/cjs/examples/minimal/src/handlers/book.js +51 -0
- package/lib/cjs/examples/minimal/src/index.d.ts +1 -0
- package/lib/cjs/examples/minimal/src/index.js +14 -0
- package/lib/cjs/examples/minimal/src/models/books.d.ts +4 -0
- package/lib/cjs/examples/minimal/src/models/books.js +26 -0
- package/lib/cjs/examples/orm/models/permission.d.ts +6 -0
- package/lib/cjs/examples/orm/models/permission.js +38 -0
- package/lib/cjs/examples/orm/models/profile.d.ts +7 -0
- package/lib/cjs/examples/orm/models/profile.js +42 -0
- package/lib/cjs/examples/orm/models/user.d.ts +11 -0
- package/lib/cjs/examples/orm/models/user.js +70 -0
- package/lib/cjs/examples/orm/mysql/index.d.ts +1 -0
- package/lib/cjs/examples/orm/mysql/index.js +44 -0
- package/lib/cjs/examples/orm/postgres/index.d.ts +1 -0
- package/lib/cjs/examples/orm/postgres/index.js +40 -0
- package/lib/cjs/examples/orm/sqlite/index.d.ts +1 -0
- package/lib/cjs/examples/orm/sqlite/index.js +41 -0
- package/lib/cjs/index.d.ts +2 -0
- package/lib/cjs/index.js +23 -0
- package/lib/cjs/interfaces/controller.d.ts +109 -0
- package/lib/cjs/interfaces/controller.js +2 -0
- package/lib/cjs/interfaces/field.d.ts +23 -0
- package/lib/cjs/interfaces/field.js +2 -0
- package/lib/cjs/interfaces/handler.d.ts +18 -0
- package/lib/cjs/interfaces/handler.js +2 -0
- package/lib/cjs/interfaces/jwt.d.ts +21 -0
- package/lib/cjs/interfaces/jwt.js +2 -0
- package/lib/cjs/interfaces/model.d.ts +9 -0
- package/lib/cjs/interfaces/model.js +2 -0
- package/lib/cjs/interfaces/request.d.ts +13 -0
- package/lib/cjs/interfaces/request.js +2 -0
- package/lib/cjs/interfaces/schema.d.ts +9 -0
- package/lib/cjs/interfaces/schema.js +2 -0
- package/lib/cjs/interfaces/security.d.ts +32 -0
- package/lib/cjs/interfaces/security.js +2 -0
- package/lib/cjs/interfaces/server.d.ts +37 -0
- package/lib/cjs/interfaces/server.js +2 -0
- package/lib/cjs/interfaces/system.d.ts +41 -0
- package/lib/cjs/interfaces/system.js +2 -0
- package/lib/cjs/orm/decorators/index.d.ts +33 -0
- package/lib/cjs/orm/decorators/index.js +131 -0
- package/lib/cjs/orm/driver/mysql.d.ts +14 -0
- package/lib/cjs/orm/driver/mysql.js +103 -0
- package/lib/cjs/orm/driver/postgres.d.ts +14 -0
- package/lib/cjs/orm/driver/postgres.js +105 -0
- package/lib/cjs/orm/driver/sqlite.d.ts +14 -0
- package/lib/cjs/orm/driver/sqlite.js +143 -0
- package/lib/cjs/orm/index.d.ts +8 -0
- package/lib/cjs/orm/index.js +28 -0
- package/lib/cjs/orm/metadata.d.ts +47 -0
- package/lib/cjs/orm/metadata.js +47 -0
- package/lib/cjs/orm/opposer.d.ts +30 -0
- package/lib/cjs/orm/opposer.js +33 -0
- package/lib/cjs/orm/query-builder.d.ts +32 -0
- package/lib/cjs/orm/query-builder.js +278 -0
- package/lib/cjs/orm/repository.d.ts +54 -0
- package/lib/cjs/orm/repository.js +325 -0
- package/lib/cjs/orm/validation.d.ts +44 -0
- package/lib/cjs/orm/validation.js +128 -0
- package/lib/cjs/package.json +3 -0
- package/lib/cjs/persistent/cache/core-context.d.ts +17 -0
- package/lib/cjs/persistent/cache/core-context.js +39 -0
- package/lib/cjs/persistent/cache/global.d.ts +18 -0
- package/lib/cjs/persistent/cache/global.js +22 -0
- package/lib/cjs/persistent/cache/index.d.ts +3 -0
- package/lib/cjs/persistent/cache/index.js +12 -0
- package/lib/cjs/persistent/cache/session.d.ts +19 -0
- package/lib/cjs/persistent/cache/session.js +39 -0
- package/lib/cjs/persistent/cache/storage.d.ts +14 -0
- package/lib/cjs/persistent/cache/storage.js +88 -0
- package/lib/cjs/persistent/cache/store.d.ts +16 -0
- package/lib/cjs/persistent/cache/store.js +112 -0
- package/lib/cjs/persistent/context/index.d.ts +3 -0
- package/lib/cjs/persistent/context/index.js +5 -0
- package/lib/cjs/persistent/decorators/global.d.ts +1 -0
- package/lib/cjs/persistent/decorators/global.js +25 -0
- package/lib/cjs/persistent/decorators/session.d.ts +1 -0
- package/lib/cjs/persistent/decorators/session.js +27 -0
- package/lib/cjs/persistent/index.d.ts +6 -0
- package/lib/cjs/persistent/index.js +18 -0
- package/lib/cjs/persistent/interfaces/context.d.ts +5 -0
- package/lib/cjs/persistent/interfaces/context.js +2 -0
- package/lib/cjs/persistent/interfaces/system.d.ts +47 -0
- package/lib/cjs/persistent/interfaces/system.js +29 -0
- package/lib/cjs/persistent/system/index.d.ts +7 -0
- package/lib/cjs/persistent/system/index.js +44 -0
- package/lib/cjs/persistent/utils/memory.d.ts +8 -0
- package/lib/cjs/persistent/utils/memory.js +44 -0
- package/lib/cjs/persistent/utils/timer.d.ts +14 -0
- package/lib/cjs/persistent/utils/timer.js +21 -0
- package/lib/cjs/playground/build/client/assets/AddRounded-ByHfnsiW.js +4 -0
- package/lib/cjs/playground/build/client/assets/Button-DLrxHRm7.js +1 -0
- package/lib/cjs/playground/build/client/assets/Container-CgITmmbk.js +1 -0
- package/lib/cjs/playground/build/client/assets/Divider-B_Wx9srO.js +1 -0
- package/lib/cjs/playground/build/client/assets/List-juBjUmfP.js +1 -0
- package/lib/cjs/playground/build/client/assets/ListItemText-DgWZmgzc.js +1 -0
- package/lib/cjs/playground/build/client/assets/MenuItem-D_5SuVKQ.js +1 -0
- package/lib/cjs/playground/build/client/assets/Modal-BwXR_5Bh.js +1 -0
- package/lib/cjs/playground/build/client/assets/TableRow-B9hAmlnV.js +2 -0
- package/lib/cjs/playground/build/client/assets/TextField-UybdTIGB.js +3 -0
- package/lib/cjs/playground/build/client/assets/Tooltip-BGcUWUcF.js +1 -0
- package/lib/cjs/playground/build/client/assets/auth-CD1rXHzz.js +1 -0
- package/lib/cjs/playground/build/client/assets/auth-GyTIVKy5.js +1 -0
- package/lib/cjs/playground/build/client/assets/confirm-Dr0pbiV6.js +1 -0
- package/lib/cjs/playground/build/client/assets/dividerClasses-CIiqeEPO.js +1 -0
- package/lib/cjs/playground/build/client/assets/entry.client-D6FYz1yh.js +13 -0
- package/lib/cjs/playground/build/client/assets/index-CJ0wdt6Z.js +1 -0
- package/lib/cjs/playground/build/client/assets/index-CQc11yq_.js +1153 -0
- package/lib/cjs/playground/build/client/assets/index-Cr4I-4J2.js +1 -0
- package/lib/cjs/playground/build/client/assets/index-CtPqstFl.js +26 -0
- package/lib/cjs/playground/build/client/assets/index-Ct_NE85o.js +1 -0
- package/lib/cjs/playground/build/client/assets/index-D0I6xwmb.js +1 -0
- package/lib/cjs/playground/build/client/assets/index-DmDCpKb3.js +1 -0
- package/lib/cjs/playground/build/client/assets/index-DsSkAwyn.js +1 -0
- package/lib/cjs/playground/build/client/assets/index-_DMgWZ3Y.js +1 -0
- package/lib/cjs/playground/build/client/assets/listItemIconClasses-39Itzgzt.js +1 -0
- package/lib/cjs/playground/build/client/assets/listItemTextClasses-EQFLPLzt.js +1 -0
- package/lib/cjs/playground/build/client/assets/manifest-c06e9a7f.js +1 -0
- package/lib/cjs/playground/build/client/assets/mergeSlotProps-DptgQgAT.js +1 -0
- package/lib/cjs/playground/build/client/assets/playground-Hl52p9f5.js +108 -0
- package/lib/cjs/playground/build/client/assets/root-CQTBmuv8.js +1 -0
- package/lib/cjs/playground/build/client/assets/toast-CsAH5FIf.js +1 -0
- package/lib/cjs/playground/build/client/assets/use-request-BZNkzlTr.js +1 -0
- package/lib/cjs/playground/build/client/favicon.ico +0 -0
- package/lib/cjs/playground/build/client/index.html +6 -0
- package/lib/cjs/playground/index.d.ts +2 -0
- package/lib/cjs/playground/index.js +135 -0
- package/lib/cjs/scheduler/controllers/index.d.ts +19 -0
- package/lib/cjs/scheduler/controllers/index.js +62 -0
- package/lib/cjs/scheduler/decorators/index.d.ts +9 -0
- package/lib/cjs/scheduler/decorators/index.js +21 -0
- package/lib/cjs/scheduler/handlers/index.d.ts +19 -0
- package/lib/cjs/scheduler/handlers/index.js +62 -0
- package/lib/cjs/scheduler/index.d.ts +24 -0
- package/lib/cjs/scheduler/index.js +110 -0
- package/lib/cjs/scheduler/models/history.d.ts +10 -0
- package/lib/cjs/scheduler/models/history.js +50 -0
- package/lib/cjs/server/constants/index.d.ts +78 -0
- package/lib/cjs/server/constants/index.js +372 -0
- package/lib/cjs/server/context/index.d.ts +17 -0
- package/lib/cjs/server/context/index.js +33 -0
- package/lib/cjs/server/controller/index.d.ts +3 -0
- package/lib/cjs/server/controller/index.js +217 -0
- package/lib/cjs/server/controllers/index.d.ts +5 -0
- package/lib/cjs/server/controllers/index.js +72 -0
- package/lib/cjs/server/core/index.d.ts +16 -0
- package/lib/cjs/server/core/index.js +110 -0
- package/lib/cjs/server/core/middleware/body-parser.d.ts +2 -0
- package/lib/cjs/server/core/middleware/body-parser.js +27 -0
- package/lib/cjs/server/core/middleware/cors.d.ts +4 -0
- package/lib/cjs/server/core/middleware/cors.js +32 -0
- package/lib/cjs/server/core/middleware/logger.d.ts +2 -0
- package/lib/cjs/server/core/middleware/logger.js +15 -0
- package/lib/cjs/server/decorators/controller.d.ts +3 -0
- package/lib/cjs/server/decorators/controller.js +14 -0
- package/lib/cjs/server/decorators/field.d.ts +2 -0
- package/lib/cjs/server/decorators/field.js +36 -0
- package/lib/cjs/server/decorators/handler.d.ts +3 -0
- package/lib/cjs/server/decorators/handler.js +14 -0
- package/lib/cjs/server/decorators/index.d.ts +7 -0
- package/lib/cjs/server/decorators/index.js +26 -0
- package/lib/cjs/server/decorators/is-public-method.d.ts +3 -0
- package/lib/cjs/server/decorators/is-public-method.js +16 -0
- package/lib/cjs/server/decorators/is-public.d.ts +3 -0
- package/lib/cjs/server/decorators/is-public.js +14 -0
- package/lib/cjs/server/decorators/method.d.ts +3 -0
- package/lib/cjs/server/decorators/method.js +16 -0
- package/lib/cjs/server/decorators/payload.d.ts +3 -0
- package/lib/cjs/server/decorators/payload.js +15 -0
- package/lib/cjs/server/handlers/index.d.ts +5 -0
- package/lib/cjs/server/handlers/index.js +72 -0
- package/lib/cjs/server/helpers/index.d.ts +17 -0
- package/lib/cjs/server/helpers/index.js +39 -0
- package/lib/cjs/server/index.d.ts +12 -0
- package/lib/cjs/server/index.js +176 -0
- package/lib/cjs/server/security/controller/auth.d.ts +76 -0
- package/lib/cjs/server/security/controller/auth.js +346 -0
- package/lib/cjs/server/security/index.d.ts +2 -0
- package/lib/cjs/server/security/index.js +10 -0
- package/lib/cjs/server/security/jwt/index.d.ts +23 -0
- package/lib/cjs/server/security/jwt/index.js +108 -0
- package/lib/cjs/server/security/middleware/autorization.d.ts +3 -0
- package/lib/cjs/server/security/middleware/autorization.js +46 -0
- package/lib/cjs/server/security/middleware/permission.d.ts +3 -0
- package/lib/cjs/server/security/middleware/permission.js +138 -0
- package/lib/cjs/server/security/models/crp.d.ts +8 -0
- package/lib/cjs/server/security/models/crp.js +42 -0
- package/lib/cjs/server/security/models/ke.d.ts +7 -0
- package/lib/cjs/server/security/models/ke.js +38 -0
- package/lib/cjs/server/security/models/rl.d.ts +9 -0
- package/lib/cjs/server/security/models/rl.js +50 -0
- package/lib/cjs/server/security/models/se.d.ts +11 -0
- package/lib/cjs/server/security/models/se.js +54 -0
- package/lib/cjs/server/security/models/usr.d.ts +14 -0
- package/lib/cjs/server/security/models/usr.js +82 -0
- package/lib/cjs/server/services/delete.d.ts +13 -0
- package/lib/cjs/server/services/delete.js +49 -0
- package/lib/cjs/server/services/get.d.ts +4 -0
- package/lib/cjs/server/services/get.js +145 -0
- package/lib/cjs/server/services/insert.d.ts +13 -0
- package/lib/cjs/server/services/insert.js +74 -0
- package/lib/cjs/server/services/update.d.ts +13 -0
- package/lib/cjs/server/services/update.js +60 -0
- package/lib/cjs/system/index.d.ts +13 -0
- package/lib/cjs/system/index.js +237 -0
- package/lib/esm/examples/full-app/index.d.ts +1 -0
- package/lib/esm/examples/full-app/index.js +64 -0
- package/lib/esm/examples/full-app/models/author.d.ts +7 -0
- package/lib/esm/examples/full-app/models/author.js +37 -0
- package/lib/esm/examples/full-app/models/book.d.ts +9 -0
- package/lib/esm/examples/full-app/models/book.js +46 -0
- package/lib/esm/examples/full-app/models/category.d.ts +4 -0
- package/lib/esm/examples/full-app/models/category.js +24 -0
- package/lib/esm/examples/full-app/schedules/catalog-refresh.d.ts +28 -0
- package/lib/esm/examples/full-app/schedules/catalog-refresh.js +143 -0
- package/lib/esm/examples/full-app/schedules/inventory-sync.d.ts +12 -0
- package/lib/esm/examples/full-app/schedules/inventory-sync.js +55 -0
- package/lib/esm/examples/full-app/schedules/library-alerts.d.ts +11 -0
- package/lib/esm/examples/full-app/schedules/library-alerts.js +52 -0
- package/lib/esm/examples/minimal/src/handlers/book.d.ts +11 -0
- package/lib/esm/examples/minimal/src/handlers/book.js +49 -0
- package/lib/esm/examples/minimal/src/index.d.ts +1 -0
- package/lib/esm/examples/minimal/src/index.js +9 -0
- package/lib/esm/examples/minimal/src/models/books.d.ts +4 -0
- package/lib/esm/examples/minimal/src/models/books.js +24 -0
- package/lib/esm/examples/orm/models/permission.d.ts +6 -0
- package/lib/esm/examples/orm/models/permission.js +33 -0
- package/lib/esm/examples/orm/models/profile.d.ts +7 -0
- package/lib/esm/examples/orm/models/profile.js +37 -0
- package/lib/esm/examples/orm/models/user.d.ts +11 -0
- package/lib/esm/examples/orm/models/user.js +65 -0
- package/lib/esm/examples/orm/mysql/index.d.ts +1 -0
- package/lib/esm/examples/orm/mysql/index.js +39 -0
- package/lib/esm/examples/orm/postgres/index.d.ts +1 -0
- package/lib/esm/examples/orm/postgres/index.js +35 -0
- package/lib/esm/examples/orm/sqlite/index.d.ts +1 -0
- package/lib/esm/examples/orm/sqlite/index.js +36 -0
- package/lib/esm/index.d.ts +2 -0
- package/lib/esm/index.js +2 -0
- package/lib/esm/interfaces/controller.d.ts +109 -0
- package/lib/esm/interfaces/controller.js +1 -0
- package/lib/esm/interfaces/field.d.ts +23 -0
- package/lib/esm/interfaces/field.js +1 -0
- package/lib/esm/interfaces/handler.d.ts +18 -0
- package/lib/esm/interfaces/handler.js +1 -0
- package/lib/esm/interfaces/jwt.d.ts +21 -0
- package/lib/esm/interfaces/jwt.js +1 -0
- package/lib/esm/interfaces/model.d.ts +9 -0
- package/lib/esm/interfaces/model.js +1 -0
- package/lib/esm/interfaces/request.d.ts +13 -0
- package/lib/esm/interfaces/request.js +1 -0
- package/lib/esm/interfaces/schema.d.ts +9 -0
- package/lib/esm/interfaces/schema.js +1 -0
- package/lib/esm/interfaces/security.d.ts +32 -0
- package/lib/esm/interfaces/security.js +1 -0
- package/lib/esm/interfaces/server.d.ts +37 -0
- package/lib/esm/interfaces/server.js +1 -0
- package/lib/esm/interfaces/system.d.ts +41 -0
- package/lib/esm/interfaces/system.js +1 -0
- package/lib/esm/orm/decorators/index.d.ts +33 -0
- package/lib/esm/orm/decorators/index.js +118 -0
- package/lib/esm/orm/driver/mysql.d.ts +14 -0
- package/lib/esm/orm/driver/mysql.js +66 -0
- package/lib/esm/orm/driver/postgres.d.ts +14 -0
- package/lib/esm/orm/driver/postgres.js +68 -0
- package/lib/esm/orm/driver/sqlite.d.ts +14 -0
- package/lib/esm/orm/driver/sqlite.js +106 -0
- package/lib/esm/orm/index.d.ts +8 -0
- package/lib/esm/orm/index.js +8 -0
- package/lib/esm/orm/metadata.d.ts +47 -0
- package/lib/esm/orm/metadata.js +43 -0
- package/lib/esm/orm/opposer.d.ts +30 -0
- package/lib/esm/orm/opposer.js +29 -0
- package/lib/esm/orm/query-builder.d.ts +32 -0
- package/lib/esm/orm/query-builder.js +274 -0
- package/lib/esm/orm/repository.d.ts +54 -0
- package/lib/esm/orm/repository.js +318 -0
- package/lib/esm/orm/validation.d.ts +44 -0
- package/lib/esm/orm/validation.js +122 -0
- package/lib/esm/persistent/cache/core-context.d.ts +17 -0
- package/lib/esm/persistent/cache/core-context.js +34 -0
- package/lib/esm/persistent/cache/global.d.ts +18 -0
- package/lib/esm/persistent/cache/global.js +17 -0
- package/lib/esm/persistent/cache/index.d.ts +3 -0
- package/lib/esm/persistent/cache/index.js +3 -0
- package/lib/esm/persistent/cache/session.d.ts +19 -0
- package/lib/esm/persistent/cache/session.js +34 -0
- package/lib/esm/persistent/cache/storage.d.ts +14 -0
- package/lib/esm/persistent/cache/storage.js +82 -0
- package/lib/esm/persistent/cache/store.d.ts +16 -0
- package/lib/esm/persistent/cache/store.js +106 -0
- package/lib/esm/persistent/context/index.d.ts +3 -0
- package/lib/esm/persistent/context/index.js +3 -0
- package/lib/esm/persistent/decorators/global.d.ts +1 -0
- package/lib/esm/persistent/decorators/global.js +19 -0
- package/lib/esm/persistent/decorators/session.d.ts +1 -0
- package/lib/esm/persistent/decorators/session.js +21 -0
- package/lib/esm/persistent/index.d.ts +6 -0
- package/lib/esm/persistent/index.js +6 -0
- package/lib/esm/persistent/interfaces/context.d.ts +5 -0
- package/lib/esm/persistent/interfaces/context.js +1 -0
- package/lib/esm/persistent/interfaces/system.d.ts +47 -0
- package/lib/esm/persistent/interfaces/system.js +26 -0
- package/lib/esm/persistent/system/index.d.ts +7 -0
- package/lib/esm/persistent/system/index.js +39 -0
- package/lib/esm/persistent/utils/memory.d.ts +8 -0
- package/lib/esm/persistent/utils/memory.js +42 -0
- package/lib/esm/persistent/utils/timer.d.ts +14 -0
- package/lib/esm/persistent/utils/timer.js +16 -0
- package/lib/esm/playground/build/client/assets/AddRounded-ByHfnsiW.js +4 -0
- package/lib/esm/playground/build/client/assets/Button-DLrxHRm7.js +1 -0
- package/lib/esm/playground/build/client/assets/Container-CgITmmbk.js +1 -0
- package/lib/esm/playground/build/client/assets/Divider-B_Wx9srO.js +1 -0
- package/lib/esm/playground/build/client/assets/List-juBjUmfP.js +1 -0
- package/lib/esm/playground/build/client/assets/ListItemText-DgWZmgzc.js +1 -0
- package/lib/esm/playground/build/client/assets/MenuItem-D_5SuVKQ.js +1 -0
- package/lib/esm/playground/build/client/assets/Modal-BwXR_5Bh.js +1 -0
- package/lib/esm/playground/build/client/assets/TableRow-B9hAmlnV.js +2 -0
- package/lib/esm/playground/build/client/assets/TextField-UybdTIGB.js +3 -0
- package/lib/esm/playground/build/client/assets/Tooltip-BGcUWUcF.js +1 -0
- package/lib/esm/playground/build/client/assets/auth-CD1rXHzz.js +1 -0
- package/lib/esm/playground/build/client/assets/auth-GyTIVKy5.js +1 -0
- package/lib/esm/playground/build/client/assets/confirm-Dr0pbiV6.js +1 -0
- package/lib/esm/playground/build/client/assets/dividerClasses-CIiqeEPO.js +1 -0
- package/lib/esm/playground/build/client/assets/entry.client-D6FYz1yh.js +13 -0
- package/lib/esm/playground/build/client/assets/index-CJ0wdt6Z.js +1 -0
- package/lib/esm/playground/build/client/assets/index-CQc11yq_.js +1153 -0
- package/lib/esm/playground/build/client/assets/index-Cr4I-4J2.js +1 -0
- package/lib/esm/playground/build/client/assets/index-CtPqstFl.js +26 -0
- package/lib/esm/playground/build/client/assets/index-Ct_NE85o.js +1 -0
- package/lib/esm/playground/build/client/assets/index-D0I6xwmb.js +1 -0
- package/lib/esm/playground/build/client/assets/index-DmDCpKb3.js +1 -0
- package/lib/esm/playground/build/client/assets/index-DsSkAwyn.js +1 -0
- package/lib/esm/playground/build/client/assets/index-_DMgWZ3Y.js +1 -0
- package/lib/esm/playground/build/client/assets/listItemIconClasses-39Itzgzt.js +1 -0
- package/lib/esm/playground/build/client/assets/listItemTextClasses-EQFLPLzt.js +1 -0
- package/lib/esm/playground/build/client/assets/manifest-c06e9a7f.js +1 -0
- package/lib/esm/playground/build/client/assets/mergeSlotProps-DptgQgAT.js +1 -0
- package/lib/esm/playground/build/client/assets/playground-Hl52p9f5.js +108 -0
- package/lib/esm/playground/build/client/assets/root-CQTBmuv8.js +1 -0
- package/lib/esm/playground/build/client/assets/toast-CsAH5FIf.js +1 -0
- package/lib/esm/playground/build/client/assets/use-request-BZNkzlTr.js +1 -0
- package/lib/esm/playground/build/client/favicon.ico +0 -0
- package/lib/esm/playground/build/client/index.html +6 -0
- package/lib/esm/playground/index.d.ts +2 -0
- package/lib/esm/playground/index.js +129 -0
- package/lib/esm/scheduler/controllers/index.d.ts +19 -0
- package/lib/esm/scheduler/controllers/index.js +57 -0
- package/lib/esm/scheduler/decorators/index.d.ts +9 -0
- package/lib/esm/scheduler/decorators/index.js +16 -0
- package/lib/esm/scheduler/handlers/index.d.ts +19 -0
- package/lib/esm/scheduler/handlers/index.js +57 -0
- package/lib/esm/scheduler/index.d.ts +24 -0
- package/lib/esm/scheduler/index.js +89 -0
- package/lib/esm/scheduler/models/history.d.ts +10 -0
- package/lib/esm/scheduler/models/history.js +48 -0
- package/lib/esm/server/constants/index.d.ts +78 -0
- package/lib/esm/server/constants/index.js +369 -0
- package/lib/esm/server/context/index.d.ts +17 -0
- package/lib/esm/server/context/index.js +31 -0
- package/lib/esm/server/controller/index.d.ts +3 -0
- package/lib/esm/server/controller/index.js +179 -0
- package/lib/esm/server/controllers/index.d.ts +5 -0
- package/lib/esm/server/controllers/index.js +31 -0
- package/lib/esm/server/core/index.d.ts +16 -0
- package/lib/esm/server/core/index.js +103 -0
- package/lib/esm/server/core/middleware/body-parser.d.ts +2 -0
- package/lib/esm/server/core/middleware/body-parser.js +24 -0
- package/lib/esm/server/core/middleware/cors.d.ts +4 -0
- package/lib/esm/server/core/middleware/cors.js +29 -0
- package/lib/esm/server/core/middleware/logger.d.ts +2 -0
- package/lib/esm/server/core/middleware/logger.js +12 -0
- package/lib/esm/server/decorators/controller.d.ts +3 -0
- package/lib/esm/server/decorators/controller.js +10 -0
- package/lib/esm/server/decorators/field.d.ts +2 -0
- package/lib/esm/server/decorators/field.js +32 -0
- package/lib/esm/server/decorators/handler.d.ts +3 -0
- package/lib/esm/server/decorators/handler.js +10 -0
- package/lib/esm/server/decorators/index.d.ts +7 -0
- package/lib/esm/server/decorators/index.js +7 -0
- package/lib/esm/server/decorators/is-public-method.d.ts +3 -0
- package/lib/esm/server/decorators/is-public-method.js +12 -0
- package/lib/esm/server/decorators/is-public.d.ts +3 -0
- package/lib/esm/server/decorators/is-public.js +10 -0
- package/lib/esm/server/decorators/method.d.ts +3 -0
- package/lib/esm/server/decorators/method.js +12 -0
- package/lib/esm/server/decorators/payload.d.ts +3 -0
- package/lib/esm/server/decorators/payload.js +11 -0
- package/lib/esm/server/handlers/index.d.ts +5 -0
- package/lib/esm/server/handlers/index.js +31 -0
- package/lib/esm/server/helpers/index.d.ts +17 -0
- package/lib/esm/server/helpers/index.js +34 -0
- package/lib/esm/server/index.d.ts +12 -0
- package/lib/esm/server/index.js +147 -0
- package/lib/esm/server/security/controller/auth.d.ts +76 -0
- package/lib/esm/server/security/controller/auth.js +341 -0
- package/lib/esm/server/security/index.d.ts +2 -0
- package/lib/esm/server/security/index.js +2 -0
- package/lib/esm/server/security/jwt/index.d.ts +23 -0
- package/lib/esm/server/security/jwt/index.js +103 -0
- package/lib/esm/server/security/middleware/autorization.d.ts +3 -0
- package/lib/esm/server/security/middleware/autorization.js +41 -0
- package/lib/esm/server/security/middleware/permission.d.ts +3 -0
- package/lib/esm/server/security/middleware/permission.js +133 -0
- package/lib/esm/server/security/models/crp.d.ts +8 -0
- package/lib/esm/server/security/models/crp.js +40 -0
- package/lib/esm/server/security/models/ke.d.ts +7 -0
- package/lib/esm/server/security/models/ke.js +36 -0
- package/lib/esm/server/security/models/rl.d.ts +9 -0
- package/lib/esm/server/security/models/rl.js +45 -0
- package/lib/esm/server/security/models/se.d.ts +11 -0
- package/lib/esm/server/security/models/se.js +52 -0
- package/lib/esm/server/security/models/usr.d.ts +14 -0
- package/lib/esm/server/security/models/usr.js +77 -0
- package/lib/esm/server/services/delete.d.ts +13 -0
- package/lib/esm/server/services/delete.js +44 -0
- package/lib/esm/server/services/get.d.ts +4 -0
- package/lib/esm/server/services/get.js +140 -0
- package/lib/esm/server/services/insert.d.ts +13 -0
- package/lib/esm/server/services/insert.js +69 -0
- package/lib/esm/server/services/update.d.ts +13 -0
- package/lib/esm/server/services/update.js +55 -0
- package/lib/esm/system/index.d.ts +13 -0
- package/lib/esm/system/index.js +197 -0
- package/package.json +95 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export var MemoryUnit;
|
|
2
|
+
(function (MemoryUnit) {
|
|
3
|
+
MemoryUnit["MB"] = "mb";
|
|
4
|
+
MemoryUnit["GB"] = "gb";
|
|
5
|
+
})(MemoryUnit || (MemoryUnit = {}));
|
|
6
|
+
export var TimerUnit;
|
|
7
|
+
(function (TimerUnit) {
|
|
8
|
+
TimerUnit["seconds"] = "seconds";
|
|
9
|
+
TimerUnit["minutes"] = "minutes";
|
|
10
|
+
TimerUnit["hours"] = "hours";
|
|
11
|
+
TimerUnit["days"] = "days";
|
|
12
|
+
})(TimerUnit || (TimerUnit = {}));
|
|
13
|
+
export var EvictionPolicy;
|
|
14
|
+
(function (EvictionPolicy) {
|
|
15
|
+
EvictionPolicy["noeviction"] = "noeviction";
|
|
16
|
+
EvictionPolicy["volatileLru"] = "volatile-lru";
|
|
17
|
+
EvictionPolicy["allkeysLru"] = "allkeys-lru";
|
|
18
|
+
EvictionPolicy["volatileLfu"] = "volatile-lfu";
|
|
19
|
+
EvictionPolicy["allkeysLfu"] = "allkeys-lfu";
|
|
20
|
+
EvictionPolicy["volatileTtl"] = "volatile-ttl";
|
|
21
|
+
})(EvictionPolicy || (EvictionPolicy = {}));
|
|
22
|
+
export var CacheType;
|
|
23
|
+
(function (CacheType) {
|
|
24
|
+
CacheType["inMemory"] = "in-memory";
|
|
25
|
+
CacheType["persistent"] = "persistent";
|
|
26
|
+
})(CacheType || (CacheType = {}));
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import path from "path";
|
|
2
|
+
import fs from "fs";
|
|
3
|
+
export default new (class {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.settings = this.getSettingsFile();
|
|
6
|
+
}
|
|
7
|
+
getSettingsFile() {
|
|
8
|
+
let config = {};
|
|
9
|
+
try {
|
|
10
|
+
const root = process.cwd();
|
|
11
|
+
const configPath = path.resolve(root, "opposer-settings.json");
|
|
12
|
+
if (fs.existsSync(configPath)) {
|
|
13
|
+
const fileContent = fs.readFileSync(configPath, "utf8");
|
|
14
|
+
config = JSON.parse(fileContent);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
// It's okay if the file doesn't exist, we fallback to defaults and env vars
|
|
19
|
+
}
|
|
20
|
+
// Default structure
|
|
21
|
+
config.cache = config.cache || {};
|
|
22
|
+
config.cache.snapshot = config.cache.snapshot || {};
|
|
23
|
+
config.cache.session = config.cache.session || {};
|
|
24
|
+
config.cache.global = config.cache.global || {};
|
|
25
|
+
// Override with Environment Variables
|
|
26
|
+
config.cache.type = process.env.OPPOSER_CACHE_TYPE || config.cache.type || "in-memory";
|
|
27
|
+
config.cache.snapshot.active = process.env.OPPOSER_CACHE_SNAPSHOT === "true"
|
|
28
|
+
|| config.cache.snapshot.active
|
|
29
|
+
|| false;
|
|
30
|
+
config.cache.snapshot.timer = process.env.OPPOSER_CACHE_SNAPSHOT_TIMER
|
|
31
|
+
? parseInt(process.env.OPPOSER_CACHE_SNAPSHOT_TIMER)
|
|
32
|
+
: config.cache.snapshot.timer || 1;
|
|
33
|
+
config.cache.snapshot.unit = process.env.OPPOSER_CACHE_SNAPSHOT_UNIT
|
|
34
|
+
|| config.cache.snapshot.unit
|
|
35
|
+
|| "minutes";
|
|
36
|
+
return config;
|
|
37
|
+
}
|
|
38
|
+
getAllSessionData() { }
|
|
39
|
+
})();
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { MemoryUnit } from "../interfaces/system.js";
|
|
2
|
+
declare function toBytes(value: number, unit: MemoryUnit): number;
|
|
3
|
+
declare function roughSizeOfObject(object: Object): number;
|
|
4
|
+
declare const _default: {
|
|
5
|
+
toBytes: typeof toBytes;
|
|
6
|
+
roughSizeOfObject: typeof roughSizeOfObject;
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
function toBytes(value, unit) {
|
|
2
|
+
const base = 1024;
|
|
3
|
+
const units = {
|
|
4
|
+
mb: base ** 2,
|
|
5
|
+
gb: base ** 3,
|
|
6
|
+
};
|
|
7
|
+
return value * units[unit];
|
|
8
|
+
}
|
|
9
|
+
function roughSizeOfObject(object) {
|
|
10
|
+
const seen = new WeakSet();
|
|
11
|
+
function sizeOf(value) {
|
|
12
|
+
if (value === null || value === undefined)
|
|
13
|
+
return 0;
|
|
14
|
+
switch (typeof value) {
|
|
15
|
+
case "boolean":
|
|
16
|
+
return 4;
|
|
17
|
+
case "number":
|
|
18
|
+
return 8;
|
|
19
|
+
case "string":
|
|
20
|
+
return value.length * 2; // cada caractere ~2 bytes (UTF-16)
|
|
21
|
+
case "object":
|
|
22
|
+
if (seen.has(value))
|
|
23
|
+
return 0;
|
|
24
|
+
seen.add(value);
|
|
25
|
+
let bytes = 0;
|
|
26
|
+
if (Array.isArray(value)) {
|
|
27
|
+
value.forEach((el) => (bytes += sizeOf(el)));
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
Object.keys(value).forEach((key) => {
|
|
31
|
+
bytes += sizeOf(key);
|
|
32
|
+
bytes += sizeOf(value[key]);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return bytes;
|
|
36
|
+
default:
|
|
37
|
+
return 0;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return sizeOf(object);
|
|
41
|
+
}
|
|
42
|
+
export default { toBytes, roughSizeOfObject };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TimerUnit } from "../interfaces/system.js";
|
|
2
|
+
declare function getNextSessionExpireDate(): number;
|
|
3
|
+
declare function getSeconds(time: number, unit: TimerUnit): number;
|
|
4
|
+
declare const _default: {
|
|
5
|
+
getNextSessionExpireDate: typeof getNextSessionExpireDate;
|
|
6
|
+
getSeconds: typeof getSeconds;
|
|
7
|
+
msPerUnit: {
|
|
8
|
+
seconds: number;
|
|
9
|
+
minutes: number;
|
|
10
|
+
hours: number;
|
|
11
|
+
days: number;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import system from "../system/index.js";
|
|
2
|
+
const msPerUnit = {
|
|
3
|
+
seconds: 1000,
|
|
4
|
+
minutes: 1000 * 60,
|
|
5
|
+
hours: 1000 * 60 * 60,
|
|
6
|
+
days: 1000 * 60 * 60 * 24,
|
|
7
|
+
};
|
|
8
|
+
function getNextSessionExpireDate() {
|
|
9
|
+
return (new Date().getTime() +
|
|
10
|
+
system.settings.cache.session.expire *
|
|
11
|
+
msPerUnit[system.settings.cache.session.unit]);
|
|
12
|
+
}
|
|
13
|
+
function getSeconds(time, unit) {
|
|
14
|
+
return time * msPerUnit[unit];
|
|
15
|
+
}
|
|
16
|
+
export default { getNextSessionExpireDate, getSeconds, msPerUnit };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{g as yr,b as T,v as gr}from"./index-CtPqstFl.js";import{b as br}from"./playground-Hl52p9f5.js";var vn=function(e){return Tn(e)&&!En(e)};function Tn(t){return!!t&&typeof t=="object"}function En(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||Sn(t)}var _n=typeof Symbol=="function"&&Symbol.for,xn=_n?Symbol.for("react.element"):60103;function Sn(t){return t.$$typeof===xn}function $n(t){return Array.isArray(t)?[]:{}}function Me(t,e){return e.clone!==!1&&e.isMergeableObject(t)?xe($n(t),t,e):t}function wn(t,e,r){return t.concat(e).map(function(n){return Me(n,r)})}function On(t,e,r){var n={};return r.isMergeableObject(t)&&Object.keys(t).forEach(function(i){n[i]=Me(t[i],r)}),Object.keys(e).forEach(function(i){!r.isMergeableObject(e[i])||!t[i]?n[i]=Me(e[i],r):n[i]=xe(t[i],e[i],r)}),n}function xe(t,e,r){r=r||{},r.arrayMerge=r.arrayMerge||wn,r.isMergeableObject=r.isMergeableObject||vn;var n=Array.isArray(e),i=Array.isArray(t),a=n===i;return a?n?r.arrayMerge(t,e,r):On(t,e,r):Me(e,r)}xe.all=function(e,r){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,i){return xe(n,i,r)},{})};var it=xe,mr=typeof global=="object"&&global&&global.Object===Object&&global,Fn=typeof self=="object"&&self&&self.Object===Object&&self,H=mr||Fn||Function("return this")(),Q=H.Symbol,vr=Object.prototype,An=vr.hasOwnProperty,jn=vr.toString,Te=Q?Q.toStringTag:void 0;function Cn(t){var e=An.call(t,Te),r=t[Te];try{t[Te]=void 0;var n=!0}catch{}var i=jn.call(t);return n&&(e?t[Te]=r:delete t[Te]),i}var In=Object.prototype,Dn=In.toString;function Rn(t){return Dn.call(t)}var kn="[object Null]",Mn="[object Undefined]",Rt=Q?Q.toStringTag:void 0;function se(t){return t==null?t===void 0?Mn:kn:Rt&&Rt in Object(t)?Cn(t):Rn(t)}function Tr(t,e){return function(r){return t(e(r))}}var ht=Tr(Object.getPrototypeOf,Object);function ue(t){return t!=null&&typeof t=="object"}var Pn="[object Object]",Nn=Function.prototype,Ln=Object.prototype,Er=Nn.toString,Vn=Ln.hasOwnProperty,Un=Er.call(Object);function kt(t){if(!ue(t)||se(t)!=Pn)return!1;var e=ht(t);if(e===null)return!0;var r=Vn.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Er.call(r)==Un}function zn(){this.__data__=[],this.size=0}function _r(t,e){return t===e||t!==t&&e!==e}function Le(t,e){for(var r=t.length;r--;)if(_r(t[r][0],e))return r;return-1}var Bn=Array.prototype,Gn=Bn.splice;function qn(t){var e=this.__data__,r=Le(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Gn.call(e,r,1),--this.size,!0}function Hn(t){var e=this.__data__,r=Le(e,t);return r<0?void 0:e[r][1]}function Zn(t){return Le(this.__data__,t)>-1}function Kn(t,e){var r=this.__data__,n=Le(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function X(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}X.prototype.clear=zn;X.prototype.delete=qn;X.prototype.get=Hn;X.prototype.has=Zn;X.prototype.set=Kn;function Yn(){this.__data__=new X,this.size=0}function Wn(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function Xn(t){return this.__data__.get(t)}function Jn(t){return this.__data__.has(t)}function we(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Qn="[object AsyncFunction]",ei="[object Function]",ti="[object GeneratorFunction]",ri="[object Proxy]";function xr(t){if(!we(t))return!1;var e=se(t);return e==ei||e==ti||e==Qn||e==ri}var We=H["__core-js_shared__"],Mt=(function(){var t=/[^.]+$/.exec(We&&We.keys&&We.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function ni(t){return!!Mt&&Mt in t}var ii=Function.prototype,ai=ii.toString;function oe(t){if(t!=null){try{return ai.call(t)}catch{}try{return t+""}catch{}}return""}var si=/[\\^$.*+?()[\]{}|]/g,ui=/^\[object .+?Constructor\]$/,oi=Function.prototype,li=Object.prototype,ci=oi.toString,fi=li.hasOwnProperty,di=RegExp("^"+ci.call(fi).replace(si,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function hi(t){if(!we(t)||ni(t))return!1;var e=xr(t)?di:ui;return e.test(oe(t))}function pi(t,e){return t?.[e]}function le(t,e){var r=pi(t,e);return hi(r)?r:void 0}var Se=le(H,"Map"),$e=le(Object,"create");function yi(){this.__data__=$e?$e(null):{},this.size=0}function gi(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var bi="__lodash_hash_undefined__",mi=Object.prototype,vi=mi.hasOwnProperty;function Ti(t){var e=this.__data__;if($e){var r=e[t];return r===bi?void 0:r}return vi.call(e,t)?e[t]:void 0}var Ei=Object.prototype,_i=Ei.hasOwnProperty;function xi(t){var e=this.__data__;return $e?e[t]!==void 0:_i.call(e,t)}var Si="__lodash_hash_undefined__";function $i(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=$e&&e===void 0?Si:e,this}function ae(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ae.prototype.clear=yi;ae.prototype.delete=gi;ae.prototype.get=Ti;ae.prototype.has=xi;ae.prototype.set=$i;function wi(){this.size=0,this.__data__={hash:new ae,map:new(Se||X),string:new ae}}function Oi(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Ve(t,e){var r=t.__data__;return Oi(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Fi(t){var e=Ve(this,t).delete(t);return this.size-=e?1:0,e}function Ai(t){return Ve(this,t).get(t)}function ji(t){return Ve(this,t).has(t)}function Ci(t,e){var r=Ve(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function ee(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ee.prototype.clear=wi;ee.prototype.delete=Fi;ee.prototype.get=Ai;ee.prototype.has=ji;ee.prototype.set=Ci;var Ii=200;function Di(t,e){var r=this.__data__;if(r instanceof X){var n=r.__data__;if(!Se||n.length<Ii-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new ee(n)}return r.set(t,e),this.size=r.size,this}function be(t){var e=this.__data__=new X(t);this.size=e.size}be.prototype.clear=Yn;be.prototype.delete=Wn;be.prototype.get=Xn;be.prototype.has=Jn;be.prototype.set=Di;function Ri(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}var Pt=(function(){try{var t=le(Object,"defineProperty");return t({},"",{}),t}catch{}})();function Sr(t,e,r){e=="__proto__"&&Pt?Pt(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var ki=Object.prototype,Mi=ki.hasOwnProperty;function $r(t,e,r){var n=t[e];(!(Mi.call(t,e)&&_r(n,r))||r===void 0&&!(e in t))&&Sr(t,e,r)}function Ue(t,e,r,n){var i=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var o=e[a],l=void 0;l===void 0&&(l=t[o]),i?Sr(r,o,l):$r(r,o,l)}return r}function Pi(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Ni="[object Arguments]";function Nt(t){return ue(t)&&se(t)==Ni}var wr=Object.prototype,Li=wr.hasOwnProperty,Vi=wr.propertyIsEnumerable,Ui=Nt((function(){return arguments})())?Nt:function(t){return ue(t)&&Li.call(t,"callee")&&!Vi.call(t,"callee")},Oe=Array.isArray;function zi(){return!1}var Or=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Lt=Or&&typeof module=="object"&&module&&!module.nodeType&&module,Bi=Lt&&Lt.exports===Or,Vt=Bi?H.Buffer:void 0,Gi=Vt?Vt.isBuffer:void 0,Fr=Gi||zi,qi=9007199254740991,Hi=/^(?:0|[1-9]\d*)$/;function Zi(t,e){var r=typeof t;return e=e??qi,!!e&&(r=="number"||r!="symbol"&&Hi.test(t))&&t>-1&&t%1==0&&t<e}var Ki=9007199254740991;function Ar(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Ki}var Yi="[object Arguments]",Wi="[object Array]",Xi="[object Boolean]",Ji="[object Date]",Qi="[object Error]",ea="[object Function]",ta="[object Map]",ra="[object Number]",na="[object Object]",ia="[object RegExp]",aa="[object Set]",sa="[object String]",ua="[object WeakMap]",oa="[object ArrayBuffer]",la="[object DataView]",ca="[object Float32Array]",fa="[object Float64Array]",da="[object Int8Array]",ha="[object Int16Array]",pa="[object Int32Array]",ya="[object Uint8Array]",ga="[object Uint8ClampedArray]",ba="[object Uint16Array]",ma="[object Uint32Array]",A={};A[ca]=A[fa]=A[da]=A[ha]=A[pa]=A[ya]=A[ga]=A[ba]=A[ma]=!0;A[Yi]=A[Wi]=A[oa]=A[Xi]=A[la]=A[Ji]=A[Qi]=A[ea]=A[ta]=A[ra]=A[na]=A[ia]=A[aa]=A[sa]=A[ua]=!1;function va(t){return ue(t)&&Ar(t.length)&&!!A[se(t)]}function pt(t){return function(e){return t(e)}}var jr=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ee=jr&&typeof module=="object"&&module&&!module.nodeType&&module,Ta=Ee&&Ee.exports===jr,Xe=Ta&&mr.process,ge=(function(){try{var t=Ee&&Ee.require&&Ee.require("util").types;return t||Xe&&Xe.binding&&Xe.binding("util")}catch{}})(),Ut=ge&&ge.isTypedArray,Ea=Ut?pt(Ut):va,_a=Object.prototype,xa=_a.hasOwnProperty;function Cr(t,e){var r=Oe(t),n=!r&&Ui(t),i=!r&&!n&&Fr(t),a=!r&&!n&&!i&&Ea(t),s=r||n||i||a,o=s?Pi(t.length,String):[],l=o.length;for(var f in t)(e||xa.call(t,f))&&!(s&&(f=="length"||i&&(f=="offset"||f=="parent")||a&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||Zi(f,l)))&&o.push(f);return o}var Sa=Object.prototype;function yt(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Sa;return t===r}var $a=Tr(Object.keys,Object),wa=Object.prototype,Oa=wa.hasOwnProperty;function Fa(t){if(!yt(t))return $a(t);var e=[];for(var r in Object(t))Oa.call(t,r)&&r!="constructor"&&e.push(r);return e}function Ir(t){return t!=null&&Ar(t.length)&&!xr(t)}function gt(t){return Ir(t)?Cr(t):Fa(t)}function Aa(t,e){return t&&Ue(e,gt(e),t)}function ja(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var Ca=Object.prototype,Ia=Ca.hasOwnProperty;function Da(t){if(!we(t))return ja(t);var e=yt(t),r=[];for(var n in t)n=="constructor"&&(e||!Ia.call(t,n))||r.push(n);return r}function bt(t){return Ir(t)?Cr(t,!0):Da(t)}function Ra(t,e){return t&&Ue(e,bt(e),t)}var Dr=typeof exports=="object"&&exports&&!exports.nodeType&&exports,zt=Dr&&typeof module=="object"&&module&&!module.nodeType&&module,ka=zt&&zt.exports===Dr,Bt=ka?H.Buffer:void 0,Gt=Bt?Bt.allocUnsafe:void 0;function Ma(t,e){if(e)return t.slice();var r=t.length,n=Gt?Gt(r):new t.constructor(r);return t.copy(n),n}function Rr(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}function Pa(t,e){for(var r=-1,n=t==null?0:t.length,i=0,a=[];++r<n;){var s=t[r];e(s,r,t)&&(a[i++]=s)}return a}function kr(){return[]}var Na=Object.prototype,La=Na.propertyIsEnumerable,qt=Object.getOwnPropertySymbols,mt=qt?function(t){return t==null?[]:(t=Object(t),Pa(qt(t),function(e){return La.call(t,e)}))}:kr;function Va(t,e){return Ue(t,mt(t),e)}function Mr(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var Ua=Object.getOwnPropertySymbols,Pr=Ua?function(t){for(var e=[];t;)Mr(e,mt(t)),t=ht(t);return e}:kr;function za(t,e){return Ue(t,Pr(t),e)}function Nr(t,e,r){var n=e(t);return Oe(t)?n:Mr(n,r(t))}function Ba(t){return Nr(t,gt,mt)}function Ga(t){return Nr(t,bt,Pr)}var at=le(H,"DataView"),st=le(H,"Promise"),ut=le(H,"Set"),ot=le(H,"WeakMap"),Ht="[object Map]",qa="[object Object]",Zt="[object Promise]",Kt="[object Set]",Yt="[object WeakMap]",Wt="[object DataView]",Ha=oe(at),Za=oe(Se),Ka=oe(st),Ya=oe(ut),Wa=oe(ot),Y=se;(at&&Y(new at(new ArrayBuffer(1)))!=Wt||Se&&Y(new Se)!=Ht||st&&Y(st.resolve())!=Zt||ut&&Y(new ut)!=Kt||ot&&Y(new ot)!=Yt)&&(Y=function(t){var e=se(t),r=e==qa?t.constructor:void 0,n=r?oe(r):"";if(n)switch(n){case Ha:return Wt;case Za:return Ht;case Ka:return Zt;case Ya:return Kt;case Wa:return Yt}return e});var Xa=Object.prototype,Ja=Xa.hasOwnProperty;function Qa(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&Ja.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var Xt=H.Uint8Array;function vt(t){var e=new t.constructor(t.byteLength);return new Xt(e).set(new Xt(t)),e}function es(t,e){var r=e?vt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var ts=/\w*$/;function rs(t){var e=new t.constructor(t.source,ts.exec(t));return e.lastIndex=t.lastIndex,e}var Jt=Q?Q.prototype:void 0,Qt=Jt?Jt.valueOf:void 0;function ns(t){return Qt?Object(Qt.call(t)):{}}function is(t,e){var r=e?vt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var as="[object Boolean]",ss="[object Date]",us="[object Map]",os="[object Number]",ls="[object RegExp]",cs="[object Set]",fs="[object String]",ds="[object Symbol]",hs="[object ArrayBuffer]",ps="[object DataView]",ys="[object Float32Array]",gs="[object Float64Array]",bs="[object Int8Array]",ms="[object Int16Array]",vs="[object Int32Array]",Ts="[object Uint8Array]",Es="[object Uint8ClampedArray]",_s="[object Uint16Array]",xs="[object Uint32Array]";function Ss(t,e,r){var n=t.constructor;switch(e){case hs:return vt(t);case as:case ss:return new n(+t);case ps:return es(t,r);case ys:case gs:case bs:case ms:case vs:case Ts:case Es:case _s:case xs:return is(t,r);case us:return new n;case os:case fs:return new n(t);case ls:return rs(t);case cs:return new n;case ds:return ns(t)}}var er=Object.create,$s=(function(){function t(){}return function(e){if(!we(e))return{};if(er)return er(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}})();function ws(t){return typeof t.constructor=="function"&&!yt(t)?$s(ht(t)):{}}var Os="[object Map]";function Fs(t){return ue(t)&&Y(t)==Os}var tr=ge&&ge.isMap,As=tr?pt(tr):Fs,js="[object Set]";function Cs(t){return ue(t)&&Y(t)==js}var rr=ge&&ge.isSet,Is=rr?pt(rr):Cs,Ds=1,Rs=2,ks=4,Lr="[object Arguments]",Ms="[object Array]",Ps="[object Boolean]",Ns="[object Date]",Ls="[object Error]",Vr="[object Function]",Vs="[object GeneratorFunction]",Us="[object Map]",zs="[object Number]",Ur="[object Object]",Bs="[object RegExp]",Gs="[object Set]",qs="[object String]",Hs="[object Symbol]",Zs="[object WeakMap]",Ks="[object ArrayBuffer]",Ys="[object DataView]",Ws="[object Float32Array]",Xs="[object Float64Array]",Js="[object Int8Array]",Qs="[object Int16Array]",eu="[object Int32Array]",tu="[object Uint8Array]",ru="[object Uint8ClampedArray]",nu="[object Uint16Array]",iu="[object Uint32Array]",F={};F[Lr]=F[Ms]=F[Ks]=F[Ys]=F[Ps]=F[Ns]=F[Ws]=F[Xs]=F[Js]=F[Qs]=F[eu]=F[Us]=F[zs]=F[Ur]=F[Bs]=F[Gs]=F[qs]=F[Hs]=F[tu]=F[ru]=F[nu]=F[iu]=!0;F[Ls]=F[Vr]=F[Zs]=!1;function _e(t,e,r,n,i,a){var s,o=e&Ds,l=e&Rs,f=e&ks;if(s!==void 0)return s;if(!we(t))return t;var h=Oe(t);if(h){if(s=Qa(t),!o)return Rr(t,s)}else{var y=Y(t),c=y==Vr||y==Vs;if(Fr(t))return Ma(t,o);if(y==Ur||y==Lr||c&&!i){if(s=l||c?{}:ws(t),!o)return l?za(t,Ra(s,t)):Va(t,Aa(s,t))}else{if(!F[y])return i?t:{};s=Ss(t,y,o)}}a||(a=new be);var v=a.get(t);if(v)return v;a.set(t,s),Is(t)?t.forEach(function($){s.add(_e($,e,r,$,t,a))}):As(t)&&t.forEach(function($,d){s.set(d,_e($,e,r,d,t,a))});var w=f?l?Ga:Ba:l?bt:gt,S=h?void 0:w(t);return Ri(S||t,function($,d){S&&(d=$,$=t[d]),$r(s,d,_e($,e,r,d,t,a))}),s}var au=1,su=4;function je(t){return _e(t,au|su)}var Je,nr;function uu(){if(nr)return Je;nr=1;var t=Array.isArray,e=Object.keys,r=Object.prototype.hasOwnProperty,n=typeof Element<"u";function i(a,s){if(a===s)return!0;if(a&&s&&typeof a=="object"&&typeof s=="object"){var o=t(a),l=t(s),f,h,y;if(o&&l){if(h=a.length,h!=s.length)return!1;for(f=h;f--!==0;)if(!i(a[f],s[f]))return!1;return!0}if(o!=l)return!1;var c=a instanceof Date,v=s instanceof Date;if(c!=v)return!1;if(c&&v)return a.getTime()==s.getTime();var w=a instanceof RegExp,S=s instanceof RegExp;if(w!=S)return!1;if(w&&S)return a.toString()==s.toString();var $=e(a);if(h=$.length,h!==e(s).length)return!1;for(f=h;f--!==0;)if(!r.call(s,$[f]))return!1;if(n&&a instanceof Element&&s instanceof Element)return a===s;for(f=h;f--!==0;)if(y=$[f],!(y==="_owner"&&a.$$typeof)&&!i(a[y],s[y]))return!1;return!0}return a!==a&&s!==s}return Je=function(s,o){try{return i(s,o)}catch(l){if(l.message&&l.message.match(/stack|recursion/i)||l.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",l.name,l.message),!1;throw l}},Je}var ou=uu();const re=yr(ou);var lu=4;function ir(t){return _e(t,lu)}function zr(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var cu="[object Symbol]";function Tt(t){return typeof t=="symbol"||ue(t)&&se(t)==cu}var fu="Expected a function";function Et(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(fu);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=t.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(Et.Cache||ee),r}Et.Cache=ee;var du=500;function hu(t){var e=Et(t,function(n){return r.size===du&&r.clear(),n}),r=e.cache;return e}var pu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yu=/\\(\\)?/g,gu=hu(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(pu,function(r,n,i,a){e.push(i?a.replace(yu,"$1"):n||r)}),e});function bu(t){if(typeof t=="string"||Tt(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}var ar=Q?Q.prototype:void 0,sr=ar?ar.toString:void 0;function Br(t){if(typeof t=="string")return t;if(Oe(t))return zr(t,Br)+"";if(Tt(t))return sr?sr.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function mu(t){return t==null?"":Br(t)}function Gr(t){return Oe(t)?zr(t,bu):Tt(t)?[t]:Rr(gu(mu(t)))}function D(){return D=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},D.apply(this,arguments)}function qr(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}var ze=T.createContext(void 0);ze.displayName="FormikContext";ze.Provider;ze.Consumer;function vu(){var t=T.useContext(ze);return t}var U=function(e){return typeof e=="function"},Be=function(e){return e!==null&&typeof e=="object"},Tu=function(e){return String(Math.floor(Number(e)))===e},Qe=function(e){return Object.prototype.toString.call(e)==="[object String]"},et=function(e){return Be(e)&&U(e.then)};function N(t,e,r,n){n===void 0&&(n=0);for(var i=Gr(e);t&&n<i.length;)t=t[i[n++]];return n!==i.length&&!t||t===void 0?r:t}function ne(t,e,r){for(var n=ir(t),i=n,a=0,s=Gr(e);a<s.length-1;a++){var o=s[a],l=N(t,s.slice(0,a+1));if(l&&(Be(l)||Array.isArray(l)))i=i[o]=ir(l);else{var f=s[a+1];i=i[o]=Tu(f)&&Number(f)>=0?[]:{}}}return(a===0?t:i)[s[a]]===r?t:(r===void 0?delete i[s[a]]:i[s[a]]=r,a===0&&r===void 0&&delete n[s[a]],n)}function Hr(t,e,r,n){r===void 0&&(r=new WeakMap),n===void 0&&(n={});for(var i=0,a=Object.keys(t);i<a.length;i++){var s=a[i],o=t[s];Be(o)?r.get(o)||(r.set(o,!0),n[s]=Array.isArray(o)?[]:{},Hr(o,e,r,n[s])):n[s]=e}return n}function Eu(t,e){switch(e.type){case"SET_VALUES":return D({},t,{values:e.payload});case"SET_TOUCHED":return D({},t,{touched:e.payload});case"SET_ERRORS":return re(t.errors,e.payload)?t:D({},t,{errors:e.payload});case"SET_STATUS":return D({},t,{status:e.payload});case"SET_ISSUBMITTING":return D({},t,{isSubmitting:e.payload});case"SET_ISVALIDATING":return D({},t,{isValidating:e.payload});case"SET_FIELD_VALUE":return D({},t,{values:ne(t.values,e.payload.field,e.payload.value)});case"SET_FIELD_TOUCHED":return D({},t,{touched:ne(t.touched,e.payload.field,e.payload.value)});case"SET_FIELD_ERROR":return D({},t,{errors:ne(t.errors,e.payload.field,e.payload.value)});case"RESET_FORM":return D({},t,e.payload);case"SET_FORMIK_STATE":return e.payload(t);case"SUBMIT_ATTEMPT":return D({},t,{touched:Hr(t.values,!0),isSubmitting:!0,submitCount:t.submitCount+1});case"SUBMIT_FAILURE":return D({},t,{isSubmitting:!1});case"SUBMIT_SUCCESS":return D({},t,{isSubmitting:!1});default:return t}}var te={},Ce={};function yo(t){var e=t.validateOnChange,r=e===void 0?!0:e,n=t.validateOnBlur,i=n===void 0?!0:n,a=t.validateOnMount,s=a===void 0?!1:a,o=t.isInitialValid,l=t.enableReinitialize,f=l===void 0?!1:l,h=t.onSubmit,y=qr(t,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),c=D({validateOnChange:r,validateOnBlur:i,validateOnMount:s,onSubmit:h},y),v=T.useRef(c.initialValues),w=T.useRef(c.initialErrors||te),S=T.useRef(c.initialTouched||Ce),$=T.useRef(c.initialStatus),d=T.useRef(!1),x=T.useRef({});T.useEffect(function(){return d.current=!0,function(){d.current=!1}},[]);var I=T.useState(0),z=I[1],j=T.useRef({values:je(c.initialValues),errors:je(c.initialErrors)||te,touched:je(c.initialTouched)||Ce,status:je(c.initialStatus),isSubmitting:!1,isValidating:!1,submitCount:0}),m=j.current,_=T.useCallback(function(u){var p=j.current;j.current=Eu(p,u),p!==j.current&&z(function(g){return g+1})},[]),B=T.useCallback(function(u,p){return new Promise(function(g,b){var E=c.validate(u,p);E==null?g(te):et(E)?E.then(function(O){g(O||te)},function(O){b(O)}):g(E)})},[c.validate]),L=T.useCallback(function(u,p){var g=c.validationSchema,b=U(g)?g(p):g,E=p&&b.validateAt?b.validateAt(p,u):xu(u,b);return new Promise(function(O,R){E.then(function(){O(te)},function(Z){Z.name==="ValidationError"?O(_u(Z)):R(Z)})})},[c.validationSchema]),me=T.useCallback(function(u,p){return new Promise(function(g){return g(x.current[u].validate(p))})},[]),C=T.useCallback(function(u){var p=Object.keys(x.current).filter(function(b){return U(x.current[b].validate)}),g=p.length>0?p.map(function(b){return me(b,N(u,b))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(g).then(function(b){return b.reduce(function(E,O,R){return O==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||O&&(E=ne(E,p[R],O)),E},{})})},[me]),fe=T.useCallback(function(u){return Promise.all([C(u),c.validationSchema?L(u):{},c.validate?B(u):{}]).then(function(p){var g=p[0],b=p[1],E=p[2],O=it.all([g,b,E],{arrayMerge:Su});return O})},[c.validate,c.validationSchema,C,B,L]),M=V(function(u){return u===void 0&&(u=m.values),_({type:"SET_ISVALIDATING",payload:!0}),fe(u).then(function(p){return d.current&&(_({type:"SET_ISVALIDATING",payload:!1}),_({type:"SET_ERRORS",payload:p})),p})});T.useEffect(function(){s&&d.current===!0&&re(v.current,c.initialValues)&&M(v.current)},[s,M]);var ve=T.useCallback(function(u){var p=u&&u.values?u.values:v.current,g=u&&u.errors?u.errors:w.current?w.current:c.initialErrors||{},b=u&&u.touched?u.touched:S.current?S.current:c.initialTouched||{},E=u&&u.status?u.status:$.current?$.current:c.initialStatus;v.current=p,w.current=g,S.current=b,$.current=E;var O=function(){_({type:"RESET_FORM",payload:{isSubmitting:!!u&&!!u.isSubmitting,errors:g,touched:b,status:E,values:p,isValidating:!!u&&!!u.isValidating,submitCount:u&&u.submitCount&&typeof u.submitCount=="number"?u.submitCount:0}})};if(c.onReset){var R=c.onReset(m.values,It);et(R)?R.then(O):O()}else O()},[c.initialErrors,c.initialStatus,c.initialTouched,c.onReset]);T.useEffect(function(){d.current===!0&&!re(v.current,c.initialValues)&&f&&(v.current=c.initialValues,ve(),s&&M(v.current))},[f,c.initialValues,ve,s,M]),T.useEffect(function(){f&&d.current===!0&&!re(w.current,c.initialErrors)&&(w.current=c.initialErrors||te,_({type:"SET_ERRORS",payload:c.initialErrors||te}))},[f,c.initialErrors]),T.useEffect(function(){f&&d.current===!0&&!re(S.current,c.initialTouched)&&(S.current=c.initialTouched||Ce,_({type:"SET_TOUCHED",payload:c.initialTouched||Ce}))},[f,c.initialTouched]),T.useEffect(function(){f&&d.current===!0&&!re($.current,c.initialStatus)&&($.current=c.initialStatus,_({type:"SET_STATUS",payload:c.initialStatus}))},[f,c.initialStatus,c.initialTouched]);var xt=V(function(u){if(x.current[u]&&U(x.current[u].validate)){var p=N(m.values,u),g=x.current[u].validate(p);return et(g)?(_({type:"SET_ISVALIDATING",payload:!0}),g.then(function(b){return b}).then(function(b){_({type:"SET_FIELD_ERROR",payload:{field:u,value:b}}),_({type:"SET_ISVALIDATING",payload:!1})})):(_({type:"SET_FIELD_ERROR",payload:{field:u,value:g}}),Promise.resolve(g))}else if(c.validationSchema)return _({type:"SET_ISVALIDATING",payload:!0}),L(m.values,u).then(function(b){return b}).then(function(b){_({type:"SET_FIELD_ERROR",payload:{field:u,value:N(b,u)}}),_({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),un=T.useCallback(function(u,p){var g=p.validate;x.current[u]={validate:g}},[]),on=T.useCallback(function(u){delete x.current[u]},[]),St=V(function(u,p){_({type:"SET_TOUCHED",payload:u});var g=p===void 0?i:p;return g?M(m.values):Promise.resolve()}),$t=T.useCallback(function(u){_({type:"SET_ERRORS",payload:u})},[]),wt=V(function(u,p){var g=U(u)?u(m.values):u;_({type:"SET_VALUES",payload:g});var b=p===void 0?r:p;return b?M(g):Promise.resolve()}),Ae=T.useCallback(function(u,p){_({type:"SET_FIELD_ERROR",payload:{field:u,value:p}})},[]),de=V(function(u,p,g){var b=U(p)?p(N(m.values,u)):p;_({type:"SET_FIELD_VALUE",payload:{field:u,value:b}});var E=g===void 0?r:g;return E?M(ne(m.values,u,b)):Promise.resolve()}),Ot=T.useCallback(function(u,p){var g=p,b=u,E;if(!Qe(u)){u.persist&&u.persist();var O=u.target?u.target:u.currentTarget,R=O.type,Z=O.name,Ke=O.id,Ye=O.value,bn=O.checked;O.outerHTML;var Dt=O.options,mn=O.multiple;g=p||Z||Ke,b=/number|range/.test(R)?(E=parseFloat(Ye),isNaN(E)?"":E):/checkbox/.test(R)?wu(N(m.values,g),bn,Ye):Dt&&mn?$u(Dt):Ye}g&&de(g,b)},[de,m.values]),Ge=V(function(u){if(Qe(u))return function(p){return Ot(p,u)};Ot(u)}),he=V(function(u,p,g){p===void 0&&(p=!0),_({type:"SET_FIELD_TOUCHED",payload:{field:u,value:p}});var b=g===void 0?i:g;return b?M(m.values):Promise.resolve()}),Ft=T.useCallback(function(u,p){u.persist&&u.persist();var g=u.target,b=g.name,E=g.id;g.outerHTML;var O=p||b||E;he(O,!0)},[he]),qe=V(function(u){if(Qe(u))return function(p){return Ft(p,u)};Ft(u)}),At=T.useCallback(function(u){U(u)?_({type:"SET_FORMIK_STATE",payload:u}):_({type:"SET_FORMIK_STATE",payload:function(){return u}})},[]),jt=T.useCallback(function(u){_({type:"SET_STATUS",payload:u})},[]),Ct=T.useCallback(function(u){_({type:"SET_ISSUBMITTING",payload:u})},[]),He=V(function(){return _({type:"SUBMIT_ATTEMPT"}),M().then(function(u){var p=u instanceof Error,g=!p&&Object.keys(u).length===0;if(g){var b;try{if(b=cn(),b===void 0)return}catch(E){throw E}return Promise.resolve(b).then(function(E){return d.current&&_({type:"SUBMIT_SUCCESS"}),E}).catch(function(E){if(d.current)throw _({type:"SUBMIT_FAILURE"}),E})}else if(d.current&&(_({type:"SUBMIT_FAILURE"}),p))throw u})}),ln=V(function(u){u&&u.preventDefault&&U(u.preventDefault)&&u.preventDefault(),u&&u.stopPropagation&&U(u.stopPropagation)&&u.stopPropagation(),He().catch(function(p){console.warn("Warning: An unhandled error was caught from submitForm()",p)})}),It={resetForm:ve,validateForm:M,validateField:xt,setErrors:$t,setFieldError:Ae,setFieldTouched:he,setFieldValue:de,setStatus:jt,setSubmitting:Ct,setTouched:St,setValues:wt,setFormikState:At,submitForm:He},cn=V(function(){return h(m.values,It)}),fn=V(function(u){u&&u.preventDefault&&U(u.preventDefault)&&u.preventDefault(),u&&u.stopPropagation&&U(u.stopPropagation)&&u.stopPropagation(),ve()}),dn=T.useCallback(function(u){return{value:N(m.values,u),error:N(m.errors,u),touched:!!N(m.touched,u),initialValue:N(v.current,u),initialTouched:!!N(S.current,u),initialError:N(w.current,u)}},[m.errors,m.touched,m.values]),hn=T.useCallback(function(u){return{setValue:function(g,b){return de(u,g,b)},setTouched:function(g,b){return he(u,g,b)},setError:function(g){return Ae(u,g)}}},[de,he,Ae]),pn=T.useCallback(function(u){var p=Be(u),g=p?u.name:u,b=N(m.values,g),E={name:g,value:b,onChange:Ge,onBlur:qe};if(p){var O=u.type,R=u.value,Z=u.as,Ke=u.multiple;O==="checkbox"?R===void 0?E.checked=!!b:(E.checked=!!(Array.isArray(b)&&~b.indexOf(R)),E.value=R):O==="radio"?(E.checked=b===R,E.value=R):Z==="select"&&Ke&&(E.value=E.value||[],E.multiple=!0)}return E},[qe,Ge,m.values]),Ze=T.useMemo(function(){return!re(v.current,m.values)},[v.current,m.values]),yn=T.useMemo(function(){return typeof o<"u"?Ze?m.errors&&Object.keys(m.errors).length===0:o!==!1&&U(o)?o(c):o:m.errors&&Object.keys(m.errors).length===0},[o,Ze,m.errors,c]),gn=D({},m,{initialValues:v.current,initialErrors:w.current,initialTouched:S.current,initialStatus:$.current,handleBlur:qe,handleChange:Ge,handleReset:fn,handleSubmit:ln,resetForm:ve,setErrors:$t,setFormikState:At,setFieldTouched:he,setFieldValue:de,setFieldError:Ae,setStatus:jt,setSubmitting:Ct,setTouched:St,setValues:wt,submitForm:He,validateForm:M,validateField:xt,isValid:yn,dirty:Ze,unregisterField:on,registerField:un,getFieldProps:pn,getFieldMeta:dn,getFieldHelpers:hn,validateOnBlur:i,validateOnChange:r,validateOnMount:s});return gn}function _u(t){var e={};if(t.inner){if(t.inner.length===0)return ne(e,t.path,t.message);for(var i=t.inner,r=Array.isArray(i),n=0,i=r?i:i[Symbol.iterator]();;){var a;if(r){if(n>=i.length)break;a=i[n++]}else{if(n=i.next(),n.done)break;a=n.value}var s=a;N(e,s.path)||(e=ne(e,s.path,s.message))}}return e}function xu(t,e,r,n){r===void 0&&(r=!1);var i=lt(t);return e[r?"validateSync":"validate"](i,{abortEarly:!1,context:i})}function lt(t){var e=Array.isArray(t)?[]:{};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var n=String(r);Array.isArray(t[n])===!0?e[n]=t[n].map(function(i){return Array.isArray(i)===!0||kt(i)?lt(i):i!==""?i:void 0}):kt(t[n])?e[n]=lt(t[n]):e[n]=t[n]!==""?t[n]:void 0}return e}function Su(t,e,r){var n=t.slice();return e.forEach(function(a,s){if(typeof n[s]>"u"){var o=r.clone!==!1,l=o&&r.isMergeableObject(a);n[s]=l?it(Array.isArray(a)?[]:{},a,r):a}else r.isMergeableObject(a)?n[s]=it(t[s],a,r):t.indexOf(a)===-1&&n.push(a)}),n}function $u(t){return Array.from(t).filter(function(e){return e.selected}).map(function(e){return e.value})}function wu(t,e,r){if(typeof t=="boolean")return!!e;var n=[],i=!1,a=-1;if(Array.isArray(t))n=t,a=t.indexOf(r),i=a>=0;else if(!r||r=="true"||r=="false")return!!e;return e&&r&&!i?n.concat(r):i?n.slice(0,a).concat(n.slice(a+1)):n}var Ou=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?T.useLayoutEffect:T.useEffect;function V(t){var e=T.useRef(t);return Ou(function(){e.current=t}),T.useCallback(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return e.current.apply(void 0,n)},[])}var Fu=T.forwardRef(function(t,e){var r=t.action,n=qr(t,["action"]),i=r??"#",a=vu(),s=a.handleReset,o=a.handleSubmit;return T.createElement("form",D({onSubmit:o,ref:e,onReset:s,action:i},n))});Fu.displayName="Form";var tt,ur;function Au(){if(ur)return tt;ur=1;function t(d){this._maxSize=d,this.clear()}t.prototype.clear=function(){this._size=0,this._values=Object.create(null)},t.prototype.get=function(d){return this._values[d]},t.prototype.set=function(d,x){return this._size>=this._maxSize&&this.clear(),d in this._values||this._size++,this._values[d]=x};var e=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,i=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,a=/^\s*(['"]?)(.*?)(\1)\s*$/,s=512,o=new t(s),l=new t(s),f=new t(s);tt={Cache:t,split:y,normalizePath:h,setter:function(d){var x=h(d);return l.get(d)||l.set(d,function(z,j){for(var m=0,_=x.length,B=z;m<_-1;){var L=x[m];if(L==="__proto__"||L==="constructor"||L==="prototype")return z;B=B[x[m++]]}B[x[m]]=j})},getter:function(d,x){var I=h(d);return f.get(d)||f.set(d,function(j){for(var m=0,_=I.length;m<_;)if(j!=null||!x)j=j[I[m++]];else return;return j})},join:function(d){return d.reduce(function(x,I){return x+(v(I)||r.test(I)?"["+I+"]":(x?".":"")+I)},"")},forEach:function(d,x,I){c(Array.isArray(d)?d:y(d),x,I)}};function h(d){return o.get(d)||o.set(d,y(d).map(function(x){return x.replace(a,"$2")}))}function y(d){return d.match(e)||[""]}function c(d,x,I){var z=d.length,j,m,_,B;for(m=0;m<z;m++)j=d[m],j&&($(j)&&(j='"'+j+'"'),B=v(j),_=!B&&/^\d+$/.test(j),x.call(I,j,B,_,m,d))}function v(d){return typeof d=="string"&&d&&["'",'"'].indexOf(d.charAt(0))!==-1}function w(d){return d.match(n)&&!d.match(r)}function S(d){return i.test(d)}function $(d){return!v(d)&&(w(d)||S(d))}return tt}var ie=Au(),rt,or;function ju(){if(or)return rt;or=1;const t=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,e=h=>h.match(t)||[],r=h=>h[0].toUpperCase()+h.slice(1),n=(h,y)=>e(h).join(y).toLowerCase(),i=h=>e(h).reduce((y,c)=>`${y}${y?c[0].toUpperCase()+c.slice(1).toLowerCase():c.toLowerCase()}`,"");return rt={words:e,upperFirst:r,camelCase:i,pascalCase:h=>r(i(h)),snakeCase:h=>n(h,"_"),kebabCase:h=>n(h,"-"),sentenceCase:h=>r(n(h," ")),titleCase:h=>e(h).map(r).join(" ")},rt}var nt=ju(),Ie={exports:{}},lr;function Cu(){if(lr)return Ie.exports;lr=1,Ie.exports=function(i){return t(e(i),i)},Ie.exports.array=t;function t(i,a){var s=i.length,o=new Array(s),l={},f=s,h=r(a),y=n(i);for(a.forEach(function(v){if(!y.has(v[0])||!y.has(v[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});f--;)l[f]||c(i[f],f,new Set);return o;function c(v,w,S){if(S.has(v)){var $;try{$=", node was:"+JSON.stringify(v)}catch{$=""}throw new Error("Cyclic dependency"+$)}if(!y.has(v))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(v));if(!l[w]){l[w]=!0;var d=h.get(v)||new Set;if(d=Array.from(d),w=d.length){S.add(v);do{var x=d[--w];c(x,y.get(x),S)}while(w);S.delete(v)}o[--s]=v}}}function e(i){for(var a=new Set,s=0,o=i.length;s<o;s++){var l=i[s];a.add(l[0]),a.add(l[1])}return Array.from(a)}function r(i){for(var a=new Map,s=0,o=i.length;s<o;s++){var l=i[s];a.has(l[0])||a.set(l[0],new Set),a.has(l[1])||a.set(l[1],new Set),a.get(l[0]).add(l[1])}return a}function n(i){for(var a=new Map,s=0,o=i.length;s<o;s++)a.set(i[s],s);return a}return Ie.exports}var Iu=Cu();const Du=yr(Iu),Ru=Object.prototype.toString,ku=Error.prototype.toString,Mu=RegExp.prototype.toString,Pu=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Nu=/^Symbol\((.*)\)(.*)$/;function Lu(t){return t!=+t?"NaN":t===0&&1/t<0?"-0":""+t}function cr(t,e=!1){if(t==null||t===!0||t===!1)return""+t;const r=typeof t;if(r==="number")return Lu(t);if(r==="string")return e?`"${t}"`:t;if(r==="function")return"[Function "+(t.name||"anonymous")+"]";if(r==="symbol")return Pu.call(t).replace(Nu,"Symbol($1)");const n=Ru.call(t).slice(8,-1);return n==="Date"?isNaN(t.getTime())?""+t:t.toISOString(t):n==="Error"||t instanceof Error?"["+ku.call(t)+"]":n==="RegExp"?Mu.call(t):null}function J(t,e){let r=cr(t,e);return r!==null?r:JSON.stringify(t,function(n,i){let a=cr(this[n],e);return a!==null?a:i},2)}function Zr(t){return t==null?[]:[].concat(t)}let Kr,Yr,Wr,Vu=/\$\{\s*(\w+)\s*\}/g;Kr=Symbol.toStringTag;class fr{constructor(e,r,n,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Kr]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=i,this.errors=[],this.inner=[],Zr(e).forEach(a=>{if(k.isError(a)){this.errors.push(...a.errors);const s=a.inner.length?a.inner:[a];this.inner.push(...s)}else this.errors.push(a)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Yr=Symbol.hasInstance;Wr=Symbol.toStringTag;class k extends Error{static formatError(e,r){const n=r.label||r.path||"this";return r=Object.assign({},r,{path:n,originalPath:r.path}),typeof e=="string"?e.replace(Vu,(i,a)=>J(r[a])):typeof e=="function"?e(r):e}static isError(e){return e&&e.name==="ValidationError"}constructor(e,r,n,i,a){const s=new fr(e,r,n,i);if(a)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[Wr]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,k)}static[Yr](e){return fr[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let q={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:t,type:e,value:r,originalValue:n})=>{const i=n!=null&&n!==r?` (cast from the value \`${J(n,!0)}\`).`:".";return e!=="mixed"?`${t} must be a \`${e}\` type, but the final value was: \`${J(r,!0)}\``+i:`${t} must match the configured type. The validated value was: \`${J(r,!0)}\``+i}},P={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Uu={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},ct={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},ft={isValue:"${path} field must be ${value}"},Re={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},zu={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},Bu={notType:t=>{const{path:e,value:r,spec:n}=t,i=n.types.length;if(Array.isArray(r)){if(r.length<i)return`${e} tuple value has too few items, expected a length of ${i} but got ${r.length} for value: \`${J(r,!0)}\``;if(r.length>i)return`${e} tuple value has too many items, expected a length of ${i} but got ${r.length} for value: \`${J(r,!0)}\``}return k.formatError(q.notType,t)}};Object.assign(Object.create(null),{mixed:q,string:P,number:Uu,date:ct,object:Re,array:zu,boolean:ft,tuple:Bu});const _t=t=>t&&t.__isYupSchema__;class Pe{static fromOptions(e,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:i,otherwise:a}=r,s=typeof n=="function"?n:(...o)=>o.every(l=>l===n);return new Pe(e,(o,l)=>{var f;let h=s(...o)?i:a;return(f=h?.(l))!=null?f:l})}constructor(e,r){this.fn=void 0,this.refs=e,this.refs=e,this.fn=r}resolve(e,r){let n=this.refs.map(a=>a.getValue(r?.value,r?.parent,r?.context)),i=this.fn(n,e,r);if(i===void 0||i===e)return e;if(!_t(i))throw new TypeError("conditions must return a schema object");return i.resolve(r)}}const De={context:"$",value:"."};class ce{constructor(e,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof e!="string")throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),e==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===De.context,this.isValue=this.key[0]===De.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?De.context:this.isValue?De.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&ie.getter(this.path,!0),this.map=r.map}getValue(e,r,n){let i=this.isContext?n:this.isValue?e:r;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}cast(e,r){return this.getValue(e,r?.parent,r?.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}ce.prototype.__isYupRef=!0;const W=t=>t==null;function pe(t){function e({value:r,path:n="",options:i,originalValue:a,schema:s},o,l){const{name:f,test:h,params:y,message:c,skipAbsent:v}=t;let{parent:w,context:S,abortEarly:$=s.spec.abortEarly,disableStackTrace:d=s.spec.disableStackTrace}=i;const x={value:r,parent:w,context:S};function I(C={}){const fe=Xr(Object.assign({value:r,originalValue:a,label:s.spec.label,path:C.path||n,spec:s.spec,disableStackTrace:C.disableStackTrace||d},y,C.params),x),M=new k(k.formatError(C.message||c,fe),r,fe.path,C.type||f,fe.disableStackTrace);return M.params=fe,M}const z=$?o:l;let j={path:n,parent:w,type:f,from:i.from,createError:I,resolve(C){return Jr(C,x)},options:i,originalValue:a,schema:s};const m=C=>{k.isError(C)?z(C):C?l(null):z(I())},_=C=>{k.isError(C)?z(C):o(C)};if(v&&W(r))return m(!0);let L;try{var me;if(L=h.call(j,r,j),typeof((me=L)==null?void 0:me.then)=="function"){if(i.sync)throw new Error(`Validation test of type: "${j.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(L).then(m,_)}}catch(C){_(C);return}m(L)}return e.OPTIONS=t,e}function Xr(t,e){if(!t)return t;for(const r of Object.keys(t))t[r]=Jr(t[r],e);return t}function Jr(t,e){return ce.isRef(t)?t.getValue(e.value,e.parent,e.context):t}function Gu(t,e,r,n=r){let i,a,s;return e?(ie.forEach(e,(o,l,f)=>{let h=l?o.slice(1,o.length-1):o;t=t.resolve({context:n,parent:i,value:r});let y=t.type==="tuple",c=f?parseInt(h,10):0;if(t.innerType||y){if(y&&!f)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${s}" must contain an index to the tuple element, e.g. "${s}[0]"`);if(r&&c>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${o}, in the path: ${e}. because there is no value at that index. `);i=r,r=r&&r[c],t=y?t.spec.types[c]:t.innerType}if(!f){if(!t.fields||!t.fields[h])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${s} which is a type: "${t.type}")`);i=r,r=r&&r[h],t=t.fields[h]}a=h,s=l?"["+o+"]":"."+o}),{schema:t,parent:i,parentPath:a}):{parent:i,parentPath:e,schema:t}}class Ne extends Set{describe(){const e=[];for(const r of this.values())e.push(ce.isRef(r)?r.describe():r);return e}resolveAll(e){let r=[];for(const n of this.values())r.push(e(n));return r}clone(){return new Ne(this.values())}merge(e,r){const n=this.clone();return e.forEach(i=>n.add(i)),r.forEach(i=>n.delete(i)),n}}function ye(t,e=new Map){if(_t(t)||!t||typeof t!="object")return t;if(e.has(t))return e.get(t);let r;if(t instanceof Date)r=new Date(t.getTime()),e.set(t,r);else if(t instanceof RegExp)r=new RegExp(t),e.set(t,r);else if(Array.isArray(t)){r=new Array(t.length),e.set(t,r);for(let n=0;n<t.length;n++)r[n]=ye(t[n],e)}else if(t instanceof Map){r=new Map,e.set(t,r);for(const[n,i]of t.entries())r.set(n,ye(i,e))}else if(t instanceof Set){r=new Set,e.set(t,r);for(const n of t)r.add(ye(n,e))}else if(t instanceof Object){r={},e.set(t,r);for(const[n,i]of Object.entries(t))r[n]=ye(i,e)}else throw Error(`Unable to clone ${t}`);return r}function qu(t){if(!(t!=null&&t.length))return;const e=[];let r="",n=!1,i=!1;for(let a=0;a<t.length;a++){const s=t[a];if(s==="["&&!i){r&&(e.push(...r.split(".").filter(Boolean)),r=""),n=!0;continue}if(s==="]"&&!i){r&&(/^\d+$/.test(r)?e.push(r):e.push(r.replace(/^"|"$/g,"")),r=""),n=!1;continue}if(s==='"'){i=!i;continue}if(s==="."&&!n&&!i){r&&(e.push(r),r="");continue}r+=s}return r&&e.push(...r.split(".").filter(Boolean)),e}function Hu(t,e){const r=e?`${e}.${t.path}`:t.path;return t.errors.map(n=>({message:n,path:qu(r)}))}function Qr(t,e){var r;if(!((r=t.inner)!=null&&r.length)&&t.errors.length)return Hu(t,e);const n=e?`${e}.${t.path}`:t.path;return t.inner.flatMap(i=>Qr(i,n))}class G{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Ne,this._blacklist=new Ne,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(q.notType)}),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},e?.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=ye(Object.assign({},this.spec,e)),r}label(e){let r=this.clone();return r.spec.label=e,r}meta(...e){if(e.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},e[0]),r}withMutation(e){let r=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=r,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let r=this,n=e.clone();const i=Object.assign({},r.spec,n.spec);return n.spec=i,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=r._blacklist.merge(e._blacklist,e._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(a=>{e.tests.forEach(s=>{a.test(s.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(e){return e==null?!!(this.spec.nullable&&e===null||this.spec.optional&&e===void 0):this._typeCheck(e)}resolve(e){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((i,a)=>a.resolve(i,e),r),r=r.resolve(e)}return r}resolveOptions(e){var r,n,i,a;return Object.assign({},e,{from:e.from||[],strict:(r=e.strict)!=null?r:this.spec.strict,abortEarly:(n=e.abortEarly)!=null?n:this.spec.abortEarly,recursive:(i=e.recursive)!=null?i:this.spec.recursive,disableStackTrace:(a=e.disableStackTrace)!=null?a:this.spec.disableStackTrace})}cast(e,r={}){let n=this.resolve(Object.assign({},r,{value:e})),i=r.assert==="ignore-optionality",a=n._cast(e,r);if(r.assert!==!1&&!n.isType(a)){if(i&&W(a))return a;let s=J(e),o=J(a);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
|
|
2
|
+
|
|
3
|
+
attempted value: ${s}
|
|
4
|
+
`+(o!==s?`result of cast: ${o}`:""))}return a}_cast(e,r){let n=e===void 0?e:this.transforms.reduce((i,a)=>a.call(this,i,e,this,r),e);return n===void 0&&(n=this.getDefault(r)),n}_validate(e,r={},n,i){let{path:a,originalValue:s=e,strict:o=this.spec.strict}=r,l=e;o||(l=this._cast(l,Object.assign({assert:!1},r)));let f=[];for(let h of Object.values(this.internalTests))h&&f.push(h);this.runTests({path:a,value:l,originalValue:s,options:r,tests:f},n,h=>{if(h.length)return i(h,l);this.runTests({path:a,value:l,originalValue:s,options:r,tests:this.tests},n,i)})}runTests(e,r,n){let i=!1,{tests:a,value:s,originalValue:o,path:l,options:f}=e,h=S=>{i||(i=!0,r(S,s))},y=S=>{i||(i=!0,n(S,s))},c=a.length,v=[];if(!c)return y([]);let w={value:s,originalValue:o,path:l,options:f,schema:this};for(let S=0;S<a.length;S++){const $=a[S];$(w,h,function(x){x&&(Array.isArray(x)?v.push(...x):v.push(x)),--c<=0&&y(v)})}}asNestedTest({key:e,index:r,parent:n,parentPath:i,originalParent:a,options:s}){const o=e??r;if(o==null)throw TypeError("Must include `key` or `index` for nested validations");const l=typeof o=="number";let f=n[o];const h=Object.assign({},s,{strict:!0,parent:n,value:f,originalValue:a[o],key:void 0,[l?"index":"key"]:o,path:l||o.includes(".")?`${i||""}[${l?o:`"${o}"`}]`:(i?`${i}.`:"")+e});return(y,c,v)=>this.resolve(h)._validate(f,h,c,v)}validate(e,r){var n;let i=this.resolve(Object.assign({},r,{value:e})),a=(n=r?.disableStackTrace)!=null?n:i.spec.disableStackTrace;return new Promise((s,o)=>i._validate(e,r,(l,f)=>{k.isError(l)&&(l.value=f),o(l)},(l,f)=>{l.length?o(new k(l,f,void 0,void 0,a)):s(f)}))}validateSync(e,r){var n;let i=this.resolve(Object.assign({},r,{value:e})),a,s=(n=r?.disableStackTrace)!=null?n:i.spec.disableStackTrace;return i._validate(e,Object.assign({},r,{sync:!0}),(o,l)=>{throw k.isError(o)&&(o.value=l),o},(o,l)=>{if(o.length)throw new k(o,e,void 0,void 0,s);a=l}),a}isValid(e,r){return this.validate(e,r).then(()=>!0,n=>{if(k.isError(n))return!1;throw n})}isValidSync(e,r){try{return this.validateSync(e,r),!0}catch(n){if(k.isError(n))return!1;throw n}}_getDefault(e){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,e):ye(r)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){return arguments.length===0?this._getDefault():this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,r){const n=this.clone({nullable:e});return n.internalTests.nullable=pe({message:r,name:"nullable",test(i){return i===null?this.schema.spec.nullable:!0}}),n}optionality(e,r){const n=this.clone({optional:e});return n.internalTests.optionality=pe({message:r,name:"optionality",test(i){return i===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(e=q.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=q.notNull){return this.nullability(!1,e)}required(e=q.required){return this.clone().withMutation(r=>r.nonNullable(e).defined(e))}notRequired(){return this.clone().withMutation(e=>e.nullable().optional())}transform(e){let r=this.clone();return r.transforms.push(e),r}test(...e){let r;if(e.length===1?typeof e[0]=="function"?r={test:e[0]}:r=e[0]:e.length===2?r={name:e[0],test:e[1]}:r={name:e[0],message:e[1],test:e[2]},r.message===void 0&&(r.message=q.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),i=pe(r),a=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(s=>!(s.OPTIONS.name===r.name&&(a||s.OPTIONS.test===i.OPTIONS.test))),n.tests.push(i),n}when(e,r){!Array.isArray(e)&&typeof e!="string"&&(r=e,e=".");let n=this.clone(),i=Zr(e).map(a=>new ce(a));return i.forEach(a=>{a.isSibling&&n.deps.push(a.key)}),n.conditions.push(typeof r=="function"?new Pe(i,r):Pe.fromOptions(i,r)),n}typeError(e){let r=this.clone();return r.internalTests.typeError=pe({message:e,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(e,r=q.oneOf){let n=this.clone();return e.forEach(i=>{n._whitelist.add(i),n._blacklist.delete(i)}),n.internalTests.whiteList=pe({message:r,name:"oneOf",skipAbsent:!0,test(i){let a=this.schema._whitelist,s=a.resolveAll(this.resolve);return s.includes(i)?!0:this.createError({params:{values:Array.from(a).join(", "),resolved:s}})}}),n}notOneOf(e,r=q.notOneOf){let n=this.clone();return e.forEach(i=>{n._blacklist.add(i),n._whitelist.delete(i)}),n.internalTests.blacklist=pe({message:r,name:"notOneOf",test(i){let a=this.schema._blacklist,s=a.resolveAll(this.resolve);return s.includes(i)?this.createError({params:{values:Array.from(a).join(", "),resolved:s}}):!0}}),n}strip(e=!0){let r=this.clone();return r.spec.strip=e,r}describe(e){const r=(e?this.resolve(e):this).clone(),{label:n,meta:i,optional:a,nullable:s}=r.spec;return{meta:i,label:n,optional:a,nullable:s,default:r.getDefault(e),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.filter((l,f,h)=>h.findIndex(y=>y.OPTIONS.name===l.OPTIONS.name)===f).map(l=>{const f=l.OPTIONS.params&&e?Xr(Object.assign({},l.OPTIONS.params),e):l.OPTIONS.params;return{name:l.OPTIONS.name,params:f}})}}get"~standard"(){const e=this;return{version:1,vendor:"yup",async validate(n){try{return{value:await e.validate(n,{abortEarly:!1})}}catch(i){if(i instanceof k)return{issues:Qr(i)};throw i}}}}}G.prototype.__isYupSchema__=!0;for(const t of["validate","validateSync"])G.prototype[`${t}At`]=function(e,r,n={}){const{parent:i,parentPath:a,schema:s}=Gu(this,e,r,n.context);return s[t](i&&i[a],Object.assign({},n,{parent:i,path:e}))};for(const t of["equals","is"])G.prototype[t]=G.prototype.oneOf;for(const t of["not","nope"])G.prototype[t]=G.prototype.notOneOf;function Zu(){return new en}class en extends G{constructor(){super({type:"boolean",check(e){return e instanceof Boolean&&(e=e.valueOf()),typeof e=="boolean"}}),this.withMutation(()=>{this.transform((e,r)=>{if(this.spec.coerce&&!this.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e})})}isTrue(e=ft.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test(r){return W(r)||r===!0}})}isFalse(e=ft.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test(r){return W(r)||r===!1}})}default(e){return super.default(e)}defined(e){return super.defined(e)}optional(){return super.optional()}required(e){return super.required(e)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(e){return super.nonNullable(e)}strip(e){return super.strip(e)}}Zu.prototype=en.prototype;const Ku=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Yu(t){const e=dt(t);if(!e)return Date.parse?Date.parse(t):Number.NaN;if(e.z===void 0&&e.plusMinus===void 0)return new Date(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond).valueOf();let r=0;return e.z!=="Z"&&e.plusMinus!==void 0&&(r=e.hourOffset*60+e.minuteOffset,e.plusMinus==="+"&&(r=0-r)),Date.UTC(e.year,e.month,e.day,e.hour,e.minute+r,e.second,e.millisecond)}function dt(t){var e,r;const n=Ku.exec(t);return n?{year:K(n[1]),month:K(n[2],1)-1,day:K(n[3],1),hour:K(n[4]),minute:K(n[5]),second:K(n[6]),millisecond:n[7]?K(n[7].substring(0,3)):0,precision:(e=(r=n[7])==null?void 0:r.length)!=null?e:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:K(n[10]),minuteOffset:K(n[11])}:null}function K(t,e=0){return Number(t)||e}let Wu=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Xu=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Ju=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Qu="^\\d{4}-\\d{2}-\\d{2}",eo="\\d{2}:\\d{2}:\\d{2}",to="(([+-]\\d{2}(:?\\d{2})?)|Z)",ro=new RegExp(`${Qu}T${eo}(\\.\\d+)?${to}$`),no=t=>W(t)||t===t.trim(),io={}.toString();function ao(){return new tn}class tn extends G{constructor(){super({type:"string",check(e){return e instanceof String&&(e=e.valueOf()),typeof e=="string"}}),this.withMutation(()=>{this.transform((e,r)=>{if(!this.spec.coerce||this.isType(e)||Array.isArray(e))return e;const n=e!=null&&e.toString?e.toString():e;return n===io?e:n})})}required(e){return super.required(e).withMutation(r=>r.test({message:e||q.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(e=>(e.tests=e.tests.filter(r=>r.OPTIONS.name!=="required"),e))}length(e,r=P.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(n){return n.length===this.resolve(e)}})}min(e,r=P.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(n){return n.length>=this.resolve(e)}})}max(e,r=P.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:e},skipAbsent:!0,test(n){return n.length<=this.resolve(e)}})}matches(e,r){let n=!1,i,a;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:i,name:a}=r:i=r),this.test({name:a||"matches",message:i||P.matches,params:{regex:e},skipAbsent:!0,test:s=>s===""&&n||s.search(e)!==-1})}email(e=P.email){return this.matches(Wu,{name:"email",message:e,excludeEmptyString:!0})}url(e=P.url){return this.matches(Xu,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=P.uuid){return this.matches(Ju,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let r="",n,i;return e&&(typeof e=="object"?{message:r="",allowOffset:n=!1,precision:i=void 0}=e:r=e),this.matches(ro,{name:"datetime",message:r||P.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||P.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:a=>{if(!a||n)return!0;const s=dt(a);return s?!!s.z:!1}}).test({name:"datetime_precision",message:r||P.datetime_precision,params:{precision:i},skipAbsent:!0,test:a=>{if(!a||i==null)return!0;const s=dt(a);return s?s.precision===i:!1}})}ensure(){return this.default("").transform(e=>e===null?"":e)}trim(e=P.trim){return this.transform(r=>r!=null?r.trim():r).test({message:e,name:"trim",test:no})}lowercase(e=P.lowercase){return this.transform(r=>W(r)?r:r.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>W(r)||r===r.toLowerCase()})}uppercase(e=P.uppercase){return this.transform(r=>W(r)?r:r.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>W(r)||r===r.toUpperCase()})}}ao.prototype=tn.prototype;let rn=new Date(""),so=t=>Object.prototype.toString.call(t)==="[object Date]";function nn(){return new Fe}class Fe extends G{constructor(){super({type:"date",check(e){return so(e)&&!isNaN(e.getTime())}}),this.withMutation(()=>{this.transform((e,r)=>!this.spec.coerce||this.isType(e)||e===null?e:(e=Yu(e),isNaN(e)?Fe.INVALID_DATE:new Date(e)))})}prepareParam(e,r){let n;if(ce.isRef(e))n=e;else{let i=this.cast(e);if(!this._typeCheck(i))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=i}return n}min(e,r=ct.min){let n=this.prepareParam(e,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(i){return i>=this.resolve(n)}})}max(e,r=ct.max){let n=this.prepareParam(e,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(i){return i<=this.resolve(n)}})}}Fe.INVALID_DATE=rn;nn.prototype=Fe.prototype;nn.INVALID_DATE=rn;function uo(t,e=[]){let r=[],n=new Set,i=new Set(e.map(([s,o])=>`${s}-${o}`));function a(s,o){let l=ie.split(s)[0];n.add(l),i.has(`${o}-${l}`)||r.push([o,l])}for(const s of Object.keys(t)){let o=t[s];n.add(s),ce.isRef(o)&&o.isSibling?a(o.path,s):_t(o)&&"deps"in o&&o.deps.forEach(l=>a(l,s))}return Du.array(Array.from(n),r).reverse()}function dr(t,e){let r=1/0;return t.some((n,i)=>{var a;if((a=e.path)!=null&&a.includes(n))return r=i,!0}),r}function an(t){return(e,r)=>dr(t,e)-dr(t,r)}const oo=(t,e,r)=>{if(typeof t!="string")return t;let n=t;try{n=JSON.parse(t)}catch{}return r.isType(n)?n:t};function ke(t){if("fields"in t){const e={};for(const[r,n]of Object.entries(t.fields))e[r]=ke(n);return t.setFields(e)}if(t.type==="array"){const e=t.optional();return e.innerType&&(e.innerType=ke(e.innerType)),e}return t.type==="tuple"?t.optional().clone({types:t.spec.types.map(ke)}):"optional"in t?t.optional():t}const lo=(t,e)=>{const r=[...ie.normalizePath(e)];if(r.length===1)return r[0]in t;let n=r.pop(),i=ie.getter(ie.join(r),!0)(t);return!!(i&&n in i)};let hr=t=>Object.prototype.toString.call(t)==="[object Object]";function pr(t,e){let r=Object.keys(t.fields);return Object.keys(e).filter(n=>r.indexOf(n)===-1)}const co=an([]);function fo(t){return new sn(t)}class sn extends G{constructor(e){super({type:"object",check(r){return hr(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=co,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{e&&this.shape(e)})}_cast(e,r={}){var n;let i=super._cast(e,r);if(i===void 0)return this.getDefault(r);if(!this._typeCheck(i))return i;let a=this.fields,s=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,o=[].concat(this._nodes,Object.keys(i).filter(y=>!this._nodes.includes(y))),l={},f=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),h=!1;for(const y of o){let c=a[y],v=y in i,w=i[y];if(c){let S;f.path=(r.path?`${r.path}.`:"")+y,c=c.resolve({value:w,context:r.context,parent:l});let $=c instanceof G?c.spec:void 0,d=$?.strict;if($!=null&&$.strip){h=h||y in i;continue}S=!r.__validating||!d?c.cast(w,f):w,S!==void 0&&(l[y]=S)}else v&&!s&&(l[y]=w);(v!==y in l||l[y]!==w)&&(h=!0)}return h?l:i}_validate(e,r={},n,i){let{from:a=[],originalValue:s=e,recursive:o=this.spec.recursive}=r;r.from=[{schema:this,value:s},...a],r.__validating=!0,r.originalValue=s,super._validate(e,r,n,(l,f)=>{if(!o||!hr(f)){i(l,f);return}s=s||f;let h=[];for(let y of this._nodes){let c=this.fields[y];!c||ce.isRef(c)||h.push(c.asNestedTest({options:r,key:y,parent:f,parentPath:r.path,originalParent:s}))}this.runTests({tests:h,value:f,originalValue:s,options:r},n,y=>{i(y.sort(this._sortErrors).concat(l),f)})})}clone(e){const r=super.clone(e);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(e){let r=super.concat(e),n=r.fields;for(let[i,a]of Object.entries(this.fields)){const s=n[i];n[i]=s===void 0?a:s}return r.withMutation(i=>i.setFields(n,[...this._excludedEdges,...e._excludedEdges]))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var i;const a=this.fields[n];let s=e;(i=s)!=null&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[n]})),r[n]=a&&"getDefault"in a?a.getDefault(s):void 0}),r}setFields(e,r){let n=this.clone();return n.fields=e,n._nodes=uo(e,r),n._sortErrors=an(Object.keys(e)),r&&(n._excludedEdges=r),n}shape(e,r=[]){return this.clone().withMutation(n=>{let i=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),i=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,e),i)})}partial(){const e={};for(const[r,n]of Object.entries(this.fields))e[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(e)}deepPartial(){return ke(this)}pick(e){const r={};for(const n of e)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,i])=>e.includes(n)&&e.includes(i)))}omit(e){const r=[];for(const n of Object.keys(this.fields))e.includes(n)||r.push(n);return this.pick(r)}from(e,r,n){let i=ie.getter(e,!0);return this.transform(a=>{if(!a)return a;let s=a;return lo(a,e)&&(s=Object.assign({},a),n||delete s[e],s[r]=i(a)),s})}json(){return this.transform(oo)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||Re.exact,test(r){if(r==null)return!0;const n=pr(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,r=Re.noUnknown){typeof e!="boolean"&&(r=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(i){if(i==null)return!0;const a=pr(this.schema,i);return!e||a.length===0||this.createError({params:{unknown:a.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,r=Re.noUnknown){return this.noUnknown(!e,r)}transformKeys(e){return this.transform(r=>{if(!r)return r;const n={};for(const i of Object.keys(r))n[e(i)]=r[i];return n})}camelCase(){return this.transformKeys(nt.camelCase)}snakeCase(){return this.transformKeys(nt.snakeCase)}constantCase(){return this.transformKeys(e=>nt.snakeCase(e).toUpperCase())}describe(e){const r=(e?this.resolve(e):this).clone(),n=super.describe(e);n.fields={};for(const[a,s]of Object.entries(r.fields)){var i;let o=e;(i=o)!=null&&i.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[a]})),n.fields[a]=s.describe(o)}return n}}fo.prototype=sn.prototype;const go=br(gr.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2zM18 4h-2.5l-.71-.71c-.18-.18-.44-.29-.7-.29H9.91c-.26 0-.52.11-.7.29L8.5 4H6c-.55 0-1 .45-1 1s.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1"})),bo=br(gr.jsx("path",{d:"M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1"}));export{bo as A,go as D,Zu as a,ao as b,fo as c,nn as d,yo as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as v,v as s}from"./index-CtPqstFl.js";import{t as D,v as G,R as A,u as H,x as W,y as i,z as q,s as x,F as J,D as K,A as Q,I as X,C as Y}from"./playground-Hl52p9f5.js";import{a as Z}from"./toast-CsAH5FIf.js";function _(o){return D("MuiButton",o)}const d=G("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),oo=v.createContext({}),ao=v.createContext(void 0),to=o=>{const{color:a,disableElevation:t,fullWidth:n,size:p,variant:c,loading:u,loadingPosition:S,classes:y}=o,b={root:["root",u&&"loading",c,`${c}${i(a)}`,`size${i(p)}`,`${c}Size${i(p)}`,`color${i(a)}`,t&&"disableElevation",n&&"fullWidth",u&&`loadingPosition${i(S)}`],startIcon:["icon","startIcon",`iconSize${i(p)}`],endIcon:["icon","endIcon",`iconSize${i(p)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},f=q(b,_,y);return{...y,...f}},L=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],no=x(J,{shouldForwardProp:o=>K(o)||o==="classes",name:"MuiButton",slot:"Root",overridesResolver:(o,a)=>{const{ownerState:t}=o;return[a.root,a[t.variant],a[`${t.variant}${i(t.color)}`],a[`size${i(t.size)}`],a[`${t.variant}Size${i(t.size)}`],t.color==="inherit"&&a.colorInherit,t.disableElevation&&a.disableElevation,t.fullWidth&&a.fullWidth,t.loading&&a.loading]}})(Q(({theme:o})=>{const a=o.palette.mode==="light"?o.palette.grey[300]:o.palette.grey[800],t=o.palette.mode==="light"?o.palette.grey.A100:o.palette.grey[700];return{...o.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(o.vars||o).shape.borderRadius,transition:o.transitions.create(["background-color","box-shadow","border-color","color"],{duration:o.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${d.disabled}`]:{color:(o.vars||o).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(o.vars||o).shadows[2],"&:hover":{boxShadow:(o.vars||o).shadows[4],"@media (hover: none)":{boxShadow:(o.vars||o).shadows[2]}},"&:active":{boxShadow:(o.vars||o).shadows[8]},[`&.${d.focusVisible}`]:{boxShadow:(o.vars||o).shadows[6]},[`&.${d.disabled}`]:{color:(o.vars||o).palette.action.disabled,boxShadow:(o.vars||o).shadows[0],backgroundColor:(o.vars||o).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${d.disabled}`]:{border:`1px solid ${(o.vars||o).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(o.palette).filter(X()).map(([n])=>({props:{color:n},style:{"--variant-textColor":(o.vars||o).palette[n].main,"--variant-outlinedColor":(o.vars||o).palette[n].main,"--variant-outlinedBorder":o.alpha((o.vars||o).palette[n].main,.5),"--variant-containedColor":(o.vars||o).palette[n].contrastText,"--variant-containedBg":(o.vars||o).palette[n].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(o.vars||o).palette[n].dark,"--variant-textBg":o.alpha((o.vars||o).palette[n].main,(o.vars||o).palette.action.hoverOpacity),"--variant-outlinedBorder":(o.vars||o).palette[n].main,"--variant-outlinedBg":o.alpha((o.vars||o).palette[n].main,(o.vars||o).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":o.vars?o.vars.palette.Button.inheritContainedBg:a,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":o.vars?o.vars.palette.Button.inheritContainedHoverBg:t,"--variant-textBg":o.alpha((o.vars||o).palette.text.primary,(o.vars||o).palette.action.hoverOpacity),"--variant-outlinedBg":o.alpha((o.vars||o).palette.text.primary,(o.vars||o).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:o.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:o.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:o.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:o.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:o.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:o.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${d.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${d.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:o.transitions.create(["background-color","box-shadow","border-color"],{duration:o.transitions.duration.short}),[`&.${d.loading}`]:{color:"transparent"}}}]}})),io=x("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(o,a)=>{const{ownerState:t}=o;return[a.startIcon,t.loading&&a.startIconLoadingStart,a[`iconSize${i(t.size)}`]]}})(({theme:o})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:o.transitions.create(["opacity"],{duration:o.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...L]})),ro=x("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(o,a)=>{const{ownerState:t}=o;return[a.endIcon,t.loading&&a.endIconLoadingEnd,a[`iconSize${i(t.size)}`]]}})(({theme:o})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:o.transitions.create(["opacity"],{duration:o.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...L]})),so=x("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:o})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(o.vars||o).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),E=x("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),co=v.forwardRef(function(a,t){const n=v.useContext(oo),p=v.useContext(ao),c=A(n,a),u=H({props:c,name:"MuiButton"}),{children:S,color:y="primary",component:b="button",className:f,disabled:z=!1,disableElevation:m=!1,disableFocusRipple:I=!1,endIcon:B,focusVisibleClassName:M,fullWidth:N=!1,id:C,loading:e=null,loadingIndicator:k,loadingPosition:g="center",size:j="medium",startIcon:P,type:h,variant:T="text",...V}=u,w=Z(C),$=k??s.jsx(Y,{"aria-labelledby":w,color:"inherit",size:16}),l={...u,color:y,component:b,disabled:z,disableElevation:m,disableFocusRipple:I,fullWidth:N,loading:e,loadingIndicator:$,loadingPosition:g,size:j,type:h,variant:T},r=to(l),F=(P||e&&g==="start")&&s.jsx(io,{className:r.startIcon,ownerState:l,children:P||s.jsx(E,{className:r.loadingIconPlaceholder,ownerState:l})}),O=(B||e&&g==="end")&&s.jsx(ro,{className:r.endIcon,ownerState:l,children:B||s.jsx(E,{className:r.loadingIconPlaceholder,ownerState:l})}),U=p||"",R=typeof e=="boolean"?s.jsx("span",{className:r.loadingWrapper,style:{display:"contents"},children:e&&s.jsx(so,{className:r.loadingIndicator,ownerState:l,children:$})}):null;return s.jsxs(no,{ownerState:l,className:W(n.className,r.root,f,U),component:b,disabled:z||e,focusRipple:!I,focusVisibleClassName:W(r.focusVisible,M),ref:t,type:h,id:e?w:C,...V,classes:r,children:[F,g!=="end"&&R,S,g==="end"&&R,O]})});export{co as B};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Q as h,R as W,S as v,x as k,y as c,z as R,U as P,t as G,u as S,s as T}from"./playground-Hl52p9f5.js";import{b as $,v as M}from"./index-CtPqstFl.js";const y=h();function U(o){const{theme:t,name:s,props:n}=o;return!t||!t.components||!t.components[s]||!t.components[s].defaultProps?n:W(t.components[s].defaultProps,n)}function j({props:o,name:t,defaultTheme:s,themeId:n}){let i=v(s);return n&&(i=i[n]||i),U({theme:i,name:t,props:o})}const z=P(),L=y("div",{name:"MuiContainer",slot:"Root",overridesResolver:(o,t)=>{const{ownerState:s}=o;return[t.root,t[`maxWidth${c(String(s.maxWidth))}`],s.fixed&&t.fixed,s.disableGutters&&t.disableGutters]}}),N=o=>j({props:o,name:"MuiContainer",defaultTheme:z}),D=(o,t)=>{const s=r=>G(t,r),{classes:n,fixed:i,disableGutters:l,maxWidth:e}=o,a={root:["root",e&&`maxWidth${c(String(e))}`,i&&"fixed",l&&"disableGutters"]};return R(a,s,n)};function E(o={}){const{createStyledComponent:t=L,useThemeProps:s=N,componentName:n="MuiContainer"}=o,i=t(({theme:e,ownerState:a})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",...!a.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}}),({theme:e,ownerState:a})=>a.fixed&&Object.keys(e.breakpoints.values).reduce((r,p)=>{const u=p,d=e.breakpoints.values[u];return d!==0&&(r[e.breakpoints.up(u)]={maxWidth:`${d}${e.breakpoints.unit}`}),r},{}),({theme:e,ownerState:a})=>({...a.maxWidth==="xs"&&{[e.breakpoints.up("xs")]:{maxWidth:Math.max(e.breakpoints.values.xs,444)}},...a.maxWidth&&a.maxWidth!=="xs"&&{[e.breakpoints.up(a.maxWidth)]:{maxWidth:`${e.breakpoints.values[a.maxWidth]}${e.breakpoints.unit}`}}}));return $.forwardRef(function(a,r){const p=s(a),{className:u,component:d="div",disableGutters:x=!1,fixed:f=!1,maxWidth:b="lg",classes:w,...g}=p,m={...p,component:d,disableGutters:x,fixed:f,maxWidth:b},C=D(m,n);return M.jsx(i,{as:d,ownerState:m,className:k(C.root,u),ref:r,...g})})}const q=E({createStyledComponent:T("div",{name:"MuiContainer",slot:"Root",overridesResolver:(o,t)=>{const{ownerState:s}=o;return[t.root,t[`maxWidth${c(String(s.maxWidth))}`],s.fixed&&t.fixed,s.disableGutters&&t.disableGutters]}}),useThemeProps:o=>S({props:o,name:"MuiContainer"})});export{q as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as y,v as g}from"./index-CtPqstFl.js";import{u as A,x as D,z as R,s as f,A as b}from"./playground-Hl52p9f5.js";import{g as C}from"./dividerClasses-CIiqeEPO.js";const L=i=>{const{absolute:t,children:r,classes:n,flexItem:s,light:l,orientation:e,textAlign:o,variant:a}=i;return R({root:["root",t&&"absolute",a,l&&"light",e==="vertical"&&"vertical",s&&"flexItem",r&&"withChildren",r&&e==="vertical"&&"withChildrenVertical",o==="right"&&e!=="vertical"&&"textAlignRight",o==="left"&&e!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",e==="vertical"&&"wrapperVertical"]},C,n)},S=f("div",{name:"MuiDivider",slot:"Root",overridesResolver:(i,t)=>{const{ownerState:r}=i;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,r.orientation==="vertical"&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&r.orientation==="vertical"&&t.withChildrenVertical,r.textAlign==="right"&&r.orientation!=="vertical"&&t.textAlignRight,r.textAlign==="left"&&r.orientation!=="vertical"&&t.textAlignLeft]}})(b(({theme:i})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(i.vars||i).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:i.alpha((i.vars||i).palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:i.spacing(2),marginRight:i.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:i.spacing(1),marginBottom:i.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:t})=>!!t.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:t})=>t.children&&t.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(i.vars||i).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:t})=>t.orientation==="vertical"&&t.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(i.vars||i).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:t})=>t.textAlign==="right"&&t.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:t})=>t.textAlign==="left"&&t.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),W=f("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(i,t)=>{const{ownerState:r}=i;return[t.wrapper,r.orientation==="vertical"&&t.wrapperVertical]}})(b(({theme:i})=>({display:"inline-block",paddingLeft:`calc(${i.spacing(1)} * 1.2)`,paddingRight:`calc(${i.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${i.spacing(1)} * 1.2)`,paddingBottom:`calc(${i.spacing(1)} * 1.2)`}}]}))),h=y.forwardRef(function(t,r){const n=A({props:t,name:"MuiDivider"}),{absolute:s=!1,children:l,className:e,orientation:o="horizontal",component:a=l||o==="vertical"?"div":"hr",flexItem:d=!1,light:u=!1,role:p=a!=="hr"?"separator":void 0,textAlign:x="center",variant:m="fullWidth",...w}=n,c={...n,absolute:s,component:a,flexItem:d,light:u,orientation:o,role:p,textAlign:x,variant:m},v=L(c);return g.jsx(S,{as:a,className:D(v.root,e),role:p,ref:r,ownerState:c,"aria-orientation":p==="separator"&&(a!=="hr"||o==="vertical")?o:void 0,...w,children:l?g.jsx(W,{className:v.wrapper,ownerState:c,children:l}):null})});h&&(h.muiSkipListHighlight=!0);export{h as D};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as o,v as u}from"./index-CtPqstFl.js";import{t as x,v as f,u as h,x as L,z as v,s as y}from"./playground-Hl52p9f5.js";function U(s,e){return o.isValidElement(s)&&e.indexOf(s.type.muiName??s.type?._payload?.value?.muiName)!==-1}const C=o.createContext({});function M(s){return x("MuiList",s)}f("MuiList",["root","padding","dense","subheader"]);const P=s=>{const{classes:e,disablePadding:t,dense:a,subheader:i}=s;return v({root:["root",!t&&"padding",a&&"dense",i&&"subheader"]},M,e)},R=y("ul",{name:"MuiList",slot:"Root",overridesResolver:(s,e)=>{const{ownerState:t}=s;return[e.root,!t.disablePadding&&e.padding,t.dense&&e.dense,t.subheader&&e.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:s})=>!s.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:s})=>s.subheader,style:{paddingTop:0}}]}),j=o.forwardRef(function(e,t){const a=h({props:e,name:"MuiList"}),{children:i,className:r,component:d="ul",dense:n=!1,disablePadding:p=!1,subheader:c,...m}=a,g=o.useMemo(()=>({dense:n}),[n]),l={...a,component:d,dense:n,disablePadding:p},b=P(l);return u.jsx(C.Provider,{value:g,children:u.jsxs(R,{as:d,className:L(b.root,r),ref:t,ownerState:l,...m,children:[c,i]})})});export{j as L,C as a,U as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as l,v as c}from"./index-CtPqstFl.js";import{t as z,v as H,u as O,E as tt,m as J,x as h,z as D,s as G,F as et,D as st,A as K,w as U,G as Y,d as k,H as q}from"./playground-Hl52p9f5.js";import{a as C,i as ot}from"./List-juBjUmfP.js";import{g as nt,l as F}from"./listItemTextClasses-EQFLPLzt.js";function rt(t){return z("MuiListItem",t)}H("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);function at(t){return z("MuiListItemButton",t)}const R=H("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),it=(t,e)=>{const{ownerState:s}=t;return[e.root,s.dense&&e.dense,s.alignItems==="flex-start"&&e.alignItemsFlexStart,s.divider&&e.divider,!s.disableGutters&&e.gutters]},dt=t=>{const{alignItems:e,classes:s,dense:o,disabled:n,disableGutters:a,divider:r,selected:i}=t,f=D({root:["root",o&&"dense",!a&&"gutters",r&&"divider",n&&"disabled",e==="flex-start"&&"alignItemsFlexStart",i&&"selected"]},at,s);return{...s,...f}},lt=G(et,{shouldForwardProp:t=>st(t)||t==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:it})(K(({theme:t})=>({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${R.selected}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity),[`&.${R.focusVisible}`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.focusOpacity}`)}},[`&.${R.selected}:hover`]:{backgroundColor:t.alpha((t.vars||t).palette.primary.main,`${(t.vars||t).palette.action.selectedOpacity} + ${(t.vars||t).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:t.alpha((t.vars||t).palette.primary.main,(t.vars||t).palette.action.selectedOpacity)}},[`&.${R.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${R.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity},variants:[{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.dense,style:{paddingTop:4,paddingBottom:4}}]}))),Lt=l.forwardRef(function(e,s){const o=O({props:e,name:"MuiListItemButton"}),{alignItems:n="center",autoFocus:a=!1,component:r="div",children:i,dense:p=!1,disableGutters:f=!1,divider:S=!1,focusVisibleClassName:A,selected:w=!1,className:L,...u}=o,x=l.useContext(C),m=l.useMemo(()=>({dense:p||x.dense||!1,alignItems:n,disableGutters:f}),[n,x.dense,p,f]),d=l.useRef(null);tt(()=>{a&&d.current&&d.current.focus()},[a]);const y={...o,alignItems:n,dense:m.dense,disableGutters:f,divider:S,selected:w},g=dt(y),b=J(d,s);return c.jsx(C.Provider,{value:m,children:c.jsx(lt,{ref:b,href:u.href||u.to,component:(u.href||u.to)&&r==="div"?"button":r,focusVisibleClassName:h(g.focusVisible,A),ownerState:y,className:h(g.root,L),...u,classes:g,children:i})})});function ct(t){return z("MuiListItemSecondaryAction",t)}H("MuiListItemSecondaryAction",["root","disableGutters"]);const pt=t=>{const{disableGutters:e,classes:s}=t;return D({root:["root",e&&"disableGutters"]},ct,s)},ut=G("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:s}=t;return[e.root,s.disableGutters&&e.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:t})=>t.disableGutters,style:{right:0}}]}),Q=l.forwardRef(function(e,s){const o=O({props:e,name:"MuiListItemSecondaryAction"}),{className:n,...a}=o,r=l.useContext(C),i={...o,disableGutters:r.disableGutters},p=pt(i);return c.jsx(ut,{className:h(p.root,n),ownerState:i,ref:s,...a})});Q.muiName="ListItemSecondaryAction";const mt=(t,e)=>{const{ownerState:s}=t;return[e.root,s.dense&&e.dense,s.alignItems==="flex-start"&&e.alignItemsFlexStart,s.divider&&e.divider,!s.disableGutters&&e.gutters,!s.disablePadding&&e.padding,s.hasSecondaryAction&&e.secondaryAction]},yt=t=>{const{alignItems:e,classes:s,dense:o,disableGutters:n,disablePadding:a,divider:r,hasSecondaryAction:i}=t;return D({root:["root",o&&"dense",!n&&"gutters",!a&&"padding",r&&"divider",e==="flex-start"&&"alignItemsFlexStart",i&&"secondaryAction"],container:["container"],secondaryAction:["secondaryAction"]},rt,s)},gt=G("div",{name:"MuiListItem",slot:"Root",overridesResolver:mt})(K(({theme:t})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${R.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>e.button,style:{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:e})=>e.hasSecondaryAction,style:{paddingRight:48}}]}))),ft=G("li",{name:"MuiListItem",slot:"Container"})({position:"relative"}),Pt=l.forwardRef(function(e,s){const o=O({props:e,name:"MuiListItem"}),{alignItems:n="center",children:a,className:r,component:i,components:p={},componentsProps:f={},ContainerComponent:S="li",ContainerProps:{className:A,...w}={},dense:L=!1,disableGutters:u=!1,disablePadding:x=!1,divider:m=!1,secondaryAction:d,slotProps:y={},slots:g={},...b}=o,M=l.useContext(C),T=l.useMemo(()=>({dense:L||M.dense||!1,alignItems:n,disableGutters:u}),[n,M.dense,L,u]),E=l.useRef(null),v=l.Children.toArray(a),N=v.length&&ot(v[v.length-1],["ListItemSecondaryAction"]),I={...o,alignItems:n,dense:T.dense,disableGutters:u,disablePadding:x,divider:m,hasSecondaryAction:N},V=yt(I),W=J(E,s),X={slots:g,slotProps:y},[Z,_]=U("secondaryAction",{elementType:Q,externalForwardedProps:X,ownerState:I,className:V.secondaryAction}),j=g.root||p.Root||gt,$=y.root||f.root||{},B={className:h(V.root,$.className,r),...b};let P=i||"li";return N?(P=!B.component&&!i?"div":P,S==="li"&&(P==="li"?P="div":B.component==="li"&&(B.component="div")),c.jsx(C.Provider,{value:T,children:c.jsxs(ft,{as:S,className:h(V.container,A),ref:W,ownerState:I,...w,children:[c.jsx(j,{...$,...!Y(j)&&{as:P,ownerState:{...I,...$.ownerState}},...B,children:v}),v.pop()]})})):c.jsx(C.Provider,{value:T,children:c.jsxs(j,{...$,as:P,ref:W,...!Y(j)&&{ownerState:{...I,...$.ownerState}},...B,children:[v,d&&c.jsx(Z,{..._,children:d})]})})}),vt=t=>{const{classes:e,inset:s,primary:o,secondary:n,dense:a}=t;return D({root:["root",s&&"inset",a&&"dense",o&&n&&"multiline"],primary:["primary"],secondary:["secondary"]},nt,e)},xt=G("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:s}=t;return[{[`& .${F.primary}`]:e.primary},{[`& .${F.secondary}`]:e.secondary},e.root,s.inset&&e.inset,s.primary&&s.secondary&&e.multiline,s.dense&&e.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${q.root}:where(& .${F.primary}), .${q.root}:where(& .${F.secondary})`]:{display:"block"},variants:[{props:({ownerState:t})=>t.primary&&t.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:t})=>t.inset,style:{paddingLeft:56}}]}),Rt=l.forwardRef(function(e,s){const o=O({props:e,name:"MuiListItemText"}),{children:n,className:a,disableTypography:r=!1,inset:i=!1,primary:p,primaryTypographyProps:f,secondary:S,secondaryTypographyProps:A,slots:w={},slotProps:L={},...u}=o,{dense:x}=l.useContext(C);let m=p??n,d=S;const y={...o,disableTypography:r,inset:i,primary:!!m,secondary:!!d,dense:x},g=vt(y),b={slots:w,slotProps:{primary:f,secondary:A,...L}},[M,T]=U("root",{className:h(g.root,a),elementType:xt,externalForwardedProps:{...b,...u},ownerState:y,ref:s}),[E,v]=U("primary",{className:g.primary,elementType:k,externalForwardedProps:b,ownerState:y}),[N,I]=U("secondary",{className:g.secondary,elementType:k,externalForwardedProps:b,ownerState:y});return m!=null&&m.type!==k&&!r&&(m=c.jsx(E,{variant:x?"body2":"body1",component:v?.variant?void 0:"span",...v,children:m})),d!=null&&d.type!==k&&!r&&(d=c.jsx(N,{variant:"body2",color:"textSecondary",...I,children:d})),c.jsxs(M,{...T,children:[m,d]})});export{Pt as L,Lt as a,Rt as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as d,v as m}from"./index-CtPqstFl.js";import{t as S,v as T,u as V,E,m as F,x as y,z as P,s as j,F as D,D as G,A as L}from"./playground-Hl52p9f5.js";import{a as x}from"./List-juBjUmfP.js";import{l as C}from"./listItemIconClasses-39Itzgzt.js";import{l as I}from"./listItemTextClasses-EQFLPLzt.js";import{d as $}from"./dividerClasses-CIiqeEPO.js";function N(s){return S("MuiMenuItem",s)}const i=T("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),U=(s,e)=>{const{ownerState:o}=s;return[e.root,o.dense&&e.dense,o.divider&&e.divider,!o.disableGutters&&e.gutters]},z=s=>{const{disabled:e,dense:o,divider:t,disableGutters:n,selected:l,classes:a}=s,r=P({root:["root",o&&"dense",e&&"disabled",!n&&"gutters",t&&"divider",l&&"selected"]},N,a);return{...a,...r}},H=j(D,{shouldForwardProp:s=>G(s)||s==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:U})(L(({theme:s})=>({...s.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(s.vars||s).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${i.selected}`]:{backgroundColor:s.alpha((s.vars||s).palette.primary.main,(s.vars||s).palette.action.selectedOpacity),[`&.${i.focusVisible}`]:{backgroundColor:s.alpha((s.vars||s).palette.primary.main,`${(s.vars||s).palette.action.selectedOpacity} + ${(s.vars||s).palette.action.focusOpacity}`)}},[`&.${i.selected}:hover`]:{backgroundColor:s.alpha((s.vars||s).palette.primary.main,`${(s.vars||s).palette.action.selectedOpacity} + ${(s.vars||s).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:s.alpha((s.vars||s).palette.primary.main,(s.vars||s).palette.action.selectedOpacity)}},[`&.${i.focusVisible}`]:{backgroundColor:(s.vars||s).palette.action.focus},[`&.${i.disabled}`]:{opacity:(s.vars||s).palette.action.disabledOpacity},[`& + .${$.root}`]:{marginTop:s.spacing(1),marginBottom:s.spacing(1)},[`& + .${$.inset}`]:{marginLeft:52},[`& .${I.root}`]:{marginTop:0,marginBottom:0},[`& .${I.inset}`]:{paddingLeft:36},[`& .${C.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(s.vars||s).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[s.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...s.typography.body2,[`& .${C.root} svg`]:{fontSize:"1.25rem"}}}]}))),X=d.forwardRef(function(e,o){const t=V({props:e,name:"MuiMenuItem"}),{autoFocus:n=!1,component:l="li",dense:a=!1,divider:u=!1,disableGutters:r=!1,focusVisibleClassName:M,role:k="menuitem",tabIndex:f,className:R,...w}=t,v=d.useContext(x),g=d.useMemo(()=>({dense:a||v.dense||!1,disableGutters:r}),[v.dense,a,r]),c=d.useRef(null);E(()=>{n&&c.current&&c.current.focus()},[n]);const B={...t,dense:g.dense,divider:u,disableGutters:r},p=z(t),O=F(c,o);let b;return t.disabled||(b=f!==void 0?f:-1),m.jsx(x.Provider,{value:g,children:m.jsx(H,{ref:O,role:k,tabIndex:b,component:l,focusVisibleClassName:y(p.focusVisible,M),className:y(p.root,R),...w,ownerState:B,classes:p})})});export{X as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as a,f as he,v as w}from"./index-CtPqstFl.js";import{J as S,m as Y,n as ie,E as Q,L as Z,$ as me,t as be,v as ge,u as Ee,w as _,x as ee,s as ae,h as xe,z as Re,A as ye}from"./playground-Hl52p9f5.js";function te(...e){return e.reduce((t,o)=>o==null?t:function(...s){t.apply(this,s),o.apply(this,s)},()=>{})}function $(e){return S(e).defaultView||window}function ne(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Te(e){return typeof e=="function"?e():e}const Pe=a.forwardRef(function(t,o){const{children:n,container:s,disablePortal:r=!1}=t,[i,c]=a.useState(null),u=Y(a.isValidElement(n)?ie(n):null,o);if(Q(()=>{r||c(Te(s)||document.body)},[s,r]),Q(()=>{if(i&&!r)return ne(o,i),()=>{ne(o,null)}},[o,i,r]),r){if(a.isValidElement(n)){const g={ref:u};return a.cloneElement(n,g)}return n}return i&&he.createPortal(n,i)});function ve(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function ke(e){const t=S(e);return t.body===e?$(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function D(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function oe(e){return parseFloat($(e).getComputedStyle(e).paddingRight)||0}function Ie(e){const o=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),n=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return o||n}function re(e,t,o,n,s){const r=[t,o,...n];[].forEach.call(e.children,i=>{const c=!r.includes(i),u=!Ie(i);c&&u&&D(i,s)})}function V(e,t){let o=-1;return e.some((n,s)=>t(n)?(o=s,!0):!1),o}function we(e,t){const o=[],n=e.container;if(!t.disableScrollLock){if(ke(n)){const i=ve($(n));o.push({value:n.style.paddingRight,property:"padding-right",el:n}),n.style.paddingRight=`${oe(n)+i}px`;const c=S(n).querySelectorAll(".mui-fixed");[].forEach.call(c,u=>{o.push({value:u.style.paddingRight,property:"padding-right",el:u}),u.style.paddingRight=`${oe(u)+i}px`})}let r;if(n.parentNode instanceof DocumentFragment)r=S(n).body;else{const i=n.parentElement,c=$(n);r=i?.nodeName==="HTML"&&c.getComputedStyle(i).overflowY==="scroll"?i:n}o.push({value:r.style.overflow,property:"overflow",el:r},{value:r.style.overflowX,property:"overflow-x",el:r},{value:r.style.overflowY,property:"overflow-y",el:r}),r.style.overflow="hidden"}return()=>{o.forEach(({value:r,el:i,property:c})=>{r?i.style.setProperty(c,r):i.style.removeProperty(c)})}}function Se(e){const t=[];return[].forEach.call(e.children,o=>{o.getAttribute("aria-hidden")==="true"&&t.push(o)}),t}class Ne{constructor(){this.modals=[],this.containers=[]}add(t,o){let n=this.modals.indexOf(t);if(n!==-1)return n;n=this.modals.length,this.modals.push(t),t.modalRef&&D(t.modalRef,!1);const s=Se(o);re(o,t.mount,t.modalRef,s,!0);const r=V(this.containers,i=>i.container===o);return r!==-1?(this.containers[r].modals.push(t),n):(this.containers.push({modals:[t],container:o,restore:null,hiddenSiblings:s}),n)}mount(t,o){const n=V(this.containers,r=>r.modals.includes(t)),s=this.containers[n];s.restore||(s.restore=we(s,o))}remove(t,o=!0){const n=this.modals.indexOf(t);if(n===-1)return n;const s=V(this.containers,i=>i.modals.includes(t)),r=this.containers[s];if(r.modals.splice(r.modals.indexOf(t),1),this.modals.splice(n,1),r.modals.length===0)r.restore&&r.restore(),t.modalRef&&D(t.modalRef,o),re(r.container,t.mount,t.modalRef,r.hiddenSiblings,!1),this.containers.splice(s,1);else{const i=r.modals[r.modals.length-1];i.modalRef&&D(i.modalRef,!1)}return n}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function K(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}const Ce=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Me(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function Fe(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=n=>e.ownerDocument.querySelector(`input[type="radio"]${n}`);let o=t(`[name="${e.name}"]:checked`);return o||(o=t(`[name="${e.name}"]`)),o!==e}function Ae(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||Fe(e))}function Oe(e){const t=[],o=[];return Array.from(e.querySelectorAll(Ce)).forEach((n,s)=>{const r=Me(n);r===-1||!Ae(n)||(r===0?t.push(n):o.push({documentOrder:s,tabIndex:r,node:n}))}),o.sort((n,s)=>n.tabIndex===s.tabIndex?n.documentOrder-s.documentOrder:n.tabIndex-s.tabIndex).map(n=>n.node).concat(t)}function De(){return!0}function Le(e){const{children:t,disableAutoFocus:o=!1,disableEnforceFocus:n=!1,disableRestoreFocus:s=!1,getTabbable:r=Oe,isEnabled:i=De,open:c}=e,u=a.useRef(!1),g=a.useRef(null),P=a.useRef(null),E=a.useRef(null),R=a.useRef(null),h=a.useRef(!1),f=a.useRef(null),N=Y(ie(t),f),k=a.useRef(null);a.useEffect(()=>{!c||!f.current||(h.current=!o)},[o,c]),a.useEffect(()=>{if(!c||!f.current)return;const d=S(f.current),m=K(d);return f.current.contains(m)||(f.current.hasAttribute("tabIndex")||f.current.setAttribute("tabIndex","-1"),h.current&&f.current.focus()),()=>{s||(E.current&&E.current.focus&&(u.current=!0,E.current.focus()),E.current=null)}},[c]),a.useEffect(()=>{if(!c||!f.current)return;const d=S(f.current),m=b=>{if(k.current=b,n||!i()||b.key!=="Tab")return;K(d)===f.current&&b.shiftKey&&(u.current=!0,P.current&&P.current.focus())},v=()=>{const b=f.current;if(b===null)return;const T=K(d);if(!d.hasFocus()||!i()||u.current){u.current=!1;return}if(b.contains(T)||n&&T!==g.current&&T!==P.current)return;if(T!==R.current)R.current=null;else if(R.current!==null)return;if(!h.current)return;let x=[];if((T===g.current||T===P.current)&&(x=r(f.current)),x.length>0){const F=!!(k.current?.shiftKey&&k.current?.key==="Tab"),C=x[0],L=x[x.length-1];typeof C!="string"&&typeof L!="string"&&(F?L.focus():C.focus())}else b.focus()};d.addEventListener("focusin",v),d.addEventListener("keydown",m,!0);const M=setInterval(()=>{const b=K(d);b&&b.tagName==="BODY"&&v()},50);return()=>{clearInterval(M),d.removeEventListener("focusin",v),d.removeEventListener("keydown",m,!0)}},[o,n,s,i,c,r]);const I=d=>{E.current===null&&(E.current=d.relatedTarget),h.current=!0,R.current=d.target;const m=t.props.onFocus;m&&m(d)},y=d=>{E.current===null&&(E.current=d.relatedTarget),h.current=!0};return w.jsxs(a.Fragment,{children:[w.jsx("div",{tabIndex:c?0:-1,onFocus:y,ref:g,"data-testid":"sentinelStart"}),a.cloneElement(t,{ref:N,onFocus:I}),w.jsx("div",{tabIndex:c?0:-1,onFocus:y,ref:P,"data-testid":"sentinelEnd"})]})}function He(e){return typeof e=="function"?e():e}function Be(e){return e?e.props.hasOwnProperty("in"):!1}const se=()=>{},U=new Ne;function Ke(e){const{container:t,disableEscapeKeyDown:o=!1,disableScrollLock:n=!1,closeAfterTransition:s=!1,onTransitionEnter:r,onTransitionExited:i,children:c,onClose:u,open:g,rootRef:P}=e,E=a.useRef({}),R=a.useRef(null),h=a.useRef(null),f=Y(h,P),[N,k]=a.useState(!g),I=Be(c);let y=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(y=!1);const d=()=>S(R.current),m=()=>(E.current.modalRef=h.current,E.current.mount=R.current,E.current),v=()=>{U.mount(m(),{disableScrollLock:n}),h.current&&(h.current.scrollTop=0)},M=Z(()=>{const p=He(t)||d().body;U.add(m(),p),h.current&&v()}),b=()=>U.isTopModal(m()),T=Z(p=>{R.current=p,p&&(g&&b()?v():h.current&&D(h.current,y))}),x=a.useCallback(()=>{U.remove(m(),y)},[y]);a.useEffect(()=>()=>{x()},[x]),a.useEffect(()=>{g?M():(!I||!s)&&x()},[g,x,I,s,M]);const F=p=>l=>{p.onKeyDown?.(l),!(l.key!=="Escape"||l.which===229||!b())&&(o||(l.stopPropagation(),u&&u(l,"escapeKeyDown")))},C=p=>l=>{p.onClick?.(l),l.target===l.currentTarget&&u&&u(l,"backdropClick")};return{getRootProps:(p={})=>{const l=me(e);delete l.onTransitionEnter,delete l.onTransitionExited;const H={...l,...p};return{role:"presentation",...H,onKeyDown:F(H),ref:f}},getBackdropProps:(p={})=>{const l=p;return{"aria-hidden":!0,...l,onClick:C(l),open:g}},getTransitionProps:()=>{const p=()=>{k(!1),r&&r()},l=()=>{k(!0),i&&i(),s&&x()};return{onEnter:te(p,c?.props.onEnter??se),onExited:te(l,c?.props.onExited??se)}},rootRef:f,portalRef:T,isTopModal:b,exited:N,hasTransition:I}}function Ue(e){return be("MuiModal",e)}ge("MuiModal",["root","hidden","backdrop"]);const $e=e=>{const{open:t,exited:o,classes:n}=e;return Re({root:["root",!t&&o&&"hidden"],backdrop:["backdrop"]},Ue,n)},je=ae("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:o}=e;return[t.root,!o.open&&o.exited&&t.hidden]}})(ye(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),We=ae(xe,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),Ye=a.forwardRef(function(t,o){const n=Ee({name:"MuiModal",props:t}),{BackdropComponent:s=We,BackdropProps:r,classes:i,className:c,closeAfterTransition:u=!1,children:g,container:P,component:E,components:R={},componentsProps:h={},disableAutoFocus:f=!1,disableEnforceFocus:N=!1,disableEscapeKeyDown:k=!1,disablePortal:I=!1,disableRestoreFocus:y=!1,disableScrollLock:d=!1,hideBackdrop:m=!1,keepMounted:v=!1,onClose:M,onTransitionEnter:b,onTransitionExited:T,open:x,slotProps:F={},slots:C={},theme:L,...q}=n,j={...n,closeAfterTransition:u,disableAutoFocus:f,disableEnforceFocus:N,disableEscapeKeyDown:k,disablePortal:I,disableRestoreFocus:y,disableScrollLock:d,hideBackdrop:m,keepMounted:v},{getRootProps:p,getBackdropProps:l,getTransitionProps:H,portalRef:ce,isTopModal:le,exited:G,hasTransition:J}=Ke({...j,rootRef:o}),A={...j,exited:G},W=$e(A),B={};if(g.props.tabIndex===void 0&&(B.tabIndex="-1"),J){const{onEnter:O,onExited:z}=H();B.onEnter=O,B.onExited=z}const X={slots:{root:R.Root,backdrop:R.Backdrop,...C},slotProps:{...h,...F}},[ue,de]=_("root",{ref:o,elementType:je,externalForwardedProps:{...X,...q,component:E},getSlotProps:p,ownerState:A,className:ee(c,W?.root,!A.open&&A.exited&&W?.hidden)}),[fe,pe]=_("backdrop",{ref:r?.ref,elementType:s,externalForwardedProps:X,shouldForwardComponentProp:!0,additionalProps:r,getSlotProps:O=>l({...O,onClick:z=>{O?.onClick&&O.onClick(z)}}),className:ee(r?.className,W?.backdrop),ownerState:A});return!v&&!x&&(!J||G)?null:w.jsx(Pe,{ref:ce,container:P,disablePortal:I,children:w.jsxs(ue,{...de,children:[!m&&s?w.jsx(fe,{...pe}):null,w.jsx(Le,{disableEnforceFocus:N,disableAutoFocus:f,disableRestoreFocus:y,isEnabled:le,open:x,children:a.cloneElement(g,B)})]})})});export{Ye as M,Pe as P,K as a,ve as g,$ as o};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as c,v as p}from"./index-CtPqstFl.js";import{t as y,v,u as f,x as C,z as T,s as x,A as k,y as g}from"./playground-Hl52p9f5.js";const D=c.createContext();function E(o){return y("MuiTable",o)}v("MuiTable",["root","stickyHeader"]);const W=o=>{const{classes:t,stickyHeader:e}=o;return T({root:["root",e&&"stickyHeader"]},E,t)},I=x("table",{name:"MuiTable",slot:"Root",overridesResolver:(o,t)=>{const{ownerState:e}=o;return[t.root,e.stickyHeader&&t.stickyHeader]}})(k(({theme:o})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...o.typography.body2,padding:o.spacing(2),color:(o.vars||o).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:t})=>t.stickyHeader,style:{borderCollapse:"separate"}}]}))),N="table",io=c.forwardRef(function(t,e){const s=f({props:t,name:"MuiTable"}),{className:n,component:a=N,padding:l="normal",size:r="medium",stickyHeader:i=!1,...u}=s,d={...s,component:a,padding:l,size:r,stickyHeader:i},w=W(d),H=c.useMemo(()=>({padding:l,size:r,stickyHeader:i}),[l,r,i]);return p.jsx(D.Provider,{value:H,children:p.jsx(I,{as:a,role:a===N?null:"table",ref:e,className:C(w.root,n),ownerState:d,...u})})}),M=c.createContext();function J(o){return y("MuiTableBody",o)}v("MuiTableBody",["root"]);const L=o=>{const{classes:t}=o;return T({root:["root"]},J,t)},X=x("tbody",{name:"MuiTableBody",slot:"Root"})({display:"table-row-group"}),q={variant:"body"},j="tbody",co=c.forwardRef(function(t,e){const s=f({props:t,name:"MuiTableBody"}),{className:n,component:a=j,...l}=s,r={...s,component:a},i=L(r);return p.jsx(M.Provider,{value:q,children:p.jsx(X,{className:C(i.root,n),as:a,ref:e,role:a===j?null:"rowgroup",ownerState:r,...l})})});function F(o){return y("MuiTableCell",o)}const G=v("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),K=o=>{const{classes:t,variant:e,align:s,padding:n,size:a,stickyHeader:l}=o,r={root:["root",e,l&&"stickyHeader",s!=="inherit"&&`align${g(s)}`,n!=="normal"&&`padding${g(n)}`,`size${g(a)}`]};return T(r,F,t)},Q=x("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(o,t)=>{const{ownerState:e}=o;return[t.root,t[e.variant],t[`size${g(e.size)}`],e.padding!=="normal"&&t[`padding${g(e.padding)}`],e.align!=="inherit"&&t[`align${g(e.align)}`],e.stickyHeader&&t.stickyHeader]}})(k(({theme:o})=>({...o.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:o.vars?`1px solid ${o.vars.palette.TableCell.border}`:`1px solid
|
|
2
|
+
${o.palette.mode==="light"?o.lighten(o.alpha(o.palette.divider,1),.88):o.darken(o.alpha(o.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(o.vars||o).palette.text.primary,lineHeight:o.typography.pxToRem(24),fontWeight:o.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(o.vars||o).palette.text.primary}},{props:{variant:"footer"},style:{color:(o.vars||o).palette.text.secondary,lineHeight:o.typography.pxToRem(21),fontSize:o.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${G.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:t})=>t.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(o.vars||o).palette.background.default}}]}))),po=c.forwardRef(function(t,e){const s=f({props:t,name:"MuiTableCell"}),{align:n="inherit",className:a,component:l,padding:r,scope:i,size:u,sortDirection:d,variant:w,...H}=s,b=c.useContext(D),m=c.useContext(M),$=m&&m.variant==="head";let R;l?R=l:R=$?"th":"td";let h=i;R==="td"?h=void 0:!h&&$&&(h="col");const z=w||m&&m.variant,S={...s,align:n,component:R,padding:r||(b&&b.padding?b.padding:"normal"),size:u||(b&&b.size?b.size:"medium"),sortDirection:d,stickyHeader:z==="head"&&b&&b.stickyHeader,variant:z},O=K(S);let U=null;return d&&(U=d==="asc"?"ascending":"descending"),p.jsx(Q,{as:R,ref:e,className:C(O.root,a),"aria-sort":U,scope:h,ownerState:S,...H})});function V(o){return y("MuiTableContainer",o)}v("MuiTableContainer",["root"]);const Y=o=>{const{classes:t}=o;return T({root:["root"]},V,t)},Z=x("div",{name:"MuiTableContainer",slot:"Root"})({width:"100%",overflowX:"auto"}),uo=c.forwardRef(function(t,e){const s=f({props:t,name:"MuiTableContainer"}),{className:n,component:a="div",...l}=s,r={...s,component:a},i=Y(r);return p.jsx(Z,{ref:e,as:a,className:C(i.root,n),ownerState:r,...l})});function _(o){return y("MuiTableHead",o)}v("MuiTableHead",["root"]);const oo=o=>{const{classes:t}=o;return T({root:["root"]},_,t)},to=x("thead",{name:"MuiTableHead",slot:"Root"})({display:"table-header-group"}),eo={variant:"head"},A="thead",bo=c.forwardRef(function(t,e){const s=f({props:t,name:"MuiTableHead"}),{className:n,component:a=A,...l}=s,r={...s,component:a},i=oo(r);return p.jsx(M.Provider,{value:eo,children:p.jsx(to,{as:a,className:C(i.root,n),ref:e,role:a===A?null:"rowgroup",ownerState:r,...l})})});function ao(o){return y("MuiTableRow",o)}const B=v("MuiTableRow",["root","selected","hover","head","footer"]),so=o=>{const{classes:t,selected:e,hover:s,head:n,footer:a}=o;return T({root:["root",e&&"selected",s&&"hover",n&&"head",a&&"footer"]},ao,t)},ro=x("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(o,t)=>{const{ownerState:e}=o;return[t.root,e.head&&t.head,e.footer&&t.footer]}})(k(({theme:o})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${B.hover}:hover`]:{backgroundColor:(o.vars||o).palette.action.hover},[`&.${B.selected}`]:{backgroundColor:o.alpha((o.vars||o).palette.primary.main,(o.vars||o).palette.action.selectedOpacity),"&:hover":{backgroundColor:o.alpha((o.vars||o).palette.primary.main,`${(o.vars||o).palette.action.selectedOpacity} + ${(o.vars||o).palette.action.hoverOpacity}`)}}}))),P="tr",go=c.forwardRef(function(t,e){const s=f({props:t,name:"MuiTableRow"}),{className:n,component:a=P,hover:l=!1,selected:r=!1,...i}=s,u=c.useContext(M),d={...s,component:a,hover:l,selected:r,head:u&&u.variant==="head",footer:u&&u.variant==="footer"},w=so(d);return p.jsx(ro,{as:a,ref:e,className:C(w.root,n),role:a===P?null:"row",ownerState:d,...i})});export{uo as T,io as a,bo as b,go as c,po as d,co as e};
|