From 9b880f5ab49c174ca65196d4ae2e9620a74de12b Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Sat, 7 Jan 2023 22:25:56 +0200 Subject: [PATCH] filter enhancements --- CHANGELOG.md | 84 ++- LICENSE.md | 2 +- apis/admin.go | 2 +- apis/admin_test.go | 22 +- apis/collection_test.go | 22 +- apis/record_auth.go | 4 +- apis/record_auth_test.go | 66 +- apis/record_crud.go | 31 +- apis/record_crud_test.go | 160 +++- apis/record_helpers.go | 5 - apis/settings.go | 10 +- cmd/serve.go | 3 +- core/app.go | 2 +- daos/admin.go | 4 +- daos/collection.go | 9 +- daos/collection_test.go | 23 +- daos/record.go | 5 +- forms/collection_upsert.go | 2 +- forms/collections_import_test.go | 18 +- forms/record_upsert.go | 76 +- forms/record_upsert_test.go | 30 +- go.mod | 42 +- go.sum | 53 +- migrations/1672577344_multi_match_migrate.go | 215 ++++++ models/record.go | 109 ++- models/record_test.go | 109 ++- models/request_data.go | 21 + models/request_data_test.go | 58 ++ models/schema/schema_field.go | 92 ++- models/schema/schema_field_test.go | 698 +++++++++++++++++- plugins/jsvm/migrations.go | 8 +- resolvers/multi_match_subquery.go | 70 ++ resolvers/record_field_resolve_runner.go | 589 +++++++++++++++ resolvers/record_field_resolver.go | 413 ++++------- resolvers/record_field_resolver_test.go | 306 ++++++-- tests/data/data.db | Bin 237568 -> 237568 bytes .../84nmscqy84lsi1t/test_MaWC6mWyrP.txt | 1 + .../84nmscqy84lsi1t/test_MaWC6mWyrP.txt.attrs | 1 + .../84nmscqy84lsi1t/test_tC1Yc87DfC.txt | 1 + .../84nmscqy84lsi1t/test_tC1Yc87DfC.txt.attrs | 1 + tools/auth/auth.go | 15 +- tools/auth/discord.go | 13 +- tools/auth/facebook.go | 13 +- tools/auth/gitee.go | 13 +- tools/auth/github.go | 15 +- tools/auth/gitlab.go | 15 +- tools/auth/google.go | 13 +- tools/auth/kakao.go | 11 +- tools/auth/microsoft.go | 11 +- tools/auth/spotify.go | 9 +- tools/auth/strava.go | 13 +- tools/auth/twitch.go | 15 +- tools/auth/twitter.go | 13 +- tools/list/list.go | 14 + tools/list/list_test.go | 99 +++ tools/migrate/runner.go | 84 ++- tools/migrate/runner_test.go | 96 ++- tools/search/filter.go | 341 +++++++-- tools/search/provider_test.go | 6 +- tools/search/simple_field_resolver.go | 29 +- tools/search/simple_field_resolver_test.go | 14 +- tools/search/sort.go | 19 +- tools/search/sort_test.go | 3 + ui/.env | 2 +- ...fb9150f.js => AuthMethodsDocs.533b2725.js} | 2 +- ...f72f8e3.js => AuthRefreshDocs.ddc75cc1.js} | 2 +- ...3c67.js => AuthWithOAuth2Docs.4b3132ae.js} | 2 +- ...fc.js => AuthWithPasswordDocs.7298ae6e.js} | 2 +- ...tor.d71155bc.js => CodeEditor.3853a6d4.js} | 2 +- ....js => ConfirmEmailChangeDocs.eaef2b04.js} | 2 +- ...s => ConfirmPasswordResetDocs.a459ecae.js} | 2 +- ...js => ConfirmVerificationDocs.9c85c320.js} | 2 +- ....02259e08.js => CreateApiDocs.0bcde8fa.js} | 2 +- ....486795b5.js => DeleteApiDocs.8b05ad6e.js} | 2 +- .../FilterAutocompleteInput.b52a3ef2.js | 1 + .../FilterAutocompleteInput.cea6a97d.js | 1 - ...cs.01d92f2e.js => ListApiDocs.fa7883e0.js} | 10 +- ...b.js => ListExternalAuthsDocs.619a62c2.js} | 2 +- ...PageAdminConfirmPasswordReset.2286108f.js} | 2 +- ...PageAdminRequestPasswordReset.a16f1615.js} | 2 +- ... PageRecordConfirmEmailChange.b5ca8f93.js} | 2 +- ...ageRecordConfirmPasswordReset.ce74e903.js} | 2 +- ...PageRecordConfirmVerification.7214c772.js} | 2 +- ...11e36b6.js => RealtimeApiDocs.e0a4f9c5.js} | 2 +- ....js => RequestEmailChangeDocs.8d460654.js} | 2 +- ...s => RequestPasswordResetDocs.b37ecab0.js} | 2 +- ...js => RequestVerificationDocs.bc7b243e.js} | 2 +- ...dkTabs.2a5180be.js => SdkTabs.6909f1b6.js} | 2 +- ....js => UnlinkExternalAuthDocs.52eecf60.js} | 2 +- ....0af7bddf.js => UpdateApiDocs.5f466f13.js} | 2 +- ...cs.dec83248.js => ViewApiDocs.06d25880.js} | 2 +- ...{index.c5a3774d.css => index.5fccb547.css} | 2 +- .../{index.d939dbbd.js => index.e8d8151e.js} | 166 +++-- ui/dist/index.html | 4 +- .../base/FilterAutocompleteInput.svelte | 35 +- .../collections/CollectionRulesTab.svelte | 2 +- .../collections/FieldAccordion.svelte | 19 +- .../components/collections/RuleField.svelte | 132 ++-- .../collections/docs/ListApiDocs.svelte | 4 +- .../settings/AuthProviderAccordion.svelte | 2 +- .../settings/EmailTemplateAccordion.svelte | 2 +- ui/src/scss/_form.scss | 8 - 102 files changed, 3693 insertions(+), 986 deletions(-) create mode 100644 migrations/1672577344_multi_match_migrate.go create mode 100644 models/request_data_test.go create mode 100644 resolvers/multi_match_subquery.go create mode 100644 resolvers/record_field_resolve_runner.go create mode 100644 tests/data/storage/wsmn24bux7wo113/84nmscqy84lsi1t/test_MaWC6mWyrP.txt create mode 100644 tests/data/storage/wsmn24bux7wo113/84nmscqy84lsi1t/test_MaWC6mWyrP.txt.attrs create mode 100644 tests/data/storage/wsmn24bux7wo113/84nmscqy84lsi1t/test_tC1Yc87DfC.txt create mode 100644 tests/data/storage/wsmn24bux7wo113/84nmscqy84lsi1t/test_tC1Yc87DfC.txt.attrs rename ui/dist/assets/{AuthMethodsDocs.6fb9150f.js => AuthMethodsDocs.533b2725.js} (98%) rename ui/dist/assets/{AuthRefreshDocs.ef72f8e3.js => AuthRefreshDocs.ddc75cc1.js} (98%) rename ui/dist/assets/{AuthWithOAuth2Docs.a8493c67.js => AuthWithOAuth2Docs.4b3132ae.js} (98%) rename ui/dist/assets/{AuthWithPasswordDocs.be3fe4fc.js => AuthWithPasswordDocs.7298ae6e.js} (98%) rename ui/dist/assets/{CodeEditor.d71155bc.js => CodeEditor.3853a6d4.js} (99%) rename ui/dist/assets/{ConfirmEmailChangeDocs.f5ffe149.js => ConfirmEmailChangeDocs.eaef2b04.js} (97%) rename ui/dist/assets/{ConfirmPasswordResetDocs.ba88ebb6.js => ConfirmPasswordResetDocs.a459ecae.js} (98%) rename ui/dist/assets/{ConfirmVerificationDocs.10de9953.js => ConfirmVerificationDocs.9c85c320.js} (97%) rename ui/dist/assets/{CreateApiDocs.02259e08.js => CreateApiDocs.0bcde8fa.js} (99%) rename ui/dist/assets/{DeleteApiDocs.486795b5.js => DeleteApiDocs.8b05ad6e.js} (97%) create mode 100644 ui/dist/assets/FilterAutocompleteInput.b52a3ef2.js delete mode 100644 ui/dist/assets/FilterAutocompleteInput.cea6a97d.js rename ui/dist/assets/{ListApiDocs.01d92f2e.js => ListApiDocs.fa7883e0.js} (97%) rename ui/dist/assets/{ListExternalAuthsDocs.eb32d46b.js => ListExternalAuthsDocs.619a62c2.js} (98%) rename ui/dist/assets/{PageAdminConfirmPasswordReset.86ba1dcf.js => PageAdminConfirmPasswordReset.2286108f.js} (98%) rename ui/dist/assets/{PageAdminRequestPasswordReset.ab8ae049.js => PageAdminRequestPasswordReset.a16f1615.js} (98%) rename ui/dist/assets/{PageRecordConfirmEmailChange.e9bedc1d.js => PageRecordConfirmEmailChange.b5ca8f93.js} (98%) rename ui/dist/assets/{PageRecordConfirmPasswordReset.1767c74b.js => PageRecordConfirmPasswordReset.ce74e903.js} (98%) rename ui/dist/assets/{PageRecordConfirmVerification.77b2a45d.js => PageRecordConfirmVerification.7214c772.js} (97%) rename ui/dist/assets/{RealtimeApiDocs.311e36b6.js => RealtimeApiDocs.e0a4f9c5.js} (98%) rename ui/dist/assets/{RequestEmailChangeDocs.6f686b5c.js => RequestEmailChangeDocs.8d460654.js} (98%) rename ui/dist/assets/{RequestPasswordResetDocs.1f7548dd.js => RequestPasswordResetDocs.b37ecab0.js} (97%) rename ui/dist/assets/{RequestVerificationDocs.19557128.js => RequestVerificationDocs.bc7b243e.js} (97%) rename ui/dist/assets/{SdkTabs.2a5180be.js => SdkTabs.6909f1b6.js} (98%) rename ui/dist/assets/{UnlinkExternalAuthDocs.a011446e.js => UnlinkExternalAuthDocs.52eecf60.js} (98%) rename ui/dist/assets/{UpdateApiDocs.0af7bddf.js => UpdateApiDocs.5f466f13.js} (99%) rename ui/dist/assets/{ViewApiDocs.dec83248.js => ViewApiDocs.06d25880.js} (98%) rename ui/dist/assets/{index.c5a3774d.css => index.5fccb547.css} (69%) rename ui/dist/assets/{index.d939dbbd.js => index.e8d8151e.js} (62%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d6b4957..fa58dd59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,66 @@ -## (WIP) +## (WIP) v0.11.0 + +- Added `+` and `-` body field modifiers for `number`, `files`, `select` and `relation` fields. + ```js + { + // oldValue + 2 + "someNumber+": 2, + + // oldValue + ["id1", "id2"] - ["id3"] + "someRelation+": ["id1", "id2"], + "someRelation-": ["id3"], + + // delete single file by its name (file fields supports only the "-" modifier!) + "someFile-": "filename.png", + } + ``` + _Note1: `@request.data.someField` will contain the final resolved value._ + + _Note2: The old index (`"field.0":null`) and filename (`"field.filename.png":null`) based suffixed syntax for deleting files is still supported._ + +- ! Added support for multi-match/match-all request data and collection multi-valued fields (`select`, `relation`) conditions. + If you want a "at least one of" type of condition, you can prefix the operator with `?`. + ```js + // for each someRelA.someRelB record require the "status" field to be "active" + someRelA.someRelB.status = "active" + + // OR for "at least one of" condition + someRelA.someRelB.status ?= "active" + ``` + _**Note: Previously the behavior for multi-valued fields was as the "at least one of" type. + The release comes with system db migration that will update your existing API rules (if needed) to preserve the compatibility. + If you have multi-select or multi-relation filter checks in your client-side code and want to preserve the old behavior, you'll have to prefix with `?` your operators.**_ + +- Added support for querying `@request.data.someRelField.*` relation fields. + ```js + // example submitted data: {"someRel": "REL_RECORD_ID"} + @request.data.someRel.status = "active" + ``` + +- Added `:isset` modifier for the static request data fields. + ```js + // prevent changing the "role" field + @request.data.role:isset = false + ``` + +- Added `:length` modifier for the arrayable request data and collection fields (`select`, `file`, `relation`). + ```js + // example submitted data: {"someSelectField": ["val1", "val2"]} + @request.data.someSelectField:length = 2 + + // check existing record field length + someSelectField:length = 2 + ``` + +- Added `:each` modifier support for the multi-`select` request data and collection field. + ```js + // check if all selected rows has "pb_" prefix + roles:each ~ 'pb_%' + ``` + +- Improved the Admin UI filters autocomplete. + +- Added `@random` sort key for `RANDOM()` sorted list results. - Added Strava OAuth2 provider ([#1443](https://github.com/pocketbase/pocketbase/pull/1443); thanks @szsascha). @@ -6,13 +68,27 @@ - Added IME status check to the textarea keydown handler ([#1370](https://github.com/pocketbase/pocketbase/pull/1370); thanks @tenthree). -- Fixed the text wrapping in the Admin UI listing searchbar ([#1416](https://github.com/pocketbase/pocketbase/issues/1416)). - - Added `filesystem.NewFileFromBytes()` helper ([#1420](https://github.com/pocketbase/pocketbase/pull/1420); thanks @dschissler). +- Added support for reordering uploaded multiple files. + +- Added `webp` to the default images mime type presets list ([#1469](https://github.com/pocketbase/pocketbase/pull/1469); thanks @khairulhaaziq). + +- Added the OAuth2 refresh token to the auth meta response ([#1487](https://github.com/pocketbase/pocketbase/issues/1487)). + +- Fixed the text wrapping in the Admin UI listing searchbar ([#1416](https://github.com/pocketbase/pocketbase/issues/1416)). + - Fixed number field value output in the records listing ([#1447](https://github.com/pocketbase/pocketbase/issues/1447)). -- Added webp to the default images mime type presets list ([#1469](https://github.com/pocketbase/pocketbase/pull/1469); thanks @khairulhaaziq). +- Fixed duplicated settings view pages caused by uncompleted transitions ([#1498](https://github.com/pocketbase/pocketbase/issues/1498)). + +- Allowed sending `Authorization` header with the `/auth-with-password` record and admin login requests ([#1494](https://github.com/pocketbase/pocketbase/discussions/1494)). + +- `migrate down` now reverts migrations in the applied order. + +- Added additional list-bucket check in the S3 config test API. + +- Other minor improvements. ## v0.10.4 diff --git a/LICENSE.md b/LICENSE.md index 26265aa2..e3b8465b 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,5 +1,5 @@ The MIT License (MIT) -Copyright (c) 2022, Gani Georgiev +Copyright (c) 2022 - present, Gani Georgiev Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, diff --git a/apis/admin.go b/apis/admin.go index 39ba6f3c..69119d39 100644 --- a/apis/admin.go +++ b/apis/admin.go @@ -18,7 +18,7 @@ func bindAdminApi(app core.App, rg *echo.Group) { api := adminApi{app: app} subGroup := rg.Group("/admins", ActivityLogger(app)) - subGroup.POST("/auth-with-password", api.authWithPassword, RequireGuestOnly()) + subGroup.POST("/auth-with-password", api.authWithPassword) subGroup.POST("/request-password-reset", api.requestPasswordReset) subGroup.POST("/confirm-password-reset", api.confirmPasswordReset) subGroup.POST("/auth-refresh", api.authRefresh, RequireAdminAuth()) diff --git a/apis/admin_test.go b/apis/admin_test.go index ce745718..0a94cb45 100644 --- a/apis/admin_test.go +++ b/apis/admin_test.go @@ -48,6 +48,20 @@ func TestAdminAuthWithEmail(t *testing.T) { ExpectedStatus: 400, ExpectedContent: []string{`"data":{}`}, }, + { + Name: "valid email/password (guest)", + Method: http.MethodPost, + Url: "/api/admins/auth-with-password", + Body: strings.NewReader(`{"identity":"test@example.com","password":"1234567890"}`), + ExpectedStatus: 200, + ExpectedContent: []string{ + `"admin":{"id":"sywbhecnh46rhm0"`, + `"token":`, + }, + ExpectedEvents: map[string]int{ + "OnAdminAuthRequest": 1, + }, + }, { Name: "valid email/password (already authorized)", Method: http.MethodPost, @@ -56,14 +70,6 @@ func TestAdminAuthWithEmail(t *testing.T) { RequestHeaders: map[string]string{ "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4MTYwMH0.han3_sG65zLddpcX2ic78qgy7FKecuPfOpFa8Dvi5Bg", }, - ExpectedStatus: 400, - ExpectedContent: []string{`"message":"The request can be accessed only by guests.","data":{}`}, - }, - { - Name: "valid email/password (guest)", - Method: http.MethodPost, - Url: "/api/admins/auth-with-password", - Body: strings.NewReader(`{"identity":"test@example.com","password":"1234567890"}`), ExpectedStatus: 200, ExpectedContent: []string{ `"admin":{"id":"sywbhecnh46rhm0"`, diff --git a/apis/collection_test.go b/apis/collection_test.go index 1ac9b49e..d8ac5eb6 100644 --- a/apis/collection_test.go +++ b/apis/collection_test.go @@ -42,7 +42,7 @@ func TestCollectionsList(t *testing.T) { ExpectedContent: []string{ `"page":1`, `"perPage":30`, - `"totalItems":7`, + `"totalItems":8`, `"items":[{`, `"id":"_pb_users_auth_"`, `"id":"v851q4r790rhknl"`, @@ -51,6 +51,7 @@ func TestCollectionsList(t *testing.T) { `"id":"sz5l5z67tg7gku0"`, `"id":"wzlqyes4orhoygb"`, `"id":"4d1blo5cuycfaca"`, + `"id":"9n89pl5vkct6330"`, `"type":"auth"`, `"type":"base"`, }, @@ -69,10 +70,10 @@ func TestCollectionsList(t *testing.T) { ExpectedContent: []string{ `"page":2`, `"perPage":2`, - `"totalItems":7`, + `"totalItems":8`, `"items":[{`, + `"id":"v851q4r790rhknl"`, `"id":"4d1blo5cuycfaca"`, - `"id":"wzlqyes4orhoygb"`, }, ExpectedEvents: map[string]int{ "OnCollectionsListRequest": 1, @@ -99,12 +100,13 @@ func TestCollectionsList(t *testing.T) { ExpectedContent: []string{ `"page":1`, `"perPage":30`, - `"totalItems":4`, + `"totalItems":5`, `"items":[{`, `"id":"wsmn24bux7wo113"`, `"id":"sz5l5z67tg7gku0"`, `"id":"wzlqyes4orhoygb"`, `"id":"4d1blo5cuycfaca"`, + `"id":"9n89pl5vkct6330"`, }, ExpectedEvents: map[string]int{ "OnCollectionsListRequest": 1, @@ -786,7 +788,7 @@ func TestCollectionImport(t *testing.T) { if err := app.Dao().CollectionQuery().All(&collections); err != nil { t.Fatal(err) } - expected := 7 + expected := 8 if len(collections) != expected { t.Fatalf("Expected %d collections, got %d", expected, len(collections)) } @@ -814,7 +816,7 @@ func TestCollectionImport(t *testing.T) { if err := app.Dao().CollectionQuery().All(&collections); err != nil { t.Fatal(err) } - expected := 7 + expected := 8 if len(collections) != expected { t.Fatalf("Expected %d collections, got %d", expected, len(collections)) } @@ -856,7 +858,7 @@ func TestCollectionImport(t *testing.T) { if err := app.Dao().CollectionQuery().All(&collections); err != nil { t.Fatal(err) } - expected := 7 + expected := 8 if len(collections) != expected { t.Fatalf("Expected %d collections, got %d", expected, len(collections)) } @@ -909,7 +911,7 @@ func TestCollectionImport(t *testing.T) { if err := app.Dao().CollectionQuery().All(&collections); err != nil { t.Fatal(err) } - expected := 10 + expected := 11 if len(collections) != expected { t.Fatalf("Expected %d collections, got %d", expected, len(collections)) } @@ -996,8 +998,8 @@ func TestCollectionImport(t *testing.T) { ExpectedEvents: map[string]int{ "OnCollectionsAfterImportRequest": 1, "OnCollectionsBeforeImportRequest": 1, - "OnModelBeforeDelete": 5, - "OnModelAfterDelete": 5, + "OnModelBeforeDelete": 6, + "OnModelAfterDelete": 6, "OnModelBeforeUpdate": 2, "OnModelAfterUpdate": 2, "OnModelBeforeCreate": 1, diff --git a/apis/record_auth.go b/apis/record_auth.go index dcd7a772..575c48eb 100644 --- a/apis/record_auth.go +++ b/apis/record_auth.go @@ -35,8 +35,8 @@ func bindRecordAuthApi(app core.App, rg *echo.Group) { subGroup.GET("/auth-methods", api.authMethods) subGroup.POST("/auth-refresh", api.authRefresh, RequireSameContextRecordAuth()) - subGroup.POST("/auth-with-oauth2", api.authWithOAuth2) // allow anyone so that we can link the OAuth2 profile with the authenticated record - subGroup.POST("/auth-with-password", api.authWithPassword, RequireGuestOnly()) + subGroup.POST("/auth-with-oauth2", api.authWithOAuth2) + subGroup.POST("/auth-with-password", api.authWithPassword) subGroup.POST("/request-password-reset", api.requestPasswordReset) subGroup.POST("/confirm-password-reset", api.confirmPasswordReset) subGroup.POST("/request-verification", api.requestVerification) diff --git a/apis/record_auth_test.go b/apis/record_auth_test.go index 62cf521f..ccda842c 100644 --- a/apis/record_auth_test.go +++ b/apis/record_auth_test.go @@ -66,26 +66,6 @@ func TestRecordAuthMethodsList(t *testing.T) { func TestRecordAuthWithPassword(t *testing.T) { scenarios := []tests.ApiScenario{ - { - Name: "authenticated record", - Method: http.MethodPost, - Url: "/api/collections/users/auth-with-password", - RequestHeaders: map[string]string{ - "Authorization": "eyJhbGciOiJIUzI1NiJ9.eyJpZCI6IjRxMXhsY2xtZmxva3UzMyIsInR5cGUiOiJhdXRoUmVjb3JkIiwiY29sbGVjdGlvbklkIjoiX3BiX3VzZXJzX2F1dGhfIiwiZXhwIjoyMjA4OTg1MjYxfQ.UwD8JvkbQtXpymT09d7J6fdA0aP9g4FJ1GPh_ggEkzc", - }, - ExpectedStatus: 400, - ExpectedContent: []string{`"data":{}`}, - }, - { - Name: "authenticated admin", - Method: http.MethodPost, - Url: "/api/collections/users/auth-with-password", - RequestHeaders: map[string]string{ - "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", - }, - ExpectedStatus: 400, - ExpectedContent: []string{`"data":{}`}, - }, { Name: "invalid body format", Method: http.MethodPost, @@ -226,6 +206,52 @@ func TestRecordAuthWithPassword(t *testing.T) { "OnRecordAuthRequest": 1, }, }, + + // with already authenticated record or admin + { + Name: "authenticated record", + Method: http.MethodPost, + Url: "/api/collections/users/auth-with-password", + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiJ9.eyJpZCI6IjRxMXhsY2xtZmxva3UzMyIsInR5cGUiOiJhdXRoUmVjb3JkIiwiY29sbGVjdGlvbklkIjoiX3BiX3VzZXJzX2F1dGhfIiwiZXhwIjoyMjA4OTg1MjYxfQ.UwD8JvkbQtXpymT09d7J6fdA0aP9g4FJ1GPh_ggEkzc", + }, + Body: strings.NewReader(`{ + "identity":"test@example.com", + "password":"1234567890" + }`), + ExpectedStatus: 200, + ExpectedContent: []string{ + `"record":{`, + `"token":"`, + `"id":"4q1xlclmfloku33"`, + `"email":"test@example.com"`, + }, + ExpectedEvents: map[string]int{ + "OnRecordAuthRequest": 1, + }, + }, + { + Name: "authenticated admin", + Method: http.MethodPost, + Url: "/api/collections/users/auth-with-password", + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", + }, + Body: strings.NewReader(`{ + "identity":"test@example.com", + "password":"1234567890" + }`), + ExpectedStatus: 200, + ExpectedContent: []string{ + `"record":{`, + `"token":"`, + `"id":"4q1xlclmfloku33"`, + `"email":"test@example.com"`, + }, + ExpectedEvents: map[string]int{ + "OnRecordAuthRequest": 1, + }, + }, } for _, scenario := range scenarios { diff --git a/apis/record_crud.go b/apis/record_crud.go index dfb4a096..ae326332 100644 --- a/apis/record_crud.go +++ b/apis/record_crud.go @@ -166,6 +166,20 @@ func (api *recordApi) create(c echo.Context) error { // temporary save the record and check it against the create rule if requestData.Admin == nil && collection.CreateRule != nil { + testRecord := models.NewRecord(collection) + + // replace modifiers fields so that the resolved value is always + // available when accessing requestData.Data using just the field name + if requestData.HasModifierDataKeys() { + requestData.Data = testRecord.ReplaceModifers(requestData.Data) + } + + testForm := forms.NewRecordUpsert(api.app, testRecord) + testForm.SetFullManageAccess(true) + if err := testForm.LoadRequest(c.Request(), ""); err != nil { + return NewBadRequestError("Failed to load the submitted data due to invalid formatting.", err) + } + createRuleFunc := func(q *dbx.SelectQuery) error { if *collection.CreateRule == "" { return nil // no create rule to resolve @@ -181,13 +195,6 @@ func (api *recordApi) create(c echo.Context) error { return nil } - testRecord := models.NewRecord(collection) - testForm := forms.NewRecordUpsert(api.app, testRecord) - testForm.SetFullManageAccess(true) - if err := testForm.LoadRequest(c.Request(), ""); err != nil { - return NewBadRequestError("Failed to load the submitted data due to invalid formatting.", err) - } - testErr := testForm.DrySubmit(func(txDao *daos.Dao) error { foundRecord, err := txDao.FindRecordById(collection.Id, testRecord.Id, createRuleFunc) if err != nil { @@ -258,6 +265,16 @@ func (api *recordApi) update(c echo.Context) error { return NewForbiddenError("Only admins can perform this action.", nil) } + // eager fetch the record so that the modifier field values are replaced + // and available when accessing requestData.Data using just the field name + if requestData.HasModifierDataKeys() { + record, err := api.app.Dao().FindRecordById(collection.Id, recordId) + if err != nil || record == nil { + return NewNotFoundError("", err) + } + requestData.Data = record.ReplaceModifers(requestData.Data) + } + ruleFunc := func(q *dbx.SelectQuery) error { if requestData.Admin == nil && collection.UpdateRule != nil && *collection.UpdateRule != "" { resolver := resolvers.NewRecordFieldResolver(api.app.Dao(), collection, requestData, true) diff --git a/apis/record_crud_test.go b/apis/record_crud_test.go index b6ada59a..319cbf43 100644 --- a/apis/record_crud_test.go +++ b/apis/record_crud_test.go @@ -2,6 +2,7 @@ package apis_test import ( "net/http" + "net/url" "os" "path/filepath" "strings" @@ -209,6 +210,50 @@ func TestRecordCrudList(t *testing.T) { }, ExpectedEvents: map[string]int{"OnRecordsListRequest": 1}, }, + { + Name: ":rule modifer", + Method: http.MethodGet, + Url: "/api/collections/demo5/records", + ExpectedStatus: 200, + ExpectedContent: []string{ + `"page":1`, + `"perPage":30`, + `"totalPages":1`, + `"totalItems":1`, + `"items":[{`, + `"id":"qjeql998mtp1azp"`, + }, + ExpectedEvents: map[string]int{"OnRecordsListRequest": 1}, + }, + { + Name: "multi-match - at least one of", + Method: http.MethodGet, + Url: "/api/collections/demo4/records?filter=" + url.QueryEscape("rel_many_no_cascade_required.files:length?=2"), + ExpectedStatus: 200, + ExpectedContent: []string{ + `"page":1`, + `"perPage":30`, + `"totalPages":1`, + `"totalItems":1`, + `"items":[{`, + `"id":"qzaqccwrmva4o1n"`, + }, + ExpectedEvents: map[string]int{"OnRecordsListRequest": 1}, + }, + { + Name: "multi-match - all", + Method: http.MethodGet, + Url: "/api/collections/demo4/records?filter=" + url.QueryEscape("rel_many_no_cascade_required.files:length=2"), + ExpectedStatus: 200, + ExpectedContent: []string{ + `"page":1`, + `"perPage":30`, + `"totalPages":0`, + `"totalItems":0`, + `"items":[]`, + }, + ExpectedEvents: map[string]int{"OnRecordsListRequest": 1}, + }, // auth collection checks // ----------------------------------------------------------- @@ -716,6 +761,25 @@ func TestRecordCrudDelete(t *testing.T) { } }, }, + { + Name: "@request :isset (rule failure check)", + Method: http.MethodDelete, + Url: "/api/collections/demo5/records/la4y2w4o98acwuj", + ExpectedStatus: 404, + ExpectedContent: []string{`"data":{}`}, + }, + { + Name: "@request :isset (rule pass check)", + Method: http.MethodDelete, + Url: "/api/collections/demo5/records/la4y2w4o98acwuj?test=1", + ExpectedStatus: 204, + ExpectedEvents: map[string]int{ + "OnModelAfterDelete": 1, + "OnModelBeforeDelete": 1, + "OnRecordAfterDeleteRequest": 1, + "OnRecordBeforeDeleteRequest": 1, + }, + }, // cascade delete checks // ----------------------------------------------------------- @@ -730,7 +794,7 @@ func TestRecordCrudDelete(t *testing.T) { ExpectedContent: []string{`"data":{}`}, ExpectedEvents: map[string]int{ "OnRecordBeforeDeleteRequest": 1, - "OnModelBeforeUpdate": 1, // self_rel_many update of test1 record + "OnModelBeforeUpdate": 2, // self_rel_many update of test1 record + rel_one_cascade demo4 cascaded in demo5 "OnModelBeforeDelete": 2, // the record itself + rel_one_cascade of test1 record }, }, @@ -1092,6 +1156,63 @@ func TestRecordCrudCreate(t *testing.T) { }, }, + // fields modifier checks + // ----------------------------------------------------------- + { + Name: "trying to delete a record while being part of a non-cascade required relation", + Method: http.MethodDelete, + Url: "/api/collections/demo3/records/7nwo8tuiatetxdm", + RequestHeaders: map[string]string{ + "Authorization": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6InN5d2JoZWNuaDQ2cmhtMCIsInR5cGUiOiJhZG1pbiIsImV4cCI6MjIwODk4NTI2MX0.M1m--VOqGyv0d23eeUc0r9xE8ZzHaYVmVFw1VZW6gT8", + }, + ExpectedStatus: 400, + ExpectedContent: []string{`"data":{}`}, + ExpectedEvents: map[string]int{ + "OnRecordBeforeDeleteRequest": 1, + "OnModelBeforeUpdate": 2, // self_rel_many update of test1 record + rel_one_cascade demo4 cascaded in demo5 + "OnModelBeforeDelete": 2, // the record itself + rel_one_cascade of test1 record + }, + }, + + // check whether if @request.data modifer fields are properly resolved + // ----------------------------------------------------------- + { + Name: "@request.data.field with compute modifers (rule failure check)", + Method: http.MethodPost, + Url: "/api/collections/demo5/records", + Body: strings.NewReader(`{ + "total":1, + "total+":4, + "total-":1 + }`), + ExpectedStatus: 400, + ExpectedContent: []string{ + `"data":{}`, + }, + }, + { + Name: "@request.data.field with compute modifers (rule pass check)", + Method: http.MethodPost, + Url: "/api/collections/demo5/records", + Body: strings.NewReader(`{ + "total":1, + "total+":3, + "total-":1 + }`), + ExpectedStatus: 200, + ExpectedContent: []string{ + `"id":"`, + `"collectionName":"demo5"`, + `"total":3`, + }, + ExpectedEvents: map[string]int{ + "OnModelAfterCreate": 1, + "OnModelBeforeCreate": 1, + "OnRecordAfterCreateRequest": 1, + "OnRecordBeforeCreateRequest": 1, + }, + }, + // auth records // ----------------------------------------------------------- { @@ -1501,6 +1622,43 @@ func TestRecordCrudUpdate(t *testing.T) { }, }, + // check whether if @request.data modifer fields are properly resolved + // ----------------------------------------------------------- + { + Name: "@request.data.field with compute modifers (rule failure check)", + Method: http.MethodPatch, + Url: "/api/collections/demo5/records/la4y2w4o98acwuj", + Body: strings.NewReader(`{ + "total+":3, + "total-":1 + }`), + ExpectedStatus: 404, + ExpectedContent: []string{ + `"data":{}`, + }, + }, + { + Name: "@request.data.field with compute modifers (rule pass check)", + Method: http.MethodPatch, + Url: "/api/collections/demo5/records/la4y2w4o98acwuj", + Body: strings.NewReader(`{ + "total+":2, + "total-":1 + }`), + ExpectedStatus: 200, + ExpectedContent: []string{ + `"id":"la4y2w4o98acwuj"`, + `"collectionName":"demo5"`, + `"total":3`, + }, + ExpectedEvents: map[string]int{ + "OnModelAfterUpdate": 1, + "OnModelBeforeUpdate": 1, + "OnRecordAfterUpdateRequest": 1, + "OnRecordBeforeUpdateRequest": 1, + }, + }, + // auth records // ----------------------------------------------------------- { diff --git a/apis/record_helpers.go b/apis/record_helpers.go index 35d68d24..d9c1576e 100644 --- a/apis/record_helpers.go +++ b/apis/record_helpers.go @@ -15,11 +15,6 @@ import ( const ContextRequestDataKey = "requestData" -// Deprecated: Will be removed after v0.9. Use apis.RequestData(c) instead. -func GetRequestData(c echo.Context) *models.RequestData { - return RequestData(c) -} - // RequestData exports cached common request data fields // (query, body, logged auth state, etc.) from the provided context. func RequestData(c echo.Context) *models.RequestData { diff --git a/apis/settings.go b/apis/settings.go index b7414faa..2874acd4 100644 --- a/apis/settings.go +++ b/apis/settings.go @@ -1,6 +1,7 @@ package apis import ( + "fmt" "net/http" validation "github.com/go-ozzo/ozzo-validation/v4" @@ -91,14 +92,17 @@ func (api *settingsApi) testS3(c echo.Context) error { } defer fs.Close() - testFileKey := "pb_test_" + security.PseudorandomString(5) + "/test.txt" + testPrefix := "pb_settings_test_" + security.PseudorandomString(5) + testFileKey := testPrefix + "/test.txt" + // try to upload a test file if err := fs.Upload([]byte("test"), testFileKey); err != nil { return NewBadRequestError("Failed to upload a test file. Raw error: \n"+err.Error(), nil) } - if err := fs.Delete(testFileKey); err != nil { - return NewBadRequestError("Failed to delete a test file. Raw error: \n"+err.Error(), nil) + // test prefix deletion (ensures that both bucket list and delete works) + if errs := fs.DeletePrefix(testPrefix); len(errs) > 0 { + return NewBadRequestError(fmt.Sprintf("Failed to delete a test file. Raw error: %v", errs), nil) } return c.NoContent(http.StatusNoContent) diff --git a/cmd/serve.go b/cmd/serve.go index d63271eb..bdc391c5 100644 --- a/cmd/serve.go +++ b/cmd/serve.go @@ -78,7 +78,8 @@ func NewServeCommand(app core.App, showStartBanner bool) *cobra.Command { GetCertificate: certManager.GetCertificate, NextProtos: []string{acme.ALPNProto}, }, - ReadTimeout: 60 * time.Second, + ReadTimeout: 5 * time.Minute, + ReadHeaderTimeout: 30 * time.Second, // WriteTimeout: 60 * time.Second, // breaks sse! Handler: router, Addr: mainAddr, diff --git a/core/app.go b/core/app.go index e1bc76bb..2f09e99e 100644 --- a/core/app.go +++ b/core/app.go @@ -18,7 +18,7 @@ import ( type App interface { // Deprecated: // This method may get removed in the near future. - // It is recommended to access the logs db instance from app.Dao().DB() or + // It is recommended to access the app db instance from app.Dao().DB() or // if you want more flexibility - app.Dao().ConcurrentDB() and app.Dao().NonconcurrentDB(). // // DB returns the default app database instance. diff --git a/daos/admin.go b/daos/admin.go index 3a000023..9695273c 100644 --- a/daos/admin.go +++ b/daos/admin.go @@ -97,8 +97,8 @@ func (dao *Dao) IsAdminEmailUnique(email string, excludeIds ...string) bool { AndWhere(dbx.HashExp{"email": email}). Limit(1) - if len(excludeIds) > 0 { - query.AndWhere(dbx.NotIn("id", list.ToInterfaceSlice(excludeIds)...)) + if uniqueExcludeIds := list.NonzeroUniques(excludeIds); len(uniqueExcludeIds) > 0 { + query.AndWhere(dbx.NotIn("id", list.ToInterfaceSlice(uniqueExcludeIds)...)) } var exists bool diff --git a/daos/collection.go b/daos/collection.go index 8330f254..d057e2d0 100644 --- a/daos/collection.go +++ b/daos/collection.go @@ -65,8 +65,7 @@ func (dao *Dao) IsCollectionNameUnique(name string, excludeIds ...string) bool { AndWhere(dbx.NewExp("LOWER([[name]])={:name}", dbx.Params{"name": strings.ToLower(name)})). Limit(1) - if len(excludeIds) > 0 { - uniqueExcludeIds := list.NonzeroUniques(excludeIds) + if uniqueExcludeIds := list.NonzeroUniques(excludeIds); len(uniqueExcludeIds) > 0 { query.AndWhere(dbx.NotIn("id", list.ToInterfaceSlice(uniqueExcludeIds)...)) } @@ -85,15 +84,17 @@ func (dao *Dao) FindCollectionReferences(collection *models.Collection, excludeI collections := []*models.Collection{} query := dao.CollectionQuery() - if len(excludeIds) > 0 { - uniqueExcludeIds := list.NonzeroUniques(excludeIds) + + if uniqueExcludeIds := list.NonzeroUniques(excludeIds); len(uniqueExcludeIds) > 0 { query.AndWhere(dbx.NotIn("id", list.ToInterfaceSlice(uniqueExcludeIds)...)) } + if err := query.All(&collections); err != nil { return nil, err } result := map[*models.Collection][]*schema.SchemaField{} + for _, c := range collections { for _, f := range c.Schema.Fields() { if f.Type != schema.FieldTypeRelation { diff --git a/daos/collection_test.go b/daos/collection_test.go index 31e385ef..6bb4f8d5 100644 --- a/daos/collection_test.go +++ b/daos/collection_test.go @@ -37,7 +37,7 @@ func TestFindCollectionsByType(t *testing.T) { {"", false, 0}, {"unknown", false, 0}, {models.CollectionTypeAuth, false, 3}, - {models.CollectionTypeBase, false, 4}, + {models.CollectionTypeBase, false, 5}, } for i, scenario := range scenarios { @@ -122,7 +122,13 @@ func TestFindCollectionReferences(t *testing.T) { t.Fatal(err) } - result, err := app.Dao().FindCollectionReferences(collection, collection.Id) + result, err := app.Dao().FindCollectionReferences( + collection, + collection.Id, + // test whether "nonempty" exclude ids condition will be skipped + "", + "", + ) if err != nil { t.Fatal(err) } @@ -296,7 +302,7 @@ func TestImportCollections(t *testing.T) { name: "empty collections", jsonData: `[]`, expectError: true, - expectCollectionsCount: 7, + expectCollectionsCount: 8, }, { name: "minimal collection import", @@ -306,7 +312,7 @@ func TestImportCollections(t *testing.T) { ]`, deleteMissing: false, expectError: false, - expectCollectionsCount: 9, + expectCollectionsCount: 10, }, { name: "minimal collection import + failed beforeRecordsSync", @@ -318,7 +324,7 @@ func TestImportCollections(t *testing.T) { }, deleteMissing: false, expectError: true, - expectCollectionsCount: 7, + expectCollectionsCount: 8, }, { name: "minimal collection import + successful beforeRecordsSync", @@ -330,7 +336,7 @@ func TestImportCollections(t *testing.T) { }, deleteMissing: false, expectError: false, - expectCollectionsCount: 8, + expectCollectionsCount: 9, }, { name: "new + update + delete system collection", @@ -366,7 +372,7 @@ func TestImportCollections(t *testing.T) { ]`, deleteMissing: true, expectError: true, - expectCollectionsCount: 7, + expectCollectionsCount: 8, }, { name: "new + update + delete non-system collection", @@ -495,7 +501,7 @@ func TestImportCollections(t *testing.T) { ]`, deleteMissing: false, expectError: false, - expectCollectionsCount: 8, + expectCollectionsCount: 9, afterTestFunc: func(testApp *tests.TestApp, resultCollections []*models.Collection) { expectedCollectionFields := map[string]int{ "nologin": 1, @@ -503,6 +509,7 @@ func TestImportCollections(t *testing.T) { "demo2": 2, "demo3": 2, "demo4": 11, + "demo5": 5, "new_import": 1, } for name, expectedCount := range expectedCollectionFields { diff --git a/daos/record.go b/daos/record.go index cf467458..507c664a 100644 --- a/daos/record.go +++ b/daos/record.go @@ -84,7 +84,7 @@ func (dao *Dao) FindRecordsByIds( } } - rows := []dbx.NullStringMap{} + rows := make([]dbx.NullStringMap, 0, len(recordIds)) if err := query.All(&rows); err != nil { return nil, err } @@ -192,8 +192,7 @@ func (dao *Dao) IsRecordValueUnique( AndWhere(expr). Limit(1) - if len(excludeIds) > 0 { - uniqueExcludeIds := list.NonzeroUniques(excludeIds) + if uniqueExcludeIds := list.NonzeroUniques(excludeIds); len(uniqueExcludeIds) > 0 { query.AndWhere(dbx.NotIn(collection.Name+".id", list.ToInterfaceSlice(uniqueExcludeIds)...)) } diff --git a/forms/collection_upsert.go b/forms/collection_upsert.go index d2a99ee7..ca18948e 100644 --- a/forms/collection_upsert.go +++ b/forms/collection_upsert.go @@ -215,7 +215,7 @@ func (form *CollectionUpsert) ensureExistingRelationCollectionId(value any) erro continue } - if _, err := form.dao.FindCollectionByNameOrId(options.CollectionId); err != nil { + if err := form.dao.FindById(&models.Collection{}, options.CollectionId); err != nil { return validation.Errors{fmt.Sprint(i): validation.NewError( "validation_field_invalid_relation", "The relation collection doesn't exist.", diff --git a/forms/collections_import_test.go b/forms/collections_import_test.go index f6812a38..07611960 100644 --- a/forms/collections_import_test.go +++ b/forms/collections_import_test.go @@ -52,7 +52,7 @@ func TestCollectionsImportSubmit(t *testing.T) { "collections": [] }`, expectError: true, - expectCollectionsCount: 7, + expectCollectionsCount: 8, expectEvents: nil, }, { @@ -82,7 +82,7 @@ func TestCollectionsImportSubmit(t *testing.T) { ] }`, expectError: true, - expectCollectionsCount: 7, + expectCollectionsCount: 8, expectEvents: map[string]int{ "OnModelBeforeCreate": 2, }, @@ -101,7 +101,7 @@ func TestCollectionsImportSubmit(t *testing.T) { ] }`, expectError: true, - expectCollectionsCount: 7, + expectCollectionsCount: 8, expectEvents: map[string]int{ "OnModelBeforeCreate": 2, }, @@ -137,7 +137,7 @@ func TestCollectionsImportSubmit(t *testing.T) { ] }`, expectError: false, - expectCollectionsCount: 10, + expectCollectionsCount: 11, expectEvents: map[string]int{ "OnModelBeforeCreate": 3, "OnModelAfterCreate": 3, @@ -160,7 +160,7 @@ func TestCollectionsImportSubmit(t *testing.T) { ] }`, expectError: true, - expectCollectionsCount: 7, + expectCollectionsCount: 8, expectEvents: map[string]int{ "OnModelBeforeCreate": 1, }, @@ -202,7 +202,7 @@ func TestCollectionsImportSubmit(t *testing.T) { ] }`, expectError: true, - expectCollectionsCount: 7, + expectCollectionsCount: 8, expectEvents: map[string]int{ "OnModelBeforeDelete": 5, }, @@ -253,7 +253,7 @@ func TestCollectionsImportSubmit(t *testing.T) { ] }`, expectError: false, - expectCollectionsCount: 9, + expectCollectionsCount: 10, expectEvents: map[string]int{ "OnModelBeforeUpdate": 1, "OnModelAfterUpdate": 1, @@ -341,8 +341,8 @@ func TestCollectionsImportSubmit(t *testing.T) { "OnModelAfterUpdate": 2, "OnModelBeforeCreate": 1, "OnModelAfterCreate": 1, - "OnModelBeforeDelete": 5, - "OnModelAfterDelete": 5, + "OnModelBeforeDelete": 6, + "OnModelAfterDelete": 6, }, }, } diff --git a/forms/record_upsert.go b/forms/record_upsert.go index 7ce43ba7..ce32e6f8 100644 --- a/forms/record_upsert.go +++ b/forms/record_upsert.go @@ -7,7 +7,6 @@ import ( "log" "net/http" "regexp" - "strconv" "strings" validation "github.com/go-ozzo/ozzo-validation/v4" @@ -219,11 +218,6 @@ func (form *RecordUpsert) extractMultipartFormData( // and lods it into the form. // // File upload is supported only via multipart/form-data. -// -// To DELETE previously uploaded file(s) you can suffix the field name -// with the file index or filename (eg. `myfile.0`) and set it to null or empty string. -// For single file upload fields, you can skip the index and directly -// reset the field using its field name (eg. `myfile = null`). func (form *RecordUpsert) LoadRequest(r *http.Request, keyPrefix string) error { requestData, uploadedFiles, err := form.extractRequestData(r, keyPrefix) if err != nil { @@ -345,29 +339,24 @@ func (form *RecordUpsert) RemoveFiles(key string, toDelete ...string) error { } // LoadData loads and normalizes the provided regular record data fields into the form. -// -// To DELETE previously uploaded file(s) you can suffix the field name -// with the file index or filename (eg. `myfile.0`) and set it to null or empty string. -// For single file upload fields, you can skip the index and directly -// reset the field using its field name (eg. `myfile = null`). func (form *RecordUpsert) LoadData(requestData map[string]any) error { // load base system fields - if v, ok := requestData["id"]; ok { + if v, ok := requestData[schema.FieldNameId]; ok { form.Id = cast.ToString(v) } // load auth system fields if form.record.Collection().IsAuth() { - if v, ok := requestData["username"]; ok { + if v, ok := requestData[schema.FieldNameUsername]; ok { form.Username = cast.ToString(v) } - if v, ok := requestData["email"]; ok { + if v, ok := requestData[schema.FieldNameEmail]; ok { form.Email = cast.ToString(v) } - if v, ok := requestData["emailVisibility"]; ok { + if v, ok := requestData[schema.FieldNameEmailVisibility]; ok { form.EmailVisibility = cast.ToBool(v) } - if v, ok := requestData["verified"]; ok { + if v, ok := requestData[schema.FieldNameVerified]; ok { form.Verified = cast.ToBool(v) } if v, ok := requestData["password"]; ok { @@ -381,8 +370,16 @@ func (form *RecordUpsert) LoadData(requestData map[string]any) error { } } - // extend the record schema data with the request data - extendedData := form.record.SchemaData() + // replace modifiers (if any) + requestData = form.record.ReplaceModifers(requestData) + + // create a shallow copy of form.data + var extendedData = make(map[string]any, len(form.data)) + for k, v := range form.data { + extendedData[k] = v + } + + // extend form.data with the request data rawData, err := json.Marshal(requestData) if err != nil { return err @@ -393,8 +390,7 @@ func (form *RecordUpsert) LoadData(requestData map[string]any) error { for _, field := range form.record.Collection().Schema.Fields() { key := field.Name - value := extendedData[key] - value = field.PrepareValue(value) + value := field.PrepareValue(extendedData[key]) if field.Type != schema.FieldTypeFile { form.data[key] = value @@ -405,30 +401,32 @@ func (form *RecordUpsert) LoadData(requestData map[string]any) error { // Delete previously uploaded file(s) // ----------------------------------------------------------- - oldNames := list.ToUniqueStringSlice(form.data[key]) + oldNames := form.record.GetStringSlice(key) + submittedNames := list.ToUniqueStringSlice(value) + + // ensure that all submitted names are existing to prevent accidental files deletions + if len(submittedNames) > len(oldNames) || len(list.SubtractSlice(submittedNames, oldNames)) != 0 { + return validation.Errors{ + key: validation.NewError( + "validation_unknown_filenames", + "The field contains unknown filenames.", + ), + } + } // if empty value was set, mark all previously uploaded files for deletion - if len(list.ToUniqueStringSlice(value)) == 0 && len(oldNames) > 0 { + // otherwise check for "deleted" (aka. unsubmitted) file names + if len(submittedNames) == 0 && len(oldNames) > 0 { form.RemoveFiles(key) } else if len(oldNames) > 0 { + toDelete := []string{} - // search for individual file name to delete (eg. "file.test.png = null") for _, name := range oldNames { - if v, ok := extendedData[key+"."+name]; ok && cast.ToString(v) == "" { + // submitted as a modifier or a new array + if !list.ExistInSlice(name, submittedNames) { toDelete = append(toDelete, name) - } - } - - // search for individual file index to delete (eg. "file.0 = null") - keyExp, _ := regexp.Compile(`^` + regexp.QuoteMeta(key) + `\.\d+$`) - for indexedKey := range extendedData { - if keyExp.MatchString(indexedKey) && cast.ToString(extendedData[indexedKey]) == "" { - index, indexErr := strconv.Atoi(indexedKey[len(key)+1:]) - if indexErr != nil || index >= len(oldNames) { - continue - } - toDelete = append(toDelete, oldNames[index]) + continue } } @@ -436,6 +434,12 @@ func (form *RecordUpsert) LoadData(requestData map[string]any) error { form.RemoveFiles(key, toDelete...) } } + + // allow file key reasignments for file names sorting + // (only if all submitted values already exists) + if len(submittedNames) > 0 && len(list.SubtractSlice(submittedNames, oldNames)) == 0 { + form.data[key] = submittedNames + } } return nil diff --git a/forms/record_upsert_test.go b/forms/record_upsert_test.go index 8346e09d..80f08def 100644 --- a/forms/record_upsert_test.go +++ b/forms/record_upsert_test.go @@ -89,9 +89,10 @@ func TestRecordUpsertLoadRequestJson(t *testing.T) { "unknown": "test456", // file fields unset/delete "file_one": nil, - "file_many.0": "", // delete by index - "file_many.1": "test.png", // should be ignored - "file_many.300_WlbFWSGmW9.png": nil, // delete by filename + "file_many.0": "", // delete by index + "file_many-": []string{"test_MaWC6mWyrP.txt", "test_tC1Yc87DfC.txt"}, // multiple delete with modifier + "file_many.300_WlbFWSGmW9.png": nil, // delete by filename + "file_many.2": "test.png", // should be ignored }, }, } @@ -149,11 +150,12 @@ func TestRecordUpsertLoadRequestMultipart(t *testing.T) { "a.b.text": "test123", "a.b.unknown": "test456", // file fields unset/delete - "a.b.file_one": "", - "a.b.file_many.0": "", - "a.b.file_many.300_WlbFWSGmW9.png": "test.png", // delete by name - "a.b.file_many.1": "test.png", // should be ignored - }, "file_many") + "a.b.file_one-": "test_d61b33QdDU.txt", // delete with modifier + "a.b.file_many.0": "", // delete by index + "a.b.file_many-": "test_tC1Yc87DfC.txt", // delete with modifier + "a.b.file_many.300_WlbFWSGmW9.png": "", // delete by filename + "a.b.file_many.2": "test.png", // should be ignored + }, "a.b.file_many") if err != nil { t.Fatal(err) } @@ -191,7 +193,7 @@ func TestRecordUpsertLoadRequestMultipart(t *testing.T) { t.Fatal("Expect file_many field to be set") } manyfilesRemains := len(list.ToUniqueStringSlice(fileMany)) - expectedRemains := 2 // -2 from 3 removed + 1 new upload + expectedRemains := 3 // 5 old; 3 deleted and 1 new uploaded if manyfilesRemains != expectedRemains { t.Fatalf("Expect file_many to be %d, got %d (%v)", expectedRemains, manyfilesRemains, fileMany) } @@ -465,7 +467,7 @@ func TestRecordUpsertSubmitFailure(t *testing.T) { if v := recordAfter.Get("email"); v == "invalid" { t.Fatalf("Expected record.email not to change, got %v", v) } - if v := recordAfter.GetStringSlice("file_many"); len(v) != 3 { + if v := recordAfter.GetStringSlice("file_many"); len(v) != 5 { t.Fatalf("Expected record.file_many not to change, got %v", v) } @@ -537,8 +539,8 @@ func TestRecordUpsertSubmitSuccess(t *testing.T) { } fileMany := (recordAfter.GetStringSlice("file_many")) - if len(fileMany) != 4 { // 1 replace + 1 new - t.Fatalf("Expected 4 record.file_many, got %d (%v)", len(fileMany), fileMany) + if len(fileMany) != 6 { // 1 replace + 1 new + t.Fatalf("Expected 6 record.file_many, got %d (%v)", len(fileMany), fileMany) } for _, f := range fileMany { if !hasRecordFile(app, recordAfter, f) { @@ -1009,7 +1011,7 @@ func TestRecordUpsertAddAndRemoveFiles(t *testing.T) { } fileMany := recordAfter.GetStringSlice("file_many") - if len(fileMany) != 3 { - t.Fatalf("Expected file_many to be 3, got %v", fileMany) + if len(fileMany) != 5 { + t.Fatalf("Expected file_many to be 5, got %v", fileMany) } } diff --git a/go.mod b/go.mod index c768059d..24b768b0 100644 --- a/go.mod +++ b/go.mod @@ -4,14 +4,14 @@ go 1.18 require ( github.com/AlecAivazis/survey/v2 v2.3.6 - github.com/aws/aws-sdk-go v1.44.165 + github.com/aws/aws-sdk-go v1.44.174 github.com/disintegration/imaging v1.6.2 github.com/domodwyer/mailyak/v3 v3.3.4 github.com/dop251/goja v0.0.0-20221118162653-d4bf6fde1b86 github.com/dop251/goja_nodejs v0.0.0-20221009164102-3aa5028e57f6 github.com/fatih/color v1.13.0 github.com/gabriel-vasile/mimetype v1.4.1 - github.com/ganigeorgiev/fexpr v0.1.1 + github.com/ganigeorgiev/fexpr v0.3.0 github.com/go-ozzo/ozzo-validation/v4 v4.3.0 github.com/golang-jwt/jwt/v4 v4.4.3 github.com/labstack/echo/v5 v5.0.0-20220201181537-ed2888cfa198 @@ -20,21 +20,21 @@ require ( github.com/spf13/cast v1.5.0 github.com/spf13/cobra v1.6.1 gocloud.dev v0.27.0 - golang.org/x/crypto v0.4.0 - golang.org/x/net v0.4.0 - golang.org/x/oauth2 v0.3.0 + golang.org/x/crypto v0.5.0 + golang.org/x/net v0.5.0 + golang.org/x/oauth2 v0.4.0 golang.org/x/sync v0.1.0 - modernc.org/sqlite v1.20.0 + modernc.org/sqlite v1.20.1 ) require ( github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect github.com/aws/aws-sdk-go-v2 v1.17.3 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 // indirect - github.com/aws/aws-sdk-go-v2/config v1.18.7 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.7 // indirect + github.com/aws/aws-sdk-go-v2/config v1.18.8 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.8 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.21 // indirect - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.46 // indirect + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.47 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.27 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.21 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.28 // indirect @@ -43,10 +43,10 @@ require ( github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.22 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.21 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.21 // indirect - github.com/aws/aws-sdk-go-v2/service/s3 v1.29.6 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.11.28 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.11 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.17.7 // indirect + github.com/aws/aws-sdk-go-v2/service/s3 v1.30.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.12.0 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.18.0 // indirect github.com/aws/smithy-go v1.13.5 // indirect github.com/dlclark/regexp2 v1.7.0 // indirect github.com/dustin/go-humanize v1.0.0 // indirect @@ -60,24 +60,24 @@ require ( github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect github.com/remyoudompheng/bigfft v0.0.0-20220927061507-ef77025ab5aa // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasttemplate v1.2.2 // indirect go.opencensus.io v0.24.0 // indirect - golang.org/x/image v0.2.0 // indirect + golang.org/x/image v0.3.0 // indirect golang.org/x/mod v0.7.0 // indirect - golang.org/x/sys v0.3.0 // indirect - golang.org/x/term v0.3.0 // indirect - golang.org/x/text v0.5.0 // indirect + golang.org/x/sys v0.4.0 // indirect + golang.org/x/term v0.4.0 // indirect + golang.org/x/text v0.6.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.4.0 // indirect + golang.org/x/tools v0.5.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect - google.golang.org/api v0.105.0 // indirect + google.golang.org/api v0.106.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37 // indirect + google.golang.org/genproto v0.0.0-20230104163317-caabf589fcbf // indirect google.golang.org/grpc v1.51.0 // indirect google.golang.org/protobuf v1.28.1 // indirect lukechampine.com/uint128 v1.2.0 // indirect diff --git a/go.sum b/go.sum index c97b2793..c6a2d303 100644 --- a/go.sum +++ b/go.sum @@ -48,7 +48,9 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.13.0 h1:AYrLkB8NPdDRslNp4Jxmzrhdr03fUAIDbiGFjLWowoU= +cloud.google.com/go/compute v1.14.0 h1:hfm2+FfxVmnRlh6LpB7cg1ZNU+5edAHmW679JePztk0= cloud.google.com/go/compute/metadata v0.2.2 h1:aWKAjYaBaOSrpKl57+jnS/3fJRQnxL7TvR/u1VVbt6k= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= @@ -206,8 +208,10 @@ github.com/aws/aws-sdk-go v1.43.11/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4 github.com/aws/aws-sdk-go v1.43.31/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.44.45/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.44.68/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.44.165 h1:yaeKEU28EiSCp1T5XXinVA/qx9JFGbVZGUmj5COAMXI= -github.com/aws/aws-sdk-go v1.44.165/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.44.167 h1:kQmBhGdZkQLU7AiHShSkBJ15zr8agy0QeaxXduvyp2E= +github.com/aws/aws-sdk-go v1.44.167/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.44.174 h1:9lR4a6MKQW/t6YCG0ZKAt1GAkjdEPP8sWch/pfcuR0c= +github.com/aws/aws-sdk-go v1.44.174/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.16.8/go.mod h1:6CpKuLXg2w7If3ABZCl/qZ6rEgwtjZTn4eAf4RcEyuw= github.com/aws/aws-sdk-go-v2 v1.17.3 h1:shN7NlnVzvDUgPQ+1rLMSxY8OWRNDRYtiqe0p/PgrhY= @@ -218,15 +222,21 @@ github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10/go.mod h1:VeTZetY5 github.com/aws/aws-sdk-go-v2/config v1.15.15/go.mod h1:A1Lzyy/o21I5/s2FbyX5AevQfSVXpvvIDCoVFD0BC4E= github.com/aws/aws-sdk-go-v2/config v1.18.7 h1:V94lTcix6jouwmAsgQMAEBozVAGJMFhVj+6/++xfe3E= github.com/aws/aws-sdk-go-v2/config v1.18.7/go.mod h1:OZYsyHFL5PB9UpyS78NElgKs11qI/B5KJau2XOJDXHA= +github.com/aws/aws-sdk-go-v2/config v1.18.8 h1:lDpy0WM8AHsywOnVrOHaSMfpaiV2igOw8D7svkFkXVA= +github.com/aws/aws-sdk-go-v2/config v1.18.8/go.mod h1:5XCmmyutmzzgkpk/6NYTjeWb6lgo9N170m1j6pQkIBs= github.com/aws/aws-sdk-go-v2/credentials v1.12.10/go.mod h1:g5eIM5XRs/OzIIK81QMBl+dAuDyoLN0VYaLP+tBqEOk= github.com/aws/aws-sdk-go-v2/credentials v1.13.7 h1:qUUcNS5Z1092XBFT66IJM7mYkMwgZ8fcC8YDIbEwXck= github.com/aws/aws-sdk-go-v2/credentials v1.13.7/go.mod h1:AdCcbZXHQCjJh6NaH3pFaw8LUeBFn5+88BZGMVGuBT8= +github.com/aws/aws-sdk-go-v2/credentials v1.13.8 h1:vTrwTvv5qAwjWIGhZDSBH/oQHuIQjGmD232k01FUh6A= +github.com/aws/aws-sdk-go-v2/credentials v1.13.8/go.mod h1:lVa4OHbvgjVot4gmh1uouF1ubgexSCN92P6CJQpT0t8= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.9/go.mod h1:KDCCm4ONIdHtUloDcFvK2+vshZvx4Zmj7UMDfusuz5s= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.21 h1:j9wi1kQ8b+e0FBVHxCqCGo4kxDU175hoDHcWAi0sauU= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.21/go.mod h1:ugwW57Z5Z48bpvUyZuaPy4Kv+vEfJWnIrky7RmkBvJg= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.21/go.mod h1:iIYPrQ2rYfZiB/iADYlhj9HHZ9TTi6PqKQPAqygohbE= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.46 h1:OCX1pQ4pcqhsDV7B92HzdLWjHWOQsILvjLinpaUWhcc= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.46/go.mod h1:MxCBOcyNXGJRvfpPiH+L6n/BF9zbowthGSUZdDvQF/c= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.47 h1:E884ndKWVGt8IhtUuGhXbEsmaCvdAAkTTUDu7uAok1g= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.47/go.mod h1:KybsEsmXLO0u75FyS3F0sY4OQ97syDe8z+ISq8oEczA= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.15/go.mod h1:pWrr2OoHlT7M/Pd2y4HV3gJyPb3qj5qMmnPkKSNPYK4= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.27 h1:I3cakv2Uy1vNmmhRQmFptYDxOvBnwCdNwyw63N0RaRU= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.27/go.mod h1:a1/UpzeyBBerajpnP5nGZa9mGzsBn5cOKxm6NWQsvoI= @@ -255,6 +265,8 @@ github.com/aws/aws-sdk-go-v2/service/kms v1.18.1/go.mod h1:4PZMUkc9rXHWGVB5J9vKa github.com/aws/aws-sdk-go-v2/service/s3 v1.27.2/go.mod h1:u+566cosFI+d+motIz3USXEh6sN8Nq4GrNXSg2RXVMo= github.com/aws/aws-sdk-go-v2/service/s3 v1.29.6 h1:W8pLcSn6Uy0eXgDBUUl8M8Kxv7JCoP68ZKTD04OXLEA= github.com/aws/aws-sdk-go-v2/service/s3 v1.29.6/go.mod h1:L2l2/q76teehcW7YEsgsDjqdsDTERJeX3nOMIFlgGUE= +github.com/aws/aws-sdk-go-v2/service/s3 v1.30.0 h1:wddsyuESfviaiXk3w9N6/4iRwTg/a3gktjODY6jYQBo= +github.com/aws/aws-sdk-go-v2/service/s3 v1.30.0/go.mod h1:L2l2/q76teehcW7YEsgsDjqdsDTERJeX3nOMIFlgGUE= github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.15.14/go.mod h1:xakbH8KMsQQKqzX87uyyzTHshc/0/Df8bsTneTS5pFU= github.com/aws/aws-sdk-go-v2/service/sns v1.17.10/go.mod h1:uITsRNVMeCB3MkWpXxXw0eDz8pW4TYLzj+eyQtbhSxM= github.com/aws/aws-sdk-go-v2/service/sqs v1.19.1/go.mod h1:A94o564Gj+Yn+7QO1eLFeI7UVv3riy/YBFOfICVqFvU= @@ -262,11 +274,17 @@ github.com/aws/aws-sdk-go-v2/service/ssm v1.27.6/go.mod h1:fiFzQgj4xNOg4/wqmAiPv github.com/aws/aws-sdk-go-v2/service/sso v1.11.13/go.mod h1:d7ptRksDDgvXaUvxyHZ9SYh+iMDymm94JbVcgvSYSzU= github.com/aws/aws-sdk-go-v2/service/sso v1.11.28 h1:gItLq3zBYyRDPmqAClgzTH8PBjDQGeyptYGHIwtYYNA= github.com/aws/aws-sdk-go-v2/service/sso v1.11.28/go.mod h1:wo/B7uUm/7zw/dWhBJ4FXuw1sySU5lyIhVg1Bu2yL9A= +github.com/aws/aws-sdk-go-v2/service/sso v1.12.0 h1:/2gzjhQowRLarkkBOGPXSRnb8sQ2RVsjdG1C/UliK/c= +github.com/aws/aws-sdk-go-v2/service/sso v1.12.0/go.mod h1:wo/B7uUm/7zw/dWhBJ4FXuw1sySU5lyIhVg1Bu2yL9A= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.11 h1:KCacyVSs/wlcPGx37hcbT3IGYO8P8Jx+TgSDhAXtQMY= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.11/go.mod h1:TZSH7xLO7+phDtViY/KUp9WGCJMQkLJ/VpgkTFd5gh8= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.0 h1:Jfly6mRxk2ZOSlbCvZfKNS7TukSx1mIzhSsqZ/IGSZI= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.0/go.mod h1:TZSH7xLO7+phDtViY/KUp9WGCJMQkLJ/VpgkTFd5gh8= github.com/aws/aws-sdk-go-v2/service/sts v1.16.10/go.mod h1:cftkHYN6tCDNfkSasAmclSfl4l7cySoay8vz7p/ce0E= github.com/aws/aws-sdk-go-v2/service/sts v1.17.7 h1:9Mtq1KM6nD8/+HStvWcvYnixJ5N85DX+P+OY3kI3W2k= github.com/aws/aws-sdk-go-v2/service/sts v1.17.7/go.mod h1:+lGbb3+1ugwKrNTWcf2RT05Xmp543B06zDFTwiTLp7I= +github.com/aws/aws-sdk-go-v2/service/sts v1.18.0 h1:kOO++CYo50RcTFISESluhWEi5Prhg+gaSs4whWabiZU= +github.com/aws/aws-sdk-go-v2/service/sts v1.18.0/go.mod h1:+lGbb3+1ugwKrNTWcf2RT05Xmp543B06zDFTwiTLp7I= github.com/aws/smithy-go v1.12.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8= github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= @@ -564,8 +582,10 @@ github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmV github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= github.com/gabriel-vasile/mimetype v1.4.1 h1:TRWk7se+TOjCYgRth7+1/OYLNiRNIotknkFtf/dnN7Q= github.com/gabriel-vasile/mimetype v1.4.1/go.mod h1:05Vi0w3Y9c/lNvJOdmIwvrrAhX3rYhfQQCaf9VJcv7M= -github.com/ganigeorgiev/fexpr v0.1.1 h1:La9kYEgTcIutvOnqNZ8pOUD0O0Q/Gn15sTVEX+IeBE8= -github.com/ganigeorgiev/fexpr v0.1.1/go.mod h1:RyGiGqmeXhEQ6+mlGdnUleLHgtzzu/VGO2WtJkF5drE= +github.com/ganigeorgiev/fexpr v0.2.0 h1:j9ve0F32ENz2LKa7+5k7mf0Uzhng0L4Qsf0IwA4UHg0= +github.com/ganigeorgiev/fexpr v0.2.0/go.mod h1:RyGiGqmeXhEQ6+mlGdnUleLHgtzzu/VGO2WtJkF5drE= +github.com/ganigeorgiev/fexpr v0.3.0 h1:RwSyJBME+g/XdzlUW0paH/4VXhLHPg+rErtLeC7K8Ew= +github.com/ganigeorgiev/fexpr v0.3.0/go.mod h1:RyGiGqmeXhEQ6+mlGdnUleLHgtzzu/VGO2WtJkF5drE= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= @@ -806,6 +826,7 @@ github.com/google/wire v0.5.0/go.mod h1:ngWDr9Qvq3yZA10YrxfyGELY/AFWGVpy9c1LTRi1 github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.2.0 h1:y8Yozv7SZtlU//QXbezB6QkpuE6jMD2/gfzk4AftXjs= +github.com/googleapis/enterprise-certificate-proxy v0.2.1 h1:RY7tHKZcRlk788d5WSo/e83gOyyy742E8GSs771ySpg= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -1061,6 +1082,8 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-shellwords v1.0.6/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= @@ -1563,6 +1586,8 @@ golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8= golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80= +golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE= +golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1578,6 +1603,8 @@ golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+o golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.2.0 h1:/DcQ0w3VHKCC5p0/P2B0JpAZ9Z++V2KOo2fyU89CXBQ= golang.org/x/image v0.2.0/go.mod h1:la7oBXb9w3YFjBqaAwtynVioc1ZvOnNteUNrifGNmAI= +golang.org/x/image v0.3.0 h1:HTDXbdK9bjfSWkPzDJIw89W8CAtfFGduujWs33NLLsg= +golang.org/x/image v0.3.0/go.mod h1:fXd9211C/0VTlYuAcOhW8dY/RtEJqODXOWBDpmYBf+A= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1687,6 +1714,8 @@ golang.org/x/net v0.0.0-20220802222814-0bcc04d9c69b/go.mod h1:YDH+HFinaLZZlnHAfS golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU= golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw= +golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1714,6 +1743,8 @@ golang.org/x/oauth2 v0.0.0-20220628200809-02e64fa58f26/go.mod h1:jaDAt6Dkxork7Lm golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.3.0 h1:6l90koy8/LaBLmLu8jpHeHexzMwEita0zFfYlggy2F8= golang.org/x/oauth2 v0.3.0/go.mod h1:rQrIauxkUhJ6CuwEXwymO2/eh4xz2ZWF1nBkcxS+tGk= +golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= +golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1875,6 +1906,8 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -1884,6 +1917,8 @@ golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuX golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= +golang.org/x/term v0.4.0 h1:O7UWfv5+A2qiuulQk30kVinPoMtoIPeVaKLEgLpVkvg= +golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1896,6 +1931,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k= +golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1995,6 +2032,8 @@ golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4 golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.4.0 h1:7mTAgkunk3fr4GAloyyCasadO6h9zSsQZbwvcaIciV4= golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= +golang.org/x/tools v0.5.0 h1:+bSpV5HIeWkuvgaMfI3UmKRThoTA5ODJTUd8T17NO+4= +golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2056,6 +2095,8 @@ google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOI google.golang.org/api v0.91.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= google.golang.org/api v0.105.0 h1:t6P9Jj+6XTn4U9I2wycQai6Q/Kz7iOT+QzjJ3G2V4x8= google.golang.org/api v0.105.0/go.mod h1:qh7eD5FJks5+BcE+cjBIm6Gz8vioK7EHvnlniqXBnqI= +google.golang.org/api v0.106.0 h1:ffmW0faWCwKkpbbtvlY/K/8fUl+JKvNS5CVzRoyfCv8= +google.golang.org/api v0.106.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2166,6 +2207,8 @@ google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljW google.golang.org/genproto v0.0.0-20220802133213-ce4fa296bf78/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37 h1:jmIfw8+gSvXcZSgaFAGyInDXeWzUhvYH57G/5GKMn70= google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230104163317-caabf589fcbf h1:/JqRexUvugu6JURQ0O7RfV1EnvgrOxUV4tSjuAv0Sr0= +google.golang.org/genproto v0.0.0-20230104163317-caabf589fcbf/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -2355,6 +2398,8 @@ modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= modernc.org/sqlite v1.20.0 h1:80zmD3BGkm8BZ5fUi/4lwJQHiO3GXgIUvZRXpoIfROY= modernc.org/sqlite v1.20.0/go.mod h1:EsYz8rfOvLCiYTy5ZFsOYzoCcRMu98YYkwAcCw5YIYw= +modernc.org/sqlite v1.20.1 h1:z6qRLw72B0VfRrJjs3l6hWkzYDx1bo0WGVrBGP4ohhM= +modernc.org/sqlite v1.20.1/go.mod h1:fODt+bFmc/j8LcoCbMSkAuKuGmhxjG45KGc25N2705M= modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY= modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= modernc.org/tcl v1.15.0 h1:oY+JeD11qVVSgVvodMJsu7Edf8tr5E/7tuhF5cNYz34= diff --git a/migrations/1672577344_multi_match_migrate.go b/migrations/1672577344_multi_match_migrate.go new file mode 100644 index 00000000..6d230a43 --- /dev/null +++ b/migrations/1672577344_multi_match_migrate.go @@ -0,0 +1,215 @@ +package migrations + +import ( + "regexp" + "strings" + + "github.com/pocketbase/dbx" + "github.com/pocketbase/pocketbase/daos" + "github.com/pocketbase/pocketbase/models" + "github.com/pocketbase/pocketbase/models/schema" +) + +// This migration replaces for backward compatibility the default operators +// (=, !=, >, etc.) with their any/opt equivalent (?=, ?=, ?>, etc.) +// in any muli-rel expression collection rule. +func init() { + AppMigrations.Register(func(db dbx.Builder) error { + dao := daos.New(db) + + exprRegex := regexp.MustCompile(`([\@\'\"\w\.]+)\s*(=|!=|~|!~|>|>=|<|<=)\s*([\@\'\"\w\.]+)`) + + collections := []*models.Collection{} + if err := dao.CollectionQuery().All(&collections); err != nil { + return err + } + + findCollection := func(nameOrId string) *models.Collection { + for _, c := range collections { + if c.Id == nameOrId || c.Name == nameOrId { + return c + } + } + + return nil + } + + var isMultiRelLiteral func(mainCollection *models.Collection, literal string) bool + isMultiRelLiteral = func(mainCollection *models.Collection, literal string) bool { + if strings.HasPrefix(literal, `"`) || + strings.HasPrefix(literal, `'`) || + strings.HasPrefix(literal, "@request.method") || + strings.HasPrefix(literal, "@request.data") || + strings.HasPrefix(literal, "@request.query") { + return false + } + + if strings.HasPrefix(literal, "@collection.") { + return true + } + + parts := strings.Split(literal, ".") + if len(parts) <= 1 { + return false + } + + if strings.HasPrefix(literal, "@request.auth") && len(parts) >= 4 { + // check each auth collection + for _, c := range collections { + if c.IsAuth() && isMultiRelLiteral(c, strings.Join(parts[2:], ".")) { + return true + } + } + + return false + } + + activeCollection := mainCollection + + for i, p := range parts { + f := activeCollection.Schema.GetFieldByName(p) + if f == nil || f.Type != schema.FieldTypeRelation { + return false // not a relation field + } + + // is multi-relation and not the last prop + opt, ok := f.Options.(*schema.RelationOptions) + if ok && (opt.MaxSelect == nil || *opt.MaxSelect != 1) && i != len(parts)-1 { + return true + } + + activeCollection = findCollection(opt.CollectionId) + if activeCollection == nil { + return false + } + } + + return false + } + + // replace all multi-match operators to their any/opt equivalent, eg. "=" => "?=" + migrateRule := func(collection *models.Collection, rule *string) (*string, error) { + if rule == nil || *rule == "" { + return rule, nil + } + + newRule := *rule + parts := exprRegex.FindAllStringSubmatch(newRule, -1) + + for _, p := range parts { + if isMultiRelLiteral(collection, p[1]) || isMultiRelLiteral(collection, p[3]) { + newRule = strings.ReplaceAll(newRule, p[0], p[1]+" ?"+p[2]+" "+p[3]) + } + } + + return &newRule, nil + } + + var ruleErr error + for _, c := range collections { + c.ListRule, ruleErr = migrateRule(c, c.ListRule) + if ruleErr != nil { + return ruleErr + } + + c.ViewRule, ruleErr = migrateRule(c, c.ViewRule) + if ruleErr != nil { + return ruleErr + } + + c.CreateRule, ruleErr = migrateRule(c, c.CreateRule) + if ruleErr != nil { + return ruleErr + } + + c.UpdateRule, ruleErr = migrateRule(c, c.UpdateRule) + if ruleErr != nil { + return ruleErr + } + + c.DeleteRule, ruleErr = migrateRule(c, c.DeleteRule) + if ruleErr != nil { + return ruleErr + } + + if c.IsAuth() { + opt := c.AuthOptions() + opt.ManageRule, ruleErr = migrateRule(c, opt.ManageRule) + if ruleErr != nil { + return ruleErr + } + c.SetOptions(opt) + } + + if err := dao.Save(c); err != nil { + return err + } + } + + return nil + }, func(db dbx.Builder) error { + dao := daos.New(db) + + collections := []*models.Collection{} + if err := dao.CollectionQuery().All(&collections); err != nil { + return err + } + + anyOpRegex := regexp.MustCompile(`\?(=|!=|~|!~|>|>=|<|<=)`) + + // replace any/opt operators to their old versions, eg. "?=" => "=" + revertRule := func(rule *string) (*string, error) { + if rule == nil || *rule == "" { + return rule, nil + } + + newRule := *rule + newRule = anyOpRegex.ReplaceAllString(newRule, "${1}") + + return &newRule, nil + } + + var ruleErr error + for _, c := range collections { + c.ListRule, ruleErr = revertRule(c.ListRule) + if ruleErr != nil { + return ruleErr + } + + c.ViewRule, ruleErr = revertRule(c.ViewRule) + if ruleErr != nil { + return ruleErr + } + + c.CreateRule, ruleErr = revertRule(c.CreateRule) + if ruleErr != nil { + return ruleErr + } + + c.UpdateRule, ruleErr = revertRule(c.UpdateRule) + if ruleErr != nil { + return ruleErr + } + + c.DeleteRule, ruleErr = revertRule(c.DeleteRule) + if ruleErr != nil { + return ruleErr + } + + if c.IsAuth() { + opt := c.AuthOptions() + opt.ManageRule, ruleErr = revertRule(opt.ManageRule) + if ruleErr != nil { + return ruleErr + } + c.SetOptions(opt) + } + + if err := dao.Save(c); err != nil { + return err + } + } + + return nil + }) +} diff --git a/models/record.go b/models/record.go index 51380b49..63ead622 100644 --- a/models/record.go +++ b/models/record.go @@ -4,6 +4,8 @@ import ( "encoding/json" "errors" "fmt" + "regexp" + "strconv" "time" "github.com/pocketbase/dbx" @@ -57,7 +59,7 @@ func nullStringMapValue(data dbx.NullStringMap, key string) any { // NewRecordFromNullStringMap initializes a single new Record model // with data loaded from the provided NullStringMap. func NewRecordFromNullStringMap(collection *Collection, data dbx.NullStringMap) *Record { - resultMap := map[string]any{} + resultMap := make(map[string]any, len(data)) // load schema fields for _, field := range collection.Schema.Fields() { @@ -140,7 +142,7 @@ func (m *Record) SetExpand(expand map[string]any) { // Otherwise the "old" expanded record will be replace with the "new" one (aka. a :merge: aNew => aNew). func (m *Record) MergeExpand(expand map[string]any) { if m.expand == nil && len(expand) > 0 { - m.expand = make(map[string]any) + m.expand = make(map[string]any, len(expand)) } for key, new := range expand { @@ -194,7 +196,7 @@ func (m *Record) MergeExpand(expand map[string]any) { } } - if wasOldSlice || wasNewSlice { + if wasOldSlice || wasNewSlice || len(oldSlice) == 0 { m.expand[key] = oldSlice } else { m.expand[key] = oldSlice[0] @@ -204,7 +206,7 @@ func (m *Record) MergeExpand(expand map[string]any) { // SchemaData returns a shallow copy ONLY of the defined record schema fields data. func (m *Record) SchemaData() map[string]any { - result := map[string]any{} + result := make(map[string]any, len(m.collection.Schema.Fields())) for _, field := range m.collection.Schema.Fields() { if v, ok := m.data[field.Name]; ok { @@ -370,7 +372,7 @@ func (m *Record) Load(data map[string]any) { // ColumnValueMap implements [ColumnValueMapper] interface. func (m *Record) ColumnValueMap() map[string]any { - result := map[string]any{} + result := make(map[string]any, len(m.collection.Schema.Fields())+3) // export schema field values for _, field := range m.collection.Schema.Fields() { @@ -396,7 +398,7 @@ func (m *Record) ColumnValueMap() map[string]any { // // Fields marked as hidden will be exported only if `m.IgnoreEmailVisibility(true)` is set. func (m *Record) PublicExport() map[string]any { - result := map[string]any{} + result := make(map[string]any, len(m.collection.Schema.Fields())+5) // export unknown data fields if allowed if m.exportUnknown { @@ -457,6 +459,101 @@ func (m *Record) UnmarshalJSON(data []byte) error { return nil } +// ReplaceModifers returns a new map with applied modifier +// values based on the current record and the specified data. +// +// The resolved modifier keys will be removed. +// +// Multiple modifiers will be applied one after another, +// while reusing the previous base key value result (eg. 1; -5; +2 => -2). +// +// Example usage: +// +// newData := record.ReplaceModifers(data) +// // record: {"field": 10} +// // data: {"field+": 5} +// // newData: {"field": 15} +func (m *Record) ReplaceModifers(data map[string]any) map[string]any { + var clone = shallowCopy(data) + if len(clone) == 0 { + return clone + } + + var recordDataCache map[string]any + + // export recordData lazily + recordData := func() map[string]any { + if recordDataCache == nil { + recordDataCache = m.SchemaData() + } + return recordDataCache + } + + modifiers := schema.FieldValueModifiers() + + for _, field := range m.Collection().Schema.Fields() { + key := field.Name + + for _, m := range modifiers { + if mv, mOk := clone[key+m]; mOk { + if _, ok := clone[key]; !ok { + // get base value from the merged data + clone[key] = recordData()[key] + } + + clone[key] = field.PrepareValueWithModifier(clone[key], m, mv) + delete(clone, key+m) + } + } + + if field.Type != schema.FieldTypeFile { + continue + } + + // ----------------------------------------------------------- + // legacy file field modifiers (kept for backward compatability) + // ----------------------------------------------------------- + + var oldNames []string + var toDelete []string + if _, ok := clone[key]; ok { + oldNames = list.ToUniqueStringSlice(clone[key]) + } else { + // get oldNames from the model + oldNames = list.ToUniqueStringSlice(recordData()[key]) + } + + // search for individual file name to delete (eg. "file.test.png = null") + for _, name := range oldNames { + suffixedKey := key + "." + name + if v, ok := clone[suffixedKey]; ok && cast.ToString(v) == "" { + toDelete = append(toDelete, name) + delete(clone, suffixedKey) + continue + } + } + + // search for individual file index to delete (eg. "file.0 = null") + keyExp, _ := regexp.Compile(`^` + regexp.QuoteMeta(key) + `\.\d+$`) + for indexedKey := range clone { + if keyExp.MatchString(indexedKey) && cast.ToString(clone[indexedKey]) == "" { + index, indexErr := strconv.Atoi(indexedKey[len(key)+1:]) + if indexErr != nil || index < 0 || index >= len(oldNames) { + continue + } + toDelete = append(toDelete, oldNames[index]) + delete(clone, indexedKey) + } + } + + if toDelete != nil { + clone[key] = field.PrepareValue(list.SubtractSlice(oldNames, toDelete)) + } + } + + return clone +} + // getNormalizeDataValueForDB returns the "key" data value formatted for db storage. func (m *Record) getNormalizeDataValueForDB(key string) any { var val any diff --git a/models/record_test.go b/models/record_test.go index bd47f3ef..a2380f39 100644 --- a/models/record_test.go +++ b/models/record_test.go @@ -138,7 +138,7 @@ func TestNewRecordFromNullStringMap(t *testing.T) { Valid: true, }, "field5": sql.NullString{ - String: `["test1","test2"]`, // will select only the first elem + String: `["test1","test2"]`, // will select only the last elem Valid: true, }, "field6": sql.NullString{ @@ -157,11 +157,11 @@ func TestNewRecordFromNullStringMap(t *testing.T) { }{ { models.CollectionTypeBase, - `{"collectionId":"","collectionName":"test","created":"2022-01-01 10:00:00.123Z","field1":"test","field2":"","field3":true,"field4":123.123,"field5":"test1","field6":["test"],"id":"test_id","updated":"2022-01-01 10:00:00.456Z"}`, + `{"collectionId":"","collectionName":"test","created":"2022-01-01 10:00:00.123Z","field1":"test","field2":"","field3":true,"field4":123.123,"field5":"test2","field6":["test"],"id":"test_id","updated":"2022-01-01 10:00:00.456Z"}`, }, { models.CollectionTypeAuth, - `{"collectionId":"","collectionName":"test","created":"2022-01-01 10:00:00.123Z","email":"test_email","emailVisibility":true,"field1":"test","field2":"","field3":true,"field4":123.123,"field5":"test1","field6":["test"],"id":"test_id","updated":"2022-01-01 10:00:00.456Z","username":"test_username","verified":false}`, + `{"collectionId":"","collectionName":"test","created":"2022-01-01 10:00:00.123Z","email":"test_email","emailVisibility":true,"field1":"test","field2":"","field3":true,"field4":123.123,"field5":"test2","field6":["test"],"id":"test_id","updated":"2022-01-01 10:00:00.456Z","username":"test_username","verified":false}`, }, } @@ -1425,6 +1425,109 @@ func TestRecordUnmarshalJSON(t *testing.T) { } } +func TestRecordReplaceModifers(t *testing.T) { + collection := &models.Collection{ + Schema: schema.NewSchema( + &schema.SchemaField{ + Name: "text", + Type: schema.FieldTypeText, + }, + &schema.SchemaField{ + Name: "number", + Type: schema.FieldTypeNumber, + }, + &schema.SchemaField{ + Name: "rel_one", + Type: schema.FieldTypeRelation, + Options: &schema.RelationOptions{MaxSelect: types.Pointer(1)}, + }, + &schema.SchemaField{ + Name: "rel_many", + Type: schema.FieldTypeRelation, + }, + &schema.SchemaField{ + Name: "select_one", + Type: schema.FieldTypeSelect, + Options: &schema.SelectOptions{MaxSelect: 1}, + }, + &schema.SchemaField{ + Name: "select_many", + Type: schema.FieldTypeSelect, + Options: &schema.SelectOptions{MaxSelect: 10}, + }, + &schema.SchemaField{ + Name: "file_one", + Type: schema.FieldTypeFile, + Options: &schema.FileOptions{MaxSelect: 1}, + }, + &schema.SchemaField{ + Name: "file_one_index", + Type: schema.FieldTypeFile, + Options: &schema.FileOptions{MaxSelect: 1}, + }, + &schema.SchemaField{ + Name: "file_one_name", + Type: schema.FieldTypeFile, + Options: &schema.FileOptions{MaxSelect: 1}, + }, + &schema.SchemaField{ + Name: "file_many", + Type: schema.FieldTypeFile, + Options: &schema.FileOptions{MaxSelect: 10}, + }, + ), + } + + record := models.NewRecord(collection) + + record.Load(map[string]any{ + "text": "test", + "number": 10, + "rel_one": "a", + "rel_many": []string{"a", "b"}, + "select_one": "a", + "select_many": []string{"a", "b", "c"}, + "file_one": "a", + "file_one_index": "b", + "file_one_name": "c", + "file_many": []string{"a", "b", "c", "d", "e", "f"}, + }) + + result := record.ReplaceModifers(map[string]any{ + "text-": "m-", + "text+": "m+", + "number-": 3, + "number+": 5, + "rel_one-": "a", + "rel_one+": "b", + "rel_many-": []string{"a"}, + "rel_many+": []string{"c", "d", "e"}, + "select_one-": "a", + "select_one+": "c", + "select_many-": []string{"b", "c"}, + "select_many+": []string{"d", "e"}, + "file_one+": "skip", // should be ignored + "file_one-": "a", + "file_one_index.0": "", + "file_one_name.c": "", + "file_many+": []string{"e", "f"}, // should be ignored + "file_many-": []string{"c", "d"}, + "file_many.f": nil, + "file_many.0": nil, + }) + + raw, err := json.Marshal(result) + if err != nil { + t.Fatal(err) + } + + expected := `{"file_many":["b","e"],"file_one":"","file_one_index":"","file_one_name":"","number":12,"rel_many":["b","c","d","e"],"rel_one":"b","select_many":["a","d","e"],"select_one":"c","text":"test"}` + + if v := string(raw); v != expected { + t.Fatalf("Expected \n%s, \ngot \n%s", expected, v) + } +} + // ------------------------------------------------------------------- // Auth helpers: // ------------------------------------------------------------------- diff --git a/models/request_data.go b/models/request_data.go index a129c8e7..693795c3 100644 --- a/models/request_data.go +++ b/models/request_data.go @@ -1,5 +1,11 @@ package models +import ( + "strings" + + "github.com/pocketbase/pocketbase/models/schema" +) + // RequestData defines a HTTP request data struct, usually used // as part of the `@request.*` filter resolver. type RequestData struct { @@ -9,3 +15,18 @@ type RequestData struct { AuthRecord *Record `json:"authRecord"` Admin *Admin `json:"admin"` } + +// HasModifierDataKeys loosely checks if the current struct has any modifier Data keys. +func (r *RequestData) HasModifierDataKeys() bool { + allModifiers := schema.FieldValueModifiers() + + for key := range r.Data { + for _, m := range allModifiers { + if strings.HasSuffix(key, m) { + return true + } + } + } + + return false +} diff --git a/models/request_data_test.go b/models/request_data_test.go new file mode 100644 index 00000000..5acedc12 --- /dev/null +++ b/models/request_data_test.go @@ -0,0 +1,58 @@ +package models_test + +import ( + "testing" + + "github.com/pocketbase/pocketbase/models" +) + +func TestRequestDataHasModifierDataKeys(t *testing.T) { + scenarios := []struct { + name string + requestData *models.RequestData + expected bool + }{ + { + "empty", + &models.RequestData{}, + false, + }, + { + "Data with regular fields", + &models.RequestData{ + Query: map[string]any{"data+": "demo"}, // should be ignored + Data: map[string]any{"a": 123, "b": "test", "c.d": false}, + }, + false, + }, + { + "Data with +modifier fields", + &models.RequestData{ + Data: map[string]any{"a+": 123, "b": "test", "c.d": false}, + }, + true, + }, + { + "Data with -modifier fields", + &models.RequestData{ + Data: map[string]any{"a": 123, "b-": "test", "c.d": false}, + }, + true, + }, + { + "Data with mixed modifier fields", + &models.RequestData{ + Data: map[string]any{"a": 123, "b-": "test", "c.d+": false}, + }, + true, + }, + } + + for _, s := range scenarios { + result := s.requestData.HasModifierDataKeys() + + if result != s.expected { + t.Fatalf("[%s] Expected %v, got %v", s.name, s.expected, result) + } + } +} diff --git a/models/schema/schema_field.go b/models/schema/schema_field.go index 4e3052a7..5763df59 100644 --- a/models/schema/schema_field.go +++ b/models/schema/schema_field.go @@ -15,22 +15,36 @@ import ( var schemaFieldNameRegex = regexp.MustCompile(`^\w+$`) +// field value modifiers +const ( + FieldValueModifierAdd string = "+" + FieldValueModifierSubtract string = "-" +) + +// FieldValueModifiers returns a list with all available field modifier tokens. +func FieldValueModifiers() []string { + return []string{ + FieldValueModifierAdd, + FieldValueModifierSubtract, + } +} + // commonly used field names const ( - FieldNameId = "id" - FieldNameCreated = "created" - FieldNameUpdated = "updated" - FieldNameCollectionId = "collectionId" - FieldNameCollectionName = "collectionName" - FieldNameExpand = "expand" - FieldNameUsername = "username" - FieldNameEmail = "email" - FieldNameEmailVisibility = "emailVisibility" - FieldNameVerified = "verified" - FieldNameTokenKey = "tokenKey" - FieldNamePasswordHash = "passwordHash" - FieldNameLastResetSentAt = "lastResetSentAt" - FieldNameLastVerificationSentAt = "lastVerificationSentAt" + FieldNameId string = "id" + FieldNameCreated string = "created" + FieldNameUpdated string = "updated" + FieldNameCollectionId string = "collectionId" + FieldNameCollectionName string = "collectionName" + FieldNameExpand string = "expand" + FieldNameUsername string = "username" + FieldNameEmail string = "email" + FieldNameEmailVisibility string = "emailVisibility" + FieldNameVerified string = "verified" + FieldNameTokenKey string = "tokenKey" + FieldNamePasswordHash string = "passwordHash" + FieldNameLastResetSentAt string = "lastResetSentAt" + FieldNameLastVerificationSentAt string = "lastVerificationSentAt" ) // BaseModelFieldNames returns the field names that all models have (id, created, updated). @@ -168,8 +182,8 @@ func (f SchemaField) Validate() error { f.InitOptions() excludeNames := BaseModelFieldNames() - // exclude filter literals - excludeNames = append(excludeNames, "null", "true", "false") + // exclude special filter literals + excludeNames = append(excludeNames, "null", "true", "false", "isset") // exclude system literals excludeNames = append(excludeNames, SystemFieldNames()...) @@ -276,7 +290,7 @@ func (f *SchemaField) PrepareValue(value any) any { options, _ := f.Options.(*SelectOptions) if options.MaxSelect <= 1 { if len(val) > 0 { - return val[0] + return val[len(val)-1] // the last selected } return "" } @@ -288,7 +302,7 @@ func (f *SchemaField) PrepareValue(value any) any { options, _ := f.Options.(*FileOptions) if options.MaxSelect <= 1 { if len(val) > 0 { - return val[0] + return val[len(val)-1] // the last selected } return "" } @@ -300,7 +314,7 @@ func (f *SchemaField) PrepareValue(value any) any { options, _ := f.Options.(*RelationOptions) if options.MaxSelect != nil && *options.MaxSelect <= 1 { if len(ids) > 0 { - return ids[0] + return ids[len(ids)-1] // the last selected } return "" } @@ -311,6 +325,46 @@ func (f *SchemaField) PrepareValue(value any) any { } } +// PrepareValueWithModifier returns normalized and properly formatted field value +// by "merging" baseValue with the modifierValue based on the specified modifier (+ or -). +func (f *SchemaField) PrepareValueWithModifier(baseValue any, modifier string, modifierValue any) any { + resolvedValue := baseValue + + switch f.Type { + case FieldTypeNumber: + switch modifier { + case FieldValueModifierAdd: + resolvedValue = cast.ToFloat64(baseValue) + cast.ToFloat64(modifierValue) + case FieldValueModifierSubtract: + resolvedValue = cast.ToFloat64(baseValue) - cast.ToFloat64(modifierValue) + } + case FieldTypeSelect, FieldTypeRelation: + switch modifier { + case FieldValueModifierAdd: + resolvedValue = append( + list.ToUniqueStringSlice(baseValue), + list.ToUniqueStringSlice(modifierValue)..., + ) + case FieldValueModifierSubtract: + resolvedValue = list.SubtractSlice( + list.ToUniqueStringSlice(baseValue), + list.ToUniqueStringSlice(modifierValue), + ) + } + case FieldTypeFile: + // note: file for now supports only the subtract modifier + switch modifier { + case FieldValueModifierSubtract: + resolvedValue = list.SubtractSlice( + list.ToUniqueStringSlice(baseValue), + list.ToUniqueStringSlice(modifierValue), + ) + } + } + + return f.PrepareValue(resolvedValue) +} + // ------------------------------------------------------------------- // FieldOptions interfaces that defines common methods that every field options struct has. diff --git a/models/schema/schema_field_test.go b/models/schema/schema_field_test.go index 3a9db74b..3b609085 100644 --- a/models/schema/schema_field_test.go +++ b/models/schema/schema_field_test.go @@ -603,7 +603,7 @@ func TestSchemaFieldPrepareValue(t *testing.T) { {schema.SchemaField{Type: schema.FieldTypeSelect}, "", `""`}, {schema.SchemaField{Type: schema.FieldTypeSelect}, 123, `"123"`}, {schema.SchemaField{Type: schema.FieldTypeSelect}, "test", `"test"`}, - {schema.SchemaField{Type: schema.FieldTypeSelect}, []string{"test1", "test2"}, `"test1"`}, + {schema.SchemaField{Type: schema.FieldTypeSelect}, []string{"test1", "test2"}, `"test2"`}, { // no values validation/filtering schema.SchemaField{ @@ -680,7 +680,7 @@ func TestSchemaFieldPrepareValue(t *testing.T) { {schema.SchemaField{Type: schema.FieldTypeFile}, "", `""`}, {schema.SchemaField{Type: schema.FieldTypeFile}, 123, `"123"`}, {schema.SchemaField{Type: schema.FieldTypeFile}, "test", `"test"`}, - {schema.SchemaField{Type: schema.FieldTypeFile}, []string{"test1", "test2"}, `"test1"`}, + {schema.SchemaField{Type: schema.FieldTypeFile}, []string{"test1", "test2"}, `"test2"`}, // file (multiple) { schema.SchemaField{ @@ -785,7 +785,7 @@ func TestSchemaFieldPrepareValue(t *testing.T) { { schema.SchemaField{Type: schema.FieldTypeRelation, Options: &schema.RelationOptions{MaxSelect: types.Pointer(1)}}, []string{"1ba88b4f-e9da-42f0-9764-9a55c953e724", "2ba88b4f-e9da-42f0-9764-9a55c953e724"}, - `"1ba88b4f-e9da-42f0-9764-9a55c953e724"`, + `"2ba88b4f-e9da-42f0-9764-9a55c953e724"`, }, // relation (multiple) { @@ -863,6 +863,696 @@ func TestSchemaFieldPrepareValue(t *testing.T) { } } +func TestSchemaFieldPrepareValueWithModifier(t *testing.T) { + scenarios := []struct { + name string + field schema.SchemaField + baseValue any + modifier string + modifierValue any + expectJson string + }{ + // text + { + "text with '+' modifier", + schema.SchemaField{Type: schema.FieldTypeText}, + "base", + "+", + "new", + `"base"`, + }, + { + "text with '-' modifier", + schema.SchemaField{Type: schema.FieldTypeText}, + "base", + "-", + "new", + `"base"`, + }, + { + "text with unknown modifier", + schema.SchemaField{Type: schema.FieldTypeText}, + "base", + "?", + "new", + `"base"`, + }, + { + "text cast check", + schema.SchemaField{Type: schema.FieldTypeText}, + 123, + "?", + "new", + `"123"`, + }, + + // number + { + "number with '+' modifier", + schema.SchemaField{Type: schema.FieldTypeNumber}, + 1, + "+", + 4, + `5`, + }, + { + "number with '-' modifier", + schema.SchemaField{Type: schema.FieldTypeNumber}, + 1, + "-", + 4, + `-3`, + }, + { + "number with unknown modifier", + schema.SchemaField{Type: schema.FieldTypeNumber}, + "1", + "?", + 4, + `1`, + }, + { + "number cast check", + schema.SchemaField{Type: schema.FieldTypeNumber}, + "test", + "+", + "4", + `4`, + }, + + // bool + { + "bool with '+' modifier", + schema.SchemaField{Type: schema.FieldTypeBool}, + true, + "+", + false, + `true`, + }, + { + "bool with '-' modifier", + schema.SchemaField{Type: schema.FieldTypeBool}, + true, + "-", + false, + `true`, + }, + { + "bool with unknown modifier", + schema.SchemaField{Type: schema.FieldTypeBool}, + true, + "?", + false, + `true`, + }, + { + "bool cast check", + schema.SchemaField{Type: schema.FieldTypeBool}, + "true", + "?", + false, + `true`, + }, + + // email + { + "email with '+' modifier", + schema.SchemaField{Type: schema.FieldTypeEmail}, + "base", + "+", + "new", + `"base"`, + }, + { + "email with '-' modifier", + schema.SchemaField{Type: schema.FieldTypeEmail}, + "base", + "-", + "new", + `"base"`, + }, + { + "email with unknown modifier", + schema.SchemaField{Type: schema.FieldTypeEmail}, + "base", + "?", + "new", + `"base"`, + }, + { + "email cast check", + schema.SchemaField{Type: schema.FieldTypeEmail}, + 123, + "?", + "new", + `"123"`, + }, + + // url + { + "url with '+' modifier", + schema.SchemaField{Type: schema.FieldTypeUrl}, + "base", + "+", + "new", + `"base"`, + }, + { + "url with '-' modifier", + schema.SchemaField{Type: schema.FieldTypeUrl}, + "base", + "-", + "new", + `"base"`, + }, + { + "url with unknown modifier", + schema.SchemaField{Type: schema.FieldTypeUrl}, + "base", + "?", + "new", + `"base"`, + }, + { + "url cast check", + schema.SchemaField{Type: schema.FieldTypeUrl}, + 123, + "-", + "new", + `"123"`, + }, + + // date + { + "date with '+' modifier", + schema.SchemaField{Type: schema.FieldTypeDate}, + "2023-01-01 00:00:00.123", + "+", + "2023-02-01 00:00:00.456", + `"2023-01-01 00:00:00.123Z"`, + }, + { + "date with '-' modifier", + schema.SchemaField{Type: schema.FieldTypeDate}, + "2023-01-01 00:00:00.123Z", + "-", + "2023-02-01 00:00:00.456Z", + `"2023-01-01 00:00:00.123Z"`, + }, + { + "date with unknown modifier", + schema.SchemaField{Type: schema.FieldTypeDate}, + "2023-01-01 00:00:00.123", + "?", + "2023-01-01 00:00:00.456", + `"2023-01-01 00:00:00.123Z"`, + }, + { + "date cast check", + schema.SchemaField{Type: schema.FieldTypeDate}, + 1672524000, // 2022-12-31 22:00:00.000Z + "+", + 100, + `"2022-12-31 22:00:00.000Z"`, + }, + + // json + { + "json with '+' modifier", + schema.SchemaField{Type: schema.FieldTypeJson}, + 10, + "+", + 5, + `10`, + }, + { + "json with '+' modifier (slice)", + schema.SchemaField{Type: schema.FieldTypeJson}, + []string{"a", "b"}, + "+", + "c", + `["a","b"]`, + }, + { + "json with '-' modifier", + schema.SchemaField{Type: schema.FieldTypeJson}, + 10, + "-", + 5, + `10`, + }, + { + "json with '-' modifier (slice)", + schema.SchemaField{Type: schema.FieldTypeJson}, + `["a","b"]`, + "-", + "c", + `["a","b"]`, + }, + { + "json with unknown modifier", + schema.SchemaField{Type: schema.FieldTypeJson}, + `"base"`, + "?", + `"new"`, + `"base"`, + }, + + // single select + { + "single select with '+' modifier (empty base)", + schema.SchemaField{Type: schema.FieldTypeSelect, Options: &schema.SelectOptions{MaxSelect: 1}}, + "", + "+", + "b", + `"b"`, + }, + { + "single select with '+' modifier (nonempty base)", + schema.SchemaField{Type: schema.FieldTypeSelect, Options: &schema.SelectOptions{MaxSelect: 1}}, + "a", + "+", + "b", + `"b"`, + }, + { + "single select with '-' modifier (empty base)", + schema.SchemaField{Type: schema.FieldTypeSelect, Options: &schema.SelectOptions{MaxSelect: 1}}, + "", + "-", + "a", + `""`, + }, + { + "single select with '-' modifier (nonempty base and empty modifier value)", + schema.SchemaField{Type: schema.FieldTypeSelect, Options: &schema.SelectOptions{MaxSelect: 1}}, + "a", + "-", + "", + `"a"`, + }, + { + "single select with '-' modifier (nonempty base and different value)", + schema.SchemaField{Type: schema.FieldTypeSelect, Options: &schema.SelectOptions{MaxSelect: 1}}, + "a", + "-", + "b", + `"a"`, + }, + { + "single select with '-' modifier (nonempty base and matching value)", + schema.SchemaField{Type: schema.FieldTypeSelect, Options: &schema.SelectOptions{MaxSelect: 1}}, + "a", + "-", + "a", + `""`, + }, + { + "single select with '-' modifier (nonempty base and matching value in a slice)", + schema.SchemaField{Type: schema.FieldTypeSelect, Options: &schema.SelectOptions{MaxSelect: 1}}, + "a", + "-", + []string{"b", "a", "c", "123"}, + `""`, + }, + { + "single select with unknown modifier (nonempty)", + schema.SchemaField{Type: schema.FieldTypeSelect, Options: &schema.SelectOptions{MaxSelect: 1}}, + "", + "?", + "a", + `""`, + }, + + // multi select + { + "multi select with '+' modifier (empty base)", + schema.SchemaField{Type: schema.FieldTypeSelect, Options: &schema.SelectOptions{MaxSelect: 10}}, + nil, + "+", + "b", + `["b"]`, + }, + { + "multi select with '+' modifier (nonempty base)", + schema.SchemaField{Type: schema.FieldTypeSelect, Options: &schema.SelectOptions{MaxSelect: 10}}, + []string{"a"}, + "+", + []string{"b", "c"}, + `["a","b","c"]`, + }, + { + "multi select with '+' modifier (nonempty base; already existing value)", + schema.SchemaField{Type: schema.FieldTypeSelect, Options: &schema.SelectOptions{MaxSelect: 10}}, + []string{"a", "b"}, + "+", + "b", + `["a","b"]`, + }, + { + "multi select with '-' modifier (empty base)", + schema.SchemaField{Type: schema.FieldTypeSelect, Options: &schema.SelectOptions{MaxSelect: 10}}, + nil, + "-", + []string{"a"}, + `[]`, + }, + { + "multi select with '-' modifier (nonempty base and empty modifier value)", + schema.SchemaField{Type: schema.FieldTypeSelect, Options: &schema.SelectOptions{MaxSelect: 10}}, + "a", + "-", + "", + `["a"]`, + }, + { + "multi select with '-' modifier (nonempty base and different value)", + schema.SchemaField{Type: schema.FieldTypeSelect, Options: &schema.SelectOptions{MaxSelect: 10}}, + "a", + "-", + "b", + `["a"]`, + }, + { + "multi select with '-' modifier (nonempty base and matching value)", + schema.SchemaField{Type: schema.FieldTypeSelect, Options: &schema.SelectOptions{MaxSelect: 10}}, + []string{"a", "b", "c", "d"}, + "-", + "c", + `["a","b","d"]`, + }, + { + "multi select with '-' modifier (nonempty base and matching value in a slice)", + schema.SchemaField{Type: schema.FieldTypeSelect, Options: &schema.SelectOptions{MaxSelect: 10}}, + []string{"a", "b", "c", "d"}, + "-", + []string{"b", "a", "123"}, + `["c","d"]`, + }, + { + "multi select with unknown modifier (nonempty)", + schema.SchemaField{Type: schema.FieldTypeSelect, Options: &schema.SelectOptions{MaxSelect: 10}}, + []string{"a", "b"}, + "?", + "a", + `["a","b"]`, + }, + + // single relation + { + "single relation with '+' modifier (empty base)", + schema.SchemaField{Type: schema.FieldTypeRelation, Options: &schema.RelationOptions{MaxSelect: types.Pointer(1)}}, + "", + "+", + "b", + `"b"`, + }, + { + "single relation with '+' modifier (nonempty base)", + schema.SchemaField{Type: schema.FieldTypeRelation, Options: &schema.RelationOptions{MaxSelect: types.Pointer(1)}}, + "a", + "+", + "b", + `"b"`, + }, + { + "single relation with '-' modifier (empty base)", + schema.SchemaField{Type: schema.FieldTypeRelation, Options: &schema.RelationOptions{MaxSelect: types.Pointer(1)}}, + "", + "-", + "a", + `""`, + }, + { + "single relation with '-' modifier (nonempty base and empty modifier value)", + schema.SchemaField{Type: schema.FieldTypeRelation, Options: &schema.RelationOptions{MaxSelect: types.Pointer(1)}}, + "a", + "-", + "", + `"a"`, + }, + { + "single relation with '-' modifier (nonempty base and different value)", + schema.SchemaField{Type: schema.FieldTypeRelation, Options: &schema.RelationOptions{MaxSelect: types.Pointer(1)}}, + "a", + "-", + "b", + `"a"`, + }, + { + "single relation with '-' modifier (nonempty base and matching value)", + schema.SchemaField{Type: schema.FieldTypeRelation, Options: &schema.RelationOptions{MaxSelect: types.Pointer(1)}}, + "a", + "-", + "a", + `""`, + }, + { + "single relation with '-' modifier (nonempty base and matching value in a slice)", + schema.SchemaField{Type: schema.FieldTypeRelation, Options: &schema.RelationOptions{MaxSelect: types.Pointer(1)}}, + "a", + "-", + []string{"b", "a", "c", "123"}, + `""`, + }, + { + "single relation with unknown modifier (nonempty)", + schema.SchemaField{Type: schema.FieldTypeRelation, Options: &schema.RelationOptions{MaxSelect: types.Pointer(1)}}, + "", + "?", + "a", + `""`, + }, + + // multi relation + { + "multi relation with '+' modifier (empty base)", + schema.SchemaField{Type: schema.FieldTypeRelation}, + nil, + "+", + "b", + `["b"]`, + }, + { + "multi relation with '+' modifier (nonempty base)", + schema.SchemaField{Type: schema.FieldTypeRelation}, + []string{"a"}, + "+", + []string{"b", "c"}, + `["a","b","c"]`, + }, + { + "multi relation with '+' modifier (nonempty base; already existing value)", + schema.SchemaField{Type: schema.FieldTypeRelation}, + []string{"a", "b"}, + "+", + "b", + `["a","b"]`, + }, + { + "multi relation with '-' modifier (empty base)", + schema.SchemaField{Type: schema.FieldTypeRelation}, + nil, + "-", + []string{"a"}, + `[]`, + }, + { + "multi relation with '-' modifier (nonempty base and empty modifier value)", + schema.SchemaField{Type: schema.FieldTypeRelation}, + "a", + "-", + "", + `["a"]`, + }, + { + "multi relation with '-' modifier (nonempty base and different value)", + schema.SchemaField{Type: schema.FieldTypeRelation}, + "a", + "-", + "b", + `["a"]`, + }, + { + "multi relation with '-' modifier (nonempty base and matching value)", + schema.SchemaField{Type: schema.FieldTypeRelation}, + []string{"a", "b", "c", "d"}, + "-", + "c", + `["a","b","d"]`, + }, + { + "multi relation with '-' modifier (nonempty base and matching value in a slice)", + schema.SchemaField{Type: schema.FieldTypeRelation}, + []string{"a", "b", "c", "d"}, + "-", + []string{"b", "a", "123"}, + `["c","d"]`, + }, + { + "multi relation with unknown modifier (nonempty)", + schema.SchemaField{Type: schema.FieldTypeRelation}, + []string{"a", "b"}, + "?", + "a", + `["a","b"]`, + }, + + // single file + { + "single file with '+' modifier (empty base)", + schema.SchemaField{Type: schema.FieldTypeFile, Options: &schema.FileOptions{MaxSelect: 1}}, + "", + "+", + "b", + `""`, + }, + { + "single file with '+' modifier (nonempty base)", + schema.SchemaField{Type: schema.FieldTypeFile, Options: &schema.FileOptions{MaxSelect: 1}}, + "a", + "+", + "b", + `"a"`, + }, + { + "single file with '-' modifier (empty base)", + schema.SchemaField{Type: schema.FieldTypeFile, Options: &schema.FileOptions{MaxSelect: 1}}, + "", + "-", + "a", + `""`, + }, + { + "single file with '-' modifier (nonempty base and empty modifier value)", + schema.SchemaField{Type: schema.FieldTypeFile, Options: &schema.FileOptions{MaxSelect: 1}}, + "a", + "-", + "", + `"a"`, + }, + { + "single file with '-' modifier (nonempty base and different value)", + schema.SchemaField{Type: schema.FieldTypeFile, Options: &schema.FileOptions{MaxSelect: 1}}, + "a", + "-", + "b", + `"a"`, + }, + { + "single file with '-' modifier (nonempty base and matching value)", + schema.SchemaField{Type: schema.FieldTypeFile, Options: &schema.FileOptions{MaxSelect: 1}}, + "a", + "-", + "a", + `""`, + }, + { + "single file with '-' modifier (nonempty base and matching value in a slice)", + schema.SchemaField{Type: schema.FieldTypeFile, Options: &schema.FileOptions{MaxSelect: 1}}, + "a", + "-", + []string{"b", "a", "c", "123"}, + `""`, + }, + { + "single file with unknown modifier (nonempty)", + schema.SchemaField{Type: schema.FieldTypeFile, Options: &schema.FileOptions{MaxSelect: 1}}, + "", + "?", + "a", + `""`, + }, + + // multi file + { + "multi file with '+' modifier (empty base)", + schema.SchemaField{Type: schema.FieldTypeFile, Options: &schema.FileOptions{MaxSelect: 10}}, + nil, + "+", + "b", + `[]`, + }, + { + "multi file with '+' modifier (nonempty base)", + schema.SchemaField{Type: schema.FieldTypeFile, Options: &schema.FileOptions{MaxSelect: 10}}, + []string{"a"}, + "+", + []string{"b", "c"}, + `["a"]`, + }, + { + "multi file with '+' modifier (nonempty base; already existing value)", + schema.SchemaField{Type: schema.FieldTypeFile, Options: &schema.FileOptions{MaxSelect: 10}}, + []string{"a", "b"}, + "+", + "b", + `["a","b"]`, + }, + { + "multi file with '-' modifier (empty base)", + schema.SchemaField{Type: schema.FieldTypeFile, Options: &schema.FileOptions{MaxSelect: 10}}, + nil, + "-", + []string{"a"}, + `[]`, + }, + { + "multi file with '-' modifier (nonempty base and empty modifier value)", + schema.SchemaField{Type: schema.FieldTypeFile, Options: &schema.FileOptions{MaxSelect: 10}}, + "a", + "-", + "", + `["a"]`, + }, + { + "multi file with '-' modifier (nonempty base and different value)", + schema.SchemaField{Type: schema.FieldTypeFile, Options: &schema.FileOptions{MaxSelect: 10}}, + "a", + "-", + "b", + `["a"]`, + }, + { + "multi file with '-' modifier (nonempty base and matching value)", + schema.SchemaField{Type: schema.FieldTypeFile, Options: &schema.FileOptions{MaxSelect: 10}}, + []string{"a", "b", "c", "d"}, + "-", + "c", + `["a","b","d"]`, + }, + { + "multi file with '-' modifier (nonempty base and matching value in a slice)", + schema.SchemaField{Type: schema.FieldTypeFile, Options: &schema.FileOptions{MaxSelect: 10}}, + []string{"a", "b", "c", "d"}, + "-", + []string{"b", "a", "123"}, + `["c","d"]`, + }, + { + "multi file with unknown modifier (nonempty)", + schema.SchemaField{Type: schema.FieldTypeFile, Options: &schema.FileOptions{MaxSelect: 10}}, + []string{"a", "b"}, + "?", + "a", + `["a","b"]`, + }, + } + + for _, s := range scenarios { + result := s.field.PrepareValueWithModifier(s.baseValue, s.modifier, s.modifierValue) + + encoded, err := json.Marshal(result) + if err != nil { + t.Fatalf("[%s] %v", s.name, err) + } + + if string(encoded) != s.expectJson { + t.Fatalf("[%s], Expected %v, got %v", s.name, s.expectJson, string(encoded)) + } + } +} + // ------------------------------------------------------------------- type fieldOptionsScenario struct { @@ -1306,7 +1996,7 @@ func TestRelationOptionsValidate(t *testing.T) { []string{"maxSelect"}, }, { - "MaxSelect > 0 && non-empty CollectionId", + "MaxSelect > 0 && nonempty CollectionId", schema.RelationOptions{ CollectionId: "abc", MaxSelect: types.Pointer(1), diff --git a/plugins/jsvm/migrations.go b/plugins/jsvm/migrations.go index 2709bf3a..2544109b 100644 --- a/plugins/jsvm/migrations.go +++ b/plugins/jsvm/migrations.go @@ -1,8 +1,10 @@ package jsvm import ( + "fmt" "os" "path/filepath" + "strings" "github.com/dop251/goja_nodejs/console" "github.com/dop251/goja_nodejs/require" @@ -75,7 +77,7 @@ func RegisterMigrations(app core.App, options *MigrationsOptions) error { _, err := vm.RunString(string(content)) if err != nil { - return err + return fmt.Errorf("failed to run migration %s: %w", file, err) } } @@ -97,8 +99,8 @@ func readDirFiles(dirPath string) (map[string][]byte, error) { result := map[string][]byte{} for _, f := range files { - if f.IsDir() { - continue + if f.IsDir() || !strings.HasSuffix(f.Name(), ".js") { + continue // not a .js file } raw, err := os.ReadFile(filepath.Join(dirPath, f.Name())) if err != nil { diff --git a/resolvers/multi_match_subquery.go b/resolvers/multi_match_subquery.go new file mode 100644 index 00000000..5169903a --- /dev/null +++ b/resolvers/multi_match_subquery.go @@ -0,0 +1,70 @@ +package resolvers + +import ( + "fmt" + "strings" + + "github.com/pocketbase/dbx" +) + +var _ dbx.Expression = (*multiMatchSubquery)(nil) + +// join defines the specification for a single SQL JOIN clause. +type join struct { + tableName string + tableAlias string + on dbx.Expression +} + +// multiMatchSubquery defines a record multi-match subquery expression. +type multiMatchSubquery struct { + baseTableAlias string + fromTableName string + fromTableAlias string + valueIdentifier string + joins []*join + params dbx.Params +} + +// Build converts the expression into a SQL fragment. +// +// Implements [dbx.Expression] interface. +func (m *multiMatchSubquery) Build(db *dbx.DB, params dbx.Params) string { + if m.baseTableAlias == "" || m.fromTableName == "" || m.fromTableAlias == "" { + return "0=1" + } + + if params == nil { + params = m.params + } else { + // merge by updating the parent params + for k, v := range m.params { + params[k] = v + } + } + + var mergedJoins strings.Builder + for i, j := range m.joins { + if i > 0 { + mergedJoins.WriteString(" ") + } + mergedJoins.WriteString("LEFT JOIN ") + mergedJoins.WriteString(db.QuoteTableName(j.tableName)) + mergedJoins.WriteString(" ") + mergedJoins.WriteString(db.QuoteTableName(j.tableAlias)) + if j.on != nil { + mergedJoins.WriteString(" ON ") + mergedJoins.WriteString(j.on.Build(db, params)) + } + } + + return fmt.Sprintf( + `SELECT %s as [[multiMatchValue]] FROM %s %s %s WHERE %s = %s`, + db.QuoteColumnName(m.valueIdentifier), + db.QuoteTableName(m.fromTableName), + db.QuoteTableName(m.fromTableAlias), + mergedJoins.String(), + db.QuoteColumnName(m.fromTableAlias+".id"), + db.QuoteColumnName(m.baseTableAlias+".id"), + ) +} diff --git a/resolvers/record_field_resolve_runner.go b/resolvers/record_field_resolve_runner.go new file mode 100644 index 00000000..773f3d31 --- /dev/null +++ b/resolvers/record_field_resolve_runner.go @@ -0,0 +1,589 @@ +package resolvers + +import ( + "encoding/json" + "fmt" + "strconv" + "strings" + + "github.com/pocketbase/dbx" + "github.com/pocketbase/pocketbase/models" + "github.com/pocketbase/pocketbase/models/schema" + "github.com/pocketbase/pocketbase/tools/inflector" + "github.com/pocketbase/pocketbase/tools/list" + "github.com/pocketbase/pocketbase/tools/search" + "github.com/pocketbase/pocketbase/tools/security" +) + +// parseAndRun starts a new one-off RecordFieldResolver.Resolve execution. +func parseAndRun(fieldName string, resolver *RecordFieldResolver) (*search.ResolverResult, error) { + r := &runner{ + fieldName: fieldName, + resolver: resolver, + } + + return r.run() +} + +type runner struct { + used bool // indicates whether the runner was already executed + resolver *RecordFieldResolver // resolver is the shared expression fields resolver + fieldName string // the name of the single field expression the runner is responsible for + + // shared processing state + // --------------------------------------------------------------- + activeProps []string // holds the active props that remains to be processed + activeCollectionName string // the last used collection name + activeTableAlias string // the last used table alias + allowHiddenFields bool // indicates whether hidden fields (eg. email) should be allowed without extra conditions + nullifyMisingField bool // indicating whether to return null on missing field or return an error + withMultiMatch bool // indicates whether to attach a multiMatchSubquery condition to the ResolverResult + multiMatchActiveTableAlias string // the last used multi-match table alias + multiMatch *multiMatchSubquery // the multi-match subquery expression generated from the fieldName +} + +func (r *runner) run() (*search.ResolverResult, error) { + if r.used { + return nil, fmt.Errorf("the runner was already used") + } + + if len(r.resolver.allowedFields) > 0 && !list.ExistInSliceWithRegex(r.fieldName, r.resolver.allowedFields) { + return nil, fmt.Errorf("failed to resolve field %q", r.fieldName) + } + + defer func() { + r.used = true + }() + + r.prepare() + + // check for @collection field (aka. non-relational join) + // must be in the format "@collection.COLLECTION_NAME.FIELD[.FIELD2....]" + if r.activeProps[0] == "@collection" { + return r.processCollectionField() + } + + if r.activeProps[0] == "@request" { + if r.resolver.requestData == nil { + return &search.ResolverResult{Identifier: "NULL"}, nil + } + + if strings.HasPrefix(r.fieldName, "@request.auth.") { + return r.processRequestAuthField() + } + + if strings.HasPrefix(r.fieldName, "@request.data.") && len(r.activeProps) > 2 { + name, modifier, err := splitModifier(r.activeProps[2]) + if err != nil { + return nil, err + } + + dataField := r.resolver.baseCollection.Schema.GetFieldByName(name) + if dataField == nil { + return r.resolver.resolveStaticRequestField(r.activeProps[1:]...) + } + + dataField.InitOptions() + + // check for data relation field + if dataField.Type == schema.FieldTypeRelation && len(r.activeProps) > 3 { + return r.processRequestDataRelationField(dataField) + } + + // check for select:each field + if modifier == eachModifier && dataField.Type == schema.FieldTypeSelect && len(r.activeProps) == 3 { + return r.processRequestDataSelectEachModifier(dataField) + } + + // check for data arrayble fields ":length" modifier + if modifier == lengthModifier && list.ExistInSlice(dataField.Type, schema.ArraybleFieldTypes()) && len(r.activeProps) == 3 { + return r.processRequestDataLengthModifier(dataField) + } + } + + // some other @request.* static field + return r.resolver.resolveStaticRequestField(r.activeProps[1:]...) + } + + // regular field + return r.processActiveProps() +} + +func (r *runner) prepare() { + r.activeProps = strings.Split(r.fieldName, ".") + + r.activeCollectionName = r.resolver.baseCollection.Name + r.activeTableAlias = inflector.Columnify(r.activeCollectionName) + + r.allowHiddenFields = r.resolver.allowHiddenFields + // always allow hidden fields since the @.* filter is a system one + if r.activeProps[0] == "@collection" || r.activeProps[0] == "@request" { + r.allowHiddenFields = true + } + + // enable the ignore flag for missing @request.* fields for backward + // compatibility and consistency with all @request.* filter fields and types + r.nullifyMisingField = r.activeProps[0] == "@request" + + // prepare a multi-match subquery + r.multiMatch = &multiMatchSubquery{ + baseTableAlias: r.activeTableAlias, + params: dbx.Params{}, + } + r.multiMatch.fromTableName = inflector.Columnify(r.activeCollectionName) + r.multiMatch.fromTableAlias = "__mm_" + r.activeTableAlias + r.multiMatchActiveTableAlias = r.multiMatch.fromTableAlias + r.withMultiMatch = false +} + +func (r *runner) processCollectionField() (*search.ResolverResult, error) { + if len(r.activeProps) < 3 { + return nil, fmt.Errorf("invalid @collection field path in %q", r.fieldName) + } + + collection, err := r.resolver.loadCollection(r.activeProps[1]) + if err != nil { + return nil, fmt.Errorf("failed to load collection %q from field path %q", r.activeProps[1], r.fieldName) + } + + r.activeCollectionName = collection.Name + r.activeTableAlias = inflector.Columnify("__collection_" + r.activeCollectionName) + + r.withMultiMatch = true + + // join the collection to the main query + r.resolver.registerJoin(inflector.Columnify(collection.Name), r.activeTableAlias, nil) + + // join the collection to the multi-match subquery + r.multiMatchActiveTableAlias = "__mm" + r.activeTableAlias + r.multiMatch.joins = append(r.multiMatch.joins, &join{ + tableName: inflector.Columnify(collection.Name), + tableAlias: r.multiMatchActiveTableAlias, + }) + + // leave only the collection fields + // aka. @collection.someCollection.fieldA.fieldB -> fieldA.fieldB + r.activeProps = r.activeProps[2:] + + return r.processActiveProps() +} + +func (r *runner) processRequestAuthField() (*search.ResolverResult, error) { + // plain auth field + // --- + if list.ExistInSlice(r.fieldName, plainRequestAuthFields) { + return r.resolver.resolveStaticRequestField(r.activeProps[1:]...) + } + + // resolve the auth collection field + // --- + if r.resolver.requestData == nil || r.resolver.requestData.AuthRecord == nil || r.resolver.requestData.AuthRecord.Collection() == nil { + return &search.ResolverResult{Identifier: "NULL"}, nil + } + + collection := r.resolver.requestData.AuthRecord.Collection() + r.resolver.loadedCollections = append(r.resolver.loadedCollections, collection) + + r.activeCollectionName = collection.Name + r.activeTableAlias = "__auth_" + inflector.Columnify(r.activeCollectionName) + + // join the auth collection to the main query + r.resolver.registerJoin( + inflector.Columnify(r.activeCollectionName), + r.activeTableAlias, + dbx.HashExp{ + // aka. __auth_users.id = :userId + (r.activeTableAlias + ".id"): r.resolver.requestData.AuthRecord.Id, + }, + ) + + // join the auth collection to the multi-match subquery + r.multiMatchActiveTableAlias = "__mm_" + r.activeTableAlias + r.multiMatch.joins = append( + r.multiMatch.joins, + &join{ + tableName: inflector.Columnify(r.activeCollectionName), + tableAlias: r.multiMatchActiveTableAlias, + on: dbx.HashExp{ + (r.multiMatchActiveTableAlias + ".id"): r.resolver.requestData.AuthRecord.Id, + }, + }, + ) + + // leave only the auth relation fields + // aka. @request.auth.fieldA.fieldB -> fieldA.fieldB + r.activeProps = r.activeProps[2:] + + return r.processActiveProps() +} + +func (r *runner) processRequestDataLengthModifier(dataField *schema.SchemaField) (*search.ResolverResult, error) { + dataItems := list.ToUniqueStringSlice(r.resolver.requestData.Data[dataField.Name]) + + result := &search.ResolverResult{ + Identifier: fmt.Sprintf("%d", len(dataItems)), + } + + return result, nil +} + +func (r *runner) processRequestDataSelectEachModifier(dataField *schema.SchemaField) (*search.ResolverResult, error) { + options, ok := dataField.Options.(*schema.SelectOptions) + if !ok { + return nil, fmt.Errorf("failed to initialize field %q options", dataField.Name) + } + + dataItems := list.ToUniqueStringSlice(r.resolver.requestData.Data[dataField.Name]) + rawJson, err := json.Marshal(dataItems) + if err != nil { + return nil, fmt.Errorf("cannot marshalize the data select item for field %q", r.activeProps[2]) + } + + placeholder := "dataSelect" + security.PseudorandomString(4) + cleanFieldName := inflector.Columnify(dataField.Name) + jeTable := fmt.Sprintf("json_each({:%s})", placeholder) + jeAlias := "__dataSelect_" + cleanFieldName + "_je" + r.resolver.registerJoin(jeTable, jeAlias, nil) + + result := &search.ResolverResult{ + Identifier: fmt.Sprintf("[[%s.value]]", jeAlias), + Params: dbx.Params{placeholder: rawJson}, + } + + if options.MaxSelect != 1 { + r.withMultiMatch = true + } + + if r.withMultiMatch { + placeholder2 := "mm" + placeholder + jeTable2 := fmt.Sprintf("json_each({:%s})", placeholder2) + jeAlias2 := "__mm" + jeAlias + + r.multiMatch.joins = append(r.multiMatch.joins, &join{ + tableName: jeTable2, + tableAlias: jeAlias2, + }) + r.multiMatch.params[placeholder2] = rawJson + r.multiMatch.valueIdentifier = fmt.Sprintf("[[%s.value]]", jeAlias2) + + result.MultiMatchSubQuery = r.multiMatch + } + + return result, nil +} + +func (r *runner) processRequestDataRelationField(dataField *schema.SchemaField) (*search.ResolverResult, error) { + options, ok := dataField.Options.(*schema.RelationOptions) + if !ok { + return nil, fmt.Errorf("failed to initialize data field %q options", dataField.Name) + } + + dataRelCollection, err := r.resolver.loadCollection(options.CollectionId) + if err != nil { + return nil, fmt.Errorf("failed to load collection %q from data field %q", options.CollectionId, dataField.Name) + } + + var dataRelIds []string + if r.resolver.requestData != nil && len(r.resolver.requestData.Data) != 0 { + dataRelIds = list.ToUniqueStringSlice(r.resolver.requestData.Data[dataField.Name]) + } + if len(dataRelIds) == 0 { + return &search.ResolverResult{Identifier: "NULL"}, nil + } + + r.activeCollectionName = dataRelCollection.Name + r.activeTableAlias = inflector.Columnify("__data_" + dataRelCollection.Name) + + // join the data rel collection to the main collection + r.resolver.registerJoin( + inflector.Columnify(r.activeCollectionName), + r.activeTableAlias, + dbx.In( + fmt.Sprintf("[[%s.id]]", inflector.Columnify(r.activeTableAlias)), + list.ToInterfaceSlice(dataRelIds)..., + ), + ) + + if options.MaxSelect == nil || *options.MaxSelect != 1 { + r.withMultiMatch = true + } + + // join the data rel collection to the multi-match subquery + r.multiMatchActiveTableAlias = inflector.Columnify("__data_mm_" + dataRelCollection.Name) + r.multiMatch.joins = append( + r.multiMatch.joins, + &join{ + tableName: inflector.Columnify(r.activeCollectionName), + tableAlias: r.multiMatchActiveTableAlias, + on: dbx.In(r.multiMatchActiveTableAlias+".id", list.ToInterfaceSlice(dataRelIds)...), + }, + ) + + // leave only the data relation fields + // aka. @request.data.someRel.fieldA.fieldB -> fieldA.fieldB + r.activeProps = r.activeProps[3:] + + return r.processActiveProps() +} + +func (r *runner) processActiveProps() (*search.ResolverResult, error) { + totalProps := len(r.activeProps) + + for i, prop := range r.activeProps { + collection, err := r.resolver.loadCollection(r.activeCollectionName) + if err != nil { + return nil, fmt.Errorf("failed to resolve field %q", prop) + } + + // last prop + if i == totalProps-1 { + // system field, aka. internal model prop + // (always available but not part of the collection schema) + // ------------------------------------------------------- + if list.ExistInSlice(prop, resolvableSystemFieldNames(collection)) { + result := &search.ResolverResult{ + Identifier: fmt.Sprintf("[[%s.%s]]", r.activeTableAlias, inflector.Columnify(prop)), + } + + // allow querying only auth records with emails marked as public + if prop == schema.FieldNameEmail && !r.allowHiddenFields { + result.AfterBuild = func(expr dbx.Expression) dbx.Expression { + return dbx.And(expr, dbx.NewExp(fmt.Sprintf( + "[[%s.%s]] = TRUE", + r.activeTableAlias, + schema.FieldNameEmailVisibility, + ))) + } + } + + if r.withMultiMatch { + r.multiMatch.valueIdentifier = fmt.Sprintf("[[%s.%s]]", r.multiMatchActiveTableAlias, inflector.Columnify(prop)) + result.MultiMatchSubQuery = r.multiMatch + } + + return result, nil + } + + name, modifier, err := splitModifier(prop) + if err != nil { + return nil, err + } + + field := collection.Schema.GetFieldByName(name) + if field == nil { + if r.nullifyMisingField { + return &search.ResolverResult{Identifier: "NULL"}, nil + } + return nil, fmt.Errorf("unknown field %q", name) + } + + cleanFieldName := inflector.Columnify(field.Name) + + // arrayble fields ":length" modifier + // ------------------------------------------------------- + if modifier == lengthModifier && list.ExistInSlice(field.Type, schema.ArraybleFieldTypes()) { + jePair := r.activeTableAlias + "." + cleanFieldName + + result := &search.ResolverResult{ + Identifier: jsonArrayLength(jePair), + } + + if r.withMultiMatch { + jePair2 := r.multiMatchActiveTableAlias + "." + cleanFieldName + r.multiMatch.valueIdentifier = jsonArrayLength(jePair2) + result.MultiMatchSubQuery = r.multiMatch + } + + return result, nil + } + + // select field with ":each" modifier + // ------------------------------------------------------- + if field.Type == schema.FieldTypeSelect && modifier == eachModifier { + jePair := r.activeTableAlias + "." + cleanFieldName + jeAlias := r.activeTableAlias + "_" + cleanFieldName + "_je" + r.resolver.registerJoin(jsonEach(jePair), jeAlias, nil) + + result := &search.ResolverResult{ + Identifier: fmt.Sprintf("[[%s.value]]", jeAlias), + } + + field.InitOptions() + options, ok := field.Options.(*schema.SelectOptions) + if !ok { + return nil, fmt.Errorf("failed to initialize field %q options", prop) + } + + if options.MaxSelect != 1 { + r.withMultiMatch = true + } + + if r.withMultiMatch { + jePair2 := r.multiMatchActiveTableAlias + "." + cleanFieldName + jeAlias2 := r.multiMatchActiveTableAlias + "_" + cleanFieldName + "_je" + + r.multiMatch.joins = append(r.multiMatch.joins, &join{ + tableName: jsonEach(jePair2), + tableAlias: jeAlias2, + }) + r.multiMatch.valueIdentifier = fmt.Sprintf("[[%s.value]]", jeAlias2) + + result.MultiMatchSubQuery = r.multiMatch + } + + return result, nil + } + + // default + // ------------------------------------------------------- + result := &search.ResolverResult{ + Identifier: fmt.Sprintf("[[%s.%s]]", r.activeTableAlias, cleanFieldName), + } + + if r.withMultiMatch { + r.multiMatch.valueIdentifier = fmt.Sprintf("[[%s.%s]]", r.multiMatchActiveTableAlias, cleanFieldName) + result.MultiMatchSubQuery = r.multiMatch + } + + return result, nil + } + + field := collection.Schema.GetFieldByName(prop) + if field == nil { + if r.nullifyMisingField { + return &search.ResolverResult{Identifier: "NULL"}, nil + } + return nil, fmt.Errorf("unknown field %q", prop) + } + + // check if it is a json field + if field.Type == schema.FieldTypeJson { + var jsonPath strings.Builder + jsonPath.WriteString("$") + for _, p := range r.activeProps[i+1:] { + if _, err := strconv.Atoi(p); err == nil { + jsonPath.WriteString("[") + jsonPath.WriteString(inflector.Columnify(p)) + jsonPath.WriteString("]") + } else { + jsonPath.WriteString(".") + jsonPath.WriteString(inflector.Columnify(p)) + } + } + + result := &search.ResolverResult{ + Identifier: fmt.Sprintf( + "JSON_EXTRACT([[%s.%s]], '%s')", + r.activeTableAlias, + inflector.Columnify(prop), + jsonPath.String(), + ), + } + + if r.withMultiMatch { + r.multiMatch.valueIdentifier = fmt.Sprintf( + "JSON_EXTRACT([[%s.%s]], '%s')", + r.multiMatchActiveTableAlias, + inflector.Columnify(prop), + jsonPath.String(), + ) + result.MultiMatchSubQuery = r.multiMatch + } + + return result, nil + } + + // check if it is a relation field + if field.Type != schema.FieldTypeRelation { + return nil, fmt.Errorf("field %q is not a valid relation", prop) + } + + // join the relation to the main query + // --- + field.InitOptions() + options, ok := field.Options.(*schema.RelationOptions) + if !ok { + return nil, fmt.Errorf("failed to initialize field %q options", prop) + } + + relCollection, relErr := r.resolver.loadCollection(options.CollectionId) + if relErr != nil { + return nil, fmt.Errorf("failed to find field %q collection", prop) + } + + cleanFieldName := inflector.Columnify(field.Name) + newCollectionName := relCollection.Name + newTableAlias := r.activeTableAlias + "_" + cleanFieldName + + jeAlias := r.activeTableAlias + "_" + cleanFieldName + "_je" + jePair := r.activeTableAlias + "." + cleanFieldName + r.resolver.registerJoin(jsonEach(jePair), jeAlias, nil) + r.resolver.registerJoin( + inflector.Columnify(newCollectionName), + newTableAlias, + dbx.NewExp(fmt.Sprintf("[[%s.id]] = [[%s.value]]", newTableAlias, jeAlias)), + ) + r.activeCollectionName = newCollectionName + r.activeTableAlias = newTableAlias + // --- + + // join the relation to the multi-match subquery + // --- + if options.MaxSelect == nil || *options.MaxSelect != 1 { + r.withMultiMatch = true + } + + newTableAlias2 := r.multiMatchActiveTableAlias + "_" + cleanFieldName + jeAlias2 := r.multiMatchActiveTableAlias + "_" + cleanFieldName + "_je" + jePair2 := r.multiMatchActiveTableAlias + "." + cleanFieldName + r.multiMatchActiveTableAlias = newTableAlias2 + + r.multiMatch.joins = append( + r.multiMatch.joins, + &join{ + tableName: jsonEach(jePair2), + tableAlias: jeAlias2, + }, + &join{ + tableName: inflector.Columnify(newCollectionName), + tableAlias: newTableAlias2, + on: dbx.NewExp(fmt.Sprintf("[[%s.id]] = [[%s.value]]", newTableAlias2, jeAlias2)), + }, + ) + // --- + } + + return nil, fmt.Errorf("failed to resolve field %q", r.fieldName) +} + +func jsonArrayLength(tableColumnPair string) string { + return fmt.Sprintf( + // note: the case is used to normalize value access for single and multiple relations. + `json_array_length(CASE WHEN json_valid([[%s]]) THEN [[%s]] ELSE json_array([[%s]]) END)`, + tableColumnPair, tableColumnPair, tableColumnPair, + ) +} + +func jsonEach(tableColumnPair string) string { + return fmt.Sprintf( + // note: the case is used to normalize value access for single and multiple relations. + `json_each(CASE WHEN json_valid([[%s]]) THEN [[%s]] ELSE json_array([[%s]]) END)`, + tableColumnPair, tableColumnPair, tableColumnPair, + ) +} + +func resolvableSystemFieldNames(collection *models.Collection) []string { + result := schema.BaseModelFieldNames() + + if collection.IsAuth() { + result = append( + result, + schema.FieldNameUsername, + schema.FieldNameVerified, + schema.FieldNameEmailVisibility, + schema.FieldNameEmail, + ) + } + + return result +} diff --git a/resolvers/record_field_resolver.go b/resolvers/record_field_resolver.go index e8531e83..8e281e6f 100644 --- a/resolvers/record_field_resolver.go +++ b/resolvers/record_field_resolver.go @@ -10,18 +10,20 @@ import ( "github.com/pocketbase/pocketbase/daos" "github.com/pocketbase/pocketbase/models" "github.com/pocketbase/pocketbase/models/schema" - "github.com/pocketbase/pocketbase/tools/inflector" - "github.com/pocketbase/pocketbase/tools/list" "github.com/pocketbase/pocketbase/tools/search" "github.com/pocketbase/pocketbase/tools/security" "github.com/spf13/cast" ) -// ensure that `search.FieldResolver` interface is implemented -var _ search.FieldResolver = (*RecordFieldResolver)(nil) +// filter modifiers +const ( + eachModifier string = "each" + issetModifier string = "isset" + lengthModifier string = "length" +) // list of auth filter fields that don't require join with the auth -// collection or any other extra checks to be resolved +// collection or any other extra checks to be resolved. var plainRequestAuthFields = []string{ "@request.auth." + schema.FieldNameId, "@request.auth." + schema.FieldNameCollectionId, @@ -34,32 +36,28 @@ var plainRequestAuthFields = []string{ "@request.auth." + schema.FieldNameUpdated, } -type join struct { - id string - table string - on dbx.Expression -} +// ensure that `search.FieldResolver` interface is implemented +var _ search.FieldResolver = (*RecordFieldResolver)(nil) // RecordFieldResolver defines a custom search resolver struct for // managing Record model search fields. // // Usually used together with `search.Provider`. Example: -// resolver := resolvers.NewRecordFieldResolver( -// app.Dao(), -// myCollection, -// &models.RequestData{...}, -// true, -// ) -// provider := search.NewProvider(resolver) -// ... +// resolver := resolvers.NewRecordFieldResolver( +// app.Dao(), +// myCollection, +// &models.RequestData{...}, +// true, +// ) +// provider := search.NewProvider(resolver) +// ... type RecordFieldResolver struct { dao *daos.Dao baseCollection *models.Collection allowHiddenFields bool allowedFields []string loadedCollections []*models.Collection - joins []join // we cannot use a map because the insertion order is not preserved - exprs []dbx.Expression + joins []*join // we cannot use a map because the insertion order is not preserved requestData *models.RequestData staticRequestData map[string]any } @@ -76,20 +74,18 @@ func NewRecordFieldResolver( baseCollection: baseCollection, requestData: requestData, allowHiddenFields: allowHiddenFields, - joins: []join{}, - exprs: []dbx.Expression{}, + joins: []*join{}, loadedCollections: []*models.Collection{baseCollection}, allowedFields: []string{ - `^\w+[\w\.]*$`, + `^\w+[\w\.\:]*$`, `^\@request\.method$`, - `^\@request\.auth\.\w+[\w\.]*$`, - `^\@request\.data\.\w+[\w\.]*$`, - `^\@request\.query\.\w+[\w\.]*$`, - `^\@collection\.\w+\.\w+[\w\.]*$`, + `^\@request\.auth\.[\w\.\:]*\w+$`, + `^\@request\.data\.[\w\.\:]*\w+$`, + `^\@request\.query\.[\w\.\:]*\w+$`, + `^\@collection\.\w+\.[\w\.\:]*\w+$`, }, } - // @todo remove after IN operator and multi-match filter enhancements r.staticRequestData = map[string]any{} if r.requestData != nil { r.staticRequestData["method"] = r.requestData.Method @@ -115,13 +111,10 @@ func (r *RecordFieldResolver) UpdateQuery(query *dbx.SelectQuery) error { query.Distinct(true) for _, join := range r.joins { - query.LeftJoin(join.table, join.on) - } - } - - for _, expr := range r.exprs { - if expr != nil { - query.AndWhere(expr) + query.LeftJoin( + (join.tableName + " " + join.tableAlias), + join.on, + ) } } @@ -130,225 +123,63 @@ func (r *RecordFieldResolver) UpdateQuery(query *dbx.SelectQuery) error { // Resolve implements `search.FieldResolver` interface. // -// Example of resolvable field formats: -// id -// project.screen.status -// @request.status -// @request.auth.someRelation.name -// @collection.product.name -func (r *RecordFieldResolver) Resolve(fieldName string) (resultName string, placeholderParams dbx.Params, err error) { - if len(r.allowedFields) > 0 && !list.ExistInSliceWithRegex(fieldName, r.allowedFields) { - return "", nil, fmt.Errorf("Failed to resolve field %q", fieldName) - } - - props := strings.Split(fieldName, ".") - - currentCollectionName := r.baseCollection.Name - currentTableAlias := inflector.Columnify(currentCollectionName) - - // flag indicating whether to return null on missing field or return on an error - nullifyMisingField := false - - allowHiddenFields := r.allowHiddenFields - - // check for @collection field (aka. non-relational join) - // must be in the format "@collection.COLLECTION_NAME.FIELD[.FIELD2....]" - if props[0] == "@collection" { - if len(props) < 3 { - return "", nil, fmt.Errorf("Invalid @collection field path in %q.", fieldName) - } - - currentCollectionName = props[1] - currentTableAlias = inflector.Columnify("__collection_" + currentCollectionName) - - collection, err := r.loadCollection(currentCollectionName) - if err != nil { - return "", nil, fmt.Errorf("Failed to load collection %q from field path %q.", currentCollectionName, fieldName) - } - - // always allow hidden fields since the @collection.* filter is a system one - allowHiddenFields = true - - r.registerJoin(inflector.Columnify(collection.Name), currentTableAlias, nil) - - props = props[2:] // leave only the collection fields - } else if props[0] == "@request" { - if len(props) == 1 { - return "", nil, fmt.Errorf("Invalid @request data field path in %q.", fieldName) - } - - if r.requestData == nil { - return "NULL", nil, nil - } - - // plain @request.* field - if !strings.HasPrefix(fieldName, "@request.auth.") || list.ExistInSlice(fieldName, plainRequestAuthFields) { - return r.resolveStaticRequestField(props[1:]...) - } - - // always allow hidden fields since the @request.* filter is a system one - allowHiddenFields = true - - // enable the ignore flag for missing @request.auth.* fields - // for consistency with @request.data.* and @request.query.* - nullifyMisingField = true - - // resolve the auth collection fields - // --- - if r.requestData == nil || r.requestData.AuthRecord == nil || r.requestData.AuthRecord.Collection() == nil { - return "NULL", nil, nil - } - - collection := r.requestData.AuthRecord.Collection() - r.loadedCollections = append(r.loadedCollections, collection) - - currentCollectionName = collection.Name - currentTableAlias = "__auth_" + inflector.Columnify(currentCollectionName) - - authIdParamKey := "auth" + security.PseudorandomString(5) - authIdParams := dbx.Params{authIdParamKey: r.requestData.AuthRecord.Id} - // --- - - // join the auth collection - r.registerJoin( - inflector.Columnify(collection.Name), - currentTableAlias, - dbx.NewExp(fmt.Sprintf( - // aka. __auth_users.id = :userId - "[[%s.id]] = {:%s}", - inflector.Columnify(currentTableAlias), - authIdParamKey, - ), authIdParams), - ) - - props = props[2:] // leave only the auth relation fields - } - - totalProps := len(props) - - for i, prop := range props { - collection, err := r.loadCollection(currentCollectionName) - if err != nil { - return "", nil, fmt.Errorf("Failed to resolve field %q.", prop) - } - - systemFieldNames := schema.BaseModelFieldNames() - if collection.IsAuth() { - systemFieldNames = append( - systemFieldNames, - schema.FieldNameUsername, - schema.FieldNameVerified, - schema.FieldNameEmailVisibility, - schema.FieldNameEmail, - ) - } - - // internal model prop (always available but not part of the collection schema) - if list.ExistInSlice(prop, systemFieldNames) { - // allow querying only auth records with emails marked as public - if prop == schema.FieldNameEmail && !allowHiddenFields { - r.registerExpr(dbx.NewExp(fmt.Sprintf( - "[[%s.%s]] = TRUE", - currentTableAlias, - inflector.Columnify(schema.FieldNameEmailVisibility), - ))) - } - - return fmt.Sprintf("[[%s.%s]]", currentTableAlias, inflector.Columnify(prop)), nil, nil - } - - field := collection.Schema.GetFieldByName(prop) - if field == nil { - if nullifyMisingField { - return "NULL", nil, nil - } - - return "", nil, fmt.Errorf("Unrecognized field %q.", prop) - } - - // last prop - if i == totalProps-1 { - return fmt.Sprintf("[[%s.%s]]", currentTableAlias, inflector.Columnify(prop)), nil, nil - } - - // check if it is a json field - if field.Type == schema.FieldTypeJson { - var jsonPath strings.Builder - jsonPath.WriteString("$") - for _, p := range props[i+1:] { - if _, err := strconv.Atoi(p); err == nil { - jsonPath.WriteString("[") - jsonPath.WriteString(inflector.Columnify(p)) - jsonPath.WriteString("]") - } else { - jsonPath.WriteString(".") - jsonPath.WriteString(inflector.Columnify(p)) - } - } - return fmt.Sprintf( - "JSON_EXTRACT([[%s.%s]], '%s')", - currentTableAlias, - inflector.Columnify(prop), - jsonPath.String(), - ), nil, nil - } - - // check if it is a relation field - if field.Type != schema.FieldTypeRelation { - return "", nil, fmt.Errorf("Field %q is not a valid relation.", prop) - } - - // auto join the relation - // --- - field.InitOptions() - options, ok := field.Options.(*schema.RelationOptions) - if !ok { - return "", nil, fmt.Errorf("Failed to initialize field %q options.", prop) - } - - relCollection, relErr := r.loadCollection(options.CollectionId) - if relErr != nil { - return "", nil, fmt.Errorf("Failed to find field %q collection.", prop) - } - - cleanFieldName := inflector.Columnify(field.Name) - newCollectionName := relCollection.Name - newTableAlias := currentTableAlias + "_" + cleanFieldName - - jeTable := currentTableAlias + "_" + cleanFieldName + "_je" - jePair := currentTableAlias + "." + cleanFieldName - - r.registerJoin( - fmt.Sprintf( - // note: the case is used to normalize value access for single and multiple relations. - `json_each(CASE WHEN json_valid([[%s]]) THEN [[%s]] ELSE json_array([[%s]]) END)`, - jePair, jePair, jePair, - ), - jeTable, - nil, - ) - r.registerJoin( - inflector.Columnify(newCollectionName), - newTableAlias, - dbx.NewExp(fmt.Sprintf("[[%s.id]] = [[%s.value]]", newTableAlias, jeTable)), - ) - - currentCollectionName = newCollectionName - currentTableAlias = newTableAlias - } - - return "", nil, fmt.Errorf("Failed to resolve field %q.", fieldName) +// Example of some resolvable fieldName formats: +// +// id +// someSelect.each +// project.screen.status +// @request.status +// @request.query.filter +// @request.auth.someRelation.name +// @request.data.someRelation.name +// @request.data.someField +// @request.data.someSelect:each +// @request.data.someField:isset +// @collection.product.name +func (r *RecordFieldResolver) Resolve(fieldName string) (*search.ResolverResult, error) { + return parseAndRun(fieldName, r) } -func (r *RecordFieldResolver) resolveStaticRequestField(path ...string) (resultName string, placeholderParams dbx.Params, err error) { - // ignore error because requestData is dynamic and some of the - // lookup keys may not be defined for the request - resultVal, _ := extractNestedMapVal(r.staticRequestData, path...) +func (r *RecordFieldResolver) resolveStaticRequestField(path ...string) (*search.ResolverResult, error) { + if len(path) == 0 { + return nil, fmt.Errorf("at least one path key should be provided") + } + + lastProp, modifier, err := splitModifier(path[len(path)-1]) + if err != nil { + return nil, err + } + + path[len(path)-1] = lastProp + + // extract value + resultVal, err := extractNestedMapVal(r.staticRequestData, path...) + + if modifier == issetModifier { + if err != nil { + return &search.ResolverResult{Identifier: "FALSE"}, nil + } + return &search.ResolverResult{Identifier: "TRUE"}, nil + } + + // note: we are ignoring the error because requestData is dynamic + // and some of the lookup keys may not be defined for the request switch v := resultVal.(type) { case nil: - return "NULL", nil, nil - case string, bool, int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64, float32, float64: + return &search.ResolverResult{Identifier: "NULL"}, nil + case string: + // check if it is a number field and explicitly try to cast to + // float in case of a numeric string value was used + // (this usually the case when the data is from a multipart/form-data request) + field := r.baseCollection.Schema.GetFieldByName(path[len(path)-1]) + if field != nil && field.Type == schema.FieldTypeNumber { + if nv, err := strconv.ParseFloat(v, 64); err == nil { + resultVal = nv + } + } + // otherwise - no further processing is needed... + case bool, int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64, float32, float64: // no further processing is needed... default: // non-plain value @@ -367,33 +198,11 @@ func (r *RecordFieldResolver) resolveStaticRequestField(path ...string) (resultN } placeholder := "f" + security.PseudorandomString(5) - name := fmt.Sprintf("{:%s}", placeholder) - params := dbx.Params{placeholder: resultVal} - return name, params, nil -} - -func extractNestedMapVal(m map[string]any, keys ...string) (result any, err error) { - var ok bool - - if len(keys) == 0 { - return nil, fmt.Errorf("At least one key should be provided.") - } - - if result, ok = m[keys[0]]; !ok { - return nil, fmt.Errorf("Invalid key path - missing key %q.", keys[0]) - } - - // end key reached - if len(keys) == 1 { - return result, nil - } - - if m, ok = result.(map[string]any); !ok { - return nil, fmt.Errorf("Expected map structure, got %#v.", result) - } - - return extractNestedMapVal(m, keys[1:]...) + return &search.ResolverResult{ + Identifier: "{:" + placeholder + "}", + Params: dbx.Params{placeholder: resultVal}, + }, nil } func (r *RecordFieldResolver) loadCollection(collectionNameOrId string) (*models.Collection, error) { @@ -415,17 +224,15 @@ func (r *RecordFieldResolver) loadCollection(collectionNameOrId string) (*models } func (r *RecordFieldResolver) registerJoin(tableName string, tableAlias string, on dbx.Expression) { - tableExpr := (tableName + " " + tableAlias) - - join := join{ - id: tableAlias, - table: tableExpr, - on: on, + join := &join{ + tableName: tableName, + tableAlias: tableAlias, + on: on, } // replace existing join for i, j := range r.joins { - if j.id == join.id { + if j.tableAlias == join.tableAlias { r.joins[i] = join return } @@ -435,6 +242,44 @@ func (r *RecordFieldResolver) registerJoin(tableName string, tableAlias string, r.joins = append(r.joins, join) } -func (r *RecordFieldResolver) registerExpr(expr dbx.Expression) { - r.exprs = append(r.exprs, expr) +func extractNestedMapVal(m map[string]any, keys ...string) (any, error) { + if len(keys) == 0 { + return nil, fmt.Errorf("at least one key should be provided") + } + + var result any + var ok bool + + if result, ok = m[keys[0]]; !ok { + return nil, fmt.Errorf("invalid key path - missing key %q", keys[0]) + } + + // end key reached + if len(keys) == 1 { + return result, nil + } + + if m, ok = result.(map[string]any); !ok { + return nil, fmt.Errorf("expected map, got %#v", result) + } + + return extractNestedMapVal(m, keys[1:]...) +} + +func splitModifier(combined string) (string, string, error) { + parts := strings.Split(combined, ":") + + if len(parts) != 2 { + return combined, "", nil + } + + // validate modifier + switch parts[1] { + case issetModifier, + eachModifier, + lengthModifier: + return parts[0], parts[1], nil + } + + return "", "", fmt.Errorf("unknown modifier in %q", combined) } diff --git a/resolvers/record_field_resolver_test.go b/resolvers/record_field_resolver_test.go index 04b8a953..31e87073 100644 --- a/resolvers/record_field_resolver_test.go +++ b/resolvers/record_field_resolver_test.go @@ -3,12 +3,14 @@ package resolvers_test import ( "encoding/json" "regexp" + "strings" "testing" "github.com/pocketbase/pocketbase/models" "github.com/pocketbase/pocketbase/resolvers" "github.com/pocketbase/pocketbase/tests" "github.com/pocketbase/pocketbase/tools/list" + "github.com/pocketbase/pocketbase/tools/search" ) func TestRecordFieldResolverUpdateQuery(t *testing.T) { @@ -21,149 +23,307 @@ func TestRecordFieldResolverUpdateQuery(t *testing.T) { } requestData := &models.RequestData{ + Query: map[string]any{ + "a": nil, + "b": 123, + }, + Data: map[string]any{ + "a": nil, + "b": 123, + "number": 10, + "select_many": []string{"optionA", "optionC"}, + "rel_one": "test", + "rel_many": []string{"test1", "test2"}, + "file_one": "test", + "file_many": []string{"test1", "test2", "test3"}, + "self_rel_one": "test", + "self_rel_many": []string{"test1"}, + "rel_many_cascade": []string{"test1", "test2"}, + }, AuthRecord: authRecord, } scenarios := []struct { name string collectionIdOrName string - fields []string + rule string allowHiddenFields bool expectQuery string }{ { - "missing field", + "non relation field (with all default operators)", "demo4", - []string{""}, + "title = true || title != 'test' || title ~ 'test1' || title !~ '%test2' || title > 1 || title >= 2 || title < 3 || title <= 4", false, - "SELECT `demo4`.* FROM `demo4`", + "SELECT `demo4`.* FROM `demo4` WHERE (COALESCE([[demo4.title]], '') = COALESCE(1, '') OR COALESCE([[demo4.title]], '') != COALESCE({:TEST}, '') OR [[demo4.title]] LIKE {:TEST} ESCAPE '\\' OR [[demo4.title]] NOT LIKE {:TEST} ESCAPE '\\' OR [[demo4.title]] > {:TEST} OR [[demo4.title]] >= {:TEST} OR [[demo4.title]] < {:TEST} OR [[demo4.title]] <= {:TEST})", }, { - "non relation field", + "non relation field (with all opt/any operators)", "demo4", - []string{"title"}, + "title ?= true || title ?!= 'test' || title ?~ 'test1' || title ?!~ '%test2' || title ?> 1 || title ?>= 2 || title ?< 3 || title ?<= 4", false, - "SELECT `demo4`.* FROM `demo4`", + "SELECT `demo4`.* FROM `demo4` WHERE (COALESCE([[demo4.title]], '') = COALESCE(1, '') OR COALESCE([[demo4.title]], '') != COALESCE({:TEST}, '') OR [[demo4.title]] LIKE {:TEST} ESCAPE '\\' OR [[demo4.title]] NOT LIKE {:TEST} ESCAPE '\\' OR [[demo4.title]] > {:TEST} OR [[demo4.title]] >= {:TEST} OR [[demo4.title]] < {:TEST} OR [[demo4.title]] <= {:TEST})", }, { "incomplete rel", "demo4", - []string{"self_rel_one"}, + "self_rel_one > true", false, - "SELECT `demo4`.* FROM `demo4`", + "SELECT `demo4`.* FROM `demo4` WHERE [[demo4.self_rel_one]] > 1", }, { "single rel (self rel)", "demo4", - []string{"self_rel_one.title"}, + "self_rel_one.title > true", false, - "SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN json_each(CASE WHEN json_valid([[demo4.self_rel_one]]) THEN [[demo4.self_rel_one]] ELSE json_array([[demo4.self_rel_one]]) END) `demo4_self_rel_one_je` LEFT JOIN `demo4` `demo4_self_rel_one` ON [[demo4_self_rel_one.id]] = [[demo4_self_rel_one_je.value]]", + "SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN json_each(CASE WHEN json_valid([[demo4.self_rel_one]]) THEN [[demo4.self_rel_one]] ELSE json_array([[demo4.self_rel_one]]) END) `demo4_self_rel_one_je` LEFT JOIN `demo4` `demo4_self_rel_one` ON [[demo4_self_rel_one.id]] = [[demo4_self_rel_one_je.value]] WHERE [[demo4_self_rel_one.title]] > 1", }, { "single rel (other collection)", "demo4", - []string{"rel_one_cascade.title"}, + "rel_one_cascade.title > true", false, - "SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN json_each(CASE WHEN json_valid([[demo4.rel_one_cascade]]) THEN [[demo4.rel_one_cascade]] ELSE json_array([[demo4.rel_one_cascade]]) END) `demo4_rel_one_cascade_je` LEFT JOIN `demo3` `demo4_rel_one_cascade` ON [[demo4_rel_one_cascade.id]] = [[demo4_rel_one_cascade_je.value]]", + "SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN json_each(CASE WHEN json_valid([[demo4.rel_one_cascade]]) THEN [[demo4.rel_one_cascade]] ELSE json_array([[demo4.rel_one_cascade]]) END) `demo4_rel_one_cascade_je` LEFT JOIN `demo3` `demo4_rel_one_cascade` ON [[demo4_rel_one_cascade.id]] = [[demo4_rel_one_cascade_je.value]] WHERE [[demo4_rel_one_cascade.title]] > 1", }, { "non-relation field + single rel", "demo4", - []string{"title", "self_rel_one.title"}, + "title > true || self_rel_one.title > true", false, - "SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN json_each(CASE WHEN json_valid([[demo4.self_rel_one]]) THEN [[demo4.self_rel_one]] ELSE json_array([[demo4.self_rel_one]]) END) `demo4_self_rel_one_je` LEFT JOIN `demo4` `demo4_self_rel_one` ON [[demo4_self_rel_one.id]] = [[demo4_self_rel_one_je.value]]", + "SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN json_each(CASE WHEN json_valid([[demo4.self_rel_one]]) THEN [[demo4.self_rel_one]] ELSE json_array([[demo4.self_rel_one]]) END) `demo4_self_rel_one_je` LEFT JOIN `demo4` `demo4_self_rel_one` ON [[demo4_self_rel_one.id]] = [[demo4_self_rel_one_je.value]] WHERE ([[demo4.title]] > 1 OR [[demo4_self_rel_one.title]] > 1)", }, { - "nested incomplete rels", + "nested incomplete rels (opt/any operator)", "demo4", - []string{"self_rel_many.self_rel_one"}, + "self_rel_many.self_rel_one ?> true", false, - "SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN json_each(CASE WHEN json_valid([[demo4.self_rel_many]]) THEN [[demo4.self_rel_many]] ELSE json_array([[demo4.self_rel_many]]) END) `demo4_self_rel_many_je` LEFT JOIN `demo4` `demo4_self_rel_many` ON [[demo4_self_rel_many.id]] = [[demo4_self_rel_many_je.value]]", + "SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN json_each(CASE WHEN json_valid([[demo4.self_rel_many]]) THEN [[demo4.self_rel_many]] ELSE json_array([[demo4.self_rel_many]]) END) `demo4_self_rel_many_je` LEFT JOIN `demo4` `demo4_self_rel_many` ON [[demo4_self_rel_many.id]] = [[demo4_self_rel_many_je.value]] WHERE [[demo4_self_rel_many.self_rel_one]] > 1", }, { - "nested complete rels", + "nested incomplete rels (multi-match operator)", "demo4", - []string{"self_rel_many.self_rel_one.title"}, + "self_rel_many.self_rel_one > true", false, - "SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN json_each(CASE WHEN json_valid([[demo4.self_rel_many]]) THEN [[demo4.self_rel_many]] ELSE json_array([[demo4.self_rel_many]]) END) `demo4_self_rel_many_je` LEFT JOIN `demo4` `demo4_self_rel_many` ON [[demo4_self_rel_many.id]] = [[demo4_self_rel_many_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[demo4_self_rel_many.self_rel_one]]) THEN [[demo4_self_rel_many.self_rel_one]] ELSE json_array([[demo4_self_rel_many.self_rel_one]]) END) `demo4_self_rel_many_self_rel_one_je` LEFT JOIN `demo4` `demo4_self_rel_many_self_rel_one` ON [[demo4_self_rel_many_self_rel_one.id]] = [[demo4_self_rel_many_self_rel_one_je.value]]", + "SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN json_each(CASE WHEN json_valid([[demo4.self_rel_many]]) THEN [[demo4.self_rel_many]] ELSE json_array([[demo4.self_rel_many]]) END) `demo4_self_rel_many_je` LEFT JOIN `demo4` `demo4_self_rel_many` ON [[demo4_self_rel_many.id]] = [[demo4_self_rel_many_je.value]] WHERE (([[demo4_self_rel_many.self_rel_one]] > 1) AND (NOT EXISTS (SELECT 1 FROM (SELECT [[__mm_demo4_self_rel_many.self_rel_one]] as [[multiMatchValue]] FROM `demo4` `__mm_demo4` LEFT JOIN json_each(CASE WHEN json_valid([[__mm_demo4.self_rel_many]]) THEN [[__mm_demo4.self_rel_many]] ELSE json_array([[__mm_demo4.self_rel_many]]) END) `__mm_demo4_self_rel_many_je` LEFT JOIN `demo4` `__mm_demo4_self_rel_many` ON [[__mm_demo4_self_rel_many.id]] = [[__mm_demo4_self_rel_many_je.value]] WHERE `__mm_demo4`.`id` = `demo4`.`id`) {{TEST}} WHERE (NOT ([[TEST.multiMatchValue]] > 1)) OR ([[TEST.multiMatchValue]] IS NULL))))", }, { - "repeated nested rels", + "nested complete rels (opt/any operator)", "demo4", - []string{"self_rel_many.self_rel_one.self_rel_many.self_rel_one.title"}, + "self_rel_many.self_rel_one.title ?> true", false, - "SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN json_each(CASE WHEN json_valid([[demo4.self_rel_many]]) THEN [[demo4.self_rel_many]] ELSE json_array([[demo4.self_rel_many]]) END) `demo4_self_rel_many_je` LEFT JOIN `demo4` `demo4_self_rel_many` ON [[demo4_self_rel_many.id]] = [[demo4_self_rel_many_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[demo4_self_rel_many.self_rel_one]]) THEN [[demo4_self_rel_many.self_rel_one]] ELSE json_array([[demo4_self_rel_many.self_rel_one]]) END) `demo4_self_rel_many_self_rel_one_je` LEFT JOIN `demo4` `demo4_self_rel_many_self_rel_one` ON [[demo4_self_rel_many_self_rel_one.id]] = [[demo4_self_rel_many_self_rel_one_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[demo4_self_rel_many_self_rel_one.self_rel_many]]) THEN [[demo4_self_rel_many_self_rel_one.self_rel_many]] ELSE json_array([[demo4_self_rel_many_self_rel_one.self_rel_many]]) END) `demo4_self_rel_many_self_rel_one_self_rel_many_je` LEFT JOIN `demo4` `demo4_self_rel_many_self_rel_one_self_rel_many` ON [[demo4_self_rel_many_self_rel_one_self_rel_many.id]] = [[demo4_self_rel_many_self_rel_one_self_rel_many_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[demo4_self_rel_many_self_rel_one_self_rel_many.self_rel_one]]) THEN [[demo4_self_rel_many_self_rel_one_self_rel_many.self_rel_one]] ELSE json_array([[demo4_self_rel_many_self_rel_one_self_rel_many.self_rel_one]]) END) `demo4_self_rel_many_self_rel_one_self_rel_many_self_rel_one_je` LEFT JOIN `demo4` `demo4_self_rel_many_self_rel_one_self_rel_many_self_rel_one` ON [[demo4_self_rel_many_self_rel_one_self_rel_many_self_rel_one.id]] = [[demo4_self_rel_many_self_rel_one_self_rel_many_self_rel_one_je.value]]", + "SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN json_each(CASE WHEN json_valid([[demo4.self_rel_many]]) THEN [[demo4.self_rel_many]] ELSE json_array([[demo4.self_rel_many]]) END) `demo4_self_rel_many_je` LEFT JOIN `demo4` `demo4_self_rel_many` ON [[demo4_self_rel_many.id]] = [[demo4_self_rel_many_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[demo4_self_rel_many.self_rel_one]]) THEN [[demo4_self_rel_many.self_rel_one]] ELSE json_array([[demo4_self_rel_many.self_rel_one]]) END) `demo4_self_rel_many_self_rel_one_je` LEFT JOIN `demo4` `demo4_self_rel_many_self_rel_one` ON [[demo4_self_rel_many_self_rel_one.id]] = [[demo4_self_rel_many_self_rel_one_je.value]] WHERE [[demo4_self_rel_many_self_rel_one.title]] > 1", }, { - "multiple rels", + "nested complete rels (multi-match operator)", "demo4", - []string{"self_rel_many.title", "self_rel_one.onefile"}, + "self_rel_many.self_rel_one.title > true", false, - "SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN json_each(CASE WHEN json_valid([[demo4.self_rel_many]]) THEN [[demo4.self_rel_many]] ELSE json_array([[demo4.self_rel_many]]) END) `demo4_self_rel_many_je` LEFT JOIN `demo4` `demo4_self_rel_many` ON [[demo4_self_rel_many.id]] = [[demo4_self_rel_many_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[demo4.self_rel_one]]) THEN [[demo4.self_rel_one]] ELSE json_array([[demo4.self_rel_one]]) END) `demo4_self_rel_one_je` LEFT JOIN `demo4` `demo4_self_rel_one` ON [[demo4_self_rel_one.id]] = [[demo4_self_rel_one_je.value]]", + "SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN json_each(CASE WHEN json_valid([[demo4.self_rel_many]]) THEN [[demo4.self_rel_many]] ELSE json_array([[demo4.self_rel_many]]) END) `demo4_self_rel_many_je` LEFT JOIN `demo4` `demo4_self_rel_many` ON [[demo4_self_rel_many.id]] = [[demo4_self_rel_many_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[demo4_self_rel_many.self_rel_one]]) THEN [[demo4_self_rel_many.self_rel_one]] ELSE json_array([[demo4_self_rel_many.self_rel_one]]) END) `demo4_self_rel_many_self_rel_one_je` LEFT JOIN `demo4` `demo4_self_rel_many_self_rel_one` ON [[demo4_self_rel_many_self_rel_one.id]] = [[demo4_self_rel_many_self_rel_one_je.value]] WHERE (([[demo4_self_rel_many_self_rel_one.title]] > 1) AND (NOT EXISTS (SELECT 1 FROM (SELECT [[__mm_demo4_self_rel_many_self_rel_one.title]] as [[multiMatchValue]] FROM `demo4` `__mm_demo4` LEFT JOIN json_each(CASE WHEN json_valid([[__mm_demo4.self_rel_many]]) THEN [[__mm_demo4.self_rel_many]] ELSE json_array([[__mm_demo4.self_rel_many]]) END) `__mm_demo4_self_rel_many_je` LEFT JOIN `demo4` `__mm_demo4_self_rel_many` ON [[__mm_demo4_self_rel_many.id]] = [[__mm_demo4_self_rel_many_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[__mm_demo4_self_rel_many.self_rel_one]]) THEN [[__mm_demo4_self_rel_many.self_rel_one]] ELSE json_array([[__mm_demo4_self_rel_many.self_rel_one]]) END) `__mm_demo4_self_rel_many_self_rel_one_je` LEFT JOIN `demo4` `__mm_demo4_self_rel_many_self_rel_one` ON [[__mm_demo4_self_rel_many_self_rel_one.id]] = [[__mm_demo4_self_rel_many_self_rel_one_je.value]] WHERE `__mm_demo4`.`id` = `demo4`.`id`) {{TEST}} WHERE (NOT ([[TEST.multiMatchValue]] > 1)) OR ([[TEST.multiMatchValue]] IS NULL))))", }, { - "@collection join", + "repeated nested rels (opt/any operator)", "demo4", - []string{"@collection.demo1.text", "@collection.demo2.active", "@collection.demo1.file_one"}, + "self_rel_many.self_rel_one.self_rel_many.self_rel_one.title ?> true", false, - "SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN `demo1` `__collection_demo1` LEFT JOIN `demo2` `__collection_demo2`", + "SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN json_each(CASE WHEN json_valid([[demo4.self_rel_many]]) THEN [[demo4.self_rel_many]] ELSE json_array([[demo4.self_rel_many]]) END) `demo4_self_rel_many_je` LEFT JOIN `demo4` `demo4_self_rel_many` ON [[demo4_self_rel_many.id]] = [[demo4_self_rel_many_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[demo4_self_rel_many.self_rel_one]]) THEN [[demo4_self_rel_many.self_rel_one]] ELSE json_array([[demo4_self_rel_many.self_rel_one]]) END) `demo4_self_rel_many_self_rel_one_je` LEFT JOIN `demo4` `demo4_self_rel_many_self_rel_one` ON [[demo4_self_rel_many_self_rel_one.id]] = [[demo4_self_rel_many_self_rel_one_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[demo4_self_rel_many_self_rel_one.self_rel_many]]) THEN [[demo4_self_rel_many_self_rel_one.self_rel_many]] ELSE json_array([[demo4_self_rel_many_self_rel_one.self_rel_many]]) END) `demo4_self_rel_many_self_rel_one_self_rel_many_je` LEFT JOIN `demo4` `demo4_self_rel_many_self_rel_one_self_rel_many` ON [[demo4_self_rel_many_self_rel_one_self_rel_many.id]] = [[demo4_self_rel_many_self_rel_one_self_rel_many_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[demo4_self_rel_many_self_rel_one_self_rel_many.self_rel_one]]) THEN [[demo4_self_rel_many_self_rel_one_self_rel_many.self_rel_one]] ELSE json_array([[demo4_self_rel_many_self_rel_one_self_rel_many.self_rel_one]]) END) `demo4_self_rel_many_self_rel_one_self_rel_many_self_rel_one_je` LEFT JOIN `demo4` `demo4_self_rel_many_self_rel_one_self_rel_many_self_rel_one` ON [[demo4_self_rel_many_self_rel_one_self_rel_many_self_rel_one.id]] = [[demo4_self_rel_many_self_rel_one_self_rel_many_self_rel_one_je.value]] WHERE [[demo4_self_rel_many_self_rel_one_self_rel_many_self_rel_one.title]] > 1", + }, + { + "repeated nested rels (multi-match operator)", + "demo4", + "self_rel_many.self_rel_one.self_rel_many.self_rel_one.title > true", + false, + "SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN json_each(CASE WHEN json_valid([[demo4.self_rel_many]]) THEN [[demo4.self_rel_many]] ELSE json_array([[demo4.self_rel_many]]) END) `demo4_self_rel_many_je` LEFT JOIN `demo4` `demo4_self_rel_many` ON [[demo4_self_rel_many.id]] = [[demo4_self_rel_many_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[demo4_self_rel_many.self_rel_one]]) THEN [[demo4_self_rel_many.self_rel_one]] ELSE json_array([[demo4_self_rel_many.self_rel_one]]) END) `demo4_self_rel_many_self_rel_one_je` LEFT JOIN `demo4` `demo4_self_rel_many_self_rel_one` ON [[demo4_self_rel_many_self_rel_one.id]] = [[demo4_self_rel_many_self_rel_one_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[demo4_self_rel_many_self_rel_one.self_rel_many]]) THEN [[demo4_self_rel_many_self_rel_one.self_rel_many]] ELSE json_array([[demo4_self_rel_many_self_rel_one.self_rel_many]]) END) `demo4_self_rel_many_self_rel_one_self_rel_many_je` LEFT JOIN `demo4` `demo4_self_rel_many_self_rel_one_self_rel_many` ON [[demo4_self_rel_many_self_rel_one_self_rel_many.id]] = [[demo4_self_rel_many_self_rel_one_self_rel_many_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[demo4_self_rel_many_self_rel_one_self_rel_many.self_rel_one]]) THEN [[demo4_self_rel_many_self_rel_one_self_rel_many.self_rel_one]] ELSE json_array([[demo4_self_rel_many_self_rel_one_self_rel_many.self_rel_one]]) END) `demo4_self_rel_many_self_rel_one_self_rel_many_self_rel_one_je` LEFT JOIN `demo4` `demo4_self_rel_many_self_rel_one_self_rel_many_self_rel_one` ON [[demo4_self_rel_many_self_rel_one_self_rel_many_self_rel_one.id]] = [[demo4_self_rel_many_self_rel_one_self_rel_many_self_rel_one_je.value]] WHERE (([[demo4_self_rel_many_self_rel_one_self_rel_many_self_rel_one.title]] > 1) AND (NOT EXISTS (SELECT 1 FROM (SELECT [[__mm_demo4_self_rel_many_self_rel_one_self_rel_many_self_rel_one.title]] as [[multiMatchValue]] FROM `demo4` `__mm_demo4` LEFT JOIN json_each(CASE WHEN json_valid([[__mm_demo4.self_rel_many]]) THEN [[__mm_demo4.self_rel_many]] ELSE json_array([[__mm_demo4.self_rel_many]]) END) `__mm_demo4_self_rel_many_je` LEFT JOIN `demo4` `__mm_demo4_self_rel_many` ON [[__mm_demo4_self_rel_many.id]] = [[__mm_demo4_self_rel_many_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[__mm_demo4_self_rel_many.self_rel_one]]) THEN [[__mm_demo4_self_rel_many.self_rel_one]] ELSE json_array([[__mm_demo4_self_rel_many.self_rel_one]]) END) `__mm_demo4_self_rel_many_self_rel_one_je` LEFT JOIN `demo4` `__mm_demo4_self_rel_many_self_rel_one` ON [[__mm_demo4_self_rel_many_self_rel_one.id]] = [[__mm_demo4_self_rel_many_self_rel_one_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[__mm_demo4_self_rel_many_self_rel_one.self_rel_many]]) THEN [[__mm_demo4_self_rel_many_self_rel_one.self_rel_many]] ELSE json_array([[__mm_demo4_self_rel_many_self_rel_one.self_rel_many]]) END) `__mm_demo4_self_rel_many_self_rel_one_self_rel_many_je` LEFT JOIN `demo4` `__mm_demo4_self_rel_many_self_rel_one_self_rel_many` ON [[__mm_demo4_self_rel_many_self_rel_one_self_rel_many.id]] = [[__mm_demo4_self_rel_many_self_rel_one_self_rel_many_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[__mm_demo4_self_rel_many_self_rel_one_self_rel_many.self_rel_one]]) THEN [[__mm_demo4_self_rel_many_self_rel_one_self_rel_many.self_rel_one]] ELSE json_array([[__mm_demo4_self_rel_many_self_rel_one_self_rel_many.self_rel_one]]) END) `__mm_demo4_self_rel_many_self_rel_one_self_rel_many_self_rel_one_je` LEFT JOIN `demo4` `__mm_demo4_self_rel_many_self_rel_one_self_rel_many_self_rel_one` ON [[__mm_demo4_self_rel_many_self_rel_one_self_rel_many_self_rel_one.id]] = [[__mm_demo4_self_rel_many_self_rel_one_self_rel_many_self_rel_one_je.value]] WHERE `__mm_demo4`.`id` = `demo4`.`id`) {{TEST}} WHERE (NOT ([[TEST.multiMatchValue]] > 1)) OR ([[TEST.multiMatchValue]] IS NULL))))", + }, + { + "multiple rels (opt/any operators)", + "demo4", + "self_rel_many.title ?= 'test' || self_rel_one.json_object.a ?> true", + false, + "SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN json_each(CASE WHEN json_valid([[demo4.self_rel_many]]) THEN [[demo4.self_rel_many]] ELSE json_array([[demo4.self_rel_many]]) END) `demo4_self_rel_many_je` LEFT JOIN `demo4` `demo4_self_rel_many` ON [[demo4_self_rel_many.id]] = [[demo4_self_rel_many_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[demo4.self_rel_one]]) THEN [[demo4.self_rel_one]] ELSE json_array([[demo4.self_rel_one]]) END) `demo4_self_rel_one_je` LEFT JOIN `demo4` `demo4_self_rel_one` ON [[demo4_self_rel_one.id]] = [[demo4_self_rel_one_je.value]] WHERE (COALESCE([[demo4_self_rel_many.title]], '') = COALESCE({:TEST}, '') OR JSON_EXTRACT([[demo4_self_rel_one.json_object]], '$.a') > 1)", + }, + { + "multiple rels (multi-match operators)", + "demo4", + "self_rel_many.title = 'test' || self_rel_one.json_object.a > true", + false, + "SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN json_each(CASE WHEN json_valid([[demo4.self_rel_many]]) THEN [[demo4.self_rel_many]] ELSE json_array([[demo4.self_rel_many]]) END) `demo4_self_rel_many_je` LEFT JOIN `demo4` `demo4_self_rel_many` ON [[demo4_self_rel_many.id]] = [[demo4_self_rel_many_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[demo4.self_rel_one]]) THEN [[demo4.self_rel_one]] ELSE json_array([[demo4.self_rel_one]]) END) `demo4_self_rel_one_je` LEFT JOIN `demo4` `demo4_self_rel_one` ON [[demo4_self_rel_one.id]] = [[demo4_self_rel_one_je.value]] WHERE ((COALESCE([[demo4_self_rel_many.title]], '') = COALESCE({:TEST}, '')) AND (NOT EXISTS (SELECT 1 FROM (SELECT [[__mm_demo4_self_rel_many.title]] as [[multiMatchValue]] FROM `demo4` `__mm_demo4` LEFT JOIN json_each(CASE WHEN json_valid([[__mm_demo4.self_rel_many]]) THEN [[__mm_demo4.self_rel_many]] ELSE json_array([[__mm_demo4.self_rel_many]]) END) `__mm_demo4_self_rel_many_je` LEFT JOIN `demo4` `__mm_demo4_self_rel_many` ON [[__mm_demo4_self_rel_many.id]] = [[__mm_demo4_self_rel_many_je.value]] WHERE `__mm_demo4`.`id` = `demo4`.`id`) {{__TEST}} WHERE NOT (COALESCE([[__TEST.multiMatchValue]], '') = COALESCE({:TEST}, '')))) OR JSON_EXTRACT([[demo4_self_rel_one.json_object]], '$.a') > 1)", + }, + { + "@collection join (opt/any operators)", + "demo4", + "@collection.demo1.text ?> true || @collection.demo2.active ?> true || @collection.demo1.file_one ?> true", + false, + "SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN `demo1` `__collection_demo1` LEFT JOIN `demo2` `__collection_demo2` WHERE ([[__collection_demo1.text]] > 1 OR [[__collection_demo2.active]] > 1 OR [[__collection_demo1.file_one]] > 1)", + }, + { + "@collection join (multi-match operators)", + "demo4", + "@collection.demo1.text > true || @collection.demo2.active > true || @collection.demo1.file_one > true", + false, + "SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN `demo1` `__collection_demo1` LEFT JOIN `demo2` `__collection_demo2` WHERE (([[__collection_demo1.text]] > 1) AND (NOT EXISTS (SELECT 1 FROM (SELECT [[__mm__collection_demo1.text]] as [[multiMatchValue]] FROM `demo4` `__mm_demo4` LEFT JOIN `demo1` `__mm__collection_demo1` WHERE `__mm_demo4`.`id` = `demo4`.`id`) {{TEST}} WHERE (NOT ([[TEST.multiMatchValue]] > 1)) OR ([[TEST.multiMatchValue]] IS NULL))) OR ([[__collection_demo2.active]] > 1) AND (NOT EXISTS (SELECT 1 FROM (SELECT [[__mm__collection_demo2.active]] as [[multiMatchValue]] FROM `demo4` `__mm_demo4` LEFT JOIN `demo2` `__mm__collection_demo2` WHERE `__mm_demo4`.`id` = `demo4`.`id`) {{__TEST}} WHERE (NOT ([[__TEST.multiMatchValue]] > 1)) OR ([[__TEST.multiMatchValue]] IS NULL))) OR ([[__collection_demo1.file_one]] > 1) AND (NOT EXISTS (SELECT 1 FROM (SELECT [[__mm__collection_demo1.file_one]] as [[multiMatchValue]] FROM `demo4` `__mm_demo4` LEFT JOIN `demo1` `__mm__collection_demo1` WHERE `__mm_demo4`.`id` = `demo4`.`id`) {{TEST}} WHERE (NOT ([[TEST.multiMatchValue]] > 1)) OR ([[TEST.multiMatchValue]] IS NULL))))", }, { "@request.auth fields", "demo4", - []string{"@request.auth.id", "@request.auth.username", "@request.auth.rel.title", "@request.data.demo"}, + "@request.auth.id > true || @request.auth.username > true || @request.auth.rel.title > true || @request.data.demo > true", false, - "^" + - regexp.QuoteMeta("SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN `users` `__auth_users` ON [[__auth_users.id]] =") + - " {:.*} " + - regexp.QuoteMeta("LEFT JOIN json_each(CASE WHEN json_valid([[__auth_users.rel]]) THEN [[__auth_users.rel]] ELSE json_array([[__auth_users.rel]]) END) `__auth_users_rel_je` LEFT JOIN `demo2` `__auth_users_rel` ON [[__auth_users_rel.id]] = [[__auth_users_rel_je.value]]") + - "$", + "SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN `users` `__auth_users` ON `__auth_users`.`id`={:TEST} LEFT JOIN json_each(CASE WHEN json_valid([[__auth_users.rel]]) THEN [[__auth_users.rel]] ELSE json_array([[__auth_users.rel]]) END) `__auth_users_rel_je` LEFT JOIN `demo2` `__auth_users_rel` ON [[__auth_users_rel.id]] = [[__auth_users_rel_je.value]] WHERE ({:TEST} > 1 OR {:TEST} > 1 OR [[__auth_users_rel.title]] > 1 OR NULL > 1)", }, { - "hidden field with system filters (ignore emailVisibility)", + "hidden field with system filters (multi-match and ignore emailVisibility)", "demo4", - []string{"@collection.users.email", "@request.auth.email"}, + "@collection.users.email > true || @request.auth.email > true", false, - "SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN `users` `__collection_users`", + "SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN `users` `__collection_users` WHERE (([[__collection_users.email]] > 1) AND (NOT EXISTS (SELECT 1 FROM (SELECT [[__mm__collection_users.email]] as [[multiMatchValue]] FROM `demo4` `__mm_demo4` LEFT JOIN `users` `__mm__collection_users` WHERE `__mm_demo4`.`id` = `demo4`.`id`) {{__smTEST}} WHERE (NOT ([[__smTEST.multiMatchValue]] > 1)) OR ([[__smTEST.multiMatchValue]] IS NULL))) OR {:TEST} > 1)", }, { "hidden field (add emailVisibility)", "users", - []string{"email"}, + "email > true", false, - "SELECT `users`.* FROM `users` WHERE [[users.emailVisibility]] = TRUE", + "SELECT `users`.* FROM `users` WHERE (([[users.email]] > 1) AND ([[users.emailVisibility]] = TRUE))", }, { "hidden field (force ignore emailVisibility)", "users", - []string{"email"}, + "email > true", true, - "SELECT `users`.* FROM `users`", + "SELECT `users`.* FROM `users` WHERE [[users.email]] > 1", + }, + { + "isset key", + "demo1", + "@request.data.a:isset > true ||" + + "@request.data.b:isset > true ||" + + "@request.data.c:isset > true ||" + + "@request.query.a:isset > true ||" + + "@request.query.b:isset > true ||" + + "@request.query.c:isset > true", + false, + "SELECT `demo1`.* FROM `demo1` WHERE (TRUE > 1 OR TRUE > 1 OR FALSE > 1 OR TRUE > 1 OR TRUE > 1 OR FALSE > 1)", + }, + { + "@request.data.rel.* fields", + "demo1", + "@request.data.rel_one > true &&" + + "@request.data.rel_one.text > true &&" + + "@request.data.rel_many > true &&" + + "@request.data.rel_many.email != 'test' &&" + + "@request.data.rel_many.url ?= 'test' &&" + + "@request.data.rel_many.avatar ~ 'test'", + false, + "SELECT DISTINCT `demo1`.* FROM `demo1` LEFT JOIN `demo1` `__data_demo1` ON [[__data_demo1.id]]={:TEST} LEFT JOIN `users` `__data_users` ON [[__data_users.id]] IN ({:TEST}, {:TEST}) WHERE ({:TEST} > 1 AND [[__data_demo1.text]] > 1 AND {:TEST} > 1 AND (COALESCE([[__data_users.email]], '') != COALESCE({:TEST}, '')) AND (NOT EXISTS (SELECT 1 FROM (SELECT [[__data_mm_users.email]] as [[multiMatchValue]] FROM `demo1` `__mm_demo1` LEFT JOIN `users` `__data_mm_users` ON `__data_mm_users`.`id` IN ({:TEST}, {:TEST}) WHERE `__mm_demo1`.`id` = `demo1`.`id`) {{__smTEST}} WHERE (NOT (COALESCE([[__smTEST.multiMatchValue]], '') != COALESCE({:TEST}, ''))) OR ([[__smTEST.multiMatchValue]] IS NULL))) AND COALESCE(NULL, '') = COALESCE({:TEST}, '') AND ([[__data_users.avatar]] LIKE {:TEST} ESCAPE '\\') AND (NOT EXISTS (SELECT 1 FROM (SELECT [[__data_mm_users.avatar]] as [[multiMatchValue]] FROM `demo1` `__mm_demo1` LEFT JOIN `users` `__data_mm_users` ON `__data_mm_users`.`id` IN ({:TEST}, {:TEST}) WHERE `__mm_demo1`.`id` = `demo1`.`id`) {{__smTEST}} WHERE (NOT ([[__smTEST.multiMatchValue]] LIKE {:TEST} ESCAPE '\\')) OR ([[__smTEST.multiMatchValue]] IS NULL))))", + }, + { + "@request.data.select:each fields", + "demo1", + "@request.data.select_one = 'test' &&" + + "@request.data.select_one:each != 'test' &&" + + "@request.data.select_one:each ?= 'test' &&" + + "@request.data.select_many ~ 'test' &&" + + "@request.data.select_many:each = 'test' &&" + + "@request.data.select_many:each ?< true", + false, + "SELECT DISTINCT `demo1`.* FROM `demo1` LEFT JOIN json_each({:TEST}) `__dataSelect_select_one_je` LEFT JOIN json_each({:TEST}) `__dataSelect_select_many_je` WHERE (COALESCE(NULL, '') = COALESCE({:TEST}, '') AND COALESCE([[__dataSelect_select_one_je.value]], '') != COALESCE({:TEST}, '') AND COALESCE([[__dataSelect_select_one_je.value]], '') = COALESCE({:TEST}, '') AND {:TEST} LIKE {:TEST} ESCAPE '\\' AND (COALESCE([[__dataSelect_select_many_je.value]], '') = COALESCE({:TEST}, '')) AND (NOT EXISTS (SELECT 1 FROM (SELECT [[__mm__dataSelect_select_many_je.value]] as [[multiMatchValue]] FROM `demo1` `__mm_demo1` LEFT JOIN json_each({:TEST}) `__mm__dataSelect_select_many_je` WHERE `__mm_demo1`.`id` = `demo1`.`id`) {{__smTEST}} WHERE NOT (COALESCE([[__smTEST.multiMatchValue]], '') = COALESCE({:TEST}, '')))) AND [[__dataSelect_select_many_je.value]] < 1)", + }, + { + "regular select:each fields", + "demo1", + "select_one = 'test' &&" + + "select_one:each != 'test' &&" + + "select_one:each ?> true &&" + + "select_many ~ 'test' &&" + + "select_many:each = 'test' &&" + + "select_many:each ?> true", + false, + "SELECT DISTINCT `demo1`.* FROM `demo1` LEFT JOIN json_each(CASE WHEN json_valid([[demo1.select_one]]) THEN [[demo1.select_one]] ELSE json_array([[demo1.select_one]]) END) `demo1_select_one_je` LEFT JOIN json_each(CASE WHEN json_valid([[demo1.select_many]]) THEN [[demo1.select_many]] ELSE json_array([[demo1.select_many]]) END) `demo1_select_many_je` WHERE (COALESCE([[demo1.select_one]], '') = COALESCE({:TEST}, '') AND COALESCE([[demo1_select_one_je.value]], '') != COALESCE({:TEST}, '') AND [[demo1_select_one_je.value]] > 1 AND [[demo1.select_many]] LIKE {:TEST} ESCAPE '\\' AND (COALESCE([[demo1_select_many_je.value]], '') = COALESCE({:TEST}, '')) AND (NOT EXISTS (SELECT 1 FROM (SELECT [[__mm_demo1_select_many_je.value]] as [[multiMatchValue]] FROM `demo1` `__mm_demo1` LEFT JOIN json_each(CASE WHEN json_valid([[__mm_demo1.select_many]]) THEN [[__mm_demo1.select_many]] ELSE json_array([[__mm_demo1.select_many]]) END) `__mm_demo1_select_many_je` WHERE `__mm_demo1`.`id` = `demo1`.`id`) {{__smTEST}} WHERE NOT (COALESCE([[__smTEST.multiMatchValue]], '') = COALESCE({:TEST}, '')))) AND [[demo1_select_many_je.value]] > 1)", + }, + { + "select:each vs select:each", + "demo1", + "select_one:each != select_many:each &&" + + "select_many:each > select_one:each &&" + + "select_many:each ?< select_one:each &&" + + "select_many:each = @request.data.select_many:each", + false, + "SELECT DISTINCT `demo1`.* FROM `demo1` LEFT JOIN json_each(CASE WHEN json_valid([[demo1.select_one]]) THEN [[demo1.select_one]] ELSE json_array([[demo1.select_one]]) END) `demo1_select_one_je` LEFT JOIN json_each(CASE WHEN json_valid([[demo1.select_many]]) THEN [[demo1.select_many]] ELSE json_array([[demo1.select_many]]) END) `demo1_select_many_je` LEFT JOIN json_each({:TEST}) `__dataSelect_select_many_je` WHERE ((COALESCE([[demo1_select_one_je.value]], '') != COALESCE([[demo1_select_many_je.value]], '')) AND (NOT EXISTS (SELECT 1 FROM (SELECT [[__mm_demo1_select_many_je.value]] as [[multiMatchValue]] FROM `demo1` `__mm_demo1` LEFT JOIN json_each(CASE WHEN json_valid([[__mm_demo1.select_many]]) THEN [[__mm_demo1.select_many]] ELSE json_array([[__mm_demo1.select_many]]) END) `__mm_demo1_select_many_je` WHERE `__mm_demo1`.`id` = `demo1`.`id`) {{__smTEST}} WHERE (NOT (COALESCE([[demo1_select_one_je.value]], '') != COALESCE([[__smTEST.multiMatchValue]], ''))) OR ([[__smTEST.multiMatchValue]] IS NULL))) AND ([[demo1_select_many_je.value]] > [[demo1_select_one_je.value]]) AND (NOT EXISTS (SELECT 1 FROM (SELECT [[__mm_demo1_select_many_je.value]] as [[multiMatchValue]] FROM `demo1` `__mm_demo1` LEFT JOIN json_each(CASE WHEN json_valid([[__mm_demo1.select_many]]) THEN [[__mm_demo1.select_many]] ELSE json_array([[__mm_demo1.select_many]]) END) `__mm_demo1_select_many_je` WHERE `__mm_demo1`.`id` = `demo1`.`id`) {{__smTEST}} WHERE (NOT ([[__smTEST.multiMatchValue]] > [[demo1_select_one_je.value]])) OR ([[__smTEST.multiMatchValue]] IS NULL))) AND [[demo1_select_many_je.value]] < [[demo1_select_one_je.value]] AND (COALESCE([[demo1_select_many_je.value]], '') = COALESCE([[__dataSelect_select_many_je.value]], '')) AND (NOT EXISTS (SELECT 1 FROM (SELECT [[__mm_demo1_select_many_je.value]] as [[multiMatchValue]] FROM `demo1` `__mm_demo1` LEFT JOIN json_each(CASE WHEN json_valid([[__mm_demo1.select_many]]) THEN [[__mm_demo1.select_many]] ELSE json_array([[__mm_demo1.select_many]]) END) `__mm_demo1_select_many_je` WHERE `__mm_demo1`.`id` = `demo1`.`id`) {{__mlTEST}} LEFT JOIN (SELECT [[__mm__dataSelect_select_many_je.value]] as [[multiMatchValue]] FROM `demo1` `__mm_demo1` LEFT JOIN json_each({:TEST}) `__mm__dataSelect_select_many_je` WHERE `__mm_demo1`.`id` = `demo1`.`id`) {{__mrTEST}} WHERE NOT (COALESCE([[__mlTEST.multiMatchValue]], '') = COALESCE([[__mrTEST.multiMatchValue]], '')))))", + }, + { + "mixed multi-match vs multi-match", + "demo1", + "rel_many.rel.active != rel_many.name &&" + + "rel_many.rel.active ?= rel_many.name &&" + + "rel_many.rel.title ~ rel_one.email &&" + + "@collection.demo2.active = rel_many.rel.active &&" + + "@collection.demo2.active ?= rel_many.rel.active &&" + + "rel_many.email > @request.data.rel_many.email", + false, + "SELECT DISTINCT `demo1`.* FROM `demo1` LEFT JOIN json_each(CASE WHEN json_valid([[demo1.rel_many]]) THEN [[demo1.rel_many]] ELSE json_array([[demo1.rel_many]]) END) `demo1_rel_many_je` LEFT JOIN `users` `demo1_rel_many` ON [[demo1_rel_many.id]] = [[demo1_rel_many_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[demo1_rel_many.rel]]) THEN [[demo1_rel_many.rel]] ELSE json_array([[demo1_rel_many.rel]]) END) `demo1_rel_many_rel_je` LEFT JOIN `demo2` `demo1_rel_many_rel` ON [[demo1_rel_many_rel.id]] = [[demo1_rel_many_rel_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[demo1.rel_one]]) THEN [[demo1.rel_one]] ELSE json_array([[demo1.rel_one]]) END) `demo1_rel_one_je` LEFT JOIN `demo1` `demo1_rel_one` ON [[demo1_rel_one.id]] = [[demo1_rel_one_je.value]] LEFT JOIN `demo2` `__collection_demo2` LEFT JOIN `users` `__data_users` ON [[__data_users.id]] IN ({:TEST}, {:TEST}) WHERE ((COALESCE([[demo1_rel_many_rel.active]], '') != COALESCE([[demo1_rel_many.name]], '')) AND (NOT EXISTS (SELECT 1 FROM (SELECT [[__mm_demo1_rel_many_rel.active]] as [[multiMatchValue]] FROM `demo1` `__mm_demo1` LEFT JOIN json_each(CASE WHEN json_valid([[__mm_demo1.rel_many]]) THEN [[__mm_demo1.rel_many]] ELSE json_array([[__mm_demo1.rel_many]]) END) `__mm_demo1_rel_many_je` LEFT JOIN `users` `__mm_demo1_rel_many` ON [[__mm_demo1_rel_many.id]] = [[__mm_demo1_rel_many_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[__mm_demo1_rel_many.rel]]) THEN [[__mm_demo1_rel_many.rel]] ELSE json_array([[__mm_demo1_rel_many.rel]]) END) `__mm_demo1_rel_many_rel_je` LEFT JOIN `demo2` `__mm_demo1_rel_many_rel` ON [[__mm_demo1_rel_many_rel.id]] = [[__mm_demo1_rel_many_rel_je.value]] WHERE `__mm_demo1`.`id` = `demo1`.`id`) {{__mlTEST}} LEFT JOIN (SELECT [[__mm_demo1_rel_many.name]] as [[multiMatchValue]] FROM `demo1` `__mm_demo1` LEFT JOIN json_each(CASE WHEN json_valid([[__mm_demo1.rel_many]]) THEN [[__mm_demo1.rel_many]] ELSE json_array([[__mm_demo1.rel_many]]) END) `__mm_demo1_rel_many_je` LEFT JOIN `users` `__mm_demo1_rel_many` ON [[__mm_demo1_rel_many.id]] = [[__mm_demo1_rel_many_je.value]] WHERE `__mm_demo1`.`id` = `demo1`.`id`) {{__mrTEST}} WHERE (NOT (COALESCE([[__mlTEST.multiMatchValue]], '') != COALESCE([[__mrTEST.multiMatchValue]], ''))) OR ([[__mlTEST.multiMatchValue]] IS NULL) OR ([[__mrTEST.multiMatchValue]] IS NULL))) AND COALESCE([[demo1_rel_many_rel.active]], '') = COALESCE([[demo1_rel_many.name]], '') AND ([[demo1_rel_many_rel.title]] LIKE ('%' || [[demo1_rel_one.email]] || '%') ESCAPE '\\') AND (NOT EXISTS (SELECT 1 FROM (SELECT [[__mm_demo1_rel_many_rel.title]] as [[multiMatchValue]] FROM `demo1` `__mm_demo1` LEFT JOIN json_each(CASE WHEN json_valid([[__mm_demo1.rel_many]]) THEN [[__mm_demo1.rel_many]] ELSE json_array([[__mm_demo1.rel_many]]) END) `__mm_demo1_rel_many_je` LEFT JOIN `users` `__mm_demo1_rel_many` ON [[__mm_demo1_rel_many.id]] = [[__mm_demo1_rel_many_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[__mm_demo1_rel_many.rel]]) THEN [[__mm_demo1_rel_many.rel]] ELSE json_array([[__mm_demo1_rel_many.rel]]) END) `__mm_demo1_rel_many_rel_je` LEFT JOIN `demo2` `__mm_demo1_rel_many_rel` ON [[__mm_demo1_rel_many_rel.id]] = [[__mm_demo1_rel_many_rel_je.value]] WHERE `__mm_demo1`.`id` = `demo1`.`id`) {{__smTEST}} WHERE (NOT ([[__smTEST.multiMatchValue]] LIKE ('%' || [[demo1_rel_one.email]] || '%') ESCAPE '\\')) OR ([[__smTEST.multiMatchValue]] IS NULL))) AND (COALESCE([[__collection_demo2.active]], '') = COALESCE([[demo1_rel_many_rel.active]], '')) AND (NOT EXISTS (SELECT 1 FROM (SELECT [[__mm__collection_demo2.active]] as [[multiMatchValue]] FROM `demo1` `__mm_demo1` LEFT JOIN `demo2` `__mm__collection_demo2` WHERE `__mm_demo1`.`id` = `demo1`.`id`) {{__mlTEST}} LEFT JOIN (SELECT [[__mm_demo1_rel_many_rel.active]] as [[multiMatchValue]] FROM `demo1` `__mm_demo1` LEFT JOIN json_each(CASE WHEN json_valid([[__mm_demo1.rel_many]]) THEN [[__mm_demo1.rel_many]] ELSE json_array([[__mm_demo1.rel_many]]) END) `__mm_demo1_rel_many_je` LEFT JOIN `users` `__mm_demo1_rel_many` ON [[__mm_demo1_rel_many.id]] = [[__mm_demo1_rel_many_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[__mm_demo1_rel_many.rel]]) THEN [[__mm_demo1_rel_many.rel]] ELSE json_array([[__mm_demo1_rel_many.rel]]) END) `__mm_demo1_rel_many_rel_je` LEFT JOIN `demo2` `__mm_demo1_rel_many_rel` ON [[__mm_demo1_rel_many_rel.id]] = [[__mm_demo1_rel_many_rel_je.value]] WHERE `__mm_demo1`.`id` = `demo1`.`id`) {{__mrTEST}} WHERE NOT (COALESCE([[__mlTEST.multiMatchValue]], '') = COALESCE([[__mrTEST.multiMatchValue]], '')))) AND COALESCE([[__collection_demo2.active]], '') = COALESCE([[demo1_rel_many_rel.active]], '') AND (([[demo1_rel_many.email]] > [[__data_users.email]]) AND (NOT EXISTS (SELECT 1 FROM (SELECT [[__mm_demo1_rel_many.email]] as [[multiMatchValue]] FROM `demo1` `__mm_demo1` LEFT JOIN json_each(CASE WHEN json_valid([[__mm_demo1.rel_many]]) THEN [[__mm_demo1.rel_many]] ELSE json_array([[__mm_demo1.rel_many]]) END) `__mm_demo1_rel_many_je` LEFT JOIN `users` `__mm_demo1_rel_many` ON [[__mm_demo1_rel_many.id]] = [[__mm_demo1_rel_many_je.value]] WHERE `__mm_demo1`.`id` = `demo1`.`id`) {{__mlTEST}} LEFT JOIN (SELECT [[__data_mm_users.email]] as [[multiMatchValue]] FROM `demo1` `__mm_demo1` LEFT JOIN `users` `__data_mm_users` ON `__data_mm_users`.`id` IN ({:TEST}, {:TEST}) WHERE `__mm_demo1`.`id` = `demo1`.`id`) {{__mrTEST}} WHERE (NOT ([[__mlTEST.multiMatchValue]] > [[__mrTEST.multiMatchValue]])) OR ([[__mlTEST.multiMatchValue]] IS NULL) OR ([[__mrTEST.multiMatchValue]] IS NULL)))) AND ([[demo1_rel_many.emailVisibility]] = TRUE))", + }, + { + "@request.data.arrayable:length fields", + "demo1", + "@request.data.select_one:length > 1 &&" + + "@request.data.select_one:length ?> 2 &&" + + "@request.data.select_many:length < 3 &&" + + "@request.data.select_many:length ?> 4 &&" + + "@request.data.rel_one:length = 5 &&" + + "@request.data.rel_one:length ?= 6 &&" + + "@request.data.rel_many:length != 7 &&" + + "@request.data.rel_many:length ?!= 8 &&" + + "@request.data.file_one:length = 9 &&" + + "@request.data.file_one:length ?= 0 &&" + + "@request.data.file_many:length != 1 &&" + + "@request.data.file_many:length ?!= 2", + false, + "SELECT `demo1`.* FROM `demo1` WHERE (0 > {:TEST} AND 0 > {:TEST} AND 2 < {:TEST} AND 2 > {:TEST} AND COALESCE(1, '') = COALESCE({:TEST}, '') AND COALESCE(1, '') = COALESCE({:TEST}, '') AND COALESCE(2, '') != COALESCE({:TEST}, '') AND COALESCE(2, '') != COALESCE({:TEST}, '') AND COALESCE(1, '') = COALESCE({:TEST}, '') AND COALESCE(1, '') = COALESCE({:TEST}, '') AND COALESCE(3, '') != COALESCE({:TEST}, '') AND COALESCE(3, '') != COALESCE({:TEST}, ''))", + }, + { + "regular arrayable:length fields", + "demo4", + "@request.data.self_rel_one.self_rel_many:length > 1 &&" + + "@request.data.self_rel_one.self_rel_many:length ?> 2 &&" + + "@request.data.rel_many_cascade.files:length ?< 3 &&" + + "@request.data.rel_many_cascade.files:length < 4 &&" + + "self_rel_one.self_rel_many:length = 5 &&" + + "self_rel_one.self_rel_many:length ?= 6 &&" + + "self_rel_one.rel_many_cascade.files:length != 7 &&" + + "self_rel_one.rel_many_cascade.files:length ?!= 8", + false, + "SELECT DISTINCT `demo4`.* FROM `demo4` LEFT JOIN `demo4` `__data_demo4` ON [[__data_demo4.id]]={:TEST} LEFT JOIN `demo3` `__data_demo3` ON [[__data_demo3.id]] IN ({:TEST}, {:TEST}) LEFT JOIN json_each(CASE WHEN json_valid([[demo4.self_rel_one]]) THEN [[demo4.self_rel_one]] ELSE json_array([[demo4.self_rel_one]]) END) `demo4_self_rel_one_je` LEFT JOIN `demo4` `demo4_self_rel_one` ON [[demo4_self_rel_one.id]] = [[demo4_self_rel_one_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[demo4_self_rel_one.rel_many_cascade]]) THEN [[demo4_self_rel_one.rel_many_cascade]] ELSE json_array([[demo4_self_rel_one.rel_many_cascade]]) END) `demo4_self_rel_one_rel_many_cascade_je` LEFT JOIN `demo3` `demo4_self_rel_one_rel_many_cascade` ON [[demo4_self_rel_one_rel_many_cascade.id]] = [[demo4_self_rel_one_rel_many_cascade_je.value]] WHERE (json_array_length(CASE WHEN json_valid([[__data_demo4.self_rel_many]]) THEN [[__data_demo4.self_rel_many]] ELSE json_array([[__data_demo4.self_rel_many]]) END) > {:TEST} AND json_array_length(CASE WHEN json_valid([[__data_demo4.self_rel_many]]) THEN [[__data_demo4.self_rel_many]] ELSE json_array([[__data_demo4.self_rel_many]]) END) > {:TEST} AND json_array_length(CASE WHEN json_valid([[__data_demo3.files]]) THEN [[__data_demo3.files]] ELSE json_array([[__data_demo3.files]]) END) < {:TEST} AND (json_array_length(CASE WHEN json_valid([[__data_demo3.files]]) THEN [[__data_demo3.files]] ELSE json_array([[__data_demo3.files]]) END) < {:TEST}) AND (NOT EXISTS (SELECT 1 FROM (SELECT json_array_length(CASE WHEN json_valid([[__data_mm_demo3.files]]) THEN [[__data_mm_demo3.files]] ELSE json_array([[__data_mm_demo3.files]]) END) as [[multiMatchValue]] FROM `demo4` `__mm_demo4` LEFT JOIN `demo3` `__data_mm_demo3` ON `__data_mm_demo3`.`id` IN ({:TEST}, {:TEST}) WHERE `__mm_demo4`.`id` = `demo4`.`id`) {{__smTEST}} WHERE (NOT ([[__smTEST.multiMatchValue]] < {:TEST})) OR ([[__smTEST.multiMatchValue]] IS NULL))) AND COALESCE(json_array_length(CASE WHEN json_valid([[demo4_self_rel_one.self_rel_many]]) THEN [[demo4_self_rel_one.self_rel_many]] ELSE json_array([[demo4_self_rel_one.self_rel_many]]) END), '') = COALESCE({:TEST}, '') AND COALESCE(json_array_length(CASE WHEN json_valid([[demo4_self_rel_one.self_rel_many]]) THEN [[demo4_self_rel_one.self_rel_many]] ELSE json_array([[demo4_self_rel_one.self_rel_many]]) END), '') = COALESCE({:TEST}, '') AND (COALESCE(json_array_length(CASE WHEN json_valid([[demo4_self_rel_one_rel_many_cascade.files]]) THEN [[demo4_self_rel_one_rel_many_cascade.files]] ELSE json_array([[demo4_self_rel_one_rel_many_cascade.files]]) END), '') != COALESCE({:TEST}, '')) AND (NOT EXISTS (SELECT 1 FROM (SELECT json_array_length(CASE WHEN json_valid([[__mm_demo4_self_rel_one_rel_many_cascade.files]]) THEN [[__mm_demo4_self_rel_one_rel_many_cascade.files]] ELSE json_array([[__mm_demo4_self_rel_one_rel_many_cascade.files]]) END) as [[multiMatchValue]] FROM `demo4` `__mm_demo4` LEFT JOIN json_each(CASE WHEN json_valid([[__mm_demo4.self_rel_one]]) THEN [[__mm_demo4.self_rel_one]] ELSE json_array([[__mm_demo4.self_rel_one]]) END) `__mm_demo4_self_rel_one_je` LEFT JOIN `demo4` `__mm_demo4_self_rel_one` ON [[__mm_demo4_self_rel_one.id]] = [[__mm_demo4_self_rel_one_je.value]] LEFT JOIN json_each(CASE WHEN json_valid([[__mm_demo4_self_rel_one.rel_many_cascade]]) THEN [[__mm_demo4_self_rel_one.rel_many_cascade]] ELSE json_array([[__mm_demo4_self_rel_one.rel_many_cascade]]) END) `__mm_demo4_self_rel_one_rel_many_cascade_je` LEFT JOIN `demo3` `__mm_demo4_self_rel_one_rel_many_cascade` ON [[__mm_demo4_self_rel_one_rel_many_cascade.id]] = [[__mm_demo4_self_rel_one_rel_many_cascade_je.value]] WHERE `__mm_demo4`.`id` = `demo4`.`id`) {{__smTEST}} WHERE (NOT (COALESCE([[__smTEST.multiMatchValue]], '') != COALESCE({:TEST}, ''))) OR ([[__smTEST.multiMatchValue]] IS NULL))) AND COALESCE(json_array_length(CASE WHEN json_valid([[demo4_self_rel_one_rel_many_cascade.files]]) THEN [[demo4_self_rel_one_rel_many_cascade.files]] ELSE json_array([[demo4_self_rel_one_rel_many_cascade.files]]) END), '') != COALESCE({:TEST}, ''))", }, } for _, s := range scenarios { collection, err := app.Dao().FindCollectionByNameOrId(s.collectionIdOrName) if err != nil { - t.Errorf("[%s] Failed to load collection %s: %v", s.name, s.collectionIdOrName, err) + t.Fatalf("[%s] Failed to load collection %s: %v", s.name, s.collectionIdOrName, err) } query := app.Dao().RecordQuery(collection) r := resolvers.NewRecordFieldResolver(app.Dao(), collection, requestData, s.allowHiddenFields) - for _, field := range s.fields { - r.Resolve(field) + + expr, err := search.FilterData(s.rule).BuildExpr(r) + if err != nil { + t.Fatalf("[%s] BuildExpr failed with error %v", s.name, err) } if err := r.UpdateQuery(query); err != nil { - t.Errorf("[%s] UpdateQuery failed with error %v", s.name, err) - continue + t.Fatalf("[%s] UpdateQuery failed with error %v", s.name, err) } - rawQuery := query.Build().SQL() + rawQuery := query.AndWhere(expr).Build().SQL() - if !list.ExistInSliceWithRegex(rawQuery, []string{s.expectQuery}) { - t.Errorf("[%s] Expected query\n %v \ngot:\n %v", s.name, s.expectQuery, rawQuery) + // replace TEST placeholder with .+ regex pattern + expectQuery := strings.ReplaceAll( + "^"+regexp.QuoteMeta(s.expectQuery)+"$", + "TEST", + `\w+`, + ) + + if !list.ExistInSliceWithRegex(rawQuery, []string{expectQuery}) { + t.Fatalf("[%s] Expected query\n %v \ngot:\n %v", s.name, expectQuery, rawQuery) } } } @@ -230,7 +390,7 @@ func TestRecordFieldResolverResolveSchemaFields(t *testing.T) { } for _, s := range scenarios { - name, params, err := r.Resolve(s.fieldName) + r, err := r.Resolve(s.fieldName) hasErr := err != nil if hasErr != s.expectError { @@ -238,13 +398,17 @@ func TestRecordFieldResolverResolveSchemaFields(t *testing.T) { continue } - if name != s.expectName { - t.Errorf("(%q) Expected name %q, got %q", s.fieldName, s.expectName, name) + if hasErr { + continue + } + + if r.Identifier != s.expectName { + t.Errorf("(%q) Expected r.Identifier %q, got %q", s.fieldName, s.expectName, r.Identifier) } // params should be empty for non @request fields - if len(params) != 0 { - t.Errorf("(%q) Expected 0 params, got %v", s.fieldName, params) + if len(r.Params) != 0 { + t.Errorf("(%q) Expected 0 r.Params, got %v", s.fieldName, r.Params) } } } @@ -253,7 +417,7 @@ func TestRecordFieldResolverResolveStaticRequestDataFields(t *testing.T) { app, _ := tests.NewTestApp() defer app.Cleanup() - collection, err := app.Dao().FindCollectionByNameOrId("demo4") + collection, err := app.Dao().FindCollectionByNameOrId("demo1") if err != nil { t.Fatal(err) } @@ -269,8 +433,10 @@ func TestRecordFieldResolverResolveStaticRequestDataFields(t *testing.T) { "a": 123, }, Data: map[string]any{ - "b": 456, - "c": map[string]int{"sub": 1}, + "number": "10", + "number_unknown": "20", + "b": 456, + "c": map[string]int{"sub": 1}, }, AuthRecord: authRecord, } @@ -292,6 +458,8 @@ func TestRecordFieldResolverResolveStaticRequestDataFields(t *testing.T) { {"@request.query.a.missing", false, ``}, {"@request.data", true, ``}, {"@request.data.b", false, `456`}, + {"@request.data.number", false, `10`}, // number field normalization + {"@request.data.number_unknown", false, `"20"`}, // no numeric normalizations for unknown fields {"@request.data.b.missing", false, ``}, {"@request.data.c", false, `"{\"sub\":1}"`}, {"@request.auth", true, ""}, @@ -304,7 +472,7 @@ func TestRecordFieldResolverResolveStaticRequestDataFields(t *testing.T) { } for i, s := range scenarios { - name, params, err := r.Resolve(s.fieldName) + r, err := r.Resolve(s.fieldName) hasErr := err != nil if hasErr != s.expectError { @@ -318,34 +486,34 @@ func TestRecordFieldResolverResolveStaticRequestDataFields(t *testing.T) { // missing key // --- - if len(params) == 0 { - if name != "NULL" { - t.Errorf("(%d) Expected 0 placeholder parameters for %v, got %v", i, name, params) + if len(r.Params) == 0 { + if r.Identifier != "NULL" { + t.Errorf("(%d) Expected 0 placeholder parameters for %v, got %v", i, r.Identifier, r.Params) } continue } // existing key // --- - if len(params) != 1 { - t.Errorf("(%d) Expected 1 placeholder parameter for %v, got %v", i, name, params) + if len(r.Params) != 1 { + t.Errorf("(%d) Expected 1 placeholder parameter for %v, got %v", i, r.Identifier, r.Params) continue } var paramName string var paramValue any - for k, v := range params { + for k, v := range r.Params { paramName = k paramValue = v } - if name != ("{:" + paramName + "}") { - t.Errorf("(%d) Expected parameter name %q, got %q", i, paramName, name) + if r.Identifier != ("{:" + paramName + "}") { + t.Errorf("(%d) Expected parameter r.Identifier %q, got %q", i, paramName, r.Identifier) } encodedParamValue, _ := json.Marshal(paramValue) if string(encodedParamValue) != s.expectParamValue { - t.Errorf("(%d) Expected params %v for %v, got %v", i, s.expectParamValue, name, string(encodedParamValue)) + t.Errorf("(%d) Expected r.Params %v for %v, got %v", i, s.expectParamValue, r.Identifier, string(encodedParamValue)) } } } diff --git a/tests/data/data.db b/tests/data/data.db index 4ff0718b9e9c4fba9ec710aa0da8166c4aabdb2f..81c969f44ff5d3b1e30a62ea96a1c62eb0aaf38a 100644 GIT binary patch delta 1980 zcmcf?ZD<>1_})90U79xUvag`6>+RTdHQDVhcj@I)gRN}`Vrz@5&Lw8a^>S;|UA`}E z+O>3@q7DkJ=En_W%wPVI!AfzbznnOWOxae4-%J=X83RECAbT(g-h+1*H>H1uyU=OxMzp!{I<%8e#^7lv!(U(?ehN>*@8AMl zKzdqXv4767Weec~Qqm`-HSg$AMQ`PKwy4j|Zzthd41R*RenK2q;8|$GKj0kVE5PDg zXBw?m!UtDL%35NM{N9dfyZ< z`=;<;#jRE1SkBLjjE5J^1MlOf>efg7^$~uUTn8nHX67?|311H-n9qKWp9JfneCDk$ z@W6T~-e*de@rCtJf@J=A1t+35sAIVO6lOmKccXyK+NWpgfHmMc=z1ImNDu2-aZaQ- z-j5!Sz<2~Hm>E$snk4xWdYY3b(jhuCA!ih2ESngWg%p=WA&W~%IUdtTv#puj(4atv zYXBj75K$>;$#i&dP0=*Pc~MIIyu`4q80^K7F^&dDLjbJNtQzBEcwP)@vM}x$6H<~- zR>txpp>QZ%O)B^W!S9h6ufPXO{W4o|u9~LGw~_zSxmCkgqIjOgufyIN^YP7u%UToP z267&=Tkc_S8HViF?FSmZvfZ^^vJKRIUDsp1Y`JHBo7`bJSGrLOU$YqJUL^K=$a%2G zd4k%v(dl%8SDSTtP*clYQr?8l=es)wx~YMVr+d1oXc=Y%egsbzPeYqEnpHJ4C6ePs z7HqYY4ymNE^Lwz(mQyuV(eLA|m2(Ac%zg=W#q^XeYcz!v^iW;h`#WCf8KBsfG`G>& z?F2K9crvCIA~lU3QL-u;MzKgdRwx@IRt$XRxvuV)sAw&{@$q%Az0Dh?_Czb3(H83x zu$7#B1?m5voZU&Zw6Mn2Z$Xo@Y;}Yyzr3YshZZ);7|Ykdqek;JP;cHnMA$6mL+$t_ z$k(*hN+sisM8Nuhx(qg$pq(H#S%B>ZX1jqB{f+I3H=0Q3BDXnbL()`RTdyM!s0r(! zoLfn{!7boUGMAbdO{;}WamUyQlu_@k_F#+-7njoylNl|;B@3ETTpBw}dENA=tmV}l z?GK?Yt)_OGr^qptITF{@+!`O( zo>eo*W}S)2y3CZ-l*By{{BngHF=fY@(){_pQ5 delta 1066 zcmaJ=Ur19?9KPpX-G6tsoGzN;4Jwkk+r7K@y1Q#qR*NE0%OOh8Hn*A5$bTDcHJSQQ z_@s6pZZBccLysw=E@M;Fuh3pIOp&?zwi6bIUm0>IAb21 zF^@T{5W_GrKQw6V8n0ptAw~ttrXqKs2Eb(uE@!QiAE2~cQGxOm46bCYGoN5~<Qkii}63X^N%g2WgOy z?`44N#=rnj1_tma9@}3W<0ctKHs| zr|uQq=m3FobF9+)9G}Jiu{e=N#A?dztya#w#7BU1BvGP#dxakc8z7b;-L%LHBEwMv z$0^=9d@5gJ_?$Gui5y3H7*_c`j}t)!^bqS17;-CNIbhV!VQ>MSH-9uY7rimA8ebUw zhPQ@#{hY2Q7n;djAcwAN?lpEE6Of8_3|5tFhixw4dwl>+DWlY!8wL zgWV5y!CH=luKPfjZfzrZ` zu4pVG(ZD9zfL%^6fxX(wT2^B}>y+=d5xX<0LjsIy!;4`+viqE1Xn)t`NHiHxwN)Vh zm_Sz~$wip6thNzG&HaKN!lIz*SH6$d;dqm_ Oun>X0ifN4a0sjErW<`|% diff --git a/tests/data/storage/wsmn24bux7wo113/84nmscqy84lsi1t/test_MaWC6mWyrP.txt b/tests/data/storage/wsmn24bux7wo113/84nmscqy84lsi1t/test_MaWC6mWyrP.txt new file mode 100644 index 00000000..9daeafb9 --- /dev/null +++ b/tests/data/storage/wsmn24bux7wo113/84nmscqy84lsi1t/test_MaWC6mWyrP.txt @@ -0,0 +1 @@ +test diff --git a/tests/data/storage/wsmn24bux7wo113/84nmscqy84lsi1t/test_MaWC6mWyrP.txt.attrs b/tests/data/storage/wsmn24bux7wo113/84nmscqy84lsi1t/test_MaWC6mWyrP.txt.attrs new file mode 100644 index 00000000..921ce269 --- /dev/null +++ b/tests/data/storage/wsmn24bux7wo113/84nmscqy84lsi1t/test_MaWC6mWyrP.txt.attrs @@ -0,0 +1 @@ +{"user.cache_control":"","user.content_disposition":"","user.content_encoding":"","user.content_language":"","user.content_type":"text/plain; charset=utf-8","user.metadata":{"original-filename":"test.txt"},"md5":"2Oj8otwPiW/Xy0ywAxuiSQ=="} diff --git a/tests/data/storage/wsmn24bux7wo113/84nmscqy84lsi1t/test_tC1Yc87DfC.txt b/tests/data/storage/wsmn24bux7wo113/84nmscqy84lsi1t/test_tC1Yc87DfC.txt new file mode 100644 index 00000000..9daeafb9 --- /dev/null +++ b/tests/data/storage/wsmn24bux7wo113/84nmscqy84lsi1t/test_tC1Yc87DfC.txt @@ -0,0 +1 @@ +test diff --git a/tests/data/storage/wsmn24bux7wo113/84nmscqy84lsi1t/test_tC1Yc87DfC.txt.attrs b/tests/data/storage/wsmn24bux7wo113/84nmscqy84lsi1t/test_tC1Yc87DfC.txt.attrs new file mode 100644 index 00000000..921ce269 --- /dev/null +++ b/tests/data/storage/wsmn24bux7wo113/84nmscqy84lsi1t/test_tC1Yc87DfC.txt.attrs @@ -0,0 +1 @@ +{"user.cache_control":"","user.content_disposition":"","user.content_encoding":"","user.content_language":"","user.content_type":"text/plain; charset=utf-8","user.metadata":{"original-filename":"test.txt"},"md5":"2Oj8otwPiW/Xy0ywAxuiSQ=="} diff --git a/tools/auth/auth.go b/tools/auth/auth.go index 41abf126..cd1fac9b 100644 --- a/tools/auth/auth.go +++ b/tools/auth/auth.go @@ -9,13 +9,14 @@ import ( // AuthUser defines a standardized oauth2 user data structure. type AuthUser struct { - Id string `json:"id"` - Name string `json:"name"` - Username string `json:"username"` - Email string `json:"email"` - AvatarUrl string `json:"avatarUrl"` - RawUser map[string]any `json:"rawUser"` - AccessToken string `json:"accessToken"` + Id string `json:"id"` + Name string `json:"name"` + Username string `json:"username"` + Email string `json:"email"` + AvatarUrl string `json:"avatarUrl"` + RawUser map[string]any `json:"rawUser"` + AccessToken string `json:"accessToken"` + RefreshToken string `json:"refreshToken"` } // Provider defines a common interface for an OAuth2 client. diff --git a/tools/auth/discord.go b/tools/auth/discord.go index 5385ea96..15bcb3fb 100644 --- a/tools/auth/discord.go +++ b/tools/auth/discord.go @@ -63,12 +63,13 @@ func (p *Discord) FetchAuthUser(token *oauth2.Token) (*AuthUser, error) { username := fmt.Sprintf("%s#%s", extracted.Username, extracted.Discriminator) user := &AuthUser{ - Id: extracted.Id, - Name: username, - Username: extracted.Username, - AvatarUrl: avatarUrl, - RawUser: rawUser, - AccessToken: token.AccessToken, + Id: extracted.Id, + Name: username, + Username: extracted.Username, + AvatarUrl: avatarUrl, + RawUser: rawUser, + AccessToken: token.AccessToken, + RefreshToken: token.RefreshToken, } if extracted.Verified { user.Email = extracted.Email diff --git a/tools/auth/facebook.go b/tools/auth/facebook.go index f4e4f66e..05b5e8d9 100644 --- a/tools/auth/facebook.go +++ b/tools/auth/facebook.go @@ -54,12 +54,13 @@ func (p *Facebook) FetchAuthUser(token *oauth2.Token) (*AuthUser, error) { } user := &AuthUser{ - Id: extracted.Id, - Name: extracted.Name, - Email: extracted.Email, - AvatarUrl: extracted.Picture.Data.Url, - RawUser: rawUser, - AccessToken: token.AccessToken, + Id: extracted.Id, + Name: extracted.Name, + Email: extracted.Email, + AvatarUrl: extracted.Picture.Data.Url, + RawUser: rawUser, + AccessToken: token.AccessToken, + RefreshToken: token.RefreshToken, } return user, nil diff --git a/tools/auth/gitee.go b/tools/auth/gitee.go index c66f7643..fca83b2d 100644 --- a/tools/auth/gitee.go +++ b/tools/auth/gitee.go @@ -55,12 +55,13 @@ func (p *Gitee) FetchAuthUser(token *oauth2.Token) (*AuthUser, error) { } user := &AuthUser{ - Id: strconv.Itoa(extracted.Id), - Name: extracted.Name, - Username: extracted.Login, - AvatarUrl: extracted.AvatarUrl, - RawUser: rawUser, - AccessToken: token.AccessToken, + Id: strconv.Itoa(extracted.Id), + Name: extracted.Name, + Username: extracted.Login, + AvatarUrl: extracted.AvatarUrl, + RawUser: rawUser, + AccessToken: token.AccessToken, + RefreshToken: token.RefreshToken, } if extracted.Email != "" && is.EmailFormat.Validate(extracted.Email) == nil { diff --git a/tools/auth/github.go b/tools/auth/github.go index 7af01d06..6fa3f595 100644 --- a/tools/auth/github.go +++ b/tools/auth/github.go @@ -55,13 +55,14 @@ func (p *Github) FetchAuthUser(token *oauth2.Token) (*AuthUser, error) { } user := &AuthUser{ - Id: strconv.Itoa(extracted.Id), - Name: extracted.Name, - Username: extracted.Login, - Email: extracted.Email, - AvatarUrl: extracted.AvatarUrl, - RawUser: rawUser, - AccessToken: token.AccessToken, + Id: strconv.Itoa(extracted.Id), + Name: extracted.Name, + Username: extracted.Login, + Email: extracted.Email, + AvatarUrl: extracted.AvatarUrl, + RawUser: rawUser, + AccessToken: token.AccessToken, + RefreshToken: token.RefreshToken, } // in case user has set "Keep my email address private", send an diff --git a/tools/auth/gitlab.go b/tools/auth/gitlab.go index 86aab02b..2b491afa 100644 --- a/tools/auth/gitlab.go +++ b/tools/auth/gitlab.go @@ -53,13 +53,14 @@ func (p *Gitlab) FetchAuthUser(token *oauth2.Token) (*AuthUser, error) { } user := &AuthUser{ - Id: strconv.Itoa(extracted.Id), - Name: extracted.Name, - Username: extracted.Username, - Email: extracted.Email, - AvatarUrl: extracted.AvatarUrl, - RawUser: rawUser, - AccessToken: token.AccessToken, + Id: strconv.Itoa(extracted.Id), + Name: extracted.Name, + Username: extracted.Username, + Email: extracted.Email, + AvatarUrl: extracted.AvatarUrl, + RawUser: rawUser, + AccessToken: token.AccessToken, + RefreshToken: token.RefreshToken, } return user, nil diff --git a/tools/auth/google.go b/tools/auth/google.go index 2fe1d95d..0a2a2a94 100644 --- a/tools/auth/google.go +++ b/tools/auth/google.go @@ -52,12 +52,13 @@ func (p *Google) FetchAuthUser(token *oauth2.Token) (*AuthUser, error) { } user := &AuthUser{ - Id: extracted.Id, - Name: extracted.Name, - Email: extracted.Email, - AvatarUrl: extracted.Picture, - RawUser: rawUser, - AccessToken: token.AccessToken, + Id: extracted.Id, + Name: extracted.Name, + Email: extracted.Email, + AvatarUrl: extracted.Picture, + RawUser: rawUser, + AccessToken: token.AccessToken, + RefreshToken: token.RefreshToken, } return user, nil diff --git a/tools/auth/kakao.go b/tools/auth/kakao.go index 6c66ba32..26e45d63 100644 --- a/tools/auth/kakao.go +++ b/tools/auth/kakao.go @@ -59,11 +59,12 @@ func (p *Kakao) FetchAuthUser(token *oauth2.Token) (*AuthUser, error) { } user := &AuthUser{ - Id: strconv.Itoa(extracted.Id), - Username: extracted.Profile.Nickname, - AvatarUrl: extracted.Profile.ImageUrl, - RawUser: rawUser, - AccessToken: token.AccessToken, + Id: strconv.Itoa(extracted.Id), + Username: extracted.Profile.Nickname, + AvatarUrl: extracted.Profile.ImageUrl, + RawUser: rawUser, + AccessToken: token.AccessToken, + RefreshToken: token.RefreshToken, } if extracted.KakaoAccount.IsEmailValid && extracted.KakaoAccount.IsEmailVerified { user.Email = extracted.KakaoAccount.Email diff --git a/tools/auth/microsoft.go b/tools/auth/microsoft.go index 67e2d4d0..4766a5a4 100644 --- a/tools/auth/microsoft.go +++ b/tools/auth/microsoft.go @@ -53,11 +53,12 @@ func (p *Microsoft) FetchAuthUser(token *oauth2.Token) (*AuthUser, error) { } user := &AuthUser{ - Id: extracted.Id, - Name: extracted.Name, - Email: extracted.Email, - RawUser: rawUser, - AccessToken: token.AccessToken, + Id: extracted.Id, + Name: extracted.Name, + Email: extracted.Email, + RawUser: rawUser, + AccessToken: token.AccessToken, + RefreshToken: token.RefreshToken, } return user, nil diff --git a/tools/auth/spotify.go b/tools/auth/spotify.go index 8414c902..3218b20a 100644 --- a/tools/auth/spotify.go +++ b/tools/auth/spotify.go @@ -61,10 +61,11 @@ func (p *Spotify) FetchAuthUser(token *oauth2.Token) (*AuthUser, error) { } user := &AuthUser{ - Id: extracted.Id, - Name: extracted.Name, - RawUser: rawUser, - AccessToken: token.AccessToken, + Id: extracted.Id, + Name: extracted.Name, + RawUser: rawUser, + AccessToken: token.AccessToken, + RefreshToken: token.RefreshToken, } if len(extracted.Images) > 0 { user.AvatarUrl = extracted.Images[0].Url diff --git a/tools/auth/strava.go b/tools/auth/strava.go index 0013214e..be199b09 100644 --- a/tools/auth/strava.go +++ b/tools/auth/strava.go @@ -58,12 +58,13 @@ func (p *Strava) FetchAuthUser(token *oauth2.Token) (*AuthUser, error) { } user := &AuthUser{ - Id: strconv.Itoa(extracted.Id), - Name: extracted.FirstName + " " + extracted.LastName, - Username: extracted.Username, - AvatarUrl: extracted.ProfileImageUrl, - RawUser: rawUser, - AccessToken: token.AccessToken, + Id: strconv.Itoa(extracted.Id), + Name: extracted.FirstName + " " + extracted.LastName, + Username: extracted.Username, + AvatarUrl: extracted.ProfileImageUrl, + RawUser: rawUser, + AccessToken: token.AccessToken, + RefreshToken: token.RefreshToken, } return user, nil diff --git a/tools/auth/twitch.go b/tools/auth/twitch.go index d7400cfd..88b59c6c 100644 --- a/tools/auth/twitch.go +++ b/tools/auth/twitch.go @@ -61,13 +61,14 @@ func (p *Twitch) FetchAuthUser(token *oauth2.Token) (*AuthUser, error) { } user := &AuthUser{ - Id: extracted.Data[0].Id, - Name: extracted.Data[0].DisplayName, - Username: extracted.Data[0].Login, - Email: extracted.Data[0].Email, - AvatarUrl: extracted.Data[0].ProfileImageUrl, - RawUser: rawUser, - AccessToken: token.AccessToken, + Id: extracted.Data[0].Id, + Name: extracted.Data[0].DisplayName, + Username: extracted.Data[0].Login, + Email: extracted.Data[0].Email, + AvatarUrl: extracted.Data[0].ProfileImageUrl, + RawUser: rawUser, + AccessToken: token.AccessToken, + RefreshToken: token.RefreshToken, } return user, nil diff --git a/tools/auth/twitter.go b/tools/auth/twitter.go index 092df656..a5c7627d 100644 --- a/tools/auth/twitter.go +++ b/tools/auth/twitter.go @@ -63,12 +63,13 @@ func (p *Twitter) FetchAuthUser(token *oauth2.Token) (*AuthUser, error) { } user := &AuthUser{ - Id: extracted.Data.Id, - Name: extracted.Data.Name, - Username: extracted.Data.Username, - AvatarUrl: extracted.Data.ProfileImageUrl, - RawUser: rawUser, - AccessToken: token.AccessToken, + Id: extracted.Data.Id, + Name: extracted.Data.Name, + Username: extracted.Data.Username, + AvatarUrl: extracted.Data.ProfileImageUrl, + RawUser: rawUser, + AccessToken: token.AccessToken, + RefreshToken: token.RefreshToken, } return user, nil diff --git a/tools/list/list.go b/tools/list/list.go index 8b67d39b..ae796e31 100644 --- a/tools/list/list.go +++ b/tools/list/list.go @@ -10,6 +10,20 @@ import ( var cachedPatterns = map[string]*regexp.Regexp{} +// SubtractSlice returns a new slice with only the "base" elements +// that don't exist in "subtract". +func SubtractSlice[T comparable](base []T, subtract []T) []T { + var result = make([]T, 0, len(base)) + + for _, b := range base { + if !ExistInSlice(b, subtract) { + result = append(result, b) + } + } + + return result +} + // ExistInSlice checks whether a comparable element exists in a slice of the same type. func ExistInSlice[T comparable](item T, list []T) bool { if len(list) == 0 { diff --git a/tools/list/list_test.go b/tools/list/list_test.go index 16bbacd0..a31c98d8 100644 --- a/tools/list/list_test.go +++ b/tools/list/list_test.go @@ -1,12 +1,111 @@ package list_test import ( + "encoding/json" "testing" "github.com/pocketbase/pocketbase/tools/list" "github.com/pocketbase/pocketbase/tools/types" ) +func TestSubtractSliceString(t *testing.T) { + scenarios := []struct { + base []string + subtract []string + expected string + }{ + { + []string{}, + []string{}, + `[]`, + }, + { + []string{}, + []string{"1", "2", "3", "4"}, + `[]`, + }, + { + []string{"1", "2", "3", "4"}, + []string{}, + `["1","2","3","4"]`, + }, + { + []string{"1", "2", "3", "4"}, + []string{"1", "2", "3", "4"}, + `[]`, + }, + { + []string{"1", "2", "3", "4", "7"}, + []string{"2", "4", "5", "6"}, + `["1","3","7"]`, + }, + } + + for i, s := range scenarios { + result := list.SubtractSlice(s.base, s.subtract) + + raw, err := json.Marshal(result) + if err != nil { + t.Fatalf("(%d) Failed to serialize: %v", i, err) + } + + strResult := string(raw) + + if strResult != s.expected { + t.Fatalf("(%d) Expected %v, got %v", i, s.expected, strResult) + } + } +} + +func TestSubtractSliceInt(t *testing.T) { + scenarios := []struct { + base []int + subtract []int + expected string + }{ + { + []int{}, + []int{}, + `[]`, + }, + { + []int{}, + []int{1, 2, 3, 4}, + `[]`, + }, + { + []int{1, 2, 3, 4}, + []int{}, + `[1,2,3,4]`, + }, + { + []int{1, 2, 3, 4}, + []int{1, 2, 3, 4}, + `[]`, + }, + { + []int{1, 2, 3, 4, 7}, + []int{2, 4, 5, 6}, + `[1,3,7]`, + }, + } + + for i, s := range scenarios { + result := list.SubtractSlice(s.base, s.subtract) + + raw, err := json.Marshal(result) + if err != nil { + t.Fatalf("(%d) Failed to serialize: %v", i, err) + } + + strResult := string(raw) + + if strResult != s.expected { + t.Fatalf("(%d) Expected %v, got %v", i, s.expected, strResult) + } + } +} + func TestExistInSliceString(t *testing.T) { scenarios := []struct { item string diff --git a/tools/migrate/runner.go b/tools/migrate/runner.go index 7485e5e2..7b23ce38 100644 --- a/tools/migrate/runner.go +++ b/tools/migrate/runner.go @@ -2,6 +2,7 @@ package migrate import ( "fmt" + "strings" "time" "github.com/AlecAivazis/survey/v2" @@ -72,9 +73,19 @@ func (r *Runner) Run(args ...string) error { } } + names, err := r.lastAppliedMigrations(toRevertCount) + if err != nil { + color.Red(err.Error()) + return err + } + confirm := false prompt := &survey.Confirm{ - Message: fmt.Sprintf("Do you really want to revert the last %d applied migration(s)?", toRevertCount), + Message: fmt.Sprintf( + "\n%v\nDo you really want to revert the last %d applied migration(s)?", + strings.Join(names, "\n"), + toRevertCount, + ), } survey.AskOne(prompt, &confirm) if !confirm { @@ -138,38 +149,43 @@ func (r *Runner) Up() ([]string, error) { return applied, nil } -// Down reverts the last `toRevertCount` applied migrations. +// Down reverts the last `toRevertCount` applied migrations +// (in the order they were applied). // // On success returns list with the reverted migrations file names. func (r *Runner) Down(toRevertCount int) ([]string, error) { reverted := make([]string, 0, toRevertCount) + names, appliedErr := r.lastAppliedMigrations(toRevertCount) + if appliedErr != nil { + return nil, appliedErr + } + err := r.db.Transactional(func(tx *dbx.Tx) error { - for i := len(r.migrationsList.Items()) - 1; i >= 0; i-- { - m := r.migrationsList.Item(i) - - // skip unapplied - if !r.isMigrationApplied(tx, m.File) { - continue - } - - // revert limit reached - if toRevertCount-len(reverted) <= 0 { - break - } - - // ignore empty Down action - if m.Down != nil { - if err := m.Down(tx); err != nil { - return fmt.Errorf("Failed to revert migration %s: %w", m.File, err) + for _, name := range names { + for _, m := range r.migrationsList.Items() { + if m.File != name { + continue } - } - if err := r.saveRevertedMigration(tx, m.File); err != nil { - return fmt.Errorf("Failed to save reverted migration info for %s: %w", m.File, err) - } + // revert limit reached + if toRevertCount-len(reverted) <= 0 { + return nil + } - reverted = append(reverted, m.File) + // ignore empty Down action + if m.Down != nil { + if err := m.Down(tx); err != nil { + return fmt.Errorf("Failed to revert migration %s: %w", m.File, err) + } + } + + if err := r.saveRevertedMigration(tx, m.File); err != nil { + return fmt.Errorf("Failed to save reverted migration info for %s: %w", m.File, err) + } + + reverted = append(reverted, m.File) + } } return nil @@ -178,6 +194,7 @@ func (r *Runner) Down(toRevertCount int) ([]string, error) { if err != nil { return nil, err } + return reverted, nil } @@ -207,7 +224,7 @@ func (r *Runner) isMigrationApplied(tx dbx.Builder, file string) bool { func (r *Runner) saveAppliedMigration(tx dbx.Builder, file string) error { _, err := tx.Insert(r.tableName, dbx.Params{ "file": file, - "applied": time.Now().Unix(), + "applied": time.Now().UnixMicro(), }).Execute() return err @@ -218,3 +235,20 @@ func (r *Runner) saveRevertedMigration(tx dbx.Builder, file string) error { return err } + +func (r *Runner) lastAppliedMigrations(limit int) ([]string, error) { + var files = make([]string, 0, limit) + + err := r.db.Select("file"). + From(r.tableName). + Where(dbx.Not(dbx.HashExp{"applied": nil})). + OrderBy("applied DESC", "file DESC"). + Limit(int64(limit)). + Column(&files) + + if err != nil { + return nil, err + } + + return files, nil +} diff --git a/tools/migrate/runner_test.go b/tools/migrate/runner_test.go index bd579ab0..03bb1c13 100644 --- a/tools/migrate/runner_test.go +++ b/tools/migrate/runner_test.go @@ -3,6 +3,7 @@ package migrate import ( "context" "database/sql" + "encoding/json" "testing" "time" @@ -52,73 +53,88 @@ func TestRunnerUpAndDown(t *testing.T) { } defer testDB.Close() - var test1UpCalled bool - var test1DownCalled bool - var test2UpCalled bool - var test2DownCalled bool + callsOrder := []string{} l := MigrationsList{} l.Register(func(db dbx.Builder) error { - test1UpCalled = true + callsOrder = append(callsOrder, "up2") return nil }, func(db dbx.Builder) error { - test1DownCalled = true - return nil - }, "1_test") - l.Register(func(db dbx.Builder) error { - test2UpCalled = true - return nil - }, func(db dbx.Builder) error { - test2DownCalled = true + callsOrder = append(callsOrder, "down2") return nil }, "2_test") + l.Register(func(db dbx.Builder) error { + callsOrder = append(callsOrder, "up3") + return nil + }, func(db dbx.Builder) error { + callsOrder = append(callsOrder, "down3") + return nil + }, "3_test") + l.Register(func(db dbx.Builder) error { + callsOrder = append(callsOrder, "up1") + return nil + }, func(db dbx.Builder) error { + callsOrder = append(callsOrder, "down1") + return nil + }, "1_test") r, err := NewRunner(testDB.DB, l) if err != nil { t.Fatal(err) } - // simulate partially run migration - r.saveAppliedMigration(testDB, r.migrationsList.Item(0).File) + // simulate partially out-of-order run migration + r.saveAppliedMigration(testDB, "2_test") + // --------------------------------------------------------------- // Up() - // --- + // --------------------------------------------------------------- + if _, err := r.Up(); err != nil { t.Fatal(err) } - if test1UpCalled { - t.Fatalf("Didn't expect 1_test to be called") - } + expectedUpCallsOrder := `["up1","up3"]` // skip up2 since it was applied previously - if !test2UpCalled { - t.Fatalf("Expected 2_test to be called") - } - - // simulate unrun migration - var test3DownCalled bool - r.migrationsList.Register(nil, func(db dbx.Builder) error { - test3DownCalled = true - return nil - }, "3_test") - - // Down() - // --- - // revert one migration - if _, err := r.Down(1); err != nil { + upCallsOrder, err := json.Marshal(callsOrder) + if err != nil { t.Fatal(err) } - if test3DownCalled { - t.Fatal("Didn't expect 3_test to be reverted.") + if v := string(upCallsOrder); v != expectedUpCallsOrder { + t.Fatalf("Expected Up() calls order %s, got %s", expectedUpCallsOrder, upCallsOrder) } - if !test2DownCalled { - t.Fatal("Expected 2_test to be reverted.") + // --------------------------------------------------------------- + + // reset callsOrder + callsOrder = []string{} + + // simulate unrun migration + r.migrationsList.Register(nil, func(db dbx.Builder) error { + callsOrder = append(callsOrder, "down4") + return nil + }, "4_test") + + // --------------------------------------------------------------- + + // --------------------------------------------------------------- + // Down() + // --------------------------------------------------------------- + + if _, err := r.Down(2); err != nil { + t.Fatal(err) } - if test1DownCalled { - t.Fatal("Didn't expect 1_test to be reverted.") + expectedDownCallsOrder := `["down3","down1"]` // revert in the applied order + + downCallsOrder, err := json.Marshal(callsOrder) + if err != nil { + t.Fatal(err) + } + + if v := string(downCallsOrder); v != expectedDownCallsOrder { + t.Fatalf("Expected Down() calls order %s, got %s", expectedDownCallsOrder, downCallsOrder) } } diff --git a/tools/search/filter.go b/tools/search/filter.go index 239f3fbe..f0c4502d 100644 --- a/tools/search/filter.go +++ b/tools/search/filter.go @@ -85,72 +85,119 @@ func (f FilterData) build(data []fexpr.ExprGroup, fieldResolver FieldResolver) ( } func (f FilterData) resolveTokenizedExpr(expr fexpr.Expr, fieldResolver FieldResolver) (dbx.Expression, error) { - lName, lParams, lErr := f.resolveToken(expr.Left, fieldResolver) - if lName == "" || lErr != nil { - return nil, fmt.Errorf("Invalid left operand %q - %v.", expr.Left.Literal, lErr) + lResult, lErr := resolveToken(expr.Left, fieldResolver) + if lErr != nil || lResult.Identifier == "" { + return nil, fmt.Errorf("invalid left operand %q - %v", expr.Left.Literal, lErr) } - rName, rParams, rErr := f.resolveToken(expr.Right, fieldResolver) - if rName == "" || rErr != nil { - return nil, fmt.Errorf("Invalid right operand %q - %v.", expr.Right.Literal, rErr) + rResult, rErr := resolveToken(expr.Right, fieldResolver) + if rErr != nil || rResult.Identifier == "" { + return nil, fmt.Errorf("invalid right operand %q - %v", expr.Right.Literal, rErr) } - switch expr.Op { - case fexpr.SignEq: - return dbx.NewExp(fmt.Sprintf("COALESCE(%s, '') = COALESCE(%s, '')", lName, rName), mergeParams(lParams, rParams)), nil - case fexpr.SignNeq: - return dbx.NewExp(fmt.Sprintf("COALESCE(%s, '') != COALESCE(%s, '')", lName, rName), mergeParams(lParams, rParams)), nil - case fexpr.SignLike: - // the right side is a column and therefor wrap it with "%" for contains like behavior - if len(rParams) == 0 { - return dbx.NewExp(fmt.Sprintf("%s LIKE ('%%' || %s || '%%') ESCAPE '\\'", lName, rName), lParams), nil - } - - return dbx.NewExp(fmt.Sprintf("%s LIKE %s ESCAPE '\\'", lName, rName), mergeParams(lParams, wrapLikeParams(rParams))), nil - case fexpr.SignNlike: - // the right side is a column and therefor wrap it with "%" for not-contains like behavior - if len(rParams) == 0 { - return dbx.NewExp(fmt.Sprintf("%s NOT LIKE ('%%' || %s || '%%') ESCAPE '\\'", lName, rName), lParams), nil - } - - // normalize operands and switch sides if the left operand is a number/text, but the right one is a column - // (usually this shouldn't be needed, but it's kept for backward compatibility) - if len(lParams) > 0 && len(rParams) == 0 { - return dbx.NewExp(fmt.Sprintf("%s NOT LIKE %s ESCAPE '\\'", rName, lName), wrapLikeParams(lParams)), nil - } - - return dbx.NewExp(fmt.Sprintf("%s NOT LIKE %s ESCAPE '\\'", lName, rName), mergeParams(lParams, wrapLikeParams(rParams))), nil - case fexpr.SignLt: - return dbx.NewExp(fmt.Sprintf("%s < %s", lName, rName), mergeParams(lParams, rParams)), nil - case fexpr.SignLte: - return dbx.NewExp(fmt.Sprintf("%s <= %s", lName, rName), mergeParams(lParams, rParams)), nil - case fexpr.SignGt: - return dbx.NewExp(fmt.Sprintf("%s > %s", lName, rName), mergeParams(lParams, rParams)), nil - case fexpr.SignGte: - return dbx.NewExp(fmt.Sprintf("%s >= %s", lName, rName), mergeParams(lParams, rParams)), nil - } - - return nil, fmt.Errorf("Unknown expression operator %q", expr.Op) + return buildExpr(lResult, expr.Op, rResult) } -func (f FilterData) resolveToken(token fexpr.Token, fieldResolver FieldResolver) (name string, params dbx.Params, err error) { +func buildExpr( + left *ResolverResult, + op fexpr.SignOp, + right *ResolverResult, +) (dbx.Expression, error) { + var expr dbx.Expression + + switch op { + case fexpr.SignEq, fexpr.SignAnyEq: + expr = dbx.NewExp(fmt.Sprintf("COALESCE(%s, '') = COALESCE(%s, '')", left.Identifier, right.Identifier), mergeParams(left.Params, right.Params)) + case fexpr.SignNeq, fexpr.SignAnyNeq: + expr = dbx.NewExp(fmt.Sprintf("COALESCE(%s, '') != COALESCE(%s, '')", left.Identifier, right.Identifier), mergeParams(left.Params, right.Params)) + case fexpr.SignLike, fexpr.SignAnyLike: + // the right side is a column and therefor wrap it with "%" for contains like behavior + if len(right.Params) == 0 { + expr = dbx.NewExp(fmt.Sprintf("%s LIKE ('%%' || %s || '%%') ESCAPE '\\'", left.Identifier, right.Identifier), left.Params) + } else { + expr = dbx.NewExp(fmt.Sprintf("%s LIKE %s ESCAPE '\\'", left.Identifier, right.Identifier), mergeParams(left.Params, wrapLikeParams(right.Params))) + } + case fexpr.SignNlike, fexpr.SignAnyNlike: + // the right side is a column and therefor wrap it with "%" for not-contains like behavior + if len(right.Params) == 0 { + expr = dbx.NewExp(fmt.Sprintf("%s NOT LIKE ('%%' || %s || '%%') ESCAPE '\\'", left.Identifier, right.Identifier), left.Params) + } else { + expr = dbx.NewExp(fmt.Sprintf("%s NOT LIKE %s ESCAPE '\\'", left.Identifier, right.Identifier), mergeParams(left.Params, wrapLikeParams(right.Params))) + } + case fexpr.SignLt, fexpr.SignAnyLt: + expr = dbx.NewExp(fmt.Sprintf("%s < %s", left.Identifier, right.Identifier), mergeParams(left.Params, right.Params)) + case fexpr.SignLte, fexpr.SignAnyLte: + expr = dbx.NewExp(fmt.Sprintf("%s <= %s", left.Identifier, right.Identifier), mergeParams(left.Params, right.Params)) + case fexpr.SignGt, fexpr.SignAnyGt: + expr = dbx.NewExp(fmt.Sprintf("%s > %s", left.Identifier, right.Identifier), mergeParams(left.Params, right.Params)) + case fexpr.SignGte, fexpr.SignAnyGte: + expr = dbx.NewExp(fmt.Sprintf("%s >= %s", left.Identifier, right.Identifier), mergeParams(left.Params, right.Params)) + } + + if expr == nil { + return nil, fmt.Errorf("unknown expression operator %q", op) + } + + // multi-match expressions + if !isAnyMatchOp(op) { + if left.MultiMatchSubQuery != nil && right.MultiMatchSubQuery != nil { + mm := &manyVsManyExpr{ + leftSubQuery: left.MultiMatchSubQuery, + rightSubQuery: right.MultiMatchSubQuery, + op: op, + } + + expr = dbx.And(expr, mm) + } else if left.MultiMatchSubQuery != nil { + mm := &manyVsOneExpr{ + subQuery: left.MultiMatchSubQuery, + op: op, + otherOperand: right, + } + + expr = dbx.And(expr, mm) + } else if right.MultiMatchSubQuery != nil { + mm := &manyVsOneExpr{ + subQuery: right.MultiMatchSubQuery, + op: op, + otherOperand: left, + inverse: true, + } + + expr = dbx.And(expr, mm) + } + } + + if left.AfterBuild != nil { + expr = left.AfterBuild(expr) + } + + if right.AfterBuild != nil { + expr = right.AfterBuild(expr) + } + + return expr, nil +} + +func resolveToken(token fexpr.Token, fieldResolver FieldResolver) (*ResolverResult, error) { switch token.Type { case fexpr.TokenIdentifier: // current datetime constant // --- if token.Literal == "@now" { - placeholder := "t" + security.PseudorandomString(8) - name := fmt.Sprintf("{:%s}", placeholder) - params := dbx.Params{placeholder: types.NowDateTime().String()} + placeholder := "t" + security.PseudorandomString(5) - return name, params, nil + return &ResolverResult{ + Identifier: "{:" + placeholder + "}", + Params: dbx.Params{placeholder: types.NowDateTime().String()}, + }, nil } // custom resolver // --- - name, params, err := fieldResolver.Resolve(token.Literal) + result, err := fieldResolver.Resolve(token.Literal) - if name == "" || err != nil { + if err != nil || result.Identifier == "" { m := map[string]string{ // if `null` field is missing, treat `null` identifier as NULL token "null": "NULL", @@ -160,27 +207,46 @@ func (f FilterData) resolveToken(token fexpr.Token, fieldResolver FieldResolver) "false": "0", } if v, ok := m[strings.ToLower(token.Literal)]; ok { - return v, nil, nil + return &ResolverResult{Identifier: v}, nil } - return "", nil, err + return nil, err } - return name, params, err + return result, err case fexpr.TokenText: - placeholder := "t" + security.PseudorandomString(8) - name := fmt.Sprintf("{:%s}", placeholder) - params := dbx.Params{placeholder: token.Literal} + placeholder := "t" + security.PseudorandomString(5) - return name, params, nil + return &ResolverResult{ + Identifier: "{:" + placeholder + "}", + Params: dbx.Params{placeholder: token.Literal}, + }, nil case fexpr.TokenNumber: - placeholder := "t" + security.PseudorandomString(8) - name := fmt.Sprintf("{:%s}", placeholder) - params := dbx.Params{placeholder: cast.ToFloat64(token.Literal)} + placeholder := "t" + security.PseudorandomString(5) - return name, params, nil + return &ResolverResult{ + Identifier: "{:" + placeholder + "}", + Params: dbx.Params{placeholder: cast.ToFloat64(token.Literal)}, + }, nil } - return "", nil, errors.New("Unresolvable token type.") + return nil, errors.New("unresolvable token type") +} + +func isAnyMatchOp(op fexpr.SignOp) bool { + switch op { + case + fexpr.SignAnyEq, + fexpr.SignAnyNeq, + fexpr.SignAnyLike, + fexpr.SignAnyNlike, + fexpr.SignAnyLt, + fexpr.SignAnyLte, + fexpr.SignAnyGt, + fexpr.SignAnyGte: + return true + } + + return false } // mergeParams returns new dbx.Params where each provided params item @@ -218,18 +284,24 @@ func wrapLikeParams(params dbx.Params) dbx.Params { // ------------------------------------------------------------------- +var _ dbx.Expression = (*opExpr)(nil) + // opExpr defines an expression that contains a raw sql operator string. type opExpr struct { op string } -// Build converts an expression into a SQL fragment. +// Build converts the expression into a SQL fragment. // // Implements [dbx.Expression] interface. func (e *opExpr) Build(db *dbx.DB, params dbx.Params) string { return e.op } +// ------------------------------------------------------------------- + +var _ dbx.Expression = (*concatExpr)(nil) + // concatExpr defines an expression that concatenates multiple // other expressions with a specified separator. type concatExpr struct { @@ -237,7 +309,7 @@ type concatExpr struct { separator string } -// Build converts an expression into a SQL fragment. +// Build converts the expression into a SQL fragment. // // Implements [dbx.Expression] interface. func (e *concatExpr) Build(db *dbx.DB, params dbx.Params) string { @@ -247,12 +319,12 @@ func (e *concatExpr) Build(db *dbx.DB, params dbx.Params) string { stringParts := make([]string, 0, len(e.parts)) - for _, a := range e.parts { - if a == nil { + for _, p := range e.parts { + if p == nil { continue } - if sql := a.Build(db, params); sql != "" { + if sql := p.Build(db, params); sql != "" { stringParts = append(stringParts, sql) } } @@ -267,3 +339,140 @@ func (e *concatExpr) Build(db *dbx.DB, params dbx.Params) string { return "(" + strings.Join(stringParts, e.separator) + ")" } + +// ------------------------------------------------------------------- + +var _ dbx.Expression = (*manyVsManyExpr)(nil) + +// manyVsManyExpr constructs a multi-match many<->many db where expression. +// +// Expects leftSubQuery and rightSubQuery to return a subquery with a +// single "multiMatchValue" column. +type manyVsManyExpr struct { + leftSubQuery dbx.Expression + rightSubQuery dbx.Expression + op fexpr.SignOp +} + +// Build converts the expression into a SQL fragment. +// +// Implements [dbx.Expression] interface. +func (e *manyVsManyExpr) Build(db *dbx.DB, params dbx.Params) string { + if e.leftSubQuery == nil || e.rightSubQuery == nil { + return "0=1" + } + + lAlias := "__ml" + security.PseudorandomString(5) + rAlias := "__mr" + security.PseudorandomString(5) + + whereExpr, buildErr := buildExpr( + &ResolverResult{ + Identifier: "[[" + lAlias + ".multiMatchValue]]", + }, + e.op, + &ResolverResult{ + Identifier: "[[" + rAlias + ".multiMatchValue]]", + // note: the AfterBuild needs to be handled only once and it + // doesn't matter whether it is applied on the left or right subquery operand + AfterBuild: multiMatchAfterBuildFunc(e.op, lAlias, rAlias), + }, + ) + + if buildErr != nil { + return "0=1" + } + + return fmt.Sprintf( + "NOT EXISTS (SELECT 1 FROM (%s) {{%s}} LEFT JOIN (%s) {{%s}} WHERE %s)", + e.leftSubQuery.Build(db, params), + lAlias, + e.rightSubQuery.Build(db, params), + rAlias, + whereExpr.Build(db, params), + ) +} + +// ------------------------------------------------------------------- + +var _ dbx.Expression = (*manyVsOneExpr)(nil) + +// manyVsManyExpr constructs a multi-match many<->one db where expression. +// +// Expects subQuery to return a subquery with a single "multiMatchValue" column. +// +// You can set inverse=false to reverse the condition sides (aka. one<->many). +type manyVsOneExpr struct { + subQuery dbx.Expression + op fexpr.SignOp + otherOperand *ResolverResult + inverse bool +} + +// Build converts the expression into a SQL fragment. +// +// Implements [dbx.Expression] interface. +func (e *manyVsOneExpr) Build(db *dbx.DB, params dbx.Params) string { + if e.subQuery == nil { + return "0=1" + } + + alias := "__sm" + security.PseudorandomString(5) + + r1 := &ResolverResult{ + Identifier: "[[" + alias + ".multiMatchValue]]", + AfterBuild: multiMatchAfterBuildFunc(e.op, alias), + } + + r2 := &ResolverResult{ + Identifier: e.otherOperand.Identifier, + Params: e.otherOperand.Params, + } + + var whereExpr dbx.Expression + var buildErr error + + if e.inverse { + whereExpr, buildErr = buildExpr(r2, e.op, r1) + } else { + whereExpr, buildErr = buildExpr(r1, e.op, r2) + } + + if buildErr != nil { + return "0=1" + } + + return fmt.Sprintf( + "NOT EXISTS (SELECT 1 FROM (%s) {{%s}} WHERE %s)", + e.subQuery.Build(db, params), + alias, + whereExpr.Build(db, params), + ) +} + +func multiMatchAfterBuildFunc(op fexpr.SignOp, multiMatchAliases ...string) func(dbx.Expression) dbx.Expression { + return func(expr dbx.Expression) dbx.Expression { + expr = dbx.Not(expr) // inverse for the not-exist expression + + if op == fexpr.SignEq { + return expr + } + + orExprs := make([]dbx.Expression, len(multiMatchAliases)+1) + orExprs[0] = expr + + // Add an optional "IS NULL" condition(s) to handle the empty rows result. + // + // For example, let's assume that some "rel" field is [nonemptyRel1, nonemptyRel2, emptyRel3], + // The filter "rel.total > 0" will ensures that the above will return true only if all relations + // are existing and match the condition. + // + // The "=" operator is excluded because it will never equal directly with NULL anyway + // and also because we want in case "rel.id = ''" is specified to allow + // matching the empty relations (they will match due to the applied COALESCE). + for i, mAlias := range multiMatchAliases { + orExprs[i+1] = dbx.NewExp("[[" + mAlias + ".multiMatchValue]] IS NULL") + } + + return dbx.Or(orExprs...) + } +} diff --git a/tools/search/provider_test.go b/tools/search/provider_test.go index e76ed89d..5c8c5ba2 100644 --- a/tools/search/provider_test.go +++ b/tools/search/provider_test.go @@ -495,12 +495,12 @@ func (t *testFieldResolver) UpdateQuery(query *dbx.SelectQuery) error { return nil } -func (t *testFieldResolver) Resolve(field string) (name string, placeholderParams dbx.Params, err error) { +func (t *testFieldResolver) Resolve(field string) (*ResolverResult, error) { t.ResolveCalls++ if field == "unknown" { - return "", nil, errors.New("test error") + return nil, errors.New("test error") } - return field, nil, nil + return &ResolverResult{Identifier: field}, nil } diff --git a/tools/search/simple_field_resolver.go b/tools/search/simple_field_resolver.go index 4e07fb4a..da5d771a 100644 --- a/tools/search/simple_field_resolver.go +++ b/tools/search/simple_field_resolver.go @@ -8,6 +8,25 @@ import ( "github.com/pocketbase/pocketbase/tools/list" ) +// ResolverResult defines a single FieldResolver.Resolve() successfully parsed result. +type ResolverResult struct { + // Identifier is the plain SQL identifier/column that will be used + // in the final db expression as left or right operand. + Identifier string + + // Params is a map with db placeholder->value pairs that will be added + // to the query when building both resolved operands/sides in a single expression. + Params dbx.Params + + // MultiMatchSubQuery is an optional sub query expression that will be added + // in addition to the combined ResolverResult expression during build. + MultiMatchSubQuery dbx.Expression + + // AfterBuild is an optional function that will be called after building + // and combining the result of both resolved operands/sides in a single expression. + AfterBuild func(expr dbx.Expression) dbx.Expression +} + // FieldResolver defines an interface for managing search fields. type FieldResolver interface { // UpdateQuery allows to updated the provided db query based on the @@ -18,7 +37,7 @@ type FieldResolver interface { // Resolve parses the provided field and returns a properly // formatted db identifier (eg. NULL, quoted column, placeholder parameter, etc.). - Resolve(field string) (name string, placeholderParams dbx.Params, err error) + Resolve(field string) (*ResolverResult, error) } // NewSimpleFieldResolver creates a new `SimpleFieldResolver` with the @@ -49,10 +68,12 @@ func (r *SimpleFieldResolver) UpdateQuery(query *dbx.SelectQuery) error { // Resolve implements `search.Resolve` interface. // // Returns error if `field` is not in `r.allowedFields`. -func (r *SimpleFieldResolver) Resolve(field string) (resultName string, placeholderParams dbx.Params, err error) { +func (r *SimpleFieldResolver) Resolve(field string) (*ResolverResult, error) { if !list.ExistInSliceWithRegex(field, r.allowedFields) { - return "", nil, fmt.Errorf("Failed to resolve field %q.", field) + return nil, fmt.Errorf("Failed to resolve field %q.", field) } - return fmt.Sprintf("[[%s]]", inflector.Columnify(field)), nil, nil + return &ResolverResult{ + Identifier: "[[" + inflector.Columnify(field) + "]]", + }, nil } diff --git a/tools/search/simple_field_resolver_test.go b/tools/search/simple_field_resolver_test.go index f3f0f8ff..bba96aea 100644 --- a/tools/search/simple_field_resolver_test.go +++ b/tools/search/simple_field_resolver_test.go @@ -61,7 +61,7 @@ func TestSimpleFieldResolverResolve(t *testing.T) { } for i, s := range scenarios { - name, params, err := r.Resolve(s.fieldName) + r, err := r.Resolve(s.fieldName) hasErr := err != nil if hasErr != s.expectError { @@ -69,13 +69,17 @@ func TestSimpleFieldResolverResolve(t *testing.T) { continue } - if name != s.expectName { - t.Errorf("(%d) Expected name %q, got %q", i, s.expectName, name) + if hasErr { + continue + } + + if r.Identifier != s.expectName { + t.Errorf("(%d) Expected r.Identifier %q, got %q", i, s.expectName, r.Identifier) } // params should be empty - if len(params) != 0 { - t.Errorf("(%d) Expected 0 params, got %v", i, params) + if len(r.Params) != 0 { + t.Errorf("(%d) Expected 0 r.Params, got %v", i, r.Params) } } } diff --git a/tools/search/sort.go b/tools/search/sort.go index f3e46524..5e7aba4e 100644 --- a/tools/search/sort.go +++ b/tools/search/sort.go @@ -5,6 +5,8 @@ import ( "strings" ) +const randomSortKey string = "@random" + // sort field directions const ( SortAsc string = "ASC" @@ -19,14 +21,19 @@ type SortField struct { // BuildExpr resolves the sort field into a valid db sort expression. func (s *SortField) BuildExpr(fieldResolver FieldResolver) (string, error) { - name, params, err := fieldResolver.Resolve(s.Name) - - // invalidate empty fields and non-column identifiers - if err != nil || len(params) > 0 || name == "" || strings.ToLower(name) == "null" { - return "", fmt.Errorf("Invalid sort field %q.", s.Name) + // special case for random sort + if s.Name == randomSortKey { + return "RANDOM()", nil } - return fmt.Sprintf("%s %s", name, s.Direction), nil + result, err := fieldResolver.Resolve(s.Name) + + // invalidate empty fields and non-column identifiers + if err != nil || len(result.Params) > 0 || result.Identifier == "" || strings.ToLower(result.Identifier) == "null" { + return "", fmt.Errorf("invalid sort field %q", s.Name) + } + + return fmt.Sprintf("%s %s", result.Identifier, s.Direction), nil } // ParseSortFromString parses the provided string expression diff --git a/tools/search/sort_test.go b/tools/search/sort_test.go index 83323624..d6bb6b11 100644 --- a/tools/search/sort_test.go +++ b/tools/search/sort_test.go @@ -27,6 +27,8 @@ func TestSortFieldBuildExpr(t *testing.T) { {search.SortField{"test1", search.SortAsc}, false, "[[test1]] ASC"}, // allowed field - desc {search.SortField{"test1", search.SortDesc}, false, "[[test1]] DESC"}, + // special @random field (ignore direction) + {search.SortField{"@random", search.SortDesc}, false, "RANDOM()"}, } for i, s := range scenarios { @@ -54,6 +56,7 @@ func TestParseSortFromString(t *testing.T) { {"+test", `[{"name":"test","direction":"ASC"}]`}, {"-test", `[{"name":"test","direction":"DESC"}]`}, {"test1,-test2,+test3", `[{"name":"test1","direction":"ASC"},{"name":"test2","direction":"DESC"},{"name":"test3","direction":"ASC"}]`}, + {"@random,-test", `[{"name":"@random","direction":"ASC"},{"name":"test","direction":"DESC"}]`}, } for i, s := range scenarios { diff --git a/ui/.env b/ui/.env index aeeda15b..e88fb872 100644 --- a/ui/.env +++ b/ui/.env @@ -7,4 +7,4 @@ PB_FILE_UPLOAD_DOCS = "https://pocketbase.io/docs/files-handling/" PB_JS_SDK_URL = "https://github.com/pocketbase/js-sdk" PB_DART_SDK_URL = "https://github.com/pocketbase/dart-sdk" PB_RELEASES = "https://github.com/pocketbase/pocketbase/releases" -PB_VERSION = "v0.10.5" +PB_VERSION = "v0.11.0" diff --git a/ui/dist/assets/AuthMethodsDocs.6fb9150f.js b/ui/dist/assets/AuthMethodsDocs.533b2725.js similarity index 98% rename from ui/dist/assets/AuthMethodsDocs.6fb9150f.js rename to ui/dist/assets/AuthMethodsDocs.533b2725.js index 0198406e..baa5721c 100644 --- a/ui/dist/assets/AuthMethodsDocs.6fb9150f.js +++ b/ui/dist/assets/AuthMethodsDocs.533b2725.js @@ -1,4 +1,4 @@ -import{S as ke,i as be,s as ge,e as r,w as b,b as g,c as _e,f as k,g as h,h as n,m as me,x as G,O as re,P as we,k as ve,Q as Ce,n as Pe,t as L,a as Y,o as _,d as pe,R as Me,C as Se,p as $e,r as H,u as je,N as Ae}from"./index.d939dbbd.js";import{S as Be}from"./SdkTabs.2a5180be.js";function ue(a,l,o){const s=a.slice();return s[5]=l[o],s}function de(a,l,o){const s=a.slice();return s[5]=l[o],s}function fe(a,l){let o,s=l[5].code+"",m,f,i,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){o=r("button"),m=b(s),f=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(v,C){h(v,o,C),n(o,m),n(o,f),i||(u=je(o,"click",d),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&G(m,s),C&6&&H(o,"active",l[1]===l[5].code)},d(v){v&&_(o),i=!1,u()}}}function he(a,l){let o,s,m,f;return s=new Ae({props:{content:l[5].body}}),{key:a,first:null,c(){o=r("div"),_e(s.$$.fragment),m=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(i,u){h(i,o,u),me(s,o,null),n(o,m),f=!0},p(i,u){l=i;const d={};u&4&&(d.content=l[5].body),s.$set(d),(!f||u&6)&&H(o,"active",l[1]===l[5].code)},i(i){f||(L(s.$$.fragment,i),f=!0)},o(i){Y(s.$$.fragment,i),f=!1},d(i){i&&_(o),pe(s)}}}function Oe(a){var ae,ne;let l,o,s=a[0].name+"",m,f,i,u,d,v,C,F=a[0].name+"",U,R,q,P,D,j,W,M,K,X,Q,A,Z,V,y=a[0].name+"",I,x,E,B,J,S,O,w=[],ee=new Map,te,T,p=[],le=new Map,$;P=new Be({props:{js:` +import{S as ke,i as be,s as ge,e as r,w as b,b as g,c as _e,f as k,g as h,h as n,m as me,x as G,O as re,P as we,k as ve,Q as Ce,n as Pe,t as L,a as Y,o as _,d as pe,R as Me,C as Se,p as $e,r as H,u as je,N as Ae}from"./index.e8d8151e.js";import{S as Be}from"./SdkTabs.6909f1b6.js";function ue(a,l,o){const s=a.slice();return s[5]=l[o],s}function de(a,l,o){const s=a.slice();return s[5]=l[o],s}function fe(a,l){let o,s=l[5].code+"",m,f,i,u;function d(){return l[4](l[5])}return{key:a,first:null,c(){o=r("button"),m=b(s),f=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(v,C){h(v,o,C),n(o,m),n(o,f),i||(u=je(o,"click",d),i=!0)},p(v,C){l=v,C&4&&s!==(s=l[5].code+"")&&G(m,s),C&6&&H(o,"active",l[1]===l[5].code)},d(v){v&&_(o),i=!1,u()}}}function he(a,l){let o,s,m,f;return s=new Ae({props:{content:l[5].body}}),{key:a,first:null,c(){o=r("div"),_e(s.$$.fragment),m=g(),k(o,"class","tab-item"),H(o,"active",l[1]===l[5].code),this.first=o},m(i,u){h(i,o,u),me(s,o,null),n(o,m),f=!0},p(i,u){l=i;const d={};u&4&&(d.content=l[5].body),s.$set(d),(!f||u&6)&&H(o,"active",l[1]===l[5].code)},i(i){f||(L(s.$$.fragment,i),f=!0)},o(i){Y(s.$$.fragment,i),f=!1},d(i){i&&_(o),pe(s)}}}function Oe(a){var ae,ne;let l,o,s=a[0].name+"",m,f,i,u,d,v,C,F=a[0].name+"",U,R,q,P,D,j,W,M,K,X,Q,A,Z,V,y=a[0].name+"",I,x,E,B,J,S,O,w=[],ee=new Map,te,T,p=[],le=new Map,$;P=new Be({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/AuthRefreshDocs.ef72f8e3.js b/ui/dist/assets/AuthRefreshDocs.ddc75cc1.js similarity index 98% rename from ui/dist/assets/AuthRefreshDocs.ef72f8e3.js rename to ui/dist/assets/AuthRefreshDocs.ddc75cc1.js index 2616a555..07371c94 100644 --- a/ui/dist/assets/AuthRefreshDocs.ef72f8e3.js +++ b/ui/dist/assets/AuthRefreshDocs.ddc75cc1.js @@ -1,4 +1,4 @@ -import{S as ze,i as Ue,s as je,N as Ve,e as a,w as k,b as p,c as ae,f as b,g as c,h as o,m as ne,x as re,O as qe,P as xe,k as Ie,Q as Je,n as Ke,t as U,a as j,o as d,d as ie,R as Qe,C as He,p as We,r as x,u as Ge}from"./index.d939dbbd.js";import{S as Xe}from"./SdkTabs.2a5180be.js";function Ee(r,l,s){const n=r.slice();return n[5]=l[s],n}function Fe(r,l,s){const n=r.slice();return n[5]=l[s],n}function Le(r,l){let s,n=l[5].code+"",m,_,i,f;function v(){return l[4](l[5])}return{key:r,first:null,c(){s=a("button"),m=k(n),_=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(g,w){c(g,s,w),o(s,m),o(s,_),i||(f=Ge(s,"click",v),i=!0)},p(g,w){l=g,w&4&&n!==(n=l[5].code+"")&&re(m,n),w&6&&x(s,"active",l[1]===l[5].code)},d(g){g&&d(s),i=!1,f()}}}function Ne(r,l){let s,n,m,_;return n=new Ve({props:{content:l[5].body}}),{key:r,first:null,c(){s=a("div"),ae(n.$$.fragment),m=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(i,f){c(i,s,f),ne(n,s,null),o(s,m),_=!0},p(i,f){l=i;const v={};f&4&&(v.content=l[5].body),n.$set(v),(!_||f&6)&&x(s,"active",l[1]===l[5].code)},i(i){_||(U(n.$$.fragment,i),_=!0)},o(i){j(n.$$.fragment,i),_=!1},d(i){i&&d(s),ie(n)}}}function Ye(r){var Be,Me;let l,s,n=r[0].name+"",m,_,i,f,v,g,w,B,I,S,F,ce,L,M,de,J,N=r[0].name+"",K,ue,pe,V,Q,D,W,T,G,fe,X,C,Y,he,Z,be,h,me,P,_e,ke,ve,ee,ge,te,ye,Se,$e,oe,we,le,O,se,R,q,$=[],Te=new Map,Ce,H,y=[],Re=new Map,A;g=new Xe({props:{js:` +import{S as ze,i as Ue,s as je,N as Ve,e as a,w as k,b as p,c as ae,f as b,g as c,h as o,m as ne,x as re,O as qe,P as xe,k as Ie,Q as Je,n as Ke,t as U,a as j,o as d,d as ie,R as Qe,C as He,p as We,r as x,u as Ge}from"./index.e8d8151e.js";import{S as Xe}from"./SdkTabs.6909f1b6.js";function Ee(r,l,s){const n=r.slice();return n[5]=l[s],n}function Fe(r,l,s){const n=r.slice();return n[5]=l[s],n}function Le(r,l){let s,n=l[5].code+"",m,_,i,f;function v(){return l[4](l[5])}return{key:r,first:null,c(){s=a("button"),m=k(n),_=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(g,w){c(g,s,w),o(s,m),o(s,_),i||(f=Ge(s,"click",v),i=!0)},p(g,w){l=g,w&4&&n!==(n=l[5].code+"")&&re(m,n),w&6&&x(s,"active",l[1]===l[5].code)},d(g){g&&d(s),i=!1,f()}}}function Ne(r,l){let s,n,m,_;return n=new Ve({props:{content:l[5].body}}),{key:r,first:null,c(){s=a("div"),ae(n.$$.fragment),m=p(),b(s,"class","tab-item"),x(s,"active",l[1]===l[5].code),this.first=s},m(i,f){c(i,s,f),ne(n,s,null),o(s,m),_=!0},p(i,f){l=i;const v={};f&4&&(v.content=l[5].body),n.$set(v),(!_||f&6)&&x(s,"active",l[1]===l[5].code)},i(i){_||(U(n.$$.fragment,i),_=!0)},o(i){j(n.$$.fragment,i),_=!1},d(i){i&&d(s),ie(n)}}}function Ye(r){var Be,Me;let l,s,n=r[0].name+"",m,_,i,f,v,g,w,B,I,S,F,ce,L,M,de,J,N=r[0].name+"",K,ue,pe,V,Q,D,W,T,G,fe,X,C,Y,he,Z,be,h,me,P,_e,ke,ve,ee,ge,te,ye,Se,$e,oe,we,le,O,se,R,q,$=[],Te=new Map,Ce,H,y=[],Re=new Map,A;g=new Xe({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${r[3]}'); diff --git a/ui/dist/assets/AuthWithOAuth2Docs.a8493c67.js b/ui/dist/assets/AuthWithOAuth2Docs.4b3132ae.js similarity index 98% rename from ui/dist/assets/AuthWithOAuth2Docs.a8493c67.js rename to ui/dist/assets/AuthWithOAuth2Docs.4b3132ae.js index f5f68e47..2a5a68b0 100644 --- a/ui/dist/assets/AuthWithOAuth2Docs.a8493c67.js +++ b/ui/dist/assets/AuthWithOAuth2Docs.4b3132ae.js @@ -1,4 +1,4 @@ -import{S as je,i as He,s as Je,N as We,e as s,w as v,b as p,c as re,f as h,g as r,h as a,m as ce,x as de,O as Ve,P as Ne,k as Qe,Q as ze,n as Ke,t as j,a as H,o as c,d as ue,R as Ye,C as Be,p as Ge,r as J,u as Xe}from"./index.d939dbbd.js";import{S as Ze}from"./SdkTabs.2a5180be.js";function Fe(i,l,o){const n=i.slice();return n[5]=l[o],n}function Le(i,l,o){const n=i.slice();return n[5]=l[o],n}function xe(i,l){let o,n=l[5].code+"",m,_,d,b;function g(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=v(n),_=p(),h(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(k,R){r(k,o,R),a(o,m),a(o,_),d||(b=Xe(o,"click",g),d=!0)},p(k,R){l=k,R&4&&n!==(n=l[5].code+"")&&de(m,n),R&6&&J(o,"active",l[1]===l[5].code)},d(k){k&&c(o),d=!1,b()}}}function Me(i,l){let o,n,m,_;return n=new We({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),re(n.$$.fragment),m=p(),h(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(d,b){r(d,o,b),ce(n,o,null),a(o,m),_=!0},p(d,b){l=d;const g={};b&4&&(g.content=l[5].body),n.$set(g),(!_||b&6)&&J(o,"active",l[1]===l[5].code)},i(d){_||(j(n.$$.fragment,d),_=!0)},o(d){H(n.$$.fragment,d),_=!1},d(d){d&&c(o),ue(n)}}}function et(i){var qe,Ie;let l,o,n=i[0].name+"",m,_,d,b,g,k,R,C,N,y,L,pe,x,D,he,Q,M=i[0].name+"",z,be,K,q,Y,I,G,P,X,O,Z,fe,ee,$,te,me,ae,_e,f,ve,E,ge,ke,we,le,Se,oe,Re,ye,Oe,se,$e,ne,U,ie,A,V,S=[],Ae=new Map,Ee,B,w=[],Te=new Map,T;k=new Ze({props:{js:` +import{S as je,i as He,s as Je,N as We,e as s,w as v,b as p,c as re,f as h,g as r,h as a,m as ce,x as de,O as Ve,P as Ne,k as Qe,Q as ze,n as Ke,t as j,a as H,o as c,d as ue,R as Ye,C as Be,p as Ge,r as J,u as Xe}from"./index.e8d8151e.js";import{S as Ze}from"./SdkTabs.6909f1b6.js";function Fe(i,l,o){const n=i.slice();return n[5]=l[o],n}function Le(i,l,o){const n=i.slice();return n[5]=l[o],n}function xe(i,l){let o,n=l[5].code+"",m,_,d,b;function g(){return l[4](l[5])}return{key:i,first:null,c(){o=s("button"),m=v(n),_=p(),h(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(k,R){r(k,o,R),a(o,m),a(o,_),d||(b=Xe(o,"click",g),d=!0)},p(k,R){l=k,R&4&&n!==(n=l[5].code+"")&&de(m,n),R&6&&J(o,"active",l[1]===l[5].code)},d(k){k&&c(o),d=!1,b()}}}function Me(i,l){let o,n,m,_;return n=new We({props:{content:l[5].body}}),{key:i,first:null,c(){o=s("div"),re(n.$$.fragment),m=p(),h(o,"class","tab-item"),J(o,"active",l[1]===l[5].code),this.first=o},m(d,b){r(d,o,b),ce(n,o,null),a(o,m),_=!0},p(d,b){l=d;const g={};b&4&&(g.content=l[5].body),n.$set(g),(!_||b&6)&&J(o,"active",l[1]===l[5].code)},i(d){_||(j(n.$$.fragment,d),_=!0)},o(d){H(n.$$.fragment,d),_=!1},d(d){d&&c(o),ue(n)}}}function et(i){var qe,Ie;let l,o,n=i[0].name+"",m,_,d,b,g,k,R,C,N,y,L,pe,x,D,he,Q,M=i[0].name+"",z,be,K,q,Y,I,G,P,X,O,Z,fe,ee,$,te,me,ae,_e,f,ve,E,ge,ke,we,le,Se,oe,Re,ye,Oe,se,$e,ne,U,ie,A,V,S=[],Ae=new Map,Ee,B,w=[],Te=new Map,T;k=new Ze({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); diff --git a/ui/dist/assets/AuthWithPasswordDocs.be3fe4fc.js b/ui/dist/assets/AuthWithPasswordDocs.7298ae6e.js similarity index 98% rename from ui/dist/assets/AuthWithPasswordDocs.be3fe4fc.js rename to ui/dist/assets/AuthWithPasswordDocs.7298ae6e.js index f7621a56..6840fe0c 100644 --- a/ui/dist/assets/AuthWithPasswordDocs.be3fe4fc.js +++ b/ui/dist/assets/AuthWithPasswordDocs.7298ae6e.js @@ -1,4 +1,4 @@ -import{S as Se,i as ve,s as we,N as ke,e as s,w as f,b as u,c as Ot,f as h,g as r,h as o,m as At,x as Tt,O as ce,P as ye,k as ge,Q as Pe,n as Re,t as tt,a as et,o as c,d as Ut,R as $e,C as de,p as Ce,r as lt,u as Oe}from"./index.d939dbbd.js";import{S as Ae}from"./SdkTabs.2a5180be.js";function ue(n,e,l){const i=n.slice();return i[8]=e[l],i}function fe(n,e,l){const i=n.slice();return i[8]=e[l],i}function Te(n){let e;return{c(){e=f("email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Ue(n){let e;return{c(){e=f("username")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Me(n){let e;return{c(){e=f("username/email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function pe(n){let e;return{c(){e=s("strong"),e.textContent="username"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function be(n){let e;return{c(){e=f("or")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function me(n){let e;return{c(){e=s("strong"),e.textContent="email"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function he(n,e){let l,i=e[8].code+"",S,m,p,d;function _(){return e[7](e[8])}return{key:n,first:null,c(){l=s("button"),S=f(i),m=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m($,C){r($,l,C),o(l,S),o(l,m),p||(d=Oe(l,"click",_),p=!0)},p($,C){e=$,C&16&&i!==(i=e[8].code+"")&&Tt(S,i),C&24&<(l,"active",e[3]===e[8].code)},d($){$&&c(l),p=!1,d()}}}function _e(n,e){let l,i,S,m;return i=new ke({props:{content:e[8].body}}),{key:n,first:null,c(){l=s("div"),Ot(i.$$.fragment),S=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m(p,d){r(p,l,d),At(i,l,null),o(l,S),m=!0},p(p,d){e=p;const _={};d&16&&(_.content=e[8].body),i.$set(_),(!m||d&24)&<(l,"active",e[3]===e[8].code)},i(p){m||(tt(i.$$.fragment,p),m=!0)},o(p){et(i.$$.fragment,p),m=!1},d(p){p&&c(l),Ut(i)}}}function De(n){var se,ne;let e,l,i=n[0].name+"",S,m,p,d,_,$,C,O,B,Mt,ot,T,at,F,st,U,G,Dt,X,I,Et,nt,Z=n[0].name+"",it,Wt,rt,N,ct,M,dt,Lt,V,D,ut,Bt,ft,Ht,g,Yt,pt,bt,mt,qt,ht,_t,j,kt,E,St,Ft,vt,W,wt,It,yt,Nt,k,Vt,H,jt,Jt,Qt,gt,Kt,Pt,zt,Gt,Xt,Rt,Zt,$t,J,Ct,L,Q,A=[],xt=new Map,te,K,P=[],ee=new Map,Y;function le(t,a){if(t[1]&&t[2])return Me;if(t[1])return Ue;if(t[2])return Te}let q=le(n),R=q&&q(n);T=new Ae({props:{js:` +import{S as Se,i as ve,s as we,N as ke,e as s,w as f,b as u,c as Ot,f as h,g as r,h as o,m as At,x as Tt,O as ce,P as ye,k as ge,Q as Pe,n as Re,t as tt,a as et,o as c,d as Ut,R as $e,C as de,p as Ce,r as lt,u as Oe}from"./index.e8d8151e.js";import{S as Ae}from"./SdkTabs.6909f1b6.js";function ue(n,e,l){const i=n.slice();return i[8]=e[l],i}function fe(n,e,l){const i=n.slice();return i[8]=e[l],i}function Te(n){let e;return{c(){e=f("email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Ue(n){let e;return{c(){e=f("username")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function Me(n){let e;return{c(){e=f("username/email")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function pe(n){let e;return{c(){e=s("strong"),e.textContent="username"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function be(n){let e;return{c(){e=f("or")},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function me(n){let e;return{c(){e=s("strong"),e.textContent="email"},m(l,i){r(l,e,i)},d(l){l&&c(e)}}}function he(n,e){let l,i=e[8].code+"",S,m,p,d;function _(){return e[7](e[8])}return{key:n,first:null,c(){l=s("button"),S=f(i),m=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m($,C){r($,l,C),o(l,S),o(l,m),p||(d=Oe(l,"click",_),p=!0)},p($,C){e=$,C&16&&i!==(i=e[8].code+"")&&Tt(S,i),C&24&<(l,"active",e[3]===e[8].code)},d($){$&&c(l),p=!1,d()}}}function _e(n,e){let l,i,S,m;return i=new ke({props:{content:e[8].body}}),{key:n,first:null,c(){l=s("div"),Ot(i.$$.fragment),S=u(),h(l,"class","tab-item"),lt(l,"active",e[3]===e[8].code),this.first=l},m(p,d){r(p,l,d),At(i,l,null),o(l,S),m=!0},p(p,d){e=p;const _={};d&16&&(_.content=e[8].body),i.$set(_),(!m||d&24)&<(l,"active",e[3]===e[8].code)},i(p){m||(tt(i.$$.fragment,p),m=!0)},o(p){et(i.$$.fragment,p),m=!1},d(p){p&&c(l),Ut(i)}}}function De(n){var se,ne;let e,l,i=n[0].name+"",S,m,p,d,_,$,C,O,B,Mt,ot,T,at,F,st,U,G,Dt,X,I,Et,nt,Z=n[0].name+"",it,Wt,rt,N,ct,M,dt,Lt,V,D,ut,Bt,ft,Ht,g,Yt,pt,bt,mt,qt,ht,_t,j,kt,E,St,Ft,vt,W,wt,It,yt,Nt,k,Vt,H,jt,Jt,Qt,gt,Kt,Pt,zt,Gt,Xt,Rt,Zt,$t,J,Ct,L,Q,A=[],xt=new Map,te,K,P=[],ee=new Map,Y;function le(t,a){if(t[1]&&t[2])return Me;if(t[1])return Ue;if(t[2])return Te}let q=le(n),R=q&&q(n);T=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${n[6]}'); diff --git a/ui/dist/assets/CodeEditor.d71155bc.js b/ui/dist/assets/CodeEditor.3853a6d4.js similarity index 99% rename from ui/dist/assets/CodeEditor.d71155bc.js rename to ui/dist/assets/CodeEditor.3853a6d4.js index 4352736b..b751f9ae 100644 --- a/ui/dist/assets/CodeEditor.d71155bc.js +++ b/ui/dist/assets/CodeEditor.3853a6d4.js @@ -1,4 +1,4 @@ -import{S as _e,i as xe,s as Ue,e as Ve,f as ke,T as bO,g as Re,y as TO,o as we,K as je,L as ve,M as We}from"./index.d939dbbd.js";import{P as Ge,N as Ce,u as Ye,D as ze,v as QO,T as Y,I as HO,w as cO,x as n,y as Ae,L as hO,z as uO,A as z,B as dO,F as Oe,G as pO,H as v,J as Ee,K as De,E as y,M as j,O as Ie,Q as Ne,R as m,U as Be,a as k,h as Je,b as Le,c as Me,d as Fe,e as Ke,s as He,f as Ot,g as et,i as tt,r as at,j as it,k as rt,l as st,m as lt,n as nt,o as ot,p as Qt,q as ct,t as XO,C as W}from"./index.e8a8986f.js";class N{constructor(O,t,a,i,r,s,l,Q,c,h=0,o){this.p=O,this.stack=t,this.state=a,this.reducePos=i,this.pos=r,this.score=s,this.buffer=l,this.bufferBase=Q,this.curContext=c,this.lookAhead=h,this.parent=o}toString(){return`[${this.stack.filter((O,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(O,t,a=0){let i=O.parser.context;return new N(O,[],t,a,a,0,[],0,i?new ZO(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(O,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=O}reduce(O){let t=O>>19,a=O&65535,{parser:i}=this.p,r=i.dynamicPrecedence(a);if(r&&(this.score+=r),t==0){this.pushState(i.getGoto(this.state,a,!0),this.reducePos),as;)this.stack.pop();this.reduceContext(a,l)}storeNode(O,t,a,i=4,r=!1){if(O==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&s.buffer[l-4]==0&&s.buffer[l-1]>-1){if(t==a)return;if(s.buffer[l-2]>=t){s.buffer[l-2]=a;return}}}if(!r||this.pos==a)this.buffer.push(O,t,a,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>a;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4);this.buffer[s]=O,this.buffer[s+1]=t,this.buffer[s+2]=a,this.buffer[s+3]=i}}shift(O,t,a){let i=this.pos;if(O&131072)this.pushState(O&65535,this.pos);else if((O&262144)==0){let r=O,{parser:s}=this.p;(a>this.pos||t<=s.maxNode)&&(this.pos=a,s.stateFlag(r,1)||(this.reducePos=a)),this.pushState(r,i),this.shiftContext(t,i),t<=s.maxNode&&this.buffer.push(t,i,a,4)}else this.pos=a,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,a,4)}apply(O,t,a){O&65536?this.reduce(O):this.shift(O,t,a)}useNode(O,t){let a=this.p.reused.length-1;(a<0||this.p.reused[a]!=O)&&(this.p.reused.push(O),a++);let i=this.pos;this.reducePos=this.pos=i+O.length,this.pushState(t,i),this.buffer.push(a,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,O,this,this.p.stream.reset(this.pos-O.length)))}split(){let O=this,t=O.buffer.length;for(;t>0&&O.buffer[t-2]>O.reducePos;)t-=4;let a=O.buffer.slice(t),i=O.bufferBase+t;for(;O&&i==O.bufferBase;)O=O.parent;return new N(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,a,i,this.curContext,this.lookAhead,O)}recoverByDelete(O,t){let a=O<=this.p.parser.maxNode;a&&this.storeNode(O,this.pos,t,4),this.storeNode(0,this.pos,t,a?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(O){for(let t=new ht(this);;){let a=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,O);if(a==0)return!1;if((a&65536)==0)return!0;t.reduce(a)}}recoverByInsert(O){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>4<<1||this.stack.length>=120){let i=[];for(let r=0,s;rQ&1&&l==s)||i.push(t[r],s)}t=i}let a=[];for(let i=0;i>19,i=O&65535,r=this.stack.length-a*3;if(r<0||t.getGoto(this.stack[r],i,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(O),!0}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:O}=this.p;return O.data[O.stateSlot(this.state,1)]==65535&&!O.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(O){if(this.state!=O.state||this.stack.length!=O.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=O)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class ZO{constructor(O,t){this.tracker=O,this.context=t,this.hash=O.strict?O.hash(t):0}}var qO;(function(e){e[e.Insert=200]="Insert",e[e.Delete=190]="Delete",e[e.Reduce=100]="Reduce",e[e.MaxNext=4]="MaxNext",e[e.MaxInsertStackDepth=300]="MaxInsertStackDepth",e[e.DampenInsertStackDepth=120]="DampenInsertStackDepth"})(qO||(qO={}));class ht{constructor(O){this.start=O,this.state=O.state,this.stack=O.stack,this.base=this.stack.length}reduce(O){let t=O&65535,a=O>>19;a==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(a-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}}class B{constructor(O,t,a){this.stack=O,this.pos=t,this.index=a,this.buffer=O.buffer,this.index==0&&this.maybeNext()}static create(O,t=O.bufferBase+O.buffer.length){return new B(O,t,t-O.bufferBase)}maybeNext(){let O=this.stack.parent;O!=null&&(this.index=this.stack.bufferBase-O.bufferBase,this.stack=O,this.buffer=O.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new B(this.stack,this.pos,this.index)}}class A{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const yO=new A;class ut{constructor(O,t){this.input=O,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=yO,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(O,t){let a=this.range,i=this.rangeIndex,r=this.pos+O;for(;ra.to:r>=a.to;){if(i==this.ranges.length-1)return null;let s=this.ranges[++i];r+=s.from-a.to,a=s}return r}clipPos(O){if(O>=this.range.from&&OO)return Math.max(O,t.from);return this.end}peek(O){let t=this.chunkOff+O,a,i;if(t>=0&&t=this.chunk2Pos&&al.to&&(this.chunk2=this.chunk2.slice(0,l.to-a)),i=this.chunk2.charCodeAt(0)}}return a>=this.token.lookAhead&&(this.token.lookAhead=a+1),i}acceptToken(O,t=0){let a=t?this.resolveOffset(t,-1):this.pos;if(a==null||a=this.chunk2Pos&&this.posthis.range.to?O.slice(0,this.range.to-this.pos):O,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(O=1){for(this.chunkOff+=O;this.pos+O>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();O-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=O,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(O,t){if(t?(this.token=t,t.start=O,t.lookAhead=O+1,t.value=t.extended=-1):this.token=yO,this.pos!=O){if(this.pos=O,O==this.end)return this.setDone(),this;for(;O=this.range.to;)this.range=this.ranges[++this.rangeIndex];O>=this.chunkPos&&O=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(O-this.chunkPos,t-this.chunkPos);if(O>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(O-this.chunk2Pos,t-this.chunk2Pos);if(O>=this.range.from&&t<=this.range.to)return this.input.read(O,t);let a="";for(let i of this.ranges){if(i.from>=t)break;i.to>O&&(a+=this.input.read(Math.max(i.from,O),Math.min(i.to,t)))}return a}}class E{constructor(O,t){this.data=O,this.id=t}token(O,t){dt(this.data,O,t,this.id)}}E.prototype.contextual=E.prototype.fallback=E.prototype.extend=!1;class b{constructor(O,t={}){this.token=O,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function dt(e,O,t,a){let i=0,r=1<0){let p=e[d];if(l.allows(p)&&(O.token.value==-1||O.token.value==p||s.overrides(p,O.token.value))){O.acceptToken(p);break}}let c=O.next,h=0,o=e[i+2];if(O.next<0&&o>h&&e[Q+o*3-3]==65535&&e[Q+o*3-3]==65535){i=e[Q+o*3-1];continue O}for(;h>1,p=Q+d+(d<<1),$=e[p],T=e[p+1]||65536;if(c<$)o=d;else if(c>=T)h=d+1;else{i=e[p+2],O.advance();continue O}}break}}function G(e,O=Uint16Array){if(typeof e!="string")return e;let t=null;for(let a=0,i=0;a=92&&s--,s>=34&&s--;let Q=s-32;if(Q>=46&&(Q-=46,l=!0),r+=Q,l)break;r*=46}t?t[i++]=r:t=new O(r)}return t}const g=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG);let H=null;var _O;(function(e){e[e.Margin=25]="Margin"})(_O||(_O={}));function xO(e,O,t){let a=e.cursor(HO.IncludeAnonymous);for(a.moveTo(O);;)if(!(t<0?a.childBefore(O):a.childAfter(O)))for(;;){if((t<0?a.toO)&&!a.type.isError)return t<0?Math.max(0,Math.min(a.to-1,O-25)):Math.min(e.length,Math.max(a.from+1,O+25));if(t<0?a.prevSibling():a.nextSibling())break;if(!a.parent())return t<0?0:e.length}}class pt{constructor(O,t){this.fragments=O,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let O=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(O){for(this.safeFrom=O.openStart?xO(O.tree,O.from+O.offset,1)-O.offset:O.from,this.safeTo=O.openEnd?xO(O.tree,O.to+O.offset,-1)-O.offset:O.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(O.tree),this.start.push(-O.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(O){if(OO)return this.nextStart=s,null;if(r instanceof Y){if(s==O){if(s=Math.max(this.safeFrom,O)&&(this.trees.push(r),this.start.push(s),this.index.push(0))}else this.index[t]++,this.nextStart=s+r.length}}}class $t{constructor(O,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=O.tokenizers.map(a=>new A)}getActions(O){let t=0,a=null,{parser:i}=O.p,{tokenizers:r}=i,s=i.stateSlot(O.state,3),l=O.curContext?O.curContext.hash:0,Q=0;for(let c=0;co.end+25&&(Q=Math.max(o.lookAhead,Q)),o.value!=0)){let d=t;if(o.extended>-1&&(t=this.addActions(O,o.extended,o.end,t)),t=this.addActions(O,o.value,o.end,t),!h.extend&&(a=o,t>d))break}}for(;this.actions.length>t;)this.actions.pop();return Q&&O.setLookAhead(Q),!a&&O.pos==this.stream.end&&(a=new A,a.value=O.p.parser.eofTerm,a.start=a.end=O.pos,t=this.addActions(O,a.value,a.end,t)),this.mainToken=a,this.actions}getMainToken(O){if(this.mainToken)return this.mainToken;let t=new A,{pos:a,p:i}=O;return t.start=a,t.end=Math.min(a+1,i.stream.end),t.value=a==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(O,t,a){let i=this.stream.clipPos(a.pos);if(t.token(this.stream.reset(i,O),a),O.value>-1){let{parser:r}=a.p;for(let s=0;s=0&&a.p.parser.dialect.allows(l>>1)){(l&1)==0?O.value=l>>1:O.extended=l>>1;break}}}else O.value=0,O.end=this.stream.clipPos(i+1)}putAction(O,t,a,i){for(let r=0;rO.bufferLength*4?new pt(a,O.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let O=this.stacks,t=this.minStackPos,a=this.stacks=[],i,r;for(let s=0;st)a.push(l);else{if(this.advanceStack(l,a,O))continue;{i||(i=[],r=[]),i.push(l);let Q=this.tokens.getMainToken(l);r.push(Q.value,Q.end)}}break}}if(!a.length){let s=i&&Pt(i);if(s)return this.stackToTree(s);if(this.parser.strict)throw g&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let s=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,r,a);if(s)return this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(a.length>s)for(a.sort((l,Q)=>Q.score-l.score);a.length>s;)a.pop();a.some(l=>l.reducePos>t)&&this.recovering--}else if(a.length>1){O:for(let s=0;s500&&c.buffer.length>500)if((l.score-c.score||l.buffer.length-c.buffer.length)>0)a.splice(Q--,1);else{a.splice(s--,1);continue O}}}}this.minStackPos=a[0].pos;for(let s=1;s ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return O.forceReduce()?O:null;if(this.fragments){let c=O.curContext&&O.curContext.tracker.strict,h=c?O.curContext.hash:0;for(let o=this.fragments.nodeAt(i);o;){let d=this.parser.nodeSet.types[o.type.id]==o.type?r.getGoto(O.state,o.type.id):-1;if(d>-1&&o.length&&(!c||(o.prop(QO.contextHash)||0)==h))return O.useNode(o,d),g&&console.log(s+this.stackID(O)+` (via reuse of ${r.getName(o.type.id)})`),!0;if(!(o instanceof Y)||o.children.length==0||o.positions[0]>0)break;let p=o.children[0];if(p instanceof Y&&o.positions[0]==0)o=p;else break}}let l=r.stateSlot(O.state,4);if(l>0)return O.reduce(l),g&&console.log(s+this.stackID(O)+` (via always-reduce ${r.getName(l&65535)})`),!0;if(O.stack.length>=15e3)for(;O.stack.length>9e3&&O.forceReduce(););let Q=this.tokens.getActions(O);for(let c=0;ci?t.push($):a.push($)}return!1}advanceFully(O,t){let a=O.pos;for(;;){if(!this.advanceStack(O,null,null))return!1;if(O.pos>a)return VO(O,t),!0}}runRecovery(O,t,a){let i=null,r=!1;for(let s=0;s ":"";if(l.deadEnd&&(r||(r=!0,l.restart(),g&&console.log(h+this.stackID(l)+" (restarted)"),this.advanceFully(l,a))))continue;let o=l.split(),d=h;for(let p=0;o.forceReduce()&&p<10&&(g&&console.log(d+this.stackID(o)+" (via force-reduce)"),!this.advanceFully(o,a));p++)g&&(d=this.stackID(o)+" -> ");for(let p of l.recoverByInsert(Q))g&&console.log(h+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,a);this.stream.end>l.pos?(c==l.pos&&(c++,Q=0),l.recoverByDelete(Q,c),g&&console.log(h+this.stackID(l)+` (via recover-delete ${this.parser.getName(Q)})`),VO(l,a)):(!i||i.scoree;class ee{constructor(O){this.start=O.start,this.shift=O.shift||OO,this.reduce=O.reduce||OO,this.reuse=O.reuse||OO,this.hash=O.hash||(()=>0),this.strict=O.strict!==!1}}class _ extends Ge{constructor(O){if(super(),this.wrappers=[],O.version!=14)throw new RangeError(`Parser version (${O.version}) doesn't match runtime version (${14})`);let t=O.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let l=0;lO.topRules[l][1]),i=[];for(let l=0;l=0)r(h,Q,l[c++]);else{let o=l[c+-h];for(let d=-h;d>0;d--)r(l[c++],Q,o);c++}}}this.nodeSet=new Ce(t.map((l,Q)=>Ye.define({name:Q>=this.minRepeatTerm?void 0:l,id:Q,props:i[Q],top:a.indexOf(Q)>-1,error:Q==0,skipped:O.skippedNodes&&O.skippedNodes.indexOf(Q)>-1}))),O.propSources&&(this.nodeSet=this.nodeSet.extend(...O.propSources)),this.strict=!1,this.bufferLength=ze;let s=G(O.tokenData);this.context=O.context,this.specializerSpecs=O.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;ltypeof l=="number"?new E(s,l):l),this.topRules=O.topRules,this.dialects=O.dialects||{},this.dynamicPrecedences=O.dynamicPrecedences||null,this.tokenPrecTable=O.tokenPrec,this.termNames=O.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(O,t,a){let i=new ft(this,O,t,a);for(let r of this.wrappers)i=r(i,O,t,a);return i}getGoto(O,t,a=!1){let i=this.goto;if(t>=i[0])return-1;for(let r=i[t+1];;){let s=i[r++],l=s&1,Q=i[r++];if(l&&a)return Q;for(let c=r+(s>>1);r0}validAction(O,t){if(t==this.stateSlot(O,4))return!0;for(let a=this.stateSlot(O,1);;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=X(this.data,a+2);else return!1;if(t==X(this.data,a+1))return!0}}nextStates(O){let t=[];for(let a=this.stateSlot(O,1);;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=X(this.data,a+2);else break;if((this.data[a+2]&1)==0){let i=this.data[a+1];t.some((r,s)=>s&1&&r==i)||t.push(this.data[a],i)}}return t}overrides(O,t){let a=kO(this.data,this.tokenPrecTable,t);return a<0||kO(this.data,this.tokenPrecTable,O){let i=O.tokenizers.find(r=>r.from==a);return i?i.to:a})),O.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((a,i)=>{let r=O.specializers.find(l=>l.from==a.external);if(!r)return a;let s=Object.assign(Object.assign({},a),{external:r.to});return t.specializers[i]=RO(s),s})),O.contextTracker&&(t.context=O.contextTracker),O.dialect&&(t.dialect=this.parseDialect(O.dialect)),O.strict!=null&&(t.strict=O.strict),O.wrap&&(t.wrappers=t.wrappers.concat(O.wrap)),O.bufferLength!=null&&(t.bufferLength=O.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(O){return this.termNames?this.termNames[O]:String(O<=this.maxNode&&this.nodeSet.types[O].name||O)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(O){let t=this.dynamicPrecedences;return t==null?0:t[O]||0}parseDialect(O){let t=Object.keys(this.dialects),a=t.map(()=>!1);if(O)for(let r of O.split(" ")){let s=t.indexOf(r);s>=0&&(a[s]=!0)}let i=null;for(let r=0;ra)&&t.p.parser.stateFlag(t.state,2)&&(!O||O.scoree.external(t,a)<<1|O}return e.get}const mt=54,gt=1,bt=55,Tt=2,Xt=56,Zt=3,J=4,te=5,ae=6,ie=7,re=8,qt=9,yt=10,_t=11,eO=57,xt=12,wO=58,Ut=18,Vt=20,se=21,kt=22,nO=24,le=25,Rt=27,wt=30,jt=33,vt=35,Wt=0,Gt={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Ct={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},jO={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Yt(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function ne(e){return e==9||e==10||e==13||e==32}let vO=null,WO=null,GO=0;function oO(e,O){let t=e.pos+O;if(GO==t&&WO==e)return vO;let a=e.peek(O);for(;ne(a);)a=e.peek(++O);let i="";for(;Yt(a);)i+=String.fromCharCode(a),a=e.peek(++O);return WO=e,GO=t,vO=i?i.toLowerCase():a==zt||a==At?void 0:null}const oe=60,Qe=62,ce=47,zt=63,At=33,Et=45;function CO(e,O){this.name=e,this.parent=O,this.hash=O?O.hash:0;for(let t=0;t-1?new CO(oO(a,1)||"",e):e},reduce(e,O){return O==Ut&&e?e.parent:e},reuse(e,O,t,a){let i=O.type.id;return i==J||i==vt?new CO(oO(a,1)||"",e):e},hash(e){return e?e.hash:0},strict:!1}),Nt=new b((e,O)=>{if(e.next!=oe){e.next<0&&O.context&&e.acceptToken(eO);return}e.advance();let t=e.next==ce;t&&e.advance();let a=oO(e,0);if(a===void 0)return;if(!a)return e.acceptToken(t?xt:J);let i=O.context?O.context.name:null;if(t){if(a==i)return e.acceptToken(qt);if(i&&Ct[i])return e.acceptToken(eO,-2);if(O.dialectEnabled(Wt))return e.acceptToken(yt);for(let r=O.context;r;r=r.parent)if(r.name==a)return;e.acceptToken(_t)}else{if(a=="script")return e.acceptToken(te);if(a=="style")return e.acceptToken(ae);if(a=="textarea")return e.acceptToken(ie);if(Gt.hasOwnProperty(a))return e.acceptToken(re);i&&jO[i]&&jO[i][a]?e.acceptToken(eO,-1):e.acceptToken(J)}},{contextual:!0}),Bt=new b(e=>{for(let O=0,t=0;;t++){if(e.next<0){t&&e.acceptToken(wO);break}if(e.next==Et)O++;else if(e.next==Qe&&O>=2){t>3&&e.acceptToken(wO,-2);break}else O=0;e.advance()}});function $O(e,O,t){let a=2+e.length;return new b(i=>{for(let r=0,s=0,l=0;;l++){if(i.next<0){l&&i.acceptToken(O);break}if(r==0&&i.next==oe||r==1&&i.next==ce||r>=2&&rs?i.acceptToken(O,-s):i.acceptToken(t,-(s-2));break}else if((i.next==10||i.next==13)&&l){i.acceptToken(O,1);break}else r=s=0;i.advance()}})}const Jt=$O("script",mt,gt),Lt=$O("style",bt,Tt),Mt=$O("textarea",Xt,Zt),Ft=cO({"Text RawText":n.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":n.angleBracket,TagName:n.tagName,"MismatchedCloseTag/TagName":[n.tagName,n.invalid],AttributeName:n.attributeName,"AttributeValue UnquotedAttributeValue":n.attributeValue,Is:n.definitionOperator,"EntityReference CharacterReference":n.character,Comment:n.blockComment,ProcessingInst:n.processingInstruction,DoctypeDecl:n.documentMeta}),Kt=_.deserialize({version:14,states:",xOVOxOOO!WQ!bO'#CoO!]Q!bO'#CyO!bQ!bO'#C|O!gQ!bO'#DPO!lQ!bO'#DRO!qOXO'#CnO!|OYO'#CnO#XO[O'#CnO$eOxO'#CnOOOW'#Cn'#CnO$lO!rO'#DTO$tQ!bO'#DVO$yQ!bO'#DWOOOW'#Dk'#DkOOOW'#DY'#DYQVOxOOO%OQ#tO,59ZO%WQ#tO,59eO%`Q#tO,59hO%hQ#tO,59kO%sQ#tO,59mOOOX'#D^'#D^O%{OXO'#CwO&WOXO,59YOOOY'#D_'#D_O&`OYO'#CzO&kOYO,59YOOO['#D`'#D`O&sO[O'#C}O'OO[O,59YOOOW'#Da'#DaO'WOxO,59YO'_Q!bO'#DQOOOW,59Y,59YOOO`'#Db'#DbO'dO!rO,59oOOOW,59o,59oO'lQ!bO,59qO'qQ!bO,59rOOOW-E7W-E7WO'vQ#tO'#CqOOQO'#DZ'#DZO(UQ#tO1G.uOOOX1G.u1G.uO(^Q#tO1G/POOOY1G/P1G/PO(fQ#tO1G/SOOO[1G/S1G/SO(nQ#tO1G/VOOOW1G/V1G/VOOOW1G/X1G/XO(yQ#tO1G/XOOOX-E7[-E7[O)RQ!bO'#CxOOOW1G.t1G.tOOOY-E7]-E7]O)WQ!bO'#C{OOO[-E7^-E7^O)]Q!bO'#DOOOOW-E7_-E7_O)bQ!bO,59lOOO`-E7`-E7`OOOW1G/Z1G/ZOOOW1G/]1G/]OOOW1G/^1G/^O)gQ&jO,59]OOQO-E7X-E7XOOOX7+$a7+$aOOOY7+$k7+$kOOO[7+$n7+$nOOOW7+$q7+$qOOOW7+$s7+$sO)rQ!bO,59dO)wQ!bO,59gO)|Q!bO,59jOOOW1G/W1G/WO*RO,UO'#CtO*dO7[O'#CtOOQO1G.w1G.wOOOW1G/O1G/OOOOW1G/R1G/ROOOW1G/U1G/UOOOO'#D['#D[O*uO,UO,59`OOQO,59`,59`OOOO'#D]'#D]O+WO7[O,59`OOOO-E7Y-E7YOOQO1G.z1G.zOOOO-E7Z-E7Z",stateData:"+u~O!^OS~OSSOTPOUQOVROWTOY]OZ[O[^O^^O_^O`^Oa^Ox^O{_O!dZO~OdaO~OdbO~OdcO~OddO~OdeO~O!WfOPkP!ZkP~O!XiOQnP!ZnP~O!YlORqP!ZqP~OSSOTPOUQOVROWTOXqOY]OZ[O[^O^^O_^O`^Oa^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OdvO~OdwO~OfyOj|O~OfyOj!OO~OfyOj!QO~OfyOj!SOv!TO~OfyOj!TO~O!WfOPkX!ZkX~OP!WO!Z!XO~O!XiOQnX!ZnX~OQ!ZO!Z!XO~O!YlORqX!ZqX~OR!]O!Z!XO~O!Z!XO~P#dOd!_O~O![sO!e!aO~Oj!bO~Oj!cO~Og!dOfeXjeXveX~OfyOj!fO~OfyOj!gO~OfyOj!hO~OfyOj!iOv!jO~OfyOj!jO~Od!kO~Od!lO~Od!mO~Oj!nO~Oi!qO!`!oO!b!pO~Oj!rO~Oj!sO~Oj!tO~O_!uO`!uOa!uO!`!wO!a!uO~O_!xO`!xOa!xO!b!wO!c!xO~O_!uO`!uOa!uO!`!{O!a!uO~O_!xO`!xOa!xO!b!{O!c!xO~Ov~vj`!dx{_a_~",goto:"%p!`PPPPPPPPPPPPPPPPPP!a!gP!mPP!yPP!|#P#S#Y#]#`#f#i#l#r#xP!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"\u26A0 StartCloseTag StartCloseTag StartCloseTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue EndTag ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag SelfClosingEndTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:It,nodeProps:[["closedBy",-10,1,2,3,5,6,7,8,9,10,11,"EndTag",4,"EndTag SelfClosingEndTag",-4,19,29,32,35,"CloseTag"],["group",-9,12,15,16,17,18,39,40,41,42,"Entity",14,"Entity TextContent",-3,27,30,33,"TextContent Entity"],["openedBy",26,"StartTag StartCloseTag",-4,28,31,34,36,"OpenTag",38,"StartTag"]],propSources:[Ft],skippedNodes:[0],repeatNodeCount:9,tokenData:"#(r!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs4ysv-_vw5iwxJ^x}-_}!OKP!O!P-_!P!Q!!O!Q![-_![!]!$c!]!^-_!^!_!(k!_!`#'S!`!a#'z!a!c-_!c!}!$c!}#R-_#R#S!$c#S#T3V#T#o!$c#o#s-_#s$f$q$f%W-_%W%o!$c%o%p-_%p&a!$c&a&b-_&b1p!$c1p4U-_4U4d!$c4d4e-_4e$IS!$c$IS$I`-_$I`$Ib!$c$Ib$Kh-_$Kh%#t!$c%#t&/x-_&/x&Et!$c&Et&FV-_&FV;'S!$c;'S;:j!(e;:j;=`4s<%l?&r-_?&r?Ah!$c?Ah?BY$q?BY?Mn!$c?MnO$q!Z$|c^PiW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bX^P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UV^P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pT^POv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!cpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({W^P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!a`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!a`!cpOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!Q*vP;=`<%l*V!R*|P;=`<%l&XW+UYiWOX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+PW+wP;=`<%l+P!Z+}P;=`<%l$q!a,]`^P!a`!cp!^^OX&XXY,QYZ,QZ]&X]^,Q^p&Xpq,Qqr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!_-ljfS^PiW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_1n!_!a&X!a#S-_#S#T3V#T#s-_#s$f$q$f;'S-_;'S;=`4s<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q[/ecfSiWOX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!^!_0p!a#S/^#S#T0p#T#s/^#s$f+P$f;'S/^;'S;=`1h<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+PS0uXfSqr0psw0px!P0p!Q!_0p!a#s0p$f;'S0p;'S;=`1b<%l?Ah0p?BY?Mn0pS1eP;=`<%l0p[1kP;=`<%l/^!U1wbfS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!U3SP;=`<%l1n!V3bcfS^P!a`!cpOq&Xqr3Vrs&}sv3Vvw0pwx(tx!P3V!P!Q&X!Q!^3V!^!_1n!_!a&X!a#s3V#s$f&X$f;'S3V;'S;=`4m<%l?Ah3V?Ah?BY&X?BY?Mn3V?MnO&X!V4pP;=`<%l3V!_4vP;=`<%l-_!Z5SV!`h^P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}!_5rjfSiWa!ROX7dXZ8qZ[7d[^8q^p7dqr:crs8qst@Ttw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^/^!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!Z7ibiWOX7dXZ8qZ[7d[^8q^p7dqr7drs8qst+Ptw7dwx8qx!]7d!]!^9f!^!a8q!a#S7d#S#T8q#T;'S7d;'S;=`:]<%lO7d!R8tVOp8qqs8qt!]8q!]!^9Z!^;'S8q;'S;=`9`<%lO8q!R9`O_!R!R9cP;=`<%l8q!Z9mYiW_!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z:`P;=`<%l7d!_:jjfSiWOX7dXZ8qZ[7d[^8q^p7dqr:crs8qst/^tw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^<[!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!_{let Q=s.type.id;if(Q==Rt)return tO(s,l,t);if(Q==wt)return tO(s,l,a);if(Q==jt)return tO(s,l,i);if(r&&Q==se){let c=s.node,h;if(h=c.firstChild){let o=r[l.read(h.from,h.to)];if(o)for(let d of o){if(d.tagName){if(!tagName){let $=c.parent.getChild(Vt);tagName=$?l.read($.from,$.to):" "}if(attrTagName!=tagName)continue}let p=c.lastChild;if(p.type.id==nO)return{parser:d.parser,overlay:[{from:p.from+1,to:p.to-1}]};if(p.type.id==le)return{parser:d.parser,overlay:[{from:p.from,to:p.to}]}}}}return null})}const Oa=95,YO=1,ea=96,ta=97,zO=2,ue=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],aa=58,ia=40,de=95,ra=91,D=45,sa=46,la=35,na=37;function L(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function oa(e){return e>=48&&e<=57}const Qa=new b((e,O)=>{for(let t=!1,a=0,i=0;;i++){let{next:r}=e;if(L(r)||r==D||r==de||t&&oa(r))!t&&(r!=D||i>0)&&(t=!0),a===i&&r==D&&a++,e.advance();else{t&&e.acceptToken(r==ia?ea:a==2&&O.canShift(zO)?zO:ta);break}}}),ca=new b(e=>{if(ue.includes(e.peek(-1))){let{next:O}=e;(L(O)||O==de||O==la||O==sa||O==ra||O==aa||O==D)&&e.acceptToken(Oa)}}),ha=new b(e=>{if(!ue.includes(e.peek(-1))){let{next:O}=e;if(O==na&&(e.advance(),e.acceptToken(YO)),L(O)){do e.advance();while(L(e.next));e.acceptToken(YO)}}}),ua=cO({"AtKeyword import charset namespace keyframes media supports":n.definitionKeyword,"from to selector":n.keyword,NamespaceName:n.namespace,KeyframeName:n.labelName,TagName:n.tagName,ClassName:n.className,PseudoClassName:n.constant(n.className),IdName:n.labelName,"FeatureName PropertyName":n.propertyName,AttributeName:n.attributeName,NumberLiteral:n.number,KeywordQuery:n.keyword,UnaryQueryOp:n.operatorKeyword,"CallTag ValueName":n.atom,VariableName:n.variableName,Callee:n.operatorKeyword,Unit:n.unit,"UniversalSelector NestingSelector":n.definitionOperator,MatchOp:n.compareOperator,"ChildOp SiblingOp, LogicOp":n.logicOperator,BinOp:n.arithmeticOperator,Important:n.modifier,Comment:n.blockComment,ParenthesizedContent:n.special(n.name),ColorLiteral:n.color,StringLiteral:n.string,":":n.punctuation,"PseudoOp #":n.derefOperator,"; ,":n.separator,"( )":n.paren,"[ ]":n.squareBracket,"{ }":n.brace}),da={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},pa={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},$a={__proto__:null,not:128,only:128,from:158,to:160},fa=_.deserialize({version:14,states:"8SQYQ[OOO!ZQ[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO!cQ[O'#CfO#VQXO'#CaO#^Q[O'#ChO#iQ[O'#DPO#nQ[O'#DTOOQP'#Ee'#EeO#sQdO'#DeO$_Q[O'#DrO#sQdO'#DtO$pQ[O'#DvO${Q[O'#DyO%QQ[O'#EPO%`Q[O'#EROOQS'#Ed'#EdOOQS'#ET'#ETQYQ[OOOOQO'#Db'#DbO%gQWO'#DaQ%lQWOOOOQP'#Cg'#CgOOQP,59Q,59QO!cQ[O,59QO%qQ[O'#EWO&]QWO,58{O&eQ[O,59SO#iQ[O,59kO#nQ[O,59oO%qQ[O,59sO%qQ[O,59uO%qQ[O,59vO'tQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO'{QWO,59SO(QQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO(VQ`O,59oOOQS'#Cp'#CpO#sQdO'#CqO(_QvO'#CsO)lQtO,5:POOQO'#Cx'#CxO(QQWO'#CwO*QQWO'#CyOOQS'#Eh'#EhOOQO'#Dh'#DhO*VQ[O'#DoO*eQWO'#EkO%QQ[O'#DmO*sQWO'#DpOOQO'#El'#ElO&`QWO,5:^O*xQpO,5:`OOQS'#Dx'#DxO+QQWO,5:bO+VQ[O,5:bOOQO'#D{'#D{O+_QWO,5:eO+dQWO,5:kO+lQWO,5:mOOQS-E8R-E8RO#sQdO,59{O+tQ[O'#E]Q%lQWOOOOQP1G.l1G.lO,nQXO,5:rOOQO-E8U-E8UOOQS1G.g1G.gOOQP1G.n1G.nO'{QWO1G.nO(QQWO1G.nOOQP1G/V1G/VO,{Q`O1G/ZO-fQXO1G/_O-|QXO1G/aO.dQXO1G/bO.zQXO'#CdOOQS,59z,59zO/oQWO,59zO/wQ[O,59zO0OQ[O'#DOO0VQdO'#CoOOQP1G/Z1G/ZO#sQdO1G/ZO0^QpO,59]OOQS,59_,59_O#sQdO,59aO0fQWO1G/kOOQS,59c,59cO0kQ!bO,59eO0sQWO'#DhO1OQWO,5:TO1TQWO,5:ZO%QQ[O,5:VO%QQ[O'#EZO1]QWO,5;VO1hQWO,5:XO%qQ[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O1yQWO1G/|O2OQdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XO2^QtO1G/gOOQO,5:w,5:wOOQO-E8Z-E8ZOOQP7+$Y7+$YOOQP7+$u7+$uO#sQdO7+$uO2tQ[O'#EYO3OQWO1G/fOOQS1G/f1G/fO3OQWO1G/fO3WQXO'#EjO3_QWO,59jO3dQtO'#EUO4XQdO'#EgO4cQWO,59ZO4hQpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO4pQWO1G/PO#sQdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO4uQWO,5:uOOQO-E8X-E8XO5TQXO1G/vOOQS7+%h7+%hO5[QYO'#CsO&`QWO'#E[O5dQdO,5:hOOQS,5:h,5:hO5rQtO'#EXO#sQdO'#EXO6pQdO7+%ROOQO7+%R7+%RO7TQpO<T![;'S%^;'S;=`%o<%lO%^^;TUoWOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^^;nYoW#]UOy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^^[[oW#]UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^_?VSpVOy%^z;'S%^;'S;=`%o<%lO%^^?hWjSOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^_@VU#YPOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjSOy%^z{@}{;'S%^;'S;=`%o<%lO%^~ASUoWOy@}yzAfz{Bm{;'S@};'S;=`Co<%lO@}~AiTOzAfz{Ax{;'SAf;'S;=`Bg<%lOAf~A{VOzAfz{Ax{!PAf!P!QBb!Q;'SAf;'S;=`Bg<%lOAf~BgOR~~BjP;=`<%lAf~BrWoWOy@}yzAfz{Bm{!P@}!P!QC[!Q;'S@};'S;=`Co<%lO@}~CcSoWR~Oy%^z;'S%^;'S;=`%o<%lO%^~CrP;=`<%l@}^Cz[#]UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^XDuU]POy%^z![%^![!]EX!];'S%^;'S;=`%o<%lO%^XE`S^PoWOy%^z;'S%^;'S;=`%o<%lO%^_EqS!WVOy%^z;'S%^;'S;=`%o<%lO%^YFSSzQOy%^z;'S%^;'S;=`%o<%lO%^XFeU|POy%^z!`%^!`!aFw!a;'S%^;'S;=`%o<%lO%^XGOS|PoWOy%^z;'S%^;'S;=`%o<%lO%^XG_WOy%^z!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHO[!YPoWOy%^z}%^}!OGw!O!Q%^!Q![Gw![!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHySxPOy%^z;'S%^;'S;=`%o<%lO%^^I[SvUOy%^z;'S%^;'S;=`%o<%lO%^XIkUOy%^z#b%^#b#cI}#c;'S%^;'S;=`%o<%lO%^XJSUoWOy%^z#W%^#W#XJf#X;'S%^;'S;=`%o<%lO%^XJmS!`PoWOy%^z;'S%^;'S;=`%o<%lO%^XJ|UOy%^z#f%^#f#gJf#g;'S%^;'S;=`%o<%lO%^XKeS!RPOy%^z;'S%^;'S;=`%o<%lO%^_KvS!QVOy%^z;'S%^;'S;=`%o<%lO%^ZLXU!PPOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^WLnP;=`<%l$}",tokenizers:[ca,ha,Qa,0,1,2,3],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:96,get:e=>da[e]||-1},{term:56,get:e=>pa[e]||-1},{term:97,get:e=>$a[e]||-1}],tokenPrec:1120});let aO=null;function iO(){if(!aO&&typeof document=="object"&&document.body){let e=[];for(let O in document.body.style)/[A-Z]|^-|^(item|length)$/.test(O)||e.push(O);aO=e.sort().map(O=>({type:"property",label:O}))}return aO||[]}const AO=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(e=>({type:"class",label:e})),EO=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(e=>({type:"keyword",label:e})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(e=>({type:"constant",label:e}))),Sa=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(e=>({type:"type",label:e})),q=/^[\w-]*/,Pa=e=>{let{state:O,pos:t}=e,a=v(O).resolveInner(t,-1);if(a.name=="PropertyName")return{from:a.from,options:iO(),validFor:q};if(a.name=="ValueName")return{from:a.from,options:EO,validFor:q};if(a.name=="PseudoClassName")return{from:a.from,options:AO,validFor:q};if(a.name=="TagName"){for(let{parent:s}=a;s;s=s.parent)if(s.name=="Block")return{from:a.from,options:iO(),validFor:q};return{from:a.from,options:Sa,validFor:q}}if(!e.explicit)return null;let i=a.resolve(t),r=i.childBefore(t);return r&&r.name==":"&&i.name=="PseudoClassSelector"?{from:t,options:AO,validFor:q}:r&&r.name==":"&&i.name=="Declaration"||i.name=="ArgList"?{from:t,options:EO,validFor:q}:i.name=="Block"?{from:t,options:iO(),validFor:q}:null},M=hO.define({name:"css",parser:fa.configure({props:[uO.add({Declaration:z()}),dO.add({Block:Oe})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function ma(){return new pO(M,M.data.of({autocomplete:Pa}))}const ga=1,DO=294,IO=2,ba=3,C=295,Ta=4,Xa=296,NO=297,Za=299,qa=300,ya=5,_a=6,xa=1,Ua=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],pe=125,Va=123,ka=59,BO=47,Ra=42,wa=43,ja=45,va=36,Wa=96,Ga=92,Ca=new ee({start:!1,shift(e,O){return O==ya||O==_a||O==Za?e:O==qa},strict:!1}),Ya=new b((e,O)=>{let{next:t}=e;(t==pe||t==-1||O.context)&&O.canShift(NO)&&e.acceptToken(NO)},{contextual:!0,fallback:!0}),za=new b((e,O)=>{let{next:t}=e,a;Ua.indexOf(t)>-1||t==BO&&((a=e.peek(1))==BO||a==Ra)||t!=pe&&t!=ka&&t!=-1&&!O.context&&O.canShift(DO)&&e.acceptToken(DO)},{contextual:!0}),Aa=new b((e,O)=>{let{next:t}=e;if((t==wa||t==ja)&&(e.advance(),t==e.next)){e.advance();let a=!O.context&&O.canShift(IO);e.acceptToken(a?IO:ba)}},{contextual:!0}),Ea=new b(e=>{for(let O=!1,t=0;;t++){let{next:a}=e;if(a<0){t&&e.acceptToken(C);break}else if(a==Wa){t?e.acceptToken(C):e.acceptToken(Xa,1);break}else if(a==Va&&O){t==1?e.acceptToken(Ta,1):e.acceptToken(C,-1);break}else if(a==10&&t){e.advance(),e.acceptToken(C);break}else a==Ga&&e.advance();O=a==va,e.advance()}}),Da=new b((e,O)=>{if(!(e.next!=101||!O.dialectEnabled(xa))){e.advance();for(let t=0;t<6;t++){if(e.next!="xtends".charCodeAt(t))return;e.advance()}e.next>=57&&e.next<=65||e.next>=48&&e.next<=90||e.next==95||e.next>=97&&e.next<=122||e.next>160||e.acceptToken(ga)}}),Ia=cO({"get set async static":n.modifier,"for while do if else switch try catch finally return throw break continue default case":n.controlKeyword,"in of await yield void typeof delete instanceof":n.operatorKeyword,"let var const function class extends":n.definitionKeyword,"import export from":n.moduleKeyword,"with debugger as new":n.keyword,TemplateString:n.special(n.string),super:n.atom,BooleanLiteral:n.bool,this:n.self,null:n.null,Star:n.modifier,VariableName:n.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":n.function(n.variableName),VariableDefinition:n.definition(n.variableName),Label:n.labelName,PropertyName:n.propertyName,PrivatePropertyName:n.special(n.propertyName),"CallExpression/MemberExpression/PropertyName":n.function(n.propertyName),"FunctionDeclaration/VariableDefinition":n.function(n.definition(n.variableName)),"ClassDeclaration/VariableDefinition":n.definition(n.className),PropertyDefinition:n.definition(n.propertyName),PrivatePropertyDefinition:n.definition(n.special(n.propertyName)),UpdateOp:n.updateOperator,LineComment:n.lineComment,BlockComment:n.blockComment,Number:n.number,String:n.string,ArithOp:n.arithmeticOperator,LogicOp:n.logicOperator,BitOp:n.bitwiseOperator,CompareOp:n.compareOperator,RegExp:n.regexp,Equals:n.definitionOperator,Arrow:n.function(n.punctuation),": Spread":n.punctuation,"( )":n.paren,"[ ]":n.squareBracket,"{ }":n.brace,"InterpolationStart InterpolationEnd":n.special(n.brace),".":n.derefOperator,", ;":n.separator,"@":n.meta,TypeName:n.typeName,TypeDefinition:n.definition(n.typeName),"type enum interface implements namespace module declare":n.definitionKeyword,"abstract global Privacy readonly override":n.modifier,"is keyof unique infer":n.operatorKeyword,JSXAttributeValue:n.attributeValue,JSXText:n.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":n.angleBracket,"JSXIdentifier JSXNameSpacedName":n.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":n.attributeName,"JSXBuiltin/JSXIdentifier":n.standard(n.tagName)}),Na={__proto__:null,export:18,as:23,from:29,default:32,async:37,function:38,this:50,true:58,false:58,null:68,void:72,typeof:76,super:92,new:126,await:143,yield:145,delete:146,class:156,extends:158,public:213,private:213,protected:213,readonly:215,instanceof:234,satisfies:237,in:238,const:240,import:272,keyof:327,unique:331,infer:337,is:373,abstract:393,implements:395,type:397,let:400,var:402,interface:409,enum:413,namespace:419,module:421,declare:425,global:429,for:450,of:459,while:462,with:466,do:470,if:474,else:476,switch:480,case:486,try:492,catch:496,finally:500,return:504,throw:508,break:512,continue:516,debugger:520},Ba={__proto__:null,async:113,get:115,set:117,public:175,private:175,protected:175,static:177,abstract:179,override:181,readonly:187,accessor:189,new:377},Ja={__proto__:null,"<":133},La=_.deserialize({version:14,states:"$CWO`QdOOO$}QdOOO)WQ(C|O'#ChO)_OWO'#DYO+jQdO'#D_O+zQdO'#DjO$}QdO'#DtO.OQdO'#DzOOQ(C['#ET'#ETO.fQ`O'#EQOOQO'#IW'#IWO.nQ`O'#GgOOQO'#Ee'#EeO.yQ`O'#EdO/OQ`O'#EdO1QQ(C|O'#JQO3nQ(C|O'#JRO4_Q`O'#FSO4dQ!bO'#FkOOQ(C['#F['#F[O4oO#tO'#F[O4}Q&jO'#FrO6bQ`O'#FqOOQ(C['#JR'#JROOQ(CW'#JQ'#JQOOQS'#Jk'#JkO6gQ`O'#H{O6lQ(ChO'#H|OOQS'#Iu'#IuOOQS'#IO'#IOQ`QdOOO$}QdO'#DlO6tQ`O'#GgO6yQ&jO'#CmO7XQ`O'#EcO7dQ`O'#EnO7iQ&jO'#FZO8TQ`O'#GgO8YQ`O'#GkO8eQ`O'#GkO8sQ`O'#GnO8sQ`O'#GoO8sQ`O'#GqO6tQ`O'#GtO9dQ`O'#GwO:uQ`O'#CdO;VQ`O'#HUO;_Q`O'#H[O;_Q`O'#H^O`QdO'#H`O;_Q`O'#HbO;_Q`O'#HeO;dQ`O'#HkO;iQ(CjO'#HqO$}QdO'#HsO;tQ(CjO'#HuOWQpO'#FZO$}QdO'#DZOOOW'#IQ'#IQO>`OWO,59tOOQ(C[,59t,59tO>kQdO'#IRO?OQ`O'#JSOAQQtO'#JSO)jQdO'#JSOAXQ`O,59yOAoQ`O'#EeOA|Q`O'#J`OBXQ`O'#J_OBXQ`O'#J_OBaQ`O,5;ROBfQ`O'#J^OOQ(C[,5:U,5:UOBmQdO,5:UODnQ(C|O,5:`OE_Q`O,5:fOEdQ`O'#J[OF^Q(ChO'#J]O8YQ`O'#J[OFeQ`O'#J[OFmQ`O,5;QOFrQ`O'#J[OOQ(C]'#Ch'#ChO$}QdO'#DzOGfQpO,5:lOOQO'#JX'#JXOOQO-EgOOQS'#Ix'#IxOOQS,5>h,5>hOOQS-E;|-E;|O!.xQ(C|O,5:WOOQ(CX'#Cp'#CpO!/lQ&kO,5=ROOQO'#Cf'#CfO!/}Q(ChO'#IyO6bQ`O'#IyO;dQ`O,59XO!0`Q!bO,59XO!0hQ&jO,59XO6yQ&jO,59XO!0sQ`O,5;OO!0{Q`O'#HTO!1ZQ`O'#JoO$}QdO,5;sO!1cQ,UO,5;uO!1hQ`O,5=nO!1mQ`O,5=nO!1rQ`O,5=nO6lQ(ChO,5=nO!2QQ`O'#EgO!2wQ,UO'#EhOOQ(CW'#J^'#J^O!3OQ(ChO'#JlO6lQ(ChO,5=VO8sQ`O,5=]OOQP'#Cs'#CsO!3ZQ!bO,5=YO!3cQ!cO,5=ZO!3nQ`O,5=]O!3sQpO,5=`O;dQ`O'#GyO6tQ`O'#G{O!3{Q`O'#G{O6yQ&jO'#HOO!4QQ`O'#HOOOQS,5=c,5=cO!4VQ`O'#HPO!4_Q`O'#CmO!4dQ`O,59OO!4nQ`O,59OO!6sQdO,59OOOQS,59O,59OO!7QQ(ChO,59OO$}QdO,59OO!7]QdO'#HWOOQS'#HX'#HXOOQS'#HY'#HYO`QdO,5=pO!7mQ`O,5=pO`QdO,5=vO`QdO,5=xO!7rQ`O,5=zO`QdO,5=|O!7wQ`O,5>PO!7|QdO,5>VOOQS,5>],5>]O$}QdO,5>]O6lQ(ChO,5>_OOQS,5>a,5>aO!aOOQS,5>c,5>cO!cOOQS,5>e,5>eO!mO)jQdO,5>mOOQO,5>s,5>sO!CUQdO'#IROOQO-ExOOQ(CW-E<[-E<[O#5]Q(C}O1G0tOOQ(C[1G0t1G0tO#7hQ(C|O1G1YO#8[Q!bO,5;}O#8dQ!bO,5OQ,UO'#GXOOQ(C],5=Q,5=QOKhQ&jO,5?hOKhQ&jO,5?hO#>TQ`O'#IcO#>`Q`O,5?gO#>hQ`O,59^O#?XQ&kO,59mOOQ(C],59m,59mO#?zQ&kO,5<`O#@mQ&kO,5mO$)XQ`O1G5YO$)aQ`O1G5eO$)iQtO1G5fO8YQ`O,5>sO$)sQ`O1G5bO$)sQ`O1G5bO8YQ`O1G5bO$){Q(C|O1G5cO$}QdO1G5cO$*]Q(ChO1G5cO$*nQ`O,5>uO8YQ`O,5>uOOQO,5>u,5>uO$+SQ`O,5>uOOQO-Ez,5>zO$8rQ`O,5>zOOQ(C]1G2Z1G2ZP$8wQ`O'#I`POQ(C]-E<^-E<^O$9hQ&kO1G2gO$:ZQ&kO1G2iO$:eQqO1G2kOOQ(C]1G2S1G2SO$:lQ`O'#I_O$:zQ`O,5@SO$:zQ`O,5@SO$;SQ`O,5@SO$;_Q`O,5@SOOQO1G2U1G2UO$;mQ&kO1G2TOKhQ&jO1G2TO$;}QMhO'#IaO$<_Q`O,5@TOJRQ&jO,5@TO$|,5>|OOQO-E<`-E<`OOQ(C]1G2]1G2]O!)dQ,UO,5},5>}OOQO-EkQqO'#JjO$(iQ`O7+(XO$>uQ`O7+(XO$>}QqO7+(XO$?XQ(CyO'#ChO$?lQ(CyO,5ROOQS,5>R,5>RO$}QdO'#HhO$EoQ`O'#HjOOQS,5>X,5>XO8YQ`O,5>XOOQS,5>Z,5>ZOOQS7+)]7+)]OOQS7+)c7+)cOOQS7+)g7+)gOOQS7+)i7+)iO$EtQ!bO1G5[O$FYQ!LUO1G0oO$FdQ`O1G0oOOQO1G/k1G/kO$FoQ!LUO1G/kO$FyQ`O,5?pO;dQ`O1G/kOMqQdO'#DeOOQO,5>n,5>nOOQO-Et,5>tOOQO-EoOOQO-EpO$}QdO,5>pOOQO-ExOOOO7+'_7+'_OOOW1G/S1G/SOOQ(C]1G4f1G4fOKhQ&jO7+(VO%7}Q`O,5>yO6tQ`O,5>yOOQO-E<]-E<]O%8]Q`O1G5nO%8]Q`O1G5nO%8eQ`O1G5nO%8pQ&kO7+'oO%9QQqO,5>{O%9[Q`O,5>{OJRQ&jO,5>{OOQO-E<_-E<_O%9aQqO1G5oO%9kQ`O1G5oOOQ(CW1G2_1G2_O$VQdO'#JUO%>^Q,UO'#E[O%>tQ(ChO'#E[O$$sQ(DjO'#E[O$%hQ,UO'#G}OOQO'#Ih'#IhO%?YQ,UO,5=hOOQS,5=h,5=hO%?aQ,UO'#E[O%?rQ,UO'#E[O%@YQ,UO'#E[O%@vQ,UO'#G}O%AXQ`O7+(mO%A^Q`O7+(mO%AfQqO7+(mOOQS7+(m7+(mOJRQ&jO7+(mO$}QdO7+(mOJRQ&jO7+(mO%ApQaO7+(mOOQS7+(p7+(pO6lQ(ChO7+(pO#=PQ`O7+(pO6bQ`O7+(pO!0`Q!bO7+(pO%BOQ`O,5?TOOQO-ESOOQS,5>U,5>UO%CYQ`O1G3sO8YQ`O7+&ZOMqQdO7+&ZOOQ(CW1G5[1G5[OOQO7+%V7+%VO%C_Q!LUO1G5fO;dQ`O7+%VO;dQ`O1G0VOOQO1G0b1G0bO$}QdO1G0bO%CiQ(ChO1G0bO%CtQ(ChO1G0bO!0`Q!bO1G0VO$%_Q,UO1G0VO%DSQ,UO1G0VO%DaQ(DjO1G0bO%D{Q,UO1G0VO$%_Q,UO1G0bO%E]Q,UO1G0bO%EvQ(ChO1G0bOOQO1G0V1G0VO%F[Q(C|O1G0bOOQ(C[<VQdO,5iQ!LVO7+'qO&@_Q&kOG26wOOQO<wAN>wO;dQ`OAN>wO$}QdOAN?SO!0`Q!bOAN>wO&ATQ(ChOAN?SO$%_Q,UOAN>wO&A`Q(ChOAN?SOOQS!$(!P!$(!PO$(iQ`O!$(!PO&AnQ(C}OG26wOOQ(CWG26lG26lOOQO<SO!T+rO!U'wX~O!U+tO~O!_+kO#T+jO!T#]X!U#]X~O!T+uO!U(TX~O!U+wO~O]&VOl&VO{+nO'k$vO's)TO~O!Z+xO![+xO~P!AQO_+}O!U,PO!Y,QO!Z+|O![+|O!u;WO!y,UO!z,SO!{,TO!|,RO#P,VO#Q,VO'|+zO~P!AQOP,[O!V&cO!q,ZO~Oo,aO~O!Q&ua!T&ua~P!-RO!S,eO!Q&uX!T&uX~P$}O!T&rO!Q'va~O!Q'va~P?WO!T&yO!Q(Ra~O{%WO!S,iO!V%XO'j$tO!Q&{X!T&{X~O!T'WO!e(Oa~O{%WO!V%XO#_,lO'j$tO~O#T,nO!T(Pa!e(Pa_(Pa'e(Pa~O!_#UO~P!DvO{%WO!S,qO!V%XO!uXO#^,sO#_,qO'j$tO!T&}X!e&}X~Oy,wO!f#XO~OP,{O!V&cO!q,zO%],yO'n$bO~O_#Wi!T#Wi'e#Wi'a#Wi!Q#Wi!e#Wio#Wi!V#Wi%]#Wi!_#Wi~P!-ROP=mOx(mO{(nO(U(pO(V(rO~O#`#Sa!T#Sa!e#Sa#T#Sa!V#Sa_#Sa'e#Sa!Q#Sa~P!G[O!d#WOP'qXx'qX{'qX(U'qX(V'qXQ'qXZ'qXk'qXy'qX!T'qX!c'qX!f'qX!l'qX#c'qX#d'qX#e'qX#f'qX#g'qX#h'qX#i'qX#j'qX#k'qX#m'qX#o'qX#q'qX#r'qX'r'qX'}'qX~O#`'qX_'qX'e'qX!e'qX!Q'qX'a'qX!V'qX#T'qXo'qX%]'qX!_'qX~P!HZO!T-UOe'yX~P!&VOe-WO~O!T-XO!e'zX~P!-RO!e-[O~O!Q-^O~OQ#lOx#YOy#ZO{#[O!d#WO!f#XO!l#lO'rROZ#bi_#bik#bi!T#bi!c#bi#d#bi#e#bi#f#bi#g#bi#h#bi#i#bi#j#bi#k#bi#m#bi#o#bi#q#bi#r#bi'e#bi'}#bi(U#bi(V#bi'a#bi!Q#bi!e#bio#bi!V#bi%]#bi!_#bi~O#c#bi~P!KrO#c#_O~P!KrOQ#lOx#YOy#ZO{#[O!d#WO!f#XO!l#lO#c#_O#d#`O#e#`O#f#`O'rROZ#bi_#bi!T#bi!c#bi#g#bi#h#bi#i#bi#j#bi#k#bi#m#bi#o#bi#q#bi#r#bi'e#bi'}#bi(U#bi(V#bi'a#bi!Q#bi!e#bio#bi!V#bi%]#bi!_#bi~Ok#bi~P!NdOk#aO~P!NdOQ#lOk#aOx#YOy#ZO{#[O!d#WO!f#XO!l#lO#c#_O#d#`O#e#`O#f#`O#g#bO'rRO_#bi!T#bi#m#bi#o#bi#q#bi#r#bi'e#bi'}#bi(U#bi(V#bi'a#bi!Q#bi!e#bio#bi!V#bi%]#bi!_#bi~OZ#bi!c#bi#h#bi#i#bi#j#bi#k#bi~P##UOZ#sO!c#cO#h#cO#i#cO#j#rO#k#cO~P##UOQ#lOZ#sOk#aOx#YOy#ZO{#[O!c#cO!d#WO!f#XO!l#lO#c#_O#d#`O#e#`O#f#`O#g#bO#h#cO#i#cO#j#rO#k#cO#m#dO'rRO_#bi!T#bi#o#bi#q#bi#r#bi'e#bi'}#bi(V#bi'a#bi!Q#bi!e#bio#bi!V#bi%]#bi!_#bi~O(U#bi~P#&VO(U#]O~P#&VOQ#lOZ#sOk#aOx#YOy#ZO{#[O!c#cO!d#WO!f#XO!l#lO#c#_O#d#`O#e#`O#f#`O#g#bO#h#cO#i#cO#j#rO#k#cO#m#dO#o#fO'rRO(U#]O_#bi!T#bi#q#bi#r#bi'e#bi'}#bi'a#bi!Q#bi!e#bio#bi!V#bi%]#bi!_#bi~O(V#bi~P#(wO(V#^O~P#(wOQ#lOZ#sOk#aOx#YOy#ZO{#[O!c#cO!d#WO!f#XO!l#lO#c#_O#d#`O#e#`O#f#`O#g#bO#h#cO#i#cO#j#rO#k#cO#m#dO#o#fO#q#hO'rRO(U#]O(V#^O~O_#bi!T#bi#r#bi'e#bi'}#bi'a#bi!Q#bi!e#bio#bi!V#bi%]#bi!_#bi~P#+iOQ[XZ[Xk[Xx[Xy[X{[X!c[X!d[X!f[X!l[X#T[X#`dX#c[X#d[X#e[X#f[X#g[X#h[X#i[X#j[X#k[X#m[X#o[X#q[X#r[X#w[X'r[X'}[X(U[X(V[X!T[X!U[X~O#u[X~P#.SOQ#lOZ;mOk;aOx#YOy#ZO{#[O!c;cO!d#WO!f#XO!l#lO#c;_O#d;`O#e;`O#f;`O#g;bO#h;cO#i;cO#j;lO#k;cO#m;dO#o;fO#q;hO#r;iO'rRO'}#jO(U#]O(V#^O~O#u-`O~P#0aOQ'uXZ'uXk'uXx'uXy'uX{'uX!c'uX!d'uX!f'uX!l'uX#c'uX#d'uX#e'uX#f'uX#g'uX#h'uX#i'uX#j'uX#m'uX#o'uX#q'uX#r'uX'r'uX'}'uX(U'uX(V'uX!T'uX~O#T;nO#w;nO#k'uX#u'uX!U'uX~P#2_O_'Qa!T'Qa'e'Qa'a'Qa!e'Qao'Qa!Q'Qa!V'Qa%]'Qa!_'Qa~P!-ROQ#biZ#bi_#bik#biy#bi!T#bi!c#bi!d#bi!f#bi!l#bi#c#bi#d#bi#e#bi#f#bi#g#bi#h#bi#i#bi#j#bi#k#bi#m#bi#o#bi#q#bi#r#bi'e#bi'r#bi'}#bi'a#bi!Q#bi!e#bio#bi!V#bi%]#bi!_#bi~P!G[O_#vi!T#vi'e#vi'a#vi!Q#vi!e#vio#vi!V#vi%]#vi!_#vi~P!-RO$S-cO$U-cO~O$S-dO$U-dO~O!_(VO#T-eO!V$YX$P$YX$S$YX$U$YX$]$YX~O!S-fO~O!V(YO$P-hO$S(XO$U(XO$]-iO~O!T;jO!U'tX~P#0aO!U-jO~O$]-lO~OS(hO'c(iO'd-oO~O]-rOl-rO!Q-sO~O!TdX!_dX!edX!e$oX'}dX~P!$|O!e-yO~P!G[O!T-zO!_#UO'}'SO!e([X~O!e.PO~O!S(yO'j$tO!e([P~O#`.RO~O!Q$oX!T$oX!_$vX~P!$|O!T.SO!Q(]X~P!G[O!_.UO~O!Q.WO~Ok.[O!_#UO!f$mO'n$bO'}'SO~O'j.^O~O!_)yO~O_$pO!T.bO'e$pO~O!U.dO~P!(wO!Z.eO![.eO'k$vO's)TO~O{.gO's)TO~O#P.hO~O'j%^Oe'VX!T'VX~O!T)dOe'oa~Oe.mO~Ox.nOy.nO{.oOPua(Uua(Vua!Tua#Tua~Oeua#uua~P#>mOx(mO{(nOP$ha(U$ha(V$ha!T$ha#T$ha~Oe$ha#u$ha~P#?cOx(mO{(nOP$ja(U$ja(V$ja!T$ja#T$ja~Oe$ja#u$ja~P#@UO].pO~O#`.qO~Oe$xa!T$xa#T$xa#u$xa~P!&VO#`.tO~OP,{O!V&cO!q,zO%],yO~O]$SOk$TOl$SOm$SOr$dOt$eOv;oO{$[O!V$]O!a=`O!f$XO#_;xO#|$iO$i;rO$k;uO$n$jO'n$bO'r$UO~Oi.{O'j.zO~P#AvO!_)yO!V'ma_'ma!T'ma'e'ma~O#`/RO~OZ[X!TdX!UdX~O!T/SO!U(dX~O!U/UO~OZ/VO~O]/XO'j*RO~O!V%OO'j$tO^'_X!T'_X~O!T*WO^(ca~O!e/[O~P!-RO]/^O~OZ/_O~O^/`O~O!T*dO_(`a'e(`a~O#T/fO~OP/iO!V$]O~O's'lO!U(aP~OP/sO!V/oO!q/rO%]/qO'n$bO~OZ/}O!T/{O!U(bX~O!U0OO~O^0QO_$pO'e$pO~O]0RO~O]0SO'j!|O~O#k0TO%}0UO~P1nO#T#tO#k0TO%}0UO~O_0VO~P$}O_0XO~O&W0]OQ&UiR&UiX&Ui]&Ui_&Uib&Uic&Uii&Uik&Uil&Uim&Uir&Uit&Uiv&Ui{&Ui!O&Ui!P&Ui!V&Ui!a&Ui!f&Ui!i&Ui!j&Ui!k&Ui!l&Ui!m&Ui!p&Ui!u&Ui#l&Ui#|&Ui$Q&Ui%[&Ui%^&Ui%`&Ui%a&Ui%d&Ui%f&Ui%i&Ui%j&Ui%l&Ui%y&Ui&P&Ui&R&Ui&T&Ui&V&Ui&Y&Ui&`&Ui&f&Ui&h&Ui&j&Ui&l&Ui&n&Ui'a&Ui'j&Ui'r&Ui'|&Ui(Z&Ui!U&Ui`&Ui&]&Ui~O`0cO!U0aO&]0bO~P`O!VTO!f0eO~O&d+aOQ&_iR&_iX&_i]&_i_&_ib&_ic&_ii&_ik&_il&_im&_ir&_it&_iv&_i{&_i!O&_i!P&_i!V&_i!a&_i!f&_i!i&_i!j&_i!k&_i!l&_i!m&_i!p&_i!u&_i#l&_i#|&_i$Q&_i%[&_i%^&_i%`&_i%a&_i%d&_i%f&_i%i&_i%j&_i%l&_i%y&_i&P&_i&R&_i&T&_i&V&_i&Y&_i&`&_i&f&_i&h&_i&j&_i&l&_i&n&_i'a&_i'j&_i'r&_i'|&_i(Z&_i!U&_i&W&_i`&_i&]&_i~O!Q0kO~O!T!Xa!U!Xa~P#0aO!S0rO!Y&bO!Z&ZO![&ZO!T&vX!U&vX~P!AQO!T+rO!U'wa~O!T&|X!U&|X~P!2fO!T+uO!U(Ta~O!Y0{O!Z0zO![0zO!u;WO!y1OO!z0}O!{0}O!|0|O#P1PO#Q1PO'|+zO~P!AQO_$pO!_#UO!f$mO!l1UO#T1SO'e$pO'n$bO'}'SO~O]&VOl&VO{+nO's)TO'|+zO~O_+}O!U1XO!Y,QO!Z+|O![+|O!u;WO!y,UO!z,SO!{,TO!|,RO#P,VO#Q,VO'|+zO~P!AQO!Z0zO![0zO'|+zO~P!AQO!Y0{O!Z0zO![0zO'|+zO~P!AQO!VTO!Y0{O!Z0zO![0zO!|0|O#P1PO#Q1PO'|+zO~P!AQO!Y0{O!Z0zO![0zO!z0}O!{0}O!|0|O#P1PO#Q1PO'|+zO~P!AQO!V&cO~O!V&cO~P!G[O!T#pOo$ga~O!Q&ui!T&ui~P!-RO!T&rO!Q'vi~O!T&yO!Q(Ri~O!Q(Si!T(Si~P!-RO!T'WO!e(Oi~O!T(Pi!e(Pi_(Pi'e(Pi~P!-RO#T1eO!T(Pi!e(Pi_(Pi'e(Pi~O{%WO!V%XO!uXO#^1hO#_1gO'j$tO~O{%WO!V%XO#_1gO'j$tO~OP1pO!V&cO!q1oO%]1nO~OP1pO!V&cO!q1oO%]1nO'n$bO~O#`uaQuaZua_uakua!cua!dua!fua!lua#cua#dua#eua#fua#gua#hua#iua#jua#kua#mua#oua#qua#rua'eua'rua'}ua!eua!Qua'aua!Vuaoua%]ua!_ua~P#>mO#`$haQ$haZ$ha_$hak$hay$ha!c$ha!d$ha!f$ha!l$ha#c$ha#d$ha#e$ha#f$ha#g$ha#h$ha#i$ha#j$ha#k$ha#m$ha#o$ha#q$ha#r$ha'e$ha'r$ha'}$ha!e$ha!Q$ha'a$ha!V$hao$ha%]$ha!_$ha~P#?cO#`$jaQ$jaZ$ja_$jak$jay$ja!c$ja!d$ja!f$ja!l$ja#c$ja#d$ja#e$ja#f$ja#g$ja#h$ja#i$ja#j$ja#k$ja#m$ja#o$ja#q$ja#r$ja'e$ja'r$ja'}$ja!e$ja!Q$ja'a$ja!V$jao$ja%]$ja!_$ja~P#@UO#`$xaQ$xaZ$xa_$xak$xay$xa!T$xa!c$xa!d$xa!f$xa!l$xa#c$xa#d$xa#e$xa#f$xa#g$xa#h$xa#i$xa#j$xa#k$xa#m$xa#o$xa#q$xa#r$xa'e$xa'r$xa'}$xa!e$xa!Q$xa'a$xa!V$xa#T$xao$xa%]$xa!_$xa~P!G[O_#Wq!T#Wq'e#Wq'a#Wq!Q#Wq!e#Wqo#Wq!V#Wq%]#Wq!_#Wq~P!-ROe&wX!T&wX~PKhO!T-UOe'ya~O!S1xO!T&xX!e&xX~P$}O!T-XO!e'za~O!T-XO!e'za~P!-RO!Q1{O~O#u!ha!U!ha~PBtO#u!`a!T!`a!U!`a~P#0aO!V2^O$QbO$Z2_O~O!U2cO~Oo2dO~P!G[O_$dq!T$dq'e$dq'a$dq!Q$dq!e$dqo$dq!V$dq%]$dq!_$dq~P!-RO!Q2eO~O]-rOl-rO~Ox(mO{(nO(V(rOP%Ti(U%Ti!T%Ti#T%Ti~Oe%Ti#u%Ti~P$9POx(mO{(nOP%Vi(U%Vi(V%Vi!T%Vi#T%Vi~Oe%Vi#u%Vi~P$9rO'}#jO~P!G[O!S2hO'j$tO!T'RX!e'RX~O!T-zO!e([a~O!T-zO!_#UO!e([a~O!T-zO!_#UO'}'SO!e([a~Oe$qi!T$qi#T$qi#u$qi~P!&VO!S2pO'j)OO!Q'TX!T'TX~P!&tO!T.SO!Q(]a~O!T.SO!Q(]a~P!G[O!_#UO~O!_#UO#k2xO~Ok2{O!_#UO'}'SO~Oe'pi!T'pi~P!&VO#T3OOe'pi!T'pi~P!&VO!e3RO~O_$eq!T$eq'e$eq'a$eq!Q$eq!e$eqo$eq!V$eq%]$eq!_$eq~P!-RO!T3VO!V(^X~P!G[O!V&cO%]1nO~O!V&cO%]1nO~P!G[O!V$oX%Q[X_$oX!T$oX'e$oX~P!$|O%Q3XOPhXxhX{hX!VhX(UhX(VhX_hX!ThX'ehX~O%Q3XO~O]3_O%^3`O'j*RO!T'^X!U'^X~O!T/SO!U(da~OZ3dO~O^3eO~O]3hO~O!Q3iO~O_$pO'e$pO~P!G[O!V$]O~P!G[O!T3nO#T3pO!U(aX~O!U3qO~O]&VOl&VO{3sO!Y4OO!Z3wO![3wO!u;WO!y3}O!z3|O!{3|O#P3{O#Q,VO'k$vO's)TO'|+zO~O!U3zO~P$BTOP4VO!V/oO!q4UO%]4TO~OP4VO!V/oO!q4UO%]4TO'n$bO~O'j!|O!T']X!U']X~O!T/{O!U(ba~O]4aO's4`O~O]4bO~O^4dO~O!e4gO~P$}O_4iO~O_4iO~P$}O#k4kO%}4lO~PExO`0cO!U4pO&]0bO~P`O!_4rO~O!_4tO!T'xi!U'xi!_'xi!f'xi'n'xi~O!T#]i!U#]i~P#0aO#T4uO!T#]i!U#]i~O!T!Xi!U!Xi~P#0aO!Q4vO~O]!tal!ta!Y!ta!Z!ta![!ta!y!ta!z!ta!{!ta!|!ta#P!ta#Q!ta'k!ta's!ta'|!ta~PGQO_$pO!_#UO!f$mO!l5OO#T4|O'e$pO'n$bO'}'SO~O!Z5QO![5QO'|+zO~P!AQO!Y5RO!Z5QO![5QO'|+zO~P!AQO!Y5RO!Z5QO![5QO!|5TO#P5UO#Q5UO'|+zO~P!AQO!Y5RO!Z5QO![5QO!z5VO!{5VO!|5TO#P5UO#Q5UO'|+zO~P!AQO_$pO#T4|O'e$pO~O_$pO!_#UO#T4|O'e$pO~O_$pO!_#UO!l5OO#T4|O'e$pO'}'SO~O!T'WO!e(Oq~O!T(Pq!e(Pq_(Pq'e(Pq~P!-RO{%WO!V%XO#_5aO'j$tO~O!V&cO%]5cO~O!V&cO%]5cO~P!G[OP5hO!V&cO!q5gO%]5cO~O#`%TiQ%TiZ%Ti_%Tik%Tiy%Ti!c%Ti!d%Ti!f%Ti!l%Ti#c%Ti#d%Ti#e%Ti#f%Ti#g%Ti#h%Ti#i%Ti#j%Ti#k%Ti#m%Ti#o%Ti#q%Ti#r%Ti'e%Ti'r%Ti'}%Ti!e%Ti!Q%Ti'a%Ti!V%Tio%Ti%]%Ti!_%Ti~P$9PO#`%ViQ%ViZ%Vi_%Vik%Viy%Vi!c%Vi!d%Vi!f%Vi!l%Vi#c%Vi#d%Vi#e%Vi#f%Vi#g%Vi#h%Vi#i%Vi#j%Vi#k%Vi#m%Vi#o%Vi#q%Vi#r%Vi'e%Vi'r%Vi'}%Vi!e%Vi!Q%Vi'a%Vi!V%Vio%Vi%]%Vi!_%Vi~P$9rO#`$qiQ$qiZ$qi_$qik$qiy$qi!T$qi!c$qi!d$qi!f$qi!l$qi#c$qi#d$qi#e$qi#f$qi#g$qi#h$qi#i$qi#j$qi#k$qi#m$qi#o$qi#q$qi#r$qi'e$qi'r$qi'}$qi!e$qi!Q$qi'a$qi!V$qi#T$qio$qi%]$qi!_$qi~P!G[Oe&wa!T&wa~P!&VO!T&xa!e&xa~P!-RO!T-XO!e'zi~O#u#Wi!T#Wi!U#Wi~P#0aOQ#lOx#YOy#ZO{#[O!d#WO!f#XO!l#lO'rROZ#bik#bi!c#bi#d#bi#e#bi#f#bi#g#bi#h#bi#i#bi#j#bi#k#bi#m#bi#o#bi#q#bi#r#bi#u#bi'}#bi(U#bi(V#bi!T#bi!U#bi~O#c#bi~P%&nO#c;_O~P%&nOQ#lOx#YOy#ZO{#[O!d#WO!f#XO!l#lO#c;_O#d;`O#e;`O#f;`O'rROZ#bi!c#bi#g#bi#h#bi#i#bi#j#bi#k#bi#m#bi#o#bi#q#bi#r#bi#u#bi'}#bi(U#bi(V#bi!T#bi!U#bi~Ok#bi~P%(yOk;aO~P%(yOQ#lOk;aOx#YOy#ZO{#[O!d#WO!f#XO!l#lO#c;_O#d;`O#e;`O#f;`O#g;bO'rRO#m#bi#o#bi#q#bi#r#bi#u#bi'}#bi(U#bi(V#bi!T#bi!U#bi~OZ#bi!c#bi#h#bi#i#bi#j#bi#k#bi~P%+UOZ;mO!c;cO#h;cO#i;cO#j;lO#k;cO~P%+UOQ#lOZ;mOk;aOx#YOy#ZO{#[O!c;cO!d#WO!f#XO!l#lO#c;_O#d;`O#e;`O#f;`O#g;bO#h;cO#i;cO#j;lO#k;cO#m;dO'rRO#o#bi#q#bi#r#bi#u#bi'}#bi(V#bi!T#bi!U#bi~O(U#bi~P%-pO(U#]O~P%-pOQ#lOZ;mOk;aOx#YOy#ZO{#[O!c;cO!d#WO!f#XO!l#lO#c;_O#d;`O#e;`O#f;`O#g;bO#h;cO#i;cO#j;lO#k;cO#m;dO#o;fO'rRO(U#]O#q#bi#r#bi#u#bi'}#bi!T#bi!U#bi~O(V#bi~P%/{O(V#^O~P%/{OQ#lOZ;mOk;aOx#YOy#ZO{#[O!c;cO!d#WO!f#XO!l#lO#c;_O#d;`O#e;`O#f;`O#g;bO#h;cO#i;cO#j;lO#k;cO#m;dO#o;fO#q;hO'rRO(U#]O(V#^O~O#r#bi#u#bi'}#bi!T#bi!U#bi~P%2WO_#sy!T#sy'e#sy'a#sy!Q#sy!e#syo#sy!V#sy%]#sy!_#sy~P!-ROP=oOx(mO{(nO(U(pO(V(rO~OQ#biZ#bik#biy#bi!c#bi!d#bi!f#bi!l#bi#c#bi#d#bi#e#bi#f#bi#g#bi#h#bi#i#bi#j#bi#k#bi#m#bi#o#bi#q#bi#r#bi#u#bi'r#bi'}#bi!T#bi!U#bi~P%5OO#u'qX!U'qX~P!HZO#u#vi!T#vi!U#vi~P#0aO!U5tO~O!T'Qa!U'Qa~P#0aO!_#UO'}'SO!T'Ra!e'Ra~O!T-zO!e([i~O!T-zO!_#UO!e([i~Oe$qq!T$qq#T$qq#u$qq~P!&VO!Q'Ta!T'Ta~P!G[O!_5{O~O!T.SO!Q(]i~P!G[O!T.SO!Q(]i~O!Q6PO~O!_#UO#k6UO~Ok6VO!_#UO'}'SO~O!Q6XO~Oe$sq!T$sq#T$sq#u$sq~P!&VO_$ey!T$ey'e$ey'a$ey!Q$ey!e$eyo$ey!V$ey%]$ey!_$ey~P!-RO!T3VO!V(^a~O_#Wy!T#Wy'e#Wy'a#Wy!Q#Wy!e#Wyo#Wy!V#Wy%]#Wy!_#Wy~P!-ROZ6^O~O]6`O'j*RO~O!T/SO!U(di~O]6cO~O^6dO~O!_4tO~O's'lO!T'YX!U'YX~O!T3nO!U(aa~O!f$mO'n$bO_'xX!_'xX!l'xX#T'xX'e'xX'}'xX~O'j6mO~P,RO!u;WO!y6oO!z6nO!{6nO#P1PO#Q1PO~P$%_O_$pO!_#UO!l1UO#T1SO'e$pO'}'SO~O!U6rO~P$BTO]&VOl&VO{6sO's)TO'|+zO~O!Y6wO!Z6vO![6vO#P1PO#Q1PO'|+zO~P!AQO!Y6wO!Z6vO![6vO!z6xO!{6xO#P1PO#Q1PO'|+zO~P!AQO!Z6vO![6vO'k$vO's)TO'|+zO~O!V/oO~O!V/oO%]6zO~O!V/oO%]6zO~P!G[OP7PO!V/oO!q7OO%]6zO~OZ7UO!T']a!U']a~O!T/{O!U(bi~O]7XO~O!e7YO~O!e7ZO~O!e7[O~O!e7[O~P$}O_7^O~O!_7aO~O!e7bO~O!T(Si!U(Si~P#0aO_$pO#T7iO'e$pO~O_$pO!_#UO#T7iO'e$pO~O!Z7mO![7mO'|+zO~P!AQO_$pO!_#UO!f$mO!l7nO#T7iO'e$pO'n$bO'}'SO~O!Y7oO!Z7mO![7mO'|+zO~P!AQO!Y7oO!Z7mO![7mO!|7rO#P7sO#Q7sO'|+zO~P!AQO_$pO!_#UO!l7nO#T7iO'e$pO'}'SO~O_$pO'e$pO~P!-RO!T'WO!e(Oy~O!T(Py!e(Py_(Py'e(Py~P!-RO!V&cO%]7xO~O!V&cO%]7xO~P!G[O#`$qqQ$qqZ$qq_$qqk$qqy$qq!T$qq!c$qq!d$qq!f$qq!l$qq#c$qq#d$qq#e$qq#f$qq#g$qq#h$qq#i$qq#j$qq#k$qq#m$qq#o$qq#q$qq#r$qq'e$qq'r$qq'}$qq!e$qq!Q$qq'a$qq!V$qq#T$qqo$qq%]$qq!_$qq~P!G[O#`$sqQ$sqZ$sq_$sqk$sqy$sq!T$sq!c$sq!d$sq!f$sq!l$sq#c$sq#d$sq#e$sq#f$sq#g$sq#h$sq#i$sq#j$sq#k$sq#m$sq#o$sq#q$sq#r$sq'e$sq'r$sq'}$sq!e$sq!Q$sq'a$sq!V$sq#T$sqo$sq%]$sq!_$sq~P!G[O!T&xi!e&xi~P!-RO#u#Wq!T#Wq!U#Wq~P#0aOx.nOy.nO{.oOPua(Uua(Vua!Uua~OQuaZuakua!cua!dua!fua!lua#cua#dua#eua#fua#gua#hua#iua#jua#kua#mua#oua#qua#rua#uua'rua'}ua!Tua~P%LmOx(mO{(nOP$ha(U$ha(V$ha!U$ha~OQ$haZ$hak$hay$ha!c$ha!d$ha!f$ha!l$ha#c$ha#d$ha#e$ha#f$ha#g$ha#h$ha#i$ha#j$ha#k$ha#m$ha#o$ha#q$ha#r$ha#u$ha'r$ha'}$ha!T$ha~P%NtOx(mO{(nOP$ja(U$ja(V$ja!U$ja~OQ$jaZ$jak$jay$ja!c$ja!d$ja!f$ja!l$ja#c$ja#d$ja#e$ja#f$ja#g$ja#h$ja#i$ja#j$ja#k$ja#m$ja#o$ja#q$ja#r$ja#u$ja'r$ja'}$ja!T$ja~P&!{OQ$xaZ$xak$xay$xa!c$xa!d$xa!f$xa!l$xa#c$xa#d$xa#e$xa#f$xa#g$xa#h$xa#i$xa#j$xa#k$xa#m$xa#o$xa#q$xa#r$xa#u$xa'r$xa'}$xa!T$xa!U$xa~P%5OO#u$dq!T$dq!U$dq~P#0aO#u$eq!T$eq!U$eq~P#0aO!U8RO~O#u8SO~P!&VO!_#UO!T'Ri!e'Ri~O!_#UO'}'SO!T'Ri!e'Ri~O!T-zO!e([q~O!Q'Ti!T'Ti~P!G[O!T.SO!Q(]q~O!Q8YO~P!G[O!Q8YO~Oe'py!T'py~P!&VO!T'Wa!V'Wa~P!G[O!V%Pq_%Pq!T%Pq'e%Pq~P!G[OZ8_O~O!T/SO!U(dq~O]8bO~O#T8cO!T'Ya!U'Ya~O!T3nO!U(ai~P#0aOQ[XZ[Xk[Xx[Xy[X{[X!Q[X!T[X!c[X!d[X!f[X!l[X#T[X#`dX#c[X#d[X#e[X#f[X#g[X#h[X#i[X#j[X#k[X#m[X#o[X#q[X#r[X#w[X'r[X'}[X(U[X(V[X~O!_$}X#k$}X~P&*pO#P5UO#Q5UO~P$%_O!z8gO!{8gO#P5UO#Q5UO~P$%_O!Z8jO![8jO'k$vO's)TO'|+zO~O!Y8mO!Z8jO![8jO#P5UO#Q5UO'|+zO~P!AQO!V/oO%]8pO~O!V/oO%]8pO~P!G[O]8wO's8vO~O!T/{O!U(bq~O!e8yO~O!e8yO~P$}O!e8{O~O!e8|O~O#T9OO!T#]y!U#]y~O!T#]y!U#]y~P#0aO_$pO#T9RO'e$pO~O_$pO!_#UO#T9RO'e$pO~O!Z9WO![9WO'|+zO~P!AQO_$pO!_#UO!l9XO#T9RO'e$pO'}'SO~O!f$mO'n$bO~P&0|O!Y9YO!Z9WO![9WO'|+zO~P!AQO!V&cO%]9^O~O!V&cO%]9^O~P!G[O#u#sy!T#sy!U#sy~P#0aOQ$qiZ$qik$qiy$qi!c$qi!d$qi!f$qi!l$qi#c$qi#d$qi#e$qi#f$qi#g$qi#h$qi#i$qi#j$qi#k$qi#m$qi#o$qi#q$qi#r$qi#u$qi'r$qi'}$qi!T$qi!U$qi~P%5OOx(mO{(nO(V(rOP%Ti(U%Ti!U%Ti~OQ%TiZ%Tik%Tiy%Ti!c%Ti!d%Ti!f%Ti!l%Ti#c%Ti#d%Ti#e%Ti#f%Ti#g%Ti#h%Ti#i%Ti#j%Ti#k%Ti#m%Ti#o%Ti#q%Ti#r%Ti#u%Ti'r%Ti'}%Ti!T%Ti~P&4cOx(mO{(nOP%Vi(U%Vi(V%Vi!U%Vi~OQ%ViZ%Vik%Viy%Vi!c%Vi!d%Vi!f%Vi!l%Vi#c%Vi#d%Vi#e%Vi#f%Vi#g%Vi#h%Vi#i%Vi#j%Vi#k%Vi#m%Vi#o%Vi#q%Vi#r%Vi#u%Vi'r%Vi'}%Vi!T%Vi~P&6jO#u$ey!T$ey!U$ey~P#0aO#u#Wy!T#Wy!U#Wy~P#0aO!_#UO!T'Rq!e'Rq~O!T-zO!e([y~O!Q'Tq!T'Tq~P!G[O!Q9dO~P!G[O!T/SO!U(dy~O!T3nO!U(aq~O#P7sO#Q7sO~P$%_O!Z9nO![9nO'k$vO's)TO'|+zO~O!V/oO%]9qO~O!V/oO%]9qO~P!G[O!e9tO~O_$pO#T9zO'e$pO~O_$pO!_#UO#T9zO'e$pO~O!Z9}O![9}O'|+zO~P!AQO_$pO!_#UO!l:OO#T9zO'e$pO'}'SO~OQ$qqZ$qqk$qqy$qq!c$qq!d$qq!f$qq!l$qq#c$qq#d$qq#e$qq#f$qq#g$qq#h$qq#i$qq#j$qq#k$qq#m$qq#o$qq#q$qq#r$qq#u$qq'r$qq'}$qq!T$qq!U$qq~P%5OOQ$sqZ$sqk$sqy$sq!c$sq!d$sq!f$sq!l$sq#c$sq#d$sq#e$sq#f$sq#g$sq#h$sq#i$sq#j$sq#k$sq#m$sq#o$sq#q$sq#r$sq#u$sq'r$sq'}$sq!T$sq!U$sq~P%5OOe%X!Z!T%X!Z#T%X!Z#u%X!Z~P!&VO!T'Yq!U'Yq~P#0aO!T#]!Z!U#]!Z~P#0aO_$pO#T:aO'e$pO~O_$pO!_#UO#T:aO'e$pO~O#`%X!ZQ%X!ZZ%X!Z_%X!Zk%X!Zy%X!Z!T%X!Z!c%X!Z!d%X!Z!f%X!Z!l%X!Z#c%X!Z#d%X!Z#e%X!Z#f%X!Z#g%X!Z#h%X!Z#i%X!Z#j%X!Z#k%X!Z#m%X!Z#o%X!Z#q%X!Z#r%X!Z'e%X!Z'r%X!Z'}%X!Z!e%X!Z!Q%X!Z'a%X!Z!V%X!Z#T%X!Zo%X!Z%]%X!Z!_%X!Z~P!G[O_$pO#T:oO'e$pO~OP=nOx(mO{(nO(U(pO(V(rO~O]#Sal#Sa!U#Sa!Y#Sa!Z#Sa![#Sa!u#Sa!y#Sa!z#Sa!{#Sa#P#Sa#Q#Sa'k#Sa's#Sa'|#Sa~P&D[OQ%X!ZZ%X!Zk%X!Zy%X!Z!c%X!Z!d%X!Z!f%X!Z!l%X!Z#c%X!Z#d%X!Z#e%X!Z#f%X!Z#g%X!Z#h%X!Z#i%X!Z#j%X!Z#k%X!Z#m%X!Z#o%X!Z#q%X!Z#r%X!Z#u%X!Z'r%X!Z'}%X!Z!T%X!Z!U%X!Z~P%5OO]ualua!Yua!Zua![ua!uua!yua!zua!{ua#Pua#Qua'kua'sua'|ua~P%LmO]$hal$ha!Y$ha!Z$ha![$ha!u$ha!y$ha!z$ha!{$ha#P$ha#Q$ha'k$ha's$ha'|$ha~P%NtO]$jal$ja!Y$ja!Z$ja![$ja!u$ja!y$ja!z$ja!{$ja#P$ja#Q$ja'k$ja's$ja'|$ja~P&!{O]$xal$xa!U$xa!Y$xa!Z$xa![$xa!u$xa!y$xa!z$xa!{$xa#P$xa#Q$xa'k$xa's$xa'|$xa~P&D[O]%Til%Ti!Y%Ti!Z%Ti![%Ti!u%Ti!y%Ti!z%Ti!{%Ti#P%Ti#Q%Ti'k%Ti's%Ti'|%Ti~P&4cO]%Vil%Vi!Y%Vi!Z%Vi![%Vi!u%Vi!y%Vi!z%Vi!{%Vi#P%Vi#Q%Vi'k%Vi's%Vi'|%Vi~P&6jO]$qil$qi!U$qi!Y$qi!Z$qi![$qi!u$qi!y$qi!z$qi!{$qi#P$qi#Q$qi'k$qi's$qi'|$qi~P&D[O]$qql$qq!U$qq!Y$qq!Z$qq![$qq!u$qq!y$qq!z$qq!{$qq#P$qq#Q$qq'k$qq's$qq'|$qq~P&D[O]$sql$sq!U$sq!Y$sq!Z$sq![$sq!u$sq!y$sq!z$sq!{$sq#P$sq#Q$sq'k$sq's$sq'|$sq~P&D[O]%X!Zl%X!Z!U%X!Z!Y%X!Z!Z%X!Z![%X!Z!u%X!Z!y%X!Z!z%X!Z!{%X!Z#P%X!Z#Q%X!Z'k%X!Z's%X!Z'|%X!Z~P&D[Oo'tX~P/WO!QdX!TdX#TdX~P&*pOQ[XZ[Xk[Xx[Xy[X{[X!T[X!TdX!c[X!d[X!f[X!l[X#T[X#TdX#`dX#c[X#d[X#e[X#f[X#g[X#h[X#i[X#j[X#k[X#m[X#o[X#q[X#r[X#w[X'r[X'}[X(U[X(V[X~O!_dX!e[X!edX'}dX~P'$ZOQ;VOR;VO]gOb=ZOc!`OigOk;VOlgOmgOrgOt;VOv;VO{SO!OgO!PgO!VTO!a;YO!fVO!i;VO!j;VO!k;VO!l;VO!m;VO!p!_O#|!bO$QbO'j'|O'rRO'|WO(Z=XO~O]$SOi$cOk$TOl$SOm$SOr$dOt$eOv;pO{$[O!V$]O!a=aO!f$XO#_;yO#|$iO$i;sO$k;vO$n$jO'j'dO'n$bO'r$UO~O!T;jO!U$ga~O]$SOi$cOk$TOl$SOm$SOr$dOt$eOv;qO{$[O!V$]O!a=bO!f$XO#_;zO#|$iO$i;tO$k;wO$n$jO'j'dO'n$bO'r$UO~O#l(TO~P'*^O!U[X!UdX~P'$ZO!_;^O~O#`;]O~O!_#UO#`;]O~O#T;nO~O#k;cO~O#T;{O!T(SX!U(SX~O#T;nO!T(QX!U(QX~O#`;|O~Oe TypeParamList TypeDefinition ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression await yield delete LogicOp BitOp ParenthesizedExpression ClassExpression class extends ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody MethodDeclaration AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression",maxTerm:345,context:Ca,nodeProps:[["closedBy",4,"InterpolationEnd",43,"]",53,"}",68,")",140,"JSXSelfCloseEndTag JSXEndTag",156,"JSXEndTag"],["group",-26,8,15,17,60,195,199,202,203,205,208,211,222,224,230,232,234,236,239,245,251,253,255,257,259,261,262,"Statement",-30,12,13,25,28,29,34,44,46,47,49,54,62,70,76,77,99,100,109,110,127,130,132,133,134,135,137,138,158,159,161,"Expression",-23,24,26,30,33,35,37,162,164,166,167,169,170,171,173,174,175,177,178,179,189,191,193,194,"Type",-3,81,92,98,"ClassItem"],["openedBy",31,"InterpolationStart",48,"[",52,"{",67,"(",139,"JSXStartTag",151,"JSXStartTag JSXStartCloseTag"]],propSources:[Ia],skippedNodes:[0,5,6],repeatNodeCount:29,tokenData:"#2k~R!bOX%ZXY%uYZ'kZ[%u[]%Z]^'k^p%Zpq%uqr(Rrs)mst7]tu9guvlxyJcyzJyz{Ka{|Lm|}MW}!OLm!O!PMn!P!Q!$v!Q!R!Er!R![!G_![!]!Nc!]!^!N{!^!_# c!_!`#!`!`!a##d!a!b#%s!b!c#'h!c!}9g!}#O#(O#O#P%Z#P#Q#(f#Q#R#(|#R#S9g#S#T#)g#T#o#)}#o#p#,w#p#q#,|#q#r#-j#r#s#.S#s$f%Z$f$g%u$g#BY9g#BY#BZ#.j#BZ$IS9g$IS$I_#.j$I_$I|9g$I|$I}#1X$I}$JO#1X$JO$JT9g$JT$JU#.j$JU$KV9g$KV$KW#.j$KW&FU9g&FU&FV#.j&FV;'S9g;'S;=`Rw!^%Z!_!`YU$`W#q&lO!^%Z!_!`s]$`W]&ZOY>lYZ?lZw>lwx,jx!^>l!^!_@|!_#O>l#O#PE_#P#o>l#o#p@|#p;'S>l;'S;=`J]<%lO>l,^?qX$`WOw?lwx+_x!^?l!^!_@^!_#o?l#o#p@^#p;'S?l;'S;=`@v<%lO?l,U@aTOw@^wx,Xx;'S@^;'S;=`@p<%lO@^,U@sP;=`<%l@^,^@yP;=`<%l?l1aARX]&ZOY@|YZ@^Zw@|wx-tx#O@|#O#PAn#P;'S@|;'S;=`EX<%lO@|1aAqUOw@|wxBTx;'S@|;'S;=`Dg;=`<%lBt<%lO@|1aB[W$Z,U]&ZOYBtZwBtwx/px#OBt#O#PCc#P;'SBt;'S;=`Da<%lOBt&ZByW]&ZOYBtZwBtwx/px#OBt#O#PCc#P;'SBt;'S;=`Da<%lOBt&ZCfRO;'SBt;'S;=`Co;=`OBt&ZCtX]&ZOYBtZwBtwx/px#OBt#O#PCc#P;'SBt;'S;=`Da;=`<%lBt<%lOBt&ZDdP;=`<%lBt1aDlX]&ZOYBtZwBtwx/px#OBt#O#PCc#P;'SBt;'S;=`Da;=`<%l@|<%lOBt1aE[P;=`<%l@|1iEdY$`WOw>lwxFSx!^>l!^!_@|!_#o>l#o#p@|#p;'S>l;'S;=`Ik;=`<%lBt<%lO>l1iF]]$Z,U$`W]&ZOYGUYZ%ZZwGUwx4hx!^GU!^!_Bt!_#OGU#O#PHU#P#oGU#o#pBt#p;'SGU;'S;=`Ie<%lOGU&cG]]$`W]&ZOYGUYZ%ZZwGUwx4hx!^GU!^!_Bt!_#OGU#O#PHU#P#oGU#o#pBt#p;'SGU;'S;=`Ie<%lOGU&cHZW$`WO!^GU!^!_Bt!_#oGU#o#pBt#p;'SGU;'S;=`Hs;=`<%lBt<%lOGU&cHxX]&ZOYBtZwBtwx/px#OBt#O#PCc#P;'SBt;'S;=`Da;=`<%lGU<%lOBt&cIhP;=`<%lGU1iIpX]&ZOYBtZwBtwx/px#OBt#O#PCc#P;'SBt;'S;=`Da;=`<%l>l<%lOBt1iJ`P;=`<%l>l,TJjT!f+{$`WO!^%Z!_#o%Z#p;'S%Z;'S;=`%o<%lO%Z$PKQT!e#w$`WO!^%Z!_#o%Z#p;'S%Z;'S;=`%o<%lO%Z)ZKjW$`W'k#e#f&lOz%Zz{LS{!^%Z!_!`q#P#Q!-n#Q#o!;l#o#p!6|#p;'S!;l;'S;=`!?i<%lO!;l7Z!q#P#Q!-n#Q#o!;l#o#p!6|#p;'S!;l;'S;=`!?i<%lO!;l7Z!={[$`WU7ROY!+TYZ%ZZ!^!+T!^!_!)o!_#O!+T#O#P!,O#P#Q!&V#Q#o!+T#o#p!)o#p;'S!+T;'S;=`!,p<%lO!+T7Z!>vZ$`WOY!;lYZ!.wZz!;lz{!Na[e]||-1},{term:311,get:e=>Ba[e]||-1},{term:65,get:e=>Ja[e]||-1}],tokenPrec:13429}),Ma=[m("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),m("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),m("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),m("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),m("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),m(`try { +import{S as _e,i as xe,s as Ue,e as Ve,f as ke,T as bO,g as Re,y as TO,o as we,K as je,L as ve,M as We}from"./index.e8d8151e.js";import{P as Ge,N as Ce,u as Ye,D as ze,v as QO,T as Y,I as HO,w as cO,x as n,y as Ae,L as hO,z as uO,A as z,B as dO,F as Oe,G as pO,H as v,J as Ee,K as De,E as y,M as j,O as Ie,Q as Ne,R as m,U as Be,a as k,h as Je,b as Le,c as Me,d as Fe,e as Ke,s as He,f as Ot,g as et,i as tt,r as at,j as it,k as rt,l as st,m as lt,n as nt,o as ot,p as Qt,q as ct,t as XO,C as W}from"./index.e8a8986f.js";class N{constructor(O,t,a,i,r,s,l,Q,c,h=0,o){this.p=O,this.stack=t,this.state=a,this.reducePos=i,this.pos=r,this.score=s,this.buffer=l,this.bufferBase=Q,this.curContext=c,this.lookAhead=h,this.parent=o}toString(){return`[${this.stack.filter((O,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(O,t,a=0){let i=O.parser.context;return new N(O,[],t,a,a,0,[],0,i?new ZO(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(O,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=O}reduce(O){let t=O>>19,a=O&65535,{parser:i}=this.p,r=i.dynamicPrecedence(a);if(r&&(this.score+=r),t==0){this.pushState(i.getGoto(this.state,a,!0),this.reducePos),as;)this.stack.pop();this.reduceContext(a,l)}storeNode(O,t,a,i=4,r=!1){if(O==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&s.buffer[l-4]==0&&s.buffer[l-1]>-1){if(t==a)return;if(s.buffer[l-2]>=t){s.buffer[l-2]=a;return}}}if(!r||this.pos==a)this.buffer.push(O,t,a,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0)for(;s>0&&this.buffer[s-2]>a;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4);this.buffer[s]=O,this.buffer[s+1]=t,this.buffer[s+2]=a,this.buffer[s+3]=i}}shift(O,t,a){let i=this.pos;if(O&131072)this.pushState(O&65535,this.pos);else if((O&262144)==0){let r=O,{parser:s}=this.p;(a>this.pos||t<=s.maxNode)&&(this.pos=a,s.stateFlag(r,1)||(this.reducePos=a)),this.pushState(r,i),this.shiftContext(t,i),t<=s.maxNode&&this.buffer.push(t,i,a,4)}else this.pos=a,this.shiftContext(t,i),t<=this.p.parser.maxNode&&this.buffer.push(t,i,a,4)}apply(O,t,a){O&65536?this.reduce(O):this.shift(O,t,a)}useNode(O,t){let a=this.p.reused.length-1;(a<0||this.p.reused[a]!=O)&&(this.p.reused.push(O),a++);let i=this.pos;this.reducePos=this.pos=i+O.length,this.pushState(t,i),this.buffer.push(a,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,O,this,this.p.stream.reset(this.pos-O.length)))}split(){let O=this,t=O.buffer.length;for(;t>0&&O.buffer[t-2]>O.reducePos;)t-=4;let a=O.buffer.slice(t),i=O.bufferBase+t;for(;O&&i==O.bufferBase;)O=O.parent;return new N(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,a,i,this.curContext,this.lookAhead,O)}recoverByDelete(O,t){let a=O<=this.p.parser.maxNode;a&&this.storeNode(O,this.pos,t,4),this.storeNode(0,this.pos,t,a?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(O){for(let t=new ht(this);;){let a=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,O);if(a==0)return!1;if((a&65536)==0)return!0;t.reduce(a)}}recoverByInsert(O){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>4<<1||this.stack.length>=120){let i=[];for(let r=0,s;rQ&1&&l==s)||i.push(t[r],s)}t=i}let a=[];for(let i=0;i>19,i=O&65535,r=this.stack.length-a*3;if(r<0||t.getGoto(this.stack[r],i,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(O),!0}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:O}=this.p;return O.data[O.stateSlot(this.state,1)]==65535&&!O.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(O){if(this.state!=O.state||this.stack.length!=O.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=O)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class ZO{constructor(O,t){this.tracker=O,this.context=t,this.hash=O.strict?O.hash(t):0}}var qO;(function(e){e[e.Insert=200]="Insert",e[e.Delete=190]="Delete",e[e.Reduce=100]="Reduce",e[e.MaxNext=4]="MaxNext",e[e.MaxInsertStackDepth=300]="MaxInsertStackDepth",e[e.DampenInsertStackDepth=120]="DampenInsertStackDepth"})(qO||(qO={}));class ht{constructor(O){this.start=O,this.state=O.state,this.stack=O.stack,this.base=this.stack.length}reduce(O){let t=O&65535,a=O>>19;a==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(a-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}}class B{constructor(O,t,a){this.stack=O,this.pos=t,this.index=a,this.buffer=O.buffer,this.index==0&&this.maybeNext()}static create(O,t=O.bufferBase+O.buffer.length){return new B(O,t,t-O.bufferBase)}maybeNext(){let O=this.stack.parent;O!=null&&(this.index=this.stack.bufferBase-O.bufferBase,this.stack=O,this.buffer=O.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new B(this.stack,this.pos,this.index)}}class A{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const yO=new A;class ut{constructor(O,t){this.input=O,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=yO,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(O,t){let a=this.range,i=this.rangeIndex,r=this.pos+O;for(;ra.to:r>=a.to;){if(i==this.ranges.length-1)return null;let s=this.ranges[++i];r+=s.from-a.to,a=s}return r}clipPos(O){if(O>=this.range.from&&OO)return Math.max(O,t.from);return this.end}peek(O){let t=this.chunkOff+O,a,i;if(t>=0&&t=this.chunk2Pos&&al.to&&(this.chunk2=this.chunk2.slice(0,l.to-a)),i=this.chunk2.charCodeAt(0)}}return a>=this.token.lookAhead&&(this.token.lookAhead=a+1),i}acceptToken(O,t=0){let a=t?this.resolveOffset(t,-1):this.pos;if(a==null||a=this.chunk2Pos&&this.posthis.range.to?O.slice(0,this.range.to-this.pos):O,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(O=1){for(this.chunkOff+=O;this.pos+O>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();O-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=O,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(O,t){if(t?(this.token=t,t.start=O,t.lookAhead=O+1,t.value=t.extended=-1):this.token=yO,this.pos!=O){if(this.pos=O,O==this.end)return this.setDone(),this;for(;O=this.range.to;)this.range=this.ranges[++this.rangeIndex];O>=this.chunkPos&&O=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(O-this.chunkPos,t-this.chunkPos);if(O>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(O-this.chunk2Pos,t-this.chunk2Pos);if(O>=this.range.from&&t<=this.range.to)return this.input.read(O,t);let a="";for(let i of this.ranges){if(i.from>=t)break;i.to>O&&(a+=this.input.read(Math.max(i.from,O),Math.min(i.to,t)))}return a}}class E{constructor(O,t){this.data=O,this.id=t}token(O,t){dt(this.data,O,t,this.id)}}E.prototype.contextual=E.prototype.fallback=E.prototype.extend=!1;class b{constructor(O,t={}){this.token=O,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function dt(e,O,t,a){let i=0,r=1<0){let p=e[d];if(l.allows(p)&&(O.token.value==-1||O.token.value==p||s.overrides(p,O.token.value))){O.acceptToken(p);break}}let c=O.next,h=0,o=e[i+2];if(O.next<0&&o>h&&e[Q+o*3-3]==65535&&e[Q+o*3-3]==65535){i=e[Q+o*3-1];continue O}for(;h>1,p=Q+d+(d<<1),$=e[p],T=e[p+1]||65536;if(c<$)o=d;else if(c>=T)h=d+1;else{i=e[p+2],O.advance();continue O}}break}}function G(e,O=Uint16Array){if(typeof e!="string")return e;let t=null;for(let a=0,i=0;a=92&&s--,s>=34&&s--;let Q=s-32;if(Q>=46&&(Q-=46,l=!0),r+=Q,l)break;r*=46}t?t[i++]=r:t=new O(r)}return t}const g=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG);let H=null;var _O;(function(e){e[e.Margin=25]="Margin"})(_O||(_O={}));function xO(e,O,t){let a=e.cursor(HO.IncludeAnonymous);for(a.moveTo(O);;)if(!(t<0?a.childBefore(O):a.childAfter(O)))for(;;){if((t<0?a.toO)&&!a.type.isError)return t<0?Math.max(0,Math.min(a.to-1,O-25)):Math.min(e.length,Math.max(a.from+1,O+25));if(t<0?a.prevSibling():a.nextSibling())break;if(!a.parent())return t<0?0:e.length}}class pt{constructor(O,t){this.fragments=O,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let O=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(O){for(this.safeFrom=O.openStart?xO(O.tree,O.from+O.offset,1)-O.offset:O.from,this.safeTo=O.openEnd?xO(O.tree,O.to+O.offset,-1)-O.offset:O.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(O.tree),this.start.push(-O.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(O){if(OO)return this.nextStart=s,null;if(r instanceof Y){if(s==O){if(s=Math.max(this.safeFrom,O)&&(this.trees.push(r),this.start.push(s),this.index.push(0))}else this.index[t]++,this.nextStart=s+r.length}}}class $t{constructor(O,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=O.tokenizers.map(a=>new A)}getActions(O){let t=0,a=null,{parser:i}=O.p,{tokenizers:r}=i,s=i.stateSlot(O.state,3),l=O.curContext?O.curContext.hash:0,Q=0;for(let c=0;co.end+25&&(Q=Math.max(o.lookAhead,Q)),o.value!=0)){let d=t;if(o.extended>-1&&(t=this.addActions(O,o.extended,o.end,t)),t=this.addActions(O,o.value,o.end,t),!h.extend&&(a=o,t>d))break}}for(;this.actions.length>t;)this.actions.pop();return Q&&O.setLookAhead(Q),!a&&O.pos==this.stream.end&&(a=new A,a.value=O.p.parser.eofTerm,a.start=a.end=O.pos,t=this.addActions(O,a.value,a.end,t)),this.mainToken=a,this.actions}getMainToken(O){if(this.mainToken)return this.mainToken;let t=new A,{pos:a,p:i}=O;return t.start=a,t.end=Math.min(a+1,i.stream.end),t.value=a==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(O,t,a){let i=this.stream.clipPos(a.pos);if(t.token(this.stream.reset(i,O),a),O.value>-1){let{parser:r}=a.p;for(let s=0;s=0&&a.p.parser.dialect.allows(l>>1)){(l&1)==0?O.value=l>>1:O.extended=l>>1;break}}}else O.value=0,O.end=this.stream.clipPos(i+1)}putAction(O,t,a,i){for(let r=0;rO.bufferLength*4?new pt(a,O.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let O=this.stacks,t=this.minStackPos,a=this.stacks=[],i,r;for(let s=0;st)a.push(l);else{if(this.advanceStack(l,a,O))continue;{i||(i=[],r=[]),i.push(l);let Q=this.tokens.getMainToken(l);r.push(Q.value,Q.end)}}break}}if(!a.length){let s=i&&Pt(i);if(s)return this.stackToTree(s);if(this.parser.strict)throw g&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let s=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,r,a);if(s)return this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(a.length>s)for(a.sort((l,Q)=>Q.score-l.score);a.length>s;)a.pop();a.some(l=>l.reducePos>t)&&this.recovering--}else if(a.length>1){O:for(let s=0;s500&&c.buffer.length>500)if((l.score-c.score||l.buffer.length-c.buffer.length)>0)a.splice(Q--,1);else{a.splice(s--,1);continue O}}}}this.minStackPos=a[0].pos;for(let s=1;s ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return O.forceReduce()?O:null;if(this.fragments){let c=O.curContext&&O.curContext.tracker.strict,h=c?O.curContext.hash:0;for(let o=this.fragments.nodeAt(i);o;){let d=this.parser.nodeSet.types[o.type.id]==o.type?r.getGoto(O.state,o.type.id):-1;if(d>-1&&o.length&&(!c||(o.prop(QO.contextHash)||0)==h))return O.useNode(o,d),g&&console.log(s+this.stackID(O)+` (via reuse of ${r.getName(o.type.id)})`),!0;if(!(o instanceof Y)||o.children.length==0||o.positions[0]>0)break;let p=o.children[0];if(p instanceof Y&&o.positions[0]==0)o=p;else break}}let l=r.stateSlot(O.state,4);if(l>0)return O.reduce(l),g&&console.log(s+this.stackID(O)+` (via always-reduce ${r.getName(l&65535)})`),!0;if(O.stack.length>=15e3)for(;O.stack.length>9e3&&O.forceReduce(););let Q=this.tokens.getActions(O);for(let c=0;ci?t.push($):a.push($)}return!1}advanceFully(O,t){let a=O.pos;for(;;){if(!this.advanceStack(O,null,null))return!1;if(O.pos>a)return VO(O,t),!0}}runRecovery(O,t,a){let i=null,r=!1;for(let s=0;s ":"";if(l.deadEnd&&(r||(r=!0,l.restart(),g&&console.log(h+this.stackID(l)+" (restarted)"),this.advanceFully(l,a))))continue;let o=l.split(),d=h;for(let p=0;o.forceReduce()&&p<10&&(g&&console.log(d+this.stackID(o)+" (via force-reduce)"),!this.advanceFully(o,a));p++)g&&(d=this.stackID(o)+" -> ");for(let p of l.recoverByInsert(Q))g&&console.log(h+this.stackID(p)+" (via recover-insert)"),this.advanceFully(p,a);this.stream.end>l.pos?(c==l.pos&&(c++,Q=0),l.recoverByDelete(Q,c),g&&console.log(h+this.stackID(l)+` (via recover-delete ${this.parser.getName(Q)})`),VO(l,a)):(!i||i.scoree;class ee{constructor(O){this.start=O.start,this.shift=O.shift||OO,this.reduce=O.reduce||OO,this.reuse=O.reuse||OO,this.hash=O.hash||(()=>0),this.strict=O.strict!==!1}}class _ extends Ge{constructor(O){if(super(),this.wrappers=[],O.version!=14)throw new RangeError(`Parser version (${O.version}) doesn't match runtime version (${14})`);let t=O.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let l=0;lO.topRules[l][1]),i=[];for(let l=0;l=0)r(h,Q,l[c++]);else{let o=l[c+-h];for(let d=-h;d>0;d--)r(l[c++],Q,o);c++}}}this.nodeSet=new Ce(t.map((l,Q)=>Ye.define({name:Q>=this.minRepeatTerm?void 0:l,id:Q,props:i[Q],top:a.indexOf(Q)>-1,error:Q==0,skipped:O.skippedNodes&&O.skippedNodes.indexOf(Q)>-1}))),O.propSources&&(this.nodeSet=this.nodeSet.extend(...O.propSources)),this.strict=!1,this.bufferLength=ze;let s=G(O.tokenData);this.context=O.context,this.specializerSpecs=O.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;ltypeof l=="number"?new E(s,l):l),this.topRules=O.topRules,this.dialects=O.dialects||{},this.dynamicPrecedences=O.dynamicPrecedences||null,this.tokenPrecTable=O.tokenPrec,this.termNames=O.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(O,t,a){let i=new ft(this,O,t,a);for(let r of this.wrappers)i=r(i,O,t,a);return i}getGoto(O,t,a=!1){let i=this.goto;if(t>=i[0])return-1;for(let r=i[t+1];;){let s=i[r++],l=s&1,Q=i[r++];if(l&&a)return Q;for(let c=r+(s>>1);r0}validAction(O,t){if(t==this.stateSlot(O,4))return!0;for(let a=this.stateSlot(O,1);;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=X(this.data,a+2);else return!1;if(t==X(this.data,a+1))return!0}}nextStates(O){let t=[];for(let a=this.stateSlot(O,1);;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=X(this.data,a+2);else break;if((this.data[a+2]&1)==0){let i=this.data[a+1];t.some((r,s)=>s&1&&r==i)||t.push(this.data[a],i)}}return t}overrides(O,t){let a=kO(this.data,this.tokenPrecTable,t);return a<0||kO(this.data,this.tokenPrecTable,O){let i=O.tokenizers.find(r=>r.from==a);return i?i.to:a})),O.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((a,i)=>{let r=O.specializers.find(l=>l.from==a.external);if(!r)return a;let s=Object.assign(Object.assign({},a),{external:r.to});return t.specializers[i]=RO(s),s})),O.contextTracker&&(t.context=O.contextTracker),O.dialect&&(t.dialect=this.parseDialect(O.dialect)),O.strict!=null&&(t.strict=O.strict),O.wrap&&(t.wrappers=t.wrappers.concat(O.wrap)),O.bufferLength!=null&&(t.bufferLength=O.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(O){return this.termNames?this.termNames[O]:String(O<=this.maxNode&&this.nodeSet.types[O].name||O)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(O){let t=this.dynamicPrecedences;return t==null?0:t[O]||0}parseDialect(O){let t=Object.keys(this.dialects),a=t.map(()=>!1);if(O)for(let r of O.split(" ")){let s=t.indexOf(r);s>=0&&(a[s]=!0)}let i=null;for(let r=0;ra)&&t.p.parser.stateFlag(t.state,2)&&(!O||O.scoree.external(t,a)<<1|O}return e.get}const mt=54,gt=1,bt=55,Tt=2,Xt=56,Zt=3,J=4,te=5,ae=6,ie=7,re=8,qt=9,yt=10,_t=11,eO=57,xt=12,wO=58,Ut=18,Vt=20,se=21,kt=22,nO=24,le=25,Rt=27,wt=30,jt=33,vt=35,Wt=0,Gt={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Ct={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},jO={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Yt(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function ne(e){return e==9||e==10||e==13||e==32}let vO=null,WO=null,GO=0;function oO(e,O){let t=e.pos+O;if(GO==t&&WO==e)return vO;let a=e.peek(O);for(;ne(a);)a=e.peek(++O);let i="";for(;Yt(a);)i+=String.fromCharCode(a),a=e.peek(++O);return WO=e,GO=t,vO=i?i.toLowerCase():a==zt||a==At?void 0:null}const oe=60,Qe=62,ce=47,zt=63,At=33,Et=45;function CO(e,O){this.name=e,this.parent=O,this.hash=O?O.hash:0;for(let t=0;t-1?new CO(oO(a,1)||"",e):e},reduce(e,O){return O==Ut&&e?e.parent:e},reuse(e,O,t,a){let i=O.type.id;return i==J||i==vt?new CO(oO(a,1)||"",e):e},hash(e){return e?e.hash:0},strict:!1}),Nt=new b((e,O)=>{if(e.next!=oe){e.next<0&&O.context&&e.acceptToken(eO);return}e.advance();let t=e.next==ce;t&&e.advance();let a=oO(e,0);if(a===void 0)return;if(!a)return e.acceptToken(t?xt:J);let i=O.context?O.context.name:null;if(t){if(a==i)return e.acceptToken(qt);if(i&&Ct[i])return e.acceptToken(eO,-2);if(O.dialectEnabled(Wt))return e.acceptToken(yt);for(let r=O.context;r;r=r.parent)if(r.name==a)return;e.acceptToken(_t)}else{if(a=="script")return e.acceptToken(te);if(a=="style")return e.acceptToken(ae);if(a=="textarea")return e.acceptToken(ie);if(Gt.hasOwnProperty(a))return e.acceptToken(re);i&&jO[i]&&jO[i][a]?e.acceptToken(eO,-1):e.acceptToken(J)}},{contextual:!0}),Bt=new b(e=>{for(let O=0,t=0;;t++){if(e.next<0){t&&e.acceptToken(wO);break}if(e.next==Et)O++;else if(e.next==Qe&&O>=2){t>3&&e.acceptToken(wO,-2);break}else O=0;e.advance()}});function $O(e,O,t){let a=2+e.length;return new b(i=>{for(let r=0,s=0,l=0;;l++){if(i.next<0){l&&i.acceptToken(O);break}if(r==0&&i.next==oe||r==1&&i.next==ce||r>=2&&rs?i.acceptToken(O,-s):i.acceptToken(t,-(s-2));break}else if((i.next==10||i.next==13)&&l){i.acceptToken(O,1);break}else r=s=0;i.advance()}})}const Jt=$O("script",mt,gt),Lt=$O("style",bt,Tt),Mt=$O("textarea",Xt,Zt),Ft=cO({"Text RawText":n.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":n.angleBracket,TagName:n.tagName,"MismatchedCloseTag/TagName":[n.tagName,n.invalid],AttributeName:n.attributeName,"AttributeValue UnquotedAttributeValue":n.attributeValue,Is:n.definitionOperator,"EntityReference CharacterReference":n.character,Comment:n.blockComment,ProcessingInst:n.processingInstruction,DoctypeDecl:n.documentMeta}),Kt=_.deserialize({version:14,states:",xOVOxOOO!WQ!bO'#CoO!]Q!bO'#CyO!bQ!bO'#C|O!gQ!bO'#DPO!lQ!bO'#DRO!qOXO'#CnO!|OYO'#CnO#XO[O'#CnO$eOxO'#CnOOOW'#Cn'#CnO$lO!rO'#DTO$tQ!bO'#DVO$yQ!bO'#DWOOOW'#Dk'#DkOOOW'#DY'#DYQVOxOOO%OQ#tO,59ZO%WQ#tO,59eO%`Q#tO,59hO%hQ#tO,59kO%sQ#tO,59mOOOX'#D^'#D^O%{OXO'#CwO&WOXO,59YOOOY'#D_'#D_O&`OYO'#CzO&kOYO,59YOOO['#D`'#D`O&sO[O'#C}O'OO[O,59YOOOW'#Da'#DaO'WOxO,59YO'_Q!bO'#DQOOOW,59Y,59YOOO`'#Db'#DbO'dO!rO,59oOOOW,59o,59oO'lQ!bO,59qO'qQ!bO,59rOOOW-E7W-E7WO'vQ#tO'#CqOOQO'#DZ'#DZO(UQ#tO1G.uOOOX1G.u1G.uO(^Q#tO1G/POOOY1G/P1G/PO(fQ#tO1G/SOOO[1G/S1G/SO(nQ#tO1G/VOOOW1G/V1G/VOOOW1G/X1G/XO(yQ#tO1G/XOOOX-E7[-E7[O)RQ!bO'#CxOOOW1G.t1G.tOOOY-E7]-E7]O)WQ!bO'#C{OOO[-E7^-E7^O)]Q!bO'#DOOOOW-E7_-E7_O)bQ!bO,59lOOO`-E7`-E7`OOOW1G/Z1G/ZOOOW1G/]1G/]OOOW1G/^1G/^O)gQ&jO,59]OOQO-E7X-E7XOOOX7+$a7+$aOOOY7+$k7+$kOOO[7+$n7+$nOOOW7+$q7+$qOOOW7+$s7+$sO)rQ!bO,59dO)wQ!bO,59gO)|Q!bO,59jOOOW1G/W1G/WO*RO,UO'#CtO*dO7[O'#CtOOQO1G.w1G.wOOOW1G/O1G/OOOOW1G/R1G/ROOOW1G/U1G/UOOOO'#D['#D[O*uO,UO,59`OOQO,59`,59`OOOO'#D]'#D]O+WO7[O,59`OOOO-E7Y-E7YOOQO1G.z1G.zOOOO-E7Z-E7Z",stateData:"+u~O!^OS~OSSOTPOUQOVROWTOY]OZ[O[^O^^O_^O`^Oa^Ox^O{_O!dZO~OdaO~OdbO~OdcO~OddO~OdeO~O!WfOPkP!ZkP~O!XiOQnP!ZnP~O!YlORqP!ZqP~OSSOTPOUQOVROWTOXqOY]OZ[O[^O^^O_^O`^Oa^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OdvO~OdwO~OfyOj|O~OfyOj!OO~OfyOj!QO~OfyOj!SOv!TO~OfyOj!TO~O!WfOPkX!ZkX~OP!WO!Z!XO~O!XiOQnX!ZnX~OQ!ZO!Z!XO~O!YlORqX!ZqX~OR!]O!Z!XO~O!Z!XO~P#dOd!_O~O![sO!e!aO~Oj!bO~Oj!cO~Og!dOfeXjeXveX~OfyOj!fO~OfyOj!gO~OfyOj!hO~OfyOj!iOv!jO~OfyOj!jO~Od!kO~Od!lO~Od!mO~Oj!nO~Oi!qO!`!oO!b!pO~Oj!rO~Oj!sO~Oj!tO~O_!uO`!uOa!uO!`!wO!a!uO~O_!xO`!xOa!xO!b!wO!c!xO~O_!uO`!uOa!uO!`!{O!a!uO~O_!xO`!xOa!xO!b!{O!c!xO~Ov~vj`!dx{_a_~",goto:"%p!`PPPPPPPPPPPPPPPPPP!a!gP!mPP!yPP!|#P#S#Y#]#`#f#i#l#r#xP!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"\u26A0 StartCloseTag StartCloseTag StartCloseTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue EndTag ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag SelfClosingEndTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:It,nodeProps:[["closedBy",-10,1,2,3,5,6,7,8,9,10,11,"EndTag",4,"EndTag SelfClosingEndTag",-4,19,29,32,35,"CloseTag"],["group",-9,12,15,16,17,18,39,40,41,42,"Entity",14,"Entity TextContent",-3,27,30,33,"TextContent Entity"],["openedBy",26,"StartTag StartCloseTag",-4,28,31,34,36,"OpenTag",38,"StartTag"]],propSources:[Ft],skippedNodes:[0],repeatNodeCount:9,tokenData:"#(r!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs4ysv-_vw5iwxJ^x}-_}!OKP!O!P-_!P!Q!!O!Q![-_![!]!$c!]!^-_!^!_!(k!_!`#'S!`!a#'z!a!c-_!c!}!$c!}#R-_#R#S!$c#S#T3V#T#o!$c#o#s-_#s$f$q$f%W-_%W%o!$c%o%p-_%p&a!$c&a&b-_&b1p!$c1p4U-_4U4d!$c4d4e-_4e$IS!$c$IS$I`-_$I`$Ib!$c$Ib$Kh-_$Kh%#t!$c%#t&/x-_&/x&Et!$c&Et&FV-_&FV;'S!$c;'S;:j!(e;:j;=`4s<%l?&r-_?&r?Ah!$c?Ah?BY$q?BY?Mn!$c?MnO$q!Z$|c^PiW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bX^P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UV^P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pT^POv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!cpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({W^P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!a`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!a`!cpOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!Q*vP;=`<%l*V!R*|P;=`<%l&XW+UYiWOX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+PW+wP;=`<%l+P!Z+}P;=`<%l$q!a,]`^P!a`!cp!^^OX&XXY,QYZ,QZ]&X]^,Q^p&Xpq,Qqr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!_-ljfS^PiW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_1n!_!a&X!a#S-_#S#T3V#T#s-_#s$f$q$f;'S-_;'S;=`4s<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q[/ecfSiWOX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!^!_0p!a#S/^#S#T0p#T#s/^#s$f+P$f;'S/^;'S;=`1h<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+PS0uXfSqr0psw0px!P0p!Q!_0p!a#s0p$f;'S0p;'S;=`1b<%l?Ah0p?BY?Mn0pS1eP;=`<%l0p[1kP;=`<%l/^!U1wbfS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!U3SP;=`<%l1n!V3bcfS^P!a`!cpOq&Xqr3Vrs&}sv3Vvw0pwx(tx!P3V!P!Q&X!Q!^3V!^!_1n!_!a&X!a#s3V#s$f&X$f;'S3V;'S;=`4m<%l?Ah3V?Ah?BY&X?BY?Mn3V?MnO&X!V4pP;=`<%l3V!_4vP;=`<%l-_!Z5SV!`h^P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}!_5rjfSiWa!ROX7dXZ8qZ[7d[^8q^p7dqr:crs8qst@Ttw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^/^!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!Z7ibiWOX7dXZ8qZ[7d[^8q^p7dqr7drs8qst+Ptw7dwx8qx!]7d!]!^9f!^!a8q!a#S7d#S#T8q#T;'S7d;'S;=`:]<%lO7d!R8tVOp8qqs8qt!]8q!]!^9Z!^;'S8q;'S;=`9`<%lO8q!R9`O_!R!R9cP;=`<%l8q!Z9mYiW_!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z:`P;=`<%l7d!_:jjfSiWOX7dXZ8qZ[7d[^8q^p7dqr:crs8qst/^tw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^<[!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!_{let Q=s.type.id;if(Q==Rt)return tO(s,l,t);if(Q==wt)return tO(s,l,a);if(Q==jt)return tO(s,l,i);if(r&&Q==se){let c=s.node,h;if(h=c.firstChild){let o=r[l.read(h.from,h.to)];if(o)for(let d of o){if(d.tagName){if(!tagName){let $=c.parent.getChild(Vt);tagName=$?l.read($.from,$.to):" "}if(attrTagName!=tagName)continue}let p=c.lastChild;if(p.type.id==nO)return{parser:d.parser,overlay:[{from:p.from+1,to:p.to-1}]};if(p.type.id==le)return{parser:d.parser,overlay:[{from:p.from,to:p.to}]}}}}return null})}const Oa=95,YO=1,ea=96,ta=97,zO=2,ue=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],aa=58,ia=40,de=95,ra=91,D=45,sa=46,la=35,na=37;function L(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function oa(e){return e>=48&&e<=57}const Qa=new b((e,O)=>{for(let t=!1,a=0,i=0;;i++){let{next:r}=e;if(L(r)||r==D||r==de||t&&oa(r))!t&&(r!=D||i>0)&&(t=!0),a===i&&r==D&&a++,e.advance();else{t&&e.acceptToken(r==ia?ea:a==2&&O.canShift(zO)?zO:ta);break}}}),ca=new b(e=>{if(ue.includes(e.peek(-1))){let{next:O}=e;(L(O)||O==de||O==la||O==sa||O==ra||O==aa||O==D)&&e.acceptToken(Oa)}}),ha=new b(e=>{if(!ue.includes(e.peek(-1))){let{next:O}=e;if(O==na&&(e.advance(),e.acceptToken(YO)),L(O)){do e.advance();while(L(e.next));e.acceptToken(YO)}}}),ua=cO({"AtKeyword import charset namespace keyframes media supports":n.definitionKeyword,"from to selector":n.keyword,NamespaceName:n.namespace,KeyframeName:n.labelName,TagName:n.tagName,ClassName:n.className,PseudoClassName:n.constant(n.className),IdName:n.labelName,"FeatureName PropertyName":n.propertyName,AttributeName:n.attributeName,NumberLiteral:n.number,KeywordQuery:n.keyword,UnaryQueryOp:n.operatorKeyword,"CallTag ValueName":n.atom,VariableName:n.variableName,Callee:n.operatorKeyword,Unit:n.unit,"UniversalSelector NestingSelector":n.definitionOperator,MatchOp:n.compareOperator,"ChildOp SiblingOp, LogicOp":n.logicOperator,BinOp:n.arithmeticOperator,Important:n.modifier,Comment:n.blockComment,ParenthesizedContent:n.special(n.name),ColorLiteral:n.color,StringLiteral:n.string,":":n.punctuation,"PseudoOp #":n.derefOperator,"; ,":n.separator,"( )":n.paren,"[ ]":n.squareBracket,"{ }":n.brace}),da={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},pa={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},$a={__proto__:null,not:128,only:128,from:158,to:160},fa=_.deserialize({version:14,states:"8SQYQ[OOO!ZQ[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO!cQ[O'#CfO#VQXO'#CaO#^Q[O'#ChO#iQ[O'#DPO#nQ[O'#DTOOQP'#Ee'#EeO#sQdO'#DeO$_Q[O'#DrO#sQdO'#DtO$pQ[O'#DvO${Q[O'#DyO%QQ[O'#EPO%`Q[O'#EROOQS'#Ed'#EdOOQS'#ET'#ETQYQ[OOOOQO'#Db'#DbO%gQWO'#DaQ%lQWOOOOQP'#Cg'#CgOOQP,59Q,59QO!cQ[O,59QO%qQ[O'#EWO&]QWO,58{O&eQ[O,59SO#iQ[O,59kO#nQ[O,59oO%qQ[O,59sO%qQ[O,59uO%qQ[O,59vO'tQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO'{QWO,59SO(QQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO(VQ`O,59oOOQS'#Cp'#CpO#sQdO'#CqO(_QvO'#CsO)lQtO,5:POOQO'#Cx'#CxO(QQWO'#CwO*QQWO'#CyOOQS'#Eh'#EhOOQO'#Dh'#DhO*VQ[O'#DoO*eQWO'#EkO%QQ[O'#DmO*sQWO'#DpOOQO'#El'#ElO&`QWO,5:^O*xQpO,5:`OOQS'#Dx'#DxO+QQWO,5:bO+VQ[O,5:bOOQO'#D{'#D{O+_QWO,5:eO+dQWO,5:kO+lQWO,5:mOOQS-E8R-E8RO#sQdO,59{O+tQ[O'#E]Q%lQWOOOOQP1G.l1G.lO,nQXO,5:rOOQO-E8U-E8UOOQS1G.g1G.gOOQP1G.n1G.nO'{QWO1G.nO(QQWO1G.nOOQP1G/V1G/VO,{Q`O1G/ZO-fQXO1G/_O-|QXO1G/aO.dQXO1G/bO.zQXO'#CdOOQS,59z,59zO/oQWO,59zO/wQ[O,59zO0OQ[O'#DOO0VQdO'#CoOOQP1G/Z1G/ZO#sQdO1G/ZO0^QpO,59]OOQS,59_,59_O#sQdO,59aO0fQWO1G/kOOQS,59c,59cO0kQ!bO,59eO0sQWO'#DhO1OQWO,5:TO1TQWO,5:ZO%QQ[O,5:VO%QQ[O'#EZO1]QWO,5;VO1hQWO,5:XO%qQ[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O1yQWO1G/|O2OQdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XO2^QtO1G/gOOQO,5:w,5:wOOQO-E8Z-E8ZOOQP7+$Y7+$YOOQP7+$u7+$uO#sQdO7+$uO2tQ[O'#EYO3OQWO1G/fOOQS1G/f1G/fO3OQWO1G/fO3WQXO'#EjO3_QWO,59jO3dQtO'#EUO4XQdO'#EgO4cQWO,59ZO4hQpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO4pQWO1G/PO#sQdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO4uQWO,5:uOOQO-E8X-E8XO5TQXO1G/vOOQS7+%h7+%hO5[QYO'#CsO&`QWO'#E[O5dQdO,5:hOOQS,5:h,5:hO5rQtO'#EXO#sQdO'#EXO6pQdO7+%ROOQO7+%R7+%RO7TQpO<T![;'S%^;'S;=`%o<%lO%^^;TUoWOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^^;nYoW#]UOy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^^[[oW#]UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^_?VSpVOy%^z;'S%^;'S;=`%o<%lO%^^?hWjSOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^_@VU#YPOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjSOy%^z{@}{;'S%^;'S;=`%o<%lO%^~ASUoWOy@}yzAfz{Bm{;'S@};'S;=`Co<%lO@}~AiTOzAfz{Ax{;'SAf;'S;=`Bg<%lOAf~A{VOzAfz{Ax{!PAf!P!QBb!Q;'SAf;'S;=`Bg<%lOAf~BgOR~~BjP;=`<%lAf~BrWoWOy@}yzAfz{Bm{!P@}!P!QC[!Q;'S@};'S;=`Co<%lO@}~CcSoWR~Oy%^z;'S%^;'S;=`%o<%lO%^~CrP;=`<%l@}^Cz[#]UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^XDuU]POy%^z![%^![!]EX!];'S%^;'S;=`%o<%lO%^XE`S^PoWOy%^z;'S%^;'S;=`%o<%lO%^_EqS!WVOy%^z;'S%^;'S;=`%o<%lO%^YFSSzQOy%^z;'S%^;'S;=`%o<%lO%^XFeU|POy%^z!`%^!`!aFw!a;'S%^;'S;=`%o<%lO%^XGOS|PoWOy%^z;'S%^;'S;=`%o<%lO%^XG_WOy%^z!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHO[!YPoWOy%^z}%^}!OGw!O!Q%^!Q![Gw![!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHySxPOy%^z;'S%^;'S;=`%o<%lO%^^I[SvUOy%^z;'S%^;'S;=`%o<%lO%^XIkUOy%^z#b%^#b#cI}#c;'S%^;'S;=`%o<%lO%^XJSUoWOy%^z#W%^#W#XJf#X;'S%^;'S;=`%o<%lO%^XJmS!`PoWOy%^z;'S%^;'S;=`%o<%lO%^XJ|UOy%^z#f%^#f#gJf#g;'S%^;'S;=`%o<%lO%^XKeS!RPOy%^z;'S%^;'S;=`%o<%lO%^_KvS!QVOy%^z;'S%^;'S;=`%o<%lO%^ZLXU!PPOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^WLnP;=`<%l$}",tokenizers:[ca,ha,Qa,0,1,2,3],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:96,get:e=>da[e]||-1},{term:56,get:e=>pa[e]||-1},{term:97,get:e=>$a[e]||-1}],tokenPrec:1120});let aO=null;function iO(){if(!aO&&typeof document=="object"&&document.body){let e=[];for(let O in document.body.style)/[A-Z]|^-|^(item|length)$/.test(O)||e.push(O);aO=e.sort().map(O=>({type:"property",label:O}))}return aO||[]}const AO=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(e=>({type:"class",label:e})),EO=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(e=>({type:"keyword",label:e})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(e=>({type:"constant",label:e}))),Sa=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(e=>({type:"type",label:e})),q=/^[\w-]*/,Pa=e=>{let{state:O,pos:t}=e,a=v(O).resolveInner(t,-1);if(a.name=="PropertyName")return{from:a.from,options:iO(),validFor:q};if(a.name=="ValueName")return{from:a.from,options:EO,validFor:q};if(a.name=="PseudoClassName")return{from:a.from,options:AO,validFor:q};if(a.name=="TagName"){for(let{parent:s}=a;s;s=s.parent)if(s.name=="Block")return{from:a.from,options:iO(),validFor:q};return{from:a.from,options:Sa,validFor:q}}if(!e.explicit)return null;let i=a.resolve(t),r=i.childBefore(t);return r&&r.name==":"&&i.name=="PseudoClassSelector"?{from:t,options:AO,validFor:q}:r&&r.name==":"&&i.name=="Declaration"||i.name=="ArgList"?{from:t,options:EO,validFor:q}:i.name=="Block"?{from:t,options:iO(),validFor:q}:null},M=hO.define({name:"css",parser:fa.configure({props:[uO.add({Declaration:z()}),dO.add({Block:Oe})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function ma(){return new pO(M,M.data.of({autocomplete:Pa}))}const ga=1,DO=294,IO=2,ba=3,C=295,Ta=4,Xa=296,NO=297,Za=299,qa=300,ya=5,_a=6,xa=1,Ua=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],pe=125,Va=123,ka=59,BO=47,Ra=42,wa=43,ja=45,va=36,Wa=96,Ga=92,Ca=new ee({start:!1,shift(e,O){return O==ya||O==_a||O==Za?e:O==qa},strict:!1}),Ya=new b((e,O)=>{let{next:t}=e;(t==pe||t==-1||O.context)&&O.canShift(NO)&&e.acceptToken(NO)},{contextual:!0,fallback:!0}),za=new b((e,O)=>{let{next:t}=e,a;Ua.indexOf(t)>-1||t==BO&&((a=e.peek(1))==BO||a==Ra)||t!=pe&&t!=ka&&t!=-1&&!O.context&&O.canShift(DO)&&e.acceptToken(DO)},{contextual:!0}),Aa=new b((e,O)=>{let{next:t}=e;if((t==wa||t==ja)&&(e.advance(),t==e.next)){e.advance();let a=!O.context&&O.canShift(IO);e.acceptToken(a?IO:ba)}},{contextual:!0}),Ea=new b(e=>{for(let O=!1,t=0;;t++){let{next:a}=e;if(a<0){t&&e.acceptToken(C);break}else if(a==Wa){t?e.acceptToken(C):e.acceptToken(Xa,1);break}else if(a==Va&&O){t==1?e.acceptToken(Ta,1):e.acceptToken(C,-1);break}else if(a==10&&t){e.advance(),e.acceptToken(C);break}else a==Ga&&e.advance();O=a==va,e.advance()}}),Da=new b((e,O)=>{if(!(e.next!=101||!O.dialectEnabled(xa))){e.advance();for(let t=0;t<6;t++){if(e.next!="xtends".charCodeAt(t))return;e.advance()}e.next>=57&&e.next<=65||e.next>=48&&e.next<=90||e.next==95||e.next>=97&&e.next<=122||e.next>160||e.acceptToken(ga)}}),Ia=cO({"get set async static":n.modifier,"for while do if else switch try catch finally return throw break continue default case":n.controlKeyword,"in of await yield void typeof delete instanceof":n.operatorKeyword,"let var const function class extends":n.definitionKeyword,"import export from":n.moduleKeyword,"with debugger as new":n.keyword,TemplateString:n.special(n.string),super:n.atom,BooleanLiteral:n.bool,this:n.self,null:n.null,Star:n.modifier,VariableName:n.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":n.function(n.variableName),VariableDefinition:n.definition(n.variableName),Label:n.labelName,PropertyName:n.propertyName,PrivatePropertyName:n.special(n.propertyName),"CallExpression/MemberExpression/PropertyName":n.function(n.propertyName),"FunctionDeclaration/VariableDefinition":n.function(n.definition(n.variableName)),"ClassDeclaration/VariableDefinition":n.definition(n.className),PropertyDefinition:n.definition(n.propertyName),PrivatePropertyDefinition:n.definition(n.special(n.propertyName)),UpdateOp:n.updateOperator,LineComment:n.lineComment,BlockComment:n.blockComment,Number:n.number,String:n.string,ArithOp:n.arithmeticOperator,LogicOp:n.logicOperator,BitOp:n.bitwiseOperator,CompareOp:n.compareOperator,RegExp:n.regexp,Equals:n.definitionOperator,Arrow:n.function(n.punctuation),": Spread":n.punctuation,"( )":n.paren,"[ ]":n.squareBracket,"{ }":n.brace,"InterpolationStart InterpolationEnd":n.special(n.brace),".":n.derefOperator,", ;":n.separator,"@":n.meta,TypeName:n.typeName,TypeDefinition:n.definition(n.typeName),"type enum interface implements namespace module declare":n.definitionKeyword,"abstract global Privacy readonly override":n.modifier,"is keyof unique infer":n.operatorKeyword,JSXAttributeValue:n.attributeValue,JSXText:n.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":n.angleBracket,"JSXIdentifier JSXNameSpacedName":n.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":n.attributeName,"JSXBuiltin/JSXIdentifier":n.standard(n.tagName)}),Na={__proto__:null,export:18,as:23,from:29,default:32,async:37,function:38,this:50,true:58,false:58,null:68,void:72,typeof:76,super:92,new:126,await:143,yield:145,delete:146,class:156,extends:158,public:213,private:213,protected:213,readonly:215,instanceof:234,satisfies:237,in:238,const:240,import:272,keyof:327,unique:331,infer:337,is:373,abstract:393,implements:395,type:397,let:400,var:402,interface:409,enum:413,namespace:419,module:421,declare:425,global:429,for:450,of:459,while:462,with:466,do:470,if:474,else:476,switch:480,case:486,try:492,catch:496,finally:500,return:504,throw:508,break:512,continue:516,debugger:520},Ba={__proto__:null,async:113,get:115,set:117,public:175,private:175,protected:175,static:177,abstract:179,override:181,readonly:187,accessor:189,new:377},Ja={__proto__:null,"<":133},La=_.deserialize({version:14,states:"$CWO`QdOOO$}QdOOO)WQ(C|O'#ChO)_OWO'#DYO+jQdO'#D_O+zQdO'#DjO$}QdO'#DtO.OQdO'#DzOOQ(C['#ET'#ETO.fQ`O'#EQOOQO'#IW'#IWO.nQ`O'#GgOOQO'#Ee'#EeO.yQ`O'#EdO/OQ`O'#EdO1QQ(C|O'#JQO3nQ(C|O'#JRO4_Q`O'#FSO4dQ!bO'#FkOOQ(C['#F['#F[O4oO#tO'#F[O4}Q&jO'#FrO6bQ`O'#FqOOQ(C['#JR'#JROOQ(CW'#JQ'#JQOOQS'#Jk'#JkO6gQ`O'#H{O6lQ(ChO'#H|OOQS'#Iu'#IuOOQS'#IO'#IOQ`QdOOO$}QdO'#DlO6tQ`O'#GgO6yQ&jO'#CmO7XQ`O'#EcO7dQ`O'#EnO7iQ&jO'#FZO8TQ`O'#GgO8YQ`O'#GkO8eQ`O'#GkO8sQ`O'#GnO8sQ`O'#GoO8sQ`O'#GqO6tQ`O'#GtO9dQ`O'#GwO:uQ`O'#CdO;VQ`O'#HUO;_Q`O'#H[O;_Q`O'#H^O`QdO'#H`O;_Q`O'#HbO;_Q`O'#HeO;dQ`O'#HkO;iQ(CjO'#HqO$}QdO'#HsO;tQ(CjO'#HuOWQpO'#FZO$}QdO'#DZOOOW'#IQ'#IQO>`OWO,59tOOQ(C[,59t,59tO>kQdO'#IRO?OQ`O'#JSOAQQtO'#JSO)jQdO'#JSOAXQ`O,59yOAoQ`O'#EeOA|Q`O'#J`OBXQ`O'#J_OBXQ`O'#J_OBaQ`O,5;ROBfQ`O'#J^OOQ(C[,5:U,5:UOBmQdO,5:UODnQ(C|O,5:`OE_Q`O,5:fOEdQ`O'#J[OF^Q(ChO'#J]O8YQ`O'#J[OFeQ`O'#J[OFmQ`O,5;QOFrQ`O'#J[OOQ(C]'#Ch'#ChO$}QdO'#DzOGfQpO,5:lOOQO'#JX'#JXOOQO-EgOOQS'#Ix'#IxOOQS,5>h,5>hOOQS-E;|-E;|O!.xQ(C|O,5:WOOQ(CX'#Cp'#CpO!/lQ&kO,5=ROOQO'#Cf'#CfO!/}Q(ChO'#IyO6bQ`O'#IyO;dQ`O,59XO!0`Q!bO,59XO!0hQ&jO,59XO6yQ&jO,59XO!0sQ`O,5;OO!0{Q`O'#HTO!1ZQ`O'#JoO$}QdO,5;sO!1cQ,UO,5;uO!1hQ`O,5=nO!1mQ`O,5=nO!1rQ`O,5=nO6lQ(ChO,5=nO!2QQ`O'#EgO!2wQ,UO'#EhOOQ(CW'#J^'#J^O!3OQ(ChO'#JlO6lQ(ChO,5=VO8sQ`O,5=]OOQP'#Cs'#CsO!3ZQ!bO,5=YO!3cQ!cO,5=ZO!3nQ`O,5=]O!3sQpO,5=`O;dQ`O'#GyO6tQ`O'#G{O!3{Q`O'#G{O6yQ&jO'#HOO!4QQ`O'#HOOOQS,5=c,5=cO!4VQ`O'#HPO!4_Q`O'#CmO!4dQ`O,59OO!4nQ`O,59OO!6sQdO,59OOOQS,59O,59OO!7QQ(ChO,59OO$}QdO,59OO!7]QdO'#HWOOQS'#HX'#HXOOQS'#HY'#HYO`QdO,5=pO!7mQ`O,5=pO`QdO,5=vO`QdO,5=xO!7rQ`O,5=zO`QdO,5=|O!7wQ`O,5>PO!7|QdO,5>VOOQS,5>],5>]O$}QdO,5>]O6lQ(ChO,5>_OOQS,5>a,5>aO!aOOQS,5>c,5>cO!cOOQS,5>e,5>eO!mO)jQdO,5>mOOQO,5>s,5>sO!CUQdO'#IROOQO-ExOOQ(CW-E<[-E<[O#5]Q(C}O1G0tOOQ(C[1G0t1G0tO#7hQ(C|O1G1YO#8[Q!bO,5;}O#8dQ!bO,5OQ,UO'#GXOOQ(C],5=Q,5=QOKhQ&jO,5?hOKhQ&jO,5?hO#>TQ`O'#IcO#>`Q`O,5?gO#>hQ`O,59^O#?XQ&kO,59mOOQ(C],59m,59mO#?zQ&kO,5<`O#@mQ&kO,5mO$)XQ`O1G5YO$)aQ`O1G5eO$)iQtO1G5fO8YQ`O,5>sO$)sQ`O1G5bO$)sQ`O1G5bO8YQ`O1G5bO$){Q(C|O1G5cO$}QdO1G5cO$*]Q(ChO1G5cO$*nQ`O,5>uO8YQ`O,5>uOOQO,5>u,5>uO$+SQ`O,5>uOOQO-Ez,5>zO$8rQ`O,5>zOOQ(C]1G2Z1G2ZP$8wQ`O'#I`POQ(C]-E<^-E<^O$9hQ&kO1G2gO$:ZQ&kO1G2iO$:eQqO1G2kOOQ(C]1G2S1G2SO$:lQ`O'#I_O$:zQ`O,5@SO$:zQ`O,5@SO$;SQ`O,5@SO$;_Q`O,5@SOOQO1G2U1G2UO$;mQ&kO1G2TOKhQ&jO1G2TO$;}QMhO'#IaO$<_Q`O,5@TOJRQ&jO,5@TO$|,5>|OOQO-E<`-E<`OOQ(C]1G2]1G2]O!)dQ,UO,5},5>}OOQO-EkQqO'#JjO$(iQ`O7+(XO$>uQ`O7+(XO$>}QqO7+(XO$?XQ(CyO'#ChO$?lQ(CyO,5ROOQS,5>R,5>RO$}QdO'#HhO$EoQ`O'#HjOOQS,5>X,5>XO8YQ`O,5>XOOQS,5>Z,5>ZOOQS7+)]7+)]OOQS7+)c7+)cOOQS7+)g7+)gOOQS7+)i7+)iO$EtQ!bO1G5[O$FYQ!LUO1G0oO$FdQ`O1G0oOOQO1G/k1G/kO$FoQ!LUO1G/kO$FyQ`O,5?pO;dQ`O1G/kOMqQdO'#DeOOQO,5>n,5>nOOQO-Et,5>tOOQO-EoOOQO-EpO$}QdO,5>pOOQO-ExOOOO7+'_7+'_OOOW1G/S1G/SOOQ(C]1G4f1G4fOKhQ&jO7+(VO%7}Q`O,5>yO6tQ`O,5>yOOQO-E<]-E<]O%8]Q`O1G5nO%8]Q`O1G5nO%8eQ`O1G5nO%8pQ&kO7+'oO%9QQqO,5>{O%9[Q`O,5>{OJRQ&jO,5>{OOQO-E<_-E<_O%9aQqO1G5oO%9kQ`O1G5oOOQ(CW1G2_1G2_O$VQdO'#JUO%>^Q,UO'#E[O%>tQ(ChO'#E[O$$sQ(DjO'#E[O$%hQ,UO'#G}OOQO'#Ih'#IhO%?YQ,UO,5=hOOQS,5=h,5=hO%?aQ,UO'#E[O%?rQ,UO'#E[O%@YQ,UO'#E[O%@vQ,UO'#G}O%AXQ`O7+(mO%A^Q`O7+(mO%AfQqO7+(mOOQS7+(m7+(mOJRQ&jO7+(mO$}QdO7+(mOJRQ&jO7+(mO%ApQaO7+(mOOQS7+(p7+(pO6lQ(ChO7+(pO#=PQ`O7+(pO6bQ`O7+(pO!0`Q!bO7+(pO%BOQ`O,5?TOOQO-ESOOQS,5>U,5>UO%CYQ`O1G3sO8YQ`O7+&ZOMqQdO7+&ZOOQ(CW1G5[1G5[OOQO7+%V7+%VO%C_Q!LUO1G5fO;dQ`O7+%VO;dQ`O1G0VOOQO1G0b1G0bO$}QdO1G0bO%CiQ(ChO1G0bO%CtQ(ChO1G0bO!0`Q!bO1G0VO$%_Q,UO1G0VO%DSQ,UO1G0VO%DaQ(DjO1G0bO%D{Q,UO1G0VO$%_Q,UO1G0bO%E]Q,UO1G0bO%EvQ(ChO1G0bOOQO1G0V1G0VO%F[Q(C|O1G0bOOQ(C[<VQdO,5iQ!LVO7+'qO&@_Q&kOG26wOOQO<wAN>wO;dQ`OAN>wO$}QdOAN?SO!0`Q!bOAN>wO&ATQ(ChOAN?SO$%_Q,UOAN>wO&A`Q(ChOAN?SOOQS!$(!P!$(!PO$(iQ`O!$(!PO&AnQ(C}OG26wOOQ(CWG26lG26lOOQO<SO!T+rO!U'wX~O!U+tO~O!_+kO#T+jO!T#]X!U#]X~O!T+uO!U(TX~O!U+wO~O]&VOl&VO{+nO'k$vO's)TO~O!Z+xO![+xO~P!AQO_+}O!U,PO!Y,QO!Z+|O![+|O!u;WO!y,UO!z,SO!{,TO!|,RO#P,VO#Q,VO'|+zO~P!AQOP,[O!V&cO!q,ZO~Oo,aO~O!Q&ua!T&ua~P!-RO!S,eO!Q&uX!T&uX~P$}O!T&rO!Q'va~O!Q'va~P?WO!T&yO!Q(Ra~O{%WO!S,iO!V%XO'j$tO!Q&{X!T&{X~O!T'WO!e(Oa~O{%WO!V%XO#_,lO'j$tO~O#T,nO!T(Pa!e(Pa_(Pa'e(Pa~O!_#UO~P!DvO{%WO!S,qO!V%XO!uXO#^,sO#_,qO'j$tO!T&}X!e&}X~Oy,wO!f#XO~OP,{O!V&cO!q,zO%],yO'n$bO~O_#Wi!T#Wi'e#Wi'a#Wi!Q#Wi!e#Wio#Wi!V#Wi%]#Wi!_#Wi~P!-ROP=mOx(mO{(nO(U(pO(V(rO~O#`#Sa!T#Sa!e#Sa#T#Sa!V#Sa_#Sa'e#Sa!Q#Sa~P!G[O!d#WOP'qXx'qX{'qX(U'qX(V'qXQ'qXZ'qXk'qXy'qX!T'qX!c'qX!f'qX!l'qX#c'qX#d'qX#e'qX#f'qX#g'qX#h'qX#i'qX#j'qX#k'qX#m'qX#o'qX#q'qX#r'qX'r'qX'}'qX~O#`'qX_'qX'e'qX!e'qX!Q'qX'a'qX!V'qX#T'qXo'qX%]'qX!_'qX~P!HZO!T-UOe'yX~P!&VOe-WO~O!T-XO!e'zX~P!-RO!e-[O~O!Q-^O~OQ#lOx#YOy#ZO{#[O!d#WO!f#XO!l#lO'rROZ#bi_#bik#bi!T#bi!c#bi#d#bi#e#bi#f#bi#g#bi#h#bi#i#bi#j#bi#k#bi#m#bi#o#bi#q#bi#r#bi'e#bi'}#bi(U#bi(V#bi'a#bi!Q#bi!e#bio#bi!V#bi%]#bi!_#bi~O#c#bi~P!KrO#c#_O~P!KrOQ#lOx#YOy#ZO{#[O!d#WO!f#XO!l#lO#c#_O#d#`O#e#`O#f#`O'rROZ#bi_#bi!T#bi!c#bi#g#bi#h#bi#i#bi#j#bi#k#bi#m#bi#o#bi#q#bi#r#bi'e#bi'}#bi(U#bi(V#bi'a#bi!Q#bi!e#bio#bi!V#bi%]#bi!_#bi~Ok#bi~P!NdOk#aO~P!NdOQ#lOk#aOx#YOy#ZO{#[O!d#WO!f#XO!l#lO#c#_O#d#`O#e#`O#f#`O#g#bO'rRO_#bi!T#bi#m#bi#o#bi#q#bi#r#bi'e#bi'}#bi(U#bi(V#bi'a#bi!Q#bi!e#bio#bi!V#bi%]#bi!_#bi~OZ#bi!c#bi#h#bi#i#bi#j#bi#k#bi~P##UOZ#sO!c#cO#h#cO#i#cO#j#rO#k#cO~P##UOQ#lOZ#sOk#aOx#YOy#ZO{#[O!c#cO!d#WO!f#XO!l#lO#c#_O#d#`O#e#`O#f#`O#g#bO#h#cO#i#cO#j#rO#k#cO#m#dO'rRO_#bi!T#bi#o#bi#q#bi#r#bi'e#bi'}#bi(V#bi'a#bi!Q#bi!e#bio#bi!V#bi%]#bi!_#bi~O(U#bi~P#&VO(U#]O~P#&VOQ#lOZ#sOk#aOx#YOy#ZO{#[O!c#cO!d#WO!f#XO!l#lO#c#_O#d#`O#e#`O#f#`O#g#bO#h#cO#i#cO#j#rO#k#cO#m#dO#o#fO'rRO(U#]O_#bi!T#bi#q#bi#r#bi'e#bi'}#bi'a#bi!Q#bi!e#bio#bi!V#bi%]#bi!_#bi~O(V#bi~P#(wO(V#^O~P#(wOQ#lOZ#sOk#aOx#YOy#ZO{#[O!c#cO!d#WO!f#XO!l#lO#c#_O#d#`O#e#`O#f#`O#g#bO#h#cO#i#cO#j#rO#k#cO#m#dO#o#fO#q#hO'rRO(U#]O(V#^O~O_#bi!T#bi#r#bi'e#bi'}#bi'a#bi!Q#bi!e#bio#bi!V#bi%]#bi!_#bi~P#+iOQ[XZ[Xk[Xx[Xy[X{[X!c[X!d[X!f[X!l[X#T[X#`dX#c[X#d[X#e[X#f[X#g[X#h[X#i[X#j[X#k[X#m[X#o[X#q[X#r[X#w[X'r[X'}[X(U[X(V[X!T[X!U[X~O#u[X~P#.SOQ#lOZ;mOk;aOx#YOy#ZO{#[O!c;cO!d#WO!f#XO!l#lO#c;_O#d;`O#e;`O#f;`O#g;bO#h;cO#i;cO#j;lO#k;cO#m;dO#o;fO#q;hO#r;iO'rRO'}#jO(U#]O(V#^O~O#u-`O~P#0aOQ'uXZ'uXk'uXx'uXy'uX{'uX!c'uX!d'uX!f'uX!l'uX#c'uX#d'uX#e'uX#f'uX#g'uX#h'uX#i'uX#j'uX#m'uX#o'uX#q'uX#r'uX'r'uX'}'uX(U'uX(V'uX!T'uX~O#T;nO#w;nO#k'uX#u'uX!U'uX~P#2_O_'Qa!T'Qa'e'Qa'a'Qa!e'Qao'Qa!Q'Qa!V'Qa%]'Qa!_'Qa~P!-ROQ#biZ#bi_#bik#biy#bi!T#bi!c#bi!d#bi!f#bi!l#bi#c#bi#d#bi#e#bi#f#bi#g#bi#h#bi#i#bi#j#bi#k#bi#m#bi#o#bi#q#bi#r#bi'e#bi'r#bi'}#bi'a#bi!Q#bi!e#bio#bi!V#bi%]#bi!_#bi~P!G[O_#vi!T#vi'e#vi'a#vi!Q#vi!e#vio#vi!V#vi%]#vi!_#vi~P!-RO$S-cO$U-cO~O$S-dO$U-dO~O!_(VO#T-eO!V$YX$P$YX$S$YX$U$YX$]$YX~O!S-fO~O!V(YO$P-hO$S(XO$U(XO$]-iO~O!T;jO!U'tX~P#0aO!U-jO~O$]-lO~OS(hO'c(iO'd-oO~O]-rOl-rO!Q-sO~O!TdX!_dX!edX!e$oX'}dX~P!$|O!e-yO~P!G[O!T-zO!_#UO'}'SO!e([X~O!e.PO~O!S(yO'j$tO!e([P~O#`.RO~O!Q$oX!T$oX!_$vX~P!$|O!T.SO!Q(]X~P!G[O!_.UO~O!Q.WO~Ok.[O!_#UO!f$mO'n$bO'}'SO~O'j.^O~O!_)yO~O_$pO!T.bO'e$pO~O!U.dO~P!(wO!Z.eO![.eO'k$vO's)TO~O{.gO's)TO~O#P.hO~O'j%^Oe'VX!T'VX~O!T)dOe'oa~Oe.mO~Ox.nOy.nO{.oOPua(Uua(Vua!Tua#Tua~Oeua#uua~P#>mOx(mO{(nOP$ha(U$ha(V$ha!T$ha#T$ha~Oe$ha#u$ha~P#?cOx(mO{(nOP$ja(U$ja(V$ja!T$ja#T$ja~Oe$ja#u$ja~P#@UO].pO~O#`.qO~Oe$xa!T$xa#T$xa#u$xa~P!&VO#`.tO~OP,{O!V&cO!q,zO%],yO~O]$SOk$TOl$SOm$SOr$dOt$eOv;oO{$[O!V$]O!a=`O!f$XO#_;xO#|$iO$i;rO$k;uO$n$jO'n$bO'r$UO~Oi.{O'j.zO~P#AvO!_)yO!V'ma_'ma!T'ma'e'ma~O#`/RO~OZ[X!TdX!UdX~O!T/SO!U(dX~O!U/UO~OZ/VO~O]/XO'j*RO~O!V%OO'j$tO^'_X!T'_X~O!T*WO^(ca~O!e/[O~P!-RO]/^O~OZ/_O~O^/`O~O!T*dO_(`a'e(`a~O#T/fO~OP/iO!V$]O~O's'lO!U(aP~OP/sO!V/oO!q/rO%]/qO'n$bO~OZ/}O!T/{O!U(bX~O!U0OO~O^0QO_$pO'e$pO~O]0RO~O]0SO'j!|O~O#k0TO%}0UO~P1nO#T#tO#k0TO%}0UO~O_0VO~P$}O_0XO~O&W0]OQ&UiR&UiX&Ui]&Ui_&Uib&Uic&Uii&Uik&Uil&Uim&Uir&Uit&Uiv&Ui{&Ui!O&Ui!P&Ui!V&Ui!a&Ui!f&Ui!i&Ui!j&Ui!k&Ui!l&Ui!m&Ui!p&Ui!u&Ui#l&Ui#|&Ui$Q&Ui%[&Ui%^&Ui%`&Ui%a&Ui%d&Ui%f&Ui%i&Ui%j&Ui%l&Ui%y&Ui&P&Ui&R&Ui&T&Ui&V&Ui&Y&Ui&`&Ui&f&Ui&h&Ui&j&Ui&l&Ui&n&Ui'a&Ui'j&Ui'r&Ui'|&Ui(Z&Ui!U&Ui`&Ui&]&Ui~O`0cO!U0aO&]0bO~P`O!VTO!f0eO~O&d+aOQ&_iR&_iX&_i]&_i_&_ib&_ic&_ii&_ik&_il&_im&_ir&_it&_iv&_i{&_i!O&_i!P&_i!V&_i!a&_i!f&_i!i&_i!j&_i!k&_i!l&_i!m&_i!p&_i!u&_i#l&_i#|&_i$Q&_i%[&_i%^&_i%`&_i%a&_i%d&_i%f&_i%i&_i%j&_i%l&_i%y&_i&P&_i&R&_i&T&_i&V&_i&Y&_i&`&_i&f&_i&h&_i&j&_i&l&_i&n&_i'a&_i'j&_i'r&_i'|&_i(Z&_i!U&_i&W&_i`&_i&]&_i~O!Q0kO~O!T!Xa!U!Xa~P#0aO!S0rO!Y&bO!Z&ZO![&ZO!T&vX!U&vX~P!AQO!T+rO!U'wa~O!T&|X!U&|X~P!2fO!T+uO!U(Ta~O!Y0{O!Z0zO![0zO!u;WO!y1OO!z0}O!{0}O!|0|O#P1PO#Q1PO'|+zO~P!AQO_$pO!_#UO!f$mO!l1UO#T1SO'e$pO'n$bO'}'SO~O]&VOl&VO{+nO's)TO'|+zO~O_+}O!U1XO!Y,QO!Z+|O![+|O!u;WO!y,UO!z,SO!{,TO!|,RO#P,VO#Q,VO'|+zO~P!AQO!Z0zO![0zO'|+zO~P!AQO!Y0{O!Z0zO![0zO'|+zO~P!AQO!VTO!Y0{O!Z0zO![0zO!|0|O#P1PO#Q1PO'|+zO~P!AQO!Y0{O!Z0zO![0zO!z0}O!{0}O!|0|O#P1PO#Q1PO'|+zO~P!AQO!V&cO~O!V&cO~P!G[O!T#pOo$ga~O!Q&ui!T&ui~P!-RO!T&rO!Q'vi~O!T&yO!Q(Ri~O!Q(Si!T(Si~P!-RO!T'WO!e(Oi~O!T(Pi!e(Pi_(Pi'e(Pi~P!-RO#T1eO!T(Pi!e(Pi_(Pi'e(Pi~O{%WO!V%XO!uXO#^1hO#_1gO'j$tO~O{%WO!V%XO#_1gO'j$tO~OP1pO!V&cO!q1oO%]1nO~OP1pO!V&cO!q1oO%]1nO'n$bO~O#`uaQuaZua_uakua!cua!dua!fua!lua#cua#dua#eua#fua#gua#hua#iua#jua#kua#mua#oua#qua#rua'eua'rua'}ua!eua!Qua'aua!Vuaoua%]ua!_ua~P#>mO#`$haQ$haZ$ha_$hak$hay$ha!c$ha!d$ha!f$ha!l$ha#c$ha#d$ha#e$ha#f$ha#g$ha#h$ha#i$ha#j$ha#k$ha#m$ha#o$ha#q$ha#r$ha'e$ha'r$ha'}$ha!e$ha!Q$ha'a$ha!V$hao$ha%]$ha!_$ha~P#?cO#`$jaQ$jaZ$ja_$jak$jay$ja!c$ja!d$ja!f$ja!l$ja#c$ja#d$ja#e$ja#f$ja#g$ja#h$ja#i$ja#j$ja#k$ja#m$ja#o$ja#q$ja#r$ja'e$ja'r$ja'}$ja!e$ja!Q$ja'a$ja!V$jao$ja%]$ja!_$ja~P#@UO#`$xaQ$xaZ$xa_$xak$xay$xa!T$xa!c$xa!d$xa!f$xa!l$xa#c$xa#d$xa#e$xa#f$xa#g$xa#h$xa#i$xa#j$xa#k$xa#m$xa#o$xa#q$xa#r$xa'e$xa'r$xa'}$xa!e$xa!Q$xa'a$xa!V$xa#T$xao$xa%]$xa!_$xa~P!G[O_#Wq!T#Wq'e#Wq'a#Wq!Q#Wq!e#Wqo#Wq!V#Wq%]#Wq!_#Wq~P!-ROe&wX!T&wX~PKhO!T-UOe'ya~O!S1xO!T&xX!e&xX~P$}O!T-XO!e'za~O!T-XO!e'za~P!-RO!Q1{O~O#u!ha!U!ha~PBtO#u!`a!T!`a!U!`a~P#0aO!V2^O$QbO$Z2_O~O!U2cO~Oo2dO~P!G[O_$dq!T$dq'e$dq'a$dq!Q$dq!e$dqo$dq!V$dq%]$dq!_$dq~P!-RO!Q2eO~O]-rOl-rO~Ox(mO{(nO(V(rOP%Ti(U%Ti!T%Ti#T%Ti~Oe%Ti#u%Ti~P$9POx(mO{(nOP%Vi(U%Vi(V%Vi!T%Vi#T%Vi~Oe%Vi#u%Vi~P$9rO'}#jO~P!G[O!S2hO'j$tO!T'RX!e'RX~O!T-zO!e([a~O!T-zO!_#UO!e([a~O!T-zO!_#UO'}'SO!e([a~Oe$qi!T$qi#T$qi#u$qi~P!&VO!S2pO'j)OO!Q'TX!T'TX~P!&tO!T.SO!Q(]a~O!T.SO!Q(]a~P!G[O!_#UO~O!_#UO#k2xO~Ok2{O!_#UO'}'SO~Oe'pi!T'pi~P!&VO#T3OOe'pi!T'pi~P!&VO!e3RO~O_$eq!T$eq'e$eq'a$eq!Q$eq!e$eqo$eq!V$eq%]$eq!_$eq~P!-RO!T3VO!V(^X~P!G[O!V&cO%]1nO~O!V&cO%]1nO~P!G[O!V$oX%Q[X_$oX!T$oX'e$oX~P!$|O%Q3XOPhXxhX{hX!VhX(UhX(VhX_hX!ThX'ehX~O%Q3XO~O]3_O%^3`O'j*RO!T'^X!U'^X~O!T/SO!U(da~OZ3dO~O^3eO~O]3hO~O!Q3iO~O_$pO'e$pO~P!G[O!V$]O~P!G[O!T3nO#T3pO!U(aX~O!U3qO~O]&VOl&VO{3sO!Y4OO!Z3wO![3wO!u;WO!y3}O!z3|O!{3|O#P3{O#Q,VO'k$vO's)TO'|+zO~O!U3zO~P$BTOP4VO!V/oO!q4UO%]4TO~OP4VO!V/oO!q4UO%]4TO'n$bO~O'j!|O!T']X!U']X~O!T/{O!U(ba~O]4aO's4`O~O]4bO~O^4dO~O!e4gO~P$}O_4iO~O_4iO~P$}O#k4kO%}4lO~PExO`0cO!U4pO&]0bO~P`O!_4rO~O!_4tO!T'xi!U'xi!_'xi!f'xi'n'xi~O!T#]i!U#]i~P#0aO#T4uO!T#]i!U#]i~O!T!Xi!U!Xi~P#0aO!Q4vO~O]!tal!ta!Y!ta!Z!ta![!ta!y!ta!z!ta!{!ta!|!ta#P!ta#Q!ta'k!ta's!ta'|!ta~PGQO_$pO!_#UO!f$mO!l5OO#T4|O'e$pO'n$bO'}'SO~O!Z5QO![5QO'|+zO~P!AQO!Y5RO!Z5QO![5QO'|+zO~P!AQO!Y5RO!Z5QO![5QO!|5TO#P5UO#Q5UO'|+zO~P!AQO!Y5RO!Z5QO![5QO!z5VO!{5VO!|5TO#P5UO#Q5UO'|+zO~P!AQO_$pO#T4|O'e$pO~O_$pO!_#UO#T4|O'e$pO~O_$pO!_#UO!l5OO#T4|O'e$pO'}'SO~O!T'WO!e(Oq~O!T(Pq!e(Pq_(Pq'e(Pq~P!-RO{%WO!V%XO#_5aO'j$tO~O!V&cO%]5cO~O!V&cO%]5cO~P!G[OP5hO!V&cO!q5gO%]5cO~O#`%TiQ%TiZ%Ti_%Tik%Tiy%Ti!c%Ti!d%Ti!f%Ti!l%Ti#c%Ti#d%Ti#e%Ti#f%Ti#g%Ti#h%Ti#i%Ti#j%Ti#k%Ti#m%Ti#o%Ti#q%Ti#r%Ti'e%Ti'r%Ti'}%Ti!e%Ti!Q%Ti'a%Ti!V%Tio%Ti%]%Ti!_%Ti~P$9PO#`%ViQ%ViZ%Vi_%Vik%Viy%Vi!c%Vi!d%Vi!f%Vi!l%Vi#c%Vi#d%Vi#e%Vi#f%Vi#g%Vi#h%Vi#i%Vi#j%Vi#k%Vi#m%Vi#o%Vi#q%Vi#r%Vi'e%Vi'r%Vi'}%Vi!e%Vi!Q%Vi'a%Vi!V%Vio%Vi%]%Vi!_%Vi~P$9rO#`$qiQ$qiZ$qi_$qik$qiy$qi!T$qi!c$qi!d$qi!f$qi!l$qi#c$qi#d$qi#e$qi#f$qi#g$qi#h$qi#i$qi#j$qi#k$qi#m$qi#o$qi#q$qi#r$qi'e$qi'r$qi'}$qi!e$qi!Q$qi'a$qi!V$qi#T$qio$qi%]$qi!_$qi~P!G[Oe&wa!T&wa~P!&VO!T&xa!e&xa~P!-RO!T-XO!e'zi~O#u#Wi!T#Wi!U#Wi~P#0aOQ#lOx#YOy#ZO{#[O!d#WO!f#XO!l#lO'rROZ#bik#bi!c#bi#d#bi#e#bi#f#bi#g#bi#h#bi#i#bi#j#bi#k#bi#m#bi#o#bi#q#bi#r#bi#u#bi'}#bi(U#bi(V#bi!T#bi!U#bi~O#c#bi~P%&nO#c;_O~P%&nOQ#lOx#YOy#ZO{#[O!d#WO!f#XO!l#lO#c;_O#d;`O#e;`O#f;`O'rROZ#bi!c#bi#g#bi#h#bi#i#bi#j#bi#k#bi#m#bi#o#bi#q#bi#r#bi#u#bi'}#bi(U#bi(V#bi!T#bi!U#bi~Ok#bi~P%(yOk;aO~P%(yOQ#lOk;aOx#YOy#ZO{#[O!d#WO!f#XO!l#lO#c;_O#d;`O#e;`O#f;`O#g;bO'rRO#m#bi#o#bi#q#bi#r#bi#u#bi'}#bi(U#bi(V#bi!T#bi!U#bi~OZ#bi!c#bi#h#bi#i#bi#j#bi#k#bi~P%+UOZ;mO!c;cO#h;cO#i;cO#j;lO#k;cO~P%+UOQ#lOZ;mOk;aOx#YOy#ZO{#[O!c;cO!d#WO!f#XO!l#lO#c;_O#d;`O#e;`O#f;`O#g;bO#h;cO#i;cO#j;lO#k;cO#m;dO'rRO#o#bi#q#bi#r#bi#u#bi'}#bi(V#bi!T#bi!U#bi~O(U#bi~P%-pO(U#]O~P%-pOQ#lOZ;mOk;aOx#YOy#ZO{#[O!c;cO!d#WO!f#XO!l#lO#c;_O#d;`O#e;`O#f;`O#g;bO#h;cO#i;cO#j;lO#k;cO#m;dO#o;fO'rRO(U#]O#q#bi#r#bi#u#bi'}#bi!T#bi!U#bi~O(V#bi~P%/{O(V#^O~P%/{OQ#lOZ;mOk;aOx#YOy#ZO{#[O!c;cO!d#WO!f#XO!l#lO#c;_O#d;`O#e;`O#f;`O#g;bO#h;cO#i;cO#j;lO#k;cO#m;dO#o;fO#q;hO'rRO(U#]O(V#^O~O#r#bi#u#bi'}#bi!T#bi!U#bi~P%2WO_#sy!T#sy'e#sy'a#sy!Q#sy!e#syo#sy!V#sy%]#sy!_#sy~P!-ROP=oOx(mO{(nO(U(pO(V(rO~OQ#biZ#bik#biy#bi!c#bi!d#bi!f#bi!l#bi#c#bi#d#bi#e#bi#f#bi#g#bi#h#bi#i#bi#j#bi#k#bi#m#bi#o#bi#q#bi#r#bi#u#bi'r#bi'}#bi!T#bi!U#bi~P%5OO#u'qX!U'qX~P!HZO#u#vi!T#vi!U#vi~P#0aO!U5tO~O!T'Qa!U'Qa~P#0aO!_#UO'}'SO!T'Ra!e'Ra~O!T-zO!e([i~O!T-zO!_#UO!e([i~Oe$qq!T$qq#T$qq#u$qq~P!&VO!Q'Ta!T'Ta~P!G[O!_5{O~O!T.SO!Q(]i~P!G[O!T.SO!Q(]i~O!Q6PO~O!_#UO#k6UO~Ok6VO!_#UO'}'SO~O!Q6XO~Oe$sq!T$sq#T$sq#u$sq~P!&VO_$ey!T$ey'e$ey'a$ey!Q$ey!e$eyo$ey!V$ey%]$ey!_$ey~P!-RO!T3VO!V(^a~O_#Wy!T#Wy'e#Wy'a#Wy!Q#Wy!e#Wyo#Wy!V#Wy%]#Wy!_#Wy~P!-ROZ6^O~O]6`O'j*RO~O!T/SO!U(di~O]6cO~O^6dO~O!_4tO~O's'lO!T'YX!U'YX~O!T3nO!U(aa~O!f$mO'n$bO_'xX!_'xX!l'xX#T'xX'e'xX'}'xX~O'j6mO~P,RO!u;WO!y6oO!z6nO!{6nO#P1PO#Q1PO~P$%_O_$pO!_#UO!l1UO#T1SO'e$pO'}'SO~O!U6rO~P$BTO]&VOl&VO{6sO's)TO'|+zO~O!Y6wO!Z6vO![6vO#P1PO#Q1PO'|+zO~P!AQO!Y6wO!Z6vO![6vO!z6xO!{6xO#P1PO#Q1PO'|+zO~P!AQO!Z6vO![6vO'k$vO's)TO'|+zO~O!V/oO~O!V/oO%]6zO~O!V/oO%]6zO~P!G[OP7PO!V/oO!q7OO%]6zO~OZ7UO!T']a!U']a~O!T/{O!U(bi~O]7XO~O!e7YO~O!e7ZO~O!e7[O~O!e7[O~P$}O_7^O~O!_7aO~O!e7bO~O!T(Si!U(Si~P#0aO_$pO#T7iO'e$pO~O_$pO!_#UO#T7iO'e$pO~O!Z7mO![7mO'|+zO~P!AQO_$pO!_#UO!f$mO!l7nO#T7iO'e$pO'n$bO'}'SO~O!Y7oO!Z7mO![7mO'|+zO~P!AQO!Y7oO!Z7mO![7mO!|7rO#P7sO#Q7sO'|+zO~P!AQO_$pO!_#UO!l7nO#T7iO'e$pO'}'SO~O_$pO'e$pO~P!-RO!T'WO!e(Oy~O!T(Py!e(Py_(Py'e(Py~P!-RO!V&cO%]7xO~O!V&cO%]7xO~P!G[O#`$qqQ$qqZ$qq_$qqk$qqy$qq!T$qq!c$qq!d$qq!f$qq!l$qq#c$qq#d$qq#e$qq#f$qq#g$qq#h$qq#i$qq#j$qq#k$qq#m$qq#o$qq#q$qq#r$qq'e$qq'r$qq'}$qq!e$qq!Q$qq'a$qq!V$qq#T$qqo$qq%]$qq!_$qq~P!G[O#`$sqQ$sqZ$sq_$sqk$sqy$sq!T$sq!c$sq!d$sq!f$sq!l$sq#c$sq#d$sq#e$sq#f$sq#g$sq#h$sq#i$sq#j$sq#k$sq#m$sq#o$sq#q$sq#r$sq'e$sq'r$sq'}$sq!e$sq!Q$sq'a$sq!V$sq#T$sqo$sq%]$sq!_$sq~P!G[O!T&xi!e&xi~P!-RO#u#Wq!T#Wq!U#Wq~P#0aOx.nOy.nO{.oOPua(Uua(Vua!Uua~OQuaZuakua!cua!dua!fua!lua#cua#dua#eua#fua#gua#hua#iua#jua#kua#mua#oua#qua#rua#uua'rua'}ua!Tua~P%LmOx(mO{(nOP$ha(U$ha(V$ha!U$ha~OQ$haZ$hak$hay$ha!c$ha!d$ha!f$ha!l$ha#c$ha#d$ha#e$ha#f$ha#g$ha#h$ha#i$ha#j$ha#k$ha#m$ha#o$ha#q$ha#r$ha#u$ha'r$ha'}$ha!T$ha~P%NtOx(mO{(nOP$ja(U$ja(V$ja!U$ja~OQ$jaZ$jak$jay$ja!c$ja!d$ja!f$ja!l$ja#c$ja#d$ja#e$ja#f$ja#g$ja#h$ja#i$ja#j$ja#k$ja#m$ja#o$ja#q$ja#r$ja#u$ja'r$ja'}$ja!T$ja~P&!{OQ$xaZ$xak$xay$xa!c$xa!d$xa!f$xa!l$xa#c$xa#d$xa#e$xa#f$xa#g$xa#h$xa#i$xa#j$xa#k$xa#m$xa#o$xa#q$xa#r$xa#u$xa'r$xa'}$xa!T$xa!U$xa~P%5OO#u$dq!T$dq!U$dq~P#0aO#u$eq!T$eq!U$eq~P#0aO!U8RO~O#u8SO~P!&VO!_#UO!T'Ri!e'Ri~O!_#UO'}'SO!T'Ri!e'Ri~O!T-zO!e([q~O!Q'Ti!T'Ti~P!G[O!T.SO!Q(]q~O!Q8YO~P!G[O!Q8YO~Oe'py!T'py~P!&VO!T'Wa!V'Wa~P!G[O!V%Pq_%Pq!T%Pq'e%Pq~P!G[OZ8_O~O!T/SO!U(dq~O]8bO~O#T8cO!T'Ya!U'Ya~O!T3nO!U(ai~P#0aOQ[XZ[Xk[Xx[Xy[X{[X!Q[X!T[X!c[X!d[X!f[X!l[X#T[X#`dX#c[X#d[X#e[X#f[X#g[X#h[X#i[X#j[X#k[X#m[X#o[X#q[X#r[X#w[X'r[X'}[X(U[X(V[X~O!_$}X#k$}X~P&*pO#P5UO#Q5UO~P$%_O!z8gO!{8gO#P5UO#Q5UO~P$%_O!Z8jO![8jO'k$vO's)TO'|+zO~O!Y8mO!Z8jO![8jO#P5UO#Q5UO'|+zO~P!AQO!V/oO%]8pO~O!V/oO%]8pO~P!G[O]8wO's8vO~O!T/{O!U(bq~O!e8yO~O!e8yO~P$}O!e8{O~O!e8|O~O#T9OO!T#]y!U#]y~O!T#]y!U#]y~P#0aO_$pO#T9RO'e$pO~O_$pO!_#UO#T9RO'e$pO~O!Z9WO![9WO'|+zO~P!AQO_$pO!_#UO!l9XO#T9RO'e$pO'}'SO~O!f$mO'n$bO~P&0|O!Y9YO!Z9WO![9WO'|+zO~P!AQO!V&cO%]9^O~O!V&cO%]9^O~P!G[O#u#sy!T#sy!U#sy~P#0aOQ$qiZ$qik$qiy$qi!c$qi!d$qi!f$qi!l$qi#c$qi#d$qi#e$qi#f$qi#g$qi#h$qi#i$qi#j$qi#k$qi#m$qi#o$qi#q$qi#r$qi#u$qi'r$qi'}$qi!T$qi!U$qi~P%5OOx(mO{(nO(V(rOP%Ti(U%Ti!U%Ti~OQ%TiZ%Tik%Tiy%Ti!c%Ti!d%Ti!f%Ti!l%Ti#c%Ti#d%Ti#e%Ti#f%Ti#g%Ti#h%Ti#i%Ti#j%Ti#k%Ti#m%Ti#o%Ti#q%Ti#r%Ti#u%Ti'r%Ti'}%Ti!T%Ti~P&4cOx(mO{(nOP%Vi(U%Vi(V%Vi!U%Vi~OQ%ViZ%Vik%Viy%Vi!c%Vi!d%Vi!f%Vi!l%Vi#c%Vi#d%Vi#e%Vi#f%Vi#g%Vi#h%Vi#i%Vi#j%Vi#k%Vi#m%Vi#o%Vi#q%Vi#r%Vi#u%Vi'r%Vi'}%Vi!T%Vi~P&6jO#u$ey!T$ey!U$ey~P#0aO#u#Wy!T#Wy!U#Wy~P#0aO!_#UO!T'Rq!e'Rq~O!T-zO!e([y~O!Q'Tq!T'Tq~P!G[O!Q9dO~P!G[O!T/SO!U(dy~O!T3nO!U(aq~O#P7sO#Q7sO~P$%_O!Z9nO![9nO'k$vO's)TO'|+zO~O!V/oO%]9qO~O!V/oO%]9qO~P!G[O!e9tO~O_$pO#T9zO'e$pO~O_$pO!_#UO#T9zO'e$pO~O!Z9}O![9}O'|+zO~P!AQO_$pO!_#UO!l:OO#T9zO'e$pO'}'SO~OQ$qqZ$qqk$qqy$qq!c$qq!d$qq!f$qq!l$qq#c$qq#d$qq#e$qq#f$qq#g$qq#h$qq#i$qq#j$qq#k$qq#m$qq#o$qq#q$qq#r$qq#u$qq'r$qq'}$qq!T$qq!U$qq~P%5OOQ$sqZ$sqk$sqy$sq!c$sq!d$sq!f$sq!l$sq#c$sq#d$sq#e$sq#f$sq#g$sq#h$sq#i$sq#j$sq#k$sq#m$sq#o$sq#q$sq#r$sq#u$sq'r$sq'}$sq!T$sq!U$sq~P%5OOe%X!Z!T%X!Z#T%X!Z#u%X!Z~P!&VO!T'Yq!U'Yq~P#0aO!T#]!Z!U#]!Z~P#0aO_$pO#T:aO'e$pO~O_$pO!_#UO#T:aO'e$pO~O#`%X!ZQ%X!ZZ%X!Z_%X!Zk%X!Zy%X!Z!T%X!Z!c%X!Z!d%X!Z!f%X!Z!l%X!Z#c%X!Z#d%X!Z#e%X!Z#f%X!Z#g%X!Z#h%X!Z#i%X!Z#j%X!Z#k%X!Z#m%X!Z#o%X!Z#q%X!Z#r%X!Z'e%X!Z'r%X!Z'}%X!Z!e%X!Z!Q%X!Z'a%X!Z!V%X!Z#T%X!Zo%X!Z%]%X!Z!_%X!Z~P!G[O_$pO#T:oO'e$pO~OP=nOx(mO{(nO(U(pO(V(rO~O]#Sal#Sa!U#Sa!Y#Sa!Z#Sa![#Sa!u#Sa!y#Sa!z#Sa!{#Sa#P#Sa#Q#Sa'k#Sa's#Sa'|#Sa~P&D[OQ%X!ZZ%X!Zk%X!Zy%X!Z!c%X!Z!d%X!Z!f%X!Z!l%X!Z#c%X!Z#d%X!Z#e%X!Z#f%X!Z#g%X!Z#h%X!Z#i%X!Z#j%X!Z#k%X!Z#m%X!Z#o%X!Z#q%X!Z#r%X!Z#u%X!Z'r%X!Z'}%X!Z!T%X!Z!U%X!Z~P%5OO]ualua!Yua!Zua![ua!uua!yua!zua!{ua#Pua#Qua'kua'sua'|ua~P%LmO]$hal$ha!Y$ha!Z$ha![$ha!u$ha!y$ha!z$ha!{$ha#P$ha#Q$ha'k$ha's$ha'|$ha~P%NtO]$jal$ja!Y$ja!Z$ja![$ja!u$ja!y$ja!z$ja!{$ja#P$ja#Q$ja'k$ja's$ja'|$ja~P&!{O]$xal$xa!U$xa!Y$xa!Z$xa![$xa!u$xa!y$xa!z$xa!{$xa#P$xa#Q$xa'k$xa's$xa'|$xa~P&D[O]%Til%Ti!Y%Ti!Z%Ti![%Ti!u%Ti!y%Ti!z%Ti!{%Ti#P%Ti#Q%Ti'k%Ti's%Ti'|%Ti~P&4cO]%Vil%Vi!Y%Vi!Z%Vi![%Vi!u%Vi!y%Vi!z%Vi!{%Vi#P%Vi#Q%Vi'k%Vi's%Vi'|%Vi~P&6jO]$qil$qi!U$qi!Y$qi!Z$qi![$qi!u$qi!y$qi!z$qi!{$qi#P$qi#Q$qi'k$qi's$qi'|$qi~P&D[O]$qql$qq!U$qq!Y$qq!Z$qq![$qq!u$qq!y$qq!z$qq!{$qq#P$qq#Q$qq'k$qq's$qq'|$qq~P&D[O]$sql$sq!U$sq!Y$sq!Z$sq![$sq!u$sq!y$sq!z$sq!{$sq#P$sq#Q$sq'k$sq's$sq'|$sq~P&D[O]%X!Zl%X!Z!U%X!Z!Y%X!Z!Z%X!Z![%X!Z!u%X!Z!y%X!Z!z%X!Z!{%X!Z#P%X!Z#Q%X!Z'k%X!Z's%X!Z'|%X!Z~P&D[Oo'tX~P/WO!QdX!TdX#TdX~P&*pOQ[XZ[Xk[Xx[Xy[X{[X!T[X!TdX!c[X!d[X!f[X!l[X#T[X#TdX#`dX#c[X#d[X#e[X#f[X#g[X#h[X#i[X#j[X#k[X#m[X#o[X#q[X#r[X#w[X'r[X'}[X(U[X(V[X~O!_dX!e[X!edX'}dX~P'$ZOQ;VOR;VO]gOb=ZOc!`OigOk;VOlgOmgOrgOt;VOv;VO{SO!OgO!PgO!VTO!a;YO!fVO!i;VO!j;VO!k;VO!l;VO!m;VO!p!_O#|!bO$QbO'j'|O'rRO'|WO(Z=XO~O]$SOi$cOk$TOl$SOm$SOr$dOt$eOv;pO{$[O!V$]O!a=aO!f$XO#_;yO#|$iO$i;sO$k;vO$n$jO'j'dO'n$bO'r$UO~O!T;jO!U$ga~O]$SOi$cOk$TOl$SOm$SOr$dOt$eOv;qO{$[O!V$]O!a=bO!f$XO#_;zO#|$iO$i;tO$k;wO$n$jO'j'dO'n$bO'r$UO~O#l(TO~P'*^O!U[X!UdX~P'$ZO!_;^O~O#`;]O~O!_#UO#`;]O~O#T;nO~O#k;cO~O#T;{O!T(SX!U(SX~O#T;nO!T(QX!U(QX~O#`;|O~Oe TypeParamList TypeDefinition ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression await yield delete LogicOp BitOp ParenthesizedExpression ClassExpression class extends ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody MethodDeclaration AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression",maxTerm:345,context:Ca,nodeProps:[["closedBy",4,"InterpolationEnd",43,"]",53,"}",68,")",140,"JSXSelfCloseEndTag JSXEndTag",156,"JSXEndTag"],["group",-26,8,15,17,60,195,199,202,203,205,208,211,222,224,230,232,234,236,239,245,251,253,255,257,259,261,262,"Statement",-30,12,13,25,28,29,34,44,46,47,49,54,62,70,76,77,99,100,109,110,127,130,132,133,134,135,137,138,158,159,161,"Expression",-23,24,26,30,33,35,37,162,164,166,167,169,170,171,173,174,175,177,178,179,189,191,193,194,"Type",-3,81,92,98,"ClassItem"],["openedBy",31,"InterpolationStart",48,"[",52,"{",67,"(",139,"JSXStartTag",151,"JSXStartTag JSXStartCloseTag"]],propSources:[Ia],skippedNodes:[0,5,6],repeatNodeCount:29,tokenData:"#2k~R!bOX%ZXY%uYZ'kZ[%u[]%Z]^'k^p%Zpq%uqr(Rrs)mst7]tu9guvlxyJcyzJyz{Ka{|Lm|}MW}!OLm!O!PMn!P!Q!$v!Q!R!Er!R![!G_![!]!Nc!]!^!N{!^!_# c!_!`#!`!`!a##d!a!b#%s!b!c#'h!c!}9g!}#O#(O#O#P%Z#P#Q#(f#Q#R#(|#R#S9g#S#T#)g#T#o#)}#o#p#,w#p#q#,|#q#r#-j#r#s#.S#s$f%Z$f$g%u$g#BY9g#BY#BZ#.j#BZ$IS9g$IS$I_#.j$I_$I|9g$I|$I}#1X$I}$JO#1X$JO$JT9g$JT$JU#.j$JU$KV9g$KV$KW#.j$KW&FU9g&FU&FV#.j&FV;'S9g;'S;=`Rw!^%Z!_!`YU$`W#q&lO!^%Z!_!`s]$`W]&ZOY>lYZ?lZw>lwx,jx!^>l!^!_@|!_#O>l#O#PE_#P#o>l#o#p@|#p;'S>l;'S;=`J]<%lO>l,^?qX$`WOw?lwx+_x!^?l!^!_@^!_#o?l#o#p@^#p;'S?l;'S;=`@v<%lO?l,U@aTOw@^wx,Xx;'S@^;'S;=`@p<%lO@^,U@sP;=`<%l@^,^@yP;=`<%l?l1aARX]&ZOY@|YZ@^Zw@|wx-tx#O@|#O#PAn#P;'S@|;'S;=`EX<%lO@|1aAqUOw@|wxBTx;'S@|;'S;=`Dg;=`<%lBt<%lO@|1aB[W$Z,U]&ZOYBtZwBtwx/px#OBt#O#PCc#P;'SBt;'S;=`Da<%lOBt&ZByW]&ZOYBtZwBtwx/px#OBt#O#PCc#P;'SBt;'S;=`Da<%lOBt&ZCfRO;'SBt;'S;=`Co;=`OBt&ZCtX]&ZOYBtZwBtwx/px#OBt#O#PCc#P;'SBt;'S;=`Da;=`<%lBt<%lOBt&ZDdP;=`<%lBt1aDlX]&ZOYBtZwBtwx/px#OBt#O#PCc#P;'SBt;'S;=`Da;=`<%l@|<%lOBt1aE[P;=`<%l@|1iEdY$`WOw>lwxFSx!^>l!^!_@|!_#o>l#o#p@|#p;'S>l;'S;=`Ik;=`<%lBt<%lO>l1iF]]$Z,U$`W]&ZOYGUYZ%ZZwGUwx4hx!^GU!^!_Bt!_#OGU#O#PHU#P#oGU#o#pBt#p;'SGU;'S;=`Ie<%lOGU&cG]]$`W]&ZOYGUYZ%ZZwGUwx4hx!^GU!^!_Bt!_#OGU#O#PHU#P#oGU#o#pBt#p;'SGU;'S;=`Ie<%lOGU&cHZW$`WO!^GU!^!_Bt!_#oGU#o#pBt#p;'SGU;'S;=`Hs;=`<%lBt<%lOGU&cHxX]&ZOYBtZwBtwx/px#OBt#O#PCc#P;'SBt;'S;=`Da;=`<%lGU<%lOBt&cIhP;=`<%lGU1iIpX]&ZOYBtZwBtwx/px#OBt#O#PCc#P;'SBt;'S;=`Da;=`<%l>l<%lOBt1iJ`P;=`<%l>l,TJjT!f+{$`WO!^%Z!_#o%Z#p;'S%Z;'S;=`%o<%lO%Z$PKQT!e#w$`WO!^%Z!_#o%Z#p;'S%Z;'S;=`%o<%lO%Z)ZKjW$`W'k#e#f&lOz%Zz{LS{!^%Z!_!`q#P#Q!-n#Q#o!;l#o#p!6|#p;'S!;l;'S;=`!?i<%lO!;l7Z!q#P#Q!-n#Q#o!;l#o#p!6|#p;'S!;l;'S;=`!?i<%lO!;l7Z!={[$`WU7ROY!+TYZ%ZZ!^!+T!^!_!)o!_#O!+T#O#P!,O#P#Q!&V#Q#o!+T#o#p!)o#p;'S!+T;'S;=`!,p<%lO!+T7Z!>vZ$`WOY!;lYZ!.wZz!;lz{!Na[e]||-1},{term:311,get:e=>Ba[e]||-1},{term:65,get:e=>Ja[e]||-1}],tokenPrec:13429}),Ma=[m("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),m("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),m("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),m("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),m("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),m(`try { \${} } catch (\${error}) { \${} diff --git a/ui/dist/assets/ConfirmEmailChangeDocs.f5ffe149.js b/ui/dist/assets/ConfirmEmailChangeDocs.eaef2b04.js similarity index 97% rename from ui/dist/assets/ConfirmEmailChangeDocs.f5ffe149.js rename to ui/dist/assets/ConfirmEmailChangeDocs.eaef2b04.js index f5d711c2..6077947a 100644 --- a/ui/dist/assets/ConfirmEmailChangeDocs.f5ffe149.js +++ b/ui/dist/assets/ConfirmEmailChangeDocs.eaef2b04.js @@ -1,4 +1,4 @@ -import{S as Ce,i as $e,s as we,e as c,w as v,b as h,c as he,f as b,g as r,h as n,m as ve,x as Y,O as pe,P as Pe,k as Se,Q as Oe,n as Re,t as Z,a as x,o as f,d as ge,R as Te,C as Ee,p as ye,r as j,u as Be,N as qe}from"./index.d939dbbd.js";import{S as Ae}from"./SdkTabs.2a5180be.js";function ue(o,l,s){const a=o.slice();return a[5]=l[s],a}function be(o,l,s){const a=o.slice();return a[5]=l[s],a}function _e(o,l){let s,a=l[5].code+"",_,u,i,d;function p(){return l[4](l[5])}return{key:o,first:null,c(){s=c("button"),_=v(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){r(C,s,$),n(s,_),n(s,u),i||(d=Be(s,"click",p),i=!0)},p(C,$){l=C,$&4&&a!==(a=l[5].code+"")&&Y(_,a),$&6&&j(s,"active",l[1]===l[5].code)},d(C){C&&f(s),i=!1,d()}}}function ke(o,l){let s,a,_,u;return a=new qe({props:{content:l[5].body}}),{key:o,first:null,c(){s=c("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){r(i,s,d),ve(a,s,null),n(s,_),u=!0},p(i,d){l=i;const p={};d&4&&(p.content=l[5].body),a.$set(p),(!u||d&6)&&j(s,"active",l[1]===l[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&f(s),ge(a)}}}function Ue(o){var re,fe;let l,s,a=o[0].name+"",_,u,i,d,p,C,$,D=o[0].name+"",H,ee,I,w,F,R,L,P,N,te,K,T,le,Q,M=o[0].name+"",z,se,G,E,J,y,V,B,X,S,q,g=[],ae=new Map,oe,A,k=[],ne=new Map,O;w=new Ae({props:{js:` +import{S as Ce,i as $e,s as we,e as c,w as v,b as h,c as he,f as b,g as r,h as n,m as ve,x as Y,O as pe,P as Pe,k as Se,Q as Oe,n as Re,t as Z,a as x,o as f,d as ge,R as Te,C as Ee,p as ye,r as j,u as Be,N as qe}from"./index.e8d8151e.js";import{S as Ae}from"./SdkTabs.6909f1b6.js";function ue(o,l,s){const a=o.slice();return a[5]=l[s],a}function be(o,l,s){const a=o.slice();return a[5]=l[s],a}function _e(o,l){let s,a=l[5].code+"",_,u,i,d;function p(){return l[4](l[5])}return{key:o,first:null,c(){s=c("button"),_=v(a),u=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(C,$){r(C,s,$),n(s,_),n(s,u),i||(d=Be(s,"click",p),i=!0)},p(C,$){l=C,$&4&&a!==(a=l[5].code+"")&&Y(_,a),$&6&&j(s,"active",l[1]===l[5].code)},d(C){C&&f(s),i=!1,d()}}}function ke(o,l){let s,a,_,u;return a=new qe({props:{content:l[5].body}}),{key:o,first:null,c(){s=c("div"),he(a.$$.fragment),_=h(),b(s,"class","tab-item"),j(s,"active",l[1]===l[5].code),this.first=s},m(i,d){r(i,s,d),ve(a,s,null),n(s,_),u=!0},p(i,d){l=i;const p={};d&4&&(p.content=l[5].body),a.$set(p),(!u||d&6)&&j(s,"active",l[1]===l[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&f(s),ge(a)}}}function Ue(o){var re,fe;let l,s,a=o[0].name+"",_,u,i,d,p,C,$,D=o[0].name+"",H,ee,I,w,F,R,L,P,N,te,K,T,le,Q,M=o[0].name+"",z,se,G,E,J,y,V,B,X,S,q,g=[],ae=new Map,oe,A,k=[],ne=new Map,O;w=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/ConfirmPasswordResetDocs.ba88ebb6.js b/ui/dist/assets/ConfirmPasswordResetDocs.a459ecae.js similarity index 98% rename from ui/dist/assets/ConfirmPasswordResetDocs.ba88ebb6.js rename to ui/dist/assets/ConfirmPasswordResetDocs.a459ecae.js index ddb8ee3a..fc421cd4 100644 --- a/ui/dist/assets/ConfirmPasswordResetDocs.ba88ebb6.js +++ b/ui/dist/assets/ConfirmPasswordResetDocs.a459ecae.js @@ -1,4 +1,4 @@ -import{S as Se,i as he,s as Re,e as c,w,b as v,c as ve,f as b,g as r,h as n,m as we,x as K,O as me,P as Oe,k as Ne,Q as Ce,n as We,t as Z,a as x,o as d,d as Pe,R as $e,C as Ee,p as Te,r as U,u as ge,N as Ae}from"./index.d939dbbd.js";import{S as De}from"./SdkTabs.2a5180be.js";function ue(o,s,l){const a=o.slice();return a[5]=s[l],a}function be(o,s,l){const a=o.slice();return a[5]=s[l],a}function _e(o,s){let l,a=s[5].code+"",_,u,i,p;function m(){return s[4](s[5])}return{key:o,first:null,c(){l=c("button"),_=w(a),u=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(S,h){r(S,l,h),n(l,_),n(l,u),i||(p=ge(l,"click",m),i=!0)},p(S,h){s=S,h&4&&a!==(a=s[5].code+"")&&K(_,a),h&6&&U(l,"active",s[1]===s[5].code)},d(S){S&&d(l),i=!1,p()}}}function ke(o,s){let l,a,_,u;return a=new Ae({props:{content:s[5].body}}),{key:o,first:null,c(){l=c("div"),ve(a.$$.fragment),_=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(i,p){r(i,l,p),we(a,l,null),n(l,_),u=!0},p(i,p){s=i;const m={};p&4&&(m.content=s[5].body),a.$set(m),(!u||p&6)&&U(l,"active",s[1]===s[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&d(l),Pe(a)}}}function ye(o){var re,de;let s,l,a=o[0].name+"",_,u,i,p,m,S,h,q=o[0].name+"",j,ee,H,R,L,W,Q,O,B,te,M,$,se,z,I=o[0].name+"",G,le,J,E,V,T,X,g,Y,N,A,P=[],ae=new Map,oe,D,k=[],ne=new Map,C;R=new De({props:{js:` +import{S as Se,i as he,s as Re,e as c,w,b as v,c as ve,f as b,g as r,h as n,m as we,x as K,O as me,P as Oe,k as Ne,Q as Ce,n as We,t as Z,a as x,o as d,d as Pe,R as $e,C as Ee,p as Te,r as U,u as ge,N as Ae}from"./index.e8d8151e.js";import{S as De}from"./SdkTabs.6909f1b6.js";function ue(o,s,l){const a=o.slice();return a[5]=s[l],a}function be(o,s,l){const a=o.slice();return a[5]=s[l],a}function _e(o,s){let l,a=s[5].code+"",_,u,i,p;function m(){return s[4](s[5])}return{key:o,first:null,c(){l=c("button"),_=w(a),u=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(S,h){r(S,l,h),n(l,_),n(l,u),i||(p=ge(l,"click",m),i=!0)},p(S,h){s=S,h&4&&a!==(a=s[5].code+"")&&K(_,a),h&6&&U(l,"active",s[1]===s[5].code)},d(S){S&&d(l),i=!1,p()}}}function ke(o,s){let l,a,_,u;return a=new Ae({props:{content:s[5].body}}),{key:o,first:null,c(){l=c("div"),ve(a.$$.fragment),_=v(),b(l,"class","tab-item"),U(l,"active",s[1]===s[5].code),this.first=l},m(i,p){r(i,l,p),we(a,l,null),n(l,_),u=!0},p(i,p){s=i;const m={};p&4&&(m.content=s[5].body),a.$set(m),(!u||p&6)&&U(l,"active",s[1]===s[5].code)},i(i){u||(Z(a.$$.fragment,i),u=!0)},o(i){x(a.$$.fragment,i),u=!1},d(i){i&&d(l),Pe(a)}}}function ye(o){var re,de;let s,l,a=o[0].name+"",_,u,i,p,m,S,h,q=o[0].name+"",j,ee,H,R,L,W,Q,O,B,te,M,$,se,z,I=o[0].name+"",G,le,J,E,V,T,X,g,Y,N,A,P=[],ae=new Map,oe,D,k=[],ne=new Map,C;R=new De({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/ConfirmVerificationDocs.10de9953.js b/ui/dist/assets/ConfirmVerificationDocs.9c85c320.js similarity index 97% rename from ui/dist/assets/ConfirmVerificationDocs.10de9953.js rename to ui/dist/assets/ConfirmVerificationDocs.9c85c320.js index 6ca90f28..6ebb4f4a 100644 --- a/ui/dist/assets/ConfirmVerificationDocs.10de9953.js +++ b/ui/dist/assets/ConfirmVerificationDocs.9c85c320.js @@ -1,4 +1,4 @@ -import{S as we,i as Ce,s as Pe,e as c,w as h,b as v,c as ve,f as b,g as r,h as n,m as he,x as D,O as de,P as Te,k as ge,Q as ye,n as Be,t as Z,a as x,o as f,d as $e,R as qe,C as Oe,p as Se,r as H,u as Ee,N as Ne}from"./index.d939dbbd.js";import{S as Ve}from"./SdkTabs.2a5180be.js";function ue(i,l,s){const o=i.slice();return o[5]=l[s],o}function be(i,l,s){const o=i.slice();return o[5]=l[s],o}function _e(i,l){let s,o=l[5].code+"",_,u,a,p;function d(){return l[4](l[5])}return{key:i,first:null,c(){s=c("button"),_=h(o),u=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(w,C){r(w,s,C),n(s,_),n(s,u),a||(p=Ee(s,"click",d),a=!0)},p(w,C){l=w,C&4&&o!==(o=l[5].code+"")&&D(_,o),C&6&&H(s,"active",l[1]===l[5].code)},d(w){w&&f(s),a=!1,p()}}}function ke(i,l){let s,o,_,u;return o=new Ne({props:{content:l[5].body}}),{key:i,first:null,c(){s=c("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(a,p){r(a,s,p),he(o,s,null),n(s,_),u=!0},p(a,p){l=a;const d={};p&4&&(d.content=l[5].body),o.$set(d),(!u||p&6)&&H(s,"active",l[1]===l[5].code)},i(a){u||(Z(o.$$.fragment,a),u=!0)},o(a){x(o.$$.fragment,a),u=!1},d(a){a&&f(s),$e(o)}}}function Ke(i){var re,fe;let l,s,o=i[0].name+"",_,u,a,p,d,w,C,M=i[0].name+"",I,ee,F,P,L,B,Q,T,A,te,R,q,le,z,U=i[0].name+"",G,se,J,O,W,S,X,E,Y,g,N,$=[],oe=new Map,ie,V,k=[],ne=new Map,y;P=new Ve({props:{js:` +import{S as we,i as Ce,s as Pe,e as c,w as h,b as v,c as ve,f as b,g as r,h as n,m as he,x as D,O as de,P as Te,k as ge,Q as ye,n as Be,t as Z,a as x,o as f,d as $e,R as qe,C as Oe,p as Se,r as H,u as Ee,N as Ne}from"./index.e8d8151e.js";import{S as Ve}from"./SdkTabs.6909f1b6.js";function ue(i,l,s){const o=i.slice();return o[5]=l[s],o}function be(i,l,s){const o=i.slice();return o[5]=l[s],o}function _e(i,l){let s,o=l[5].code+"",_,u,a,p;function d(){return l[4](l[5])}return{key:i,first:null,c(){s=c("button"),_=h(o),u=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(w,C){r(w,s,C),n(s,_),n(s,u),a||(p=Ee(s,"click",d),a=!0)},p(w,C){l=w,C&4&&o!==(o=l[5].code+"")&&D(_,o),C&6&&H(s,"active",l[1]===l[5].code)},d(w){w&&f(s),a=!1,p()}}}function ke(i,l){let s,o,_,u;return o=new Ne({props:{content:l[5].body}}),{key:i,first:null,c(){s=c("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),H(s,"active",l[1]===l[5].code),this.first=s},m(a,p){r(a,s,p),he(o,s,null),n(s,_),u=!0},p(a,p){l=a;const d={};p&4&&(d.content=l[5].body),o.$set(d),(!u||p&6)&&H(s,"active",l[1]===l[5].code)},i(a){u||(Z(o.$$.fragment,a),u=!0)},o(a){x(o.$$.fragment,a),u=!1},d(a){a&&f(s),$e(o)}}}function Ke(i){var re,fe;let l,s,o=i[0].name+"",_,u,a,p,d,w,C,M=i[0].name+"",I,ee,F,P,L,B,Q,T,A,te,R,q,le,z,U=i[0].name+"",G,se,J,O,W,S,X,E,Y,g,N,$=[],oe=new Map,ie,V,k=[],ne=new Map,y;P=new Ve({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); diff --git a/ui/dist/assets/CreateApiDocs.02259e08.js b/ui/dist/assets/CreateApiDocs.0bcde8fa.js similarity index 99% rename from ui/dist/assets/CreateApiDocs.02259e08.js rename to ui/dist/assets/CreateApiDocs.0bcde8fa.js index 981f2e01..5b5dd346 100644 --- a/ui/dist/assets/CreateApiDocs.02259e08.js +++ b/ui/dist/assets/CreateApiDocs.0bcde8fa.js @@ -1,4 +1,4 @@ -import{S as Ht,i as Lt,s as Pt,C as Q,N as At,e as a,w as k,b as m,c as Pe,f as h,g as r,h as n,m as Re,x,O as Le,P as ht,k as Rt,Q as Bt,n as Ft,t as fe,a as pe,o as d,d as Be,R as gt,p as jt,r as ue,u as Dt,y as le}from"./index.d939dbbd.js";import{S as Nt}from"./SdkTabs.2a5180be.js";function wt(o,e,l){const s=o.slice();return s[7]=e[l],s}function Ct(o,e,l){const s=o.slice();return s[7]=e[l],s}function St(o,e,l){const s=o.slice();return s[12]=e[l],s}function $t(o){let e;return{c(){e=a("p"),e.innerHTML="Requires admin Authorization:TOKEN header",h(e,"class","txt-hint txt-sm txt-right")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Tt(o){let e,l,s,b,p,c,f,y,T,w,O,g,D,V,L,I,j,B,S,N,q,C,_;function M(u,$){var ee,K;return(K=(ee=u[0])==null?void 0:ee.options)!=null&&K.requireEmail?It:Vt}let z=M(o),P=z(o);return{c(){e=a("tr"),e.innerHTML='Auth fields',l=m(),s=a("tr"),s.innerHTML=`
Optional +import{S as Ht,i as Lt,s as Pt,C as Q,N as At,e as a,w as k,b as m,c as Pe,f as h,g as r,h as n,m as Re,x,O as Le,P as ht,k as Rt,Q as Bt,n as Ft,t as fe,a as pe,o as d,d as Be,R as gt,p as jt,r as ue,u as Dt,y as le}from"./index.e8d8151e.js";import{S as Nt}from"./SdkTabs.6909f1b6.js";function wt(o,e,l){const s=o.slice();return s[7]=e[l],s}function Ct(o,e,l){const s=o.slice();return s[7]=e[l],s}function St(o,e,l){const s=o.slice();return s[12]=e[l],s}function $t(o){let e;return{c(){e=a("p"),e.innerHTML="Requires admin Authorization:TOKEN header",h(e,"class","txt-hint txt-sm txt-right")},m(l,s){r(l,e,s)},d(l){l&&d(e)}}}function Tt(o){let e,l,s,b,p,c,f,y,T,w,O,g,D,V,L,I,j,B,S,N,q,C,_;function M(u,$){var ee,K;return(K=(ee=u[0])==null?void 0:ee.options)!=null&&K.requireEmail?It:Vt}let z=M(o),P=z(o);return{c(){e=a("tr"),e.innerHTML='Auth fields',l=m(),s=a("tr"),s.innerHTML=`
Optional username
String The username of the auth record. diff --git a/ui/dist/assets/DeleteApiDocs.486795b5.js b/ui/dist/assets/DeleteApiDocs.8b05ad6e.js similarity index 97% rename from ui/dist/assets/DeleteApiDocs.486795b5.js rename to ui/dist/assets/DeleteApiDocs.8b05ad6e.js index 129dbd65..955c824a 100644 --- a/ui/dist/assets/DeleteApiDocs.486795b5.js +++ b/ui/dist/assets/DeleteApiDocs.8b05ad6e.js @@ -1,4 +1,4 @@ -import{S as Ce,i as Re,s as Pe,e as c,w as D,b as k,c as $e,f as m,g as d,h as n,m as we,x,O as _e,P as Ee,k as Oe,Q as Te,n as Be,t as ee,a as te,o as f,d as ge,R as Ie,C as Ae,p as Me,r as N,u as Se,N as qe}from"./index.d939dbbd.js";import{S as He}from"./SdkTabs.2a5180be.js";function ke(o,l,s){const a=o.slice();return a[6]=l[s],a}function he(o,l,s){const a=o.slice();return a[6]=l[s],a}function ve(o){let l;return{c(){l=c("p"),l.innerHTML="Requires admin Authorization:TOKEN header",m(l,"class","txt-hint txt-sm txt-right")},m(s,a){d(s,l,a)},d(s){s&&f(l)}}}function ye(o,l){let s,a=l[6].code+"",h,i,r,u;function $(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),h=D(a),i=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(b,g){d(b,s,g),n(s,h),n(s,i),r||(u=Se(s,"click",$),r=!0)},p(b,g){l=b,g&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&f(s),r=!1,u()}}}function De(o,l){let s,a,h,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),h=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(r,u){d(r,s,u),we(a,s,null),n(s,h),i=!0},p(r,u){l=r,(!i||u&20)&&N(s,"active",l[2]===l[6].code)},i(r){i||(ee(a.$$.fragment,r),i=!0)},o(r){te(a.$$.fragment,r),i=!1},d(r){r&&f(s),ge(a)}}}function Le(o){var ue,pe;let l,s,a=o[0].name+"",h,i,r,u,$,b,g,q=o[0].name+"",z,le,F,C,K,O,Q,y,H,se,L,E,oe,G,U=o[0].name+"",J,ae,V,ne,W,T,X,B,Y,I,Z,R,A,w=[],ie=new Map,re,M,v=[],ce=new Map,P;C=new He({props:{js:` +import{S as Ce,i as Re,s as Pe,e as c,w as D,b as k,c as $e,f as m,g as d,h as n,m as we,x,O as _e,P as Ee,k as Oe,Q as Te,n as Be,t as ee,a as te,o as f,d as ge,R as Ie,C as Ae,p as Me,r as N,u as Se,N as qe}from"./index.e8d8151e.js";import{S as He}from"./SdkTabs.6909f1b6.js";function ke(o,l,s){const a=o.slice();return a[6]=l[s],a}function he(o,l,s){const a=o.slice();return a[6]=l[s],a}function ve(o){let l;return{c(){l=c("p"),l.innerHTML="Requires admin Authorization:TOKEN header",m(l,"class","txt-hint txt-sm txt-right")},m(s,a){d(s,l,a)},d(s){s&&f(l)}}}function ye(o,l){let s,a=l[6].code+"",h,i,r,u;function $(){return l[5](l[6])}return{key:o,first:null,c(){s=c("button"),h=D(a),i=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(b,g){d(b,s,g),n(s,h),n(s,i),r||(u=Se(s,"click",$),r=!0)},p(b,g){l=b,g&20&&N(s,"active",l[2]===l[6].code)},d(b){b&&f(s),r=!1,u()}}}function De(o,l){let s,a,h,i;return a=new qe({props:{content:l[6].body}}),{key:o,first:null,c(){s=c("div"),$e(a.$$.fragment),h=k(),m(s,"class","tab-item"),N(s,"active",l[2]===l[6].code),this.first=s},m(r,u){d(r,s,u),we(a,s,null),n(s,h),i=!0},p(r,u){l=r,(!i||u&20)&&N(s,"active",l[2]===l[6].code)},i(r){i||(ee(a.$$.fragment,r),i=!0)},o(r){te(a.$$.fragment,r),i=!1},d(r){r&&f(s),ge(a)}}}function Le(o){var ue,pe;let l,s,a=o[0].name+"",h,i,r,u,$,b,g,q=o[0].name+"",z,le,F,C,K,O,Q,y,H,se,L,E,oe,G,U=o[0].name+"",J,ae,V,ne,W,T,X,B,Y,I,Z,R,A,w=[],ie=new Map,re,M,v=[],ce=new Map,P;C=new He({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/FilterAutocompleteInput.b52a3ef2.js b/ui/dist/assets/FilterAutocompleteInput.b52a3ef2.js new file mode 100644 index 00000000..f6c67359 --- /dev/null +++ b/ui/dist/assets/FilterAutocompleteInput.b52a3ef2.js @@ -0,0 +1 @@ +import{S as oe,i as ae,s as ue,e as le,f as ce,g as fe,y as M,o as de,I as he,J as ge,K as pe,L as ye,C as I,M as me}from"./index.e8d8151e.js";import{C as R,E as S,a as q,h as be,b as ke,c as xe,d as Ke,e as Ce,s as Se,f as qe,g as we,i as Le,r as Ee,j as Ie,k as Re,l as Ae,m as ve,n as Be,o as Oe,p as _e,q as Me,t as Y,S as De}from"./index.e8a8986f.js";function He(e){Z(e,"start");var i={},n=e.languageData||{},g=!1;for(var p in e)if(p!=n&&e.hasOwnProperty(p))for(var d=i[p]=[],o=e[p],r=0;r2&&o.token&&typeof o.token!="string"){n.pending=[];for(var a=2;a-1)return null;var p=n.indent.length-1,d=e[n.state];e:for(;;){for(var o=0;on(21,g=t));const p=pe();let{id:d=""}=i,{value:o=""}=i,{disabled:r=!1}=i,{placeholder:l=""}=i,{baseCollection:a=null}=i,{singleLine:b=!1}=i,{extraAutocompleteKeys:A=[]}=i,{disableRequestKeys:x=!1}=i,{disableIndirectCollectionsKeys:K=!1}=i,f,k,v=r,D=new R,H=new R,F=new R,T=new R,w=[],U=[],W=[],N=[],L="",B="";function O(){f==null||f.focus()}let _=null;function j(){clearTimeout(_),_=setTimeout(()=>{w=$(g),N=ee(),U=x?[]:te(),W=K?[]:ne()},300)}function $(t){let s=t.slice();return a&&I.pushOrReplaceByKey(s,a,"id"),s}function V(){k==null||k.dispatchEvent(new CustomEvent("change",{detail:{value:o},bubbles:!0}))}function J(){if(!d)return;const t=document.querySelectorAll('[for="'+d+'"]');for(let s of t)s.removeEventListener("click",O)}function P(){if(!d)return;J();const t=document.querySelectorAll('[for="'+d+'"]');for(let s of t)s.addEventListener("click",O)}function C(t,s="",c=0){var m,z,Q;let h=w.find(y=>y.name==t||y.id==t);if(!h||c>=4)return[];let u=[s+"id",s+"created",s+"updated"];h.isAuth&&(u.push(s+"username"),u.push(s+"email"),u.push(s+"emailVisibility"),u.push(s+"verified"));for(const y of h.schema){const E=s+y.name;if(u.push(E),y.type==="relation"&&((m=y.options)==null?void 0:m.collectionId)){const X=C(y.options.collectionId,E+".",c+1);X.length&&(u=u.concat(X))}y.type==="select"&&((z=y.options)==null?void 0:z.maxSelect)!=1&&u.push(E+":each"),((Q=y.options)==null?void 0:Q.maxSelect)!=1&&["select","file","relation"].includes(y.type)&&u.push(E+":length")}return u}function ee(){return C(a==null?void 0:a.name)}function te(){const t=[];t.push("@request.method"),t.push("@request.query."),t.push("@request.data."),t.push("@request.auth.id"),t.push("@request.auth.collectionId"),t.push("@request.auth.collectionName"),t.push("@request.auth.verified"),t.push("@request.auth.username"),t.push("@request.auth.email"),t.push("@request.auth.emailVisibility"),t.push("@request.auth.created"),t.push("@request.auth.updated");const s=w.filter(h=>h.isAuth);for(const h of s){const u=C(h.id,"@request.auth.");for(const m of u)I.pushUnique(t,m)}const c=["created","updated"];if(a!=null&&a.id){const h=C(a.name,"@request.data.");for(const u of h){t.push(u);const m=u.split(".");m.length===3&&m[2].indexOf(":")===-1&&!c.includes(m[2])&&t.push(u+":isset")}}return t}function ne(){const t=[];for(const s of w){const c="@collection."+s.name+".",h=C(s.name,c);for(const u of h)t.push(u)}return t}function ie(t=!0,s=!0){let c=[].concat(A);return c=c.concat(N||[]),t&&(c=c.concat(U||[])),s&&(c=c.concat(W||[])),c.sort(function(h,u){return u.length-h.length}),c}function se(t){let s=t.matchBefore(/[\'\"\@\w\.]*/);if(s&&s.from==s.to&&!t.explicit)return null;let c=[{label:"false"},{label:"true"},{label:"@now"}];K||c.push({label:"@collection.*",apply:"@collection."});const h=ie(!x,!x&&s.text.startsWith("@c"));for(const u of h)c.push({label:u.endsWith(".")?u+"*":u,apply:u});return{from:s.from,options:c}}function G(){return De.define(He({start:[{regex:/true|false|null/,token:"atom"},{regex:/"(?:[^\\]|\\.)*?(?:"|$)/,token:"string"},{regex:/'(?:[^\\]|\\.)*?(?:'|$)/,token:"string"},{regex:/0x[a-f\d]+|[-+]?(?:\.\d+|\d+\.?\d*)(?:e[-+]?\d+)?/i,token:"number"},{regex:/\&\&|\|\||\=|\!\=|\~|\!\~|\>|\<|\>\=|\<\=/,token:"operator"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0},{regex:/\w+[\w\.]*\w+/,token:"keyword"},{regex:I.escapeRegExp("@now"),token:"keyword"},{regex:I.escapeRegExp("@request.method"),token:"keyword"}]}))}ye(()=>{const t={key:"Enter",run:s=>{b&&p("submit",o)}};return P(),n(11,f=new S({parent:k,state:q.create({doc:o,extensions:[be(),ke(),xe(),Ke(),Ce(),q.allowMultipleSelections.of(!0),Se(qe,{fallback:!0}),we(),Le(),Ee(),Ie(),Re.of([t,...Ae,...ve,Be.find(s=>s.key==="Mod-d"),...Oe,..._e]),S.lineWrapping,Me({override:[se],icons:!1}),T.of(Y(l)),H.of(S.editable.of(!r)),F.of(q.readOnly.of(r)),D.of(G()),q.transactionFilter.of(s=>b&&s.newDoc.lines>1?[]:s),S.updateListener.of(s=>{!s.docChanged||r||(n(1,o=s.state.doc.toString()),V())})]})})),()=>{clearTimeout(_),J(),f==null||f.destroy()}});function re(t){me[t?"unshift":"push"](()=>{k=t,n(0,k)})}return e.$$set=t=>{"id"in t&&n(2,d=t.id),"value"in t&&n(1,o=t.value),"disabled"in t&&n(3,r=t.disabled),"placeholder"in t&&n(4,l=t.placeholder),"baseCollection"in t&&n(5,a=t.baseCollection),"singleLine"in t&&n(6,b=t.singleLine),"extraAutocompleteKeys"in t&&n(7,A=t.extraAutocompleteKeys),"disableRequestKeys"in t&&n(8,x=t.disableRequestKeys),"disableIndirectCollectionsKeys"in t&&n(9,K=t.disableIndirectCollectionsKeys)},e.$$.update=()=>{e.$$.dirty[0]&32&&n(13,L=Je(a)),e.$$.dirty[0]&25352&&!r&&(B!=L||x!==-1||K!==-1)&&(n(14,B=L),j()),e.$$.dirty[0]&4&&d&&P(),e.$$.dirty[0]&2080&&f&&(a==null?void 0:a.schema)&&f.dispatch({effects:[D.reconfigure(G())]}),e.$$.dirty[0]&6152&&f&&v!=r&&(f.dispatch({effects:[H.reconfigure(S.editable.of(!r)),F.reconfigure(q.readOnly.of(r))]}),n(12,v=r),V()),e.$$.dirty[0]&2050&&f&&o!=f.state.doc.toString()&&f.dispatch({changes:{from:0,to:f.state.doc.length,insert:o}}),e.$$.dirty[0]&2064&&f&&typeof l<"u"&&f.dispatch({effects:[T.reconfigure(Y(l))]})},[k,o,d,r,l,a,b,A,x,K,O,f,v,L,B,re]}class Qe extends oe{constructor(i){super(),ae(this,i,Pe,Ve,ue,{id:2,value:1,disabled:3,placeholder:4,baseCollection:5,singleLine:6,extraAutocompleteKeys:7,disableRequestKeys:8,disableIndirectCollectionsKeys:9,focus:10},null,[-1,-1])}get focus(){return this.$$.ctx[10]}}export{Qe as default}; diff --git a/ui/dist/assets/FilterAutocompleteInput.cea6a97d.js b/ui/dist/assets/FilterAutocompleteInput.cea6a97d.js deleted file mode 100644 index ff416247..00000000 --- a/ui/dist/assets/FilterAutocompleteInput.cea6a97d.js +++ /dev/null @@ -1 +0,0 @@ -import{S as ie,i as re,s as se,e as oe,f as ae,g as ue,y as _,o as le,I as ce,J as fe,K as de,L as he,C as L,M as ge}from"./index.d939dbbd.js";import{C as I,E as x,a as C,h as pe,b as ye,c as me,d as be,e as ke,s as Ke,f as xe,g as Ce,i as qe,r as we,j as Se,k as Le,l as Ie,m as Ee,n as Re,o as Ae,p as ve,q as Be,t as z,S as _e}from"./index.e8a8986f.js";function Me(e){Q(e,"start");var i={},t=e.languageData||{},h=!1;for(var g in e)if(g!=t&&e.hasOwnProperty(g))for(var d=i[g]=[],o=e[g],s=0;s2&&o.token&&typeof o.token!="string"){t.pending=[];for(var a=2;a-1)return null;var g=t.indent.length-1,d=e[t.state];e:for(;;){for(var o=0;ot(21,h=n));const g=de();let{id:d=""}=i,{value:o=""}=i,{disabled:s=!1}=i,{placeholder:u=""}=i,{baseCollection:a=null}=i,{singleLine:y=!1}=i,{extraAutocompleteKeys:E=[]}=i,{disableRequestKeys:k=!1}=i,{disableIndirectCollectionsKeys:K=!1}=i,f,m,R=s,M=new I,O=new I,D=new I,H=new I,q=[],F=[],T=[],U=[],w="",A="";function v(){f==null||f.focus()}let B=null;function X(){clearTimeout(B),B=setTimeout(()=>{q=Y(h),U=Z(),F=k?[]:j(),T=K?[]:$()},300)}function Y(n){let r=n.slice();return a&&L.pushOrReplaceByKey(r,a,"id"),r}function W(){m==null||m.dispatchEvent(new CustomEvent("change",{detail:{value:o},bubbles:!0}))}function N(){if(!d)return;const n=document.querySelectorAll('[for="'+d+'"]');for(let r of n)r.removeEventListener("click",v)}function V(){if(!d)return;N();const n=document.querySelectorAll('[for="'+d+'"]');for(let r of n)r.addEventListener("click",v)}function S(n,r="",l=0){let p=q.find(b=>b.name==n||b.id==n);if(!p||l>=4)return[];let c=[r+"id",r+"created",r+"updated"];p.isAuth&&(c.push(r+"username"),c.push(r+"email"),c.push(r+"emailVisibility"),c.push(r+"verified"));for(const b of p.schema){const P=r+b.name;if(c.push(P),b.type==="relation"&&b.options.collectionId){const G=S(b.options.collectionId,P+".",l+1);G.length&&(c=c.concat(G))}}return c}function Z(){return S(a==null?void 0:a.name)}function j(){const n=[];n.push("@request.method"),n.push("@request.query."),n.push("@request.data."),n.push("@request.auth."),n.push("@request.auth.id"),n.push("@request.auth.collectionId"),n.push("@request.auth.collectionName"),n.push("@request.auth.verified"),n.push("@request.auth.username"),n.push("@request.auth.email"),n.push("@request.auth.emailVisibility"),n.push("@request.auth.created"),n.push("@request.auth.updated");const r=q.filter(l=>l.isAuth);for(const l of r){const p=S(l.id,"@request.auth.");for(const c of p)L.pushUnique(n,c)}return n}function $(){const n=[];for(const r of q){const l="@collection."+r.name+".",p=S(r.name,l);for(const c of p)n.push(c)}return n}function ee(n=!0,r=!0){let l=[].concat(E);return l=l.concat(U||[]),n&&(l=l.concat(F||[])),r&&(l=l.concat(T||[])),l.sort(function(p,c){return c.length-p.length}),l}function te(n){let r=n.matchBefore(/[\'\"\@\w\.]*/);if(r&&r.from==r.to&&!n.explicit)return null;let l=[{label:"false"},{label:"true"},{label:"@now"}];K||l.push({label:"@collection.*",apply:"@collection."});const p=ee(!k,!k&&r.text.startsWith("@c"));for(const c of p)l.push({label:c.endsWith(".")?c+"*":c,apply:c});return{from:r.from,options:l}}function J(){return _e.define(Me({start:[{regex:/true|false|null/,token:"atom"},{regex:/"(?:[^\\]|\\.)*?(?:"|$)/,token:"string"},{regex:/'(?:[^\\]|\\.)*?(?:'|$)/,token:"string"},{regex:/0x[a-f\d]+|[-+]?(?:\.\d+|\d+\.?\d*)(?:e[-+]?\d+)?/i,token:"number"},{regex:/\&\&|\|\||\=|\!\=|\~|\!\~|\>|\<|\>\=|\<\=/,token:"operator"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0},{regex:/\w+[\w\.]*\w+/,token:"keyword"},{regex:L.escapeRegExp("@now"),token:"keyword"},{regex:L.escapeRegExp("@request.method"),token:"keyword"}]}))}he(()=>{const n={key:"Enter",run:r=>{y&&g("submit",o)}};return V(),t(11,f=new x({parent:m,state:C.create({doc:o,extensions:[pe(),ye(),me(),be(),ke(),C.allowMultipleSelections.of(!0),Ke(xe,{fallback:!0}),Ce(),qe(),we(),Se(),Le.of([n,...Ie,...Ee,Re.find(r=>r.key==="Mod-d"),...Ae,...ve]),x.lineWrapping,Be({override:[te],icons:!1}),H.of(z(u)),O.of(x.editable.of(!s)),D.of(C.readOnly.of(s)),M.of(J()),C.transactionFilter.of(r=>y&&r.newDoc.lines>1?[]:r),x.updateListener.of(r=>{!r.docChanged||s||(t(1,o=r.state.doc.toString()),W())})]})})),()=>{clearTimeout(B),N(),f==null||f.destroy()}});function ne(n){ge[n?"unshift":"push"](()=>{m=n,t(0,m)})}return e.$$set=n=>{"id"in n&&t(2,d=n.id),"value"in n&&t(1,o=n.value),"disabled"in n&&t(3,s=n.disabled),"placeholder"in n&&t(4,u=n.placeholder),"baseCollection"in n&&t(5,a=n.baseCollection),"singleLine"in n&&t(6,y=n.singleLine),"extraAutocompleteKeys"in n&&t(7,E=n.extraAutocompleteKeys),"disableRequestKeys"in n&&t(8,k=n.disableRequestKeys),"disableIndirectCollectionsKeys"in n&&t(9,K=n.disableIndirectCollectionsKeys)},e.$$.update=()=>{e.$$.dirty[0]&32&&t(13,w=We(a)),e.$$.dirty[0]&25352&&!s&&(A!=w||k!==-1||K!==-1)&&(t(14,A=w),X()),e.$$.dirty[0]&4&&d&&V(),e.$$.dirty[0]&2080&&f&&(a==null?void 0:a.schema)&&f.dispatch({effects:[M.reconfigure(J())]}),e.$$.dirty[0]&6152&&f&&R!=s&&(f.dispatch({effects:[O.reconfigure(x.editable.of(!s)),D.reconfigure(C.readOnly.of(s))]}),t(12,R=s),W()),e.$$.dirty[0]&2050&&f&&o!=f.state.doc.toString()&&f.dispatch({changes:{from:0,to:f.state.doc.length,insert:o}}),e.$$.dirty[0]&2064&&f&&typeof u<"u"&&f.dispatch({effects:[H.reconfigure(z(u))]})},[m,o,d,s,u,a,y,E,k,K,v,f,R,w,A,ne]}class Pe extends ie{constructor(i){super(),re(this,i,Ne,Ue,se,{id:2,value:1,disabled:3,placeholder:4,baseCollection:5,singleLine:6,extraAutocompleteKeys:7,disableRequestKeys:8,disableIndirectCollectionsKeys:9,focus:10},null,[-1,-1])}get focus(){return this.$$.ctx[10]}}export{Pe as default}; diff --git a/ui/dist/assets/ListApiDocs.01d92f2e.js b/ui/dist/assets/ListApiDocs.fa7883e0.js similarity index 97% rename from ui/dist/assets/ListApiDocs.01d92f2e.js rename to ui/dist/assets/ListApiDocs.fa7883e0.js index b80117b5..5e69479a 100644 --- a/ui/dist/assets/ListApiDocs.01d92f2e.js +++ b/ui/dist/assets/ListApiDocs.fa7883e0.js @@ -1,4 +1,4 @@ -import{S as Et,i as Nt,s as Ht,e as l,b as a,E as qt,f as d,g as p,u as Mt,y as xt,o as u,w as k,h as e,N as Ae,c as ge,m as ye,x as Ue,O as Lt,P as Dt,k as It,Q as Bt,n as zt,t as ce,a as de,d as ve,R as Gt,C as je,p as Ut,r as Ee}from"./index.d939dbbd.js";import{S as jt}from"./SdkTabs.2a5180be.js";function Qt(r){let s,n,i;return{c(){s=l("span"),s.textContent="Show details",n=a(),i=l("i"),d(s,"class","txt"),d(i,"class","ri-arrow-down-s-line")},m(c,f){p(c,s,f),p(c,n,f),p(c,i,f)},d(c){c&&u(s),c&&u(n),c&&u(i)}}}function Jt(r){let s,n,i;return{c(){s=l("span"),s.textContent="Hide details",n=a(),i=l("i"),d(s,"class","txt"),d(i,"class","ri-arrow-up-s-line")},m(c,f){p(c,s,f),p(c,n,f),p(c,i,f)},d(c){c&&u(s),c&&u(n),c&&u(i)}}}function Tt(r){let s,n,i,c,f,m,_,w,b,$,h,H,W,fe,T,pe,O,G,C,M,Fe,A,E,Ce,U,X,q,Y,xe,j,Q,D,P,ue,Z,v,I,ee,me,te,N,B,le,be,se,x,J,ne,Le,K,he,V;return{c(){s=l("p"),s.innerHTML=`The syntax basically follows the format +import{S as Et,i as Nt,s as Ht,e as l,b as a,E as qt,f as d,g as p,u as Mt,y as xt,o as u,w as k,h as e,N as Ae,c as ge,m as ye,x as Ue,O as Lt,P as Dt,k as It,Q as Bt,n as zt,t as ce,a as de,d as ve,R as Gt,C as je,p as Ut,r as Ee}from"./index.e8d8151e.js";import{S as jt}from"./SdkTabs.6909f1b6.js";function Qt(r){let s,n,i;return{c(){s=l("span"),s.textContent="Show details",n=a(),i=l("i"),d(s,"class","txt"),d(i,"class","ri-arrow-down-s-line")},m(c,f){p(c,s,f),p(c,n,f),p(c,i,f)},d(c){c&&u(s),c&&u(n),c&&u(i)}}}function Jt(r){let s,n,i;return{c(){s=l("span"),s.textContent="Hide details",n=a(),i=l("i"),d(s,"class","txt"),d(i,"class","ri-arrow-up-s-line")},m(c,f){p(c,s,f),p(c,n,f),p(c,i,f)},d(c){c&&u(s),c&&u(n),c&&u(i)}}}function Tt(r){let s,n,i,c,f,m,_,w,b,$,h,H,W,fe,T,pe,O,G,C,M,Fe,A,E,Ce,U,X,q,Y,xe,j,Q,D,P,ue,Z,v,I,ee,me,te,N,B,le,be,se,x,J,ne,Le,K,he,V;return{c(){s=l("p"),s.innerHTML=`The syntax basically follows the format OPERAND OPERATOR OPERAND, where:`,n=a(),i=l("ul"),c=l("li"),c.innerHTML=`OPERAND - could be any of the above field literal, string (single @@ -15,7 +15,7 @@ import{S as Et,i as Nt,s as Ht,e as l,b as a,E as qt,f as d,g as p,u as Mt,y as // fetch a paginated records list const resultList = await pb.collection('${(mt=r[0])==null?void 0:mt.name}').getList(1, 50, { - filter: 'created >= "2022-01-01 00:00:00" && someFiled1 != someField2', + filter: 'created >= "2022-01-01 00:00:00" && someField1 != someField2', }); // you can also fetch all records at once via getFullList @@ -38,7 +38,7 @@ import{S as Et,i as Nt,s as Ht,e as l,b as a,E as qt,f as d,g as p,u as Mt,y as final resultList = await pb.collection('${(_t=r[0])==null?void 0:_t.name}').getList( page: 1, perPage: 50, - filter: 'created >= "2022-01-01 00:00:00" && someFiled1 != someField2', + filter: 'created >= "2022-01-01 00:00:00" && someField1 != someField2', ); // you can also fetch all records at once via getFullList @@ -82,7 +82,7 @@ import{S as Et,i as Nt,s as Ht,e as l,b as a,E as qt,f as d,g as p,u as Mt,y as // fetch a paginated records list const resultList = await pb.collection('${(wt=t[0])==null?void 0:wt.name}').getList(1, 50, { - filter: 'created >= "2022-01-01 00:00:00" && someFiled1 != someField2', + filter: 'created >= "2022-01-01 00:00:00" && someField1 != someField2', }); // you can also fetch all records at once via getFullList @@ -105,7 +105,7 @@ import{S as Et,i as Nt,s as Ht,e as l,b as a,E as qt,f as d,g as p,u as Mt,y as final resultList = await pb.collection('${(vt=t[0])==null?void 0:vt.name}').getList( page: 1, perPage: 50, - filter: 'created >= "2022-01-01 00:00:00" && someFiled1 != someField2', + filter: 'created >= "2022-01-01 00:00:00" && someField1 != someField2', ); // you can also fetch all records at once via getFullList diff --git a/ui/dist/assets/ListExternalAuthsDocs.eb32d46b.js b/ui/dist/assets/ListExternalAuthsDocs.619a62c2.js similarity index 98% rename from ui/dist/assets/ListExternalAuthsDocs.eb32d46b.js rename to ui/dist/assets/ListExternalAuthsDocs.619a62c2.js index eef4784f..6aa18946 100644 --- a/ui/dist/assets/ListExternalAuthsDocs.eb32d46b.js +++ b/ui/dist/assets/ListExternalAuthsDocs.619a62c2.js @@ -1,4 +1,4 @@ -import{S as Be,i as qe,s as Oe,e as i,w as v,b as _,c as Ie,f as b,g as r,h as s,m as Se,x as U,O as Pe,P as Le,k as Me,Q as Re,n as We,t as te,a as le,o as d,d as Ee,R as ze,C as De,p as He,r as j,u as Ue,N as je}from"./index.d939dbbd.js";import{S as Ne}from"./SdkTabs.2a5180be.js";function ye(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ae(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ce(a,l){let o,n=l[5].code+"",f,h,c,u;function m(){return l[4](l[5])}return{key:a,first:null,c(){o=i("button"),f=v(n),h=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(g,P){r(g,o,P),s(o,f),s(o,h),c||(u=Ue(o,"click",m),c=!0)},p(g,P){l=g,P&4&&n!==(n=l[5].code+"")&&U(f,n),P&6&&j(o,"active",l[1]===l[5].code)},d(g){g&&d(o),c=!1,u()}}}function Te(a,l){let o,n,f,h;return n=new je({props:{content:l[5].body}}),{key:a,first:null,c(){o=i("div"),Ie(n.$$.fragment),f=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Se(n,o,null),s(o,f),h=!0},p(c,u){l=c;const m={};u&4&&(m.content=l[5].body),n.$set(m),(!h||u&6)&&j(o,"active",l[1]===l[5].code)},i(c){h||(te(n.$$.fragment,c),h=!0)},o(c){le(n.$$.fragment,c),h=!1},d(c){c&&d(o),Ee(n)}}}function Ge(a){var be,he,_e,ke;let l,o,n=a[0].name+"",f,h,c,u,m,g,P,M=a[0].name+"",N,oe,se,G,K,y,Q,I,F,w,R,ae,W,A,ne,J,z=a[0].name+"",V,ie,X,ce,re,D,Y,S,Z,E,x,B,ee,C,q,$=[],de=new Map,ue,O,k=[],pe=new Map,T;y=new Ne({props:{js:` +import{S as Be,i as qe,s as Oe,e as i,w as v,b as _,c as Ie,f as b,g as r,h as s,m as Se,x as U,O as Pe,P as Le,k as Me,Q as Re,n as We,t as te,a as le,o as d,d as Ee,R as ze,C as De,p as He,r as j,u as Ue,N as je}from"./index.e8d8151e.js";import{S as Ne}from"./SdkTabs.6909f1b6.js";function ye(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ae(a,l,o){const n=a.slice();return n[5]=l[o],n}function Ce(a,l){let o,n=l[5].code+"",f,h,c,u;function m(){return l[4](l[5])}return{key:a,first:null,c(){o=i("button"),f=v(n),h=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(g,P){r(g,o,P),s(o,f),s(o,h),c||(u=Ue(o,"click",m),c=!0)},p(g,P){l=g,P&4&&n!==(n=l[5].code+"")&&U(f,n),P&6&&j(o,"active",l[1]===l[5].code)},d(g){g&&d(o),c=!1,u()}}}function Te(a,l){let o,n,f,h;return n=new je({props:{content:l[5].body}}),{key:a,first:null,c(){o=i("div"),Ie(n.$$.fragment),f=_(),b(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Se(n,o,null),s(o,f),h=!0},p(c,u){l=c;const m={};u&4&&(m.content=l[5].body),n.$set(m),(!h||u&6)&&j(o,"active",l[1]===l[5].code)},i(c){h||(te(n.$$.fragment,c),h=!0)},o(c){le(n.$$.fragment,c),h=!1},d(c){c&&d(o),Ee(n)}}}function Ge(a){var be,he,_e,ke;let l,o,n=a[0].name+"",f,h,c,u,m,g,P,M=a[0].name+"",N,oe,se,G,K,y,Q,I,F,w,R,ae,W,A,ne,J,z=a[0].name+"",V,ie,X,ce,re,D,Y,S,Z,E,x,B,ee,C,q,$=[],de=new Map,ue,O,k=[],pe=new Map,T;y=new Ne({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/PageAdminConfirmPasswordReset.86ba1dcf.js b/ui/dist/assets/PageAdminConfirmPasswordReset.2286108f.js similarity index 98% rename from ui/dist/assets/PageAdminConfirmPasswordReset.86ba1dcf.js rename to ui/dist/assets/PageAdminConfirmPasswordReset.2286108f.js index 04dc900b..0d3f94e9 100644 --- a/ui/dist/assets/PageAdminConfirmPasswordReset.86ba1dcf.js +++ b/ui/dist/assets/PageAdminConfirmPasswordReset.2286108f.js @@ -1,2 +1,2 @@ -import{S as E,i as G,s as I,F as K,c as A,m as B,t as H,a as N,d as T,C as M,q as J,e as c,w as q,b as C,f as u,r as L,g as b,h as _,u as h,v as O,j as Q,l as U,o as w,A as V,p as W,B as X,D as Y,x as Z,z as S}from"./index.d939dbbd.js";function y(f){let e,o,s;return{c(){e=q("for "),o=c("strong"),s=q(f[3]),u(o,"class","txt-nowrap")},m(l,t){b(l,e,t),b(l,o,t),_(o,s)},p(l,t){t&8&&Z(s,l[3])},d(l){l&&w(e),l&&w(o)}}}function x(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0,t.autofocus=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[0]),t.focus(),p||(d=h(t,"input",f[6]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&1&&t.value!==n[0]&&S(t,n[0])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function ee(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password confirm"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[1]),p||(d=h(t,"input",f[7]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&2&&t.value!==n[1]&&S(t,n[1])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function te(f){let e,o,s,l,t,r,p,d,n,i,g,R,P,v,k,F,j,m=f[3]&&y(f);return r=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),d=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),{c(){e=c("form"),o=c("div"),s=c("h4"),l=q(`Reset your admin password +import{S as E,i as G,s as I,F as K,c as A,m as B,t as H,a as N,d as T,C as M,q as J,e as c,w as q,b as C,f as u,r as L,g as b,h as _,u as h,v as O,j as Q,l as U,o as w,A as V,p as W,B as X,D as Y,x as Z,z as S}from"./index.e8d8151e.js";function y(f){let e,o,s;return{c(){e=q("for "),o=c("strong"),s=q(f[3]),u(o,"class","txt-nowrap")},m(l,t){b(l,e,t),b(l,o,t),_(o,s)},p(l,t){t&8&&Z(s,l[3])},d(l){l&&w(e),l&&w(o)}}}function x(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0,t.autofocus=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[0]),t.focus(),p||(d=h(t,"input",f[6]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&1&&t.value!==n[0]&&S(t,n[0])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function ee(f){let e,o,s,l,t,r,p,d;return{c(){e=c("label"),o=q("New password confirm"),l=C(),t=c("input"),u(e,"for",s=f[8]),u(t,"type","password"),u(t,"id",r=f[8]),t.required=!0},m(n,i){b(n,e,i),_(e,o),b(n,l,i),b(n,t,i),S(t,f[1]),p||(d=h(t,"input",f[7]),p=!0)},p(n,i){i&256&&s!==(s=n[8])&&u(e,"for",s),i&256&&r!==(r=n[8])&&u(t,"id",r),i&2&&t.value!==n[1]&&S(t,n[1])},d(n){n&&w(e),n&&w(l),n&&w(t),p=!1,d()}}}function te(f){let e,o,s,l,t,r,p,d,n,i,g,R,P,v,k,F,j,m=f[3]&&y(f);return r=new J({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),d=new J({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:a})=>({8:a}),({uniqueId:a})=>a?256:0]},$$scope:{ctx:f}}}),{c(){e=c("form"),o=c("div"),s=c("h4"),l=q(`Reset your admin password `),m&&m.c(),t=C(),A(r.$$.fragment),p=C(),A(d.$$.fragment),n=C(),i=c("button"),g=c("span"),g.textContent="Set new password",R=C(),P=c("div"),v=c("a"),v.textContent="Back to login",u(s,"class","m-b-xs"),u(o,"class","content txt-center m-b-sm"),u(g,"class","txt"),u(i,"type","submit"),u(i,"class","btn btn-lg btn-block"),i.disabled=f[2],L(i,"btn-loading",f[2]),u(e,"class","m-b-base"),u(v,"href","/login"),u(v,"class","link-hint"),u(P,"class","content txt-center")},m(a,$){b(a,e,$),_(e,o),_(o,s),_(s,l),m&&m.m(s,null),_(e,t),B(r,e,null),_(e,p),B(d,e,null),_(e,n),_(e,i),_(i,g),b(a,R,$),b(a,P,$),_(P,v),k=!0,F||(j=[h(e,"submit",O(f[4])),Q(U.call(null,v))],F=!0)},p(a,$){a[3]?m?m.p(a,$):(m=y(a),m.c(),m.m(s,null)):m&&(m.d(1),m=null);const z={};$&769&&(z.$$scope={dirty:$,ctx:a}),r.$set(z);const D={};$&770&&(D.$$scope={dirty:$,ctx:a}),d.$set(D),(!k||$&4)&&(i.disabled=a[2]),(!k||$&4)&&L(i,"btn-loading",a[2])},i(a){k||(H(r.$$.fragment,a),H(d.$$.fragment,a),k=!0)},o(a){N(r.$$.fragment,a),N(d.$$.fragment,a),k=!1},d(a){a&&w(e),m&&m.d(),T(r),T(d),a&&w(R),a&&w(P),F=!1,V(j)}}}function se(f){let e,o;return e=new K({props:{$$slots:{default:[te]},$$scope:{ctx:f}}}),{c(){A(e.$$.fragment)},m(s,l){B(e,s,l),o=!0},p(s,[l]){const t={};l&527&&(t.$$scope={dirty:l,ctx:s}),e.$set(t)},i(s){o||(H(e.$$.fragment,s),o=!0)},o(s){N(e.$$.fragment,s),o=!1},d(s){T(e,s)}}}function le(f,e,o){let s,{params:l}=e,t="",r="",p=!1;async function d(){if(!p){o(2,p=!0);try{await W.admins.confirmPasswordReset(l==null?void 0:l.token,t,r),X("Successfully set a new admin password."),Y("/")}catch(g){W.errorResponseHandler(g)}o(2,p=!1)}}function n(){t=this.value,o(0,t)}function i(){r=this.value,o(1,r)}return f.$$set=g=>{"params"in g&&o(5,l=g.params)},f.$$.update=()=>{f.$$.dirty&32&&o(3,s=M.getJWTPayload(l==null?void 0:l.token).email||"")},[t,r,p,s,d,l,n,i]}class ae extends E{constructor(e){super(),G(this,e,le,se,I,{params:5})}}export{ae as default}; diff --git a/ui/dist/assets/PageAdminRequestPasswordReset.ab8ae049.js b/ui/dist/assets/PageAdminRequestPasswordReset.a16f1615.js similarity index 98% rename from ui/dist/assets/PageAdminRequestPasswordReset.ab8ae049.js rename to ui/dist/assets/PageAdminRequestPasswordReset.a16f1615.js index 96cf5c62..2008fefb 100644 --- a/ui/dist/assets/PageAdminRequestPasswordReset.ab8ae049.js +++ b/ui/dist/assets/PageAdminRequestPasswordReset.a16f1615.js @@ -1,2 +1,2 @@ -import{S as M,i as T,s as j,F as z,c as H,m as L,t as w,a as y,d as S,b as g,e as _,f as p,g as k,h as d,j as A,l as B,k as N,n as D,o as v,p as C,q as G,r as F,u as E,v as I,w as h,x as J,y as P,z as R}from"./index.d939dbbd.js";function K(c){let e,s,n,l,t,o,f,m,i,a,b,u;return l=new G({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:r})=>({5:r}),({uniqueId:r})=>r?32:0]},$$scope:{ctx:c}}}),{c(){e=_("form"),s=_("div"),s.innerHTML=`

Forgotten admin password

+import{S as M,i as T,s as j,F as z,c as H,m as L,t as w,a as y,d as S,b as g,e as _,f as p,g as k,h as d,j as A,l as B,k as N,n as D,o as v,p as C,q as G,r as F,u as E,v as I,w as h,x as J,y as P,z as R}from"./index.e8d8151e.js";function K(c){let e,s,n,l,t,o,f,m,i,a,b,u;return l=new G({props:{class:"form-field required",name:"email",$$slots:{default:[Q,({uniqueId:r})=>({5:r}),({uniqueId:r})=>r?32:0]},$$scope:{ctx:c}}}),{c(){e=_("form"),s=_("div"),s.innerHTML=`

Forgotten admin password

Enter the email associated with your account and we\u2019ll send you a recovery link:

`,n=g(),H(l.$$.fragment),t=g(),o=_("button"),f=_("i"),m=g(),i=_("span"),i.textContent="Send recovery link",p(s,"class","content txt-center m-b-sm"),p(f,"class","ri-mail-send-line"),p(i,"class","txt"),p(o,"type","submit"),p(o,"class","btn btn-lg btn-block"),o.disabled=c[1],F(o,"btn-loading",c[1]),p(e,"class","m-b-base")},m(r,$){k(r,e,$),d(e,s),d(e,n),L(l,e,null),d(e,t),d(e,o),d(o,f),d(o,m),d(o,i),a=!0,b||(u=E(e,"submit",I(c[3])),b=!0)},p(r,$){const q={};$&97&&(q.$$scope={dirty:$,ctx:r}),l.$set(q),(!a||$&2)&&(o.disabled=r[1]),(!a||$&2)&&F(o,"btn-loading",r[1])},i(r){a||(w(l.$$.fragment,r),a=!0)},o(r){y(l.$$.fragment,r),a=!1},d(r){r&&v(e),S(l),b=!1,u()}}}function O(c){let e,s,n,l,t,o,f,m,i;return{c(){e=_("div"),s=_("div"),s.innerHTML='',n=g(),l=_("div"),t=_("p"),o=h("Check "),f=_("strong"),m=h(c[0]),i=h(" for the recovery link."),p(s,"class","icon"),p(f,"class","txt-nowrap"),p(l,"class","content"),p(e,"class","alert alert-success")},m(a,b){k(a,e,b),d(e,s),d(e,n),d(e,l),d(l,t),d(t,o),d(t,f),d(f,m),d(t,i)},p(a,b){b&1&&J(m,a[0])},i:P,o:P,d(a){a&&v(e)}}}function Q(c){let e,s,n,l,t,o,f,m;return{c(){e=_("label"),s=h("Email"),l=g(),t=_("input"),p(e,"for",n=c[5]),p(t,"type","email"),p(t,"id",o=c[5]),t.required=!0,t.autofocus=!0},m(i,a){k(i,e,a),d(e,s),k(i,l,a),k(i,t,a),R(t,c[0]),t.focus(),f||(m=E(t,"input",c[4]),f=!0)},p(i,a){a&32&&n!==(n=i[5])&&p(e,"for",n),a&32&&o!==(o=i[5])&&p(t,"id",o),a&1&&t.value!==i[0]&&R(t,i[0])},d(i){i&&v(e),i&&v(l),i&&v(t),f=!1,m()}}}function U(c){let e,s,n,l,t,o,f,m;const i=[O,K],a=[];function b(u,r){return u[2]?0:1}return e=b(c),s=a[e]=i[e](c),{c(){s.c(),n=g(),l=_("div"),t=_("a"),t.textContent="Back to login",p(t,"href","/login"),p(t,"class","link-hint"),p(l,"class","content txt-center")},m(u,r){a[e].m(u,r),k(u,n,r),k(u,l,r),d(l,t),o=!0,f||(m=A(B.call(null,t)),f=!0)},p(u,r){let $=e;e=b(u),e===$?a[e].p(u,r):(N(),y(a[$],1,1,()=>{a[$]=null}),D(),s=a[e],s?s.p(u,r):(s=a[e]=i[e](u),s.c()),w(s,1),s.m(n.parentNode,n))},i(u){o||(w(s),o=!0)},o(u){y(s),o=!1},d(u){a[e].d(u),u&&v(n),u&&v(l),f=!1,m()}}}function V(c){let e,s;return e=new z({props:{$$slots:{default:[U]},$$scope:{ctx:c}}}),{c(){H(e.$$.fragment)},m(n,l){L(e,n,l),s=!0},p(n,[l]){const t={};l&71&&(t.$$scope={dirty:l,ctx:n}),e.$set(t)},i(n){s||(w(e.$$.fragment,n),s=!0)},o(n){y(e.$$.fragment,n),s=!1},d(n){S(e,n)}}}function W(c,e,s){let n="",l=!1,t=!1;async function o(){if(!l){s(1,l=!0);try{await C.admins.requestPasswordReset(n),s(2,t=!0)}catch(m){C.errorResponseHandler(m)}s(1,l=!1)}}function f(){n=this.value,s(0,n)}return[n,l,t,o,f]}class Y extends M{constructor(e){super(),T(this,e,W,V,j,{})}}export{Y as default}; diff --git a/ui/dist/assets/PageRecordConfirmEmailChange.e9bedc1d.js b/ui/dist/assets/PageRecordConfirmEmailChange.b5ca8f93.js similarity index 98% rename from ui/dist/assets/PageRecordConfirmEmailChange.e9bedc1d.js rename to ui/dist/assets/PageRecordConfirmEmailChange.b5ca8f93.js index 29d265ff..043f7d23 100644 --- a/ui/dist/assets/PageRecordConfirmEmailChange.e9bedc1d.js +++ b/ui/dist/assets/PageRecordConfirmEmailChange.b5ca8f93.js @@ -1,4 +1,4 @@ -import{S as z,i as A,s as G,F as I,c as T,m as L,t as v,a as y,d as R,C as J,E as M,g as _,k as N,n as W,o as b,G as Y,H as j,p as B,q as D,e as m,w as C,b as h,f as d,r as P,h as k,u as q,v as K,y as E,x as O,z as F}from"./index.d939dbbd.js";function Q(r){let e,t,s,l,n,o,c,i,a,u,g,$,p=r[3]&&S(r);return o=new D({props:{class:"form-field required",name:"password",$$slots:{default:[V,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:r}}}),{c(){e=m("form"),t=m("div"),s=m("h5"),l=C(`Type your password to confirm changing your email address +import{S as z,i as A,s as G,F as I,c as T,m as L,t as v,a as y,d as R,C as J,E as M,g as _,k as N,n as W,o as b,G as Y,H as j,p as B,q as D,e as m,w as C,b as h,f as d,r as P,h as k,u as q,v as K,y as E,x as O,z as F}from"./index.e8d8151e.js";function Q(r){let e,t,s,l,n,o,c,i,a,u,g,$,p=r[3]&&S(r);return o=new D({props:{class:"form-field required",name:"password",$$slots:{default:[V,({uniqueId:f})=>({8:f}),({uniqueId:f})=>f?256:0]},$$scope:{ctx:r}}}),{c(){e=m("form"),t=m("div"),s=m("h5"),l=C(`Type your password to confirm changing your email address `),p&&p.c(),n=h(),T(o.$$.fragment),c=h(),i=m("button"),a=m("span"),a.textContent="Confirm new email",d(t,"class","content txt-center m-b-base"),d(a,"class","txt"),d(i,"type","submit"),d(i,"class","btn btn-lg btn-block"),i.disabled=r[1],P(i,"btn-loading",r[1])},m(f,w){_(f,e,w),k(e,t),k(t,s),k(s,l),p&&p.m(s,null),k(e,n),L(o,e,null),k(e,c),k(e,i),k(i,a),u=!0,g||($=q(e,"submit",K(r[4])),g=!0)},p(f,w){f[3]?p?p.p(f,w):(p=S(f),p.c(),p.m(s,null)):p&&(p.d(1),p=null);const H={};w&769&&(H.$$scope={dirty:w,ctx:f}),o.$set(H),(!u||w&2)&&(i.disabled=f[1]),(!u||w&2)&&P(i,"btn-loading",f[1])},i(f){u||(v(o.$$.fragment,f),u=!0)},o(f){y(o.$$.fragment,f),u=!1},d(f){f&&b(e),p&&p.d(),R(o),g=!1,$()}}}function U(r){let e,t,s,l,n;return{c(){e=m("div"),e.innerHTML=`

Successfully changed the user email address.

You can now sign in with your new email address.

`,t=h(),s=m("button"),s.textContent="Close",d(e,"class","alert alert-success"),d(s,"type","button"),d(s,"class","btn btn-secondary btn-block")},m(o,c){_(o,e,c),_(o,t,c),_(o,s,c),l||(n=q(s,"click",r[6]),l=!0)},p:E,i:E,o:E,d(o){o&&b(e),o&&b(t),o&&b(s),l=!1,n()}}}function S(r){let e,t,s;return{c(){e=C("to "),t=m("strong"),s=C(r[3]),d(t,"class","txt-nowrap")},m(l,n){_(l,e,n),_(l,t,n),k(t,s)},p(l,n){n&8&&O(s,l[3])},d(l){l&&b(e),l&&b(t)}}}function V(r){let e,t,s,l,n,o,c,i;return{c(){e=m("label"),t=C("Password"),l=h(),n=m("input"),d(e,"for",s=r[8]),d(n,"type","password"),d(n,"id",o=r[8]),n.required=!0,n.autofocus=!0},m(a,u){_(a,e,u),k(e,t),_(a,l,u),_(a,n,u),F(n,r[0]),n.focus(),c||(i=q(n,"input",r[7]),c=!0)},p(a,u){u&256&&s!==(s=a[8])&&d(e,"for",s),u&256&&o!==(o=a[8])&&d(n,"id",o),u&1&&n.value!==a[0]&&F(n,a[0])},d(a){a&&b(e),a&&b(l),a&&b(n),c=!1,i()}}}function X(r){let e,t,s,l;const n=[U,Q],o=[];function c(i,a){return i[2]?0:1}return e=c(r),t=o[e]=n[e](r),{c(){t.c(),s=M()},m(i,a){o[e].m(i,a),_(i,s,a),l=!0},p(i,a){let u=e;e=c(i),e===u?o[e].p(i,a):(N(),y(o[u],1,1,()=>{o[u]=null}),W(),t=o[e],t?t.p(i,a):(t=o[e]=n[e](i),t.c()),v(t,1),t.m(s.parentNode,s))},i(i){l||(v(t),l=!0)},o(i){y(t),l=!1},d(i){o[e].d(i),i&&b(s)}}}function Z(r){let e,t;return e=new I({props:{nobranding:!0,$$slots:{default:[X]},$$scope:{ctx:r}}}),{c(){T(e.$$.fragment)},m(s,l){L(e,s,l),t=!0},p(s,[l]){const n={};l&527&&(n.$$scope={dirty:l,ctx:s}),e.$set(n)},i(s){t||(v(e.$$.fragment,s),t=!0)},o(s){y(e.$$.fragment,s),t=!1},d(s){R(e,s)}}}function x(r,e,t){let s,{params:l}=e,n="",o=!1,c=!1;async function i(){if(o)return;t(1,o=!0);const g=new Y("../");try{const $=j(l==null?void 0:l.token);await g.collection($.collectionId).confirmEmailChange(l==null?void 0:l.token,n),t(2,c=!0)}catch($){B.errorResponseHandler($)}t(1,o=!1)}const a=()=>window.close();function u(){n=this.value,t(0,n)}return r.$$set=g=>{"params"in g&&t(5,l=g.params)},r.$$.update=()=>{r.$$.dirty&32&&t(3,s=J.getJWTPayload(l==null?void 0:l.token).newEmail||"")},[n,o,c,s,i,l,a,u]}class te extends z{constructor(e){super(),A(this,e,x,Z,G,{params:5})}}export{te as default}; diff --git a/ui/dist/assets/PageRecordConfirmPasswordReset.1767c74b.js b/ui/dist/assets/PageRecordConfirmPasswordReset.ce74e903.js similarity index 98% rename from ui/dist/assets/PageRecordConfirmPasswordReset.1767c74b.js rename to ui/dist/assets/PageRecordConfirmPasswordReset.ce74e903.js index 12d4213b..67e435fb 100644 --- a/ui/dist/assets/PageRecordConfirmPasswordReset.1767c74b.js +++ b/ui/dist/assets/PageRecordConfirmPasswordReset.ce74e903.js @@ -1,4 +1,4 @@ -import{S as I,i as J,s as M,F as W,c as F,m as N,t as P,a as q,d as L,C as Y,E as j,g as _,k as B,n as D,o as m,G as K,H as O,p as Q,q as A,e as b,w as h,b as y,f as p,r as E,h as w,u as H,v as U,y as S,x as V,z as R}from"./index.d939dbbd.js";function X(r){let e,l,s,n,t,o,c,u,i,a,v,k,g,C,d=r[4]&&G(r);return o=new A({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),u=new A({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),{c(){e=b("form"),l=b("div"),s=b("h5"),n=h(`Reset your user password +import{S as I,i as J,s as M,F as W,c as F,m as N,t as P,a as q,d as L,C as Y,E as j,g as _,k as B,n as D,o as m,G as K,H as O,p as Q,q as A,e as b,w as h,b as y,f as p,r as E,h as w,u as H,v as U,y as S,x as V,z as R}from"./index.e8d8151e.js";function X(r){let e,l,s,n,t,o,c,u,i,a,v,k,g,C,d=r[4]&&G(r);return o=new A({props:{class:"form-field required",name:"password",$$slots:{default:[x,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),u=new A({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[ee,({uniqueId:f})=>({10:f}),({uniqueId:f})=>f?1024:0]},$$scope:{ctx:r}}}),{c(){e=b("form"),l=b("div"),s=b("h5"),n=h(`Reset your user password `),d&&d.c(),t=y(),F(o.$$.fragment),c=y(),F(u.$$.fragment),i=y(),a=b("button"),v=b("span"),v.textContent="Set new password",p(l,"class","content txt-center m-b-base"),p(v,"class","txt"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block"),a.disabled=r[2],E(a,"btn-loading",r[2])},m(f,$){_(f,e,$),w(e,l),w(l,s),w(s,n),d&&d.m(s,null),w(e,t),N(o,e,null),w(e,c),N(u,e,null),w(e,i),w(e,a),w(a,v),k=!0,g||(C=H(e,"submit",U(r[5])),g=!0)},p(f,$){f[4]?d?d.p(f,$):(d=G(f),d.c(),d.m(s,null)):d&&(d.d(1),d=null);const T={};$&3073&&(T.$$scope={dirty:$,ctx:f}),o.$set(T);const z={};$&3074&&(z.$$scope={dirty:$,ctx:f}),u.$set(z),(!k||$&4)&&(a.disabled=f[2]),(!k||$&4)&&E(a,"btn-loading",f[2])},i(f){k||(P(o.$$.fragment,f),P(u.$$.fragment,f),k=!0)},o(f){q(o.$$.fragment,f),q(u.$$.fragment,f),k=!1},d(f){f&&m(e),d&&d.d(),L(o),L(u),g=!1,C()}}}function Z(r){let e,l,s,n,t;return{c(){e=b("div"),e.innerHTML=`

Successfully changed the user password.

You can now sign in with your new password.

`,l=y(),s=b("button"),s.textContent="Close",p(e,"class","alert alert-success"),p(s,"type","button"),p(s,"class","btn btn-secondary btn-block")},m(o,c){_(o,e,c),_(o,l,c),_(o,s,c),n||(t=H(s,"click",r[7]),n=!0)},p:S,i:S,o:S,d(o){o&&m(e),o&&m(l),o&&m(s),n=!1,t()}}}function G(r){let e,l,s;return{c(){e=h("for "),l=b("strong"),s=h(r[4])},m(n,t){_(n,e,t),_(n,l,t),w(l,s)},p(n,t){t&16&&V(s,n[4])},d(n){n&&m(e),n&&m(l)}}}function x(r){let e,l,s,n,t,o,c,u;return{c(){e=b("label"),l=h("New password"),n=y(),t=b("input"),p(e,"for",s=r[10]),p(t,"type","password"),p(t,"id",o=r[10]),t.required=!0,t.autofocus=!0},m(i,a){_(i,e,a),w(e,l),_(i,n,a),_(i,t,a),R(t,r[0]),t.focus(),c||(u=H(t,"input",r[8]),c=!0)},p(i,a){a&1024&&s!==(s=i[10])&&p(e,"for",s),a&1024&&o!==(o=i[10])&&p(t,"id",o),a&1&&t.value!==i[0]&&R(t,i[0])},d(i){i&&m(e),i&&m(n),i&&m(t),c=!1,u()}}}function ee(r){let e,l,s,n,t,o,c,u;return{c(){e=b("label"),l=h("New password confirm"),n=y(),t=b("input"),p(e,"for",s=r[10]),p(t,"type","password"),p(t,"id",o=r[10]),t.required=!0},m(i,a){_(i,e,a),w(e,l),_(i,n,a),_(i,t,a),R(t,r[1]),c||(u=H(t,"input",r[9]),c=!0)},p(i,a){a&1024&&s!==(s=i[10])&&p(e,"for",s),a&1024&&o!==(o=i[10])&&p(t,"id",o),a&2&&t.value!==i[1]&&R(t,i[1])},d(i){i&&m(e),i&&m(n),i&&m(t),c=!1,u()}}}function te(r){let e,l,s,n;const t=[Z,X],o=[];function c(u,i){return u[3]?0:1}return e=c(r),l=o[e]=t[e](r),{c(){l.c(),s=j()},m(u,i){o[e].m(u,i),_(u,s,i),n=!0},p(u,i){let a=e;e=c(u),e===a?o[e].p(u,i):(B(),q(o[a],1,1,()=>{o[a]=null}),D(),l=o[e],l?l.p(u,i):(l=o[e]=t[e](u),l.c()),P(l,1),l.m(s.parentNode,s))},i(u){n||(P(l),n=!0)},o(u){q(l),n=!1},d(u){o[e].d(u),u&&m(s)}}}function se(r){let e,l;return e=new W({props:{nobranding:!0,$$slots:{default:[te]},$$scope:{ctx:r}}}),{c(){F(e.$$.fragment)},m(s,n){N(e,s,n),l=!0},p(s,[n]){const t={};n&2079&&(t.$$scope={dirty:n,ctx:s}),e.$set(t)},i(s){l||(P(e.$$.fragment,s),l=!0)},o(s){q(e.$$.fragment,s),l=!1},d(s){L(e,s)}}}function le(r,e,l){let s,{params:n}=e,t="",o="",c=!1,u=!1;async function i(){if(c)return;l(2,c=!0);const g=new K("../");try{const C=O(n==null?void 0:n.token);await g.collection(C.collectionId).confirmPasswordReset(n==null?void 0:n.token,t,o),l(3,u=!0)}catch(C){Q.errorResponseHandler(C)}l(2,c=!1)}const a=()=>window.close();function v(){t=this.value,l(0,t)}function k(){o=this.value,l(1,o)}return r.$$set=g=>{"params"in g&&l(6,n=g.params)},r.$$.update=()=>{r.$$.dirty&64&&l(4,s=Y.getJWTPayload(n==null?void 0:n.token).email||"")},[t,o,c,u,s,i,n,a,v,k]}class oe extends I{constructor(e){super(),J(this,e,le,se,M,{params:6})}}export{oe as default}; diff --git a/ui/dist/assets/PageRecordConfirmVerification.77b2a45d.js b/ui/dist/assets/PageRecordConfirmVerification.7214c772.js similarity index 97% rename from ui/dist/assets/PageRecordConfirmVerification.77b2a45d.js rename to ui/dist/assets/PageRecordConfirmVerification.7214c772.js index 1ea84532..d58c20d0 100644 --- a/ui/dist/assets/PageRecordConfirmVerification.77b2a45d.js +++ b/ui/dist/assets/PageRecordConfirmVerification.7214c772.js @@ -1,3 +1,3 @@ -import{S as v,i as y,s as w,F as x,c as C,m as g,t as $,a as H,d as L,G as M,H as P,E as S,g as r,o as a,e as u,b as _,f,u as b,y as p}from"./index.d939dbbd.js";function T(o){let t,s,e,n,l;return{c(){t=u("div"),t.innerHTML=`
+import{S as v,i as y,s as w,F as x,c as C,m as g,t as $,a as H,d as L,G as M,H as P,E as S,g as r,o as a,e as u,b as _,f,u as b,y as p}from"./index.e8d8151e.js";function T(o){let t,s,e,n,l;return{c(){t=u("div"),t.innerHTML=`

Invalid or expired verification token.

`,s=_(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-danger"),f(e,"type","button"),f(e,"class","btn btn-secondary btn-block")},m(i,c){r(i,t,c),r(i,s,c),r(i,e,c),n||(l=b(e,"click",o[4]),n=!0)},p,d(i){i&&a(t),i&&a(s),i&&a(e),n=!1,l()}}}function F(o){let t,s,e,n,l;return{c(){t=u("div"),t.innerHTML=`

Successfully verified email address.

`,s=_(),e=u("button"),e.textContent="Close",f(t,"class","alert alert-success"),f(e,"type","button"),f(e,"class","btn btn-secondary btn-block")},m(i,c){r(i,t,c),r(i,s,c),r(i,e,c),n||(l=b(e,"click",o[3]),n=!0)},p,d(i){i&&a(t),i&&a(s),i&&a(e),n=!1,l()}}}function I(o){let t;return{c(){t=u("div"),t.innerHTML='
Please wait...
',f(t,"class","txt-center")},m(s,e){r(s,t,e)},p,d(s){s&&a(t)}}}function V(o){let t;function s(l,i){return l[1]?I:l[0]?F:T}let e=s(o),n=e(o);return{c(){n.c(),t=S()},m(l,i){n.m(l,i),r(l,t,i)},p(l,i){e===(e=s(l))&&n?n.p(l,i):(n.d(1),n=e(l),n&&(n.c(),n.m(t.parentNode,t)))},d(l){n.d(l),l&&a(t)}}}function q(o){let t,s;return t=new x({props:{nobranding:!0,$$slots:{default:[V]},$$scope:{ctx:o}}}),{c(){C(t.$$.fragment)},m(e,n){g(t,e,n),s=!0},p(e,[n]){const l={};n&67&&(l.$$scope={dirty:n,ctx:e}),t.$set(l)},i(e){s||($(t.$$.fragment,e),s=!0)},o(e){H(t.$$.fragment,e),s=!1},d(e){L(t,e)}}}function A(o,t,s){let{params:e}=t,n=!1,l=!1;i();async function i(){s(1,l=!0);const d=new M("../");try{const m=P(e==null?void 0:e.token);await d.collection(m.collectionId).confirmVerification(e==null?void 0:e.token),s(0,n=!0)}catch{s(0,n=!1)}s(1,l=!1)}const c=()=>window.close(),k=()=>window.close();return o.$$set=d=>{"params"in d&&s(2,e=d.params)},[n,l,e,c,k]}class G extends v{constructor(t){super(),y(this,t,A,q,w,{params:2})}}export{G as default}; diff --git a/ui/dist/assets/RealtimeApiDocs.311e36b6.js b/ui/dist/assets/RealtimeApiDocs.e0a4f9c5.js similarity index 98% rename from ui/dist/assets/RealtimeApiDocs.311e36b6.js rename to ui/dist/assets/RealtimeApiDocs.e0a4f9c5.js index 96385a5f..d98afbbe 100644 --- a/ui/dist/assets/RealtimeApiDocs.311e36b6.js +++ b/ui/dist/assets/RealtimeApiDocs.e0a4f9c5.js @@ -1,4 +1,4 @@ -import{S as re,i as ae,s as be,N as ue,C as P,e as u,w as y,b as a,c as te,f as p,g as t,h as I,m as ne,x as pe,t as ie,a as le,o as n,d as ce,R as me,p as de}from"./index.d939dbbd.js";import{S as fe}from"./SdkTabs.2a5180be.js";function $e(o){var B,U,W,A,H,L,T,q,M,N,j,J;let i,m,l=o[0].name+"",b,d,h,f,_,$,k,c,S,v,w,R,C,g,E,r,D;return c=new fe({props:{js:` +import{S as re,i as ae,s as be,N as ue,C as P,e as u,w as y,b as a,c as te,f as p,g as t,h as I,m as ne,x as pe,t as ie,a as le,o as n,d as ce,R as me,p as de}from"./index.e8d8151e.js";import{S as fe}from"./SdkTabs.6909f1b6.js";function $e(o){var B,U,W,A,H,L,T,q,M,N,j,J;let i,m,l=o[0].name+"",b,d,h,f,_,$,k,c,S,v,w,R,C,g,E,r,D;return c=new fe({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[1]}'); diff --git a/ui/dist/assets/RequestEmailChangeDocs.6f686b5c.js b/ui/dist/assets/RequestEmailChangeDocs.8d460654.js similarity index 98% rename from ui/dist/assets/RequestEmailChangeDocs.6f686b5c.js rename to ui/dist/assets/RequestEmailChangeDocs.8d460654.js index 2143360a..352f8a09 100644 --- a/ui/dist/assets/RequestEmailChangeDocs.6f686b5c.js +++ b/ui/dist/assets/RequestEmailChangeDocs.8d460654.js @@ -1,4 +1,4 @@ -import{S as Te,i as Ee,s as Be,e as c,w as v,b as h,c as Pe,f,g as r,h as n,m as Ce,x as I,O as ve,P as Se,k as Re,Q as Me,n as Ae,t as x,a as ee,o as m,d as ye,R as We,C as ze,p as He,r as L,u as Oe,N as Ue}from"./index.d939dbbd.js";import{S as je}from"./SdkTabs.2a5180be.js";function we(o,l,s){const a=o.slice();return a[5]=l[s],a}function ge(o,l,s){const a=o.slice();return a[5]=l[s],a}function $e(o,l){let s,a=l[5].code+"",_,b,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){s=c("button"),_=v(a),b=h(),f(s,"class","tab-item"),L(s,"active",l[1]===l[5].code),this.first=s},m($,q){r($,s,q),n(s,_),n(s,b),i||(p=Oe(s,"click",u),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&I(_,a),q&6&&L(s,"active",l[1]===l[5].code)},d($){$&&m(s),i=!1,p()}}}function qe(o,l){let s,a,_,b;return a=new Ue({props:{content:l[5].body}}),{key:o,first:null,c(){s=c("div"),Pe(a.$$.fragment),_=h(),f(s,"class","tab-item"),L(s,"active",l[1]===l[5].code),this.first=s},m(i,p){r(i,s,p),Ce(a,s,null),n(s,_),b=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),a.$set(u),(!b||p&6)&&L(s,"active",l[1]===l[5].code)},i(i){b||(x(a.$$.fragment,i),b=!0)},o(i){ee(a.$$.fragment,i),b=!1},d(i){i&&m(s),ye(a)}}}function De(o){var de,pe,ue,fe;let l,s,a=o[0].name+"",_,b,i,p,u,$,q,z=o[0].name+"",N,te,F,P,K,T,Q,w,H,le,O,E,se,G,U=o[0].name+"",J,ae,oe,j,V,B,X,S,Y,R,Z,C,M,g=[],ne=new Map,ie,A,k=[],ce=new Map,y;P=new je({props:{js:` +import{S as Te,i as Ee,s as Be,e as c,w as v,b as h,c as Pe,f,g as r,h as n,m as Ce,x as I,O as ve,P as Se,k as Re,Q as Me,n as Ae,t as x,a as ee,o as m,d as ye,R as We,C as ze,p as He,r as L,u as Oe,N as Ue}from"./index.e8d8151e.js";import{S as je}from"./SdkTabs.6909f1b6.js";function we(o,l,s){const a=o.slice();return a[5]=l[s],a}function ge(o,l,s){const a=o.slice();return a[5]=l[s],a}function $e(o,l){let s,a=l[5].code+"",_,b,i,p;function u(){return l[4](l[5])}return{key:o,first:null,c(){s=c("button"),_=v(a),b=h(),f(s,"class","tab-item"),L(s,"active",l[1]===l[5].code),this.first=s},m($,q){r($,s,q),n(s,_),n(s,b),i||(p=Oe(s,"click",u),i=!0)},p($,q){l=$,q&4&&a!==(a=l[5].code+"")&&I(_,a),q&6&&L(s,"active",l[1]===l[5].code)},d($){$&&m(s),i=!1,p()}}}function qe(o,l){let s,a,_,b;return a=new Ue({props:{content:l[5].body}}),{key:o,first:null,c(){s=c("div"),Pe(a.$$.fragment),_=h(),f(s,"class","tab-item"),L(s,"active",l[1]===l[5].code),this.first=s},m(i,p){r(i,s,p),Ce(a,s,null),n(s,_),b=!0},p(i,p){l=i;const u={};p&4&&(u.content=l[5].body),a.$set(u),(!b||p&6)&&L(s,"active",l[1]===l[5].code)},i(i){b||(x(a.$$.fragment,i),b=!0)},o(i){ee(a.$$.fragment,i),b=!1},d(i){i&&m(s),ye(a)}}}function De(o){var de,pe,ue,fe;let l,s,a=o[0].name+"",_,b,i,p,u,$,q,z=o[0].name+"",N,te,F,P,K,T,Q,w,H,le,O,E,se,G,U=o[0].name+"",J,ae,oe,j,V,B,X,S,Y,R,Z,C,M,g=[],ne=new Map,ie,A,k=[],ce=new Map,y;P=new je({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${o[3]}'); diff --git a/ui/dist/assets/RequestPasswordResetDocs.1f7548dd.js b/ui/dist/assets/RequestPasswordResetDocs.b37ecab0.js similarity index 97% rename from ui/dist/assets/RequestPasswordResetDocs.1f7548dd.js rename to ui/dist/assets/RequestPasswordResetDocs.b37ecab0.js index 29f4b16d..f7057d32 100644 --- a/ui/dist/assets/RequestPasswordResetDocs.1f7548dd.js +++ b/ui/dist/assets/RequestPasswordResetDocs.b37ecab0.js @@ -1,4 +1,4 @@ -import{S as Pe,i as $e,s as qe,e as c,w,b as v,c as ve,f as b,g as r,h as n,m as we,x as F,O as ue,P as Re,k as ge,Q as ye,n as Be,t as Z,a as x,o as d,d as he,R as Ce,C as Se,p as Te,r as L,u as Me,N as Ae}from"./index.d939dbbd.js";import{S as Ue}from"./SdkTabs.2a5180be.js";function me(a,s,l){const o=a.slice();return o[5]=s[l],o}function be(a,s,l){const o=a.slice();return o[5]=s[l],o}function _e(a,s){let l,o=s[5].code+"",_,m,i,p;function u(){return s[4](s[5])}return{key:a,first:null,c(){l=c("button"),_=w(o),m=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(P,$){r(P,l,$),n(l,_),n(l,m),i||(p=Me(l,"click",u),i=!0)},p(P,$){s=P,$&4&&o!==(o=s[5].code+"")&&F(_,o),$&6&&L(l,"active",s[1]===s[5].code)},d(P){P&&d(l),i=!1,p()}}}function ke(a,s){let l,o,_,m;return o=new Ae({props:{content:s[5].body}}),{key:a,first:null,c(){l=c("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(i,p){r(i,l,p),we(o,l,null),n(l,_),m=!0},p(i,p){s=i;const u={};p&4&&(u.content=s[5].body),o.$set(u),(!m||p&6)&&L(l,"active",s[1]===s[5].code)},i(i){m||(Z(o.$$.fragment,i),m=!0)},o(i){x(o.$$.fragment,i),m=!1},d(i){i&&d(l),he(o)}}}function je(a){var re,de;let s,l,o=a[0].name+"",_,m,i,p,u,P,$,D=a[0].name+"",N,ee,Q,q,z,B,G,R,H,te,I,C,se,J,O=a[0].name+"",K,le,V,S,W,T,X,M,Y,g,A,h=[],oe=new Map,ae,U,k=[],ne=new Map,y;q=new Ue({props:{js:` +import{S as Pe,i as $e,s as qe,e as c,w,b as v,c as ve,f as b,g as r,h as n,m as we,x as F,O as ue,P as Re,k as ge,Q as ye,n as Be,t as Z,a as x,o as d,d as he,R as Ce,C as Se,p as Te,r as L,u as Me,N as Ae}from"./index.e8d8151e.js";import{S as Ue}from"./SdkTabs.6909f1b6.js";function me(a,s,l){const o=a.slice();return o[5]=s[l],o}function be(a,s,l){const o=a.slice();return o[5]=s[l],o}function _e(a,s){let l,o=s[5].code+"",_,m,i,p;function u(){return s[4](s[5])}return{key:a,first:null,c(){l=c("button"),_=w(o),m=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(P,$){r(P,l,$),n(l,_),n(l,m),i||(p=Me(l,"click",u),i=!0)},p(P,$){s=P,$&4&&o!==(o=s[5].code+"")&&F(_,o),$&6&&L(l,"active",s[1]===s[5].code)},d(P){P&&d(l),i=!1,p()}}}function ke(a,s){let l,o,_,m;return o=new Ae({props:{content:s[5].body}}),{key:a,first:null,c(){l=c("div"),ve(o.$$.fragment),_=v(),b(l,"class","tab-item"),L(l,"active",s[1]===s[5].code),this.first=l},m(i,p){r(i,l,p),we(o,l,null),n(l,_),m=!0},p(i,p){s=i;const u={};p&4&&(u.content=s[5].body),o.$set(u),(!m||p&6)&&L(l,"active",s[1]===s[5].code)},i(i){m||(Z(o.$$.fragment,i),m=!0)},o(i){x(o.$$.fragment,i),m=!1},d(i){i&&d(l),he(o)}}}function je(a){var re,de;let s,l,o=a[0].name+"",_,m,i,p,u,P,$,D=a[0].name+"",N,ee,Q,q,z,B,G,R,H,te,I,C,se,J,O=a[0].name+"",K,le,V,S,W,T,X,M,Y,g,A,h=[],oe=new Map,ae,U,k=[],ne=new Map,y;q=new Ue({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/RequestVerificationDocs.19557128.js b/ui/dist/assets/RequestVerificationDocs.bc7b243e.js similarity index 97% rename from ui/dist/assets/RequestVerificationDocs.19557128.js rename to ui/dist/assets/RequestVerificationDocs.bc7b243e.js index ec51f050..301171fe 100644 --- a/ui/dist/assets/RequestVerificationDocs.19557128.js +++ b/ui/dist/assets/RequestVerificationDocs.bc7b243e.js @@ -1,4 +1,4 @@ -import{S as qe,i as we,s as Pe,e as c,w as h,b as v,c as ve,f as b,g as r,h as i,m as he,x as E,O as me,P as ge,k as ye,Q as Be,n as Ce,t as Z,a as x,o as f,d as $e,R as Se,C as Te,p as Re,r as F,u as Ve,N as Me}from"./index.d939dbbd.js";import{S as Ae}from"./SdkTabs.2a5180be.js";function pe(a,l,s){const o=a.slice();return o[5]=l[s],o}function be(a,l,s){const o=a.slice();return o[5]=l[s],o}function _e(a,l){let s,o=l[5].code+"",_,p,n,d;function m(){return l[4](l[5])}return{key:a,first:null,c(){s=c("button"),_=h(o),p=v(),b(s,"class","tab-item"),F(s,"active",l[1]===l[5].code),this.first=s},m(q,w){r(q,s,w),i(s,_),i(s,p),n||(d=Ve(s,"click",m),n=!0)},p(q,w){l=q,w&4&&o!==(o=l[5].code+"")&&E(_,o),w&6&&F(s,"active",l[1]===l[5].code)},d(q){q&&f(s),n=!1,d()}}}function ke(a,l){let s,o,_,p;return o=new Me({props:{content:l[5].body}}),{key:a,first:null,c(){s=c("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),F(s,"active",l[1]===l[5].code),this.first=s},m(n,d){r(n,s,d),he(o,s,null),i(s,_),p=!0},p(n,d){l=n;const m={};d&4&&(m.content=l[5].body),o.$set(m),(!p||d&6)&&F(s,"active",l[1]===l[5].code)},i(n){p||(Z(o.$$.fragment,n),p=!0)},o(n){x(o.$$.fragment,n),p=!1},d(n){n&&f(s),$e(o)}}}function Ue(a){var re,fe;let l,s,o=a[0].name+"",_,p,n,d,m,q,w,j=a[0].name+"",L,ee,N,P,Q,C,z,g,D,te,H,S,le,G,I=a[0].name+"",J,se,K,T,W,R,X,V,Y,y,M,$=[],oe=new Map,ae,A,k=[],ie=new Map,B;P=new Ae({props:{js:` +import{S as qe,i as we,s as Pe,e as c,w as h,b as v,c as ve,f as b,g as r,h as i,m as he,x as E,O as me,P as ge,k as ye,Q as Be,n as Ce,t as Z,a as x,o as f,d as $e,R as Se,C as Te,p as Re,r as F,u as Ve,N as Me}from"./index.e8d8151e.js";import{S as Ae}from"./SdkTabs.6909f1b6.js";function pe(a,l,s){const o=a.slice();return o[5]=l[s],o}function be(a,l,s){const o=a.slice();return o[5]=l[s],o}function _e(a,l){let s,o=l[5].code+"",_,p,n,d;function m(){return l[4](l[5])}return{key:a,first:null,c(){s=c("button"),_=h(o),p=v(),b(s,"class","tab-item"),F(s,"active",l[1]===l[5].code),this.first=s},m(q,w){r(q,s,w),i(s,_),i(s,p),n||(d=Ve(s,"click",m),n=!0)},p(q,w){l=q,w&4&&o!==(o=l[5].code+"")&&E(_,o),w&6&&F(s,"active",l[1]===l[5].code)},d(q){q&&f(s),n=!1,d()}}}function ke(a,l){let s,o,_,p;return o=new Me({props:{content:l[5].body}}),{key:a,first:null,c(){s=c("div"),ve(o.$$.fragment),_=v(),b(s,"class","tab-item"),F(s,"active",l[1]===l[5].code),this.first=s},m(n,d){r(n,s,d),he(o,s,null),i(s,_),p=!0},p(n,d){l=n;const m={};d&4&&(m.content=l[5].body),o.$set(m),(!p||d&6)&&F(s,"active",l[1]===l[5].code)},i(n){p||(Z(o.$$.fragment,n),p=!0)},o(n){x(o.$$.fragment,n),p=!1},d(n){n&&f(s),$e(o)}}}function Ue(a){var re,fe;let l,s,o=a[0].name+"",_,p,n,d,m,q,w,j=a[0].name+"",L,ee,N,P,Q,C,z,g,D,te,H,S,le,G,I=a[0].name+"",J,se,K,T,W,R,X,V,Y,y,M,$=[],oe=new Map,ae,A,k=[],ie=new Map,B;P=new Ae({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${a[3]}'); diff --git a/ui/dist/assets/SdkTabs.2a5180be.js b/ui/dist/assets/SdkTabs.6909f1b6.js similarity index 98% rename from ui/dist/assets/SdkTabs.2a5180be.js rename to ui/dist/assets/SdkTabs.6909f1b6.js index 51062489..258ff722 100644 --- a/ui/dist/assets/SdkTabs.2a5180be.js +++ b/ui/dist/assets/SdkTabs.6909f1b6.js @@ -1 +1 @@ -import{S as q,i as B,s as F,e as v,b as j,f as h,g as y,h as m,O as C,P as J,k as O,Q,n as Y,t as N,a as P,o as w,w as E,r as S,u as z,x as R,N as A,c as G,m as H,d as L}from"./index.d939dbbd.js";function D(o,e,l){const s=o.slice();return s[6]=e[l],s}function K(o,e,l){const s=o.slice();return s[6]=e[l],s}function T(o,e){let l,s,g=e[6].title+"",r,i,n,k;function c(){return e[5](e[6])}return{key:o,first:null,c(){l=v("button"),s=v("div"),r=E(g),i=j(),h(s,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(u,_){y(u,l,_),m(l,s),m(s,r),m(l,i),n||(k=z(l,"click",c),n=!0)},p(u,_){e=u,_&4&&g!==(g=e[6].title+"")&&R(r,g),_&6&&S(l,"active",e[1]===e[6].language)},d(u){u&&w(l),n=!1,k()}}}function I(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,u,_,p,f;return s=new A({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),G(s.$$.fragment),g=j(),r=v("div"),i=v("em"),n=v("a"),c=E(k),u=E(" SDK"),p=j(),h(n,"href",_=e[6].url),h(n,"target","_blank"),h(n,"rel","noopener noreferrer"),h(i,"class","txt-sm txt-hint"),h(r,"class","txt-right"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(b,t){y(b,l,t),H(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,c),m(n,u),m(l,p),f=!0},p(b,t){e=b;const a={};t&4&&(a.language=e[6].language),t&4&&(a.content=e[6].content),s.$set(a),(!f||t&4)&&k!==(k=e[6].title+"")&&R(c,k),(!f||t&4&&_!==(_=e[6].url))&&h(n,"href",_),(!f||t&6)&&S(l,"active",e[1]===e[6].language)},i(b){f||(N(s.$$.fragment,b),f=!0)},o(b){P(s.$$.fragment,b),f=!1},d(b){b&&w(l),L(s)}}}function U(o){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,c,u,_=o[2];const p=t=>t[6].language;for(let t=0;t<_.length;t+=1){let a=K(o,_,t),d=p(a);g.set(d,s[t]=T(d,a))}let f=o[2];const b=t=>t[6].language;for(let t=0;tl(1,n=c.language);return o.$$set=c=>{"class"in c&&l(0,g=c.class),"js"in c&&l(3,r=c.js),"dart"in c&&l(4,i=c.dart)},o.$$.update=()=>{o.$$.dirty&2&&n&&localStorage.setItem(M,n),o.$$.dirty&24&&l(2,s=[{title:"JavaScript",language:"javascript",content:r,url:"https://github.com/pocketbase/js-sdk"},{title:"Dart",language:"dart",content:i,url:"https://github.com/pocketbase/dart-sdk"}])},[g,n,s,r,i,k]}class X extends q{constructor(e){super(),B(this,e,V,U,F,{class:0,js:3,dart:4})}}export{X as S}; +import{S as q,i as B,s as F,e as v,b as j,f as h,g as y,h as m,O as C,P as J,k as O,Q,n as Y,t as N,a as P,o as w,w as E,r as S,u as z,x as R,N as A,c as G,m as H,d as L}from"./index.e8d8151e.js";function D(o,e,l){const s=o.slice();return s[6]=e[l],s}function K(o,e,l){const s=o.slice();return s[6]=e[l],s}function T(o,e){let l,s,g=e[6].title+"",r,i,n,k;function c(){return e[5](e[6])}return{key:o,first:null,c(){l=v("button"),s=v("div"),r=E(g),i=j(),h(s,"class","txt"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(u,_){y(u,l,_),m(l,s),m(s,r),m(l,i),n||(k=z(l,"click",c),n=!0)},p(u,_){e=u,_&4&&g!==(g=e[6].title+"")&&R(r,g),_&6&&S(l,"active",e[1]===e[6].language)},d(u){u&&w(l),n=!1,k()}}}function I(o,e){let l,s,g,r,i,n,k=e[6].title+"",c,u,_,p,f;return s=new A({props:{language:e[6].language,content:e[6].content}}),{key:o,first:null,c(){l=v("div"),G(s.$$.fragment),g=j(),r=v("div"),i=v("em"),n=v("a"),c=E(k),u=E(" SDK"),p=j(),h(n,"href",_=e[6].url),h(n,"target","_blank"),h(n,"rel","noopener noreferrer"),h(i,"class","txt-sm txt-hint"),h(r,"class","txt-right"),h(l,"class","tab-item svelte-1maocj6"),S(l,"active",e[1]===e[6].language),this.first=l},m(b,t){y(b,l,t),H(s,l,null),m(l,g),m(l,r),m(r,i),m(i,n),m(n,c),m(n,u),m(l,p),f=!0},p(b,t){e=b;const a={};t&4&&(a.language=e[6].language),t&4&&(a.content=e[6].content),s.$set(a),(!f||t&4)&&k!==(k=e[6].title+"")&&R(c,k),(!f||t&4&&_!==(_=e[6].url))&&h(n,"href",_),(!f||t&6)&&S(l,"active",e[1]===e[6].language)},i(b){f||(N(s.$$.fragment,b),f=!0)},o(b){P(s.$$.fragment,b),f=!1},d(b){b&&w(l),L(s)}}}function U(o){let e,l,s=[],g=new Map,r,i,n=[],k=new Map,c,u,_=o[2];const p=t=>t[6].language;for(let t=0;t<_.length;t+=1){let a=K(o,_,t),d=p(a);g.set(d,s[t]=T(d,a))}let f=o[2];const b=t=>t[6].language;for(let t=0;tl(1,n=c.language);return o.$$set=c=>{"class"in c&&l(0,g=c.class),"js"in c&&l(3,r=c.js),"dart"in c&&l(4,i=c.dart)},o.$$.update=()=>{o.$$.dirty&2&&n&&localStorage.setItem(M,n),o.$$.dirty&24&&l(2,s=[{title:"JavaScript",language:"javascript",content:r,url:"https://github.com/pocketbase/js-sdk"},{title:"Dart",language:"dart",content:i,url:"https://github.com/pocketbase/dart-sdk"}])},[g,n,s,r,i,k]}class X extends q{constructor(e){super(),B(this,e,V,U,F,{class:0,js:3,dart:4})}}export{X as S}; diff --git a/ui/dist/assets/UnlinkExternalAuthDocs.a011446e.js b/ui/dist/assets/UnlinkExternalAuthDocs.52eecf60.js similarity index 98% rename from ui/dist/assets/UnlinkExternalAuthDocs.a011446e.js rename to ui/dist/assets/UnlinkExternalAuthDocs.52eecf60.js index 6966c6b1..2bd6005f 100644 --- a/ui/dist/assets/UnlinkExternalAuthDocs.a011446e.js +++ b/ui/dist/assets/UnlinkExternalAuthDocs.52eecf60.js @@ -1,4 +1,4 @@ -import{S as qe,i as Oe,s as De,e as i,w as v,b as h,c as Se,f,g as r,h as s,m as Be,x as R,O as ye,P as Me,k as We,Q as ze,n as He,t as le,a as oe,o as d,d as Ue,R as Ie,C as Le,p as Re,r as j,u as je,N as Ne}from"./index.d939dbbd.js";import{S as Ke}from"./SdkTabs.2a5180be.js";function Ae(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ce(n,l,o){const a=n.slice();return a[5]=l[o],a}function Te(n,l){let o,a=l[5].code+"",_,b,c,u;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),f(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m($,P){r($,o,P),s(o,_),s(o,b),c||(u=je(o,"click",m),c=!0)},p($,P){l=$,P&4&&a!==(a=l[5].code+"")&&R(_,a),P&6&&j(o,"active",l[1]===l[5].code)},d($){$&&d(o),c=!1,u()}}}function Ee(n,l){let o,a,_,b;return a=new Ne({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Se(a.$$.fragment),_=h(),f(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Be(a,o,null),s(o,_),b=!0},p(c,u){l=c;const m={};u&4&&(m.content=l[5].body),a.$set(m),(!b||u&6)&&j(o,"active",l[1]===l[5].code)},i(c){b||(le(a.$$.fragment,c),b=!0)},o(c){oe(a.$$.fragment,c),b=!1},d(c){c&&d(o),Ue(a)}}}function Qe(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,u,m,$,P,M=n[0].name+"",N,se,ae,K,Q,A,F,E,G,g,W,ne,z,y,ie,J,H=n[0].name+"",V,ce,X,re,Y,de,I,Z,S,x,B,ee,U,te,C,q,w=[],ue=new Map,pe,O,k=[],me=new Map,T;A=new Ke({props:{js:` +import{S as qe,i as Oe,s as De,e as i,w as v,b as h,c as Se,f,g as r,h as s,m as Be,x as R,O as ye,P as Me,k as We,Q as ze,n as He,t as le,a as oe,o as d,d as Ue,R as Ie,C as Le,p as Re,r as j,u as je,N as Ne}from"./index.e8d8151e.js";import{S as Ke}from"./SdkTabs.6909f1b6.js";function Ae(n,l,o){const a=n.slice();return a[5]=l[o],a}function Ce(n,l,o){const a=n.slice();return a[5]=l[o],a}function Te(n,l){let o,a=l[5].code+"",_,b,c,u;function m(){return l[4](l[5])}return{key:n,first:null,c(){o=i("button"),_=v(a),b=h(),f(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m($,P){r($,o,P),s(o,_),s(o,b),c||(u=je(o,"click",m),c=!0)},p($,P){l=$,P&4&&a!==(a=l[5].code+"")&&R(_,a),P&6&&j(o,"active",l[1]===l[5].code)},d($){$&&d(o),c=!1,u()}}}function Ee(n,l){let o,a,_,b;return a=new Ne({props:{content:l[5].body}}),{key:n,first:null,c(){o=i("div"),Se(a.$$.fragment),_=h(),f(o,"class","tab-item"),j(o,"active",l[1]===l[5].code),this.first=o},m(c,u){r(c,o,u),Be(a,o,null),s(o,_),b=!0},p(c,u){l=c;const m={};u&4&&(m.content=l[5].body),a.$set(m),(!b||u&6)&&j(o,"active",l[1]===l[5].code)},i(c){b||(le(a.$$.fragment,c),b=!0)},o(c){oe(a.$$.fragment,c),b=!1},d(c){c&&d(o),Ue(a)}}}function Qe(n){var he,_e,ke,ve;let l,o,a=n[0].name+"",_,b,c,u,m,$,P,M=n[0].name+"",N,se,ae,K,Q,A,F,E,G,g,W,ne,z,y,ie,J,H=n[0].name+"",V,ce,X,re,Y,de,I,Z,S,x,B,ee,U,te,C,q,w=[],ue=new Map,pe,O,k=[],me=new Map,T;A=new Ke({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${n[3]}'); diff --git a/ui/dist/assets/UpdateApiDocs.0af7bddf.js b/ui/dist/assets/UpdateApiDocs.5f466f13.js similarity index 99% rename from ui/dist/assets/UpdateApiDocs.0af7bddf.js rename to ui/dist/assets/UpdateApiDocs.5f466f13.js index f7b6c213..79e42984 100644 --- a/ui/dist/assets/UpdateApiDocs.0af7bddf.js +++ b/ui/dist/assets/UpdateApiDocs.5f466f13.js @@ -1,4 +1,4 @@ -import{S as Ct,i as St,s as Ot,C as I,N as Tt,e as r,w as y,b as m,c as Ae,f as T,g as a,h as i,m as Be,x as U,O as Pe,P as ut,k as Mt,Q as $t,n as Rt,t as pe,a as fe,o,d as Fe,R as qt,p as Dt,r as ce,u as Ht,y as G}from"./index.d939dbbd.js";import{S as Lt}from"./SdkTabs.2a5180be.js";function bt(p,t,l){const s=p.slice();return s[7]=t[l],s}function mt(p,t,l){const s=p.slice();return s[7]=t[l],s}function _t(p,t,l){const s=p.slice();return s[12]=t[l],s}function yt(p){let t;return{c(){t=r("p"),t.innerHTML="Requires admin Authorization:TOKEN header",T(t,"class","txt-hint txt-sm txt-right")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function kt(p){let t,l,s,b,u,d,f,k,C,v,O,D,A,F,M,N,B;return{c(){t=r("tr"),t.innerHTML='Auth fields',l=m(),s=r("tr"),s.innerHTML=`
Optional +import{S as Ct,i as St,s as Ot,C as I,N as Tt,e as r,w as y,b as m,c as Ae,f as T,g as a,h as i,m as Be,x as U,O as Pe,P as ut,k as Mt,Q as $t,n as Rt,t as pe,a as fe,o,d as Fe,R as qt,p as Dt,r as ce,u as Ht,y as G}from"./index.e8d8151e.js";import{S as Lt}from"./SdkTabs.6909f1b6.js";function bt(p,t,l){const s=p.slice();return s[7]=t[l],s}function mt(p,t,l){const s=p.slice();return s[7]=t[l],s}function _t(p,t,l){const s=p.slice();return s[12]=t[l],s}function yt(p){let t;return{c(){t=r("p"),t.innerHTML="Requires admin Authorization:TOKEN header",T(t,"class","txt-hint txt-sm txt-right")},m(l,s){a(l,t,s)},d(l){l&&o(t)}}}function kt(p){let t,l,s,b,u,d,f,k,C,v,O,D,A,F,M,N,B;return{c(){t=r("tr"),t.innerHTML='Auth fields',l=m(),s=r("tr"),s.innerHTML=`
Optional username
String The username of the auth record.`,b=m(),u=r("tr"),u.innerHTML=`
Optional diff --git a/ui/dist/assets/ViewApiDocs.dec83248.js b/ui/dist/assets/ViewApiDocs.06d25880.js similarity index 98% rename from ui/dist/assets/ViewApiDocs.dec83248.js rename to ui/dist/assets/ViewApiDocs.06d25880.js index 37723ee2..61b37341 100644 --- a/ui/dist/assets/ViewApiDocs.dec83248.js +++ b/ui/dist/assets/ViewApiDocs.06d25880.js @@ -1,4 +1,4 @@ -import{S as Ze,i as et,s as tt,N as Ye,e as o,w as m,b as f,c as _e,f as _,g as r,h as l,m as ke,x as me,O as Ve,P as lt,k as st,Q as nt,n as ot,t as z,a as G,o as d,d as he,R as it,C as ze,p as at,r as J,u as rt}from"./index.d939dbbd.js";import{S as dt}from"./SdkTabs.2a5180be.js";function Ge(i,s,n){const a=i.slice();return a[6]=s[n],a}function Je(i,s,n){const a=i.slice();return a[6]=s[n],a}function Ke(i){let s;return{c(){s=o("p"),s.innerHTML="Requires admin Authorization:TOKEN header",_(s,"class","txt-hint txt-sm txt-right")},m(n,a){r(n,s,a)},d(n){n&&d(s)}}}function We(i,s){let n,a=s[6].code+"",w,c,p,u;function C(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),w=m(a),c=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(h,F){r(h,n,F),l(n,w),l(n,c),p||(u=rt(n,"click",C),p=!0)},p(h,F){s=h,F&20&&J(n,"active",s[2]===s[6].code)},d(h){h&&d(n),p=!1,u()}}}function Xe(i,s){let n,a,w,c;return a=new Ye({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),_e(a.$$.fragment),w=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(p,u){r(p,n,u),ke(a,n,null),l(n,w),c=!0},p(p,u){s=p,(!c||u&20)&&J(n,"active",s[2]===s[6].code)},i(p){c||(z(a.$$.fragment,p),c=!0)},o(p){G(a.$$.fragment,p),c=!1},d(p){p&&d(n),he(a)}}}function ct(i){var Ne,Ue;let s,n,a=i[0].name+"",w,c,p,u,C,h,F,N=i[0].name+"",K,ve,W,g,X,B,Y,$,U,we,j,E,ye,Z,Q=i[0].name+"",ee,$e,te,Ce,le,I,se,x,ne,A,oe,O,ie,Re,ae,D,re,Fe,de,ge,k,Oe,S,De,Pe,Te,ce,Ee,pe,Se,Be,Ie,fe,xe,ue,M,be,P,H,R=[],Ae=new Map,Me,q,y=[],He=new Map,T;g=new dt({props:{js:` +import{S as Ze,i as et,s as tt,N as Ye,e as o,w as m,b as f,c as _e,f as _,g as r,h as l,m as ke,x as me,O as Ve,P as lt,k as st,Q as nt,n as ot,t as z,a as G,o as d,d as he,R as it,C as ze,p as at,r as J,u as rt}from"./index.e8d8151e.js";import{S as dt}from"./SdkTabs.6909f1b6.js";function Ge(i,s,n){const a=i.slice();return a[6]=s[n],a}function Je(i,s,n){const a=i.slice();return a[6]=s[n],a}function Ke(i){let s;return{c(){s=o("p"),s.innerHTML="Requires admin Authorization:TOKEN header",_(s,"class","txt-hint txt-sm txt-right")},m(n,a){r(n,s,a)},d(n){n&&d(s)}}}function We(i,s){let n,a=s[6].code+"",w,c,p,u;function C(){return s[5](s[6])}return{key:i,first:null,c(){n=o("button"),w=m(a),c=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(h,F){r(h,n,F),l(n,w),l(n,c),p||(u=rt(n,"click",C),p=!0)},p(h,F){s=h,F&20&&J(n,"active",s[2]===s[6].code)},d(h){h&&d(n),p=!1,u()}}}function Xe(i,s){let n,a,w,c;return a=new Ye({props:{content:s[6].body}}),{key:i,first:null,c(){n=o("div"),_e(a.$$.fragment),w=f(),_(n,"class","tab-item"),J(n,"active",s[2]===s[6].code),this.first=n},m(p,u){r(p,n,u),ke(a,n,null),l(n,w),c=!0},p(p,u){s=p,(!c||u&20)&&J(n,"active",s[2]===s[6].code)},i(p){c||(z(a.$$.fragment,p),c=!0)},o(p){G(a.$$.fragment,p),c=!1},d(p){p&&d(n),he(a)}}}function ct(i){var Ne,Ue;let s,n,a=i[0].name+"",w,c,p,u,C,h,F,N=i[0].name+"",K,ve,W,g,X,B,Y,$,U,we,j,E,ye,Z,Q=i[0].name+"",ee,$e,te,Ce,le,I,se,x,ne,A,oe,O,ie,Re,ae,D,re,Fe,de,ge,k,Oe,S,De,Pe,Te,ce,Ee,pe,Se,Be,Ie,fe,xe,ue,M,be,P,H,R=[],Ae=new Map,Me,q,y=[],He=new Map,T;g=new dt({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); diff --git a/ui/dist/assets/index.c5a3774d.css b/ui/dist/assets/index.5fccb547.css similarity index 69% rename from ui/dist/assets/index.c5a3774d.css rename to ui/dist/assets/index.5fccb547.css index e93cb559..8dda8bcd 100644 --- a/ui/dist/assets/index.c5a3774d.css +++ b/ui/dist/assets/index.5fccb547.css @@ -1 +1 @@ -@font-face{font-family:remixicon;src:url(../fonts/remixicon/remixicon.woff2?v=1) format("woff2"),url(../fonts/remixicon/remixicon.woff?v=1) format("woff"),url(../fonts/remixicon/remixicon.ttf?v=1) format("truetype"),url(../fonts/remixicon/remixicon.svg?v=1#remixicon) format("svg");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-regular.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-regular.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-italic.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600italic.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700italic.woff) format("woff")}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:400;src:local(""),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-regular.woff2) format("woff2"),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-regular.woff) format("woff")}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:600;src:local(""),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-600.woff2) format("woff2"),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-600.woff) format("woff")}:root{--baseFontFamily: "Source Sans Pro", sans-serif, emoji;--monospaceFontFamily: "Ubuntu Mono", monospace, emoji;--iconFontFamily: "remixicon";--txtPrimaryColor: #16161a;--txtHintColor: #666f75;--txtDisabledColor: #adb3b8;--primaryColor: #16161a;--bodyColor: #f8f9fa;--baseColor: #ffffff;--baseAlt1Color: #ebeff2;--baseAlt2Color: #dee3e8;--baseAlt3Color: #a9b4bc;--baseAlt4Color: #7c868d;--infoColor: #3da9fc;--infoAltColor: #d8eefe;--successColor: #2cb67d;--successAltColor: #d6f5e8;--dangerColor: #ef4565;--dangerAltColor: #fcdee4;--warningColor: #ff8e3c;--warningAltColor: #ffe7d6;--overlayColor: rgba(65, 80, 105, .25);--tooltipColor: rgba(0, 0, 0, .85);--shadowColor: rgba(0, 0, 0, .06);--baseFontSize: 14.5px;--xsFontSize: 12px;--smFontSize: 13px;--lgFontSize: 15px;--xlFontSize: 16px;--baseLineHeight: 22px;--smLineHeight: 16px;--lgLineHeight: 24px;--inputHeight: 34px;--btnHeight: 40px;--xsBtnHeight: 24px;--smBtnHeight: 30px;--lgBtnHeight: 54px;--baseSpacing: 30px;--xsSpacing: 15px;--smSpacing: 20px;--lgSpacing: 50px;--xlSpacing: 60px;--wrapperWidth: 850px;--smWrapperWidth: 420px;--lgWrapperWidth: 1200px;--appSidebarWidth: 75px;--pageSidebarWidth: 220px;--baseAnimationSpeed: .15s;--activeAnimationSpeed: 70ms;--entranceAnimationSpeed: .25s;--baseRadius: 3px;--lgRadius: 12px;--btnRadius: 3px;accent-color:var(--primaryColor)}html,body,div,span,applet,object,iframe,h1,h2,.breadcrumbs .breadcrumb-item,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}i{font-family:remixicon!important;font-style:normal;font-weight:400;font-size:1.1238rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}i:before{vertical-align:top;margin-top:1px;display:inline-block}.ri-24-hours-fill:before{content:"\ea01"}.ri-24-hours-line:before{content:"\ea02"}.ri-4k-fill:before{content:"\ea03"}.ri-4k-line:before{content:"\ea04"}.ri-a-b:before{content:"\ea05"}.ri-account-box-fill:before{content:"\ea06"}.ri-account-box-line:before{content:"\ea07"}.ri-account-circle-fill:before{content:"\ea08"}.ri-account-circle-line:before{content:"\ea09"}.ri-account-pin-box-fill:before{content:"\ea0a"}.ri-account-pin-box-line:before{content:"\ea0b"}.ri-account-pin-circle-fill:before{content:"\ea0c"}.ri-account-pin-circle-line:before{content:"\ea0d"}.ri-add-box-fill:before{content:"\ea0e"}.ri-add-box-line:before{content:"\ea0f"}.ri-add-circle-fill:before{content:"\ea10"}.ri-add-circle-line:before{content:"\ea11"}.ri-add-fill:before{content:"\ea12"}.ri-add-line:before{content:"\ea13"}.ri-admin-fill:before{content:"\ea14"}.ri-admin-line:before{content:"\ea15"}.ri-advertisement-fill:before{content:"\ea16"}.ri-advertisement-line:before{content:"\ea17"}.ri-airplay-fill:before{content:"\ea18"}.ri-airplay-line:before{content:"\ea19"}.ri-alarm-fill:before{content:"\ea1a"}.ri-alarm-line:before{content:"\ea1b"}.ri-alarm-warning-fill:before{content:"\ea1c"}.ri-alarm-warning-line:before{content:"\ea1d"}.ri-album-fill:before{content:"\ea1e"}.ri-album-line:before{content:"\ea1f"}.ri-alert-fill:before{content:"\ea20"}.ri-alert-line:before{content:"\ea21"}.ri-aliens-fill:before{content:"\ea22"}.ri-aliens-line:before{content:"\ea23"}.ri-align-bottom:before{content:"\ea24"}.ri-align-center:before{content:"\ea25"}.ri-align-justify:before{content:"\ea26"}.ri-align-left:before{content:"\ea27"}.ri-align-right:before{content:"\ea28"}.ri-align-top:before{content:"\ea29"}.ri-align-vertically:before{content:"\ea2a"}.ri-alipay-fill:before{content:"\ea2b"}.ri-alipay-line:before{content:"\ea2c"}.ri-amazon-fill:before{content:"\ea2d"}.ri-amazon-line:before{content:"\ea2e"}.ri-anchor-fill:before{content:"\ea2f"}.ri-anchor-line:before{content:"\ea30"}.ri-ancient-gate-fill:before{content:"\ea31"}.ri-ancient-gate-line:before{content:"\ea32"}.ri-ancient-pavilion-fill:before{content:"\ea33"}.ri-ancient-pavilion-line:before{content:"\ea34"}.ri-android-fill:before{content:"\ea35"}.ri-android-line:before{content:"\ea36"}.ri-angularjs-fill:before{content:"\ea37"}.ri-angularjs-line:before{content:"\ea38"}.ri-anticlockwise-2-fill:before{content:"\ea39"}.ri-anticlockwise-2-line:before{content:"\ea3a"}.ri-anticlockwise-fill:before{content:"\ea3b"}.ri-anticlockwise-line:before{content:"\ea3c"}.ri-app-store-fill:before{content:"\ea3d"}.ri-app-store-line:before{content:"\ea3e"}.ri-apple-fill:before{content:"\ea3f"}.ri-apple-line:before{content:"\ea40"}.ri-apps-2-fill:before{content:"\ea41"}.ri-apps-2-line:before{content:"\ea42"}.ri-apps-fill:before{content:"\ea43"}.ri-apps-line:before{content:"\ea44"}.ri-archive-drawer-fill:before{content:"\ea45"}.ri-archive-drawer-line:before{content:"\ea46"}.ri-archive-fill:before{content:"\ea47"}.ri-archive-line:before{content:"\ea48"}.ri-arrow-down-circle-fill:before{content:"\ea49"}.ri-arrow-down-circle-line:before{content:"\ea4a"}.ri-arrow-down-fill:before{content:"\ea4b"}.ri-arrow-down-line:before{content:"\ea4c"}.ri-arrow-down-s-fill:before{content:"\ea4d"}.ri-arrow-down-s-line:before{content:"\ea4e"}.ri-arrow-drop-down-fill:before{content:"\ea4f"}.ri-arrow-drop-down-line:before{content:"\ea50"}.ri-arrow-drop-left-fill:before{content:"\ea51"}.ri-arrow-drop-left-line:before{content:"\ea52"}.ri-arrow-drop-right-fill:before{content:"\ea53"}.ri-arrow-drop-right-line:before{content:"\ea54"}.ri-arrow-drop-up-fill:before{content:"\ea55"}.ri-arrow-drop-up-line:before{content:"\ea56"}.ri-arrow-go-back-fill:before{content:"\ea57"}.ri-arrow-go-back-line:before{content:"\ea58"}.ri-arrow-go-forward-fill:before{content:"\ea59"}.ri-arrow-go-forward-line:before{content:"\ea5a"}.ri-arrow-left-circle-fill:before{content:"\ea5b"}.ri-arrow-left-circle-line:before{content:"\ea5c"}.ri-arrow-left-down-fill:before{content:"\ea5d"}.ri-arrow-left-down-line:before{content:"\ea5e"}.ri-arrow-left-fill:before{content:"\ea5f"}.ri-arrow-left-line:before{content:"\ea60"}.ri-arrow-left-right-fill:before{content:"\ea61"}.ri-arrow-left-right-line:before{content:"\ea62"}.ri-arrow-left-s-fill:before{content:"\ea63"}.ri-arrow-left-s-line:before{content:"\ea64"}.ri-arrow-left-up-fill:before{content:"\ea65"}.ri-arrow-left-up-line:before{content:"\ea66"}.ri-arrow-right-circle-fill:before{content:"\ea67"}.ri-arrow-right-circle-line:before{content:"\ea68"}.ri-arrow-right-down-fill:before{content:"\ea69"}.ri-arrow-right-down-line:before{content:"\ea6a"}.ri-arrow-right-fill:before{content:"\ea6b"}.ri-arrow-right-line:before{content:"\ea6c"}.ri-arrow-right-s-fill:before{content:"\ea6d"}.ri-arrow-right-s-line:before{content:"\ea6e"}.ri-arrow-right-up-fill:before{content:"\ea6f"}.ri-arrow-right-up-line:before{content:"\ea70"}.ri-arrow-up-circle-fill:before{content:"\ea71"}.ri-arrow-up-circle-line:before{content:"\ea72"}.ri-arrow-up-down-fill:before{content:"\ea73"}.ri-arrow-up-down-line:before{content:"\ea74"}.ri-arrow-up-fill:before{content:"\ea75"}.ri-arrow-up-line:before{content:"\ea76"}.ri-arrow-up-s-fill:before{content:"\ea77"}.ri-arrow-up-s-line:before{content:"\ea78"}.ri-artboard-2-fill:before{content:"\ea79"}.ri-artboard-2-line:before{content:"\ea7a"}.ri-artboard-fill:before{content:"\ea7b"}.ri-artboard-line:before{content:"\ea7c"}.ri-article-fill:before{content:"\ea7d"}.ri-article-line:before{content:"\ea7e"}.ri-aspect-ratio-fill:before{content:"\ea7f"}.ri-aspect-ratio-line:before{content:"\ea80"}.ri-asterisk:before{content:"\ea81"}.ri-at-fill:before{content:"\ea82"}.ri-at-line:before{content:"\ea83"}.ri-attachment-2:before{content:"\ea84"}.ri-attachment-fill:before{content:"\ea85"}.ri-attachment-line:before{content:"\ea86"}.ri-auction-fill:before{content:"\ea87"}.ri-auction-line:before{content:"\ea88"}.ri-award-fill:before{content:"\ea89"}.ri-award-line:before{content:"\ea8a"}.ri-baidu-fill:before{content:"\ea8b"}.ri-baidu-line:before{content:"\ea8c"}.ri-ball-pen-fill:before{content:"\ea8d"}.ri-ball-pen-line:before{content:"\ea8e"}.ri-bank-card-2-fill:before{content:"\ea8f"}.ri-bank-card-2-line:before{content:"\ea90"}.ri-bank-card-fill:before{content:"\ea91"}.ri-bank-card-line:before{content:"\ea92"}.ri-bank-fill:before{content:"\ea93"}.ri-bank-line:before{content:"\ea94"}.ri-bar-chart-2-fill:before{content:"\ea95"}.ri-bar-chart-2-line:before{content:"\ea96"}.ri-bar-chart-box-fill:before{content:"\ea97"}.ri-bar-chart-box-line:before{content:"\ea98"}.ri-bar-chart-fill:before{content:"\ea99"}.ri-bar-chart-grouped-fill:before{content:"\ea9a"}.ri-bar-chart-grouped-line:before{content:"\ea9b"}.ri-bar-chart-horizontal-fill:before{content:"\ea9c"}.ri-bar-chart-horizontal-line:before{content:"\ea9d"}.ri-bar-chart-line:before{content:"\ea9e"}.ri-barcode-box-fill:before{content:"\ea9f"}.ri-barcode-box-line:before{content:"\eaa0"}.ri-barcode-fill:before{content:"\eaa1"}.ri-barcode-line:before{content:"\eaa2"}.ri-barricade-fill:before{content:"\eaa3"}.ri-barricade-line:before{content:"\eaa4"}.ri-base-station-fill:before{content:"\eaa5"}.ri-base-station-line:before{content:"\eaa6"}.ri-basketball-fill:before{content:"\eaa7"}.ri-basketball-line:before{content:"\eaa8"}.ri-battery-2-charge-fill:before{content:"\eaa9"}.ri-battery-2-charge-line:before{content:"\eaaa"}.ri-battery-2-fill:before{content:"\eaab"}.ri-battery-2-line:before{content:"\eaac"}.ri-battery-charge-fill:before{content:"\eaad"}.ri-battery-charge-line:before{content:"\eaae"}.ri-battery-fill:before{content:"\eaaf"}.ri-battery-line:before{content:"\eab0"}.ri-battery-low-fill:before{content:"\eab1"}.ri-battery-low-line:before{content:"\eab2"}.ri-battery-saver-fill:before{content:"\eab3"}.ri-battery-saver-line:before{content:"\eab4"}.ri-battery-share-fill:before{content:"\eab5"}.ri-battery-share-line:before{content:"\eab6"}.ri-bear-smile-fill:before{content:"\eab7"}.ri-bear-smile-line:before{content:"\eab8"}.ri-behance-fill:before{content:"\eab9"}.ri-behance-line:before{content:"\eaba"}.ri-bell-fill:before{content:"\eabb"}.ri-bell-line:before{content:"\eabc"}.ri-bike-fill:before{content:"\eabd"}.ri-bike-line:before{content:"\eabe"}.ri-bilibili-fill:before{content:"\eabf"}.ri-bilibili-line:before{content:"\eac0"}.ri-bill-fill:before{content:"\eac1"}.ri-bill-line:before{content:"\eac2"}.ri-billiards-fill:before{content:"\eac3"}.ri-billiards-line:before{content:"\eac4"}.ri-bit-coin-fill:before{content:"\eac5"}.ri-bit-coin-line:before{content:"\eac6"}.ri-blaze-fill:before{content:"\eac7"}.ri-blaze-line:before{content:"\eac8"}.ri-bluetooth-connect-fill:before{content:"\eac9"}.ri-bluetooth-connect-line:before{content:"\eaca"}.ri-bluetooth-fill:before{content:"\eacb"}.ri-bluetooth-line:before{content:"\eacc"}.ri-blur-off-fill:before{content:"\eacd"}.ri-blur-off-line:before{content:"\eace"}.ri-body-scan-fill:before{content:"\eacf"}.ri-body-scan-line:before{content:"\ead0"}.ri-bold:before{content:"\ead1"}.ri-book-2-fill:before{content:"\ead2"}.ri-book-2-line:before{content:"\ead3"}.ri-book-3-fill:before{content:"\ead4"}.ri-book-3-line:before{content:"\ead5"}.ri-book-fill:before{content:"\ead6"}.ri-book-line:before{content:"\ead7"}.ri-book-mark-fill:before{content:"\ead8"}.ri-book-mark-line:before{content:"\ead9"}.ri-book-open-fill:before{content:"\eada"}.ri-book-open-line:before{content:"\eadb"}.ri-book-read-fill:before{content:"\eadc"}.ri-book-read-line:before{content:"\eadd"}.ri-booklet-fill:before{content:"\eade"}.ri-booklet-line:before{content:"\eadf"}.ri-bookmark-2-fill:before{content:"\eae0"}.ri-bookmark-2-line:before{content:"\eae1"}.ri-bookmark-3-fill:before{content:"\eae2"}.ri-bookmark-3-line:before{content:"\eae3"}.ri-bookmark-fill:before{content:"\eae4"}.ri-bookmark-line:before{content:"\eae5"}.ri-boxing-fill:before{content:"\eae6"}.ri-boxing-line:before{content:"\eae7"}.ri-braces-fill:before{content:"\eae8"}.ri-braces-line:before{content:"\eae9"}.ri-brackets-fill:before{content:"\eaea"}.ri-brackets-line:before{content:"\eaeb"}.ri-briefcase-2-fill:before{content:"\eaec"}.ri-briefcase-2-line:before{content:"\eaed"}.ri-briefcase-3-fill:before{content:"\eaee"}.ri-briefcase-3-line:before{content:"\eaef"}.ri-briefcase-4-fill:before{content:"\eaf0"}.ri-briefcase-4-line:before{content:"\eaf1"}.ri-briefcase-5-fill:before{content:"\eaf2"}.ri-briefcase-5-line:before{content:"\eaf3"}.ri-briefcase-fill:before{content:"\eaf4"}.ri-briefcase-line:before{content:"\eaf5"}.ri-bring-forward:before{content:"\eaf6"}.ri-bring-to-front:before{content:"\eaf7"}.ri-broadcast-fill:before{content:"\eaf8"}.ri-broadcast-line:before{content:"\eaf9"}.ri-brush-2-fill:before{content:"\eafa"}.ri-brush-2-line:before{content:"\eafb"}.ri-brush-3-fill:before{content:"\eafc"}.ri-brush-3-line:before{content:"\eafd"}.ri-brush-4-fill:before{content:"\eafe"}.ri-brush-4-line:before{content:"\eaff"}.ri-brush-fill:before{content:"\eb00"}.ri-brush-line:before{content:"\eb01"}.ri-bubble-chart-fill:before{content:"\eb02"}.ri-bubble-chart-line:before{content:"\eb03"}.ri-bug-2-fill:before{content:"\eb04"}.ri-bug-2-line:before{content:"\eb05"}.ri-bug-fill:before{content:"\eb06"}.ri-bug-line:before{content:"\eb07"}.ri-building-2-fill:before{content:"\eb08"}.ri-building-2-line:before{content:"\eb09"}.ri-building-3-fill:before{content:"\eb0a"}.ri-building-3-line:before{content:"\eb0b"}.ri-building-4-fill:before{content:"\eb0c"}.ri-building-4-line:before{content:"\eb0d"}.ri-building-fill:before{content:"\eb0e"}.ri-building-line:before{content:"\eb0f"}.ri-bus-2-fill:before{content:"\eb10"}.ri-bus-2-line:before{content:"\eb11"}.ri-bus-fill:before{content:"\eb12"}.ri-bus-line:before{content:"\eb13"}.ri-bus-wifi-fill:before{content:"\eb14"}.ri-bus-wifi-line:before{content:"\eb15"}.ri-cactus-fill:before{content:"\eb16"}.ri-cactus-line:before{content:"\eb17"}.ri-cake-2-fill:before{content:"\eb18"}.ri-cake-2-line:before{content:"\eb19"}.ri-cake-3-fill:before{content:"\eb1a"}.ri-cake-3-line:before{content:"\eb1b"}.ri-cake-fill:before{content:"\eb1c"}.ri-cake-line:before{content:"\eb1d"}.ri-calculator-fill:before{content:"\eb1e"}.ri-calculator-line:before{content:"\eb1f"}.ri-calendar-2-fill:before{content:"\eb20"}.ri-calendar-2-line:before{content:"\eb21"}.ri-calendar-check-fill:before{content:"\eb22"}.ri-calendar-check-line:before{content:"\eb23"}.ri-calendar-event-fill:before{content:"\eb24"}.ri-calendar-event-line:before{content:"\eb25"}.ri-calendar-fill:before{content:"\eb26"}.ri-calendar-line:before{content:"\eb27"}.ri-calendar-todo-fill:before{content:"\eb28"}.ri-calendar-todo-line:before{content:"\eb29"}.ri-camera-2-fill:before{content:"\eb2a"}.ri-camera-2-line:before{content:"\eb2b"}.ri-camera-3-fill:before{content:"\eb2c"}.ri-camera-3-line:before{content:"\eb2d"}.ri-camera-fill:before{content:"\eb2e"}.ri-camera-lens-fill:before{content:"\eb2f"}.ri-camera-lens-line:before{content:"\eb30"}.ri-camera-line:before{content:"\eb31"}.ri-camera-off-fill:before{content:"\eb32"}.ri-camera-off-line:before{content:"\eb33"}.ri-camera-switch-fill:before{content:"\eb34"}.ri-camera-switch-line:before{content:"\eb35"}.ri-capsule-fill:before{content:"\eb36"}.ri-capsule-line:before{content:"\eb37"}.ri-car-fill:before{content:"\eb38"}.ri-car-line:before{content:"\eb39"}.ri-car-washing-fill:before{content:"\eb3a"}.ri-car-washing-line:before{content:"\eb3b"}.ri-caravan-fill:before{content:"\eb3c"}.ri-caravan-line:before{content:"\eb3d"}.ri-cast-fill:before{content:"\eb3e"}.ri-cast-line:before{content:"\eb3f"}.ri-cellphone-fill:before{content:"\eb40"}.ri-cellphone-line:before{content:"\eb41"}.ri-celsius-fill:before{content:"\eb42"}.ri-celsius-line:before{content:"\eb43"}.ri-centos-fill:before{content:"\eb44"}.ri-centos-line:before{content:"\eb45"}.ri-character-recognition-fill:before{content:"\eb46"}.ri-character-recognition-line:before{content:"\eb47"}.ri-charging-pile-2-fill:before{content:"\eb48"}.ri-charging-pile-2-line:before{content:"\eb49"}.ri-charging-pile-fill:before{content:"\eb4a"}.ri-charging-pile-line:before{content:"\eb4b"}.ri-chat-1-fill:before{content:"\eb4c"}.ri-chat-1-line:before{content:"\eb4d"}.ri-chat-2-fill:before{content:"\eb4e"}.ri-chat-2-line:before{content:"\eb4f"}.ri-chat-3-fill:before{content:"\eb50"}.ri-chat-3-line:before{content:"\eb51"}.ri-chat-4-fill:before{content:"\eb52"}.ri-chat-4-line:before{content:"\eb53"}.ri-chat-check-fill:before{content:"\eb54"}.ri-chat-check-line:before{content:"\eb55"}.ri-chat-delete-fill:before{content:"\eb56"}.ri-chat-delete-line:before{content:"\eb57"}.ri-chat-download-fill:before{content:"\eb58"}.ri-chat-download-line:before{content:"\eb59"}.ri-chat-follow-up-fill:before{content:"\eb5a"}.ri-chat-follow-up-line:before{content:"\eb5b"}.ri-chat-forward-fill:before{content:"\eb5c"}.ri-chat-forward-line:before{content:"\eb5d"}.ri-chat-heart-fill:before{content:"\eb5e"}.ri-chat-heart-line:before{content:"\eb5f"}.ri-chat-history-fill:before{content:"\eb60"}.ri-chat-history-line:before{content:"\eb61"}.ri-chat-new-fill:before{content:"\eb62"}.ri-chat-new-line:before{content:"\eb63"}.ri-chat-off-fill:before{content:"\eb64"}.ri-chat-off-line:before{content:"\eb65"}.ri-chat-poll-fill:before{content:"\eb66"}.ri-chat-poll-line:before{content:"\eb67"}.ri-chat-private-fill:before{content:"\eb68"}.ri-chat-private-line:before{content:"\eb69"}.ri-chat-quote-fill:before{content:"\eb6a"}.ri-chat-quote-line:before{content:"\eb6b"}.ri-chat-settings-fill:before{content:"\eb6c"}.ri-chat-settings-line:before{content:"\eb6d"}.ri-chat-smile-2-fill:before{content:"\eb6e"}.ri-chat-smile-2-line:before{content:"\eb6f"}.ri-chat-smile-3-fill:before{content:"\eb70"}.ri-chat-smile-3-line:before{content:"\eb71"}.ri-chat-smile-fill:before{content:"\eb72"}.ri-chat-smile-line:before{content:"\eb73"}.ri-chat-upload-fill:before{content:"\eb74"}.ri-chat-upload-line:before{content:"\eb75"}.ri-chat-voice-fill:before{content:"\eb76"}.ri-chat-voice-line:before{content:"\eb77"}.ri-check-double-fill:before{content:"\eb78"}.ri-check-double-line:before{content:"\eb79"}.ri-check-fill:before{content:"\eb7a"}.ri-check-line:before{content:"\eb7b"}.ri-checkbox-blank-circle-fill:before{content:"\eb7c"}.ri-checkbox-blank-circle-line:before{content:"\eb7d"}.ri-checkbox-blank-fill:before{content:"\eb7e"}.ri-checkbox-blank-line:before{content:"\eb7f"}.ri-checkbox-circle-fill:before{content:"\eb80"}.ri-checkbox-circle-line:before{content:"\eb81"}.ri-checkbox-fill:before{content:"\eb82"}.ri-checkbox-indeterminate-fill:before{content:"\eb83"}.ri-checkbox-indeterminate-line:before{content:"\eb84"}.ri-checkbox-line:before{content:"\eb85"}.ri-checkbox-multiple-blank-fill:before{content:"\eb86"}.ri-checkbox-multiple-blank-line:before{content:"\eb87"}.ri-checkbox-multiple-fill:before{content:"\eb88"}.ri-checkbox-multiple-line:before{content:"\eb89"}.ri-china-railway-fill:before{content:"\eb8a"}.ri-china-railway-line:before{content:"\eb8b"}.ri-chrome-fill:before{content:"\eb8c"}.ri-chrome-line:before{content:"\eb8d"}.ri-clapperboard-fill:before{content:"\eb8e"}.ri-clapperboard-line:before{content:"\eb8f"}.ri-clipboard-fill:before{content:"\eb90"}.ri-clipboard-line:before{content:"\eb91"}.ri-clockwise-2-fill:before{content:"\eb92"}.ri-clockwise-2-line:before{content:"\eb93"}.ri-clockwise-fill:before{content:"\eb94"}.ri-clockwise-line:before{content:"\eb95"}.ri-close-circle-fill:before{content:"\eb96"}.ri-close-circle-line:before{content:"\eb97"}.ri-close-fill:before{content:"\eb98"}.ri-close-line:before{content:"\eb99"}.ri-closed-captioning-fill:before{content:"\eb9a"}.ri-closed-captioning-line:before{content:"\eb9b"}.ri-cloud-fill:before{content:"\eb9c"}.ri-cloud-line:before{content:"\eb9d"}.ri-cloud-off-fill:before{content:"\eb9e"}.ri-cloud-off-line:before{content:"\eb9f"}.ri-cloud-windy-fill:before{content:"\eba0"}.ri-cloud-windy-line:before{content:"\eba1"}.ri-cloudy-2-fill:before{content:"\eba2"}.ri-cloudy-2-line:before{content:"\eba3"}.ri-cloudy-fill:before{content:"\eba4"}.ri-cloudy-line:before{content:"\eba5"}.ri-code-box-fill:before{content:"\eba6"}.ri-code-box-line:before{content:"\eba7"}.ri-code-fill:before{content:"\eba8"}.ri-code-line:before{content:"\eba9"}.ri-code-s-fill:before{content:"\ebaa"}.ri-code-s-line:before{content:"\ebab"}.ri-code-s-slash-fill:before{content:"\ebac"}.ri-code-s-slash-line:before{content:"\ebad"}.ri-code-view:before{content:"\ebae"}.ri-codepen-fill:before{content:"\ebaf"}.ri-codepen-line:before{content:"\ebb0"}.ri-coin-fill:before{content:"\ebb1"}.ri-coin-line:before{content:"\ebb2"}.ri-coins-fill:before{content:"\ebb3"}.ri-coins-line:before{content:"\ebb4"}.ri-collage-fill:before{content:"\ebb5"}.ri-collage-line:before{content:"\ebb6"}.ri-command-fill:before{content:"\ebb7"}.ri-command-line:before{content:"\ebb8"}.ri-community-fill:before{content:"\ebb9"}.ri-community-line:before{content:"\ebba"}.ri-compass-2-fill:before{content:"\ebbb"}.ri-compass-2-line:before{content:"\ebbc"}.ri-compass-3-fill:before{content:"\ebbd"}.ri-compass-3-line:before{content:"\ebbe"}.ri-compass-4-fill:before{content:"\ebbf"}.ri-compass-4-line:before{content:"\ebc0"}.ri-compass-discover-fill:before{content:"\ebc1"}.ri-compass-discover-line:before{content:"\ebc2"}.ri-compass-fill:before{content:"\ebc3"}.ri-compass-line:before{content:"\ebc4"}.ri-compasses-2-fill:before{content:"\ebc5"}.ri-compasses-2-line:before{content:"\ebc6"}.ri-compasses-fill:before{content:"\ebc7"}.ri-compasses-line:before{content:"\ebc8"}.ri-computer-fill:before{content:"\ebc9"}.ri-computer-line:before{content:"\ebca"}.ri-contacts-book-2-fill:before{content:"\ebcb"}.ri-contacts-book-2-line:before{content:"\ebcc"}.ri-contacts-book-fill:before{content:"\ebcd"}.ri-contacts-book-line:before{content:"\ebce"}.ri-contacts-book-upload-fill:before{content:"\ebcf"}.ri-contacts-book-upload-line:before{content:"\ebd0"}.ri-contacts-fill:before{content:"\ebd1"}.ri-contacts-line:before{content:"\ebd2"}.ri-contrast-2-fill:before{content:"\ebd3"}.ri-contrast-2-line:before{content:"\ebd4"}.ri-contrast-drop-2-fill:before{content:"\ebd5"}.ri-contrast-drop-2-line:before{content:"\ebd6"}.ri-contrast-drop-fill:before{content:"\ebd7"}.ri-contrast-drop-line:before{content:"\ebd8"}.ri-contrast-fill:before{content:"\ebd9"}.ri-contrast-line:before{content:"\ebda"}.ri-copper-coin-fill:before{content:"\ebdb"}.ri-copper-coin-line:before{content:"\ebdc"}.ri-copper-diamond-fill:before{content:"\ebdd"}.ri-copper-diamond-line:before{content:"\ebde"}.ri-copyleft-fill:before{content:"\ebdf"}.ri-copyleft-line:before{content:"\ebe0"}.ri-copyright-fill:before{content:"\ebe1"}.ri-copyright-line:before{content:"\ebe2"}.ri-coreos-fill:before{content:"\ebe3"}.ri-coreos-line:before{content:"\ebe4"}.ri-coupon-2-fill:before{content:"\ebe5"}.ri-coupon-2-line:before{content:"\ebe6"}.ri-coupon-3-fill:before{content:"\ebe7"}.ri-coupon-3-line:before{content:"\ebe8"}.ri-coupon-4-fill:before{content:"\ebe9"}.ri-coupon-4-line:before{content:"\ebea"}.ri-coupon-5-fill:before{content:"\ebeb"}.ri-coupon-5-line:before{content:"\ebec"}.ri-coupon-fill:before{content:"\ebed"}.ri-coupon-line:before{content:"\ebee"}.ri-cpu-fill:before{content:"\ebef"}.ri-cpu-line:before{content:"\ebf0"}.ri-creative-commons-by-fill:before{content:"\ebf1"}.ri-creative-commons-by-line:before{content:"\ebf2"}.ri-creative-commons-fill:before{content:"\ebf3"}.ri-creative-commons-line:before{content:"\ebf4"}.ri-creative-commons-nc-fill:before{content:"\ebf5"}.ri-creative-commons-nc-line:before{content:"\ebf6"}.ri-creative-commons-nd-fill:before{content:"\ebf7"}.ri-creative-commons-nd-line:before{content:"\ebf8"}.ri-creative-commons-sa-fill:before{content:"\ebf9"}.ri-creative-commons-sa-line:before{content:"\ebfa"}.ri-creative-commons-zero-fill:before{content:"\ebfb"}.ri-creative-commons-zero-line:before{content:"\ebfc"}.ri-criminal-fill:before{content:"\ebfd"}.ri-criminal-line:before{content:"\ebfe"}.ri-crop-2-fill:before{content:"\ebff"}.ri-crop-2-line:before{content:"\ec00"}.ri-crop-fill:before{content:"\ec01"}.ri-crop-line:before{content:"\ec02"}.ri-css3-fill:before{content:"\ec03"}.ri-css3-line:before{content:"\ec04"}.ri-cup-fill:before{content:"\ec05"}.ri-cup-line:before{content:"\ec06"}.ri-currency-fill:before{content:"\ec07"}.ri-currency-line:before{content:"\ec08"}.ri-cursor-fill:before{content:"\ec09"}.ri-cursor-line:before{content:"\ec0a"}.ri-customer-service-2-fill:before{content:"\ec0b"}.ri-customer-service-2-line:before{content:"\ec0c"}.ri-customer-service-fill:before{content:"\ec0d"}.ri-customer-service-line:before{content:"\ec0e"}.ri-dashboard-2-fill:before{content:"\ec0f"}.ri-dashboard-2-line:before{content:"\ec10"}.ri-dashboard-3-fill:before{content:"\ec11"}.ri-dashboard-3-line:before{content:"\ec12"}.ri-dashboard-fill:before{content:"\ec13"}.ri-dashboard-line:before{content:"\ec14"}.ri-database-2-fill:before{content:"\ec15"}.ri-database-2-line:before{content:"\ec16"}.ri-database-fill:before{content:"\ec17"}.ri-database-line:before{content:"\ec18"}.ri-delete-back-2-fill:before{content:"\ec19"}.ri-delete-back-2-line:before{content:"\ec1a"}.ri-delete-back-fill:before{content:"\ec1b"}.ri-delete-back-line:before{content:"\ec1c"}.ri-delete-bin-2-fill:before{content:"\ec1d"}.ri-delete-bin-2-line:before{content:"\ec1e"}.ri-delete-bin-3-fill:before{content:"\ec1f"}.ri-delete-bin-3-line:before{content:"\ec20"}.ri-delete-bin-4-fill:before{content:"\ec21"}.ri-delete-bin-4-line:before{content:"\ec22"}.ri-delete-bin-5-fill:before{content:"\ec23"}.ri-delete-bin-5-line:before{content:"\ec24"}.ri-delete-bin-6-fill:before{content:"\ec25"}.ri-delete-bin-6-line:before{content:"\ec26"}.ri-delete-bin-7-fill:before{content:"\ec27"}.ri-delete-bin-7-line:before{content:"\ec28"}.ri-delete-bin-fill:before{content:"\ec29"}.ri-delete-bin-line:before{content:"\ec2a"}.ri-delete-column:before{content:"\ec2b"}.ri-delete-row:before{content:"\ec2c"}.ri-device-fill:before{content:"\ec2d"}.ri-device-line:before{content:"\ec2e"}.ri-device-recover-fill:before{content:"\ec2f"}.ri-device-recover-line:before{content:"\ec30"}.ri-dingding-fill:before{content:"\ec31"}.ri-dingding-line:before{content:"\ec32"}.ri-direction-fill:before{content:"\ec33"}.ri-direction-line:before{content:"\ec34"}.ri-disc-fill:before{content:"\ec35"}.ri-disc-line:before{content:"\ec36"}.ri-discord-fill:before{content:"\ec37"}.ri-discord-line:before{content:"\ec38"}.ri-discuss-fill:before{content:"\ec39"}.ri-discuss-line:before{content:"\ec3a"}.ri-dislike-fill:before{content:"\ec3b"}.ri-dislike-line:before{content:"\ec3c"}.ri-disqus-fill:before{content:"\ec3d"}.ri-disqus-line:before{content:"\ec3e"}.ri-divide-fill:before{content:"\ec3f"}.ri-divide-line:before{content:"\ec40"}.ri-donut-chart-fill:before{content:"\ec41"}.ri-donut-chart-line:before{content:"\ec42"}.ri-door-closed-fill:before{content:"\ec43"}.ri-door-closed-line:before{content:"\ec44"}.ri-door-fill:before{content:"\ec45"}.ri-door-line:before{content:"\ec46"}.ri-door-lock-box-fill:before{content:"\ec47"}.ri-door-lock-box-line:before{content:"\ec48"}.ri-door-lock-fill:before{content:"\ec49"}.ri-door-lock-line:before{content:"\ec4a"}.ri-door-open-fill:before{content:"\ec4b"}.ri-door-open-line:before{content:"\ec4c"}.ri-dossier-fill:before{content:"\ec4d"}.ri-dossier-line:before{content:"\ec4e"}.ri-douban-fill:before{content:"\ec4f"}.ri-douban-line:before{content:"\ec50"}.ri-double-quotes-l:before{content:"\ec51"}.ri-double-quotes-r:before{content:"\ec52"}.ri-download-2-fill:before{content:"\ec53"}.ri-download-2-line:before{content:"\ec54"}.ri-download-cloud-2-fill:before{content:"\ec55"}.ri-download-cloud-2-line:before{content:"\ec56"}.ri-download-cloud-fill:before{content:"\ec57"}.ri-download-cloud-line:before{content:"\ec58"}.ri-download-fill:before{content:"\ec59"}.ri-download-line:before{content:"\ec5a"}.ri-draft-fill:before{content:"\ec5b"}.ri-draft-line:before{content:"\ec5c"}.ri-drag-drop-fill:before{content:"\ec5d"}.ri-drag-drop-line:before{content:"\ec5e"}.ri-drag-move-2-fill:before{content:"\ec5f"}.ri-drag-move-2-line:before{content:"\ec60"}.ri-drag-move-fill:before{content:"\ec61"}.ri-drag-move-line:before{content:"\ec62"}.ri-dribbble-fill:before{content:"\ec63"}.ri-dribbble-line:before{content:"\ec64"}.ri-drive-fill:before{content:"\ec65"}.ri-drive-line:before{content:"\ec66"}.ri-drizzle-fill:before{content:"\ec67"}.ri-drizzle-line:before{content:"\ec68"}.ri-drop-fill:before{content:"\ec69"}.ri-drop-line:before{content:"\ec6a"}.ri-dropbox-fill:before{content:"\ec6b"}.ri-dropbox-line:before{content:"\ec6c"}.ri-dual-sim-1-fill:before{content:"\ec6d"}.ri-dual-sim-1-line:before{content:"\ec6e"}.ri-dual-sim-2-fill:before{content:"\ec6f"}.ri-dual-sim-2-line:before{content:"\ec70"}.ri-dv-fill:before{content:"\ec71"}.ri-dv-line:before{content:"\ec72"}.ri-dvd-fill:before{content:"\ec73"}.ri-dvd-line:before{content:"\ec74"}.ri-e-bike-2-fill:before{content:"\ec75"}.ri-e-bike-2-line:before{content:"\ec76"}.ri-e-bike-fill:before{content:"\ec77"}.ri-e-bike-line:before{content:"\ec78"}.ri-earth-fill:before{content:"\ec79"}.ri-earth-line:before{content:"\ec7a"}.ri-earthquake-fill:before{content:"\ec7b"}.ri-earthquake-line:before{content:"\ec7c"}.ri-edge-fill:before{content:"\ec7d"}.ri-edge-line:before{content:"\ec7e"}.ri-edit-2-fill:before{content:"\ec7f"}.ri-edit-2-line:before{content:"\ec80"}.ri-edit-box-fill:before{content:"\ec81"}.ri-edit-box-line:before{content:"\ec82"}.ri-edit-circle-fill:before{content:"\ec83"}.ri-edit-circle-line:before{content:"\ec84"}.ri-edit-fill:before{content:"\ec85"}.ri-edit-line:before{content:"\ec86"}.ri-eject-fill:before{content:"\ec87"}.ri-eject-line:before{content:"\ec88"}.ri-emotion-2-fill:before{content:"\ec89"}.ri-emotion-2-line:before{content:"\ec8a"}.ri-emotion-fill:before{content:"\ec8b"}.ri-emotion-happy-fill:before{content:"\ec8c"}.ri-emotion-happy-line:before{content:"\ec8d"}.ri-emotion-laugh-fill:before{content:"\ec8e"}.ri-emotion-laugh-line:before{content:"\ec8f"}.ri-emotion-line:before{content:"\ec90"}.ri-emotion-normal-fill:before{content:"\ec91"}.ri-emotion-normal-line:before{content:"\ec92"}.ri-emotion-sad-fill:before{content:"\ec93"}.ri-emotion-sad-line:before{content:"\ec94"}.ri-emotion-unhappy-fill:before{content:"\ec95"}.ri-emotion-unhappy-line:before{content:"\ec96"}.ri-empathize-fill:before{content:"\ec97"}.ri-empathize-line:before{content:"\ec98"}.ri-emphasis-cn:before{content:"\ec99"}.ri-emphasis:before{content:"\ec9a"}.ri-english-input:before{content:"\ec9b"}.ri-equalizer-fill:before{content:"\ec9c"}.ri-equalizer-line:before{content:"\ec9d"}.ri-eraser-fill:before{content:"\ec9e"}.ri-eraser-line:before{content:"\ec9f"}.ri-error-warning-fill:before{content:"\eca0"}.ri-error-warning-line:before{content:"\eca1"}.ri-evernote-fill:before{content:"\eca2"}.ri-evernote-line:before{content:"\eca3"}.ri-exchange-box-fill:before{content:"\eca4"}.ri-exchange-box-line:before{content:"\eca5"}.ri-exchange-cny-fill:before{content:"\eca6"}.ri-exchange-cny-line:before{content:"\eca7"}.ri-exchange-dollar-fill:before{content:"\eca8"}.ri-exchange-dollar-line:before{content:"\eca9"}.ri-exchange-fill:before{content:"\ecaa"}.ri-exchange-funds-fill:before{content:"\ecab"}.ri-exchange-funds-line:before{content:"\ecac"}.ri-exchange-line:before{content:"\ecad"}.ri-external-link-fill:before{content:"\ecae"}.ri-external-link-line:before{content:"\ecaf"}.ri-eye-2-fill:before{content:"\ecb0"}.ri-eye-2-line:before{content:"\ecb1"}.ri-eye-close-fill:before{content:"\ecb2"}.ri-eye-close-line:before{content:"\ecb3"}.ri-eye-fill:before{content:"\ecb4"}.ri-eye-line:before{content:"\ecb5"}.ri-eye-off-fill:before{content:"\ecb6"}.ri-eye-off-line:before{content:"\ecb7"}.ri-facebook-box-fill:before{content:"\ecb8"}.ri-facebook-box-line:before{content:"\ecb9"}.ri-facebook-circle-fill:before{content:"\ecba"}.ri-facebook-circle-line:before{content:"\ecbb"}.ri-facebook-fill:before{content:"\ecbc"}.ri-facebook-line:before{content:"\ecbd"}.ri-fahrenheit-fill:before{content:"\ecbe"}.ri-fahrenheit-line:before{content:"\ecbf"}.ri-feedback-fill:before{content:"\ecc0"}.ri-feedback-line:before{content:"\ecc1"}.ri-file-2-fill:before{content:"\ecc2"}.ri-file-2-line:before{content:"\ecc3"}.ri-file-3-fill:before{content:"\ecc4"}.ri-file-3-line:before{content:"\ecc5"}.ri-file-4-fill:before{content:"\ecc6"}.ri-file-4-line:before{content:"\ecc7"}.ri-file-add-fill:before{content:"\ecc8"}.ri-file-add-line:before{content:"\ecc9"}.ri-file-chart-2-fill:before{content:"\ecca"}.ri-file-chart-2-line:before{content:"\eccb"}.ri-file-chart-fill:before{content:"\eccc"}.ri-file-chart-line:before{content:"\eccd"}.ri-file-cloud-fill:before{content:"\ecce"}.ri-file-cloud-line:before{content:"\eccf"}.ri-file-code-fill:before{content:"\ecd0"}.ri-file-code-line:before{content:"\ecd1"}.ri-file-copy-2-fill:before{content:"\ecd2"}.ri-file-copy-2-line:before{content:"\ecd3"}.ri-file-copy-fill:before{content:"\ecd4"}.ri-file-copy-line:before{content:"\ecd5"}.ri-file-damage-fill:before{content:"\ecd6"}.ri-file-damage-line:before{content:"\ecd7"}.ri-file-download-fill:before{content:"\ecd8"}.ri-file-download-line:before{content:"\ecd9"}.ri-file-edit-fill:before{content:"\ecda"}.ri-file-edit-line:before{content:"\ecdb"}.ri-file-excel-2-fill:before{content:"\ecdc"}.ri-file-excel-2-line:before{content:"\ecdd"}.ri-file-excel-fill:before{content:"\ecde"}.ri-file-excel-line:before{content:"\ecdf"}.ri-file-fill:before{content:"\ece0"}.ri-file-forbid-fill:before{content:"\ece1"}.ri-file-forbid-line:before{content:"\ece2"}.ri-file-gif-fill:before{content:"\ece3"}.ri-file-gif-line:before{content:"\ece4"}.ri-file-history-fill:before{content:"\ece5"}.ri-file-history-line:before{content:"\ece6"}.ri-file-hwp-fill:before{content:"\ece7"}.ri-file-hwp-line:before{content:"\ece8"}.ri-file-info-fill:before{content:"\ece9"}.ri-file-info-line:before{content:"\ecea"}.ri-file-line:before{content:"\eceb"}.ri-file-list-2-fill:before{content:"\ecec"}.ri-file-list-2-line:before{content:"\eced"}.ri-file-list-3-fill:before{content:"\ecee"}.ri-file-list-3-line:before{content:"\ecef"}.ri-file-list-fill:before{content:"\ecf0"}.ri-file-list-line:before{content:"\ecf1"}.ri-file-lock-fill:before{content:"\ecf2"}.ri-file-lock-line:before{content:"\ecf3"}.ri-file-mark-fill:before{content:"\ecf4"}.ri-file-mark-line:before{content:"\ecf5"}.ri-file-music-fill:before{content:"\ecf6"}.ri-file-music-line:before{content:"\ecf7"}.ri-file-paper-2-fill:before{content:"\ecf8"}.ri-file-paper-2-line:before{content:"\ecf9"}.ri-file-paper-fill:before{content:"\ecfa"}.ri-file-paper-line:before{content:"\ecfb"}.ri-file-pdf-fill:before{content:"\ecfc"}.ri-file-pdf-line:before{content:"\ecfd"}.ri-file-ppt-2-fill:before{content:"\ecfe"}.ri-file-ppt-2-line:before{content:"\ecff"}.ri-file-ppt-fill:before{content:"\ed00"}.ri-file-ppt-line:before{content:"\ed01"}.ri-file-reduce-fill:before{content:"\ed02"}.ri-file-reduce-line:before{content:"\ed03"}.ri-file-search-fill:before{content:"\ed04"}.ri-file-search-line:before{content:"\ed05"}.ri-file-settings-fill:before{content:"\ed06"}.ri-file-settings-line:before{content:"\ed07"}.ri-file-shield-2-fill:before{content:"\ed08"}.ri-file-shield-2-line:before{content:"\ed09"}.ri-file-shield-fill:before{content:"\ed0a"}.ri-file-shield-line:before{content:"\ed0b"}.ri-file-shred-fill:before{content:"\ed0c"}.ri-file-shred-line:before{content:"\ed0d"}.ri-file-text-fill:before{content:"\ed0e"}.ri-file-text-line:before{content:"\ed0f"}.ri-file-transfer-fill:before{content:"\ed10"}.ri-file-transfer-line:before{content:"\ed11"}.ri-file-unknow-fill:before{content:"\ed12"}.ri-file-unknow-line:before{content:"\ed13"}.ri-file-upload-fill:before{content:"\ed14"}.ri-file-upload-line:before{content:"\ed15"}.ri-file-user-fill:before{content:"\ed16"}.ri-file-user-line:before{content:"\ed17"}.ri-file-warning-fill:before{content:"\ed18"}.ri-file-warning-line:before{content:"\ed19"}.ri-file-word-2-fill:before{content:"\ed1a"}.ri-file-word-2-line:before{content:"\ed1b"}.ri-file-word-fill:before{content:"\ed1c"}.ri-file-word-line:before{content:"\ed1d"}.ri-file-zip-fill:before{content:"\ed1e"}.ri-file-zip-line:before{content:"\ed1f"}.ri-film-fill:before{content:"\ed20"}.ri-film-line:before{content:"\ed21"}.ri-filter-2-fill:before{content:"\ed22"}.ri-filter-2-line:before{content:"\ed23"}.ri-filter-3-fill:before{content:"\ed24"}.ri-filter-3-line:before{content:"\ed25"}.ri-filter-fill:before{content:"\ed26"}.ri-filter-line:before{content:"\ed27"}.ri-filter-off-fill:before{content:"\ed28"}.ri-filter-off-line:before{content:"\ed29"}.ri-find-replace-fill:before{content:"\ed2a"}.ri-find-replace-line:before{content:"\ed2b"}.ri-finder-fill:before{content:"\ed2c"}.ri-finder-line:before{content:"\ed2d"}.ri-fingerprint-2-fill:before{content:"\ed2e"}.ri-fingerprint-2-line:before{content:"\ed2f"}.ri-fingerprint-fill:before{content:"\ed30"}.ri-fingerprint-line:before{content:"\ed31"}.ri-fire-fill:before{content:"\ed32"}.ri-fire-line:before{content:"\ed33"}.ri-firefox-fill:before{content:"\ed34"}.ri-firefox-line:before{content:"\ed35"}.ri-first-aid-kit-fill:before{content:"\ed36"}.ri-first-aid-kit-line:before{content:"\ed37"}.ri-flag-2-fill:before{content:"\ed38"}.ri-flag-2-line:before{content:"\ed39"}.ri-flag-fill:before{content:"\ed3a"}.ri-flag-line:before{content:"\ed3b"}.ri-flashlight-fill:before{content:"\ed3c"}.ri-flashlight-line:before{content:"\ed3d"}.ri-flask-fill:before{content:"\ed3e"}.ri-flask-line:before{content:"\ed3f"}.ri-flight-land-fill:before{content:"\ed40"}.ri-flight-land-line:before{content:"\ed41"}.ri-flight-takeoff-fill:before{content:"\ed42"}.ri-flight-takeoff-line:before{content:"\ed43"}.ri-flood-fill:before{content:"\ed44"}.ri-flood-line:before{content:"\ed45"}.ri-flow-chart:before{content:"\ed46"}.ri-flutter-fill:before{content:"\ed47"}.ri-flutter-line:before{content:"\ed48"}.ri-focus-2-fill:before{content:"\ed49"}.ri-focus-2-line:before{content:"\ed4a"}.ri-focus-3-fill:before{content:"\ed4b"}.ri-focus-3-line:before{content:"\ed4c"}.ri-focus-fill:before{content:"\ed4d"}.ri-focus-line:before{content:"\ed4e"}.ri-foggy-fill:before{content:"\ed4f"}.ri-foggy-line:before{content:"\ed50"}.ri-folder-2-fill:before{content:"\ed51"}.ri-folder-2-line:before{content:"\ed52"}.ri-folder-3-fill:before{content:"\ed53"}.ri-folder-3-line:before{content:"\ed54"}.ri-folder-4-fill:before{content:"\ed55"}.ri-folder-4-line:before{content:"\ed56"}.ri-folder-5-fill:before{content:"\ed57"}.ri-folder-5-line:before{content:"\ed58"}.ri-folder-add-fill:before{content:"\ed59"}.ri-folder-add-line:before{content:"\ed5a"}.ri-folder-chart-2-fill:before{content:"\ed5b"}.ri-folder-chart-2-line:before{content:"\ed5c"}.ri-folder-chart-fill:before{content:"\ed5d"}.ri-folder-chart-line:before{content:"\ed5e"}.ri-folder-download-fill:before{content:"\ed5f"}.ri-folder-download-line:before{content:"\ed60"}.ri-folder-fill:before{content:"\ed61"}.ri-folder-forbid-fill:before{content:"\ed62"}.ri-folder-forbid-line:before{content:"\ed63"}.ri-folder-history-fill:before{content:"\ed64"}.ri-folder-history-line:before{content:"\ed65"}.ri-folder-info-fill:before{content:"\ed66"}.ri-folder-info-line:before{content:"\ed67"}.ri-folder-keyhole-fill:before{content:"\ed68"}.ri-folder-keyhole-line:before{content:"\ed69"}.ri-folder-line:before{content:"\ed6a"}.ri-folder-lock-fill:before{content:"\ed6b"}.ri-folder-lock-line:before{content:"\ed6c"}.ri-folder-music-fill:before{content:"\ed6d"}.ri-folder-music-line:before{content:"\ed6e"}.ri-folder-open-fill:before{content:"\ed6f"}.ri-folder-open-line:before{content:"\ed70"}.ri-folder-received-fill:before{content:"\ed71"}.ri-folder-received-line:before{content:"\ed72"}.ri-folder-reduce-fill:before{content:"\ed73"}.ri-folder-reduce-line:before{content:"\ed74"}.ri-folder-settings-fill:before{content:"\ed75"}.ri-folder-settings-line:before{content:"\ed76"}.ri-folder-shared-fill:before{content:"\ed77"}.ri-folder-shared-line:before{content:"\ed78"}.ri-folder-shield-2-fill:before{content:"\ed79"}.ri-folder-shield-2-line:before{content:"\ed7a"}.ri-folder-shield-fill:before{content:"\ed7b"}.ri-folder-shield-line:before{content:"\ed7c"}.ri-folder-transfer-fill:before{content:"\ed7d"}.ri-folder-transfer-line:before{content:"\ed7e"}.ri-folder-unknow-fill:before{content:"\ed7f"}.ri-folder-unknow-line:before{content:"\ed80"}.ri-folder-upload-fill:before{content:"\ed81"}.ri-folder-upload-line:before{content:"\ed82"}.ri-folder-user-fill:before{content:"\ed83"}.ri-folder-user-line:before{content:"\ed84"}.ri-folder-warning-fill:before{content:"\ed85"}.ri-folder-warning-line:before{content:"\ed86"}.ri-folder-zip-fill:before{content:"\ed87"}.ri-folder-zip-line:before{content:"\ed88"}.ri-folders-fill:before{content:"\ed89"}.ri-folders-line:before{content:"\ed8a"}.ri-font-color:before{content:"\ed8b"}.ri-font-size-2:before{content:"\ed8c"}.ri-font-size:before{content:"\ed8d"}.ri-football-fill:before{content:"\ed8e"}.ri-football-line:before{content:"\ed8f"}.ri-footprint-fill:before{content:"\ed90"}.ri-footprint-line:before{content:"\ed91"}.ri-forbid-2-fill:before{content:"\ed92"}.ri-forbid-2-line:before{content:"\ed93"}.ri-forbid-fill:before{content:"\ed94"}.ri-forbid-line:before{content:"\ed95"}.ri-format-clear:before{content:"\ed96"}.ri-fridge-fill:before{content:"\ed97"}.ri-fridge-line:before{content:"\ed98"}.ri-fullscreen-exit-fill:before{content:"\ed99"}.ri-fullscreen-exit-line:before{content:"\ed9a"}.ri-fullscreen-fill:before{content:"\ed9b"}.ri-fullscreen-line:before{content:"\ed9c"}.ri-function-fill:before{content:"\ed9d"}.ri-function-line:before{content:"\ed9e"}.ri-functions:before{content:"\ed9f"}.ri-funds-box-fill:before{content:"\eda0"}.ri-funds-box-line:before{content:"\eda1"}.ri-funds-fill:before{content:"\eda2"}.ri-funds-line:before{content:"\eda3"}.ri-gallery-fill:before{content:"\eda4"}.ri-gallery-line:before{content:"\eda5"}.ri-gallery-upload-fill:before{content:"\eda6"}.ri-gallery-upload-line:before{content:"\eda7"}.ri-game-fill:before{content:"\eda8"}.ri-game-line:before{content:"\eda9"}.ri-gamepad-fill:before{content:"\edaa"}.ri-gamepad-line:before{content:"\edab"}.ri-gas-station-fill:before{content:"\edac"}.ri-gas-station-line:before{content:"\edad"}.ri-gatsby-fill:before{content:"\edae"}.ri-gatsby-line:before{content:"\edaf"}.ri-genderless-fill:before{content:"\edb0"}.ri-genderless-line:before{content:"\edb1"}.ri-ghost-2-fill:before{content:"\edb2"}.ri-ghost-2-line:before{content:"\edb3"}.ri-ghost-fill:before{content:"\edb4"}.ri-ghost-line:before{content:"\edb5"}.ri-ghost-smile-fill:before{content:"\edb6"}.ri-ghost-smile-line:before{content:"\edb7"}.ri-gift-2-fill:before{content:"\edb8"}.ri-gift-2-line:before{content:"\edb9"}.ri-gift-fill:before{content:"\edba"}.ri-gift-line:before{content:"\edbb"}.ri-git-branch-fill:before{content:"\edbc"}.ri-git-branch-line:before{content:"\edbd"}.ri-git-commit-fill:before{content:"\edbe"}.ri-git-commit-line:before{content:"\edbf"}.ri-git-merge-fill:before{content:"\edc0"}.ri-git-merge-line:before{content:"\edc1"}.ri-git-pull-request-fill:before{content:"\edc2"}.ri-git-pull-request-line:before{content:"\edc3"}.ri-git-repository-commits-fill:before{content:"\edc4"}.ri-git-repository-commits-line:before{content:"\edc5"}.ri-git-repository-fill:before{content:"\edc6"}.ri-git-repository-line:before{content:"\edc7"}.ri-git-repository-private-fill:before{content:"\edc8"}.ri-git-repository-private-line:before{content:"\edc9"}.ri-github-fill:before{content:"\edca"}.ri-github-line:before{content:"\edcb"}.ri-gitlab-fill:before{content:"\edcc"}.ri-gitlab-line:before{content:"\edcd"}.ri-global-fill:before{content:"\edce"}.ri-global-line:before{content:"\edcf"}.ri-globe-fill:before{content:"\edd0"}.ri-globe-line:before{content:"\edd1"}.ri-goblet-fill:before{content:"\edd2"}.ri-goblet-line:before{content:"\edd3"}.ri-google-fill:before{content:"\edd4"}.ri-google-line:before{content:"\edd5"}.ri-google-play-fill:before{content:"\edd6"}.ri-google-play-line:before{content:"\edd7"}.ri-government-fill:before{content:"\edd8"}.ri-government-line:before{content:"\edd9"}.ri-gps-fill:before{content:"\edda"}.ri-gps-line:before{content:"\eddb"}.ri-gradienter-fill:before{content:"\eddc"}.ri-gradienter-line:before{content:"\eddd"}.ri-grid-fill:before{content:"\edde"}.ri-grid-line:before{content:"\eddf"}.ri-group-2-fill:before{content:"\ede0"}.ri-group-2-line:before{content:"\ede1"}.ri-group-fill:before{content:"\ede2"}.ri-group-line:before{content:"\ede3"}.ri-guide-fill:before{content:"\ede4"}.ri-guide-line:before{content:"\ede5"}.ri-h-1:before{content:"\ede6"}.ri-h-2:before{content:"\ede7"}.ri-h-3:before{content:"\ede8"}.ri-h-4:before{content:"\ede9"}.ri-h-5:before{content:"\edea"}.ri-h-6:before{content:"\edeb"}.ri-hail-fill:before{content:"\edec"}.ri-hail-line:before{content:"\eded"}.ri-hammer-fill:before{content:"\edee"}.ri-hammer-line:before{content:"\edef"}.ri-hand-coin-fill:before{content:"\edf0"}.ri-hand-coin-line:before{content:"\edf1"}.ri-hand-heart-fill:before{content:"\edf2"}.ri-hand-heart-line:before{content:"\edf3"}.ri-hand-sanitizer-fill:before{content:"\edf4"}.ri-hand-sanitizer-line:before{content:"\edf5"}.ri-handbag-fill:before{content:"\edf6"}.ri-handbag-line:before{content:"\edf7"}.ri-hard-drive-2-fill:before{content:"\edf8"}.ri-hard-drive-2-line:before{content:"\edf9"}.ri-hard-drive-fill:before{content:"\edfa"}.ri-hard-drive-line:before{content:"\edfb"}.ri-hashtag:before{content:"\edfc"}.ri-haze-2-fill:before{content:"\edfd"}.ri-haze-2-line:before{content:"\edfe"}.ri-haze-fill:before{content:"\edff"}.ri-haze-line:before{content:"\ee00"}.ri-hd-fill:before{content:"\ee01"}.ri-hd-line:before{content:"\ee02"}.ri-heading:before{content:"\ee03"}.ri-headphone-fill:before{content:"\ee04"}.ri-headphone-line:before{content:"\ee05"}.ri-health-book-fill:before{content:"\ee06"}.ri-health-book-line:before{content:"\ee07"}.ri-heart-2-fill:before{content:"\ee08"}.ri-heart-2-line:before{content:"\ee09"}.ri-heart-3-fill:before{content:"\ee0a"}.ri-heart-3-line:before{content:"\ee0b"}.ri-heart-add-fill:before{content:"\ee0c"}.ri-heart-add-line:before{content:"\ee0d"}.ri-heart-fill:before{content:"\ee0e"}.ri-heart-line:before{content:"\ee0f"}.ri-heart-pulse-fill:before{content:"\ee10"}.ri-heart-pulse-line:before{content:"\ee11"}.ri-hearts-fill:before{content:"\ee12"}.ri-hearts-line:before{content:"\ee13"}.ri-heavy-showers-fill:before{content:"\ee14"}.ri-heavy-showers-line:before{content:"\ee15"}.ri-history-fill:before{content:"\ee16"}.ri-history-line:before{content:"\ee17"}.ri-home-2-fill:before{content:"\ee18"}.ri-home-2-line:before{content:"\ee19"}.ri-home-3-fill:before{content:"\ee1a"}.ri-home-3-line:before{content:"\ee1b"}.ri-home-4-fill:before{content:"\ee1c"}.ri-home-4-line:before{content:"\ee1d"}.ri-home-5-fill:before{content:"\ee1e"}.ri-home-5-line:before{content:"\ee1f"}.ri-home-6-fill:before{content:"\ee20"}.ri-home-6-line:before{content:"\ee21"}.ri-home-7-fill:before{content:"\ee22"}.ri-home-7-line:before{content:"\ee23"}.ri-home-8-fill:before{content:"\ee24"}.ri-home-8-line:before{content:"\ee25"}.ri-home-fill:before{content:"\ee26"}.ri-home-gear-fill:before{content:"\ee27"}.ri-home-gear-line:before{content:"\ee28"}.ri-home-heart-fill:before{content:"\ee29"}.ri-home-heart-line:before{content:"\ee2a"}.ri-home-line:before{content:"\ee2b"}.ri-home-smile-2-fill:before{content:"\ee2c"}.ri-home-smile-2-line:before{content:"\ee2d"}.ri-home-smile-fill:before{content:"\ee2e"}.ri-home-smile-line:before{content:"\ee2f"}.ri-home-wifi-fill:before{content:"\ee30"}.ri-home-wifi-line:before{content:"\ee31"}.ri-honor-of-kings-fill:before{content:"\ee32"}.ri-honor-of-kings-line:before{content:"\ee33"}.ri-honour-fill:before{content:"\ee34"}.ri-honour-line:before{content:"\ee35"}.ri-hospital-fill:before{content:"\ee36"}.ri-hospital-line:before{content:"\ee37"}.ri-hotel-bed-fill:before{content:"\ee38"}.ri-hotel-bed-line:before{content:"\ee39"}.ri-hotel-fill:before{content:"\ee3a"}.ri-hotel-line:before{content:"\ee3b"}.ri-hotspot-fill:before{content:"\ee3c"}.ri-hotspot-line:before{content:"\ee3d"}.ri-hq-fill:before{content:"\ee3e"}.ri-hq-line:before{content:"\ee3f"}.ri-html5-fill:before{content:"\ee40"}.ri-html5-line:before{content:"\ee41"}.ri-ie-fill:before{content:"\ee42"}.ri-ie-line:before{content:"\ee43"}.ri-image-2-fill:before{content:"\ee44"}.ri-image-2-line:before{content:"\ee45"}.ri-image-add-fill:before{content:"\ee46"}.ri-image-add-line:before{content:"\ee47"}.ri-image-edit-fill:before{content:"\ee48"}.ri-image-edit-line:before{content:"\ee49"}.ri-image-fill:before{content:"\ee4a"}.ri-image-line:before{content:"\ee4b"}.ri-inbox-archive-fill:before{content:"\ee4c"}.ri-inbox-archive-line:before{content:"\ee4d"}.ri-inbox-fill:before{content:"\ee4e"}.ri-inbox-line:before{content:"\ee4f"}.ri-inbox-unarchive-fill:before{content:"\ee50"}.ri-inbox-unarchive-line:before{content:"\ee51"}.ri-increase-decrease-fill:before{content:"\ee52"}.ri-increase-decrease-line:before{content:"\ee53"}.ri-indent-decrease:before{content:"\ee54"}.ri-indent-increase:before{content:"\ee55"}.ri-indeterminate-circle-fill:before{content:"\ee56"}.ri-indeterminate-circle-line:before{content:"\ee57"}.ri-information-fill:before{content:"\ee58"}.ri-information-line:before{content:"\ee59"}.ri-infrared-thermometer-fill:before{content:"\ee5a"}.ri-infrared-thermometer-line:before{content:"\ee5b"}.ri-ink-bottle-fill:before{content:"\ee5c"}.ri-ink-bottle-line:before{content:"\ee5d"}.ri-input-cursor-move:before{content:"\ee5e"}.ri-input-method-fill:before{content:"\ee5f"}.ri-input-method-line:before{content:"\ee60"}.ri-insert-column-left:before{content:"\ee61"}.ri-insert-column-right:before{content:"\ee62"}.ri-insert-row-bottom:before{content:"\ee63"}.ri-insert-row-top:before{content:"\ee64"}.ri-instagram-fill:before{content:"\ee65"}.ri-instagram-line:before{content:"\ee66"}.ri-install-fill:before{content:"\ee67"}.ri-install-line:before{content:"\ee68"}.ri-invision-fill:before{content:"\ee69"}.ri-invision-line:before{content:"\ee6a"}.ri-italic:before{content:"\ee6b"}.ri-kakao-talk-fill:before{content:"\ee6c"}.ri-kakao-talk-line:before{content:"\ee6d"}.ri-key-2-fill:before{content:"\ee6e"}.ri-key-2-line:before{content:"\ee6f"}.ri-key-fill:before{content:"\ee70"}.ri-key-line:before{content:"\ee71"}.ri-keyboard-box-fill:before{content:"\ee72"}.ri-keyboard-box-line:before{content:"\ee73"}.ri-keyboard-fill:before{content:"\ee74"}.ri-keyboard-line:before{content:"\ee75"}.ri-keynote-fill:before{content:"\ee76"}.ri-keynote-line:before{content:"\ee77"}.ri-knife-blood-fill:before{content:"\ee78"}.ri-knife-blood-line:before{content:"\ee79"}.ri-knife-fill:before{content:"\ee7a"}.ri-knife-line:before{content:"\ee7b"}.ri-landscape-fill:before{content:"\ee7c"}.ri-landscape-line:before{content:"\ee7d"}.ri-layout-2-fill:before{content:"\ee7e"}.ri-layout-2-line:before{content:"\ee7f"}.ri-layout-3-fill:before{content:"\ee80"}.ri-layout-3-line:before{content:"\ee81"}.ri-layout-4-fill:before{content:"\ee82"}.ri-layout-4-line:before{content:"\ee83"}.ri-layout-5-fill:before{content:"\ee84"}.ri-layout-5-line:before{content:"\ee85"}.ri-layout-6-fill:before{content:"\ee86"}.ri-layout-6-line:before{content:"\ee87"}.ri-layout-bottom-2-fill:before{content:"\ee88"}.ri-layout-bottom-2-line:before{content:"\ee89"}.ri-layout-bottom-fill:before{content:"\ee8a"}.ri-layout-bottom-line:before{content:"\ee8b"}.ri-layout-column-fill:before{content:"\ee8c"}.ri-layout-column-line:before{content:"\ee8d"}.ri-layout-fill:before{content:"\ee8e"}.ri-layout-grid-fill:before{content:"\ee8f"}.ri-layout-grid-line:before{content:"\ee90"}.ri-layout-left-2-fill:before{content:"\ee91"}.ri-layout-left-2-line:before{content:"\ee92"}.ri-layout-left-fill:before{content:"\ee93"}.ri-layout-left-line:before{content:"\ee94"}.ri-layout-line:before{content:"\ee95"}.ri-layout-masonry-fill:before{content:"\ee96"}.ri-layout-masonry-line:before{content:"\ee97"}.ri-layout-right-2-fill:before{content:"\ee98"}.ri-layout-right-2-line:before{content:"\ee99"}.ri-layout-right-fill:before{content:"\ee9a"}.ri-layout-right-line:before{content:"\ee9b"}.ri-layout-row-fill:before{content:"\ee9c"}.ri-layout-row-line:before{content:"\ee9d"}.ri-layout-top-2-fill:before{content:"\ee9e"}.ri-layout-top-2-line:before{content:"\ee9f"}.ri-layout-top-fill:before{content:"\eea0"}.ri-layout-top-line:before{content:"\eea1"}.ri-leaf-fill:before{content:"\eea2"}.ri-leaf-line:before{content:"\eea3"}.ri-lifebuoy-fill:before{content:"\eea4"}.ri-lifebuoy-line:before{content:"\eea5"}.ri-lightbulb-fill:before{content:"\eea6"}.ri-lightbulb-flash-fill:before{content:"\eea7"}.ri-lightbulb-flash-line:before{content:"\eea8"}.ri-lightbulb-line:before{content:"\eea9"}.ri-line-chart-fill:before{content:"\eeaa"}.ri-line-chart-line:before{content:"\eeab"}.ri-line-fill:before{content:"\eeac"}.ri-line-height:before{content:"\eead"}.ri-line-line:before{content:"\eeae"}.ri-link-m:before{content:"\eeaf"}.ri-link-unlink-m:before{content:"\eeb0"}.ri-link-unlink:before{content:"\eeb1"}.ri-link:before{content:"\eeb2"}.ri-linkedin-box-fill:before{content:"\eeb3"}.ri-linkedin-box-line:before{content:"\eeb4"}.ri-linkedin-fill:before{content:"\eeb5"}.ri-linkedin-line:before{content:"\eeb6"}.ri-links-fill:before{content:"\eeb7"}.ri-links-line:before{content:"\eeb8"}.ri-list-check-2:before{content:"\eeb9"}.ri-list-check:before{content:"\eeba"}.ri-list-ordered:before{content:"\eebb"}.ri-list-settings-fill:before{content:"\eebc"}.ri-list-settings-line:before{content:"\eebd"}.ri-list-unordered:before{content:"\eebe"}.ri-live-fill:before{content:"\eebf"}.ri-live-line:before{content:"\eec0"}.ri-loader-2-fill:before{content:"\eec1"}.ri-loader-2-line:before{content:"\eec2"}.ri-loader-3-fill:before{content:"\eec3"}.ri-loader-3-line:before{content:"\eec4"}.ri-loader-4-fill:before{content:"\eec5"}.ri-loader-4-line:before{content:"\eec6"}.ri-loader-5-fill:before{content:"\eec7"}.ri-loader-5-line:before{content:"\eec8"}.ri-loader-fill:before{content:"\eec9"}.ri-loader-line:before{content:"\eeca"}.ri-lock-2-fill:before{content:"\eecb"}.ri-lock-2-line:before{content:"\eecc"}.ri-lock-fill:before{content:"\eecd"}.ri-lock-line:before{content:"\eece"}.ri-lock-password-fill:before{content:"\eecf"}.ri-lock-password-line:before{content:"\eed0"}.ri-lock-unlock-fill:before{content:"\eed1"}.ri-lock-unlock-line:before{content:"\eed2"}.ri-login-box-fill:before{content:"\eed3"}.ri-login-box-line:before{content:"\eed4"}.ri-login-circle-fill:before{content:"\eed5"}.ri-login-circle-line:before{content:"\eed6"}.ri-logout-box-fill:before{content:"\eed7"}.ri-logout-box-line:before{content:"\eed8"}.ri-logout-box-r-fill:before{content:"\eed9"}.ri-logout-box-r-line:before{content:"\eeda"}.ri-logout-circle-fill:before{content:"\eedb"}.ri-logout-circle-line:before{content:"\eedc"}.ri-logout-circle-r-fill:before{content:"\eedd"}.ri-logout-circle-r-line:before{content:"\eede"}.ri-luggage-cart-fill:before{content:"\eedf"}.ri-luggage-cart-line:before{content:"\eee0"}.ri-luggage-deposit-fill:before{content:"\eee1"}.ri-luggage-deposit-line:before{content:"\eee2"}.ri-lungs-fill:before{content:"\eee3"}.ri-lungs-line:before{content:"\eee4"}.ri-mac-fill:before{content:"\eee5"}.ri-mac-line:before{content:"\eee6"}.ri-macbook-fill:before{content:"\eee7"}.ri-macbook-line:before{content:"\eee8"}.ri-magic-fill:before{content:"\eee9"}.ri-magic-line:before{content:"\eeea"}.ri-mail-add-fill:before{content:"\eeeb"}.ri-mail-add-line:before{content:"\eeec"}.ri-mail-check-fill:before{content:"\eeed"}.ri-mail-check-line:before{content:"\eeee"}.ri-mail-close-fill:before{content:"\eeef"}.ri-mail-close-line:before{content:"\eef0"}.ri-mail-download-fill:before{content:"\eef1"}.ri-mail-download-line:before{content:"\eef2"}.ri-mail-fill:before{content:"\eef3"}.ri-mail-forbid-fill:before{content:"\eef4"}.ri-mail-forbid-line:before{content:"\eef5"}.ri-mail-line:before{content:"\eef6"}.ri-mail-lock-fill:before{content:"\eef7"}.ri-mail-lock-line:before{content:"\eef8"}.ri-mail-open-fill:before{content:"\eef9"}.ri-mail-open-line:before{content:"\eefa"}.ri-mail-send-fill:before{content:"\eefb"}.ri-mail-send-line:before{content:"\eefc"}.ri-mail-settings-fill:before{content:"\eefd"}.ri-mail-settings-line:before{content:"\eefe"}.ri-mail-star-fill:before{content:"\eeff"}.ri-mail-star-line:before{content:"\ef00"}.ri-mail-unread-fill:before{content:"\ef01"}.ri-mail-unread-line:before{content:"\ef02"}.ri-mail-volume-fill:before{content:"\ef03"}.ri-mail-volume-line:before{content:"\ef04"}.ri-map-2-fill:before{content:"\ef05"}.ri-map-2-line:before{content:"\ef06"}.ri-map-fill:before{content:"\ef07"}.ri-map-line:before{content:"\ef08"}.ri-map-pin-2-fill:before{content:"\ef09"}.ri-map-pin-2-line:before{content:"\ef0a"}.ri-map-pin-3-fill:before{content:"\ef0b"}.ri-map-pin-3-line:before{content:"\ef0c"}.ri-map-pin-4-fill:before{content:"\ef0d"}.ri-map-pin-4-line:before{content:"\ef0e"}.ri-map-pin-5-fill:before{content:"\ef0f"}.ri-map-pin-5-line:before{content:"\ef10"}.ri-map-pin-add-fill:before{content:"\ef11"}.ri-map-pin-add-line:before{content:"\ef12"}.ri-map-pin-fill:before{content:"\ef13"}.ri-map-pin-line:before{content:"\ef14"}.ri-map-pin-range-fill:before{content:"\ef15"}.ri-map-pin-range-line:before{content:"\ef16"}.ri-map-pin-time-fill:before{content:"\ef17"}.ri-map-pin-time-line:before{content:"\ef18"}.ri-map-pin-user-fill:before{content:"\ef19"}.ri-map-pin-user-line:before{content:"\ef1a"}.ri-mark-pen-fill:before{content:"\ef1b"}.ri-mark-pen-line:before{content:"\ef1c"}.ri-markdown-fill:before{content:"\ef1d"}.ri-markdown-line:before{content:"\ef1e"}.ri-markup-fill:before{content:"\ef1f"}.ri-markup-line:before{content:"\ef20"}.ri-mastercard-fill:before{content:"\ef21"}.ri-mastercard-line:before{content:"\ef22"}.ri-mastodon-fill:before{content:"\ef23"}.ri-mastodon-line:before{content:"\ef24"}.ri-medal-2-fill:before{content:"\ef25"}.ri-medal-2-line:before{content:"\ef26"}.ri-medal-fill:before{content:"\ef27"}.ri-medal-line:before{content:"\ef28"}.ri-medicine-bottle-fill:before{content:"\ef29"}.ri-medicine-bottle-line:before{content:"\ef2a"}.ri-medium-fill:before{content:"\ef2b"}.ri-medium-line:before{content:"\ef2c"}.ri-men-fill:before{content:"\ef2d"}.ri-men-line:before{content:"\ef2e"}.ri-mental-health-fill:before{content:"\ef2f"}.ri-mental-health-line:before{content:"\ef30"}.ri-menu-2-fill:before{content:"\ef31"}.ri-menu-2-line:before{content:"\ef32"}.ri-menu-3-fill:before{content:"\ef33"}.ri-menu-3-line:before{content:"\ef34"}.ri-menu-4-fill:before{content:"\ef35"}.ri-menu-4-line:before{content:"\ef36"}.ri-menu-5-fill:before{content:"\ef37"}.ri-menu-5-line:before{content:"\ef38"}.ri-menu-add-fill:before{content:"\ef39"}.ri-menu-add-line:before{content:"\ef3a"}.ri-menu-fill:before{content:"\ef3b"}.ri-menu-fold-fill:before{content:"\ef3c"}.ri-menu-fold-line:before{content:"\ef3d"}.ri-menu-line:before{content:"\ef3e"}.ri-menu-unfold-fill:before{content:"\ef3f"}.ri-menu-unfold-line:before{content:"\ef40"}.ri-merge-cells-horizontal:before{content:"\ef41"}.ri-merge-cells-vertical:before{content:"\ef42"}.ri-message-2-fill:before{content:"\ef43"}.ri-message-2-line:before{content:"\ef44"}.ri-message-3-fill:before{content:"\ef45"}.ri-message-3-line:before{content:"\ef46"}.ri-message-fill:before{content:"\ef47"}.ri-message-line:before{content:"\ef48"}.ri-messenger-fill:before{content:"\ef49"}.ri-messenger-line:before{content:"\ef4a"}.ri-meteor-fill:before{content:"\ef4b"}.ri-meteor-line:before{content:"\ef4c"}.ri-mic-2-fill:before{content:"\ef4d"}.ri-mic-2-line:before{content:"\ef4e"}.ri-mic-fill:before{content:"\ef4f"}.ri-mic-line:before{content:"\ef50"}.ri-mic-off-fill:before{content:"\ef51"}.ri-mic-off-line:before{content:"\ef52"}.ri-mickey-fill:before{content:"\ef53"}.ri-mickey-line:before{content:"\ef54"}.ri-microscope-fill:before{content:"\ef55"}.ri-microscope-line:before{content:"\ef56"}.ri-microsoft-fill:before{content:"\ef57"}.ri-microsoft-line:before{content:"\ef58"}.ri-mind-map:before{content:"\ef59"}.ri-mini-program-fill:before{content:"\ef5a"}.ri-mini-program-line:before{content:"\ef5b"}.ri-mist-fill:before{content:"\ef5c"}.ri-mist-line:before{content:"\ef5d"}.ri-money-cny-box-fill:before{content:"\ef5e"}.ri-money-cny-box-line:before{content:"\ef5f"}.ri-money-cny-circle-fill:before{content:"\ef60"}.ri-money-cny-circle-line:before{content:"\ef61"}.ri-money-dollar-box-fill:before{content:"\ef62"}.ri-money-dollar-box-line:before{content:"\ef63"}.ri-money-dollar-circle-fill:before{content:"\ef64"}.ri-money-dollar-circle-line:before{content:"\ef65"}.ri-money-euro-box-fill:before{content:"\ef66"}.ri-money-euro-box-line:before{content:"\ef67"}.ri-money-euro-circle-fill:before{content:"\ef68"}.ri-money-euro-circle-line:before{content:"\ef69"}.ri-money-pound-box-fill:before{content:"\ef6a"}.ri-money-pound-box-line:before{content:"\ef6b"}.ri-money-pound-circle-fill:before{content:"\ef6c"}.ri-money-pound-circle-line:before{content:"\ef6d"}.ri-moon-clear-fill:before{content:"\ef6e"}.ri-moon-clear-line:before{content:"\ef6f"}.ri-moon-cloudy-fill:before{content:"\ef70"}.ri-moon-cloudy-line:before{content:"\ef71"}.ri-moon-fill:before{content:"\ef72"}.ri-moon-foggy-fill:before{content:"\ef73"}.ri-moon-foggy-line:before{content:"\ef74"}.ri-moon-line:before{content:"\ef75"}.ri-more-2-fill:before{content:"\ef76"}.ri-more-2-line:before{content:"\ef77"}.ri-more-fill:before{content:"\ef78"}.ri-more-line:before{content:"\ef79"}.ri-motorbike-fill:before{content:"\ef7a"}.ri-motorbike-line:before{content:"\ef7b"}.ri-mouse-fill:before{content:"\ef7c"}.ri-mouse-line:before{content:"\ef7d"}.ri-movie-2-fill:before{content:"\ef7e"}.ri-movie-2-line:before{content:"\ef7f"}.ri-movie-fill:before{content:"\ef80"}.ri-movie-line:before{content:"\ef81"}.ri-music-2-fill:before{content:"\ef82"}.ri-music-2-line:before{content:"\ef83"}.ri-music-fill:before{content:"\ef84"}.ri-music-line:before{content:"\ef85"}.ri-mv-fill:before{content:"\ef86"}.ri-mv-line:before{content:"\ef87"}.ri-navigation-fill:before{content:"\ef88"}.ri-navigation-line:before{content:"\ef89"}.ri-netease-cloud-music-fill:before{content:"\ef8a"}.ri-netease-cloud-music-line:before{content:"\ef8b"}.ri-netflix-fill:before{content:"\ef8c"}.ri-netflix-line:before{content:"\ef8d"}.ri-newspaper-fill:before{content:"\ef8e"}.ri-newspaper-line:before{content:"\ef8f"}.ri-node-tree:before{content:"\ef90"}.ri-notification-2-fill:before{content:"\ef91"}.ri-notification-2-line:before{content:"\ef92"}.ri-notification-3-fill:before{content:"\ef93"}.ri-notification-3-line:before{content:"\ef94"}.ri-notification-4-fill:before{content:"\ef95"}.ri-notification-4-line:before{content:"\ef96"}.ri-notification-badge-fill:before{content:"\ef97"}.ri-notification-badge-line:before{content:"\ef98"}.ri-notification-fill:before{content:"\ef99"}.ri-notification-line:before{content:"\ef9a"}.ri-notification-off-fill:before{content:"\ef9b"}.ri-notification-off-line:before{content:"\ef9c"}.ri-npmjs-fill:before{content:"\ef9d"}.ri-npmjs-line:before{content:"\ef9e"}.ri-number-0:before{content:"\ef9f"}.ri-number-1:before{content:"\efa0"}.ri-number-2:before{content:"\efa1"}.ri-number-3:before{content:"\efa2"}.ri-number-4:before{content:"\efa3"}.ri-number-5:before{content:"\efa4"}.ri-number-6:before{content:"\efa5"}.ri-number-7:before{content:"\efa6"}.ri-number-8:before{content:"\efa7"}.ri-number-9:before{content:"\efa8"}.ri-numbers-fill:before{content:"\efa9"}.ri-numbers-line:before{content:"\efaa"}.ri-nurse-fill:before{content:"\efab"}.ri-nurse-line:before{content:"\efac"}.ri-oil-fill:before{content:"\efad"}.ri-oil-line:before{content:"\efae"}.ri-omega:before{content:"\efaf"}.ri-open-arm-fill:before{content:"\efb0"}.ri-open-arm-line:before{content:"\efb1"}.ri-open-source-fill:before{content:"\efb2"}.ri-open-source-line:before{content:"\efb3"}.ri-opera-fill:before{content:"\efb4"}.ri-opera-line:before{content:"\efb5"}.ri-order-play-fill:before{content:"\efb6"}.ri-order-play-line:before{content:"\efb7"}.ri-organization-chart:before{content:"\efb8"}.ri-outlet-2-fill:before{content:"\efb9"}.ri-outlet-2-line:before{content:"\efba"}.ri-outlet-fill:before{content:"\efbb"}.ri-outlet-line:before{content:"\efbc"}.ri-page-separator:before{content:"\efbd"}.ri-pages-fill:before{content:"\efbe"}.ri-pages-line:before{content:"\efbf"}.ri-paint-brush-fill:before{content:"\efc0"}.ri-paint-brush-line:before{content:"\efc1"}.ri-paint-fill:before{content:"\efc2"}.ri-paint-line:before{content:"\efc3"}.ri-palette-fill:before{content:"\efc4"}.ri-palette-line:before{content:"\efc5"}.ri-pantone-fill:before{content:"\efc6"}.ri-pantone-line:before{content:"\efc7"}.ri-paragraph:before{content:"\efc8"}.ri-parent-fill:before{content:"\efc9"}.ri-parent-line:before{content:"\efca"}.ri-parentheses-fill:before{content:"\efcb"}.ri-parentheses-line:before{content:"\efcc"}.ri-parking-box-fill:before{content:"\efcd"}.ri-parking-box-line:before{content:"\efce"}.ri-parking-fill:before{content:"\efcf"}.ri-parking-line:before{content:"\efd0"}.ri-passport-fill:before{content:"\efd1"}.ri-passport-line:before{content:"\efd2"}.ri-patreon-fill:before{content:"\efd3"}.ri-patreon-line:before{content:"\efd4"}.ri-pause-circle-fill:before{content:"\efd5"}.ri-pause-circle-line:before{content:"\efd6"}.ri-pause-fill:before{content:"\efd7"}.ri-pause-line:before{content:"\efd8"}.ri-pause-mini-fill:before{content:"\efd9"}.ri-pause-mini-line:before{content:"\efda"}.ri-paypal-fill:before{content:"\efdb"}.ri-paypal-line:before{content:"\efdc"}.ri-pen-nib-fill:before{content:"\efdd"}.ri-pen-nib-line:before{content:"\efde"}.ri-pencil-fill:before{content:"\efdf"}.ri-pencil-line:before{content:"\efe0"}.ri-pencil-ruler-2-fill:before{content:"\efe1"}.ri-pencil-ruler-2-line:before{content:"\efe2"}.ri-pencil-ruler-fill:before{content:"\efe3"}.ri-pencil-ruler-line:before{content:"\efe4"}.ri-percent-fill:before{content:"\efe5"}.ri-percent-line:before{content:"\efe6"}.ri-phone-camera-fill:before{content:"\efe7"}.ri-phone-camera-line:before{content:"\efe8"}.ri-phone-fill:before{content:"\efe9"}.ri-phone-find-fill:before{content:"\efea"}.ri-phone-find-line:before{content:"\efeb"}.ri-phone-line:before{content:"\efec"}.ri-phone-lock-fill:before{content:"\efed"}.ri-phone-lock-line:before{content:"\efee"}.ri-picture-in-picture-2-fill:before{content:"\efef"}.ri-picture-in-picture-2-line:before{content:"\eff0"}.ri-picture-in-picture-exit-fill:before{content:"\eff1"}.ri-picture-in-picture-exit-line:before{content:"\eff2"}.ri-picture-in-picture-fill:before{content:"\eff3"}.ri-picture-in-picture-line:before{content:"\eff4"}.ri-pie-chart-2-fill:before{content:"\eff5"}.ri-pie-chart-2-line:before{content:"\eff6"}.ri-pie-chart-box-fill:before{content:"\eff7"}.ri-pie-chart-box-line:before{content:"\eff8"}.ri-pie-chart-fill:before{content:"\eff9"}.ri-pie-chart-line:before{content:"\effa"}.ri-pin-distance-fill:before{content:"\effb"}.ri-pin-distance-line:before{content:"\effc"}.ri-ping-pong-fill:before{content:"\effd"}.ri-ping-pong-line:before{content:"\effe"}.ri-pinterest-fill:before{content:"\efff"}.ri-pinterest-line:before{content:"\f000"}.ri-pinyin-input:before{content:"\f001"}.ri-pixelfed-fill:before{content:"\f002"}.ri-pixelfed-line:before{content:"\f003"}.ri-plane-fill:before{content:"\f004"}.ri-plane-line:before{content:"\f005"}.ri-plant-fill:before{content:"\f006"}.ri-plant-line:before{content:"\f007"}.ri-play-circle-fill:before{content:"\f008"}.ri-play-circle-line:before{content:"\f009"}.ri-play-fill:before{content:"\f00a"}.ri-play-line:before{content:"\f00b"}.ri-play-list-2-fill:before{content:"\f00c"}.ri-play-list-2-line:before{content:"\f00d"}.ri-play-list-add-fill:before{content:"\f00e"}.ri-play-list-add-line:before{content:"\f00f"}.ri-play-list-fill:before{content:"\f010"}.ri-play-list-line:before{content:"\f011"}.ri-play-mini-fill:before{content:"\f012"}.ri-play-mini-line:before{content:"\f013"}.ri-playstation-fill:before{content:"\f014"}.ri-playstation-line:before{content:"\f015"}.ri-plug-2-fill:before{content:"\f016"}.ri-plug-2-line:before{content:"\f017"}.ri-plug-fill:before{content:"\f018"}.ri-plug-line:before{content:"\f019"}.ri-polaroid-2-fill:before{content:"\f01a"}.ri-polaroid-2-line:before{content:"\f01b"}.ri-polaroid-fill:before{content:"\f01c"}.ri-polaroid-line:before{content:"\f01d"}.ri-police-car-fill:before{content:"\f01e"}.ri-police-car-line:before{content:"\f01f"}.ri-price-tag-2-fill:before{content:"\f020"}.ri-price-tag-2-line:before{content:"\f021"}.ri-price-tag-3-fill:before{content:"\f022"}.ri-price-tag-3-line:before{content:"\f023"}.ri-price-tag-fill:before{content:"\f024"}.ri-price-tag-line:before{content:"\f025"}.ri-printer-cloud-fill:before{content:"\f026"}.ri-printer-cloud-line:before{content:"\f027"}.ri-printer-fill:before{content:"\f028"}.ri-printer-line:before{content:"\f029"}.ri-product-hunt-fill:before{content:"\f02a"}.ri-product-hunt-line:before{content:"\f02b"}.ri-profile-fill:before{content:"\f02c"}.ri-profile-line:before{content:"\f02d"}.ri-projector-2-fill:before{content:"\f02e"}.ri-projector-2-line:before{content:"\f02f"}.ri-projector-fill:before{content:"\f030"}.ri-projector-line:before{content:"\f031"}.ri-psychotherapy-fill:before{content:"\f032"}.ri-psychotherapy-line:before{content:"\f033"}.ri-pulse-fill:before{content:"\f034"}.ri-pulse-line:before{content:"\f035"}.ri-pushpin-2-fill:before{content:"\f036"}.ri-pushpin-2-line:before{content:"\f037"}.ri-pushpin-fill:before{content:"\f038"}.ri-pushpin-line:before{content:"\f039"}.ri-qq-fill:before{content:"\f03a"}.ri-qq-line:before{content:"\f03b"}.ri-qr-code-fill:before{content:"\f03c"}.ri-qr-code-line:before{content:"\f03d"}.ri-qr-scan-2-fill:before{content:"\f03e"}.ri-qr-scan-2-line:before{content:"\f03f"}.ri-qr-scan-fill:before{content:"\f040"}.ri-qr-scan-line:before{content:"\f041"}.ri-question-answer-fill:before{content:"\f042"}.ri-question-answer-line:before{content:"\f043"}.ri-question-fill:before{content:"\f044"}.ri-question-line:before{content:"\f045"}.ri-question-mark:before{content:"\f046"}.ri-questionnaire-fill:before{content:"\f047"}.ri-questionnaire-line:before{content:"\f048"}.ri-quill-pen-fill:before{content:"\f049"}.ri-quill-pen-line:before{content:"\f04a"}.ri-radar-fill:before{content:"\f04b"}.ri-radar-line:before{content:"\f04c"}.ri-radio-2-fill:before{content:"\f04d"}.ri-radio-2-line:before{content:"\f04e"}.ri-radio-button-fill:before{content:"\f04f"}.ri-radio-button-line:before{content:"\f050"}.ri-radio-fill:before{content:"\f051"}.ri-radio-line:before{content:"\f052"}.ri-rainbow-fill:before{content:"\f053"}.ri-rainbow-line:before{content:"\f054"}.ri-rainy-fill:before{content:"\f055"}.ri-rainy-line:before{content:"\f056"}.ri-reactjs-fill:before{content:"\f057"}.ri-reactjs-line:before{content:"\f058"}.ri-record-circle-fill:before{content:"\f059"}.ri-record-circle-line:before{content:"\f05a"}.ri-record-mail-fill:before{content:"\f05b"}.ri-record-mail-line:before{content:"\f05c"}.ri-recycle-fill:before{content:"\f05d"}.ri-recycle-line:before{content:"\f05e"}.ri-red-packet-fill:before{content:"\f05f"}.ri-red-packet-line:before{content:"\f060"}.ri-reddit-fill:before{content:"\f061"}.ri-reddit-line:before{content:"\f062"}.ri-refresh-fill:before{content:"\f063"}.ri-refresh-line:before{content:"\f064"}.ri-refund-2-fill:before{content:"\f065"}.ri-refund-2-line:before{content:"\f066"}.ri-refund-fill:before{content:"\f067"}.ri-refund-line:before{content:"\f068"}.ri-registered-fill:before{content:"\f069"}.ri-registered-line:before{content:"\f06a"}.ri-remixicon-fill:before{content:"\f06b"}.ri-remixicon-line:before{content:"\f06c"}.ri-remote-control-2-fill:before{content:"\f06d"}.ri-remote-control-2-line:before{content:"\f06e"}.ri-remote-control-fill:before{content:"\f06f"}.ri-remote-control-line:before{content:"\f070"}.ri-repeat-2-fill:before{content:"\f071"}.ri-repeat-2-line:before{content:"\f072"}.ri-repeat-fill:before{content:"\f073"}.ri-repeat-line:before{content:"\f074"}.ri-repeat-one-fill:before{content:"\f075"}.ri-repeat-one-line:before{content:"\f076"}.ri-reply-all-fill:before{content:"\f077"}.ri-reply-all-line:before{content:"\f078"}.ri-reply-fill:before{content:"\f079"}.ri-reply-line:before{content:"\f07a"}.ri-reserved-fill:before{content:"\f07b"}.ri-reserved-line:before{content:"\f07c"}.ri-rest-time-fill:before{content:"\f07d"}.ri-rest-time-line:before{content:"\f07e"}.ri-restart-fill:before{content:"\f07f"}.ri-restart-line:before{content:"\f080"}.ri-restaurant-2-fill:before{content:"\f081"}.ri-restaurant-2-line:before{content:"\f082"}.ri-restaurant-fill:before{content:"\f083"}.ri-restaurant-line:before{content:"\f084"}.ri-rewind-fill:before{content:"\f085"}.ri-rewind-line:before{content:"\f086"}.ri-rewind-mini-fill:before{content:"\f087"}.ri-rewind-mini-line:before{content:"\f088"}.ri-rhythm-fill:before{content:"\f089"}.ri-rhythm-line:before{content:"\f08a"}.ri-riding-fill:before{content:"\f08b"}.ri-riding-line:before{content:"\f08c"}.ri-road-map-fill:before{content:"\f08d"}.ri-road-map-line:before{content:"\f08e"}.ri-roadster-fill:before{content:"\f08f"}.ri-roadster-line:before{content:"\f090"}.ri-robot-fill:before{content:"\f091"}.ri-robot-line:before{content:"\f092"}.ri-rocket-2-fill:before{content:"\f093"}.ri-rocket-2-line:before{content:"\f094"}.ri-rocket-fill:before{content:"\f095"}.ri-rocket-line:before{content:"\f096"}.ri-rotate-lock-fill:before{content:"\f097"}.ri-rotate-lock-line:before{content:"\f098"}.ri-rounded-corner:before{content:"\f099"}.ri-route-fill:before{content:"\f09a"}.ri-route-line:before{content:"\f09b"}.ri-router-fill:before{content:"\f09c"}.ri-router-line:before{content:"\f09d"}.ri-rss-fill:before{content:"\f09e"}.ri-rss-line:before{content:"\f09f"}.ri-ruler-2-fill:before{content:"\f0a0"}.ri-ruler-2-line:before{content:"\f0a1"}.ri-ruler-fill:before{content:"\f0a2"}.ri-ruler-line:before{content:"\f0a3"}.ri-run-fill:before{content:"\f0a4"}.ri-run-line:before{content:"\f0a5"}.ri-safari-fill:before{content:"\f0a6"}.ri-safari-line:before{content:"\f0a7"}.ri-safe-2-fill:before{content:"\f0a8"}.ri-safe-2-line:before{content:"\f0a9"}.ri-safe-fill:before{content:"\f0aa"}.ri-safe-line:before{content:"\f0ab"}.ri-sailboat-fill:before{content:"\f0ac"}.ri-sailboat-line:before{content:"\f0ad"}.ri-save-2-fill:before{content:"\f0ae"}.ri-save-2-line:before{content:"\f0af"}.ri-save-3-fill:before{content:"\f0b0"}.ri-save-3-line:before{content:"\f0b1"}.ri-save-fill:before{content:"\f0b2"}.ri-save-line:before{content:"\f0b3"}.ri-scales-2-fill:before{content:"\f0b4"}.ri-scales-2-line:before{content:"\f0b5"}.ri-scales-3-fill:before{content:"\f0b6"}.ri-scales-3-line:before{content:"\f0b7"}.ri-scales-fill:before{content:"\f0b8"}.ri-scales-line:before{content:"\f0b9"}.ri-scan-2-fill:before{content:"\f0ba"}.ri-scan-2-line:before{content:"\f0bb"}.ri-scan-fill:before{content:"\f0bc"}.ri-scan-line:before{content:"\f0bd"}.ri-scissors-2-fill:before{content:"\f0be"}.ri-scissors-2-line:before{content:"\f0bf"}.ri-scissors-cut-fill:before{content:"\f0c0"}.ri-scissors-cut-line:before{content:"\f0c1"}.ri-scissors-fill:before{content:"\f0c2"}.ri-scissors-line:before{content:"\f0c3"}.ri-screenshot-2-fill:before{content:"\f0c4"}.ri-screenshot-2-line:before{content:"\f0c5"}.ri-screenshot-fill:before{content:"\f0c6"}.ri-screenshot-line:before{content:"\f0c7"}.ri-sd-card-fill:before{content:"\f0c8"}.ri-sd-card-line:before{content:"\f0c9"}.ri-sd-card-mini-fill:before{content:"\f0ca"}.ri-sd-card-mini-line:before{content:"\f0cb"}.ri-search-2-fill:before{content:"\f0cc"}.ri-search-2-line:before{content:"\f0cd"}.ri-search-eye-fill:before{content:"\f0ce"}.ri-search-eye-line:before{content:"\f0cf"}.ri-search-fill:before{content:"\f0d0"}.ri-search-line:before{content:"\f0d1"}.ri-secure-payment-fill:before{content:"\f0d2"}.ri-secure-payment-line:before{content:"\f0d3"}.ri-seedling-fill:before{content:"\f0d4"}.ri-seedling-line:before{content:"\f0d5"}.ri-send-backward:before{content:"\f0d6"}.ri-send-plane-2-fill:before{content:"\f0d7"}.ri-send-plane-2-line:before{content:"\f0d8"}.ri-send-plane-fill:before{content:"\f0d9"}.ri-send-plane-line:before{content:"\f0da"}.ri-send-to-back:before{content:"\f0db"}.ri-sensor-fill:before{content:"\f0dc"}.ri-sensor-line:before{content:"\f0dd"}.ri-separator:before{content:"\f0de"}.ri-server-fill:before{content:"\f0df"}.ri-server-line:before{content:"\f0e0"}.ri-service-fill:before{content:"\f0e1"}.ri-service-line:before{content:"\f0e2"}.ri-settings-2-fill:before{content:"\f0e3"}.ri-settings-2-line:before{content:"\f0e4"}.ri-settings-3-fill:before{content:"\f0e5"}.ri-settings-3-line:before{content:"\f0e6"}.ri-settings-4-fill:before{content:"\f0e7"}.ri-settings-4-line:before{content:"\f0e8"}.ri-settings-5-fill:before{content:"\f0e9"}.ri-settings-5-line:before{content:"\f0ea"}.ri-settings-6-fill:before{content:"\f0eb"}.ri-settings-6-line:before{content:"\f0ec"}.ri-settings-fill:before{content:"\f0ed"}.ri-settings-line:before{content:"\f0ee"}.ri-shape-2-fill:before{content:"\f0ef"}.ri-shape-2-line:before{content:"\f0f0"}.ri-shape-fill:before{content:"\f0f1"}.ri-shape-line:before{content:"\f0f2"}.ri-share-box-fill:before{content:"\f0f3"}.ri-share-box-line:before{content:"\f0f4"}.ri-share-circle-fill:before{content:"\f0f5"}.ri-share-circle-line:before{content:"\f0f6"}.ri-share-fill:before{content:"\f0f7"}.ri-share-forward-2-fill:before{content:"\f0f8"}.ri-share-forward-2-line:before{content:"\f0f9"}.ri-share-forward-box-fill:before{content:"\f0fa"}.ri-share-forward-box-line:before{content:"\f0fb"}.ri-share-forward-fill:before{content:"\f0fc"}.ri-share-forward-line:before{content:"\f0fd"}.ri-share-line:before{content:"\f0fe"}.ri-shield-check-fill:before{content:"\f0ff"}.ri-shield-check-line:before{content:"\f100"}.ri-shield-cross-fill:before{content:"\f101"}.ri-shield-cross-line:before{content:"\f102"}.ri-shield-fill:before{content:"\f103"}.ri-shield-flash-fill:before{content:"\f104"}.ri-shield-flash-line:before{content:"\f105"}.ri-shield-keyhole-fill:before{content:"\f106"}.ri-shield-keyhole-line:before{content:"\f107"}.ri-shield-line:before{content:"\f108"}.ri-shield-star-fill:before{content:"\f109"}.ri-shield-star-line:before{content:"\f10a"}.ri-shield-user-fill:before{content:"\f10b"}.ri-shield-user-line:before{content:"\f10c"}.ri-ship-2-fill:before{content:"\f10d"}.ri-ship-2-line:before{content:"\f10e"}.ri-ship-fill:before{content:"\f10f"}.ri-ship-line:before{content:"\f110"}.ri-shirt-fill:before{content:"\f111"}.ri-shirt-line:before{content:"\f112"}.ri-shopping-bag-2-fill:before{content:"\f113"}.ri-shopping-bag-2-line:before{content:"\f114"}.ri-shopping-bag-3-fill:before{content:"\f115"}.ri-shopping-bag-3-line:before{content:"\f116"}.ri-shopping-bag-fill:before{content:"\f117"}.ri-shopping-bag-line:before{content:"\f118"}.ri-shopping-basket-2-fill:before{content:"\f119"}.ri-shopping-basket-2-line:before{content:"\f11a"}.ri-shopping-basket-fill:before{content:"\f11b"}.ri-shopping-basket-line:before{content:"\f11c"}.ri-shopping-cart-2-fill:before{content:"\f11d"}.ri-shopping-cart-2-line:before{content:"\f11e"}.ri-shopping-cart-fill:before{content:"\f11f"}.ri-shopping-cart-line:before{content:"\f120"}.ri-showers-fill:before{content:"\f121"}.ri-showers-line:before{content:"\f122"}.ri-shuffle-fill:before{content:"\f123"}.ri-shuffle-line:before{content:"\f124"}.ri-shut-down-fill:before{content:"\f125"}.ri-shut-down-line:before{content:"\f126"}.ri-side-bar-fill:before{content:"\f127"}.ri-side-bar-line:before{content:"\f128"}.ri-signal-tower-fill:before{content:"\f129"}.ri-signal-tower-line:before{content:"\f12a"}.ri-signal-wifi-1-fill:before{content:"\f12b"}.ri-signal-wifi-1-line:before{content:"\f12c"}.ri-signal-wifi-2-fill:before{content:"\f12d"}.ri-signal-wifi-2-line:before{content:"\f12e"}.ri-signal-wifi-3-fill:before{content:"\f12f"}.ri-signal-wifi-3-line:before{content:"\f130"}.ri-signal-wifi-error-fill:before{content:"\f131"}.ri-signal-wifi-error-line:before{content:"\f132"}.ri-signal-wifi-fill:before{content:"\f133"}.ri-signal-wifi-line:before{content:"\f134"}.ri-signal-wifi-off-fill:before{content:"\f135"}.ri-signal-wifi-off-line:before{content:"\f136"}.ri-sim-card-2-fill:before{content:"\f137"}.ri-sim-card-2-line:before{content:"\f138"}.ri-sim-card-fill:before{content:"\f139"}.ri-sim-card-line:before{content:"\f13a"}.ri-single-quotes-l:before{content:"\f13b"}.ri-single-quotes-r:before{content:"\f13c"}.ri-sip-fill:before{content:"\f13d"}.ri-sip-line:before{content:"\f13e"}.ri-skip-back-fill:before{content:"\f13f"}.ri-skip-back-line:before{content:"\f140"}.ri-skip-back-mini-fill:before{content:"\f141"}.ri-skip-back-mini-line:before{content:"\f142"}.ri-skip-forward-fill:before{content:"\f143"}.ri-skip-forward-line:before{content:"\f144"}.ri-skip-forward-mini-fill:before{content:"\f145"}.ri-skip-forward-mini-line:before{content:"\f146"}.ri-skull-2-fill:before{content:"\f147"}.ri-skull-2-line:before{content:"\f148"}.ri-skull-fill:before{content:"\f149"}.ri-skull-line:before{content:"\f14a"}.ri-skype-fill:before{content:"\f14b"}.ri-skype-line:before{content:"\f14c"}.ri-slack-fill:before{content:"\f14d"}.ri-slack-line:before{content:"\f14e"}.ri-slice-fill:before{content:"\f14f"}.ri-slice-line:before{content:"\f150"}.ri-slideshow-2-fill:before{content:"\f151"}.ri-slideshow-2-line:before{content:"\f152"}.ri-slideshow-3-fill:before{content:"\f153"}.ri-slideshow-3-line:before{content:"\f154"}.ri-slideshow-4-fill:before{content:"\f155"}.ri-slideshow-4-line:before{content:"\f156"}.ri-slideshow-fill:before{content:"\f157"}.ri-slideshow-line:before{content:"\f158"}.ri-smartphone-fill:before{content:"\f159"}.ri-smartphone-line:before{content:"\f15a"}.ri-snapchat-fill:before{content:"\f15b"}.ri-snapchat-line:before{content:"\f15c"}.ri-snowy-fill:before{content:"\f15d"}.ri-snowy-line:before{content:"\f15e"}.ri-sort-asc:before{content:"\f15f"}.ri-sort-desc:before{content:"\f160"}.ri-sound-module-fill:before{content:"\f161"}.ri-sound-module-line:before{content:"\f162"}.ri-soundcloud-fill:before{content:"\f163"}.ri-soundcloud-line:before{content:"\f164"}.ri-space-ship-fill:before{content:"\f165"}.ri-space-ship-line:before{content:"\f166"}.ri-space:before{content:"\f167"}.ri-spam-2-fill:before{content:"\f168"}.ri-spam-2-line:before{content:"\f169"}.ri-spam-3-fill:before{content:"\f16a"}.ri-spam-3-line:before{content:"\f16b"}.ri-spam-fill:before{content:"\f16c"}.ri-spam-line:before{content:"\f16d"}.ri-speaker-2-fill:before{content:"\f16e"}.ri-speaker-2-line:before{content:"\f16f"}.ri-speaker-3-fill:before{content:"\f170"}.ri-speaker-3-line:before{content:"\f171"}.ri-speaker-fill:before{content:"\f172"}.ri-speaker-line:before{content:"\f173"}.ri-spectrum-fill:before{content:"\f174"}.ri-spectrum-line:before{content:"\f175"}.ri-speed-fill:before{content:"\f176"}.ri-speed-line:before{content:"\f177"}.ri-speed-mini-fill:before{content:"\f178"}.ri-speed-mini-line:before{content:"\f179"}.ri-split-cells-horizontal:before{content:"\f17a"}.ri-split-cells-vertical:before{content:"\f17b"}.ri-spotify-fill:before{content:"\f17c"}.ri-spotify-line:before{content:"\f17d"}.ri-spy-fill:before{content:"\f17e"}.ri-spy-line:before{content:"\f17f"}.ri-stack-fill:before{content:"\f180"}.ri-stack-line:before{content:"\f181"}.ri-stack-overflow-fill:before{content:"\f182"}.ri-stack-overflow-line:before{content:"\f183"}.ri-stackshare-fill:before{content:"\f184"}.ri-stackshare-line:before{content:"\f185"}.ri-star-fill:before{content:"\f186"}.ri-star-half-fill:before{content:"\f187"}.ri-star-half-line:before{content:"\f188"}.ri-star-half-s-fill:before{content:"\f189"}.ri-star-half-s-line:before{content:"\f18a"}.ri-star-line:before{content:"\f18b"}.ri-star-s-fill:before{content:"\f18c"}.ri-star-s-line:before{content:"\f18d"}.ri-star-smile-fill:before{content:"\f18e"}.ri-star-smile-line:before{content:"\f18f"}.ri-steam-fill:before{content:"\f190"}.ri-steam-line:before{content:"\f191"}.ri-steering-2-fill:before{content:"\f192"}.ri-steering-2-line:before{content:"\f193"}.ri-steering-fill:before{content:"\f194"}.ri-steering-line:before{content:"\f195"}.ri-stethoscope-fill:before{content:"\f196"}.ri-stethoscope-line:before{content:"\f197"}.ri-sticky-note-2-fill:before{content:"\f198"}.ri-sticky-note-2-line:before{content:"\f199"}.ri-sticky-note-fill:before{content:"\f19a"}.ri-sticky-note-line:before{content:"\f19b"}.ri-stock-fill:before{content:"\f19c"}.ri-stock-line:before{content:"\f19d"}.ri-stop-circle-fill:before{content:"\f19e"}.ri-stop-circle-line:before{content:"\f19f"}.ri-stop-fill:before{content:"\f1a0"}.ri-stop-line:before{content:"\f1a1"}.ri-stop-mini-fill:before{content:"\f1a2"}.ri-stop-mini-line:before{content:"\f1a3"}.ri-store-2-fill:before{content:"\f1a4"}.ri-store-2-line:before{content:"\f1a5"}.ri-store-3-fill:before{content:"\f1a6"}.ri-store-3-line:before{content:"\f1a7"}.ri-store-fill:before{content:"\f1a8"}.ri-store-line:before{content:"\f1a9"}.ri-strikethrough-2:before{content:"\f1aa"}.ri-strikethrough:before{content:"\f1ab"}.ri-subscript-2:before{content:"\f1ac"}.ri-subscript:before{content:"\f1ad"}.ri-subtract-fill:before{content:"\f1ae"}.ri-subtract-line:before{content:"\f1af"}.ri-subway-fill:before{content:"\f1b0"}.ri-subway-line:before{content:"\f1b1"}.ri-subway-wifi-fill:before{content:"\f1b2"}.ri-subway-wifi-line:before{content:"\f1b3"}.ri-suitcase-2-fill:before{content:"\f1b4"}.ri-suitcase-2-line:before{content:"\f1b5"}.ri-suitcase-3-fill:before{content:"\f1b6"}.ri-suitcase-3-line:before{content:"\f1b7"}.ri-suitcase-fill:before{content:"\f1b8"}.ri-suitcase-line:before{content:"\f1b9"}.ri-sun-cloudy-fill:before{content:"\f1ba"}.ri-sun-cloudy-line:before{content:"\f1bb"}.ri-sun-fill:before{content:"\f1bc"}.ri-sun-foggy-fill:before{content:"\f1bd"}.ri-sun-foggy-line:before{content:"\f1be"}.ri-sun-line:before{content:"\f1bf"}.ri-superscript-2:before{content:"\f1c0"}.ri-superscript:before{content:"\f1c1"}.ri-surgical-mask-fill:before{content:"\f1c2"}.ri-surgical-mask-line:before{content:"\f1c3"}.ri-surround-sound-fill:before{content:"\f1c4"}.ri-surround-sound-line:before{content:"\f1c5"}.ri-survey-fill:before{content:"\f1c6"}.ri-survey-line:before{content:"\f1c7"}.ri-swap-box-fill:before{content:"\f1c8"}.ri-swap-box-line:before{content:"\f1c9"}.ri-swap-fill:before{content:"\f1ca"}.ri-swap-line:before{content:"\f1cb"}.ri-switch-fill:before{content:"\f1cc"}.ri-switch-line:before{content:"\f1cd"}.ri-sword-fill:before{content:"\f1ce"}.ri-sword-line:before{content:"\f1cf"}.ri-syringe-fill:before{content:"\f1d0"}.ri-syringe-line:before{content:"\f1d1"}.ri-t-box-fill:before{content:"\f1d2"}.ri-t-box-line:before{content:"\f1d3"}.ri-t-shirt-2-fill:before{content:"\f1d4"}.ri-t-shirt-2-line:before{content:"\f1d5"}.ri-t-shirt-air-fill:before{content:"\f1d6"}.ri-t-shirt-air-line:before{content:"\f1d7"}.ri-t-shirt-fill:before{content:"\f1d8"}.ri-t-shirt-line:before{content:"\f1d9"}.ri-table-2:before{content:"\f1da"}.ri-table-alt-fill:before{content:"\f1db"}.ri-table-alt-line:before{content:"\f1dc"}.ri-table-fill:before{content:"\f1dd"}.ri-table-line:before{content:"\f1de"}.ri-tablet-fill:before{content:"\f1df"}.ri-tablet-line:before{content:"\f1e0"}.ri-takeaway-fill:before{content:"\f1e1"}.ri-takeaway-line:before{content:"\f1e2"}.ri-taobao-fill:before{content:"\f1e3"}.ri-taobao-line:before{content:"\f1e4"}.ri-tape-fill:before{content:"\f1e5"}.ri-tape-line:before{content:"\f1e6"}.ri-task-fill:before{content:"\f1e7"}.ri-task-line:before{content:"\f1e8"}.ri-taxi-fill:before{content:"\f1e9"}.ri-taxi-line:before{content:"\f1ea"}.ri-taxi-wifi-fill:before{content:"\f1eb"}.ri-taxi-wifi-line:before{content:"\f1ec"}.ri-team-fill:before{content:"\f1ed"}.ri-team-line:before{content:"\f1ee"}.ri-telegram-fill:before{content:"\f1ef"}.ri-telegram-line:before{content:"\f1f0"}.ri-temp-cold-fill:before{content:"\f1f1"}.ri-temp-cold-line:before{content:"\f1f2"}.ri-temp-hot-fill:before{content:"\f1f3"}.ri-temp-hot-line:before{content:"\f1f4"}.ri-terminal-box-fill:before{content:"\f1f5"}.ri-terminal-box-line:before{content:"\f1f6"}.ri-terminal-fill:before{content:"\f1f7"}.ri-terminal-line:before{content:"\f1f8"}.ri-terminal-window-fill:before{content:"\f1f9"}.ri-terminal-window-line:before{content:"\f1fa"}.ri-test-tube-fill:before{content:"\f1fb"}.ri-test-tube-line:before{content:"\f1fc"}.ri-text-direction-l:before{content:"\f1fd"}.ri-text-direction-r:before{content:"\f1fe"}.ri-text-spacing:before{content:"\f1ff"}.ri-text-wrap:before{content:"\f200"}.ri-text:before{content:"\f201"}.ri-thermometer-fill:before{content:"\f202"}.ri-thermometer-line:before{content:"\f203"}.ri-thumb-down-fill:before{content:"\f204"}.ri-thumb-down-line:before{content:"\f205"}.ri-thumb-up-fill:before{content:"\f206"}.ri-thumb-up-line:before{content:"\f207"}.ri-thunderstorms-fill:before{content:"\f208"}.ri-thunderstorms-line:before{content:"\f209"}.ri-ticket-2-fill:before{content:"\f20a"}.ri-ticket-2-line:before{content:"\f20b"}.ri-ticket-fill:before{content:"\f20c"}.ri-ticket-line:before{content:"\f20d"}.ri-time-fill:before{content:"\f20e"}.ri-time-line:before{content:"\f20f"}.ri-timer-2-fill:before{content:"\f210"}.ri-timer-2-line:before{content:"\f211"}.ri-timer-fill:before{content:"\f212"}.ri-timer-flash-fill:before{content:"\f213"}.ri-timer-flash-line:before{content:"\f214"}.ri-timer-line:before{content:"\f215"}.ri-todo-fill:before{content:"\f216"}.ri-todo-line:before{content:"\f217"}.ri-toggle-fill:before{content:"\f218"}.ri-toggle-line:before{content:"\f219"}.ri-tools-fill:before{content:"\f21a"}.ri-tools-line:before{content:"\f21b"}.ri-tornado-fill:before{content:"\f21c"}.ri-tornado-line:before{content:"\f21d"}.ri-trademark-fill:before{content:"\f21e"}.ri-trademark-line:before{content:"\f21f"}.ri-traffic-light-fill:before{content:"\f220"}.ri-traffic-light-line:before{content:"\f221"}.ri-train-fill:before{content:"\f222"}.ri-train-line:before{content:"\f223"}.ri-train-wifi-fill:before{content:"\f224"}.ri-train-wifi-line:before{content:"\f225"}.ri-translate-2:before{content:"\f226"}.ri-translate:before{content:"\f227"}.ri-travesti-fill:before{content:"\f228"}.ri-travesti-line:before{content:"\f229"}.ri-treasure-map-fill:before{content:"\f22a"}.ri-treasure-map-line:before{content:"\f22b"}.ri-trello-fill:before{content:"\f22c"}.ri-trello-line:before{content:"\f22d"}.ri-trophy-fill:before{content:"\f22e"}.ri-trophy-line:before{content:"\f22f"}.ri-truck-fill:before{content:"\f230"}.ri-truck-line:before{content:"\f231"}.ri-tumblr-fill:before{content:"\f232"}.ri-tumblr-line:before{content:"\f233"}.ri-tv-2-fill:before{content:"\f234"}.ri-tv-2-line:before{content:"\f235"}.ri-tv-fill:before{content:"\f236"}.ri-tv-line:before{content:"\f237"}.ri-twitch-fill:before{content:"\f238"}.ri-twitch-line:before{content:"\f239"}.ri-twitter-fill:before{content:"\f23a"}.ri-twitter-line:before{content:"\f23b"}.ri-typhoon-fill:before{content:"\f23c"}.ri-typhoon-line:before{content:"\f23d"}.ri-u-disk-fill:before{content:"\f23e"}.ri-u-disk-line:before{content:"\f23f"}.ri-ubuntu-fill:before{content:"\f240"}.ri-ubuntu-line:before{content:"\f241"}.ri-umbrella-fill:before{content:"\f242"}.ri-umbrella-line:before{content:"\f243"}.ri-underline:before{content:"\f244"}.ri-uninstall-fill:before{content:"\f245"}.ri-uninstall-line:before{content:"\f246"}.ri-unsplash-fill:before{content:"\f247"}.ri-unsplash-line:before{content:"\f248"}.ri-upload-2-fill:before{content:"\f249"}.ri-upload-2-line:before{content:"\f24a"}.ri-upload-cloud-2-fill:before{content:"\f24b"}.ri-upload-cloud-2-line:before{content:"\f24c"}.ri-upload-cloud-fill:before{content:"\f24d"}.ri-upload-cloud-line:before{content:"\f24e"}.ri-upload-fill:before{content:"\f24f"}.ri-upload-line:before{content:"\f250"}.ri-usb-fill:before{content:"\f251"}.ri-usb-line:before{content:"\f252"}.ri-user-2-fill:before{content:"\f253"}.ri-user-2-line:before{content:"\f254"}.ri-user-3-fill:before{content:"\f255"}.ri-user-3-line:before{content:"\f256"}.ri-user-4-fill:before{content:"\f257"}.ri-user-4-line:before{content:"\f258"}.ri-user-5-fill:before{content:"\f259"}.ri-user-5-line:before{content:"\f25a"}.ri-user-6-fill:before{content:"\f25b"}.ri-user-6-line:before{content:"\f25c"}.ri-user-add-fill:before{content:"\f25d"}.ri-user-add-line:before{content:"\f25e"}.ri-user-fill:before{content:"\f25f"}.ri-user-follow-fill:before{content:"\f260"}.ri-user-follow-line:before{content:"\f261"}.ri-user-heart-fill:before{content:"\f262"}.ri-user-heart-line:before{content:"\f263"}.ri-user-line:before{content:"\f264"}.ri-user-location-fill:before{content:"\f265"}.ri-user-location-line:before{content:"\f266"}.ri-user-received-2-fill:before{content:"\f267"}.ri-user-received-2-line:before{content:"\f268"}.ri-user-received-fill:before{content:"\f269"}.ri-user-received-line:before{content:"\f26a"}.ri-user-search-fill:before{content:"\f26b"}.ri-user-search-line:before{content:"\f26c"}.ri-user-settings-fill:before{content:"\f26d"}.ri-user-settings-line:before{content:"\f26e"}.ri-user-shared-2-fill:before{content:"\f26f"}.ri-user-shared-2-line:before{content:"\f270"}.ri-user-shared-fill:before{content:"\f271"}.ri-user-shared-line:before{content:"\f272"}.ri-user-smile-fill:before{content:"\f273"}.ri-user-smile-line:before{content:"\f274"}.ri-user-star-fill:before{content:"\f275"}.ri-user-star-line:before{content:"\f276"}.ri-user-unfollow-fill:before{content:"\f277"}.ri-user-unfollow-line:before{content:"\f278"}.ri-user-voice-fill:before{content:"\f279"}.ri-user-voice-line:before{content:"\f27a"}.ri-video-add-fill:before{content:"\f27b"}.ri-video-add-line:before{content:"\f27c"}.ri-video-chat-fill:before{content:"\f27d"}.ri-video-chat-line:before{content:"\f27e"}.ri-video-download-fill:before{content:"\f27f"}.ri-video-download-line:before{content:"\f280"}.ri-video-fill:before{content:"\f281"}.ri-video-line:before{content:"\f282"}.ri-video-upload-fill:before{content:"\f283"}.ri-video-upload-line:before{content:"\f284"}.ri-vidicon-2-fill:before{content:"\f285"}.ri-vidicon-2-line:before{content:"\f286"}.ri-vidicon-fill:before{content:"\f287"}.ri-vidicon-line:before{content:"\f288"}.ri-vimeo-fill:before{content:"\f289"}.ri-vimeo-line:before{content:"\f28a"}.ri-vip-crown-2-fill:before{content:"\f28b"}.ri-vip-crown-2-line:before{content:"\f28c"}.ri-vip-crown-fill:before{content:"\f28d"}.ri-vip-crown-line:before{content:"\f28e"}.ri-vip-diamond-fill:before{content:"\f28f"}.ri-vip-diamond-line:before{content:"\f290"}.ri-vip-fill:before{content:"\f291"}.ri-vip-line:before{content:"\f292"}.ri-virus-fill:before{content:"\f293"}.ri-virus-line:before{content:"\f294"}.ri-visa-fill:before{content:"\f295"}.ri-visa-line:before{content:"\f296"}.ri-voice-recognition-fill:before{content:"\f297"}.ri-voice-recognition-line:before{content:"\f298"}.ri-voiceprint-fill:before{content:"\f299"}.ri-voiceprint-line:before{content:"\f29a"}.ri-volume-down-fill:before{content:"\f29b"}.ri-volume-down-line:before{content:"\f29c"}.ri-volume-mute-fill:before{content:"\f29d"}.ri-volume-mute-line:before{content:"\f29e"}.ri-volume-off-vibrate-fill:before{content:"\f29f"}.ri-volume-off-vibrate-line:before{content:"\f2a0"}.ri-volume-up-fill:before{content:"\f2a1"}.ri-volume-up-line:before{content:"\f2a2"}.ri-volume-vibrate-fill:before{content:"\f2a3"}.ri-volume-vibrate-line:before{content:"\f2a4"}.ri-vuejs-fill:before{content:"\f2a5"}.ri-vuejs-line:before{content:"\f2a6"}.ri-walk-fill:before{content:"\f2a7"}.ri-walk-line:before{content:"\f2a8"}.ri-wallet-2-fill:before{content:"\f2a9"}.ri-wallet-2-line:before{content:"\f2aa"}.ri-wallet-3-fill:before{content:"\f2ab"}.ri-wallet-3-line:before{content:"\f2ac"}.ri-wallet-fill:before{content:"\f2ad"}.ri-wallet-line:before{content:"\f2ae"}.ri-water-flash-fill:before{content:"\f2af"}.ri-water-flash-line:before{content:"\f2b0"}.ri-webcam-fill:before{content:"\f2b1"}.ri-webcam-line:before{content:"\f2b2"}.ri-wechat-2-fill:before{content:"\f2b3"}.ri-wechat-2-line:before{content:"\f2b4"}.ri-wechat-fill:before{content:"\f2b5"}.ri-wechat-line:before{content:"\f2b6"}.ri-wechat-pay-fill:before{content:"\f2b7"}.ri-wechat-pay-line:before{content:"\f2b8"}.ri-weibo-fill:before{content:"\f2b9"}.ri-weibo-line:before{content:"\f2ba"}.ri-whatsapp-fill:before{content:"\f2bb"}.ri-whatsapp-line:before{content:"\f2bc"}.ri-wheelchair-fill:before{content:"\f2bd"}.ri-wheelchair-line:before{content:"\f2be"}.ri-wifi-fill:before{content:"\f2bf"}.ri-wifi-line:before{content:"\f2c0"}.ri-wifi-off-fill:before{content:"\f2c1"}.ri-wifi-off-line:before{content:"\f2c2"}.ri-window-2-fill:before{content:"\f2c3"}.ri-window-2-line:before{content:"\f2c4"}.ri-window-fill:before{content:"\f2c5"}.ri-window-line:before{content:"\f2c6"}.ri-windows-fill:before{content:"\f2c7"}.ri-windows-line:before{content:"\f2c8"}.ri-windy-fill:before{content:"\f2c9"}.ri-windy-line:before{content:"\f2ca"}.ri-wireless-charging-fill:before{content:"\f2cb"}.ri-wireless-charging-line:before{content:"\f2cc"}.ri-women-fill:before{content:"\f2cd"}.ri-women-line:before{content:"\f2ce"}.ri-wubi-input:before{content:"\f2cf"}.ri-xbox-fill:before{content:"\f2d0"}.ri-xbox-line:before{content:"\f2d1"}.ri-xing-fill:before{content:"\f2d2"}.ri-xing-line:before{content:"\f2d3"}.ri-youtube-fill:before{content:"\f2d4"}.ri-youtube-line:before{content:"\f2d5"}.ri-zcool-fill:before{content:"\f2d6"}.ri-zcool-line:before{content:"\f2d7"}.ri-zhihu-fill:before{content:"\f2d8"}.ri-zhihu-line:before{content:"\f2d9"}.ri-zoom-in-fill:before{content:"\f2da"}.ri-zoom-in-line:before{content:"\f2db"}.ri-zoom-out-fill:before{content:"\f2dc"}.ri-zoom-out-line:before{content:"\f2dd"}.ri-zzz-fill:before{content:"\f2de"}.ri-zzz-line:before{content:"\f2df"}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes expand{0%{transform:rotateY(90deg)}to{opacity:1;transform:rotateY(0)}}@keyframes slideIn{0%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes shine{to{background-position-x:-200%}}@keyframes loaderShow{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes entranceLeft{0%{opacity:0;transform:translate(-5px)}to{opacity:1;transform:translate(0)}}@keyframes entranceRight{0%{opacity:0;transform:translate(5px)}to{opacity:1;transform:translate(0)}}@keyframes entranceTop{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}@keyframes entranceBottom{0%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}@media screen and (min-width: 550px){::-webkit-scrollbar{width:8px;height:8px;border-radius:var(--baseRadius)}::-webkit-scrollbar-track{background:transparent;border-radius:var(--baseRadius)}::-webkit-scrollbar-thumb{background-color:var(--baseAlt2Color);border-radius:15px;border:2px solid transparent;background-clip:padding-box}::-webkit-scrollbar-thumb:hover,::-webkit-scrollbar-thumb:active{background-color:var(--baseAlt3Color)}html{scrollbar-color:var(--baseAlt2Color) transparent;scrollbar-width:thin;scroll-behavior:smooth}html *{scrollbar-width:inherit}}:focus-visible{outline-color:var(--primaryColor);outline-style:solid}html,body{line-height:var(--baseLineHeight);font-family:var(--baseFontFamily);font-size:var(--baseFontSize);color:var(--txtPrimaryColor);background:var(--bodyColor)}#app{overflow:auto;display:block;width:100%;height:100vh}.flatpickr-inline-container,.accordion .accordion-content,.accordion,.tabs,.tabs-content,.form-field-file .files-list,.select .txt-missing,.form-field .form-field-block,.list,.skeleton-loader,.clearfix,.content,.form-field .help-block,.overlay-panel .panel-content,.sub-panel,.panel,.block,.code-block,blockquote,p{display:block;width:100%}h1,h2,.breadcrumbs .breadcrumb-item,h3,h4,h5,h6{margin:0;font-weight:400}h1{font-size:22px;line-height:28px}h2,.breadcrumbs .breadcrumb-item{font-size:20px;line-height:26px}h3{font-size:19px;line-height:24px}h4{font-size:18px;line-height:24px}h5{font-size:17px;line-height:24px}h6{font-size:16px;line-height:22px}em{font-style:italic}ins{color:var(--txtPrimaryColor);background:var(--successAltColor);text-decoration:none}del{color:var(--txtPrimaryColor);background:var(--dangerAltColor);text-decoration:none}strong{font-weight:600}small{font-size:var(--smFontSize);line-height:var(--smLineHeight)}sub,sup{position:relative;font-size:.75em;line-height:1}sup{vertical-align:top}sub{vertical-align:bottom}p{margin:5px 0}blockquote{position:relative;padding-left:var(--smSpacing);font-style:italic;color:var(--txtHintColor)}blockquote:before{content:"";position:absolute;top:0;left:0;width:2px;height:100%;background:var(--baseColor)}code{display:inline-block;font-family:var(--monospaceFontFamily);font-style:normal;font-size:var(--lgFontSize);line-height:1.379rem;padding:0 4px;white-space:nowrap;color:var(--txtPrimaryColor);background:var(--baseAlt2Color);border-radius:var(--baseRadius)}.code-block{overflow:auto;padding:var(--xsSpacing);white-space:pre-wrap;background:var(--baseAlt1Color)}ol,ul{margin:10px 0;list-style:decimal;padding-left:var(--baseSpacing)}ol li,ul li{margin-top:5px;margin-bottom:5px}ul{list-style:disc}img{max-width:100%;vertical-align:top}hr{display:block;border:0;height:1px;width:100%;background:var(--baseAlt1Color);margin:var(--baseSpacing) 0}hr.dark{background:var(--baseAlt2Color)}a{color:inherit}a:hover{text-decoration:none}a i,a .txt{display:inline-block;vertical-align:top}.txt-mono{font-family:var(--monospaceFontFamily)}.txt-nowrap{white-space:nowrap}.txt-ellipsis{display:inline-block;vertical-align:top;flex-shrink:0;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.txt-base{font-size:var(--baseFontSize)!important}.txt-xs{font-size:var(--xsFontSize)!important;line-height:var(--smLineHeight)}.txt-sm{font-size:var(--smFontSize)!important;line-height:var(--smLineHeight)}.txt-lg{font-size:var(--lgFontSize)!important}.txt-xl{font-size:var(--xlFontSize)!important}.txt-bold{font-weight:600!important}.txt-strikethrough{text-decoration:line-through!important}.txt-break{white-space:pre-wrap!important}.txt-center{text-align:center!important}.txt-justify{text-align:justify!important}.txt-left{text-align:left!important}.txt-right{text-align:right!important}.txt-main{color:var(--txtPrimaryColor)!important}.txt-hint{color:var(--txtHintColor)!important}.txt-disabled{color:var(--txtDisabledColor)!important}.link-hint{user-select:none;cursor:pointer;color:var(--txtHintColor)!important;text-decoration:none;transition:color var(--baseAnimationSpeed)}.link-hint:hover,.link-hint:focus-visible,.link-hint:active{color:var(--txtPrimaryColor)!important}.link-fade{opacity:1;user-select:none;cursor:pointer;text-decoration:none;color:var(--txtPrimaryColor);transition:opacity var(--baseAnimationSpeed)}.link-fade:focus-visible,.link-fade:hover,.link-fade:active{opacity:.8}.txt-primary{color:var(--primaryColor)!important}.bg-primary{background:var(--primaryColor)!important}.link-primary{cursor:pointer;color:var(--primaryColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-primary:focus-visible,.link-primary:hover,.link-primary:active{opacity:.8}.txt-info{color:var(--infoColor)!important}.bg-info{background:var(--infoColor)!important}.link-info{cursor:pointer;color:var(--infoColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-info:focus-visible,.link-info:hover,.link-info:active{opacity:.8}.txt-info-alt{color:var(--infoAltColor)!important}.bg-info-alt{background:var(--infoAltColor)!important}.link-info-alt{cursor:pointer;color:var(--infoAltColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-info-alt:focus-visible,.link-info-alt:hover,.link-info-alt:active{opacity:.8}.txt-success{color:var(--successColor)!important}.bg-success{background:var(--successColor)!important}.link-success{cursor:pointer;color:var(--successColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-success:focus-visible,.link-success:hover,.link-success:active{opacity:.8}.txt-success-alt{color:var(--successAltColor)!important}.bg-success-alt{background:var(--successAltColor)!important}.link-success-alt{cursor:pointer;color:var(--successAltColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-success-alt:focus-visible,.link-success-alt:hover,.link-success-alt:active{opacity:.8}.txt-danger{color:var(--dangerColor)!important}.bg-danger{background:var(--dangerColor)!important}.link-danger{cursor:pointer;color:var(--dangerColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-danger:focus-visible,.link-danger:hover,.link-danger:active{opacity:.8}.txt-danger-alt{color:var(--dangerAltColor)!important}.bg-danger-alt{background:var(--dangerAltColor)!important}.link-danger-alt{cursor:pointer;color:var(--dangerAltColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-danger-alt:focus-visible,.link-danger-alt:hover,.link-danger-alt:active{opacity:.8}.txt-warning{color:var(--warningColor)!important}.bg-warning{background:var(--warningColor)!important}.link-warning{cursor:pointer;color:var(--warningColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-warning:focus-visible,.link-warning:hover,.link-warning:active{opacity:.8}.txt-warning-alt{color:var(--warningAltColor)!important}.bg-warning-alt{background:var(--warningAltColor)!important}.link-warning-alt{cursor:pointer;color:var(--warningAltColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-warning-alt:focus-visible,.link-warning-alt:hover,.link-warning-alt:active{opacity:.8}.fade{opacity:.6}a.fade,.btn.fade,[tabindex].fade,[class*=link-].fade,.handle.fade{transition:all var(--baseAnimationSpeed)}a.fade:hover,.btn.fade:hover,[tabindex].fade:hover,[class*=link-].fade:hover,.handle.fade:hover{opacity:1}.noborder{border:0px!important}.hidden{display:none!important}.hidden-empty:empty{display:none!important}.content>:first-child,.form-field .help-block>:first-child,.overlay-panel .panel-content>:first-child,.sub-panel>:first-child,.panel>:first-child{margin-top:0}.content>:last-child,.form-field .help-block>:last-child,.overlay-panel .panel-content>:last-child,.sub-panel>:last-child,.panel>:last-child{margin-bottom:0}.panel{background:var(--baseColor);border-radius:var(--lgRadius);padding:calc(var(--baseSpacing) - 5px) var(--baseSpacing);box-shadow:0 2px 5px 0 var(--shadowColor)}.sub-panel{background:var(--baseColor);border-radius:var(--baseRadius);padding:calc(var(--smSpacing) - 5px) var(--smSpacing);border:1px solid var(--baseAlt1Color)}.clearfix{clear:both}.clearfix:after{content:"";display:table;clear:both}.flex{position:relative;display:flex;align-items:center;width:100%;gap:var(--smSpacing)}.flex-fill{flex:1 1 auto!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.inline-flex{position:relative;display:inline-flex;align-items:center;flex-wrap:wrap;min-width:0;gap:10px}.flex-order-0{order:0}.flex-order-1{order:1}.flex-order-2{order:2}.flex-order-3{order:3}.flex-order-4{order:4}.flex-order-5{order:5}.flex-order-6{order:6}.flex-gap-base{gap:var(--baseSpacing)!important}.flex-gap-xs{gap:var(--xsSpacing)!important}.flex-gap-sm{gap:var(--smSpacing)!important}.flex-gap-lg{gap:var(--lgSpacing)!important}.flex-gap-xl{gap:var(--xlSpacing)!important}.flex-gap-0{gap:0px!important}.flex-gap-5{gap:5px!important}.flex-gap-10{gap:10px!important}.flex-gap-15{gap:15px!important}.flex-gap-20{gap:20px!important}.flex-gap-25{gap:25px!important}.flex-gap-30{gap:30px!important}.flex-gap-35{gap:35px!important}.flex-gap-40{gap:40px!important}.flex-gap-45{gap:45px!important}.flex-gap-50{gap:50px!important}.flex-gap-55{gap:55px!important}.flex-gap-60{gap:60px!important}.m-base{margin:var(--baseSpacing)!important}.p-base{padding:var(--baseSpacing)!important}.m-xs{margin:var(--xsSpacing)!important}.p-xs{padding:var(--xsSpacing)!important}.m-sm{margin:var(--smSpacing)!important}.p-sm{padding:var(--smSpacing)!important}.m-lg{margin:var(--lgSpacing)!important}.p-lg{padding:var(--lgSpacing)!important}.m-xl{margin:var(--xlSpacing)!important}.p-xl{padding:var(--xlSpacing)!important}.m-t-auto{margin-top:auto!important}.p-t-auto{padding-top:auto!important}.m-t-base{margin-top:var(--baseSpacing)!important}.p-t-base{padding-top:var(--baseSpacing)!important}.m-t-xs{margin-top:var(--xsSpacing)!important}.p-t-xs{padding-top:var(--xsSpacing)!important}.m-t-sm{margin-top:var(--smSpacing)!important}.p-t-sm{padding-top:var(--smSpacing)!important}.m-t-lg{margin-top:var(--lgSpacing)!important}.p-t-lg{padding-top:var(--lgSpacing)!important}.m-t-xl{margin-top:var(--xlSpacing)!important}.p-t-xl{padding-top:var(--xlSpacing)!important}.m-r-auto{margin-right:auto!important}.p-r-auto{padding-right:auto!important}.m-r-base{margin-right:var(--baseSpacing)!important}.p-r-base{padding-right:var(--baseSpacing)!important}.m-r-xs{margin-right:var(--xsSpacing)!important}.p-r-xs{padding-right:var(--xsSpacing)!important}.m-r-sm{margin-right:var(--smSpacing)!important}.p-r-sm{padding-right:var(--smSpacing)!important}.m-r-lg{margin-right:var(--lgSpacing)!important}.p-r-lg{padding-right:var(--lgSpacing)!important}.m-r-xl{margin-right:var(--xlSpacing)!important}.p-r-xl{padding-right:var(--xlSpacing)!important}.m-b-auto{margin-bottom:auto!important}.p-b-auto{padding-bottom:auto!important}.m-b-base{margin-bottom:var(--baseSpacing)!important}.p-b-base{padding-bottom:var(--baseSpacing)!important}.m-b-xs{margin-bottom:var(--xsSpacing)!important}.p-b-xs{padding-bottom:var(--xsSpacing)!important}.m-b-sm{margin-bottom:var(--smSpacing)!important}.p-b-sm{padding-bottom:var(--smSpacing)!important}.m-b-lg{margin-bottom:var(--lgSpacing)!important}.p-b-lg{padding-bottom:var(--lgSpacing)!important}.m-b-xl{margin-bottom:var(--xlSpacing)!important}.p-b-xl{padding-bottom:var(--xlSpacing)!important}.m-l-auto{margin-left:auto!important}.p-l-auto{padding-left:auto!important}.m-l-base{margin-left:var(--baseSpacing)!important}.p-l-base{padding-left:var(--baseSpacing)!important}.m-l-xs{margin-left:var(--xsSpacing)!important}.p-l-xs{padding-left:var(--xsSpacing)!important}.m-l-sm{margin-left:var(--smSpacing)!important}.p-l-sm{padding-left:var(--smSpacing)!important}.m-l-lg{margin-left:var(--lgSpacing)!important}.p-l-lg{padding-left:var(--lgSpacing)!important}.m-l-xl{margin-left:var(--xlSpacing)!important}.p-l-xl{padding-left:var(--xlSpacing)!important}.m-0{margin:0!important}.p-0{padding:0!important}.m-t-0{margin-top:0!important}.p-t-0{padding-top:0!important}.m-r-0{margin-right:0!important}.p-r-0{padding-right:0!important}.m-b-0{margin-bottom:0!important}.p-b-0{padding-bottom:0!important}.m-l-0{margin-left:0!important}.p-l-0{padding-left:0!important}.m-5{margin:5px!important}.p-5{padding:5px!important}.m-t-5{margin-top:5px!important}.p-t-5{padding-top:5px!important}.m-r-5{margin-right:5px!important}.p-r-5{padding-right:5px!important}.m-b-5{margin-bottom:5px!important}.p-b-5{padding-bottom:5px!important}.m-l-5{margin-left:5px!important}.p-l-5{padding-left:5px!important}.m-10{margin:10px!important}.p-10{padding:10px!important}.m-t-10{margin-top:10px!important}.p-t-10{padding-top:10px!important}.m-r-10{margin-right:10px!important}.p-r-10{padding-right:10px!important}.m-b-10{margin-bottom:10px!important}.p-b-10{padding-bottom:10px!important}.m-l-10{margin-left:10px!important}.p-l-10{padding-left:10px!important}.m-15{margin:15px!important}.p-15{padding:15px!important}.m-t-15{margin-top:15px!important}.p-t-15{padding-top:15px!important}.m-r-15{margin-right:15px!important}.p-r-15{padding-right:15px!important}.m-b-15{margin-bottom:15px!important}.p-b-15{padding-bottom:15px!important}.m-l-15{margin-left:15px!important}.p-l-15{padding-left:15px!important}.m-20{margin:20px!important}.p-20{padding:20px!important}.m-t-20{margin-top:20px!important}.p-t-20{padding-top:20px!important}.m-r-20{margin-right:20px!important}.p-r-20{padding-right:20px!important}.m-b-20{margin-bottom:20px!important}.p-b-20{padding-bottom:20px!important}.m-l-20{margin-left:20px!important}.p-l-20{padding-left:20px!important}.m-25{margin:25px!important}.p-25{padding:25px!important}.m-t-25{margin-top:25px!important}.p-t-25{padding-top:25px!important}.m-r-25{margin-right:25px!important}.p-r-25{padding-right:25px!important}.m-b-25{margin-bottom:25px!important}.p-b-25{padding-bottom:25px!important}.m-l-25{margin-left:25px!important}.p-l-25{padding-left:25px!important}.m-30{margin:30px!important}.p-30{padding:30px!important}.m-t-30{margin-top:30px!important}.p-t-30{padding-top:30px!important}.m-r-30{margin-right:30px!important}.p-r-30{padding-right:30px!important}.m-b-30{margin-bottom:30px!important}.p-b-30{padding-bottom:30px!important}.m-l-30{margin-left:30px!important}.p-l-30{padding-left:30px!important}.m-35{margin:35px!important}.p-35{padding:35px!important}.m-t-35{margin-top:35px!important}.p-t-35{padding-top:35px!important}.m-r-35{margin-right:35px!important}.p-r-35{padding-right:35px!important}.m-b-35{margin-bottom:35px!important}.p-b-35{padding-bottom:35px!important}.m-l-35{margin-left:35px!important}.p-l-35{padding-left:35px!important}.m-40{margin:40px!important}.p-40{padding:40px!important}.m-t-40{margin-top:40px!important}.p-t-40{padding-top:40px!important}.m-r-40{margin-right:40px!important}.p-r-40{padding-right:40px!important}.m-b-40{margin-bottom:40px!important}.p-b-40{padding-bottom:40px!important}.m-l-40{margin-left:40px!important}.p-l-40{padding-left:40px!important}.m-45{margin:45px!important}.p-45{padding:45px!important}.m-t-45{margin-top:45px!important}.p-t-45{padding-top:45px!important}.m-r-45{margin-right:45px!important}.p-r-45{padding-right:45px!important}.m-b-45{margin-bottom:45px!important}.p-b-45{padding-bottom:45px!important}.m-l-45{margin-left:45px!important}.p-l-45{padding-left:45px!important}.m-50{margin:50px!important}.p-50{padding:50px!important}.m-t-50{margin-top:50px!important}.p-t-50{padding-top:50px!important}.m-r-50{margin-right:50px!important}.p-r-50{padding-right:50px!important}.m-b-50{margin-bottom:50px!important}.p-b-50{padding-bottom:50px!important}.m-l-50{margin-left:50px!important}.p-l-50{padding-left:50px!important}.m-55{margin:55px!important}.p-55{padding:55px!important}.m-t-55{margin-top:55px!important}.p-t-55{padding-top:55px!important}.m-r-55{margin-right:55px!important}.p-r-55{padding-right:55px!important}.m-b-55{margin-bottom:55px!important}.p-b-55{padding-bottom:55px!important}.m-l-55{margin-left:55px!important}.p-l-55{padding-left:55px!important}.m-60{margin:60px!important}.p-60{padding:60px!important}.m-t-60{margin-top:60px!important}.p-t-60{padding-top:60px!important}.m-r-60{margin-right:60px!important}.p-r-60{padding-right:60px!important}.m-b-60{margin-bottom:60px!important}.p-b-60{padding-bottom:60px!important}.m-l-60{margin-left:60px!important}.p-l-60{padding-left:60px!important}.no-min-width{min-width:0!important}.wrapper{position:relative;width:var(--wrapperWidth);margin:0 auto;max-width:100%}.wrapper.wrapper-sm{width:var(--smWrapperWidth)}.wrapper.wrapper-lg{width:var(--lgWrapperWidth)}.label{display:inline-flex;align-items:center;justify-content:center;gap:5px;line-height:1;padding:3px 8px;min-height:23px;text-align:center;font-size:var(--smFontSize);border-radius:30px;background:var(--baseAlt2Color);color:var(--txtPrimaryColor);white-space:nowrap}.label.label-sm{font-size:var(--xsFontSize);padding:3px 5px;min-height:18px;line-height:1}.label.label-primary{color:var(--baseColor);background:var(--primaryColor)}.label.label-info{background:var(--infoAltColor)}.label.label-success{background:var(--successAltColor)}.label.label-danger{background:var(--dangerAltColor)}.label.label-warning{background:var(--warningAltColor)}.thumb{--thumbSize: 44px;flex-shrink:0;position:relative;display:inline-flex;align-items:center;justify-content:center;line-height:1;width:var(--thumbSize);height:var(--thumbSize);background:var(--baseAlt2Color);border-radius:var(--baseRadius);color:var(--txtPrimaryColor);font-size:1.2rem;box-shadow:0 2px 5px 0 var(--shadowColor)}.thumb i{font-size:inherit}.thumb img{width:100%;height:100%;border-radius:inherit;overflow:hidden}.thumb.thumb-sm{--thumbSize: 32px;font-size:.85rem}.thumb.thumb-lg{--thumbSize: 60px;font-size:1.3rem}.thumb.thumb-xl{--thumbSize: 80px;font-size:1.5rem}.thumb.thumb-circle{border-radius:50%}.thumb.thumb-active{box-shadow:0 0 0 2px var(--primaryColor)}.section-title{display:flex;align-items:center;width:100%;column-gap:10px;row-gap:5px;margin:0 0 var(--xsSpacing);font-weight:600;font-size:var(--smFontSize);line-height:var(--smLineHeight);color:var(--txtHintColor);text-transform:uppercase}.drag-handle{outline:0;cursor:pointer;display:inline-flex;align-items:left;color:var(--txtDisabledColor);transition:color var(--baseAnimationSpeed)}.drag-handle:before,.drag-handle:after{content:"\ef77";font-family:var(--iconFontFamily);font-size:18px;line-height:1;width:7px;text-align:center}.drag-handle:focus-visible,.drag-handle:hover,.drag-handle:active{color:var(--txtPrimaryColor)}.logo{position:relative;vertical-align:top;display:inline-flex;align-items:center;gap:10px;font-size:23px;text-decoration:none;color:inherit;user-select:none}.logo strong{font-weight:700}.logo .version{position:absolute;right:0;top:-5px;line-height:1;font-size:10px;font-weight:400;padding:2px 4px;border-radius:var(--baseRadius);background:var(--dangerAltColor);color:var(--txtPrimaryColor)}.logo.logo-sm{font-size:20px}.loader{--loaderSize: 32px;position:relative;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;row-gap:10px;margin:0;color:var(--txtDisabledColor);text-align:center;font-weight:400}.loader:before{content:"\eec4";display:inline-block;vertical-align:top;clear:both;width:var(--loaderSize);height:var(--loaderSize);line-height:var(--loaderSize);font-size:var(--loaderSize);font-weight:400;font-family:var(--iconFontFamily);color:inherit;text-align:center;animation:loaderShow var(--baseAnimationSpeed),rotate .9s var(--baseAnimationSpeed) infinite linear}.loader.loader-primary{color:var(--primaryColor)}.loader.loader-info{color:var(--infoColor)}.loader.loader-info-alt{color:var(--infoAltColor)}.loader.loader-success{color:var(--successColor)}.loader.loader-success-alt{color:var(--successAltColor)}.loader.loader-danger{color:var(--dangerColor)}.loader.loader-danger-alt{color:var(--dangerAltColor)}.loader.loader-warning{color:var(--warningColor)}.loader.loader-warning-alt{color:var(--warningAltColor)}.loader.loader-sm{--loaderSize: 24px}.loader.loader-lg{--loaderSize: 42px}.skeleton-loader{position:relative;height:12px;margin:5px 0;border-radius:var(--baseRadius);background:var(--baseAlt1Color);animation:fadeIn .4s}.skeleton-loader:before{content:"";width:100%;height:100%;display:block;border-radius:inherit;background:linear-gradient(90deg,var(--baseAlt1Color) 8%,var(--bodyColor) 18%,var(--baseAlt1Color) 33%);background-size:200% 100%;animation:shine 1s linear infinite}.placeholder-section{display:flex;width:100%;align-items:center;justify-content:center;text-align:center;flex-direction:column;gap:var(--smSpacing);color:var(--txtHintColor)}.placeholder-section .icon{font-size:50px;height:50px;line-height:1;opacity:.3}.placeholder-section .icon i{font-size:inherit;vertical-align:top}.list{position:relative;border:1px solid var(--baseAlt2Color);border-radius:var(--baseRadius)}.list .list-item{word-break:break-word;position:relative;display:flex;align-items:center;width:100%;gap:10px;padding:10px;border-bottom:1px solid var(--baseAlt2Color)}.list .list-item:last-child{border-bottom:0}.entrance-top{animation:entranceTop var(--entranceAnimationSpeed)}.entrance-bottom{animation:entranceBottom var(--entranceAnimationSpeed)}.entrance-left{animation:entranceLeft var(--entranceAnimationSpeed)}.entrance-right{animation:entranceRight var(--entranceAnimationSpeed)}.grid{--gridGap: var(--baseSpacing);position:relative;display:flex;flex-grow:1;flex-wrap:wrap;row-gap:var(--gridGap);margin:0 calc(-.5 * var(--gridGap))}.grid.grid-center{align-items:center}.grid.grid-sm{--gridGap: var(--smSpacing)}.grid .form-field{margin-bottom:0}.grid>*{margin:0 calc(.5 * var(--gridGap))}.col-xxl-1,.col-xxl-2,.col-xxl-3,.col-xxl-4,.col-xxl-5,.col-xxl-6,.col-xxl-7,.col-xxl-8,.col-xxl-9,.col-xxl-10,.col-xxl-11,.col-xxl-12,.col-xl-1,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-10,.col-xl-11,.col-xl-12,.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-1,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-10,.col-11,.col-12{position:relative;width:100%;min-height:1px}.col-auto{flex:0 0 auto;width:auto}.col-12{width:calc(100% - var(--gridGap))}.col-11{width:calc(91.6666666667% - var(--gridGap))}.col-10{width:calc(83.3333333333% - var(--gridGap))}.col-9{width:calc(75% - var(--gridGap))}.col-8{width:calc(66.6666666667% - var(--gridGap))}.col-7{width:calc(58.3333333333% - var(--gridGap))}.col-6{width:calc(50% - var(--gridGap))}.col-5{width:calc(41.6666666667% - var(--gridGap))}.col-4{width:calc(33.3333333333% - var(--gridGap))}.col-3{width:calc(25% - var(--gridGap))}.col-2{width:calc(16.6666666667% - var(--gridGap))}.col-1{width:calc(8.3333333333% - var(--gridGap))}@media (min-width: 576px){.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-12{width:calc(100% - var(--gridGap))}.col-sm-11{width:calc(91.6666666667% - var(--gridGap))}.col-sm-10{width:calc(83.3333333333% - var(--gridGap))}.col-sm-9{width:calc(75% - var(--gridGap))}.col-sm-8{width:calc(66.6666666667% - var(--gridGap))}.col-sm-7{width:calc(58.3333333333% - var(--gridGap))}.col-sm-6{width:calc(50% - var(--gridGap))}.col-sm-5{width:calc(41.6666666667% - var(--gridGap))}.col-sm-4{width:calc(33.3333333333% - var(--gridGap))}.col-sm-3{width:calc(25% - var(--gridGap))}.col-sm-2{width:calc(16.6666666667% - var(--gridGap))}.col-sm-1{width:calc(8.3333333333% - var(--gridGap))}}@media (min-width: 768px){.col-md-auto{flex:0 0 auto;width:auto}.col-md-12{width:calc(100% - var(--gridGap))}.col-md-11{width:calc(91.6666666667% - var(--gridGap))}.col-md-10{width:calc(83.3333333333% - var(--gridGap))}.col-md-9{width:calc(75% - var(--gridGap))}.col-md-8{width:calc(66.6666666667% - var(--gridGap))}.col-md-7{width:calc(58.3333333333% - var(--gridGap))}.col-md-6{width:calc(50% - var(--gridGap))}.col-md-5{width:calc(41.6666666667% - var(--gridGap))}.col-md-4{width:calc(33.3333333333% - var(--gridGap))}.col-md-3{width:calc(25% - var(--gridGap))}.col-md-2{width:calc(16.6666666667% - var(--gridGap))}.col-md-1{width:calc(8.3333333333% - var(--gridGap))}}@media (min-width: 992px){.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-12{width:calc(100% - var(--gridGap))}.col-lg-11{width:calc(91.6666666667% - var(--gridGap))}.col-lg-10{width:calc(83.3333333333% - var(--gridGap))}.col-lg-9{width:calc(75% - var(--gridGap))}.col-lg-8{width:calc(66.6666666667% - var(--gridGap))}.col-lg-7{width:calc(58.3333333333% - var(--gridGap))}.col-lg-6{width:calc(50% - var(--gridGap))}.col-lg-5{width:calc(41.6666666667% - var(--gridGap))}.col-lg-4{width:calc(33.3333333333% - var(--gridGap))}.col-lg-3{width:calc(25% - var(--gridGap))}.col-lg-2{width:calc(16.6666666667% - var(--gridGap))}.col-lg-1{width:calc(8.3333333333% - var(--gridGap))}}@media (min-width: 1200px){.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-12{width:calc(100% - var(--gridGap))}.col-xl-11{width:calc(91.6666666667% - var(--gridGap))}.col-xl-10{width:calc(83.3333333333% - var(--gridGap))}.col-xl-9{width:calc(75% - var(--gridGap))}.col-xl-8{width:calc(66.6666666667% - var(--gridGap))}.col-xl-7{width:calc(58.3333333333% - var(--gridGap))}.col-xl-6{width:calc(50% - var(--gridGap))}.col-xl-5{width:calc(41.6666666667% - var(--gridGap))}.col-xl-4{width:calc(33.3333333333% - var(--gridGap))}.col-xl-3{width:calc(25% - var(--gridGap))}.col-xl-2{width:calc(16.6666666667% - var(--gridGap))}.col-xl-1{width:calc(8.3333333333% - var(--gridGap))}}@media (min-width: 1400px){.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-12{width:calc(100% - var(--gridGap))}.col-xxl-11{width:calc(91.6666666667% - var(--gridGap))}.col-xxl-10{width:calc(83.3333333333% - var(--gridGap))}.col-xxl-9{width:calc(75% - var(--gridGap))}.col-xxl-8{width:calc(66.6666666667% - var(--gridGap))}.col-xxl-7{width:calc(58.3333333333% - var(--gridGap))}.col-xxl-6{width:calc(50% - var(--gridGap))}.col-xxl-5{width:calc(41.6666666667% - var(--gridGap))}.col-xxl-4{width:calc(33.3333333333% - var(--gridGap))}.col-xxl-3{width:calc(25% - var(--gridGap))}.col-xxl-2{width:calc(16.6666666667% - var(--gridGap))}.col-xxl-1{width:calc(8.3333333333% - var(--gridGap))}}.app-tooltip{position:fixed;z-index:999999;top:0;left:0;display:inline-block;vertical-align:top;max-width:275px;padding:3px 5px;color:#fff;text-align:center;font-family:var(--baseFontFamily);font-size:var(--smFontSize);line-height:var(--smLineHeight);border-radius:var(--baseRadius);background:var(--tooltipColor);pointer-events:none;user-select:none;transition:opacity var(--baseAnimationSpeed),visibility var(--baseAnimationSpeed),transform var(--baseAnimationSpeed);transform:scale(.98);white-space:pre-line;opacity:0;visibility:hidden}.app-tooltip.code{font-family:monospace;white-space:pre-wrap;text-align:left;min-width:150px;max-width:340px}.app-tooltip.active{transform:scale(1);opacity:1;visibility:visible}.dropdown{position:absolute;z-index:99;right:0;left:auto;top:100%;cursor:default;display:inline-block;vertical-align:top;padding:5px;margin:5px 0 0;width:auto;min-width:140px;max-width:450px;max-height:330px;overflow-x:hidden;overflow-y:auto;background:var(--baseColor);border-radius:var(--baseRadius);border:1px solid var(--baseAlt2Color);box-shadow:0 2px 5px 0 var(--shadowColor)}.dropdown hr{margin:5px 0}.dropdown .dropdown-item{border:0;background:none;position:relative;outline:0;display:flex;align-items:center;column-gap:8px;width:100%;height:auto;min-height:0;text-align:left;padding:8px 10px;margin:0 0 5px;cursor:pointer;color:var(--txtPrimaryColor);font-weight:400;font-size:var(--baseFontSize);font-family:var(--baseFontFamily);line-height:var(--baseLineHeight);border-radius:var(--baseRadius);text-decoration:none;word-break:break-word;user-select:none;transition:background var(--baseAnimationSpeed),color var(--baseAnimationSpeed)}.dropdown .dropdown-item:last-child{margin-bottom:0}.dropdown .dropdown-item:focus,.dropdown .dropdown-item:hover{background:var(--baseAlt1Color)}.dropdown .dropdown-item.selected{background:var(--baseAlt2Color)}.dropdown .dropdown-item:active{transition-duration:var(--activeAnimationSpeed);background:var(--baseAlt2Color)}.dropdown .dropdown-item.disabled{color:var(--txtDisabledColor);background:none;pointer-events:none}.dropdown .dropdown-item.separator{cursor:default;background:none;text-transform:uppercase;padding-top:0;padding-bottom:0;margin-top:15px;color:var(--txtDisabledColor);font-weight:600;font-size:var(--smFontSize)}.dropdown.dropdown-upside{top:auto;bottom:100%;margin:0 0 5px}.dropdown.dropdown-left{right:auto;left:0}.dropdown.dropdown-center{right:auto;left:50%;transform:translate(-50%)}.dropdown.dropdown-sm{margin-top:5px;min-width:100px}.dropdown.dropdown-sm .dropdown-item{column-gap:7px;font-size:var(--smFontSize);margin:0 0 2px;padding:5px 7px}.dropdown.dropdown-sm .dropdown-item:last-child{margin-bottom:0}.dropdown.dropdown-sm.dropdown-upside{margin-top:0;margin-bottom:5px}.dropdown.dropdown-block{width:100%;min-width:130px;max-width:100%}.dropdown.dropdown-nowrap{white-space:nowrap}.overlay-panel{position:relative;z-index:1;display:flex;flex-direction:column;align-self:flex-end;margin-left:auto;background:var(--baseColor);height:100%;width:580px;max-width:100%;word-wrap:break-word;box-shadow:0 2px 5px 0 var(--shadowColor)}.overlay-panel .overlay-panel-section{position:relative;width:100%;margin:0;padding:var(--baseSpacing);transition:box-shadow var(--baseAnimationSpeed)}.overlay-panel .overlay-panel-section:empty{display:none}.overlay-panel .overlay-panel-section:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.overlay-panel .overlay-panel-section:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.overlay-panel .overlay-panel-section .btn{flex-grow:0}.overlay-panel img{max-width:100%}.overlay-panel .panel-header{position:relative;z-index:2;display:flex;flex-wrap:wrap;align-items:center;column-gap:10px;row-gap:var(--baseSpacing);padding:calc(var(--baseSpacing) - 7px) var(--baseSpacing)}.overlay-panel .panel-header>*{margin-top:0;margin-bottom:0}.overlay-panel .panel-header .btn-back{margin-left:-10px}.overlay-panel .panel-header .overlay-close{z-index:3;outline:0;position:absolute;right:100%;top:20px;margin:0;display:inline-flex;align-items:center;justify-content:center;width:35px;height:35px;cursor:pointer;text-align:center;font-size:1.6rem;line-height:1;border-radius:50% 0 0 50%;color:#fff;background:var(--primaryColor);opacity:.5;transition:opacity var(--baseAnimationSpeed);user-select:none}.overlay-panel .panel-header .overlay-close i{font-size:inherit}.overlay-panel .panel-header .overlay-close:hover,.overlay-panel .panel-header .overlay-close:focus-visible,.overlay-panel .panel-header .overlay-close:active{opacity:.7}.overlay-panel .panel-header .overlay-close:active{transition-duration:var(--activeAnimationSpeed);opacity:1}.overlay-panel .panel-header .btn-close{margin-right:-10px}.overlay-panel .panel-header .tabs-header{margin-bottom:-24px}.overlay-panel .panel-content{z-index:auto;flex-grow:1;overflow-x:hidden;overflow-y:auto;overflow-y:overlay;scroll-behavior:smooth}.overlay-panel .panel-header~.panel-content{padding-top:5px}.overlay-panel .panel-footer{z-index:2;column-gap:var(--smSpacing);display:flex;align-items:center;justify-content:flex-end;border-top:1px solid var(--baseAlt2Color);padding:calc(var(--baseSpacing) - 7px) var(--baseSpacing)}.overlay-panel.scrollable .panel-header{box-shadow:0 4px 5px #0000000d}.overlay-panel.scrollable .panel-footer{box-shadow:0 -4px 5px #0000000d}.overlay-panel.scrollable.scroll-top-reached .panel-header,.overlay-panel.scrollable.scroll-bottom-reached .panel-footer{box-shadow:none}.overlay-panel.overlay-panel-xl{width:850px}.overlay-panel.overlay-panel-lg{width:700px}.overlay-panel.overlay-panel-sm{width:460px}.overlay-panel.popup{height:auto;max-height:100%;align-self:center;border-radius:var(--baseRadius);margin:0 auto}.overlay-panel.popup .panel-footer{background:var(--bodyColor)}.overlay-panel.hide-content .panel-content{display:none}.overlay-panel.colored-header .panel-header{background:var(--bodyColor);border-bottom:1px solid var(--baseAlt1Color)}.overlay-panel.colored-header .panel-header .tabs-header{border-bottom:0}.overlay-panel.colored-header .panel-header .tabs-header .tab-item{border:1px solid transparent;border-bottom:0}.overlay-panel.colored-header .panel-header .tabs-header .tab-item:hover,.overlay-panel.colored-header .panel-header .tabs-header .tab-item:focus-visible{background:var(--baseAlt1Color)}.overlay-panel.colored-header .panel-header .tabs-header .tab-item:after{content:none;display:none}.overlay-panel.colored-header .panel-header .tabs-header .tab-item.active{background:var(--baseColor);border-color:var(--baseAlt1Color)}.overlay-panel.colored-header .panel-header~.panel-content{padding-top:calc(var(--baseSpacing) - 5px)}.overlay-panel.compact-header .panel-header{row-gap:var(--smSpacing)}.overlay-panel.full-width-popup{width:100%}.overlay-panel.image-preview{width:auto;min-width:300px;min-height:250px;max-width:70%;max-height:90%}.overlay-panel.image-preview .panel-header{position:absolute;z-index:99;box-shadow:none}.overlay-panel.image-preview .panel-header .overlay-close{left:100%;right:auto;border-radius:0 50% 50% 0}.overlay-panel.image-preview .panel-header .overlay-close i{margin-right:5px}.overlay-panel.image-preview .panel-header,.overlay-panel.image-preview .panel-footer{padding:10px 15px}.overlay-panel.image-preview .panel-content{padding:0;text-align:center;display:flex;align-items:center;justify-content:center}.overlay-panel.image-preview img{max-width:100%;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius)}@media (max-width: 900px){.overlay-panel .overlay-panel-section{padding:var(--smSpacing)}}.overlay-panel-container{display:flex;position:fixed;z-index:1000;flex-direction:row;align-items:center;top:0;left:0;width:100%;height:100%;overflow:hidden;margin:0;padding:0;outline:0}.overlay-panel-container .overlay{position:absolute;z-index:0;left:0;top:0;width:100%;height:100%;user-select:none;background:var(--overlayColor)}.overlay-panel-container.padded{padding:10px}.overlay-panel-wrapper{position:relative;z-index:1000;outline:0}.alert{position:relative;display:flex;column-gap:15px;align-items:center;width:100%;min-height:50px;max-width:100%;word-break:break-word;margin:0 0 var(--baseSpacing);border-radius:var(--baseRadius);padding:12px 15px;background:var(--baseAlt1Color);color:var(--txtAltColor)}.alert .content,.alert .form-field .help-block,.form-field .alert .help-block,.alert .panel,.alert .sub-panel,.alert .overlay-panel .panel-content,.overlay-panel .alert .panel-content{flex-grow:1}.alert .icon,.alert .close{display:inline-flex;align-items:center;justify-content:center;flex-grow:0;flex-shrink:0;text-align:center}.alert .icon{align-self:stretch;font-size:1.2em;padding-right:15px;font-weight:400;border-right:1px solid rgba(0,0,0,.05);color:var(--txtHintColor)}.alert .close{display:inline-flex;margin-right:-5px;width:30px;height:30px;outline:0;cursor:pointer;text-align:center;font-size:var(--smFontSize);line-height:30px;border-radius:30px;text-decoration:none;color:inherit;opacity:.5;transition:opacity var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.alert .close:hover,.alert .close:focus{opacity:1;background:rgba(255,255,255,.2)}.alert .close:active{opacity:1;background:rgba(255,255,255,.3);transition-duration:var(--activeAnimationSpeed)}.alert code,.alert hr{background:rgba(0,0,0,.1)}.alert.alert-info{background:var(--infoAltColor)}.alert.alert-info .icon{color:var(--infoColor)}.alert.alert-warning{background:var(--warningAltColor)}.alert.alert-warning .icon{color:var(--warningColor)}.alert.alert-success{background:var(--successAltColor)}.alert.alert-success .icon{color:var(--successColor)}.alert.alert-danger{background:var(--dangerAltColor)}.alert.alert-danger .icon{color:var(--dangerColor)}.toasts-wrapper{position:fixed;z-index:999999;bottom:0;left:0;right:0;padding:0 var(--smSpacing);width:auto;display:block;text-align:center;pointer-events:none}.toasts-wrapper .alert{text-align:left;pointer-events:auto;width:var(--smWrapperWidth);margin:var(--baseSpacing) auto;box-shadow:0 2px 5px 0 var(--shadowColor)}.app-sidebar~.app-body .toasts-wrapper{left:var(--appSidebarWidth)}.app-sidebar~.app-body .page-sidebar~.toasts-wrapper{left:calc(var(--appSidebarWidth) + var(--pageSidebarWidth))}button{outline:0;border:0;background:none;padding:0;text-align:left;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit}.btn{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;outline:0;border:0;margin:0;flex-shrink:0;cursor:pointer;padding:5px 20px;column-gap:7px;user-select:none;min-width:var(--btnHeight);min-height:var(--btnHeight);text-align:center;text-decoration:none;line-height:1;font-weight:600;color:#fff;font-size:var(--baseFontSize);font-family:var(--baseFontFamily);border-radius:var(--btnRadius);background:none;transition:color var(--baseAnimationSpeed)}.btn i{font-size:1.1428em;vertical-align:middle;display:inline-block}.btn:before{content:"";border-radius:inherit;position:absolute;left:0;top:0;z-index:-1;width:100%;height:100%;pointer-events:none;user-select:none;backface-visibility:hidden;background:var(--primaryColor);transition:filter var(--baseAnimationSpeed),opacity var(--baseAnimationSpeed),transform var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.btn:hover:before,.btn:focus-visible:before{opacity:.9}.btn.active,.btn:active{z-index:999}.btn.active:before,.btn:active:before{opacity:.8;transition-duration:var(--activeAnimationSpeed)}.btn.btn-info:before{background:var(--infoColor)}.btn.btn-info:hover:before,.btn.btn-info:focus-visible:before{opacity:.8}.btn.btn-info:active:before{opacity:.7}.btn.btn-success:before{background:var(--successColor)}.btn.btn-success:hover:before,.btn.btn-success:focus-visible:before{opacity:.8}.btn.btn-success:active:before{opacity:.7}.btn.btn-danger:before{background:var(--dangerColor)}.btn.btn-danger:hover:before,.btn.btn-danger:focus-visible:before{opacity:.8}.btn.btn-danger:active:before{opacity:.7}.btn.btn-warning:before{background:var(--warningColor)}.btn.btn-warning:hover:before,.btn.btn-warning:focus-visible:before{opacity:.8}.btn.btn-warning:active:before{opacity:.7}.btn.btn-hint:before{background:var(--baseAlt4Color)}.btn.btn-hint:hover:before,.btn.btn-hint:focus-visible:before{opacity:.8}.btn.btn-hint:active:before{opacity:.7}.btn.btn-outline{border:2px solid currentColor;background:#fff}.btn.btn-secondary,.btn.btn-outline{box-shadow:none;color:var(--txtPrimaryColor)}.btn.btn-secondary:before,.btn.btn-outline:before{opacity:0;background:var(--baseAlt4Color)}.btn.btn-secondary:focus-visible:before,.btn.btn-secondary:hover:before,.btn.btn-secondary:active:before,.btn.btn-secondary.active:before,.btn.btn-outline:focus-visible:before,.btn.btn-outline:hover:before,.btn.btn-outline:active:before,.btn.btn-outline.active:before{opacity:.11}.btn.btn-secondary.active:before,.btn.btn-secondary:active:before,.btn.btn-outline.active:before,.btn.btn-outline:active:before{opacity:.22}.btn.btn-secondary.btn-info,.btn.btn-outline.btn-info{color:var(--infoColor)}.btn.btn-secondary.btn-info:before,.btn.btn-outline.btn-info:before{background:var(--infoColor)}.btn.btn-secondary.btn-success,.btn.btn-outline.btn-success{color:var(--successColor)}.btn.btn-secondary.btn-success:before,.btn.btn-outline.btn-success:before{background:var(--successColor)}.btn.btn-secondary.btn-danger,.btn.btn-outline.btn-danger{color:var(--dangerColor)}.btn.btn-secondary.btn-danger:before,.btn.btn-outline.btn-danger:before{background:var(--dangerColor)}.btn.btn-secondary.btn-warning,.btn.btn-outline.btn-warning{color:var(--warningColor)}.btn.btn-secondary.btn-warning:before,.btn.btn-outline.btn-warning:before{background:var(--warningColor)}.btn.btn-secondary.btn-hint,.btn.btn-outline.btn-hint{color:var(--baseAlt4Color)}.btn.btn-secondary.btn-hint:before,.btn.btn-outline.btn-hint:before{background:var(--baseAlt4Color)}.btn.btn-secondary.btn-hint,.btn.btn-outline.btn-hint{color:var(--txtHintColor)}.btn.btn-disabled,.btn[disabled]{box-shadow:none;cursor:default;background:var(--baseAlt2Color);color:var(--txtDisabledColor)!important}.btn.btn-disabled:before,.btn[disabled]:before{display:none}.btn.btn-disabled.btn-secondary,.btn[disabled].btn-secondary{background:none}.btn.btn-disabled.btn-outline,.btn[disabled].btn-outline{border-color:var(--baseAlt2Color)}.btn.btn-expanded{min-width:140px}.btn.btn-expanded-sm{min-width:90px}.btn.btn-expanded-lg{min-width:170px}.btn.btn-lg{column-gap:10px;font-size:var(--lgFontSize);min-height:var(--lgBtnHeight);min-width:var(--lgBtnHeight);padding-left:30px;padding-right:30px}.btn.btn-lg i{font-size:1.2666em}.btn.btn-lg.btn-expanded{min-width:240px}.btn.btn-lg.btn-expanded-sm{min-width:160px}.btn.btn-lg.btn-expanded-lg{min-width:300px}.btn.btn-sm,.btn.btn-xs{column-gap:5px;font-size:var(--smFontSize);min-height:var(--smBtnHeight);min-width:var(--smBtnHeight);padding-left:12px;padding-right:12px}.btn.btn-sm i,.btn.btn-xs i{font-size:1rem}.btn.btn-sm.btn-expanded,.btn.btn-xs.btn-expanded{min-width:100px}.btn.btn-sm.btn-expanded-sm,.btn.btn-xs.btn-expanded-sm{min-width:80px}.btn.btn-sm.btn-expanded-lg,.btn.btn-xs.btn-expanded-lg{min-width:130px}.btn.btn-xs{min-width:var(--xsBtnHeight);min-height:var(--xsBtnHeight)}.btn.btn-block{display:flex;width:100%}.btn.btn-circle{border-radius:50%;padding:0;gap:0}.btn.btn-circle i{font-size:1.2857rem;text-align:center;width:24px;height:24px;line-height:24px}.btn.btn-circle i:before{margin:0;display:block}.btn.btn-circle.btn-sm i,.btn.btn-circle.btn-xs i{font-size:1.1rem}.btn.btn-loading{--loaderSize: 24px;cursor:default;pointer-events:none}.btn.btn-loading:after{content:"\eec4";position:absolute;display:inline-block;vertical-align:top;left:50%;top:50%;width:var(--loaderSize);height:var(--loaderSize);line-height:var(--loaderSize);font-size:var(--loaderSize);color:inherit;text-align:center;font-weight:400;margin-left:calc(var(--loaderSize) * -.5);margin-top:calc(var(--loaderSize) * -.5);font-family:var(--iconFontFamily);animation:loaderShow var(--baseAnimationSpeed),rotate .9s var(--baseAnimationSpeed) infinite linear}.btn.btn-loading>*{opacity:0;transform:scale(.9)}.btn.btn-loading.btn-sm,.btn.btn-loading.btn-xs{--loaderSize: 20px}.btn.btn-loading.btn-lg{--loaderSize: 28px}.btn.btn-prev i,.btn.btn-next i{transition:transform var(--baseAnimationSpeed)}.btn.btn-prev:hover i,.btn.btn-prev:focus-within i,.btn.btn-next:hover i,.btn.btn-next:focus-within i{transform:translate(3px)}.btn.btn-prev:hover i,.btn.btn-prev:focus-within i{transform:translate(-3px)}.btns-group{display:inline-flex;align-items:center;gap:var(--xsSpacing)}.code-editor,.select .selected-container,input,select,textarea{display:block;width:100%;outline:0;border:0;margin:0;background:none;padding:5px 10px;line-height:20px;min-width:0;min-height:var(--inputHeight);background:var(--baseAlt1Color);color:var(--txtPrimaryColor);font-size:var(--baseFontSize);font-family:var(--baseFontFamily);font-weight:400;border-radius:var(--baseRadius);overflow:auto;overflow:overlay}.code-editor::placeholder,.select .selected-container::placeholder,input::placeholder,select::placeholder,textarea::placeholder{color:var(--txtDisabledColor)}@media screen and (min-width: 550px){.code-editor:focus,.select .selected-container:focus,input:focus,select:focus,textarea:focus,.code-editor:focus-within,.select .selected-container:focus-within,input:focus-within,select:focus-within,textarea:focus-within{scrollbar-color:var(--baseAlt3Color) transparent;scrollbar-width:thin;scroll-behavior:smooth}.code-editor:focus::-webkit-scrollbar,.select .selected-container:focus::-webkit-scrollbar,input:focus::-webkit-scrollbar,select:focus::-webkit-scrollbar,textarea:focus::-webkit-scrollbar,.code-editor:focus-within::-webkit-scrollbar,.select .selected-container:focus-within::-webkit-scrollbar,input:focus-within::-webkit-scrollbar,select:focus-within::-webkit-scrollbar,textarea:focus-within::-webkit-scrollbar{width:8px;height:8px;border-radius:var(--baseRadius)}.code-editor:focus::-webkit-scrollbar-track,.select .selected-container:focus::-webkit-scrollbar-track,input:focus::-webkit-scrollbar-track,select:focus::-webkit-scrollbar-track,textarea:focus::-webkit-scrollbar-track,.code-editor:focus-within::-webkit-scrollbar-track,.select .selected-container:focus-within::-webkit-scrollbar-track,input:focus-within::-webkit-scrollbar-track,select:focus-within::-webkit-scrollbar-track,textarea:focus-within::-webkit-scrollbar-track{background:transparent;border-radius:var(--baseRadius)}.code-editor:focus::-webkit-scrollbar-thumb,.select .selected-container:focus::-webkit-scrollbar-thumb,input:focus::-webkit-scrollbar-thumb,select:focus::-webkit-scrollbar-thumb,textarea:focus::-webkit-scrollbar-thumb,.code-editor:focus-within::-webkit-scrollbar-thumb,.select .selected-container:focus-within::-webkit-scrollbar-thumb,input:focus-within::-webkit-scrollbar-thumb,select:focus-within::-webkit-scrollbar-thumb,textarea:focus-within::-webkit-scrollbar-thumb{background-color:var(--baseAlt3Color);border-radius:15px;border:2px solid transparent;background-clip:padding-box}.code-editor:focus::-webkit-scrollbar-thumb:hover,.select .selected-container:focus::-webkit-scrollbar-thumb:hover,input:focus::-webkit-scrollbar-thumb:hover,select:focus::-webkit-scrollbar-thumb:hover,textarea:focus::-webkit-scrollbar-thumb:hover,.code-editor:focus::-webkit-scrollbar-thumb:active,.select .selected-container:focus::-webkit-scrollbar-thumb:active,input:focus::-webkit-scrollbar-thumb:active,select:focus::-webkit-scrollbar-thumb:active,textarea:focus::-webkit-scrollbar-thumb:active,.code-editor:focus-within::-webkit-scrollbar-thumb:hover,.select .selected-container:focus-within::-webkit-scrollbar-thumb:hover,input:focus-within::-webkit-scrollbar-thumb:hover,select:focus-within::-webkit-scrollbar-thumb:hover,textarea:focus-within::-webkit-scrollbar-thumb:hover,.code-editor:focus-within::-webkit-scrollbar-thumb:active,.select .selected-container:focus-within::-webkit-scrollbar-thumb:active,input:focus-within::-webkit-scrollbar-thumb:active,select:focus-within::-webkit-scrollbar-thumb:active,textarea:focus-within::-webkit-scrollbar-thumb:active{background-color:var(--baseAlt4Color)}}.code-editor:focus,.select .selected-container:focus,input:focus,select:focus,textarea:focus,.active.code-editor,.select .active.selected-container,input.active,select.active,textarea.active{border-color:var(--primaryColor)}[readonly].code-editor,.select [readonly].selected-container,input[readonly],select[readonly],textarea[readonly],.readonly.code-editor,.select .readonly.selected-container,input.readonly,select.readonly,textarea.readonly{cursor:default;color:var(--txtHintColor)}[disabled].code-editor,.select [disabled].selected-container,input[disabled],select[disabled],textarea[disabled],.disabled.code-editor,.select .disabled.selected-container,input.disabled,select.disabled,textarea.disabled{cursor:default;color:var(--txtDisabledColor);border-color:var(--baseAlt2Color)}.txt-mono.code-editor,.select .txt-mono.selected-container,input.txt-mono,select.txt-mono,textarea.txt-mono{line-height:var(--smLineHeight)}.code.code-editor,.select .code.selected-container,input.code,select.code,textarea.code{font-size:15px;line-height:1.379rem;font-family:var(--monospaceFontFamily)}input{height:var(--inputHeight)}input:-webkit-autofill{-webkit-text-fill-color:var(--txtPrimaryColor);-webkit-box-shadow:inset 0 0 0 50px var(--baseAlt1Color)}.form-field:focus-within input:-webkit-autofill,input:-webkit-autofill:focus{-webkit-box-shadow:inset 0 0 0 50px var(--baseAlt2Color)}input[type=file]{padding:9px}input[type=checkbox],input[type=radio]{width:auto;height:auto;display:inline}input[type=number]{-moz-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}textarea{min-height:80px;resize:vertical}select{padding-left:8px}.form-field{--hPadding: 15px;position:relative;display:block;width:100%;margin-bottom:var(--baseSpacing)}.form-field .code-editor,.form-field .select .selected-container,.select .form-field .selected-container,.form-field input,.form-field select,.form-field textarea{z-index:0;padding-left:var(--hPadding);padding-right:var(--hPadding)}.form-field select{padding-left:8px}.form-field label{display:flex;width:100%;column-gap:5px;align-items:center;user-select:none;font-weight:600;color:var(--txtHintColor);font-size:var(--xsFontSize);text-transform:uppercase;line-height:1;padding-top:12px;padding-bottom:2px;padding-left:var(--hPadding);padding-right:var(--hPadding);border:0;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius)}.form-field label~.code-editor,.form-field .select label~.selected-container,.select .form-field label~.selected-container,.form-field label~input,.form-field label~select,.form-field label~textarea{border-top:0;padding-top:2px;padding-bottom:8px;border-top-left-radius:0;border-top-right-radius:0}.form-field label i{font-size:.96rem;line-height:1;margin-top:-2px;margin-bottom:-2px}.form-field .code-editor,.form-field .select .selected-container,.select .form-field .selected-container,.form-field input,.form-field select,.form-field textarea,.form-field label{background:var(--baseAlt1Color);transition:color var(--baseAnimationSpeed),background var(--baseAnimationSpeed),box-shadow var(--baseAnimationSpeed)}.form-field:focus-within .code-editor,.form-field:focus-within .select .selected-container,.select .form-field:focus-within .selected-container,.form-field:focus-within input,.form-field:focus-within select,.form-field:focus-within textarea,.form-field:focus-within label{background:var(--baseAlt2Color)}.form-field:focus-within label{color:var(--txtPrimaryColor)}.form-field .form-field-addon{position:absolute;display:inline-flex;align-items:center;z-index:1;top:0px;right:var(--hPadding);min-height:var(--inputHeight);color:var(--txtHintColor)}.form-field .form-field-addon .btn{margin-right:-5px}.form-field .form-field-addon~.code-editor,.form-field .select .form-field-addon~.selected-container,.select .form-field .form-field-addon~.selected-container,.form-field .form-field-addon~input,.form-field .form-field-addon~select,.form-field .form-field-addon~textarea{padding-right:35px}.form-field label~.form-field-addon{min-height:calc(26px + var(--inputHeight))}.form-field .help-block{margin-top:8px;font-size:var(--smFontSize);line-height:var(--smLineHeight);color:var(--txtHintColor);word-break:break-word}.form-field .help-block pre{white-space:pre-wrap}.form-field .help-block-error{color:var(--dangerColor)}.form-field.error>label,.form-field.invalid>label{color:var(--dangerColor)}.form-field.invalid label,.form-field.invalid .code-editor,.form-field.invalid .select .selected-container,.select .form-field.invalid .selected-container,.form-field.invalid input,.form-field.invalid select,.form-field.invalid textarea{background:var(--dangerAltColor)}.form-field.required:not(.form-field-toggle)>label:after{content:"*";color:var(--dangerColor);margin-top:-2px;margin-left:-2px}.form-field.disabled>label{color:var(--txtDisabledColor)}.form-field.disabled label,.form-field.disabled .code-editor,.form-field.disabled .select .selected-container,.select .form-field.disabled .selected-container,.form-field.disabled input,.form-field.disabled select,.form-field.disabled textarea{border-color:var(--baseAlt2Color)}.form-field.disabled.required>label:after{opacity:.5}.form-field input[type=radio],.form-field input[type=checkbox]{position:absolute;z-index:-1;left:0;width:0;height:0;min-height:0;min-width:0;border:0;background:none;user-select:none;pointer-events:none;box-shadow:none;opacity:0}.form-field input[type=radio]~label,.form-field input[type=checkbox]~label{border:0;margin:0;outline:0;background:none;display:inline-flex;vertical-align:top;align-items:center;width:auto;column-gap:5px;user-select:none;padding:0 0 0 27px;line-height:20px;min-height:20px;font-weight:400;font-size:var(--baseFontSize);text-transform:none;color:var(--txtPrimaryColor)}.form-field input[type=radio]~label:before,.form-field input[type=checkbox]~label:before{content:"";display:inline-block;vertical-align:top;position:absolute;z-index:0;left:0;top:0;width:20px;height:20px;line-height:16px;font-family:var(--iconFontFamily);font-size:1.2rem;text-align:center;color:var(--baseColor);cursor:pointer;background:var(--baseColor);border-radius:var(--baseRadius);border:2px solid var(--baseAlt3Color);transition:transform var(--baseAnimationSpeed),border-color var(--baseAnimationSpeed),color var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.form-field input[type=radio]~label:active:before,.form-field input[type=checkbox]~label:active:before{transform:scale(.9)}.form-field input[type=radio]:focus~label:before,.form-field input[type=radio]~label:hover:before,.form-field input[type=checkbox]:focus~label:before,.form-field input[type=checkbox]~label:hover:before{border-color:var(--baseAlt4Color)}.form-field input[type=radio]:checked~label:before,.form-field input[type=checkbox]:checked~label:before{content:"\eb7a";box-shadow:none;mix-blend-mode:unset;background:var(--successColor);border-color:var(--successColor)}.form-field input[type=radio]:disabled~label,.form-field input[type=checkbox]:disabled~label{pointer-events:none;cursor:not-allowed;color:var(--txtDisabledColor)}.form-field input[type=radio]:disabled~label:before,.form-field input[type=checkbox]:disabled~label:before{opacity:.5}.form-field input[type=radio]~label:before{border-radius:50%;font-size:1rem}.form-field .form-field-block{position:relative;margin:0 0 var(--xsSpacing)}.form-field .form-field-block:last-child{margin-bottom:0}.form-field.form-field-toggle input[type=radio]~label,.form-field.form-field-toggle input[type=checkbox]~label{position:relative}.form-field.form-field-toggle input[type=radio]~label:before,.form-field.form-field-toggle input[type=checkbox]~label:before{content:"";border:0;box-shadow:none;background:var(--baseAlt3Color);transition:background var(--activeAnimationSpeed)}.form-field.form-field-toggle input[type=radio]~label:after,.form-field.form-field-toggle input[type=checkbox]~label:after{content:"";position:absolute;z-index:1;cursor:pointer;background:var(--baseColor);transition:left var(--activeAnimationSpeed),transform var(--activeAnimationSpeed),background var(--activeAnimationSpeed);box-shadow:0 2px 5px 0 var(--shadowColor)}.form-field.form-field-toggle input[type=radio]~label:active:before,.form-field.form-field-toggle input[type=checkbox]~label:active:before{transform:none}.form-field.form-field-toggle input[type=radio]~label:active:after,.form-field.form-field-toggle input[type=checkbox]~label:active:after{transform:scale(.9)}.form-field.form-field-toggle input[type=radio]:focus-visible~label:before,.form-field.form-field-toggle input[type=checkbox]:focus-visible~label:before{box-shadow:0 0 0 2px var(--baseAlt2Color)}.form-field.form-field-toggle input[type=radio]~label:hover:before,.form-field.form-field-toggle input[type=checkbox]~label:hover:before{background:var(--baseAlt4Color)}.form-field.form-field-toggle input[type=radio]:checked~label:before,.form-field.form-field-toggle input[type=checkbox]:checked~label:before{background:var(--successColor)}.form-field.form-field-toggle input[type=radio]:checked~label:after,.form-field.form-field-toggle input[type=checkbox]:checked~label:after{background:var(--baseColor)}.form-field.form-field-toggle input[type=radio]~label,.form-field.form-field-toggle input[type=checkbox]~label{min-height:24px;padding-left:47px}.form-field.form-field-toggle input[type=radio]~label:empty,.form-field.form-field-toggle input[type=checkbox]~label:empty{padding-left:40px}.form-field.form-field-toggle input[type=radio]~label:before,.form-field.form-field-toggle input[type=checkbox]~label:before{width:40px;height:24px;border-radius:24px}.form-field.form-field-toggle input[type=radio]~label:after,.form-field.form-field-toggle input[type=checkbox]~label:after{top:4px;left:4px;width:16px;height:16px;border-radius:16px}.form-field.form-field-toggle input[type=radio]:checked~label:after,.form-field.form-field-toggle input[type=checkbox]:checked~label:after{left:20px}.form-field.form-field-toggle.form-field-sm input[type=radio]~label,.form-field.form-field-toggle.form-field-sm input[type=checkbox]~label{min-height:20px;padding-left:39px}.form-field.form-field-toggle.form-field-sm input[type=radio]~label:empty,.form-field.form-field-toggle.form-field-sm input[type=checkbox]~label:empty{padding-left:32px}.form-field.form-field-toggle.form-field-sm input[type=radio]~label:before,.form-field.form-field-toggle.form-field-sm input[type=checkbox]~label:before{width:32px;height:20px;border-radius:20px}.form-field.form-field-toggle.form-field-sm input[type=radio]~label:after,.form-field.form-field-toggle.form-field-sm input[type=checkbox]~label:after{top:4px;left:4px;width:12px;height:12px;border-radius:12px}.form-field.form-field-toggle.form-field-sm input[type=radio]:checked~label:after,.form-field.form-field-toggle.form-field-sm input[type=checkbox]:checked~label:after{left:16px}.form-field-group{display:flex;width:100%;align-items:center}.form-field-group>.form-field{flex-grow:1;border-left:1px solid var(--baseAlt2Color)}.form-field-group>.form-field:first-child{border-left:0}.form-field-group>.form-field:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.form-field-group>.form-field:not(:first-child)>label{border-top-left-radius:0}.form-field-group>.form-field:not(:first-child)>.code-editor,.select .form-field-group>.form-field:not(:first-child)>.selected-container,.form-field-group>.form-field:not(:first-child)>input,.form-field-group>.form-field:not(:first-child)>select,.form-field-group>.form-field:not(:first-child)>textarea,.form-field-group>.form-field:not(:first-child)>.select .selected-container{border-bottom-left-radius:0}.form-field-group>.form-field:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.form-field-group>.form-field:not(:last-child)>label{border-top-right-radius:0}.form-field-group>.form-field:not(:last-child)>.code-editor,.select .form-field-group>.form-field:not(:last-child)>.selected-container,.form-field-group>.form-field:not(:last-child)>input,.form-field-group>.form-field:not(:last-child)>select,.form-field-group>.form-field:not(:last-child)>textarea,.form-field-group>.form-field:not(:last-child)>.select .selected-container{border-bottom-right-radius:0}.form-field-group .form-field.col-12{width:100%}.form-field-group .form-field.col-11{width:91.6666666667%}.form-field-group .form-field.col-10{width:83.3333333333%}.form-field-group .form-field.col-9{width:75%}.form-field-group .form-field.col-8{width:66.6666666667%}.form-field-group .form-field.col-7{width:58.3333333333%}.form-field-group .form-field.col-6{width:50%}.form-field-group .form-field.col-5{width:41.6666666667%}.form-field-group .form-field.col-4{width:33.3333333333%}.form-field-group .form-field.col-3{width:25%}.form-field-group .form-field.col-2{width:16.6666666667%}.form-field-group .form-field.col-1{width:8.3333333333%}.select{position:relative;display:block;outline:0}.select .option{user-select:none;column-gap:8px}.select .option .icon{min-width:20px;text-align:center;line-height:inherit}.select .option .icon i{vertical-align:middle;line-height:inherit}.select .txt-placeholder{color:var(--txtHintColor)}label~.select .selected-container{border-top:0}.select .selected-container{position:relative;display:flex;flex-wrap:wrap;width:100%;align-items:center;padding-top:0;padding-bottom:0;padding-right:35px!important;user-select:none}.select .selected-container:after{content:"\ea4d";position:absolute;right:5px;top:50%;width:20px;height:20px;line-height:20px;text-align:center;margin-top:-10px;display:inline-block;vertical-align:top;font-size:1rem;font-family:var(--iconFontFamily);align-self:flex-end;color:var(--txtHintColor);transition:color var(--baseAnimationSpeed),transform var(--baseAnimationSpeed)}.select .selected-container:active,.select .selected-container.active{border-bottom-left-radius:0;border-bottom-right-radius:0}.select .selected-container:active:after,.select .selected-container.active:after{color:var(--txtPrimaryColor);transform:rotate(180deg)}.select .selected-container .option{display:flex;width:100%;align-items:center;max-width:100%;user-select:text}.select .selected-container .clear{margin-left:auto;cursor:pointer;color:var(--txtHintColor);transition:color var(--baseAnimationSpeed)}.select .selected-container .clear i{display:inline-block;vertical-align:middle;line-height:1}.select .selected-container .clear:hover{color:var(--txtPrimaryColor)}.select.multiple .selected-container{display:flex;align-items:center;padding-left:2px;row-gap:3px;column-gap:4px}.select.multiple .selected-container .txt-placeholder{margin-left:5px}.select.multiple .selected-container .option{display:inline-flex;width:auto;padding:3px 5px;line-height:1;border-radius:var(--baseRadius);background:var(--baseColor)}.select:not(.multiple) .selected-container .label{margin-left:-2px}.select:not(.multiple) .selected-container .option .txt{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:100%;line-height:normal}.select:not(.multiple) .selected-container:hover{cursor:pointer}.select.disabled{color:var(--txtDisabledColor);pointer-events:none}.select.disabled .txt-placeholder,.select.disabled .selected-container{color:inherit}.select.disabled .selected-container .link-hint{pointer-events:auto}.select.disabled .selected-container *:not(.link-hint){color:inherit!important}.select.disabled .selected-container:after,.select.disabled .selected-container .clear{display:none}.select.disabled .selected-container:hover{cursor:inherit}.select .txt-missing{color:var(--txtHintColor);padding:5px 12px;margin:0}.select .options-dropdown{max-height:none;border:0;overflow:auto;border-top-left-radius:0;border-top-right-radius:0;margin-top:-2px;box-shadow:0 2px 5px 0 var(--shadowColor),inset 0 0 0 2px var(--baseAlt2Color)}.select .options-dropdown .input-group:focus-within{box-shadow:none}.select .options-dropdown .form-field.options-search{margin:0 0 5px;padding:0 0 2px;color:var(--txtHintColor);border-bottom:1px solid var(--baseAlt2Color)}.select .options-dropdown .form-field.options-search .input-group{border-radius:0;padding:0 0 0 10px;margin:0;background:none;column-gap:0;border:0}.select .options-dropdown .form-field.options-search input{border:0;padding-left:9px;padding-right:9px;background:none}.select .options-dropdown .options-list{overflow:auto;max-height:270px;width:auto;margin-left:0;margin-right:-5px;padding-right:5px}.select .options-list:not(:empty)~[slot=afterOptions]:not(:empty){margin:5px -5px -5px}.select .options-list:not(:empty)~[slot=afterOptions]:not(:empty) .btn-block{border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:var(--baseRadius);border-bottom-right-radius:var(--baseRadius)}label~.select .selected-container{padding-bottom:4px;border-top-left-radius:0;border-top-right-radius:0}label~.select.multiple .selected-container{padding-top:3px;padding-bottom:3px;padding-left:10px}.select.block-options.multiple .selected-container .option{width:100%;box-shadow:0 2px 5px 0 var(--shadowColor)}.field-type-select .options-dropdown{padding:2px}.field-type-select .options-dropdown .form-field.options-search{margin:0}.field-type-select .options-dropdown .options-list{max-height:490px;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;margin:0;padding:0}.field-type-select .options-dropdown .dropdown-item{width:50%;flex-grow:1;margin:0;padding-left:12px;border-radius:0;border-bottom:1px solid var(--baseAlt2Color)}.field-type-select .options-dropdown .dropdown-item:nth-child(2n){border-left:1px solid var(--baseAlt2Color)}.field-type-select .options-dropdown .dropdown-item:nth-last-child(-n+2){border-bottom:0}.field-type-select .options-dropdown .dropdown-item.selected{background:var(--baseAlt1Color)}.form-field-file label{border-bottom:0}.form-field-file .filename{align-items:center;max-width:100%;min-width:0;margin-right:auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.form-field-file .filename i{text-decoration:none}.form-field-file .files-list{padding-top:5px;background:var(--baseAlt1Color);border:0;border-bottom-left-radius:var(--baseRadius);border-bottom-right-radius:var(--baseRadius);transition:background var(--baseAnimationSpeed)}.form-field-file .files-list .list-item{display:flex;width:100%;align-items:center;row-gap:10px;column-gap:var(--xsSpacing);padding:10px 15px;min-height:44px;border-top:1px solid var(--baseAlt2Color)}.form-field-file .files-list .list-item:last-child{border-radius:inherit;border-bottom:0}.form-field-file .files-list .btn-list-item{padding:5px}.form-field-file:focus-within .files-list,.form-field-file:focus-within label{background:var(--baseAlt1Color)}.form-field label~.code-editor{padding-bottom:6px;padding-top:4px}.code-editor .cm-editor{border:0!important;outline:none!important}.code-editor .cm-editor .cm-line{padding-left:0;padding-right:0}.code-editor .cm-editor .cm-tooltip-autocomplete{box-shadow:0 2px 5px 0 var(--shadowColor);border-radius:var(--baseRadius);background:var(--baseColor);border:0;z-index:9999;padding:0 3px;font-size:.92rem}.code-editor .cm-editor .cm-tooltip-autocomplete ul{margin:0;border-radius:inherit}.code-editor .cm-editor .cm-tooltip-autocomplete ul>:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.code-editor .cm-editor .cm-tooltip-autocomplete ul>:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.code-editor .cm-editor .cm-tooltip-autocomplete ul li[aria-selected]{background:var(--infoColor)}.code-editor .cm-editor .cm-scroller{outline:0!important;font-family:var(--monospaceFontFamily);font-size:var(--baseFontSize);line-height:var(--baseLineHeight)}.code-editor .cm-editor .cm-cursorLayer .cm-cursor{margin-left:0!important}.code-editor .cm-editor .cm-placeholder{color:var(--txtDisabledColor);font-family:var(--monospaceFontFamily);font-size:var(--baseFontSize);line-height:var(--baseLineHeight)}.code-editor .cm-editor .cm-selectionMatch{background:var(--infoAltColor)}.code-editor .cm-editor.cm-focused .cm-matchingBracket{background-color:#328c821a}.main-menu{--menuItemSize: 45px;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:var(--smSpacing);font-size:var(--xlFontSize);color:var(--txtPrimaryColor)}.main-menu i{font-size:24px;line-height:1}.main-menu .menu-item{position:relative;outline:0;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;text-align:center;justify-content:center;user-select:none;color:inherit;min-width:var(--menuItemSize);min-height:var(--menuItemSize);border:2px solid transparent;border-radius:var(--lgRadius);transition:background var(--baseAnimationSpeed),border var(--baseAnimationSpeed)}.main-menu .menu-item:focus-visible,.main-menu .menu-item:hover{background:var(--baseAlt1Color)}.main-menu .menu-item:active{background:var(--baseAlt2Color);transition-duration:var(--activeAnimationSpeed)}.main-menu .menu-item.active,.main-menu .menu-item.current-route{background:var(--baseColor);border-color:var(--primaryColor)}.app-sidebar{position:relative;z-index:1;display:flex;flex-grow:0;flex-shrink:0;flex-direction:column;align-items:center;width:var(--appSidebarWidth);padding:var(--smSpacing) 0px var(--smSpacing);background:var(--baseColor);border-right:1px solid var(--baseAlt2Color)}.app-sidebar .main-menu{flex-grow:1;justify-content:flex-start;overflow-x:hidden;overflow-y:auto;overflow-y:overlay;margin-top:34px;margin-bottom:var(--baseSpacing)}.app-layout{display:flex;width:100%;height:100vh}.app-layout .app-body{flex-grow:1;min-width:0;height:100%;display:flex;align-items:stretch}.app-layout .app-sidebar~.app-body{min-width:650px}.page-sidebar{--sidebarListItemMargin: 10px;z-index:0;display:flex;flex-direction:column;width:var(--pageSidebarWidth);flex-shrink:0;flex-grow:0;overflow-x:hidden;overflow-y:auto;background:var(--baseColor);padding:calc(var(--baseSpacing) - 5px) 0 var(--smSpacing);border-right:1px solid var(--baseAlt2Color)}.page-sidebar>*{padding:0 var(--smSpacing)}.page-sidebar .sidebar-content{overflow-x:hidden;overflow-y:auto;overflow-y:overlay}.page-sidebar .sidebar-content>:first-child{margin-top:0}.page-sidebar .sidebar-content>:last-child{margin-bottom:0}.page-sidebar .sidebar-footer{margin-top:var(--smSpacing)}.page-sidebar .search{display:flex;align-items:center;width:auto;column-gap:5px;margin:0 0 var(--xsSpacing);color:var(--txtHintColor);opacity:.7;transition:opacity var(--baseAnimationSpeed),color var(--baseAnimationSpeed)}.page-sidebar .search input{border:0;background:var(--baseColor);transition:box-shadow var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.page-sidebar .search .btn-clear{margin-right:-8px}.page-sidebar .search:hover,.page-sidebar .search:focus-within,.page-sidebar .search.active{opacity:1;color:var(--txtPrimaryColor)}.page-sidebar .search:hover input,.page-sidebar .search:focus-within input,.page-sidebar .search.active input{background:var(--baseAlt2Color)}.page-sidebar .sidebar-title{display:flex;align-items:center;gap:5px;width:100%;margin:var(--baseSpacing) 0 var(--xsSpacing);font-weight:600;font-size:1rem;line-height:var(--smLineHeight);color:var(--txtHintColor)}.page-sidebar .sidebar-title .label{font-weight:400}.page-sidebar .sidebar-list-item{cursor:pointer;outline:0;text-decoration:none;position:relative;display:flex;width:100%;align-items:center;column-gap:10px;margin:var(--sidebarListItemMargin) 0;padding:3px 10px;font-size:var(--xlFontSize);min-height:var(--btnHeight);min-width:0;color:var(--txtHintColor);border-radius:var(--baseRadius);user-select:none;transition:background var(--baseAnimationSpeed),color var(--baseAnimationSpeed)}.page-sidebar .sidebar-list-item i{font-size:18px}.page-sidebar .sidebar-list-item .txt{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.page-sidebar .sidebar-list-item:focus-visible,.page-sidebar .sidebar-list-item:hover,.page-sidebar .sidebar-list-item:active,.page-sidebar .sidebar-list-item.active{color:var(--txtPrimaryColor);background:var(--baseAlt1Color)}.page-sidebar .sidebar-list-item:active{background:var(--baseAlt2Color);transition-duration:var(--activeAnimationSpeed)}.page-sidebar .sidebar-content-compact .sidebar-list-item{--sidebarListItemMargin: 5px}@media screen and (max-height: 600px){.page-sidebar{--sidebarListItemMargin: 5px}}@media screen and (max-width: 1100px){.page-sidebar{--pageSidebarWidth: 190px}.page-sidebar>*{padding-left:10px;padding-right:10px}}.page-header{display:flex;align-items:center;width:100%;min-height:var(--btnHeight);gap:var(--xsSpacing);margin:0 0 var(--baseSpacing)}.page-header .btns-group{margin-left:auto;justify-content:end}@media screen and (max-width: 1050px){.page-header{flex-wrap:wrap}.page-header .btns-group{width:100%}.page-header .btns-group .btn{flex-grow:1;flex-basis:0}}.page-header-wrapper{background:var(--baseColor);width:auto;margin-top:calc(-1 * (var(--baseSpacing) - 5px));margin-left:calc(-1 * var(--baseSpacing));margin-right:calc(-1 * var(--baseSpacing));margin-bottom:var(--baseSpacing);padding:calc(var(--baseSpacing) - 5px) var(--baseSpacing);border-bottom:1px solid var(--baseAlt2Color)}.breadcrumbs{display:flex;align-items:center;gap:30px;color:var(--txtDisabledColor)}.breadcrumbs .breadcrumb-item{position:relative;margin:0;line-height:1;font-weight:400}.breadcrumbs .breadcrumb-item:after{content:"/";position:absolute;right:-20px;top:0;width:10px;text-align:center;pointer-events:none;opacity:.4}.breadcrumbs .breadcrumb-item:last-child{word-break:break-word;color:var(--txtPrimaryColor)}.breadcrumbs .breadcrumb-item:last-child:after{content:none;display:none}.breadcrumbs a{text-decoration:none;color:inherit;transition:color var(--baseAnimationSpeed)}.breadcrumbs a:hover{color:var(--txtPrimaryColor)}.page-content{position:relative;display:block;width:100%;flex-grow:1;padding:calc(var(--baseSpacing) - 5px) var(--baseSpacing)}.page-footer{display:flex;gap:5px;align-items:center;justify-content:right;text-align:right;padding:0px var(--baseSpacing) 15px;color:var(--txtDisabledColor);font-size:var(--xsFontSize);line-height:var(--smLineHeight)}.page-footer i{font-size:1.2em}.page-footer a{color:inherit;text-decoration:none;transition:color var(--baseAnimationSpeed)}.page-footer a:focus-visible,.page-footer a:hover,.page-footer a:active{color:var(--txtPrimaryColor)}.page-wrapper{display:flex;flex-direction:column;flex-grow:1;width:100%;overflow-x:hidden;overflow-y:auto;overflow-y:overlay}.overlay-active .page-wrapper{overflow-y:hidden}.page-wrapper.full-page{background:var(--baseColor)}.page-wrapper.center-content .page-content{display:flex;align-items:center}@keyframes tabChange{0%{opacity:.5}to{opacity:1}}.tabs-header{display:flex;align-items:stretch;justify-content:flex-start;column-gap:10px;width:100%;min-height:50px;user-select:none;margin:0 0 var(--baseSpacing);border-bottom:1px solid var(--baseAlt2Color)}.tabs-header .tab-item{position:relative;outline:0;border:0;background:none;display:inline-flex;align-items:center;justify-content:center;min-width:70px;gap:5px;padding:10px;margin:0;font-size:var(--lgFontSize);line-height:var(--baseLineHeight);font-family:var(--baseFontFamily);color:var(--txtHintColor);text-align:center;text-decoration:none;cursor:pointer;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius);transition:color var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.tabs-header .tab-item:after{content:"";position:absolute;display:block;left:0;bottom:-1px;width:100%;height:2px;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius);background:var(--primaryColor);transform:rotateY(90deg);transition:transform .2s}.tabs-header .tab-item .txt,.tabs-header .tab-item i{display:inline-block;vertical-align:top}.tabs-header .tab-item:hover,.tabs-header .tab-item:focus-visible,.tabs-header .tab-item:active{color:var(--txtPrimaryColor)}.tabs-header .tab-item:focus-visible,.tabs-header .tab-item:active{transition-duration:var(--activeAnimationSpeed);background:var(--baseAlt2Color)}.tabs-header .tab-item.active{color:var(--txtPrimaryColor)}.tabs-header .tab-item.active:after{transform:rotateY(0)}.tabs-header .tab-item.disabled{pointer-events:none;color:var(--txtDisabledColor)}.tabs-header .tab-item.disabled:after{display:none}.tabs-header.right{justify-content:flex-end}.tabs-header.center{justify-content:center}.tabs-header.stretched .tab-item{flex-grow:1;flex-basis:0}.tabs-header.compact{min-height:30px;margin-bottom:var(--smSpacing)}.tabs-content{position:relative}.tabs-content>.tab-item{width:100%;display:none}.tabs-content>.tab-item.active{display:block;opacity:0;animation:tabChange .2s forwards}.tabs-content>.tab-item>:first-child{margin-top:0}.tabs-content>.tab-item>:last-child{margin-bottom:0}.tabs{position:relative}.accordion{outline:0;position:relative;border-radius:var(--baseRadius);background:var(--baseColor);border:1px solid var(--baseAlt2Color);transition:box-shadow var(--baseAnimationSpeed),margin var(--baseAnimationSpeed)}.accordion .accordion-header{outline:0;position:relative;display:flex;min-height:52px;align-items:center;row-gap:10px;column-gap:var(--smSpacing);padding:12px 20px 10px;width:100%;user-select:none;color:var(--txtPrimaryColor);border-radius:inherit;transition:background var(--baseAnimationSpeed),box-shadow var(--baseAnimationSpeed)}.accordion .accordion-header .icon{width:18px;text-align:center}.accordion .accordion-header .icon i{display:inline-block;vertical-align:top;font-size:1.1rem}.accordion .accordion-header.interactive{padding-right:50px;cursor:pointer}.accordion .accordion-header.interactive:after{content:"\ea4e";position:absolute;right:15px;top:50%;margin-top:-12.5px;width:25px;height:25px;line-height:25px;color:var(--txtHintColor);font-family:var(--iconFontFamily);font-size:1.3em;text-align:center;transition:color var(--baseAnimationSpeed)}.accordion .accordion-header:hover:after,.accordion .accordion-header.focus:after,.accordion .accordion-header:focus-visible:after{color:var(--txtPrimaryColor)}.accordion .accordion-header:active{transition-duration:var(--activeAnimationSpeed)}.accordion .accordion-content{padding:20px}.accordion:hover,.accordion:focus-visible,.accordion.active{z-index:9}.accordion:hover .accordion-header.interactive,.accordion:focus-visible .accordion-header.interactive,.accordion.active .accordion-header.interactive{background:var(--baseAlt1Color)}.accordion.drag-over .accordion-header{background:var(--bodyColor)}.accordion.active{box-shadow:0 2px 5px 0 var(--shadowColor)}.accordion.active .accordion-header{position:relative;top:0;z-index:9;box-shadow:0 0 0 1px var(--baseAlt2Color);border-bottom-left-radius:0;border-bottom-right-radius:0;background:var(--bodyColor)}.accordion.active .accordion-header.interactive{background:var(--bodyColor)}.accordion.active .accordion-header.interactive:after{color:inherit;content:"\ea78"}.accordion.disabled{z-index:0;border-color:var(--baseAlt1Color)}.accordion.disabled .accordion-header{color:var(--txtDisabledColor)}.accordions .accordion{border-radius:0;margin:-1px 0 0}.accordions>.accordion.active,.accordions>.accordion-wrapper>.accordion.active{margin:var(--smSpacing) 0;border-radius:var(--baseRadius)}.accordions>.accordion:first-child,.accordions>.accordion-wrapper:first-child>.accordion{margin-top:0;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius)}.accordions>.accordion:last-child,.accordions>.accordion-wrapper:last-child>.accordion{margin-bottom:0;border-bottom-left-radius:var(--baseRadius);border-bottom-right-radius:var(--baseRadius)}table{--entranceAnimationSpeed: .3s;border-collapse:separate;min-width:100%;transition:opacity var(--baseAnimationSpeed)}table .form-field{margin:0;line-height:1;text-align:left}table td,table th{outline:0;vertical-align:middle;position:relative;text-align:left;padding:5px 10px;border-bottom:1px solid var(--baseAlt2Color)}table td:first-child,table th:first-child{padding-left:20px}table td:last-child,table th:last-child{padding-right:20px}table th{color:var(--txtHintColor);font-weight:600;font-size:1rem;user-select:none;height:50px;line-height:var(--smLineHeight)}table th i{font-size:inherit}table td{height:60px;word-break:break-word}table .min-width{width:1%!important;white-space:nowrap}table .nowrap{white-space:nowrap}table .col-sort{cursor:pointer;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius);padding-right:30px;transition:color var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}table .col-sort:after{content:"\ea4c";position:absolute;right:10px;top:50%;margin-top:-12.5px;line-height:25px;height:25px;font-family:var(--iconFontFamily);font-weight:400;color:var(--txtHintColor);opacity:0;transition:color var(--baseAnimationSpeed),opacity var(--baseAnimationSpeed)}table .col-sort.sort-desc:after{content:"\ea4c"}table .col-sort.sort-asc:after{content:"\ea76"}table .col-sort.sort-active:after{opacity:1}table .col-sort:hover,table .col-sort:focus-visible{background:var(--baseAlt1Color)}table .col-sort:hover:after,table .col-sort:focus-visible:after{opacity:1}table .col-sort:active{transition-duration:var(--activeAnimationSpeed);background:var(--baseAlt2Color)}table .col-sort.col-sort-disabled{cursor:default;background:none}table .col-sort.col-sort-disabled:after{display:none}table .col-header-content{display:inline-flex;align-items:center;flex-wrap:nowrap;gap:5px}table .col-header-content .txt{max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}table .col-field-created,table .col-field-updated,table .col-type-action{width:1%!important;white-space:nowrap}table .col-type-action{white-space:nowrap;text-align:right;color:var(--txtHintColor)}table .col-type-action i{display:inline-block;vertical-align:top;transition:transform var(--baseAnimationSpeed)}table td.col-type-json{font-family:monospace;font-size:var(--smFontSize);line-height:var(--smLineHeight);max-width:300px}table .col-type-text{max-width:300px}table .col-type-select{min-width:150px}table .col-type-email{min-width:120px;white-space:nowrap}table .col-type-file{min-width:100px}table td.col-field-id,table td.col-field-username{width:0;white-space:nowrap}table tr{outline:0;background:var(--bodyColor);transition:background var(--baseAnimationSpeed)}table tr.row-handle{cursor:pointer;user-select:none}table tr.row-handle:focus-visible,table tr.row-handle:hover,table tr.row-handle:active{background:var(--baseAlt1Color)}table tr.row-handle:focus-visible .action-col,table tr.row-handle:hover .action-col,table tr.row-handle:active .action-col{color:var(--txtPrimaryColor)}table tr.row-handle:focus-visible .action-col i,table tr.row-handle:hover .action-col i,table tr.row-handle:active .action-col i{transform:translate(3px)}table tr.row-handle:active{transition-duration:var(--activeAnimationSpeed)}table.table-compact td,table.table-compact th{height:auto}table.table-border{border:1px solid var(--baseAlt2Color)}table.table-border tr{background:var(--baseColor)}table.table-border th{background:var(--baseAlt1Color)}table.table-border>:last-child>:last-child th,table.table-border>:last-child>:last-child td{border-bottom:0}table.table-animate tr{animation:entranceTop var(--entranceAnimationSpeed)}table.table-loading{pointer-events:none;opacity:.7}.table-wrapper{width:auto;padding:0;max-width:calc(100% + 2 * var(--baseSpacing));margin-left:calc(var(--baseSpacing) * -1);margin-right:calc(var(--baseSpacing) * -1)}.table-wrapper .bulk-select-col{min-width:70px}.table-wrapper .bulk-select-col input[type=checkbox]~label{opacity:.7}.table-wrapper .bulk-select-col label:hover,.table-wrapper .bulk-select-col label:focus-within,.table-wrapper .bulk-select-col input[type=checkbox]:checked~label{opacity:1!important}.table-wrapper td,.table-wrapper th{position:relative}.table-wrapper td:first-child,.table-wrapper th:first-child{padding-left:calc(var(--baseSpacing) + 3px)}.table-wrapper td:last-child,.table-wrapper th:last-child{padding-right:calc(var(--baseSpacing) + 3px)}.table-wrapper .bulk-select-col,.table-wrapper .col-type-action{position:sticky;z-index:99;transition:box-shadow var(--baseAnimationSpeed)}.table-wrapper .bulk-select-col{left:0px}.table-wrapper .col-type-action{right:0}.table-wrapper .bulk-select-col,.table-wrapper .col-type-action{background:inherit}.table-wrapper th.bulk-select-col,.table-wrapper th.col-type-action{background:var(--bodyColor)}.table-wrapper.scrollable .bulk-select-col{box-shadow:3px 0 5px 0 var(--shadowColor)}.table-wrapper.scrollable .col-type-action{box-shadow:-3px 0 5px 0 var(--shadowColor)}.table-wrapper.scrollable.scroll-start .bulk-select-col,.table-wrapper.scrollable.scroll-end .col-type-action{box-shadow:none}.searchbar{--searchHeight: 44px;outline:0;display:flex;align-items:center;min-height:var(--searchHeight);width:100%;flex-grow:1;padding:5px 7px;margin:0 0 var(--smSpacing);white-space:nowrap;color:var(--txtHintColor);background:var(--baseAlt1Color);border-radius:var(--btnHeight);transition:color var(--baseAnimationSpeed),background var(--baseAnimationSpeed),box-shadow var(--baseAnimationSpeed)}.searchbar>:first-child{border-top-left-radius:var(--btnHeight);border-bottom-left-radius:var(--btnHeight)}.searchbar>:last-child{border-top-right-radius:var(--btnHeight);border-bottom-right-radius:var(--btnHeight)}.searchbar .btn{border-radius:var(--btnHeight)}.searchbar .code-editor,.searchbar input,.searchbar input:focus{font-size:var(--baseFontSize);font-family:var(--monospaceFontFamily);border:0;background:none;min-height:0;padding-top:0;padding-bottom:0}.searchbar label>i{line-height:inherit}.searchbar .search-options{flex-shrink:0;width:90px}.searchbar .search-options .selected-container{border-radius:inherit;background:none;padding-right:25px!important}.searchbar .search-options:not(:focus-within) .selected-container{color:var(--txtHintColor)}.searchbar:focus-within{color:var(--txtPrimaryColor);background:var(--baseAlt2Color)}.searchbar-wrapper{position:relative;display:flex;align-items:center;width:100%;min-width:var(--btnHeight);min-height:var(--btnHeight)}.searchbar-wrapper .search-toggle{position:absolute;right:0;top:0}.bulkbar{position:sticky;bottom:var(--baseSpacing);z-index:101;gap:10px;display:flex;justify-content:center;align-items:center;width:var(--smWrapperWidth);max-width:100%;margin:var(--smSpacing) auto;padding:10px var(--smSpacing);border-radius:var(--btnHeight);background:var(--baseColor);border:1px solid var(--baseAlt2Color);box-shadow:0 2px 5px 0 var(--shadowColor)}.flatpickr-calendar{opacity:0;display:none;text-align:center;visibility:hidden;padding:0;animation:none;direction:ltr;border:0;font-size:1rem;line-height:24px;position:absolute;width:298px;box-sizing:border-box;user-select:none;color:var(--txtPrimaryColor);background:var(--baseColor);border-radius:var(--baseRadius);box-shadow:0 2px 5px 0 var(--shadowColor),0 0 0 1px var(--baseAlt2Color)}.flatpickr-calendar input,.flatpickr-calendar select{box-shadow:none;min-height:0;height:var(--inputHeight);background:none;border-radius:var(--baseRadius);border:1px solid var(--baseAlt1Color)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:0;width:100%}.flatpickr-calendar.static{position:absolute;top:100%;margin-top:2px;margin-bottom:10px;width:100%}.flatpickr-calendar.static .flatpickr-days{width:100%}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 var(--baseAlt2Color),5px 0 0 var(--baseAlt2Color);box-shadow:-2px 0 0 var(--baseAlt2Color),5px 0 0 var(--baseAlt2Color)}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid var(--baseAlt2Color)}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:var(--baseColor)}.flatpickr-calendar.arrowTop:after{border-bottom-color:var(--baseColor)}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:var(--baseColor)}.flatpickr-calendar.arrowBottom:after{border-top-color:var(--baseColor)}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative}.flatpickr-months{display:flex;margin:0 0 4px}.flatpickr-months .flatpickr-month{background:transparent;color:var(--txtPrimaryColor);fill:var(--txtPrimaryColor);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:var(--txtPrimaryColor);fill:var(--txtPrimaryColor)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover,.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:var(--txtHintColor)}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:#00000080}.numInputWrapper:hover{background:var(--baseAlt2Color)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{line-height:inherit;color:inherit;position:absolute;width:75%;left:12.5%;padding:1px 0;line-height:1;display:flex;align-items:center;justify-content:center;text-align:center}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:var(--baseAlt2Color)}.flatpickr-current-month .numInputWrapper{display:inline-flex;align-items:center;justify-content:center;width:63px;margin:0 5px}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:var(--txtPrimaryColor)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:var(--txtPrimaryColor)}.flatpickr-current-month input.cur-year{background:transparent;box-sizing:border-box;color:inherit;cursor:text;margin:0;display:inline-block;font-size:inherit;font-family:inherit;line-height:inherit;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{color:var(--txtDisabledColor);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;line-height:inherit;outline:none;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:var(--baseAlt2Color)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{display:block;flex:1;margin:0;cursor:default;line-height:1;background:transparent;color:var(--txtHintColor);text-align:center;font-weight:bolder;font-size:var(--smFontSize)}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:100%;box-sizing:border-box;display:inline-block;display:flex;flex-wrap:wrap;transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 var(--baseAlt2Color);box-shadow:-1px 0 0 var(--baseAlt2Color)}.flatpickr-day{background:none;border:1px solid transparent;border-radius:var(--baseRadius);box-sizing:border-box;color:var(--txtPrimaryColor);cursor:pointer;font-weight:400;width:calc(14.2857143% - 2px);flex-basis:calc(14.2857143% - 2px);height:39px;margin:1px;display:inline-flex;align-items:center;justify-content:center;position:relative;text-align:center;flex-direction:column}.flatpickr-day.weekend,.flatpickr-day:nth-child(7n+6),.flatpickr-day:nth-child(7n+7){color:var(--dangerColor)}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:var(--baseAlt2Color);border-color:var(--baseAlt2Color)}.flatpickr-day.today{border-color:var(--baseColor)}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:var(--primaryColor);background:var(--primaryColor);color:var(--baseColor)}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:var(--primaryColor);-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:var(--primaryColor)}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 var(--primaryColor);box-shadow:-10px 0 0 var(--primaryColor)}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;box-shadow:-5px 0 0 var(--baseAlt2Color),5px 0 0 var(--baseAlt2Color)}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:var(--txtDisabledColor);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:var(--txtDisabledColor);background:var(--baseAlt2Color)}.flatpickr-day.week.selected{border-radius:0;box-shadow:-5px 0 0 var(--primaryColor),5px 0 0 var(--primaryColor)}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 var(--baseAlt2Color);box-shadow:1px 0 0 var(--baseAlt2Color)}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:var(--txtHintColor);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:flex;box-sizing:border-box;overflow:hidden;padding:5px}.flatpickr-rContainer{display:inline-block;padding:0;width:100%;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:var(--txtPrimaryColor)}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:var(--txtPrimaryColor)}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;box-shadow:none;border:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:var(--txtPrimaryColor);font-size:14px;position:relative;box-sizing:border-box;background:var(--baseColor);-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:var(--txtPrimaryColor);font-weight:700;width:2%;user-select:none;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:var(--baseAlt1Color)}.flatpickr-input[readonly]{cursor:pointer}@keyframes fpFadeInDown{0%{opacity:0;transform:translate3d(0,10px,0)}to{opacity:1;transform:translateZ(0)}}.flatpickr-hide-prev-next-month-days .flatpickr-calendar .prevMonthDay{visibility:hidden}.flatpickr-hide-prev-next-month-days .flatpickr-calendar .nextMonthDay,.flatpickr-inline-container .flatpickr-input{display:none}.flatpickr-inline-container .flatpickr-calendar{margin:0;box-shadow:none;border:1px solid var(--baseAlt2Color)}.docs-sidebar{--itemsSpacing: 10px;--itemsHeight: 40px;position:relative;min-width:180px;max-width:300px;height:100%;flex-shrink:0;overflow-x:hidden;overflow-y:auto;overflow-y:overlay;background:var(--bodyColor);padding:var(--smSpacing) var(--xsSpacing);border-right:1px solid var(--baseAlt1Color)}.docs-sidebar .sidebar-content{display:block;width:100%}.docs-sidebar .sidebar-item{position:relative;outline:0;cursor:pointer;text-decoration:none;display:flex;width:100%;gap:10px;align-items:center;text-align:right;justify-content:start;padding:5px 15px;margin:0 0 var(--itemsSpacing) 0;font-size:var(--lgFontSize);min-height:var(--itemsHeight);border-radius:var(--baseRadius);user-select:none;color:var(--txtHintColor);transition:background var(--baseAnimationSpeed),color var(--baseAnimationSpeed)}.docs-sidebar .sidebar-item:last-child{margin-bottom:0}.docs-sidebar .sidebar-item:focus-visible,.docs-sidebar .sidebar-item:hover,.docs-sidebar .sidebar-item:active,.docs-sidebar .sidebar-item.active{color:var(--txtPrimaryColor);background:var(--baseAlt1Color)}.docs-sidebar .sidebar-item:active{background:var(--baseAlt2Color);transition-duration:var(--activeAnimationSpeed)}.docs-sidebar.compact .sidebar-item{--itemsSpacing: 7px}.docs-content{width:100%;display:block;padding:calc(var(--baseSpacing) - 3px) var(--baseSpacing);overflow:auto}.docs-content-wrapper{display:flex;width:100%;height:100%}.docs-panel{width:960px;height:100%}.docs-panel .overlay-panel-section.panel-header{padding:0;border:0;box-shadow:none}.docs-panel .overlay-panel-section.panel-content{padding:0!important}.docs-panel .overlay-panel-section.panel-footer{display:none}@media screen and (max-width: 1000px){.docs-panel .overlay-panel-section.panel-footer{display:flex}}.panel-wrapper.svelte-lxxzfu{animation:slideIn .2s}@keyframes svelte-1bvelc2-refresh{to{transform:rotate(180deg)}}.btn.refreshing.svelte-1bvelc2 i.svelte-1bvelc2{animation:svelte-1bvelc2-refresh .15s ease-out}.datetime.svelte-zdiknu{width:100%;display:block;line-height:var(--smLineHeight)}.time.svelte-zdiknu{font-size:var(--smFontSize);color:var(--txtHintColor)}.horizontal-scroller.svelte-wc2j9h{width:auto;overflow-x:auto}.horizontal-scroller-wrapper.svelte-wc2j9h{position:relative}.horizontal-scroller-wrapper .columns-dropdown{top:40px;z-index:100;max-height:340px}.chart-wrapper.svelte-vh4sl8.svelte-vh4sl8{position:relative;display:block;width:100%}.chart-wrapper.loading.svelte-vh4sl8 .chart-canvas.svelte-vh4sl8{pointer-events:none;opacity:.5}.chart-loader.svelte-vh4sl8.svelte-vh4sl8{position:absolute;z-index:999;top:50%;left:50%;transform:translate(-50%,-50%)}.prism-light code[class*=language-],.prism-light pre[class*=language-]{color:#111b27;background:0 0;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}.prism-light code[class*=language-] ::-moz-selection,.prism-light code[class*=language-]::-moz-selection,.prism-light pre[class*=language-] ::-moz-selection,.prism-light pre[class*=language-]::-moz-selection{background:#8da1b9}.prism-light code[class*=language-] ::selection,.prism-light code[class*=language-]::selection,.prism-light pre[class*=language-] ::selection,.prism-light pre[class*=language-]::selection{background:#8da1b9}.prism-light pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}.prism-light :not(pre)>code[class*=language-],.prism-light pre[class*=language-]{background:#e3eaf2}.prism-light :not(pre)>code[class*=language-]{padding:.1em .3em;border-radius:.3em;white-space:normal}.prism-light .token.cdata,.prism-light .token.comment,.prism-light .token.doctype,.prism-light .token.prolog{color:#3c526d}.prism-light .token.punctuation{color:#111b27}.prism-light .token.delimiter.important,.prism-light .token.selector .parent,.prism-light .token.tag,.prism-light .token.tag .token.punctuation{color:#006d6d}.prism-light .token.attr-name,.prism-light .token.boolean,.prism-light .token.boolean.important,.prism-light .token.constant,.prism-light .token.number,.prism-light .token.selector .token.attribute{color:#755f00}.prism-light .token.class-name,.prism-light .token.key,.prism-light .token.parameter,.prism-light .token.property,.prism-light .token.property-access,.prism-light .token.variable{color:#005a8e}.prism-light .token.attr-value,.prism-light .token.color,.prism-light .token.inserted,.prism-light .token.selector .token.value,.prism-light .token.string,.prism-light .token.string .token.url-link{color:#116b00}.prism-light .token.builtin,.prism-light .token.keyword-array,.prism-light .token.package,.prism-light .token.regex{color:#af00af}.prism-light .token.function,.prism-light .token.selector .token.class,.prism-light .token.selector .token.id{color:#7c00aa}.prism-light .token.atrule .token.rule,.prism-light .token.combinator,.prism-light .token.keyword,.prism-light .token.operator,.prism-light .token.pseudo-class,.prism-light .token.pseudo-element,.prism-light .token.selector,.prism-light .token.unit{color:#a04900}.prism-light .token.deleted,.prism-light .token.important{color:#c22f2e}.prism-light .token.keyword-this,.prism-light .token.this{color:#005a8e}.prism-light .token.bold,.prism-light .token.important,.prism-light .token.keyword-this,.prism-light .token.this{font-weight:700}.prism-light .token.delimiter.important{font-weight:inherit}.prism-light .token.italic{font-style:italic}.prism-light .token.entity{cursor:help}.prism-light .language-markdown .token.title,.prism-light .language-markdown .token.title .token.punctuation{color:#005a8e;font-weight:700}.prism-light .language-markdown .token.blockquote.punctuation{color:#af00af}.prism-light .language-markdown .token.code{color:#006d6d}.prism-light .language-markdown .token.hr.punctuation{color:#005a8e}.prism-light .language-markdown .token.url>.token.content{color:#116b00}.prism-light .language-markdown .token.url-link{color:#755f00}.prism-light .language-markdown .token.list.punctuation{color:#af00af}.prism-light .language-markdown .token.table-header,.prism-light .language-json .token.operator{color:#111b27}.prism-light .language-scss .token.variable{color:#006d6d}.prism-light .token.token.cr:before,.prism-light .token.token.lf:before,.prism-light .token.token.space:before,.prism-light .token.token.tab:not(:empty):before{color:#3c526d}.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>a,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>button{color:#e3eaf2;background:#005a8e}.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>a:focus,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>a:hover,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>button:focus,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>button:hover{color:#e3eaf2;background:rgba(0,90,142,.8549019608);text-decoration:none}.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>span,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>span:focus,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>span:hover{color:#e3eaf2;background:#3c526d}.prism-light .line-highlight.line-highlight{background:rgba(141,161,185,.1843137255);background:linear-gradient(to right,rgba(141,161,185,.1843137255) 70%,rgba(141,161,185,.1450980392))}.prism-light .line-highlight.line-highlight:before,.prism-light .line-highlight.line-highlight[data-end]:after{background-color:#3c526d;color:#e3eaf2;box-shadow:0 1px #8da1b9}.prism-light pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows>span:hover:before{background-color:#3c526d1f}.prism-light .line-numbers.line-numbers .line-numbers-rows{border-right:1px solid rgba(141,161,185,.4784313725);background:rgba(208,218,231,.4784313725)}.prism-light .line-numbers .line-numbers-rows>span:before{color:#3c526dda}.prism-light .rainbow-braces .token.token.punctuation.brace-level-1,.prism-light .rainbow-braces .token.token.punctuation.brace-level-5,.prism-light .rainbow-braces .token.token.punctuation.brace-level-9{color:#755f00}.prism-light .rainbow-braces .token.token.punctuation.brace-level-10,.prism-light .rainbow-braces .token.token.punctuation.brace-level-2,.prism-light .rainbow-braces .token.token.punctuation.brace-level-6{color:#af00af}.prism-light .rainbow-braces .token.token.punctuation.brace-level-11,.prism-light .rainbow-braces .token.token.punctuation.brace-level-3,.prism-light .rainbow-braces .token.token.punctuation.brace-level-7{color:#005a8e}.prism-light .rainbow-braces .token.token.punctuation.brace-level-12,.prism-light .rainbow-braces .token.token.punctuation.brace-level-4,.prism-light .rainbow-braces .token.token.punctuation.brace-level-8{color:#7c00aa}.prism-light pre.diff-highlight>code .token.token.deleted:not(.prefix),.prism-light pre>code.diff-highlight .token.token.deleted:not(.prefix){background-color:#c22f2e1f}.prism-light pre.diff-highlight>code .token.token.inserted:not(.prefix),.prism-light pre>code.diff-highlight .token.token.inserted:not(.prefix){background-color:#116b001f}.prism-light .command-line .command-line-prompt{border-right:1px solid rgba(141,161,185,.4784313725)}.prism-light .command-line .command-line-prompt>span:before{color:#3c526dda}code.svelte-10s5tkd.svelte-10s5tkd{display:block;width:100%;padding:10px 15px;white-space:pre-wrap;word-break:break-word}.code-wrapper.svelte-10s5tkd.svelte-10s5tkd{display:block;width:100%;max-height:100%;overflow:auto;overflow:overlay}.prism-light.svelte-10s5tkd code.svelte-10s5tkd{color:var(--txtPrimaryColor);background:var(--baseAlt1Color)}.invalid-name-note.svelte-1tpxlm5{position:absolute;right:10px;top:10px;text-transform:none}.title.field-name.svelte-1tpxlm5{max-width:130px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.rule-block.svelte-fjxz7k{display:flex;align-items:flex-start;gap:var(--xsSpacing)}.rule-toggle-btn.svelte-fjxz7k{margin-top:15px}.changes-list.svelte-1ghly2p{word-break:break-all}.tabs-content.svelte-b10vi{z-index:3}.email-visibility-addon.svelte-1751a4d~input.svelte-1751a4d{padding-right:100px}textarea.svelte-1x1pbts{resize:none;padding-top:4px!important;padding-bottom:5px!important;min-height:var(--inputHeight);height:var(--inputHeight)}.clear-btn.svelte-11df51y{margin-top:20px}.content.svelte-1gjwqyd{flex-shrink:1;flex-grow:0;width:auto;min-width:0}.export-preview.svelte-jm5c4z.svelte-jm5c4z{position:relative;height:500px}.export-preview.svelte-jm5c4z .copy-schema.svelte-jm5c4z{position:absolute;right:15px;top:15px}.collections-diff-table.svelte-lmkr38.svelte-lmkr38{color:var(--txtHintColor);border:2px solid var(--primaryColor)}.collections-diff-table.svelte-lmkr38 tr.svelte-lmkr38{background:none}.collections-diff-table.svelte-lmkr38 th.svelte-lmkr38,.collections-diff-table.svelte-lmkr38 td.svelte-lmkr38{height:auto;padding:2px 15px;border-bottom:1px solid rgba(0,0,0,.07)}.collections-diff-table.svelte-lmkr38 th.svelte-lmkr38{height:35px;padding:4px 15px;color:var(--txtPrimaryColor)}.collections-diff-table.svelte-lmkr38 thead tr.svelte-lmkr38{background:var(--primaryColor)}.collections-diff-table.svelte-lmkr38 thead tr th.svelte-lmkr38{color:var(--baseColor);background:none}.collections-diff-table.svelte-lmkr38 .label.svelte-lmkr38{font-weight:400}.collections-diff-table.svelte-lmkr38 .changed-none-col.svelte-lmkr38{color:var(--txtDisabledColor);background:var(--baseAlt1Color)}.collections-diff-table.svelte-lmkr38 .changed-old-col.svelte-lmkr38{color:var(--txtPrimaryColor);background:var(--dangerAltColor)}.collections-diff-table.svelte-lmkr38 .changed-new-col.svelte-lmkr38{color:var(--txtPrimaryColor);background:var(--successAltColor)}.collections-diff-table.svelte-lmkr38 .field-key-col.svelte-lmkr38{padding-left:30px}.list-label.svelte-1jx20fl{min-width:65px} +@font-face{font-family:remixicon;src:url(../fonts/remixicon/remixicon.woff2?v=1) format("woff2"),url(../fonts/remixicon/remixicon.woff?v=1) format("woff"),url(../fonts/remixicon/remixicon.ttf?v=1) format("truetype"),url(../fonts/remixicon/remixicon.svg?v=1#remixicon) format("svg");font-display:swap}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:400;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-regular.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-regular.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:400;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-italic.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:600;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:600;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-600italic.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:normal;font-weight:700;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700.woff) format("woff")}@font-face{font-family:Source Sans Pro;font-style:italic;font-weight:700;src:local(""),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700italic.woff2) format("woff2"),url(../fonts/source-sans-pro/source-sans-pro-v18-latin_cyrillic-700italic.woff) format("woff")}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:400;src:local(""),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-regular.woff2) format("woff2"),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-regular.woff) format("woff")}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:600;src:local(""),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-600.woff2) format("woff2"),url(../fonts/jetbrains-mono/jetbrains-mono-v12-latin-600.woff) format("woff")}:root{--baseFontFamily: "Source Sans Pro", sans-serif, emoji;--monospaceFontFamily: "Ubuntu Mono", monospace, emoji;--iconFontFamily: "remixicon";--txtPrimaryColor: #16161a;--txtHintColor: #666f75;--txtDisabledColor: #adb3b8;--primaryColor: #16161a;--bodyColor: #f8f9fa;--baseColor: #ffffff;--baseAlt1Color: #ebeff2;--baseAlt2Color: #dee3e8;--baseAlt3Color: #a9b4bc;--baseAlt4Color: #7c868d;--infoColor: #3da9fc;--infoAltColor: #d8eefe;--successColor: #2cb67d;--successAltColor: #d6f5e8;--dangerColor: #ef4565;--dangerAltColor: #fcdee4;--warningColor: #ff8e3c;--warningAltColor: #ffe7d6;--overlayColor: rgba(65, 80, 105, .25);--tooltipColor: rgba(0, 0, 0, .85);--shadowColor: rgba(0, 0, 0, .06);--baseFontSize: 14.5px;--xsFontSize: 12px;--smFontSize: 13px;--lgFontSize: 15px;--xlFontSize: 16px;--baseLineHeight: 22px;--smLineHeight: 16px;--lgLineHeight: 24px;--inputHeight: 34px;--btnHeight: 40px;--xsBtnHeight: 24px;--smBtnHeight: 30px;--lgBtnHeight: 54px;--baseSpacing: 30px;--xsSpacing: 15px;--smSpacing: 20px;--lgSpacing: 50px;--xlSpacing: 60px;--wrapperWidth: 850px;--smWrapperWidth: 420px;--lgWrapperWidth: 1200px;--appSidebarWidth: 75px;--pageSidebarWidth: 220px;--baseAnimationSpeed: .15s;--activeAnimationSpeed: 70ms;--entranceAnimationSpeed: .25s;--baseRadius: 3px;--lgRadius: 12px;--btnRadius: 3px;accent-color:var(--primaryColor)}html,body,div,span,applet,object,iframe,h1,h2,.breadcrumbs .breadcrumb-item,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}i{font-family:remixicon!important;font-style:normal;font-weight:400;font-size:1.1238rem;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}i:before{vertical-align:top;margin-top:1px;display:inline-block}.ri-24-hours-fill:before{content:"\ea01"}.ri-24-hours-line:before{content:"\ea02"}.ri-4k-fill:before{content:"\ea03"}.ri-4k-line:before{content:"\ea04"}.ri-a-b:before{content:"\ea05"}.ri-account-box-fill:before{content:"\ea06"}.ri-account-box-line:before{content:"\ea07"}.ri-account-circle-fill:before{content:"\ea08"}.ri-account-circle-line:before{content:"\ea09"}.ri-account-pin-box-fill:before{content:"\ea0a"}.ri-account-pin-box-line:before{content:"\ea0b"}.ri-account-pin-circle-fill:before{content:"\ea0c"}.ri-account-pin-circle-line:before{content:"\ea0d"}.ri-add-box-fill:before{content:"\ea0e"}.ri-add-box-line:before{content:"\ea0f"}.ri-add-circle-fill:before{content:"\ea10"}.ri-add-circle-line:before{content:"\ea11"}.ri-add-fill:before{content:"\ea12"}.ri-add-line:before{content:"\ea13"}.ri-admin-fill:before{content:"\ea14"}.ri-admin-line:before{content:"\ea15"}.ri-advertisement-fill:before{content:"\ea16"}.ri-advertisement-line:before{content:"\ea17"}.ri-airplay-fill:before{content:"\ea18"}.ri-airplay-line:before{content:"\ea19"}.ri-alarm-fill:before{content:"\ea1a"}.ri-alarm-line:before{content:"\ea1b"}.ri-alarm-warning-fill:before{content:"\ea1c"}.ri-alarm-warning-line:before{content:"\ea1d"}.ri-album-fill:before{content:"\ea1e"}.ri-album-line:before{content:"\ea1f"}.ri-alert-fill:before{content:"\ea20"}.ri-alert-line:before{content:"\ea21"}.ri-aliens-fill:before{content:"\ea22"}.ri-aliens-line:before{content:"\ea23"}.ri-align-bottom:before{content:"\ea24"}.ri-align-center:before{content:"\ea25"}.ri-align-justify:before{content:"\ea26"}.ri-align-left:before{content:"\ea27"}.ri-align-right:before{content:"\ea28"}.ri-align-top:before{content:"\ea29"}.ri-align-vertically:before{content:"\ea2a"}.ri-alipay-fill:before{content:"\ea2b"}.ri-alipay-line:before{content:"\ea2c"}.ri-amazon-fill:before{content:"\ea2d"}.ri-amazon-line:before{content:"\ea2e"}.ri-anchor-fill:before{content:"\ea2f"}.ri-anchor-line:before{content:"\ea30"}.ri-ancient-gate-fill:before{content:"\ea31"}.ri-ancient-gate-line:before{content:"\ea32"}.ri-ancient-pavilion-fill:before{content:"\ea33"}.ri-ancient-pavilion-line:before{content:"\ea34"}.ri-android-fill:before{content:"\ea35"}.ri-android-line:before{content:"\ea36"}.ri-angularjs-fill:before{content:"\ea37"}.ri-angularjs-line:before{content:"\ea38"}.ri-anticlockwise-2-fill:before{content:"\ea39"}.ri-anticlockwise-2-line:before{content:"\ea3a"}.ri-anticlockwise-fill:before{content:"\ea3b"}.ri-anticlockwise-line:before{content:"\ea3c"}.ri-app-store-fill:before{content:"\ea3d"}.ri-app-store-line:before{content:"\ea3e"}.ri-apple-fill:before{content:"\ea3f"}.ri-apple-line:before{content:"\ea40"}.ri-apps-2-fill:before{content:"\ea41"}.ri-apps-2-line:before{content:"\ea42"}.ri-apps-fill:before{content:"\ea43"}.ri-apps-line:before{content:"\ea44"}.ri-archive-drawer-fill:before{content:"\ea45"}.ri-archive-drawer-line:before{content:"\ea46"}.ri-archive-fill:before{content:"\ea47"}.ri-archive-line:before{content:"\ea48"}.ri-arrow-down-circle-fill:before{content:"\ea49"}.ri-arrow-down-circle-line:before{content:"\ea4a"}.ri-arrow-down-fill:before{content:"\ea4b"}.ri-arrow-down-line:before{content:"\ea4c"}.ri-arrow-down-s-fill:before{content:"\ea4d"}.ri-arrow-down-s-line:before{content:"\ea4e"}.ri-arrow-drop-down-fill:before{content:"\ea4f"}.ri-arrow-drop-down-line:before{content:"\ea50"}.ri-arrow-drop-left-fill:before{content:"\ea51"}.ri-arrow-drop-left-line:before{content:"\ea52"}.ri-arrow-drop-right-fill:before{content:"\ea53"}.ri-arrow-drop-right-line:before{content:"\ea54"}.ri-arrow-drop-up-fill:before{content:"\ea55"}.ri-arrow-drop-up-line:before{content:"\ea56"}.ri-arrow-go-back-fill:before{content:"\ea57"}.ri-arrow-go-back-line:before{content:"\ea58"}.ri-arrow-go-forward-fill:before{content:"\ea59"}.ri-arrow-go-forward-line:before{content:"\ea5a"}.ri-arrow-left-circle-fill:before{content:"\ea5b"}.ri-arrow-left-circle-line:before{content:"\ea5c"}.ri-arrow-left-down-fill:before{content:"\ea5d"}.ri-arrow-left-down-line:before{content:"\ea5e"}.ri-arrow-left-fill:before{content:"\ea5f"}.ri-arrow-left-line:before{content:"\ea60"}.ri-arrow-left-right-fill:before{content:"\ea61"}.ri-arrow-left-right-line:before{content:"\ea62"}.ri-arrow-left-s-fill:before{content:"\ea63"}.ri-arrow-left-s-line:before{content:"\ea64"}.ri-arrow-left-up-fill:before{content:"\ea65"}.ri-arrow-left-up-line:before{content:"\ea66"}.ri-arrow-right-circle-fill:before{content:"\ea67"}.ri-arrow-right-circle-line:before{content:"\ea68"}.ri-arrow-right-down-fill:before{content:"\ea69"}.ri-arrow-right-down-line:before{content:"\ea6a"}.ri-arrow-right-fill:before{content:"\ea6b"}.ri-arrow-right-line:before{content:"\ea6c"}.ri-arrow-right-s-fill:before{content:"\ea6d"}.ri-arrow-right-s-line:before{content:"\ea6e"}.ri-arrow-right-up-fill:before{content:"\ea6f"}.ri-arrow-right-up-line:before{content:"\ea70"}.ri-arrow-up-circle-fill:before{content:"\ea71"}.ri-arrow-up-circle-line:before{content:"\ea72"}.ri-arrow-up-down-fill:before{content:"\ea73"}.ri-arrow-up-down-line:before{content:"\ea74"}.ri-arrow-up-fill:before{content:"\ea75"}.ri-arrow-up-line:before{content:"\ea76"}.ri-arrow-up-s-fill:before{content:"\ea77"}.ri-arrow-up-s-line:before{content:"\ea78"}.ri-artboard-2-fill:before{content:"\ea79"}.ri-artboard-2-line:before{content:"\ea7a"}.ri-artboard-fill:before{content:"\ea7b"}.ri-artboard-line:before{content:"\ea7c"}.ri-article-fill:before{content:"\ea7d"}.ri-article-line:before{content:"\ea7e"}.ri-aspect-ratio-fill:before{content:"\ea7f"}.ri-aspect-ratio-line:before{content:"\ea80"}.ri-asterisk:before{content:"\ea81"}.ri-at-fill:before{content:"\ea82"}.ri-at-line:before{content:"\ea83"}.ri-attachment-2:before{content:"\ea84"}.ri-attachment-fill:before{content:"\ea85"}.ri-attachment-line:before{content:"\ea86"}.ri-auction-fill:before{content:"\ea87"}.ri-auction-line:before{content:"\ea88"}.ri-award-fill:before{content:"\ea89"}.ri-award-line:before{content:"\ea8a"}.ri-baidu-fill:before{content:"\ea8b"}.ri-baidu-line:before{content:"\ea8c"}.ri-ball-pen-fill:before{content:"\ea8d"}.ri-ball-pen-line:before{content:"\ea8e"}.ri-bank-card-2-fill:before{content:"\ea8f"}.ri-bank-card-2-line:before{content:"\ea90"}.ri-bank-card-fill:before{content:"\ea91"}.ri-bank-card-line:before{content:"\ea92"}.ri-bank-fill:before{content:"\ea93"}.ri-bank-line:before{content:"\ea94"}.ri-bar-chart-2-fill:before{content:"\ea95"}.ri-bar-chart-2-line:before{content:"\ea96"}.ri-bar-chart-box-fill:before{content:"\ea97"}.ri-bar-chart-box-line:before{content:"\ea98"}.ri-bar-chart-fill:before{content:"\ea99"}.ri-bar-chart-grouped-fill:before{content:"\ea9a"}.ri-bar-chart-grouped-line:before{content:"\ea9b"}.ri-bar-chart-horizontal-fill:before{content:"\ea9c"}.ri-bar-chart-horizontal-line:before{content:"\ea9d"}.ri-bar-chart-line:before{content:"\ea9e"}.ri-barcode-box-fill:before{content:"\ea9f"}.ri-barcode-box-line:before{content:"\eaa0"}.ri-barcode-fill:before{content:"\eaa1"}.ri-barcode-line:before{content:"\eaa2"}.ri-barricade-fill:before{content:"\eaa3"}.ri-barricade-line:before{content:"\eaa4"}.ri-base-station-fill:before{content:"\eaa5"}.ri-base-station-line:before{content:"\eaa6"}.ri-basketball-fill:before{content:"\eaa7"}.ri-basketball-line:before{content:"\eaa8"}.ri-battery-2-charge-fill:before{content:"\eaa9"}.ri-battery-2-charge-line:before{content:"\eaaa"}.ri-battery-2-fill:before{content:"\eaab"}.ri-battery-2-line:before{content:"\eaac"}.ri-battery-charge-fill:before{content:"\eaad"}.ri-battery-charge-line:before{content:"\eaae"}.ri-battery-fill:before{content:"\eaaf"}.ri-battery-line:before{content:"\eab0"}.ri-battery-low-fill:before{content:"\eab1"}.ri-battery-low-line:before{content:"\eab2"}.ri-battery-saver-fill:before{content:"\eab3"}.ri-battery-saver-line:before{content:"\eab4"}.ri-battery-share-fill:before{content:"\eab5"}.ri-battery-share-line:before{content:"\eab6"}.ri-bear-smile-fill:before{content:"\eab7"}.ri-bear-smile-line:before{content:"\eab8"}.ri-behance-fill:before{content:"\eab9"}.ri-behance-line:before{content:"\eaba"}.ri-bell-fill:before{content:"\eabb"}.ri-bell-line:before{content:"\eabc"}.ri-bike-fill:before{content:"\eabd"}.ri-bike-line:before{content:"\eabe"}.ri-bilibili-fill:before{content:"\eabf"}.ri-bilibili-line:before{content:"\eac0"}.ri-bill-fill:before{content:"\eac1"}.ri-bill-line:before{content:"\eac2"}.ri-billiards-fill:before{content:"\eac3"}.ri-billiards-line:before{content:"\eac4"}.ri-bit-coin-fill:before{content:"\eac5"}.ri-bit-coin-line:before{content:"\eac6"}.ri-blaze-fill:before{content:"\eac7"}.ri-blaze-line:before{content:"\eac8"}.ri-bluetooth-connect-fill:before{content:"\eac9"}.ri-bluetooth-connect-line:before{content:"\eaca"}.ri-bluetooth-fill:before{content:"\eacb"}.ri-bluetooth-line:before{content:"\eacc"}.ri-blur-off-fill:before{content:"\eacd"}.ri-blur-off-line:before{content:"\eace"}.ri-body-scan-fill:before{content:"\eacf"}.ri-body-scan-line:before{content:"\ead0"}.ri-bold:before{content:"\ead1"}.ri-book-2-fill:before{content:"\ead2"}.ri-book-2-line:before{content:"\ead3"}.ri-book-3-fill:before{content:"\ead4"}.ri-book-3-line:before{content:"\ead5"}.ri-book-fill:before{content:"\ead6"}.ri-book-line:before{content:"\ead7"}.ri-book-mark-fill:before{content:"\ead8"}.ri-book-mark-line:before{content:"\ead9"}.ri-book-open-fill:before{content:"\eada"}.ri-book-open-line:before{content:"\eadb"}.ri-book-read-fill:before{content:"\eadc"}.ri-book-read-line:before{content:"\eadd"}.ri-booklet-fill:before{content:"\eade"}.ri-booklet-line:before{content:"\eadf"}.ri-bookmark-2-fill:before{content:"\eae0"}.ri-bookmark-2-line:before{content:"\eae1"}.ri-bookmark-3-fill:before{content:"\eae2"}.ri-bookmark-3-line:before{content:"\eae3"}.ri-bookmark-fill:before{content:"\eae4"}.ri-bookmark-line:before{content:"\eae5"}.ri-boxing-fill:before{content:"\eae6"}.ri-boxing-line:before{content:"\eae7"}.ri-braces-fill:before{content:"\eae8"}.ri-braces-line:before{content:"\eae9"}.ri-brackets-fill:before{content:"\eaea"}.ri-brackets-line:before{content:"\eaeb"}.ri-briefcase-2-fill:before{content:"\eaec"}.ri-briefcase-2-line:before{content:"\eaed"}.ri-briefcase-3-fill:before{content:"\eaee"}.ri-briefcase-3-line:before{content:"\eaef"}.ri-briefcase-4-fill:before{content:"\eaf0"}.ri-briefcase-4-line:before{content:"\eaf1"}.ri-briefcase-5-fill:before{content:"\eaf2"}.ri-briefcase-5-line:before{content:"\eaf3"}.ri-briefcase-fill:before{content:"\eaf4"}.ri-briefcase-line:before{content:"\eaf5"}.ri-bring-forward:before{content:"\eaf6"}.ri-bring-to-front:before{content:"\eaf7"}.ri-broadcast-fill:before{content:"\eaf8"}.ri-broadcast-line:before{content:"\eaf9"}.ri-brush-2-fill:before{content:"\eafa"}.ri-brush-2-line:before{content:"\eafb"}.ri-brush-3-fill:before{content:"\eafc"}.ri-brush-3-line:before{content:"\eafd"}.ri-brush-4-fill:before{content:"\eafe"}.ri-brush-4-line:before{content:"\eaff"}.ri-brush-fill:before{content:"\eb00"}.ri-brush-line:before{content:"\eb01"}.ri-bubble-chart-fill:before{content:"\eb02"}.ri-bubble-chart-line:before{content:"\eb03"}.ri-bug-2-fill:before{content:"\eb04"}.ri-bug-2-line:before{content:"\eb05"}.ri-bug-fill:before{content:"\eb06"}.ri-bug-line:before{content:"\eb07"}.ri-building-2-fill:before{content:"\eb08"}.ri-building-2-line:before{content:"\eb09"}.ri-building-3-fill:before{content:"\eb0a"}.ri-building-3-line:before{content:"\eb0b"}.ri-building-4-fill:before{content:"\eb0c"}.ri-building-4-line:before{content:"\eb0d"}.ri-building-fill:before{content:"\eb0e"}.ri-building-line:before{content:"\eb0f"}.ri-bus-2-fill:before{content:"\eb10"}.ri-bus-2-line:before{content:"\eb11"}.ri-bus-fill:before{content:"\eb12"}.ri-bus-line:before{content:"\eb13"}.ri-bus-wifi-fill:before{content:"\eb14"}.ri-bus-wifi-line:before{content:"\eb15"}.ri-cactus-fill:before{content:"\eb16"}.ri-cactus-line:before{content:"\eb17"}.ri-cake-2-fill:before{content:"\eb18"}.ri-cake-2-line:before{content:"\eb19"}.ri-cake-3-fill:before{content:"\eb1a"}.ri-cake-3-line:before{content:"\eb1b"}.ri-cake-fill:before{content:"\eb1c"}.ri-cake-line:before{content:"\eb1d"}.ri-calculator-fill:before{content:"\eb1e"}.ri-calculator-line:before{content:"\eb1f"}.ri-calendar-2-fill:before{content:"\eb20"}.ri-calendar-2-line:before{content:"\eb21"}.ri-calendar-check-fill:before{content:"\eb22"}.ri-calendar-check-line:before{content:"\eb23"}.ri-calendar-event-fill:before{content:"\eb24"}.ri-calendar-event-line:before{content:"\eb25"}.ri-calendar-fill:before{content:"\eb26"}.ri-calendar-line:before{content:"\eb27"}.ri-calendar-todo-fill:before{content:"\eb28"}.ri-calendar-todo-line:before{content:"\eb29"}.ri-camera-2-fill:before{content:"\eb2a"}.ri-camera-2-line:before{content:"\eb2b"}.ri-camera-3-fill:before{content:"\eb2c"}.ri-camera-3-line:before{content:"\eb2d"}.ri-camera-fill:before{content:"\eb2e"}.ri-camera-lens-fill:before{content:"\eb2f"}.ri-camera-lens-line:before{content:"\eb30"}.ri-camera-line:before{content:"\eb31"}.ri-camera-off-fill:before{content:"\eb32"}.ri-camera-off-line:before{content:"\eb33"}.ri-camera-switch-fill:before{content:"\eb34"}.ri-camera-switch-line:before{content:"\eb35"}.ri-capsule-fill:before{content:"\eb36"}.ri-capsule-line:before{content:"\eb37"}.ri-car-fill:before{content:"\eb38"}.ri-car-line:before{content:"\eb39"}.ri-car-washing-fill:before{content:"\eb3a"}.ri-car-washing-line:before{content:"\eb3b"}.ri-caravan-fill:before{content:"\eb3c"}.ri-caravan-line:before{content:"\eb3d"}.ri-cast-fill:before{content:"\eb3e"}.ri-cast-line:before{content:"\eb3f"}.ri-cellphone-fill:before{content:"\eb40"}.ri-cellphone-line:before{content:"\eb41"}.ri-celsius-fill:before{content:"\eb42"}.ri-celsius-line:before{content:"\eb43"}.ri-centos-fill:before{content:"\eb44"}.ri-centos-line:before{content:"\eb45"}.ri-character-recognition-fill:before{content:"\eb46"}.ri-character-recognition-line:before{content:"\eb47"}.ri-charging-pile-2-fill:before{content:"\eb48"}.ri-charging-pile-2-line:before{content:"\eb49"}.ri-charging-pile-fill:before{content:"\eb4a"}.ri-charging-pile-line:before{content:"\eb4b"}.ri-chat-1-fill:before{content:"\eb4c"}.ri-chat-1-line:before{content:"\eb4d"}.ri-chat-2-fill:before{content:"\eb4e"}.ri-chat-2-line:before{content:"\eb4f"}.ri-chat-3-fill:before{content:"\eb50"}.ri-chat-3-line:before{content:"\eb51"}.ri-chat-4-fill:before{content:"\eb52"}.ri-chat-4-line:before{content:"\eb53"}.ri-chat-check-fill:before{content:"\eb54"}.ri-chat-check-line:before{content:"\eb55"}.ri-chat-delete-fill:before{content:"\eb56"}.ri-chat-delete-line:before{content:"\eb57"}.ri-chat-download-fill:before{content:"\eb58"}.ri-chat-download-line:before{content:"\eb59"}.ri-chat-follow-up-fill:before{content:"\eb5a"}.ri-chat-follow-up-line:before{content:"\eb5b"}.ri-chat-forward-fill:before{content:"\eb5c"}.ri-chat-forward-line:before{content:"\eb5d"}.ri-chat-heart-fill:before{content:"\eb5e"}.ri-chat-heart-line:before{content:"\eb5f"}.ri-chat-history-fill:before{content:"\eb60"}.ri-chat-history-line:before{content:"\eb61"}.ri-chat-new-fill:before{content:"\eb62"}.ri-chat-new-line:before{content:"\eb63"}.ri-chat-off-fill:before{content:"\eb64"}.ri-chat-off-line:before{content:"\eb65"}.ri-chat-poll-fill:before{content:"\eb66"}.ri-chat-poll-line:before{content:"\eb67"}.ri-chat-private-fill:before{content:"\eb68"}.ri-chat-private-line:before{content:"\eb69"}.ri-chat-quote-fill:before{content:"\eb6a"}.ri-chat-quote-line:before{content:"\eb6b"}.ri-chat-settings-fill:before{content:"\eb6c"}.ri-chat-settings-line:before{content:"\eb6d"}.ri-chat-smile-2-fill:before{content:"\eb6e"}.ri-chat-smile-2-line:before{content:"\eb6f"}.ri-chat-smile-3-fill:before{content:"\eb70"}.ri-chat-smile-3-line:before{content:"\eb71"}.ri-chat-smile-fill:before{content:"\eb72"}.ri-chat-smile-line:before{content:"\eb73"}.ri-chat-upload-fill:before{content:"\eb74"}.ri-chat-upload-line:before{content:"\eb75"}.ri-chat-voice-fill:before{content:"\eb76"}.ri-chat-voice-line:before{content:"\eb77"}.ri-check-double-fill:before{content:"\eb78"}.ri-check-double-line:before{content:"\eb79"}.ri-check-fill:before{content:"\eb7a"}.ri-check-line:before{content:"\eb7b"}.ri-checkbox-blank-circle-fill:before{content:"\eb7c"}.ri-checkbox-blank-circle-line:before{content:"\eb7d"}.ri-checkbox-blank-fill:before{content:"\eb7e"}.ri-checkbox-blank-line:before{content:"\eb7f"}.ri-checkbox-circle-fill:before{content:"\eb80"}.ri-checkbox-circle-line:before{content:"\eb81"}.ri-checkbox-fill:before{content:"\eb82"}.ri-checkbox-indeterminate-fill:before{content:"\eb83"}.ri-checkbox-indeterminate-line:before{content:"\eb84"}.ri-checkbox-line:before{content:"\eb85"}.ri-checkbox-multiple-blank-fill:before{content:"\eb86"}.ri-checkbox-multiple-blank-line:before{content:"\eb87"}.ri-checkbox-multiple-fill:before{content:"\eb88"}.ri-checkbox-multiple-line:before{content:"\eb89"}.ri-china-railway-fill:before{content:"\eb8a"}.ri-china-railway-line:before{content:"\eb8b"}.ri-chrome-fill:before{content:"\eb8c"}.ri-chrome-line:before{content:"\eb8d"}.ri-clapperboard-fill:before{content:"\eb8e"}.ri-clapperboard-line:before{content:"\eb8f"}.ri-clipboard-fill:before{content:"\eb90"}.ri-clipboard-line:before{content:"\eb91"}.ri-clockwise-2-fill:before{content:"\eb92"}.ri-clockwise-2-line:before{content:"\eb93"}.ri-clockwise-fill:before{content:"\eb94"}.ri-clockwise-line:before{content:"\eb95"}.ri-close-circle-fill:before{content:"\eb96"}.ri-close-circle-line:before{content:"\eb97"}.ri-close-fill:before{content:"\eb98"}.ri-close-line:before{content:"\eb99"}.ri-closed-captioning-fill:before{content:"\eb9a"}.ri-closed-captioning-line:before{content:"\eb9b"}.ri-cloud-fill:before{content:"\eb9c"}.ri-cloud-line:before{content:"\eb9d"}.ri-cloud-off-fill:before{content:"\eb9e"}.ri-cloud-off-line:before{content:"\eb9f"}.ri-cloud-windy-fill:before{content:"\eba0"}.ri-cloud-windy-line:before{content:"\eba1"}.ri-cloudy-2-fill:before{content:"\eba2"}.ri-cloudy-2-line:before{content:"\eba3"}.ri-cloudy-fill:before{content:"\eba4"}.ri-cloudy-line:before{content:"\eba5"}.ri-code-box-fill:before{content:"\eba6"}.ri-code-box-line:before{content:"\eba7"}.ri-code-fill:before{content:"\eba8"}.ri-code-line:before{content:"\eba9"}.ri-code-s-fill:before{content:"\ebaa"}.ri-code-s-line:before{content:"\ebab"}.ri-code-s-slash-fill:before{content:"\ebac"}.ri-code-s-slash-line:before{content:"\ebad"}.ri-code-view:before{content:"\ebae"}.ri-codepen-fill:before{content:"\ebaf"}.ri-codepen-line:before{content:"\ebb0"}.ri-coin-fill:before{content:"\ebb1"}.ri-coin-line:before{content:"\ebb2"}.ri-coins-fill:before{content:"\ebb3"}.ri-coins-line:before{content:"\ebb4"}.ri-collage-fill:before{content:"\ebb5"}.ri-collage-line:before{content:"\ebb6"}.ri-command-fill:before{content:"\ebb7"}.ri-command-line:before{content:"\ebb8"}.ri-community-fill:before{content:"\ebb9"}.ri-community-line:before{content:"\ebba"}.ri-compass-2-fill:before{content:"\ebbb"}.ri-compass-2-line:before{content:"\ebbc"}.ri-compass-3-fill:before{content:"\ebbd"}.ri-compass-3-line:before{content:"\ebbe"}.ri-compass-4-fill:before{content:"\ebbf"}.ri-compass-4-line:before{content:"\ebc0"}.ri-compass-discover-fill:before{content:"\ebc1"}.ri-compass-discover-line:before{content:"\ebc2"}.ri-compass-fill:before{content:"\ebc3"}.ri-compass-line:before{content:"\ebc4"}.ri-compasses-2-fill:before{content:"\ebc5"}.ri-compasses-2-line:before{content:"\ebc6"}.ri-compasses-fill:before{content:"\ebc7"}.ri-compasses-line:before{content:"\ebc8"}.ri-computer-fill:before{content:"\ebc9"}.ri-computer-line:before{content:"\ebca"}.ri-contacts-book-2-fill:before{content:"\ebcb"}.ri-contacts-book-2-line:before{content:"\ebcc"}.ri-contacts-book-fill:before{content:"\ebcd"}.ri-contacts-book-line:before{content:"\ebce"}.ri-contacts-book-upload-fill:before{content:"\ebcf"}.ri-contacts-book-upload-line:before{content:"\ebd0"}.ri-contacts-fill:before{content:"\ebd1"}.ri-contacts-line:before{content:"\ebd2"}.ri-contrast-2-fill:before{content:"\ebd3"}.ri-contrast-2-line:before{content:"\ebd4"}.ri-contrast-drop-2-fill:before{content:"\ebd5"}.ri-contrast-drop-2-line:before{content:"\ebd6"}.ri-contrast-drop-fill:before{content:"\ebd7"}.ri-contrast-drop-line:before{content:"\ebd8"}.ri-contrast-fill:before{content:"\ebd9"}.ri-contrast-line:before{content:"\ebda"}.ri-copper-coin-fill:before{content:"\ebdb"}.ri-copper-coin-line:before{content:"\ebdc"}.ri-copper-diamond-fill:before{content:"\ebdd"}.ri-copper-diamond-line:before{content:"\ebde"}.ri-copyleft-fill:before{content:"\ebdf"}.ri-copyleft-line:before{content:"\ebe0"}.ri-copyright-fill:before{content:"\ebe1"}.ri-copyright-line:before{content:"\ebe2"}.ri-coreos-fill:before{content:"\ebe3"}.ri-coreos-line:before{content:"\ebe4"}.ri-coupon-2-fill:before{content:"\ebe5"}.ri-coupon-2-line:before{content:"\ebe6"}.ri-coupon-3-fill:before{content:"\ebe7"}.ri-coupon-3-line:before{content:"\ebe8"}.ri-coupon-4-fill:before{content:"\ebe9"}.ri-coupon-4-line:before{content:"\ebea"}.ri-coupon-5-fill:before{content:"\ebeb"}.ri-coupon-5-line:before{content:"\ebec"}.ri-coupon-fill:before{content:"\ebed"}.ri-coupon-line:before{content:"\ebee"}.ri-cpu-fill:before{content:"\ebef"}.ri-cpu-line:before{content:"\ebf0"}.ri-creative-commons-by-fill:before{content:"\ebf1"}.ri-creative-commons-by-line:before{content:"\ebf2"}.ri-creative-commons-fill:before{content:"\ebf3"}.ri-creative-commons-line:before{content:"\ebf4"}.ri-creative-commons-nc-fill:before{content:"\ebf5"}.ri-creative-commons-nc-line:before{content:"\ebf6"}.ri-creative-commons-nd-fill:before{content:"\ebf7"}.ri-creative-commons-nd-line:before{content:"\ebf8"}.ri-creative-commons-sa-fill:before{content:"\ebf9"}.ri-creative-commons-sa-line:before{content:"\ebfa"}.ri-creative-commons-zero-fill:before{content:"\ebfb"}.ri-creative-commons-zero-line:before{content:"\ebfc"}.ri-criminal-fill:before{content:"\ebfd"}.ri-criminal-line:before{content:"\ebfe"}.ri-crop-2-fill:before{content:"\ebff"}.ri-crop-2-line:before{content:"\ec00"}.ri-crop-fill:before{content:"\ec01"}.ri-crop-line:before{content:"\ec02"}.ri-css3-fill:before{content:"\ec03"}.ri-css3-line:before{content:"\ec04"}.ri-cup-fill:before{content:"\ec05"}.ri-cup-line:before{content:"\ec06"}.ri-currency-fill:before{content:"\ec07"}.ri-currency-line:before{content:"\ec08"}.ri-cursor-fill:before{content:"\ec09"}.ri-cursor-line:before{content:"\ec0a"}.ri-customer-service-2-fill:before{content:"\ec0b"}.ri-customer-service-2-line:before{content:"\ec0c"}.ri-customer-service-fill:before{content:"\ec0d"}.ri-customer-service-line:before{content:"\ec0e"}.ri-dashboard-2-fill:before{content:"\ec0f"}.ri-dashboard-2-line:before{content:"\ec10"}.ri-dashboard-3-fill:before{content:"\ec11"}.ri-dashboard-3-line:before{content:"\ec12"}.ri-dashboard-fill:before{content:"\ec13"}.ri-dashboard-line:before{content:"\ec14"}.ri-database-2-fill:before{content:"\ec15"}.ri-database-2-line:before{content:"\ec16"}.ri-database-fill:before{content:"\ec17"}.ri-database-line:before{content:"\ec18"}.ri-delete-back-2-fill:before{content:"\ec19"}.ri-delete-back-2-line:before{content:"\ec1a"}.ri-delete-back-fill:before{content:"\ec1b"}.ri-delete-back-line:before{content:"\ec1c"}.ri-delete-bin-2-fill:before{content:"\ec1d"}.ri-delete-bin-2-line:before{content:"\ec1e"}.ri-delete-bin-3-fill:before{content:"\ec1f"}.ri-delete-bin-3-line:before{content:"\ec20"}.ri-delete-bin-4-fill:before{content:"\ec21"}.ri-delete-bin-4-line:before{content:"\ec22"}.ri-delete-bin-5-fill:before{content:"\ec23"}.ri-delete-bin-5-line:before{content:"\ec24"}.ri-delete-bin-6-fill:before{content:"\ec25"}.ri-delete-bin-6-line:before{content:"\ec26"}.ri-delete-bin-7-fill:before{content:"\ec27"}.ri-delete-bin-7-line:before{content:"\ec28"}.ri-delete-bin-fill:before{content:"\ec29"}.ri-delete-bin-line:before{content:"\ec2a"}.ri-delete-column:before{content:"\ec2b"}.ri-delete-row:before{content:"\ec2c"}.ri-device-fill:before{content:"\ec2d"}.ri-device-line:before{content:"\ec2e"}.ri-device-recover-fill:before{content:"\ec2f"}.ri-device-recover-line:before{content:"\ec30"}.ri-dingding-fill:before{content:"\ec31"}.ri-dingding-line:before{content:"\ec32"}.ri-direction-fill:before{content:"\ec33"}.ri-direction-line:before{content:"\ec34"}.ri-disc-fill:before{content:"\ec35"}.ri-disc-line:before{content:"\ec36"}.ri-discord-fill:before{content:"\ec37"}.ri-discord-line:before{content:"\ec38"}.ri-discuss-fill:before{content:"\ec39"}.ri-discuss-line:before{content:"\ec3a"}.ri-dislike-fill:before{content:"\ec3b"}.ri-dislike-line:before{content:"\ec3c"}.ri-disqus-fill:before{content:"\ec3d"}.ri-disqus-line:before{content:"\ec3e"}.ri-divide-fill:before{content:"\ec3f"}.ri-divide-line:before{content:"\ec40"}.ri-donut-chart-fill:before{content:"\ec41"}.ri-donut-chart-line:before{content:"\ec42"}.ri-door-closed-fill:before{content:"\ec43"}.ri-door-closed-line:before{content:"\ec44"}.ri-door-fill:before{content:"\ec45"}.ri-door-line:before{content:"\ec46"}.ri-door-lock-box-fill:before{content:"\ec47"}.ri-door-lock-box-line:before{content:"\ec48"}.ri-door-lock-fill:before{content:"\ec49"}.ri-door-lock-line:before{content:"\ec4a"}.ri-door-open-fill:before{content:"\ec4b"}.ri-door-open-line:before{content:"\ec4c"}.ri-dossier-fill:before{content:"\ec4d"}.ri-dossier-line:before{content:"\ec4e"}.ri-douban-fill:before{content:"\ec4f"}.ri-douban-line:before{content:"\ec50"}.ri-double-quotes-l:before{content:"\ec51"}.ri-double-quotes-r:before{content:"\ec52"}.ri-download-2-fill:before{content:"\ec53"}.ri-download-2-line:before{content:"\ec54"}.ri-download-cloud-2-fill:before{content:"\ec55"}.ri-download-cloud-2-line:before{content:"\ec56"}.ri-download-cloud-fill:before{content:"\ec57"}.ri-download-cloud-line:before{content:"\ec58"}.ri-download-fill:before{content:"\ec59"}.ri-download-line:before{content:"\ec5a"}.ri-draft-fill:before{content:"\ec5b"}.ri-draft-line:before{content:"\ec5c"}.ri-drag-drop-fill:before{content:"\ec5d"}.ri-drag-drop-line:before{content:"\ec5e"}.ri-drag-move-2-fill:before{content:"\ec5f"}.ri-drag-move-2-line:before{content:"\ec60"}.ri-drag-move-fill:before{content:"\ec61"}.ri-drag-move-line:before{content:"\ec62"}.ri-dribbble-fill:before{content:"\ec63"}.ri-dribbble-line:before{content:"\ec64"}.ri-drive-fill:before{content:"\ec65"}.ri-drive-line:before{content:"\ec66"}.ri-drizzle-fill:before{content:"\ec67"}.ri-drizzle-line:before{content:"\ec68"}.ri-drop-fill:before{content:"\ec69"}.ri-drop-line:before{content:"\ec6a"}.ri-dropbox-fill:before{content:"\ec6b"}.ri-dropbox-line:before{content:"\ec6c"}.ri-dual-sim-1-fill:before{content:"\ec6d"}.ri-dual-sim-1-line:before{content:"\ec6e"}.ri-dual-sim-2-fill:before{content:"\ec6f"}.ri-dual-sim-2-line:before{content:"\ec70"}.ri-dv-fill:before{content:"\ec71"}.ri-dv-line:before{content:"\ec72"}.ri-dvd-fill:before{content:"\ec73"}.ri-dvd-line:before{content:"\ec74"}.ri-e-bike-2-fill:before{content:"\ec75"}.ri-e-bike-2-line:before{content:"\ec76"}.ri-e-bike-fill:before{content:"\ec77"}.ri-e-bike-line:before{content:"\ec78"}.ri-earth-fill:before{content:"\ec79"}.ri-earth-line:before{content:"\ec7a"}.ri-earthquake-fill:before{content:"\ec7b"}.ri-earthquake-line:before{content:"\ec7c"}.ri-edge-fill:before{content:"\ec7d"}.ri-edge-line:before{content:"\ec7e"}.ri-edit-2-fill:before{content:"\ec7f"}.ri-edit-2-line:before{content:"\ec80"}.ri-edit-box-fill:before{content:"\ec81"}.ri-edit-box-line:before{content:"\ec82"}.ri-edit-circle-fill:before{content:"\ec83"}.ri-edit-circle-line:before{content:"\ec84"}.ri-edit-fill:before{content:"\ec85"}.ri-edit-line:before{content:"\ec86"}.ri-eject-fill:before{content:"\ec87"}.ri-eject-line:before{content:"\ec88"}.ri-emotion-2-fill:before{content:"\ec89"}.ri-emotion-2-line:before{content:"\ec8a"}.ri-emotion-fill:before{content:"\ec8b"}.ri-emotion-happy-fill:before{content:"\ec8c"}.ri-emotion-happy-line:before{content:"\ec8d"}.ri-emotion-laugh-fill:before{content:"\ec8e"}.ri-emotion-laugh-line:before{content:"\ec8f"}.ri-emotion-line:before{content:"\ec90"}.ri-emotion-normal-fill:before{content:"\ec91"}.ri-emotion-normal-line:before{content:"\ec92"}.ri-emotion-sad-fill:before{content:"\ec93"}.ri-emotion-sad-line:before{content:"\ec94"}.ri-emotion-unhappy-fill:before{content:"\ec95"}.ri-emotion-unhappy-line:before{content:"\ec96"}.ri-empathize-fill:before{content:"\ec97"}.ri-empathize-line:before{content:"\ec98"}.ri-emphasis-cn:before{content:"\ec99"}.ri-emphasis:before{content:"\ec9a"}.ri-english-input:before{content:"\ec9b"}.ri-equalizer-fill:before{content:"\ec9c"}.ri-equalizer-line:before{content:"\ec9d"}.ri-eraser-fill:before{content:"\ec9e"}.ri-eraser-line:before{content:"\ec9f"}.ri-error-warning-fill:before{content:"\eca0"}.ri-error-warning-line:before{content:"\eca1"}.ri-evernote-fill:before{content:"\eca2"}.ri-evernote-line:before{content:"\eca3"}.ri-exchange-box-fill:before{content:"\eca4"}.ri-exchange-box-line:before{content:"\eca5"}.ri-exchange-cny-fill:before{content:"\eca6"}.ri-exchange-cny-line:before{content:"\eca7"}.ri-exchange-dollar-fill:before{content:"\eca8"}.ri-exchange-dollar-line:before{content:"\eca9"}.ri-exchange-fill:before{content:"\ecaa"}.ri-exchange-funds-fill:before{content:"\ecab"}.ri-exchange-funds-line:before{content:"\ecac"}.ri-exchange-line:before{content:"\ecad"}.ri-external-link-fill:before{content:"\ecae"}.ri-external-link-line:before{content:"\ecaf"}.ri-eye-2-fill:before{content:"\ecb0"}.ri-eye-2-line:before{content:"\ecb1"}.ri-eye-close-fill:before{content:"\ecb2"}.ri-eye-close-line:before{content:"\ecb3"}.ri-eye-fill:before{content:"\ecb4"}.ri-eye-line:before{content:"\ecb5"}.ri-eye-off-fill:before{content:"\ecb6"}.ri-eye-off-line:before{content:"\ecb7"}.ri-facebook-box-fill:before{content:"\ecb8"}.ri-facebook-box-line:before{content:"\ecb9"}.ri-facebook-circle-fill:before{content:"\ecba"}.ri-facebook-circle-line:before{content:"\ecbb"}.ri-facebook-fill:before{content:"\ecbc"}.ri-facebook-line:before{content:"\ecbd"}.ri-fahrenheit-fill:before{content:"\ecbe"}.ri-fahrenheit-line:before{content:"\ecbf"}.ri-feedback-fill:before{content:"\ecc0"}.ri-feedback-line:before{content:"\ecc1"}.ri-file-2-fill:before{content:"\ecc2"}.ri-file-2-line:before{content:"\ecc3"}.ri-file-3-fill:before{content:"\ecc4"}.ri-file-3-line:before{content:"\ecc5"}.ri-file-4-fill:before{content:"\ecc6"}.ri-file-4-line:before{content:"\ecc7"}.ri-file-add-fill:before{content:"\ecc8"}.ri-file-add-line:before{content:"\ecc9"}.ri-file-chart-2-fill:before{content:"\ecca"}.ri-file-chart-2-line:before{content:"\eccb"}.ri-file-chart-fill:before{content:"\eccc"}.ri-file-chart-line:before{content:"\eccd"}.ri-file-cloud-fill:before{content:"\ecce"}.ri-file-cloud-line:before{content:"\eccf"}.ri-file-code-fill:before{content:"\ecd0"}.ri-file-code-line:before{content:"\ecd1"}.ri-file-copy-2-fill:before{content:"\ecd2"}.ri-file-copy-2-line:before{content:"\ecd3"}.ri-file-copy-fill:before{content:"\ecd4"}.ri-file-copy-line:before{content:"\ecd5"}.ri-file-damage-fill:before{content:"\ecd6"}.ri-file-damage-line:before{content:"\ecd7"}.ri-file-download-fill:before{content:"\ecd8"}.ri-file-download-line:before{content:"\ecd9"}.ri-file-edit-fill:before{content:"\ecda"}.ri-file-edit-line:before{content:"\ecdb"}.ri-file-excel-2-fill:before{content:"\ecdc"}.ri-file-excel-2-line:before{content:"\ecdd"}.ri-file-excel-fill:before{content:"\ecde"}.ri-file-excel-line:before{content:"\ecdf"}.ri-file-fill:before{content:"\ece0"}.ri-file-forbid-fill:before{content:"\ece1"}.ri-file-forbid-line:before{content:"\ece2"}.ri-file-gif-fill:before{content:"\ece3"}.ri-file-gif-line:before{content:"\ece4"}.ri-file-history-fill:before{content:"\ece5"}.ri-file-history-line:before{content:"\ece6"}.ri-file-hwp-fill:before{content:"\ece7"}.ri-file-hwp-line:before{content:"\ece8"}.ri-file-info-fill:before{content:"\ece9"}.ri-file-info-line:before{content:"\ecea"}.ri-file-line:before{content:"\eceb"}.ri-file-list-2-fill:before{content:"\ecec"}.ri-file-list-2-line:before{content:"\eced"}.ri-file-list-3-fill:before{content:"\ecee"}.ri-file-list-3-line:before{content:"\ecef"}.ri-file-list-fill:before{content:"\ecf0"}.ri-file-list-line:before{content:"\ecf1"}.ri-file-lock-fill:before{content:"\ecf2"}.ri-file-lock-line:before{content:"\ecf3"}.ri-file-mark-fill:before{content:"\ecf4"}.ri-file-mark-line:before{content:"\ecf5"}.ri-file-music-fill:before{content:"\ecf6"}.ri-file-music-line:before{content:"\ecf7"}.ri-file-paper-2-fill:before{content:"\ecf8"}.ri-file-paper-2-line:before{content:"\ecf9"}.ri-file-paper-fill:before{content:"\ecfa"}.ri-file-paper-line:before{content:"\ecfb"}.ri-file-pdf-fill:before{content:"\ecfc"}.ri-file-pdf-line:before{content:"\ecfd"}.ri-file-ppt-2-fill:before{content:"\ecfe"}.ri-file-ppt-2-line:before{content:"\ecff"}.ri-file-ppt-fill:before{content:"\ed00"}.ri-file-ppt-line:before{content:"\ed01"}.ri-file-reduce-fill:before{content:"\ed02"}.ri-file-reduce-line:before{content:"\ed03"}.ri-file-search-fill:before{content:"\ed04"}.ri-file-search-line:before{content:"\ed05"}.ri-file-settings-fill:before{content:"\ed06"}.ri-file-settings-line:before{content:"\ed07"}.ri-file-shield-2-fill:before{content:"\ed08"}.ri-file-shield-2-line:before{content:"\ed09"}.ri-file-shield-fill:before{content:"\ed0a"}.ri-file-shield-line:before{content:"\ed0b"}.ri-file-shred-fill:before{content:"\ed0c"}.ri-file-shred-line:before{content:"\ed0d"}.ri-file-text-fill:before{content:"\ed0e"}.ri-file-text-line:before{content:"\ed0f"}.ri-file-transfer-fill:before{content:"\ed10"}.ri-file-transfer-line:before{content:"\ed11"}.ri-file-unknow-fill:before{content:"\ed12"}.ri-file-unknow-line:before{content:"\ed13"}.ri-file-upload-fill:before{content:"\ed14"}.ri-file-upload-line:before{content:"\ed15"}.ri-file-user-fill:before{content:"\ed16"}.ri-file-user-line:before{content:"\ed17"}.ri-file-warning-fill:before{content:"\ed18"}.ri-file-warning-line:before{content:"\ed19"}.ri-file-word-2-fill:before{content:"\ed1a"}.ri-file-word-2-line:before{content:"\ed1b"}.ri-file-word-fill:before{content:"\ed1c"}.ri-file-word-line:before{content:"\ed1d"}.ri-file-zip-fill:before{content:"\ed1e"}.ri-file-zip-line:before{content:"\ed1f"}.ri-film-fill:before{content:"\ed20"}.ri-film-line:before{content:"\ed21"}.ri-filter-2-fill:before{content:"\ed22"}.ri-filter-2-line:before{content:"\ed23"}.ri-filter-3-fill:before{content:"\ed24"}.ri-filter-3-line:before{content:"\ed25"}.ri-filter-fill:before{content:"\ed26"}.ri-filter-line:before{content:"\ed27"}.ri-filter-off-fill:before{content:"\ed28"}.ri-filter-off-line:before{content:"\ed29"}.ri-find-replace-fill:before{content:"\ed2a"}.ri-find-replace-line:before{content:"\ed2b"}.ri-finder-fill:before{content:"\ed2c"}.ri-finder-line:before{content:"\ed2d"}.ri-fingerprint-2-fill:before{content:"\ed2e"}.ri-fingerprint-2-line:before{content:"\ed2f"}.ri-fingerprint-fill:before{content:"\ed30"}.ri-fingerprint-line:before{content:"\ed31"}.ri-fire-fill:before{content:"\ed32"}.ri-fire-line:before{content:"\ed33"}.ri-firefox-fill:before{content:"\ed34"}.ri-firefox-line:before{content:"\ed35"}.ri-first-aid-kit-fill:before{content:"\ed36"}.ri-first-aid-kit-line:before{content:"\ed37"}.ri-flag-2-fill:before{content:"\ed38"}.ri-flag-2-line:before{content:"\ed39"}.ri-flag-fill:before{content:"\ed3a"}.ri-flag-line:before{content:"\ed3b"}.ri-flashlight-fill:before{content:"\ed3c"}.ri-flashlight-line:before{content:"\ed3d"}.ri-flask-fill:before{content:"\ed3e"}.ri-flask-line:before{content:"\ed3f"}.ri-flight-land-fill:before{content:"\ed40"}.ri-flight-land-line:before{content:"\ed41"}.ri-flight-takeoff-fill:before{content:"\ed42"}.ri-flight-takeoff-line:before{content:"\ed43"}.ri-flood-fill:before{content:"\ed44"}.ri-flood-line:before{content:"\ed45"}.ri-flow-chart:before{content:"\ed46"}.ri-flutter-fill:before{content:"\ed47"}.ri-flutter-line:before{content:"\ed48"}.ri-focus-2-fill:before{content:"\ed49"}.ri-focus-2-line:before{content:"\ed4a"}.ri-focus-3-fill:before{content:"\ed4b"}.ri-focus-3-line:before{content:"\ed4c"}.ri-focus-fill:before{content:"\ed4d"}.ri-focus-line:before{content:"\ed4e"}.ri-foggy-fill:before{content:"\ed4f"}.ri-foggy-line:before{content:"\ed50"}.ri-folder-2-fill:before{content:"\ed51"}.ri-folder-2-line:before{content:"\ed52"}.ri-folder-3-fill:before{content:"\ed53"}.ri-folder-3-line:before{content:"\ed54"}.ri-folder-4-fill:before{content:"\ed55"}.ri-folder-4-line:before{content:"\ed56"}.ri-folder-5-fill:before{content:"\ed57"}.ri-folder-5-line:before{content:"\ed58"}.ri-folder-add-fill:before{content:"\ed59"}.ri-folder-add-line:before{content:"\ed5a"}.ri-folder-chart-2-fill:before{content:"\ed5b"}.ri-folder-chart-2-line:before{content:"\ed5c"}.ri-folder-chart-fill:before{content:"\ed5d"}.ri-folder-chart-line:before{content:"\ed5e"}.ri-folder-download-fill:before{content:"\ed5f"}.ri-folder-download-line:before{content:"\ed60"}.ri-folder-fill:before{content:"\ed61"}.ri-folder-forbid-fill:before{content:"\ed62"}.ri-folder-forbid-line:before{content:"\ed63"}.ri-folder-history-fill:before{content:"\ed64"}.ri-folder-history-line:before{content:"\ed65"}.ri-folder-info-fill:before{content:"\ed66"}.ri-folder-info-line:before{content:"\ed67"}.ri-folder-keyhole-fill:before{content:"\ed68"}.ri-folder-keyhole-line:before{content:"\ed69"}.ri-folder-line:before{content:"\ed6a"}.ri-folder-lock-fill:before{content:"\ed6b"}.ri-folder-lock-line:before{content:"\ed6c"}.ri-folder-music-fill:before{content:"\ed6d"}.ri-folder-music-line:before{content:"\ed6e"}.ri-folder-open-fill:before{content:"\ed6f"}.ri-folder-open-line:before{content:"\ed70"}.ri-folder-received-fill:before{content:"\ed71"}.ri-folder-received-line:before{content:"\ed72"}.ri-folder-reduce-fill:before{content:"\ed73"}.ri-folder-reduce-line:before{content:"\ed74"}.ri-folder-settings-fill:before{content:"\ed75"}.ri-folder-settings-line:before{content:"\ed76"}.ri-folder-shared-fill:before{content:"\ed77"}.ri-folder-shared-line:before{content:"\ed78"}.ri-folder-shield-2-fill:before{content:"\ed79"}.ri-folder-shield-2-line:before{content:"\ed7a"}.ri-folder-shield-fill:before{content:"\ed7b"}.ri-folder-shield-line:before{content:"\ed7c"}.ri-folder-transfer-fill:before{content:"\ed7d"}.ri-folder-transfer-line:before{content:"\ed7e"}.ri-folder-unknow-fill:before{content:"\ed7f"}.ri-folder-unknow-line:before{content:"\ed80"}.ri-folder-upload-fill:before{content:"\ed81"}.ri-folder-upload-line:before{content:"\ed82"}.ri-folder-user-fill:before{content:"\ed83"}.ri-folder-user-line:before{content:"\ed84"}.ri-folder-warning-fill:before{content:"\ed85"}.ri-folder-warning-line:before{content:"\ed86"}.ri-folder-zip-fill:before{content:"\ed87"}.ri-folder-zip-line:before{content:"\ed88"}.ri-folders-fill:before{content:"\ed89"}.ri-folders-line:before{content:"\ed8a"}.ri-font-color:before{content:"\ed8b"}.ri-font-size-2:before{content:"\ed8c"}.ri-font-size:before{content:"\ed8d"}.ri-football-fill:before{content:"\ed8e"}.ri-football-line:before{content:"\ed8f"}.ri-footprint-fill:before{content:"\ed90"}.ri-footprint-line:before{content:"\ed91"}.ri-forbid-2-fill:before{content:"\ed92"}.ri-forbid-2-line:before{content:"\ed93"}.ri-forbid-fill:before{content:"\ed94"}.ri-forbid-line:before{content:"\ed95"}.ri-format-clear:before{content:"\ed96"}.ri-fridge-fill:before{content:"\ed97"}.ri-fridge-line:before{content:"\ed98"}.ri-fullscreen-exit-fill:before{content:"\ed99"}.ri-fullscreen-exit-line:before{content:"\ed9a"}.ri-fullscreen-fill:before{content:"\ed9b"}.ri-fullscreen-line:before{content:"\ed9c"}.ri-function-fill:before{content:"\ed9d"}.ri-function-line:before{content:"\ed9e"}.ri-functions:before{content:"\ed9f"}.ri-funds-box-fill:before{content:"\eda0"}.ri-funds-box-line:before{content:"\eda1"}.ri-funds-fill:before{content:"\eda2"}.ri-funds-line:before{content:"\eda3"}.ri-gallery-fill:before{content:"\eda4"}.ri-gallery-line:before{content:"\eda5"}.ri-gallery-upload-fill:before{content:"\eda6"}.ri-gallery-upload-line:before{content:"\eda7"}.ri-game-fill:before{content:"\eda8"}.ri-game-line:before{content:"\eda9"}.ri-gamepad-fill:before{content:"\edaa"}.ri-gamepad-line:before{content:"\edab"}.ri-gas-station-fill:before{content:"\edac"}.ri-gas-station-line:before{content:"\edad"}.ri-gatsby-fill:before{content:"\edae"}.ri-gatsby-line:before{content:"\edaf"}.ri-genderless-fill:before{content:"\edb0"}.ri-genderless-line:before{content:"\edb1"}.ri-ghost-2-fill:before{content:"\edb2"}.ri-ghost-2-line:before{content:"\edb3"}.ri-ghost-fill:before{content:"\edb4"}.ri-ghost-line:before{content:"\edb5"}.ri-ghost-smile-fill:before{content:"\edb6"}.ri-ghost-smile-line:before{content:"\edb7"}.ri-gift-2-fill:before{content:"\edb8"}.ri-gift-2-line:before{content:"\edb9"}.ri-gift-fill:before{content:"\edba"}.ri-gift-line:before{content:"\edbb"}.ri-git-branch-fill:before{content:"\edbc"}.ri-git-branch-line:before{content:"\edbd"}.ri-git-commit-fill:before{content:"\edbe"}.ri-git-commit-line:before{content:"\edbf"}.ri-git-merge-fill:before{content:"\edc0"}.ri-git-merge-line:before{content:"\edc1"}.ri-git-pull-request-fill:before{content:"\edc2"}.ri-git-pull-request-line:before{content:"\edc3"}.ri-git-repository-commits-fill:before{content:"\edc4"}.ri-git-repository-commits-line:before{content:"\edc5"}.ri-git-repository-fill:before{content:"\edc6"}.ri-git-repository-line:before{content:"\edc7"}.ri-git-repository-private-fill:before{content:"\edc8"}.ri-git-repository-private-line:before{content:"\edc9"}.ri-github-fill:before{content:"\edca"}.ri-github-line:before{content:"\edcb"}.ri-gitlab-fill:before{content:"\edcc"}.ri-gitlab-line:before{content:"\edcd"}.ri-global-fill:before{content:"\edce"}.ri-global-line:before{content:"\edcf"}.ri-globe-fill:before{content:"\edd0"}.ri-globe-line:before{content:"\edd1"}.ri-goblet-fill:before{content:"\edd2"}.ri-goblet-line:before{content:"\edd3"}.ri-google-fill:before{content:"\edd4"}.ri-google-line:before{content:"\edd5"}.ri-google-play-fill:before{content:"\edd6"}.ri-google-play-line:before{content:"\edd7"}.ri-government-fill:before{content:"\edd8"}.ri-government-line:before{content:"\edd9"}.ri-gps-fill:before{content:"\edda"}.ri-gps-line:before{content:"\eddb"}.ri-gradienter-fill:before{content:"\eddc"}.ri-gradienter-line:before{content:"\eddd"}.ri-grid-fill:before{content:"\edde"}.ri-grid-line:before{content:"\eddf"}.ri-group-2-fill:before{content:"\ede0"}.ri-group-2-line:before{content:"\ede1"}.ri-group-fill:before{content:"\ede2"}.ri-group-line:before{content:"\ede3"}.ri-guide-fill:before{content:"\ede4"}.ri-guide-line:before{content:"\ede5"}.ri-h-1:before{content:"\ede6"}.ri-h-2:before{content:"\ede7"}.ri-h-3:before{content:"\ede8"}.ri-h-4:before{content:"\ede9"}.ri-h-5:before{content:"\edea"}.ri-h-6:before{content:"\edeb"}.ri-hail-fill:before{content:"\edec"}.ri-hail-line:before{content:"\eded"}.ri-hammer-fill:before{content:"\edee"}.ri-hammer-line:before{content:"\edef"}.ri-hand-coin-fill:before{content:"\edf0"}.ri-hand-coin-line:before{content:"\edf1"}.ri-hand-heart-fill:before{content:"\edf2"}.ri-hand-heart-line:before{content:"\edf3"}.ri-hand-sanitizer-fill:before{content:"\edf4"}.ri-hand-sanitizer-line:before{content:"\edf5"}.ri-handbag-fill:before{content:"\edf6"}.ri-handbag-line:before{content:"\edf7"}.ri-hard-drive-2-fill:before{content:"\edf8"}.ri-hard-drive-2-line:before{content:"\edf9"}.ri-hard-drive-fill:before{content:"\edfa"}.ri-hard-drive-line:before{content:"\edfb"}.ri-hashtag:before{content:"\edfc"}.ri-haze-2-fill:before{content:"\edfd"}.ri-haze-2-line:before{content:"\edfe"}.ri-haze-fill:before{content:"\edff"}.ri-haze-line:before{content:"\ee00"}.ri-hd-fill:before{content:"\ee01"}.ri-hd-line:before{content:"\ee02"}.ri-heading:before{content:"\ee03"}.ri-headphone-fill:before{content:"\ee04"}.ri-headphone-line:before{content:"\ee05"}.ri-health-book-fill:before{content:"\ee06"}.ri-health-book-line:before{content:"\ee07"}.ri-heart-2-fill:before{content:"\ee08"}.ri-heart-2-line:before{content:"\ee09"}.ri-heart-3-fill:before{content:"\ee0a"}.ri-heart-3-line:before{content:"\ee0b"}.ri-heart-add-fill:before{content:"\ee0c"}.ri-heart-add-line:before{content:"\ee0d"}.ri-heart-fill:before{content:"\ee0e"}.ri-heart-line:before{content:"\ee0f"}.ri-heart-pulse-fill:before{content:"\ee10"}.ri-heart-pulse-line:before{content:"\ee11"}.ri-hearts-fill:before{content:"\ee12"}.ri-hearts-line:before{content:"\ee13"}.ri-heavy-showers-fill:before{content:"\ee14"}.ri-heavy-showers-line:before{content:"\ee15"}.ri-history-fill:before{content:"\ee16"}.ri-history-line:before{content:"\ee17"}.ri-home-2-fill:before{content:"\ee18"}.ri-home-2-line:before{content:"\ee19"}.ri-home-3-fill:before{content:"\ee1a"}.ri-home-3-line:before{content:"\ee1b"}.ri-home-4-fill:before{content:"\ee1c"}.ri-home-4-line:before{content:"\ee1d"}.ri-home-5-fill:before{content:"\ee1e"}.ri-home-5-line:before{content:"\ee1f"}.ri-home-6-fill:before{content:"\ee20"}.ri-home-6-line:before{content:"\ee21"}.ri-home-7-fill:before{content:"\ee22"}.ri-home-7-line:before{content:"\ee23"}.ri-home-8-fill:before{content:"\ee24"}.ri-home-8-line:before{content:"\ee25"}.ri-home-fill:before{content:"\ee26"}.ri-home-gear-fill:before{content:"\ee27"}.ri-home-gear-line:before{content:"\ee28"}.ri-home-heart-fill:before{content:"\ee29"}.ri-home-heart-line:before{content:"\ee2a"}.ri-home-line:before{content:"\ee2b"}.ri-home-smile-2-fill:before{content:"\ee2c"}.ri-home-smile-2-line:before{content:"\ee2d"}.ri-home-smile-fill:before{content:"\ee2e"}.ri-home-smile-line:before{content:"\ee2f"}.ri-home-wifi-fill:before{content:"\ee30"}.ri-home-wifi-line:before{content:"\ee31"}.ri-honor-of-kings-fill:before{content:"\ee32"}.ri-honor-of-kings-line:before{content:"\ee33"}.ri-honour-fill:before{content:"\ee34"}.ri-honour-line:before{content:"\ee35"}.ri-hospital-fill:before{content:"\ee36"}.ri-hospital-line:before{content:"\ee37"}.ri-hotel-bed-fill:before{content:"\ee38"}.ri-hotel-bed-line:before{content:"\ee39"}.ri-hotel-fill:before{content:"\ee3a"}.ri-hotel-line:before{content:"\ee3b"}.ri-hotspot-fill:before{content:"\ee3c"}.ri-hotspot-line:before{content:"\ee3d"}.ri-hq-fill:before{content:"\ee3e"}.ri-hq-line:before{content:"\ee3f"}.ri-html5-fill:before{content:"\ee40"}.ri-html5-line:before{content:"\ee41"}.ri-ie-fill:before{content:"\ee42"}.ri-ie-line:before{content:"\ee43"}.ri-image-2-fill:before{content:"\ee44"}.ri-image-2-line:before{content:"\ee45"}.ri-image-add-fill:before{content:"\ee46"}.ri-image-add-line:before{content:"\ee47"}.ri-image-edit-fill:before{content:"\ee48"}.ri-image-edit-line:before{content:"\ee49"}.ri-image-fill:before{content:"\ee4a"}.ri-image-line:before{content:"\ee4b"}.ri-inbox-archive-fill:before{content:"\ee4c"}.ri-inbox-archive-line:before{content:"\ee4d"}.ri-inbox-fill:before{content:"\ee4e"}.ri-inbox-line:before{content:"\ee4f"}.ri-inbox-unarchive-fill:before{content:"\ee50"}.ri-inbox-unarchive-line:before{content:"\ee51"}.ri-increase-decrease-fill:before{content:"\ee52"}.ri-increase-decrease-line:before{content:"\ee53"}.ri-indent-decrease:before{content:"\ee54"}.ri-indent-increase:before{content:"\ee55"}.ri-indeterminate-circle-fill:before{content:"\ee56"}.ri-indeterminate-circle-line:before{content:"\ee57"}.ri-information-fill:before{content:"\ee58"}.ri-information-line:before{content:"\ee59"}.ri-infrared-thermometer-fill:before{content:"\ee5a"}.ri-infrared-thermometer-line:before{content:"\ee5b"}.ri-ink-bottle-fill:before{content:"\ee5c"}.ri-ink-bottle-line:before{content:"\ee5d"}.ri-input-cursor-move:before{content:"\ee5e"}.ri-input-method-fill:before{content:"\ee5f"}.ri-input-method-line:before{content:"\ee60"}.ri-insert-column-left:before{content:"\ee61"}.ri-insert-column-right:before{content:"\ee62"}.ri-insert-row-bottom:before{content:"\ee63"}.ri-insert-row-top:before{content:"\ee64"}.ri-instagram-fill:before{content:"\ee65"}.ri-instagram-line:before{content:"\ee66"}.ri-install-fill:before{content:"\ee67"}.ri-install-line:before{content:"\ee68"}.ri-invision-fill:before{content:"\ee69"}.ri-invision-line:before{content:"\ee6a"}.ri-italic:before{content:"\ee6b"}.ri-kakao-talk-fill:before{content:"\ee6c"}.ri-kakao-talk-line:before{content:"\ee6d"}.ri-key-2-fill:before{content:"\ee6e"}.ri-key-2-line:before{content:"\ee6f"}.ri-key-fill:before{content:"\ee70"}.ri-key-line:before{content:"\ee71"}.ri-keyboard-box-fill:before{content:"\ee72"}.ri-keyboard-box-line:before{content:"\ee73"}.ri-keyboard-fill:before{content:"\ee74"}.ri-keyboard-line:before{content:"\ee75"}.ri-keynote-fill:before{content:"\ee76"}.ri-keynote-line:before{content:"\ee77"}.ri-knife-blood-fill:before{content:"\ee78"}.ri-knife-blood-line:before{content:"\ee79"}.ri-knife-fill:before{content:"\ee7a"}.ri-knife-line:before{content:"\ee7b"}.ri-landscape-fill:before{content:"\ee7c"}.ri-landscape-line:before{content:"\ee7d"}.ri-layout-2-fill:before{content:"\ee7e"}.ri-layout-2-line:before{content:"\ee7f"}.ri-layout-3-fill:before{content:"\ee80"}.ri-layout-3-line:before{content:"\ee81"}.ri-layout-4-fill:before{content:"\ee82"}.ri-layout-4-line:before{content:"\ee83"}.ri-layout-5-fill:before{content:"\ee84"}.ri-layout-5-line:before{content:"\ee85"}.ri-layout-6-fill:before{content:"\ee86"}.ri-layout-6-line:before{content:"\ee87"}.ri-layout-bottom-2-fill:before{content:"\ee88"}.ri-layout-bottom-2-line:before{content:"\ee89"}.ri-layout-bottom-fill:before{content:"\ee8a"}.ri-layout-bottom-line:before{content:"\ee8b"}.ri-layout-column-fill:before{content:"\ee8c"}.ri-layout-column-line:before{content:"\ee8d"}.ri-layout-fill:before{content:"\ee8e"}.ri-layout-grid-fill:before{content:"\ee8f"}.ri-layout-grid-line:before{content:"\ee90"}.ri-layout-left-2-fill:before{content:"\ee91"}.ri-layout-left-2-line:before{content:"\ee92"}.ri-layout-left-fill:before{content:"\ee93"}.ri-layout-left-line:before{content:"\ee94"}.ri-layout-line:before{content:"\ee95"}.ri-layout-masonry-fill:before{content:"\ee96"}.ri-layout-masonry-line:before{content:"\ee97"}.ri-layout-right-2-fill:before{content:"\ee98"}.ri-layout-right-2-line:before{content:"\ee99"}.ri-layout-right-fill:before{content:"\ee9a"}.ri-layout-right-line:before{content:"\ee9b"}.ri-layout-row-fill:before{content:"\ee9c"}.ri-layout-row-line:before{content:"\ee9d"}.ri-layout-top-2-fill:before{content:"\ee9e"}.ri-layout-top-2-line:before{content:"\ee9f"}.ri-layout-top-fill:before{content:"\eea0"}.ri-layout-top-line:before{content:"\eea1"}.ri-leaf-fill:before{content:"\eea2"}.ri-leaf-line:before{content:"\eea3"}.ri-lifebuoy-fill:before{content:"\eea4"}.ri-lifebuoy-line:before{content:"\eea5"}.ri-lightbulb-fill:before{content:"\eea6"}.ri-lightbulb-flash-fill:before{content:"\eea7"}.ri-lightbulb-flash-line:before{content:"\eea8"}.ri-lightbulb-line:before{content:"\eea9"}.ri-line-chart-fill:before{content:"\eeaa"}.ri-line-chart-line:before{content:"\eeab"}.ri-line-fill:before{content:"\eeac"}.ri-line-height:before{content:"\eead"}.ri-line-line:before{content:"\eeae"}.ri-link-m:before{content:"\eeaf"}.ri-link-unlink-m:before{content:"\eeb0"}.ri-link-unlink:before{content:"\eeb1"}.ri-link:before{content:"\eeb2"}.ri-linkedin-box-fill:before{content:"\eeb3"}.ri-linkedin-box-line:before{content:"\eeb4"}.ri-linkedin-fill:before{content:"\eeb5"}.ri-linkedin-line:before{content:"\eeb6"}.ri-links-fill:before{content:"\eeb7"}.ri-links-line:before{content:"\eeb8"}.ri-list-check-2:before{content:"\eeb9"}.ri-list-check:before{content:"\eeba"}.ri-list-ordered:before{content:"\eebb"}.ri-list-settings-fill:before{content:"\eebc"}.ri-list-settings-line:before{content:"\eebd"}.ri-list-unordered:before{content:"\eebe"}.ri-live-fill:before{content:"\eebf"}.ri-live-line:before{content:"\eec0"}.ri-loader-2-fill:before{content:"\eec1"}.ri-loader-2-line:before{content:"\eec2"}.ri-loader-3-fill:before{content:"\eec3"}.ri-loader-3-line:before{content:"\eec4"}.ri-loader-4-fill:before{content:"\eec5"}.ri-loader-4-line:before{content:"\eec6"}.ri-loader-5-fill:before{content:"\eec7"}.ri-loader-5-line:before{content:"\eec8"}.ri-loader-fill:before{content:"\eec9"}.ri-loader-line:before{content:"\eeca"}.ri-lock-2-fill:before{content:"\eecb"}.ri-lock-2-line:before{content:"\eecc"}.ri-lock-fill:before{content:"\eecd"}.ri-lock-line:before{content:"\eece"}.ri-lock-password-fill:before{content:"\eecf"}.ri-lock-password-line:before{content:"\eed0"}.ri-lock-unlock-fill:before{content:"\eed1"}.ri-lock-unlock-line:before{content:"\eed2"}.ri-login-box-fill:before{content:"\eed3"}.ri-login-box-line:before{content:"\eed4"}.ri-login-circle-fill:before{content:"\eed5"}.ri-login-circle-line:before{content:"\eed6"}.ri-logout-box-fill:before{content:"\eed7"}.ri-logout-box-line:before{content:"\eed8"}.ri-logout-box-r-fill:before{content:"\eed9"}.ri-logout-box-r-line:before{content:"\eeda"}.ri-logout-circle-fill:before{content:"\eedb"}.ri-logout-circle-line:before{content:"\eedc"}.ri-logout-circle-r-fill:before{content:"\eedd"}.ri-logout-circle-r-line:before{content:"\eede"}.ri-luggage-cart-fill:before{content:"\eedf"}.ri-luggage-cart-line:before{content:"\eee0"}.ri-luggage-deposit-fill:before{content:"\eee1"}.ri-luggage-deposit-line:before{content:"\eee2"}.ri-lungs-fill:before{content:"\eee3"}.ri-lungs-line:before{content:"\eee4"}.ri-mac-fill:before{content:"\eee5"}.ri-mac-line:before{content:"\eee6"}.ri-macbook-fill:before{content:"\eee7"}.ri-macbook-line:before{content:"\eee8"}.ri-magic-fill:before{content:"\eee9"}.ri-magic-line:before{content:"\eeea"}.ri-mail-add-fill:before{content:"\eeeb"}.ri-mail-add-line:before{content:"\eeec"}.ri-mail-check-fill:before{content:"\eeed"}.ri-mail-check-line:before{content:"\eeee"}.ri-mail-close-fill:before{content:"\eeef"}.ri-mail-close-line:before{content:"\eef0"}.ri-mail-download-fill:before{content:"\eef1"}.ri-mail-download-line:before{content:"\eef2"}.ri-mail-fill:before{content:"\eef3"}.ri-mail-forbid-fill:before{content:"\eef4"}.ri-mail-forbid-line:before{content:"\eef5"}.ri-mail-line:before{content:"\eef6"}.ri-mail-lock-fill:before{content:"\eef7"}.ri-mail-lock-line:before{content:"\eef8"}.ri-mail-open-fill:before{content:"\eef9"}.ri-mail-open-line:before{content:"\eefa"}.ri-mail-send-fill:before{content:"\eefb"}.ri-mail-send-line:before{content:"\eefc"}.ri-mail-settings-fill:before{content:"\eefd"}.ri-mail-settings-line:before{content:"\eefe"}.ri-mail-star-fill:before{content:"\eeff"}.ri-mail-star-line:before{content:"\ef00"}.ri-mail-unread-fill:before{content:"\ef01"}.ri-mail-unread-line:before{content:"\ef02"}.ri-mail-volume-fill:before{content:"\ef03"}.ri-mail-volume-line:before{content:"\ef04"}.ri-map-2-fill:before{content:"\ef05"}.ri-map-2-line:before{content:"\ef06"}.ri-map-fill:before{content:"\ef07"}.ri-map-line:before{content:"\ef08"}.ri-map-pin-2-fill:before{content:"\ef09"}.ri-map-pin-2-line:before{content:"\ef0a"}.ri-map-pin-3-fill:before{content:"\ef0b"}.ri-map-pin-3-line:before{content:"\ef0c"}.ri-map-pin-4-fill:before{content:"\ef0d"}.ri-map-pin-4-line:before{content:"\ef0e"}.ri-map-pin-5-fill:before{content:"\ef0f"}.ri-map-pin-5-line:before{content:"\ef10"}.ri-map-pin-add-fill:before{content:"\ef11"}.ri-map-pin-add-line:before{content:"\ef12"}.ri-map-pin-fill:before{content:"\ef13"}.ri-map-pin-line:before{content:"\ef14"}.ri-map-pin-range-fill:before{content:"\ef15"}.ri-map-pin-range-line:before{content:"\ef16"}.ri-map-pin-time-fill:before{content:"\ef17"}.ri-map-pin-time-line:before{content:"\ef18"}.ri-map-pin-user-fill:before{content:"\ef19"}.ri-map-pin-user-line:before{content:"\ef1a"}.ri-mark-pen-fill:before{content:"\ef1b"}.ri-mark-pen-line:before{content:"\ef1c"}.ri-markdown-fill:before{content:"\ef1d"}.ri-markdown-line:before{content:"\ef1e"}.ri-markup-fill:before{content:"\ef1f"}.ri-markup-line:before{content:"\ef20"}.ri-mastercard-fill:before{content:"\ef21"}.ri-mastercard-line:before{content:"\ef22"}.ri-mastodon-fill:before{content:"\ef23"}.ri-mastodon-line:before{content:"\ef24"}.ri-medal-2-fill:before{content:"\ef25"}.ri-medal-2-line:before{content:"\ef26"}.ri-medal-fill:before{content:"\ef27"}.ri-medal-line:before{content:"\ef28"}.ri-medicine-bottle-fill:before{content:"\ef29"}.ri-medicine-bottle-line:before{content:"\ef2a"}.ri-medium-fill:before{content:"\ef2b"}.ri-medium-line:before{content:"\ef2c"}.ri-men-fill:before{content:"\ef2d"}.ri-men-line:before{content:"\ef2e"}.ri-mental-health-fill:before{content:"\ef2f"}.ri-mental-health-line:before{content:"\ef30"}.ri-menu-2-fill:before{content:"\ef31"}.ri-menu-2-line:before{content:"\ef32"}.ri-menu-3-fill:before{content:"\ef33"}.ri-menu-3-line:before{content:"\ef34"}.ri-menu-4-fill:before{content:"\ef35"}.ri-menu-4-line:before{content:"\ef36"}.ri-menu-5-fill:before{content:"\ef37"}.ri-menu-5-line:before{content:"\ef38"}.ri-menu-add-fill:before{content:"\ef39"}.ri-menu-add-line:before{content:"\ef3a"}.ri-menu-fill:before{content:"\ef3b"}.ri-menu-fold-fill:before{content:"\ef3c"}.ri-menu-fold-line:before{content:"\ef3d"}.ri-menu-line:before{content:"\ef3e"}.ri-menu-unfold-fill:before{content:"\ef3f"}.ri-menu-unfold-line:before{content:"\ef40"}.ri-merge-cells-horizontal:before{content:"\ef41"}.ri-merge-cells-vertical:before{content:"\ef42"}.ri-message-2-fill:before{content:"\ef43"}.ri-message-2-line:before{content:"\ef44"}.ri-message-3-fill:before{content:"\ef45"}.ri-message-3-line:before{content:"\ef46"}.ri-message-fill:before{content:"\ef47"}.ri-message-line:before{content:"\ef48"}.ri-messenger-fill:before{content:"\ef49"}.ri-messenger-line:before{content:"\ef4a"}.ri-meteor-fill:before{content:"\ef4b"}.ri-meteor-line:before{content:"\ef4c"}.ri-mic-2-fill:before{content:"\ef4d"}.ri-mic-2-line:before{content:"\ef4e"}.ri-mic-fill:before{content:"\ef4f"}.ri-mic-line:before{content:"\ef50"}.ri-mic-off-fill:before{content:"\ef51"}.ri-mic-off-line:before{content:"\ef52"}.ri-mickey-fill:before{content:"\ef53"}.ri-mickey-line:before{content:"\ef54"}.ri-microscope-fill:before{content:"\ef55"}.ri-microscope-line:before{content:"\ef56"}.ri-microsoft-fill:before{content:"\ef57"}.ri-microsoft-line:before{content:"\ef58"}.ri-mind-map:before{content:"\ef59"}.ri-mini-program-fill:before{content:"\ef5a"}.ri-mini-program-line:before{content:"\ef5b"}.ri-mist-fill:before{content:"\ef5c"}.ri-mist-line:before{content:"\ef5d"}.ri-money-cny-box-fill:before{content:"\ef5e"}.ri-money-cny-box-line:before{content:"\ef5f"}.ri-money-cny-circle-fill:before{content:"\ef60"}.ri-money-cny-circle-line:before{content:"\ef61"}.ri-money-dollar-box-fill:before{content:"\ef62"}.ri-money-dollar-box-line:before{content:"\ef63"}.ri-money-dollar-circle-fill:before{content:"\ef64"}.ri-money-dollar-circle-line:before{content:"\ef65"}.ri-money-euro-box-fill:before{content:"\ef66"}.ri-money-euro-box-line:before{content:"\ef67"}.ri-money-euro-circle-fill:before{content:"\ef68"}.ri-money-euro-circle-line:before{content:"\ef69"}.ri-money-pound-box-fill:before{content:"\ef6a"}.ri-money-pound-box-line:before{content:"\ef6b"}.ri-money-pound-circle-fill:before{content:"\ef6c"}.ri-money-pound-circle-line:before{content:"\ef6d"}.ri-moon-clear-fill:before{content:"\ef6e"}.ri-moon-clear-line:before{content:"\ef6f"}.ri-moon-cloudy-fill:before{content:"\ef70"}.ri-moon-cloudy-line:before{content:"\ef71"}.ri-moon-fill:before{content:"\ef72"}.ri-moon-foggy-fill:before{content:"\ef73"}.ri-moon-foggy-line:before{content:"\ef74"}.ri-moon-line:before{content:"\ef75"}.ri-more-2-fill:before{content:"\ef76"}.ri-more-2-line:before{content:"\ef77"}.ri-more-fill:before{content:"\ef78"}.ri-more-line:before{content:"\ef79"}.ri-motorbike-fill:before{content:"\ef7a"}.ri-motorbike-line:before{content:"\ef7b"}.ri-mouse-fill:before{content:"\ef7c"}.ri-mouse-line:before{content:"\ef7d"}.ri-movie-2-fill:before{content:"\ef7e"}.ri-movie-2-line:before{content:"\ef7f"}.ri-movie-fill:before{content:"\ef80"}.ri-movie-line:before{content:"\ef81"}.ri-music-2-fill:before{content:"\ef82"}.ri-music-2-line:before{content:"\ef83"}.ri-music-fill:before{content:"\ef84"}.ri-music-line:before{content:"\ef85"}.ri-mv-fill:before{content:"\ef86"}.ri-mv-line:before{content:"\ef87"}.ri-navigation-fill:before{content:"\ef88"}.ri-navigation-line:before{content:"\ef89"}.ri-netease-cloud-music-fill:before{content:"\ef8a"}.ri-netease-cloud-music-line:before{content:"\ef8b"}.ri-netflix-fill:before{content:"\ef8c"}.ri-netflix-line:before{content:"\ef8d"}.ri-newspaper-fill:before{content:"\ef8e"}.ri-newspaper-line:before{content:"\ef8f"}.ri-node-tree:before{content:"\ef90"}.ri-notification-2-fill:before{content:"\ef91"}.ri-notification-2-line:before{content:"\ef92"}.ri-notification-3-fill:before{content:"\ef93"}.ri-notification-3-line:before{content:"\ef94"}.ri-notification-4-fill:before{content:"\ef95"}.ri-notification-4-line:before{content:"\ef96"}.ri-notification-badge-fill:before{content:"\ef97"}.ri-notification-badge-line:before{content:"\ef98"}.ri-notification-fill:before{content:"\ef99"}.ri-notification-line:before{content:"\ef9a"}.ri-notification-off-fill:before{content:"\ef9b"}.ri-notification-off-line:before{content:"\ef9c"}.ri-npmjs-fill:before{content:"\ef9d"}.ri-npmjs-line:before{content:"\ef9e"}.ri-number-0:before{content:"\ef9f"}.ri-number-1:before{content:"\efa0"}.ri-number-2:before{content:"\efa1"}.ri-number-3:before{content:"\efa2"}.ri-number-4:before{content:"\efa3"}.ri-number-5:before{content:"\efa4"}.ri-number-6:before{content:"\efa5"}.ri-number-7:before{content:"\efa6"}.ri-number-8:before{content:"\efa7"}.ri-number-9:before{content:"\efa8"}.ri-numbers-fill:before{content:"\efa9"}.ri-numbers-line:before{content:"\efaa"}.ri-nurse-fill:before{content:"\efab"}.ri-nurse-line:before{content:"\efac"}.ri-oil-fill:before{content:"\efad"}.ri-oil-line:before{content:"\efae"}.ri-omega:before{content:"\efaf"}.ri-open-arm-fill:before{content:"\efb0"}.ri-open-arm-line:before{content:"\efb1"}.ri-open-source-fill:before{content:"\efb2"}.ri-open-source-line:before{content:"\efb3"}.ri-opera-fill:before{content:"\efb4"}.ri-opera-line:before{content:"\efb5"}.ri-order-play-fill:before{content:"\efb6"}.ri-order-play-line:before{content:"\efb7"}.ri-organization-chart:before{content:"\efb8"}.ri-outlet-2-fill:before{content:"\efb9"}.ri-outlet-2-line:before{content:"\efba"}.ri-outlet-fill:before{content:"\efbb"}.ri-outlet-line:before{content:"\efbc"}.ri-page-separator:before{content:"\efbd"}.ri-pages-fill:before{content:"\efbe"}.ri-pages-line:before{content:"\efbf"}.ri-paint-brush-fill:before{content:"\efc0"}.ri-paint-brush-line:before{content:"\efc1"}.ri-paint-fill:before{content:"\efc2"}.ri-paint-line:before{content:"\efc3"}.ri-palette-fill:before{content:"\efc4"}.ri-palette-line:before{content:"\efc5"}.ri-pantone-fill:before{content:"\efc6"}.ri-pantone-line:before{content:"\efc7"}.ri-paragraph:before{content:"\efc8"}.ri-parent-fill:before{content:"\efc9"}.ri-parent-line:before{content:"\efca"}.ri-parentheses-fill:before{content:"\efcb"}.ri-parentheses-line:before{content:"\efcc"}.ri-parking-box-fill:before{content:"\efcd"}.ri-parking-box-line:before{content:"\efce"}.ri-parking-fill:before{content:"\efcf"}.ri-parking-line:before{content:"\efd0"}.ri-passport-fill:before{content:"\efd1"}.ri-passport-line:before{content:"\efd2"}.ri-patreon-fill:before{content:"\efd3"}.ri-patreon-line:before{content:"\efd4"}.ri-pause-circle-fill:before{content:"\efd5"}.ri-pause-circle-line:before{content:"\efd6"}.ri-pause-fill:before{content:"\efd7"}.ri-pause-line:before{content:"\efd8"}.ri-pause-mini-fill:before{content:"\efd9"}.ri-pause-mini-line:before{content:"\efda"}.ri-paypal-fill:before{content:"\efdb"}.ri-paypal-line:before{content:"\efdc"}.ri-pen-nib-fill:before{content:"\efdd"}.ri-pen-nib-line:before{content:"\efde"}.ri-pencil-fill:before{content:"\efdf"}.ri-pencil-line:before{content:"\efe0"}.ri-pencil-ruler-2-fill:before{content:"\efe1"}.ri-pencil-ruler-2-line:before{content:"\efe2"}.ri-pencil-ruler-fill:before{content:"\efe3"}.ri-pencil-ruler-line:before{content:"\efe4"}.ri-percent-fill:before{content:"\efe5"}.ri-percent-line:before{content:"\efe6"}.ri-phone-camera-fill:before{content:"\efe7"}.ri-phone-camera-line:before{content:"\efe8"}.ri-phone-fill:before{content:"\efe9"}.ri-phone-find-fill:before{content:"\efea"}.ri-phone-find-line:before{content:"\efeb"}.ri-phone-line:before{content:"\efec"}.ri-phone-lock-fill:before{content:"\efed"}.ri-phone-lock-line:before{content:"\efee"}.ri-picture-in-picture-2-fill:before{content:"\efef"}.ri-picture-in-picture-2-line:before{content:"\eff0"}.ri-picture-in-picture-exit-fill:before{content:"\eff1"}.ri-picture-in-picture-exit-line:before{content:"\eff2"}.ri-picture-in-picture-fill:before{content:"\eff3"}.ri-picture-in-picture-line:before{content:"\eff4"}.ri-pie-chart-2-fill:before{content:"\eff5"}.ri-pie-chart-2-line:before{content:"\eff6"}.ri-pie-chart-box-fill:before{content:"\eff7"}.ri-pie-chart-box-line:before{content:"\eff8"}.ri-pie-chart-fill:before{content:"\eff9"}.ri-pie-chart-line:before{content:"\effa"}.ri-pin-distance-fill:before{content:"\effb"}.ri-pin-distance-line:before{content:"\effc"}.ri-ping-pong-fill:before{content:"\effd"}.ri-ping-pong-line:before{content:"\effe"}.ri-pinterest-fill:before{content:"\efff"}.ri-pinterest-line:before{content:"\f000"}.ri-pinyin-input:before{content:"\f001"}.ri-pixelfed-fill:before{content:"\f002"}.ri-pixelfed-line:before{content:"\f003"}.ri-plane-fill:before{content:"\f004"}.ri-plane-line:before{content:"\f005"}.ri-plant-fill:before{content:"\f006"}.ri-plant-line:before{content:"\f007"}.ri-play-circle-fill:before{content:"\f008"}.ri-play-circle-line:before{content:"\f009"}.ri-play-fill:before{content:"\f00a"}.ri-play-line:before{content:"\f00b"}.ri-play-list-2-fill:before{content:"\f00c"}.ri-play-list-2-line:before{content:"\f00d"}.ri-play-list-add-fill:before{content:"\f00e"}.ri-play-list-add-line:before{content:"\f00f"}.ri-play-list-fill:before{content:"\f010"}.ri-play-list-line:before{content:"\f011"}.ri-play-mini-fill:before{content:"\f012"}.ri-play-mini-line:before{content:"\f013"}.ri-playstation-fill:before{content:"\f014"}.ri-playstation-line:before{content:"\f015"}.ri-plug-2-fill:before{content:"\f016"}.ri-plug-2-line:before{content:"\f017"}.ri-plug-fill:before{content:"\f018"}.ri-plug-line:before{content:"\f019"}.ri-polaroid-2-fill:before{content:"\f01a"}.ri-polaroid-2-line:before{content:"\f01b"}.ri-polaroid-fill:before{content:"\f01c"}.ri-polaroid-line:before{content:"\f01d"}.ri-police-car-fill:before{content:"\f01e"}.ri-police-car-line:before{content:"\f01f"}.ri-price-tag-2-fill:before{content:"\f020"}.ri-price-tag-2-line:before{content:"\f021"}.ri-price-tag-3-fill:before{content:"\f022"}.ri-price-tag-3-line:before{content:"\f023"}.ri-price-tag-fill:before{content:"\f024"}.ri-price-tag-line:before{content:"\f025"}.ri-printer-cloud-fill:before{content:"\f026"}.ri-printer-cloud-line:before{content:"\f027"}.ri-printer-fill:before{content:"\f028"}.ri-printer-line:before{content:"\f029"}.ri-product-hunt-fill:before{content:"\f02a"}.ri-product-hunt-line:before{content:"\f02b"}.ri-profile-fill:before{content:"\f02c"}.ri-profile-line:before{content:"\f02d"}.ri-projector-2-fill:before{content:"\f02e"}.ri-projector-2-line:before{content:"\f02f"}.ri-projector-fill:before{content:"\f030"}.ri-projector-line:before{content:"\f031"}.ri-psychotherapy-fill:before{content:"\f032"}.ri-psychotherapy-line:before{content:"\f033"}.ri-pulse-fill:before{content:"\f034"}.ri-pulse-line:before{content:"\f035"}.ri-pushpin-2-fill:before{content:"\f036"}.ri-pushpin-2-line:before{content:"\f037"}.ri-pushpin-fill:before{content:"\f038"}.ri-pushpin-line:before{content:"\f039"}.ri-qq-fill:before{content:"\f03a"}.ri-qq-line:before{content:"\f03b"}.ri-qr-code-fill:before{content:"\f03c"}.ri-qr-code-line:before{content:"\f03d"}.ri-qr-scan-2-fill:before{content:"\f03e"}.ri-qr-scan-2-line:before{content:"\f03f"}.ri-qr-scan-fill:before{content:"\f040"}.ri-qr-scan-line:before{content:"\f041"}.ri-question-answer-fill:before{content:"\f042"}.ri-question-answer-line:before{content:"\f043"}.ri-question-fill:before{content:"\f044"}.ri-question-line:before{content:"\f045"}.ri-question-mark:before{content:"\f046"}.ri-questionnaire-fill:before{content:"\f047"}.ri-questionnaire-line:before{content:"\f048"}.ri-quill-pen-fill:before{content:"\f049"}.ri-quill-pen-line:before{content:"\f04a"}.ri-radar-fill:before{content:"\f04b"}.ri-radar-line:before{content:"\f04c"}.ri-radio-2-fill:before{content:"\f04d"}.ri-radio-2-line:before{content:"\f04e"}.ri-radio-button-fill:before{content:"\f04f"}.ri-radio-button-line:before{content:"\f050"}.ri-radio-fill:before{content:"\f051"}.ri-radio-line:before{content:"\f052"}.ri-rainbow-fill:before{content:"\f053"}.ri-rainbow-line:before{content:"\f054"}.ri-rainy-fill:before{content:"\f055"}.ri-rainy-line:before{content:"\f056"}.ri-reactjs-fill:before{content:"\f057"}.ri-reactjs-line:before{content:"\f058"}.ri-record-circle-fill:before{content:"\f059"}.ri-record-circle-line:before{content:"\f05a"}.ri-record-mail-fill:before{content:"\f05b"}.ri-record-mail-line:before{content:"\f05c"}.ri-recycle-fill:before{content:"\f05d"}.ri-recycle-line:before{content:"\f05e"}.ri-red-packet-fill:before{content:"\f05f"}.ri-red-packet-line:before{content:"\f060"}.ri-reddit-fill:before{content:"\f061"}.ri-reddit-line:before{content:"\f062"}.ri-refresh-fill:before{content:"\f063"}.ri-refresh-line:before{content:"\f064"}.ri-refund-2-fill:before{content:"\f065"}.ri-refund-2-line:before{content:"\f066"}.ri-refund-fill:before{content:"\f067"}.ri-refund-line:before{content:"\f068"}.ri-registered-fill:before{content:"\f069"}.ri-registered-line:before{content:"\f06a"}.ri-remixicon-fill:before{content:"\f06b"}.ri-remixicon-line:before{content:"\f06c"}.ri-remote-control-2-fill:before{content:"\f06d"}.ri-remote-control-2-line:before{content:"\f06e"}.ri-remote-control-fill:before{content:"\f06f"}.ri-remote-control-line:before{content:"\f070"}.ri-repeat-2-fill:before{content:"\f071"}.ri-repeat-2-line:before{content:"\f072"}.ri-repeat-fill:before{content:"\f073"}.ri-repeat-line:before{content:"\f074"}.ri-repeat-one-fill:before{content:"\f075"}.ri-repeat-one-line:before{content:"\f076"}.ri-reply-all-fill:before{content:"\f077"}.ri-reply-all-line:before{content:"\f078"}.ri-reply-fill:before{content:"\f079"}.ri-reply-line:before{content:"\f07a"}.ri-reserved-fill:before{content:"\f07b"}.ri-reserved-line:before{content:"\f07c"}.ri-rest-time-fill:before{content:"\f07d"}.ri-rest-time-line:before{content:"\f07e"}.ri-restart-fill:before{content:"\f07f"}.ri-restart-line:before{content:"\f080"}.ri-restaurant-2-fill:before{content:"\f081"}.ri-restaurant-2-line:before{content:"\f082"}.ri-restaurant-fill:before{content:"\f083"}.ri-restaurant-line:before{content:"\f084"}.ri-rewind-fill:before{content:"\f085"}.ri-rewind-line:before{content:"\f086"}.ri-rewind-mini-fill:before{content:"\f087"}.ri-rewind-mini-line:before{content:"\f088"}.ri-rhythm-fill:before{content:"\f089"}.ri-rhythm-line:before{content:"\f08a"}.ri-riding-fill:before{content:"\f08b"}.ri-riding-line:before{content:"\f08c"}.ri-road-map-fill:before{content:"\f08d"}.ri-road-map-line:before{content:"\f08e"}.ri-roadster-fill:before{content:"\f08f"}.ri-roadster-line:before{content:"\f090"}.ri-robot-fill:before{content:"\f091"}.ri-robot-line:before{content:"\f092"}.ri-rocket-2-fill:before{content:"\f093"}.ri-rocket-2-line:before{content:"\f094"}.ri-rocket-fill:before{content:"\f095"}.ri-rocket-line:before{content:"\f096"}.ri-rotate-lock-fill:before{content:"\f097"}.ri-rotate-lock-line:before{content:"\f098"}.ri-rounded-corner:before{content:"\f099"}.ri-route-fill:before{content:"\f09a"}.ri-route-line:before{content:"\f09b"}.ri-router-fill:before{content:"\f09c"}.ri-router-line:before{content:"\f09d"}.ri-rss-fill:before{content:"\f09e"}.ri-rss-line:before{content:"\f09f"}.ri-ruler-2-fill:before{content:"\f0a0"}.ri-ruler-2-line:before{content:"\f0a1"}.ri-ruler-fill:before{content:"\f0a2"}.ri-ruler-line:before{content:"\f0a3"}.ri-run-fill:before{content:"\f0a4"}.ri-run-line:before{content:"\f0a5"}.ri-safari-fill:before{content:"\f0a6"}.ri-safari-line:before{content:"\f0a7"}.ri-safe-2-fill:before{content:"\f0a8"}.ri-safe-2-line:before{content:"\f0a9"}.ri-safe-fill:before{content:"\f0aa"}.ri-safe-line:before{content:"\f0ab"}.ri-sailboat-fill:before{content:"\f0ac"}.ri-sailboat-line:before{content:"\f0ad"}.ri-save-2-fill:before{content:"\f0ae"}.ri-save-2-line:before{content:"\f0af"}.ri-save-3-fill:before{content:"\f0b0"}.ri-save-3-line:before{content:"\f0b1"}.ri-save-fill:before{content:"\f0b2"}.ri-save-line:before{content:"\f0b3"}.ri-scales-2-fill:before{content:"\f0b4"}.ri-scales-2-line:before{content:"\f0b5"}.ri-scales-3-fill:before{content:"\f0b6"}.ri-scales-3-line:before{content:"\f0b7"}.ri-scales-fill:before{content:"\f0b8"}.ri-scales-line:before{content:"\f0b9"}.ri-scan-2-fill:before{content:"\f0ba"}.ri-scan-2-line:before{content:"\f0bb"}.ri-scan-fill:before{content:"\f0bc"}.ri-scan-line:before{content:"\f0bd"}.ri-scissors-2-fill:before{content:"\f0be"}.ri-scissors-2-line:before{content:"\f0bf"}.ri-scissors-cut-fill:before{content:"\f0c0"}.ri-scissors-cut-line:before{content:"\f0c1"}.ri-scissors-fill:before{content:"\f0c2"}.ri-scissors-line:before{content:"\f0c3"}.ri-screenshot-2-fill:before{content:"\f0c4"}.ri-screenshot-2-line:before{content:"\f0c5"}.ri-screenshot-fill:before{content:"\f0c6"}.ri-screenshot-line:before{content:"\f0c7"}.ri-sd-card-fill:before{content:"\f0c8"}.ri-sd-card-line:before{content:"\f0c9"}.ri-sd-card-mini-fill:before{content:"\f0ca"}.ri-sd-card-mini-line:before{content:"\f0cb"}.ri-search-2-fill:before{content:"\f0cc"}.ri-search-2-line:before{content:"\f0cd"}.ri-search-eye-fill:before{content:"\f0ce"}.ri-search-eye-line:before{content:"\f0cf"}.ri-search-fill:before{content:"\f0d0"}.ri-search-line:before{content:"\f0d1"}.ri-secure-payment-fill:before{content:"\f0d2"}.ri-secure-payment-line:before{content:"\f0d3"}.ri-seedling-fill:before{content:"\f0d4"}.ri-seedling-line:before{content:"\f0d5"}.ri-send-backward:before{content:"\f0d6"}.ri-send-plane-2-fill:before{content:"\f0d7"}.ri-send-plane-2-line:before{content:"\f0d8"}.ri-send-plane-fill:before{content:"\f0d9"}.ri-send-plane-line:before{content:"\f0da"}.ri-send-to-back:before{content:"\f0db"}.ri-sensor-fill:before{content:"\f0dc"}.ri-sensor-line:before{content:"\f0dd"}.ri-separator:before{content:"\f0de"}.ri-server-fill:before{content:"\f0df"}.ri-server-line:before{content:"\f0e0"}.ri-service-fill:before{content:"\f0e1"}.ri-service-line:before{content:"\f0e2"}.ri-settings-2-fill:before{content:"\f0e3"}.ri-settings-2-line:before{content:"\f0e4"}.ri-settings-3-fill:before{content:"\f0e5"}.ri-settings-3-line:before{content:"\f0e6"}.ri-settings-4-fill:before{content:"\f0e7"}.ri-settings-4-line:before{content:"\f0e8"}.ri-settings-5-fill:before{content:"\f0e9"}.ri-settings-5-line:before{content:"\f0ea"}.ri-settings-6-fill:before{content:"\f0eb"}.ri-settings-6-line:before{content:"\f0ec"}.ri-settings-fill:before{content:"\f0ed"}.ri-settings-line:before{content:"\f0ee"}.ri-shape-2-fill:before{content:"\f0ef"}.ri-shape-2-line:before{content:"\f0f0"}.ri-shape-fill:before{content:"\f0f1"}.ri-shape-line:before{content:"\f0f2"}.ri-share-box-fill:before{content:"\f0f3"}.ri-share-box-line:before{content:"\f0f4"}.ri-share-circle-fill:before{content:"\f0f5"}.ri-share-circle-line:before{content:"\f0f6"}.ri-share-fill:before{content:"\f0f7"}.ri-share-forward-2-fill:before{content:"\f0f8"}.ri-share-forward-2-line:before{content:"\f0f9"}.ri-share-forward-box-fill:before{content:"\f0fa"}.ri-share-forward-box-line:before{content:"\f0fb"}.ri-share-forward-fill:before{content:"\f0fc"}.ri-share-forward-line:before{content:"\f0fd"}.ri-share-line:before{content:"\f0fe"}.ri-shield-check-fill:before{content:"\f0ff"}.ri-shield-check-line:before{content:"\f100"}.ri-shield-cross-fill:before{content:"\f101"}.ri-shield-cross-line:before{content:"\f102"}.ri-shield-fill:before{content:"\f103"}.ri-shield-flash-fill:before{content:"\f104"}.ri-shield-flash-line:before{content:"\f105"}.ri-shield-keyhole-fill:before{content:"\f106"}.ri-shield-keyhole-line:before{content:"\f107"}.ri-shield-line:before{content:"\f108"}.ri-shield-star-fill:before{content:"\f109"}.ri-shield-star-line:before{content:"\f10a"}.ri-shield-user-fill:before{content:"\f10b"}.ri-shield-user-line:before{content:"\f10c"}.ri-ship-2-fill:before{content:"\f10d"}.ri-ship-2-line:before{content:"\f10e"}.ri-ship-fill:before{content:"\f10f"}.ri-ship-line:before{content:"\f110"}.ri-shirt-fill:before{content:"\f111"}.ri-shirt-line:before{content:"\f112"}.ri-shopping-bag-2-fill:before{content:"\f113"}.ri-shopping-bag-2-line:before{content:"\f114"}.ri-shopping-bag-3-fill:before{content:"\f115"}.ri-shopping-bag-3-line:before{content:"\f116"}.ri-shopping-bag-fill:before{content:"\f117"}.ri-shopping-bag-line:before{content:"\f118"}.ri-shopping-basket-2-fill:before{content:"\f119"}.ri-shopping-basket-2-line:before{content:"\f11a"}.ri-shopping-basket-fill:before{content:"\f11b"}.ri-shopping-basket-line:before{content:"\f11c"}.ri-shopping-cart-2-fill:before{content:"\f11d"}.ri-shopping-cart-2-line:before{content:"\f11e"}.ri-shopping-cart-fill:before{content:"\f11f"}.ri-shopping-cart-line:before{content:"\f120"}.ri-showers-fill:before{content:"\f121"}.ri-showers-line:before{content:"\f122"}.ri-shuffle-fill:before{content:"\f123"}.ri-shuffle-line:before{content:"\f124"}.ri-shut-down-fill:before{content:"\f125"}.ri-shut-down-line:before{content:"\f126"}.ri-side-bar-fill:before{content:"\f127"}.ri-side-bar-line:before{content:"\f128"}.ri-signal-tower-fill:before{content:"\f129"}.ri-signal-tower-line:before{content:"\f12a"}.ri-signal-wifi-1-fill:before{content:"\f12b"}.ri-signal-wifi-1-line:before{content:"\f12c"}.ri-signal-wifi-2-fill:before{content:"\f12d"}.ri-signal-wifi-2-line:before{content:"\f12e"}.ri-signal-wifi-3-fill:before{content:"\f12f"}.ri-signal-wifi-3-line:before{content:"\f130"}.ri-signal-wifi-error-fill:before{content:"\f131"}.ri-signal-wifi-error-line:before{content:"\f132"}.ri-signal-wifi-fill:before{content:"\f133"}.ri-signal-wifi-line:before{content:"\f134"}.ri-signal-wifi-off-fill:before{content:"\f135"}.ri-signal-wifi-off-line:before{content:"\f136"}.ri-sim-card-2-fill:before{content:"\f137"}.ri-sim-card-2-line:before{content:"\f138"}.ri-sim-card-fill:before{content:"\f139"}.ri-sim-card-line:before{content:"\f13a"}.ri-single-quotes-l:before{content:"\f13b"}.ri-single-quotes-r:before{content:"\f13c"}.ri-sip-fill:before{content:"\f13d"}.ri-sip-line:before{content:"\f13e"}.ri-skip-back-fill:before{content:"\f13f"}.ri-skip-back-line:before{content:"\f140"}.ri-skip-back-mini-fill:before{content:"\f141"}.ri-skip-back-mini-line:before{content:"\f142"}.ri-skip-forward-fill:before{content:"\f143"}.ri-skip-forward-line:before{content:"\f144"}.ri-skip-forward-mini-fill:before{content:"\f145"}.ri-skip-forward-mini-line:before{content:"\f146"}.ri-skull-2-fill:before{content:"\f147"}.ri-skull-2-line:before{content:"\f148"}.ri-skull-fill:before{content:"\f149"}.ri-skull-line:before{content:"\f14a"}.ri-skype-fill:before{content:"\f14b"}.ri-skype-line:before{content:"\f14c"}.ri-slack-fill:before{content:"\f14d"}.ri-slack-line:before{content:"\f14e"}.ri-slice-fill:before{content:"\f14f"}.ri-slice-line:before{content:"\f150"}.ri-slideshow-2-fill:before{content:"\f151"}.ri-slideshow-2-line:before{content:"\f152"}.ri-slideshow-3-fill:before{content:"\f153"}.ri-slideshow-3-line:before{content:"\f154"}.ri-slideshow-4-fill:before{content:"\f155"}.ri-slideshow-4-line:before{content:"\f156"}.ri-slideshow-fill:before{content:"\f157"}.ri-slideshow-line:before{content:"\f158"}.ri-smartphone-fill:before{content:"\f159"}.ri-smartphone-line:before{content:"\f15a"}.ri-snapchat-fill:before{content:"\f15b"}.ri-snapchat-line:before{content:"\f15c"}.ri-snowy-fill:before{content:"\f15d"}.ri-snowy-line:before{content:"\f15e"}.ri-sort-asc:before{content:"\f15f"}.ri-sort-desc:before{content:"\f160"}.ri-sound-module-fill:before{content:"\f161"}.ri-sound-module-line:before{content:"\f162"}.ri-soundcloud-fill:before{content:"\f163"}.ri-soundcloud-line:before{content:"\f164"}.ri-space-ship-fill:before{content:"\f165"}.ri-space-ship-line:before{content:"\f166"}.ri-space:before{content:"\f167"}.ri-spam-2-fill:before{content:"\f168"}.ri-spam-2-line:before{content:"\f169"}.ri-spam-3-fill:before{content:"\f16a"}.ri-spam-3-line:before{content:"\f16b"}.ri-spam-fill:before{content:"\f16c"}.ri-spam-line:before{content:"\f16d"}.ri-speaker-2-fill:before{content:"\f16e"}.ri-speaker-2-line:before{content:"\f16f"}.ri-speaker-3-fill:before{content:"\f170"}.ri-speaker-3-line:before{content:"\f171"}.ri-speaker-fill:before{content:"\f172"}.ri-speaker-line:before{content:"\f173"}.ri-spectrum-fill:before{content:"\f174"}.ri-spectrum-line:before{content:"\f175"}.ri-speed-fill:before{content:"\f176"}.ri-speed-line:before{content:"\f177"}.ri-speed-mini-fill:before{content:"\f178"}.ri-speed-mini-line:before{content:"\f179"}.ri-split-cells-horizontal:before{content:"\f17a"}.ri-split-cells-vertical:before{content:"\f17b"}.ri-spotify-fill:before{content:"\f17c"}.ri-spotify-line:before{content:"\f17d"}.ri-spy-fill:before{content:"\f17e"}.ri-spy-line:before{content:"\f17f"}.ri-stack-fill:before{content:"\f180"}.ri-stack-line:before{content:"\f181"}.ri-stack-overflow-fill:before{content:"\f182"}.ri-stack-overflow-line:before{content:"\f183"}.ri-stackshare-fill:before{content:"\f184"}.ri-stackshare-line:before{content:"\f185"}.ri-star-fill:before{content:"\f186"}.ri-star-half-fill:before{content:"\f187"}.ri-star-half-line:before{content:"\f188"}.ri-star-half-s-fill:before{content:"\f189"}.ri-star-half-s-line:before{content:"\f18a"}.ri-star-line:before{content:"\f18b"}.ri-star-s-fill:before{content:"\f18c"}.ri-star-s-line:before{content:"\f18d"}.ri-star-smile-fill:before{content:"\f18e"}.ri-star-smile-line:before{content:"\f18f"}.ri-steam-fill:before{content:"\f190"}.ri-steam-line:before{content:"\f191"}.ri-steering-2-fill:before{content:"\f192"}.ri-steering-2-line:before{content:"\f193"}.ri-steering-fill:before{content:"\f194"}.ri-steering-line:before{content:"\f195"}.ri-stethoscope-fill:before{content:"\f196"}.ri-stethoscope-line:before{content:"\f197"}.ri-sticky-note-2-fill:before{content:"\f198"}.ri-sticky-note-2-line:before{content:"\f199"}.ri-sticky-note-fill:before{content:"\f19a"}.ri-sticky-note-line:before{content:"\f19b"}.ri-stock-fill:before{content:"\f19c"}.ri-stock-line:before{content:"\f19d"}.ri-stop-circle-fill:before{content:"\f19e"}.ri-stop-circle-line:before{content:"\f19f"}.ri-stop-fill:before{content:"\f1a0"}.ri-stop-line:before{content:"\f1a1"}.ri-stop-mini-fill:before{content:"\f1a2"}.ri-stop-mini-line:before{content:"\f1a3"}.ri-store-2-fill:before{content:"\f1a4"}.ri-store-2-line:before{content:"\f1a5"}.ri-store-3-fill:before{content:"\f1a6"}.ri-store-3-line:before{content:"\f1a7"}.ri-store-fill:before{content:"\f1a8"}.ri-store-line:before{content:"\f1a9"}.ri-strikethrough-2:before{content:"\f1aa"}.ri-strikethrough:before{content:"\f1ab"}.ri-subscript-2:before{content:"\f1ac"}.ri-subscript:before{content:"\f1ad"}.ri-subtract-fill:before{content:"\f1ae"}.ri-subtract-line:before{content:"\f1af"}.ri-subway-fill:before{content:"\f1b0"}.ri-subway-line:before{content:"\f1b1"}.ri-subway-wifi-fill:before{content:"\f1b2"}.ri-subway-wifi-line:before{content:"\f1b3"}.ri-suitcase-2-fill:before{content:"\f1b4"}.ri-suitcase-2-line:before{content:"\f1b5"}.ri-suitcase-3-fill:before{content:"\f1b6"}.ri-suitcase-3-line:before{content:"\f1b7"}.ri-suitcase-fill:before{content:"\f1b8"}.ri-suitcase-line:before{content:"\f1b9"}.ri-sun-cloudy-fill:before{content:"\f1ba"}.ri-sun-cloudy-line:before{content:"\f1bb"}.ri-sun-fill:before{content:"\f1bc"}.ri-sun-foggy-fill:before{content:"\f1bd"}.ri-sun-foggy-line:before{content:"\f1be"}.ri-sun-line:before{content:"\f1bf"}.ri-superscript-2:before{content:"\f1c0"}.ri-superscript:before{content:"\f1c1"}.ri-surgical-mask-fill:before{content:"\f1c2"}.ri-surgical-mask-line:before{content:"\f1c3"}.ri-surround-sound-fill:before{content:"\f1c4"}.ri-surround-sound-line:before{content:"\f1c5"}.ri-survey-fill:before{content:"\f1c6"}.ri-survey-line:before{content:"\f1c7"}.ri-swap-box-fill:before{content:"\f1c8"}.ri-swap-box-line:before{content:"\f1c9"}.ri-swap-fill:before{content:"\f1ca"}.ri-swap-line:before{content:"\f1cb"}.ri-switch-fill:before{content:"\f1cc"}.ri-switch-line:before{content:"\f1cd"}.ri-sword-fill:before{content:"\f1ce"}.ri-sword-line:before{content:"\f1cf"}.ri-syringe-fill:before{content:"\f1d0"}.ri-syringe-line:before{content:"\f1d1"}.ri-t-box-fill:before{content:"\f1d2"}.ri-t-box-line:before{content:"\f1d3"}.ri-t-shirt-2-fill:before{content:"\f1d4"}.ri-t-shirt-2-line:before{content:"\f1d5"}.ri-t-shirt-air-fill:before{content:"\f1d6"}.ri-t-shirt-air-line:before{content:"\f1d7"}.ri-t-shirt-fill:before{content:"\f1d8"}.ri-t-shirt-line:before{content:"\f1d9"}.ri-table-2:before{content:"\f1da"}.ri-table-alt-fill:before{content:"\f1db"}.ri-table-alt-line:before{content:"\f1dc"}.ri-table-fill:before{content:"\f1dd"}.ri-table-line:before{content:"\f1de"}.ri-tablet-fill:before{content:"\f1df"}.ri-tablet-line:before{content:"\f1e0"}.ri-takeaway-fill:before{content:"\f1e1"}.ri-takeaway-line:before{content:"\f1e2"}.ri-taobao-fill:before{content:"\f1e3"}.ri-taobao-line:before{content:"\f1e4"}.ri-tape-fill:before{content:"\f1e5"}.ri-tape-line:before{content:"\f1e6"}.ri-task-fill:before{content:"\f1e7"}.ri-task-line:before{content:"\f1e8"}.ri-taxi-fill:before{content:"\f1e9"}.ri-taxi-line:before{content:"\f1ea"}.ri-taxi-wifi-fill:before{content:"\f1eb"}.ri-taxi-wifi-line:before{content:"\f1ec"}.ri-team-fill:before{content:"\f1ed"}.ri-team-line:before{content:"\f1ee"}.ri-telegram-fill:before{content:"\f1ef"}.ri-telegram-line:before{content:"\f1f0"}.ri-temp-cold-fill:before{content:"\f1f1"}.ri-temp-cold-line:before{content:"\f1f2"}.ri-temp-hot-fill:before{content:"\f1f3"}.ri-temp-hot-line:before{content:"\f1f4"}.ri-terminal-box-fill:before{content:"\f1f5"}.ri-terminal-box-line:before{content:"\f1f6"}.ri-terminal-fill:before{content:"\f1f7"}.ri-terminal-line:before{content:"\f1f8"}.ri-terminal-window-fill:before{content:"\f1f9"}.ri-terminal-window-line:before{content:"\f1fa"}.ri-test-tube-fill:before{content:"\f1fb"}.ri-test-tube-line:before{content:"\f1fc"}.ri-text-direction-l:before{content:"\f1fd"}.ri-text-direction-r:before{content:"\f1fe"}.ri-text-spacing:before{content:"\f1ff"}.ri-text-wrap:before{content:"\f200"}.ri-text:before{content:"\f201"}.ri-thermometer-fill:before{content:"\f202"}.ri-thermometer-line:before{content:"\f203"}.ri-thumb-down-fill:before{content:"\f204"}.ri-thumb-down-line:before{content:"\f205"}.ri-thumb-up-fill:before{content:"\f206"}.ri-thumb-up-line:before{content:"\f207"}.ri-thunderstorms-fill:before{content:"\f208"}.ri-thunderstorms-line:before{content:"\f209"}.ri-ticket-2-fill:before{content:"\f20a"}.ri-ticket-2-line:before{content:"\f20b"}.ri-ticket-fill:before{content:"\f20c"}.ri-ticket-line:before{content:"\f20d"}.ri-time-fill:before{content:"\f20e"}.ri-time-line:before{content:"\f20f"}.ri-timer-2-fill:before{content:"\f210"}.ri-timer-2-line:before{content:"\f211"}.ri-timer-fill:before{content:"\f212"}.ri-timer-flash-fill:before{content:"\f213"}.ri-timer-flash-line:before{content:"\f214"}.ri-timer-line:before{content:"\f215"}.ri-todo-fill:before{content:"\f216"}.ri-todo-line:before{content:"\f217"}.ri-toggle-fill:before{content:"\f218"}.ri-toggle-line:before{content:"\f219"}.ri-tools-fill:before{content:"\f21a"}.ri-tools-line:before{content:"\f21b"}.ri-tornado-fill:before{content:"\f21c"}.ri-tornado-line:before{content:"\f21d"}.ri-trademark-fill:before{content:"\f21e"}.ri-trademark-line:before{content:"\f21f"}.ri-traffic-light-fill:before{content:"\f220"}.ri-traffic-light-line:before{content:"\f221"}.ri-train-fill:before{content:"\f222"}.ri-train-line:before{content:"\f223"}.ri-train-wifi-fill:before{content:"\f224"}.ri-train-wifi-line:before{content:"\f225"}.ri-translate-2:before{content:"\f226"}.ri-translate:before{content:"\f227"}.ri-travesti-fill:before{content:"\f228"}.ri-travesti-line:before{content:"\f229"}.ri-treasure-map-fill:before{content:"\f22a"}.ri-treasure-map-line:before{content:"\f22b"}.ri-trello-fill:before{content:"\f22c"}.ri-trello-line:before{content:"\f22d"}.ri-trophy-fill:before{content:"\f22e"}.ri-trophy-line:before{content:"\f22f"}.ri-truck-fill:before{content:"\f230"}.ri-truck-line:before{content:"\f231"}.ri-tumblr-fill:before{content:"\f232"}.ri-tumblr-line:before{content:"\f233"}.ri-tv-2-fill:before{content:"\f234"}.ri-tv-2-line:before{content:"\f235"}.ri-tv-fill:before{content:"\f236"}.ri-tv-line:before{content:"\f237"}.ri-twitch-fill:before{content:"\f238"}.ri-twitch-line:before{content:"\f239"}.ri-twitter-fill:before{content:"\f23a"}.ri-twitter-line:before{content:"\f23b"}.ri-typhoon-fill:before{content:"\f23c"}.ri-typhoon-line:before{content:"\f23d"}.ri-u-disk-fill:before{content:"\f23e"}.ri-u-disk-line:before{content:"\f23f"}.ri-ubuntu-fill:before{content:"\f240"}.ri-ubuntu-line:before{content:"\f241"}.ri-umbrella-fill:before{content:"\f242"}.ri-umbrella-line:before{content:"\f243"}.ri-underline:before{content:"\f244"}.ri-uninstall-fill:before{content:"\f245"}.ri-uninstall-line:before{content:"\f246"}.ri-unsplash-fill:before{content:"\f247"}.ri-unsplash-line:before{content:"\f248"}.ri-upload-2-fill:before{content:"\f249"}.ri-upload-2-line:before{content:"\f24a"}.ri-upload-cloud-2-fill:before{content:"\f24b"}.ri-upload-cloud-2-line:before{content:"\f24c"}.ri-upload-cloud-fill:before{content:"\f24d"}.ri-upload-cloud-line:before{content:"\f24e"}.ri-upload-fill:before{content:"\f24f"}.ri-upload-line:before{content:"\f250"}.ri-usb-fill:before{content:"\f251"}.ri-usb-line:before{content:"\f252"}.ri-user-2-fill:before{content:"\f253"}.ri-user-2-line:before{content:"\f254"}.ri-user-3-fill:before{content:"\f255"}.ri-user-3-line:before{content:"\f256"}.ri-user-4-fill:before{content:"\f257"}.ri-user-4-line:before{content:"\f258"}.ri-user-5-fill:before{content:"\f259"}.ri-user-5-line:before{content:"\f25a"}.ri-user-6-fill:before{content:"\f25b"}.ri-user-6-line:before{content:"\f25c"}.ri-user-add-fill:before{content:"\f25d"}.ri-user-add-line:before{content:"\f25e"}.ri-user-fill:before{content:"\f25f"}.ri-user-follow-fill:before{content:"\f260"}.ri-user-follow-line:before{content:"\f261"}.ri-user-heart-fill:before{content:"\f262"}.ri-user-heart-line:before{content:"\f263"}.ri-user-line:before{content:"\f264"}.ri-user-location-fill:before{content:"\f265"}.ri-user-location-line:before{content:"\f266"}.ri-user-received-2-fill:before{content:"\f267"}.ri-user-received-2-line:before{content:"\f268"}.ri-user-received-fill:before{content:"\f269"}.ri-user-received-line:before{content:"\f26a"}.ri-user-search-fill:before{content:"\f26b"}.ri-user-search-line:before{content:"\f26c"}.ri-user-settings-fill:before{content:"\f26d"}.ri-user-settings-line:before{content:"\f26e"}.ri-user-shared-2-fill:before{content:"\f26f"}.ri-user-shared-2-line:before{content:"\f270"}.ri-user-shared-fill:before{content:"\f271"}.ri-user-shared-line:before{content:"\f272"}.ri-user-smile-fill:before{content:"\f273"}.ri-user-smile-line:before{content:"\f274"}.ri-user-star-fill:before{content:"\f275"}.ri-user-star-line:before{content:"\f276"}.ri-user-unfollow-fill:before{content:"\f277"}.ri-user-unfollow-line:before{content:"\f278"}.ri-user-voice-fill:before{content:"\f279"}.ri-user-voice-line:before{content:"\f27a"}.ri-video-add-fill:before{content:"\f27b"}.ri-video-add-line:before{content:"\f27c"}.ri-video-chat-fill:before{content:"\f27d"}.ri-video-chat-line:before{content:"\f27e"}.ri-video-download-fill:before{content:"\f27f"}.ri-video-download-line:before{content:"\f280"}.ri-video-fill:before{content:"\f281"}.ri-video-line:before{content:"\f282"}.ri-video-upload-fill:before{content:"\f283"}.ri-video-upload-line:before{content:"\f284"}.ri-vidicon-2-fill:before{content:"\f285"}.ri-vidicon-2-line:before{content:"\f286"}.ri-vidicon-fill:before{content:"\f287"}.ri-vidicon-line:before{content:"\f288"}.ri-vimeo-fill:before{content:"\f289"}.ri-vimeo-line:before{content:"\f28a"}.ri-vip-crown-2-fill:before{content:"\f28b"}.ri-vip-crown-2-line:before{content:"\f28c"}.ri-vip-crown-fill:before{content:"\f28d"}.ri-vip-crown-line:before{content:"\f28e"}.ri-vip-diamond-fill:before{content:"\f28f"}.ri-vip-diamond-line:before{content:"\f290"}.ri-vip-fill:before{content:"\f291"}.ri-vip-line:before{content:"\f292"}.ri-virus-fill:before{content:"\f293"}.ri-virus-line:before{content:"\f294"}.ri-visa-fill:before{content:"\f295"}.ri-visa-line:before{content:"\f296"}.ri-voice-recognition-fill:before{content:"\f297"}.ri-voice-recognition-line:before{content:"\f298"}.ri-voiceprint-fill:before{content:"\f299"}.ri-voiceprint-line:before{content:"\f29a"}.ri-volume-down-fill:before{content:"\f29b"}.ri-volume-down-line:before{content:"\f29c"}.ri-volume-mute-fill:before{content:"\f29d"}.ri-volume-mute-line:before{content:"\f29e"}.ri-volume-off-vibrate-fill:before{content:"\f29f"}.ri-volume-off-vibrate-line:before{content:"\f2a0"}.ri-volume-up-fill:before{content:"\f2a1"}.ri-volume-up-line:before{content:"\f2a2"}.ri-volume-vibrate-fill:before{content:"\f2a3"}.ri-volume-vibrate-line:before{content:"\f2a4"}.ri-vuejs-fill:before{content:"\f2a5"}.ri-vuejs-line:before{content:"\f2a6"}.ri-walk-fill:before{content:"\f2a7"}.ri-walk-line:before{content:"\f2a8"}.ri-wallet-2-fill:before{content:"\f2a9"}.ri-wallet-2-line:before{content:"\f2aa"}.ri-wallet-3-fill:before{content:"\f2ab"}.ri-wallet-3-line:before{content:"\f2ac"}.ri-wallet-fill:before{content:"\f2ad"}.ri-wallet-line:before{content:"\f2ae"}.ri-water-flash-fill:before{content:"\f2af"}.ri-water-flash-line:before{content:"\f2b0"}.ri-webcam-fill:before{content:"\f2b1"}.ri-webcam-line:before{content:"\f2b2"}.ri-wechat-2-fill:before{content:"\f2b3"}.ri-wechat-2-line:before{content:"\f2b4"}.ri-wechat-fill:before{content:"\f2b5"}.ri-wechat-line:before{content:"\f2b6"}.ri-wechat-pay-fill:before{content:"\f2b7"}.ri-wechat-pay-line:before{content:"\f2b8"}.ri-weibo-fill:before{content:"\f2b9"}.ri-weibo-line:before{content:"\f2ba"}.ri-whatsapp-fill:before{content:"\f2bb"}.ri-whatsapp-line:before{content:"\f2bc"}.ri-wheelchair-fill:before{content:"\f2bd"}.ri-wheelchair-line:before{content:"\f2be"}.ri-wifi-fill:before{content:"\f2bf"}.ri-wifi-line:before{content:"\f2c0"}.ri-wifi-off-fill:before{content:"\f2c1"}.ri-wifi-off-line:before{content:"\f2c2"}.ri-window-2-fill:before{content:"\f2c3"}.ri-window-2-line:before{content:"\f2c4"}.ri-window-fill:before{content:"\f2c5"}.ri-window-line:before{content:"\f2c6"}.ri-windows-fill:before{content:"\f2c7"}.ri-windows-line:before{content:"\f2c8"}.ri-windy-fill:before{content:"\f2c9"}.ri-windy-line:before{content:"\f2ca"}.ri-wireless-charging-fill:before{content:"\f2cb"}.ri-wireless-charging-line:before{content:"\f2cc"}.ri-women-fill:before{content:"\f2cd"}.ri-women-line:before{content:"\f2ce"}.ri-wubi-input:before{content:"\f2cf"}.ri-xbox-fill:before{content:"\f2d0"}.ri-xbox-line:before{content:"\f2d1"}.ri-xing-fill:before{content:"\f2d2"}.ri-xing-line:before{content:"\f2d3"}.ri-youtube-fill:before{content:"\f2d4"}.ri-youtube-line:before{content:"\f2d5"}.ri-zcool-fill:before{content:"\f2d6"}.ri-zcool-line:before{content:"\f2d7"}.ri-zhihu-fill:before{content:"\f2d8"}.ri-zhihu-line:before{content:"\f2d9"}.ri-zoom-in-fill:before{content:"\f2da"}.ri-zoom-in-line:before{content:"\f2db"}.ri-zoom-out-fill:before{content:"\f2dc"}.ri-zoom-out-line:before{content:"\f2dd"}.ri-zzz-fill:before{content:"\f2de"}.ri-zzz-line:before{content:"\f2df"}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes expand{0%{transform:rotateY(90deg)}to{opacity:1;transform:rotateY(0)}}@keyframes slideIn{0%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes shine{to{background-position-x:-200%}}@keyframes loaderShow{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes entranceLeft{0%{opacity:0;transform:translate(-5px)}to{opacity:1;transform:translate(0)}}@keyframes entranceRight{0%{opacity:0;transform:translate(5px)}to{opacity:1;transform:translate(0)}}@keyframes entranceTop{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}@keyframes entranceBottom{0%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}@media screen and (min-width: 550px){::-webkit-scrollbar{width:8px;height:8px;border-radius:var(--baseRadius)}::-webkit-scrollbar-track{background:transparent;border-radius:var(--baseRadius)}::-webkit-scrollbar-thumb{background-color:var(--baseAlt2Color);border-radius:15px;border:2px solid transparent;background-clip:padding-box}::-webkit-scrollbar-thumb:hover,::-webkit-scrollbar-thumb:active{background-color:var(--baseAlt3Color)}html{scrollbar-color:var(--baseAlt2Color) transparent;scrollbar-width:thin;scroll-behavior:smooth}html *{scrollbar-width:inherit}}:focus-visible{outline-color:var(--primaryColor);outline-style:solid}html,body{line-height:var(--baseLineHeight);font-family:var(--baseFontFamily);font-size:var(--baseFontSize);color:var(--txtPrimaryColor);background:var(--bodyColor)}#app{overflow:auto;display:block;width:100%;height:100vh}.flatpickr-inline-container,.accordion .accordion-content,.accordion,.tabs,.tabs-content,.form-field-file .files-list,.select .txt-missing,.form-field .form-field-block,.list,.skeleton-loader,.clearfix,.content,.form-field .help-block,.overlay-panel .panel-content,.sub-panel,.panel,.block,.code-block,blockquote,p{display:block;width:100%}h1,h2,.breadcrumbs .breadcrumb-item,h3,h4,h5,h6{margin:0;font-weight:400}h1{font-size:22px;line-height:28px}h2,.breadcrumbs .breadcrumb-item{font-size:20px;line-height:26px}h3{font-size:19px;line-height:24px}h4{font-size:18px;line-height:24px}h5{font-size:17px;line-height:24px}h6{font-size:16px;line-height:22px}em{font-style:italic}ins{color:var(--txtPrimaryColor);background:var(--successAltColor);text-decoration:none}del{color:var(--txtPrimaryColor);background:var(--dangerAltColor);text-decoration:none}strong{font-weight:600}small{font-size:var(--smFontSize);line-height:var(--smLineHeight)}sub,sup{position:relative;font-size:.75em;line-height:1}sup{vertical-align:top}sub{vertical-align:bottom}p{margin:5px 0}blockquote{position:relative;padding-left:var(--smSpacing);font-style:italic;color:var(--txtHintColor)}blockquote:before{content:"";position:absolute;top:0;left:0;width:2px;height:100%;background:var(--baseColor)}code{display:inline-block;font-family:var(--monospaceFontFamily);font-style:normal;font-size:var(--lgFontSize);line-height:1.379rem;padding:0 4px;white-space:nowrap;color:var(--txtPrimaryColor);background:var(--baseAlt2Color);border-radius:var(--baseRadius)}.code-block{overflow:auto;padding:var(--xsSpacing);white-space:pre-wrap;background:var(--baseAlt1Color)}ol,ul{margin:10px 0;list-style:decimal;padding-left:var(--baseSpacing)}ol li,ul li{margin-top:5px;margin-bottom:5px}ul{list-style:disc}img{max-width:100%;vertical-align:top}hr{display:block;border:0;height:1px;width:100%;background:var(--baseAlt1Color);margin:var(--baseSpacing) 0}hr.dark{background:var(--baseAlt2Color)}a{color:inherit}a:hover{text-decoration:none}a i,a .txt{display:inline-block;vertical-align:top}.txt-mono{font-family:var(--monospaceFontFamily)}.txt-nowrap{white-space:nowrap}.txt-ellipsis{display:inline-block;vertical-align:top;flex-shrink:0;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.txt-base{font-size:var(--baseFontSize)!important}.txt-xs{font-size:var(--xsFontSize)!important;line-height:var(--smLineHeight)}.txt-sm{font-size:var(--smFontSize)!important;line-height:var(--smLineHeight)}.txt-lg{font-size:var(--lgFontSize)!important}.txt-xl{font-size:var(--xlFontSize)!important}.txt-bold{font-weight:600!important}.txt-strikethrough{text-decoration:line-through!important}.txt-break{white-space:pre-wrap!important}.txt-center{text-align:center!important}.txt-justify{text-align:justify!important}.txt-left{text-align:left!important}.txt-right{text-align:right!important}.txt-main{color:var(--txtPrimaryColor)!important}.txt-hint{color:var(--txtHintColor)!important}.txt-disabled{color:var(--txtDisabledColor)!important}.link-hint{user-select:none;cursor:pointer;color:var(--txtHintColor)!important;text-decoration:none;transition:color var(--baseAnimationSpeed)}.link-hint:hover,.link-hint:focus-visible,.link-hint:active{color:var(--txtPrimaryColor)!important}.link-fade{opacity:1;user-select:none;cursor:pointer;text-decoration:none;color:var(--txtPrimaryColor);transition:opacity var(--baseAnimationSpeed)}.link-fade:focus-visible,.link-fade:hover,.link-fade:active{opacity:.8}.txt-primary{color:var(--primaryColor)!important}.bg-primary{background:var(--primaryColor)!important}.link-primary{cursor:pointer;color:var(--primaryColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-primary:focus-visible,.link-primary:hover,.link-primary:active{opacity:.8}.txt-info{color:var(--infoColor)!important}.bg-info{background:var(--infoColor)!important}.link-info{cursor:pointer;color:var(--infoColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-info:focus-visible,.link-info:hover,.link-info:active{opacity:.8}.txt-info-alt{color:var(--infoAltColor)!important}.bg-info-alt{background:var(--infoAltColor)!important}.link-info-alt{cursor:pointer;color:var(--infoAltColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-info-alt:focus-visible,.link-info-alt:hover,.link-info-alt:active{opacity:.8}.txt-success{color:var(--successColor)!important}.bg-success{background:var(--successColor)!important}.link-success{cursor:pointer;color:var(--successColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-success:focus-visible,.link-success:hover,.link-success:active{opacity:.8}.txt-success-alt{color:var(--successAltColor)!important}.bg-success-alt{background:var(--successAltColor)!important}.link-success-alt{cursor:pointer;color:var(--successAltColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-success-alt:focus-visible,.link-success-alt:hover,.link-success-alt:active{opacity:.8}.txt-danger{color:var(--dangerColor)!important}.bg-danger{background:var(--dangerColor)!important}.link-danger{cursor:pointer;color:var(--dangerColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-danger:focus-visible,.link-danger:hover,.link-danger:active{opacity:.8}.txt-danger-alt{color:var(--dangerAltColor)!important}.bg-danger-alt{background:var(--dangerAltColor)!important}.link-danger-alt{cursor:pointer;color:var(--dangerAltColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-danger-alt:focus-visible,.link-danger-alt:hover,.link-danger-alt:active{opacity:.8}.txt-warning{color:var(--warningColor)!important}.bg-warning{background:var(--warningColor)!important}.link-warning{cursor:pointer;color:var(--warningColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-warning:focus-visible,.link-warning:hover,.link-warning:active{opacity:.8}.txt-warning-alt{color:var(--warningAltColor)!important}.bg-warning-alt{background:var(--warningAltColor)!important}.link-warning-alt{cursor:pointer;color:var(--warningAltColor)!important;text-decoration:none;user-select:none;transition:opacity var(--baseAnimationSpeed)}.link-warning-alt:focus-visible,.link-warning-alt:hover,.link-warning-alt:active{opacity:.8}.fade{opacity:.6}a.fade,.btn.fade,[tabindex].fade,[class*=link-].fade,.handle.fade{transition:all var(--baseAnimationSpeed)}a.fade:hover,.btn.fade:hover,[tabindex].fade:hover,[class*=link-].fade:hover,.handle.fade:hover{opacity:1}.noborder{border:0px!important}.hidden{display:none!important}.hidden-empty:empty{display:none!important}.content>:first-child,.form-field .help-block>:first-child,.overlay-panel .panel-content>:first-child,.sub-panel>:first-child,.panel>:first-child{margin-top:0}.content>:last-child,.form-field .help-block>:last-child,.overlay-panel .panel-content>:last-child,.sub-panel>:last-child,.panel>:last-child{margin-bottom:0}.panel{background:var(--baseColor);border-radius:var(--lgRadius);padding:calc(var(--baseSpacing) - 5px) var(--baseSpacing);box-shadow:0 2px 5px 0 var(--shadowColor)}.sub-panel{background:var(--baseColor);border-radius:var(--baseRadius);padding:calc(var(--smSpacing) - 5px) var(--smSpacing);border:1px solid var(--baseAlt1Color)}.clearfix{clear:both}.clearfix:after{content:"";display:table;clear:both}.flex{position:relative;display:flex;align-items:center;width:100%;gap:var(--smSpacing)}.flex-fill{flex:1 1 auto!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.inline-flex{position:relative;display:inline-flex;align-items:center;flex-wrap:wrap;min-width:0;gap:10px}.flex-order-0{order:0}.flex-order-1{order:1}.flex-order-2{order:2}.flex-order-3{order:3}.flex-order-4{order:4}.flex-order-5{order:5}.flex-order-6{order:6}.flex-gap-base{gap:var(--baseSpacing)!important}.flex-gap-xs{gap:var(--xsSpacing)!important}.flex-gap-sm{gap:var(--smSpacing)!important}.flex-gap-lg{gap:var(--lgSpacing)!important}.flex-gap-xl{gap:var(--xlSpacing)!important}.flex-gap-0{gap:0px!important}.flex-gap-5{gap:5px!important}.flex-gap-10{gap:10px!important}.flex-gap-15{gap:15px!important}.flex-gap-20{gap:20px!important}.flex-gap-25{gap:25px!important}.flex-gap-30{gap:30px!important}.flex-gap-35{gap:35px!important}.flex-gap-40{gap:40px!important}.flex-gap-45{gap:45px!important}.flex-gap-50{gap:50px!important}.flex-gap-55{gap:55px!important}.flex-gap-60{gap:60px!important}.m-base{margin:var(--baseSpacing)!important}.p-base{padding:var(--baseSpacing)!important}.m-xs{margin:var(--xsSpacing)!important}.p-xs{padding:var(--xsSpacing)!important}.m-sm{margin:var(--smSpacing)!important}.p-sm{padding:var(--smSpacing)!important}.m-lg{margin:var(--lgSpacing)!important}.p-lg{padding:var(--lgSpacing)!important}.m-xl{margin:var(--xlSpacing)!important}.p-xl{padding:var(--xlSpacing)!important}.m-t-auto{margin-top:auto!important}.p-t-auto{padding-top:auto!important}.m-t-base{margin-top:var(--baseSpacing)!important}.p-t-base{padding-top:var(--baseSpacing)!important}.m-t-xs{margin-top:var(--xsSpacing)!important}.p-t-xs{padding-top:var(--xsSpacing)!important}.m-t-sm{margin-top:var(--smSpacing)!important}.p-t-sm{padding-top:var(--smSpacing)!important}.m-t-lg{margin-top:var(--lgSpacing)!important}.p-t-lg{padding-top:var(--lgSpacing)!important}.m-t-xl{margin-top:var(--xlSpacing)!important}.p-t-xl{padding-top:var(--xlSpacing)!important}.m-r-auto{margin-right:auto!important}.p-r-auto{padding-right:auto!important}.m-r-base{margin-right:var(--baseSpacing)!important}.p-r-base{padding-right:var(--baseSpacing)!important}.m-r-xs{margin-right:var(--xsSpacing)!important}.p-r-xs{padding-right:var(--xsSpacing)!important}.m-r-sm{margin-right:var(--smSpacing)!important}.p-r-sm{padding-right:var(--smSpacing)!important}.m-r-lg{margin-right:var(--lgSpacing)!important}.p-r-lg{padding-right:var(--lgSpacing)!important}.m-r-xl{margin-right:var(--xlSpacing)!important}.p-r-xl{padding-right:var(--xlSpacing)!important}.m-b-auto{margin-bottom:auto!important}.p-b-auto{padding-bottom:auto!important}.m-b-base{margin-bottom:var(--baseSpacing)!important}.p-b-base{padding-bottom:var(--baseSpacing)!important}.m-b-xs{margin-bottom:var(--xsSpacing)!important}.p-b-xs{padding-bottom:var(--xsSpacing)!important}.m-b-sm{margin-bottom:var(--smSpacing)!important}.p-b-sm{padding-bottom:var(--smSpacing)!important}.m-b-lg{margin-bottom:var(--lgSpacing)!important}.p-b-lg{padding-bottom:var(--lgSpacing)!important}.m-b-xl{margin-bottom:var(--xlSpacing)!important}.p-b-xl{padding-bottom:var(--xlSpacing)!important}.m-l-auto{margin-left:auto!important}.p-l-auto{padding-left:auto!important}.m-l-base{margin-left:var(--baseSpacing)!important}.p-l-base{padding-left:var(--baseSpacing)!important}.m-l-xs{margin-left:var(--xsSpacing)!important}.p-l-xs{padding-left:var(--xsSpacing)!important}.m-l-sm{margin-left:var(--smSpacing)!important}.p-l-sm{padding-left:var(--smSpacing)!important}.m-l-lg{margin-left:var(--lgSpacing)!important}.p-l-lg{padding-left:var(--lgSpacing)!important}.m-l-xl{margin-left:var(--xlSpacing)!important}.p-l-xl{padding-left:var(--xlSpacing)!important}.m-0{margin:0!important}.p-0{padding:0!important}.m-t-0{margin-top:0!important}.p-t-0{padding-top:0!important}.m-r-0{margin-right:0!important}.p-r-0{padding-right:0!important}.m-b-0{margin-bottom:0!important}.p-b-0{padding-bottom:0!important}.m-l-0{margin-left:0!important}.p-l-0{padding-left:0!important}.m-5{margin:5px!important}.p-5{padding:5px!important}.m-t-5{margin-top:5px!important}.p-t-5{padding-top:5px!important}.m-r-5{margin-right:5px!important}.p-r-5{padding-right:5px!important}.m-b-5{margin-bottom:5px!important}.p-b-5{padding-bottom:5px!important}.m-l-5{margin-left:5px!important}.p-l-5{padding-left:5px!important}.m-10{margin:10px!important}.p-10{padding:10px!important}.m-t-10{margin-top:10px!important}.p-t-10{padding-top:10px!important}.m-r-10{margin-right:10px!important}.p-r-10{padding-right:10px!important}.m-b-10{margin-bottom:10px!important}.p-b-10{padding-bottom:10px!important}.m-l-10{margin-left:10px!important}.p-l-10{padding-left:10px!important}.m-15{margin:15px!important}.p-15{padding:15px!important}.m-t-15{margin-top:15px!important}.p-t-15{padding-top:15px!important}.m-r-15{margin-right:15px!important}.p-r-15{padding-right:15px!important}.m-b-15{margin-bottom:15px!important}.p-b-15{padding-bottom:15px!important}.m-l-15{margin-left:15px!important}.p-l-15{padding-left:15px!important}.m-20{margin:20px!important}.p-20{padding:20px!important}.m-t-20{margin-top:20px!important}.p-t-20{padding-top:20px!important}.m-r-20{margin-right:20px!important}.p-r-20{padding-right:20px!important}.m-b-20{margin-bottom:20px!important}.p-b-20{padding-bottom:20px!important}.m-l-20{margin-left:20px!important}.p-l-20{padding-left:20px!important}.m-25{margin:25px!important}.p-25{padding:25px!important}.m-t-25{margin-top:25px!important}.p-t-25{padding-top:25px!important}.m-r-25{margin-right:25px!important}.p-r-25{padding-right:25px!important}.m-b-25{margin-bottom:25px!important}.p-b-25{padding-bottom:25px!important}.m-l-25{margin-left:25px!important}.p-l-25{padding-left:25px!important}.m-30{margin:30px!important}.p-30{padding:30px!important}.m-t-30{margin-top:30px!important}.p-t-30{padding-top:30px!important}.m-r-30{margin-right:30px!important}.p-r-30{padding-right:30px!important}.m-b-30{margin-bottom:30px!important}.p-b-30{padding-bottom:30px!important}.m-l-30{margin-left:30px!important}.p-l-30{padding-left:30px!important}.m-35{margin:35px!important}.p-35{padding:35px!important}.m-t-35{margin-top:35px!important}.p-t-35{padding-top:35px!important}.m-r-35{margin-right:35px!important}.p-r-35{padding-right:35px!important}.m-b-35{margin-bottom:35px!important}.p-b-35{padding-bottom:35px!important}.m-l-35{margin-left:35px!important}.p-l-35{padding-left:35px!important}.m-40{margin:40px!important}.p-40{padding:40px!important}.m-t-40{margin-top:40px!important}.p-t-40{padding-top:40px!important}.m-r-40{margin-right:40px!important}.p-r-40{padding-right:40px!important}.m-b-40{margin-bottom:40px!important}.p-b-40{padding-bottom:40px!important}.m-l-40{margin-left:40px!important}.p-l-40{padding-left:40px!important}.m-45{margin:45px!important}.p-45{padding:45px!important}.m-t-45{margin-top:45px!important}.p-t-45{padding-top:45px!important}.m-r-45{margin-right:45px!important}.p-r-45{padding-right:45px!important}.m-b-45{margin-bottom:45px!important}.p-b-45{padding-bottom:45px!important}.m-l-45{margin-left:45px!important}.p-l-45{padding-left:45px!important}.m-50{margin:50px!important}.p-50{padding:50px!important}.m-t-50{margin-top:50px!important}.p-t-50{padding-top:50px!important}.m-r-50{margin-right:50px!important}.p-r-50{padding-right:50px!important}.m-b-50{margin-bottom:50px!important}.p-b-50{padding-bottom:50px!important}.m-l-50{margin-left:50px!important}.p-l-50{padding-left:50px!important}.m-55{margin:55px!important}.p-55{padding:55px!important}.m-t-55{margin-top:55px!important}.p-t-55{padding-top:55px!important}.m-r-55{margin-right:55px!important}.p-r-55{padding-right:55px!important}.m-b-55{margin-bottom:55px!important}.p-b-55{padding-bottom:55px!important}.m-l-55{margin-left:55px!important}.p-l-55{padding-left:55px!important}.m-60{margin:60px!important}.p-60{padding:60px!important}.m-t-60{margin-top:60px!important}.p-t-60{padding-top:60px!important}.m-r-60{margin-right:60px!important}.p-r-60{padding-right:60px!important}.m-b-60{margin-bottom:60px!important}.p-b-60{padding-bottom:60px!important}.m-l-60{margin-left:60px!important}.p-l-60{padding-left:60px!important}.no-min-width{min-width:0!important}.wrapper{position:relative;width:var(--wrapperWidth);margin:0 auto;max-width:100%}.wrapper.wrapper-sm{width:var(--smWrapperWidth)}.wrapper.wrapper-lg{width:var(--lgWrapperWidth)}.label{display:inline-flex;align-items:center;justify-content:center;gap:5px;line-height:1;padding:3px 8px;min-height:23px;text-align:center;font-size:var(--smFontSize);border-radius:30px;background:var(--baseAlt2Color);color:var(--txtPrimaryColor);white-space:nowrap}.label.label-sm{font-size:var(--xsFontSize);padding:3px 5px;min-height:18px;line-height:1}.label.label-primary{color:var(--baseColor);background:var(--primaryColor)}.label.label-info{background:var(--infoAltColor)}.label.label-success{background:var(--successAltColor)}.label.label-danger{background:var(--dangerAltColor)}.label.label-warning{background:var(--warningAltColor)}.thumb{--thumbSize: 44px;flex-shrink:0;position:relative;display:inline-flex;align-items:center;justify-content:center;line-height:1;width:var(--thumbSize);height:var(--thumbSize);background:var(--baseAlt2Color);border-radius:var(--baseRadius);color:var(--txtPrimaryColor);font-size:1.2rem;box-shadow:0 2px 5px 0 var(--shadowColor)}.thumb i{font-size:inherit}.thumb img{width:100%;height:100%;border-radius:inherit;overflow:hidden}.thumb.thumb-sm{--thumbSize: 32px;font-size:.85rem}.thumb.thumb-lg{--thumbSize: 60px;font-size:1.3rem}.thumb.thumb-xl{--thumbSize: 80px;font-size:1.5rem}.thumb.thumb-circle{border-radius:50%}.thumb.thumb-active{box-shadow:0 0 0 2px var(--primaryColor)}.section-title{display:flex;align-items:center;width:100%;column-gap:10px;row-gap:5px;margin:0 0 var(--xsSpacing);font-weight:600;font-size:var(--smFontSize);line-height:var(--smLineHeight);color:var(--txtHintColor);text-transform:uppercase}.drag-handle{outline:0;cursor:pointer;display:inline-flex;align-items:left;color:var(--txtDisabledColor);transition:color var(--baseAnimationSpeed)}.drag-handle:before,.drag-handle:after{content:"\ef77";font-family:var(--iconFontFamily);font-size:18px;line-height:1;width:7px;text-align:center}.drag-handle:focus-visible,.drag-handle:hover,.drag-handle:active{color:var(--txtPrimaryColor)}.logo{position:relative;vertical-align:top;display:inline-flex;align-items:center;gap:10px;font-size:23px;text-decoration:none;color:inherit;user-select:none}.logo strong{font-weight:700}.logo .version{position:absolute;right:0;top:-5px;line-height:1;font-size:10px;font-weight:400;padding:2px 4px;border-radius:var(--baseRadius);background:var(--dangerAltColor);color:var(--txtPrimaryColor)}.logo.logo-sm{font-size:20px}.loader{--loaderSize: 32px;position:relative;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;row-gap:10px;margin:0;color:var(--txtDisabledColor);text-align:center;font-weight:400}.loader:before{content:"\eec4";display:inline-block;vertical-align:top;clear:both;width:var(--loaderSize);height:var(--loaderSize);line-height:var(--loaderSize);font-size:var(--loaderSize);font-weight:400;font-family:var(--iconFontFamily);color:inherit;text-align:center;animation:loaderShow var(--baseAnimationSpeed),rotate .9s var(--baseAnimationSpeed) infinite linear}.loader.loader-primary{color:var(--primaryColor)}.loader.loader-info{color:var(--infoColor)}.loader.loader-info-alt{color:var(--infoAltColor)}.loader.loader-success{color:var(--successColor)}.loader.loader-success-alt{color:var(--successAltColor)}.loader.loader-danger{color:var(--dangerColor)}.loader.loader-danger-alt{color:var(--dangerAltColor)}.loader.loader-warning{color:var(--warningColor)}.loader.loader-warning-alt{color:var(--warningAltColor)}.loader.loader-sm{--loaderSize: 24px}.loader.loader-lg{--loaderSize: 42px}.skeleton-loader{position:relative;height:12px;margin:5px 0;border-radius:var(--baseRadius);background:var(--baseAlt1Color);animation:fadeIn .4s}.skeleton-loader:before{content:"";width:100%;height:100%;display:block;border-radius:inherit;background:linear-gradient(90deg,var(--baseAlt1Color) 8%,var(--bodyColor) 18%,var(--baseAlt1Color) 33%);background-size:200% 100%;animation:shine 1s linear infinite}.placeholder-section{display:flex;width:100%;align-items:center;justify-content:center;text-align:center;flex-direction:column;gap:var(--smSpacing);color:var(--txtHintColor)}.placeholder-section .icon{font-size:50px;height:50px;line-height:1;opacity:.3}.placeholder-section .icon i{font-size:inherit;vertical-align:top}.list{position:relative;border:1px solid var(--baseAlt2Color);border-radius:var(--baseRadius)}.list .list-item{word-break:break-word;position:relative;display:flex;align-items:center;width:100%;gap:10px;padding:10px;border-bottom:1px solid var(--baseAlt2Color)}.list .list-item:last-child{border-bottom:0}.entrance-top{animation:entranceTop var(--entranceAnimationSpeed)}.entrance-bottom{animation:entranceBottom var(--entranceAnimationSpeed)}.entrance-left{animation:entranceLeft var(--entranceAnimationSpeed)}.entrance-right{animation:entranceRight var(--entranceAnimationSpeed)}.grid{--gridGap: var(--baseSpacing);position:relative;display:flex;flex-grow:1;flex-wrap:wrap;row-gap:var(--gridGap);margin:0 calc(-.5 * var(--gridGap))}.grid.grid-center{align-items:center}.grid.grid-sm{--gridGap: var(--smSpacing)}.grid .form-field{margin-bottom:0}.grid>*{margin:0 calc(.5 * var(--gridGap))}.col-xxl-1,.col-xxl-2,.col-xxl-3,.col-xxl-4,.col-xxl-5,.col-xxl-6,.col-xxl-7,.col-xxl-8,.col-xxl-9,.col-xxl-10,.col-xxl-11,.col-xxl-12,.col-xl-1,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-10,.col-xl-11,.col-xl-12,.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-1,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-10,.col-11,.col-12{position:relative;width:100%;min-height:1px}.col-auto{flex:0 0 auto;width:auto}.col-12{width:calc(100% - var(--gridGap))}.col-11{width:calc(91.6666666667% - var(--gridGap))}.col-10{width:calc(83.3333333333% - var(--gridGap))}.col-9{width:calc(75% - var(--gridGap))}.col-8{width:calc(66.6666666667% - var(--gridGap))}.col-7{width:calc(58.3333333333% - var(--gridGap))}.col-6{width:calc(50% - var(--gridGap))}.col-5{width:calc(41.6666666667% - var(--gridGap))}.col-4{width:calc(33.3333333333% - var(--gridGap))}.col-3{width:calc(25% - var(--gridGap))}.col-2{width:calc(16.6666666667% - var(--gridGap))}.col-1{width:calc(8.3333333333% - var(--gridGap))}@media (min-width: 576px){.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-12{width:calc(100% - var(--gridGap))}.col-sm-11{width:calc(91.6666666667% - var(--gridGap))}.col-sm-10{width:calc(83.3333333333% - var(--gridGap))}.col-sm-9{width:calc(75% - var(--gridGap))}.col-sm-8{width:calc(66.6666666667% - var(--gridGap))}.col-sm-7{width:calc(58.3333333333% - var(--gridGap))}.col-sm-6{width:calc(50% - var(--gridGap))}.col-sm-5{width:calc(41.6666666667% - var(--gridGap))}.col-sm-4{width:calc(33.3333333333% - var(--gridGap))}.col-sm-3{width:calc(25% - var(--gridGap))}.col-sm-2{width:calc(16.6666666667% - var(--gridGap))}.col-sm-1{width:calc(8.3333333333% - var(--gridGap))}}@media (min-width: 768px){.col-md-auto{flex:0 0 auto;width:auto}.col-md-12{width:calc(100% - var(--gridGap))}.col-md-11{width:calc(91.6666666667% - var(--gridGap))}.col-md-10{width:calc(83.3333333333% - var(--gridGap))}.col-md-9{width:calc(75% - var(--gridGap))}.col-md-8{width:calc(66.6666666667% - var(--gridGap))}.col-md-7{width:calc(58.3333333333% - var(--gridGap))}.col-md-6{width:calc(50% - var(--gridGap))}.col-md-5{width:calc(41.6666666667% - var(--gridGap))}.col-md-4{width:calc(33.3333333333% - var(--gridGap))}.col-md-3{width:calc(25% - var(--gridGap))}.col-md-2{width:calc(16.6666666667% - var(--gridGap))}.col-md-1{width:calc(8.3333333333% - var(--gridGap))}}@media (min-width: 992px){.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-12{width:calc(100% - var(--gridGap))}.col-lg-11{width:calc(91.6666666667% - var(--gridGap))}.col-lg-10{width:calc(83.3333333333% - var(--gridGap))}.col-lg-9{width:calc(75% - var(--gridGap))}.col-lg-8{width:calc(66.6666666667% - var(--gridGap))}.col-lg-7{width:calc(58.3333333333% - var(--gridGap))}.col-lg-6{width:calc(50% - var(--gridGap))}.col-lg-5{width:calc(41.6666666667% - var(--gridGap))}.col-lg-4{width:calc(33.3333333333% - var(--gridGap))}.col-lg-3{width:calc(25% - var(--gridGap))}.col-lg-2{width:calc(16.6666666667% - var(--gridGap))}.col-lg-1{width:calc(8.3333333333% - var(--gridGap))}}@media (min-width: 1200px){.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-12{width:calc(100% - var(--gridGap))}.col-xl-11{width:calc(91.6666666667% - var(--gridGap))}.col-xl-10{width:calc(83.3333333333% - var(--gridGap))}.col-xl-9{width:calc(75% - var(--gridGap))}.col-xl-8{width:calc(66.6666666667% - var(--gridGap))}.col-xl-7{width:calc(58.3333333333% - var(--gridGap))}.col-xl-6{width:calc(50% - var(--gridGap))}.col-xl-5{width:calc(41.6666666667% - var(--gridGap))}.col-xl-4{width:calc(33.3333333333% - var(--gridGap))}.col-xl-3{width:calc(25% - var(--gridGap))}.col-xl-2{width:calc(16.6666666667% - var(--gridGap))}.col-xl-1{width:calc(8.3333333333% - var(--gridGap))}}@media (min-width: 1400px){.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-12{width:calc(100% - var(--gridGap))}.col-xxl-11{width:calc(91.6666666667% - var(--gridGap))}.col-xxl-10{width:calc(83.3333333333% - var(--gridGap))}.col-xxl-9{width:calc(75% - var(--gridGap))}.col-xxl-8{width:calc(66.6666666667% - var(--gridGap))}.col-xxl-7{width:calc(58.3333333333% - var(--gridGap))}.col-xxl-6{width:calc(50% - var(--gridGap))}.col-xxl-5{width:calc(41.6666666667% - var(--gridGap))}.col-xxl-4{width:calc(33.3333333333% - var(--gridGap))}.col-xxl-3{width:calc(25% - var(--gridGap))}.col-xxl-2{width:calc(16.6666666667% - var(--gridGap))}.col-xxl-1{width:calc(8.3333333333% - var(--gridGap))}}.app-tooltip{position:fixed;z-index:999999;top:0;left:0;display:inline-block;vertical-align:top;max-width:275px;padding:3px 5px;color:#fff;text-align:center;font-family:var(--baseFontFamily);font-size:var(--smFontSize);line-height:var(--smLineHeight);border-radius:var(--baseRadius);background:var(--tooltipColor);pointer-events:none;user-select:none;transition:opacity var(--baseAnimationSpeed),visibility var(--baseAnimationSpeed),transform var(--baseAnimationSpeed);transform:scale(.98);white-space:pre-line;opacity:0;visibility:hidden}.app-tooltip.code{font-family:monospace;white-space:pre-wrap;text-align:left;min-width:150px;max-width:340px}.app-tooltip.active{transform:scale(1);opacity:1;visibility:visible}.dropdown{position:absolute;z-index:99;right:0;left:auto;top:100%;cursor:default;display:inline-block;vertical-align:top;padding:5px;margin:5px 0 0;width:auto;min-width:140px;max-width:450px;max-height:330px;overflow-x:hidden;overflow-y:auto;background:var(--baseColor);border-radius:var(--baseRadius);border:1px solid var(--baseAlt2Color);box-shadow:0 2px 5px 0 var(--shadowColor)}.dropdown hr{margin:5px 0}.dropdown .dropdown-item{border:0;background:none;position:relative;outline:0;display:flex;align-items:center;column-gap:8px;width:100%;height:auto;min-height:0;text-align:left;padding:8px 10px;margin:0 0 5px;cursor:pointer;color:var(--txtPrimaryColor);font-weight:400;font-size:var(--baseFontSize);font-family:var(--baseFontFamily);line-height:var(--baseLineHeight);border-radius:var(--baseRadius);text-decoration:none;word-break:break-word;user-select:none;transition:background var(--baseAnimationSpeed),color var(--baseAnimationSpeed)}.dropdown .dropdown-item:last-child{margin-bottom:0}.dropdown .dropdown-item:focus,.dropdown .dropdown-item:hover{background:var(--baseAlt1Color)}.dropdown .dropdown-item.selected{background:var(--baseAlt2Color)}.dropdown .dropdown-item:active{transition-duration:var(--activeAnimationSpeed);background:var(--baseAlt2Color)}.dropdown .dropdown-item.disabled{color:var(--txtDisabledColor);background:none;pointer-events:none}.dropdown .dropdown-item.separator{cursor:default;background:none;text-transform:uppercase;padding-top:0;padding-bottom:0;margin-top:15px;color:var(--txtDisabledColor);font-weight:600;font-size:var(--smFontSize)}.dropdown.dropdown-upside{top:auto;bottom:100%;margin:0 0 5px}.dropdown.dropdown-left{right:auto;left:0}.dropdown.dropdown-center{right:auto;left:50%;transform:translate(-50%)}.dropdown.dropdown-sm{margin-top:5px;min-width:100px}.dropdown.dropdown-sm .dropdown-item{column-gap:7px;font-size:var(--smFontSize);margin:0 0 2px;padding:5px 7px}.dropdown.dropdown-sm .dropdown-item:last-child{margin-bottom:0}.dropdown.dropdown-sm.dropdown-upside{margin-top:0;margin-bottom:5px}.dropdown.dropdown-block{width:100%;min-width:130px;max-width:100%}.dropdown.dropdown-nowrap{white-space:nowrap}.overlay-panel{position:relative;z-index:1;display:flex;flex-direction:column;align-self:flex-end;margin-left:auto;background:var(--baseColor);height:100%;width:580px;max-width:100%;word-wrap:break-word;box-shadow:0 2px 5px 0 var(--shadowColor)}.overlay-panel .overlay-panel-section{position:relative;width:100%;margin:0;padding:var(--baseSpacing);transition:box-shadow var(--baseAnimationSpeed)}.overlay-panel .overlay-panel-section:empty{display:none}.overlay-panel .overlay-panel-section:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.overlay-panel .overlay-panel-section:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.overlay-panel .overlay-panel-section .btn{flex-grow:0}.overlay-panel img{max-width:100%}.overlay-panel .panel-header{position:relative;z-index:2;display:flex;flex-wrap:wrap;align-items:center;column-gap:10px;row-gap:var(--baseSpacing);padding:calc(var(--baseSpacing) - 7px) var(--baseSpacing)}.overlay-panel .panel-header>*{margin-top:0;margin-bottom:0}.overlay-panel .panel-header .btn-back{margin-left:-10px}.overlay-panel .panel-header .overlay-close{z-index:3;outline:0;position:absolute;right:100%;top:20px;margin:0;display:inline-flex;align-items:center;justify-content:center;width:35px;height:35px;cursor:pointer;text-align:center;font-size:1.6rem;line-height:1;border-radius:50% 0 0 50%;color:#fff;background:var(--primaryColor);opacity:.5;transition:opacity var(--baseAnimationSpeed);user-select:none}.overlay-panel .panel-header .overlay-close i{font-size:inherit}.overlay-panel .panel-header .overlay-close:hover,.overlay-panel .panel-header .overlay-close:focus-visible,.overlay-panel .panel-header .overlay-close:active{opacity:.7}.overlay-panel .panel-header .overlay-close:active{transition-duration:var(--activeAnimationSpeed);opacity:1}.overlay-panel .panel-header .btn-close{margin-right:-10px}.overlay-panel .panel-header .tabs-header{margin-bottom:-24px}.overlay-panel .panel-content{z-index:auto;flex-grow:1;overflow-x:hidden;overflow-y:auto;overflow-y:overlay;scroll-behavior:smooth}.overlay-panel .panel-header~.panel-content{padding-top:5px}.overlay-panel .panel-footer{z-index:2;column-gap:var(--smSpacing);display:flex;align-items:center;justify-content:flex-end;border-top:1px solid var(--baseAlt2Color);padding:calc(var(--baseSpacing) - 7px) var(--baseSpacing)}.overlay-panel.scrollable .panel-header{box-shadow:0 4px 5px #0000000d}.overlay-panel.scrollable .panel-footer{box-shadow:0 -4px 5px #0000000d}.overlay-panel.scrollable.scroll-top-reached .panel-header,.overlay-panel.scrollable.scroll-bottom-reached .panel-footer{box-shadow:none}.overlay-panel.overlay-panel-xl{width:850px}.overlay-panel.overlay-panel-lg{width:700px}.overlay-panel.overlay-panel-sm{width:460px}.overlay-panel.popup{height:auto;max-height:100%;align-self:center;border-radius:var(--baseRadius);margin:0 auto}.overlay-panel.popup .panel-footer{background:var(--bodyColor)}.overlay-panel.hide-content .panel-content{display:none}.overlay-panel.colored-header .panel-header{background:var(--bodyColor);border-bottom:1px solid var(--baseAlt1Color)}.overlay-panel.colored-header .panel-header .tabs-header{border-bottom:0}.overlay-panel.colored-header .panel-header .tabs-header .tab-item{border:1px solid transparent;border-bottom:0}.overlay-panel.colored-header .panel-header .tabs-header .tab-item:hover,.overlay-panel.colored-header .panel-header .tabs-header .tab-item:focus-visible{background:var(--baseAlt1Color)}.overlay-panel.colored-header .panel-header .tabs-header .tab-item:after{content:none;display:none}.overlay-panel.colored-header .panel-header .tabs-header .tab-item.active{background:var(--baseColor);border-color:var(--baseAlt1Color)}.overlay-panel.colored-header .panel-header~.panel-content{padding-top:calc(var(--baseSpacing) - 5px)}.overlay-panel.compact-header .panel-header{row-gap:var(--smSpacing)}.overlay-panel.full-width-popup{width:100%}.overlay-panel.image-preview{width:auto;min-width:300px;min-height:250px;max-width:70%;max-height:90%}.overlay-panel.image-preview .panel-header{position:absolute;z-index:99;box-shadow:none}.overlay-panel.image-preview .panel-header .overlay-close{left:100%;right:auto;border-radius:0 50% 50% 0}.overlay-panel.image-preview .panel-header .overlay-close i{margin-right:5px}.overlay-panel.image-preview .panel-header,.overlay-panel.image-preview .panel-footer{padding:10px 15px}.overlay-panel.image-preview .panel-content{padding:0;text-align:center;display:flex;align-items:center;justify-content:center}.overlay-panel.image-preview img{max-width:100%;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius)}@media (max-width: 900px){.overlay-panel .overlay-panel-section{padding:var(--smSpacing)}}.overlay-panel-container{display:flex;position:fixed;z-index:1000;flex-direction:row;align-items:center;top:0;left:0;width:100%;height:100%;overflow:hidden;margin:0;padding:0;outline:0}.overlay-panel-container .overlay{position:absolute;z-index:0;left:0;top:0;width:100%;height:100%;user-select:none;background:var(--overlayColor)}.overlay-panel-container.padded{padding:10px}.overlay-panel-wrapper{position:relative;z-index:1000;outline:0}.alert{position:relative;display:flex;column-gap:15px;align-items:center;width:100%;min-height:50px;max-width:100%;word-break:break-word;margin:0 0 var(--baseSpacing);border-radius:var(--baseRadius);padding:12px 15px;background:var(--baseAlt1Color);color:var(--txtAltColor)}.alert .content,.alert .form-field .help-block,.form-field .alert .help-block,.alert .panel,.alert .sub-panel,.alert .overlay-panel .panel-content,.overlay-panel .alert .panel-content{flex-grow:1}.alert .icon,.alert .close{display:inline-flex;align-items:center;justify-content:center;flex-grow:0;flex-shrink:0;text-align:center}.alert .icon{align-self:stretch;font-size:1.2em;padding-right:15px;font-weight:400;border-right:1px solid rgba(0,0,0,.05);color:var(--txtHintColor)}.alert .close{display:inline-flex;margin-right:-5px;width:30px;height:30px;outline:0;cursor:pointer;text-align:center;font-size:var(--smFontSize);line-height:30px;border-radius:30px;text-decoration:none;color:inherit;opacity:.5;transition:opacity var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.alert .close:hover,.alert .close:focus{opacity:1;background:rgba(255,255,255,.2)}.alert .close:active{opacity:1;background:rgba(255,255,255,.3);transition-duration:var(--activeAnimationSpeed)}.alert code,.alert hr{background:rgba(0,0,0,.1)}.alert.alert-info{background:var(--infoAltColor)}.alert.alert-info .icon{color:var(--infoColor)}.alert.alert-warning{background:var(--warningAltColor)}.alert.alert-warning .icon{color:var(--warningColor)}.alert.alert-success{background:var(--successAltColor)}.alert.alert-success .icon{color:var(--successColor)}.alert.alert-danger{background:var(--dangerAltColor)}.alert.alert-danger .icon{color:var(--dangerColor)}.toasts-wrapper{position:fixed;z-index:999999;bottom:0;left:0;right:0;padding:0 var(--smSpacing);width:auto;display:block;text-align:center;pointer-events:none}.toasts-wrapper .alert{text-align:left;pointer-events:auto;width:var(--smWrapperWidth);margin:var(--baseSpacing) auto;box-shadow:0 2px 5px 0 var(--shadowColor)}.app-sidebar~.app-body .toasts-wrapper{left:var(--appSidebarWidth)}.app-sidebar~.app-body .page-sidebar~.toasts-wrapper{left:calc(var(--appSidebarWidth) + var(--pageSidebarWidth))}button{outline:0;border:0;background:none;padding:0;text-align:left;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit}.btn{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;outline:0;border:0;margin:0;flex-shrink:0;cursor:pointer;padding:5px 20px;column-gap:7px;user-select:none;min-width:var(--btnHeight);min-height:var(--btnHeight);text-align:center;text-decoration:none;line-height:1;font-weight:600;color:#fff;font-size:var(--baseFontSize);font-family:var(--baseFontFamily);border-radius:var(--btnRadius);background:none;transition:color var(--baseAnimationSpeed)}.btn i{font-size:1.1428em;vertical-align:middle;display:inline-block}.btn:before{content:"";border-radius:inherit;position:absolute;left:0;top:0;z-index:-1;width:100%;height:100%;pointer-events:none;user-select:none;backface-visibility:hidden;background:var(--primaryColor);transition:filter var(--baseAnimationSpeed),opacity var(--baseAnimationSpeed),transform var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.btn:hover:before,.btn:focus-visible:before{opacity:.9}.btn.active,.btn:active{z-index:999}.btn.active:before,.btn:active:before{opacity:.8;transition-duration:var(--activeAnimationSpeed)}.btn.btn-info:before{background:var(--infoColor)}.btn.btn-info:hover:before,.btn.btn-info:focus-visible:before{opacity:.8}.btn.btn-info:active:before{opacity:.7}.btn.btn-success:before{background:var(--successColor)}.btn.btn-success:hover:before,.btn.btn-success:focus-visible:before{opacity:.8}.btn.btn-success:active:before{opacity:.7}.btn.btn-danger:before{background:var(--dangerColor)}.btn.btn-danger:hover:before,.btn.btn-danger:focus-visible:before{opacity:.8}.btn.btn-danger:active:before{opacity:.7}.btn.btn-warning:before{background:var(--warningColor)}.btn.btn-warning:hover:before,.btn.btn-warning:focus-visible:before{opacity:.8}.btn.btn-warning:active:before{opacity:.7}.btn.btn-hint:before{background:var(--baseAlt4Color)}.btn.btn-hint:hover:before,.btn.btn-hint:focus-visible:before{opacity:.8}.btn.btn-hint:active:before{opacity:.7}.btn.btn-outline{border:2px solid currentColor;background:#fff}.btn.btn-secondary,.btn.btn-outline{box-shadow:none;color:var(--txtPrimaryColor)}.btn.btn-secondary:before,.btn.btn-outline:before{opacity:0;background:var(--baseAlt4Color)}.btn.btn-secondary:focus-visible:before,.btn.btn-secondary:hover:before,.btn.btn-secondary:active:before,.btn.btn-secondary.active:before,.btn.btn-outline:focus-visible:before,.btn.btn-outline:hover:before,.btn.btn-outline:active:before,.btn.btn-outline.active:before{opacity:.11}.btn.btn-secondary.active:before,.btn.btn-secondary:active:before,.btn.btn-outline.active:before,.btn.btn-outline:active:before{opacity:.22}.btn.btn-secondary.btn-info,.btn.btn-outline.btn-info{color:var(--infoColor)}.btn.btn-secondary.btn-info:before,.btn.btn-outline.btn-info:before{background:var(--infoColor)}.btn.btn-secondary.btn-success,.btn.btn-outline.btn-success{color:var(--successColor)}.btn.btn-secondary.btn-success:before,.btn.btn-outline.btn-success:before{background:var(--successColor)}.btn.btn-secondary.btn-danger,.btn.btn-outline.btn-danger{color:var(--dangerColor)}.btn.btn-secondary.btn-danger:before,.btn.btn-outline.btn-danger:before{background:var(--dangerColor)}.btn.btn-secondary.btn-warning,.btn.btn-outline.btn-warning{color:var(--warningColor)}.btn.btn-secondary.btn-warning:before,.btn.btn-outline.btn-warning:before{background:var(--warningColor)}.btn.btn-secondary.btn-hint,.btn.btn-outline.btn-hint{color:var(--baseAlt4Color)}.btn.btn-secondary.btn-hint:before,.btn.btn-outline.btn-hint:before{background:var(--baseAlt4Color)}.btn.btn-secondary.btn-hint,.btn.btn-outline.btn-hint{color:var(--txtHintColor)}.btn.btn-disabled,.btn[disabled]{box-shadow:none;cursor:default;background:var(--baseAlt2Color);color:var(--txtDisabledColor)!important}.btn.btn-disabled:before,.btn[disabled]:before{display:none}.btn.btn-disabled.btn-secondary,.btn[disabled].btn-secondary{background:none}.btn.btn-disabled.btn-outline,.btn[disabled].btn-outline{border-color:var(--baseAlt2Color)}.btn.btn-expanded{min-width:140px}.btn.btn-expanded-sm{min-width:90px}.btn.btn-expanded-lg{min-width:170px}.btn.btn-lg{column-gap:10px;font-size:var(--lgFontSize);min-height:var(--lgBtnHeight);min-width:var(--lgBtnHeight);padding-left:30px;padding-right:30px}.btn.btn-lg i{font-size:1.2666em}.btn.btn-lg.btn-expanded{min-width:240px}.btn.btn-lg.btn-expanded-sm{min-width:160px}.btn.btn-lg.btn-expanded-lg{min-width:300px}.btn.btn-sm,.btn.btn-xs{column-gap:5px;font-size:var(--smFontSize);min-height:var(--smBtnHeight);min-width:var(--smBtnHeight);padding-left:12px;padding-right:12px}.btn.btn-sm i,.btn.btn-xs i{font-size:1rem}.btn.btn-sm.btn-expanded,.btn.btn-xs.btn-expanded{min-width:100px}.btn.btn-sm.btn-expanded-sm,.btn.btn-xs.btn-expanded-sm{min-width:80px}.btn.btn-sm.btn-expanded-lg,.btn.btn-xs.btn-expanded-lg{min-width:130px}.btn.btn-xs{min-width:var(--xsBtnHeight);min-height:var(--xsBtnHeight)}.btn.btn-block{display:flex;width:100%}.btn.btn-circle{border-radius:50%;padding:0;gap:0}.btn.btn-circle i{font-size:1.2857rem;text-align:center;width:24px;height:24px;line-height:24px}.btn.btn-circle i:before{margin:0;display:block}.btn.btn-circle.btn-sm i,.btn.btn-circle.btn-xs i{font-size:1.1rem}.btn.btn-loading{--loaderSize: 24px;cursor:default;pointer-events:none}.btn.btn-loading:after{content:"\eec4";position:absolute;display:inline-block;vertical-align:top;left:50%;top:50%;width:var(--loaderSize);height:var(--loaderSize);line-height:var(--loaderSize);font-size:var(--loaderSize);color:inherit;text-align:center;font-weight:400;margin-left:calc(var(--loaderSize) * -.5);margin-top:calc(var(--loaderSize) * -.5);font-family:var(--iconFontFamily);animation:loaderShow var(--baseAnimationSpeed),rotate .9s var(--baseAnimationSpeed) infinite linear}.btn.btn-loading>*{opacity:0;transform:scale(.9)}.btn.btn-loading.btn-sm,.btn.btn-loading.btn-xs{--loaderSize: 20px}.btn.btn-loading.btn-lg{--loaderSize: 28px}.btn.btn-prev i,.btn.btn-next i{transition:transform var(--baseAnimationSpeed)}.btn.btn-prev:hover i,.btn.btn-prev:focus-within i,.btn.btn-next:hover i,.btn.btn-next:focus-within i{transform:translate(3px)}.btn.btn-prev:hover i,.btn.btn-prev:focus-within i{transform:translate(-3px)}.btns-group{display:inline-flex;align-items:center;gap:var(--xsSpacing)}.code-editor,.select .selected-container,input,select,textarea{display:block;width:100%;outline:0;border:0;margin:0;background:none;padding:5px 10px;line-height:20px;min-width:0;min-height:var(--inputHeight);background:var(--baseAlt1Color);color:var(--txtPrimaryColor);font-size:var(--baseFontSize);font-family:var(--baseFontFamily);font-weight:400;border-radius:var(--baseRadius);overflow:auto;overflow:overlay}.code-editor::placeholder,.select .selected-container::placeholder,input::placeholder,select::placeholder,textarea::placeholder{color:var(--txtDisabledColor)}@media screen and (min-width: 550px){.code-editor:focus,.select .selected-container:focus,input:focus,select:focus,textarea:focus,.code-editor:focus-within,.select .selected-container:focus-within,input:focus-within,select:focus-within,textarea:focus-within{scrollbar-color:var(--baseAlt3Color) transparent;scrollbar-width:thin;scroll-behavior:smooth}.code-editor:focus::-webkit-scrollbar,.select .selected-container:focus::-webkit-scrollbar,input:focus::-webkit-scrollbar,select:focus::-webkit-scrollbar,textarea:focus::-webkit-scrollbar,.code-editor:focus-within::-webkit-scrollbar,.select .selected-container:focus-within::-webkit-scrollbar,input:focus-within::-webkit-scrollbar,select:focus-within::-webkit-scrollbar,textarea:focus-within::-webkit-scrollbar{width:8px;height:8px;border-radius:var(--baseRadius)}.code-editor:focus::-webkit-scrollbar-track,.select .selected-container:focus::-webkit-scrollbar-track,input:focus::-webkit-scrollbar-track,select:focus::-webkit-scrollbar-track,textarea:focus::-webkit-scrollbar-track,.code-editor:focus-within::-webkit-scrollbar-track,.select .selected-container:focus-within::-webkit-scrollbar-track,input:focus-within::-webkit-scrollbar-track,select:focus-within::-webkit-scrollbar-track,textarea:focus-within::-webkit-scrollbar-track{background:transparent;border-radius:var(--baseRadius)}.code-editor:focus::-webkit-scrollbar-thumb,.select .selected-container:focus::-webkit-scrollbar-thumb,input:focus::-webkit-scrollbar-thumb,select:focus::-webkit-scrollbar-thumb,textarea:focus::-webkit-scrollbar-thumb,.code-editor:focus-within::-webkit-scrollbar-thumb,.select .selected-container:focus-within::-webkit-scrollbar-thumb,input:focus-within::-webkit-scrollbar-thumb,select:focus-within::-webkit-scrollbar-thumb,textarea:focus-within::-webkit-scrollbar-thumb{background-color:var(--baseAlt3Color);border-radius:15px;border:2px solid transparent;background-clip:padding-box}.code-editor:focus::-webkit-scrollbar-thumb:hover,.select .selected-container:focus::-webkit-scrollbar-thumb:hover,input:focus::-webkit-scrollbar-thumb:hover,select:focus::-webkit-scrollbar-thumb:hover,textarea:focus::-webkit-scrollbar-thumb:hover,.code-editor:focus::-webkit-scrollbar-thumb:active,.select .selected-container:focus::-webkit-scrollbar-thumb:active,input:focus::-webkit-scrollbar-thumb:active,select:focus::-webkit-scrollbar-thumb:active,textarea:focus::-webkit-scrollbar-thumb:active,.code-editor:focus-within::-webkit-scrollbar-thumb:hover,.select .selected-container:focus-within::-webkit-scrollbar-thumb:hover,input:focus-within::-webkit-scrollbar-thumb:hover,select:focus-within::-webkit-scrollbar-thumb:hover,textarea:focus-within::-webkit-scrollbar-thumb:hover,.code-editor:focus-within::-webkit-scrollbar-thumb:active,.select .selected-container:focus-within::-webkit-scrollbar-thumb:active,input:focus-within::-webkit-scrollbar-thumb:active,select:focus-within::-webkit-scrollbar-thumb:active,textarea:focus-within::-webkit-scrollbar-thumb:active{background-color:var(--baseAlt4Color)}}[readonly].code-editor,.select [readonly].selected-container,input[readonly],select[readonly],textarea[readonly],.readonly.code-editor,.select .readonly.selected-container,input.readonly,select.readonly,textarea.readonly{cursor:default;color:var(--txtHintColor)}[disabled].code-editor,.select [disabled].selected-container,input[disabled],select[disabled],textarea[disabled],.disabled.code-editor,.select .disabled.selected-container,input.disabled,select.disabled,textarea.disabled{cursor:default;color:var(--txtDisabledColor)}.txt-mono.code-editor,.select .txt-mono.selected-container,input.txt-mono,select.txt-mono,textarea.txt-mono{line-height:var(--smLineHeight)}.code.code-editor,.select .code.selected-container,input.code,select.code,textarea.code{font-size:15px;line-height:1.379rem;font-family:var(--monospaceFontFamily)}input{height:var(--inputHeight)}input:-webkit-autofill{-webkit-text-fill-color:var(--txtPrimaryColor);-webkit-box-shadow:inset 0 0 0 50px var(--baseAlt1Color)}.form-field:focus-within input:-webkit-autofill,input:-webkit-autofill:focus{-webkit-box-shadow:inset 0 0 0 50px var(--baseAlt2Color)}input[type=file]{padding:9px}input[type=checkbox],input[type=radio]{width:auto;height:auto;display:inline}input[type=number]{-moz-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}textarea{min-height:80px;resize:vertical}select{padding-left:8px}.form-field{--hPadding: 15px;position:relative;display:block;width:100%;margin-bottom:var(--baseSpacing)}.form-field .code-editor,.form-field .select .selected-container,.select .form-field .selected-container,.form-field input,.form-field select,.form-field textarea{z-index:0;padding-left:var(--hPadding);padding-right:var(--hPadding)}.form-field select{padding-left:8px}.form-field label{display:flex;width:100%;column-gap:5px;align-items:center;user-select:none;font-weight:600;color:var(--txtHintColor);font-size:var(--xsFontSize);text-transform:uppercase;line-height:1;padding-top:12px;padding-bottom:2px;padding-left:var(--hPadding);padding-right:var(--hPadding);border:0;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius)}.form-field label~.code-editor,.form-field .select label~.selected-container,.select .form-field label~.selected-container,.form-field label~input,.form-field label~select,.form-field label~textarea{border-top:0;padding-top:2px;padding-bottom:8px;border-top-left-radius:0;border-top-right-radius:0}.form-field label i{font-size:.96rem;line-height:1;margin-top:-2px;margin-bottom:-2px}.form-field .code-editor,.form-field .select .selected-container,.select .form-field .selected-container,.form-field input,.form-field select,.form-field textarea,.form-field label{background:var(--baseAlt1Color);transition:color var(--baseAnimationSpeed),background var(--baseAnimationSpeed),box-shadow var(--baseAnimationSpeed)}.form-field:focus-within .code-editor,.form-field:focus-within .select .selected-container,.select .form-field:focus-within .selected-container,.form-field:focus-within input,.form-field:focus-within select,.form-field:focus-within textarea,.form-field:focus-within label{background:var(--baseAlt2Color)}.form-field:focus-within label{color:var(--txtPrimaryColor)}.form-field .form-field-addon{position:absolute;display:inline-flex;align-items:center;z-index:1;top:0px;right:var(--hPadding);min-height:var(--inputHeight);color:var(--txtHintColor)}.form-field .form-field-addon .btn{margin-right:-5px}.form-field .form-field-addon~.code-editor,.form-field .select .form-field-addon~.selected-container,.select .form-field .form-field-addon~.selected-container,.form-field .form-field-addon~input,.form-field .form-field-addon~select,.form-field .form-field-addon~textarea{padding-right:35px}.form-field label~.form-field-addon{min-height:calc(26px + var(--inputHeight))}.form-field .help-block{margin-top:8px;font-size:var(--smFontSize);line-height:var(--smLineHeight);color:var(--txtHintColor);word-break:break-word}.form-field .help-block pre{white-space:pre-wrap}.form-field .help-block-error{color:var(--dangerColor)}.form-field.error>label,.form-field.invalid>label{color:var(--dangerColor)}.form-field.invalid label,.form-field.invalid .code-editor,.form-field.invalid .select .selected-container,.select .form-field.invalid .selected-container,.form-field.invalid input,.form-field.invalid select,.form-field.invalid textarea{background:var(--dangerAltColor)}.form-field.required:not(.form-field-toggle)>label:after{content:"*";color:var(--dangerColor);margin-top:-2px;margin-left:-2px}.form-field.disabled>label{color:var(--txtDisabledColor)}.form-field.disabled.required>label:after{opacity:.5}.form-field input[type=radio],.form-field input[type=checkbox]{position:absolute;z-index:-1;left:0;width:0;height:0;min-height:0;min-width:0;border:0;background:none;user-select:none;pointer-events:none;box-shadow:none;opacity:0}.form-field input[type=radio]~label,.form-field input[type=checkbox]~label{border:0;margin:0;outline:0;background:none;display:inline-flex;vertical-align:top;align-items:center;width:auto;column-gap:5px;user-select:none;padding:0 0 0 27px;line-height:20px;min-height:20px;font-weight:400;font-size:var(--baseFontSize);text-transform:none;color:var(--txtPrimaryColor)}.form-field input[type=radio]~label:before,.form-field input[type=checkbox]~label:before{content:"";display:inline-block;vertical-align:top;position:absolute;z-index:0;left:0;top:0;width:20px;height:20px;line-height:16px;font-family:var(--iconFontFamily);font-size:1.2rem;text-align:center;color:var(--baseColor);cursor:pointer;background:var(--baseColor);border-radius:var(--baseRadius);border:2px solid var(--baseAlt3Color);transition:transform var(--baseAnimationSpeed),border-color var(--baseAnimationSpeed),color var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.form-field input[type=radio]~label:active:before,.form-field input[type=checkbox]~label:active:before{transform:scale(.9)}.form-field input[type=radio]:focus~label:before,.form-field input[type=radio]~label:hover:before,.form-field input[type=checkbox]:focus~label:before,.form-field input[type=checkbox]~label:hover:before{border-color:var(--baseAlt4Color)}.form-field input[type=radio]:checked~label:before,.form-field input[type=checkbox]:checked~label:before{content:"\eb7a";box-shadow:none;mix-blend-mode:unset;background:var(--successColor);border-color:var(--successColor)}.form-field input[type=radio]:disabled~label,.form-field input[type=checkbox]:disabled~label{pointer-events:none;cursor:not-allowed;color:var(--txtDisabledColor)}.form-field input[type=radio]:disabled~label:before,.form-field input[type=checkbox]:disabled~label:before{opacity:.5}.form-field input[type=radio]~label:before{border-radius:50%;font-size:1rem}.form-field .form-field-block{position:relative;margin:0 0 var(--xsSpacing)}.form-field .form-field-block:last-child{margin-bottom:0}.form-field.form-field-toggle input[type=radio]~label,.form-field.form-field-toggle input[type=checkbox]~label{position:relative}.form-field.form-field-toggle input[type=radio]~label:before,.form-field.form-field-toggle input[type=checkbox]~label:before{content:"";border:0;box-shadow:none;background:var(--baseAlt3Color);transition:background var(--activeAnimationSpeed)}.form-field.form-field-toggle input[type=radio]~label:after,.form-field.form-field-toggle input[type=checkbox]~label:after{content:"";position:absolute;z-index:1;cursor:pointer;background:var(--baseColor);transition:left var(--activeAnimationSpeed),transform var(--activeAnimationSpeed),background var(--activeAnimationSpeed);box-shadow:0 2px 5px 0 var(--shadowColor)}.form-field.form-field-toggle input[type=radio]~label:active:before,.form-field.form-field-toggle input[type=checkbox]~label:active:before{transform:none}.form-field.form-field-toggle input[type=radio]~label:active:after,.form-field.form-field-toggle input[type=checkbox]~label:active:after{transform:scale(.9)}.form-field.form-field-toggle input[type=radio]:focus-visible~label:before,.form-field.form-field-toggle input[type=checkbox]:focus-visible~label:before{box-shadow:0 0 0 2px var(--baseAlt2Color)}.form-field.form-field-toggle input[type=radio]~label:hover:before,.form-field.form-field-toggle input[type=checkbox]~label:hover:before{background:var(--baseAlt4Color)}.form-field.form-field-toggle input[type=radio]:checked~label:before,.form-field.form-field-toggle input[type=checkbox]:checked~label:before{background:var(--successColor)}.form-field.form-field-toggle input[type=radio]:checked~label:after,.form-field.form-field-toggle input[type=checkbox]:checked~label:after{background:var(--baseColor)}.form-field.form-field-toggle input[type=radio]~label,.form-field.form-field-toggle input[type=checkbox]~label{min-height:24px;padding-left:47px}.form-field.form-field-toggle input[type=radio]~label:empty,.form-field.form-field-toggle input[type=checkbox]~label:empty{padding-left:40px}.form-field.form-field-toggle input[type=radio]~label:before,.form-field.form-field-toggle input[type=checkbox]~label:before{width:40px;height:24px;border-radius:24px}.form-field.form-field-toggle input[type=radio]~label:after,.form-field.form-field-toggle input[type=checkbox]~label:after{top:4px;left:4px;width:16px;height:16px;border-radius:16px}.form-field.form-field-toggle input[type=radio]:checked~label:after,.form-field.form-field-toggle input[type=checkbox]:checked~label:after{left:20px}.form-field.form-field-toggle.form-field-sm input[type=radio]~label,.form-field.form-field-toggle.form-field-sm input[type=checkbox]~label{min-height:20px;padding-left:39px}.form-field.form-field-toggle.form-field-sm input[type=radio]~label:empty,.form-field.form-field-toggle.form-field-sm input[type=checkbox]~label:empty{padding-left:32px}.form-field.form-field-toggle.form-field-sm input[type=radio]~label:before,.form-field.form-field-toggle.form-field-sm input[type=checkbox]~label:before{width:32px;height:20px;border-radius:20px}.form-field.form-field-toggle.form-field-sm input[type=radio]~label:after,.form-field.form-field-toggle.form-field-sm input[type=checkbox]~label:after{top:4px;left:4px;width:12px;height:12px;border-radius:12px}.form-field.form-field-toggle.form-field-sm input[type=radio]:checked~label:after,.form-field.form-field-toggle.form-field-sm input[type=checkbox]:checked~label:after{left:16px}.form-field-group{display:flex;width:100%;align-items:center}.form-field-group>.form-field{flex-grow:1;border-left:1px solid var(--baseAlt2Color)}.form-field-group>.form-field:first-child{border-left:0}.form-field-group>.form-field:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.form-field-group>.form-field:not(:first-child)>label{border-top-left-radius:0}.form-field-group>.form-field:not(:first-child)>.code-editor,.select .form-field-group>.form-field:not(:first-child)>.selected-container,.form-field-group>.form-field:not(:first-child)>input,.form-field-group>.form-field:not(:first-child)>select,.form-field-group>.form-field:not(:first-child)>textarea,.form-field-group>.form-field:not(:first-child)>.select .selected-container{border-bottom-left-radius:0}.form-field-group>.form-field:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.form-field-group>.form-field:not(:last-child)>label{border-top-right-radius:0}.form-field-group>.form-field:not(:last-child)>.code-editor,.select .form-field-group>.form-field:not(:last-child)>.selected-container,.form-field-group>.form-field:not(:last-child)>input,.form-field-group>.form-field:not(:last-child)>select,.form-field-group>.form-field:not(:last-child)>textarea,.form-field-group>.form-field:not(:last-child)>.select .selected-container{border-bottom-right-radius:0}.form-field-group .form-field.col-12{width:100%}.form-field-group .form-field.col-11{width:91.6666666667%}.form-field-group .form-field.col-10{width:83.3333333333%}.form-field-group .form-field.col-9{width:75%}.form-field-group .form-field.col-8{width:66.6666666667%}.form-field-group .form-field.col-7{width:58.3333333333%}.form-field-group .form-field.col-6{width:50%}.form-field-group .form-field.col-5{width:41.6666666667%}.form-field-group .form-field.col-4{width:33.3333333333%}.form-field-group .form-field.col-3{width:25%}.form-field-group .form-field.col-2{width:16.6666666667%}.form-field-group .form-field.col-1{width:8.3333333333%}.select{position:relative;display:block;outline:0}.select .option{user-select:none;column-gap:8px}.select .option .icon{min-width:20px;text-align:center;line-height:inherit}.select .option .icon i{vertical-align:middle;line-height:inherit}.select .txt-placeholder{color:var(--txtHintColor)}label~.select .selected-container{border-top:0}.select .selected-container{position:relative;display:flex;flex-wrap:wrap;width:100%;align-items:center;padding-top:0;padding-bottom:0;padding-right:35px!important;user-select:none}.select .selected-container:after{content:"\ea4d";position:absolute;right:5px;top:50%;width:20px;height:20px;line-height:20px;text-align:center;margin-top:-10px;display:inline-block;vertical-align:top;font-size:1rem;font-family:var(--iconFontFamily);align-self:flex-end;color:var(--txtHintColor);transition:color var(--baseAnimationSpeed),transform var(--baseAnimationSpeed)}.select .selected-container:active,.select .selected-container.active{border-bottom-left-radius:0;border-bottom-right-radius:0}.select .selected-container:active:after,.select .selected-container.active:after{color:var(--txtPrimaryColor);transform:rotate(180deg)}.select .selected-container .option{display:flex;width:100%;align-items:center;max-width:100%;user-select:text}.select .selected-container .clear{margin-left:auto;cursor:pointer;color:var(--txtHintColor);transition:color var(--baseAnimationSpeed)}.select .selected-container .clear i{display:inline-block;vertical-align:middle;line-height:1}.select .selected-container .clear:hover{color:var(--txtPrimaryColor)}.select.multiple .selected-container{display:flex;align-items:center;padding-left:2px;row-gap:3px;column-gap:4px}.select.multiple .selected-container .txt-placeholder{margin-left:5px}.select.multiple .selected-container .option{display:inline-flex;width:auto;padding:3px 5px;line-height:1;border-radius:var(--baseRadius);background:var(--baseColor)}.select:not(.multiple) .selected-container .label{margin-left:-2px}.select:not(.multiple) .selected-container .option .txt{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:100%;line-height:normal}.select:not(.multiple) .selected-container:hover{cursor:pointer}.select.disabled{color:var(--txtDisabledColor);pointer-events:none}.select.disabled .txt-placeholder,.select.disabled .selected-container{color:inherit}.select.disabled .selected-container .link-hint{pointer-events:auto}.select.disabled .selected-container *:not(.link-hint){color:inherit!important}.select.disabled .selected-container:after,.select.disabled .selected-container .clear{display:none}.select.disabled .selected-container:hover{cursor:inherit}.select .txt-missing{color:var(--txtHintColor);padding:5px 12px;margin:0}.select .options-dropdown{max-height:none;border:0;overflow:auto;border-top-left-radius:0;border-top-right-radius:0;margin-top:-2px;box-shadow:0 2px 5px 0 var(--shadowColor),inset 0 0 0 2px var(--baseAlt2Color)}.select .options-dropdown .input-group:focus-within{box-shadow:none}.select .options-dropdown .form-field.options-search{margin:0 0 5px;padding:0 0 2px;color:var(--txtHintColor);border-bottom:1px solid var(--baseAlt2Color)}.select .options-dropdown .form-field.options-search .input-group{border-radius:0;padding:0 0 0 10px;margin:0;background:none;column-gap:0;border:0}.select .options-dropdown .form-field.options-search input{border:0;padding-left:9px;padding-right:9px;background:none}.select .options-dropdown .options-list{overflow:auto;max-height:270px;width:auto;margin-left:0;margin-right:-5px;padding-right:5px}.select .options-list:not(:empty)~[slot=afterOptions]:not(:empty){margin:5px -5px -5px}.select .options-list:not(:empty)~[slot=afterOptions]:not(:empty) .btn-block{border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:var(--baseRadius);border-bottom-right-radius:var(--baseRadius)}label~.select .selected-container{padding-bottom:4px;border-top-left-radius:0;border-top-right-radius:0}label~.select.multiple .selected-container{padding-top:3px;padding-bottom:3px;padding-left:10px}.select.block-options.multiple .selected-container .option{width:100%;box-shadow:0 2px 5px 0 var(--shadowColor)}.field-type-select .options-dropdown{padding:2px}.field-type-select .options-dropdown .form-field.options-search{margin:0}.field-type-select .options-dropdown .options-list{max-height:490px;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;margin:0;padding:0}.field-type-select .options-dropdown .dropdown-item{width:50%;flex-grow:1;margin:0;padding-left:12px;border-radius:0;border-bottom:1px solid var(--baseAlt2Color)}.field-type-select .options-dropdown .dropdown-item:nth-child(2n){border-left:1px solid var(--baseAlt2Color)}.field-type-select .options-dropdown .dropdown-item:nth-last-child(-n+2){border-bottom:0}.field-type-select .options-dropdown .dropdown-item.selected{background:var(--baseAlt1Color)}.form-field-file label{border-bottom:0}.form-field-file .filename{align-items:center;max-width:100%;min-width:0;margin-right:auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.form-field-file .filename i{text-decoration:none}.form-field-file .files-list{padding-top:5px;background:var(--baseAlt1Color);border:0;border-bottom-left-radius:var(--baseRadius);border-bottom-right-radius:var(--baseRadius);transition:background var(--baseAnimationSpeed)}.form-field-file .files-list .list-item{display:flex;width:100%;align-items:center;row-gap:10px;column-gap:var(--xsSpacing);padding:10px 15px;min-height:44px;border-top:1px solid var(--baseAlt2Color)}.form-field-file .files-list .list-item:last-child{border-radius:inherit;border-bottom:0}.form-field-file .files-list .btn-list-item{padding:5px}.form-field-file:focus-within .files-list,.form-field-file:focus-within label{background:var(--baseAlt1Color)}.form-field label~.code-editor{padding-bottom:6px;padding-top:4px}.code-editor .cm-editor{border:0!important;outline:none!important}.code-editor .cm-editor .cm-line{padding-left:0;padding-right:0}.code-editor .cm-editor .cm-tooltip-autocomplete{box-shadow:0 2px 5px 0 var(--shadowColor);border-radius:var(--baseRadius);background:var(--baseColor);border:0;z-index:9999;padding:0 3px;font-size:.92rem}.code-editor .cm-editor .cm-tooltip-autocomplete ul{margin:0;border-radius:inherit}.code-editor .cm-editor .cm-tooltip-autocomplete ul>:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.code-editor .cm-editor .cm-tooltip-autocomplete ul>:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.code-editor .cm-editor .cm-tooltip-autocomplete ul li[aria-selected]{background:var(--infoColor)}.code-editor .cm-editor .cm-scroller{outline:0!important;font-family:var(--monospaceFontFamily);font-size:var(--baseFontSize);line-height:var(--baseLineHeight)}.code-editor .cm-editor .cm-cursorLayer .cm-cursor{margin-left:0!important}.code-editor .cm-editor .cm-placeholder{color:var(--txtDisabledColor);font-family:var(--monospaceFontFamily);font-size:var(--baseFontSize);line-height:var(--baseLineHeight)}.code-editor .cm-editor .cm-selectionMatch{background:var(--infoAltColor)}.code-editor .cm-editor.cm-focused .cm-matchingBracket{background-color:#328c821a}.main-menu{--menuItemSize: 45px;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;row-gap:var(--smSpacing);font-size:var(--xlFontSize);color:var(--txtPrimaryColor)}.main-menu i{font-size:24px;line-height:1}.main-menu .menu-item{position:relative;outline:0;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;text-align:center;justify-content:center;user-select:none;color:inherit;min-width:var(--menuItemSize);min-height:var(--menuItemSize);border:2px solid transparent;border-radius:var(--lgRadius);transition:background var(--baseAnimationSpeed),border var(--baseAnimationSpeed)}.main-menu .menu-item:focus-visible,.main-menu .menu-item:hover{background:var(--baseAlt1Color)}.main-menu .menu-item:active{background:var(--baseAlt2Color);transition-duration:var(--activeAnimationSpeed)}.main-menu .menu-item.active,.main-menu .menu-item.current-route{background:var(--baseColor);border-color:var(--primaryColor)}.app-sidebar{position:relative;z-index:1;display:flex;flex-grow:0;flex-shrink:0;flex-direction:column;align-items:center;width:var(--appSidebarWidth);padding:var(--smSpacing) 0px var(--smSpacing);background:var(--baseColor);border-right:1px solid var(--baseAlt2Color)}.app-sidebar .main-menu{flex-grow:1;justify-content:flex-start;overflow-x:hidden;overflow-y:auto;overflow-y:overlay;margin-top:34px;margin-bottom:var(--baseSpacing)}.app-layout{display:flex;width:100%;height:100vh}.app-layout .app-body{flex-grow:1;min-width:0;height:100%;display:flex;align-items:stretch}.app-layout .app-sidebar~.app-body{min-width:650px}.page-sidebar{--sidebarListItemMargin: 10px;z-index:0;display:flex;flex-direction:column;width:var(--pageSidebarWidth);flex-shrink:0;flex-grow:0;overflow-x:hidden;overflow-y:auto;background:var(--baseColor);padding:calc(var(--baseSpacing) - 5px) 0 var(--smSpacing);border-right:1px solid var(--baseAlt2Color)}.page-sidebar>*{padding:0 var(--smSpacing)}.page-sidebar .sidebar-content{overflow-x:hidden;overflow-y:auto;overflow-y:overlay}.page-sidebar .sidebar-content>:first-child{margin-top:0}.page-sidebar .sidebar-content>:last-child{margin-bottom:0}.page-sidebar .sidebar-footer{margin-top:var(--smSpacing)}.page-sidebar .search{display:flex;align-items:center;width:auto;column-gap:5px;margin:0 0 var(--xsSpacing);color:var(--txtHintColor);opacity:.7;transition:opacity var(--baseAnimationSpeed),color var(--baseAnimationSpeed)}.page-sidebar .search input{border:0;background:var(--baseColor);transition:box-shadow var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.page-sidebar .search .btn-clear{margin-right:-8px}.page-sidebar .search:hover,.page-sidebar .search:focus-within,.page-sidebar .search.active{opacity:1;color:var(--txtPrimaryColor)}.page-sidebar .search:hover input,.page-sidebar .search:focus-within input,.page-sidebar .search.active input{background:var(--baseAlt2Color)}.page-sidebar .sidebar-title{display:flex;align-items:center;gap:5px;width:100%;margin:var(--baseSpacing) 0 var(--xsSpacing);font-weight:600;font-size:1rem;line-height:var(--smLineHeight);color:var(--txtHintColor)}.page-sidebar .sidebar-title .label{font-weight:400}.page-sidebar .sidebar-list-item{cursor:pointer;outline:0;text-decoration:none;position:relative;display:flex;width:100%;align-items:center;column-gap:10px;margin:var(--sidebarListItemMargin) 0;padding:3px 10px;font-size:var(--xlFontSize);min-height:var(--btnHeight);min-width:0;color:var(--txtHintColor);border-radius:var(--baseRadius);user-select:none;transition:background var(--baseAnimationSpeed),color var(--baseAnimationSpeed)}.page-sidebar .sidebar-list-item i{font-size:18px}.page-sidebar .sidebar-list-item .txt{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.page-sidebar .sidebar-list-item:focus-visible,.page-sidebar .sidebar-list-item:hover,.page-sidebar .sidebar-list-item:active,.page-sidebar .sidebar-list-item.active{color:var(--txtPrimaryColor);background:var(--baseAlt1Color)}.page-sidebar .sidebar-list-item:active{background:var(--baseAlt2Color);transition-duration:var(--activeAnimationSpeed)}.page-sidebar .sidebar-content-compact .sidebar-list-item{--sidebarListItemMargin: 5px}@media screen and (max-height: 600px){.page-sidebar{--sidebarListItemMargin: 5px}}@media screen and (max-width: 1100px){.page-sidebar{--pageSidebarWidth: 190px}.page-sidebar>*{padding-left:10px;padding-right:10px}}.page-header{display:flex;align-items:center;width:100%;min-height:var(--btnHeight);gap:var(--xsSpacing);margin:0 0 var(--baseSpacing)}.page-header .btns-group{margin-left:auto;justify-content:end}@media screen and (max-width: 1050px){.page-header{flex-wrap:wrap}.page-header .btns-group{width:100%}.page-header .btns-group .btn{flex-grow:1;flex-basis:0}}.page-header-wrapper{background:var(--baseColor);width:auto;margin-top:calc(-1 * (var(--baseSpacing) - 5px));margin-left:calc(-1 * var(--baseSpacing));margin-right:calc(-1 * var(--baseSpacing));margin-bottom:var(--baseSpacing);padding:calc(var(--baseSpacing) - 5px) var(--baseSpacing);border-bottom:1px solid var(--baseAlt2Color)}.breadcrumbs{display:flex;align-items:center;gap:30px;color:var(--txtDisabledColor)}.breadcrumbs .breadcrumb-item{position:relative;margin:0;line-height:1;font-weight:400}.breadcrumbs .breadcrumb-item:after{content:"/";position:absolute;right:-20px;top:0;width:10px;text-align:center;pointer-events:none;opacity:.4}.breadcrumbs .breadcrumb-item:last-child{word-break:break-word;color:var(--txtPrimaryColor)}.breadcrumbs .breadcrumb-item:last-child:after{content:none;display:none}.breadcrumbs a{text-decoration:none;color:inherit;transition:color var(--baseAnimationSpeed)}.breadcrumbs a:hover{color:var(--txtPrimaryColor)}.page-content{position:relative;display:block;width:100%;flex-grow:1;padding:calc(var(--baseSpacing) - 5px) var(--baseSpacing)}.page-footer{display:flex;gap:5px;align-items:center;justify-content:right;text-align:right;padding:0px var(--baseSpacing) 15px;color:var(--txtDisabledColor);font-size:var(--xsFontSize);line-height:var(--smLineHeight)}.page-footer i{font-size:1.2em}.page-footer a{color:inherit;text-decoration:none;transition:color var(--baseAnimationSpeed)}.page-footer a:focus-visible,.page-footer a:hover,.page-footer a:active{color:var(--txtPrimaryColor)}.page-wrapper{display:flex;flex-direction:column;flex-grow:1;width:100%;overflow-x:hidden;overflow-y:auto;overflow-y:overlay}.overlay-active .page-wrapper{overflow-y:hidden}.page-wrapper.full-page{background:var(--baseColor)}.page-wrapper.center-content .page-content{display:flex;align-items:center}@keyframes tabChange{0%{opacity:.5}to{opacity:1}}.tabs-header{display:flex;align-items:stretch;justify-content:flex-start;column-gap:10px;width:100%;min-height:50px;user-select:none;margin:0 0 var(--baseSpacing);border-bottom:1px solid var(--baseAlt2Color)}.tabs-header .tab-item{position:relative;outline:0;border:0;background:none;display:inline-flex;align-items:center;justify-content:center;min-width:70px;gap:5px;padding:10px;margin:0;font-size:var(--lgFontSize);line-height:var(--baseLineHeight);font-family:var(--baseFontFamily);color:var(--txtHintColor);text-align:center;text-decoration:none;cursor:pointer;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius);transition:color var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}.tabs-header .tab-item:after{content:"";position:absolute;display:block;left:0;bottom:-1px;width:100%;height:2px;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius);background:var(--primaryColor);transform:rotateY(90deg);transition:transform .2s}.tabs-header .tab-item .txt,.tabs-header .tab-item i{display:inline-block;vertical-align:top}.tabs-header .tab-item:hover,.tabs-header .tab-item:focus-visible,.tabs-header .tab-item:active{color:var(--txtPrimaryColor)}.tabs-header .tab-item:focus-visible,.tabs-header .tab-item:active{transition-duration:var(--activeAnimationSpeed);background:var(--baseAlt2Color)}.tabs-header .tab-item.active{color:var(--txtPrimaryColor)}.tabs-header .tab-item.active:after{transform:rotateY(0)}.tabs-header .tab-item.disabled{pointer-events:none;color:var(--txtDisabledColor)}.tabs-header .tab-item.disabled:after{display:none}.tabs-header.right{justify-content:flex-end}.tabs-header.center{justify-content:center}.tabs-header.stretched .tab-item{flex-grow:1;flex-basis:0}.tabs-header.compact{min-height:30px;margin-bottom:var(--smSpacing)}.tabs-content{position:relative}.tabs-content>.tab-item{width:100%;display:none}.tabs-content>.tab-item.active{display:block;opacity:0;animation:tabChange .2s forwards}.tabs-content>.tab-item>:first-child{margin-top:0}.tabs-content>.tab-item>:last-child{margin-bottom:0}.tabs{position:relative}.accordion{outline:0;position:relative;border-radius:var(--baseRadius);background:var(--baseColor);border:1px solid var(--baseAlt2Color);transition:box-shadow var(--baseAnimationSpeed),margin var(--baseAnimationSpeed)}.accordion .accordion-header{outline:0;position:relative;display:flex;min-height:52px;align-items:center;row-gap:10px;column-gap:var(--smSpacing);padding:12px 20px 10px;width:100%;user-select:none;color:var(--txtPrimaryColor);border-radius:inherit;transition:background var(--baseAnimationSpeed),box-shadow var(--baseAnimationSpeed)}.accordion .accordion-header .icon{width:18px;text-align:center}.accordion .accordion-header .icon i{display:inline-block;vertical-align:top;font-size:1.1rem}.accordion .accordion-header.interactive{padding-right:50px;cursor:pointer}.accordion .accordion-header.interactive:after{content:"\ea4e";position:absolute;right:15px;top:50%;margin-top:-12.5px;width:25px;height:25px;line-height:25px;color:var(--txtHintColor);font-family:var(--iconFontFamily);font-size:1.3em;text-align:center;transition:color var(--baseAnimationSpeed)}.accordion .accordion-header:hover:after,.accordion .accordion-header.focus:after,.accordion .accordion-header:focus-visible:after{color:var(--txtPrimaryColor)}.accordion .accordion-header:active{transition-duration:var(--activeAnimationSpeed)}.accordion .accordion-content{padding:20px}.accordion:hover,.accordion:focus-visible,.accordion.active{z-index:9}.accordion:hover .accordion-header.interactive,.accordion:focus-visible .accordion-header.interactive,.accordion.active .accordion-header.interactive{background:var(--baseAlt1Color)}.accordion.drag-over .accordion-header{background:var(--bodyColor)}.accordion.active{box-shadow:0 2px 5px 0 var(--shadowColor)}.accordion.active .accordion-header{position:relative;top:0;z-index:9;box-shadow:0 0 0 1px var(--baseAlt2Color);border-bottom-left-radius:0;border-bottom-right-radius:0;background:var(--bodyColor)}.accordion.active .accordion-header.interactive{background:var(--bodyColor)}.accordion.active .accordion-header.interactive:after{color:inherit;content:"\ea78"}.accordion.disabled{z-index:0;border-color:var(--baseAlt1Color)}.accordion.disabled .accordion-header{color:var(--txtDisabledColor)}.accordions .accordion{border-radius:0;margin:-1px 0 0}.accordions>.accordion.active,.accordions>.accordion-wrapper>.accordion.active{margin:var(--smSpacing) 0;border-radius:var(--baseRadius)}.accordions>.accordion:first-child,.accordions>.accordion-wrapper:first-child>.accordion{margin-top:0;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius)}.accordions>.accordion:last-child,.accordions>.accordion-wrapper:last-child>.accordion{margin-bottom:0;border-bottom-left-radius:var(--baseRadius);border-bottom-right-radius:var(--baseRadius)}table{--entranceAnimationSpeed: .3s;border-collapse:separate;min-width:100%;transition:opacity var(--baseAnimationSpeed)}table .form-field{margin:0;line-height:1;text-align:left}table td,table th{outline:0;vertical-align:middle;position:relative;text-align:left;padding:5px 10px;border-bottom:1px solid var(--baseAlt2Color)}table td:first-child,table th:first-child{padding-left:20px}table td:last-child,table th:last-child{padding-right:20px}table th{color:var(--txtHintColor);font-weight:600;font-size:1rem;user-select:none;height:50px;line-height:var(--smLineHeight)}table th i{font-size:inherit}table td{height:60px;word-break:break-word}table .min-width{width:1%!important;white-space:nowrap}table .nowrap{white-space:nowrap}table .col-sort{cursor:pointer;border-top-left-radius:var(--baseRadius);border-top-right-radius:var(--baseRadius);padding-right:30px;transition:color var(--baseAnimationSpeed),background var(--baseAnimationSpeed)}table .col-sort:after{content:"\ea4c";position:absolute;right:10px;top:50%;margin-top:-12.5px;line-height:25px;height:25px;font-family:var(--iconFontFamily);font-weight:400;color:var(--txtHintColor);opacity:0;transition:color var(--baseAnimationSpeed),opacity var(--baseAnimationSpeed)}table .col-sort.sort-desc:after{content:"\ea4c"}table .col-sort.sort-asc:after{content:"\ea76"}table .col-sort.sort-active:after{opacity:1}table .col-sort:hover,table .col-sort:focus-visible{background:var(--baseAlt1Color)}table .col-sort:hover:after,table .col-sort:focus-visible:after{opacity:1}table .col-sort:active{transition-duration:var(--activeAnimationSpeed);background:var(--baseAlt2Color)}table .col-sort.col-sort-disabled{cursor:default;background:none}table .col-sort.col-sort-disabled:after{display:none}table .col-header-content{display:inline-flex;align-items:center;flex-wrap:nowrap;gap:5px}table .col-header-content .txt{max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}table .col-field-created,table .col-field-updated,table .col-type-action{width:1%!important;white-space:nowrap}table .col-type-action{white-space:nowrap;text-align:right;color:var(--txtHintColor)}table .col-type-action i{display:inline-block;vertical-align:top;transition:transform var(--baseAnimationSpeed)}table td.col-type-json{font-family:monospace;font-size:var(--smFontSize);line-height:var(--smLineHeight);max-width:300px}table .col-type-text{max-width:300px}table .col-type-select{min-width:150px}table .col-type-email{min-width:120px;white-space:nowrap}table .col-type-file{min-width:100px}table td.col-field-id,table td.col-field-username{width:0;white-space:nowrap}table tr{outline:0;background:var(--bodyColor);transition:background var(--baseAnimationSpeed)}table tr.row-handle{cursor:pointer;user-select:none}table tr.row-handle:focus-visible,table tr.row-handle:hover,table tr.row-handle:active{background:var(--baseAlt1Color)}table tr.row-handle:focus-visible .action-col,table tr.row-handle:hover .action-col,table tr.row-handle:active .action-col{color:var(--txtPrimaryColor)}table tr.row-handle:focus-visible .action-col i,table tr.row-handle:hover .action-col i,table tr.row-handle:active .action-col i{transform:translate(3px)}table tr.row-handle:active{transition-duration:var(--activeAnimationSpeed)}table.table-compact td,table.table-compact th{height:auto}table.table-border{border:1px solid var(--baseAlt2Color)}table.table-border tr{background:var(--baseColor)}table.table-border th{background:var(--baseAlt1Color)}table.table-border>:last-child>:last-child th,table.table-border>:last-child>:last-child td{border-bottom:0}table.table-animate tr{animation:entranceTop var(--entranceAnimationSpeed)}table.table-loading{pointer-events:none;opacity:.7}.table-wrapper{width:auto;padding:0;max-width:calc(100% + 2 * var(--baseSpacing));margin-left:calc(var(--baseSpacing) * -1);margin-right:calc(var(--baseSpacing) * -1)}.table-wrapper .bulk-select-col{min-width:70px}.table-wrapper .bulk-select-col input[type=checkbox]~label{opacity:.7}.table-wrapper .bulk-select-col label:hover,.table-wrapper .bulk-select-col label:focus-within,.table-wrapper .bulk-select-col input[type=checkbox]:checked~label{opacity:1!important}.table-wrapper td,.table-wrapper th{position:relative}.table-wrapper td:first-child,.table-wrapper th:first-child{padding-left:calc(var(--baseSpacing) + 3px)}.table-wrapper td:last-child,.table-wrapper th:last-child{padding-right:calc(var(--baseSpacing) + 3px)}.table-wrapper .bulk-select-col,.table-wrapper .col-type-action{position:sticky;z-index:99;transition:box-shadow var(--baseAnimationSpeed)}.table-wrapper .bulk-select-col{left:0px}.table-wrapper .col-type-action{right:0}.table-wrapper .bulk-select-col,.table-wrapper .col-type-action{background:inherit}.table-wrapper th.bulk-select-col,.table-wrapper th.col-type-action{background:var(--bodyColor)}.table-wrapper.scrollable .bulk-select-col{box-shadow:3px 0 5px 0 var(--shadowColor)}.table-wrapper.scrollable .col-type-action{box-shadow:-3px 0 5px 0 var(--shadowColor)}.table-wrapper.scrollable.scroll-start .bulk-select-col,.table-wrapper.scrollable.scroll-end .col-type-action{box-shadow:none}.searchbar{--searchHeight: 44px;outline:0;display:flex;align-items:center;min-height:var(--searchHeight);width:100%;flex-grow:1;padding:5px 7px;margin:0 0 var(--smSpacing);white-space:nowrap;color:var(--txtHintColor);background:var(--baseAlt1Color);border-radius:var(--btnHeight);transition:color var(--baseAnimationSpeed),background var(--baseAnimationSpeed),box-shadow var(--baseAnimationSpeed)}.searchbar>:first-child{border-top-left-radius:var(--btnHeight);border-bottom-left-radius:var(--btnHeight)}.searchbar>:last-child{border-top-right-radius:var(--btnHeight);border-bottom-right-radius:var(--btnHeight)}.searchbar .btn{border-radius:var(--btnHeight)}.searchbar .code-editor,.searchbar input,.searchbar input:focus{font-size:var(--baseFontSize);font-family:var(--monospaceFontFamily);border:0;background:none;min-height:0;padding-top:0;padding-bottom:0}.searchbar label>i{line-height:inherit}.searchbar .search-options{flex-shrink:0;width:90px}.searchbar .search-options .selected-container{border-radius:inherit;background:none;padding-right:25px!important}.searchbar .search-options:not(:focus-within) .selected-container{color:var(--txtHintColor)}.searchbar:focus-within{color:var(--txtPrimaryColor);background:var(--baseAlt2Color)}.searchbar-wrapper{position:relative;display:flex;align-items:center;width:100%;min-width:var(--btnHeight);min-height:var(--btnHeight)}.searchbar-wrapper .search-toggle{position:absolute;right:0;top:0}.bulkbar{position:sticky;bottom:var(--baseSpacing);z-index:101;gap:10px;display:flex;justify-content:center;align-items:center;width:var(--smWrapperWidth);max-width:100%;margin:var(--smSpacing) auto;padding:10px var(--smSpacing);border-radius:var(--btnHeight);background:var(--baseColor);border:1px solid var(--baseAlt2Color);box-shadow:0 2px 5px 0 var(--shadowColor)}.flatpickr-calendar{opacity:0;display:none;text-align:center;visibility:hidden;padding:0;animation:none;direction:ltr;border:0;font-size:1rem;line-height:24px;position:absolute;width:298px;box-sizing:border-box;user-select:none;color:var(--txtPrimaryColor);background:var(--baseColor);border-radius:var(--baseRadius);box-shadow:0 2px 5px 0 var(--shadowColor),0 0 0 1px var(--baseAlt2Color)}.flatpickr-calendar input,.flatpickr-calendar select{box-shadow:none;min-height:0;height:var(--inputHeight);background:none;border-radius:var(--baseRadius);border:1px solid var(--baseAlt1Color)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1);animation:fpFadeInDown .3s cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:0;width:100%}.flatpickr-calendar.static{position:absolute;top:100%;margin-top:2px;margin-bottom:10px;width:100%}.flatpickr-calendar.static .flatpickr-days{width:100%}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none!important;box-shadow:none!important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 var(--baseAlt2Color),5px 0 0 var(--baseAlt2Color);box-shadow:-2px 0 0 var(--baseAlt2Color),5px 0 0 var(--baseAlt2Color)}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid var(--baseAlt2Color)}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:"";height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:var(--baseColor)}.flatpickr-calendar.arrowTop:after{border-bottom-color:var(--baseColor)}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:var(--baseColor)}.flatpickr-calendar.arrowBottom:after{border-top-color:var(--baseColor)}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative}.flatpickr-months{display:flex;margin:0 0 4px}.flatpickr-months .flatpickr-month{background:transparent;color:var(--txtPrimaryColor);fill:var(--txtPrimaryColor);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:var(--txtPrimaryColor);fill:var(--txtPrimaryColor)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:0}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:0}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover,.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:var(--txtHintColor)}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,.15);box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,.1)}.numInputWrapper span:active{background:rgba(0,0,0,.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:#00000080}.numInputWrapper:hover{background:var(--baseAlt2Color)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{line-height:inherit;color:inherit;position:absolute;width:75%;left:12.5%;padding:1px 0;line-height:1;display:flex;align-items:center;justify-content:center;text-align:center}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:var(--baseAlt2Color)}.flatpickr-current-month .numInputWrapper{display:inline-flex;align-items:center;justify-content:center;width:63px;margin:0 5px}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:var(--txtPrimaryColor)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:var(--txtPrimaryColor)}.flatpickr-current-month input.cur-year{background:transparent;box-sizing:border-box;color:inherit;cursor:text;margin:0;display:inline-block;font-size:inherit;font-family:inherit;line-height:inherit;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{color:var(--txtDisabledColor);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;line-height:inherit;outline:none;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:var(--baseAlt2Color)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{display:block;flex:1;margin:0;cursor:default;line-height:1;background:transparent;color:var(--txtHintColor);text-align:center;font-weight:bolder;font-size:var(--smFontSize)}.dayContainer,.flatpickr-weeks{padding:1px 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:100%;box-sizing:border-box;display:inline-block;display:flex;flex-wrap:wrap;transform:translateZ(0);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 var(--baseAlt2Color);box-shadow:-1px 0 0 var(--baseAlt2Color)}.flatpickr-day{background:none;border:1px solid transparent;border-radius:var(--baseRadius);box-sizing:border-box;color:var(--txtPrimaryColor);cursor:pointer;font-weight:400;width:calc(14.2857143% - 2px);flex-basis:calc(14.2857143% - 2px);height:39px;margin:1px;display:inline-flex;align-items:center;justify-content:center;position:relative;text-align:center;flex-direction:column}.flatpickr-day.weekend,.flatpickr-day:nth-child(7n+6),.flatpickr-day:nth-child(7n+7){color:var(--dangerColor)}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:var(--baseAlt2Color);border-color:var(--baseAlt2Color)}.flatpickr-day.today{border-color:var(--baseColor)}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:var(--primaryColor);background:var(--primaryColor);color:var(--baseColor)}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:var(--primaryColor);-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:var(--primaryColor)}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 var(--primaryColor);box-shadow:-10px 0 0 var(--primaryColor)}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;box-shadow:-5px 0 0 var(--baseAlt2Color),5px 0 0 var(--baseAlt2Color)}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:var(--txtDisabledColor);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:var(--txtDisabledColor);background:var(--baseAlt2Color)}.flatpickr-day.week.selected{border-radius:0;box-shadow:-5px 0 0 var(--primaryColor),5px 0 0 var(--primaryColor)}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 var(--baseAlt2Color);box-shadow:1px 0 0 var(--baseAlt2Color)}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:var(--txtHintColor);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:flex;box-sizing:border-box;overflow:hidden;padding:5px}.flatpickr-rContainer{display:inline-block;padding:0;width:100%;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:var(--txtPrimaryColor)}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:var(--txtPrimaryColor)}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;box-shadow:none;border:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:var(--txtPrimaryColor);font-size:14px;position:relative;box-sizing:border-box;background:var(--baseColor);-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:700}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:var(--txtPrimaryColor);font-weight:700;width:2%;user-select:none;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:var(--baseAlt1Color)}.flatpickr-input[readonly]{cursor:pointer}@keyframes fpFadeInDown{0%{opacity:0;transform:translate3d(0,10px,0)}to{opacity:1;transform:translateZ(0)}}.flatpickr-hide-prev-next-month-days .flatpickr-calendar .prevMonthDay{visibility:hidden}.flatpickr-hide-prev-next-month-days .flatpickr-calendar .nextMonthDay,.flatpickr-inline-container .flatpickr-input{display:none}.flatpickr-inline-container .flatpickr-calendar{margin:0;box-shadow:none;border:1px solid var(--baseAlt2Color)}.docs-sidebar{--itemsSpacing: 10px;--itemsHeight: 40px;position:relative;min-width:180px;max-width:300px;height:100%;flex-shrink:0;overflow-x:hidden;overflow-y:auto;overflow-y:overlay;background:var(--bodyColor);padding:var(--smSpacing) var(--xsSpacing);border-right:1px solid var(--baseAlt1Color)}.docs-sidebar .sidebar-content{display:block;width:100%}.docs-sidebar .sidebar-item{position:relative;outline:0;cursor:pointer;text-decoration:none;display:flex;width:100%;gap:10px;align-items:center;text-align:right;justify-content:start;padding:5px 15px;margin:0 0 var(--itemsSpacing) 0;font-size:var(--lgFontSize);min-height:var(--itemsHeight);border-radius:var(--baseRadius);user-select:none;color:var(--txtHintColor);transition:background var(--baseAnimationSpeed),color var(--baseAnimationSpeed)}.docs-sidebar .sidebar-item:last-child{margin-bottom:0}.docs-sidebar .sidebar-item:focus-visible,.docs-sidebar .sidebar-item:hover,.docs-sidebar .sidebar-item:active,.docs-sidebar .sidebar-item.active{color:var(--txtPrimaryColor);background:var(--baseAlt1Color)}.docs-sidebar .sidebar-item:active{background:var(--baseAlt2Color);transition-duration:var(--activeAnimationSpeed)}.docs-sidebar.compact .sidebar-item{--itemsSpacing: 7px}.docs-content{width:100%;display:block;padding:calc(var(--baseSpacing) - 3px) var(--baseSpacing);overflow:auto}.docs-content-wrapper{display:flex;width:100%;height:100%}.docs-panel{width:960px;height:100%}.docs-panel .overlay-panel-section.panel-header{padding:0;border:0;box-shadow:none}.docs-panel .overlay-panel-section.panel-content{padding:0!important}.docs-panel .overlay-panel-section.panel-footer{display:none}@media screen and (max-width: 1000px){.docs-panel .overlay-panel-section.panel-footer{display:flex}}.panel-wrapper.svelte-lxxzfu{animation:slideIn .2s}@keyframes svelte-1bvelc2-refresh{to{transform:rotate(180deg)}}.btn.refreshing.svelte-1bvelc2 i.svelte-1bvelc2{animation:svelte-1bvelc2-refresh .15s ease-out}.datetime.svelte-zdiknu{width:100%;display:block;line-height:var(--smLineHeight)}.time.svelte-zdiknu{font-size:var(--smFontSize);color:var(--txtHintColor)}.horizontal-scroller.svelte-wc2j9h{width:auto;overflow-x:auto}.horizontal-scroller-wrapper.svelte-wc2j9h{position:relative}.horizontal-scroller-wrapper .columns-dropdown{top:40px;z-index:100;max-height:340px}.chart-wrapper.svelte-vh4sl8.svelte-vh4sl8{position:relative;display:block;width:100%}.chart-wrapper.loading.svelte-vh4sl8 .chart-canvas.svelte-vh4sl8{pointer-events:none;opacity:.5}.chart-loader.svelte-vh4sl8.svelte-vh4sl8{position:absolute;z-index:999;top:50%;left:50%;transform:translate(-50%,-50%)}.prism-light code[class*=language-],.prism-light pre[class*=language-]{color:#111b27;background:0 0;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}.prism-light code[class*=language-] ::-moz-selection,.prism-light code[class*=language-]::-moz-selection,.prism-light pre[class*=language-] ::-moz-selection,.prism-light pre[class*=language-]::-moz-selection{background:#8da1b9}.prism-light code[class*=language-] ::selection,.prism-light code[class*=language-]::selection,.prism-light pre[class*=language-] ::selection,.prism-light pre[class*=language-]::selection{background:#8da1b9}.prism-light pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}.prism-light :not(pre)>code[class*=language-],.prism-light pre[class*=language-]{background:#e3eaf2}.prism-light :not(pre)>code[class*=language-]{padding:.1em .3em;border-radius:.3em;white-space:normal}.prism-light .token.cdata,.prism-light .token.comment,.prism-light .token.doctype,.prism-light .token.prolog{color:#3c526d}.prism-light .token.punctuation{color:#111b27}.prism-light .token.delimiter.important,.prism-light .token.selector .parent,.prism-light .token.tag,.prism-light .token.tag .token.punctuation{color:#006d6d}.prism-light .token.attr-name,.prism-light .token.boolean,.prism-light .token.boolean.important,.prism-light .token.constant,.prism-light .token.number,.prism-light .token.selector .token.attribute{color:#755f00}.prism-light .token.class-name,.prism-light .token.key,.prism-light .token.parameter,.prism-light .token.property,.prism-light .token.property-access,.prism-light .token.variable{color:#005a8e}.prism-light .token.attr-value,.prism-light .token.color,.prism-light .token.inserted,.prism-light .token.selector .token.value,.prism-light .token.string,.prism-light .token.string .token.url-link{color:#116b00}.prism-light .token.builtin,.prism-light .token.keyword-array,.prism-light .token.package,.prism-light .token.regex{color:#af00af}.prism-light .token.function,.prism-light .token.selector .token.class,.prism-light .token.selector .token.id{color:#7c00aa}.prism-light .token.atrule .token.rule,.prism-light .token.combinator,.prism-light .token.keyword,.prism-light .token.operator,.prism-light .token.pseudo-class,.prism-light .token.pseudo-element,.prism-light .token.selector,.prism-light .token.unit{color:#a04900}.prism-light .token.deleted,.prism-light .token.important{color:#c22f2e}.prism-light .token.keyword-this,.prism-light .token.this{color:#005a8e}.prism-light .token.bold,.prism-light .token.important,.prism-light .token.keyword-this,.prism-light .token.this{font-weight:700}.prism-light .token.delimiter.important{font-weight:inherit}.prism-light .token.italic{font-style:italic}.prism-light .token.entity{cursor:help}.prism-light .language-markdown .token.title,.prism-light .language-markdown .token.title .token.punctuation{color:#005a8e;font-weight:700}.prism-light .language-markdown .token.blockquote.punctuation{color:#af00af}.prism-light .language-markdown .token.code{color:#006d6d}.prism-light .language-markdown .token.hr.punctuation{color:#005a8e}.prism-light .language-markdown .token.url>.token.content{color:#116b00}.prism-light .language-markdown .token.url-link{color:#755f00}.prism-light .language-markdown .token.list.punctuation{color:#af00af}.prism-light .language-markdown .token.table-header,.prism-light .language-json .token.operator{color:#111b27}.prism-light .language-scss .token.variable{color:#006d6d}.prism-light .token.token.cr:before,.prism-light .token.token.lf:before,.prism-light .token.token.space:before,.prism-light .token.token.tab:not(:empty):before{color:#3c526d}.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>a,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>button{color:#e3eaf2;background:#005a8e}.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>a:focus,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>a:hover,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>button:focus,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>button:hover{color:#e3eaf2;background:rgba(0,90,142,.8549019608);text-decoration:none}.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>span,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>span:focus,.prism-light div.code-toolbar>.toolbar.toolbar>.toolbar-item>span:hover{color:#e3eaf2;background:#3c526d}.prism-light .line-highlight.line-highlight{background:rgba(141,161,185,.1843137255);background:linear-gradient(to right,rgba(141,161,185,.1843137255) 70%,rgba(141,161,185,.1450980392))}.prism-light .line-highlight.line-highlight:before,.prism-light .line-highlight.line-highlight[data-end]:after{background-color:#3c526d;color:#e3eaf2;box-shadow:0 1px #8da1b9}.prism-light pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows>span:hover:before{background-color:#3c526d1f}.prism-light .line-numbers.line-numbers .line-numbers-rows{border-right:1px solid rgba(141,161,185,.4784313725);background:rgba(208,218,231,.4784313725)}.prism-light .line-numbers .line-numbers-rows>span:before{color:#3c526dda}.prism-light .rainbow-braces .token.token.punctuation.brace-level-1,.prism-light .rainbow-braces .token.token.punctuation.brace-level-5,.prism-light .rainbow-braces .token.token.punctuation.brace-level-9{color:#755f00}.prism-light .rainbow-braces .token.token.punctuation.brace-level-10,.prism-light .rainbow-braces .token.token.punctuation.brace-level-2,.prism-light .rainbow-braces .token.token.punctuation.brace-level-6{color:#af00af}.prism-light .rainbow-braces .token.token.punctuation.brace-level-11,.prism-light .rainbow-braces .token.token.punctuation.brace-level-3,.prism-light .rainbow-braces .token.token.punctuation.brace-level-7{color:#005a8e}.prism-light .rainbow-braces .token.token.punctuation.brace-level-12,.prism-light .rainbow-braces .token.token.punctuation.brace-level-4,.prism-light .rainbow-braces .token.token.punctuation.brace-level-8{color:#7c00aa}.prism-light pre.diff-highlight>code .token.token.deleted:not(.prefix),.prism-light pre>code.diff-highlight .token.token.deleted:not(.prefix){background-color:#c22f2e1f}.prism-light pre.diff-highlight>code .token.token.inserted:not(.prefix),.prism-light pre>code.diff-highlight .token.token.inserted:not(.prefix){background-color:#116b001f}.prism-light .command-line .command-line-prompt{border-right:1px solid rgba(141,161,185,.4784313725)}.prism-light .command-line .command-line-prompt>span:before{color:#3c526dda}code.svelte-10s5tkd.svelte-10s5tkd{display:block;width:100%;padding:10px 15px;white-space:pre-wrap;word-break:break-word}.code-wrapper.svelte-10s5tkd.svelte-10s5tkd{display:block;width:100%;max-height:100%;overflow:auto;overflow:overlay}.prism-light.svelte-10s5tkd code.svelte-10s5tkd{color:var(--txtPrimaryColor);background:var(--baseAlt1Color)}.invalid-name-note.svelte-1tpxlm5{position:absolute;right:10px;top:10px;text-transform:none}.title.field-name.svelte-1tpxlm5{max-width:130px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.lock-toggle.svelte-1e6tebt{margin-left:auto;display:inline-flex;align-items:center;gap:5px;font-size:var(--smFontSize)}.changes-list.svelte-1ghly2p{word-break:break-all}.tabs-content.svelte-b10vi{z-index:3}.email-visibility-addon.svelte-1751a4d~input.svelte-1751a4d{padding-right:100px}textarea.svelte-1x1pbts{resize:none;padding-top:4px!important;padding-bottom:5px!important;min-height:var(--inputHeight);height:var(--inputHeight)}.clear-btn.svelte-11df51y{margin-top:20px}.content.svelte-1gjwqyd{flex-shrink:1;flex-grow:0;width:auto;min-width:0}.export-preview.svelte-jm5c4z.svelte-jm5c4z{position:relative;height:500px}.export-preview.svelte-jm5c4z .copy-schema.svelte-jm5c4z{position:absolute;right:15px;top:15px}.collections-diff-table.svelte-lmkr38.svelte-lmkr38{color:var(--txtHintColor);border:2px solid var(--primaryColor)}.collections-diff-table.svelte-lmkr38 tr.svelte-lmkr38{background:none}.collections-diff-table.svelte-lmkr38 th.svelte-lmkr38,.collections-diff-table.svelte-lmkr38 td.svelte-lmkr38{height:auto;padding:2px 15px;border-bottom:1px solid rgba(0,0,0,.07)}.collections-diff-table.svelte-lmkr38 th.svelte-lmkr38{height:35px;padding:4px 15px;color:var(--txtPrimaryColor)}.collections-diff-table.svelte-lmkr38 thead tr.svelte-lmkr38{background:var(--primaryColor)}.collections-diff-table.svelte-lmkr38 thead tr th.svelte-lmkr38{color:var(--baseColor);background:none}.collections-diff-table.svelte-lmkr38 .label.svelte-lmkr38{font-weight:400}.collections-diff-table.svelte-lmkr38 .changed-none-col.svelte-lmkr38{color:var(--txtDisabledColor);background:var(--baseAlt1Color)}.collections-diff-table.svelte-lmkr38 .changed-old-col.svelte-lmkr38{color:var(--txtPrimaryColor);background:var(--dangerAltColor)}.collections-diff-table.svelte-lmkr38 .changed-new-col.svelte-lmkr38{color:var(--txtPrimaryColor);background:var(--successAltColor)}.collections-diff-table.svelte-lmkr38 .field-key-col.svelte-lmkr38{padding-left:30px}.list-label.svelte-1jx20fl{min-width:65px} diff --git a/ui/dist/assets/index.d939dbbd.js b/ui/dist/assets/index.e8d8151e.js similarity index 62% rename from ui/dist/assets/index.d939dbbd.js rename to ui/dist/assets/index.e8d8151e.js index 2f5abbab..3986bfe0 100644 --- a/ui/dist/assets/index.d939dbbd.js +++ b/ui/dist/assets/index.e8d8151e.js @@ -1,56 +1,56 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerpolicy&&(l.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?l.credentials="include":s.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=t(s);fetch(s.href,l)}})();function te(){}const yl=n=>n;function Ke(n,e){for(const t in e)n[t]=e[t];return n}function X_(n){return n&&typeof n=="object"&&typeof n.then=="function"}function pm(n){return n()}function Xa(){return Object.create(null)}function Pe(n){n.forEach(pm)}function Jt(n){return typeof n=="function"}function be(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Fl;function Ln(n,e){return Fl||(Fl=document.createElement("a")),Fl.href=e,n===Fl.href}function Q_(n){return Object.keys(n).length===0}function hm(n,...e){if(n==null)return te;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function Ze(n,e,t){n.$$.on_destroy.push(hm(e,t))}function Ot(n,e,t,i){if(n){const s=mm(n,e,t,i);return n[0](s)}}function mm(n,e,t,i){return n[1]&&i?Ke(t.ctx.slice(),n[1](i(e))):t.ctx}function Dt(n,e,t,i){if(n[2]&&i){const s=n[2](i(t));if(e.dirty===void 0)return s;if(typeof s=="object"){const l=[],o=Math.max(e.dirty.length,s.length);for(let r=0;r32){const e=[],t=n.ctx.length/32;for(let i=0;iwindow.performance.now():()=>Date.now(),sa=gm?n=>requestAnimationFrame(n):te;const ms=new Set;function _m(n){ms.forEach(e=>{e.c(n)||(ms.delete(e),e.f())}),ms.size!==0&&sa(_m)}function No(n){let e;return ms.size===0&&sa(_m),{promise:new Promise(t=>{ms.add(e={c:n,f:t})}),abort(){ms.delete(e)}}}function _(n,e){n.appendChild(e)}function bm(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function x_(n){const e=v("style");return e0(bm(n),e),e.sheet}function e0(n,e){return _(n.head||n,e),e.sheet}function S(n,e,t){n.insertBefore(e,t||null)}function w(n){n.parentNode&&n.parentNode.removeChild(n)}function Mt(n,e){for(let t=0;tn.removeEventListener(e,t,i)}function ut(n){return function(e){return e.preventDefault(),n.call(this,e)}}function Yn(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function p(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function Un(n,e){const t=Object.getOwnPropertyDescriptors(n.__proto__);for(const i in e)e[i]==null?n.removeAttribute(i):i==="style"?n.style.cssText=e[i]:i==="__value"?n.value=n[i]=e[i]:t[i]&&t[i].set?n[i]=e[i]:p(n,i,e[i])}function rt(n){return n===""?null:+n}function t0(n){return Array.from(n.childNodes)}function ae(n,e){e=""+e,n.wholeText!==e&&(n.data=e)}function ce(n,e){n.value=e==null?"":e}function Qa(n,e,t,i){t===null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function ne(n,e,t){n.classList[t?"add":"remove"](e)}function vm(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}function jt(n,e){return new n(e)}const po=new Map;let ho=0;function n0(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function i0(n,e){const t={stylesheet:x_(e),rules:{}};return po.set(n,t),t}function ol(n,e,t,i,s,l,o,r=0){const a=16.666/i;let u=`{ -`;for(let g=0;g<=1;g+=a){const y=e+(t-e)*l(g);u+=g*100+`%{${o(y,1-y)}} +(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerpolicy&&(l.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?l.credentials="include":s.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=t(s);fetch(s.href,l)}})();function ee(){}const kl=n=>n;function Ke(n,e){for(const t in e)n[t]=e[t];return n}function Q_(n){return n&&typeof n=="object"&&typeof n.then=="function"}function hm(n){return n()}function Qa(){return Object.create(null)}function Pe(n){n.forEach(hm)}function Jt(n){return typeof n=="function"}function be(n,e){return n!=n?e==e:n!==e||n&&typeof n=="object"||typeof n=="function"}let Rl;function Ln(n,e){return Rl||(Rl=document.createElement("a")),Rl.href=e,n===Rl.href}function x_(n){return Object.keys(n).length===0}function mm(n,...e){if(n==null)return ee;const t=n.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function Ze(n,e,t){n.$$.on_destroy.push(mm(e,t))}function Ot(n,e,t,i){if(n){const s=gm(n,e,t,i);return n[0](s)}}function gm(n,e,t,i){return n[1]&&i?Ke(t.ctx.slice(),n[1](i(e))):t.ctx}function Dt(n,e,t,i){if(n[2]&&i){const s=n[2](i(t));if(e.dirty===void 0)return s;if(typeof s=="object"){const l=[],o=Math.max(e.dirty.length,s.length);for(let r=0;r32){const e=[],t=n.ctx.length/32;for(let i=0;iwindow.performance.now():()=>Date.now(),la=_m?n=>requestAnimationFrame(n):ee;const gs=new Set;function bm(n){gs.forEach(e=>{e.c(n)||(gs.delete(e),e.f())}),gs.size!==0&&la(bm)}function Fo(n){let e;return gs.size===0&&la(bm),{promise:new Promise(t=>{gs.add(e={c:n,f:t})}),abort(){gs.delete(e)}}}function _(n,e){n.appendChild(e)}function vm(n){if(!n)return document;const e=n.getRootNode?n.getRootNode():n.ownerDocument;return e&&e.host?e:n.ownerDocument}function e0(n){const e=v("style");return t0(vm(n),e),e.sheet}function t0(n,e){return _(n.head||n,e),e.sheet}function S(n,e,t){n.insertBefore(e,t||null)}function w(n){n.parentNode&&n.parentNode.removeChild(n)}function Mt(n,e){for(let t=0;tn.removeEventListener(e,t,i)}function ut(n){return function(e){return e.preventDefault(),n.call(this,e)}}function Yn(n){return function(e){return e.stopPropagation(),n.call(this,e)}}function p(n,e,t){t==null?n.removeAttribute(e):n.getAttribute(e)!==t&&n.setAttribute(e,t)}function Un(n,e){const t=Object.getOwnPropertyDescriptors(n.__proto__);for(const i in e)e[i]==null?n.removeAttribute(i):i==="style"?n.style.cssText=e[i]:i==="__value"?n.value=n[i]=e[i]:t[i]&&t[i].set?n[i]=e[i]:p(n,i,e[i])}function rt(n){return n===""?null:+n}function n0(n){return Array.from(n.childNodes)}function re(n,e){e=""+e,n.wholeText!==e&&(n.data=e)}function ce(n,e){n.value=e==null?"":e}function xa(n,e,t,i){t===null?n.style.removeProperty(e):n.style.setProperty(e,t,i?"important":"")}function ne(n,e,t){n.classList[t?"add":"remove"](e)}function ym(n,e,{bubbles:t=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(n,t,i,e),s}function jt(n,e){return new n(e)}const ho=new Map;let mo=0;function i0(n){let e=5381,t=n.length;for(;t--;)e=(e<<5)-e^n.charCodeAt(t);return e>>>0}function s0(n,e){const t={stylesheet:e0(e),rules:{}};return ho.set(n,t),t}function rl(n,e,t,i,s,l,o,r=0){const a=16.666/i;let u=`{ +`;for(let b=0;b<=1;b+=a){const y=e+(t-e)*l(b);u+=b*100+`%{${o(y,1-y)}} `}const f=u+`100% {${o(t,1-t)}} -}`,c=`__svelte_${n0(f)}_${r}`,d=bm(n),{stylesheet:h,rules:m}=po.get(d)||i0(d,n);m[c]||(m[c]=!0,h.insertRule(`@keyframes ${c} ${f}`,h.cssRules.length));const b=n.style.animation||"";return n.style.animation=`${b?`${b}, `:""}${c} ${i}ms linear ${s}ms 1 both`,ho+=1,c}function rl(n,e){const t=(n.style.animation||"").split(", "),i=t.filter(e?l=>l.indexOf(e)<0:l=>l.indexOf("__svelte")===-1),s=t.length-i.length;s&&(n.style.animation=i.join(", "),ho-=s,ho||s0())}function s0(){sa(()=>{ho||(po.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&w(e)}),po.clear())})}function l0(n,e,t,i){if(!e)return te;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return te;const{delay:l=0,duration:o=300,easing:r=yl,start:a=Lo()+l,end:u=a+o,tick:f=te,css:c}=t(n,{from:e,to:s},i);let d=!0,h=!1,m;function b(){c&&(m=ol(n,0,1,o,l,r,c)),l||(h=!0)}function g(){c&&rl(n,m),d=!1}return No(y=>{if(!h&&y>=a&&(h=!0),h&&y>=u&&(f(1,0),g()),!d)return!1;if(h){const k=y-a,$=0+1*r(k/o);f($,1-$)}return!0}),b(),f(0,1),g}function o0(n){const e=getComputedStyle(n);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:t,height:i}=e,s=n.getBoundingClientRect();n.style.position="absolute",n.style.width=t,n.style.height=i,ym(n,s)}}function ym(n,e){const t=n.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){const i=getComputedStyle(n),s=i.transform==="none"?"":i.transform;n.style.transform=`${s} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}let al;function ni(n){al=n}function kl(){if(!al)throw new Error("Function called outside component initialization");return al}function cn(n){kl().$$.on_mount.push(n)}function r0(n){kl().$$.after_update.push(n)}function a0(n){kl().$$.on_destroy.push(n)}function It(){const n=kl();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=vm(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function Ve(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const Ks=[],le=[],oo=[],Mr=[],km=Promise.resolve();let Or=!1;function wm(){Or||(Or=!0,km.then(la))}function Tn(){return wm(),km}function xe(n){oo.push(n)}function ve(n){Mr.push(n)}const Go=new Set;let Rl=0;function la(){const n=al;do{for(;Rl{Ns=null})),Ns}function Vi(n,e,t){n.dispatchEvent(vm(`${e?"intro":"outro"}${t}`))}const ro=new Set;let qn;function pe(){qn={r:0,c:[],p:qn}}function he(){qn.r||Pe(qn.c),qn=qn.p}function E(n,e){n&&n.i&&(ro.delete(n),n.i(e))}function P(n,e,t,i){if(n&&n.o){if(ro.has(n))return;ro.add(n),qn.c.push(()=>{ro.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const ra={duration:0};function Sm(n,e,t){let i=e(n,t),s=!1,l,o,r=0;function a(){l&&rl(n,l)}function u(){const{delay:c=0,duration:d=300,easing:h=yl,tick:m=te,css:b}=i||ra;b&&(l=ol(n,0,1,d,c,h,b,r++)),m(0,1);const g=Lo()+c,y=g+d;o&&o.abort(),s=!0,xe(()=>Vi(n,!0,"start")),o=No(k=>{if(s){if(k>=y)return m(1,0),Vi(n,!0,"end"),a(),s=!1;if(k>=g){const $=h((k-g)/d);m($,1-$)}}return s})}let f=!1;return{start(){f||(f=!0,rl(n),Jt(i)?(i=i(),oa().then(u)):u())},invalidate(){f=!1},end(){s&&(a(),s=!1)}}}function $m(n,e,t){let i=e(n,t),s=!0,l;const o=qn;o.r+=1;function r(){const{delay:a=0,duration:u=300,easing:f=yl,tick:c=te,css:d}=i||ra;d&&(l=ol(n,1,0,u,a,f,d));const h=Lo()+a,m=h+u;xe(()=>Vi(n,!1,"start")),No(b=>{if(s){if(b>=m)return c(0,1),Vi(n,!1,"end"),--o.r||Pe(o.c),!1;if(b>=h){const g=f((b-h)/u);c(1-g,g)}}return s})}return Jt(i)?oa().then(()=>{i=i(),r()}):r(),{end(a){a&&i.tick&&i.tick(1,0),s&&(l&&rl(n,l),s=!1)}}}function je(n,e,t,i){let s=e(n,t),l=i?0:1,o=null,r=null,a=null;function u(){a&&rl(n,a)}function f(d,h){const m=d.b-l;return h*=Math.abs(m),{a:l,b:d.b,d:m,duration:h,start:d.start,end:d.start+h,group:d.group}}function c(d){const{delay:h=0,duration:m=300,easing:b=yl,tick:g=te,css:y}=s||ra,k={start:Lo()+h,b:d};d||(k.group=qn,qn.r+=1),o||r?r=k:(y&&(u(),a=ol(n,l,d,m,h,b,y)),d&&g(0,1),o=f(k,m),xe(()=>Vi(n,d,"start")),No($=>{if(r&&$>r.start&&(o=f(r,m),r=null,Vi(n,o.b,"start"),y&&(u(),a=ol(n,l,o.b,o.duration,0,b,s.css))),o){if($>=o.end)g(l=o.b,1-l),Vi(n,o.b,"end"),r||(o.b?u():--o.group.r||Pe(o.group.c)),o=null;else if($>=o.start){const C=$-o.start;l=o.a+o.d*b(C/o.duration),g(l,1-l)}}return!!(o||r)}))}return{run(d){Jt(s)?oa().then(()=>{s=s(),c(d)}):c(d)},end(){u(),o=r=null}}}function xa(n,e){const t=e.token={};function i(s,l,o,r){if(e.token!==t)return;e.resolved=r;let a=e.ctx;o!==void 0&&(a=a.slice(),a[o]=r);const u=s&&(e.current=s)(a);let f=!1;e.block&&(e.blocks?e.blocks.forEach((c,d)=>{d!==l&&c&&(pe(),P(c,1,1,()=>{e.blocks[d]===c&&(e.blocks[d]=null)}),he())}):e.block.d(1),u.c(),E(u,1),u.m(e.mount(),e.anchor),f=!0),e.block=u,e.blocks&&(e.blocks[l]=u),f&&la()}if(X_(n)){const s=kl();if(n.then(l=>{ni(s),i(e.then,1,e.value,l),ni(null)},l=>{if(ni(s),i(e.catch,2,e.error,l),ni(null),!e.hasCatch)throw l}),e.current!==e.pending)return i(e.pending,0),!0}else{if(e.current!==e.then)return i(e.then,1,e.value,n),!0;e.resolved=n}}function f0(n,e,t){const i=e.slice(),{resolved:s}=n;n.current===n.then&&(i[n.value]=s),n.current===n.catch&&(i[n.error]=s),n.block.p(i,t)}function Gi(n,e){n.d(1),e.delete(n.key)}function nn(n,e){P(n,1,1,()=>{e.delete(n.key)})}function c0(n,e){n.f(),nn(n,e)}function bt(n,e,t,i,s,l,o,r,a,u,f,c){let d=n.length,h=l.length,m=d;const b={};for(;m--;)b[n[m].key]=m;const g=[],y=new Map,k=new Map;for(m=h;m--;){const T=c(s,l,m),D=t(T);let A=o.get(D);A?i&&A.p(T,e):(A=u(D,T),A.c()),y.set(D,g[m]=A),D in b&&k.set(D,Math.abs(m-b[D]))}const $=new Set,C=new Set;function M(T){E(T,1),T.m(r,f),o.set(T.key,T),f=T.first,h--}for(;d&&h;){const T=g[h-1],D=n[d-1],A=T.key,I=D.key;T===D?(f=T.first,d--,h--):y.has(I)?!o.has(A)||$.has(A)?M(T):C.has(I)?d--:k.get(A)>k.get(I)?(C.add(A),M(T)):($.add(I),d--):(a(D,o),d--)}for(;d--;){const T=n[d];y.has(T.key)||a(T,o)}for(;h;)M(g[h-1]);return g}function Zt(n,e){const t={},i={},s={$$scope:1};let l=n.length;for(;l--;){const o=n[l],r=e[l];if(r){for(const a in o)a in r||(i[a]=1);for(const a in r)s[a]||(t[a]=r[a],s[a]=1);n[l]=r}else for(const a in o)s[a]=1}for(const o in i)o in t||(t[o]=void 0);return t}function Kn(n){return typeof n=="object"&&n!==null?n:{}}function _e(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function j(n){n&&n.c()}function R(n,e,t,i){const{fragment:s,after_update:l}=n.$$;s&&s.m(e,t),i||xe(()=>{const o=n.$$.on_mount.map(pm).filter(Jt);n.$$.on_destroy?n.$$.on_destroy.push(...o):Pe(o),n.$$.on_mount=[]}),l.forEach(xe)}function H(n,e){const t=n.$$;t.fragment!==null&&(Pe(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function d0(n,e){n.$$.dirty[0]===-1&&(Ks.push(n),wm(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<{const m=h.length?h[0]:d;return u.ctx&&s(u.ctx[c],u.ctx[c]=m)&&(!u.skip_bound&&u.bound[c]&&u.bound[c](m),f&&d0(n,c)),d}):[],u.update(),f=!0,Pe(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const c=t0(e.target);u.fragment&&u.fragment.l(c),c.forEach(w)}else u.fragment&&u.fragment.c();e.intro&&E(n.$$.fragment),R(n,e.target,e.anchor,e.customElement),la()}ni(a)}class ke{$destroy(){H(this,1),this.$destroy=te}$on(e,t){if(!Jt(t))return te;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const s=i.indexOf(t);s!==-1&&i.splice(s,1)}}$set(e){this.$$set&&!Q_(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function vt(n){if(!n)throw Error("Parameter args is required");if(!n.component==!n.asyncComponent)throw Error("One and only one of component and asyncComponent is required");if(n.component&&(n.asyncComponent=()=>Promise.resolve(n.component)),typeof n.asyncComponent!="function")throw Error("Parameter asyncComponent must be a function");if(n.conditions){Array.isArray(n.conditions)||(n.conditions=[n.conditions]);for(let t=0;t{i.delete(u),i.size===0&&(t(),t=null)}}return{set:s,update:l,subscribe:o}}function Tm(n,e,t){const i=!Array.isArray(n),s=i?[n]:n,l=e.length<2;return Cm(t,o=>{let r=!1;const a=[];let u=0,f=te;const c=()=>{if(u)return;f();const h=e(i?a[0]:a,o);l?o(h):f=Jt(h)?h:te},d=s.map((h,m)=>hm(h,b=>{a[m]=b,u&=~(1<{u|=1<{H(f,1)}),he()}l?(e=jt(l,o()),e.$on("routeEvent",r[7]),j(e.$$.fragment),E(e.$$.fragment,1),R(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&E(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&H(e,r)}}}function h0(n){let e,t,i;const s=[{params:n[1]},n[2]];var l=n[0];function o(r){let a={};for(let u=0;u{H(f,1)}),he()}l?(e=jt(l,o()),e.$on("routeEvent",r[6]),j(e.$$.fragment),E(e.$$.fragment,1),R(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&E(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&H(e,r)}}}function m0(n){let e,t,i,s;const l=[h0,p0],o=[];function r(a,u){return a[1]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Ee()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(pe(),P(o[f],1,1,()=>{o[f]=null}),he(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),E(t,1),t.m(i.parentNode,i))},i(a){s||(E(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function eu(){const n=window.location.href.indexOf("#/");let e=n>-1?window.location.href.substr(n+1):"/";const t=e.indexOf("?");let i="";return t>-1&&(i=e.substr(t+1),e=e.substr(0,t)),{location:e,querystring:i}}const Fo=Cm(null,function(e){e(eu());const t=()=>{e(eu())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}});Tm(Fo,n=>n.location);const aa=Tm(Fo,n=>n.querystring),tu=Mn(void 0);async function ki(n){if(!n||n.length<1||n.charAt(0)!="/"&&n.indexOf("#/")!==0)throw Error("Invalid parameter location");await Tn();const e=(n.charAt(0)=="#"?"":"#")+n;try{const t={...history.state};delete t.__svelte_spa_router_scrollX,delete t.__svelte_spa_router_scrollY,window.history.replaceState(t,void 0,e)}catch{console.warn("Caught exception while replacing the current page. If you're running this in the Svelte REPL, please note that the `replace` method might not work in this environment.")}window.dispatchEvent(new Event("hashchange"))}function Ut(n,e){if(e=iu(e),!n||!n.tagName||n.tagName.toLowerCase()!="a")throw Error('Action "link" can only be used with tags');return nu(n,e),{update(t){t=iu(t),nu(n,t)}}}function g0(n){n?window.scrollTo(n.__svelte_spa_router_scrollX,n.__svelte_spa_router_scrollY):window.scrollTo(0,0)}function nu(n,e){let t=e.href||n.getAttribute("href");if(t&&t.charAt(0)=="/")t="#"+t;else if(!t||t.length<2||t.slice(0,2)!="#/")throw Error('Invalid value for "href" attribute: '+t);n.setAttribute("href",t),n.addEventListener("click",i=>{i.preventDefault(),e.disabled||_0(i.currentTarget.getAttribute("href"))})}function iu(n){return n&&typeof n=="string"?{href:n}:n||{}}function _0(n){history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=n}function b0(n,e,t){let{routes:i={}}=e,{prefix:s=""}=e,{restoreScrollState:l=!1}=e;class o{constructor(M,T){if(!T||typeof T!="function"&&(typeof T!="object"||T._sveltesparouter!==!0))throw Error("Invalid component object");if(!M||typeof M=="string"&&(M.length<1||M.charAt(0)!="/"&&M.charAt(0)!="*")||typeof M=="object"&&!(M instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:D,keys:A}=Mm(M);this.path=M,typeof T=="object"&&T._sveltesparouter===!0?(this.component=T.component,this.conditions=T.conditions||[],this.userData=T.userData,this.props=T.props||{}):(this.component=()=>Promise.resolve(T),this.conditions=[],this.props={}),this._pattern=D,this._keys=A}match(M){if(s){if(typeof s=="string")if(M.startsWith(s))M=M.substr(s.length)||"/";else return null;else if(s instanceof RegExp){const I=M.match(s);if(I&&I[0])M=M.substr(I[0].length)||"/";else return null}}const T=this._pattern.exec(M);if(T===null)return null;if(this._keys===!1)return T;const D={};let A=0;for(;A{r.push(new o(M,C))}):Object.keys(i).forEach(C=>{r.push(new o(C,i[C]))});let a=null,u=null,f={};const c=It();async function d(C,M){await Tn(),c(C,M)}let h=null,m=null;l&&(m=C=>{C.state&&(C.state.__svelte_spa_router_scrollY||C.state.__svelte_spa_router_scrollX)?h=C.state:h=null},window.addEventListener("popstate",m),r0(()=>{g0(h)}));let b=null,g=null;const y=Fo.subscribe(async C=>{b=C;let M=0;for(;M{tu.set(u)});return}t(0,a=null),g=null,tu.set(void 0)});a0(()=>{y(),m&&window.removeEventListener("popstate",m)});function k(C){Ve.call(this,n,C)}function $(C){Ve.call(this,n,C)}return n.$$set=C=>{"routes"in C&&t(3,i=C.routes),"prefix"in C&&t(4,s=C.prefix),"restoreScrollState"in C&&t(5,l=C.restoreScrollState)},n.$$.update=()=>{n.$$.dirty&32&&(history.scrollRestoration=l?"manual":"auto")},[a,u,f,i,s,l,k,$]}class v0 extends ke{constructor(e){super(),ye(this,e,b0,m0,be,{routes:3,prefix:4,restoreScrollState:5})}}const ao=[];let Om;function Dm(n){const e=n.pattern.test(Om);su(n,n.className,e),su(n,n.inactiveClassName,!e)}function su(n,e,t){(e||"").split(" ").forEach(i=>{!i||(n.node.classList.remove(i),t&&n.node.classList.add(i))})}Fo.subscribe(n=>{Om=n.location+(n.querystring?"?"+n.querystring:""),ao.map(Dm)});function An(n,e){if(e&&(typeof e=="string"||typeof e=="object"&&e instanceof RegExp)?e={path:e}:e=e||{},!e.path&&n.hasAttribute("href")&&(e.path=n.getAttribute("href"),e.path&&e.path.length>1&&e.path.charAt(0)=="#"&&(e.path=e.path.substring(1))),e.className||(e.className="active"),!e.path||typeof e.path=="string"&&(e.path.length<1||e.path.charAt(0)!="/"&&e.path.charAt(0)!="*"))throw Error('Invalid value for "path" argument');const{pattern:t}=typeof e.path=="string"?Mm(e.path):{pattern:e.path},i={node:n,className:e.className,inactiveClassName:e.inactiveClassName,pattern:t};return ao.push(i),Dm(i),{destroy(){ao.splice(ao.indexOf(i),1)}}}const y0="modulepreload",k0=function(n,e){return new URL(n,e).href},lu={},st=function(e,t,i){if(!t||t.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(t.map(l=>{if(l=k0(l,i),l in lu)return;lu[l]=!0;const o=l.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(!!i)for(let f=s.length-1;f>=0;f--){const c=s[f];if(c.href===l&&(!o||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${r}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":y0,o||(u.as="script",u.crossOrigin=""),u.href=l,document.head.appendChild(u),o)return new Promise((f,c)=>{u.addEventListener("load",f),u.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e())};var Dr=function(n,e){return Dr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])},Dr(n,e)};function qt(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=n}Dr(n,e),n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Ar=function(){return Ar=Object.assign||function(n){for(var e,t=1,i=arguments.length;t0&&s[s.length-1])||f[0]!==6&&f[0]!==2)){o=0;continue}if(f[0]===3&&(!s||f[1]>s[0]&&f[1]>(-2*s&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};var wl=function(){function n(e){e===void 0&&(e={}),this.load(e||{})}return n.prototype.load=function(e){for(var t=0,i=Object.entries(e);t0&&(!i.exp||i.exp-t>Date.now()/1e3))}(this.token)},enumerable:!1,configurable:!0}),n.prototype.save=function(e,t){this.baseToken=e||"",this.baseModel=t!==null&&typeof t=="object"?t.collectionId!==void 0?new Wi(t):new Yi(t):null,this.triggerChange()},n.prototype.clear=function(){this.baseToken="",this.baseModel=null,this.triggerChange()},n.prototype.loadFromCookie=function(e,t){t===void 0&&(t="pb_auth");var i=function(l,o){var r={};if(typeof l!="string")return r;for(var a=Object.assign({},o||{}).decode||w0,u=0;u4096&&(a.model={id:(s=a==null?void 0:a.model)===null||s===void 0?void 0:s.id,email:(l=a==null?void 0:a.model)===null||l===void 0?void 0:l.email},this.model instanceof Wi&&(a.model.username=this.model.username,a.model.verified=this.model.verified,a.model.collectionId=this.model.collectionId),u=ou(t,JSON.stringify(a),e)),u},n.prototype.onChange=function(e,t){var i=this;return t===void 0&&(t=!1),this._onChangeCallbacks.push(e),t&&e(this.token,this.model),function(){for(var s=i._onChangeCallbacks.length-1;s>=0;s--)if(i._onChangeCallbacks[s]==e)return delete i._onChangeCallbacks[s],void i._onChangeCallbacks.splice(s,1)}},n.prototype.triggerChange=function(){for(var e=0,t=this._onChangeCallbacks;e0?n:1,this.perPage=e>=0?e:0,this.totalItems=t>=0?t:0,this.totalPages=i>=0?i:0,this.items=s||[]},ua=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return qt(e,n),e.prototype.getFullList=function(t,i){return t===void 0&&(t=200),i===void 0&&(i={}),this._getFullList(this.baseCrudPath,t,i)},e.prototype.getList=function(t,i,s){return t===void 0&&(t=1),i===void 0&&(i=30),s===void 0&&(s={}),this._getList(this.baseCrudPath,t,i,s)},e.prototype.getFirstListItem=function(t,i){return i===void 0&&(i={}),this._getFirstListItem(this.baseCrudPath,t,i)},e.prototype.getOne=function(t,i){return i===void 0&&(i={}),this._getOne(this.baseCrudPath,t,i)},e.prototype.create=function(t,i){return t===void 0&&(t={}),i===void 0&&(i={}),this._create(this.baseCrudPath,t,i)},e.prototype.update=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),this._update(this.baseCrudPath,t,i,s)},e.prototype.delete=function(t,i){return i===void 0&&(i={}),this._delete(this.baseCrudPath,t,i)},e}(function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return qt(e,n),e.prototype._getFullList=function(t,i,s){var l=this;i===void 0&&(i=100),s===void 0&&(s={});var o=[],r=function(a){return Wt(l,void 0,void 0,function(){return Yt(this,function(u){return[2,this._getList(t,a,i,s).then(function(f){var c=f,d=c.items,h=c.totalItems;return o=o.concat(d),d.length&&h>o.length?r(a+1):o})]})})};return r(1)},e.prototype._getList=function(t,i,s,l){var o=this;return i===void 0&&(i=1),s===void 0&&(s=30),l===void 0&&(l={}),l=Object.assign({page:i,perPage:s},l),this.client.send(t,{method:"GET",params:l}).then(function(r){var a=[];if(r!=null&&r.items){r.items=r.items||[];for(var u=0,f=r.items;u=0;o--)this.subscriptions[t][o]===i&&(l=!0,delete this.subscriptions[t][o],this.subscriptions[t].splice(o,1),(s=this.eventSource)===null||s===void 0||s.removeEventListener(t,i));return l?(this.subscriptions[t].length||delete this.subscriptions[t],this.hasSubscriptionListeners()?[3,1]:(this.disconnect(),[3,3])):[2];case 1:return this.hasSubscriptionListeners(t)?[3,3]:[4,this.submitSubscriptions()];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.hasSubscriptionListeners=function(t){var i,s;if(this.subscriptions=this.subscriptions||{},t)return!!(!((i=this.subscriptions[t])===null||i===void 0)&&i.length);for(var l in this.subscriptions)if(!((s=this.subscriptions[l])===null||s===void 0)&&s.length)return!0;return!1},e.prototype.submitSubscriptions=function(){return Wt(this,void 0,void 0,function(){return Yt(this,function(t){return this.clientId?(this.addAllSubscriptionListeners(),this.lastSentTopics=this.getNonEmptySubscriptionTopics(),[2,this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentTopics},params:{$cancelKey:"realtime_"+this.clientId}}).catch(function(i){if(!(i!=null&&i.isAbort))throw i})]):[2]})})},e.prototype.getNonEmptySubscriptionTopics=function(){var t=[];for(var i in this.subscriptions)this.subscriptions[i].length&&t.push(i);return t},e.prototype.addAllSubscriptionListeners=function(){if(this.eventSource)for(var t in this.removeAllSubscriptionListeners(),this.subscriptions)for(var i=0,s=this.subscriptions[t];i0?[2]:[2,new Promise(function(s,l){t.pendingConnects.push({resolve:s,reject:l}),t.pendingConnects.length>1||t.initConnect()})]})})},e.prototype.initConnect=function(){var t=this;this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout(function(){t.connectErrorHandler(new Error("EventSource connect took too long."))},this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildUrl("/api/realtime")),this.eventSource.onerror=function(i){t.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",function(i){var s=i;t.clientId=s==null?void 0:s.lastEventId,t.submitSubscriptions().then(function(){return Wt(t,void 0,void 0,function(){var l;return Yt(this,function(o){switch(o.label){case 0:l=3,o.label=1;case 1:return this.hasUnsentSubscriptions()&&l>0?(l--,[4,this.submitSubscriptions()]):[3,3];case 2:return o.sent(),[3,1];case 3:return[2]}})})}).then(function(){for(var l=0,o=t.pendingConnects;lthis.maxReconnectAttempts){for(var s=0,l=this.pendingConnects;s=400)throw new ul({url:k.url,status:k.status,data:$});return[2,$]}})})}).catch(function(k){throw new ul(k)})]})})},n.prototype.getFileUrl=function(e,t,i){i===void 0&&(i={});var s=[];s.push("api"),s.push("files"),s.push(encodeURIComponent(e.collectionId||e.collectionName)),s.push(encodeURIComponent(e.id)),s.push(encodeURIComponent(t));var l=this.buildUrl(s.join("/"));if(Object.keys(i).length){var o=new URLSearchParams(i);l+=(l.includes("?")?"&":"?")+o}return l},n.prototype.buildUrl=function(e){var t=this.baseUrl+(this.baseUrl.endsWith("/")?"":"/");return e&&(t+=e.startsWith("/")?e.substring(1):e),t},n.prototype.serializeQueryParams=function(e){var t=[];for(var i in e)if(e[i]!==null){var s=e[i],l=encodeURIComponent(i);if(Array.isArray(s))for(var o=0,r=s;o"u"}function zi(n){return typeof n=="number"}function Ro(n){return typeof n=="number"&&n%1===0}function H0(n){return typeof n=="string"}function j0(n){return Object.prototype.toString.call(n)==="[object Date]"}function xm(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function q0(n){return Array.isArray(n)?n:[n]}function au(n,e,t){if(n.length!==0)return n.reduce((i,s)=>{const l=[e(s),s];return i&&t(i[0],l[0])===i[0]?i:l},null)[1]}function V0(n,e){return e.reduce((t,i)=>(t[i]=n[i],t),{})}function ws(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function ii(n,e,t){return Ro(n)&&n>=e&&n<=t}function z0(n,e){return n-e*Math.floor(n/e)}function yt(n,e=2){const t=n<0;let i;return t?i="-"+(""+-n).padStart(e,"0"):i=(""+n).padStart(e,"0"),i}function di(n){if(!(Ge(n)||n===null||n===""))return parseInt(n,10)}function Ai(n){if(!(Ge(n)||n===null||n===""))return parseFloat(n)}function ca(n){if(!(Ge(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function da(n,e,t=!1){const i=10**e;return(t?Math.trunc:Math.round)(n*i)/i}function $l(n){return n%4===0&&(n%100!==0||n%400===0)}function Qs(n){return $l(n)?366:365}function mo(n,e){const t=z0(e-1,12)+1,i=n+(e-t)/12;return t===2?$l(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function pa(n){let e=Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return n.year<100&&n.year>=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function go(n){const e=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7,t=n-1,i=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7;return e===4||i===3?53:52}function Pr(n){return n>99?n:n>60?1900+n:2e3+n}function eg(n,e,t,i=null){const s=new Date(n),l={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(l.timeZone=i);const o={timeZoneName:e,...l},r=new Intl.DateTimeFormat(t,o).formatToParts(s).find(a=>a.type.toLowerCase()==="timezonename");return r?r.value:null}function Ho(n,e){let t=parseInt(n,10);Number.isNaN(t)&&(t=0);const i=parseInt(e,10)||0,s=t<0||Object.is(t,-0)?-i:i;return t*60+s}function tg(n){const e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new vn(`Invalid unit value ${n}`);return e}function _o(n,e){const t={};for(const i in n)if(ws(n,i)){const s=n[i];if(s==null)continue;t[e(i)]=tg(s)}return t}function xs(n,e){const t=Math.trunc(Math.abs(n/60)),i=Math.trunc(Math.abs(n%60)),s=n>=0?"+":"-";switch(e){case"short":return`${s}${yt(t,2)}:${yt(i,2)}`;case"narrow":return`${s}${t}${i>0?`:${i}`:""}`;case"techie":return`${s}${yt(t,2)}${yt(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function jo(n){return V0(n,["hour","minute","second","millisecond"])}const ng=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,B0=["January","February","March","April","May","June","July","August","September","October","November","December"],ig=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],U0=["J","F","M","A","M","J","J","A","S","O","N","D"];function sg(n){switch(n){case"narrow":return[...U0];case"short":return[...ig];case"long":return[...B0];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const lg=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],og=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],W0=["M","T","W","T","F","S","S"];function rg(n){switch(n){case"narrow":return[...W0];case"short":return[...og];case"long":return[...lg];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const ag=["AM","PM"],Y0=["Before Christ","Anno Domini"],K0=["BC","AD"],J0=["B","A"];function ug(n){switch(n){case"narrow":return[...J0];case"short":return[...K0];case"long":return[...Y0];default:return null}}function Z0(n){return ag[n.hour<12?0:1]}function G0(n,e){return rg(e)[n.weekday-1]}function X0(n,e){return sg(e)[n.month-1]}function Q0(n,e){return ug(e)[n.year<0?0:1]}function x0(n,e,t="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},l=["hours","minutes","seconds"].indexOf(n)===-1;if(t==="auto"&&l){const c=n==="days";switch(e){case 1:return c?"tomorrow":`next ${s[n][0]}`;case-1:return c?"yesterday":`last ${s[n][0]}`;case 0:return c?"today":`this ${s[n][0]}`}}const o=Object.is(e,-0)||e<0,r=Math.abs(e),a=r===1,u=s[n],f=i?a?u[1]:u[2]||u[1]:a?s[n][0]:n;return o?`${r} ${f} ago`:`in ${r} ${f}`}function uu(n,e){let t="";for(const i of n)i.literal?t+=i.val:t+=e(i.val);return t}const eb={D:Ir,DD:Lm,DDD:Nm,DDDD:Fm,t:Rm,tt:Hm,ttt:jm,tttt:qm,T:Vm,TT:zm,TTT:Bm,TTTT:Um,f:Wm,ff:Km,fff:Zm,ffff:Xm,F:Ym,FF:Jm,FFF:Gm,FFFF:Qm};class tn{static create(e,t={}){return new tn(e,t)}static parseFormat(e){let t=null,i="",s=!1;const l=[];for(let o=0;o0&&l.push({literal:s,val:i}),t=null,i="",s=!s):s||r===t?i+=r:(i.length>0&&l.push({literal:!1,val:i}),i=r,t=r)}return i.length>0&&l.push({literal:s,val:i}),l}static macroTokenToFormatOpts(e){return eb[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTime(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTimeParts(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).formatToParts()}resolvedOptions(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return yt(e,t);const i={...this.opts};return t>0&&(i.padTo=t),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",l=(h,m)=>this.loc.extract(e,h,m),o=h=>e.isOffsetFixed&&e.offset===0&&h.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,h.format):"",r=()=>i?Z0(e):l({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(h,m)=>i?X0(e,h):l(m?{month:h}:{month:h,day:"numeric"},"month"),u=(h,m)=>i?G0(e,h):l(m?{weekday:h}:{weekday:h,month:"long",day:"numeric"},"weekday"),f=h=>{const m=tn.macroTokenToFormatOpts(h);return m?this.formatWithSystemDefault(e,m):h},c=h=>i?Q0(e,h):l({era:h},"era"),d=h=>{switch(h){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return r();case"d":return s?l({day:"numeric"},"day"):this.num(e.day);case"dd":return s?l({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return s?l({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?l({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return s?l({month:"numeric"},"month"):this.num(e.month);case"MM":return s?l({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return s?l({year:"numeric"},"year"):this.num(e.year);case"yy":return s?l({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?l({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?l({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(h)}};return uu(tn.parseFormat(t),d)}formatDurationFromString(e,t){const i=a=>{switch(a[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=a=>u=>{const f=i(u);return f?this.num(a.get(f),u.length):u},l=tn.parseFormat(t),o=l.reduce((a,{literal:u,val:f})=>u?a:a.concat(f),[]),r=e.shiftTo(...o.map(i).filter(a=>a));return uu(l,s(r))}}class En{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Cl{get type(){throw new fi}get name(){throw new fi}get ianaName(){return this.name}get isUniversal(){throw new fi}offsetName(e,t){throw new fi}formatOffset(e,t){throw new fi}offset(e){throw new fi}equals(e){throw new fi}get isValid(){throw new fi}}let Xo=null;class ha extends Cl{static get instance(){return Xo===null&&(Xo=new ha),Xo}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return eg(e,t,i)}formatOffset(e,t){return xs(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let uo={};function tb(n){return uo[n]||(uo[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),uo[n]}const nb={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function ib(n,e){const t=n.format(e).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,s,l,o,r,a,u,f]=i;return[o,s,l,r,a,u,f]}function sb(n,e){const t=n.formatToParts(e),i=[];for(let s=0;s=0?m:1e3+m,(d-h)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let Qo=null;class Kt extends Cl{static get utcInstance(){return Qo===null&&(Qo=new Kt(0)),Qo}static instance(e){return e===0?Kt.utcInstance:new Kt(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new Kt(Ho(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${xs(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${xs(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return xs(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class lb extends Cl{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function pi(n,e){if(Ge(n)||n===null)return e;if(n instanceof Cl)return n;if(H0(n)){const t=n.toLowerCase();return t==="local"||t==="system"?e:t==="utc"||t==="gmt"?Kt.utcInstance:Kt.parseSpecifier(t)||si.create(n)}else return zi(n)?Kt.instance(n):typeof n=="object"&&n.offset&&typeof n.offset=="number"?n:new lb(n)}let fu=()=>Date.now(),cu="system",du=null,pu=null,hu=null,mu;class Tt{static get now(){return fu}static set now(e){fu=e}static set defaultZone(e){cu=e}static get defaultZone(){return pi(cu,ha.instance)}static get defaultLocale(){return du}static set defaultLocale(e){du=e}static get defaultNumberingSystem(){return pu}static set defaultNumberingSystem(e){pu=e}static get defaultOutputCalendar(){return hu}static set defaultOutputCalendar(e){hu=e}static get throwOnInvalid(){return mu}static set throwOnInvalid(e){mu=e}static resetCaches(){ct.resetCache(),si.resetCache()}}let gu={};function ob(n,e={}){const t=JSON.stringify([n,e]);let i=gu[t];return i||(i=new Intl.ListFormat(n,e),gu[t]=i),i}let Lr={};function Nr(n,e={}){const t=JSON.stringify([n,e]);let i=Lr[t];return i||(i=new Intl.DateTimeFormat(n,e),Lr[t]=i),i}let Fr={};function rb(n,e={}){const t=JSON.stringify([n,e]);let i=Fr[t];return i||(i=new Intl.NumberFormat(n,e),Fr[t]=i),i}let Rr={};function ab(n,e={}){const{base:t,...i}=e,s=JSON.stringify([n,i]);let l=Rr[s];return l||(l=new Intl.RelativeTimeFormat(n,e),Rr[s]=l),l}let Zs=null;function ub(){return Zs||(Zs=new Intl.DateTimeFormat().resolvedOptions().locale,Zs)}function fb(n){const e=n.indexOf("-u-");if(e===-1)return[n];{let t;const i=n.substring(0,e);try{t=Nr(n).resolvedOptions()}catch{t=Nr(i).resolvedOptions()}const{numberingSystem:s,calendar:l}=t;return[i,s,l]}}function cb(n,e,t){return(t||e)&&(n+="-u",t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function db(n){const e=[];for(let t=1;t<=12;t++){const i=He.utc(2016,t,1);e.push(n(i))}return e}function pb(n){const e=[];for(let t=1;t<=7;t++){const i=He.utc(2016,11,13+t);e.push(n(i))}return e}function ql(n,e,t,i,s){const l=n.listingMode(t);return l==="error"?null:l==="en"?i(e):s(e)}function hb(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||new Intl.DateTimeFormat(n.intl).resolvedOptions().numberingSystem==="latn"}class mb{constructor(e,t,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:l,...o}=i;if(!t||Object.keys(o).length>0){const r={useGrouping:!1,...i};i.padTo>0&&(r.minimumIntegerDigits=i.padTo),this.inf=rb(e,r)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):da(e,3);return yt(t,this.padTo)}}}class gb{constructor(e,t,i){this.opts=i;let s;if(e.zone.isUniversal){const o=-1*(e.offset/60),r=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&si.create(r).valid?(s=r,this.dt=e):(s="UTC",i.timeZoneName?this.dt=e:this.dt=e.offset===0?e:He.fromMillis(e.ts+e.offset*60*1e3))}else e.zone.type==="system"?this.dt=e:(this.dt=e,s=e.zone.name);const l={...this.opts};s&&(l.timeZone=s),this.dtf=Nr(t,l)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class _b{constructor(e,t,i){this.opts={style:"long",...i},!t&&xm()&&(this.rtf=ab(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):x0(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class ct{static fromOpts(e){return ct.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,i,s=!1){const l=e||Tt.defaultLocale,o=l||(s?"en-US":ub()),r=t||Tt.defaultNumberingSystem,a=i||Tt.defaultOutputCalendar;return new ct(o,r,a,l)}static resetCache(){Zs=null,Lr={},Fr={},Rr={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i}={}){return ct.create(e,t,i)}constructor(e,t,i,s){const[l,o,r]=fb(e);this.locale=l,this.numberingSystem=t||o||null,this.outputCalendar=i||r||null,this.intl=cb(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=hb(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:ct.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1,i=!0){return ql(this,e,i,sg,()=>{const s=t?{month:e,day:"numeric"}:{month:e},l=t?"format":"standalone";return this.monthsCache[l][e]||(this.monthsCache[l][e]=db(o=>this.extract(o,s,"month"))),this.monthsCache[l][e]})}weekdays(e,t=!1,i=!0){return ql(this,e,i,rg,()=>{const s=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},l=t?"format":"standalone";return this.weekdaysCache[l][e]||(this.weekdaysCache[l][e]=pb(o=>this.extract(o,s,"weekday"))),this.weekdaysCache[l][e]})}meridiems(e=!0){return ql(this,void 0,e,()=>ag,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[He.utc(2016,11,13,9),He.utc(2016,11,13,19)].map(i=>this.extract(i,t,"dayperiod"))}return this.meridiemCache})}eras(e,t=!0){return ql(this,e,t,ug,()=>{const i={era:e};return this.eraCache[e]||(this.eraCache[e]=[He.utc(-40,1,1),He.utc(2017,1,1)].map(s=>this.extract(s,i,"era"))),this.eraCache[e]})}extract(e,t,i){const s=this.dtFormatter(e,t),l=s.formatToParts(),o=l.find(r=>r.type.toLowerCase()===i);return o?o.value:null}numberFormatter(e={}){return new mb(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new gb(e,this.intl,t)}relFormatter(e={}){return new _b(this.intl,this.isEnglish(),e)}listFormatter(e={}){return ob(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}function Ds(...n){const e=n.reduce((t,i)=>t+i.source,"");return RegExp(`^${e}$`)}function As(...n){return e=>n.reduce(([t,i,s],l)=>{const[o,r,a]=l(e,s);return[{...t,...o},r||i,a]},[{},null,1]).slice(0,2)}function Es(n,...e){if(n==null)return[null,null];for(const[t,i]of e){const s=t.exec(n);if(s)return i(s)}return[null,null]}function fg(...n){return(e,t)=>{const i={};let s;for(s=0;sh!==void 0&&(m||h&&f)?-h:h;return[{years:d(Ai(t)),months:d(Ai(i)),weeks:d(Ai(s)),days:d(Ai(l)),hours:d(Ai(o)),minutes:d(Ai(r)),seconds:d(Ai(a),a==="-0"),milliseconds:d(ca(u),c)}]}const Ab={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function _a(n,e,t,i,s,l,o){const r={year:e.length===2?Pr(di(e)):di(e),month:ig.indexOf(t)+1,day:di(i),hour:di(s),minute:di(l)};return o&&(r.second=di(o)),n&&(r.weekday=n.length>3?lg.indexOf(n)+1:og.indexOf(n)+1),r}const Eb=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Ib(n){const[,e,t,i,s,l,o,r,a,u,f,c]=n,d=_a(e,s,i,t,l,o,r);let h;return a?h=Ab[a]:u?h=0:h=Ho(f,c),[d,new Kt(h)]}function Pb(n){return n.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Lb=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Nb=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Fb=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function _u(n){const[,e,t,i,s,l,o,r]=n;return[_a(e,s,i,t,l,o,r),Kt.utcInstance]}function Rb(n){const[,e,t,i,s,l,o,r]=n;return[_a(e,r,t,i,s,l,o),Kt.utcInstance]}const Hb=Ds(vb,ga),jb=Ds(yb,ga),qb=Ds(kb,ga),Vb=Ds(dg),hg=As(Tb,Is,Tl,Ml),zb=As(wb,Is,Tl,Ml),Bb=As(Sb,Is,Tl,Ml),Ub=As(Is,Tl,Ml);function Wb(n){return Es(n,[Hb,hg],[jb,zb],[qb,Bb],[Vb,Ub])}function Yb(n){return Es(Pb(n),[Eb,Ib])}function Kb(n){return Es(n,[Lb,_u],[Nb,_u],[Fb,Rb])}function Jb(n){return Es(n,[Ob,Db])}const Zb=As(Is);function Gb(n){return Es(n,[Mb,Zb])}const Xb=Ds($b,Cb),Qb=Ds(pg),xb=As(Is,Tl,Ml);function e1(n){return Es(n,[Xb,hg],[Qb,xb])}const t1="Invalid Duration",mg={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},n1={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...mg},hn=146097/400,us=146097/4800,i1={years:{quarters:4,months:12,weeks:hn/7,days:hn,hours:hn*24,minutes:hn*24*60,seconds:hn*24*60*60,milliseconds:hn*24*60*60*1e3},quarters:{months:3,weeks:hn/28,days:hn/4,hours:hn*24/4,minutes:hn*24*60/4,seconds:hn*24*60*60/4,milliseconds:hn*24*60*60*1e3/4},months:{weeks:us/7,days:us,hours:us*24,minutes:us*24*60,seconds:us*24*60*60,milliseconds:us*24*60*60*1e3},...mg},Fi=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],s1=Fi.slice(0).reverse();function Ei(n,e,t=!1){const i={values:t?e.values:{...n.values,...e.values||{}},loc:n.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||n.conversionAccuracy};return new et(i)}function l1(n){return n<0?Math.floor(n):Math.ceil(n)}function gg(n,e,t,i,s){const l=n[s][t],o=e[t]/l,r=Math.sign(o)===Math.sign(i[s]),a=!r&&i[s]!==0&&Math.abs(o)<=1?l1(o):Math.trunc(o);i[s]+=a,e[t]-=a*l}function o1(n,e){s1.reduce((t,i)=>Ge(e[i])?t:(t&&gg(n,e,t,e,i),i),null)}class et{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;this.values=e.values,this.loc=e.loc||ct.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?i1:n1,this.isLuxonDuration=!0}static fromMillis(e,t){return et.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new vn(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new et({values:_o(e,et.normalizeUnit),loc:ct.fromObject(t),conversionAccuracy:t.conversionAccuracy})}static fromDurationLike(e){if(zi(e))return et.fromMillis(e);if(et.isDuration(e))return e;if(typeof e=="object")return et.fromObject(e);throw new vn(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[i]=Jb(e);return i?et.fromObject(i,t):et.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[i]=Gb(e);return i?et.fromObject(i,t):et.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new vn("need to specify a reason the Duration is invalid");const i=e instanceof En?e:new En(e,t);if(Tt.throwOnInvalid)throw new N0(i);return new et({invalid:i})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new Pm(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const i={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?tn.create(this.loc,i).formatDurationFromString(this,e):t1}toHuman(e={}){const t=Fi.map(i=>{const s=this.values[i];return Ge(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=da(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e};const i=this.shiftTo("hours","minutes","seconds","milliseconds");let s=e.format==="basic"?"hhmm":"hh:mm";(!e.suppressSeconds||i.seconds!==0||i.milliseconds!==0)&&(s+=e.format==="basic"?"ss":":ss",(!e.suppressMilliseconds||i.milliseconds!==0)&&(s+=".SSS"));let l=i.toFormat(s);return e.includePrefix&&(l="T"+l),l}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=et.fromDurationLike(e),i={};for(const s of Fi)(ws(t.values,s)||ws(this.values,s))&&(i[s]=t.get(s)+this.get(s));return Ei(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const t=et.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const i of Object.keys(this.values))t[i]=tg(e(this.values[i],i));return Ei(this,{values:t},!0)}get(e){return this[et.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,..._o(e,et.normalizeUnit)};return Ei(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t}),l={loc:s};return i&&(l.conversionAccuracy=i),Ei(this,l)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return o1(this.matrix,e),Ei(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>et.normalizeUnit(o));const t={},i={},s=this.toObject();let l;for(const o of Fi)if(e.indexOf(o)>=0){l=o;let r=0;for(const u in i)r+=this.matrix[u][o]*i[u],i[u]=0;zi(s[o])&&(r+=s[o]);const a=Math.trunc(r);t[o]=a,i[o]=(r*1e3-a*1e3)/1e3;for(const u in s)Fi.indexOf(u)>Fi.indexOf(o)&&gg(this.matrix,s,u,t,o)}else zi(s[o])&&(i[o]=s[o]);for(const o in i)i[o]!==0&&(t[l]+=o===l?i[o]:i[o]/this.matrix[l][o]);return Ei(this,{values:t},!0).normalize()}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Ei(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of Fi)if(!t(this.values[i],e.values[i]))return!1;return!0}}const Fs="Invalid Interval";function r1(n,e){return!n||!n.isValid?dt.invalid("missing or invalid start"):!e||!e.isValid?dt.invalid("missing or invalid end"):ee:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?dt.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(js).filter(o=>this.contains(o)).sort(),i=[];let{s}=this,l=0;for(;s+this.e?this.e:o;i.push(dt.fromDateTimes(s,r)),s=r,l+=1}return i}splitBy(e){const t=et.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:i}=this,s=1,l;const o=[];for(;ia*s));l=+r>+this.e?this.e:r,o.push(dt.fromDateTimes(i,l)),i=l,s+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,i=this.e=i?null:dt.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return dt.fromDateTimes(t,i)}static merge(e){const[t,i]=e.sort((s,l)=>s.s-l.s).reduce(([s,l],o)=>l?l.overlaps(o)||l.abutsStart(o)?[s,l.union(o)]:[s.concat([l]),o]:[s,o],[[],null]);return i&&t.push(i),t}static xor(e){let t=null,i=0;const s=[],l=e.map(a=>[{time:a.s,type:"s"},{time:a.e,type:"e"}]),o=Array.prototype.concat(...l),r=o.sort((a,u)=>a.time-u.time);for(const a of r)i+=a.type==="s"?1:-1,i===1?t=a.time:(t&&+t!=+a.time&&s.push(dt.fromDateTimes(t,a.time)),t=null);return dt.merge(s)}difference(...e){return dt.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:Fs}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Fs}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Fs}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Fs}toFormat(e,{separator:t=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Fs}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):et.invalid(this.invalidReason)}mapEndpoints(e){return dt.fromDateTimes(e(this.s),e(this.e))}}class Vl{static hasDST(e=Tt.defaultZone){const t=He.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return si.isValidZone(e)}static normalizeZone(e){return pi(e,Tt.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||ct.create(t,i,l)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||ct.create(t,i,l)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||ct.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||ct.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return ct.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return ct.create(t,null,"gregory").eras(e)}static features(){return{relative:xm()}}}function bu(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=t(e)-t(n);return Math.floor(et.fromMillis(i).as("days"))}function a1(n,e,t){const i=[["years",(r,a)=>a.year-r.year],["quarters",(r,a)=>a.quarter-r.quarter],["months",(r,a)=>a.month-r.month+(a.year-r.year)*12],["weeks",(r,a)=>{const u=bu(r,a);return(u-u%7)/7}],["days",bu]],s={};let l,o;for(const[r,a]of i)if(t.indexOf(r)>=0){l=r;let u=a(n,e);o=n.plus({[r]:u}),o>e?(n=n.plus({[r]:u-1}),u-=1):n=o,s[r]=u}return[n,s,o,l]}function u1(n,e,t,i){let[s,l,o,r]=a1(n,e,t);const a=e-s,u=t.filter(c=>["hours","minutes","seconds","milliseconds"].indexOf(c)>=0);u.length===0&&(o0?et.fromMillis(a,i).shiftTo(...u).plus(f):f}const ba={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},vu={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},f1=ba.hanidec.replace(/[\[|\]]/g,"").split("");function c1(n){let e=parseInt(n,10);if(isNaN(e)){e="";for(let t=0;t=l&&i<=o&&(e+=i-l)}}return parseInt(e,10)}else return e}function On({numberingSystem:n},e=""){return new RegExp(`${ba[n||"latn"]}${e}`)}const d1="missing Intl.DateTimeFormat.formatToParts support";function tt(n,e=t=>t){return{regex:n,deser:([t])=>e(c1(t))}}const p1=String.fromCharCode(160),_g=`[ ${p1}]`,bg=new RegExp(_g,"g");function h1(n){return n.replace(/\./g,"\\.?").replace(bg,_g)}function yu(n){return n.replace(/\./g,"").replace(bg," ").toLowerCase()}function Dn(n,e){return n===null?null:{regex:RegExp(n.map(h1).join("|")),deser:([t])=>n.findIndex(i=>yu(t)===yu(i))+e}}function ku(n,e){return{regex:n,deser:([,t,i])=>Ho(t,i),groups:e}}function xo(n){return{regex:n,deser:([e])=>e}}function m1(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function g1(n,e){const t=On(e),i=On(e,"{2}"),s=On(e,"{3}"),l=On(e,"{4}"),o=On(e,"{6}"),r=On(e,"{1,2}"),a=On(e,"{1,3}"),u=On(e,"{1,6}"),f=On(e,"{1,9}"),c=On(e,"{2,4}"),d=On(e,"{4,6}"),h=g=>({regex:RegExp(m1(g.val)),deser:([y])=>y,literal:!0}),b=(g=>{if(n.literal)return h(g);switch(g.val){case"G":return Dn(e.eras("short",!1),0);case"GG":return Dn(e.eras("long",!1),0);case"y":return tt(u);case"yy":return tt(c,Pr);case"yyyy":return tt(l);case"yyyyy":return tt(d);case"yyyyyy":return tt(o);case"M":return tt(r);case"MM":return tt(i);case"MMM":return Dn(e.months("short",!0,!1),1);case"MMMM":return Dn(e.months("long",!0,!1),1);case"L":return tt(r);case"LL":return tt(i);case"LLL":return Dn(e.months("short",!1,!1),1);case"LLLL":return Dn(e.months("long",!1,!1),1);case"d":return tt(r);case"dd":return tt(i);case"o":return tt(a);case"ooo":return tt(s);case"HH":return tt(i);case"H":return tt(r);case"hh":return tt(i);case"h":return tt(r);case"mm":return tt(i);case"m":return tt(r);case"q":return tt(r);case"qq":return tt(i);case"s":return tt(r);case"ss":return tt(i);case"S":return tt(a);case"SSS":return tt(s);case"u":return xo(f);case"uu":return xo(r);case"uuu":return tt(t);case"a":return Dn(e.meridiems(),0);case"kkkk":return tt(l);case"kk":return tt(c,Pr);case"W":return tt(r);case"WW":return tt(i);case"E":case"c":return tt(t);case"EEE":return Dn(e.weekdays("short",!1,!1),1);case"EEEE":return Dn(e.weekdays("long",!1,!1),1);case"ccc":return Dn(e.weekdays("short",!0,!1),1);case"cccc":return Dn(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return ku(new RegExp(`([+-]${r.source})(?::(${i.source}))?`),2);case"ZZZ":return ku(new RegExp(`([+-]${r.source})(${i.source})?`),2);case"z":return xo(/[a-z_+-/]{1,256}?/i);default:return h(g)}})(n)||{invalidReason:d1};return b.token=n,b}const _1={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function b1(n,e,t){const{type:i,value:s}=n;if(i==="literal")return{literal:!0,val:s};const l=t[i];let o=_1[i];if(typeof o=="object"&&(o=o[l]),o)return{literal:!1,val:o}}function v1(n){return[`^${n.map(t=>t.regex).reduce((t,i)=>`${t}(${i.source})`,"")}$`,n]}function y1(n,e,t){const i=n.match(e);if(i){const s={};let l=1;for(const o in t)if(ws(t,o)){const r=t[o],a=r.groups?r.groups+1:1;!r.literal&&r.token&&(s[r.token.val[0]]=r.deser(i.slice(l,l+a))),l+=a}return[i,s]}else return[i,{}]}function k1(n){const e=l=>{switch(l){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let t=null,i;return Ge(n.z)||(t=si.create(n.z)),Ge(n.Z)||(t||(t=new Kt(n.Z)),i=n.Z),Ge(n.q)||(n.M=(n.q-1)*3+1),Ge(n.h)||(n.h<12&&n.a===1?n.h+=12:n.h===12&&n.a===0&&(n.h=0)),n.G===0&&n.y&&(n.y=-n.y),Ge(n.u)||(n.S=ca(n.u)),[Object.keys(n).reduce((l,o)=>{const r=e(o);return r&&(l[r]=n[o]),l},{}),t,i]}let er=null;function w1(){return er||(er=He.fromMillis(1555555555555)),er}function S1(n,e){if(n.literal)return n;const t=tn.macroTokenToFormatOpts(n.val);if(!t)return n;const l=tn.create(e,t).formatDateTimeParts(w1()).map(o=>b1(o,e,t));return l.includes(void 0)?n:l}function $1(n,e){return Array.prototype.concat(...n.map(t=>S1(t,e)))}function vg(n,e,t){const i=$1(tn.parseFormat(t),n),s=i.map(o=>g1(o,n)),l=s.find(o=>o.invalidReason);if(l)return{input:e,tokens:i,invalidReason:l.invalidReason};{const[o,r]=v1(s),a=RegExp(o,"i"),[u,f]=y1(e,a,r),[c,d,h]=f?k1(f):[null,null,void 0];if(ws(f,"a")&&ws(f,"H"))throw new Js("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:a,rawMatches:u,matches:f,result:c,zone:d,specificOffset:h}}}function C1(n,e,t){const{result:i,zone:s,specificOffset:l,invalidReason:o}=vg(n,e,t);return[i,s,l,o]}const yg=[0,31,59,90,120,151,181,212,243,273,304,334],kg=[0,31,60,91,121,152,182,213,244,274,305,335];function kn(n,e){return new En("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function wg(n,e,t){const i=new Date(Date.UTC(n,e-1,t));n<100&&n>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return s===0?7:s}function Sg(n,e,t){return t+($l(n)?kg:yg)[e-1]}function $g(n,e){const t=$l(n)?kg:yg,i=t.findIndex(l=>lgo(e)?(r=e+1,o=1):r=e,{weekYear:r,weekNumber:o,weekday:l,...jo(n)}}function wu(n){const{weekYear:e,weekNumber:t,weekday:i}=n,s=wg(e,1,4),l=Qs(e);let o=t*7+i-s-3,r;o<1?(r=e-1,o+=Qs(r)):o>l?(r=e+1,o-=Qs(e)):r=e;const{month:a,day:u}=$g(r,o);return{year:r,month:a,day:u,...jo(n)}}function tr(n){const{year:e,month:t,day:i}=n,s=Sg(e,t,i);return{year:e,ordinal:s,...jo(n)}}function Su(n){const{year:e,ordinal:t}=n,{month:i,day:s}=$g(e,t);return{year:e,month:i,day:s,...jo(n)}}function T1(n){const e=Ro(n.weekYear),t=ii(n.weekNumber,1,go(n.weekYear)),i=ii(n.weekday,1,7);return e?t?i?!1:kn("weekday",n.weekday):kn("week",n.week):kn("weekYear",n.weekYear)}function M1(n){const e=Ro(n.year),t=ii(n.ordinal,1,Qs(n.year));return e?t?!1:kn("ordinal",n.ordinal):kn("year",n.year)}function Cg(n){const e=Ro(n.year),t=ii(n.month,1,12),i=ii(n.day,1,mo(n.year,n.month));return e?t?i?!1:kn("day",n.day):kn("month",n.month):kn("year",n.year)}function Tg(n){const{hour:e,minute:t,second:i,millisecond:s}=n,l=ii(e,0,23)||e===24&&t===0&&i===0&&s===0,o=ii(t,0,59),r=ii(i,0,59),a=ii(s,0,999);return l?o?r?a?!1:kn("millisecond",s):kn("second",i):kn("minute",t):kn("hour",e)}const nr="Invalid DateTime",$u=864e13;function zl(n){return new En("unsupported zone",`the zone "${n.name}" is not supported`)}function ir(n){return n.weekData===null&&(n.weekData=Hr(n.c)),n.weekData}function Rs(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new He({...t,...e,old:t})}function Mg(n,e,t){let i=n-e*60*1e3;const s=t.offset(i);if(e===s)return[i,e];i-=(s-e)*60*1e3;const l=t.offset(i);return s===l?[i,s]:[n-Math.min(s,l)*60*1e3,Math.max(s,l)]}function Cu(n,e){n+=e*60*1e3;const t=new Date(n);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function fo(n,e,t){return Mg(pa(n),e,t)}function Tu(n,e){const t=n.o,i=n.c.year+Math.trunc(e.years),s=n.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,l={...n.c,year:i,month:s,day:Math.min(n.c.day,mo(i,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=et.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),r=pa(l);let[a,u]=Mg(r,t,n.zone);return o!==0&&(a+=o,u=n.zone.offset(a)),{ts:a,o:u}}function Hs(n,e,t,i,s,l){const{setZone:o,zone:r}=t;if(n&&Object.keys(n).length!==0){const a=e||r,u=He.fromObject(n,{...t,zone:a,specificOffset:l});return o?u:u.setZone(r)}else return He.invalid(new En("unparsable",`the input "${s}" can't be parsed as ${i}`))}function Bl(n,e,t=!0){return n.isValid?tn.create(ct.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function sr(n,e){const t=n.c.year>9999||n.c.year<0;let i="";return t&&n.c.year>=0&&(i+="+"),i+=yt(n.c.year,t?6:4),e?(i+="-",i+=yt(n.c.month),i+="-",i+=yt(n.c.day)):(i+=yt(n.c.month),i+=yt(n.c.day)),i}function Mu(n,e,t,i,s,l){let o=yt(n.c.hour);return e?(o+=":",o+=yt(n.c.minute),(n.c.second!==0||!t)&&(o+=":")):o+=yt(n.c.minute),(n.c.second!==0||!t)&&(o+=yt(n.c.second),(n.c.millisecond!==0||!i)&&(o+=".",o+=yt(n.c.millisecond,3))),s&&(n.isOffsetFixed&&n.offset===0&&!l?o+="Z":n.o<0?(o+="-",o+=yt(Math.trunc(-n.o/60)),o+=":",o+=yt(Math.trunc(-n.o%60))):(o+="+",o+=yt(Math.trunc(n.o/60)),o+=":",o+=yt(Math.trunc(n.o%60)))),l&&(o+="["+n.zone.ianaName+"]"),o}const Og={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},O1={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},D1={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Dg=["year","month","day","hour","minute","second","millisecond"],A1=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],E1=["year","ordinal","hour","minute","second","millisecond"];function Ou(n){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[n.toLowerCase()];if(!e)throw new Pm(n);return e}function Du(n,e){const t=pi(e.zone,Tt.defaultZone),i=ct.fromObject(e),s=Tt.now();let l,o;if(Ge(n.year))l=s;else{for(const u of Dg)Ge(n[u])&&(n[u]=Og[u]);const r=Cg(n)||Tg(n);if(r)return He.invalid(r);const a=t.offset(s);[l,o]=fo(n,a,t)}return new He({ts:l,zone:t,loc:i,o})}function Au(n,e,t){const i=Ge(t.round)?!0:t.round,s=(o,r)=>(o=da(o,i||t.calendary?0:2,!0),e.loc.clone(t).relFormatter(t).format(o,r)),l=o=>t.calendary?e.hasSame(n,o)?0:e.startOf(o).diff(n.startOf(o),o).get(o):e.diff(n,o).get(o);if(t.unit)return s(l(t.unit),t.unit);for(const o of t.units){const r=l(o);if(Math.abs(r)>=1)return s(r,o)}return s(n>e?-0:0,t.units[t.units.length-1])}function Eu(n){let e={},t;return n.length>0&&typeof n[n.length-1]=="object"?(e=n[n.length-1],t=Array.from(n).slice(0,n.length-1)):t=Array.from(n),[e,t]}class He{constructor(e){const t=e.zone||Tt.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new En("invalid input"):null)||(t.isValid?null:zl(t));this.ts=Ge(e.ts)?Tt.now():e.ts;let s=null,l=null;if(!i)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,l]=[e.old.c,e.old.o];else{const r=t.offset(this.ts);s=Cu(this.ts,r),i=Number.isNaN(s.year)?new En("invalid input"):null,s=i?null:s,l=i?null:r}this._zone=t,this.loc=e.loc||ct.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=l,this.isLuxonDateTime=!0}static now(){return new He({})}static local(){const[e,t]=Eu(arguments),[i,s,l,o,r,a,u]=t;return Du({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static utc(){const[e,t]=Eu(arguments),[i,s,l,o,r,a,u]=t;return e.zone=Kt.utcInstance,Du({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const i=j0(e)?e.valueOf():NaN;if(Number.isNaN(i))return He.invalid("invalid input");const s=pi(t.zone,Tt.defaultZone);return s.isValid?new He({ts:i,zone:s,loc:ct.fromObject(t)}):He.invalid(zl(s))}static fromMillis(e,t={}){if(zi(e))return e<-$u||e>$u?He.invalid("Timestamp out of range"):new He({ts:e,zone:pi(t.zone,Tt.defaultZone),loc:ct.fromObject(t)});throw new vn(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(zi(e))return new He({ts:e*1e3,zone:pi(t.zone,Tt.defaultZone),loc:ct.fromObject(t)});throw new vn("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const i=pi(t.zone,Tt.defaultZone);if(!i.isValid)return He.invalid(zl(i));const s=Tt.now(),l=Ge(t.specificOffset)?i.offset(s):t.specificOffset,o=_o(e,Ou),r=!Ge(o.ordinal),a=!Ge(o.year),u=!Ge(o.month)||!Ge(o.day),f=a||u,c=o.weekYear||o.weekNumber,d=ct.fromObject(t);if((f||r)&&c)throw new Js("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&r)throw new Js("Can't mix ordinal dates with month/day");const h=c||o.weekday&&!f;let m,b,g=Cu(s,l);h?(m=A1,b=O1,g=Hr(g)):r?(m=E1,b=D1,g=tr(g)):(m=Dg,b=Og);let y=!1;for(const A of m){const I=o[A];Ge(I)?y?o[A]=b[A]:o[A]=g[A]:y=!0}const k=h?T1(o):r?M1(o):Cg(o),$=k||Tg(o);if($)return He.invalid($);const C=h?wu(o):r?Su(o):o,[M,T]=fo(C,l,i),D=new He({ts:M,zone:i,o:T,loc:d});return o.weekday&&f&&e.weekday!==D.weekday?He.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${D.toISO()}`):D}static fromISO(e,t={}){const[i,s]=Wb(e);return Hs(i,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[i,s]=Yb(e);return Hs(i,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[i,s]=Kb(e);return Hs(i,s,t,"HTTP",t)}static fromFormat(e,t,i={}){if(Ge(e)||Ge(t))throw new vn("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:l=null}=i,o=ct.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0}),[r,a,u,f]=C1(o,e,t);return f?He.invalid(f):Hs(r,a,i,`format ${t}`,e,u)}static fromString(e,t,i={}){return He.fromFormat(e,t,i)}static fromSQL(e,t={}){const[i,s]=e1(e);return Hs(i,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new vn("need to specify a reason the DateTime is invalid");const i=e instanceof En?e:new En(e,t);if(Tt.throwOnInvalid)throw new P0(i);return new He({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?ir(this).weekYear:NaN}get weekNumber(){return this.isValid?ir(this).weekNumber:NaN}get weekday(){return this.isValid?ir(this).weekday:NaN}get ordinal(){return this.isValid?tr(this.c).ordinal:NaN}get monthShort(){return this.isValid?Vl.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Vl.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Vl.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Vl.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return $l(this.year)}get daysInMonth(){return mo(this.year,this.month)}get daysInYear(){return this.isValid?Qs(this.year):NaN}get weeksInWeekYear(){return this.isValid?go(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:s}=tn.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(Kt.instance(e),t)}toLocal(){return this.setZone(Tt.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if(e=pi(e,Tt.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||i){const l=e.offset(this.ts),o=this.toObject();[s]=fo(o,l,e)}return Rs(this,{ts:s,zone:e})}else return He.invalid(zl(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i});return Rs(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=_o(e,Ou),i=!Ge(t.weekYear)||!Ge(t.weekNumber)||!Ge(t.weekday),s=!Ge(t.ordinal),l=!Ge(t.year),o=!Ge(t.month)||!Ge(t.day),r=l||o,a=t.weekYear||t.weekNumber;if((r||s)&&a)throw new Js("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new Js("Can't mix ordinal dates with month/day");let u;i?u=wu({...Hr(this.c),...t}):Ge(t.ordinal)?(u={...this.toObject(),...t},Ge(t.day)&&(u.day=Math.min(mo(u.year,u.month),u.day))):u=Su({...tr(this.c),...t});const[f,c]=fo(u,this.o,this.zone);return Rs(this,{ts:f,o:c})}plus(e){if(!this.isValid)return this;const t=et.fromDurationLike(e);return Rs(this,Tu(this,t))}minus(e){if(!this.isValid)return this;const t=et.fromDurationLike(e).negate();return Rs(this,Tu(this,t))}startOf(e){if(!this.isValid)return this;const t={},i=et.normalizeUnit(e);switch(i){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0;break}if(i==="weeks"&&(t.weekday=1),i==="quarters"){const s=Math.ceil(this.month/3);t.month=(s-1)*3+1}return this.set(t)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,t={}){return this.isValid?tn.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):nr}toLocaleString(e=Ir,t={}){return this.isValid?tn.create(this.loc.clone(t),e).formatDateTime(this):nr}toLocaleParts(e={}){return this.isValid?tn.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:l=!1}={}){if(!this.isValid)return null;const o=e==="extended";let r=sr(this,o);return r+="T",r+=Mu(this,o,t,i,s,l),r}toISODate({format:e="extended"}={}){return this.isValid?sr(this,e==="extended"):null}toISOWeekDate(){return Bl(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:l=!1,format:o="extended"}={}){return this.isValid?(s?"T":"")+Mu(this,o==="extended",t,e,i,l):null}toRFC2822(){return Bl(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Bl(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?sr(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(t||e)&&(i&&(s+=" "),t?s+="z":e&&(s+="ZZ")),Bl(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():nr}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",i={}){if(!this.isValid||!e.isValid)return et.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},l=q0(t).map(et.normalizeUnit),o=e.valueOf()>this.valueOf(),r=o?this:e,a=o?e:this,u=u1(r,a,l,s);return o?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(He.now(),e,t)}until(e){return this.isValid?dt.fromDateTimes(this,e):this}hasSame(e,t){if(!this.isValid)return!1;const i=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t)<=i&&i<=s.endOf(t)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||He.fromObject({},{zone:this.zone}),i=e.padding?thist.valueOf(),Math.min)}static max(...e){if(!e.every(He.isDateTime))throw new vn("max requires all arguments be DateTimes");return au(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){const{locale:s=null,numberingSystem:l=null}=i,o=ct.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0});return vg(o,e,t)}static fromStringExplain(e,t,i={}){return He.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return Ir}static get DATE_MED(){return Lm}static get DATE_MED_WITH_WEEKDAY(){return F0}static get DATE_FULL(){return Nm}static get DATE_HUGE(){return Fm}static get TIME_SIMPLE(){return Rm}static get TIME_WITH_SECONDS(){return Hm}static get TIME_WITH_SHORT_OFFSET(){return jm}static get TIME_WITH_LONG_OFFSET(){return qm}static get TIME_24_SIMPLE(){return Vm}static get TIME_24_WITH_SECONDS(){return zm}static get TIME_24_WITH_SHORT_OFFSET(){return Bm}static get TIME_24_WITH_LONG_OFFSET(){return Um}static get DATETIME_SHORT(){return Wm}static get DATETIME_SHORT_WITH_SECONDS(){return Ym}static get DATETIME_MED(){return Km}static get DATETIME_MED_WITH_SECONDS(){return Jm}static get DATETIME_MED_WITH_WEEKDAY(){return R0}static get DATETIME_FULL(){return Zm}static get DATETIME_FULL_WITH_SECONDS(){return Gm}static get DATETIME_HUGE(){return Xm}static get DATETIME_HUGE_WITH_SECONDS(){return Qm}}function js(n){if(He.isDateTime(n))return n;if(n&&n.valueOf&&zi(n.valueOf()))return He.fromJSDate(n);if(n&&typeof n=="object")return He.fromObject(n);throw new vn(`Unknown datetime argument: ${n}, of type ${typeof n}`)}class W{static isObject(e){return e!==null&&typeof e=="object"&&e.constructor===Object}static isEmpty(e){return e===""||e===null||e==="00000000-0000-0000-0000-000000000000"||e==="0001-01-01 00:00:00.000Z"||e==="0001-01-01"||typeof e>"u"||Array.isArray(e)&&e.length===0||W.isObject(e)&&Object.keys(e).length===0}static isInput(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return t==="input"||t==="select"||t==="textarea"||e.isContentEditable}static isFocusable(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return W.isInput(e)||t==="button"||t==="a"||t==="details"||e.tabIndex>=0}static hasNonEmptyProps(e){for(let t in e)if(!W.isEmpty(e[t]))return!0;return!1}static toArray(e,t=!1){return Array.isArray(e)?e:(t||!W.isEmpty(e))&&typeof e<"u"?[e]:[]}static inArray(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t)return!0;return!1}static removeByValue(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t){e.splice(i,1);break}}static pushUnique(e,t){W.inArray(e,t)||e.push(t)}static findByKey(e,t,i){e=Array.isArray(e)?e:[];for(let s in e)if(e[s][t]==i)return e[s];return null}static groupByKey(e,t){e=Array.isArray(e)?e:[];const i={};for(let s in e)i[e[s][t]]=i[e[s][t]]||[],i[e[s][t]].push(e[s]);return i}static removeByKey(e,t,i){for(let s in e)if(e[s][t]==i){e.splice(s,1);break}}static pushOrReplaceByKey(e,t,i="id"){for(let s=e.length-1;s>=0;s--)if(e[s][i]==t[i]){e[s]=t;return}e.push(t)}static filterDuplicatesByKey(e,t="id"){e=Array.isArray(e)?e:[];const i={};for(const s of e)i[s[t]]=s;return Object.values(i)}static filterRedactedProps(e,t="******"){const i=JSON.parse(JSON.stringify(e||{}));for(let s in i)typeof i[s]=="object"&&i[s]!==null?i[s]=W.filterRedactedProps(i[s],t):i[s]===t&&delete i[s];return i}static getNestedVal(e,t,i=null,s="."){let l=e||{},o=(t||"").split(s);for(const r of o){if(!W.isObject(l)&&!Array.isArray(l)||typeof l[r]>"u")return i;l=l[r]}return l}static setByPath(e,t,i,s="."){if(e===null||typeof e!="object"){console.warn("setByPath: data not an object or array.");return}let l=e,o=t.split(s),r=o.pop();for(const a of o)(!W.isObject(l)&&!Array.isArray(l)||!W.isObject(l[a])&&!Array.isArray(l[a]))&&(l[a]={}),l=l[a];l[r]=i}static deleteByPath(e,t,i="."){let s=e||{},l=(t||"").split(i),o=l.pop();for(const r of l)(!W.isObject(s)&&!Array.isArray(s)||!W.isObject(s[r])&&!Array.isArray(s[r]))&&(s[r]={}),s=s[r];Array.isArray(s)?s.splice(o,1):W.isObject(s)&&delete s[o],l.length>0&&(Array.isArray(s)&&!s.length||W.isObject(s)&&!Object.keys(s).length)&&(Array.isArray(e)&&e.length>0||W.isObject(e)&&Object.keys(e).length>0)&&W.deleteByPath(e,l.join(i),i)}static randomString(e){e=e||10;let t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;s{console.warn("Failed to copy.",i)})}static downloadJson(e,t){const i="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e,null,2)),s=document.createElement("a");s.setAttribute("href",i),s.setAttribute("download",t+".json"),s.click(),s.remove()}static getJWTPayload(e){const t=(e||"").split(".")[1]||"";if(t==="")return{};try{const i=decodeURIComponent(atob(t));return JSON.parse(i)||{}}catch(i){console.warn("Failed to parse JWT payload data.",i)}return{}}static hasImageExtension(e){return/\.jpg|\.jpeg|\.png|\.svg|\.gif|\.jfif|\.webp|\.avif$/.test(e)}static generateThumb(e,t=100,i=100){return new Promise(s=>{let l=new FileReader;l.onload=function(o){let r=new Image;r.onload=function(){let a=document.createElement("canvas"),u=a.getContext("2d"),f=r.width,c=r.height;return a.width=t,a.height=i,u.drawImage(r,f>c?(f-c)/2:0,0,f>c?c:f,f>c?c:f,0,0,t,i),s(a.toDataURL(e.type))},r.src=o.target.result},l.readAsDataURL(e)})}static addValueToFormData(e,t,i){if(!(typeof i>"u"))if(W.isEmpty(i))e.append(t,"");else if(Array.isArray(i))for(const s of i)W.addValueToFormData(e,t,s);else i instanceof File?e.append(t,i):i instanceof Date?e.append(t,i.toISOString()):W.isObject(i)?e.append(t,JSON.stringify(i)):e.append(t,""+i)}static defaultFlatpickrOptions(){return{dateFormat:"Y-m-d H:i:S",disableMobile:!0,allowInput:!0,enableTime:!0,time_24hr:!0,locale:{firstDayOfWeek:1}}}static dummyCollectionRecord(e){var s,l,o,r,a;const t=(e==null?void 0:e.schema)||[],i={id:"RECORD_ID",collectionId:e==null?void 0:e.id,collectionName:e==null?void 0:e.name,created:"2022-01-01 01:00:00.123Z",updated:"2022-01-01 23:59:59.456Z"};e!=null&&e.isAuth&&(i.username="username123",i.verified=!1,i.emailVisibility=!0,i.email="test@example.com");for(const u of t){let f=null;u.type==="number"?f=123:u.type==="date"?f="2022-01-01 10:00:00.123Z":u.type==="bool"?f=!0:u.type==="email"?f="test@example.com":u.type==="url"?f="https://example.com":u.type==="json"?f="JSON":u.type==="file"?(f="filename.jpg",((s=u.options)==null?void 0:s.maxSelect)!==1&&(f=[f])):u.type==="select"?(f=(o=(l=u.options)==null?void 0:l.values)==null?void 0:o[0],((r=u.options)==null?void 0:r.maxSelect)!==1&&(f=[f])):u.type==="relation"?(f="RELATION_RECORD_ID",((a=u.options)==null?void 0:a.maxSelect)!==1&&(f=[f])):f="test",i[u.name]=f}return i}static dummyCollectionSchemaData(e){var s,l,o,r;const t=(e==null?void 0:e.schema)||[],i={};for(const a of t){let u=null;if(a.type==="number")u=123;else if(a.type==="date")u="2022-01-01 10:00:00.123Z";else if(a.type==="bool")u=!0;else if(a.type==="email")u="test@example.com";else if(a.type==="url")u="https://example.com";else if(a.type==="json")u="JSON";else{if(a.type==="file")continue;a.type==="select"?(u=(l=(s=a.options)==null?void 0:s.values)==null?void 0:l[0],((o=a.options)==null?void 0:o.maxSelect)!==1&&(u=[u])):a.type==="relation"?(u="RELATION_RECORD_ID",((r=a.options)==null?void 0:r.maxSelect)!==1&&(u=[u])):u="test"}i[a.name]=u}return i}static getCollectionTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"auth":return"ri-group-line";case"single":return"ri-file-list-2-line";default:return"ri-folder-2-line"}}static getFieldTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"primary":return"ri-key-line";case"text":return"ri-text";case"number":return"ri-hashtag";case"date":return"ri-calendar-line";case"bool":return"ri-toggle-line";case"email":return"ri-mail-line";case"url":return"ri-link";case"select":return"ri-list-check";case"json":return"ri-braces-line";case"file":return"ri-image-line";case"relation":return"ri-mind-map";case"user":return"ri-user-line";default:return"ri-star-s-line"}}static getFieldValueType(e){var t;switch(e==null?void 0:e.type){case"bool":return"Boolean";case"number":return"Number";case"file":return"File";case"select":case"relation":return((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)===1?"String":"Array";default:return"String"}}static zeroDefaultStr(e){var t;return(e==null?void 0:e.type)==="number"?"0":(e==null?void 0:e.type)==="bool"?"false":["select","relation","file"].includes(e==null?void 0:e.type)&&((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)!=1?"[]":'""'}static getApiExampleUrl(e){return(window.location.href.substring(0,window.location.href.indexOf("/_"))||e||"/").replace("//localhost","//127.0.0.1")}static hasCollectionChanges(e,t,i=!1){if(e=e||{},t=t||{},e.id!=t.id)return!0;for(let u in e)if(u!=="schema"&&JSON.stringify(e[u])!==JSON.stringify(t[u]))return!0;const s=Array.isArray(e.schema)?e.schema:[],l=Array.isArray(t.schema)?t.schema:[],o=s.filter(u=>(u==null?void 0:u.id)&&!W.findByKey(l,"id",u.id)),r=l.filter(u=>(u==null?void 0:u.id)&&!W.findByKey(s,"id",u.id)),a=l.filter(u=>{const f=W.isObject(u)&&W.findByKey(s,"id",u.id);if(!f)return!1;for(let c in f)if(JSON.stringify(u[c])!=JSON.stringify(f[c]))return!0;return!1});return!!(r.length||a.length||i&&o.length)}static sortCollections(e=[]){const t=[],i=[],s=[];for(const l of e)l.type=="auth"?t.push(l):l.type=="single"?i.push(l):s.push(l);return[].concat(t,i,s)}static yieldToMain(){return new Promise(e=>{setTimeout(e,0)})}}const qo=Mn([]);function Ag(n,e=4e3){return Vo(n,"info",e)}function Lt(n,e=3e3){return Vo(n,"success",e)}function fl(n,e=4500){return Vo(n,"error",e)}function I1(n,e=4500){return Vo(n,"warning",e)}function Vo(n,e,t){t=t||4e3;const i={message:n,type:e,duration:t,timeout:setTimeout(()=>{Eg(i)},t)};qo.update(s=>(va(s,i.message),W.pushOrReplaceByKey(s,i,"message"),s))}function Eg(n){qo.update(e=>(va(e,n),e))}function Ig(){qo.update(n=>{for(let e of n)va(n,e);return[]})}function va(n,e){let t;typeof e=="string"?t=W.findByKey(n,"message",e):t=e,t&&(clearTimeout(t.timeout),W.removeByKey(n,"message",t.message))}const wi=Mn({});function Fn(n){wi.set(n||{})}function Ss(n){wi.update(e=>(W.deleteByPath(e,n),e))}const ya=Mn({});function jr(n){ya.set(n||{})}fa.prototype.logout=function(n=!0){this.authStore.clear(),n&&ki("/login")};fa.prototype.errorResponseHandler=function(n,e=!0,t=""){if(!n||!(n instanceof Error)||n.isAbort)return;const i=(n==null?void 0:n.status)<<0||400,s=(n==null?void 0:n.data)||{};if(e&&i!==404){let l=s.message||n.message||t;l&&fl(l)}if(W.isEmpty(s.data)||Fn(s.data),i===401)return this.cancelAllRequests(),this.logout();if(i===403)return this.cancelAllRequests(),ki("/")};class P1 extends Em{save(e,t){super.save(e,t),t instanceof Yi&&jr(t)}clear(){super.clear(),jr(null)}}const de=new fa("../",new P1("pb_admin_auth"));de.authStore.model instanceof Yi&&jr(de.authStore.model);function L1(n){let e,t,i,s,l,o,r,a;const u=n[3].default,f=Ot(u,n,n[2],null);return{c(){e=v("div"),t=v("main"),f&&f.c(),i=O(),s=v("footer"),l=v("a"),o=v("span"),o.textContent="PocketBase v0.10.5",p(t,"class","page-content"),p(o,"class","txt"),p(l,"href","https://github.com/pocketbase/pocketbase/releases"),p(l,"class","inline-flex flex-gap-5"),p(l,"target","_blank"),p(l,"rel","noopener noreferrer"),p(l,"title","Releases"),p(s,"class","page-footer"),p(e,"class",r="page-wrapper "+n[1]),ne(e,"center-content",n[0])},m(c,d){S(c,e,d),_(e,t),f&&f.m(t,null),_(e,i),_(e,s),_(s,l),_(l,o),a=!0},p(c,[d]){f&&f.p&&(!a||d&4)&&At(f,u,c,c[2],a?Dt(u,c[2],d,null):Et(c[2]),null),(!a||d&2&&r!==(r="page-wrapper "+c[1]))&&p(e,"class",r),(!a||d&3)&&ne(e,"center-content",c[0])},i(c){a||(E(f,c),a=!0)},o(c){P(f,c),a=!1},d(c){c&&w(e),f&&f.d(c)}}}function N1(n,e,t){let{$$slots:i={},$$scope:s}=e,{center:l=!1}=e,{class:o=""}=e;return n.$$set=r=>{"center"in r&&t(0,l=r.center),"class"in r&&t(1,o=r.class),"$$scope"in r&&t(2,s=r.$$scope)},[l,o,s,i]}class pn extends ke{constructor(e){super(),ye(this,e,N1,L1,be,{center:0,class:1})}}function Iu(n){let e,t,i;return{c(){e=v("div"),e.innerHTML=``,t=O(),i=v("div"),p(e,"class","block txt-center m-b-lg"),p(i,"class","clearfix")},m(s,l){S(s,e,l),S(s,t,l),S(s,i,l)},d(s){s&&w(e),s&&w(t),s&&w(i)}}}function F1(n){let e,t,i,s=!n[0]&&Iu();const l=n[1].default,o=Ot(l,n,n[2],null);return{c(){e=v("div"),s&&s.c(),t=O(),o&&o.c(),p(e,"class","wrapper wrapper-sm m-b-xl panel-wrapper svelte-lxxzfu")},m(r,a){S(r,e,a),s&&s.m(e,null),_(e,t),o&&o.m(e,null),i=!0},p(r,a){r[0]?s&&(s.d(1),s=null):s||(s=Iu(),s.c(),s.m(e,t)),o&&o.p&&(!i||a&4)&&At(o,l,r,r[2],i?Dt(l,r[2],a,null):Et(r[2]),null)},i(r){i||(E(o,r),i=!0)},o(r){P(o,r),i=!1},d(r){r&&w(e),s&&s.d(),o&&o.d(r)}}}function R1(n){let e,t;return e=new pn({props:{class:"full-page",center:!0,$$slots:{default:[F1]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&5&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function H1(n,e,t){let{$$slots:i={},$$scope:s}=e,{nobranding:l=!1}=e;return n.$$set=o=>{"nobranding"in o&&t(0,l=o.nobranding),"$$scope"in o&&t(2,s=o.$$scope)},[l,i,s]}class Pg extends ke{constructor(e){super(),ye(this,e,H1,R1,be,{nobranding:0})}}function Pu(n,e,t){const i=n.slice();return i[11]=e[t],i}const j1=n=>({}),Lu=n=>({uniqueId:n[3]});function q1(n){let e=(n[11]||bo)+"",t;return{c(){t=B(e)},m(i,s){S(i,t,s)},p(i,s){s&4&&e!==(e=(i[11]||bo)+"")&&ae(t,e)},d(i){i&&w(t)}}}function V1(n){var s,l;let e,t=(((s=n[11])==null?void 0:s.message)||((l=n[11])==null?void 0:l.code)||bo)+"",i;return{c(){e=v("pre"),i=B(t)},m(o,r){S(o,e,r),_(e,i)},p(o,r){var a,u;r&4&&t!==(t=(((a=o[11])==null?void 0:a.message)||((u=o[11])==null?void 0:u.code)||bo)+"")&&ae(i,t)},d(o){o&&w(e)}}}function Nu(n){let e,t;function i(o,r){return typeof o[11]=="object"?V1:q1}let s=i(n),l=s(n);return{c(){e=v("div"),l.c(),t=O(),p(e,"class","help-block help-block-error")},m(o,r){S(o,e,r),l.m(e,null),_(e,t)},p(o,r){s===(s=i(o))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,t)))},d(o){o&&w(e),l.d()}}}function z1(n){let e,t,i,s,l;const o=n[7].default,r=Ot(o,n,n[6],Lu);let a=n[2],u=[];for(let f=0;ft(5,i=m));let{$$slots:s={},$$scope:l}=e;const o="field_"+W.randomString(7);let{name:r=""}=e,{class:a=void 0}=e,u,f=[];function c(){Ss(r)}cn(()=>(u.addEventListener("input",c),u.addEventListener("change",c),()=>{u.removeEventListener("input",c),u.removeEventListener("change",c)}));function d(m){Ve.call(this,n,m)}function h(m){le[m?"unshift":"push"](()=>{u=m,t(1,u)})}return n.$$set=m=>{"name"in m&&t(4,r=m.name),"class"in m&&t(0,a=m.class),"$$scope"in m&&t(6,l=m.$$scope)},n.$$.update=()=>{n.$$.dirty&48&&t(2,f=W.toArray(W.getNestedVal(i,r)))},[a,u,f,o,r,i,l,s,d,h]}class ge extends ke{constructor(e){super(),ye(this,e,B1,z1,be,{name:4,class:0})}}function U1(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Email"),s=O(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","email"),p(l,"autocomplete","off"),p(l,"id",o=n[9]),l.required=!0,l.autofocus=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0]),l.focus(),r||(a=K(l,"input",n[5]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&1&&l.value!==u[0]&&ce(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function W1(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Password"),s=O(),l=v("input"),r=O(),a=v("div"),a.textContent="Minimum 10 characters.",p(e,"for",i=n[9]),p(l,"type","password"),p(l,"autocomplete","new-password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),ce(l,n[1]),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[6]),u=!0)},p(c,d){d&512&&i!==(i=c[9])&&p(e,"for",i),d&512&&o!==(o=c[9])&&p(l,"id",o),d&2&&l.value!==c[1]&&ce(l,c[1])},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function Y1(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Password confirm"),s=O(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[2]),r||(a=K(l,"input",n[7]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&4&&l.value!==u[2]&&ce(l,u[2])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function K1(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;return s=new ge({props:{class:"form-field required",name:"email",$$slots:{default:[U1,({uniqueId:m})=>({9:m}),({uniqueId:m})=>m?512:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:"password",$$slots:{default:[W1,({uniqueId:m})=>({9:m}),({uniqueId:m})=>m?512:0]},$$scope:{ctx:n}}}),a=new ge({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[Y1,({uniqueId:m})=>({9:m}),({uniqueId:m})=>m?512:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

Create your first admin account in order to continue

",i=O(),j(s.$$.fragment),l=O(),j(o.$$.fragment),r=O(),j(a.$$.fragment),u=O(),f=v("button"),f.innerHTML=`Create and login - `,p(t,"class","content txt-center m-b-base"),p(f,"type","submit"),p(f,"class","btn btn-lg btn-block btn-next"),ne(f,"btn-disabled",n[3]),ne(f,"btn-loading",n[3]),p(e,"class","block"),p(e,"autocomplete","off")},m(m,b){S(m,e,b),_(e,t),_(e,i),R(s,e,null),_(e,l),R(o,e,null),_(e,r),R(a,e,null),_(e,u),_(e,f),c=!0,d||(h=K(e,"submit",ut(n[4])),d=!0)},p(m,[b]){const g={};b&1537&&(g.$$scope={dirty:b,ctx:m}),s.$set(g);const y={};b&1538&&(y.$$scope={dirty:b,ctx:m}),o.$set(y);const k={};b&1540&&(k.$$scope={dirty:b,ctx:m}),a.$set(k),(!c||b&8)&&ne(f,"btn-disabled",m[3]),(!c||b&8)&&ne(f,"btn-loading",m[3])},i(m){c||(E(s.$$.fragment,m),E(o.$$.fragment,m),E(a.$$.fragment,m),c=!0)},o(m){P(s.$$.fragment,m),P(o.$$.fragment,m),P(a.$$.fragment,m),c=!1},d(m){m&&w(e),H(s),H(o),H(a),d=!1,h()}}}function J1(n,e,t){const i=It();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await de.admins.create({email:s,password:l,passwordConfirm:o}),await de.admins.authWithPassword(s,l),i("submit")}catch(d){de.errorResponseHandler(d)}t(3,r=!1)}}function u(){s=this.value,t(0,s)}function f(){l=this.value,t(1,l)}function c(){o=this.value,t(2,o)}return[s,l,o,r,a,u,f,c]}class Z1 extends ke{constructor(e){super(),ye(this,e,J1,K1,be,{})}}function Fu(n){let e,t;return e=new Pg({props:{$$slots:{default:[G1]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s&9&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function G1(n){let e,t;return e=new Z1({}),e.$on("submit",n[1]),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p:te,i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function X1(n){let e,t,i=n[0]&&Fu(n);return{c(){i&&i.c(),e=Ee()},m(s,l){i&&i.m(s,l),S(s,e,l),t=!0},p(s,[l]){s[0]?i?(i.p(s,l),l&1&&E(i,1)):(i=Fu(s),i.c(),E(i,1),i.m(e.parentNode,e)):i&&(pe(),P(i,1,1,()=>{i=null}),he())},i(s){t||(E(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function Q1(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){de.logout(!1),t(0,i=!0);return}de.authStore.isValid?ki("/collections"):de.logout()}return[i,async()=>{t(0,i=!1),await Tn(),window.location.search=""}]}class x1 extends ke{constructor(e){super(),ye(this,e,Q1,X1,be,{})}}const mt=Mn(""),vo=Mn(""),$s=Mn(!1);function zo(n){const e=n-1;return e*e*e+1}function yo(n,{delay:e=0,duration:t=400,easing:i=yl}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function Sn(n,{delay:e=0,duration:t=400,easing:i=zo,x:s=0,y:l=0,opacity:o=0}={}){const r=getComputedStyle(n),a=+r.opacity,u=r.transform==="none"?"":r.transform,f=a*(1-o);return{delay:e,duration:t,easing:i,css:(c,d)=>` +}`,c=`__svelte_${i0(f)}_${r}`,d=vm(n),{stylesheet:h,rules:m}=ho.get(d)||s0(d,n);m[c]||(m[c]=!0,h.insertRule(`@keyframes ${c} ${f}`,h.cssRules.length));const g=n.style.animation||"";return n.style.animation=`${g?`${g}, `:""}${c} ${i}ms linear ${s}ms 1 both`,mo+=1,c}function al(n,e){const t=(n.style.animation||"").split(", "),i=t.filter(e?l=>l.indexOf(e)<0:l=>l.indexOf("__svelte")===-1),s=t.length-i.length;s&&(n.style.animation=i.join(", "),mo-=s,mo||l0())}function l0(){la(()=>{mo||(ho.forEach(n=>{const{ownerNode:e}=n.stylesheet;e&&w(e)}),ho.clear())})}function o0(n,e,t,i){if(!e)return ee;const s=n.getBoundingClientRect();if(e.left===s.left&&e.right===s.right&&e.top===s.top&&e.bottom===s.bottom)return ee;const{delay:l=0,duration:o=300,easing:r=kl,start:a=No()+l,end:u=a+o,tick:f=ee,css:c}=t(n,{from:e,to:s},i);let d=!0,h=!1,m;function g(){c&&(m=rl(n,0,1,o,l,r,c)),l||(h=!0)}function b(){c&&al(n,m),d=!1}return Fo(y=>{if(!h&&y>=a&&(h=!0),h&&y>=u&&(f(1,0),b()),!d)return!1;if(h){const k=y-a,$=0+1*r(k/o);f($,1-$)}return!0}),g(),f(0,1),b}function r0(n){const e=getComputedStyle(n);if(e.position!=="absolute"&&e.position!=="fixed"){const{width:t,height:i}=e,s=n.getBoundingClientRect();n.style.position="absolute",n.style.width=t,n.style.height=i,km(n,s)}}function km(n,e){const t=n.getBoundingClientRect();if(e.left!==t.left||e.top!==t.top){const i=getComputedStyle(n),s=i.transform==="none"?"":i.transform;n.style.transform=`${s} translate(${e.left-t.left}px, ${e.top-t.top}px)`}}let ul;function ni(n){ul=n}function wl(){if(!ul)throw new Error("Function called outside component initialization");return ul}function cn(n){wl().$$.on_mount.push(n)}function a0(n){wl().$$.after_update.push(n)}function u0(n){wl().$$.on_destroy.push(n)}function It(){const n=wl();return(e,t,{cancelable:i=!1}={})=>{const s=n.$$.callbacks[e];if(s){const l=ym(e,t,{cancelable:i});return s.slice().forEach(o=>{o.call(n,l)}),!l.defaultPrevented}return!0}}function Ve(n,e){const t=n.$$.callbacks[e.type];t&&t.slice().forEach(i=>i.call(this,e))}const Js=[],le=[],ro=[],Or=[],wm=Promise.resolve();let Dr=!1;function Sm(){Dr||(Dr=!0,wm.then(oa))}function Tn(){return Sm(),wm}function xe(n){ro.push(n)}function ve(n){Or.push(n)}const Xo=new Set;let Hl=0;function oa(){const n=ul;do{for(;Hl{Fs=null})),Fs}function Vi(n,e,t){n.dispatchEvent(ym(`${e?"intro":"outro"}${t}`))}const ao=new Set;let qn;function pe(){qn={r:0,c:[],p:qn}}function he(){qn.r||Pe(qn.c),qn=qn.p}function E(n,e){n&&n.i&&(ao.delete(n),n.i(e))}function P(n,e,t,i){if(n&&n.o){if(ao.has(n))return;ao.add(n),qn.c.push(()=>{ao.delete(n),i&&(t&&n.d(1),i())}),n.o(e)}else i&&i()}const aa={duration:0};function $m(n,e,t){let i=e(n,t),s=!1,l,o,r=0;function a(){l&&al(n,l)}function u(){const{delay:c=0,duration:d=300,easing:h=kl,tick:m=ee,css:g}=i||aa;g&&(l=rl(n,0,1,d,c,h,g,r++)),m(0,1);const b=No()+c,y=b+d;o&&o.abort(),s=!0,xe(()=>Vi(n,!0,"start")),o=Fo(k=>{if(s){if(k>=y)return m(1,0),Vi(n,!0,"end"),a(),s=!1;if(k>=b){const $=h((k-b)/d);m($,1-$)}}return s})}let f=!1;return{start(){f||(f=!0,al(n),Jt(i)?(i=i(),ra().then(u)):u())},invalidate(){f=!1},end(){s&&(a(),s=!1)}}}function Cm(n,e,t){let i=e(n,t),s=!0,l;const o=qn;o.r+=1;function r(){const{delay:a=0,duration:u=300,easing:f=kl,tick:c=ee,css:d}=i||aa;d&&(l=rl(n,1,0,u,a,f,d));const h=No()+a,m=h+u;xe(()=>Vi(n,!1,"start")),Fo(g=>{if(s){if(g>=m)return c(0,1),Vi(n,!1,"end"),--o.r||Pe(o.c),!1;if(g>=h){const b=f((g-h)/u);c(1-b,b)}}return s})}return Jt(i)?ra().then(()=>{i=i(),r()}):r(),{end(a){a&&i.tick&&i.tick(1,0),s&&(l&&al(n,l),s=!1)}}}function je(n,e,t,i){let s=e(n,t),l=i?0:1,o=null,r=null,a=null;function u(){a&&al(n,a)}function f(d,h){const m=d.b-l;return h*=Math.abs(m),{a:l,b:d.b,d:m,duration:h,start:d.start,end:d.start+h,group:d.group}}function c(d){const{delay:h=0,duration:m=300,easing:g=kl,tick:b=ee,css:y}=s||aa,k={start:No()+h,b:d};d||(k.group=qn,qn.r+=1),o||r?r=k:(y&&(u(),a=rl(n,l,d,m,h,g,y)),d&&b(0,1),o=f(k,m),xe(()=>Vi(n,d,"start")),Fo($=>{if(r&&$>r.start&&(o=f(r,m),r=null,Vi(n,o.b,"start"),y&&(u(),a=rl(n,l,o.b,o.duration,0,g,s.css))),o){if($>=o.end)b(l=o.b,1-l),Vi(n,o.b,"end"),r||(o.b?u():--o.group.r||Pe(o.group.c)),o=null;else if($>=o.start){const C=$-o.start;l=o.a+o.d*g(C/o.duration),b(l,1-l)}}return!!(o||r)}))}return{run(d){Jt(s)?ra().then(()=>{s=s(),c(d)}):c(d)},end(){u(),o=r=null}}}function eu(n,e){const t=e.token={};function i(s,l,o,r){if(e.token!==t)return;e.resolved=r;let a=e.ctx;o!==void 0&&(a=a.slice(),a[o]=r);const u=s&&(e.current=s)(a);let f=!1;e.block&&(e.blocks?e.blocks.forEach((c,d)=>{d!==l&&c&&(pe(),P(c,1,1,()=>{e.blocks[d]===c&&(e.blocks[d]=null)}),he())}):e.block.d(1),u.c(),E(u,1),u.m(e.mount(),e.anchor),f=!0),e.block=u,e.blocks&&(e.blocks[l]=u),f&&oa()}if(Q_(n)){const s=wl();if(n.then(l=>{ni(s),i(e.then,1,e.value,l),ni(null)},l=>{if(ni(s),i(e.catch,2,e.error,l),ni(null),!e.hasCatch)throw l}),e.current!==e.pending)return i(e.pending,0),!0}else{if(e.current!==e.then)return i(e.then,1,e.value,n),!0;e.resolved=n}}function c0(n,e,t){const i=e.slice(),{resolved:s}=n;n.current===n.then&&(i[n.value]=s),n.current===n.catch&&(i[n.error]=s),n.block.p(i,t)}function Gi(n,e){n.d(1),e.delete(n.key)}function nn(n,e){P(n,1,1,()=>{e.delete(n.key)})}function d0(n,e){n.f(),nn(n,e)}function bt(n,e,t,i,s,l,o,r,a,u,f,c){let d=n.length,h=l.length,m=d;const g={};for(;m--;)g[n[m].key]=m;const b=[],y=new Map,k=new Map;for(m=h;m--;){const T=c(s,l,m),D=t(T);let A=o.get(D);A?i&&A.p(T,e):(A=u(D,T),A.c()),y.set(D,b[m]=A),D in g&&k.set(D,Math.abs(m-g[D]))}const $=new Set,C=new Set;function M(T){E(T,1),T.m(r,f),o.set(T.key,T),f=T.first,h--}for(;d&&h;){const T=b[h-1],D=n[d-1],A=T.key,I=D.key;T===D?(f=T.first,d--,h--):y.has(I)?!o.has(A)||$.has(A)?M(T):C.has(I)?d--:k.get(A)>k.get(I)?(C.add(A),M(T)):($.add(I),d--):(a(D,o),d--)}for(;d--;){const T=n[d];y.has(T.key)||a(T,o)}for(;h;)M(b[h-1]);return b}function Zt(n,e){const t={},i={},s={$$scope:1};let l=n.length;for(;l--;){const o=n[l],r=e[l];if(r){for(const a in o)a in r||(i[a]=1);for(const a in r)s[a]||(t[a]=r[a],s[a]=1);n[l]=r}else for(const a in o)s[a]=1}for(const o in i)o in t||(t[o]=void 0);return t}function Kn(n){return typeof n=="object"&&n!==null?n:{}}function _e(n,e,t){const i=n.$$.props[e];i!==void 0&&(n.$$.bound[i]=t,t(n.$$.ctx[i]))}function j(n){n&&n.c()}function R(n,e,t,i){const{fragment:s,after_update:l}=n.$$;s&&s.m(e,t),i||xe(()=>{const o=n.$$.on_mount.map(hm).filter(Jt);n.$$.on_destroy?n.$$.on_destroy.push(...o):Pe(o),n.$$.on_mount=[]}),l.forEach(xe)}function H(n,e){const t=n.$$;t.fragment!==null&&(Pe(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function p0(n,e){n.$$.dirty[0]===-1&&(Js.push(n),Sm(),n.$$.dirty.fill(0)),n.$$.dirty[e/31|0]|=1<{const m=h.length?h[0]:d;return u.ctx&&s(u.ctx[c],u.ctx[c]=m)&&(!u.skip_bound&&u.bound[c]&&u.bound[c](m),f&&p0(n,c)),d}):[],u.update(),f=!0,Pe(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const c=n0(e.target);u.fragment&&u.fragment.l(c),c.forEach(w)}else u.fragment&&u.fragment.c();e.intro&&E(n.$$.fragment),R(n,e.target,e.anchor,e.customElement),oa()}ni(a)}class ke{$destroy(){H(this,1),this.$destroy=ee}$on(e,t){if(!Jt(t))return ee;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const s=i.indexOf(t);s!==-1&&i.splice(s,1)}}$set(e){this.$$set&&!x_(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}function vt(n){if(!n)throw Error("Parameter args is required");if(!n.component==!n.asyncComponent)throw Error("One and only one of component and asyncComponent is required");if(n.component&&(n.asyncComponent=()=>Promise.resolve(n.component)),typeof n.asyncComponent!="function")throw Error("Parameter asyncComponent must be a function");if(n.conditions){Array.isArray(n.conditions)||(n.conditions=[n.conditions]);for(let t=0;t{i.delete(u),i.size===0&&(t(),t=null)}}return{set:s,update:l,subscribe:o}}function Mm(n,e,t){const i=!Array.isArray(n),s=i?[n]:n,l=e.length<2;return Tm(t,o=>{let r=!1;const a=[];let u=0,f=ee;const c=()=>{if(u)return;f();const h=e(i?a[0]:a,o);l?o(h):f=Jt(h)?h:ee},d=s.map((h,m)=>mm(h,g=>{a[m]=g,u&=~(1<{u|=1<{H(f,1)}),he()}l?(e=jt(l,o()),e.$on("routeEvent",r[7]),j(e.$$.fragment),E(e.$$.fragment,1),R(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&E(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&H(e,r)}}}function m0(n){let e,t,i;const s=[{params:n[1]},n[2]];var l=n[0];function o(r){let a={};for(let u=0;u{H(f,1)}),he()}l?(e=jt(l,o()),e.$on("routeEvent",r[6]),j(e.$$.fragment),E(e.$$.fragment,1),R(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&E(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&H(e,r)}}}function g0(n){let e,t,i,s;const l=[m0,h0],o=[];function r(a,u){return a[1]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Ae()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(pe(),P(o[f],1,1,()=>{o[f]=null}),he(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),E(t,1),t.m(i.parentNode,i))},i(a){s||(E(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}function tu(){const n=window.location.href.indexOf("#/");let e=n>-1?window.location.href.substr(n+1):"/";const t=e.indexOf("?");let i="";return t>-1&&(i=e.substr(t+1),e=e.substr(0,t)),{location:e,querystring:i}}const Ro=Tm(null,function(e){e(tu());const t=()=>{e(tu())};return window.addEventListener("hashchange",t,!1),function(){window.removeEventListener("hashchange",t,!1)}});Mm(Ro,n=>n.location);const ua=Mm(Ro,n=>n.querystring),nu=Mn(void 0);async function ki(n){if(!n||n.length<1||n.charAt(0)!="/"&&n.indexOf("#/")!==0)throw Error("Invalid parameter location");await Tn();const e=(n.charAt(0)=="#"?"":"#")+n;try{const t={...history.state};delete t.__svelte_spa_router_scrollX,delete t.__svelte_spa_router_scrollY,window.history.replaceState(t,void 0,e)}catch{console.warn("Caught exception while replacing the current page. If you're running this in the Svelte REPL, please note that the `replace` method might not work in this environment.")}window.dispatchEvent(new Event("hashchange"))}function Ut(n,e){if(e=su(e),!n||!n.tagName||n.tagName.toLowerCase()!="a")throw Error('Action "link" can only be used with
tags');return iu(n,e),{update(t){t=su(t),iu(n,t)}}}function _0(n){n?window.scrollTo(n.__svelte_spa_router_scrollX,n.__svelte_spa_router_scrollY):window.scrollTo(0,0)}function iu(n,e){let t=e.href||n.getAttribute("href");if(t&&t.charAt(0)=="/")t="#"+t;else if(!t||t.length<2||t.slice(0,2)!="#/")throw Error('Invalid value for "href" attribute: '+t);n.setAttribute("href",t),n.addEventListener("click",i=>{i.preventDefault(),e.disabled||b0(i.currentTarget.getAttribute("href"))})}function su(n){return n&&typeof n=="string"?{href:n}:n||{}}function b0(n){history.replaceState({...history.state,__svelte_spa_router_scrollX:window.scrollX,__svelte_spa_router_scrollY:window.scrollY},void 0),window.location.hash=n}function v0(n,e,t){let{routes:i={}}=e,{prefix:s=""}=e,{restoreScrollState:l=!1}=e;class o{constructor(M,T){if(!T||typeof T!="function"&&(typeof T!="object"||T._sveltesparouter!==!0))throw Error("Invalid component object");if(!M||typeof M=="string"&&(M.length<1||M.charAt(0)!="/"&&M.charAt(0)!="*")||typeof M=="object"&&!(M instanceof RegExp))throw Error('Invalid value for "path" argument - strings must start with / or *');const{pattern:D,keys:A}=Om(M);this.path=M,typeof T=="object"&&T._sveltesparouter===!0?(this.component=T.component,this.conditions=T.conditions||[],this.userData=T.userData,this.props=T.props||{}):(this.component=()=>Promise.resolve(T),this.conditions=[],this.props={}),this._pattern=D,this._keys=A}match(M){if(s){if(typeof s=="string")if(M.startsWith(s))M=M.substr(s.length)||"/";else return null;else if(s instanceof RegExp){const I=M.match(s);if(I&&I[0])M=M.substr(I[0].length)||"/";else return null}}const T=this._pattern.exec(M);if(T===null)return null;if(this._keys===!1)return T;const D={};let A=0;for(;A{r.push(new o(M,C))}):Object.keys(i).forEach(C=>{r.push(new o(C,i[C]))});let a=null,u=null,f={};const c=It();async function d(C,M){await Tn(),c(C,M)}let h=null,m=null;l&&(m=C=>{C.state&&(C.state.__svelte_spa_router_scrollY||C.state.__svelte_spa_router_scrollX)?h=C.state:h=null},window.addEventListener("popstate",m),a0(()=>{_0(h)}));let g=null,b=null;const y=Ro.subscribe(async C=>{g=C;let M=0;for(;M{nu.set(u)});return}t(0,a=null),b=null,nu.set(void 0)});u0(()=>{y(),m&&window.removeEventListener("popstate",m)});function k(C){Ve.call(this,n,C)}function $(C){Ve.call(this,n,C)}return n.$$set=C=>{"routes"in C&&t(3,i=C.routes),"prefix"in C&&t(4,s=C.prefix),"restoreScrollState"in C&&t(5,l=C.restoreScrollState)},n.$$.update=()=>{n.$$.dirty&32&&(history.scrollRestoration=l?"manual":"auto")},[a,u,f,i,s,l,k,$]}class y0 extends ke{constructor(e){super(),ye(this,e,v0,g0,be,{routes:3,prefix:4,restoreScrollState:5})}}const uo=[];let Dm;function Am(n){const e=n.pattern.test(Dm);lu(n,n.className,e),lu(n,n.inactiveClassName,!e)}function lu(n,e,t){(e||"").split(" ").forEach(i=>{!i||(n.node.classList.remove(i),t&&n.node.classList.add(i))})}Ro.subscribe(n=>{Dm=n.location+(n.querystring?"?"+n.querystring:""),uo.map(Am)});function An(n,e){if(e&&(typeof e=="string"||typeof e=="object"&&e instanceof RegExp)?e={path:e}:e=e||{},!e.path&&n.hasAttribute("href")&&(e.path=n.getAttribute("href"),e.path&&e.path.length>1&&e.path.charAt(0)=="#"&&(e.path=e.path.substring(1))),e.className||(e.className="active"),!e.path||typeof e.path=="string"&&(e.path.length<1||e.path.charAt(0)!="/"&&e.path.charAt(0)!="*"))throw Error('Invalid value for "path" argument');const{pattern:t}=typeof e.path=="string"?Om(e.path):{pattern:e.path},i={node:n,className:e.className,inactiveClassName:e.inactiveClassName,pattern:t};return uo.push(i),Am(i),{destroy(){uo.splice(uo.indexOf(i),1)}}}const k0="modulepreload",w0=function(n,e){return new URL(n,e).href},ou={},st=function(e,t,i){if(!t||t.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(t.map(l=>{if(l=w0(l,i),l in ou)return;ou[l]=!0;const o=l.endsWith(".css"),r=o?'[rel="stylesheet"]':"";if(!!i)for(let f=s.length-1;f>=0;f--){const c=s[f];if(c.href===l&&(!o||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${r}`))return;const u=document.createElement("link");if(u.rel=o?"stylesheet":k0,o||(u.as="script",u.crossOrigin=""),u.href=l,document.head.appendChild(u),o)return new Promise((f,c)=>{u.addEventListener("load",f),u.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>e())};var Ar=function(n,e){return Ar=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(t[s]=i[s])},Ar(n,e)};function qt(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=n}Ar(n,e),n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Er=function(){return Er=Object.assign||function(n){for(var e,t=1,i=arguments.length;t0&&s[s.length-1])||f[0]!==6&&f[0]!==2)){o=0;continue}if(f[0]===3&&(!s||f[1]>s[0]&&f[1]>(-2*s&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};var Sl=function(){function n(e){e===void 0&&(e={}),this.load(e||{})}return n.prototype.load=function(e){for(var t=0,i=Object.entries(e);t0&&(!i.exp||i.exp-t>Date.now()/1e3))}(this.token)},enumerable:!1,configurable:!0}),n.prototype.save=function(e,t){this.baseToken=e||"",this.baseModel=t!==null&&typeof t=="object"?t.collectionId!==void 0?new Wi(t):new Yi(t):null,this.triggerChange()},n.prototype.clear=function(){this.baseToken="",this.baseModel=null,this.triggerChange()},n.prototype.loadFromCookie=function(e,t){t===void 0&&(t="pb_auth");var i=function(l,o){var r={};if(typeof l!="string")return r;for(var a=Object.assign({},o||{}).decode||S0,u=0;u4096&&(a.model={id:(s=a==null?void 0:a.model)===null||s===void 0?void 0:s.id,email:(l=a==null?void 0:a.model)===null||l===void 0?void 0:l.email},this.model instanceof Wi&&(a.model.username=this.model.username,a.model.verified=this.model.verified,a.model.collectionId=this.model.collectionId),u=ru(t,JSON.stringify(a),e)),u},n.prototype.onChange=function(e,t){var i=this;return t===void 0&&(t=!1),this._onChangeCallbacks.push(e),t&&e(this.token,this.model),function(){for(var s=i._onChangeCallbacks.length-1;s>=0;s--)if(i._onChangeCallbacks[s]==e)return delete i._onChangeCallbacks[s],void i._onChangeCallbacks.splice(s,1)}},n.prototype.triggerChange=function(){for(var e=0,t=this._onChangeCallbacks;e0?n:1,this.perPage=e>=0?e:0,this.totalItems=t>=0?t:0,this.totalPages=i>=0?i:0,this.items=s||[]},fa=function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return qt(e,n),e.prototype.getFullList=function(t,i){return t===void 0&&(t=200),i===void 0&&(i={}),this._getFullList(this.baseCrudPath,t,i)},e.prototype.getList=function(t,i,s){return t===void 0&&(t=1),i===void 0&&(i=30),s===void 0&&(s={}),this._getList(this.baseCrudPath,t,i,s)},e.prototype.getFirstListItem=function(t,i){return i===void 0&&(i={}),this._getFirstListItem(this.baseCrudPath,t,i)},e.prototype.getOne=function(t,i){return i===void 0&&(i={}),this._getOne(this.baseCrudPath,t,i)},e.prototype.create=function(t,i){return t===void 0&&(t={}),i===void 0&&(i={}),this._create(this.baseCrudPath,t,i)},e.prototype.update=function(t,i,s){return i===void 0&&(i={}),s===void 0&&(s={}),this._update(this.baseCrudPath,t,i,s)},e.prototype.delete=function(t,i){return i===void 0&&(i={}),this._delete(this.baseCrudPath,t,i)},e}(function(n){function e(){return n!==null&&n.apply(this,arguments)||this}return qt(e,n),e.prototype._getFullList=function(t,i,s){var l=this;i===void 0&&(i=100),s===void 0&&(s={});var o=[],r=function(a){return Wt(l,void 0,void 0,function(){return Yt(this,function(u){return[2,this._getList(t,a,i,s).then(function(f){var c=f,d=c.items,h=c.totalItems;return o=o.concat(d),d.length&&h>o.length?r(a+1):o})]})})};return r(1)},e.prototype._getList=function(t,i,s,l){var o=this;return i===void 0&&(i=1),s===void 0&&(s=30),l===void 0&&(l={}),l=Object.assign({page:i,perPage:s},l),this.client.send(t,{method:"GET",params:l}).then(function(r){var a=[];if(r!=null&&r.items){r.items=r.items||[];for(var u=0,f=r.items;u=0;o--)this.subscriptions[t][o]===i&&(l=!0,delete this.subscriptions[t][o],this.subscriptions[t].splice(o,1),(s=this.eventSource)===null||s===void 0||s.removeEventListener(t,i));return l?(this.subscriptions[t].length||delete this.subscriptions[t],this.hasSubscriptionListeners()?[3,1]:(this.disconnect(),[3,3])):[2];case 1:return this.hasSubscriptionListeners(t)?[3,3]:[4,this.submitSubscriptions()];case 2:r.sent(),r.label=3;case 3:return[2]}})})},e.prototype.hasSubscriptionListeners=function(t){var i,s;if(this.subscriptions=this.subscriptions||{},t)return!!(!((i=this.subscriptions[t])===null||i===void 0)&&i.length);for(var l in this.subscriptions)if(!((s=this.subscriptions[l])===null||s===void 0)&&s.length)return!0;return!1},e.prototype.submitSubscriptions=function(){return Wt(this,void 0,void 0,function(){return Yt(this,function(t){return this.clientId?(this.addAllSubscriptionListeners(),this.lastSentTopics=this.getNonEmptySubscriptionTopics(),[2,this.client.send("/api/realtime",{method:"POST",body:{clientId:this.clientId,subscriptions:this.lastSentTopics},params:{$cancelKey:"realtime_"+this.clientId}}).catch(function(i){if(!(i!=null&&i.isAbort))throw i})]):[2]})})},e.prototype.getNonEmptySubscriptionTopics=function(){var t=[];for(var i in this.subscriptions)this.subscriptions[i].length&&t.push(i);return t},e.prototype.addAllSubscriptionListeners=function(){if(this.eventSource)for(var t in this.removeAllSubscriptionListeners(),this.subscriptions)for(var i=0,s=this.subscriptions[t];i0?[2]:[2,new Promise(function(s,l){t.pendingConnects.push({resolve:s,reject:l}),t.pendingConnects.length>1||t.initConnect()})]})})},e.prototype.initConnect=function(){var t=this;this.disconnect(!0),clearTimeout(this.connectTimeoutId),this.connectTimeoutId=setTimeout(function(){t.connectErrorHandler(new Error("EventSource connect took too long."))},this.maxConnectTimeout),this.eventSource=new EventSource(this.client.buildUrl("/api/realtime")),this.eventSource.onerror=function(i){t.connectErrorHandler(new Error("Failed to establish realtime connection."))},this.eventSource.addEventListener("PB_CONNECT",function(i){var s=i;t.clientId=s==null?void 0:s.lastEventId,t.submitSubscriptions().then(function(){return Wt(t,void 0,void 0,function(){var l;return Yt(this,function(o){switch(o.label){case 0:l=3,o.label=1;case 1:return this.hasUnsentSubscriptions()&&l>0?(l--,[4,this.submitSubscriptions()]):[3,3];case 2:return o.sent(),[3,1];case 3:return[2]}})})}).then(function(){for(var l=0,o=t.pendingConnects;lthis.maxReconnectAttempts){for(var s=0,l=this.pendingConnects;s=400)throw new fl({url:k.url,status:k.status,data:$});return[2,$]}})})}).catch(function(k){throw new fl(k)})]})})},n.prototype.getFileUrl=function(e,t,i){i===void 0&&(i={});var s=[];s.push("api"),s.push("files"),s.push(encodeURIComponent(e.collectionId||e.collectionName)),s.push(encodeURIComponent(e.id)),s.push(encodeURIComponent(t));var l=this.buildUrl(s.join("/"));if(Object.keys(i).length){var o=new URLSearchParams(i);l+=(l.includes("?")?"&":"?")+o}return l},n.prototype.buildUrl=function(e){var t=this.baseUrl+(this.baseUrl.endsWith("/")?"":"/");return e&&(t+=e.startsWith("/")?e.substring(1):e),t},n.prototype.serializeQueryParams=function(e){var t=[];for(var i in e)if(e[i]!==null){var s=e[i],l=encodeURIComponent(i);if(Array.isArray(s))for(var o=0,r=s;o"u"}function zi(n){return typeof n=="number"}function Ho(n){return typeof n=="number"&&n%1===0}function j0(n){return typeof n=="string"}function q0(n){return Object.prototype.toString.call(n)==="[object Date]"}function eg(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function V0(n){return Array.isArray(n)?n:[n]}function uu(n,e,t){if(n.length!==0)return n.reduce((i,s)=>{const l=[e(s),s];return i&&t(i[0],l[0])===i[0]?i:l},null)[1]}function z0(n,e){return e.reduce((t,i)=>(t[i]=n[i],t),{})}function Ss(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function ii(n,e,t){return Ho(n)&&n>=e&&n<=t}function B0(n,e){return n-e*Math.floor(n/e)}function yt(n,e=2){const t=n<0;let i;return t?i="-"+(""+-n).padStart(e,"0"):i=(""+n).padStart(e,"0"),i}function di(n){if(!(Ge(n)||n===null||n===""))return parseInt(n,10)}function Ai(n){if(!(Ge(n)||n===null||n===""))return parseFloat(n)}function da(n){if(!(Ge(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function pa(n,e,t=!1){const i=10**e;return(t?Math.trunc:Math.round)(n*i)/i}function Cl(n){return n%4===0&&(n%100!==0||n%400===0)}function xs(n){return Cl(n)?366:365}function go(n,e){const t=B0(e-1,12)+1,i=n+(e-t)/12;return t===2?Cl(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function ha(n){let e=Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return n.year<100&&n.year>=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function _o(n){const e=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7,t=n-1,i=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7;return e===4||i===3?53:52}function Lr(n){return n>99?n:n>60?1900+n:2e3+n}function tg(n,e,t,i=null){const s=new Date(n),l={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(l.timeZone=i);const o={timeZoneName:e,...l},r=new Intl.DateTimeFormat(t,o).formatToParts(s).find(a=>a.type.toLowerCase()==="timezonename");return r?r.value:null}function jo(n,e){let t=parseInt(n,10);Number.isNaN(t)&&(t=0);const i=parseInt(e,10)||0,s=t<0||Object.is(t,-0)?-i:i;return t*60+s}function ng(n){const e=Number(n);if(typeof n=="boolean"||n===""||Number.isNaN(e))throw new vn(`Invalid unit value ${n}`);return e}function bo(n,e){const t={};for(const i in n)if(Ss(n,i)){const s=n[i];if(s==null)continue;t[e(i)]=ng(s)}return t}function el(n,e){const t=Math.trunc(Math.abs(n/60)),i=Math.trunc(Math.abs(n%60)),s=n>=0?"+":"-";switch(e){case"short":return`${s}${yt(t,2)}:${yt(i,2)}`;case"narrow":return`${s}${t}${i>0?`:${i}`:""}`;case"techie":return`${s}${yt(t,2)}${yt(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function qo(n){return z0(n,["hour","minute","second","millisecond"])}const ig=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,U0=["January","February","March","April","May","June","July","August","September","October","November","December"],sg=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],W0=["J","F","M","A","M","J","J","A","S","O","N","D"];function lg(n){switch(n){case"narrow":return[...W0];case"short":return[...sg];case"long":return[...U0];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const og=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],rg=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Y0=["M","T","W","T","F","S","S"];function ag(n){switch(n){case"narrow":return[...Y0];case"short":return[...rg];case"long":return[...og];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const ug=["AM","PM"],K0=["Before Christ","Anno Domini"],J0=["BC","AD"],Z0=["B","A"];function fg(n){switch(n){case"narrow":return[...Z0];case"short":return[...J0];case"long":return[...K0];default:return null}}function G0(n){return ug[n.hour<12?0:1]}function X0(n,e){return ag(e)[n.weekday-1]}function Q0(n,e){return lg(e)[n.month-1]}function x0(n,e){return fg(e)[n.year<0?0:1]}function eb(n,e,t="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},l=["hours","minutes","seconds"].indexOf(n)===-1;if(t==="auto"&&l){const c=n==="days";switch(e){case 1:return c?"tomorrow":`next ${s[n][0]}`;case-1:return c?"yesterday":`last ${s[n][0]}`;case 0:return c?"today":`this ${s[n][0]}`}}const o=Object.is(e,-0)||e<0,r=Math.abs(e),a=r===1,u=s[n],f=i?a?u[1]:u[2]||u[1]:a?s[n][0]:n;return o?`${r} ${f} ago`:`in ${r} ${f}`}function fu(n,e){let t="";for(const i of n)i.literal?t+=i.val:t+=e(i.val);return t}const tb={D:Pr,DD:Nm,DDD:Fm,DDDD:Rm,t:Hm,tt:jm,ttt:qm,tttt:Vm,T:zm,TT:Bm,TTT:Um,TTTT:Wm,f:Ym,ff:Jm,fff:Gm,ffff:Qm,F:Km,FF:Zm,FFF:Xm,FFFF:xm};class tn{static create(e,t={}){return new tn(e,t)}static parseFormat(e){let t=null,i="",s=!1;const l=[];for(let o=0;o0&&l.push({literal:s,val:i}),t=null,i="",s=!s):s||r===t?i+=r:(i.length>0&&l.push({literal:!1,val:i}),i=r,t=r)}return i.length>0&&l.push({literal:s,val:i}),l}static macroTokenToFormatOpts(e){return tb[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTime(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTimeParts(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).formatToParts()}resolvedOptions(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return yt(e,t);const i={...this.opts};return t>0&&(i.padTo=t),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",l=(h,m)=>this.loc.extract(e,h,m),o=h=>e.isOffsetFixed&&e.offset===0&&h.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,h.format):"",r=()=>i?G0(e):l({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(h,m)=>i?Q0(e,h):l(m?{month:h}:{month:h,day:"numeric"},"month"),u=(h,m)=>i?X0(e,h):l(m?{weekday:h}:{weekday:h,month:"long",day:"numeric"},"weekday"),f=h=>{const m=tn.macroTokenToFormatOpts(h);return m?this.formatWithSystemDefault(e,m):h},c=h=>i?x0(e,h):l({era:h},"era"),d=h=>{switch(h){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return r();case"d":return s?l({day:"numeric"},"day"):this.num(e.day);case"dd":return s?l({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return s?l({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?l({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return s?l({month:"numeric"},"month"):this.num(e.month);case"MM":return s?l({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return s?l({year:"numeric"},"year"):this.num(e.year);case"yy":return s?l({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?l({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?l({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(h)}};return fu(tn.parseFormat(t),d)}formatDurationFromString(e,t){const i=a=>{switch(a[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=a=>u=>{const f=i(u);return f?this.num(a.get(f),u.length):u},l=tn.parseFormat(t),o=l.reduce((a,{literal:u,val:f})=>u?a:a.concat(f),[]),r=e.shiftTo(...o.map(i).filter(a=>a));return fu(l,s(r))}}class En{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Tl{get type(){throw new fi}get name(){throw new fi}get ianaName(){return this.name}get isUniversal(){throw new fi}offsetName(e,t){throw new fi}formatOffset(e,t){throw new fi}offset(e){throw new fi}equals(e){throw new fi}get isValid(){throw new fi}}let Qo=null;class ma extends Tl{static get instance(){return Qo===null&&(Qo=new ma),Qo}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return tg(e,t,i)}formatOffset(e,t){return el(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let fo={};function nb(n){return fo[n]||(fo[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),fo[n]}const ib={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function sb(n,e){const t=n.format(e).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,s,l,o,r,a,u,f]=i;return[o,s,l,r,a,u,f]}function lb(n,e){const t=n.formatToParts(e),i=[];for(let s=0;s=0?m:1e3+m,(d-h)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let xo=null;class Kt extends Tl{static get utcInstance(){return xo===null&&(xo=new Kt(0)),xo}static instance(e){return e===0?Kt.utcInstance:new Kt(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new Kt(jo(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${el(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${el(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return el(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class ob extends Tl{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function pi(n,e){if(Ge(n)||n===null)return e;if(n instanceof Tl)return n;if(j0(n)){const t=n.toLowerCase();return t==="local"||t==="system"?e:t==="utc"||t==="gmt"?Kt.utcInstance:Kt.parseSpecifier(t)||si.create(n)}else return zi(n)?Kt.instance(n):typeof n=="object"&&n.offset&&typeof n.offset=="number"?n:new ob(n)}let cu=()=>Date.now(),du="system",pu=null,hu=null,mu=null,gu;class Tt{static get now(){return cu}static set now(e){cu=e}static set defaultZone(e){du=e}static get defaultZone(){return pi(du,ma.instance)}static get defaultLocale(){return pu}static set defaultLocale(e){pu=e}static get defaultNumberingSystem(){return hu}static set defaultNumberingSystem(e){hu=e}static get defaultOutputCalendar(){return mu}static set defaultOutputCalendar(e){mu=e}static get throwOnInvalid(){return gu}static set throwOnInvalid(e){gu=e}static resetCaches(){ct.resetCache(),si.resetCache()}}let _u={};function rb(n,e={}){const t=JSON.stringify([n,e]);let i=_u[t];return i||(i=new Intl.ListFormat(n,e),_u[t]=i),i}let Nr={};function Fr(n,e={}){const t=JSON.stringify([n,e]);let i=Nr[t];return i||(i=new Intl.DateTimeFormat(n,e),Nr[t]=i),i}let Rr={};function ab(n,e={}){const t=JSON.stringify([n,e]);let i=Rr[t];return i||(i=new Intl.NumberFormat(n,e),Rr[t]=i),i}let Hr={};function ub(n,e={}){const{base:t,...i}=e,s=JSON.stringify([n,i]);let l=Hr[s];return l||(l=new Intl.RelativeTimeFormat(n,e),Hr[s]=l),l}let Gs=null;function fb(){return Gs||(Gs=new Intl.DateTimeFormat().resolvedOptions().locale,Gs)}function cb(n){const e=n.indexOf("-u-");if(e===-1)return[n];{let t;const i=n.substring(0,e);try{t=Fr(n).resolvedOptions()}catch{t=Fr(i).resolvedOptions()}const{numberingSystem:s,calendar:l}=t;return[i,s,l]}}function db(n,e,t){return(t||e)&&(n+="-u",t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function pb(n){const e=[];for(let t=1;t<=12;t++){const i=He.utc(2016,t,1);e.push(n(i))}return e}function hb(n){const e=[];for(let t=1;t<=7;t++){const i=He.utc(2016,11,13+t);e.push(n(i))}return e}function Vl(n,e,t,i,s){const l=n.listingMode(t);return l==="error"?null:l==="en"?i(e):s(e)}function mb(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||new Intl.DateTimeFormat(n.intl).resolvedOptions().numberingSystem==="latn"}class gb{constructor(e,t,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:l,...o}=i;if(!t||Object.keys(o).length>0){const r={useGrouping:!1,...i};i.padTo>0&&(r.minimumIntegerDigits=i.padTo),this.inf=ab(e,r)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):pa(e,3);return yt(t,this.padTo)}}}class _b{constructor(e,t,i){this.opts=i;let s;if(e.zone.isUniversal){const o=-1*(e.offset/60),r=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&si.create(r).valid?(s=r,this.dt=e):(s="UTC",i.timeZoneName?this.dt=e:this.dt=e.offset===0?e:He.fromMillis(e.ts+e.offset*60*1e3))}else e.zone.type==="system"?this.dt=e:(this.dt=e,s=e.zone.name);const l={...this.opts};s&&(l.timeZone=s),this.dtf=Fr(t,l)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class bb{constructor(e,t,i){this.opts={style:"long",...i},!t&&eg()&&(this.rtf=ub(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):eb(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class ct{static fromOpts(e){return ct.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,i,s=!1){const l=e||Tt.defaultLocale,o=l||(s?"en-US":fb()),r=t||Tt.defaultNumberingSystem,a=i||Tt.defaultOutputCalendar;return new ct(o,r,a,l)}static resetCache(){Gs=null,Nr={},Rr={},Hr={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i}={}){return ct.create(e,t,i)}constructor(e,t,i,s){const[l,o,r]=cb(e);this.locale=l,this.numberingSystem=t||o||null,this.outputCalendar=i||r||null,this.intl=db(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=mb(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:ct.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1,i=!0){return Vl(this,e,i,lg,()=>{const s=t?{month:e,day:"numeric"}:{month:e},l=t?"format":"standalone";return this.monthsCache[l][e]||(this.monthsCache[l][e]=pb(o=>this.extract(o,s,"month"))),this.monthsCache[l][e]})}weekdays(e,t=!1,i=!0){return Vl(this,e,i,ag,()=>{const s=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},l=t?"format":"standalone";return this.weekdaysCache[l][e]||(this.weekdaysCache[l][e]=hb(o=>this.extract(o,s,"weekday"))),this.weekdaysCache[l][e]})}meridiems(e=!0){return Vl(this,void 0,e,()=>ug,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[He.utc(2016,11,13,9),He.utc(2016,11,13,19)].map(i=>this.extract(i,t,"dayperiod"))}return this.meridiemCache})}eras(e,t=!0){return Vl(this,e,t,fg,()=>{const i={era:e};return this.eraCache[e]||(this.eraCache[e]=[He.utc(-40,1,1),He.utc(2017,1,1)].map(s=>this.extract(s,i,"era"))),this.eraCache[e]})}extract(e,t,i){const s=this.dtFormatter(e,t),l=s.formatToParts(),o=l.find(r=>r.type.toLowerCase()===i);return o?o.value:null}numberFormatter(e={}){return new gb(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new _b(e,this.intl,t)}relFormatter(e={}){return new bb(this.intl,this.isEnglish(),e)}listFormatter(e={}){return rb(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}function As(...n){const e=n.reduce((t,i)=>t+i.source,"");return RegExp(`^${e}$`)}function Es(...n){return e=>n.reduce(([t,i,s],l)=>{const[o,r,a]=l(e,s);return[{...t,...o},r||i,a]},[{},null,1]).slice(0,2)}function Is(n,...e){if(n==null)return[null,null];for(const[t,i]of e){const s=t.exec(n);if(s)return i(s)}return[null,null]}function cg(...n){return(e,t)=>{const i={};let s;for(s=0;sh!==void 0&&(m||h&&f)?-h:h;return[{years:d(Ai(t)),months:d(Ai(i)),weeks:d(Ai(s)),days:d(Ai(l)),hours:d(Ai(o)),minutes:d(Ai(r)),seconds:d(Ai(a),a==="-0"),milliseconds:d(da(u),c)}]}const Eb={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function ba(n,e,t,i,s,l,o){const r={year:e.length===2?Lr(di(e)):di(e),month:sg.indexOf(t)+1,day:di(i),hour:di(s),minute:di(l)};return o&&(r.second=di(o)),n&&(r.weekday=n.length>3?og.indexOf(n)+1:rg.indexOf(n)+1),r}const Ib=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Pb(n){const[,e,t,i,s,l,o,r,a,u,f,c]=n,d=ba(e,s,i,t,l,o,r);let h;return a?h=Eb[a]:u?h=0:h=jo(f,c),[d,new Kt(h)]}function Lb(n){return n.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Nb=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Fb=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Rb=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function bu(n){const[,e,t,i,s,l,o,r]=n;return[ba(e,s,i,t,l,o,r),Kt.utcInstance]}function Hb(n){const[,e,t,i,s,l,o,r]=n;return[ba(e,r,t,i,s,l,o),Kt.utcInstance]}const jb=As(yb,_a),qb=As(kb,_a),Vb=As(wb,_a),zb=As(pg),mg=Es(Mb,Ps,Ml,Ol),Bb=Es(Sb,Ps,Ml,Ol),Ub=Es($b,Ps,Ml,Ol),Wb=Es(Ps,Ml,Ol);function Yb(n){return Is(n,[jb,mg],[qb,Bb],[Vb,Ub],[zb,Wb])}function Kb(n){return Is(Lb(n),[Ib,Pb])}function Jb(n){return Is(n,[Nb,bu],[Fb,bu],[Rb,Hb])}function Zb(n){return Is(n,[Db,Ab])}const Gb=Es(Ps);function Xb(n){return Is(n,[Ob,Gb])}const Qb=As(Cb,Tb),xb=As(hg),e1=Es(Ps,Ml,Ol);function t1(n){return Is(n,[Qb,mg],[xb,e1])}const n1="Invalid Duration",gg={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},i1={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...gg},hn=146097/400,us=146097/4800,s1={years:{quarters:4,months:12,weeks:hn/7,days:hn,hours:hn*24,minutes:hn*24*60,seconds:hn*24*60*60,milliseconds:hn*24*60*60*1e3},quarters:{months:3,weeks:hn/28,days:hn/4,hours:hn*24/4,minutes:hn*24*60/4,seconds:hn*24*60*60/4,milliseconds:hn*24*60*60*1e3/4},months:{weeks:us/7,days:us,hours:us*24,minutes:us*24*60,seconds:us*24*60*60,milliseconds:us*24*60*60*1e3},...gg},Fi=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],l1=Fi.slice(0).reverse();function Ei(n,e,t=!1){const i={values:t?e.values:{...n.values,...e.values||{}},loc:n.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||n.conversionAccuracy};return new et(i)}function o1(n){return n<0?Math.floor(n):Math.ceil(n)}function _g(n,e,t,i,s){const l=n[s][t],o=e[t]/l,r=Math.sign(o)===Math.sign(i[s]),a=!r&&i[s]!==0&&Math.abs(o)<=1?o1(o):Math.trunc(o);i[s]+=a,e[t]-=a*l}function r1(n,e){l1.reduce((t,i)=>Ge(e[i])?t:(t&&_g(n,e,t,e,i),i),null)}class et{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;this.values=e.values,this.loc=e.loc||ct.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t?s1:i1,this.isLuxonDuration=!0}static fromMillis(e,t){return et.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new vn(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new et({values:bo(e,et.normalizeUnit),loc:ct.fromObject(t),conversionAccuracy:t.conversionAccuracy})}static fromDurationLike(e){if(zi(e))return et.fromMillis(e);if(et.isDuration(e))return e;if(typeof e=="object")return et.fromObject(e);throw new vn(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[i]=Zb(e);return i?et.fromObject(i,t):et.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[i]=Xb(e);return i?et.fromObject(i,t):et.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new vn("need to specify a reason the Duration is invalid");const i=e instanceof En?e:new En(e,t);if(Tt.throwOnInvalid)throw new F0(i);return new et({invalid:i})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new Lm(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const i={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?tn.create(this.loc,i).formatDurationFromString(this,e):n1}toHuman(e={}){const t=Fi.map(i=>{const s=this.values[i];return Ge(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=pa(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e};const i=this.shiftTo("hours","minutes","seconds","milliseconds");let s=e.format==="basic"?"hhmm":"hh:mm";(!e.suppressSeconds||i.seconds!==0||i.milliseconds!==0)&&(s+=e.format==="basic"?"ss":":ss",(!e.suppressMilliseconds||i.milliseconds!==0)&&(s+=".SSS"));let l=i.toFormat(s);return e.includePrefix&&(l="T"+l),l}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=et.fromDurationLike(e),i={};for(const s of Fi)(Ss(t.values,s)||Ss(this.values,s))&&(i[s]=t.get(s)+this.get(s));return Ei(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const t=et.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const i of Object.keys(this.values))t[i]=ng(e(this.values[i],i));return Ei(this,{values:t},!0)}get(e){return this[et.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...bo(e,et.normalizeUnit)};return Ei(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t}),l={loc:s};return i&&(l.conversionAccuracy=i),Ei(this,l)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return r1(this.matrix,e),Ei(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>et.normalizeUnit(o));const t={},i={},s=this.toObject();let l;for(const o of Fi)if(e.indexOf(o)>=0){l=o;let r=0;for(const u in i)r+=this.matrix[u][o]*i[u],i[u]=0;zi(s[o])&&(r+=s[o]);const a=Math.trunc(r);t[o]=a,i[o]=(r*1e3-a*1e3)/1e3;for(const u in s)Fi.indexOf(u)>Fi.indexOf(o)&&_g(this.matrix,s,u,t,o)}else zi(s[o])&&(i[o]=s[o]);for(const o in i)i[o]!==0&&(t[l]+=o===l?i[o]:i[o]/this.matrix[l][o]);return Ei(this,{values:t},!0).normalize()}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Ei(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of Fi)if(!t(this.values[i],e.values[i]))return!1;return!0}}const Rs="Invalid Interval";function a1(n,e){return!n||!n.isValid?dt.invalid("missing or invalid start"):!e||!e.isValid?dt.invalid("missing or invalid end"):ee:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?dt.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(qs).filter(o=>this.contains(o)).sort(),i=[];let{s}=this,l=0;for(;s+this.e?this.e:o;i.push(dt.fromDateTimes(s,r)),s=r,l+=1}return i}splitBy(e){const t=et.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:i}=this,s=1,l;const o=[];for(;ia*s));l=+r>+this.e?this.e:r,o.push(dt.fromDateTimes(i,l)),i=l,s+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,i=this.e=i?null:dt.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return dt.fromDateTimes(t,i)}static merge(e){const[t,i]=e.sort((s,l)=>s.s-l.s).reduce(([s,l],o)=>l?l.overlaps(o)||l.abutsStart(o)?[s,l.union(o)]:[s.concat([l]),o]:[s,o],[[],null]);return i&&t.push(i),t}static xor(e){let t=null,i=0;const s=[],l=e.map(a=>[{time:a.s,type:"s"},{time:a.e,type:"e"}]),o=Array.prototype.concat(...l),r=o.sort((a,u)=>a.time-u.time);for(const a of r)i+=a.type==="s"?1:-1,i===1?t=a.time:(t&&+t!=+a.time&&s.push(dt.fromDateTimes(t,a.time)),t=null);return dt.merge(s)}difference(...e){return dt.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:Rs}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Rs}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Rs}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Rs}toFormat(e,{separator:t=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Rs}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):et.invalid(this.invalidReason)}mapEndpoints(e){return dt.fromDateTimes(e(this.s),e(this.e))}}class zl{static hasDST(e=Tt.defaultZone){const t=He.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return si.isValidZone(e)}static normalizeZone(e){return pi(e,Tt.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||ct.create(t,i,l)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:l="gregory"}={}){return(s||ct.create(t,i,l)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||ct.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||ct.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return ct.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return ct.create(t,null,"gregory").eras(e)}static features(){return{relative:eg()}}}function vu(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=t(e)-t(n);return Math.floor(et.fromMillis(i).as("days"))}function u1(n,e,t){const i=[["years",(r,a)=>a.year-r.year],["quarters",(r,a)=>a.quarter-r.quarter],["months",(r,a)=>a.month-r.month+(a.year-r.year)*12],["weeks",(r,a)=>{const u=vu(r,a);return(u-u%7)/7}],["days",vu]],s={};let l,o;for(const[r,a]of i)if(t.indexOf(r)>=0){l=r;let u=a(n,e);o=n.plus({[r]:u}),o>e?(n=n.plus({[r]:u-1}),u-=1):n=o,s[r]=u}return[n,s,o,l]}function f1(n,e,t,i){let[s,l,o,r]=u1(n,e,t);const a=e-s,u=t.filter(c=>["hours","minutes","seconds","milliseconds"].indexOf(c)>=0);u.length===0&&(o0?et.fromMillis(a,i).shiftTo(...u).plus(f):f}const va={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},yu={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},c1=va.hanidec.replace(/[\[|\]]/g,"").split("");function d1(n){let e=parseInt(n,10);if(isNaN(e)){e="";for(let t=0;t=l&&i<=o&&(e+=i-l)}}return parseInt(e,10)}else return e}function On({numberingSystem:n},e=""){return new RegExp(`${va[n||"latn"]}${e}`)}const p1="missing Intl.DateTimeFormat.formatToParts support";function tt(n,e=t=>t){return{regex:n,deser:([t])=>e(d1(t))}}const h1=String.fromCharCode(160),bg=`[ ${h1}]`,vg=new RegExp(bg,"g");function m1(n){return n.replace(/\./g,"\\.?").replace(vg,bg)}function ku(n){return n.replace(/\./g,"").replace(vg," ").toLowerCase()}function Dn(n,e){return n===null?null:{regex:RegExp(n.map(m1).join("|")),deser:([t])=>n.findIndex(i=>ku(t)===ku(i))+e}}function wu(n,e){return{regex:n,deser:([,t,i])=>jo(t,i),groups:e}}function er(n){return{regex:n,deser:([e])=>e}}function g1(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function _1(n,e){const t=On(e),i=On(e,"{2}"),s=On(e,"{3}"),l=On(e,"{4}"),o=On(e,"{6}"),r=On(e,"{1,2}"),a=On(e,"{1,3}"),u=On(e,"{1,6}"),f=On(e,"{1,9}"),c=On(e,"{2,4}"),d=On(e,"{4,6}"),h=b=>({regex:RegExp(g1(b.val)),deser:([y])=>y,literal:!0}),g=(b=>{if(n.literal)return h(b);switch(b.val){case"G":return Dn(e.eras("short",!1),0);case"GG":return Dn(e.eras("long",!1),0);case"y":return tt(u);case"yy":return tt(c,Lr);case"yyyy":return tt(l);case"yyyyy":return tt(d);case"yyyyyy":return tt(o);case"M":return tt(r);case"MM":return tt(i);case"MMM":return Dn(e.months("short",!0,!1),1);case"MMMM":return Dn(e.months("long",!0,!1),1);case"L":return tt(r);case"LL":return tt(i);case"LLL":return Dn(e.months("short",!1,!1),1);case"LLLL":return Dn(e.months("long",!1,!1),1);case"d":return tt(r);case"dd":return tt(i);case"o":return tt(a);case"ooo":return tt(s);case"HH":return tt(i);case"H":return tt(r);case"hh":return tt(i);case"h":return tt(r);case"mm":return tt(i);case"m":return tt(r);case"q":return tt(r);case"qq":return tt(i);case"s":return tt(r);case"ss":return tt(i);case"S":return tt(a);case"SSS":return tt(s);case"u":return er(f);case"uu":return er(r);case"uuu":return tt(t);case"a":return Dn(e.meridiems(),0);case"kkkk":return tt(l);case"kk":return tt(c,Lr);case"W":return tt(r);case"WW":return tt(i);case"E":case"c":return tt(t);case"EEE":return Dn(e.weekdays("short",!1,!1),1);case"EEEE":return Dn(e.weekdays("long",!1,!1),1);case"ccc":return Dn(e.weekdays("short",!0,!1),1);case"cccc":return Dn(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return wu(new RegExp(`([+-]${r.source})(?::(${i.source}))?`),2);case"ZZZ":return wu(new RegExp(`([+-]${r.source})(${i.source})?`),2);case"z":return er(/[a-z_+-/]{1,256}?/i);default:return h(b)}})(n)||{invalidReason:p1};return g.token=n,g}const b1={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function v1(n,e,t){const{type:i,value:s}=n;if(i==="literal")return{literal:!0,val:s};const l=t[i];let o=b1[i];if(typeof o=="object"&&(o=o[l]),o)return{literal:!1,val:o}}function y1(n){return[`^${n.map(t=>t.regex).reduce((t,i)=>`${t}(${i.source})`,"")}$`,n]}function k1(n,e,t){const i=n.match(e);if(i){const s={};let l=1;for(const o in t)if(Ss(t,o)){const r=t[o],a=r.groups?r.groups+1:1;!r.literal&&r.token&&(s[r.token.val[0]]=r.deser(i.slice(l,l+a))),l+=a}return[i,s]}else return[i,{}]}function w1(n){const e=l=>{switch(l){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let t=null,i;return Ge(n.z)||(t=si.create(n.z)),Ge(n.Z)||(t||(t=new Kt(n.Z)),i=n.Z),Ge(n.q)||(n.M=(n.q-1)*3+1),Ge(n.h)||(n.h<12&&n.a===1?n.h+=12:n.h===12&&n.a===0&&(n.h=0)),n.G===0&&n.y&&(n.y=-n.y),Ge(n.u)||(n.S=da(n.u)),[Object.keys(n).reduce((l,o)=>{const r=e(o);return r&&(l[r]=n[o]),l},{}),t,i]}let tr=null;function S1(){return tr||(tr=He.fromMillis(1555555555555)),tr}function $1(n,e){if(n.literal)return n;const t=tn.macroTokenToFormatOpts(n.val);if(!t)return n;const l=tn.create(e,t).formatDateTimeParts(S1()).map(o=>v1(o,e,t));return l.includes(void 0)?n:l}function C1(n,e){return Array.prototype.concat(...n.map(t=>$1(t,e)))}function yg(n,e,t){const i=C1(tn.parseFormat(t),n),s=i.map(o=>_1(o,n)),l=s.find(o=>o.invalidReason);if(l)return{input:e,tokens:i,invalidReason:l.invalidReason};{const[o,r]=y1(s),a=RegExp(o,"i"),[u,f]=k1(e,a,r),[c,d,h]=f?w1(f):[null,null,void 0];if(Ss(f,"a")&&Ss(f,"H"))throw new Zs("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:a,rawMatches:u,matches:f,result:c,zone:d,specificOffset:h}}}function T1(n,e,t){const{result:i,zone:s,specificOffset:l,invalidReason:o}=yg(n,e,t);return[i,s,l,o]}const kg=[0,31,59,90,120,151,181,212,243,273,304,334],wg=[0,31,60,91,121,152,182,213,244,274,305,335];function kn(n,e){return new En("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function Sg(n,e,t){const i=new Date(Date.UTC(n,e-1,t));n<100&&n>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return s===0?7:s}function $g(n,e,t){return t+(Cl(n)?wg:kg)[e-1]}function Cg(n,e){const t=Cl(n)?wg:kg,i=t.findIndex(l=>l_o(e)?(r=e+1,o=1):r=e,{weekYear:r,weekNumber:o,weekday:l,...qo(n)}}function Su(n){const{weekYear:e,weekNumber:t,weekday:i}=n,s=Sg(e,1,4),l=xs(e);let o=t*7+i-s-3,r;o<1?(r=e-1,o+=xs(r)):o>l?(r=e+1,o-=xs(e)):r=e;const{month:a,day:u}=Cg(r,o);return{year:r,month:a,day:u,...qo(n)}}function nr(n){const{year:e,month:t,day:i}=n,s=$g(e,t,i);return{year:e,ordinal:s,...qo(n)}}function $u(n){const{year:e,ordinal:t}=n,{month:i,day:s}=Cg(e,t);return{year:e,month:i,day:s,...qo(n)}}function M1(n){const e=Ho(n.weekYear),t=ii(n.weekNumber,1,_o(n.weekYear)),i=ii(n.weekday,1,7);return e?t?i?!1:kn("weekday",n.weekday):kn("week",n.week):kn("weekYear",n.weekYear)}function O1(n){const e=Ho(n.year),t=ii(n.ordinal,1,xs(n.year));return e?t?!1:kn("ordinal",n.ordinal):kn("year",n.year)}function Tg(n){const e=Ho(n.year),t=ii(n.month,1,12),i=ii(n.day,1,go(n.year,n.month));return e?t?i?!1:kn("day",n.day):kn("month",n.month):kn("year",n.year)}function Mg(n){const{hour:e,minute:t,second:i,millisecond:s}=n,l=ii(e,0,23)||e===24&&t===0&&i===0&&s===0,o=ii(t,0,59),r=ii(i,0,59),a=ii(s,0,999);return l?o?r?a?!1:kn("millisecond",s):kn("second",i):kn("minute",t):kn("hour",e)}const ir="Invalid DateTime",Cu=864e13;function Bl(n){return new En("unsupported zone",`the zone "${n.name}" is not supported`)}function sr(n){return n.weekData===null&&(n.weekData=jr(n.c)),n.weekData}function Hs(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new He({...t,...e,old:t})}function Og(n,e,t){let i=n-e*60*1e3;const s=t.offset(i);if(e===s)return[i,e];i-=(s-e)*60*1e3;const l=t.offset(i);return s===l?[i,s]:[n-Math.min(s,l)*60*1e3,Math.max(s,l)]}function Tu(n,e){n+=e*60*1e3;const t=new Date(n);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function co(n,e,t){return Og(ha(n),e,t)}function Mu(n,e){const t=n.o,i=n.c.year+Math.trunc(e.years),s=n.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,l={...n.c,year:i,month:s,day:Math.min(n.c.day,go(i,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=et.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),r=ha(l);let[a,u]=Og(r,t,n.zone);return o!==0&&(a+=o,u=n.zone.offset(a)),{ts:a,o:u}}function js(n,e,t,i,s,l){const{setZone:o,zone:r}=t;if(n&&Object.keys(n).length!==0){const a=e||r,u=He.fromObject(n,{...t,zone:a,specificOffset:l});return o?u:u.setZone(r)}else return He.invalid(new En("unparsable",`the input "${s}" can't be parsed as ${i}`))}function Ul(n,e,t=!0){return n.isValid?tn.create(ct.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function lr(n,e){const t=n.c.year>9999||n.c.year<0;let i="";return t&&n.c.year>=0&&(i+="+"),i+=yt(n.c.year,t?6:4),e?(i+="-",i+=yt(n.c.month),i+="-",i+=yt(n.c.day)):(i+=yt(n.c.month),i+=yt(n.c.day)),i}function Ou(n,e,t,i,s,l){let o=yt(n.c.hour);return e?(o+=":",o+=yt(n.c.minute),(n.c.second!==0||!t)&&(o+=":")):o+=yt(n.c.minute),(n.c.second!==0||!t)&&(o+=yt(n.c.second),(n.c.millisecond!==0||!i)&&(o+=".",o+=yt(n.c.millisecond,3))),s&&(n.isOffsetFixed&&n.offset===0&&!l?o+="Z":n.o<0?(o+="-",o+=yt(Math.trunc(-n.o/60)),o+=":",o+=yt(Math.trunc(-n.o%60))):(o+="+",o+=yt(Math.trunc(n.o/60)),o+=":",o+=yt(Math.trunc(n.o%60)))),l&&(o+="["+n.zone.ianaName+"]"),o}const Dg={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},D1={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},A1={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Ag=["year","month","day","hour","minute","second","millisecond"],E1=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],I1=["year","ordinal","hour","minute","second","millisecond"];function Du(n){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[n.toLowerCase()];if(!e)throw new Lm(n);return e}function Au(n,e){const t=pi(e.zone,Tt.defaultZone),i=ct.fromObject(e),s=Tt.now();let l,o;if(Ge(n.year))l=s;else{for(const u of Ag)Ge(n[u])&&(n[u]=Dg[u]);const r=Tg(n)||Mg(n);if(r)return He.invalid(r);const a=t.offset(s);[l,o]=co(n,a,t)}return new He({ts:l,zone:t,loc:i,o})}function Eu(n,e,t){const i=Ge(t.round)?!0:t.round,s=(o,r)=>(o=pa(o,i||t.calendary?0:2,!0),e.loc.clone(t).relFormatter(t).format(o,r)),l=o=>t.calendary?e.hasSame(n,o)?0:e.startOf(o).diff(n.startOf(o),o).get(o):e.diff(n,o).get(o);if(t.unit)return s(l(t.unit),t.unit);for(const o of t.units){const r=l(o);if(Math.abs(r)>=1)return s(r,o)}return s(n>e?-0:0,t.units[t.units.length-1])}function Iu(n){let e={},t;return n.length>0&&typeof n[n.length-1]=="object"?(e=n[n.length-1],t=Array.from(n).slice(0,n.length-1)):t=Array.from(n),[e,t]}class He{constructor(e){const t=e.zone||Tt.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new En("invalid input"):null)||(t.isValid?null:Bl(t));this.ts=Ge(e.ts)?Tt.now():e.ts;let s=null,l=null;if(!i)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,l]=[e.old.c,e.old.o];else{const r=t.offset(this.ts);s=Tu(this.ts,r),i=Number.isNaN(s.year)?new En("invalid input"):null,s=i?null:s,l=i?null:r}this._zone=t,this.loc=e.loc||ct.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=l,this.isLuxonDateTime=!0}static now(){return new He({})}static local(){const[e,t]=Iu(arguments),[i,s,l,o,r,a,u]=t;return Au({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static utc(){const[e,t]=Iu(arguments),[i,s,l,o,r,a,u]=t;return e.zone=Kt.utcInstance,Au({year:i,month:s,day:l,hour:o,minute:r,second:a,millisecond:u},e)}static fromJSDate(e,t={}){const i=q0(e)?e.valueOf():NaN;if(Number.isNaN(i))return He.invalid("invalid input");const s=pi(t.zone,Tt.defaultZone);return s.isValid?new He({ts:i,zone:s,loc:ct.fromObject(t)}):He.invalid(Bl(s))}static fromMillis(e,t={}){if(zi(e))return e<-Cu||e>Cu?He.invalid("Timestamp out of range"):new He({ts:e,zone:pi(t.zone,Tt.defaultZone),loc:ct.fromObject(t)});throw new vn(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(zi(e))return new He({ts:e*1e3,zone:pi(t.zone,Tt.defaultZone),loc:ct.fromObject(t)});throw new vn("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const i=pi(t.zone,Tt.defaultZone);if(!i.isValid)return He.invalid(Bl(i));const s=Tt.now(),l=Ge(t.specificOffset)?i.offset(s):t.specificOffset,o=bo(e,Du),r=!Ge(o.ordinal),a=!Ge(o.year),u=!Ge(o.month)||!Ge(o.day),f=a||u,c=o.weekYear||o.weekNumber,d=ct.fromObject(t);if((f||r)&&c)throw new Zs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&r)throw new Zs("Can't mix ordinal dates with month/day");const h=c||o.weekday&&!f;let m,g,b=Tu(s,l);h?(m=E1,g=D1,b=jr(b)):r?(m=I1,g=A1,b=nr(b)):(m=Ag,g=Dg);let y=!1;for(const A of m){const I=o[A];Ge(I)?y?o[A]=g[A]:o[A]=b[A]:y=!0}const k=h?M1(o):r?O1(o):Tg(o),$=k||Mg(o);if($)return He.invalid($);const C=h?Su(o):r?$u(o):o,[M,T]=co(C,l,i),D=new He({ts:M,zone:i,o:T,loc:d});return o.weekday&&f&&e.weekday!==D.weekday?He.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${D.toISO()}`):D}static fromISO(e,t={}){const[i,s]=Yb(e);return js(i,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[i,s]=Kb(e);return js(i,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[i,s]=Jb(e);return js(i,s,t,"HTTP",t)}static fromFormat(e,t,i={}){if(Ge(e)||Ge(t))throw new vn("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:l=null}=i,o=ct.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0}),[r,a,u,f]=T1(o,e,t);return f?He.invalid(f):js(r,a,i,`format ${t}`,e,u)}static fromString(e,t,i={}){return He.fromFormat(e,t,i)}static fromSQL(e,t={}){const[i,s]=t1(e);return js(i,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new vn("need to specify a reason the DateTime is invalid");const i=e instanceof En?e:new En(e,t);if(Tt.throwOnInvalid)throw new L0(i);return new He({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?sr(this).weekYear:NaN}get weekNumber(){return this.isValid?sr(this).weekNumber:NaN}get weekday(){return this.isValid?sr(this).weekday:NaN}get ordinal(){return this.isValid?nr(this.c).ordinal:NaN}get monthShort(){return this.isValid?zl.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?zl.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?zl.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?zl.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return Cl(this.year)}get daysInMonth(){return go(this.year,this.month)}get daysInYear(){return this.isValid?xs(this.year):NaN}get weeksInWeekYear(){return this.isValid?_o(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:i,calendar:s}=tn.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(Kt.instance(e),t)}toLocal(){return this.setZone(Tt.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if(e=pi(e,Tt.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||i){const l=e.offset(this.ts),o=this.toObject();[s]=co(o,l,e)}return Hs(this,{ts:s,zone:e})}else return He.invalid(Bl(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i});return Hs(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=bo(e,Du),i=!Ge(t.weekYear)||!Ge(t.weekNumber)||!Ge(t.weekday),s=!Ge(t.ordinal),l=!Ge(t.year),o=!Ge(t.month)||!Ge(t.day),r=l||o,a=t.weekYear||t.weekNumber;if((r||s)&&a)throw new Zs("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new Zs("Can't mix ordinal dates with month/day");let u;i?u=Su({...jr(this.c),...t}):Ge(t.ordinal)?(u={...this.toObject(),...t},Ge(t.day)&&(u.day=Math.min(go(u.year,u.month),u.day))):u=$u({...nr(this.c),...t});const[f,c]=co(u,this.o,this.zone);return Hs(this,{ts:f,o:c})}plus(e){if(!this.isValid)return this;const t=et.fromDurationLike(e);return Hs(this,Mu(this,t))}minus(e){if(!this.isValid)return this;const t=et.fromDurationLike(e).negate();return Hs(this,Mu(this,t))}startOf(e){if(!this.isValid)return this;const t={},i=et.normalizeUnit(e);switch(i){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0;break}if(i==="weeks"&&(t.weekday=1),i==="quarters"){const s=Math.ceil(this.month/3);t.month=(s-1)*3+1}return this.set(t)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,t={}){return this.isValid?tn.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):ir}toLocaleString(e=Pr,t={}){return this.isValid?tn.create(this.loc.clone(t),e).formatDateTime(this):ir}toLocaleParts(e={}){return this.isValid?tn.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:l=!1}={}){if(!this.isValid)return null;const o=e==="extended";let r=lr(this,o);return r+="T",r+=Ou(this,o,t,i,s,l),r}toISODate({format:e="extended"}={}){return this.isValid?lr(this,e==="extended"):null}toISOWeekDate(){return Ul(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:l=!1,format:o="extended"}={}){return this.isValid?(s?"T":"")+Ou(this,o==="extended",t,e,i,l):null}toRFC2822(){return Ul(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Ul(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?lr(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(t||e)&&(i&&(s+=" "),t?s+="z":e&&(s+="ZZ")),Ul(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():ir}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",i={}){if(!this.isValid||!e.isValid)return et.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},l=V0(t).map(et.normalizeUnit),o=e.valueOf()>this.valueOf(),r=o?this:e,a=o?e:this,u=f1(r,a,l,s);return o?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(He.now(),e,t)}until(e){return this.isValid?dt.fromDateTimes(this,e):this}hasSame(e,t){if(!this.isValid)return!1;const i=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t)<=i&&i<=s.endOf(t)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||He.fromObject({},{zone:this.zone}),i=e.padding?thist.valueOf(),Math.min)}static max(...e){if(!e.every(He.isDateTime))throw new vn("max requires all arguments be DateTimes");return uu(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){const{locale:s=null,numberingSystem:l=null}=i,o=ct.fromOpts({locale:s,numberingSystem:l,defaultToEN:!0});return yg(o,e,t)}static fromStringExplain(e,t,i={}){return He.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return Pr}static get DATE_MED(){return Nm}static get DATE_MED_WITH_WEEKDAY(){return R0}static get DATE_FULL(){return Fm}static get DATE_HUGE(){return Rm}static get TIME_SIMPLE(){return Hm}static get TIME_WITH_SECONDS(){return jm}static get TIME_WITH_SHORT_OFFSET(){return qm}static get TIME_WITH_LONG_OFFSET(){return Vm}static get TIME_24_SIMPLE(){return zm}static get TIME_24_WITH_SECONDS(){return Bm}static get TIME_24_WITH_SHORT_OFFSET(){return Um}static get TIME_24_WITH_LONG_OFFSET(){return Wm}static get DATETIME_SHORT(){return Ym}static get DATETIME_SHORT_WITH_SECONDS(){return Km}static get DATETIME_MED(){return Jm}static get DATETIME_MED_WITH_SECONDS(){return Zm}static get DATETIME_MED_WITH_WEEKDAY(){return H0}static get DATETIME_FULL(){return Gm}static get DATETIME_FULL_WITH_SECONDS(){return Xm}static get DATETIME_HUGE(){return Qm}static get DATETIME_HUGE_WITH_SECONDS(){return xm}}function qs(n){if(He.isDateTime(n))return n;if(n&&n.valueOf&&zi(n.valueOf()))return He.fromJSDate(n);if(n&&typeof n=="object")return He.fromObject(n);throw new vn(`Unknown datetime argument: ${n}, of type ${typeof n}`)}class W{static isObject(e){return e!==null&&typeof e=="object"&&e.constructor===Object}static isEmpty(e){return e===""||e===null||e==="00000000-0000-0000-0000-000000000000"||e==="0001-01-01 00:00:00.000Z"||e==="0001-01-01"||typeof e>"u"||Array.isArray(e)&&e.length===0||W.isObject(e)&&Object.keys(e).length===0}static isInput(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return t==="input"||t==="select"||t==="textarea"||e.isContentEditable}static isFocusable(e){let t=e&&e.tagName?e.tagName.toLowerCase():"";return W.isInput(e)||t==="button"||t==="a"||t==="details"||e.tabIndex>=0}static hasNonEmptyProps(e){for(let t in e)if(!W.isEmpty(e[t]))return!0;return!1}static toArray(e,t=!1){return Array.isArray(e)?e:(t||!W.isEmpty(e))&&typeof e<"u"?[e]:[]}static inArray(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t)return!0;return!1}static removeByValue(e,t){e=Array.isArray(e)?e:[];for(let i=e.length-1;i>=0;i--)if(e[i]==t){e.splice(i,1);break}}static pushUnique(e,t){W.inArray(e,t)||e.push(t)}static findByKey(e,t,i){e=Array.isArray(e)?e:[];for(let s in e)if(e[s][t]==i)return e[s];return null}static groupByKey(e,t){e=Array.isArray(e)?e:[];const i={};for(let s in e)i[e[s][t]]=i[e[s][t]]||[],i[e[s][t]].push(e[s]);return i}static removeByKey(e,t,i){for(let s in e)if(e[s][t]==i){e.splice(s,1);break}}static pushOrReplaceByKey(e,t,i="id"){for(let s=e.length-1;s>=0;s--)if(e[s][i]==t[i]){e[s]=t;return}e.push(t)}static filterDuplicatesByKey(e,t="id"){e=Array.isArray(e)?e:[];const i={};for(const s of e)i[s[t]]=s;return Object.values(i)}static filterRedactedProps(e,t="******"){const i=JSON.parse(JSON.stringify(e||{}));for(let s in i)typeof i[s]=="object"&&i[s]!==null?i[s]=W.filterRedactedProps(i[s],t):i[s]===t&&delete i[s];return i}static getNestedVal(e,t,i=null,s="."){let l=e||{},o=(t||"").split(s);for(const r of o){if(!W.isObject(l)&&!Array.isArray(l)||typeof l[r]>"u")return i;l=l[r]}return l}static setByPath(e,t,i,s="."){if(e===null||typeof e!="object"){console.warn("setByPath: data not an object or array.");return}let l=e,o=t.split(s),r=o.pop();for(const a of o)(!W.isObject(l)&&!Array.isArray(l)||!W.isObject(l[a])&&!Array.isArray(l[a]))&&(l[a]={}),l=l[a];l[r]=i}static deleteByPath(e,t,i="."){let s=e||{},l=(t||"").split(i),o=l.pop();for(const r of l)(!W.isObject(s)&&!Array.isArray(s)||!W.isObject(s[r])&&!Array.isArray(s[r]))&&(s[r]={}),s=s[r];Array.isArray(s)?s.splice(o,1):W.isObject(s)&&delete s[o],l.length>0&&(Array.isArray(s)&&!s.length||W.isObject(s)&&!Object.keys(s).length)&&(Array.isArray(e)&&e.length>0||W.isObject(e)&&Object.keys(e).length>0)&&W.deleteByPath(e,l.join(i),i)}static randomString(e){e=e||10;let t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let s=0;s{console.warn("Failed to copy.",i)})}static downloadJson(e,t){const i="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(e,null,2)),s=document.createElement("a");s.setAttribute("href",i),s.setAttribute("download",t+".json"),s.click(),s.remove()}static getJWTPayload(e){const t=(e||"").split(".")[1]||"";if(t==="")return{};try{const i=decodeURIComponent(atob(t));return JSON.parse(i)||{}}catch(i){console.warn("Failed to parse JWT payload data.",i)}return{}}static hasImageExtension(e){return/\.jpg|\.jpeg|\.png|\.svg|\.gif|\.jfif|\.webp|\.avif$/.test(e)}static generateThumb(e,t=100,i=100){return new Promise(s=>{let l=new FileReader;l.onload=function(o){let r=new Image;r.onload=function(){let a=document.createElement("canvas"),u=a.getContext("2d"),f=r.width,c=r.height;return a.width=t,a.height=i,u.drawImage(r,f>c?(f-c)/2:0,0,f>c?c:f,f>c?c:f,0,0,t,i),s(a.toDataURL(e.type))},r.src=o.target.result},l.readAsDataURL(e)})}static addValueToFormData(e,t,i){if(!(typeof i>"u"))if(W.isEmpty(i))e.append(t,"");else if(Array.isArray(i))for(const s of i)W.addValueToFormData(e,t,s);else i instanceof File?e.append(t,i):i instanceof Date?e.append(t,i.toISOString()):W.isObject(i)?e.append(t,JSON.stringify(i)):e.append(t,""+i)}static defaultFlatpickrOptions(){return{dateFormat:"Y-m-d H:i:S",disableMobile:!0,allowInput:!0,enableTime:!0,time_24hr:!0,locale:{firstDayOfWeek:1}}}static dummyCollectionRecord(e){var s,l,o,r,a;const t=(e==null?void 0:e.schema)||[],i={id:"RECORD_ID",collectionId:e==null?void 0:e.id,collectionName:e==null?void 0:e.name,created:"2022-01-01 01:00:00.123Z",updated:"2022-01-01 23:59:59.456Z"};e!=null&&e.isAuth&&(i.username="username123",i.verified=!1,i.emailVisibility=!0,i.email="test@example.com");for(const u of t){let f=null;u.type==="number"?f=123:u.type==="date"?f="2022-01-01 10:00:00.123Z":u.type==="bool"?f=!0:u.type==="email"?f="test@example.com":u.type==="url"?f="https://example.com":u.type==="json"?f="JSON":u.type==="file"?(f="filename.jpg",((s=u.options)==null?void 0:s.maxSelect)!==1&&(f=[f])):u.type==="select"?(f=(o=(l=u.options)==null?void 0:l.values)==null?void 0:o[0],((r=u.options)==null?void 0:r.maxSelect)!==1&&(f=[f])):u.type==="relation"?(f="RELATION_RECORD_ID",((a=u.options)==null?void 0:a.maxSelect)!==1&&(f=[f])):f="test",i[u.name]=f}return i}static dummyCollectionSchemaData(e){var s,l,o,r;const t=(e==null?void 0:e.schema)||[],i={};for(const a of t){let u=null;if(a.type==="number")u=123;else if(a.type==="date")u="2022-01-01 10:00:00.123Z";else if(a.type==="bool")u=!0;else if(a.type==="email")u="test@example.com";else if(a.type==="url")u="https://example.com";else if(a.type==="json")u="JSON";else{if(a.type==="file")continue;a.type==="select"?(u=(l=(s=a.options)==null?void 0:s.values)==null?void 0:l[0],((o=a.options)==null?void 0:o.maxSelect)!==1&&(u=[u])):a.type==="relation"?(u="RELATION_RECORD_ID",((r=a.options)==null?void 0:r.maxSelect)!==1&&(u=[u])):u="test"}i[a.name]=u}return i}static getCollectionTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"auth":return"ri-group-line";case"single":return"ri-file-list-2-line";default:return"ri-folder-2-line"}}static getFieldTypeIcon(e){switch(e==null?void 0:e.toLowerCase()){case"primary":return"ri-key-line";case"text":return"ri-text";case"number":return"ri-hashtag";case"date":return"ri-calendar-line";case"bool":return"ri-toggle-line";case"email":return"ri-mail-line";case"url":return"ri-link";case"select":return"ri-list-check";case"json":return"ri-braces-line";case"file":return"ri-image-line";case"relation":return"ri-mind-map";case"user":return"ri-user-line";default:return"ri-star-s-line"}}static getFieldValueType(e){var t;switch(e==null?void 0:e.type){case"bool":return"Boolean";case"number":return"Number";case"file":return"File";case"select":case"relation":return((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)===1?"String":"Array";default:return"String"}}static zeroDefaultStr(e){var t;return(e==null?void 0:e.type)==="number"?"0":(e==null?void 0:e.type)==="bool"?"false":["select","relation","file"].includes(e==null?void 0:e.type)&&((t=e==null?void 0:e.options)==null?void 0:t.maxSelect)!=1?"[]":'""'}static getApiExampleUrl(e){return(window.location.href.substring(0,window.location.href.indexOf("/_"))||e||"/").replace("//localhost","//127.0.0.1")}static hasCollectionChanges(e,t,i=!1){if(e=e||{},t=t||{},e.id!=t.id)return!0;for(let u in e)if(u!=="schema"&&JSON.stringify(e[u])!==JSON.stringify(t[u]))return!0;const s=Array.isArray(e.schema)?e.schema:[],l=Array.isArray(t.schema)?t.schema:[],o=s.filter(u=>(u==null?void 0:u.id)&&!W.findByKey(l,"id",u.id)),r=l.filter(u=>(u==null?void 0:u.id)&&!W.findByKey(s,"id",u.id)),a=l.filter(u=>{const f=W.isObject(u)&&W.findByKey(s,"id",u.id);if(!f)return!1;for(let c in f)if(JSON.stringify(u[c])!=JSON.stringify(f[c]))return!0;return!1});return!!(r.length||a.length||i&&o.length)}static sortCollections(e=[]){const t=[],i=[],s=[];for(const l of e)l.type=="auth"?t.push(l):l.type=="single"?i.push(l):s.push(l);return[].concat(t,i,s)}static yieldToMain(){return new Promise(e=>{setTimeout(e,0)})}}const Vo=Mn([]);function Eg(n,e=4e3){return zo(n,"info",e)}function Lt(n,e=3e3){return zo(n,"success",e)}function cl(n,e=4500){return zo(n,"error",e)}function P1(n,e=4500){return zo(n,"warning",e)}function zo(n,e,t){t=t||4e3;const i={message:n,type:e,duration:t,timeout:setTimeout(()=>{Ig(i)},t)};Vo.update(s=>(ya(s,i.message),W.pushOrReplaceByKey(s,i,"message"),s))}function Ig(n){Vo.update(e=>(ya(e,n),e))}function Pg(){Vo.update(n=>{for(let e of n)ya(n,e);return[]})}function ya(n,e){let t;typeof e=="string"?t=W.findByKey(n,"message",e):t=e,t&&(clearTimeout(t.timeout),W.removeByKey(n,"message",t.message))}const wi=Mn({});function Fn(n){wi.set(n||{})}function $s(n){wi.update(e=>(W.deleteByPath(e,n),e))}const ka=Mn({});function qr(n){ka.set(n||{})}ca.prototype.logout=function(n=!0){this.authStore.clear(),n&&ki("/login")};ca.prototype.errorResponseHandler=function(n,e=!0,t=""){if(!n||!(n instanceof Error)||n.isAbort)return;const i=(n==null?void 0:n.status)<<0||400,s=(n==null?void 0:n.data)||{};if(e&&i!==404){let l=s.message||n.message||t;l&&cl(l)}if(W.isEmpty(s.data)||Fn(s.data),i===401)return this.cancelAllRequests(),this.logout();if(i===403)return this.cancelAllRequests(),ki("/")};class L1 extends Im{save(e,t){super.save(e,t),t instanceof Yi&&qr(t)}clear(){super.clear(),qr(null)}}const de=new ca("../",new L1("pb_admin_auth"));de.authStore.model instanceof Yi&&qr(de.authStore.model);function N1(n){let e,t,i,s,l,o,r,a;const u=n[3].default,f=Ot(u,n,n[2],null);return{c(){e=v("div"),t=v("main"),f&&f.c(),i=O(),s=v("footer"),l=v("a"),o=v("span"),o.textContent="PocketBase v0.11.0",p(t,"class","page-content"),p(o,"class","txt"),p(l,"href","https://github.com/pocketbase/pocketbase/releases"),p(l,"class","inline-flex flex-gap-5"),p(l,"target","_blank"),p(l,"rel","noopener noreferrer"),p(l,"title","Releases"),p(s,"class","page-footer"),p(e,"class",r="page-wrapper "+n[1]),ne(e,"center-content",n[0])},m(c,d){S(c,e,d),_(e,t),f&&f.m(t,null),_(e,i),_(e,s),_(s,l),_(l,o),a=!0},p(c,[d]){f&&f.p&&(!a||d&4)&&At(f,u,c,c[2],a?Dt(u,c[2],d,null):Et(c[2]),null),(!a||d&2&&r!==(r="page-wrapper "+c[1]))&&p(e,"class",r),(!a||d&3)&&ne(e,"center-content",c[0])},i(c){a||(E(f,c),a=!0)},o(c){P(f,c),a=!1},d(c){c&&w(e),f&&f.d(c)}}}function F1(n,e,t){let{$$slots:i={},$$scope:s}=e,{center:l=!1}=e,{class:o=""}=e;return n.$$set=r=>{"center"in r&&t(0,l=r.center),"class"in r&&t(1,o=r.class),"$$scope"in r&&t(2,s=r.$$scope)},[l,o,s,i]}class pn extends ke{constructor(e){super(),ye(this,e,F1,N1,be,{center:0,class:1})}}function Pu(n){let e,t,i;return{c(){e=v("div"),e.innerHTML=``,t=O(),i=v("div"),p(e,"class","block txt-center m-b-lg"),p(i,"class","clearfix")},m(s,l){S(s,e,l),S(s,t,l),S(s,i,l)},d(s){s&&w(e),s&&w(t),s&&w(i)}}}function R1(n){let e,t,i,s=!n[0]&&Pu();const l=n[1].default,o=Ot(l,n,n[2],null);return{c(){e=v("div"),s&&s.c(),t=O(),o&&o.c(),p(e,"class","wrapper wrapper-sm m-b-xl panel-wrapper svelte-lxxzfu")},m(r,a){S(r,e,a),s&&s.m(e,null),_(e,t),o&&o.m(e,null),i=!0},p(r,a){r[0]?s&&(s.d(1),s=null):s||(s=Pu(),s.c(),s.m(e,t)),o&&o.p&&(!i||a&4)&&At(o,l,r,r[2],i?Dt(l,r[2],a,null):Et(r[2]),null)},i(r){i||(E(o,r),i=!0)},o(r){P(o,r),i=!1},d(r){r&&w(e),s&&s.d(),o&&o.d(r)}}}function H1(n){let e,t;return e=new pn({props:{class:"full-page",center:!0,$$slots:{default:[R1]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&5&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function j1(n,e,t){let{$$slots:i={},$$scope:s}=e,{nobranding:l=!1}=e;return n.$$set=o=>{"nobranding"in o&&t(0,l=o.nobranding),"$$scope"in o&&t(2,s=o.$$scope)},[l,i,s]}class Lg extends ke{constructor(e){super(),ye(this,e,j1,H1,be,{nobranding:0})}}function Lu(n,e,t){const i=n.slice();return i[11]=e[t],i}const q1=n=>({}),Nu=n=>({uniqueId:n[3]});function V1(n){let e=(n[11]||vo)+"",t;return{c(){t=B(e)},m(i,s){S(i,t,s)},p(i,s){s&4&&e!==(e=(i[11]||vo)+"")&&re(t,e)},d(i){i&&w(t)}}}function z1(n){var s,l;let e,t=(((s=n[11])==null?void 0:s.message)||((l=n[11])==null?void 0:l.code)||vo)+"",i;return{c(){e=v("pre"),i=B(t)},m(o,r){S(o,e,r),_(e,i)},p(o,r){var a,u;r&4&&t!==(t=(((a=o[11])==null?void 0:a.message)||((u=o[11])==null?void 0:u.code)||vo)+"")&&re(i,t)},d(o){o&&w(e)}}}function Fu(n){let e,t;function i(o,r){return typeof o[11]=="object"?z1:V1}let s=i(n),l=s(n);return{c(){e=v("div"),l.c(),t=O(),p(e,"class","help-block help-block-error")},m(o,r){S(o,e,r),l.m(e,null),_(e,t)},p(o,r){s===(s=i(o))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,t)))},d(o){o&&w(e),l.d()}}}function B1(n){let e,t,i,s,l;const o=n[7].default,r=Ot(o,n,n[6],Nu);let a=n[2],u=[];for(let f=0;ft(5,i=m));let{$$slots:s={},$$scope:l}=e;const o="field_"+W.randomString(7);let{name:r=""}=e,{class:a=void 0}=e,u,f=[];function c(){$s(r)}cn(()=>(u.addEventListener("input",c),u.addEventListener("change",c),()=>{u.removeEventListener("input",c),u.removeEventListener("change",c)}));function d(m){Ve.call(this,n,m)}function h(m){le[m?"unshift":"push"](()=>{u=m,t(1,u)})}return n.$$set=m=>{"name"in m&&t(4,r=m.name),"class"in m&&t(0,a=m.class),"$$scope"in m&&t(6,l=m.$$scope)},n.$$.update=()=>{n.$$.dirty&48&&t(2,f=W.toArray(W.getNestedVal(i,r)))},[a,u,f,o,r,i,l,s,d,h]}class ge extends ke{constructor(e){super(),ye(this,e,U1,B1,be,{name:4,class:0})}}function W1(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Email"),s=O(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","email"),p(l,"autocomplete","off"),p(l,"id",o=n[9]),l.required=!0,l.autofocus=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0]),l.focus(),r||(a=K(l,"input",n[5]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&1&&l.value!==u[0]&&ce(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function Y1(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Password"),s=O(),l=v("input"),r=O(),a=v("div"),a.textContent="Minimum 10 characters.",p(e,"for",i=n[9]),p(l,"type","password"),p(l,"autocomplete","new-password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0,p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),ce(l,n[1]),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[6]),u=!0)},p(c,d){d&512&&i!==(i=c[9])&&p(e,"for",i),d&512&&o!==(o=c[9])&&p(l,"id",o),d&2&&l.value!==c[1]&&ce(l,c[1])},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function K1(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Password confirm"),s=O(),l=v("input"),p(e,"for",i=n[9]),p(l,"type","password"),p(l,"minlength","10"),p(l,"id",o=n[9]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[2]),r||(a=K(l,"input",n[7]),r=!0)},p(u,f){f&512&&i!==(i=u[9])&&p(e,"for",i),f&512&&o!==(o=u[9])&&p(l,"id",o),f&4&&l.value!==u[2]&&ce(l,u[2])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function J1(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;return s=new ge({props:{class:"form-field required",name:"email",$$slots:{default:[W1,({uniqueId:m})=>({9:m}),({uniqueId:m})=>m?512:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:"password",$$slots:{default:[Y1,({uniqueId:m})=>({9:m}),({uniqueId:m})=>m?512:0]},$$scope:{ctx:n}}}),a=new ge({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[K1,({uniqueId:m})=>({9:m}),({uniqueId:m})=>m?512:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

Create your first admin account in order to continue

",i=O(),j(s.$$.fragment),l=O(),j(o.$$.fragment),r=O(),j(a.$$.fragment),u=O(),f=v("button"),f.innerHTML=`Create and login + `,p(t,"class","content txt-center m-b-base"),p(f,"type","submit"),p(f,"class","btn btn-lg btn-block btn-next"),ne(f,"btn-disabled",n[3]),ne(f,"btn-loading",n[3]),p(e,"class","block"),p(e,"autocomplete","off")},m(m,g){S(m,e,g),_(e,t),_(e,i),R(s,e,null),_(e,l),R(o,e,null),_(e,r),R(a,e,null),_(e,u),_(e,f),c=!0,d||(h=K(e,"submit",ut(n[4])),d=!0)},p(m,[g]){const b={};g&1537&&(b.$$scope={dirty:g,ctx:m}),s.$set(b);const y={};g&1538&&(y.$$scope={dirty:g,ctx:m}),o.$set(y);const k={};g&1540&&(k.$$scope={dirty:g,ctx:m}),a.$set(k),(!c||g&8)&&ne(f,"btn-disabled",m[3]),(!c||g&8)&&ne(f,"btn-loading",m[3])},i(m){c||(E(s.$$.fragment,m),E(o.$$.fragment,m),E(a.$$.fragment,m),c=!0)},o(m){P(s.$$.fragment,m),P(o.$$.fragment,m),P(a.$$.fragment,m),c=!1},d(m){m&&w(e),H(s),H(o),H(a),d=!1,h()}}}function Z1(n,e,t){const i=It();let s="",l="",o="",r=!1;async function a(){if(!r){t(3,r=!0);try{await de.admins.create({email:s,password:l,passwordConfirm:o}),await de.admins.authWithPassword(s,l),i("submit")}catch(d){de.errorResponseHandler(d)}t(3,r=!1)}}function u(){s=this.value,t(0,s)}function f(){l=this.value,t(1,l)}function c(){o=this.value,t(2,o)}return[s,l,o,r,a,u,f,c]}class G1 extends ke{constructor(e){super(),ye(this,e,Z1,J1,be,{})}}function Ru(n){let e,t;return e=new Lg({props:{$$slots:{default:[X1]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s&9&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function X1(n){let e,t;return e=new G1({}),e.$on("submit",n[1]),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p:ee,i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function Q1(n){let e,t,i=n[0]&&Ru(n);return{c(){i&&i.c(),e=Ae()},m(s,l){i&&i.m(s,l),S(s,e,l),t=!0},p(s,[l]){s[0]?i?(i.p(s,l),l&1&&E(i,1)):(i=Ru(s),i.c(),E(i,1),i.m(e.parentNode,e)):i&&(pe(),P(i,1,1,()=>{i=null}),he())},i(s){t||(E(i),t=!0)},o(s){P(i),t=!1},d(s){i&&i.d(s),s&&w(e)}}}function x1(n,e,t){let i=!1;s();function s(){if(t(0,i=!1),new URLSearchParams(window.location.search).has("installer")){de.logout(!1),t(0,i=!0);return}de.authStore.isValid?ki("/collections"):de.logout()}return[i,async()=>{t(0,i=!1),await Tn(),window.location.search=""}]}class ev extends ke{constructor(e){super(),ye(this,e,x1,Q1,be,{})}}const mt=Mn(""),yo=Mn(""),Cs=Mn(!1);function Bo(n){const e=n-1;return e*e*e+1}function ko(n,{delay:e=0,duration:t=400,easing:i=kl}={}){const s=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:i,css:l=>`opacity: ${l*s}`}}function Sn(n,{delay:e=0,duration:t=400,easing:i=Bo,x:s=0,y:l=0,opacity:o=0}={}){const r=getComputedStyle(n),a=+r.opacity,u=r.transform==="none"?"":r.transform,f=a*(1-o);return{delay:e,duration:t,easing:i,css:(c,d)=>` transform: ${u} translate(${(1-c)*s}px, ${(1-c)*l}px); - opacity: ${a-f*d}`}}function St(n,{delay:e=0,duration:t=400,easing:i=zo}={}){const s=getComputedStyle(n),l=+s.opacity,o=parseFloat(s.height),r=parseFloat(s.paddingTop),a=parseFloat(s.paddingBottom),u=parseFloat(s.marginTop),f=parseFloat(s.marginBottom),c=parseFloat(s.borderTopWidth),d=parseFloat(s.borderBottomWidth);return{delay:e,duration:t,easing:i,css:h=>`overflow: hidden;opacity: ${Math.min(h*20,1)*l};height: ${h*o}px;padding-top: ${h*r}px;padding-bottom: ${h*a}px;margin-top: ${h*u}px;margin-bottom: ${h*f}px;border-top-width: ${h*c}px;border-bottom-width: ${h*d}px;`}}function $t(n,{delay:e=0,duration:t=400,easing:i=zo,start:s=0,opacity:l=0}={}){const o=getComputedStyle(n),r=+o.opacity,a=o.transform==="none"?"":o.transform,u=1-s,f=r*(1-l);return{delay:e,duration:t,easing:i,css:(c,d)=>` + opacity: ${a-f*d}`}}function St(n,{delay:e=0,duration:t=400,easing:i=Bo}={}){const s=getComputedStyle(n),l=+s.opacity,o=parseFloat(s.height),r=parseFloat(s.paddingTop),a=parseFloat(s.paddingBottom),u=parseFloat(s.marginTop),f=parseFloat(s.marginBottom),c=parseFloat(s.borderTopWidth),d=parseFloat(s.borderBottomWidth);return{delay:e,duration:t,easing:i,css:h=>`overflow: hidden;opacity: ${Math.min(h*20,1)*l};height: ${h*o}px;padding-top: ${h*r}px;padding-bottom: ${h*a}px;margin-top: ${h*u}px;margin-bottom: ${h*f}px;border-top-width: ${h*c}px;border-bottom-width: ${h*d}px;`}}function $t(n,{delay:e=0,duration:t=400,easing:i=Bo,start:s=0,opacity:l=0}={}){const o=getComputedStyle(n),r=+o.opacity,a=o.transform==="none"?"":o.transform,u=1-s,f=r*(1-l);return{delay:e,duration:t,easing:i,css:(c,d)=>` transform: ${a} scale(${1-u*d}); opacity: ${r-f*d} - `}}function ev(n){let e,t,i,s;return{c(){e=v("input"),p(e,"type","text"),p(e,"id",n[8]),p(e,"placeholder",t=n[0]||n[1])},m(l,o){S(l,e,o),n[13](e),ce(e,n[7]),i||(s=K(e,"input",n[14]),i=!0)},p(l,o){o&3&&t!==(t=l[0]||l[1])&&p(e,"placeholder",t),o&128&&e.value!==l[7]&&ce(e,l[7])},i:te,o:te,d(l){l&&w(e),n[13](null),i=!1,s()}}}function tv(n){let e,t,i,s;function l(a){n[12](a)}var o=n[4];function r(a){let u={id:a[8],singleLine:!0,disableRequestKeys:!0,disableIndirectCollectionsKeys:!0,extraAutocompleteKeys:a[3],baseCollection:a[2],placeholder:a[0]||a[1]};return a[7]!==void 0&&(u.value=a[7]),{props:u}}return o&&(e=jt(o,r(n)),le.push(()=>_e(e,"value",l)),e.$on("submit",n[10])),{c(){e&&j(e.$$.fragment),i=Ee()},m(a,u){e&&R(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u&8&&(f.extraAutocompleteKeys=a[3]),u&4&&(f.baseCollection=a[2]),u&3&&(f.placeholder=a[0]||a[1]),!t&&u&128&&(t=!0,f.value=a[7],ve(()=>t=!1)),o!==(o=a[4])){if(e){pe();const c=e;P(c.$$.fragment,1,0,()=>{H(c,1)}),he()}o?(e=jt(o,r(a)),le.push(()=>_e(e,"value",l)),e.$on("submit",a[10]),j(e.$$.fragment),E(e.$$.fragment,1),R(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&E(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&H(e,a)}}}function Ru(n){let e,t,i,s,l,o,r=n[7]!==n[0]&&Hu();return{c(){r&&r.c(),e=O(),t=v("button"),t.innerHTML='Clear',p(t,"type","button"),p(t,"class","btn btn-secondary btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(a,u){r&&r.m(a,u),S(a,e,u),S(a,t,u),s=!0,l||(o=K(t,"click",n[15]),l=!0)},p(a,u){a[7]!==a[0]?r?u&129&&E(r,1):(r=Hu(),r.c(),E(r,1),r.m(e.parentNode,e)):r&&(pe(),P(r,1,1,()=>{r=null}),he())},i(a){s||(E(r),a&&xe(()=>{i||(i=je(t,Sn,{duration:150,x:5},!0)),i.run(1)}),s=!0)},o(a){P(r),a&&(i||(i=je(t,Sn,{duration:150,x:5},!1)),i.run(0)),s=!1},d(a){r&&r.d(a),a&&w(e),a&&w(t),a&&i&&i.end(),l=!1,o()}}}function Hu(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Search',p(e,"type","submit"),p(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&xe(()=>{t||(t=je(e,Sn,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=je(e,Sn,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function nv(n){let e,t,i,s,l,o,r,a,u,f,c;const d=[tv,ev],h=[];function m(g,y){return g[4]&&!g[5]?0:1}o=m(n),r=h[o]=d[o](n);let b=(n[0].length||n[7].length)&&Ru(n);return{c(){e=v("div"),t=v("form"),i=v("label"),s=v("i"),l=O(),r.c(),a=O(),b&&b.c(),p(s,"class","ri-search-line"),p(i,"for",n[8]),p(i,"class","m-l-10 txt-xl"),p(t,"class","searchbar"),p(e,"class","searchbar-wrapper")},m(g,y){S(g,e,y),_(e,t),_(t,i),_(i,s),_(t,l),h[o].m(t,null),_(t,a),b&&b.m(t,null),u=!0,f||(c=[K(t,"click",Yn(n[11])),K(t,"submit",ut(n[10]))],f=!0)},p(g,[y]){let k=o;o=m(g),o===k?h[o].p(g,y):(pe(),P(h[k],1,1,()=>{h[k]=null}),he(),r=h[o],r?r.p(g,y):(r=h[o]=d[o](g),r.c()),E(r,1),r.m(t,a)),g[0].length||g[7].length?b?(b.p(g,y),y&129&&E(b,1)):(b=Ru(g),b.c(),E(b,1),b.m(t,null)):b&&(pe(),P(b,1,1,()=>{b=null}),he())},i(g){u||(E(r),E(b),u=!0)},o(g){P(r),P(b),u=!1},d(g){g&&w(e),h[o].d(),b&&b.d(),f=!1,Pe(c)}}}function iv(n,e,t){const i=It(),s="search_"+W.randomString(7);let{value:l=""}=e,{placeholder:o='Search filter, ex. created > "2022-01-01"...'}=e,{autocompleteCollection:r=new Pn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function h(M=!0){t(7,d=""),M&&(c==null||c.focus()),i("clear")}function m(){t(0,l=d),i("submit",l)}async function b(){u||f||(t(5,f=!0),t(4,u=(await st(()=>import("./FilterAutocompleteInput.cea6a97d.js"),["./FilterAutocompleteInput.cea6a97d.js","./index.e8a8986f.js"],import.meta.url)).default),t(5,f=!1))}cn(()=>{b()});function g(M){Ve.call(this,n,M)}function y(M){d=M,t(7,d),t(0,l)}function k(M){le[M?"unshift":"push"](()=>{c=M,t(6,c)})}function $(){d=this.value,t(7,d),t(0,l)}const C=()=>{h(!1),m()};return n.$$set=M=>{"value"in M&&t(0,l=M.value),"placeholder"in M&&t(1,o=M.placeholder),"autocompleteCollection"in M&&t(2,r=M.autocompleteCollection),"extraAutocompleteKeys"in M&&t(3,a=M.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,o,r,a,u,f,c,d,s,h,m,g,y,k,$,C]}class ka extends ke{constructor(e){super(),ye(this,e,iv,nv,be,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}let qr,Ii;const Vr="app-tooltip";function ju(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function _i(){return Ii=Ii||document.querySelector("."+Vr),Ii||(Ii=document.createElement("div"),Ii.classList.add(Vr),document.body.appendChild(Ii)),Ii}function Lg(n,e){let t=_i();if(!t.classList.contains("active")||!(e!=null&&e.text)){zr();return}t.textContent=e.text,t.className=Vr+" active",e.class&&t.classList.add(e.class),e.position&&t.classList.add(e.position),t.style.top="0px",t.style.left="0px";let i=t.offsetHeight,s=t.offsetWidth,l=n.getBoundingClientRect(),o=0,r=0,a=5;e.position=="left"?(o=l.top+l.height/2-i/2,r=l.left-s-a):e.position=="right"?(o=l.top+l.height/2-i/2,r=l.right+a):e.position=="top"?(o=l.top-i-a,r=l.left+l.width/2-s/2):e.position=="top-left"?(o=l.top-i-a,r=l.left):e.position=="top-right"?(o=l.top-i-a,r=l.right-s):e.position=="bottom-left"?(o=l.top+l.height+a,r=l.left):e.position=="bottom-right"?(o=l.top+l.height+a,r=l.right-s):(o=l.top+l.height+a,r=l.left+l.width/2-s/2),r+s>document.documentElement.clientWidth&&(r=document.documentElement.clientWidth-s),r=r>=0?r:0,o+i>document.documentElement.clientHeight&&(o=document.documentElement.clientHeight-i),o=o>=0?o:0,t.style.top=o+"px",t.style.left=r+"px"}function zr(){clearTimeout(qr),_i().classList.remove("active"),_i().activeNode=void 0}function sv(n,e){_i().activeNode=n,clearTimeout(qr),qr=setTimeout(()=>{_i().classList.add("active"),Lg(n,e)},isNaN(e.delay)?0:e.delay)}function Be(n,e){let t=ju(e);function i(){sv(n,t)}function s(){zr()}return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",s),n.addEventListener("blur",s),(t.hideOnClick===!0||t.hideOnClick===null&&W.isFocusable(n))&&n.addEventListener("click",s),_i(),{update(l){var o,r;t=ju(l),(r=(o=_i())==null?void 0:o.activeNode)!=null&&r.contains(n)&&Lg(n,t)},destroy(){var l,o;(o=(l=_i())==null?void 0:l.activeNode)!=null&&o.contains(n)&&zr(),n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",s),n.removeEventListener("blur",s),n.removeEventListener("click",s)}}}function lv(n){let e,t,i,s;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-secondary btn-circle svelte-1bvelc2"),ne(e,"refreshing",n[1])},m(l,o){S(l,e,o),i||(s=[Ae(t=Be.call(null,e,n[0])),K(e,"click",n[2])],i=!0)},p(l,[o]){t&&Jt(t.update)&&o&1&&t.update.call(null,l[0]),o&2&&ne(e,"refreshing",l[1])},i:te,o:te,d(l){l&&w(e),i=!1,Pe(s)}}}function ov(n,e,t){const i=It();let{tooltip:s={text:"Refresh",position:"right"}}=e,l=null;function o(){i("refresh");const r=s;t(0,s=null),clearTimeout(l),t(1,l=setTimeout(()=>{t(1,l=null),t(0,s=r)},150))}return cn(()=>()=>clearTimeout(l)),n.$$set=r=>{"tooltip"in r&&t(0,s=r.tooltip)},[s,l,o]}class wa extends ke{constructor(e){super(),ye(this,e,ov,lv,be,{tooltip:0})}}function rv(n){let e,t,i,s,l;const o=n[6].default,r=Ot(o,n,n[5],null);return{c(){e=v("th"),r&&r.c(),p(e,"tabindex","0"),p(e,"class",t="col-sort "+n[1]),ne(e,"col-sort-disabled",n[3]),ne(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),ne(e,"sort-desc",n[0]==="-"+n[2]),ne(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){S(a,e,u),r&&r.m(e,null),i=!0,s||(l=[K(e,"click",n[7]),K(e,"keydown",n[8])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&32)&&At(r,o,a,a[5],i?Dt(o,a[5],u,null):Et(a[5]),null),(!i||u&2&&t!==(t="col-sort "+a[1]))&&p(e,"class",t),(!i||u&10)&&ne(e,"col-sort-disabled",a[3]),(!i||u&7)&&ne(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),(!i||u&7)&&ne(e,"sort-desc",a[0]==="-"+a[2]),(!i||u&7)&&ne(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(E(r,a),i=!0)},o(a){P(r,a),i=!1},d(a){a&&w(e),r&&r.d(a),s=!1,Pe(l)}}}function av(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{name:o}=e,{sort:r=""}=e,{disable:a=!1}=e;function u(){a||("-"+o===r?t(0,r="+"+o):t(0,r="-"+o))}const f=()=>u(),c=d=>{(d.code==="Enter"||d.code==="Space")&&(d.preventDefault(),u())};return n.$$set=d=>{"class"in d&&t(1,l=d.class),"name"in d&&t(2,o=d.name),"sort"in d&&t(0,r=d.sort),"disable"in d&&t(3,a=d.disable),"$$scope"in d&&t(5,s=d.$$scope)},[r,l,o,a,u,s,i,f,c]}class Ft extends ke{constructor(e){super(),ye(this,e,av,rv,be,{class:1,name:2,sort:0,disable:3})}}function uv(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function fv(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("div"),i=B(n[2]),s=O(),l=v("div"),o=B(n[1]),r=B(" UTC"),p(t,"class","date"),p(l,"class","time svelte-zdiknu"),p(e,"class","datetime svelte-zdiknu")},m(a,u){S(a,e,u),_(e,t),_(t,i),_(e,s),_(e,l),_(l,o),_(l,r)},p(a,u){u&4&&ae(i,a[2]),u&2&&ae(o,a[1])},d(a){a&&w(e)}}}function cv(n){let e;function t(l,o){return l[0]?fv:uv}let i=t(n),s=i(n);return{c(){s.c(),e=Ee()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:te,o:te,d(l){s.d(l),l&&w(e)}}}function dv(n,e,t){let i,s,{date:l=""}=e;return n.$$set=o=>{"date"in o&&t(0,l=o.date)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=l?l.substring(0,10):null),n.$$.dirty&1&&t(1,s=l?l.substring(10,19):null)},[l,s,i]}class Ki extends ke{constructor(e){super(),ye(this,e,dv,cv,be,{date:0})}}const pv=n=>({}),qu=n=>({}),hv=n=>({}),Vu=n=>({});function mv(n){let e,t,i,s,l,o,r,a;const u=n[5].before,f=Ot(u,n,n[4],Vu),c=n[5].default,d=Ot(c,n,n[4],null),h=n[5].after,m=Ot(h,n,n[4],qu);return{c(){e=v("div"),f&&f.c(),t=O(),i=v("div"),d&&d.c(),l=O(),m&&m.c(),p(i,"class",s="horizontal-scroller "+n[0]+" "+n[3]+" svelte-wc2j9h"),p(e,"class","horizontal-scroller-wrapper svelte-wc2j9h")},m(b,g){S(b,e,g),f&&f.m(e,null),_(e,t),_(e,i),d&&d.m(i,null),n[6](i),_(e,l),m&&m.m(e,null),o=!0,r||(a=[K(window,"resize",n[1]),K(i,"scroll",n[1])],r=!0)},p(b,[g]){f&&f.p&&(!o||g&16)&&At(f,u,b,b[4],o?Dt(u,b[4],g,hv):Et(b[4]),Vu),d&&d.p&&(!o||g&16)&&At(d,c,b,b[4],o?Dt(c,b[4],g,null):Et(b[4]),null),(!o||g&9&&s!==(s="horizontal-scroller "+b[0]+" "+b[3]+" svelte-wc2j9h"))&&p(i,"class",s),m&&m.p&&(!o||g&16)&&At(m,h,b,b[4],o?Dt(h,b[4],g,pv):Et(b[4]),qu)},i(b){o||(E(f,b),E(d,b),E(m,b),o=!0)},o(b){P(f,b),P(d,b),P(m,b),o=!1},d(b){b&&w(e),f&&f.d(b),d&&d.d(b),n[6](null),m&&m.d(b),r=!1,Pe(a)}}}function gv(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,o=null,r="",a=null,u;function f(){!o||(clearTimeout(a),a=setTimeout(()=>{const d=o.offsetWidth,h=o.scrollWidth;h-d?(t(3,r="scrollable"),o.scrollLeft===0?t(3,r+=" scroll-start"):o.scrollLeft+d==h&&t(3,r+=" scroll-end")):t(3,r="")},100))}cn(()=>(f(),u=new MutationObserver(()=>{f()}),u.observe(o,{attributeFilter:["width"],childList:!0,subtree:!0}),()=>{u==null||u.disconnect(),clearTimeout(a)}));function c(d){le[d?"unshift":"push"](()=>{o=d,t(2,o)})}return n.$$set=d=>{"class"in d&&t(0,l=d.class),"$$scope"in d&&t(4,s=d.$$scope)},[l,f,o,r,s,i,c]}class Sa extends ke{constructor(e){super(),ye(this,e,gv,mv,be,{class:0,refresh:1})}get refresh(){return this.$$.ctx[1]}}function zu(n,e,t){const i=n.slice();return i[23]=e[t],i}function _v(n){let e;return{c(){e=v("div"),e.innerHTML=` - method`,p(e,"class","col-header-content")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function bv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="url",p(t,"class",W.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:te,d(l){l&&w(e)}}}function vv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="referer",p(t,"class",W.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:te,d(l){l&&w(e)}}}function yv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="User IP",p(t,"class",W.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:te,d(l){l&&w(e)}}}function kv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="status",p(t,"class",W.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:te,d(l){l&&w(e)}}}function wv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="created",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:te,d(l){l&&w(e)}}}function Bu(n){let e;function t(l,o){return l[6]?$v:Sv}let i=t(n),s=i(n);return{c(){s.c(),e=Ee()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function Sv(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&Uu(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No logs found.",s=O(),o&&o.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),_(e,t),_(t,i),_(t,s),o&&o.m(t,null),_(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=Uu(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function $v(n){let e;return{c(){e=v("tr"),e.innerHTML=` - `},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function Uu(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[19]),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function Wu(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),p(e,"title","Error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Yu(n,e){var Se,we,We;let t,i,s,l=((Se=e[23].method)==null?void 0:Se.toUpperCase())+"",o,r,a,u,f,c=e[23].url+"",d,h,m,b,g,y,k=(e[23].referer||"N/A")+"",$,C,M,T,D,A=(e[23].userIp||"N/A")+"",I,L,F,q,z,J=e[23].status+"",G,ie,Q,X,Y,x,U,re,Re,Ne,Le=(((we=e[23].meta)==null?void 0:we.errorMessage)||((We=e[23].meta)==null?void 0:We.errorData))&&Wu();X=new Ki({props:{date:e[23].created}});function Fe(){return e[17](e[23])}function me(...ue){return e[18](e[23],...ue)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("span"),o=B(l),a=O(),u=v("td"),f=v("span"),d=B(c),m=O(),Le&&Le.c(),b=O(),g=v("td"),y=v("span"),$=B(k),M=O(),T=v("td"),D=v("span"),I=B(A),F=O(),q=v("td"),z=v("span"),G=B(J),ie=O(),Q=v("td"),j(X.$$.fragment),Y=O(),x=v("td"),x.innerHTML='',U=O(),p(s,"class",r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]),p(i,"class","col-type-text col-field-method min-width"),p(f,"class","txt txt-ellipsis"),p(f,"title",h=e[23].url),p(u,"class","col-type-text col-field-url"),p(y,"class","txt txt-ellipsis"),p(y,"title",C=e[23].referer),ne(y,"txt-hint",!e[23].referer),p(g,"class","col-type-text col-field-referer"),p(D,"class","txt txt-ellipsis"),p(D,"title",L=e[23].userIp),ne(D,"txt-hint",!e[23].userIp),p(T,"class","col-type-number col-field-userIp"),p(z,"class","label"),ne(z,"label-danger",e[23].status>=400),p(q,"class","col-type-number col-field-status"),p(Q,"class","col-type-date col-field-created"),p(x,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(ue,se){S(ue,t,se),_(t,i),_(i,s),_(s,o),_(t,a),_(t,u),_(u,f),_(f,d),_(u,m),Le&&Le.m(u,null),_(t,b),_(t,g),_(g,y),_(y,$),_(t,M),_(t,T),_(T,D),_(D,I),_(t,F),_(t,q),_(q,z),_(z,G),_(t,ie),_(t,Q),R(X,Q,null),_(t,Y),_(t,x),_(t,U),re=!0,Re||(Ne=[K(t,"click",Fe),K(t,"keydown",me)],Re=!0)},p(ue,se){var Z,Ce,Ue;e=ue,(!re||se&8)&&l!==(l=((Z=e[23].method)==null?void 0:Z.toUpperCase())+"")&&ae(o,l),(!re||se&8&&r!==(r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]))&&p(s,"class",r),(!re||se&8)&&c!==(c=e[23].url+"")&&ae(d,c),(!re||se&8&&h!==(h=e[23].url))&&p(f,"title",h),((Ce=e[23].meta)==null?void 0:Ce.errorMessage)||((Ue=e[23].meta)==null?void 0:Ue.errorData)?Le||(Le=Wu(),Le.c(),Le.m(u,null)):Le&&(Le.d(1),Le=null),(!re||se&8)&&k!==(k=(e[23].referer||"N/A")+"")&&ae($,k),(!re||se&8&&C!==(C=e[23].referer))&&p(y,"title",C),(!re||se&8)&&ne(y,"txt-hint",!e[23].referer),(!re||se&8)&&A!==(A=(e[23].userIp||"N/A")+"")&&ae(I,A),(!re||se&8&&L!==(L=e[23].userIp))&&p(D,"title",L),(!re||se&8)&&ne(D,"txt-hint",!e[23].userIp),(!re||se&8)&&J!==(J=e[23].status+"")&&ae(G,J),(!re||se&8)&&ne(z,"label-danger",e[23].status>=400);const fe={};se&8&&(fe.date=e[23].created),X.$set(fe)},i(ue){re||(E(X.$$.fragment,ue),re=!0)},o(ue){P(X.$$.fragment,ue),re=!1},d(ue){ue&&w(t),Le&&Le.d(),H(X),Re=!1,Pe(Ne)}}}function Cv(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M,T,D,A,I=[],L=new Map,F;function q(me){n[11](me)}let z={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[_v]},$$scope:{ctx:n}};n[1]!==void 0&&(z.sort=n[1]),s=new Ft({props:z}),le.push(()=>_e(s,"sort",q));function J(me){n[12](me)}let G={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[bv]},$$scope:{ctx:n}};n[1]!==void 0&&(G.sort=n[1]),r=new Ft({props:G}),le.push(()=>_e(r,"sort",J));function ie(me){n[13](me)}let Q={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[vv]},$$scope:{ctx:n}};n[1]!==void 0&&(Q.sort=n[1]),f=new Ft({props:Q}),le.push(()=>_e(f,"sort",ie));function X(me){n[14](me)}let Y={disable:!0,class:"col-type-number col-field-userIp",name:"userIp",$$slots:{default:[yv]},$$scope:{ctx:n}};n[1]!==void 0&&(Y.sort=n[1]),h=new Ft({props:Y}),le.push(()=>_e(h,"sort",X));function x(me){n[15](me)}let U={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[kv]},$$scope:{ctx:n}};n[1]!==void 0&&(U.sort=n[1]),g=new Ft({props:U}),le.push(()=>_e(g,"sort",x));function re(me){n[16](me)}let Re={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[wv]},$$scope:{ctx:n}};n[1]!==void 0&&(Re.sort=n[1]),$=new Ft({props:Re}),le.push(()=>_e($,"sort",re));let Ne=n[3];const Le=me=>me[23].id;for(let me=0;mel=!1)),s.$set(we);const We={};Se&67108864&&(We.$$scope={dirty:Se,ctx:me}),!a&&Se&2&&(a=!0,We.sort=me[1],ve(()=>a=!1)),r.$set(We);const ue={};Se&67108864&&(ue.$$scope={dirty:Se,ctx:me}),!c&&Se&2&&(c=!0,ue.sort=me[1],ve(()=>c=!1)),f.$set(ue);const se={};Se&67108864&&(se.$$scope={dirty:Se,ctx:me}),!m&&Se&2&&(m=!0,se.sort=me[1],ve(()=>m=!1)),h.$set(se);const fe={};Se&67108864&&(fe.$$scope={dirty:Se,ctx:me}),!y&&Se&2&&(y=!0,fe.sort=me[1],ve(()=>y=!1)),g.$set(fe);const Z={};Se&67108864&&(Z.$$scope={dirty:Se,ctx:me}),!C&&Se&2&&(C=!0,Z.sort=me[1],ve(()=>C=!1)),$.$set(Z),Se&841&&(Ne=me[3],pe(),I=bt(I,Se,Le,1,me,Ne,L,A,nn,Yu,null,zu),he(),!Ne.length&&Fe?Fe.p(me,Se):Ne.length?Fe&&(Fe.d(1),Fe=null):(Fe=Bu(me),Fe.c(),Fe.m(A,null))),(!F||Se&64)&&ne(e,"table-loading",me[6])},i(me){if(!F){E(s.$$.fragment,me),E(r.$$.fragment,me),E(f.$$.fragment,me),E(h.$$.fragment,me),E(g.$$.fragment,me),E($.$$.fragment,me);for(let Se=0;Se{if(L<=1&&b(),t(6,d=!1),t(5,f=q.page),t(4,c=q.totalItems),s("load",u.concat(q.items)),F){const z=++h;for(;q.items.length&&h==z;)t(3,u=u.concat(q.items.splice(0,10))),await W.yieldToMain()}else t(3,u=u.concat(q.items))}).catch(q=>{q!=null&&q.isAbort||(t(6,d=!1),console.warn(q),b(),de.errorResponseHandler(q,!1))})}function b(){t(3,u=[]),t(5,f=1),t(4,c=0)}function g(L){a=L,t(1,a)}function y(L){a=L,t(1,a)}function k(L){a=L,t(1,a)}function $(L){a=L,t(1,a)}function C(L){a=L,t(1,a)}function M(L){a=L,t(1,a)}const T=L=>s("select",L),D=(L,F)=>{F.code==="Enter"&&(F.preventDefault(),s("select",L))},A=()=>t(0,o=""),I=()=>m(f+1);return n.$$set=L=>{"filter"in L&&t(0,o=L.filter),"presets"in L&&t(10,r=L.presets),"sort"in L&&t(1,a=L.sort)},n.$$.update=()=>{n.$$.dirty&1027&&(typeof a<"u"||typeof o<"u"||typeof r<"u")&&(b(),m(1)),n.$$.dirty&24&&t(7,i=c>u.length)},[o,a,m,u,c,f,d,i,s,l,r,g,y,k,$,C,M,T,D,A,I]}class Ov extends ke{constructor(e){super(),ye(this,e,Mv,Tv,be,{filter:0,presets:10,sort:1,load:2})}get load(){return this.$$.ctx[2]}}/*! + `}}function tv(n){let e,t,i,s;return{c(){e=v("input"),p(e,"type","text"),p(e,"id",n[8]),p(e,"placeholder",t=n[0]||n[1])},m(l,o){S(l,e,o),n[13](e),ce(e,n[7]),i||(s=K(e,"input",n[14]),i=!0)},p(l,o){o&3&&t!==(t=l[0]||l[1])&&p(e,"placeholder",t),o&128&&e.value!==l[7]&&ce(e,l[7])},i:ee,o:ee,d(l){l&&w(e),n[13](null),i=!1,s()}}}function nv(n){let e,t,i,s;function l(a){n[12](a)}var o=n[4];function r(a){let u={id:a[8],singleLine:!0,disableRequestKeys:!0,disableIndirectCollectionsKeys:!0,extraAutocompleteKeys:a[3],baseCollection:a[2],placeholder:a[0]||a[1]};return a[7]!==void 0&&(u.value=a[7]),{props:u}}return o&&(e=jt(o,r(n)),le.push(()=>_e(e,"value",l)),e.$on("submit",n[10])),{c(){e&&j(e.$$.fragment),i=Ae()},m(a,u){e&&R(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u&8&&(f.extraAutocompleteKeys=a[3]),u&4&&(f.baseCollection=a[2]),u&3&&(f.placeholder=a[0]||a[1]),!t&&u&128&&(t=!0,f.value=a[7],ve(()=>t=!1)),o!==(o=a[4])){if(e){pe();const c=e;P(c.$$.fragment,1,0,()=>{H(c,1)}),he()}o?(e=jt(o,r(a)),le.push(()=>_e(e,"value",l)),e.$on("submit",a[10]),j(e.$$.fragment),E(e.$$.fragment,1),R(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&E(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&H(e,a)}}}function Hu(n){let e,t,i,s,l,o,r=n[7]!==n[0]&&ju();return{c(){r&&r.c(),e=O(),t=v("button"),t.innerHTML='Clear',p(t,"type","button"),p(t,"class","btn btn-secondary btn-sm btn-hint p-l-xs p-r-xs m-l-10")},m(a,u){r&&r.m(a,u),S(a,e,u),S(a,t,u),s=!0,l||(o=K(t,"click",n[15]),l=!0)},p(a,u){a[7]!==a[0]?r?u&129&&E(r,1):(r=ju(),r.c(),E(r,1),r.m(e.parentNode,e)):r&&(pe(),P(r,1,1,()=>{r=null}),he())},i(a){s||(E(r),a&&xe(()=>{i||(i=je(t,Sn,{duration:150,x:5},!0)),i.run(1)}),s=!0)},o(a){P(r),a&&(i||(i=je(t,Sn,{duration:150,x:5},!1)),i.run(0)),s=!1},d(a){r&&r.d(a),a&&w(e),a&&w(t),a&&i&&i.end(),l=!1,o()}}}function ju(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Search',p(e,"type","submit"),p(e,"class","btn btn-expanded btn-sm btn-warning")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&xe(()=>{t||(t=je(e,Sn,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=je(e,Sn,{duration:150,x:5},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function iv(n){let e,t,i,s,l,o,r,a,u,f,c;const d=[nv,tv],h=[];function m(b,y){return b[4]&&!b[5]?0:1}o=m(n),r=h[o]=d[o](n);let g=(n[0].length||n[7].length)&&Hu(n);return{c(){e=v("div"),t=v("form"),i=v("label"),s=v("i"),l=O(),r.c(),a=O(),g&&g.c(),p(s,"class","ri-search-line"),p(i,"for",n[8]),p(i,"class","m-l-10 txt-xl"),p(t,"class","searchbar"),p(e,"class","searchbar-wrapper")},m(b,y){S(b,e,y),_(e,t),_(t,i),_(i,s),_(t,l),h[o].m(t,null),_(t,a),g&&g.m(t,null),u=!0,f||(c=[K(t,"click",Yn(n[11])),K(t,"submit",ut(n[10]))],f=!0)},p(b,[y]){let k=o;o=m(b),o===k?h[o].p(b,y):(pe(),P(h[k],1,1,()=>{h[k]=null}),he(),r=h[o],r?r.p(b,y):(r=h[o]=d[o](b),r.c()),E(r,1),r.m(t,a)),b[0].length||b[7].length?g?(g.p(b,y),y&129&&E(g,1)):(g=Hu(b),g.c(),E(g,1),g.m(t,null)):g&&(pe(),P(g,1,1,()=>{g=null}),he())},i(b){u||(E(r),E(g),u=!0)},o(b){P(r),P(g),u=!1},d(b){b&&w(e),h[o].d(),g&&g.d(),f=!1,Pe(c)}}}function sv(n,e,t){const i=It(),s="search_"+W.randomString(7);let{value:l=""}=e,{placeholder:o='Search filter, ex. created > "2022-01-01"...'}=e,{autocompleteCollection:r=new Pn}=e,{extraAutocompleteKeys:a=[]}=e,u,f=!1,c,d="";function h(M=!0){t(7,d=""),M&&(c==null||c.focus()),i("clear")}function m(){t(0,l=d),i("submit",l)}async function g(){u||f||(t(5,f=!0),t(4,u=(await st(()=>import("./FilterAutocompleteInput.b52a3ef2.js"),["./FilterAutocompleteInput.b52a3ef2.js","./index.e8a8986f.js"],import.meta.url)).default),t(5,f=!1))}cn(()=>{g()});function b(M){Ve.call(this,n,M)}function y(M){d=M,t(7,d),t(0,l)}function k(M){le[M?"unshift":"push"](()=>{c=M,t(6,c)})}function $(){d=this.value,t(7,d),t(0,l)}const C=()=>{h(!1),m()};return n.$$set=M=>{"value"in M&&t(0,l=M.value),"placeholder"in M&&t(1,o=M.placeholder),"autocompleteCollection"in M&&t(2,r=M.autocompleteCollection),"extraAutocompleteKeys"in M&&t(3,a=M.extraAutocompleteKeys)},n.$$.update=()=>{n.$$.dirty&1&&typeof l=="string"&&t(7,d=l)},[l,o,r,a,u,f,c,d,s,h,m,b,y,k,$,C]}class wa extends ke{constructor(e){super(),ye(this,e,sv,iv,be,{value:0,placeholder:1,autocompleteCollection:2,extraAutocompleteKeys:3})}}let Vr,Ii;const zr="app-tooltip";function qu(n){return typeof n=="string"?{text:n,position:"bottom",hideOnClick:null}:n||{}}function _i(){return Ii=Ii||document.querySelector("."+zr),Ii||(Ii=document.createElement("div"),Ii.classList.add(zr),document.body.appendChild(Ii)),Ii}function Ng(n,e){let t=_i();if(!t.classList.contains("active")||!(e!=null&&e.text)){Br();return}t.textContent=e.text,t.className=zr+" active",e.class&&t.classList.add(e.class),e.position&&t.classList.add(e.position),t.style.top="0px",t.style.left="0px";let i=t.offsetHeight,s=t.offsetWidth,l=n.getBoundingClientRect(),o=0,r=0,a=5;e.position=="left"?(o=l.top+l.height/2-i/2,r=l.left-s-a):e.position=="right"?(o=l.top+l.height/2-i/2,r=l.right+a):e.position=="top"?(o=l.top-i-a,r=l.left+l.width/2-s/2):e.position=="top-left"?(o=l.top-i-a,r=l.left):e.position=="top-right"?(o=l.top-i-a,r=l.right-s):e.position=="bottom-left"?(o=l.top+l.height+a,r=l.left):e.position=="bottom-right"?(o=l.top+l.height+a,r=l.right-s):(o=l.top+l.height+a,r=l.left+l.width/2-s/2),r+s>document.documentElement.clientWidth&&(r=document.documentElement.clientWidth-s),r=r>=0?r:0,o+i>document.documentElement.clientHeight&&(o=document.documentElement.clientHeight-i),o=o>=0?o:0,t.style.top=o+"px",t.style.left=r+"px"}function Br(){clearTimeout(Vr),_i().classList.remove("active"),_i().activeNode=void 0}function lv(n,e){_i().activeNode=n,clearTimeout(Vr),Vr=setTimeout(()=>{_i().classList.add("active"),Ng(n,e)},isNaN(e.delay)?0:e.delay)}function Ue(n,e){let t=qu(e);function i(){lv(n,t)}function s(){Br()}return n.addEventListener("mouseenter",i),n.addEventListener("mouseleave",s),n.addEventListener("blur",s),(t.hideOnClick===!0||t.hideOnClick===null&&W.isFocusable(n))&&n.addEventListener("click",s),_i(),{update(l){var o,r;t=qu(l),(r=(o=_i())==null?void 0:o.activeNode)!=null&&r.contains(n)&&Ng(n,t)},destroy(){var l,o;(o=(l=_i())==null?void 0:l.activeNode)!=null&&o.contains(n)&&Br(),n.removeEventListener("mouseenter",i),n.removeEventListener("mouseleave",s),n.removeEventListener("blur",s),n.removeEventListener("click",s)}}}function ov(n){let e,t,i,s;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-secondary btn-circle svelte-1bvelc2"),ne(e,"refreshing",n[1])},m(l,o){S(l,e,o),i||(s=[Ee(t=Ue.call(null,e,n[0])),K(e,"click",n[2])],i=!0)},p(l,[o]){t&&Jt(t.update)&&o&1&&t.update.call(null,l[0]),o&2&&ne(e,"refreshing",l[1])},i:ee,o:ee,d(l){l&&w(e),i=!1,Pe(s)}}}function rv(n,e,t){const i=It();let{tooltip:s={text:"Refresh",position:"right"}}=e,l=null;function o(){i("refresh");const r=s;t(0,s=null),clearTimeout(l),t(1,l=setTimeout(()=>{t(1,l=null),t(0,s=r)},150))}return cn(()=>()=>clearTimeout(l)),n.$$set=r=>{"tooltip"in r&&t(0,s=r.tooltip)},[s,l,o]}class Sa extends ke{constructor(e){super(),ye(this,e,rv,ov,be,{tooltip:0})}}function av(n){let e,t,i,s,l;const o=n[6].default,r=Ot(o,n,n[5],null);return{c(){e=v("th"),r&&r.c(),p(e,"tabindex","0"),p(e,"class",t="col-sort "+n[1]),ne(e,"col-sort-disabled",n[3]),ne(e,"sort-active",n[0]==="-"+n[2]||n[0]==="+"+n[2]),ne(e,"sort-desc",n[0]==="-"+n[2]),ne(e,"sort-asc",n[0]==="+"+n[2])},m(a,u){S(a,e,u),r&&r.m(e,null),i=!0,s||(l=[K(e,"click",n[7]),K(e,"keydown",n[8])],s=!0)},p(a,[u]){r&&r.p&&(!i||u&32)&&At(r,o,a,a[5],i?Dt(o,a[5],u,null):Et(a[5]),null),(!i||u&2&&t!==(t="col-sort "+a[1]))&&p(e,"class",t),(!i||u&10)&&ne(e,"col-sort-disabled",a[3]),(!i||u&7)&&ne(e,"sort-active",a[0]==="-"+a[2]||a[0]==="+"+a[2]),(!i||u&7)&&ne(e,"sort-desc",a[0]==="-"+a[2]),(!i||u&7)&&ne(e,"sort-asc",a[0]==="+"+a[2])},i(a){i||(E(r,a),i=!0)},o(a){P(r,a),i=!1},d(a){a&&w(e),r&&r.d(a),s=!1,Pe(l)}}}function uv(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{name:o}=e,{sort:r=""}=e,{disable:a=!1}=e;function u(){a||("-"+o===r?t(0,r="+"+o):t(0,r="-"+o))}const f=()=>u(),c=d=>{(d.code==="Enter"||d.code==="Space")&&(d.preventDefault(),u())};return n.$$set=d=>{"class"in d&&t(1,l=d.class),"name"in d&&t(2,o=d.name),"sort"in d&&t(0,r=d.sort),"disable"in d&&t(3,a=d.disable),"$$scope"in d&&t(5,s=d.$$scope)},[r,l,o,a,u,s,i,f,c]}class Ft extends ke{constructor(e){super(),ye(this,e,uv,av,be,{class:1,name:2,sort:0,disable:3})}}function fv(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function cv(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("div"),i=B(n[2]),s=O(),l=v("div"),o=B(n[1]),r=B(" UTC"),p(t,"class","date"),p(l,"class","time svelte-zdiknu"),p(e,"class","datetime svelte-zdiknu")},m(a,u){S(a,e,u),_(e,t),_(t,i),_(e,s),_(e,l),_(l,o),_(l,r)},p(a,u){u&4&&re(i,a[2]),u&2&&re(o,a[1])},d(a){a&&w(e)}}}function dv(n){let e;function t(l,o){return l[0]?cv:fv}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:ee,o:ee,d(l){s.d(l),l&&w(e)}}}function pv(n,e,t){let i,s,{date:l=""}=e;return n.$$set=o=>{"date"in o&&t(0,l=o.date)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=l?l.substring(0,10):null),n.$$.dirty&1&&t(1,s=l?l.substring(10,19):null)},[l,s,i]}class Ki extends ke{constructor(e){super(),ye(this,e,pv,dv,be,{date:0})}}const hv=n=>({}),Vu=n=>({}),mv=n=>({}),zu=n=>({});function gv(n){let e,t,i,s,l,o,r,a;const u=n[5].before,f=Ot(u,n,n[4],zu),c=n[5].default,d=Ot(c,n,n[4],null),h=n[5].after,m=Ot(h,n,n[4],Vu);return{c(){e=v("div"),f&&f.c(),t=O(),i=v("div"),d&&d.c(),l=O(),m&&m.c(),p(i,"class",s="horizontal-scroller "+n[0]+" "+n[3]+" svelte-wc2j9h"),p(e,"class","horizontal-scroller-wrapper svelte-wc2j9h")},m(g,b){S(g,e,b),f&&f.m(e,null),_(e,t),_(e,i),d&&d.m(i,null),n[6](i),_(e,l),m&&m.m(e,null),o=!0,r||(a=[K(window,"resize",n[1]),K(i,"scroll",n[1])],r=!0)},p(g,[b]){f&&f.p&&(!o||b&16)&&At(f,u,g,g[4],o?Dt(u,g[4],b,mv):Et(g[4]),zu),d&&d.p&&(!o||b&16)&&At(d,c,g,g[4],o?Dt(c,g[4],b,null):Et(g[4]),null),(!o||b&9&&s!==(s="horizontal-scroller "+g[0]+" "+g[3]+" svelte-wc2j9h"))&&p(i,"class",s),m&&m.p&&(!o||b&16)&&At(m,h,g,g[4],o?Dt(h,g[4],b,hv):Et(g[4]),Vu)},i(g){o||(E(f,g),E(d,g),E(m,g),o=!0)},o(g){P(f,g),P(d,g),P(m,g),o=!1},d(g){g&&w(e),f&&f.d(g),d&&d.d(g),n[6](null),m&&m.d(g),r=!1,Pe(a)}}}function _v(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,o=null,r="",a=null,u;function f(){!o||(clearTimeout(a),a=setTimeout(()=>{const d=o.offsetWidth,h=o.scrollWidth;h-d?(t(3,r="scrollable"),o.scrollLeft===0?t(3,r+=" scroll-start"):o.scrollLeft+d==h&&t(3,r+=" scroll-end")):t(3,r="")},100))}cn(()=>(f(),u=new MutationObserver(()=>{f()}),u.observe(o,{attributeFilter:["width"],childList:!0,subtree:!0}),()=>{u==null||u.disconnect(),clearTimeout(a)}));function c(d){le[d?"unshift":"push"](()=>{o=d,t(2,o)})}return n.$$set=d=>{"class"in d&&t(0,l=d.class),"$$scope"in d&&t(4,s=d.$$scope)},[l,f,o,r,s,i,c]}class $a extends ke{constructor(e){super(),ye(this,e,_v,gv,be,{class:0,refresh:1})}get refresh(){return this.$$.ctx[1]}}function Bu(n,e,t){const i=n.slice();return i[23]=e[t],i}function bv(n){let e;return{c(){e=v("div"),e.innerHTML=` + method`,p(e,"class","col-header-content")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function vv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="url",p(t,"class",W.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:ee,d(l){l&&w(e)}}}function yv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="referer",p(t,"class",W.getFieldTypeIcon("url")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:ee,d(l){l&&w(e)}}}function kv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="User IP",p(t,"class",W.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:ee,d(l){l&&w(e)}}}function wv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="status",p(t,"class",W.getFieldTypeIcon("number")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:ee,d(l){l&&w(e)}}}function Sv(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="created",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:ee,d(l){l&&w(e)}}}function Uu(n){let e;function t(l,o){return l[6]?Cv:$v}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function $v(n){var r;let e,t,i,s,l,o=((r=n[0])==null?void 0:r.length)&&Wu(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No logs found.",s=O(),o&&o.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),_(e,t),_(t,i),_(t,s),o&&o.m(t,null),_(e,l)},p(a,u){var f;(f=a[0])!=null&&f.length?o?o.p(a,u):(o=Wu(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function Cv(n){let e;return{c(){e=v("tr"),e.innerHTML=` + `},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function Wu(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[19]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function Yu(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line txt-danger m-l-5 m-r-5"),p(e,"title","Error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Ku(n,e){var Se,we,We;let t,i,s,l=((Se=e[23].method)==null?void 0:Se.toUpperCase())+"",o,r,a,u,f,c=e[23].url+"",d,h,m,g,b,y,k=(e[23].referer||"N/A")+"",$,C,M,T,D,A=(e[23].userIp||"N/A")+"",I,L,F,q,z,J=e[23].status+"",G,ie,Q,X,Y,x,U,ae,Re,Ne,Le=(((we=e[23].meta)==null?void 0:we.errorMessage)||((We=e[23].meta)==null?void 0:We.errorData))&&Yu();X=new Ki({props:{date:e[23].created}});function Fe(){return e[17](e[23])}function me(...ue){return e[18](e[23],...ue)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("span"),o=B(l),a=O(),u=v("td"),f=v("span"),d=B(c),m=O(),Le&&Le.c(),g=O(),b=v("td"),y=v("span"),$=B(k),M=O(),T=v("td"),D=v("span"),I=B(A),F=O(),q=v("td"),z=v("span"),G=B(J),ie=O(),Q=v("td"),j(X.$$.fragment),Y=O(),x=v("td"),x.innerHTML='',U=O(),p(s,"class",r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]),p(i,"class","col-type-text col-field-method min-width"),p(f,"class","txt txt-ellipsis"),p(f,"title",h=e[23].url),p(u,"class","col-type-text col-field-url"),p(y,"class","txt txt-ellipsis"),p(y,"title",C=e[23].referer),ne(y,"txt-hint",!e[23].referer),p(b,"class","col-type-text col-field-referer"),p(D,"class","txt txt-ellipsis"),p(D,"title",L=e[23].userIp),ne(D,"txt-hint",!e[23].userIp),p(T,"class","col-type-number col-field-userIp"),p(z,"class","label"),ne(z,"label-danger",e[23].status>=400),p(q,"class","col-type-number col-field-status"),p(Q,"class","col-type-date col-field-created"),p(x,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(ue,se){S(ue,t,se),_(t,i),_(i,s),_(s,o),_(t,a),_(t,u),_(u,f),_(f,d),_(u,m),Le&&Le.m(u,null),_(t,g),_(t,b),_(b,y),_(y,$),_(t,M),_(t,T),_(T,D),_(D,I),_(t,F),_(t,q),_(q,z),_(z,G),_(t,ie),_(t,Q),R(X,Q,null),_(t,Y),_(t,x),_(t,U),ae=!0,Re||(Ne=[K(t,"click",Fe),K(t,"keydown",me)],Re=!0)},p(ue,se){var Z,Ce,Be;e=ue,(!ae||se&8)&&l!==(l=((Z=e[23].method)==null?void 0:Z.toUpperCase())+"")&&re(o,l),(!ae||se&8&&r!==(r="label txt-uppercase "+e[9][e[23].method.toLowerCase()]))&&p(s,"class",r),(!ae||se&8)&&c!==(c=e[23].url+"")&&re(d,c),(!ae||se&8&&h!==(h=e[23].url))&&p(f,"title",h),((Ce=e[23].meta)==null?void 0:Ce.errorMessage)||((Be=e[23].meta)==null?void 0:Be.errorData)?Le||(Le=Yu(),Le.c(),Le.m(u,null)):Le&&(Le.d(1),Le=null),(!ae||se&8)&&k!==(k=(e[23].referer||"N/A")+"")&&re($,k),(!ae||se&8&&C!==(C=e[23].referer))&&p(y,"title",C),(!ae||se&8)&&ne(y,"txt-hint",!e[23].referer),(!ae||se&8)&&A!==(A=(e[23].userIp||"N/A")+"")&&re(I,A),(!ae||se&8&&L!==(L=e[23].userIp))&&p(D,"title",L),(!ae||se&8)&&ne(D,"txt-hint",!e[23].userIp),(!ae||se&8)&&J!==(J=e[23].status+"")&&re(G,J),(!ae||se&8)&&ne(z,"label-danger",e[23].status>=400);const fe={};se&8&&(fe.date=e[23].created),X.$set(fe)},i(ue){ae||(E(X.$$.fragment,ue),ae=!0)},o(ue){P(X.$$.fragment,ue),ae=!1},d(ue){ue&&w(t),Le&&Le.d(),H(X),Re=!1,Pe(Ne)}}}function Tv(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,b,y,k,$,C,M,T,D,A,I=[],L=new Map,F;function q(me){n[11](me)}let z={disable:!0,class:"col-field-method",name:"method",$$slots:{default:[bv]},$$scope:{ctx:n}};n[1]!==void 0&&(z.sort=n[1]),s=new Ft({props:z}),le.push(()=>_e(s,"sort",q));function J(me){n[12](me)}let G={disable:!0,class:"col-type-text col-field-url",name:"url",$$slots:{default:[vv]},$$scope:{ctx:n}};n[1]!==void 0&&(G.sort=n[1]),r=new Ft({props:G}),le.push(()=>_e(r,"sort",J));function ie(me){n[13](me)}let Q={disable:!0,class:"col-type-text col-field-referer",name:"referer",$$slots:{default:[yv]},$$scope:{ctx:n}};n[1]!==void 0&&(Q.sort=n[1]),f=new Ft({props:Q}),le.push(()=>_e(f,"sort",ie));function X(me){n[14](me)}let Y={disable:!0,class:"col-type-number col-field-userIp",name:"userIp",$$slots:{default:[kv]},$$scope:{ctx:n}};n[1]!==void 0&&(Y.sort=n[1]),h=new Ft({props:Y}),le.push(()=>_e(h,"sort",X));function x(me){n[15](me)}let U={disable:!0,class:"col-type-number col-field-status",name:"status",$$slots:{default:[wv]},$$scope:{ctx:n}};n[1]!==void 0&&(U.sort=n[1]),b=new Ft({props:U}),le.push(()=>_e(b,"sort",x));function ae(me){n[16](me)}let Re={disable:!0,class:"col-type-date col-field-created",name:"created",$$slots:{default:[Sv]},$$scope:{ctx:n}};n[1]!==void 0&&(Re.sort=n[1]),$=new Ft({props:Re}),le.push(()=>_e($,"sort",ae));let Ne=n[3];const Le=me=>me[23].id;for(let me=0;mel=!1)),s.$set(we);const We={};Se&67108864&&(We.$$scope={dirty:Se,ctx:me}),!a&&Se&2&&(a=!0,We.sort=me[1],ve(()=>a=!1)),r.$set(We);const ue={};Se&67108864&&(ue.$$scope={dirty:Se,ctx:me}),!c&&Se&2&&(c=!0,ue.sort=me[1],ve(()=>c=!1)),f.$set(ue);const se={};Se&67108864&&(se.$$scope={dirty:Se,ctx:me}),!m&&Se&2&&(m=!0,se.sort=me[1],ve(()=>m=!1)),h.$set(se);const fe={};Se&67108864&&(fe.$$scope={dirty:Se,ctx:me}),!y&&Se&2&&(y=!0,fe.sort=me[1],ve(()=>y=!1)),b.$set(fe);const Z={};Se&67108864&&(Z.$$scope={dirty:Se,ctx:me}),!C&&Se&2&&(C=!0,Z.sort=me[1],ve(()=>C=!1)),$.$set(Z),Se&841&&(Ne=me[3],pe(),I=bt(I,Se,Le,1,me,Ne,L,A,nn,Ku,null,Bu),he(),!Ne.length&&Fe?Fe.p(me,Se):Ne.length?Fe&&(Fe.d(1),Fe=null):(Fe=Uu(me),Fe.c(),Fe.m(A,null))),(!F||Se&64)&&ne(e,"table-loading",me[6])},i(me){if(!F){E(s.$$.fragment,me),E(r.$$.fragment,me),E(f.$$.fragment,me),E(h.$$.fragment,me),E(b.$$.fragment,me),E($.$$.fragment,me);for(let Se=0;Se{if(L<=1&&g(),t(6,d=!1),t(5,f=q.page),t(4,c=q.totalItems),s("load",u.concat(q.items)),F){const z=++h;for(;q.items.length&&h==z;)t(3,u=u.concat(q.items.splice(0,10))),await W.yieldToMain()}else t(3,u=u.concat(q.items))}).catch(q=>{q!=null&&q.isAbort||(t(6,d=!1),console.warn(q),g(),de.errorResponseHandler(q,!1))})}function g(){t(3,u=[]),t(5,f=1),t(4,c=0)}function b(L){a=L,t(1,a)}function y(L){a=L,t(1,a)}function k(L){a=L,t(1,a)}function $(L){a=L,t(1,a)}function C(L){a=L,t(1,a)}function M(L){a=L,t(1,a)}const T=L=>s("select",L),D=(L,F)=>{F.code==="Enter"&&(F.preventDefault(),s("select",L))},A=()=>t(0,o=""),I=()=>m(f+1);return n.$$set=L=>{"filter"in L&&t(0,o=L.filter),"presets"in L&&t(10,r=L.presets),"sort"in L&&t(1,a=L.sort)},n.$$.update=()=>{n.$$.dirty&1027&&(typeof a<"u"||typeof o<"u"||typeof r<"u")&&(g(),m(1)),n.$$.dirty&24&&t(7,i=c>u.length)},[o,a,m,u,c,f,d,i,s,l,r,b,y,k,$,C,M,T,D,A,I]}class Dv extends ke{constructor(e){super(),ye(this,e,Ov,Mv,be,{filter:0,presets:10,sort:1,load:2})}get load(){return this.$$.ctx[2]}}/*! * Chart.js v3.9.1 * https://www.chartjs.org * (c) 2022 Chart.js Contributors * Released under the MIT License - */function Qn(){}const Dv=function(){let n=0;return function(){return n++}}();function it(n){return n===null||typeof n>"u"}function ft(n){if(Array.isArray&&Array.isArray(n))return!0;const e=Object.prototype.toString.call(n);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function Ye(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const _t=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function gn(n,e){return _t(n)?n:e}function Xe(n,e){return typeof n>"u"?e:n}const Av=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/e,Ng=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function pt(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function lt(n,e,t,i){let s,l,o;if(ft(n))if(l=n.length,i)for(s=l-1;s>=0;s--)e.call(t,n[s],s);else for(s=0;sn,x:n=>n.x,y:n=>n.y};function vi(n,e){return(Zu[e]||(Zu[e]=Pv(e)))(n)}function Pv(n){const e=Lv(n);return t=>{for(const i of e){if(i==="")break;t=t&&t[i]}return t}}function Lv(n){const e=n.split("."),t=[];let i="";for(const s of e)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(t.push(i),i="");return t}function $a(n){return n.charAt(0).toUpperCase()+n.slice(1)}const $n=n=>typeof n<"u",yi=n=>typeof n=="function",Gu=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function Nv(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const gt=Math.PI,ot=2*gt,Fv=ot+gt,So=Number.POSITIVE_INFINITY,Rv=gt/180,ht=gt/2,qs=gt/4,Xu=gt*2/3,yn=Math.log10,zn=Math.sign;function Qu(n){const e=Math.round(n);n=tl(n,e,n/1e3)?e:n;const t=Math.pow(10,Math.floor(yn(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function Hv(n){const e=[],t=Math.sqrt(n);let i;for(i=1;is-l).pop(),e}function Cs(n){return!isNaN(parseFloat(n))&&isFinite(n)}function tl(n,e,t){return Math.abs(n-e)=n}function Rg(n,e,t){let i,s,l;for(i=0,s=n.length;ia&&u=Math.min(e,t)-i&&n<=Math.max(e,t)+i}function Ta(n,e,t){t=t||(o=>n[o]1;)l=s+i>>1,t(l)?s=l:i=l;return{lo:s,hi:i}}const qi=(n,e,t,i)=>Ta(n,t,i?s=>n[s][e]<=t:s=>n[s][e]Ta(n,t,i=>n[i][e]>=t);function Bv(n,e,t){let i=0,s=n.length;for(;ii&&n[s-1]>t;)s--;return i>0||s{const i="_onData"+$a(t),s=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...l){const o=s.apply(this,l);return n._chartjs.listeners.forEach(r=>{typeof r[i]=="function"&&r[i](...l)}),o}})})}function ef(n,e){const t=n._chartjs;if(!t)return;const i=t.listeners,s=i.indexOf(e);s!==-1&&i.splice(s,1),!(i.length>0)&&(jg.forEach(l=>{delete n[l]}),delete n._chartjs)}function qg(n){const e=new Set;let t,i;for(t=0,i=n.length;t"u"?function(n){return n()}:window.requestAnimationFrame}();function zg(n,e,t){const i=t||(o=>Array.prototype.slice.call(o));let s=!1,l=[];return function(...o){l=i(o),s||(s=!0,Vg.call(window,()=>{s=!1,n.apply(e,l)}))}}function Wv(n,e){let t;return function(...i){return e?(clearTimeout(t),t=setTimeout(n,e,i)):n.apply(this,i),e}}const Yv=n=>n==="start"?"left":n==="end"?"right":"center",tf=(n,e,t)=>n==="start"?e:n==="end"?t:(e+t)/2;function Bg(n,e,t){const i=e.length;let s=0,l=i;if(n._sorted){const{iScale:o,_parsed:r}=n,a=o.axis,{min:u,max:f,minDefined:c,maxDefined:d}=o.getUserBounds();c&&(s=Rt(Math.min(qi(r,o.axis,u).lo,t?i:qi(e,a,o.getPixelForValue(u)).lo),0,i-1)),d?l=Rt(Math.max(qi(r,o.axis,f,!0).hi+1,t?0:qi(e,a,o.getPixelForValue(f),!0).hi+1),s,i)-s:l=i-s}return{start:s,count:l}}function Ug(n){const{xScale:e,yScale:t,_scaleRanges:i}=n,s={xmin:e.min,xmax:e.max,ymin:t.min,ymax:t.max};if(!i)return n._scaleRanges=s,!0;const l=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==t.min||i.ymax!==t.max;return Object.assign(i,s),l}const Ul=n=>n===0||n===1,nf=(n,e,t)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-e)*ot/t)),sf=(n,e,t)=>Math.pow(2,-10*n)*Math.sin((n-e)*ot/t)+1,nl={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*ht)+1,easeOutSine:n=>Math.sin(n*ht),easeInOutSine:n=>-.5*(Math.cos(gt*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>Ul(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>Ul(n)?n:nf(n,.075,.3),easeOutElastic:n=>Ul(n)?n:sf(n,.075,.3),easeInOutElastic(n){return Ul(n)?n:n<.5?.5*nf(n*2,.1125,.45):.5+.5*sf(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let e=1.70158;return(n/=.5)<1?.5*(n*n*(((e*=1.525)+1)*n-e)):.5*((n-=2)*n*(((e*=1.525)+1)*n+e)+2)},easeInBounce:n=>1-nl.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?nl.easeInBounce(n*2)*.5:nl.easeOutBounce(n*2-1)*.5+.5};/*! + */function Qn(){}const Av=function(){let n=0;return function(){return n++}}();function it(n){return n===null||typeof n>"u"}function ft(n){if(Array.isArray&&Array.isArray(n))return!0;const e=Object.prototype.toString.call(n);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function Ye(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}const _t=n=>(typeof n=="number"||n instanceof Number)&&isFinite(+n);function gn(n,e){return _t(n)?n:e}function Xe(n,e){return typeof n>"u"?e:n}const Ev=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:n/e,Fg=(n,e)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*e:+n;function pt(n,e,t){if(n&&typeof n.call=="function")return n.apply(t,e)}function lt(n,e,t,i){let s,l,o;if(ft(n))if(l=n.length,i)for(s=l-1;s>=0;s--)e.call(t,n[s],s);else for(s=0;sn,x:n=>n.x,y:n=>n.y};function vi(n,e){return(Gu[e]||(Gu[e]=Lv(e)))(n)}function Lv(n){const e=Nv(n);return t=>{for(const i of e){if(i==="")break;t=t&&t[i]}return t}}function Nv(n){const e=n.split("."),t=[];let i="";for(const s of e)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(t.push(i),i="");return t}function Ca(n){return n.charAt(0).toUpperCase()+n.slice(1)}const $n=n=>typeof n<"u",yi=n=>typeof n=="function",Xu=(n,e)=>{if(n.size!==e.size)return!1;for(const t of n)if(!e.has(t))return!1;return!0};function Fv(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const gt=Math.PI,ot=2*gt,Rv=ot+gt,$o=Number.POSITIVE_INFINITY,Hv=gt/180,ht=gt/2,Vs=gt/4,Qu=gt*2/3,yn=Math.log10,zn=Math.sign;function xu(n){const e=Math.round(n);n=nl(n,e,n/1e3)?e:n;const t=Math.pow(10,Math.floor(yn(n))),i=n/t;return(i<=1?1:i<=2?2:i<=5?5:10)*t}function jv(n){const e=[],t=Math.sqrt(n);let i;for(i=1;is-l).pop(),e}function Ts(n){return!isNaN(parseFloat(n))&&isFinite(n)}function nl(n,e,t){return Math.abs(n-e)=n}function Hg(n,e,t){let i,s,l;for(i=0,s=n.length;ia&&u=Math.min(e,t)-i&&n<=Math.max(e,t)+i}function Ma(n,e,t){t=t||(o=>n[o]1;)l=s+i>>1,t(l)?s=l:i=l;return{lo:s,hi:i}}const qi=(n,e,t,i)=>Ma(n,t,i?s=>n[s][e]<=t:s=>n[s][e]Ma(n,t,i=>n[i][e]>=t);function Uv(n,e,t){let i=0,s=n.length;for(;ii&&n[s-1]>t;)s--;return i>0||s{const i="_onData"+Ca(t),s=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...l){const o=s.apply(this,l);return n._chartjs.listeners.forEach(r=>{typeof r[i]=="function"&&r[i](...l)}),o}})})}function tf(n,e){const t=n._chartjs;if(!t)return;const i=t.listeners,s=i.indexOf(e);s!==-1&&i.splice(s,1),!(i.length>0)&&(qg.forEach(l=>{delete n[l]}),delete n._chartjs)}function Vg(n){const e=new Set;let t,i;for(t=0,i=n.length;t"u"?function(n){return n()}:window.requestAnimationFrame}();function Bg(n,e,t){const i=t||(o=>Array.prototype.slice.call(o));let s=!1,l=[];return function(...o){l=i(o),s||(s=!0,zg.call(window,()=>{s=!1,n.apply(e,l)}))}}function Yv(n,e){let t;return function(...i){return e?(clearTimeout(t),t=setTimeout(n,e,i)):n.apply(this,i),e}}const Kv=n=>n==="start"?"left":n==="end"?"right":"center",nf=(n,e,t)=>n==="start"?e:n==="end"?t:(e+t)/2;function Ug(n,e,t){const i=e.length;let s=0,l=i;if(n._sorted){const{iScale:o,_parsed:r}=n,a=o.axis,{min:u,max:f,minDefined:c,maxDefined:d}=o.getUserBounds();c&&(s=Rt(Math.min(qi(r,o.axis,u).lo,t?i:qi(e,a,o.getPixelForValue(u)).lo),0,i-1)),d?l=Rt(Math.max(qi(r,o.axis,f,!0).hi+1,t?0:qi(e,a,o.getPixelForValue(f),!0).hi+1),s,i)-s:l=i-s}return{start:s,count:l}}function Wg(n){const{xScale:e,yScale:t,_scaleRanges:i}=n,s={xmin:e.min,xmax:e.max,ymin:t.min,ymax:t.max};if(!i)return n._scaleRanges=s,!0;const l=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==t.min||i.ymax!==t.max;return Object.assign(i,s),l}const Wl=n=>n===0||n===1,sf=(n,e,t)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-e)*ot/t)),lf=(n,e,t)=>Math.pow(2,-10*n)*Math.sin((n-e)*ot/t)+1,il={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*ht)+1,easeOutSine:n=>Math.sin(n*ht),easeInOutSine:n=>-.5*(Math.cos(gt*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>Wl(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>Wl(n)?n:sf(n,.075,.3),easeOutElastic:n=>Wl(n)?n:lf(n,.075,.3),easeInOutElastic(n){return Wl(n)?n:n<.5?.5*sf(n*2,.1125,.45):.5+.5*lf(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let e=1.70158;return(n/=.5)<1?.5*(n*n*(((e*=1.525)+1)*n-e)):.5*((n-=2)*n*(((e*=1.525)+1)*n+e)+2)},easeInBounce:n=>1-il.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?il.easeInBounce(n*2)*.5:il.easeOutBounce(n*2-1)*.5+.5};/*! * @kurkle/color v0.2.1 * https://github.com/kurkle/color#readme * (c) 2022 Jukka Kurkela * Released under the MIT License - */function Ol(n){return n+.5|0}const hi=(n,e,t)=>Math.max(Math.min(n,t),e);function Gs(n){return hi(Ol(n*2.55),0,255)}function bi(n){return hi(Ol(n*255),0,255)}function ti(n){return hi(Ol(n/2.55)/100,0,1)}function lf(n){return hi(Ol(n*100),0,100)}const mn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Ur=[..."0123456789ABCDEF"],Kv=n=>Ur[n&15],Jv=n=>Ur[(n&240)>>4]+Ur[n&15],Wl=n=>(n&240)>>4===(n&15),Zv=n=>Wl(n.r)&&Wl(n.g)&&Wl(n.b)&&Wl(n.a);function Gv(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&mn[n[1]]*17,g:255&mn[n[2]]*17,b:255&mn[n[3]]*17,a:e===5?mn[n[4]]*17:255}:(e===7||e===9)&&(t={r:mn[n[1]]<<4|mn[n[2]],g:mn[n[3]]<<4|mn[n[4]],b:mn[n[5]]<<4|mn[n[6]],a:e===9?mn[n[7]]<<4|mn[n[8]]:255})),t}const Xv=(n,e)=>n<255?e(n):"";function Qv(n){var e=Zv(n)?Kv:Jv;return n?"#"+e(n.r)+e(n.g)+e(n.b)+Xv(n.a,e):void 0}const xv=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Wg(n,e,t){const i=e*Math.min(t,1-t),s=(l,o=(l+n/30)%12)=>t-i*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function ey(n,e,t){const i=(s,l=(s+n/60)%6)=>t-t*e*Math.max(Math.min(l,4-l,1),0);return[i(5),i(3),i(1)]}function ty(n,e,t){const i=Wg(n,1,.5);let s;for(e+t>1&&(s=1/(e+t),e*=s,t*=s),s=0;s<3;s++)i[s]*=1-e-t,i[s]+=e;return i}function ny(n,e,t,i,s){return n===s?(e-t)/i+(e.5?f/(2-l-o):f/(l+o),a=ny(t,i,s,f,l),a=a*60+.5),[a|0,u||0,r]}function Oa(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(bi)}function Da(n,e,t){return Oa(Wg,n,e,t)}function iy(n,e,t){return Oa(ty,n,e,t)}function sy(n,e,t){return Oa(ey,n,e,t)}function Yg(n){return(n%360+360)%360}function ly(n){const e=xv.exec(n);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?Gs(+e[5]):bi(+e[5]));const s=Yg(+e[2]),l=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=iy(s,l,o):e[1]==="hsv"?i=sy(s,l,o):i=Da(s,l,o),{r:i[0],g:i[1],b:i[2],a:t}}function oy(n,e){var t=Ma(n);t[0]=Yg(t[0]+e),t=Da(t),n.r=t[0],n.g=t[1],n.b=t[2]}function ry(n){if(!n)return;const e=Ma(n),t=e[0],i=lf(e[1]),s=lf(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${ti(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}const of={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},rf={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function ay(){const n={},e=Object.keys(rf),t=Object.keys(of);let i,s,l,o,r;for(i=0;i>16&255,l>>8&255,l&255]}return n}let Yl;function uy(n){Yl||(Yl=ay(),Yl.transparent=[0,0,0,0]);const e=Yl[n.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const fy=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function cy(n){const e=fy.exec(n);let t=255,i,s,l;if(!!e){if(e[7]!==i){const o=+e[7];t=e[8]?Gs(o):hi(o*255,0,255)}return i=+e[1],s=+e[3],l=+e[5],i=255&(e[2]?Gs(i):hi(i,0,255)),s=255&(e[4]?Gs(s):hi(s,0,255)),l=255&(e[6]?Gs(l):hi(l,0,255)),{r:i,g:s,b:l,a:t}}}function dy(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${ti(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const lr=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,fs=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function py(n,e,t){const i=fs(ti(n.r)),s=fs(ti(n.g)),l=fs(ti(n.b));return{r:bi(lr(i+t*(fs(ti(e.r))-i))),g:bi(lr(s+t*(fs(ti(e.g))-s))),b:bi(lr(l+t*(fs(ti(e.b))-l))),a:n.a+t*(e.a-n.a)}}function Kl(n,e,t){if(n){let i=Ma(n);i[e]=Math.max(0,Math.min(i[e]+i[e]*t,e===0?360:1)),i=Da(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function Kg(n,e){return n&&Object.assign(e||{},n)}function af(n){var e={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(e={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(e.a=bi(n[3]))):(e=Kg(n,{r:0,g:0,b:0,a:1}),e.a=bi(e.a)),e}function hy(n){return n.charAt(0)==="r"?cy(n):ly(n)}class $o{constructor(e){if(e instanceof $o)return e;const t=typeof e;let i;t==="object"?i=af(e):t==="string"&&(i=Gv(e)||uy(e)||hy(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=Kg(this._rgb);return e&&(e.a=ti(e.a)),e}set rgb(e){this._rgb=af(e)}rgbString(){return this._valid?dy(this._rgb):void 0}hexString(){return this._valid?Qv(this._rgb):void 0}hslString(){return this._valid?ry(this._rgb):void 0}mix(e,t){if(e){const i=this.rgb,s=e.rgb;let l;const o=t===l?.5:t,r=2*o-1,a=i.a-s.a,u=((r*a===-1?r:(r+a)/(1+r*a))+1)/2;l=1-u,i.r=255&u*i.r+l*s.r+.5,i.g=255&u*i.g+l*s.g+.5,i.b=255&u*i.b+l*s.b+.5,i.a=o*i.a+(1-o)*s.a,this.rgb=i}return this}interpolate(e,t){return e&&(this._rgb=py(this._rgb,e._rgb,t)),this}clone(){return new $o(this.rgb)}alpha(e){return this._rgb.a=bi(e),this}clearer(e){const t=this._rgb;return t.a*=1-e,this}greyscale(){const e=this._rgb,t=Ol(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=t,this}opaquer(e){const t=this._rgb;return t.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Kl(this._rgb,2,e),this}darken(e){return Kl(this._rgb,2,-e),this}saturate(e){return Kl(this._rgb,1,e),this}desaturate(e){return Kl(this._rgb,1,-e),this}rotate(e){return oy(this._rgb,e),this}}function Jg(n){return new $o(n)}function Zg(n){if(n&&typeof n=="object"){const e=n.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function uf(n){return Zg(n)?n:Jg(n)}function or(n){return Zg(n)?n:Jg(n).saturate(.5).darken(.1).hexString()}const Ji=Object.create(null),Wr=Object.create(null);function il(n,e){if(!e)return n;const t=e.split(".");for(let i=0,s=t.length;it.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,i)=>or(i.backgroundColor),this.hoverBorderColor=(t,i)=>or(i.borderColor),this.hoverColor=(t,i)=>or(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e)}set(e,t){return rr(this,e,t)}get(e){return il(this,e)}describe(e,t){return rr(Wr,e,t)}override(e,t){return rr(Ji,e,t)}route(e,t,i,s){const l=il(this,e),o=il(this,i),r="_"+t;Object.defineProperties(l,{[r]:{value:l[t],writable:!0},[t]:{enumerable:!0,get(){const a=this[r],u=o[s];return Ye(a)?Object.assign({},u,a):Xe(a,u)},set(a){this[r]=a}}})}}var Qe=new my({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function gy(n){return!n||it(n.size)||it(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function Co(n,e,t,i,s){let l=e[s];return l||(l=e[s]=n.measureText(s).width,t.push(s)),l>i&&(i=l),i}function _y(n,e,t,i){i=i||{};let s=i.data=i.data||{},l=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(s=i.data={},l=i.garbageCollect=[],i.font=e),n.save(),n.font=e;let o=0;const r=t.length;let a,u,f,c,d;for(a=0;at.length){for(a=0;a0&&n.stroke()}}function hl(n,e,t){return t=t||.5,!e||n&&n.x>e.left-t&&n.xe.top-t&&n.y0&&l.strokeColor!=="";let a,u;for(n.save(),n.font=s.string,ky(n,l),a=0;a+n||0;function Ia(n,e){const t={},i=Ye(e),s=i?Object.keys(e):e,l=Ye(n)?i?o=>Xe(n[o],n[e[o]]):o=>n[o]:()=>n;for(const o of s)t[o]=Ty(l(o));return t}function Gg(n){return Ia(n,{top:"y",right:"x",bottom:"y",left:"x"})}function _s(n){return Ia(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Cn(n){const e=Gg(n);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function un(n,e){n=n||{},e=e||Qe.font;let t=Xe(n.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let i=Xe(n.style,e.style);i&&!(""+i).match($y)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");const s={family:Xe(n.family,e.family),lineHeight:Cy(Xe(n.lineHeight,e.lineHeight),t),size:t,style:i,weight:Xe(n.weight,e.weight),string:""};return s.string=gy(s),s}function Jl(n,e,t,i){let s=!0,l,o,r;for(l=0,o=n.length;lt&&r===0?0:r+a;return{min:o(i,-Math.abs(l)),max:o(s,l)}}function Si(n,e){return Object.assign(Object.create(n),e)}function Pa(n,e=[""],t=n,i,s=()=>n[0]){$n(i)||(i=e_("_fallback",n));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:t,_fallback:i,_getTarget:s,override:o=>Pa([o,...n],e,t,i)};return new Proxy(l,{deleteProperty(o,r){return delete o[r],delete o._keys,delete n[0][r],!0},get(o,r){return Qg(o,r,()=>Ny(r,e,n,o))},getOwnPropertyDescriptor(o,r){return Reflect.getOwnPropertyDescriptor(o._scopes[0],r)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(o,r){return df(o).includes(r)},ownKeys(o){return df(o)},set(o,r,a){const u=o._storage||(o._storage=s());return o[r]=u[r]=a,delete o._keys,!0}})}function Ts(n,e,t,i){const s={_cacheable:!1,_proxy:n,_context:e,_subProxy:t,_stack:new Set,_descriptors:Xg(n,i),setContext:l=>Ts(n,l,t,i),override:l=>Ts(n.override(l),e,t,i)};return new Proxy(s,{deleteProperty(l,o){return delete l[o],delete n[o],!0},get(l,o,r){return Qg(l,o,()=>Dy(l,o,r))},getOwnPropertyDescriptor(l,o){return l._descriptors.allKeys?Reflect.has(n,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,o)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(l,o){return Reflect.has(n,o)},ownKeys(){return Reflect.ownKeys(n)},set(l,o,r){return n[o]=r,delete l[o],!0}})}function Xg(n,e={scriptable:!0,indexable:!0}){const{_scriptable:t=e.scriptable,_indexable:i=e.indexable,_allKeys:s=e.allKeys}=n;return{allKeys:s,scriptable:t,indexable:i,isScriptable:yi(t)?t:()=>t,isIndexable:yi(i)?i:()=>i}}const Oy=(n,e)=>n?n+$a(e):e,La=(n,e)=>Ye(e)&&n!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Qg(n,e,t){if(Object.prototype.hasOwnProperty.call(n,e))return n[e];const i=t();return n[e]=i,i}function Dy(n,e,t){const{_proxy:i,_context:s,_subProxy:l,_descriptors:o}=n;let r=i[e];return yi(r)&&o.isScriptable(e)&&(r=Ay(e,r,n,t)),ft(r)&&r.length&&(r=Ey(e,r,n,o.isIndexable)),La(e,r)&&(r=Ts(r,s,l&&l[e],o)),r}function Ay(n,e,t,i){const{_proxy:s,_context:l,_subProxy:o,_stack:r}=t;if(r.has(n))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+n);return r.add(n),e=e(l,o||i),r.delete(n),La(n,e)&&(e=Na(s._scopes,s,n,e)),e}function Ey(n,e,t,i){const{_proxy:s,_context:l,_subProxy:o,_descriptors:r}=t;if($n(l.index)&&i(n))e=e[l.index%e.length];else if(Ye(e[0])){const a=e,u=s._scopes.filter(f=>f!==a);e=[];for(const f of a){const c=Na(u,s,n,f);e.push(Ts(c,l,o&&o[n],r))}}return e}function xg(n,e,t){return yi(n)?n(e,t):n}const Iy=(n,e)=>n===!0?e:typeof n=="string"?vi(e,n):void 0;function Py(n,e,t,i,s){for(const l of e){const o=Iy(t,l);if(o){n.add(o);const r=xg(o._fallback,t,s);if($n(r)&&r!==t&&r!==i)return r}else if(o===!1&&$n(i)&&t!==i)return null}return!1}function Na(n,e,t,i){const s=e._rootScopes,l=xg(e._fallback,t,i),o=[...n,...s],r=new Set;r.add(i);let a=cf(r,o,t,l||t,i);return a===null||$n(l)&&l!==t&&(a=cf(r,o,l,a,i),a===null)?!1:Pa(Array.from(r),[""],s,l,()=>Ly(e,t,i))}function cf(n,e,t,i,s){for(;t;)t=Py(n,e,t,i,s);return t}function Ly(n,e,t){const i=n._getTarget();e in i||(i[e]={});const s=i[e];return ft(s)&&Ye(t)?t:s}function Ny(n,e,t,i){let s;for(const l of e)if(s=e_(Oy(l,n),t),$n(s))return La(n,s)?Na(t,i,n,s):s}function e_(n,e){for(const t of e){if(!t)continue;const i=t[n];if($n(i))return i}}function df(n){let e=n._keys;return e||(e=n._keys=Fy(n._scopes)),e}function Fy(n){const e=new Set;for(const t of n)for(const i of Object.keys(t).filter(s=>!s.startsWith("_")))e.add(i);return Array.from(e)}function t_(n,e,t,i){const{iScale:s}=n,{key:l="r"}=this._parsing,o=new Array(i);let r,a,u,f;for(r=0,a=i;ren==="x"?"y":"x";function Hy(n,e,t,i){const s=n.skip?e:n,l=e,o=t.skip?e:t,r=Br(l,s),a=Br(o,l);let u=r/(r+a),f=a/(r+a);u=isNaN(u)?0:u,f=isNaN(f)?0:f;const c=i*u,d=i*f;return{previous:{x:l.x-c*(o.x-s.x),y:l.y-c*(o.y-s.y)},next:{x:l.x+d*(o.x-s.x),y:l.y+d*(o.y-s.y)}}}function jy(n,e,t){const i=n.length;let s,l,o,r,a,u=Ms(n,0);for(let f=0;f!u.skip)),e.cubicInterpolationMode==="monotone")Vy(n,s);else{let u=i?n[n.length-1]:n[0];for(l=0,o=n.length;lwindow.getComputedStyle(n,null);function Uy(n,e){return Bo(n).getPropertyValue(e)}const Wy=["top","right","bottom","left"];function Bi(n,e,t){const i={};t=t?"-"+t:"";for(let s=0;s<4;s++){const l=Wy[s];i[l]=parseFloat(n[e+"-"+l+t])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const Yy=(n,e,t)=>(n>0||e>0)&&(!t||!t.shadowRoot);function Ky(n,e){const t=n.touches,i=t&&t.length?t[0]:n,{offsetX:s,offsetY:l}=i;let o=!1,r,a;if(Yy(s,l,n.target))r=s,a=l;else{const u=e.getBoundingClientRect();r=i.clientX-u.left,a=i.clientY-u.top,o=!0}return{x:r,y:a,box:o}}function Ri(n,e){if("native"in n)return n;const{canvas:t,currentDevicePixelRatio:i}=e,s=Bo(t),l=s.boxSizing==="border-box",o=Bi(s,"padding"),r=Bi(s,"border","width"),{x:a,y:u,box:f}=Ky(n,t),c=o.left+(f&&r.left),d=o.top+(f&&r.top);let{width:h,height:m}=e;return l&&(h-=o.width+r.width,m-=o.height+r.height),{x:Math.round((a-c)/h*t.width/i),y:Math.round((u-d)/m*t.height/i)}}function Jy(n,e,t){let i,s;if(e===void 0||t===void 0){const l=Fa(n);if(!l)e=n.clientWidth,t=n.clientHeight;else{const o=l.getBoundingClientRect(),r=Bo(l),a=Bi(r,"border","width"),u=Bi(r,"padding");e=o.width-u.width-a.width,t=o.height-u.height-a.height,i=Oo(r.maxWidth,l,"clientWidth"),s=Oo(r.maxHeight,l,"clientHeight")}}return{width:e,height:t,maxWidth:i||So,maxHeight:s||So}}const ar=n=>Math.round(n*10)/10;function Zy(n,e,t,i){const s=Bo(n),l=Bi(s,"margin"),o=Oo(s.maxWidth,n,"clientWidth")||So,r=Oo(s.maxHeight,n,"clientHeight")||So,a=Jy(n,e,t);let{width:u,height:f}=a;if(s.boxSizing==="content-box"){const c=Bi(s,"border","width"),d=Bi(s,"padding");u-=d.width+c.width,f-=d.height+c.height}return u=Math.max(0,u-l.width),f=Math.max(0,i?Math.floor(u/i):f-l.height),u=ar(Math.min(u,o,a.maxWidth)),f=ar(Math.min(f,r,a.maxHeight)),u&&!f&&(f=ar(u/2)),{width:u,height:f}}function pf(n,e,t){const i=e||1,s=Math.floor(n.height*i),l=Math.floor(n.width*i);n.height=s/i,n.width=l/i;const o=n.canvas;return o.style&&(t||!o.style.height&&!o.style.width)&&(o.style.height=`${n.height}px`,o.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||o.height!==s||o.width!==l?(n.currentDevicePixelRatio=i,o.height=s,o.width=l,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}const Gy=function(){let n=!1;try{const e={get passive(){return n=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return n}();function hf(n,e){const t=Uy(n,e),i=t&&t.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Hi(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:n.y+t*(e.y-n.y)}}function Xy(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:i==="middle"?t<.5?n.y:e.y:i==="after"?t<1?n.y:e.y:t>0?e.y:n.y}}function Qy(n,e,t,i){const s={x:n.cp2x,y:n.cp2y},l={x:e.cp1x,y:e.cp1y},o=Hi(n,s,t),r=Hi(s,l,t),a=Hi(l,e,t),u=Hi(o,r,t),f=Hi(r,a,t);return Hi(u,f,t)}const mf=new Map;function xy(n,e){e=e||{};const t=n+JSON.stringify(e);let i=mf.get(t);return i||(i=new Intl.NumberFormat(n,e),mf.set(t,i)),i}function Dl(n,e,t){return xy(e,t).format(n)}const e2=function(n,e){return{x(t){return n+n+e-t},setWidth(t){e=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,i){return t-i},leftForLtr(t,i){return t-i}}},t2=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,e){return n+e},leftForLtr(n,e){return n}}};function ur(n,e,t){return n?e2(e,t):t2()}function n2(n,e){let t,i;(e==="ltr"||e==="rtl")&&(t=n.canvas.style,i=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",e,"important"),n.prevTextDirection=i)}function i2(n,e){e!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",e[0],e[1]))}function s_(n){return n==="angle"?{between:dl,compare:qv,normalize:an}:{between:pl,compare:(e,t)=>e-t,normalize:e=>e}}function gf({start:n,end:e,count:t,loop:i,style:s}){return{start:n%t,end:e%t,loop:i&&(e-n+1)%t===0,style:s}}function s2(n,e,t){const{property:i,start:s,end:l}=t,{between:o,normalize:r}=s_(i),a=e.length;let{start:u,end:f,loop:c}=n,d,h;if(c){for(u+=a,f+=a,d=0,h=a;da(s,$,y)&&r(s,$)!==0,M=()=>r(l,y)===0||a(l,$,y),T=()=>b||C(),D=()=>!b||M();for(let A=f,I=f;A<=c;++A)k=e[A%o],!k.skip&&(y=u(k[i]),y!==$&&(b=a(y,s,l),g===null&&T()&&(g=r(y,s)===0?A:I),g!==null&&D()&&(m.push(gf({start:g,end:A,loop:d,count:o,style:h})),g=null),I=A,$=y));return g!==null&&m.push(gf({start:g,end:c,loop:d,count:o,style:h})),m}function o_(n,e){const t=[],i=n.segments;for(let s=0;ss&&n[l%e].skip;)l--;return l%=e,{start:s,end:l}}function o2(n,e,t,i){const s=n.length,l=[];let o=e,r=n[e],a;for(a=e+1;a<=t;++a){const u=n[a%s];u.skip||u.stop?r.skip||(i=!1,l.push({start:e%s,end:(a-1)%s,loop:i}),e=o=u.stop?a:null):(o=a,r.skip&&(e=a)),r=u}return o!==null&&l.push({start:e%s,end:o%s,loop:i}),l}function r2(n,e){const t=n.points,i=n.options.spanGaps,s=t.length;if(!s)return[];const l=!!n._loop,{start:o,end:r}=l2(t,s,l,i);if(i===!0)return _f(n,[{start:o,end:r,loop:l}],t,e);const a=rMath.max(Math.min(n,t),e);function Xs(n){return hi(Dl(n*2.55),0,255)}function bi(n){return hi(Dl(n*255),0,255)}function ti(n){return hi(Dl(n/2.55)/100,0,1)}function of(n){return hi(Dl(n*100),0,100)}const mn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Wr=[..."0123456789ABCDEF"],Jv=n=>Wr[n&15],Zv=n=>Wr[(n&240)>>4]+Wr[n&15],Yl=n=>(n&240)>>4===(n&15),Gv=n=>Yl(n.r)&&Yl(n.g)&&Yl(n.b)&&Yl(n.a);function Xv(n){var e=n.length,t;return n[0]==="#"&&(e===4||e===5?t={r:255&mn[n[1]]*17,g:255&mn[n[2]]*17,b:255&mn[n[3]]*17,a:e===5?mn[n[4]]*17:255}:(e===7||e===9)&&(t={r:mn[n[1]]<<4|mn[n[2]],g:mn[n[3]]<<4|mn[n[4]],b:mn[n[5]]<<4|mn[n[6]],a:e===9?mn[n[7]]<<4|mn[n[8]]:255})),t}const Qv=(n,e)=>n<255?e(n):"";function xv(n){var e=Gv(n)?Jv:Zv;return n?"#"+e(n.r)+e(n.g)+e(n.b)+Qv(n.a,e):void 0}const ey=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Yg(n,e,t){const i=e*Math.min(t,1-t),s=(l,o=(l+n/30)%12)=>t-i*Math.max(Math.min(o-3,9-o,1),-1);return[s(0),s(8),s(4)]}function ty(n,e,t){const i=(s,l=(s+n/60)%6)=>t-t*e*Math.max(Math.min(l,4-l,1),0);return[i(5),i(3),i(1)]}function ny(n,e,t){const i=Yg(n,1,.5);let s;for(e+t>1&&(s=1/(e+t),e*=s,t*=s),s=0;s<3;s++)i[s]*=1-e-t,i[s]+=e;return i}function iy(n,e,t,i,s){return n===s?(e-t)/i+(e.5?f/(2-l-o):f/(l+o),a=iy(t,i,s,f,l),a=a*60+.5),[a|0,u||0,r]}function Da(n,e,t,i){return(Array.isArray(e)?n(e[0],e[1],e[2]):n(e,t,i)).map(bi)}function Aa(n,e,t){return Da(Yg,n,e,t)}function sy(n,e,t){return Da(ny,n,e,t)}function ly(n,e,t){return Da(ty,n,e,t)}function Kg(n){return(n%360+360)%360}function oy(n){const e=ey.exec(n);let t=255,i;if(!e)return;e[5]!==i&&(t=e[6]?Xs(+e[5]):bi(+e[5]));const s=Kg(+e[2]),l=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=sy(s,l,o):e[1]==="hsv"?i=ly(s,l,o):i=Aa(s,l,o),{r:i[0],g:i[1],b:i[2],a:t}}function ry(n,e){var t=Oa(n);t[0]=Kg(t[0]+e),t=Aa(t),n.r=t[0],n.g=t[1],n.b=t[2]}function ay(n){if(!n)return;const e=Oa(n),t=e[0],i=of(e[1]),s=of(e[2]);return n.a<255?`hsla(${t}, ${i}%, ${s}%, ${ti(n.a)})`:`hsl(${t}, ${i}%, ${s}%)`}const rf={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},af={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function uy(){const n={},e=Object.keys(af),t=Object.keys(rf);let i,s,l,o,r;for(i=0;i>16&255,l>>8&255,l&255]}return n}let Kl;function fy(n){Kl||(Kl=uy(),Kl.transparent=[0,0,0,0]);const e=Kl[n.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const cy=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function dy(n){const e=cy.exec(n);let t=255,i,s,l;if(!!e){if(e[7]!==i){const o=+e[7];t=e[8]?Xs(o):hi(o*255,0,255)}return i=+e[1],s=+e[3],l=+e[5],i=255&(e[2]?Xs(i):hi(i,0,255)),s=255&(e[4]?Xs(s):hi(s,0,255)),l=255&(e[6]?Xs(l):hi(l,0,255)),{r:i,g:s,b:l,a:t}}}function py(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${ti(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const or=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,fs=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function hy(n,e,t){const i=fs(ti(n.r)),s=fs(ti(n.g)),l=fs(ti(n.b));return{r:bi(or(i+t*(fs(ti(e.r))-i))),g:bi(or(s+t*(fs(ti(e.g))-s))),b:bi(or(l+t*(fs(ti(e.b))-l))),a:n.a+t*(e.a-n.a)}}function Jl(n,e,t){if(n){let i=Oa(n);i[e]=Math.max(0,Math.min(i[e]+i[e]*t,e===0?360:1)),i=Aa(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function Jg(n,e){return n&&Object.assign(e||{},n)}function uf(n){var e={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(e={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(e.a=bi(n[3]))):(e=Jg(n,{r:0,g:0,b:0,a:1}),e.a=bi(e.a)),e}function my(n){return n.charAt(0)==="r"?dy(n):oy(n)}class Co{constructor(e){if(e instanceof Co)return e;const t=typeof e;let i;t==="object"?i=uf(e):t==="string"&&(i=Xv(e)||fy(e)||my(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=Jg(this._rgb);return e&&(e.a=ti(e.a)),e}set rgb(e){this._rgb=uf(e)}rgbString(){return this._valid?py(this._rgb):void 0}hexString(){return this._valid?xv(this._rgb):void 0}hslString(){return this._valid?ay(this._rgb):void 0}mix(e,t){if(e){const i=this.rgb,s=e.rgb;let l;const o=t===l?.5:t,r=2*o-1,a=i.a-s.a,u=((r*a===-1?r:(r+a)/(1+r*a))+1)/2;l=1-u,i.r=255&u*i.r+l*s.r+.5,i.g=255&u*i.g+l*s.g+.5,i.b=255&u*i.b+l*s.b+.5,i.a=o*i.a+(1-o)*s.a,this.rgb=i}return this}interpolate(e,t){return e&&(this._rgb=hy(this._rgb,e._rgb,t)),this}clone(){return new Co(this.rgb)}alpha(e){return this._rgb.a=bi(e),this}clearer(e){const t=this._rgb;return t.a*=1-e,this}greyscale(){const e=this._rgb,t=Dl(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=t,this}opaquer(e){const t=this._rgb;return t.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Jl(this._rgb,2,e),this}darken(e){return Jl(this._rgb,2,-e),this}saturate(e){return Jl(this._rgb,1,e),this}desaturate(e){return Jl(this._rgb,1,-e),this}rotate(e){return ry(this._rgb,e),this}}function Zg(n){return new Co(n)}function Gg(n){if(n&&typeof n=="object"){const e=n.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function ff(n){return Gg(n)?n:Zg(n)}function rr(n){return Gg(n)?n:Zg(n).saturate(.5).darken(.1).hexString()}const Ji=Object.create(null),Yr=Object.create(null);function sl(n,e){if(!e)return n;const t=e.split(".");for(let i=0,s=t.length;it.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,i)=>rr(i.backgroundColor),this.hoverBorderColor=(t,i)=>rr(i.borderColor),this.hoverColor=(t,i)=>rr(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e)}set(e,t){return ar(this,e,t)}get(e){return sl(this,e)}describe(e,t){return ar(Yr,e,t)}override(e,t){return ar(Ji,e,t)}route(e,t,i,s){const l=sl(this,e),o=sl(this,i),r="_"+t;Object.defineProperties(l,{[r]:{value:l[t],writable:!0},[t]:{enumerable:!0,get(){const a=this[r],u=o[s];return Ye(a)?Object.assign({},u,a):Xe(a,u)},set(a){this[r]=a}}})}}var Qe=new gy({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function _y(n){return!n||it(n.size)||it(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function To(n,e,t,i,s){let l=e[s];return l||(l=e[s]=n.measureText(s).width,t.push(s)),l>i&&(i=l),i}function by(n,e,t,i){i=i||{};let s=i.data=i.data||{},l=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(s=i.data={},l=i.garbageCollect=[],i.font=e),n.save(),n.font=e;let o=0;const r=t.length;let a,u,f,c,d;for(a=0;at.length){for(a=0;a0&&n.stroke()}}function ml(n,e,t){return t=t||.5,!e||n&&n.x>e.left-t&&n.xe.top-t&&n.y0&&l.strokeColor!=="";let a,u;for(n.save(),n.font=s.string,wy(n,l),a=0;a+n||0;function Pa(n,e){const t={},i=Ye(e),s=i?Object.keys(e):e,l=Ye(n)?i?o=>Xe(n[o],n[e[o]]):o=>n[o]:()=>n;for(const o of s)t[o]=My(l(o));return t}function Xg(n){return Pa(n,{top:"y",right:"x",bottom:"y",left:"x"})}function bs(n){return Pa(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Cn(n){const e=Xg(n);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function un(n,e){n=n||{},e=e||Qe.font;let t=Xe(n.size,e.size);typeof t=="string"&&(t=parseInt(t,10));let i=Xe(n.style,e.style);i&&!(""+i).match(Cy)&&(console.warn('Invalid font style specified: "'+i+'"'),i="");const s={family:Xe(n.family,e.family),lineHeight:Ty(Xe(n.lineHeight,e.lineHeight),t),size:t,style:i,weight:Xe(n.weight,e.weight),string:""};return s.string=_y(s),s}function Zl(n,e,t,i){let s=!0,l,o,r;for(l=0,o=n.length;lt&&r===0?0:r+a;return{min:o(i,-Math.abs(l)),max:o(s,l)}}function Si(n,e){return Object.assign(Object.create(n),e)}function La(n,e=[""],t=n,i,s=()=>n[0]){$n(i)||(i=t_("_fallback",n));const l={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:t,_fallback:i,_getTarget:s,override:o=>La([o,...n],e,t,i)};return new Proxy(l,{deleteProperty(o,r){return delete o[r],delete o._keys,delete n[0][r],!0},get(o,r){return xg(o,r,()=>Fy(r,e,n,o))},getOwnPropertyDescriptor(o,r){return Reflect.getOwnPropertyDescriptor(o._scopes[0],r)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(o,r){return pf(o).includes(r)},ownKeys(o){return pf(o)},set(o,r,a){const u=o._storage||(o._storage=s());return o[r]=u[r]=a,delete o._keys,!0}})}function Ms(n,e,t,i){const s={_cacheable:!1,_proxy:n,_context:e,_subProxy:t,_stack:new Set,_descriptors:Qg(n,i),setContext:l=>Ms(n,l,t,i),override:l=>Ms(n.override(l),e,t,i)};return new Proxy(s,{deleteProperty(l,o){return delete l[o],delete n[o],!0},get(l,o,r){return xg(l,o,()=>Ay(l,o,r))},getOwnPropertyDescriptor(l,o){return l._descriptors.allKeys?Reflect.has(n,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,o)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(l,o){return Reflect.has(n,o)},ownKeys(){return Reflect.ownKeys(n)},set(l,o,r){return n[o]=r,delete l[o],!0}})}function Qg(n,e={scriptable:!0,indexable:!0}){const{_scriptable:t=e.scriptable,_indexable:i=e.indexable,_allKeys:s=e.allKeys}=n;return{allKeys:s,scriptable:t,indexable:i,isScriptable:yi(t)?t:()=>t,isIndexable:yi(i)?i:()=>i}}const Dy=(n,e)=>n?n+Ca(e):e,Na=(n,e)=>Ye(e)&&n!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function xg(n,e,t){if(Object.prototype.hasOwnProperty.call(n,e))return n[e];const i=t();return n[e]=i,i}function Ay(n,e,t){const{_proxy:i,_context:s,_subProxy:l,_descriptors:o}=n;let r=i[e];return yi(r)&&o.isScriptable(e)&&(r=Ey(e,r,n,t)),ft(r)&&r.length&&(r=Iy(e,r,n,o.isIndexable)),Na(e,r)&&(r=Ms(r,s,l&&l[e],o)),r}function Ey(n,e,t,i){const{_proxy:s,_context:l,_subProxy:o,_stack:r}=t;if(r.has(n))throw new Error("Recursion detected: "+Array.from(r).join("->")+"->"+n);return r.add(n),e=e(l,o||i),r.delete(n),Na(n,e)&&(e=Fa(s._scopes,s,n,e)),e}function Iy(n,e,t,i){const{_proxy:s,_context:l,_subProxy:o,_descriptors:r}=t;if($n(l.index)&&i(n))e=e[l.index%e.length];else if(Ye(e[0])){const a=e,u=s._scopes.filter(f=>f!==a);e=[];for(const f of a){const c=Fa(u,s,n,f);e.push(Ms(c,l,o&&o[n],r))}}return e}function e_(n,e,t){return yi(n)?n(e,t):n}const Py=(n,e)=>n===!0?e:typeof n=="string"?vi(e,n):void 0;function Ly(n,e,t,i,s){for(const l of e){const o=Py(t,l);if(o){n.add(o);const r=e_(o._fallback,t,s);if($n(r)&&r!==t&&r!==i)return r}else if(o===!1&&$n(i)&&t!==i)return null}return!1}function Fa(n,e,t,i){const s=e._rootScopes,l=e_(e._fallback,t,i),o=[...n,...s],r=new Set;r.add(i);let a=df(r,o,t,l||t,i);return a===null||$n(l)&&l!==t&&(a=df(r,o,l,a,i),a===null)?!1:La(Array.from(r),[""],s,l,()=>Ny(e,t,i))}function df(n,e,t,i,s){for(;t;)t=Ly(n,e,t,i,s);return t}function Ny(n,e,t){const i=n._getTarget();e in i||(i[e]={});const s=i[e];return ft(s)&&Ye(t)?t:s}function Fy(n,e,t,i){let s;for(const l of e)if(s=t_(Dy(l,n),t),$n(s))return Na(n,s)?Fa(t,i,n,s):s}function t_(n,e){for(const t of e){if(!t)continue;const i=t[n];if($n(i))return i}}function pf(n){let e=n._keys;return e||(e=n._keys=Ry(n._scopes)),e}function Ry(n){const e=new Set;for(const t of n)for(const i of Object.keys(t).filter(s=>!s.startsWith("_")))e.add(i);return Array.from(e)}function n_(n,e,t,i){const{iScale:s}=n,{key:l="r"}=this._parsing,o=new Array(i);let r,a,u,f;for(r=0,a=i;ren==="x"?"y":"x";function jy(n,e,t,i){const s=n.skip?e:n,l=e,o=t.skip?e:t,r=Ur(l,s),a=Ur(o,l);let u=r/(r+a),f=a/(r+a);u=isNaN(u)?0:u,f=isNaN(f)?0:f;const c=i*u,d=i*f;return{previous:{x:l.x-c*(o.x-s.x),y:l.y-c*(o.y-s.y)},next:{x:l.x+d*(o.x-s.x),y:l.y+d*(o.y-s.y)}}}function qy(n,e,t){const i=n.length;let s,l,o,r,a,u=Os(n,0);for(let f=0;f!u.skip)),e.cubicInterpolationMode==="monotone")zy(n,s);else{let u=i?n[n.length-1]:n[0];for(l=0,o=n.length;lwindow.getComputedStyle(n,null);function Wy(n,e){return Uo(n).getPropertyValue(e)}const Yy=["top","right","bottom","left"];function Bi(n,e,t){const i={};t=t?"-"+t:"";for(let s=0;s<4;s++){const l=Yy[s];i[l]=parseFloat(n[e+"-"+l+t])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const Ky=(n,e,t)=>(n>0||e>0)&&(!t||!t.shadowRoot);function Jy(n,e){const t=n.touches,i=t&&t.length?t[0]:n,{offsetX:s,offsetY:l}=i;let o=!1,r,a;if(Ky(s,l,n.target))r=s,a=l;else{const u=e.getBoundingClientRect();r=i.clientX-u.left,a=i.clientY-u.top,o=!0}return{x:r,y:a,box:o}}function Ri(n,e){if("native"in n)return n;const{canvas:t,currentDevicePixelRatio:i}=e,s=Uo(t),l=s.boxSizing==="border-box",o=Bi(s,"padding"),r=Bi(s,"border","width"),{x:a,y:u,box:f}=Jy(n,t),c=o.left+(f&&r.left),d=o.top+(f&&r.top);let{width:h,height:m}=e;return l&&(h-=o.width+r.width,m-=o.height+r.height),{x:Math.round((a-c)/h*t.width/i),y:Math.round((u-d)/m*t.height/i)}}function Zy(n,e,t){let i,s;if(e===void 0||t===void 0){const l=Ra(n);if(!l)e=n.clientWidth,t=n.clientHeight;else{const o=l.getBoundingClientRect(),r=Uo(l),a=Bi(r,"border","width"),u=Bi(r,"padding");e=o.width-u.width-a.width,t=o.height-u.height-a.height,i=Do(r.maxWidth,l,"clientWidth"),s=Do(r.maxHeight,l,"clientHeight")}}return{width:e,height:t,maxWidth:i||$o,maxHeight:s||$o}}const ur=n=>Math.round(n*10)/10;function Gy(n,e,t,i){const s=Uo(n),l=Bi(s,"margin"),o=Do(s.maxWidth,n,"clientWidth")||$o,r=Do(s.maxHeight,n,"clientHeight")||$o,a=Zy(n,e,t);let{width:u,height:f}=a;if(s.boxSizing==="content-box"){const c=Bi(s,"border","width"),d=Bi(s,"padding");u-=d.width+c.width,f-=d.height+c.height}return u=Math.max(0,u-l.width),f=Math.max(0,i?Math.floor(u/i):f-l.height),u=ur(Math.min(u,o,a.maxWidth)),f=ur(Math.min(f,r,a.maxHeight)),u&&!f&&(f=ur(u/2)),{width:u,height:f}}function hf(n,e,t){const i=e||1,s=Math.floor(n.height*i),l=Math.floor(n.width*i);n.height=s/i,n.width=l/i;const o=n.canvas;return o.style&&(t||!o.style.height&&!o.style.width)&&(o.style.height=`${n.height}px`,o.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||o.height!==s||o.width!==l?(n.currentDevicePixelRatio=i,o.height=s,o.width=l,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}const Xy=function(){let n=!1;try{const e={get passive(){return n=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch{}return n}();function mf(n,e){const t=Wy(n,e),i=t&&t.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Hi(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:n.y+t*(e.y-n.y)}}function Qy(n,e,t,i){return{x:n.x+t*(e.x-n.x),y:i==="middle"?t<.5?n.y:e.y:i==="after"?t<1?n.y:e.y:t>0?e.y:n.y}}function xy(n,e,t,i){const s={x:n.cp2x,y:n.cp2y},l={x:e.cp1x,y:e.cp1y},o=Hi(n,s,t),r=Hi(s,l,t),a=Hi(l,e,t),u=Hi(o,r,t),f=Hi(r,a,t);return Hi(u,f,t)}const gf=new Map;function e2(n,e){e=e||{};const t=n+JSON.stringify(e);let i=gf.get(t);return i||(i=new Intl.NumberFormat(n,e),gf.set(t,i)),i}function Al(n,e,t){return e2(e,t).format(n)}const t2=function(n,e){return{x(t){return n+n+e-t},setWidth(t){e=t},textAlign(t){return t==="center"?t:t==="right"?"left":"right"},xPlus(t,i){return t-i},leftForLtr(t,i){return t-i}}},n2=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,e){return n+e},leftForLtr(n,e){return n}}};function fr(n,e,t){return n?t2(e,t):n2()}function i2(n,e){let t,i;(e==="ltr"||e==="rtl")&&(t=n.canvas.style,i=[t.getPropertyValue("direction"),t.getPropertyPriority("direction")],t.setProperty("direction",e,"important"),n.prevTextDirection=i)}function s2(n,e){e!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",e[0],e[1]))}function l_(n){return n==="angle"?{between:pl,compare:Vv,normalize:an}:{between:hl,compare:(e,t)=>e-t,normalize:e=>e}}function _f({start:n,end:e,count:t,loop:i,style:s}){return{start:n%t,end:e%t,loop:i&&(e-n+1)%t===0,style:s}}function l2(n,e,t){const{property:i,start:s,end:l}=t,{between:o,normalize:r}=l_(i),a=e.length;let{start:u,end:f,loop:c}=n,d,h;if(c){for(u+=a,f+=a,d=0,h=a;da(s,$,y)&&r(s,$)!==0,M=()=>r(l,y)===0||a(l,$,y),T=()=>g||C(),D=()=>!g||M();for(let A=f,I=f;A<=c;++A)k=e[A%o],!k.skip&&(y=u(k[i]),y!==$&&(g=a(y,s,l),b===null&&T()&&(b=r(y,s)===0?A:I),b!==null&&D()&&(m.push(_f({start:b,end:A,loop:d,count:o,style:h})),b=null),I=A,$=y));return b!==null&&m.push(_f({start:b,end:c,loop:d,count:o,style:h})),m}function r_(n,e){const t=[],i=n.segments;for(let s=0;ss&&n[l%e].skip;)l--;return l%=e,{start:s,end:l}}function r2(n,e,t,i){const s=n.length,l=[];let o=e,r=n[e],a;for(a=e+1;a<=t;++a){const u=n[a%s];u.skip||u.stop?r.skip||(i=!1,l.push({start:e%s,end:(a-1)%s,loop:i}),e=o=u.stop?a:null):(o=a,r.skip&&(e=a)),r=u}return o!==null&&l.push({start:e%s,end:o%s,loop:i}),l}function a2(n,e){const t=n.points,i=n.options.spanGaps,s=t.length;if(!s)return[];const l=!!n._loop,{start:o,end:r}=o2(t,s,l,i);if(i===!0)return bf(n,[{start:o,end:r,loop:l}],t,e);const a=rr({chart:e,initial:t.initial,numSteps:o,currentStep:Math.min(i-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=Vg.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const l=i.items;let o=l.length-1,r=!1,a;for(;o>=0;--o)a=l[o],a._active?(a._total>i.duration&&(i.duration=a._total),a.tick(e),r=!0):(l[o]=l[l.length-1],l.pop());r&&(s.draw(),this._notify(s,i,e,"progress")),l.length||(i.running=!1,this._notify(s,i,e,"complete"),i.initial=!1),t+=l.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){const t=this._charts;let i=t.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,i)),i}listen(e,t,i){this._getAnims(e).listeners[t].push(i)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);!t||(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const i=t.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var xn=new f2;const vf="transparent",c2={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=uf(n||vf),s=i.valid&&uf(e||vf);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class d2{constructor(e,t,i,s){const l=t[i];s=Jl([e.to,s,l,e.from]);const o=Jl([e.from,l,s]);this._active=!0,this._fn=e.fn||c2[e.type||typeof o],this._easing=nl[e.easing]||nl.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(e,t,i){if(this._active){this._notify(!1);const s=this._target[this._prop],l=i-this._start,o=this._duration-l;this._start=i,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=l,this._loop=!!e.loop,this._to=Jl([e.to,t,s,e.from]),this._from=Jl([e.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,i=this._duration,s=this._prop,l=this._from,o=this._loop,r=this._to;let a;if(this._active=l!==r&&(o||t1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[s]=this._fn(l,r,a)}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,i)=>{e.push({res:t,rej:i})})}_notify(e){const t=e?"res":"rej",i=this._promises||[];for(let s=0;sn!=="onProgress"&&n!=="onComplete"&&n!=="fn"});Qe.set("animations",{colors:{type:"color",properties:h2},numbers:{type:"number",properties:p2}});Qe.describe("animations",{_fallback:"animation"});Qe.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:n=>n|0}}}});class r_{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!Ye(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!Ye(s))return;const l={};for(const o of m2)l[o]=s[o];(ft(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!t.has(o))&&t.set(o,l)})})}_animateOptions(e,t){const i=t.options,s=_2(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&g2(e.options.$animations,i).then(()=>{e.options=i},()=>{}),l}_createAnimations(e,t){const i=this._properties,s=[],l=e.$animations||(e.$animations={}),o=Object.keys(t),r=Date.now();let a;for(a=o.length-1;a>=0;--a){const u=o[a];if(u.charAt(0)==="$")continue;if(u==="options"){s.push(...this._animateOptions(e,t));continue}const f=t[u];let c=l[u];const d=i.get(u);if(c)if(d&&c.active()){c.update(d,f,r);continue}else c.cancel();if(!d||!d.duration){e[u]=f;continue}l[u]=c=new d2(d,e,u,f),s.push(c)}return s}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}const i=this._createAnimations(e,t);if(i.length)return xn.add(this._chart,i),!0}}function g2(n,e){const t=[],i=Object.keys(e);for(let s=0;s0||!t&&l<0)return s.index}return null}function $f(n,e){const{chart:t,_cachedMeta:i}=n,s=t._stacks||(t._stacks={}),{iScale:l,vScale:o,index:r}=i,a=l.axis,u=o.axis,f=k2(l,o,i),c=e.length;let d;for(let h=0;ht[i].axis===e).shift()}function $2(n,e){return Si(n,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function C2(n,e,t){return Si(n,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}function Vs(n,e){const t=n.controller.index,i=n.vScale&&n.vScale.axis;if(!!i){e=e||n._parsed;for(const s of e){const l=s._stacks;if(!l||l[i]===void 0||l[i][t]===void 0)return;delete l[i][t]}}}const cr=n=>n==="reset"||n==="none",Cf=(n,e)=>e?n:Object.assign({},n),T2=(n,e,t)=>n&&!e.hidden&&e._stacked&&{keys:a_(t,!0),values:null};class Rn{constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=wf(e.vScale,e),this.addElements()}updateIndex(e){this.index!==e&&Vs(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,i=this.getDataset(),s=(c,d,h,m)=>c==="x"?d:c==="r"?m:h,l=t.xAxisID=Xe(i.xAxisID,fr(e,"x")),o=t.yAxisID=Xe(i.yAxisID,fr(e,"y")),r=t.rAxisID=Xe(i.rAxisID,fr(e,"r")),a=t.indexAxis,u=t.iAxisID=s(a,l,o,r),f=t.vAxisID=s(a,o,l,r);t.xScale=this.getScaleForId(l),t.yScale=this.getScaleForId(o),t.rScale=this.getScaleForId(r),t.iScale=this.getScaleForId(u),t.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&ef(this._data,this),e._stacked&&Vs(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),i=this._data;if(Ye(t))this._data=y2(t);else if(i!==t){if(i){ef(i,this);const s=this._cachedMeta;Vs(s),s._parsed=[]}t&&Object.isExtensible(t)&&Uv(t,this),this._syncList=[],this._data=t}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const l=t._stacked;t._stacked=wf(t.vScale,t),t.stack!==i.stack&&(s=!0,Vs(t),t.stack=i.stack),this._resyncElements(e),(s||l!==t._stacked)&&$f(this,t._parsed)}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:i,_data:s}=this,{iScale:l,_stacked:o}=i,r=l.axis;let a=e===0&&t===s.length?!0:i._sorted,u=e>0&&i._parsed[e-1],f,c,d;if(this._parsing===!1)i._parsed=s,i._sorted=!0,d=s;else{ft(s[e])?d=this.parseArrayData(i,s,e,t):Ye(s[e])?d=this.parseObjectData(i,s,e,t):d=this.parsePrimitiveData(i,s,e,t);const h=()=>c[r]===null||u&&c[r]b||c=0;--d)if(!m()){this.updateRangeFromParsed(u,e,h,a);break}}return u}getAllParsedValues(e){const t=this._cachedMeta._parsed,i=[];let s,l,o;for(s=0,l=t.length;s=0&&ethis.getContext(i,s),b=u.resolveNamedOptions(d,h,m,c);return b.$shared&&(b.$shared=a,l[o]=Object.freeze(Cf(b,a))),b}_resolveAnimations(e,t,i){const s=this.chart,l=this._cachedDataOpts,o=`animation-${t}`,r=l[o];if(r)return r;let a;if(s.options.animation!==!1){const f=this.chart.config,c=f.datasetAnimationScopeKeys(this._type,t),d=f.getOptionScopes(this.getDataset(),c);a=f.createResolver(d,this.getContext(e,i,t))}const u=new r_(s,a&&a.animations);return a&&a._cacheable&&(l[o]=Object.freeze(u)),u}getSharedOptions(e){if(!!e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||cr(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const i=this.resolveDataElementOptions(e,t),s=this._sharedOptions,l=this.getSharedOptions(i),o=this.includeOptions(t,l)||l!==s;return this.updateSharedOptions(l,t,i),{sharedOptions:l,includeOptions:o}}updateElement(e,t,i,s){cr(s)?Object.assign(e,i):this._resolveAnimations(t,s).update(e,i)}updateSharedOptions(e,t,i){e&&!cr(t)&&this._resolveAnimations(void 0,t).update(e,i)}_setStyle(e,t,i,s){e.active=s;const l=this.getStyle(t,s);this._resolveAnimations(t,i,s).update(e,{options:!s&&this.getSharedOptions(l)||l})}removeHoverStyle(e,t,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,t,i){this._setStyle(e,i,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,i=this._cachedMeta.data;for(const[r,a,u]of this._syncList)this[r](a,u);this._syncList=[];const s=i.length,l=t.length,o=Math.min(l,s);o&&this.parse(0,o),l>s?this._insertElements(s,l-s,e):l{for(u.length+=t,r=u.length-1;r>=o;r--)u[r]=u[r-t]};for(a(l),r=e;rs-l))}return n._cache.$bar}function O2(n){const e=n.iScale,t=M2(e,n.type);let i=e._length,s,l,o,r;const a=()=>{o===32767||o===-32768||($n(r)&&(i=Math.min(i,Math.abs(o-r)||i)),r=o)};for(s=0,l=t.length;s0?s[n-1]:null,r=nMath.abs(r)&&(a=r,u=o),e[t.axis]=u,e._custom={barStart:a,barEnd:u,start:s,end:l,min:o,max:r}}function u_(n,e,t,i){return ft(n)?E2(n,e,t,i):e[t.axis]=t.parse(n,i),e}function Tf(n,e,t,i){const s=n.iScale,l=n.vScale,o=s.getLabels(),r=s===l,a=[];let u,f,c,d;for(u=t,f=t+i;u=t?1:-1)}function P2(n){let e,t,i,s,l;return n.horizontal?(e=n.base>n.x,t="left",i="right"):(e=n.basea.controller.options.grouped),l=i.options.stacked,o=[],r=a=>{const u=a.controller.getParsed(t),f=u&&u[a.vScale.axis];if(it(f)||isNaN(f))return!0};for(const a of s)if(!(t!==void 0&&r(a))&&((l===!1||o.indexOf(a.stack)===-1||l===void 0&&a.stack===void 0)&&o.push(a.stack),a.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,t,i){const s=this._getStacks(e,i),l=t!==void 0?s.indexOf(t):-1;return l===-1?s.length-1:l}_getRuler(){const e=this.options,t=this._cachedMeta,i=t.iScale,s=[];let l,o;for(l=0,o=t.data.length;l=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}getLabelAndValue(e){const t=this._cachedMeta,{xScale:i,yScale:s}=t,l=this.getParsed(e),o=i.getLabelForValue(l.x),r=s.getLabelForValue(l.y),a=l._custom;return{label:t.label,value:"("+o+", "+r+(a?", "+a:"")+")"}}update(e){const t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,i,s){const l=s==="reset",{iScale:o,vScale:r}=this._cachedMeta,{sharedOptions:a,includeOptions:u}=this._getSharedOptions(t,s),f=o.axis,c=r.axis;for(let d=t;ddl($,r,a,!0)?1:Math.max(C,C*t,M,M*t),m=($,C,M)=>dl($,r,a,!0)?-1:Math.min(C,C*t,M,M*t),b=h(0,u,c),g=h(ht,f,d),y=m(gt,u,c),k=m(gt+ht,f,d);i=(b-y)/2,s=(g-k)/2,l=-(b+y)/2,o=-(g+k)/2}return{ratioX:i,ratioY:s,offsetX:l,offsetY:o}}class Al extends Rn{constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let l=a=>+i[a];if(Ye(i[e])){const{key:a="value"}=this._parsing;l=u=>+vi(i[u],a)}let o,r;for(o=e,r=e+t;o0&&!isNaN(e)?ot*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=Dl(t._parsed[e],i.options.locale);return{label:s[e]||"",value:l}}getMaxBorderWidth(e){let t=0;const i=this.chart;let s,l,o,r,a;if(!e){for(s=0,l=i.data.datasets.length;sn!=="spacing",_indexable:n=>n!=="spacing"};Al.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const e=n.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:t}}=n.legend.options;return e.labels.map((i,s)=>{const o=n.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:t,hidden:!n.getDataVisibility(s),index:s}})}return[]}},onClick(n,e,t){t.chart.toggleDataVisibility(e.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(n){let e=n.label;const t=": "+n.formattedValue;return ft(e)?(e=e.slice(),e[0]+=t):e+=t,e}}}}};class Uo extends Rn{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const t=this._cachedMeta,{dataset:i,data:s=[],_dataset:l}=t,o=this.chart._animationsDisabled;let{start:r,count:a}=Bg(t,s,o);this._drawStart=r,this._drawCount=a,Ug(t)&&(r=0,a=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!l._decimated,i.points=s;const u=this.resolveDatasetElementOptions(e);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:u},e),this.updateElements(s,r,a,e)}updateElements(e,t,i,s){const l=s==="reset",{iScale:o,vScale:r,_stacked:a,_dataset:u}=this._cachedMeta,{sharedOptions:f,includeOptions:c}=this._getSharedOptions(t,s),d=o.axis,h=r.axis,{spanGaps:m,segment:b}=this.options,g=Cs(m)?m:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||l||s==="none";let k=t>0&&this.getParsed(t-1);for(let $=t;$0&&Math.abs(M[d]-k[d])>g,b&&(T.parsed=M,T.raw=u.data[$]),c&&(T.options=f||this.resolveDataElementOptions($,C.active?"active":s)),y||this.updateElement(C,$,T,s),k=M}}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,i=t.options&&t.options.borderWidth||0,s=e.data||[];if(!s.length)return i;const l=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,l,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}Uo.id="line";Uo.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};Uo.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class ja extends Rn{constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=Dl(t._parsed[e].r,i.options.locale);return{label:s[e]||"",value:l}}parseObjectData(e,t,i,s){return t_.bind(this)(e,t,i,s)}update(e){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}getMinMax(){const e=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((i,s)=>{const l=this.getParsed(s).r;!isNaN(l)&&this.chart.getDataVisibility(s)&&(lt.max&&(t.max=l))}),t}_updateRadius(){const e=this.chart,t=e.chartArea,i=e.options,s=Math.min(t.right-t.left,t.bottom-t.top),l=Math.max(s/2,0),o=Math.max(i.cutoutPercentage?l/100*i.cutoutPercentage:1,0),r=(l-o)/e.getVisibleDatasetCount();this.outerRadius=l-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(e,t,i,s){const l=s==="reset",o=this.chart,a=o.options.animation,u=this._cachedMeta.rScale,f=u.xCenter,c=u.yCenter,d=u.getIndexAngle(0)-.5*gt;let h=d,m;const b=360/this.countVisibleElements();for(m=0;m{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&t++}),t}_computeAngle(e,t,i){return this.chart.getDataVisibility(e)?In(this.resolveDataElementOptions(e,t).angle||i):0}}ja.id="polarArea";ja.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};ja.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const e=n.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:t}}=n.legend.options;return e.labels.map((i,s)=>{const o=n.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:t,hidden:!n.getDataVisibility(s),index:s}})}return[]}},onClick(n,e,t){t.chart.toggleDataVisibility(e.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(n){return n.chart.data.labels[n.dataIndex]+": "+n.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class f_ extends Al{}f_.id="pie";f_.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class qa extends Rn{getLabelAndValue(e){const t=this._cachedMeta.vScale,i=this.getParsed(e);return{label:t.getLabels()[e],value:""+t.getLabelForValue(i[t.axis])}}parseObjectData(e,t,i,s){return t_.bind(this)(e,t,i,s)}update(e){const t=this._cachedMeta,i=t.dataset,s=t.data||[],l=t.iScale.getLabels();if(i.points=s,e!=="resize"){const o=this.resolveDatasetElementOptions(e);this.options.showLine||(o.borderWidth=0);const r={_loop:!0,_fullLoop:l.length===s.length,options:o};this.updateElement(i,void 0,r,e)}this.updateElements(s,0,s.length,e)}updateElements(e,t,i,s){const l=this._cachedMeta.rScale,o=s==="reset";for(let r=t;r{s[l]=i[l]&&i[l].active()?i[l]._to:this[l]}),s}}li.defaults={};li.defaultRoutes=void 0;const c_={values(n){return ft(n)?n:""+n},numeric(n,e,t){if(n===0)return"0";const i=this.chart.options.locale;let s,l=n;if(t.length>1){const u=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(u<1e-4||u>1e15)&&(s="scientific"),l=H2(n,t)}const o=yn(Math.abs(l)),r=Math.max(Math.min(-1*Math.floor(o),20),0),a={notation:s,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(a,this.options.ticks.format),Dl(n,i,a)},logarithmic(n,e,t){if(n===0)return"0";const i=n/Math.pow(10,Math.floor(yn(n)));return i===1||i===2||i===5?c_.numeric.call(this,n,e,t):""}};function H2(n,e){let t=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(t)>=1&&n!==Math.floor(n)&&(t=n-Math.floor(n)),t}var Wo={formatters:c_};Qe.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(n,e)=>e.lineWidth,tickColor:(n,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Wo.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});Qe.route("scale.ticks","color","","color");Qe.route("scale.grid","color","","borderColor");Qe.route("scale.grid","borderColor","","borderColor");Qe.route("scale.title","color","","color");Qe.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&n!=="callback"&&n!=="parser",_indexable:n=>n!=="borderDash"&&n!=="tickBorderDash"});Qe.describe("scales",{_fallback:"scale"});Qe.describe("scale.ticks",{_scriptable:n=>n!=="backdropPadding"&&n!=="callback",_indexable:n=>n!=="backdropPadding"});function j2(n,e){const t=n.options.ticks,i=t.maxTicksLimit||q2(n),s=t.major.enabled?z2(e):[],l=s.length,o=s[0],r=s[l-1],a=[];if(l>i)return B2(e,a,s,l/i),a;const u=V2(s,e,i);if(l>0){let f,c;const d=l>1?Math.round((r-o)/(l-1)):null;for(Gl(e,a,u,it(d)?0:o-d,o),f=0,c=l-1;fs)return a}return Math.max(s,1)}function z2(n){const e=[];let t,i;for(t=0,i=n.length;tn==="left"?"right":n==="right"?"left":n,Df=(n,e,t)=>e==="top"||e==="left"?n[e]+t:n[e]-t;function Af(n,e){const t=[],i=n.length/e,s=n.length;let l=0;for(;lo+r)))return a}function K2(n,e){lt(n,t=>{const i=t.gc,s=i.length/2;let l;if(s>e){for(l=0;li?i:t,i=s&&t>i?t:i,{min:gn(t,gn(i,t)),max:gn(i,gn(t,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){pt(this.options.beforeUpdate,[this])}update(e,t,i){const{beginAtZero:s,grace:l,ticks:o}=this.options,r=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=My(this,l,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=r=l||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const f=this._getLabelSizes(),c=f.widest.width,d=f.highest.height,h=Rt(this.chart.width-c,0,this.maxWidth);r=e.offset?this.maxWidth/i:h/(i-1),c+6>r&&(r=h/(i-(e.offset?.5:1)),a=this.maxHeight-zs(e.grid)-t.padding-Ef(e.title,this.chart.options.font),u=Math.sqrt(c*c+d*d),o=Ca(Math.min(Math.asin(Rt((f.highest.height+6)/r,-1,1)),Math.asin(Rt(a/u,-1,1))-Math.asin(Rt(d/u,-1,1)))),o=Math.max(s,Math.min(l,o))),this.labelRotation=o}afterCalculateLabelRotation(){pt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){pt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:i,title:s,grid:l}}=this,o=this._isVisible(),r=this.isHorizontal();if(o){const a=Ef(s,t.options.font);if(r?(e.width=this.maxWidth,e.height=zs(l)+a):(e.height=this.maxHeight,e.width=zs(l)+a),i.display&&this.ticks.length){const{first:u,last:f,widest:c,highest:d}=this._getLabelSizes(),h=i.padding*2,m=In(this.labelRotation),b=Math.cos(m),g=Math.sin(m);if(r){const y=i.mirror?0:g*c.width+b*d.height;e.height=Math.min(this.maxHeight,e.height+y+h)}else{const y=i.mirror?0:b*c.width+g*d.height;e.width=Math.min(this.maxWidth,e.width+y+h)}this._calculatePadding(u,f,g,b)}}this._handleMargins(),r?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,i,s){const{ticks:{align:l,padding:o},position:r}=this.options,a=this.labelRotation!==0,u=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,h=0;a?u?(d=s*e.width,h=i*t.height):(d=i*e.height,h=s*t.width):l==="start"?h=t.width:l==="end"?d=e.width:l!=="inner"&&(d=e.width/2,h=t.width/2),this.paddingLeft=Math.max((d-f+o)*this.width/(this.width-f),0),this.paddingRight=Math.max((h-c+o)*this.width/(this.width-c),0)}else{let f=t.height/2,c=e.height/2;l==="start"?(f=0,c=e.height):l==="end"&&(f=t.height,c=0),this.paddingTop=f+o,this.paddingBottom=c+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){pt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return t==="top"||t==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let t,i;for(t=0,i=e.length;t({width:l[D]||0,height:o[D]||0});return{first:T(0),last:T(t-1),widest:T(C),highest:T(M),widths:l,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return Vv(this._alignToPixels?Pi(this.chart,t,0):t)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&er*s?r/i:a/s:a*s0}_computeGridLineItems(e){const t=this.axis,i=this.chart,s=this.options,{grid:l,position:o}=s,r=l.offset,a=this.isHorizontal(),f=this.ticks.length+(r?1:0),c=zs(l),d=[],h=l.setContext(this.getContext()),m=h.drawBorder?h.borderWidth:0,b=m/2,g=function(G){return Pi(i,G,m)};let y,k,$,C,M,T,D,A,I,L,F,q;if(o==="top")y=g(this.bottom),T=this.bottom-c,A=y-b,L=g(e.top)+b,q=e.bottom;else if(o==="bottom")y=g(this.top),L=e.top,q=g(e.bottom)-b,T=y+b,A=this.top+c;else if(o==="left")y=g(this.right),M=this.right-c,D=y-b,I=g(e.left)+b,F=e.right;else if(o==="right")y=g(this.left),I=e.left,F=g(e.right)-b,M=y+b,D=this.left+c;else if(t==="x"){if(o==="center")y=g((e.top+e.bottom)/2+.5);else if(Ye(o)){const G=Object.keys(o)[0],ie=o[G];y=g(this.chart.scales[G].getPixelForValue(ie))}L=e.top,q=e.bottom,T=y+b,A=T+c}else if(t==="y"){if(o==="center")y=g((e.left+e.right)/2);else if(Ye(o)){const G=Object.keys(o)[0],ie=o[G];y=g(this.chart.scales[G].getPixelForValue(ie))}M=y-b,D=M-c,I=e.left,F=e.right}const z=Xe(s.ticks.maxTicksLimit,f),J=Math.max(1,Math.ceil(f/z));for(k=0;kl.value===e);return s>=0?t.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const t=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let l,o;const r=(a,u,f)=>{!f.width||!f.color||(i.save(),i.lineWidth=f.width,i.strokeStyle=f.color,i.setLineDash(f.borderDash||[]),i.lineDashOffset=f.borderDashOffset,i.beginPath(),i.moveTo(a.x,a.y),i.lineTo(u.x,u.y),i.stroke(),i.restore())};if(t.display)for(l=0,o=s.length;l{this.draw(s)}}]:[{z:i,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:t,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let l,o;for(l=0,o=t.length;l{const i=t.split("."),s=i.pop(),l=[n].concat(i).join("."),o=e[t].split("."),r=o.pop(),a=o.join(".");Qe.route(l,s,a,r)})}function ek(n){return"id"in n&&"defaults"in n}class tk{constructor(){this.controllers=new Xl(Rn,"datasets",!0),this.elements=new Xl(li,"elements"),this.plugins=new Xl(Object,"plugins"),this.scales=new Xl(Qi,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,i){[...t].forEach(s=>{const l=i||this._getRegistryForType(s);i||l.isForType(s)||l===this.plugins&&s.id?this._exec(e,l,s):lt(s,o=>{const r=i||this._getRegistryForType(o);this._exec(e,r,o)})})}_exec(e,t,i){const s=$a(e);pt(i["before"+s],[],i),t[e](i),pt(i["after"+s],[],i)}_getRegistryForType(e){for(let t=0;t0&&this.getParsed(t-1);for(let C=t;C0&&Math.abs(T[h]-$[h])>y,g&&(D.parsed=T,D.raw=u.data[C]),d&&(D.options=c||this.resolveDataElementOptions(C,M.active?"active":s)),k||this.updateElement(M,C,D,s),$=T}this.updateSharedOptions(c,s,f)}getMaxOverflow(){const e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let r=0;for(let a=t.length-1;a>=0;--a)r=Math.max(r,t[a].size(this.resolveDataElementOptions(a))/2);return r>0&&r}const i=e.dataset,s=i.options&&i.options.borderWidth||0;if(!t.length)return s;const l=t[0].size(this.resolveDataElementOptions(0)),o=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(s,l,o)/2}}Va.id="scatter";Va.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};Va.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(n){return"("+n.label+", "+n.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function Li(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Kr{constructor(e){this.options=e||{}}init(e){}formats(){return Li()}parse(e,t){return Li()}format(e,t){return Li()}add(e,t,i){return Li()}diff(e,t,i){return Li()}startOf(e,t,i){return Li()}endOf(e,t){return Li()}}Kr.override=function(n){Object.assign(Kr.prototype,n)};var d_={_date:Kr};function nk(n,e,t,i){const{controller:s,data:l,_sorted:o}=n,r=s._cachedMeta.iScale;if(r&&e===r.axis&&e!=="r"&&o&&l.length){const a=r._reversePixels?zv:qi;if(i){if(s._sharedOptions){const u=l[0],f=typeof u.getRange=="function"&&u.getRange(e);if(f){const c=a(l,e,t-f),d=a(l,e,t+f);return{lo:c.lo,hi:d.hi}}}}else return a(l,e,t)}return{lo:0,hi:l.length-1}}function El(n,e,t,i,s){const l=n.getSortedVisibleDatasetMetas(),o=t[e];for(let r=0,a=l.length;r{a[o](e[t],s)&&(l.push({element:a,datasetIndex:u,index:f}),r=r||a.inRange(e.x,e.y,s))}),i&&!r?[]:l}var ok={evaluateInteractionItems:El,modes:{index(n,e,t,i){const s=Ri(e,n),l=t.axis||"x",o=t.includeInvisible||!1,r=t.intersect?pr(n,s,l,i,o):hr(n,s,l,!1,i,o),a=[];return r.length?(n.getSortedVisibleDatasetMetas().forEach(u=>{const f=r[0].index,c=u.data[f];c&&!c.skip&&a.push({element:c,datasetIndex:u.index,index:f})}),a):[]},dataset(n,e,t,i){const s=Ri(e,n),l=t.axis||"xy",o=t.includeInvisible||!1;let r=t.intersect?pr(n,s,l,i,o):hr(n,s,l,!1,i,o);if(r.length>0){const a=r[0].datasetIndex,u=n.getDatasetMeta(a).data;r=[];for(let f=0;ft.pos===e)}function Pf(n,e){return n.filter(t=>p_.indexOf(t.pos)===-1&&t.box.axis===e)}function Us(n,e){return n.sort((t,i)=>{const s=e?i:t,l=e?t:i;return s.weight===l.weight?s.index-l.index:s.weight-l.weight})}function rk(n){const e=[];let t,i,s,l,o,r;for(t=0,i=(n||[]).length;tu.box.fullSize),!0),i=Us(Bs(e,"left"),!0),s=Us(Bs(e,"right")),l=Us(Bs(e,"top"),!0),o=Us(Bs(e,"bottom")),r=Pf(e,"x"),a=Pf(e,"y");return{fullSize:t,leftAndTop:i.concat(l),rightAndBottom:s.concat(a).concat(o).concat(r),chartArea:Bs(e,"chartArea"),vertical:i.concat(s).concat(a),horizontal:l.concat(o).concat(r)}}function Lf(n,e,t,i){return Math.max(n[t],e[t])+Math.max(n[i],e[i])}function h_(n,e){n.top=Math.max(n.top,e.top),n.left=Math.max(n.left,e.left),n.bottom=Math.max(n.bottom,e.bottom),n.right=Math.max(n.right,e.right)}function ck(n,e,t,i){const{pos:s,box:l}=t,o=n.maxPadding;if(!Ye(s)){t.size&&(n[s]-=t.size);const c=i[t.stack]||{size:0,count:1};c.size=Math.max(c.size,t.horizontal?l.height:l.width),t.size=c.size/c.count,n[s]+=t.size}l.getPadding&&h_(o,l.getPadding());const r=Math.max(0,e.outerWidth-Lf(o,n,"left","right")),a=Math.max(0,e.outerHeight-Lf(o,n,"top","bottom")),u=r!==n.w,f=a!==n.h;return n.w=r,n.h=a,t.horizontal?{same:u,other:f}:{same:f,other:u}}function dk(n){const e=n.maxPadding;function t(i){const s=Math.max(e[i]-n[i],0);return n[i]+=s,s}n.y+=t("top"),n.x+=t("left"),t("right"),t("bottom")}function pk(n,e){const t=e.maxPadding;function i(s){const l={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{l[o]=Math.max(e[o],t[o])}),l}return i(n?["left","right"]:["top","bottom"])}function Xs(n,e,t,i){const s=[];let l,o,r,a,u,f;for(l=0,o=n.length,u=0;l{typeof b.beforeLayout=="function"&&b.beforeLayout()});const f=a.reduce((b,g)=>g.box.options&&g.box.options.display===!1?b:b+1,0)||1,c=Object.freeze({outerWidth:e,outerHeight:t,padding:s,availableWidth:l,availableHeight:o,vBoxMaxWidth:l/2/f,hBoxMaxHeight:o/2}),d=Object.assign({},s);h_(d,Cn(i));const h=Object.assign({maxPadding:d,w:l,h:o,x:s.left,y:s.top},s),m=uk(a.concat(u),c);Xs(r.fullSize,h,c,m),Xs(a,h,c,m),Xs(u,h,c,m)&&Xs(a,h,c,m),dk(h),Nf(r.leftAndTop,h,c,m),h.x+=h.w,h.y+=h.h,Nf(r.rightAndBottom,h,c,m),n.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},lt(r.chartArea,b=>{const g=b.box;Object.assign(g,n.chartArea),g.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class m_{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,i){}removeEventListener(e,t,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,i,s){return t=Math.max(0,t||e.width),i=i||e.height,{width:t,height:Math.max(0,s?Math.floor(t/s):i)}}isAttached(e){return!0}updateConfig(e){}}class hk extends m_{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const co="$chartjs",mk={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ff=n=>n===null||n==="";function gk(n,e){const t=n.style,i=n.getAttribute("height"),s=n.getAttribute("width");if(n[co]={initial:{height:i,width:s,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",Ff(s)){const l=hf(n,"width");l!==void 0&&(n.width=l)}if(Ff(i))if(n.style.height==="")n.height=n.width/(e||2);else{const l=hf(n,"height");l!==void 0&&(n.height=l)}return n}const g_=Gy?{passive:!0}:!1;function _k(n,e,t){n.addEventListener(e,t,g_)}function bk(n,e,t){n.canvas.removeEventListener(e,t,g_)}function vk(n,e){const t=mk[n.type]||n.type,{x:i,y:s}=Ri(n,e);return{type:t,chart:e,native:n,x:i!==void 0?i:null,y:s!==void 0?s:null}}function Do(n,e){for(const t of n)if(t===e||t.contains(e))return!0}function yk(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||Do(r.addedNodes,i),o=o&&!Do(r.removedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function kk(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||Do(r.removedNodes,i),o=o&&!Do(r.addedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}const ml=new Map;let Rf=0;function __(){const n=window.devicePixelRatio;n!==Rf&&(Rf=n,ml.forEach((e,t)=>{t.currentDevicePixelRatio!==n&&e()}))}function wk(n,e){ml.size||window.addEventListener("resize",__),ml.set(n,e)}function Sk(n){ml.delete(n),ml.size||window.removeEventListener("resize",__)}function $k(n,e,t){const i=n.canvas,s=i&&Fa(i);if(!s)return;const l=zg((r,a)=>{const u=s.clientWidth;t(r,a),u{const a=r[0],u=a.contentRect.width,f=a.contentRect.height;u===0&&f===0||l(u,f)});return o.observe(s),wk(n,l),o}function mr(n,e,t){t&&t.disconnect(),e==="resize"&&Sk(n)}function Ck(n,e,t){const i=n.canvas,s=zg(l=>{n.ctx!==null&&t(vk(l,n))},n,l=>{const o=l[0];return[o,o.offsetX,o.offsetY]});return _k(i,e,s),s}class Tk extends m_{acquireContext(e,t){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(gk(e,t),i):null}releaseContext(e){const t=e.canvas;if(!t[co])return!1;const i=t[co].initial;["height","width"].forEach(l=>{const o=i[l];it(o)?t.removeAttribute(l):t.setAttribute(l,o)});const s=i.style||{};return Object.keys(s).forEach(l=>{t.style[l]=s[l]}),t.width=t.width,delete t[co],!0}addEventListener(e,t,i){this.removeEventListener(e,t);const s=e.$proxies||(e.$proxies={}),o={attach:yk,detach:kk,resize:$k}[t]||Ck;s[t]=o(e,t,i)}removeEventListener(e,t){const i=e.$proxies||(e.$proxies={}),s=i[t];if(!s)return;({attach:mr,detach:mr,resize:mr}[t]||bk)(e,t,s),i[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,i,s){return Zy(e,t,i,s)}isAttached(e){const t=Fa(e);return!!(t&&t.isConnected)}}function Mk(n){return!i_()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?hk:Tk}class Ok{constructor(){this._init=[]}notify(e,t,i,s){t==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const l=s?this._descriptors(e).filter(s):this._descriptors(e),o=this._notify(l,e,t,i);return t==="afterDestroy"&&(this._notify(l,e,"stop"),this._notify(this._init,e,"uninstall")),o}_notify(e,t,i,s){s=s||{};for(const l of e){const o=l.plugin,r=o[i],a=[t,s,l.options];if(pt(r,a,o)===!1&&s.cancelable)return!1}return!0}invalidate(){it(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const i=e&&e.config,s=Xe(i.options&&i.options.plugins,{}),l=Dk(i);return s===!1&&!t?[]:Ek(e,l,s,t)}_notifyStateChanges(e){const t=this._oldCache||[],i=this._cache,s=(l,o)=>l.filter(r=>!o.some(a=>r.plugin.id===a.plugin.id));this._notify(s(t,i),e,"stop"),this._notify(s(i,t),e,"start")}}function Dk(n){const e={},t=[],i=Object.keys(Vn.plugins.items);for(let l=0;l{const a=i[r];if(!Ye(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const u=Zr(r,a),f=Lk(u,s),c=t.scales||{};l[u]=l[u]||r,o[r]=el(Object.create(null),[{axis:u},a,c[u],c[f]])}),n.data.datasets.forEach(r=>{const a=r.type||n.type,u=r.indexAxis||Jr(a,e),c=(Ji[a]||{}).scales||{};Object.keys(c).forEach(d=>{const h=Pk(d,u),m=r[h+"AxisID"]||l[h]||h;o[m]=o[m]||Object.create(null),el(o[m],[{axis:h},i[m],c[d]])})}),Object.keys(o).forEach(r=>{const a=o[r];el(a,[Qe.scales[a.type],Qe.scale])}),o}function b_(n){const e=n.options||(n.options={});e.plugins=Xe(e.plugins,{}),e.scales=Fk(n,e)}function v_(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function Rk(n){return n=n||{},n.data=v_(n.data),b_(n),n}const Hf=new Map,y_=new Set;function eo(n,e){let t=Hf.get(n);return t||(t=e(),Hf.set(n,t),y_.add(t)),t}const Ws=(n,e,t)=>{const i=vi(e,t);i!==void 0&&n.add(i)};class Hk{constructor(e){this._config=Rk(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=v_(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),b_(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return eo(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return eo(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return eo(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id,i=this.type;return eo(`${i}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){const i=this._scopeCache;let s=i.get(e);return(!s||t)&&(s=new Map,i.set(e,s)),s}getOptionScopes(e,t,i){const{options:s,type:l}=this,o=this._cachedScopes(e,i),r=o.get(t);if(r)return r;const a=new Set;t.forEach(f=>{e&&(a.add(e),f.forEach(c=>Ws(a,e,c))),f.forEach(c=>Ws(a,s,c)),f.forEach(c=>Ws(a,Ji[l]||{},c)),f.forEach(c=>Ws(a,Qe,c)),f.forEach(c=>Ws(a,Wr,c))});const u=Array.from(a);return u.length===0&&u.push(Object.create(null)),y_.has(t)&&o.set(t,u),u}chartOptionScopes(){const{options:e,type:t}=this;return[e,Ji[t]||{},Qe.datasets[t]||{},{type:t},Qe,Wr]}resolveNamedOptions(e,t,i,s=[""]){const l={$shared:!0},{resolver:o,subPrefixes:r}=jf(this._resolverCache,e,s);let a=o;if(qk(o,t)){l.$shared=!1,i=yi(i)?i():i;const u=this.createResolver(e,i,r);a=Ts(o,i,u)}for(const u of t)l[u]=a[u];return l}createResolver(e,t,i=[""],s){const{resolver:l}=jf(this._resolverCache,e,i);return Ye(t)?Ts(l,t,void 0,s):l}}function jf(n,e,t){let i=n.get(e);i||(i=new Map,n.set(e,i));const s=t.join();let l=i.get(s);return l||(l={resolver:Pa(e,t),subPrefixes:t.filter(r=>!r.toLowerCase().includes("hover"))},i.set(s,l)),l}const jk=n=>Ye(n)&&Object.getOwnPropertyNames(n).reduce((e,t)=>e||yi(n[t]),!1);function qk(n,e){const{isScriptable:t,isIndexable:i}=Xg(n);for(const s of e){const l=t(s),o=i(s),r=(o||l)&&n[s];if(l&&(yi(r)||jk(r))||o&&ft(r))return!0}return!1}var Vk="3.9.1";const zk=["top","bottom","left","right","chartArea"];function qf(n,e){return n==="top"||n==="bottom"||zk.indexOf(n)===-1&&e==="x"}function Vf(n,e){return function(t,i){return t[n]===i[n]?t[e]-i[e]:t[n]-i[n]}}function zf(n){const e=n.chart,t=e.options.animation;e.notifyPlugins("afterRender"),pt(t&&t.onComplete,[n],e)}function Bk(n){const e=n.chart,t=e.options.animation;pt(t&&t.onProgress,[n],e)}function k_(n){return i_()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Ao={},w_=n=>{const e=k_(n);return Object.values(Ao).filter(t=>t.canvas===e).pop()};function Uk(n,e,t){const i=Object.keys(n);for(const s of i){const l=+s;if(l>=e){const o=n[s];delete n[s],(t>0||l>e)&&(n[l+t]=o)}}}function Wk(n,e,t,i){return!t||n.type==="mouseout"?null:i?e:n}class Eo{constructor(e,t){const i=this.config=new Hk(t),s=k_(e),l=w_(s);if(l)throw new Error("Canvas is already in use. Chart with ID '"+l.id+"' must be destroyed before the canvas with ID '"+l.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||Mk(s)),this.platform.updateConfig(i);const r=this.platform.acquireContext(s,o.aspectRatio),a=r&&r.canvas,u=a&&a.height,f=a&&a.width;if(this.id=Dv(),this.ctx=r,this.canvas=a,this.width=f,this.height=u,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Ok,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Wv(c=>this.update(c),o.resizeDelay||0),this._dataChanges=[],Ao[this.id]=this,!r||!a){console.error("Failed to create chart: can't acquire context from the given item");return}xn.listen(this,"complete",zf),xn.listen(this,"progress",Bk),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:i,height:s,_aspectRatio:l}=this;return it(e)?t&&l?l:s?i/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():pf(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ff(this.canvas,this.ctx),this}stop(){return xn.stop(this),this}resize(e,t){xn.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const i=this.options,s=this.canvas,l=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,e,t,l),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,pf(this,r,!0)&&(this.notifyPlugins("resize",{size:o}),pt(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};lt(t,(i,s)=>{i.id=s})}buildOrUpdateScales(){const e=this.options,t=e.scales,i=this.scales,s=Object.keys(i).reduce((o,r)=>(o[r]=!1,o),{});let l=[];t&&(l=l.concat(Object.keys(t).map(o=>{const r=t[o],a=Zr(o,r),u=a==="r",f=a==="x";return{options:r,dposition:u?"chartArea":f?"bottom":"left",dtype:u?"radialLinear":f?"category":"linear"}}))),lt(l,o=>{const r=o.options,a=r.id,u=Zr(a,r),f=Xe(r.type,o.dtype);(r.position===void 0||qf(r.position,u)!==qf(o.dposition))&&(r.position=o.dposition),s[a]=!0;let c=null;if(a in i&&i[a].type===f)c=i[a];else{const d=Vn.getScale(f);c=new d({id:a,type:f,ctx:this.ctx,chart:this}),i[c.id]=c}c.init(r,e)}),lt(s,(o,r)=>{o||delete i[r]}),lt(i,o=>{xl.configure(this,o,o.options),xl.addBox(this,o)})}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,i=e.length;if(e.sort((s,l)=>s.index-l.index),i>t){for(let s=t;st.length&&delete this._stacks,e.forEach((i,s)=>{t.filter(l=>l===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=t.length;i{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const i=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const l=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,f=this.data.datasets.length;u{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Vf("z","_idx"));const{_active:r,_lastEvent:a}=this;a?this._eventHandler(a,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){lt(this.scales,e=>{xl.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!Gu(t,i)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:l}of t){const o=i==="_removeElements"?-l:l;Uk(e,s,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,i=l=>new Set(e.filter(o=>o[0]===l).map((o,r)=>r+","+o.splice(1).join(","))),s=i(0);for(let l=1;ll.split(",")).map(l=>({method:l[1],start:+l[2],count:+l[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;xl.update(this,this.width,this.height,e);const t=this.chartArea,i=t.width<=0||t.height<=0;this._layers=[],lt(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,l)=>{s._idx=l}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let t=0,i=this.data.datasets.length;t=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,i=e._clip,s=!i.disabled,l=this.chartArea,o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(s&&Aa(t,{left:i.left===!1?0:l.left-i.left,right:i.right===!1?this.width:l.right+i.right,top:i.top===!1?0:l.top-i.top,bottom:i.bottom===!1?this.height:l.bottom+i.bottom}),e.controller.draw(),s&&Ea(t),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return hl(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,i,s){const l=ok.modes[t];return typeof l=="function"?l(this,e,i,s):[]}getDatasetMeta(e){const t=this.data.datasets[e],i=this._metasets;let s=i.filter(l=>l&&l._dataset===t).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=Si(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const i=this.getDatasetMeta(e);return typeof i.hidden=="boolean"?!i.hidden:!t.hidden}setDatasetVisibility(e,t){const i=this.getDatasetMeta(e);i.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,i){const s=i?"show":"hide",l=this.getDatasetMeta(e),o=l.controller._resolveAnimations(void 0,s);$n(t)?(l.data[t].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),o.update(l,{visible:i}),this.update(r=>r.datasetIndex===e?s:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),xn.remove(this),e=0,t=this.data.datasets.length;e{t.addEventListener(this,l,o),e[l]=o},s=(l,o,r)=>{l.offsetX=o,l.offsetY=r,this._eventHandler(l)};lt(this.options.events,l=>i(l,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,i=(a,u)=>{t.addEventListener(this,a,u),e[a]=u},s=(a,u)=>{e[a]&&(t.removeEventListener(this,a,u),delete e[a])},l=(a,u)=>{this.canvas&&this.resize(a,u)};let o;const r=()=>{s("attach",r),this.attached=!0,this.resize(),i("resize",l),i("detach",o)};o=()=>{this.attached=!1,s("resize",l),this._stop(),this._resize(0,0),i("attach",r)},t.isAttached(this.canvas)?r():o()}unbindEvents(){lt(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},lt(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,i){const s=i?"set":"remove";let l,o,r,a;for(t==="dataset"&&(l=this.getDatasetMeta(e[0].datasetIndex),l.controller["_"+s+"DatasetHoverStyle"]()),r=0,a=e.length;r{const r=this.getDatasetMeta(l);if(!r)throw new Error("No dataset found at index "+l);return{datasetIndex:l,element:r.data[o],index:o}});!ko(i,t)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,t))}notifyPlugins(e,t,i){return this._plugins.notify(this,e,t,i)}_updateHoverStyles(e,t,i){const s=this.options.hover,l=(a,u)=>a.filter(f=>!u.some(c=>f.datasetIndex===c.datasetIndex&&f.index===c.index)),o=l(t,e),r=i?e:l(e,t);o.length&&this.updateHoverStyle(o,s.mode,!1),r.length&&s.mode&&this.updateHoverStyle(r,s.mode,!0)}_eventHandler(e,t){const i={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},s=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const l=this._handleEvent(e,t,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(l||i.changed)&&this.render(),this}_handleEvent(e,t,i){const{_active:s=[],options:l}=this,o=t,r=this._getActiveElements(e,s,i,o),a=Nv(e),u=Wk(e,this._lastEvent,i,a);i&&(this._lastEvent=null,pt(l.onHover,[e,r,this],this),a&&pt(l.onClick,[e,r,this],this));const f=!ko(r,s);return(f||t)&&(this._active=r,this._updateHoverStyles(r,s,t)),this._lastEvent=u,f}_getActiveElements(e,t,i,s){if(e.type==="mouseout")return[];if(!i)return t;const l=this.options.hover;return this.getElementsAtEventForMode(e,l.mode,l,s)}}const Bf=()=>lt(Eo.instances,n=>n._plugins.invalidate()),ci=!0;Object.defineProperties(Eo,{defaults:{enumerable:ci,value:Qe},instances:{enumerable:ci,value:Ao},overrides:{enumerable:ci,value:Ji},registry:{enumerable:ci,value:Vn},version:{enumerable:ci,value:Vk},getChart:{enumerable:ci,value:w_},register:{enumerable:ci,value:(...n)=>{Vn.add(...n),Bf()}},unregister:{enumerable:ci,value:(...n)=>{Vn.remove(...n),Bf()}}});function S_(n,e,t){const{startAngle:i,pixelMargin:s,x:l,y:o,outerRadius:r,innerRadius:a}=e;let u=s/r;n.beginPath(),n.arc(l,o,r,i-u,t+u),a>s?(u=s/a,n.arc(l,o,a,t+u,i-u,!0)):n.arc(l,o,s,t+ht,i-ht),n.closePath(),n.clip()}function Yk(n){return Ia(n,["outerStart","outerEnd","innerStart","innerEnd"])}function Kk(n,e,t,i){const s=Yk(n.options.borderRadius),l=(t-e)/2,o=Math.min(l,i*e/2),r=a=>{const u=(t-Math.min(l,a))*i/2;return Rt(a,0,Math.min(l,u))};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:Rt(s.innerStart,0,o),innerEnd:Rt(s.innerEnd,0,o)}}function cs(n,e,t,i){return{x:t+n*Math.cos(e),y:i+n*Math.sin(e)}}function Gr(n,e,t,i,s,l){const{x:o,y:r,startAngle:a,pixelMargin:u,innerRadius:f}=e,c=Math.max(e.outerRadius+i+t-u,0),d=f>0?f+i+t+u:0;let h=0;const m=s-a;if(i){const G=f>0?f-i:0,ie=c>0?c-i:0,Q=(G+ie)/2,X=Q!==0?m*Q/(Q+i):m;h=(m-X)/2}const b=Math.max(.001,m*c-t/gt)/c,g=(m-b)/2,y=a+g+h,k=s-g-h,{outerStart:$,outerEnd:C,innerStart:M,innerEnd:T}=Kk(e,d,c,k-y),D=c-$,A=c-C,I=y+$/D,L=k-C/A,F=d+M,q=d+T,z=y+M/F,J=k-T/q;if(n.beginPath(),l){if(n.arc(o,r,c,I,L),C>0){const Q=cs(A,L,o,r);n.arc(Q.x,Q.y,C,L,k+ht)}const G=cs(q,k,o,r);if(n.lineTo(G.x,G.y),T>0){const Q=cs(q,J,o,r);n.arc(Q.x,Q.y,T,k+ht,J+Math.PI)}if(n.arc(o,r,d,k-T/d,y+M/d,!0),M>0){const Q=cs(F,z,o,r);n.arc(Q.x,Q.y,M,z+Math.PI,y-ht)}const ie=cs(D,y,o,r);if(n.lineTo(ie.x,ie.y),$>0){const Q=cs(D,I,o,r);n.arc(Q.x,Q.y,$,y-ht,I)}}else{n.moveTo(o,r);const G=Math.cos(I)*c+o,ie=Math.sin(I)*c+r;n.lineTo(G,ie);const Q=Math.cos(L)*c+o,X=Math.sin(L)*c+r;n.lineTo(Q,X)}n.closePath()}function Jk(n,e,t,i,s){const{fullCircles:l,startAngle:o,circumference:r}=e;let a=e.endAngle;if(l){Gr(n,e,t,i,o+ot,s);for(let u=0;u=ot||dl(l,r,a),b=pl(o,u+d,f+d);return m&&b}getCenterPoint(e){const{x:t,y:i,startAngle:s,endAngle:l,innerRadius:o,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),{offset:a,spacing:u}=this.options,f=(s+l)/2,c=(o+r+u+a)/2;return{x:t+Math.cos(f)*c,y:i+Math.sin(f)*c}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:i}=this,s=(t.offset||0)/2,l=(t.spacing||0)/2,o=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=i>ot?Math.floor(i/ot):0,i===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let r=0;if(s){r=s/2;const u=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(u)*r,Math.sin(u)*r),this.circumference>=gt&&(r=s)}e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor;const a=Jk(e,this,r,l,o);Gk(e,this,r,l,a,o),e.restore()}}za.id="arc";za.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};za.defaultRoutes={backgroundColor:"backgroundColor"};function $_(n,e,t=e){n.lineCap=Xe(t.borderCapStyle,e.borderCapStyle),n.setLineDash(Xe(t.borderDash,e.borderDash)),n.lineDashOffset=Xe(t.borderDashOffset,e.borderDashOffset),n.lineJoin=Xe(t.borderJoinStyle,e.borderJoinStyle),n.lineWidth=Xe(t.borderWidth,e.borderWidth),n.strokeStyle=Xe(t.borderColor,e.borderColor)}function Xk(n,e,t){n.lineTo(t.x,t.y)}function Qk(n){return n.stepped?vy:n.tension||n.cubicInterpolationMode==="monotone"?yy:Xk}function C_(n,e,t={}){const i=n.length,{start:s=0,end:l=i-1}=t,{start:o,end:r}=e,a=Math.max(s,o),u=Math.min(l,r),f=sr&&l>r;return{count:i,start:a,loop:e.loop,ilen:u(o+(u?r-C:C))%l,$=()=>{b!==g&&(n.lineTo(f,g),n.lineTo(f,b),n.lineTo(f,y))};for(a&&(h=s[k(0)],n.moveTo(h.x,h.y)),d=0;d<=r;++d){if(h=s[k(d)],h.skip)continue;const C=h.x,M=h.y,T=C|0;T===m?(Mg&&(g=M),f=(c*f+C)/++c):($(),n.lineTo(C,M),m=T,c=0,b=g=M),y=M}$()}function Xr(n){const e=n.options,t=e.borderDash&&e.borderDash.length;return!n._decimated&&!n._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!t?ew:xk}function tw(n){return n.stepped?Xy:n.tension||n.cubicInterpolationMode==="monotone"?Qy:Hi}function nw(n,e,t,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,t,i)&&s.closePath()),$_(n,e.options),n.stroke(s)}function iw(n,e,t,i){const{segments:s,options:l}=e,o=Xr(e);for(const r of s)$_(n,l,r.style),n.beginPath(),o(n,e,r,{start:t,end:t+i-1})&&n.closePath(),n.stroke()}const sw=typeof Path2D=="function";function lw(n,e,t,i){sw&&!e.options.segment?nw(n,e,t,i):iw(n,e,t,i)}class $i extends li{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;By(this._points,i,e,s,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=r2(this,this.options.segment))}first(){const e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){const e=this.segments,t=this.points,i=e.length;return i&&t[e[i-1].end]}interpolate(e,t){const i=this.options,s=e[t],l=this.points,o=o_(this,{property:t,start:s,end:s});if(!o.length)return;const r=[],a=tw(i);let u,f;for(u=0,f=o.length;un!=="borderDash"&&n!=="fill"};function Uf(n,e,t,i){const s=n.options,{[t]:l}=n.getProps([t],i);return Math.abs(e-l){r=Ua(o,r,s);const a=s[o],u=s[r];i!==null?(l.push({x:a.x,y:i}),l.push({x:u.x,y:i})):t!==null&&(l.push({x:t,y:a.y}),l.push({x:t,y:u.y}))}),l}function Ua(n,e,t){for(;e>n;e--){const i=t[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function Wf(n,e,t,i){return n&&e?i(n[t],e[t]):n?n[t]:e?e[t]:0}function M_(n,e){let t=[],i=!1;return ft(n)?(i=!0,t=n):t=dw(n,e),t.length?new $i({points:t,options:{tension:0},_loop:i,_fullLoop:i}):null}function Yf(n){return n&&n.fill!==!1}function pw(n,e,t){let s=n[e].fill;const l=[e];let o;if(!t)return s;for(;s!==!1&&l.indexOf(s)===-1;){if(!_t(s))return s;if(o=n[s],!o)return!1;if(o.visible)return s;l.push(s),s=o.fill}return!1}function hw(n,e,t){const i=bw(n);if(Ye(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return _t(s)&&Math.floor(s)===s?mw(i[0],e,s,t):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function mw(n,e,t,i){return(n==="-"||n==="+")&&(t=e+t),t===e||t<0||t>=i?!1:t}function gw(n,e){let t=null;return n==="start"?t=e.bottom:n==="end"?t=e.top:Ye(n)?t=e.getPixelForValue(n.value):e.getBasePixel&&(t=e.getBasePixel()),t}function _w(n,e,t){let i;return n==="start"?i=t:n==="end"?i=e.options.reverse?e.min:e.max:Ye(n)?i=n.value:i=e.getBaseValue(),i}function bw(n){const e=n.options,t=e.fill;let i=Xe(t&&t.target,t);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function vw(n){const{scale:e,index:t,line:i}=n,s=[],l=i.segments,o=i.points,r=yw(e,t);r.push(M_({x:null,y:e.bottom},i));for(let a=0;a=0;--o){const r=s[o].$filler;!r||(r.line.updateControlPoints(l,r.axis),i&&r.fill&&br(n.ctx,r,l))}},beforeDatasetsDraw(n,e,t){if(t.drawTime!=="beforeDatasetsDraw")return;const i=n.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const l=i[s].$filler;Yf(l)&&br(n.ctx,l,n.chartArea)}},beforeDatasetDraw(n,e,t){const i=e.meta.$filler;!Yf(i)||t.drawTime!=="beforeDatasetDraw"||br(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const sl={average(n){if(!n.length)return!1;let e,t,i=0,s=0,l=0;for(e=0,t=n.length;er({chart:e,initial:t.initial,numSteps:o,currentStep:Math.min(i-t.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=zg.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let t=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const l=i.items;let o=l.length-1,r=!1,a;for(;o>=0;--o)a=l[o],a._active?(a._total>i.duration&&(i.duration=a._total),a.tick(e),r=!0):(l[o]=l[l.length-1],l.pop());r&&(s.draw(),this._notify(s,i,e,"progress")),l.length||(i.running=!1,this._notify(s,i,e,"complete"),i.initial=!1),t+=l.length}),this._lastDate=e,t===0&&(this._running=!1)}_getAnims(e){const t=this._charts;let i=t.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,i)),i}listen(e,t,i){this._getAnims(e).listeners[t].push(i)}add(e,t){!t||!t.length||this._getAnims(e).items.push(...t)}has(e){return this._getAnims(e).items.length>0}start(e){const t=this._charts.get(e);!t||(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const t=this._charts.get(e);return!(!t||!t.running||!t.items.length)}stop(e){const t=this._charts.get(e);if(!t||!t.items.length)return;const i=t.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var xn=new c2;const yf="transparent",d2={boolean(n,e,t){return t>.5?e:n},color(n,e,t){const i=ff(n||yf),s=i.valid&&ff(e||yf);return s&&s.valid?s.mix(i,t).hexString():e},number(n,e,t){return n+(e-n)*t}};class p2{constructor(e,t,i,s){const l=t[i];s=Zl([e.to,s,l,e.from]);const o=Zl([e.from,l,s]);this._active=!0,this._fn=e.fn||d2[e.type||typeof o],this._easing=il[e.easing]||il.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=t,this._prop=i,this._from=o,this._to=s,this._promises=void 0}active(){return this._active}update(e,t,i){if(this._active){this._notify(!1);const s=this._target[this._prop],l=i-this._start,o=this._duration-l;this._start=i,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=l,this._loop=!!e.loop,this._to=Zl([e.to,t,s,e.from]),this._from=Zl([e.from,s,t])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const t=e-this._start,i=this._duration,s=this._prop,l=this._from,o=this._loop,r=this._to;let a;if(this._active=l!==r&&(o||t1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[s]=this._fn(l,r,a)}wait(){const e=this._promises||(this._promises=[]);return new Promise((t,i)=>{e.push({res:t,rej:i})})}_notify(e){const t=e?"res":"rej",i=this._promises||[];for(let s=0;sn!=="onProgress"&&n!=="onComplete"&&n!=="fn"});Qe.set("animations",{colors:{type:"color",properties:m2},numbers:{type:"number",properties:h2}});Qe.describe("animations",{_fallback:"animation"});Qe.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:n=>n|0}}}});class a_{constructor(e,t){this._chart=e,this._properties=new Map,this.configure(t)}configure(e){if(!Ye(e))return;const t=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!Ye(s))return;const l={};for(const o of g2)l[o]=s[o];(ft(s.properties)&&s.properties||[i]).forEach(o=>{(o===i||!t.has(o))&&t.set(o,l)})})}_animateOptions(e,t){const i=t.options,s=b2(e,i);if(!s)return[];const l=this._createAnimations(s,i);return i.$shared&&_2(e.options.$animations,i).then(()=>{e.options=i},()=>{}),l}_createAnimations(e,t){const i=this._properties,s=[],l=e.$animations||(e.$animations={}),o=Object.keys(t),r=Date.now();let a;for(a=o.length-1;a>=0;--a){const u=o[a];if(u.charAt(0)==="$")continue;if(u==="options"){s.push(...this._animateOptions(e,t));continue}const f=t[u];let c=l[u];const d=i.get(u);if(c)if(d&&c.active()){c.update(d,f,r);continue}else c.cancel();if(!d||!d.duration){e[u]=f;continue}l[u]=c=new p2(d,e,u,f),s.push(c)}return s}update(e,t){if(this._properties.size===0){Object.assign(e,t);return}const i=this._createAnimations(e,t);if(i.length)return xn.add(this._chart,i),!0}}function _2(n,e){const t=[],i=Object.keys(e);for(let s=0;s0||!t&&l<0)return s.index}return null}function Cf(n,e){const{chart:t,_cachedMeta:i}=n,s=t._stacks||(t._stacks={}),{iScale:l,vScale:o,index:r}=i,a=l.axis,u=o.axis,f=w2(l,o,i),c=e.length;let d;for(let h=0;ht[i].axis===e).shift()}function C2(n,e){return Si(n,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function T2(n,e,t){return Si(n,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:t,index:e,mode:"default",type:"data"})}function zs(n,e){const t=n.controller.index,i=n.vScale&&n.vScale.axis;if(!!i){e=e||n._parsed;for(const s of e){const l=s._stacks;if(!l||l[i]===void 0||l[i][t]===void 0)return;delete l[i][t]}}}const dr=n=>n==="reset"||n==="none",Tf=(n,e)=>e?n:Object.assign({},n),M2=(n,e,t)=>n&&!e.hidden&&e._stacked&&{keys:u_(t,!0),values:null};class Rn{constructor(e,t){this.chart=e,this._ctx=e.ctx,this.index=t,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Sf(e.vScale,e),this.addElements()}updateIndex(e){this.index!==e&&zs(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,t=this._cachedMeta,i=this.getDataset(),s=(c,d,h,m)=>c==="x"?d:c==="r"?m:h,l=t.xAxisID=Xe(i.xAxisID,cr(e,"x")),o=t.yAxisID=Xe(i.yAxisID,cr(e,"y")),r=t.rAxisID=Xe(i.rAxisID,cr(e,"r")),a=t.indexAxis,u=t.iAxisID=s(a,l,o,r),f=t.vAxisID=s(a,o,l,r);t.xScale=this.getScaleForId(l),t.yScale=this.getScaleForId(o),t.rScale=this.getScaleForId(r),t.iScale=this.getScaleForId(u),t.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&tf(this._data,this),e._stacked&&zs(e)}_dataCheck(){const e=this.getDataset(),t=e.data||(e.data=[]),i=this._data;if(Ye(t))this._data=k2(t);else if(i!==t){if(i){tf(i,this);const s=this._cachedMeta;zs(s),s._parsed=[]}t&&Object.isExtensible(t)&&Wv(t,this),this._syncList=[],this._data=t}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const t=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const l=t._stacked;t._stacked=Sf(t.vScale,t),t.stack!==i.stack&&(s=!0,zs(t),t.stack=i.stack),this._resyncElements(e),(s||l!==t._stacked)&&Cf(this,t._parsed)}configure(){const e=this.chart.config,t=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,t){const{_cachedMeta:i,_data:s}=this,{iScale:l,_stacked:o}=i,r=l.axis;let a=e===0&&t===s.length?!0:i._sorted,u=e>0&&i._parsed[e-1],f,c,d;if(this._parsing===!1)i._parsed=s,i._sorted=!0,d=s;else{ft(s[e])?d=this.parseArrayData(i,s,e,t):Ye(s[e])?d=this.parseObjectData(i,s,e,t):d=this.parsePrimitiveData(i,s,e,t);const h=()=>c[r]===null||u&&c[r]g||c=0;--d)if(!m()){this.updateRangeFromParsed(u,e,h,a);break}}return u}getAllParsedValues(e){const t=this._cachedMeta._parsed,i=[];let s,l,o;for(s=0,l=t.length;s=0&&ethis.getContext(i,s),g=u.resolveNamedOptions(d,h,m,c);return g.$shared&&(g.$shared=a,l[o]=Object.freeze(Tf(g,a))),g}_resolveAnimations(e,t,i){const s=this.chart,l=this._cachedDataOpts,o=`animation-${t}`,r=l[o];if(r)return r;let a;if(s.options.animation!==!1){const f=this.chart.config,c=f.datasetAnimationScopeKeys(this._type,t),d=f.getOptionScopes(this.getDataset(),c);a=f.createResolver(d,this.getContext(e,i,t))}const u=new a_(s,a&&a.animations);return a&&a._cacheable&&(l[o]=Object.freeze(u)),u}getSharedOptions(e){if(!!e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,t){return!t||dr(e)||this.chart._animationsDisabled}_getSharedOptions(e,t){const i=this.resolveDataElementOptions(e,t),s=this._sharedOptions,l=this.getSharedOptions(i),o=this.includeOptions(t,l)||l!==s;return this.updateSharedOptions(l,t,i),{sharedOptions:l,includeOptions:o}}updateElement(e,t,i,s){dr(s)?Object.assign(e,i):this._resolveAnimations(t,s).update(e,i)}updateSharedOptions(e,t,i){e&&!dr(t)&&this._resolveAnimations(void 0,t).update(e,i)}_setStyle(e,t,i,s){e.active=s;const l=this.getStyle(t,s);this._resolveAnimations(t,i,s).update(e,{options:!s&&this.getSharedOptions(l)||l})}removeHoverStyle(e,t,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,t,i){this._setStyle(e,i,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const t=this._data,i=this._cachedMeta.data;for(const[r,a,u]of this._syncList)this[r](a,u);this._syncList=[];const s=i.length,l=t.length,o=Math.min(l,s);o&&this.parse(0,o),l>s?this._insertElements(s,l-s,e):l{for(u.length+=t,r=u.length-1;r>=o;r--)u[r]=u[r-t]};for(a(l),r=e;rs-l))}return n._cache.$bar}function D2(n){const e=n.iScale,t=O2(e,n.type);let i=e._length,s,l,o,r;const a=()=>{o===32767||o===-32768||($n(r)&&(i=Math.min(i,Math.abs(o-r)||i)),r=o)};for(s=0,l=t.length;s0?s[n-1]:null,r=nMath.abs(r)&&(a=r,u=o),e[t.axis]=u,e._custom={barStart:a,barEnd:u,start:s,end:l,min:o,max:r}}function f_(n,e,t,i){return ft(n)?I2(n,e,t,i):e[t.axis]=t.parse(n,i),e}function Mf(n,e,t,i){const s=n.iScale,l=n.vScale,o=s.getLabels(),r=s===l,a=[];let u,f,c,d;for(u=t,f=t+i;u=t?1:-1)}function L2(n){let e,t,i,s,l;return n.horizontal?(e=n.base>n.x,t="left",i="right"):(e=n.basea.controller.options.grouped),l=i.options.stacked,o=[],r=a=>{const u=a.controller.getParsed(t),f=u&&u[a.vScale.axis];if(it(f)||isNaN(f))return!0};for(const a of s)if(!(t!==void 0&&r(a))&&((l===!1||o.indexOf(a.stack)===-1||l===void 0&&a.stack===void 0)&&o.push(a.stack),a.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getStackIndex(e,t,i){const s=this._getStacks(e,i),l=t!==void 0?s.indexOf(t):-1;return l===-1?s.length-1:l}_getRuler(){const e=this.options,t=this._cachedMeta,i=t.iScale,s=[];let l,o;for(l=0,o=t.data.length;l=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}getLabelAndValue(e){const t=this._cachedMeta,{xScale:i,yScale:s}=t,l=this.getParsed(e),o=i.getLabelForValue(l.x),r=s.getLabelForValue(l.y),a=l._custom;return{label:t.label,value:"("+o+", "+r+(a?", "+a:"")+")"}}update(e){const t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}updateElements(e,t,i,s){const l=s==="reset",{iScale:o,vScale:r}=this._cachedMeta,{sharedOptions:a,includeOptions:u}=this._getSharedOptions(t,s),f=o.axis,c=r.axis;for(let d=t;dpl($,r,a,!0)?1:Math.max(C,C*t,M,M*t),m=($,C,M)=>pl($,r,a,!0)?-1:Math.min(C,C*t,M,M*t),g=h(0,u,c),b=h(ht,f,d),y=m(gt,u,c),k=m(gt+ht,f,d);i=(g-y)/2,s=(b-k)/2,l=-(g+y)/2,o=-(b+k)/2}return{ratioX:i,ratioY:s,offsetX:l,offsetY:o}}class El extends Rn{constructor(e,t){super(e,t),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,t){const i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let l=a=>+i[a];if(Ye(i[e])){const{key:a="value"}=this._parsing;l=u=>+vi(i[u],a)}let o,r;for(o=e,r=e+t;o0&&!isNaN(e)?ot*(Math.abs(e)/t):0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=Al(t._parsed[e],i.options.locale);return{label:s[e]||"",value:l}}getMaxBorderWidth(e){let t=0;const i=this.chart;let s,l,o,r,a;if(!e){for(s=0,l=i.data.datasets.length;sn!=="spacing",_indexable:n=>n!=="spacing"};El.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const e=n.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:t}}=n.legend.options;return e.labels.map((i,s)=>{const o=n.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:t,hidden:!n.getDataVisibility(s),index:s}})}return[]}},onClick(n,e,t){t.chart.toggleDataVisibility(e.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(n){let e=n.label;const t=": "+n.formattedValue;return ft(e)?(e=e.slice(),e[0]+=t):e+=t,e}}}}};class Wo extends Rn{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const t=this._cachedMeta,{dataset:i,data:s=[],_dataset:l}=t,o=this.chart._animationsDisabled;let{start:r,count:a}=Ug(t,s,o);this._drawStart=r,this._drawCount=a,Wg(t)&&(r=0,a=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!l._decimated,i.points=s;const u=this.resolveDatasetElementOptions(e);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:u},e),this.updateElements(s,r,a,e)}updateElements(e,t,i,s){const l=s==="reset",{iScale:o,vScale:r,_stacked:a,_dataset:u}=this._cachedMeta,{sharedOptions:f,includeOptions:c}=this._getSharedOptions(t,s),d=o.axis,h=r.axis,{spanGaps:m,segment:g}=this.options,b=Ts(m)?m:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||l||s==="none";let k=t>0&&this.getParsed(t-1);for(let $=t;$0&&Math.abs(M[d]-k[d])>b,g&&(T.parsed=M,T.raw=u.data[$]),c&&(T.options=f||this.resolveDataElementOptions($,C.active?"active":s)),y||this.updateElement(C,$,T,s),k=M}}getMaxOverflow(){const e=this._cachedMeta,t=e.dataset,i=t.options&&t.options.borderWidth||0,s=e.data||[];if(!s.length)return i;const l=s[0].size(this.resolveDataElementOptions(0)),o=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,l,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}Wo.id="line";Wo.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};Wo.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class qa extends Rn{constructor(e,t){super(e,t),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(e){const t=this._cachedMeta,i=this.chart,s=i.data.labels||[],l=Al(t._parsed[e].r,i.options.locale);return{label:s[e]||"",value:l}}parseObjectData(e,t,i,s){return n_.bind(this)(e,t,i,s)}update(e){const t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}getMinMax(){const e=this._cachedMeta,t={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return e.data.forEach((i,s)=>{const l=this.getParsed(s).r;!isNaN(l)&&this.chart.getDataVisibility(s)&&(lt.max&&(t.max=l))}),t}_updateRadius(){const e=this.chart,t=e.chartArea,i=e.options,s=Math.min(t.right-t.left,t.bottom-t.top),l=Math.max(s/2,0),o=Math.max(i.cutoutPercentage?l/100*i.cutoutPercentage:1,0),r=(l-o)/e.getVisibleDatasetCount();this.outerRadius=l-r*this.index,this.innerRadius=this.outerRadius-r}updateElements(e,t,i,s){const l=s==="reset",o=this.chart,a=o.options.animation,u=this._cachedMeta.rScale,f=u.xCenter,c=u.yCenter,d=u.getIndexAngle(0)-.5*gt;let h=d,m;const g=360/this.countVisibleElements();for(m=0;m{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&t++}),t}_computeAngle(e,t,i){return this.chart.getDataVisibility(e)?In(this.resolveDataElementOptions(e,t).angle||i):0}}qa.id="polarArea";qa.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};qa.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(n){const e=n.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:t}}=n.legend.options;return e.labels.map((i,s)=>{const o=n.getDatasetMeta(0).controller.getStyle(s);return{text:i,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,lineWidth:o.borderWidth,pointStyle:t,hidden:!n.getDataVisibility(s),index:s}})}return[]}},onClick(n,e,t){t.chart.toggleDataVisibility(e.index),t.chart.update()}},tooltip:{callbacks:{title(){return""},label(n){return n.chart.data.labels[n.dataIndex]+": "+n.formattedValue}}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class c_ extends El{}c_.id="pie";c_.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Va extends Rn{getLabelAndValue(e){const t=this._cachedMeta.vScale,i=this.getParsed(e);return{label:t.getLabels()[e],value:""+t.getLabelForValue(i[t.axis])}}parseObjectData(e,t,i,s){return n_.bind(this)(e,t,i,s)}update(e){const t=this._cachedMeta,i=t.dataset,s=t.data||[],l=t.iScale.getLabels();if(i.points=s,e!=="resize"){const o=this.resolveDatasetElementOptions(e);this.options.showLine||(o.borderWidth=0);const r={_loop:!0,_fullLoop:l.length===s.length,options:o};this.updateElement(i,void 0,r,e)}this.updateElements(s,0,s.length,e)}updateElements(e,t,i,s){const l=this._cachedMeta.rScale,o=s==="reset";for(let r=t;r{s[l]=i[l]&&i[l].active()?i[l]._to:this[l]}),s}}li.defaults={};li.defaultRoutes=void 0;const d_={values(n){return ft(n)?n:""+n},numeric(n,e,t){if(n===0)return"0";const i=this.chart.options.locale;let s,l=n;if(t.length>1){const u=Math.max(Math.abs(t[0].value),Math.abs(t[t.length-1].value));(u<1e-4||u>1e15)&&(s="scientific"),l=j2(n,t)}const o=yn(Math.abs(l)),r=Math.max(Math.min(-1*Math.floor(o),20),0),a={notation:s,minimumFractionDigits:r,maximumFractionDigits:r};return Object.assign(a,this.options.ticks.format),Al(n,i,a)},logarithmic(n,e,t){if(n===0)return"0";const i=n/Math.pow(10,Math.floor(yn(n)));return i===1||i===2||i===5?d_.numeric.call(this,n,e,t):""}};function j2(n,e){let t=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(t)>=1&&n!==Math.floor(n)&&(t=n-Math.floor(n)),t}var Yo={formatters:d_};Qe.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(n,e)=>e.lineWidth,tickColor:(n,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Yo.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}});Qe.route("scale.ticks","color","","color");Qe.route("scale.grid","color","","borderColor");Qe.route("scale.grid","borderColor","","borderColor");Qe.route("scale.title","color","","color");Qe.describe("scale",{_fallback:!1,_scriptable:n=>!n.startsWith("before")&&!n.startsWith("after")&&n!=="callback"&&n!=="parser",_indexable:n=>n!=="borderDash"&&n!=="tickBorderDash"});Qe.describe("scales",{_fallback:"scale"});Qe.describe("scale.ticks",{_scriptable:n=>n!=="backdropPadding"&&n!=="callback",_indexable:n=>n!=="backdropPadding"});function q2(n,e){const t=n.options.ticks,i=t.maxTicksLimit||V2(n),s=t.major.enabled?B2(e):[],l=s.length,o=s[0],r=s[l-1],a=[];if(l>i)return U2(e,a,s,l/i),a;const u=z2(s,e,i);if(l>0){let f,c;const d=l>1?Math.round((r-o)/(l-1)):null;for(Xl(e,a,u,it(d)?0:o-d,o),f=0,c=l-1;fs)return a}return Math.max(s,1)}function B2(n){const e=[];let t,i;for(t=0,i=n.length;tn==="left"?"right":n==="right"?"left":n,Af=(n,e,t)=>e==="top"||e==="left"?n[e]+t:n[e]-t;function Ef(n,e){const t=[],i=n.length/e,s=n.length;let l=0;for(;lo+r)))return a}function J2(n,e){lt(n,t=>{const i=t.gc,s=i.length/2;let l;if(s>e){for(l=0;li?i:t,i=s&&t>i?t:i,{min:gn(t,gn(i,t)),max:gn(i,gn(t,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){pt(this.options.beforeUpdate,[this])}update(e,t,i){const{beginAtZero:s,grace:l,ticks:o}=this.options,r=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Oy(this,l,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=r=l||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const f=this._getLabelSizes(),c=f.widest.width,d=f.highest.height,h=Rt(this.chart.width-c,0,this.maxWidth);r=e.offset?this.maxWidth/i:h/(i-1),c+6>r&&(r=h/(i-(e.offset?.5:1)),a=this.maxHeight-Bs(e.grid)-t.padding-If(e.title,this.chart.options.font),u=Math.sqrt(c*c+d*d),o=Ta(Math.min(Math.asin(Rt((f.highest.height+6)/r,-1,1)),Math.asin(Rt(a/u,-1,1))-Math.asin(Rt(d/u,-1,1)))),o=Math.max(s,Math.min(l,o))),this.labelRotation=o}afterCalculateLabelRotation(){pt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){pt(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:t,options:{ticks:i,title:s,grid:l}}=this,o=this._isVisible(),r=this.isHorizontal();if(o){const a=If(s,t.options.font);if(r?(e.width=this.maxWidth,e.height=Bs(l)+a):(e.height=this.maxHeight,e.width=Bs(l)+a),i.display&&this.ticks.length){const{first:u,last:f,widest:c,highest:d}=this._getLabelSizes(),h=i.padding*2,m=In(this.labelRotation),g=Math.cos(m),b=Math.sin(m);if(r){const y=i.mirror?0:b*c.width+g*d.height;e.height=Math.min(this.maxHeight,e.height+y+h)}else{const y=i.mirror?0:g*c.width+b*d.height;e.width=Math.min(this.maxWidth,e.width+y+h)}this._calculatePadding(u,f,b,g)}}this._handleMargins(),r?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,t,i,s){const{ticks:{align:l,padding:o},position:r}=this.options,a=this.labelRotation!==0,u=r!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,h=0;a?u?(d=s*e.width,h=i*t.height):(d=i*e.height,h=s*t.width):l==="start"?h=t.width:l==="end"?d=e.width:l!=="inner"&&(d=e.width/2,h=t.width/2),this.paddingLeft=Math.max((d-f+o)*this.width/(this.width-f),0),this.paddingRight=Math.max((h-c+o)*this.width/(this.width-c),0)}else{let f=t.height/2,c=e.height/2;l==="start"?(f=0,c=e.height):l==="end"&&(f=t.height,c=0),this.paddingTop=f+o,this.paddingBottom=c+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){pt(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:t}=this.options;return t==="top"||t==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let t,i;for(t=0,i=e.length;t({width:l[D]||0,height:o[D]||0});return{first:T(0),last:T(t-1),widest:T(C),highest:T(M),widths:l,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,t){return NaN}getValueForPixel(e){}getPixelForTick(e){const t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const t=this._startPixel+e*this._length;return zv(this._alignToPixels?Pi(this.chart,t,0):t)}getDecimalForPixel(e){const t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:t}=this;return e<0&&t<0?t:e>0&&t>0?e:0}getContext(e){const t=this.ticks||[];if(e>=0&&er*s?r/i:a/s:a*s0}_computeGridLineItems(e){const t=this.axis,i=this.chart,s=this.options,{grid:l,position:o}=s,r=l.offset,a=this.isHorizontal(),f=this.ticks.length+(r?1:0),c=Bs(l),d=[],h=l.setContext(this.getContext()),m=h.drawBorder?h.borderWidth:0,g=m/2,b=function(G){return Pi(i,G,m)};let y,k,$,C,M,T,D,A,I,L,F,q;if(o==="top")y=b(this.bottom),T=this.bottom-c,A=y-g,L=b(e.top)+g,q=e.bottom;else if(o==="bottom")y=b(this.top),L=e.top,q=b(e.bottom)-g,T=y+g,A=this.top+c;else if(o==="left")y=b(this.right),M=this.right-c,D=y-g,I=b(e.left)+g,F=e.right;else if(o==="right")y=b(this.left),I=e.left,F=b(e.right)-g,M=y+g,D=this.left+c;else if(t==="x"){if(o==="center")y=b((e.top+e.bottom)/2+.5);else if(Ye(o)){const G=Object.keys(o)[0],ie=o[G];y=b(this.chart.scales[G].getPixelForValue(ie))}L=e.top,q=e.bottom,T=y+g,A=T+c}else if(t==="y"){if(o==="center")y=b((e.left+e.right)/2);else if(Ye(o)){const G=Object.keys(o)[0],ie=o[G];y=b(this.chart.scales[G].getPixelForValue(ie))}M=y-g,D=M-c,I=e.left,F=e.right}const z=Xe(s.ticks.maxTicksLimit,f),J=Math.max(1,Math.ceil(f/z));for(k=0;kl.value===e);return s>=0?t.setContext(this.getContext(s)).lineWidth:0}drawGrid(e){const t=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let l,o;const r=(a,u,f)=>{!f.width||!f.color||(i.save(),i.lineWidth=f.width,i.strokeStyle=f.color,i.setLineDash(f.borderDash||[]),i.lineDashOffset=f.borderDashOffset,i.beginPath(),i.moveTo(a.x,a.y),i.lineTo(u.x,u.y),i.stroke(),i.restore())};if(t.display)for(l=0,o=s.length;l{this.draw(s)}}]:[{z:i,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:t,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const t=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let l,o;for(l=0,o=t.length;l{const i=t.split("."),s=i.pop(),l=[n].concat(i).join("."),o=e[t].split("."),r=o.pop(),a=o.join(".");Qe.route(l,s,a,r)})}function tk(n){return"id"in n&&"defaults"in n}class nk{constructor(){this.controllers=new Ql(Rn,"datasets",!0),this.elements=new Ql(li,"elements"),this.plugins=new Ql(Object,"plugins"),this.scales=new Ql(Qi,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,t,i){[...t].forEach(s=>{const l=i||this._getRegistryForType(s);i||l.isForType(s)||l===this.plugins&&s.id?this._exec(e,l,s):lt(s,o=>{const r=i||this._getRegistryForType(o);this._exec(e,r,o)})})}_exec(e,t,i){const s=Ca(e);pt(i["before"+s],[],i),t[e](i),pt(i["after"+s],[],i)}_getRegistryForType(e){for(let t=0;t0&&this.getParsed(t-1);for(let C=t;C0&&Math.abs(T[h]-$[h])>y,b&&(D.parsed=T,D.raw=u.data[C]),d&&(D.options=c||this.resolveDataElementOptions(C,M.active?"active":s)),k||this.updateElement(M,C,D,s),$=T}this.updateSharedOptions(c,s,f)}getMaxOverflow(){const e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){let r=0;for(let a=t.length-1;a>=0;--a)r=Math.max(r,t[a].size(this.resolveDataElementOptions(a))/2);return r>0&&r}const i=e.dataset,s=i.options&&i.options.borderWidth||0;if(!t.length)return s;const l=t[0].size(this.resolveDataElementOptions(0)),o=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(s,l,o)/2}}za.id="scatter";za.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};za.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title(){return""},label(n){return"("+n.label+", "+n.formattedValue+")"}}}},scales:{x:{type:"linear"},y:{type:"linear"}}};function Li(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Jr{constructor(e){this.options=e||{}}init(e){}formats(){return Li()}parse(e,t){return Li()}format(e,t){return Li()}add(e,t,i){return Li()}diff(e,t,i){return Li()}startOf(e,t,i){return Li()}endOf(e,t){return Li()}}Jr.override=function(n){Object.assign(Jr.prototype,n)};var p_={_date:Jr};function ik(n,e,t,i){const{controller:s,data:l,_sorted:o}=n,r=s._cachedMeta.iScale;if(r&&e===r.axis&&e!=="r"&&o&&l.length){const a=r._reversePixels?Bv:qi;if(i){if(s._sharedOptions){const u=l[0],f=typeof u.getRange=="function"&&u.getRange(e);if(f){const c=a(l,e,t-f),d=a(l,e,t+f);return{lo:c.lo,hi:d.hi}}}}else return a(l,e,t)}return{lo:0,hi:l.length-1}}function Il(n,e,t,i,s){const l=n.getSortedVisibleDatasetMetas(),o=t[e];for(let r=0,a=l.length;r{a[o](e[t],s)&&(l.push({element:a,datasetIndex:u,index:f}),r=r||a.inRange(e.x,e.y,s))}),i&&!r?[]:l}var rk={evaluateInteractionItems:Il,modes:{index(n,e,t,i){const s=Ri(e,n),l=t.axis||"x",o=t.includeInvisible||!1,r=t.intersect?hr(n,s,l,i,o):mr(n,s,l,!1,i,o),a=[];return r.length?(n.getSortedVisibleDatasetMetas().forEach(u=>{const f=r[0].index,c=u.data[f];c&&!c.skip&&a.push({element:c,datasetIndex:u.index,index:f})}),a):[]},dataset(n,e,t,i){const s=Ri(e,n),l=t.axis||"xy",o=t.includeInvisible||!1;let r=t.intersect?hr(n,s,l,i,o):mr(n,s,l,!1,i,o);if(r.length>0){const a=r[0].datasetIndex,u=n.getDatasetMeta(a).data;r=[];for(let f=0;ft.pos===e)}function Lf(n,e){return n.filter(t=>h_.indexOf(t.pos)===-1&&t.box.axis===e)}function Ws(n,e){return n.sort((t,i)=>{const s=e?i:t,l=e?t:i;return s.weight===l.weight?s.index-l.index:s.weight-l.weight})}function ak(n){const e=[];let t,i,s,l,o,r;for(t=0,i=(n||[]).length;tu.box.fullSize),!0),i=Ws(Us(e,"left"),!0),s=Ws(Us(e,"right")),l=Ws(Us(e,"top"),!0),o=Ws(Us(e,"bottom")),r=Lf(e,"x"),a=Lf(e,"y");return{fullSize:t,leftAndTop:i.concat(l),rightAndBottom:s.concat(a).concat(o).concat(r),chartArea:Us(e,"chartArea"),vertical:i.concat(s).concat(a),horizontal:l.concat(o).concat(r)}}function Nf(n,e,t,i){return Math.max(n[t],e[t])+Math.max(n[i],e[i])}function m_(n,e){n.top=Math.max(n.top,e.top),n.left=Math.max(n.left,e.left),n.bottom=Math.max(n.bottom,e.bottom),n.right=Math.max(n.right,e.right)}function dk(n,e,t,i){const{pos:s,box:l}=t,o=n.maxPadding;if(!Ye(s)){t.size&&(n[s]-=t.size);const c=i[t.stack]||{size:0,count:1};c.size=Math.max(c.size,t.horizontal?l.height:l.width),t.size=c.size/c.count,n[s]+=t.size}l.getPadding&&m_(o,l.getPadding());const r=Math.max(0,e.outerWidth-Nf(o,n,"left","right")),a=Math.max(0,e.outerHeight-Nf(o,n,"top","bottom")),u=r!==n.w,f=a!==n.h;return n.w=r,n.h=a,t.horizontal?{same:u,other:f}:{same:f,other:u}}function pk(n){const e=n.maxPadding;function t(i){const s=Math.max(e[i]-n[i],0);return n[i]+=s,s}n.y+=t("top"),n.x+=t("left"),t("right"),t("bottom")}function hk(n,e){const t=e.maxPadding;function i(s){const l={left:0,top:0,right:0,bottom:0};return s.forEach(o=>{l[o]=Math.max(e[o],t[o])}),l}return i(n?["left","right"]:["top","bottom"])}function Qs(n,e,t,i){const s=[];let l,o,r,a,u,f;for(l=0,o=n.length,u=0;l{typeof g.beforeLayout=="function"&&g.beforeLayout()});const f=a.reduce((g,b)=>b.box.options&&b.box.options.display===!1?g:g+1,0)||1,c=Object.freeze({outerWidth:e,outerHeight:t,padding:s,availableWidth:l,availableHeight:o,vBoxMaxWidth:l/2/f,hBoxMaxHeight:o/2}),d=Object.assign({},s);m_(d,Cn(i));const h=Object.assign({maxPadding:d,w:l,h:o,x:s.left,y:s.top},s),m=fk(a.concat(u),c);Qs(r.fullSize,h,c,m),Qs(a,h,c,m),Qs(u,h,c,m)&&Qs(a,h,c,m),pk(h),Ff(r.leftAndTop,h,c,m),h.x+=h.w,h.y+=h.h,Ff(r.rightAndBottom,h,c,m),n.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},lt(r.chartArea,g=>{const b=g.box;Object.assign(b,n.chartArea),b.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class g_{acquireContext(e,t){}releaseContext(e){return!1}addEventListener(e,t,i){}removeEventListener(e,t,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,t,i,s){return t=Math.max(0,t||e.width),i=i||e.height,{width:t,height:Math.max(0,s?Math.floor(t/s):i)}}isAttached(e){return!0}updateConfig(e){}}class mk extends g_{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const po="$chartjs",gk={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Rf=n=>n===null||n==="";function _k(n,e){const t=n.style,i=n.getAttribute("height"),s=n.getAttribute("width");if(n[po]={initial:{height:i,width:s,style:{display:t.display,height:t.height,width:t.width}}},t.display=t.display||"block",t.boxSizing=t.boxSizing||"border-box",Rf(s)){const l=mf(n,"width");l!==void 0&&(n.width=l)}if(Rf(i))if(n.style.height==="")n.height=n.width/(e||2);else{const l=mf(n,"height");l!==void 0&&(n.height=l)}return n}const __=Xy?{passive:!0}:!1;function bk(n,e,t){n.addEventListener(e,t,__)}function vk(n,e,t){n.canvas.removeEventListener(e,t,__)}function yk(n,e){const t=gk[n.type]||n.type,{x:i,y:s}=Ri(n,e);return{type:t,chart:e,native:n,x:i!==void 0?i:null,y:s!==void 0?s:null}}function Ao(n,e){for(const t of n)if(t===e||t.contains(e))return!0}function kk(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||Ao(r.addedNodes,i),o=o&&!Ao(r.removedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}function wk(n,e,t){const i=n.canvas,s=new MutationObserver(l=>{let o=!1;for(const r of l)o=o||Ao(r.removedNodes,i),o=o&&!Ao(r.addedNodes,i);o&&t()});return s.observe(document,{childList:!0,subtree:!0}),s}const gl=new Map;let Hf=0;function b_(){const n=window.devicePixelRatio;n!==Hf&&(Hf=n,gl.forEach((e,t)=>{t.currentDevicePixelRatio!==n&&e()}))}function Sk(n,e){gl.size||window.addEventListener("resize",b_),gl.set(n,e)}function $k(n){gl.delete(n),gl.size||window.removeEventListener("resize",b_)}function Ck(n,e,t){const i=n.canvas,s=i&&Ra(i);if(!s)return;const l=Bg((r,a)=>{const u=s.clientWidth;t(r,a),u{const a=r[0],u=a.contentRect.width,f=a.contentRect.height;u===0&&f===0||l(u,f)});return o.observe(s),Sk(n,l),o}function gr(n,e,t){t&&t.disconnect(),e==="resize"&&$k(n)}function Tk(n,e,t){const i=n.canvas,s=Bg(l=>{n.ctx!==null&&t(yk(l,n))},n,l=>{const o=l[0];return[o,o.offsetX,o.offsetY]});return bk(i,e,s),s}class Mk extends g_{acquireContext(e,t){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(_k(e,t),i):null}releaseContext(e){const t=e.canvas;if(!t[po])return!1;const i=t[po].initial;["height","width"].forEach(l=>{const o=i[l];it(o)?t.removeAttribute(l):t.setAttribute(l,o)});const s=i.style||{};return Object.keys(s).forEach(l=>{t.style[l]=s[l]}),t.width=t.width,delete t[po],!0}addEventListener(e,t,i){this.removeEventListener(e,t);const s=e.$proxies||(e.$proxies={}),o={attach:kk,detach:wk,resize:Ck}[t]||Tk;s[t]=o(e,t,i)}removeEventListener(e,t){const i=e.$proxies||(e.$proxies={}),s=i[t];if(!s)return;({attach:gr,detach:gr,resize:gr}[t]||vk)(e,t,s),i[t]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,t,i,s){return Gy(e,t,i,s)}isAttached(e){const t=Ra(e);return!!(t&&t.isConnected)}}function Ok(n){return!s_()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?mk:Mk}class Dk{constructor(){this._init=[]}notify(e,t,i,s){t==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const l=s?this._descriptors(e).filter(s):this._descriptors(e),o=this._notify(l,e,t,i);return t==="afterDestroy"&&(this._notify(l,e,"stop"),this._notify(this._init,e,"uninstall")),o}_notify(e,t,i,s){s=s||{};for(const l of e){const o=l.plugin,r=o[i],a=[t,s,l.options];if(pt(r,a,o)===!1&&s.cancelable)return!1}return!0}invalidate(){it(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}_createDescriptors(e,t){const i=e&&e.config,s=Xe(i.options&&i.options.plugins,{}),l=Ak(i);return s===!1&&!t?[]:Ik(e,l,s,t)}_notifyStateChanges(e){const t=this._oldCache||[],i=this._cache,s=(l,o)=>l.filter(r=>!o.some(a=>r.plugin.id===a.plugin.id));this._notify(s(t,i),e,"stop"),this._notify(s(i,t),e,"start")}}function Ak(n){const e={},t=[],i=Object.keys(Vn.plugins.items);for(let l=0;l{const a=i[r];if(!Ye(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const u=Gr(r,a),f=Nk(u,s),c=t.scales||{};l[u]=l[u]||r,o[r]=tl(Object.create(null),[{axis:u},a,c[u],c[f]])}),n.data.datasets.forEach(r=>{const a=r.type||n.type,u=r.indexAxis||Zr(a,e),c=(Ji[a]||{}).scales||{};Object.keys(c).forEach(d=>{const h=Lk(d,u),m=r[h+"AxisID"]||l[h]||h;o[m]=o[m]||Object.create(null),tl(o[m],[{axis:h},i[m],c[d]])})}),Object.keys(o).forEach(r=>{const a=o[r];tl(a,[Qe.scales[a.type],Qe.scale])}),o}function v_(n){const e=n.options||(n.options={});e.plugins=Xe(e.plugins,{}),e.scales=Rk(n,e)}function y_(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function Hk(n){return n=n||{},n.data=y_(n.data),v_(n),n}const jf=new Map,k_=new Set;function to(n,e){let t=jf.get(n);return t||(t=e(),jf.set(n,t),k_.add(t)),t}const Ys=(n,e,t)=>{const i=vi(e,t);i!==void 0&&n.add(i)};class jk{constructor(e){this._config=Hk(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=y_(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),v_(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return to(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,t){return to(`${e}.transition.${t}`,()=>[[`datasets.${e}.transitions.${t}`,`transitions.${t}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,t){return to(`${e}-${t}`,()=>[[`datasets.${e}.elements.${t}`,`datasets.${e}`,`elements.${t}`,""]])}pluginScopeKeys(e){const t=e.id,i=this.type;return to(`${i}-plugin-${t}`,()=>[[`plugins.${t}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,t){const i=this._scopeCache;let s=i.get(e);return(!s||t)&&(s=new Map,i.set(e,s)),s}getOptionScopes(e,t,i){const{options:s,type:l}=this,o=this._cachedScopes(e,i),r=o.get(t);if(r)return r;const a=new Set;t.forEach(f=>{e&&(a.add(e),f.forEach(c=>Ys(a,e,c))),f.forEach(c=>Ys(a,s,c)),f.forEach(c=>Ys(a,Ji[l]||{},c)),f.forEach(c=>Ys(a,Qe,c)),f.forEach(c=>Ys(a,Yr,c))});const u=Array.from(a);return u.length===0&&u.push(Object.create(null)),k_.has(t)&&o.set(t,u),u}chartOptionScopes(){const{options:e,type:t}=this;return[e,Ji[t]||{},Qe.datasets[t]||{},{type:t},Qe,Yr]}resolveNamedOptions(e,t,i,s=[""]){const l={$shared:!0},{resolver:o,subPrefixes:r}=qf(this._resolverCache,e,s);let a=o;if(Vk(o,t)){l.$shared=!1,i=yi(i)?i():i;const u=this.createResolver(e,i,r);a=Ms(o,i,u)}for(const u of t)l[u]=a[u];return l}createResolver(e,t,i=[""],s){const{resolver:l}=qf(this._resolverCache,e,i);return Ye(t)?Ms(l,t,void 0,s):l}}function qf(n,e,t){let i=n.get(e);i||(i=new Map,n.set(e,i));const s=t.join();let l=i.get(s);return l||(l={resolver:La(e,t),subPrefixes:t.filter(r=>!r.toLowerCase().includes("hover"))},i.set(s,l)),l}const qk=n=>Ye(n)&&Object.getOwnPropertyNames(n).reduce((e,t)=>e||yi(n[t]),!1);function Vk(n,e){const{isScriptable:t,isIndexable:i}=Qg(n);for(const s of e){const l=t(s),o=i(s),r=(o||l)&&n[s];if(l&&(yi(r)||qk(r))||o&&ft(r))return!0}return!1}var zk="3.9.1";const Bk=["top","bottom","left","right","chartArea"];function Vf(n,e){return n==="top"||n==="bottom"||Bk.indexOf(n)===-1&&e==="x"}function zf(n,e){return function(t,i){return t[n]===i[n]?t[e]-i[e]:t[n]-i[n]}}function Bf(n){const e=n.chart,t=e.options.animation;e.notifyPlugins("afterRender"),pt(t&&t.onComplete,[n],e)}function Uk(n){const e=n.chart,t=e.options.animation;pt(t&&t.onProgress,[n],e)}function w_(n){return s_()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const Eo={},S_=n=>{const e=w_(n);return Object.values(Eo).filter(t=>t.canvas===e).pop()};function Wk(n,e,t){const i=Object.keys(n);for(const s of i){const l=+s;if(l>=e){const o=n[s];delete n[s],(t>0||l>e)&&(n[l+t]=o)}}}function Yk(n,e,t,i){return!t||n.type==="mouseout"?null:i?e:n}class Io{constructor(e,t){const i=this.config=new jk(t),s=w_(e),l=S_(s);if(l)throw new Error("Canvas is already in use. Chart with ID '"+l.id+"' must be destroyed before the canvas with ID '"+l.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||Ok(s)),this.platform.updateConfig(i);const r=this.platform.acquireContext(s,o.aspectRatio),a=r&&r.canvas,u=a&&a.height,f=a&&a.width;if(this.id=Av(),this.ctx=r,this.canvas=a,this.width=f,this.height=u,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Dk,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Yv(c=>this.update(c),o.resizeDelay||0),this._dataChanges=[],Eo[this.id]=this,!r||!a){console.error("Failed to create chart: can't acquire context from the given item");return}xn.listen(this,"complete",Bf),xn.listen(this,"progress",Uk),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:t},width:i,height:s,_aspectRatio:l}=this;return it(e)?t&&l?l:s?i/s:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():hf(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return cf(this.canvas,this.ctx),this}stop(){return xn.stop(this),this}resize(e,t){xn.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}_resize(e,t){const i=this.options,s=this.canvas,l=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(s,e,t,l),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,hf(this,r,!0)&&(this.notifyPlugins("resize",{size:o}),pt(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){const t=this.options.scales||{};lt(t,(i,s)=>{i.id=s})}buildOrUpdateScales(){const e=this.options,t=e.scales,i=this.scales,s=Object.keys(i).reduce((o,r)=>(o[r]=!1,o),{});let l=[];t&&(l=l.concat(Object.keys(t).map(o=>{const r=t[o],a=Gr(o,r),u=a==="r",f=a==="x";return{options:r,dposition:u?"chartArea":f?"bottom":"left",dtype:u?"radialLinear":f?"category":"linear"}}))),lt(l,o=>{const r=o.options,a=r.id,u=Gr(a,r),f=Xe(r.type,o.dtype);(r.position===void 0||Vf(r.position,u)!==Vf(o.dposition))&&(r.position=o.dposition),s[a]=!0;let c=null;if(a in i&&i[a].type===f)c=i[a];else{const d=Vn.getScale(f);c=new d({id:a,type:f,ctx:this.ctx,chart:this}),i[c.id]=c}c.init(r,e)}),lt(s,(o,r)=>{o||delete i[r]}),lt(i,o=>{eo.configure(this,o,o.options),eo.addBox(this,o)})}_updateMetasets(){const e=this._metasets,t=this.data.datasets.length,i=e.length;if(e.sort((s,l)=>s.index-l.index),i>t){for(let s=t;st.length&&delete this._stacks,e.forEach((i,s)=>{t.filter(l=>l===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const e=[],t=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=t.length;i{this.getDatasetMeta(t).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const t=this.config;t.update();const i=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const l=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,f=this.data.datasets.length;u{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(zf("z","_idx"));const{_active:r,_lastEvent:a}=this;a?this._eventHandler(a,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){lt(this.scales,e=>{eo.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,t=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!Xu(t,i)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,t=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:l}of t){const o=i==="_removeElements"?-l:l;Wk(e,s,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const t=this.data.datasets.length,i=l=>new Set(e.filter(o=>o[0]===l).map((o,r)=>r+","+o.splice(1).join(","))),s=i(0);for(let l=1;ll.split(",")).map(l=>({method:l[1],start:+l[2],count:+l[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;eo.update(this,this.width,this.height,e);const t=this.chartArea,i=t.width<=0||t.height<=0;this._layers=[],lt(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,l)=>{s._idx=l}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let t=0,i=this.data.datasets.length;t=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const t=this.ctx,i=e._clip,s=!i.disabled,l=this.chartArea,o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(s&&Ea(t,{left:i.left===!1?0:l.left-i.left,right:i.right===!1?this.width:l.right+i.right,top:i.top===!1?0:l.top-i.top,bottom:i.bottom===!1?this.height:l.bottom+i.bottom}),e.controller.draw(),s&&Ia(t),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return ml(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,t,i,s){const l=rk.modes[t];return typeof l=="function"?l(this,e,i,s):[]}getDatasetMeta(e){const t=this.data.datasets[e],i=this._metasets;let s=i.filter(l=>l&&l._dataset===t).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=Si(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const t=this.data.datasets[e];if(!t)return!1;const i=this.getDatasetMeta(e);return typeof i.hidden=="boolean"?!i.hidden:!t.hidden}setDatasetVisibility(e,t){const i=this.getDatasetMeta(e);i.hidden=!t}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,t,i){const s=i?"show":"hide",l=this.getDatasetMeta(e),o=l.controller._resolveAnimations(void 0,s);$n(t)?(l.data[t].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),o.update(l,{visible:i}),this.update(r=>r.datasetIndex===e?s:void 0))}hide(e,t){this._updateVisibility(e,t,!1)}show(e,t){this._updateVisibility(e,t,!0)}_destroyDatasetMeta(e){const t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}_stop(){let e,t;for(this.stop(),xn.remove(this),e=0,t=this.data.datasets.length;e{t.addEventListener(this,l,o),e[l]=o},s=(l,o,r)=>{l.offsetX=o,l.offsetY=r,this._eventHandler(l)};lt(this.options.events,l=>i(l,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,t=this.platform,i=(a,u)=>{t.addEventListener(this,a,u),e[a]=u},s=(a,u)=>{e[a]&&(t.removeEventListener(this,a,u),delete e[a])},l=(a,u)=>{this.canvas&&this.resize(a,u)};let o;const r=()=>{s("attach",r),this.attached=!0,this.resize(),i("resize",l),i("detach",o)};o=()=>{this.attached=!1,s("resize",l),this._stop(),this._resize(0,0),i("attach",r)},t.isAttached(this.canvas)?r():o()}unbindEvents(){lt(this._listeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._listeners={},lt(this._responsiveListeners,(e,t)=>{this.platform.removeEventListener(this,t,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,t,i){const s=i?"set":"remove";let l,o,r,a;for(t==="dataset"&&(l=this.getDatasetMeta(e[0].datasetIndex),l.controller["_"+s+"DatasetHoverStyle"]()),r=0,a=e.length;r{const r=this.getDatasetMeta(l);if(!r)throw new Error("No dataset found at index "+l);return{datasetIndex:l,element:r.data[o],index:o}});!wo(i,t)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,t))}notifyPlugins(e,t,i){return this._plugins.notify(this,e,t,i)}_updateHoverStyles(e,t,i){const s=this.options.hover,l=(a,u)=>a.filter(f=>!u.some(c=>f.datasetIndex===c.datasetIndex&&f.index===c.index)),o=l(t,e),r=i?e:l(e,t);o.length&&this.updateHoverStyle(o,s.mode,!1),r.length&&s.mode&&this.updateHoverStyle(r,s.mode,!0)}_eventHandler(e,t){const i={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},s=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const l=this._handleEvent(e,t,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(l||i.changed)&&this.render(),this}_handleEvent(e,t,i){const{_active:s=[],options:l}=this,o=t,r=this._getActiveElements(e,s,i,o),a=Fv(e),u=Yk(e,this._lastEvent,i,a);i&&(this._lastEvent=null,pt(l.onHover,[e,r,this],this),a&&pt(l.onClick,[e,r,this],this));const f=!wo(r,s);return(f||t)&&(this._active=r,this._updateHoverStyles(r,s,t)),this._lastEvent=u,f}_getActiveElements(e,t,i,s){if(e.type==="mouseout")return[];if(!i)return t;const l=this.options.hover;return this.getElementsAtEventForMode(e,l.mode,l,s)}}const Uf=()=>lt(Io.instances,n=>n._plugins.invalidate()),ci=!0;Object.defineProperties(Io,{defaults:{enumerable:ci,value:Qe},instances:{enumerable:ci,value:Eo},overrides:{enumerable:ci,value:Ji},registry:{enumerable:ci,value:Vn},version:{enumerable:ci,value:zk},getChart:{enumerable:ci,value:S_},register:{enumerable:ci,value:(...n)=>{Vn.add(...n),Uf()}},unregister:{enumerable:ci,value:(...n)=>{Vn.remove(...n),Uf()}}});function $_(n,e,t){const{startAngle:i,pixelMargin:s,x:l,y:o,outerRadius:r,innerRadius:a}=e;let u=s/r;n.beginPath(),n.arc(l,o,r,i-u,t+u),a>s?(u=s/a,n.arc(l,o,a,t+u,i-u,!0)):n.arc(l,o,s,t+ht,i-ht),n.closePath(),n.clip()}function Kk(n){return Pa(n,["outerStart","outerEnd","innerStart","innerEnd"])}function Jk(n,e,t,i){const s=Kk(n.options.borderRadius),l=(t-e)/2,o=Math.min(l,i*e/2),r=a=>{const u=(t-Math.min(l,a))*i/2;return Rt(a,0,Math.min(l,u))};return{outerStart:r(s.outerStart),outerEnd:r(s.outerEnd),innerStart:Rt(s.innerStart,0,o),innerEnd:Rt(s.innerEnd,0,o)}}function cs(n,e,t,i){return{x:t+n*Math.cos(e),y:i+n*Math.sin(e)}}function Xr(n,e,t,i,s,l){const{x:o,y:r,startAngle:a,pixelMargin:u,innerRadius:f}=e,c=Math.max(e.outerRadius+i+t-u,0),d=f>0?f+i+t+u:0;let h=0;const m=s-a;if(i){const G=f>0?f-i:0,ie=c>0?c-i:0,Q=(G+ie)/2,X=Q!==0?m*Q/(Q+i):m;h=(m-X)/2}const g=Math.max(.001,m*c-t/gt)/c,b=(m-g)/2,y=a+b+h,k=s-b-h,{outerStart:$,outerEnd:C,innerStart:M,innerEnd:T}=Jk(e,d,c,k-y),D=c-$,A=c-C,I=y+$/D,L=k-C/A,F=d+M,q=d+T,z=y+M/F,J=k-T/q;if(n.beginPath(),l){if(n.arc(o,r,c,I,L),C>0){const Q=cs(A,L,o,r);n.arc(Q.x,Q.y,C,L,k+ht)}const G=cs(q,k,o,r);if(n.lineTo(G.x,G.y),T>0){const Q=cs(q,J,o,r);n.arc(Q.x,Q.y,T,k+ht,J+Math.PI)}if(n.arc(o,r,d,k-T/d,y+M/d,!0),M>0){const Q=cs(F,z,o,r);n.arc(Q.x,Q.y,M,z+Math.PI,y-ht)}const ie=cs(D,y,o,r);if(n.lineTo(ie.x,ie.y),$>0){const Q=cs(D,I,o,r);n.arc(Q.x,Q.y,$,y-ht,I)}}else{n.moveTo(o,r);const G=Math.cos(I)*c+o,ie=Math.sin(I)*c+r;n.lineTo(G,ie);const Q=Math.cos(L)*c+o,X=Math.sin(L)*c+r;n.lineTo(Q,X)}n.closePath()}function Zk(n,e,t,i,s){const{fullCircles:l,startAngle:o,circumference:r}=e;let a=e.endAngle;if(l){Xr(n,e,t,i,o+ot,s);for(let u=0;u=ot||pl(l,r,a),g=hl(o,u+d,f+d);return m&&g}getCenterPoint(e){const{x:t,y:i,startAngle:s,endAngle:l,innerRadius:o,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),{offset:a,spacing:u}=this.options,f=(s+l)/2,c=(o+r+u+a)/2;return{x:t+Math.cos(f)*c,y:i+Math.sin(f)*c}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:t,circumference:i}=this,s=(t.offset||0)/2,l=(t.spacing||0)/2,o=t.circular;if(this.pixelMargin=t.borderAlign==="inner"?.33:0,this.fullCircles=i>ot?Math.floor(i/ot):0,i===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let r=0;if(s){r=s/2;const u=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(u)*r,Math.sin(u)*r),this.circumference>=gt&&(r=s)}e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor;const a=Zk(e,this,r,l,o);Xk(e,this,r,l,a,o),e.restore()}}Ba.id="arc";Ba.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0};Ba.defaultRoutes={backgroundColor:"backgroundColor"};function C_(n,e,t=e){n.lineCap=Xe(t.borderCapStyle,e.borderCapStyle),n.setLineDash(Xe(t.borderDash,e.borderDash)),n.lineDashOffset=Xe(t.borderDashOffset,e.borderDashOffset),n.lineJoin=Xe(t.borderJoinStyle,e.borderJoinStyle),n.lineWidth=Xe(t.borderWidth,e.borderWidth),n.strokeStyle=Xe(t.borderColor,e.borderColor)}function Qk(n,e,t){n.lineTo(t.x,t.y)}function xk(n){return n.stepped?yy:n.tension||n.cubicInterpolationMode==="monotone"?ky:Qk}function T_(n,e,t={}){const i=n.length,{start:s=0,end:l=i-1}=t,{start:o,end:r}=e,a=Math.max(s,o),u=Math.min(l,r),f=sr&&l>r;return{count:i,start:a,loop:e.loop,ilen:u(o+(u?r-C:C))%l,$=()=>{g!==b&&(n.lineTo(f,b),n.lineTo(f,g),n.lineTo(f,y))};for(a&&(h=s[k(0)],n.moveTo(h.x,h.y)),d=0;d<=r;++d){if(h=s[k(d)],h.skip)continue;const C=h.x,M=h.y,T=C|0;T===m?(Mb&&(b=M),f=(c*f+C)/++c):($(),n.lineTo(C,M),m=T,c=0,g=b=M),y=M}$()}function Qr(n){const e=n.options,t=e.borderDash&&e.borderDash.length;return!n._decimated&&!n._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!t?tw:ew}function nw(n){return n.stepped?Qy:n.tension||n.cubicInterpolationMode==="monotone"?xy:Hi}function iw(n,e,t,i){let s=e._path;s||(s=e._path=new Path2D,e.path(s,t,i)&&s.closePath()),C_(n,e.options),n.stroke(s)}function sw(n,e,t,i){const{segments:s,options:l}=e,o=Qr(e);for(const r of s)C_(n,l,r.style),n.beginPath(),o(n,e,r,{start:t,end:t+i-1})&&n.closePath(),n.stroke()}const lw=typeof Path2D=="function";function ow(n,e,t,i){lw&&!e.options.segment?iw(n,e,t,i):sw(n,e,t,i)}class $i extends li{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,t){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;Uy(this._points,i,e,s,t),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=a2(this,this.options.segment))}first(){const e=this.segments,t=this.points;return e.length&&t[e[0].start]}last(){const e=this.segments,t=this.points,i=e.length;return i&&t[e[i-1].end]}interpolate(e,t){const i=this.options,s=e[t],l=this.points,o=r_(this,{property:t,start:s,end:s});if(!o.length)return;const r=[],a=nw(i);let u,f;for(u=0,f=o.length;un!=="borderDash"&&n!=="fill"};function Wf(n,e,t,i){const s=n.options,{[t]:l}=n.getProps([t],i);return Math.abs(e-l){r=Wa(o,r,s);const a=s[o],u=s[r];i!==null?(l.push({x:a.x,y:i}),l.push({x:u.x,y:i})):t!==null&&(l.push({x:t,y:a.y}),l.push({x:t,y:u.y}))}),l}function Wa(n,e,t){for(;e>n;e--){const i=t[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function Yf(n,e,t,i){return n&&e?i(n[t],e[t]):n?n[t]:e?e[t]:0}function O_(n,e){let t=[],i=!1;return ft(n)?(i=!0,t=n):t=pw(n,e),t.length?new $i({points:t,options:{tension:0},_loop:i,_fullLoop:i}):null}function Kf(n){return n&&n.fill!==!1}function hw(n,e,t){let s=n[e].fill;const l=[e];let o;if(!t)return s;for(;s!==!1&&l.indexOf(s)===-1;){if(!_t(s))return s;if(o=n[s],!o)return!1;if(o.visible)return s;l.push(s),s=o.fill}return!1}function mw(n,e,t){const i=vw(n);if(Ye(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return _t(s)&&Math.floor(s)===s?gw(i[0],e,s,t):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function gw(n,e,t,i){return(n==="-"||n==="+")&&(t=e+t),t===e||t<0||t>=i?!1:t}function _w(n,e){let t=null;return n==="start"?t=e.bottom:n==="end"?t=e.top:Ye(n)?t=e.getPixelForValue(n.value):e.getBasePixel&&(t=e.getBasePixel()),t}function bw(n,e,t){let i;return n==="start"?i=t:n==="end"?i=e.options.reverse?e.min:e.max:Ye(n)?i=n.value:i=e.getBaseValue(),i}function vw(n){const e=n.options,t=e.fill;let i=Xe(t&&t.target,t);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function yw(n){const{scale:e,index:t,line:i}=n,s=[],l=i.segments,o=i.points,r=kw(e,t);r.push(O_({x:null,y:e.bottom},i));for(let a=0;a=0;--o){const r=s[o].$filler;!r||(r.line.updateControlPoints(l,r.axis),i&&r.fill&&vr(n.ctx,r,l))}},beforeDatasetsDraw(n,e,t){if(t.drawTime!=="beforeDatasetsDraw")return;const i=n.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const l=i[s].$filler;Kf(l)&&vr(n.ctx,l,n.chartArea)}},beforeDatasetDraw(n,e,t){const i=e.meta.$filler;!Kf(i)||t.drawTime!=="beforeDatasetDraw"||vr(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const ll={average(n){if(!n.length)return!1;let e,t,i=0,s=0,l=0;for(e=0,t=n.length;e-1?n.split(` -`):n}function Ew(n,e){const{element:t,datasetIndex:i,index:s}=e,l=n.getDatasetMeta(i).controller,{label:o,value:r}=l.getLabelAndValue(s);return{chart:n,label:o,parsed:l.getParsed(s),raw:n.data.datasets[i].data[s],formattedValue:r,dataset:l.getDataset(),dataIndex:s,datasetIndex:i,element:t}}function Gf(n,e){const t=n.chart.ctx,{body:i,footer:s,title:l}=n,{boxWidth:o,boxHeight:r}=e,a=un(e.bodyFont),u=un(e.titleFont),f=un(e.footerFont),c=l.length,d=s.length,h=i.length,m=Cn(e.padding);let b=m.height,g=0,y=i.reduce((C,M)=>C+M.before.length+M.lines.length+M.after.length,0);if(y+=n.beforeBody.length+n.afterBody.length,c&&(b+=c*u.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),y){const C=e.displayColors?Math.max(r,a.lineHeight):a.lineHeight;b+=h*C+(y-h)*a.lineHeight+(y-1)*e.bodySpacing}d&&(b+=e.footerMarginTop+d*f.lineHeight+(d-1)*e.footerSpacing);let k=0;const $=function(C){g=Math.max(g,t.measureText(C).width+k)};return t.save(),t.font=u.string,lt(n.title,$),t.font=a.string,lt(n.beforeBody.concat(n.afterBody),$),k=e.displayColors?o+2+e.boxPadding:0,lt(i,C=>{lt(C.before,$),lt(C.lines,$),lt(C.after,$)}),k=0,t.font=f.string,lt(n.footer,$),t.restore(),g+=m.width,{width:g,height:b}}function Iw(n,e){const{y:t,height:i}=e;return tn.height-i/2?"bottom":"center"}function Pw(n,e,t,i){const{x:s,width:l}=i,o=t.caretSize+t.caretPadding;if(n==="left"&&s+l+o>e.width||n==="right"&&s-l-o<0)return!0}function Lw(n,e,t,i){const{x:s,width:l}=t,{width:o,chartArea:{left:r,right:a}}=n;let u="center";return i==="center"?u=s<=(r+a)/2?"left":"right":s<=l/2?u="left":s>=o-l/2&&(u="right"),Pw(u,n,e,t)&&(u="center"),u}function Xf(n,e,t){const i=t.yAlign||e.yAlign||Iw(n,t);return{xAlign:t.xAlign||e.xAlign||Lw(n,e,t,i),yAlign:i}}function Nw(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function Fw(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function Qf(n,e,t,i){const{caretSize:s,caretPadding:l,cornerRadius:o}=n,{xAlign:r,yAlign:a}=t,u=s+l,{topLeft:f,topRight:c,bottomLeft:d,bottomRight:h}=_s(o);let m=Nw(e,r);const b=Fw(e,a,u);return a==="center"?r==="left"?m+=u:r==="right"&&(m-=u):r==="left"?m-=Math.max(f,d)+s:r==="right"&&(m+=Math.max(c,h)+s),{x:Rt(m,0,i.width-e.width),y:Rt(b,0,i.height-e.height)}}function to(n,e,t){const i=Cn(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function xf(n){return jn([],ei(n))}function Rw(n,e,t){return Si(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function ec(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}class xr extends li{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart||e._chart,this._chart=this.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&t.options.animation&&i.animations,l=new r_(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=Rw(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,t){const{callbacks:i}=t,s=i.beforeTitle.apply(this,[e]),l=i.title.apply(this,[e]),o=i.afterTitle.apply(this,[e]);let r=[];return r=jn(r,ei(s)),r=jn(r,ei(l)),r=jn(r,ei(o)),r}getBeforeBody(e,t){return xf(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return lt(e,l=>{const o={before:[],lines:[],after:[]},r=ec(i,l);jn(o.before,ei(r.beforeLabel.call(this,l))),jn(o.lines,r.label.call(this,l)),jn(o.after,ei(r.afterLabel.call(this,l))),s.push(o)}),s}getAfterBody(e,t){return xf(t.callbacks.afterBody.apply(this,[e]))}getFooter(e,t){const{callbacks:i}=t,s=i.beforeFooter.apply(this,[e]),l=i.footer.apply(this,[e]),o=i.afterFooter.apply(this,[e]);let r=[];return r=jn(r,ei(s)),r=jn(r,ei(l)),r=jn(r,ei(o)),r}_createItems(e){const t=this._active,i=this.chart.data,s=[],l=[],o=[];let r=[],a,u;for(a=0,u=t.length;ae.filter(f,c,d,i))),e.itemSort&&(r=r.sort((f,c)=>e.itemSort(f,c,i))),lt(r,f=>{const c=ec(e.callbacks,f);s.push(c.labelColor.call(this,f)),l.push(c.labelPointStyle.call(this,f)),o.push(c.labelTextColor.call(this,f))}),this.labelColors=s,this.labelPointStyles=l,this.labelTextColors=o,this.dataPoints=r,r}update(e,t){const i=this.options.setContext(this.getContext()),s=this._active;let l,o=[];if(!s.length)this.opacity!==0&&(l={opacity:0});else{const r=sl[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const a=this._size=Gf(this,i),u=Object.assign({},r,a),f=Xf(this.chart,i,u),c=Qf(i,u,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,l={opacity:1,x:c.x,y:c.y,width:a.width,height:a.height,caretX:r.x,caretY:r.y}}this._tooltipItems=o,this.$context=void 0,l&&this._resolveAnimations().update(this,l),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,i,s){const l=this.getCaretPosition(e,i,s);t.lineTo(l.x1,l.y1),t.lineTo(l.x2,l.y2),t.lineTo(l.x3,l.y3)}getCaretPosition(e,t,i){const{xAlign:s,yAlign:l}=this,{caretSize:o,cornerRadius:r}=i,{topLeft:a,topRight:u,bottomLeft:f,bottomRight:c}=_s(r),{x:d,y:h}=e,{width:m,height:b}=t;let g,y,k,$,C,M;return l==="center"?(C=h+b/2,s==="left"?(g=d,y=g-o,$=C+o,M=C-o):(g=d+m,y=g+o,$=C-o,M=C+o),k=g):(s==="left"?y=d+Math.max(a,f)+o:s==="right"?y=d+m-Math.max(u,c)-o:y=this.caretX,l==="top"?($=h,C=$-o,g=y-o,k=y+o):($=h+b,C=$+o,g=y+o,k=y-o),M=$),{x1:g,x2:y,x3:k,y1:$,y2:C,y3:M}}drawTitle(e,t,i){const s=this.title,l=s.length;let o,r,a;if(l){const u=ur(i.rtl,this.x,this.width);for(e.x=to(this,i.titleAlign,i),t.textAlign=u.textAlign(i.titleAlign),t.textBaseline="middle",o=un(i.titleFont),r=i.titleSpacing,t.fillStyle=i.titleColor,t.font=o.string,a=0;a$!==0)?(e.beginPath(),e.fillStyle=l.multiKeyBackground,Mo(e,{x:g,y:b,w:u,h:a,radius:k}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),Mo(e,{x:y,y:b+1,w:u-2,h:a-2,radius:k}),e.fill()):(e.fillStyle=l.multiKeyBackground,e.fillRect(g,b,u,a),e.strokeRect(g,b,u,a),e.fillStyle=o.backgroundColor,e.fillRect(y,b+1,u-2,a-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,t,i){const{body:s}=this,{bodySpacing:l,bodyAlign:o,displayColors:r,boxHeight:a,boxWidth:u,boxPadding:f}=i,c=un(i.bodyFont);let d=c.lineHeight,h=0;const m=ur(i.rtl,this.x,this.width),b=function(A){t.fillText(A,m.x(e.x+h),e.y+d/2),e.y+=d+l},g=m.textAlign(o);let y,k,$,C,M,T,D;for(t.textAlign=o,t.textBaseline="middle",t.font=c.string,e.x=to(this,g,i),t.fillStyle=i.bodyColor,lt(this.beforeBody,b),h=r&&g!=="right"?o==="center"?u/2+f:u+2+f:0,C=0,T=s.length;C0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,i=this.$animations,s=i&&i.x,l=i&&i.y;if(s||l){const o=sl[e.position].call(this,this._active,this._eventPosition);if(!o)return;const r=this._size=Gf(this,e),a=Object.assign({},o,this._size),u=Xf(t,e,a),f=Qf(e,a,u,t);(s._to!==f.x||l._to!==f.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=r.width,this.height=r.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(t);const s={width:this.width,height:this.height},l={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=Cn(t.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&r&&(e.save(),e.globalAlpha=i,this.drawBackground(l,e,s,t),n2(e,t.textDirection),l.y+=o.top,this.drawTitle(l,e,t),this.drawBody(l,e,t),this.drawFooter(l,e,t),i2(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const i=this._active,s=e.map(({datasetIndex:r,index:a})=>{const u=this.chart.getDatasetMeta(r);if(!u)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:u.data[a],index:a}}),l=!ko(i,s),o=this._positionChanged(s,t);(l||o)&&(this._active=s,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,i=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,l=this._active||[],o=this._getActiveElements(e,l,t,i),r=this._positionChanged(o,e),a=t||!ko(o,l)||r;return a&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),a}_getActiveElements(e,t,i,s){const l=this.options;if(e.type==="mouseout")return[];if(!s)return t;const o=this.chart.getElementsAtEventForMode(e,l.mode,l,i);return l.reverse&&o.reverse(),o}_positionChanged(e,t){const{caretX:i,caretY:s,options:l}=this,o=sl[l.position].call(this,e,t);return o!==!1&&(i!==o.x||s!==o.y)}}xr.positioners=sl;var Hw={id:"tooltip",_element:xr,positioners:sl,afterInit(n,e,t){t&&(n.tooltip=new xr({chart:n,options:t}))},beforeUpdate(n,e,t){n.tooltip&&n.tooltip.initialize(t)},reset(n,e,t){n.tooltip&&n.tooltip.initialize(t)},afterDraw(n){const e=n.tooltip;if(e&&e._willRender()){const t={tooltip:e};if(n.notifyPlugins("beforeTooltipDraw",t)===!1)return;e.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",t)}},afterEvent(n,e){if(n.tooltip){const t=e.replay;n.tooltip.handleEvent(e.event,t,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(n,e)=>e.bodyFont.size,boxWidth:(n,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:Qn,title(n){if(n.length>0){const e=n[0],t=e.chart.data.labels,i=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndexn!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const jw=(n,e,t,i)=>(typeof e=="string"?(t=n.push(e)-1,i.unshift({index:t,label:e})):isNaN(e)&&(t=null),t);function qw(n,e,t,i){const s=n.indexOf(e);if(s===-1)return jw(n,e,t,i);const l=n.lastIndexOf(e);return s!==l?t:s}const Vw=(n,e)=>n===null?null:Rt(Math.round(n),0,e);class ea extends Qi{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const i=this.getLabels();for(const{index:s,label:l}of t)i[s]===l&&i.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(it(e))return null;const i=this.getLabels();return t=isFinite(t)&&i[t]===e?t:qw(i,e,Xe(t,e),this._addedLabels),Vw(t,i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(i=0),t||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const e=this.min,t=this.max,i=this.options.offset,s=[];let l=this.getLabels();l=e===0&&t===l.length-1?l:l.slice(e,t+1),this._valueRange=Math.max(l.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=e;o<=t;o++)s.push({value:o});return s}getLabelForValue(e){const t=this.getLabels();return e>=0&&et.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}ea.id="category";ea.defaults={ticks:{callback:ea.prototype.getLabelForValue}};function zw(n,e){const t=[],{bounds:s,step:l,min:o,max:r,precision:a,count:u,maxTicks:f,maxDigits:c,includeBounds:d}=n,h=l||1,m=f-1,{min:b,max:g}=e,y=!it(o),k=!it(r),$=!it(u),C=(g-b)/(c+1);let M=Qu((g-b)/m/h)*h,T,D,A,I;if(M<1e-14&&!y&&!k)return[{value:b},{value:g}];I=Math.ceil(g/M)-Math.floor(b/M),I>m&&(M=Qu(I*M/m/h)*h),it(a)||(T=Math.pow(10,a),M=Math.ceil(M*T)/T),s==="ticks"?(D=Math.floor(b/M)*M,A=Math.ceil(g/M)*M):(D=b,A=g),y&&k&&l&&jv((r-o)/l,M/1e3)?(I=Math.round(Math.min((r-o)/M,f)),M=(r-o)/I,D=o,A=r):$?(D=y?o:D,A=k?r:A,I=u-1,M=(A-D)/I):(I=(A-D)/M,tl(I,Math.round(I),M/1e3)?I=Math.round(I):I=Math.ceil(I));const L=Math.max(xu(M),xu(D));T=Math.pow(10,it(a)?L:a),D=Math.round(D*T)/T,A=Math.round(A*T)/T;let F=0;for(y&&(d&&D!==o?(t.push({value:o}),Ds=t?s:a,r=a=>l=i?l:a;if(e){const a=zn(s),u=zn(l);a<0&&u<0?r(0):a>0&&u>0&&o(0)}if(s===l){let a=1;(l>=Number.MAX_SAFE_INTEGER||s<=Number.MIN_SAFE_INTEGER)&&(a=Math.abs(l*.05)),r(l+a),e||o(s-a)}this.min=s,this.max=l}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:t,stepSize:i}=e,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),t=t||11),t&&(s=Math.min(t,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},l=this._range||this,o=zw(s,l);return e.bounds==="ticks"&&Rg(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let t=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const s=(i-t)/Math.max(e.length-1,1)/2;t-=s,i+=s}this._startValue=t,this._endValue=i,this._valueRange=i-t}getLabelForValue(e){return Dl(e,this.chart.options.locale,this.options.ticks.format)}}class Wa extends Io{determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=_t(e)?e:0,this.max=_t(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,i=In(this.options.ticks.minRotation),s=(e?Math.sin(i):Math.cos(i))||.001,l=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,l.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}Wa.id="linear";Wa.defaults={ticks:{callback:Wo.formatters.numeric}};function nc(n){return n/Math.pow(10,Math.floor(yn(n)))===1}function Bw(n,e){const t=Math.floor(yn(e.max)),i=Math.ceil(e.max/Math.pow(10,t)),s=[];let l=gn(n.min,Math.pow(10,Math.floor(yn(e.min)))),o=Math.floor(yn(l)),r=Math.floor(l/Math.pow(10,o)),a=o<0?Math.pow(10,Math.abs(o)):1;do s.push({value:l,major:nc(l)}),++r,r===10&&(r=1,++o,a=o>=0?1:a),l=Math.round(r*Math.pow(10,o)*a)/a;while(o0?i:null}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=_t(e)?Math.max(0,e):null,this.max=_t(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let i=this.min,s=this.max;const l=a=>i=e?i:a,o=a=>s=t?s:a,r=(a,u)=>Math.pow(10,Math.floor(yn(a))+u);i===s&&(i<=0?(l(1),o(10)):(l(r(i,-1)),o(r(s,1)))),i<=0&&l(r(s,-1)),s<=0&&o(r(i,1)),this._zero&&this.min!==this._suggestedMin&&i===r(this.min,0)&&l(r(i,-1)),this.min=i,this.max=s}buildTicks(){const e=this.options,t={min:this._userMin,max:this._userMax},i=Bw(t,this);return e.bounds==="ticks"&&Rg(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":Dl(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=yn(e),this._valueRange=yn(this.max)-yn(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(yn(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}D_.id="logarithmic";D_.defaults={ticks:{callback:Wo.formatters.logarithmic,major:{enabled:!0}}};function ta(n){const e=n.ticks;if(e.display&&n.display){const t=Cn(e.backdropPadding);return Xe(e.font&&e.font.size,Qe.font.size)+t.height}return 0}function Uw(n,e,t){return t=ft(t)?t:[t],{w:_y(n,e.string,t),h:t.length*e.lineHeight}}function ic(n,e,t,i,s){return n===i||n===s?{start:e-t/2,end:e+t/2}:ns?{start:e-t,end:e}:{start:e,end:e+t}}function Ww(n){const e={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},t=Object.assign({},e),i=[],s=[],l=n._pointLabels.length,o=n.options.pointLabels,r=o.centerPointLabels?gt/l:0;for(let a=0;ae.r&&(r=(i.end-e.r)/l,n.r=Math.max(n.r,e.r+r)),s.starte.b&&(a=(s.end-e.b)/o,n.b=Math.max(n.b,e.b+a))}function Kw(n,e,t){const i=[],s=n._pointLabels.length,l=n.options,o=ta(l)/2,r=n.drawingArea,a=l.pointLabels.centerPointLabels?gt/s:0;for(let u=0;u270||t<90)&&(n-=e),n}function Xw(n,e){const{ctx:t,options:{pointLabels:i}}=n;for(let s=e-1;s>=0;s--){const l=i.setContext(n.getPointLabelContext(s)),o=un(l.font),{x:r,y:a,textAlign:u,left:f,top:c,right:d,bottom:h}=n._pointLabelItems[s],{backdropColor:m}=l;if(!it(m)){const b=_s(l.borderRadius),g=Cn(l.backdropPadding);t.fillStyle=m;const y=f-g.left,k=c-g.top,$=d-f+g.width,C=h-c+g.height;Object.values(b).some(M=>M!==0)?(t.beginPath(),Mo(t,{x:y,y:k,w:$,h:C,radius:b}),t.fill()):t.fillRect(y,k,$,C)}To(t,n._pointLabels[s],r,a+o.lineHeight/2,o,{color:l.color,textAlign:u,textBaseline:"middle"})}}function A_(n,e,t,i){const{ctx:s}=n;if(t)s.arc(n.xCenter,n.yCenter,e,0,ot);else{let l=n.getPointPosition(0,e);s.moveTo(l.x,l.y);for(let o=1;o{const s=pt(this.options.pointLabels.callback,[t,i],this);return s||s===0?s:""}).filter((t,i)=>this.chart.getDataVisibility(i))}fit(){const e=this.options;e.display&&e.pointLabels.display?Ww(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,i,s){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,i,s))}getIndexAngle(e){const t=ot/(this._pointLabels.length||1),i=this.options.startAngle||0;return an(e*t+In(i))}getDistanceFromCenterForValue(e){if(it(e))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(it(e))return NaN;const t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){const t=this._pointLabels||[];if(e>=0&&e{if(f!==0){r=this.getDistanceFromCenterForValue(u.value);const c=s.setContext(this.getContext(f-1));Qw(this,c,r,l)}}),i.display){for(e.save(),o=l-1;o>=0;o--){const u=i.setContext(this.getPointLabelContext(o)),{color:f,lineWidth:c}=u;!c||!f||(e.lineWidth=c,e.strokeStyle=f,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,r=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,r),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(a.x,a.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,t=this.options,i=t.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let l,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((r,a)=>{if(a===0&&!t.reverse)return;const u=i.setContext(this.getContext(a)),f=un(u.font);if(l=this.getDistanceFromCenterForValue(this.ticks[a].value),u.showLabelBackdrop){e.font=f.string,o=e.measureText(r.label).width,e.fillStyle=u.backdropColor;const c=Cn(u.backdropPadding);e.fillRect(-o/2-c.left,-l-f.size/2-c.top,o+c.width,f.size+c.height)}To(e,r.label,0,-l,f,{color:u.color})}),e.restore()}drawTitle(){}}Ko.id="radialLinear";Ko.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Wo.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(n){return n},padding:5,centerPointLabels:!1}};Ko.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};Ko.descriptors={angleLines:{_fallback:"grid"}};const Jo={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},en=Object.keys(Jo);function eS(n,e){return n-e}function sc(n,e){if(it(e))return null;const t=n._adapter,{parser:i,round:s,isoWeekday:l}=n._parseOpts;let o=e;return typeof i=="function"&&(o=i(o)),_t(o)||(o=typeof i=="string"?t.parse(o,i):t.parse(o)),o===null?null:(s&&(o=s==="week"&&(Cs(l)||l===!0)?t.startOf(o,"isoWeek",l):t.startOf(o,s)),+o)}function lc(n,e,t,i){const s=en.length;for(let l=en.indexOf(n);l=en.indexOf(t);l--){const o=en[l];if(Jo[o].common&&n._adapter.diff(s,i,o)>=e-1)return o}return en[t?en.indexOf(t):0]}function nS(n){for(let e=en.indexOf(n)+1,t=en.length;e=e?t[i]:t[s];n[l]=!0}}function iS(n,e,t,i){const s=n._adapter,l=+s.startOf(e[0].value,i),o=e[e.length-1].value;let r,a;for(r=l;r<=o;r=+s.add(r,1,i))a=t[r],a>=0&&(e[a].major=!0);return e}function rc(n,e,t){const i=[],s={},l=e.length;let o,r;for(o=0;o+e.value))}initOffsets(e){let t=0,i=0,s,l;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?t=1-s:t=(this.getDecimalForValue(e[1])-s)/2,l=this.getDecimalForValue(e[e.length-1]),e.length===1?i=l:i=(l-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;t=Rt(t,0,o),i=Rt(i,0,o),this._offsets={start:t,end:i,factor:1/(t+1+i)}}_generate(){const e=this._adapter,t=this.min,i=this.max,s=this.options,l=s.time,o=l.unit||lc(l.minUnit,t,i,this._getLabelCapacity(t)),r=Xe(l.stepSize,1),a=o==="week"?l.isoWeekday:!1,u=Cs(a)||a===!0,f={};let c=t,d,h;if(u&&(c=+e.startOf(c,"isoWeek",a)),c=+e.startOf(c,u?"day":o),e.diff(i,t,o)>1e5*r)throw new Error(t+" and "+i+" are too far apart with stepSize of "+r+" "+o);const m=s.ticks.source==="data"&&this.getDataTimestamps();for(d=c,h=0;db-g).map(b=>+b)}getLabelForValue(e){const t=this._adapter,i=this.options.time;return i.tooltipFormat?t.format(e,i.tooltipFormat):t.format(e,i.displayFormats.datetime)}_tickFormatFunction(e,t,i,s){const l=this.options,o=l.time.displayFormats,r=this._unit,a=this._majorUnit,u=r&&o[r],f=a&&o[a],c=i[t],d=a&&f&&c&&c.major,h=this._adapter.format(e,s||(d?f:u)),m=l.ticks.callback;return m?pt(m,[h,t,i],this):h}generateTickLabels(e){let t,i,s;for(t=0,i=e.length;t0?r:1}getDataTimestamps(){let e=this._cache.data||[],t,i;if(e.length)return e;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,i=s.length;t=n[i].pos&&e<=n[s].pos&&({lo:i,hi:s}=qi(n,"pos",e)),{pos:l,time:r}=n[i],{pos:o,time:a}=n[s]):(e>=n[i].time&&e<=n[s].time&&({lo:i,hi:s}=qi(n,"time",e)),{time:l,pos:r}=n[i],{time:o,pos:a}=n[s]);const u=o-l;return u?r+(a-r)*(e-l)/u:r}class E_ extends Il{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=no(t,this.min),this._tableRange=no(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:i}=this,s=[],l=[];let o,r,a,u,f;for(o=0,r=e.length;o=t&&u<=i&&s.push(u);if(s.length<2)return[{time:t,pos:0},{time:i,pos:1}];for(o=0,r=s.length;oC+M.before.length+M.lines.length+M.after.length,0);if(y+=n.beforeBody.length+n.afterBody.length,c&&(g+=c*u.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),y){const C=e.displayColors?Math.max(r,a.lineHeight):a.lineHeight;g+=h*C+(y-h)*a.lineHeight+(y-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*f.lineHeight+(d-1)*e.footerSpacing);let k=0;const $=function(C){b=Math.max(b,t.measureText(C).width+k)};return t.save(),t.font=u.string,lt(n.title,$),t.font=a.string,lt(n.beforeBody.concat(n.afterBody),$),k=e.displayColors?o+2+e.boxPadding:0,lt(i,C=>{lt(C.before,$),lt(C.lines,$),lt(C.after,$)}),k=0,t.font=f.string,lt(n.footer,$),t.restore(),b+=m.width,{width:b,height:g}}function Pw(n,e){const{y:t,height:i}=e;return tn.height-i/2?"bottom":"center"}function Lw(n,e,t,i){const{x:s,width:l}=i,o=t.caretSize+t.caretPadding;if(n==="left"&&s+l+o>e.width||n==="right"&&s-l-o<0)return!0}function Nw(n,e,t,i){const{x:s,width:l}=t,{width:o,chartArea:{left:r,right:a}}=n;let u="center";return i==="center"?u=s<=(r+a)/2?"left":"right":s<=l/2?u="left":s>=o-l/2&&(u="right"),Lw(u,n,e,t)&&(u="center"),u}function Qf(n,e,t){const i=t.yAlign||e.yAlign||Pw(n,t);return{xAlign:t.xAlign||e.xAlign||Nw(n,e,t,i),yAlign:i}}function Fw(n,e){let{x:t,width:i}=n;return e==="right"?t-=i:e==="center"&&(t-=i/2),t}function Rw(n,e,t){let{y:i,height:s}=n;return e==="top"?i+=t:e==="bottom"?i-=s+t:i-=s/2,i}function xf(n,e,t,i){const{caretSize:s,caretPadding:l,cornerRadius:o}=n,{xAlign:r,yAlign:a}=t,u=s+l,{topLeft:f,topRight:c,bottomLeft:d,bottomRight:h}=bs(o);let m=Fw(e,r);const g=Rw(e,a,u);return a==="center"?r==="left"?m+=u:r==="right"&&(m-=u):r==="left"?m-=Math.max(f,d)+s:r==="right"&&(m+=Math.max(c,h)+s),{x:Rt(m,0,i.width-e.width),y:Rt(g,0,i.height-e.height)}}function no(n,e,t){const i=Cn(t.padding);return e==="center"?n.x+n.width/2:e==="right"?n.x+n.width-i.right:n.x+i.left}function ec(n){return jn([],ei(n))}function Hw(n,e,t){return Si(n,{tooltip:e,tooltipItems:t,type:"tooltip"})}function tc(n,e){const t=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return t?n.override(t):n}class ea extends li{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart||e._chart,this._chart=this.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const t=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&t.options.animation&&i.animations,l=new a_(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(l)),l}getContext(){return this.$context||(this.$context=Hw(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,t){const{callbacks:i}=t,s=i.beforeTitle.apply(this,[e]),l=i.title.apply(this,[e]),o=i.afterTitle.apply(this,[e]);let r=[];return r=jn(r,ei(s)),r=jn(r,ei(l)),r=jn(r,ei(o)),r}getBeforeBody(e,t){return ec(t.callbacks.beforeBody.apply(this,[e]))}getBody(e,t){const{callbacks:i}=t,s=[];return lt(e,l=>{const o={before:[],lines:[],after:[]},r=tc(i,l);jn(o.before,ei(r.beforeLabel.call(this,l))),jn(o.lines,r.label.call(this,l)),jn(o.after,ei(r.afterLabel.call(this,l))),s.push(o)}),s}getAfterBody(e,t){return ec(t.callbacks.afterBody.apply(this,[e]))}getFooter(e,t){const{callbacks:i}=t,s=i.beforeFooter.apply(this,[e]),l=i.footer.apply(this,[e]),o=i.afterFooter.apply(this,[e]);let r=[];return r=jn(r,ei(s)),r=jn(r,ei(l)),r=jn(r,ei(o)),r}_createItems(e){const t=this._active,i=this.chart.data,s=[],l=[],o=[];let r=[],a,u;for(a=0,u=t.length;ae.filter(f,c,d,i))),e.itemSort&&(r=r.sort((f,c)=>e.itemSort(f,c,i))),lt(r,f=>{const c=tc(e.callbacks,f);s.push(c.labelColor.call(this,f)),l.push(c.labelPointStyle.call(this,f)),o.push(c.labelTextColor.call(this,f))}),this.labelColors=s,this.labelPointStyles=l,this.labelTextColors=o,this.dataPoints=r,r}update(e,t){const i=this.options.setContext(this.getContext()),s=this._active;let l,o=[];if(!s.length)this.opacity!==0&&(l={opacity:0});else{const r=ll[i.position].call(this,s,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const a=this._size=Xf(this,i),u=Object.assign({},r,a),f=Qf(this.chart,i,u),c=xf(i,u,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,l={opacity:1,x:c.x,y:c.y,width:a.width,height:a.height,caretX:r.x,caretY:r.y}}this._tooltipItems=o,this.$context=void 0,l&&this._resolveAnimations().update(this,l),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:t})}drawCaret(e,t,i,s){const l=this.getCaretPosition(e,i,s);t.lineTo(l.x1,l.y1),t.lineTo(l.x2,l.y2),t.lineTo(l.x3,l.y3)}getCaretPosition(e,t,i){const{xAlign:s,yAlign:l}=this,{caretSize:o,cornerRadius:r}=i,{topLeft:a,topRight:u,bottomLeft:f,bottomRight:c}=bs(r),{x:d,y:h}=e,{width:m,height:g}=t;let b,y,k,$,C,M;return l==="center"?(C=h+g/2,s==="left"?(b=d,y=b-o,$=C+o,M=C-o):(b=d+m,y=b+o,$=C-o,M=C+o),k=b):(s==="left"?y=d+Math.max(a,f)+o:s==="right"?y=d+m-Math.max(u,c)-o:y=this.caretX,l==="top"?($=h,C=$-o,b=y-o,k=y+o):($=h+g,C=$+o,b=y+o,k=y-o),M=$),{x1:b,x2:y,x3:k,y1:$,y2:C,y3:M}}drawTitle(e,t,i){const s=this.title,l=s.length;let o,r,a;if(l){const u=fr(i.rtl,this.x,this.width);for(e.x=no(this,i.titleAlign,i),t.textAlign=u.textAlign(i.titleAlign),t.textBaseline="middle",o=un(i.titleFont),r=i.titleSpacing,t.fillStyle=i.titleColor,t.font=o.string,a=0;a$!==0)?(e.beginPath(),e.fillStyle=l.multiKeyBackground,Oo(e,{x:b,y:g,w:u,h:a,radius:k}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),Oo(e,{x:y,y:g+1,w:u-2,h:a-2,radius:k}),e.fill()):(e.fillStyle=l.multiKeyBackground,e.fillRect(b,g,u,a),e.strokeRect(b,g,u,a),e.fillStyle=o.backgroundColor,e.fillRect(y,g+1,u-2,a-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,t,i){const{body:s}=this,{bodySpacing:l,bodyAlign:o,displayColors:r,boxHeight:a,boxWidth:u,boxPadding:f}=i,c=un(i.bodyFont);let d=c.lineHeight,h=0;const m=fr(i.rtl,this.x,this.width),g=function(A){t.fillText(A,m.x(e.x+h),e.y+d/2),e.y+=d+l},b=m.textAlign(o);let y,k,$,C,M,T,D;for(t.textAlign=o,t.textBaseline="middle",t.font=c.string,e.x=no(this,b,i),t.fillStyle=i.bodyColor,lt(this.beforeBody,g),h=r&&b!=="right"?o==="center"?u/2+f:u+2+f:0,C=0,T=s.length;C0&&t.stroke()}_updateAnimationTarget(e){const t=this.chart,i=this.$animations,s=i&&i.x,l=i&&i.y;if(s||l){const o=ll[e.position].call(this,this._active,this._eventPosition);if(!o)return;const r=this._size=Xf(this,e),a=Object.assign({},o,this._size),u=Qf(t,e,a),f=xf(e,a,u,t);(s._to!==f.x||l._to!==f.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=r.width,this.height=r.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(e){const t=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(t);const s={width:this.width,height:this.height},l={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=Cn(t.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&r&&(e.save(),e.globalAlpha=i,this.drawBackground(l,e,s,t),i2(e,t.textDirection),l.y+=o.top,this.drawTitle(l,e,t),this.drawBody(l,e,t),this.drawFooter(l,e,t),s2(e,t.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,t){const i=this._active,s=e.map(({datasetIndex:r,index:a})=>{const u=this.chart.getDatasetMeta(r);if(!u)throw new Error("Cannot find a dataset at index "+r);return{datasetIndex:r,element:u.data[a],index:a}}),l=!wo(i,s),o=this._positionChanged(s,t);(l||o)&&(this._active=s,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,t,i=!0){if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,l=this._active||[],o=this._getActiveElements(e,l,t,i),r=this._positionChanged(o,e),a=t||!wo(o,l)||r;return a&&(this._active=o,(s.enabled||s.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),a}_getActiveElements(e,t,i,s){const l=this.options;if(e.type==="mouseout")return[];if(!s)return t;const o=this.chart.getElementsAtEventForMode(e,l.mode,l,i);return l.reverse&&o.reverse(),o}_positionChanged(e,t){const{caretX:i,caretY:s,options:l}=this,o=ll[l.position].call(this,e,t);return o!==!1&&(i!==o.x||s!==o.y)}}ea.positioners=ll;var jw={id:"tooltip",_element:ea,positioners:ll,afterInit(n,e,t){t&&(n.tooltip=new ea({chart:n,options:t}))},beforeUpdate(n,e,t){n.tooltip&&n.tooltip.initialize(t)},reset(n,e,t){n.tooltip&&n.tooltip.initialize(t)},afterDraw(n){const e=n.tooltip;if(e&&e._willRender()){const t={tooltip:e};if(n.notifyPlugins("beforeTooltipDraw",t)===!1)return;e.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",t)}},afterEvent(n,e){if(n.tooltip){const t=e.replay;n.tooltip.handleEvent(e.event,t,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(n,e)=>e.bodyFont.size,boxWidth:(n,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:Qn,title(n){if(n.length>0){const e=n[0],t=e.chart.data.labels,i=t?t.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndexn!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const qw=(n,e,t,i)=>(typeof e=="string"?(t=n.push(e)-1,i.unshift({index:t,label:e})):isNaN(e)&&(t=null),t);function Vw(n,e,t,i){const s=n.indexOf(e);if(s===-1)return qw(n,e,t,i);const l=n.lastIndexOf(e);return s!==l?t:s}const zw=(n,e)=>n===null?null:Rt(Math.round(n),0,e);class ta extends Qi{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const t=this._addedLabels;if(t.length){const i=this.getLabels();for(const{index:s,label:l}of t)i[s]===l&&i.splice(s,1);this._addedLabels=[]}super.init(e)}parse(e,t){if(it(e))return null;const i=this.getLabels();return t=isFinite(t)&&i[t]===e?t:Vw(i,e,Xe(t,e),this._addedLabels),zw(t,i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(i=0),t||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const e=this.min,t=this.max,i=this.options.offset,s=[];let l=this.getLabels();l=e===0&&t===l.length-1?l:l.slice(e,t+1),this._valueRange=Math.max(l.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=e;o<=t;o++)s.push({value:o});return s}getLabelForValue(e){const t=this.getLabels();return e>=0&&et.length-1?null:this.getPixelForValue(t[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}ta.id="category";ta.defaults={ticks:{callback:ta.prototype.getLabelForValue}};function Bw(n,e){const t=[],{bounds:s,step:l,min:o,max:r,precision:a,count:u,maxTicks:f,maxDigits:c,includeBounds:d}=n,h=l||1,m=f-1,{min:g,max:b}=e,y=!it(o),k=!it(r),$=!it(u),C=(b-g)/(c+1);let M=xu((b-g)/m/h)*h,T,D,A,I;if(M<1e-14&&!y&&!k)return[{value:g},{value:b}];I=Math.ceil(b/M)-Math.floor(g/M),I>m&&(M=xu(I*M/m/h)*h),it(a)||(T=Math.pow(10,a),M=Math.ceil(M*T)/T),s==="ticks"?(D=Math.floor(g/M)*M,A=Math.ceil(b/M)*M):(D=g,A=b),y&&k&&l&&qv((r-o)/l,M/1e3)?(I=Math.round(Math.min((r-o)/M,f)),M=(r-o)/I,D=o,A=r):$?(D=y?o:D,A=k?r:A,I=u-1,M=(A-D)/I):(I=(A-D)/M,nl(I,Math.round(I),M/1e3)?I=Math.round(I):I=Math.ceil(I));const L=Math.max(ef(M),ef(D));T=Math.pow(10,it(a)?L:a),D=Math.round(D*T)/T,A=Math.round(A*T)/T;let F=0;for(y&&(d&&D!==o?(t.push({value:o}),Ds=t?s:a,r=a=>l=i?l:a;if(e){const a=zn(s),u=zn(l);a<0&&u<0?r(0):a>0&&u>0&&o(0)}if(s===l){let a=1;(l>=Number.MAX_SAFE_INTEGER||s<=Number.MIN_SAFE_INTEGER)&&(a=Math.abs(l*.05)),r(l+a),e||o(s-a)}this.min=s,this.max=l}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:t,stepSize:i}=e,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),t=t||11),t&&(s=Math.min(t,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,t=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:t.includeBounds!==!1},l=this._range||this,o=Bw(s,l);return e.bounds==="ticks"&&Hg(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let t=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const s=(i-t)/Math.max(e.length-1,1)/2;t-=s,i+=s}this._startValue=t,this._endValue=i,this._valueRange=i-t}getLabelForValue(e){return Al(e,this.chart.options.locale,this.options.ticks.format)}}class Ya extends Po{determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=_t(e)?e:0,this.max=_t(t)?t:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),t=e?this.width:this.height,i=In(this.options.ticks.minRotation),s=(e?Math.sin(i):Math.cos(i))||.001,l=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,l.lineHeight/s))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}Ya.id="linear";Ya.defaults={ticks:{callback:Yo.formatters.numeric}};function ic(n){return n/Math.pow(10,Math.floor(yn(n)))===1}function Uw(n,e){const t=Math.floor(yn(e.max)),i=Math.ceil(e.max/Math.pow(10,t)),s=[];let l=gn(n.min,Math.pow(10,Math.floor(yn(e.min)))),o=Math.floor(yn(l)),r=Math.floor(l/Math.pow(10,o)),a=o<0?Math.pow(10,Math.abs(o)):1;do s.push({value:l,major:ic(l)}),++r,r===10&&(r=1,++o,a=o>=0?1:a),l=Math.round(r*Math.pow(10,o)*a)/a;while(o0?i:null}determineDataLimits(){const{min:e,max:t}=this.getMinMax(!0);this.min=_t(e)?Math.max(0,e):null,this.max=_t(t)?Math.max(0,t):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:t}=this.getUserBounds();let i=this.min,s=this.max;const l=a=>i=e?i:a,o=a=>s=t?s:a,r=(a,u)=>Math.pow(10,Math.floor(yn(a))+u);i===s&&(i<=0?(l(1),o(10)):(l(r(i,-1)),o(r(s,1)))),i<=0&&l(r(s,-1)),s<=0&&o(r(i,1)),this._zero&&this.min!==this._suggestedMin&&i===r(this.min,0)&&l(r(i,-1)),this.min=i,this.max=s}buildTicks(){const e=this.options,t={min:this._userMin,max:this._userMax},i=Uw(t,this);return e.bounds==="ticks"&&Hg(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":Al(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=yn(e),this._valueRange=yn(this.max)-yn(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(yn(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}A_.id="logarithmic";A_.defaults={ticks:{callback:Yo.formatters.logarithmic,major:{enabled:!0}}};function na(n){const e=n.ticks;if(e.display&&n.display){const t=Cn(e.backdropPadding);return Xe(e.font&&e.font.size,Qe.font.size)+t.height}return 0}function Ww(n,e,t){return t=ft(t)?t:[t],{w:by(n,e.string,t),h:t.length*e.lineHeight}}function sc(n,e,t,i,s){return n===i||n===s?{start:e-t/2,end:e+t/2}:ns?{start:e-t,end:e}:{start:e,end:e+t}}function Yw(n){const e={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},t=Object.assign({},e),i=[],s=[],l=n._pointLabels.length,o=n.options.pointLabels,r=o.centerPointLabels?gt/l:0;for(let a=0;ae.r&&(r=(i.end-e.r)/l,n.r=Math.max(n.r,e.r+r)),s.starte.b&&(a=(s.end-e.b)/o,n.b=Math.max(n.b,e.b+a))}function Jw(n,e,t){const i=[],s=n._pointLabels.length,l=n.options,o=na(l)/2,r=n.drawingArea,a=l.pointLabels.centerPointLabels?gt/s:0;for(let u=0;u270||t<90)&&(n-=e),n}function Qw(n,e){const{ctx:t,options:{pointLabels:i}}=n;for(let s=e-1;s>=0;s--){const l=i.setContext(n.getPointLabelContext(s)),o=un(l.font),{x:r,y:a,textAlign:u,left:f,top:c,right:d,bottom:h}=n._pointLabelItems[s],{backdropColor:m}=l;if(!it(m)){const g=bs(l.borderRadius),b=Cn(l.backdropPadding);t.fillStyle=m;const y=f-b.left,k=c-b.top,$=d-f+b.width,C=h-c+b.height;Object.values(g).some(M=>M!==0)?(t.beginPath(),Oo(t,{x:y,y:k,w:$,h:C,radius:g}),t.fill()):t.fillRect(y,k,$,C)}Mo(t,n._pointLabels[s],r,a+o.lineHeight/2,o,{color:l.color,textAlign:u,textBaseline:"middle"})}}function E_(n,e,t,i){const{ctx:s}=n;if(t)s.arc(n.xCenter,n.yCenter,e,0,ot);else{let l=n.getPointPosition(0,e);s.moveTo(l.x,l.y);for(let o=1;o{const s=pt(this.options.pointLabels.callback,[t,i],this);return s||s===0?s:""}).filter((t,i)=>this.chart.getDataVisibility(i))}fit(){const e=this.options;e.display&&e.pointLabels.display?Yw(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,t,i,s){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,i,s))}getIndexAngle(e){const t=ot/(this._pointLabels.length||1),i=this.options.startAngle||0;return an(e*t+In(i))}getDistanceFromCenterForValue(e){if(it(e))return NaN;const t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}getValueForDistanceFromCenter(e){if(it(e))return NaN;const t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}getPointLabelContext(e){const t=this._pointLabels||[];if(e>=0&&e{if(f!==0){r=this.getDistanceFromCenterForValue(u.value);const c=s.setContext(this.getContext(f-1));xw(this,c,r,l)}}),i.display){for(e.save(),o=l-1;o>=0;o--){const u=i.setContext(this.getPointLabelContext(o)),{color:f,lineWidth:c}=u;!c||!f||(e.lineWidth=c,e.strokeStyle=f,e.setLineDash(u.borderDash),e.lineDashOffset=u.borderDashOffset,r=this.getDistanceFromCenterForValue(t.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,r),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(a.x,a.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,t=this.options,i=t.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let l,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(s),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((r,a)=>{if(a===0&&!t.reverse)return;const u=i.setContext(this.getContext(a)),f=un(u.font);if(l=this.getDistanceFromCenterForValue(this.ticks[a].value),u.showLabelBackdrop){e.font=f.string,o=e.measureText(r.label).width,e.fillStyle=u.backdropColor;const c=Cn(u.backdropPadding);e.fillRect(-o/2-c.left,-l-f.size/2-c.top,o+c.width,f.size+c.height)}Mo(e,r.label,0,-l,f,{color:u.color})}),e.restore()}drawTitle(){}}Jo.id="radialLinear";Jo.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Yo.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(n){return n},padding:5,centerPointLabels:!1}};Jo.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};Jo.descriptors={angleLines:{_fallback:"grid"}};const Zo={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},en=Object.keys(Zo);function tS(n,e){return n-e}function lc(n,e){if(it(e))return null;const t=n._adapter,{parser:i,round:s,isoWeekday:l}=n._parseOpts;let o=e;return typeof i=="function"&&(o=i(o)),_t(o)||(o=typeof i=="string"?t.parse(o,i):t.parse(o)),o===null?null:(s&&(o=s==="week"&&(Ts(l)||l===!0)?t.startOf(o,"isoWeek",l):t.startOf(o,s)),+o)}function oc(n,e,t,i){const s=en.length;for(let l=en.indexOf(n);l=en.indexOf(t);l--){const o=en[l];if(Zo[o].common&&n._adapter.diff(s,i,o)>=e-1)return o}return en[t?en.indexOf(t):0]}function iS(n){for(let e=en.indexOf(n)+1,t=en.length;e=e?t[i]:t[s];n[l]=!0}}function sS(n,e,t,i){const s=n._adapter,l=+s.startOf(e[0].value,i),o=e[e.length-1].value;let r,a;for(r=l;r<=o;r=+s.add(r,1,i))a=t[r],a>=0&&(e[a].major=!0);return e}function ac(n,e,t){const i=[],s={},l=e.length;let o,r;for(o=0;o+e.value))}initOffsets(e){let t=0,i=0,s,l;this.options.offset&&e.length&&(s=this.getDecimalForValue(e[0]),e.length===1?t=1-s:t=(this.getDecimalForValue(e[1])-s)/2,l=this.getDecimalForValue(e[e.length-1]),e.length===1?i=l:i=(l-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;t=Rt(t,0,o),i=Rt(i,0,o),this._offsets={start:t,end:i,factor:1/(t+1+i)}}_generate(){const e=this._adapter,t=this.min,i=this.max,s=this.options,l=s.time,o=l.unit||oc(l.minUnit,t,i,this._getLabelCapacity(t)),r=Xe(l.stepSize,1),a=o==="week"?l.isoWeekday:!1,u=Ts(a)||a===!0,f={};let c=t,d,h;if(u&&(c=+e.startOf(c,"isoWeek",a)),c=+e.startOf(c,u?"day":o),e.diff(i,t,o)>1e5*r)throw new Error(t+" and "+i+" are too far apart with stepSize of "+r+" "+o);const m=s.ticks.source==="data"&&this.getDataTimestamps();for(d=c,h=0;dg-b).map(g=>+g)}getLabelForValue(e){const t=this._adapter,i=this.options.time;return i.tooltipFormat?t.format(e,i.tooltipFormat):t.format(e,i.displayFormats.datetime)}_tickFormatFunction(e,t,i,s){const l=this.options,o=l.time.displayFormats,r=this._unit,a=this._majorUnit,u=r&&o[r],f=a&&o[a],c=i[t],d=a&&f&&c&&c.major,h=this._adapter.format(e,s||(d?f:u)),m=l.ticks.callback;return m?pt(m,[h,t,i],this):h}generateTickLabels(e){let t,i,s;for(t=0,i=e.length;t0?r:1}getDataTimestamps(){let e=this._cache.data||[],t,i;if(e.length)return e;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(t=0,i=s.length;t=n[i].pos&&e<=n[s].pos&&({lo:i,hi:s}=qi(n,"pos",e)),{pos:l,time:r}=n[i],{pos:o,time:a}=n[s]):(e>=n[i].time&&e<=n[s].time&&({lo:i,hi:s}=qi(n,"time",e)),{time:l,pos:r}=n[i],{time:o,pos:a}=n[s]);const u=o-l;return u?r+(a-r)*(e-l)/u:r}class I_ extends Pl{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=io(t,this.min),this._tableRange=io(t,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:t,max:i}=this,s=[],l=[];let o,r,a,u,f;for(o=0,r=e.length;o=t&&u<=i&&s.push(u);if(s.length<2)return[{time:t,pos:0},{time:i,pos:1}];for(o=0,r=s.length;o{t||(t=je(e,$t,{duration:150},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=je(e,$t,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function lS(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=B(n[1]),t=O(),s=B(i)},m(l,o){S(l,e,o),S(l,t,o),S(l,s,o)},p(l,o){o&2&&ae(e,l[1]),o&2&&i!==(i=l[1]===1?"log":"logs")&&ae(s,i)},d(l){l&&w(e),l&&w(t),l&&w(s)}}}function oS(n){let e;return{c(){e=B("Loading...")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function rS(n){let e,t,i,s,l,o=n[2]&&ac();function r(f,c){return f[2]?oS:lS}let a=r(n),u=a(n);return{c(){e=v("div"),o&&o.c(),t=O(),i=v("canvas"),s=O(),l=v("div"),u.c(),p(i,"class","chart-canvas svelte-vh4sl8"),Qa(i,"height","250px"),Qa(i,"width","100%"),p(e,"class","chart-wrapper svelte-vh4sl8"),ne(e,"loading",n[2]),p(l,"class","txt-hint m-t-xs txt-right")},m(f,c){S(f,e,c),o&&o.m(e,null),_(e,t),_(e,i),n[8](i),S(f,s,c),S(f,l,c),u.m(l,null)},p(f,[c]){f[2]?o?c&4&&E(o,1):(o=ac(),o.c(),E(o,1),o.m(e,t)):o&&(pe(),P(o,1,1,()=>{o=null}),he()),c&4&&ne(e,"loading",f[2]),a===(a=r(f))&&u?u.p(f,c):(u.d(1),u=a(f),u&&(u.c(),u.m(l,null)))},i(f){E(o)},o(f){P(o)},d(f){f&&w(e),o&&o.d(),n[8](null),f&&w(s),f&&w(l),u.d()}}}function aS(n,e,t){let{filter:i=""}=e,{presets:s=""}=e,l,o,r=[],a=0,u=!1;async function f(){return t(2,u=!0),de.logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(h=>{c();for(let m of h)r.push({x:new Date(m.date),y:m.total}),t(1,a+=m.total);r.push({x:new Date,y:void 0})}).catch(h=>{h!=null&&h.isAbort||(c(),console.warn(h),de.errorResponseHandler(h,!1))}).finally(()=>{t(2,u=!1)})}function c(){t(1,a=0),t(7,r=[])}cn(()=>(Eo.register($i,Yo,Uo,Wa,Il,Aw,Hw),t(6,o=new Eo(l,{type:"line",data:{datasets:[{label:"Total requests",data:r,borderColor:"#ef4565",pointBackgroundColor:"#ef4565",backgroundColor:"rgb(239,69,101,0.05)",borderWidth:2,pointRadius:1,pointBorderWidth:0,fill:!0}]},options:{animation:!1,interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,grid:{color:"#edf0f3",borderColor:"#dee3e8"},ticks:{precision:0,maxTicksLimit:6,autoSkip:!0,color:"#666f75"}},x:{type:"time",time:{unit:"hour",tooltipFormat:"DD h a"},grid:{borderColor:"#dee3e8",color:h=>h.tick.major?"#edf0f3":""},ticks:{maxTicksLimit:15,autoSkip:!0,maxRotation:0,major:{enabled:!0},color:h=>h.tick.major?"#16161a":"#666f75"}}},plugins:{legend:{display:!1}}}})),()=>o==null?void 0:o.destroy()));function d(h){le[h?"unshift":"push"](()=>{l=h,t(0,l)})}return n.$$set=h=>{"filter"in h&&t(3,i=h.filter),"presets"in h&&t(4,s=h.presets)},n.$$.update=()=>{n.$$.dirty&24&&(typeof i<"u"||typeof s<"u")&&f(),n.$$.dirty&192&&typeof r<"u"&&o&&(t(6,o.data.datasets[0].data=r,o),o.update())},[l,a,u,i,s,f,o,r,d]}class uS extends ke{constructor(e){super(),ye(this,e,aS,rS,be,{filter:3,presets:4,load:5})}get load(){return this.$$.ctx[5]}}var uc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},I_={exports:{}};(function(n){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** + */const lS={datetime:He.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:He.TIME_WITH_SECONDS,minute:He.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};p_._date.override({_id:"luxon",_create:function(n){return He.fromMillis(n,this.options)},init(n){this.options.locale||(this.options.locale=n.locale)},formats:function(){return lS},parse:function(n,e){const t=this.options,i=typeof n;return n===null||i==="undefined"?null:(i==="number"?n=this._create(n):i==="string"?typeof e=="string"?n=He.fromFormat(n,e,t):n=He.fromISO(n,t):n instanceof Date?n=He.fromJSDate(n,t):i==="object"&&!(n instanceof He)&&(n=He.fromObject(n,t)),n.isValid?n.valueOf():null)},format:function(n,e){const t=this._create(n);return typeof e=="string"?t.toFormat(e):t.toLocaleString(e)},add:function(n,e,t){const i={};return i[t]=e,this._create(n).plus(i).valueOf()},diff:function(n,e,t){return this._create(n).diff(this._create(e)).as(t).valueOf()},startOf:function(n,e,t){if(e==="isoWeek"){t=Math.trunc(Math.min(Math.max(0,t),6));const i=this._create(n);return i.minus({days:(i.weekday-t+7)%7}).startOf("day").valueOf()}return e?this._create(n).startOf(e).valueOf():n},endOf:function(n,e){return this._create(n).endOf(e).valueOf()}});function uc(n){let e,t,i;return{c(){e=v("div"),p(e,"class","chart-loader loader svelte-vh4sl8")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&xe(()=>{t||(t=je(e,$t,{duration:150},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=je(e,$t,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function oS(n){let e,t,i=n[1]===1?"log":"logs",s;return{c(){e=B(n[1]),t=O(),s=B(i)},m(l,o){S(l,e,o),S(l,t,o),S(l,s,o)},p(l,o){o&2&&re(e,l[1]),o&2&&i!==(i=l[1]===1?"log":"logs")&&re(s,i)},d(l){l&&w(e),l&&w(t),l&&w(s)}}}function rS(n){let e;return{c(){e=B("Loading...")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function aS(n){let e,t,i,s,l,o=n[2]&&uc();function r(f,c){return f[2]?rS:oS}let a=r(n),u=a(n);return{c(){e=v("div"),o&&o.c(),t=O(),i=v("canvas"),s=O(),l=v("div"),u.c(),p(i,"class","chart-canvas svelte-vh4sl8"),xa(i,"height","250px"),xa(i,"width","100%"),p(e,"class","chart-wrapper svelte-vh4sl8"),ne(e,"loading",n[2]),p(l,"class","txt-hint m-t-xs txt-right")},m(f,c){S(f,e,c),o&&o.m(e,null),_(e,t),_(e,i),n[8](i),S(f,s,c),S(f,l,c),u.m(l,null)},p(f,[c]){f[2]?o?c&4&&E(o,1):(o=uc(),o.c(),E(o,1),o.m(e,t)):o&&(pe(),P(o,1,1,()=>{o=null}),he()),c&4&&ne(e,"loading",f[2]),a===(a=r(f))&&u?u.p(f,c):(u.d(1),u=a(f),u&&(u.c(),u.m(l,null)))},i(f){E(o)},o(f){P(o)},d(f){f&&w(e),o&&o.d(),n[8](null),f&&w(s),f&&w(l),u.d()}}}function uS(n,e,t){let{filter:i=""}=e,{presets:s=""}=e,l,o,r=[],a=0,u=!1;async function f(){return t(2,u=!0),de.logs.getRequestsStats({filter:[s,i].filter(Boolean).join("&&")}).then(h=>{c();for(let m of h)r.push({x:new Date(m.date),y:m.total}),t(1,a+=m.total);r.push({x:new Date,y:void 0})}).catch(h=>{h!=null&&h.isAbort||(c(),console.warn(h),de.errorResponseHandler(h,!1))}).finally(()=>{t(2,u=!1)})}function c(){t(1,a=0),t(7,r=[])}cn(()=>(Io.register($i,Ko,Wo,Ya,Pl,Ew,jw),t(6,o=new Io(l,{type:"line",data:{datasets:[{label:"Total requests",data:r,borderColor:"#ef4565",pointBackgroundColor:"#ef4565",backgroundColor:"rgb(239,69,101,0.05)",borderWidth:2,pointRadius:1,pointBorderWidth:0,fill:!0}]},options:{animation:!1,interaction:{intersect:!1,mode:"index"},scales:{y:{beginAtZero:!0,grid:{color:"#edf0f3",borderColor:"#dee3e8"},ticks:{precision:0,maxTicksLimit:6,autoSkip:!0,color:"#666f75"}},x:{type:"time",time:{unit:"hour",tooltipFormat:"DD h a"},grid:{borderColor:"#dee3e8",color:h=>h.tick.major?"#edf0f3":""},ticks:{maxTicksLimit:15,autoSkip:!0,maxRotation:0,major:{enabled:!0},color:h=>h.tick.major?"#16161a":"#666f75"}}},plugins:{legend:{display:!1}}}})),()=>o==null?void 0:o.destroy()));function d(h){le[h?"unshift":"push"](()=>{l=h,t(0,l)})}return n.$$set=h=>{"filter"in h&&t(3,i=h.filter),"presets"in h&&t(4,s=h.presets)},n.$$.update=()=>{n.$$.dirty&24&&(typeof i<"u"||typeof s<"u")&&f(),n.$$.dirty&192&&typeof r<"u"&&o&&(t(6,o.data.datasets[0].data=r,o),o.update())},[l,a,u,i,s,f,o,r,d]}class fS extends ke{constructor(e){super(),ye(this,e,uS,aS,be,{filter:3,presets:4,load:5})}get load(){return this.$$.ctx[5]}}var fc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},P_={exports:{}};(function(n){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** * Prism: Lightweight, robust, elegant syntax highlighting * * @license MIT * @author Lea Verou * @namespace * @public - */var t=function(i){var s=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,l=0,o={},r={manual:i.Prism&&i.Prism.manual,disableWorkerMessageHandler:i.Prism&&i.Prism.disableWorkerMessageHandler,util:{encode:function k($){return $ instanceof a?new a($.type,k($.content),$.alias):Array.isArray($)?$.map(k):$.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(M){var k=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(M.stack)||[])[1];if(k){var $=document.getElementsByTagName("script");for(var C in $)if($[C].src==k)return $[C]}return null}},isActive:function(k,$,C){for(var M="no-"+$;k;){var T=k.classList;if(T.contains($))return!0;if(T.contains(M))return!1;k=k.parentElement}return!!C}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(k,$){var C=r.util.clone(r.languages[k]);for(var M in $)C[M]=$[M];return C},insertBefore:function(k,$,C,M){M=M||r.languages;var T=M[k],D={};for(var A in T)if(T.hasOwnProperty(A)){if(A==$)for(var I in C)C.hasOwnProperty(I)&&(D[I]=C[I]);C.hasOwnProperty(A)||(D[A]=T[A])}var L=M[k];return M[k]=D,r.languages.DFS(r.languages,function(F,q){q===L&&F!=k&&(this[F]=D)}),D},DFS:function k($,C,M,T){T=T||{};var D=r.util.objId;for(var A in $)if($.hasOwnProperty(A)){C.call($,A,$[A],M||A);var I=$[A],L=r.util.type(I);L==="Object"&&!T[D(I)]?(T[D(I)]=!0,k(I,C,null,T)):L==="Array"&&!T[D(I)]&&(T[D(I)]=!0,k(I,C,A,T))}}},plugins:{},highlightAll:function(k,$){r.highlightAllUnder(document,k,$)},highlightAllUnder:function(k,$,C){var M={callback:C,container:k,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",M),M.elements=Array.prototype.slice.apply(M.container.querySelectorAll(M.selector)),r.hooks.run("before-all-elements-highlight",M);for(var T=0,D;D=M.elements[T++];)r.highlightElement(D,$===!0,M.callback)},highlightElement:function(k,$,C){var M=r.util.getLanguage(k),T=r.languages[M];r.util.setLanguage(k,M);var D=k.parentElement;D&&D.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(D,M);var A=k.textContent,I={element:k,language:M,grammar:T,code:A};function L(q){I.highlightedCode=q,r.hooks.run("before-insert",I),I.element.innerHTML=I.highlightedCode,r.hooks.run("after-highlight",I),r.hooks.run("complete",I),C&&C.call(I.element)}if(r.hooks.run("before-sanity-check",I),D=I.element.parentElement,D&&D.nodeName.toLowerCase()==="pre"&&!D.hasAttribute("tabindex")&&D.setAttribute("tabindex","0"),!I.code){r.hooks.run("complete",I),C&&C.call(I.element);return}if(r.hooks.run("before-highlight",I),!I.grammar){L(r.util.encode(I.code));return}if($&&i.Worker){var F=new Worker(r.filename);F.onmessage=function(q){L(q.data)},F.postMessage(JSON.stringify({language:I.language,code:I.code,immediateClose:!0}))}else L(r.highlight(I.code,I.grammar,I.language))},highlight:function(k,$,C){var M={code:k,grammar:$,language:C};if(r.hooks.run("before-tokenize",M),!M.grammar)throw new Error('The language "'+M.language+'" has no grammar.');return M.tokens=r.tokenize(M.code,M.grammar),r.hooks.run("after-tokenize",M),a.stringify(r.util.encode(M.tokens),M.language)},tokenize:function(k,$){var C=$.rest;if(C){for(var M in C)$[M]=C[M];delete $.rest}var T=new c;return d(T,T.head,k),f(k,T,$,T.head,0),m(T)},hooks:{all:{},add:function(k,$){var C=r.hooks.all;C[k]=C[k]||[],C[k].push($)},run:function(k,$){var C=r.hooks.all[k];if(!(!C||!C.length))for(var M=0,T;T=C[M++];)T($)}},Token:a};i.Prism=r;function a(k,$,C,M){this.type=k,this.content=$,this.alias=C,this.length=(M||"").length|0}a.stringify=function k($,C){if(typeof $=="string")return $;if(Array.isArray($)){var M="";return $.forEach(function(L){M+=k(L,C)}),M}var T={type:$.type,content:k($.content,C),tag:"span",classes:["token",$.type],attributes:{},language:C},D=$.alias;D&&(Array.isArray(D)?Array.prototype.push.apply(T.classes,D):T.classes.push(D)),r.hooks.run("wrap",T);var A="";for(var I in T.attributes)A+=" "+I+'="'+(T.attributes[I]||"").replace(/"/g,""")+'"';return"<"+T.tag+' class="'+T.classes.join(" ")+'"'+A+">"+T.content+""};function u(k,$,C,M){k.lastIndex=$;var T=k.exec(C);if(T&&M&&T[1]){var D=T[1].length;T.index+=D,T[0]=T[0].slice(D)}return T}function f(k,$,C,M,T,D){for(var A in C)if(!(!C.hasOwnProperty(A)||!C[A])){var I=C[A];I=Array.isArray(I)?I:[I];for(var L=0;L=D.reach);Y+=X.value.length,X=X.next){var x=X.value;if($.length>k.length)return;if(!(x instanceof a)){var U=1,re;if(J){if(re=u(Q,Y,k,z),!re||re.index>=k.length)break;var Fe=re.index,Re=re.index+re[0].length,Ne=Y;for(Ne+=X.value.length;Fe>=Ne;)X=X.next,Ne+=X.value.length;if(Ne-=X.value.length,Y=Ne,X.value instanceof a)continue;for(var Le=X;Le!==$.tail&&(NeD.reach&&(D.reach=We);var ue=X.prev;Se&&(ue=d($,ue,Se),Y+=Se.length),h($,ue,U);var se=new a(A,q?r.tokenize(me,q):me,G,me);if(X=d($,ue,se),we&&d($,X,we),U>1){var fe={cause:A+","+L,reach:We};f(k,$,C,X.prev,Y,fe),D&&fe.reach>D.reach&&(D.reach=fe.reach)}}}}}}function c(){var k={value:null,prev:null,next:null},$={value:null,prev:k,next:null};k.next=$,this.head=k,this.tail=$,this.length=0}function d(k,$,C){var M=$.next,T={value:C,prev:$,next:M};return $.next=T,M.prev=T,k.length++,T}function h(k,$,C){for(var M=$.next,T=0;T/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(i){i.type==="entity"&&(i.attributes.title=i.content.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(s,l){var o={};o["language-"+l]={pattern:/(^$)/i,lookbehind:!0,inside:t.languages[l]},o.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:o}};r["language-"+l]={pattern:/[\s\S]+/,inside:t.languages[l]};var a={};a[s]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return s}),"i"),lookbehind:!0,greedy:!0,inside:r},t.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(i,s){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+i+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[s,"language-"+s],inside:t.languages[s]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(i){var s=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;i.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+s.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+s.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+s.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+s.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:s,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},i.languages.css.atrule.inside.rest=i.languages.css;var l=i.languages.markup;l&&(l.tag.addInlined("style","css"),l.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(typeof t>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var i="Loading\u2026",s=function(b,g){return"\u2716 Error "+b+" while fetching file: "+g},l="\u2716 Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},r="data-src-status",a="loading",u="loaded",f="failed",c="pre[data-src]:not(["+r+'="'+u+'"]):not(['+r+'="'+a+'"])';function d(b,g,y){var k=new XMLHttpRequest;k.open("GET",b,!0),k.onreadystatechange=function(){k.readyState==4&&(k.status<400&&k.responseText?g(k.responseText):k.status>=400?y(s(k.status,k.statusText)):y(l))},k.send(null)}function h(b){var g=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(b||"");if(g){var y=Number(g[1]),k=g[2],$=g[3];return k?$?[y,Number($)]:[y,void 0]:[y,y]}}t.hooks.add("before-highlightall",function(b){b.selector+=", "+c}),t.hooks.add("before-sanity-check",function(b){var g=b.element;if(g.matches(c)){b.code="",g.setAttribute(r,a);var y=g.appendChild(document.createElement("CODE"));y.textContent=i;var k=g.getAttribute("data-src"),$=b.language;if($==="none"){var C=(/\.(\w+)$/.exec(k)||[,"none"])[1];$=o[C]||C}t.util.setLanguage(y,$),t.util.setLanguage(g,$);var M=t.plugins.autoloader;M&&M.loadLanguages($),d(k,function(T){g.setAttribute(r,u);var D=h(g.getAttribute("data-range"));if(D){var A=T.split(/\r\n?|\n/g),I=D[0],L=D[1]==null?A.length:D[1];I<0&&(I+=A.length),I=Math.max(0,Math.min(I-1,A.length)),L<0&&(L+=A.length),L=Math.max(0,Math.min(L,A.length)),T=A.slice(I,L).join(` -`),g.hasAttribute("data-start")||g.setAttribute("data-start",String(I+1))}y.textContent=T,t.highlightElement(y)},function(T){g.setAttribute(r,f),y.textContent=T})}}),t.plugins.fileHighlight={highlight:function(g){for(var y=(g||document).querySelectorAll(c),k=0,$;$=y[k++];)t.highlightElement($)}};var m=!1;t.fileHighlight=function(){m||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),m=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(I_);const Ys=I_.exports;var fS={exports:{}};(function(n){(function(){if(typeof Prism>"u")return;var e=Object.assign||function(o,r){for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);return o};function t(o){this.defaults=e({},o)}function i(o){return o.replace(/-(\w)/g,function(r,a){return a.toUpperCase()})}function s(o){for(var r=0,a=0;a"u")return null;if("currentScript"in document&&1<2)return document.currentScript;try{throw new Error}catch(M){var k=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(M.stack)||[])[1];if(k){var $=document.getElementsByTagName("script");for(var C in $)if($[C].src==k)return $[C]}return null}},isActive:function(k,$,C){for(var M="no-"+$;k;){var T=k.classList;if(T.contains($))return!0;if(T.contains(M))return!1;k=k.parentElement}return!!C}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(k,$){var C=r.util.clone(r.languages[k]);for(var M in $)C[M]=$[M];return C},insertBefore:function(k,$,C,M){M=M||r.languages;var T=M[k],D={};for(var A in T)if(T.hasOwnProperty(A)){if(A==$)for(var I in C)C.hasOwnProperty(I)&&(D[I]=C[I]);C.hasOwnProperty(A)||(D[A]=T[A])}var L=M[k];return M[k]=D,r.languages.DFS(r.languages,function(F,q){q===L&&F!=k&&(this[F]=D)}),D},DFS:function k($,C,M,T){T=T||{};var D=r.util.objId;for(var A in $)if($.hasOwnProperty(A)){C.call($,A,$[A],M||A);var I=$[A],L=r.util.type(I);L==="Object"&&!T[D(I)]?(T[D(I)]=!0,k(I,C,null,T)):L==="Array"&&!T[D(I)]&&(T[D(I)]=!0,k(I,C,A,T))}}},plugins:{},highlightAll:function(k,$){r.highlightAllUnder(document,k,$)},highlightAllUnder:function(k,$,C){var M={callback:C,container:k,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};r.hooks.run("before-highlightall",M),M.elements=Array.prototype.slice.apply(M.container.querySelectorAll(M.selector)),r.hooks.run("before-all-elements-highlight",M);for(var T=0,D;D=M.elements[T++];)r.highlightElement(D,$===!0,M.callback)},highlightElement:function(k,$,C){var M=r.util.getLanguage(k),T=r.languages[M];r.util.setLanguage(k,M);var D=k.parentElement;D&&D.nodeName.toLowerCase()==="pre"&&r.util.setLanguage(D,M);var A=k.textContent,I={element:k,language:M,grammar:T,code:A};function L(q){I.highlightedCode=q,r.hooks.run("before-insert",I),I.element.innerHTML=I.highlightedCode,r.hooks.run("after-highlight",I),r.hooks.run("complete",I),C&&C.call(I.element)}if(r.hooks.run("before-sanity-check",I),D=I.element.parentElement,D&&D.nodeName.toLowerCase()==="pre"&&!D.hasAttribute("tabindex")&&D.setAttribute("tabindex","0"),!I.code){r.hooks.run("complete",I),C&&C.call(I.element);return}if(r.hooks.run("before-highlight",I),!I.grammar){L(r.util.encode(I.code));return}if($&&i.Worker){var F=new Worker(r.filename);F.onmessage=function(q){L(q.data)},F.postMessage(JSON.stringify({language:I.language,code:I.code,immediateClose:!0}))}else L(r.highlight(I.code,I.grammar,I.language))},highlight:function(k,$,C){var M={code:k,grammar:$,language:C};if(r.hooks.run("before-tokenize",M),!M.grammar)throw new Error('The language "'+M.language+'" has no grammar.');return M.tokens=r.tokenize(M.code,M.grammar),r.hooks.run("after-tokenize",M),a.stringify(r.util.encode(M.tokens),M.language)},tokenize:function(k,$){var C=$.rest;if(C){for(var M in C)$[M]=C[M];delete $.rest}var T=new c;return d(T,T.head,k),f(k,T,$,T.head,0),m(T)},hooks:{all:{},add:function(k,$){var C=r.hooks.all;C[k]=C[k]||[],C[k].push($)},run:function(k,$){var C=r.hooks.all[k];if(!(!C||!C.length))for(var M=0,T;T=C[M++];)T($)}},Token:a};i.Prism=r;function a(k,$,C,M){this.type=k,this.content=$,this.alias=C,this.length=(M||"").length|0}a.stringify=function k($,C){if(typeof $=="string")return $;if(Array.isArray($)){var M="";return $.forEach(function(L){M+=k(L,C)}),M}var T={type:$.type,content:k($.content,C),tag:"span",classes:["token",$.type],attributes:{},language:C},D=$.alias;D&&(Array.isArray(D)?Array.prototype.push.apply(T.classes,D):T.classes.push(D)),r.hooks.run("wrap",T);var A="";for(var I in T.attributes)A+=" "+I+'="'+(T.attributes[I]||"").replace(/"/g,""")+'"';return"<"+T.tag+' class="'+T.classes.join(" ")+'"'+A+">"+T.content+""};function u(k,$,C,M){k.lastIndex=$;var T=k.exec(C);if(T&&M&&T[1]){var D=T[1].length;T.index+=D,T[0]=T[0].slice(D)}return T}function f(k,$,C,M,T,D){for(var A in C)if(!(!C.hasOwnProperty(A)||!C[A])){var I=C[A];I=Array.isArray(I)?I:[I];for(var L=0;L=D.reach);Y+=X.value.length,X=X.next){var x=X.value;if($.length>k.length)return;if(!(x instanceof a)){var U=1,ae;if(J){if(ae=u(Q,Y,k,z),!ae||ae.index>=k.length)break;var Fe=ae.index,Re=ae.index+ae[0].length,Ne=Y;for(Ne+=X.value.length;Fe>=Ne;)X=X.next,Ne+=X.value.length;if(Ne-=X.value.length,Y=Ne,X.value instanceof a)continue;for(var Le=X;Le!==$.tail&&(NeD.reach&&(D.reach=We);var ue=X.prev;Se&&(ue=d($,ue,Se),Y+=Se.length),h($,ue,U);var se=new a(A,q?r.tokenize(me,q):me,G,me);if(X=d($,ue,se),we&&d($,X,we),U>1){var fe={cause:A+","+L,reach:We};f(k,$,C,X.prev,Y,fe),D&&fe.reach>D.reach&&(D.reach=fe.reach)}}}}}}function c(){var k={value:null,prev:null,next:null},$={value:null,prev:k,next:null};k.next=$,this.head=k,this.tail=$,this.length=0}function d(k,$,C){var M=$.next,T={value:C,prev:$,next:M};return $.next=T,M.prev=T,k.length++,T}function h(k,$,C){for(var M=$.next,T=0;T/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(i){i.type==="entity"&&(i.attributes.title=i.content.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(s,l){var o={};o["language-"+l]={pattern:/(^$)/i,lookbehind:!0,inside:t.languages[l]},o.cdata=/^$/i;var r={"included-cdata":{pattern://i,inside:o}};r["language-"+l]={pattern:/[\s\S]+/,inside:t.languages[l]};var a={};a[s]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return s}),"i"),lookbehind:!0,greedy:!0,inside:r},t.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(i,s){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+i+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[s,"language-"+s],inside:t.languages[s]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(i){var s=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;i.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+s.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+s.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+s.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+s.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:s,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},i.languages.css.atrule.inside.rest=i.languages.css;var l=i.languages.markup;l&&(l.tag.addInlined("style","css"),l.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(typeof t>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var i="Loading\u2026",s=function(g,b){return"\u2716 Error "+g+" while fetching file: "+b},l="\u2716 Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},r="data-src-status",a="loading",u="loaded",f="failed",c="pre[data-src]:not(["+r+'="'+u+'"]):not(['+r+'="'+a+'"])';function d(g,b,y){var k=new XMLHttpRequest;k.open("GET",g,!0),k.onreadystatechange=function(){k.readyState==4&&(k.status<400&&k.responseText?b(k.responseText):k.status>=400?y(s(k.status,k.statusText)):y(l))},k.send(null)}function h(g){var b=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(g||"");if(b){var y=Number(b[1]),k=b[2],$=b[3];return k?$?[y,Number($)]:[y,void 0]:[y,y]}}t.hooks.add("before-highlightall",function(g){g.selector+=", "+c}),t.hooks.add("before-sanity-check",function(g){var b=g.element;if(b.matches(c)){g.code="",b.setAttribute(r,a);var y=b.appendChild(document.createElement("CODE"));y.textContent=i;var k=b.getAttribute("data-src"),$=g.language;if($==="none"){var C=(/\.(\w+)$/.exec(k)||[,"none"])[1];$=o[C]||C}t.util.setLanguage(y,$),t.util.setLanguage(b,$);var M=t.plugins.autoloader;M&&M.loadLanguages($),d(k,function(T){b.setAttribute(r,u);var D=h(b.getAttribute("data-range"));if(D){var A=T.split(/\r\n?|\n/g),I=D[0],L=D[1]==null?A.length:D[1];I<0&&(I+=A.length),I=Math.max(0,Math.min(I-1,A.length)),L<0&&(L+=A.length),L=Math.max(0,Math.min(L,A.length)),T=A.slice(I,L).join(` +`),b.hasAttribute("data-start")||b.setAttribute("data-start",String(I+1))}y.textContent=T,t.highlightElement(y)},function(T){b.setAttribute(r,f),y.textContent=T})}}),t.plugins.fileHighlight={highlight:function(b){for(var y=(b||document).querySelectorAll(c),k=0,$;$=y[k++];)t.highlightElement($)}};var m=!1;t.fileHighlight=function(){m||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),m=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(P_);const Ks=P_.exports;var cS={exports:{}};(function(n){(function(){if(typeof Prism>"u")return;var e=Object.assign||function(o,r){for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);return o};function t(o){this.defaults=e({},o)}function i(o){return o.replace(/-(\w)/g,function(r,a){return a.toUpperCase()})}function s(o){for(var r=0,a=0;ar&&(f[d]=` `+f[d],c=h)}a[u]=f.join("")}return a.join(` -`)}},n.exports&&(n.exports=t),Prism.plugins.NormalizeWhitespace=new t({"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Prism.hooks.add("before-sanity-check",function(o){var r=Prism.plugins.NormalizeWhitespace;if(!(o.settings&&o.settings["whitespace-normalization"]===!1)&&!!Prism.util.isActive(o.element,"whitespace-normalization",!0)){if((!o.element||!o.element.parentNode)&&o.code){o.code=r.normalize(o.code,o.settings);return}var a=o.element.parentNode;if(!(!o.code||!a||a.nodeName.toLowerCase()!=="pre")){o.settings==null&&(o.settings={});for(var u in l)if(Object.hasOwnProperty.call(l,u)){var f=l[u];if(a.hasAttribute("data-"+u))try{var c=JSON.parse(a.getAttribute("data-"+u)||"true");typeof c===f&&(o.settings[u]=c)}catch{}}for(var d=a.childNodes,h="",m="",b=!1,g=0;g>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),n.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:n.languages.dart}}},string:/[\s\S]+/}},string:void 0}),n.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),n.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":i,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})})(Prism);function cS(n){let e,t,i;return{c(){e=v("div"),t=v("code"),p(t,"class","svelte-10s5tkd"),p(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-10s5tkd")},m(s,l){S(s,e,l),_(e,t),t.innerHTML=n[1]},p(s,[l]){l&2&&(t.innerHTML=s[1]),l&1&&i!==(i="code-wrapper prism-light "+s[0]+" svelte-10s5tkd")&&p(e,"class",i)},i:te,o:te,d(s){s&&w(e)}}}function dS(n,e,t){let{class:i=""}=e,{content:s=""}=e,{language:l="javascript"}=e,o="";function r(a){return a=typeof a=="string"?a:"",a=Ys.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Ys.highlight(a,Ys.languages[l]||Ys.languages.javascript,l)}return n.$$set=a=>{"class"in a&&t(0,i=a.class),"content"in a&&t(2,s=a.content),"language"in a&&t(3,l=a.language)},n.$$.update=()=>{n.$$.dirty&4&&typeof Ys<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class P_ extends ke{constructor(e){super(),ye(this,e,dS,cS,be,{class:0,content:2,language:3})}}const pS=n=>({}),fc=n=>({}),hS=n=>({}),cc=n=>({});function dc(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$=n[4]&&!n[2]&&pc(n);const C=n[18].header,M=Ot(C,n,n[17],cc);let T=n[4]&&n[2]&&hc(n);const D=n[18].default,A=Ot(D,n,n[17],null),I=n[18].footer,L=Ot(I,n,n[17],fc);return{c(){e=v("div"),t=v("div"),s=O(),l=v("div"),o=v("div"),$&&$.c(),r=O(),M&&M.c(),a=O(),T&&T.c(),u=O(),f=v("div"),A&&A.c(),c=O(),d=v("div"),L&&L.c(),p(t,"class","overlay"),p(o,"class","overlay-panel-section panel-header"),p(f,"class","overlay-panel-section panel-content"),p(d,"class","overlay-panel-section panel-footer"),p(l,"class",h="overlay-panel "+n[1]+" "+n[8]),ne(l,"popup",n[2]),p(e,"class","overlay-panel-container"),ne(e,"padded",n[2]),ne(e,"active",n[0])},m(F,q){S(F,e,q),_(e,t),_(e,s),_(e,l),_(l,o),$&&$.m(o,null),_(o,r),M&&M.m(o,null),_(o,a),T&&T.m(o,null),_(l,u),_(l,f),A&&A.m(f,null),n[20](f),_(l,c),_(l,d),L&&L.m(d,null),g=!0,y||(k=[K(t,"click",ut(n[19])),K(f,"scroll",n[21])],y=!0)},p(F,q){n=F,n[4]&&!n[2]?$?$.p(n,q):($=pc(n),$.c(),$.m(o,r)):$&&($.d(1),$=null),M&&M.p&&(!g||q&131072)&&At(M,C,n,n[17],g?Dt(C,n[17],q,hS):Et(n[17]),cc),n[4]&&n[2]?T?T.p(n,q):(T=hc(n),T.c(),T.m(o,null)):T&&(T.d(1),T=null),A&&A.p&&(!g||q&131072)&&At(A,D,n,n[17],g?Dt(D,n[17],q,null):Et(n[17]),null),L&&L.p&&(!g||q&131072)&&At(L,I,n,n[17],g?Dt(I,n[17],q,pS):Et(n[17]),fc),(!g||q&258&&h!==(h="overlay-panel "+n[1]+" "+n[8]))&&p(l,"class",h),(!g||q&262)&&ne(l,"popup",n[2]),(!g||q&4)&&ne(e,"padded",n[2]),(!g||q&1)&&ne(e,"active",n[0])},i(F){g||(xe(()=>{i||(i=je(t,yo,{duration:ds,opacity:0},!0)),i.run(1)}),E(M,F),E(A,F),E(L,F),xe(()=>{b&&b.end(1),m=Sm(l,Sn,n[2]?{duration:ds,y:-10}:{duration:ds,x:50}),m.start()}),g=!0)},o(F){i||(i=je(t,yo,{duration:ds,opacity:0},!1)),i.run(0),P(M,F),P(A,F),P(L,F),m&&m.invalidate(),b=$m(l,Sn,n[2]?{duration:ds,y:10}:{duration:ds,x:50}),g=!1},d(F){F&&w(e),F&&i&&i.end(),$&&$.d(),M&&M.d(F),T&&T.d(),A&&A.d(F),n[20](null),L&&L.d(F),F&&b&&b.end(),y=!1,Pe(k)}}}function pc(n){let e,t,i;return{c(){e=v("div"),e.innerHTML='',p(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=K(e,"click",ut(n[5])),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function hc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-secondary btn-close m-l-auto")},m(s,l){S(s,e,l),t||(i=K(e,"click",ut(n[5])),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function mS(n){let e,t,i,s,l=n[0]&&dc(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","overlay-panel-wrapper")},m(o,r){S(o,e,r),l&&l.m(e,null),n[22](e),t=!0,i||(s=[K(window,"resize",n[10]),K(window,"keydown",n[9])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&E(l,1)):(l=dc(o),l.c(),E(l,1),l.m(e,null)):l&&(pe(),P(l,1,1,()=>{l=null}),he())},i(o){t||(E(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[22](null),i=!1,Pe(s)}}}let Ni;function L_(){return Ni=Ni||document.querySelector(".overlays"),Ni||(Ni=document.createElement("div"),Ni.classList.add("overlays"),document.body.appendChild(Ni)),Ni}let ds=150;function mc(){return 1e3+L_().querySelectorAll(".overlay-panel-container.active").length}function gS(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{active:o=!1}=e,{popup:r=!1}=e,{overlayClose:a=!0}=e,{btnClose:u=!0}=e,{escClose:f=!0}=e,{beforeOpen:c=void 0}=e,{beforeHide:d=void 0}=e;const h=It();let m,b,g,y,k="";function $(){typeof c=="function"&&c()===!1||t(0,o=!0)}function C(){typeof d=="function"&&d()===!1||t(0,o=!1)}function M(){return o}async function T(G){G?(g=document.activeElement,m==null||m.focus(),h("show"),document.body.classList.add("overlay-active")):(clearTimeout(y),g==null||g.focus(),h("hide"),document.body.classList.remove("overlay-active")),await Tn(),D()}function D(){!m||(o?t(6,m.style.zIndex=mc(),m):t(6,m.style="",m))}function A(G){o&&f&&G.code=="Escape"&&!W.isInput(G.target)&&m&&m.style.zIndex==mc()&&(G.preventDefault(),C())}function I(G){o&&L(b)}function L(G,ie){ie&&t(8,k=""),G&&(y||(y=setTimeout(()=>{if(clearTimeout(y),y=null,!G)return;if(G.scrollHeight-G.offsetHeight>0)t(8,k="scrollable");else{t(8,k="");return}G.scrollTop==0?t(8,k+=" scroll-top-reached"):G.scrollTop+G.offsetHeight==G.scrollHeight&&t(8,k+=" scroll-bottom-reached")},100)))}cn(()=>(L_().appendChild(m),()=>{var G;clearTimeout(y),(G=m==null?void 0:m.classList)==null||G.add("hidden"),setTimeout(()=>{m==null||m.remove()},0)}));const F=()=>a?C():!0;function q(G){le[G?"unshift":"push"](()=>{b=G,t(7,b)})}const z=G=>L(G.target);function J(G){le[G?"unshift":"push"](()=>{m=G,t(6,m)})}return n.$$set=G=>{"class"in G&&t(1,l=G.class),"active"in G&&t(0,o=G.active),"popup"in G&&t(2,r=G.popup),"overlayClose"in G&&t(3,a=G.overlayClose),"btnClose"in G&&t(4,u=G.btnClose),"escClose"in G&&t(12,f=G.escClose),"beforeOpen"in G&&t(13,c=G.beforeOpen),"beforeHide"in G&&t(14,d=G.beforeHide),"$$scope"in G&&t(17,s=G.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&T(o),n.$$.dirty&128&&L(b,!0),n.$$.dirty&64&&m&&D()},[o,l,r,a,u,C,m,b,k,A,I,L,f,c,d,$,M,s,i,F,q,z,J]}class Jn extends ke{constructor(e){super(),ye(this,e,gS,mS,be,{class:1,active:0,popup:2,overlayClose:3,btnClose:4,escClose:12,beforeOpen:13,beforeHide:14,show:15,hide:5,isActive:16})}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[5]}get isActive(){return this.$$.ctx[16]}}function _S(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function bS(n){let e,t=n[2].referer+"",i,s;return{c(){e=v("a"),i=B(t),p(e,"href",s=n[2].referer),p(e,"target","_blank"),p(e,"rel","noopener noreferrer")},m(l,o){S(l,e,o),_(e,i)},p(l,o){o&4&&t!==(t=l[2].referer+"")&&ae(i,t),o&4&&s!==(s=l[2].referer)&&p(e,"href",s)},d(l){l&&w(e)}}}function vS(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:te,i:te,o:te,d(t){t&&w(e)}}}function yS(n){let e,t;return e=new P_({props:{content:JSON.stringify(n[2].meta,null,2)}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s&4&&(l.content=JSON.stringify(i[2].meta,null,2)),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function kS(n){var Oe;let e,t,i,s,l,o,r=n[2].id+"",a,u,f,c,d,h,m,b=n[2].status+"",g,y,k,$,C,M,T=((Oe=n[2].method)==null?void 0:Oe.toUpperCase())+"",D,A,I,L,F,q,z=n[2].auth+"",J,G,ie,Q,X,Y,x=n[2].url+"",U,re,Re,Ne,Le,Fe,me,Se,we,We,ue,se=n[2].remoteIp+"",fe,Z,Ce,Ue,Vt,Gt,sn=n[2].userIp+"",Gn,Ti,oi,ri,Ps,ai,ts=n[2].userAgent+"",ns,Pl,ui,is,Ll,Mi,ss,Xt,Je,ls,Xn,os,Oi,Di,Pt,zt;function Nl(De,Te){return De[2].referer?bS:_S}let N=Nl(n),V=N(n);const ee=[yS,vS],oe=[];function $e(De,Te){return Te&4&&(ss=null),ss==null&&(ss=!W.isEmpty(De[2].meta)),ss?0:1}return Xt=$e(n,-1),Je=oe[Xt]=ee[Xt](n),Pt=new Ki({props:{date:n[2].created}}),{c(){e=v("table"),t=v("tbody"),i=v("tr"),s=v("td"),s.textContent="ID",l=O(),o=v("td"),a=B(r),u=O(),f=v("tr"),c=v("td"),c.textContent="Status",d=O(),h=v("td"),m=v("span"),g=B(b),y=O(),k=v("tr"),$=v("td"),$.textContent="Method",C=O(),M=v("td"),D=B(T),A=O(),I=v("tr"),L=v("td"),L.textContent="Auth",F=O(),q=v("td"),J=B(z),G=O(),ie=v("tr"),Q=v("td"),Q.textContent="URL",X=O(),Y=v("td"),U=B(x),re=O(),Re=v("tr"),Ne=v("td"),Ne.textContent="Referer",Le=O(),Fe=v("td"),V.c(),me=O(),Se=v("tr"),we=v("td"),we.textContent="Remote IP",We=O(),ue=v("td"),fe=B(se),Z=O(),Ce=v("tr"),Ue=v("td"),Ue.textContent="User IP",Vt=O(),Gt=v("td"),Gn=B(sn),Ti=O(),oi=v("tr"),ri=v("td"),ri.textContent="UserAgent",Ps=O(),ai=v("td"),ns=B(ts),Pl=O(),ui=v("tr"),is=v("td"),is.textContent="Meta",Ll=O(),Mi=v("td"),Je.c(),ls=O(),Xn=v("tr"),os=v("td"),os.textContent="Created",Oi=O(),Di=v("td"),j(Pt.$$.fragment),p(s,"class","min-width txt-hint txt-bold"),p(c,"class","min-width txt-hint txt-bold"),p(m,"class","label"),ne(m,"label-danger",n[2].status>=400),p($,"class","min-width txt-hint txt-bold"),p(L,"class","min-width txt-hint txt-bold"),p(Q,"class","min-width txt-hint txt-bold"),p(Ne,"class","min-width txt-hint txt-bold"),p(we,"class","min-width txt-hint txt-bold"),p(Ue,"class","min-width txt-hint txt-bold"),p(ri,"class","min-width txt-hint txt-bold"),p(is,"class","min-width txt-hint txt-bold"),p(os,"class","min-width txt-hint txt-bold"),p(e,"class","table-compact table-border")},m(De,Te){S(De,e,Te),_(e,t),_(t,i),_(i,s),_(i,l),_(i,o),_(o,a),_(t,u),_(t,f),_(f,c),_(f,d),_(f,h),_(h,m),_(m,g),_(t,y),_(t,k),_(k,$),_(k,C),_(k,M),_(M,D),_(t,A),_(t,I),_(I,L),_(I,F),_(I,q),_(q,J),_(t,G),_(t,ie),_(ie,Q),_(ie,X),_(ie,Y),_(Y,U),_(t,re),_(t,Re),_(Re,Ne),_(Re,Le),_(Re,Fe),V.m(Fe,null),_(t,me),_(t,Se),_(Se,we),_(Se,We),_(Se,ue),_(ue,fe),_(t,Z),_(t,Ce),_(Ce,Ue),_(Ce,Vt),_(Ce,Gt),_(Gt,Gn),_(t,Ti),_(t,oi),_(oi,ri),_(oi,Ps),_(oi,ai),_(ai,ns),_(t,Pl),_(t,ui),_(ui,is),_(ui,Ll),_(ui,Mi),oe[Xt].m(Mi,null),_(t,ls),_(t,Xn),_(Xn,os),_(Xn,Oi),_(Xn,Di),R(Pt,Di,null),zt=!0},p(De,Te){var qe;(!zt||Te&4)&&r!==(r=De[2].id+"")&&ae(a,r),(!zt||Te&4)&&b!==(b=De[2].status+"")&&ae(g,b),(!zt||Te&4)&&ne(m,"label-danger",De[2].status>=400),(!zt||Te&4)&&T!==(T=((qe=De[2].method)==null?void 0:qe.toUpperCase())+"")&&ae(D,T),(!zt||Te&4)&&z!==(z=De[2].auth+"")&&ae(J,z),(!zt||Te&4)&&x!==(x=De[2].url+"")&&ae(U,x),N===(N=Nl(De))&&V?V.p(De,Te):(V.d(1),V=N(De),V&&(V.c(),V.m(Fe,null))),(!zt||Te&4)&&se!==(se=De[2].remoteIp+"")&&ae(fe,se),(!zt||Te&4)&&sn!==(sn=De[2].userIp+"")&&ae(Gn,sn),(!zt||Te&4)&&ts!==(ts=De[2].userAgent+"")&&ae(ns,ts);let ze=Xt;Xt=$e(De,Te),Xt===ze?oe[Xt].p(De,Te):(pe(),P(oe[ze],1,1,()=>{oe[ze]=null}),he(),Je=oe[Xt],Je?Je.p(De,Te):(Je=oe[Xt]=ee[Xt](De),Je.c()),E(Je,1),Je.m(Mi,null));const Ie={};Te&4&&(Ie.date=De[2].created),Pt.$set(Ie)},i(De){zt||(E(Je),E(Pt.$$.fragment,De),zt=!0)},o(De){P(Je),P(Pt.$$.fragment,De),zt=!1},d(De){De&&w(e),V.d(),oe[Xt].d(),H(Pt)}}}function wS(n){let e;return{c(){e=v("h4"),e.textContent="Request log"},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function SS(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Close',p(e,"type","button"),p(e,"class","btn btn-secondary")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[4]),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function $S(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[SS],header:[wS],default:[kS]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[5](e),e.$on("hide",n[6]),e.$on("show",n[7]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&260&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[5](null),H(e,s)}}}function CS(n,e,t){let i,s=new Er;function l(c){return t(2,s=c),i==null?void 0:i.show()}function o(){return i==null?void 0:i.hide()}const r=()=>o();function a(c){le[c?"unshift":"push"](()=>{i=c,t(1,i)})}function u(c){Ve.call(this,n,c)}function f(c){Ve.call(this,n,c)}return[o,i,s,l,r,a,u,f]}class TS extends ke{constructor(e){super(),ye(this,e,CS,$S,be,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function MS(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Include requests by admins"),p(e,"type","checkbox"),p(e,"id",t=n[14]),p(s,"for",o=n[14])},m(u,f){S(u,e,f),e.checked=n[0],S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[8]),r=!0)},p(u,f){f&16384&&t!==(t=u[14])&&p(e,"id",t),f&1&&(e.checked=u[0]),f&16384&&o!==(o=u[14])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function gc(n){let e,t,i;function s(o){n[10](o)}let l={presets:n[4]};return n[2]!==void 0&&(l.filter=n[2]),e=new uS({props:l}),le.push(()=>_e(e,"filter",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r&16&&(a.presets=o[4]),!t&&r&4&&(t=!0,a.filter=o[2],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function _c(n){let e,t,i;function s(o){n[11](o)}let l={presets:n[4]};return n[2]!==void 0&&(l.filter=n[2]),e=new Ov({props:l}),le.push(()=>_e(e,"filter",s)),e.$on("select",n[12]),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r&16&&(a.presets=o[4]),!t&&r&4&&(t=!0,a.filter=o[2],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function OS(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k=n[3],$,C=n[3],M,T;r=new wa({}),r.$on("refresh",n[7]),d=new ge({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[MS,({uniqueId:I})=>({14:I}),({uniqueId:I})=>I?16384:0]},$$scope:{ctx:n}}}),m=new ka({props:{value:n[2],placeholder:"Search logs, ex. status > 200",extraAutocompleteKeys:["method","url","remoteIp","userIp","referer","status","auth","userAgent"]}}),m.$on("submit",n[9]);let D=gc(n),A=_c(n);return{c(){e=v("div"),t=v("header"),i=v("nav"),s=v("div"),l=B(n[5]),o=O(),j(r.$$.fragment),a=O(),u=v("div"),f=O(),c=v("div"),j(d.$$.fragment),h=O(),j(m.$$.fragment),b=O(),g=v("div"),y=O(),D.c(),$=O(),A.c(),M=Ee(),p(s,"class","breadcrumb-item"),p(i,"class","breadcrumbs"),p(u,"class","flex-fill"),p(c,"class","inline-flex"),p(t,"class","page-header"),p(g,"class","clearfix m-b-xs"),p(e,"class","page-header-wrapper m-b-0")},m(I,L){S(I,e,L),_(e,t),_(t,i),_(i,s),_(s,l),_(t,o),R(r,t,null),_(t,a),_(t,u),_(t,f),_(t,c),R(d,c,null),_(e,h),R(m,e,null),_(e,b),_(e,g),_(e,y),D.m(e,null),S(I,$,L),A.m(I,L),S(I,M,L),T=!0},p(I,L){(!T||L&32)&&ae(l,I[5]);const F={};L&49153&&(F.$$scope={dirty:L,ctx:I}),d.$set(F);const q={};L&4&&(q.value=I[2]),m.$set(q),L&8&&be(k,k=I[3])?(pe(),P(D,1,1,te),he(),D=gc(I),D.c(),E(D,1),D.m(e,null)):D.p(I,L),L&8&&be(C,C=I[3])?(pe(),P(A,1,1,te),he(),A=_c(I),A.c(),E(A,1),A.m(M.parentNode,M)):A.p(I,L)},i(I){T||(E(r.$$.fragment,I),E(d.$$.fragment,I),E(m.$$.fragment,I),E(D),E(A),T=!0)},o(I){P(r.$$.fragment,I),P(d.$$.fragment,I),P(m.$$.fragment,I),P(D),P(A),T=!1},d(I){I&&w(e),H(r),H(d),H(m),D.d(I),I&&w($),I&&w(M),A.d(I)}}}function DS(n){let e,t,i,s;e=new pn({props:{$$slots:{default:[OS]},$$scope:{ctx:n}}});let l={};return i=new TS({props:l}),n[13](i),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(o,r){R(e,o,r),S(o,t,r),R(i,o,r),s=!0},p(o,[r]){const a={};r&32831&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};i.$set(u)},i(o){s||(E(e.$$.fragment,o),E(i.$$.fragment,o),s=!0)},o(o){P(e.$$.fragment,o),P(i.$$.fragment,o),s=!1},d(o){H(e,o),o&&w(t),n[13](null),H(i,o)}}}const bc="includeAdminLogs";function AS(n,e,t){var y;let i,s;Ze(n,mt,k=>t(5,s=k)),Ht(mt,s="Request logs",s);let l,o="",r=((y=window.localStorage)==null?void 0:y.getItem(bc))<<0,a=1;function u(){t(3,a++,a)}const f=()=>u();function c(){r=this.checked,t(0,r)}const d=k=>t(2,o=k.detail);function h(k){o=k,t(2,o)}function m(k){o=k,t(2,o)}const b=k=>l==null?void 0:l.show(k==null?void 0:k.detail);function g(k){le[k?"unshift":"push"](()=>{l=k,t(1,l)})}return n.$$.update=()=>{n.$$.dirty&1&&t(4,i=r?"":'auth!="admin"'),n.$$.dirty&1&&typeof r<"u"&&window.localStorage&&window.localStorage.setItem(bc,r<<0)},[r,l,o,a,i,s,u,f,c,d,h,m,b,g]}class ES extends ke{constructor(e){super(),ye(this,e,AS,DS,be,{})}}const Zi=Mn([]),Bn=Mn({}),na=Mn(!1);function IS(n){Zi.update(e=>{const t=W.findByKey(e,"id",n);return t?Bn.set(t):e.length&&Bn.set(e[0]),e})}function PS(n){Bn.update(e=>W.isEmpty(e==null?void 0:e.id)||e.id===n.id?n:e),Zi.update(e=>(W.pushOrReplaceByKey(e,n,"id"),W.sortCollections(e)))}function LS(n){Zi.update(e=>(W.removeByKey(e,"id",n.id),Bn.update(t=>t.id===n.id?e[0]:t),e))}async function NS(n=null){return na.set(!0),Bn.set({}),Zi.set([]),de.collections.getFullList(200,{sort:"+created"}).then(e=>{Zi.set(W.sortCollections(e));const t=n&&W.findByKey(e,"id",n);t?Bn.set(t):e.length&&Bn.set(e[0])}).catch(e=>{de.errorResponseHandler(e)}).finally(()=>{na.set(!1)})}const Ya=Mn({});function wn(n,e,t){Ya.set({text:n,yesCallback:e,noCallback:t})}function N_(){Ya.set({})}function vc(n){let e,t,i,s;const l=n[14].default,o=Ot(l,n,n[13],null);return{c(){e=v("div"),o&&o.c(),p(e,"class",n[1]),ne(e,"active",n[0])},m(r,a){S(r,e,a),o&&o.m(e,null),s=!0},p(r,a){o&&o.p&&(!s||a&8192)&&At(o,l,r,r[13],s?Dt(l,r[13],a,null):Et(r[13]),null),(!s||a&2)&&p(e,"class",r[1]),(!s||a&3)&&ne(e,"active",r[0])},i(r){s||(E(o,r),r&&xe(()=>{i&&i.end(1),t=Sm(e,Sn,{duration:150,y:-5}),t.start()}),s=!0)},o(r){P(o,r),t&&t.invalidate(),r&&(i=$m(e,Sn,{duration:150,y:2})),s=!1},d(r){r&&w(e),o&&o.d(r),r&&i&&i.end()}}}function FS(n){let e,t,i,s,l=n[0]&&vc(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","toggler-container")},m(o,r){S(o,e,r),l&&l.m(e,null),n[15](e),t=!0,i||(s=[K(window,"click",n[3]),K(window,"keydown",n[4]),K(window,"focusin",n[5])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&E(l,1)):(l=vc(o),l.c(),E(l,1),l.m(e,null)):l&&(pe(),P(l,1,1,()=>{l=null}),he())},i(o){t||(E(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[15](null),i=!1,Pe(s)}}}function RS(n,e,t){let{$$slots:i={},$$scope:s}=e,{trigger:l=void 0}=e,{active:o=!1}=e,{escClose:r=!0}=e,{closableClass:a="closable"}=e,{class:u=""}=e,f,c;const d=It();function h(){t(0,o=!1)}function m(){t(0,o=!0)}function b(){o?h():m()}function g(I){return!f||I.classList.contains(a)||(c==null?void 0:c.contains(I))&&!f.contains(I)||f.contains(I)&&I.closest&&I.closest("."+a)}function y(I){(!o||g(I.target))&&(I.preventDefault(),I.stopPropagation(),b())}function k(I){(I.code==="Enter"||I.code==="Space")&&(!o||g(I.target))&&(I.preventDefault(),I.stopPropagation(),b())}function $(I){o&&!(f!=null&&f.contains(I.target))&&!(c!=null&&c.contains(I.target))&&h()}function C(I){o&&r&&I.code==="Escape"&&(I.preventDefault(),h())}function M(I){return $(I)}function T(I){D(),t(12,c=I||(f==null?void 0:f.parentNode)),c&&(f==null||f.addEventListener("click",y),c.addEventListener("click",y),c.addEventListener("keydown",k))}function D(){!c||(f==null||f.removeEventListener("click",y),c.removeEventListener("click",y),c.removeEventListener("keydown",k))}cn(()=>(T(),()=>D()));function A(I){le[I?"unshift":"push"](()=>{f=I,t(2,f)})}return n.$$set=I=>{"trigger"in I&&t(6,l=I.trigger),"active"in I&&t(0,o=I.active),"escClose"in I&&t(7,r=I.escClose),"closableClass"in I&&t(8,a=I.closableClass),"class"in I&&t(1,u=I.class),"$$scope"in I&&t(13,s=I.$$scope)},n.$$.update=()=>{var I,L;n.$$.dirty&68&&f&&T(l),n.$$.dirty&4097&&(o?((I=c==null?void 0:c.classList)==null||I.add("active"),d("show")):((L=c==null?void 0:c.classList)==null||L.remove("active"),d("hide")))},[o,u,f,$,C,M,l,r,a,h,m,b,c,s,i,A]}class Zn extends ke{constructor(e){super(),ye(this,e,RS,FS,be,{trigger:6,active:0,escClose:7,closableClass:8,class:1,hide:9,show:10,toggle:11})}get hide(){return this.$$.ctx[9]}get show(){return this.$$.ctx[10]}get toggle(){return this.$$.ctx[11]}}const HS=n=>({active:n&1}),yc=n=>({active:n[0]});function kc(n){let e,t,i;const s=n[14].default,l=Ot(s,n,n[13],null);return{c(){e=v("div"),l&&l.c(),p(e,"class","accordion-content")},m(o,r){S(o,e,r),l&&l.m(e,null),i=!0},p(o,r){l&&l.p&&(!i||r&8192)&&At(l,s,o,o[13],i?Dt(s,o[13],r,null):Et(o[13]),null)},i(o){i||(E(l,o),o&&xe(()=>{t||(t=je(e,St,{duration:150},!0)),t.run(1)}),i=!0)},o(o){P(l,o),o&&(t||(t=je(e,St,{duration:150},!1)),t.run(0)),i=!1},d(o){o&&w(e),l&&l.d(o),o&&t&&t.end()}}}function jS(n){let e,t,i,s,l,o,r;const a=n[14].header,u=Ot(a,n,n[13],yc);let f=n[0]&&kc(n);return{c(){e=v("div"),t=v("button"),u&&u.c(),i=O(),f&&f.c(),p(t,"type","button"),p(t,"class","accordion-header"),p(t,"draggable",n[2]),ne(t,"interactive",n[3]),p(e,"class",s="accordion "+(n[7]?"drag-over":"")+" "+n[1]),ne(e,"active",n[0])},m(c,d){S(c,e,d),_(e,t),u&&u.m(t,null),_(e,i),f&&f.m(e,null),n[21](e),l=!0,o||(r=[K(t,"click",ut(n[16])),K(t,"drop",ut(n[17])),K(t,"dragstart",n[18]),K(t,"dragenter",n[19]),K(t,"dragleave",n[20]),K(t,"dragover",ut(n[15]))],o=!0)},p(c,[d]){u&&u.p&&(!l||d&8193)&&At(u,a,c,c[13],l?Dt(a,c[13],d,HS):Et(c[13]),yc),(!l||d&4)&&p(t,"draggable",c[2]),(!l||d&8)&&ne(t,"interactive",c[3]),c[0]?f?(f.p(c,d),d&1&&E(f,1)):(f=kc(c),f.c(),E(f,1),f.m(e,null)):f&&(pe(),P(f,1,1,()=>{f=null}),he()),(!l||d&130&&s!==(s="accordion "+(c[7]?"drag-over":"")+" "+c[1]))&&p(e,"class",s),(!l||d&131)&&ne(e,"active",c[0])},i(c){l||(E(u,c),E(f),l=!0)},o(c){P(u,c),P(f),l=!1},d(c){c&&w(e),u&&u.d(c),f&&f.d(),n[21](null),o=!1,Pe(r)}}}function qS(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=It();let o,r,{class:a=""}=e,{draggable:u=!1}=e,{active:f=!1}=e,{interactive:c=!0}=e,{single:d=!1}=e,h=!1;function m(){y(),t(0,f=!0),l("expand")}function b(){t(0,f=!1),clearTimeout(r),l("collapse")}function g(){l("toggle"),f?b():m()}function y(){if(d&&o.closest(".accordions")){const I=o.closest(".accordions").querySelectorAll(".accordion.active .accordion-header.interactive");for(const L of I)L.click()}}cn(()=>()=>clearTimeout(r));function k(I){Ve.call(this,n,I)}const $=()=>c&&g(),C=I=>{u&&(t(7,h=!1),y(),l("drop",I))},M=I=>u&&l("dragstart",I),T=I=>{u&&(t(7,h=!0),l("dragenter",I))},D=I=>{u&&(t(7,h=!1),l("dragleave",I))};function A(I){le[I?"unshift":"push"](()=>{o=I,t(6,o)})}return n.$$set=I=>{"class"in I&&t(1,a=I.class),"draggable"in I&&t(2,u=I.draggable),"active"in I&&t(0,f=I.active),"interactive"in I&&t(3,c=I.interactive),"single"in I&&t(9,d=I.single),"$$scope"in I&&t(13,s=I.$$scope)},n.$$.update=()=>{n.$$.dirty&4161&&f&&(clearTimeout(r),t(12,r=setTimeout(()=>{o!=null&&o.scrollIntoViewIfNeeded?o==null||o.scrollIntoViewIfNeeded():o!=null&&o.scrollIntoView&&(o==null||o.scrollIntoView({behavior:"smooth",block:"nearest"}))},200)))},[f,a,u,c,g,y,o,h,l,d,m,b,r,s,i,k,$,C,M,T,D,A]}class bs extends ke{constructor(e){super(),ye(this,e,qS,jS,be,{class:1,draggable:2,active:0,interactive:3,single:9,expand:10,collapse:11,toggle:4,collapseSiblings:5})}get expand(){return this.$$.ctx[10]}get collapse(){return this.$$.ctx[11]}get toggle(){return this.$$.ctx[4]}get collapseSiblings(){return this.$$.ctx[5]}}const VS=n=>({}),wc=n=>({});function Sc(n,e,t){const i=n.slice();return i[45]=e[t],i}const zS=n=>({}),$c=n=>({});function Cc(n,e,t){const i=n.slice();return i[45]=e[t],i}function Tc(n){let e,t,i;return{c(){e=v("div"),t=B(n[2]),i=O(),p(e,"class","block txt-placeholder"),ne(e,"link-hint",!n[5])},m(s,l){S(s,e,l),_(e,t),_(e,i)},p(s,l){l[0]&4&&ae(t,s[2]),l[0]&32&&ne(e,"link-hint",!s[5])},d(s){s&&w(e)}}}function BS(n){let e,t=n[45]+"",i;return{c(){e=v("span"),i=B(t),p(e,"class","txt")},m(s,l){S(s,e,l),_(e,i)},p(s,l){l[0]&1&&t!==(t=s[45]+"")&&ae(i,t)},i:te,o:te,d(s){s&&w(e)}}}function US(n){let e,t,i;const s=[{item:n[45]},n[8]];var l=n[7];function o(r){let a={};for(let u=0;u{H(f,1)}),he()}l?(e=jt(l,o()),j(e.$$.fragment),E(e.$$.fragment,1),R(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&E(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&H(e,r)}}}function Mc(n){let e,t,i;function s(){return n[33](n[45])}return{c(){e=v("span"),e.innerHTML='',p(e,"class","clear")},m(l,o){S(l,e,o),t||(i=[Ae(Be.call(null,e,"Clear")),K(e,"click",Yn(ut(s)))],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,Pe(i)}}}function Oc(n){let e,t,i,s,l,o;const r=[US,BS],a=[];function u(c,d){return c[7]?0:1}t=u(n),i=a[t]=r[t](n);let f=(n[4]||n[6])&&Mc(n);return{c(){e=v("div"),i.c(),s=O(),f&&f.c(),l=O(),p(e,"class","option")},m(c,d){S(c,e,d),a[t].m(e,null),_(e,s),f&&f.m(e,null),_(e,l),o=!0},p(c,d){let h=t;t=u(c),t===h?a[t].p(c,d):(pe(),P(a[h],1,1,()=>{a[h]=null}),he(),i=a[t],i?i.p(c,d):(i=a[t]=r[t](c),i.c()),E(i,1),i.m(e,s)),c[4]||c[6]?f?f.p(c,d):(f=Mc(c),f.c(),f.m(e,l)):f&&(f.d(1),f=null)},i(c){o||(E(i),o=!0)},o(c){P(i),o=!1},d(c){c&&w(e),a[t].d(),f&&f.d()}}}function Dc(n){let e,t,i={class:"dropdown dropdown-block options-dropdown dropdown-left",trigger:n[17],$$slots:{default:[KS]},$$scope:{ctx:n}};return e=new Zn({props:i}),n[38](e),e.$on("show",n[23]),e.$on("hide",n[39]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,l){const o={};l[0]&131072&&(o.trigger=s[17]),l[0]&806410|l[1]&1024&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[38](null),H(e,s)}}}function Ac(n){let e,t,i,s,l,o,r,a,u=n[14].length&&Ec(n);return{c(){e=v("div"),t=v("label"),i=v("div"),i.innerHTML='',s=O(),l=v("input"),o=O(),u&&u.c(),p(i,"class","addon p-r-0"),l.autofocus=!0,p(l,"type","text"),p(l,"placeholder",n[3]),p(t,"class","input-group"),p(e,"class","form-field form-field-sm options-search")},m(f,c){S(f,e,c),_(e,t),_(t,i),_(t,s),_(t,l),ce(l,n[14]),_(t,o),u&&u.m(t,null),l.focus(),r||(a=K(l,"input",n[35]),r=!0)},p(f,c){c[0]&8&&p(l,"placeholder",f[3]),c[0]&16384&&l.value!==f[14]&&ce(l,f[14]),f[14].length?u?u.p(f,c):(u=Ec(f),u.c(),u.m(t,null)):u&&(u.d(1),u=null)},d(f){f&&w(e),u&&u.d(),r=!1,a()}}}function Ec(n){let e,t,i,s;return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","btn btn-sm btn-circle btn-secondary clear"),p(e,"class","addon suffix p-r-5")},m(l,o){S(l,e,o),_(e,t),i||(s=K(t,"click",Yn(ut(n[20]))),i=!0)},p:te,d(l){l&&w(e),i=!1,s()}}}function Ic(n){let e,t=n[1]&&Pc(n);return{c(){t&&t.c(),e=Ee()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[1]?t?t.p(i,s):(t=Pc(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function Pc(n){let e,t;return{c(){e=v("div"),t=B(n[1]),p(e,"class","txt-missing")},m(i,s){S(i,e,s),_(e,t)},p(i,s){s[0]&2&&ae(t,i[1])},d(i){i&&w(e)}}}function WS(n){let e=n[45]+"",t;return{c(){t=B(e)},m(i,s){S(i,t,s)},p(i,s){s[0]&524288&&e!==(e=i[45]+"")&&ae(t,e)},i:te,o:te,d(i){i&&w(t)}}}function YS(n){let e,t,i;const s=[{item:n[45]},n[10]];var l=n[9];function o(r){let a={};for(let u=0;u{H(f,1)}),he()}l?(e=jt(l,o()),j(e.$$.fragment),E(e.$$.fragment,1),R(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&E(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&H(e,r)}}}function Lc(n){let e,t,i,s,l,o,r;const a=[YS,WS],u=[];function f(h,m){return h[9]?0:1}t=f(n),i=u[t]=a[t](n);function c(...h){return n[36](n[45],...h)}function d(...h){return n[37](n[45],...h)}return{c(){e=v("div"),i.c(),s=O(),p(e,"tabindex","0"),p(e,"class","dropdown-item option closable"),ne(e,"selected",n[18](n[45]))},m(h,m){S(h,e,m),u[t].m(e,null),_(e,s),l=!0,o||(r=[K(e,"click",c),K(e,"keydown",d)],o=!0)},p(h,m){n=h;let b=t;t=f(n),t===b?u[t].p(n,m):(pe(),P(u[b],1,1,()=>{u[b]=null}),he(),i=u[t],i?i.p(n,m):(i=u[t]=a[t](n),i.c()),E(i,1),i.m(e,s)),(!l||m[0]&786432)&&ne(e,"selected",n[18](n[45]))},i(h){l||(E(i),l=!0)},o(h){P(i),l=!1},d(h){h&&w(e),u[t].d(),o=!1,Pe(r)}}}function KS(n){let e,t,i,s,l,o=n[11]&&Ac(n);const r=n[32].beforeOptions,a=Ot(r,n,n[41],$c);let u=n[19],f=[];for(let b=0;bP(f[b],1,1,()=>{f[b]=null});let d=null;u.length||(d=Ic(n));const h=n[32].afterOptions,m=Ot(h,n,n[41],wc);return{c(){o&&o.c(),e=O(),a&&a.c(),t=O(),i=v("div");for(let b=0;bP(a[d],1,1,()=>{a[d]=null});let f=null;r.length||(f=Tc(n));let c=!n[5]&&Dc(n);return{c(){e=v("div"),t=v("div");for(let d=0;d{c=null}),he()):c?(c.p(d,h),h[0]&32&&E(c,1)):(c=Dc(d),c.c(),E(c,1),c.m(e,null)),(!o||h[0]&4096&&l!==(l="select "+d[12]))&&p(e,"class",l),(!o||h[0]&4112)&&ne(e,"multiple",d[4]),(!o||h[0]&4128)&&ne(e,"disabled",d[5])},i(d){if(!o){for(let h=0;hZ(Ce,fe))||[]}function x(se,fe){se.preventDefault(),b&&d?z(fe):q(fe)}function U(se,fe){(se.code==="Enter"||se.code==="Space")&&x(se,fe)}function re(){X(),setTimeout(()=>{const se=I==null?void 0:I.querySelector(".dropdown-item.option.selected");se&&(se.focus(),se.scrollIntoView({block:"nearest"}))},0)}function Re(se){se.stopPropagation(),!h&&(D==null||D.toggle())}cn(()=>{const se=document.querySelectorAll(`label[for="${r}"]`);for(const fe of se)fe.addEventListener("click",Re);return()=>{for(const fe of se)fe.removeEventListener("click",Re)}});const Ne=se=>F(se);function Le(se){le[se?"unshift":"push"](()=>{L=se,t(17,L)})}function Fe(){A=this.value,t(14,A)}const me=(se,fe)=>x(fe,se),Se=(se,fe)=>U(fe,se);function we(se){le[se?"unshift":"push"](()=>{D=se,t(15,D)})}function We(se){Ve.call(this,n,se)}function ue(se){le[se?"unshift":"push"](()=>{I=se,t(16,I)})}return n.$$set=se=>{"id"in se&&t(24,r=se.id),"noOptionsText"in se&&t(1,a=se.noOptionsText),"selectPlaceholder"in se&&t(2,u=se.selectPlaceholder),"searchPlaceholder"in se&&t(3,f=se.searchPlaceholder),"items"in se&&t(25,c=se.items),"multiple"in se&&t(4,d=se.multiple),"disabled"in se&&t(5,h=se.disabled),"selected"in se&&t(0,m=se.selected),"toggle"in se&&t(6,b=se.toggle),"labelComponent"in se&&t(7,g=se.labelComponent),"labelComponentProps"in se&&t(8,y=se.labelComponentProps),"optionComponent"in se&&t(9,k=se.optionComponent),"optionComponentProps"in se&&t(10,$=se.optionComponentProps),"searchable"in se&&t(11,C=se.searchable),"searchFunc"in se&&t(26,M=se.searchFunc),"class"in se&&t(12,T=se.class),"$$scope"in se&&t(41,o=se.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&33554432&&c&&(Q(),X()),n.$$.dirty[0]&33570816&&t(19,i=Y(c,A)),n.$$.dirty[0]&1&&t(18,s=function(se){const fe=W.toArray(m);return W.inArray(fe,se)})},[m,a,u,f,d,h,b,g,y,k,$,C,T,F,A,D,I,L,s,i,X,x,U,re,r,c,M,q,z,J,G,ie,l,Ne,Le,Fe,me,Se,we,We,ue,o]}class F_ extends ke{constructor(e){super(),ye(this,e,GS,JS,be,{id:24,noOptionsText:1,selectPlaceholder:2,searchPlaceholder:3,items:25,multiple:4,disabled:5,selected:0,toggle:6,labelComponent:7,labelComponentProps:8,optionComponent:9,optionComponentProps:10,searchable:11,searchFunc:26,class:12,deselectItem:13,selectItem:27,toggleItem:28,reset:29,showDropdown:30,hideDropdown:31},null,[-1,-1])}get deselectItem(){return this.$$.ctx[13]}get selectItem(){return this.$$.ctx[27]}get toggleItem(){return this.$$.ctx[28]}get reset(){return this.$$.ctx[29]}get showDropdown(){return this.$$.ctx[30]}get hideDropdown(){return this.$$.ctx[31]}}function Nc(n){let e,t;return{c(){e=v("i"),p(e,"class",t="icon "+n[0].icon)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t="icon "+i[0].icon)&&p(e,"class",t)},d(i){i&&w(e)}}}function XS(n){let e,t,i=(n[0].label||n[0].name||n[0].title||n[0].id||n[0].value)+"",s,l=n[0].icon&&Nc(n);return{c(){l&&l.c(),e=O(),t=v("span"),s=B(i),p(t,"class","txt")},m(o,r){l&&l.m(o,r),S(o,e,r),S(o,t,r),_(t,s)},p(o,[r]){o[0].icon?l?l.p(o,r):(l=Nc(o),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null),r&1&&i!==(i=(o[0].label||o[0].name||o[0].title||o[0].id||o[0].value)+"")&&ae(s,i)},i:te,o:te,d(o){l&&l.d(o),o&&w(e),o&&w(t)}}}function QS(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class Fc extends ke{constructor(e){super(),ye(this,e,QS,XS,be,{item:0})}}const xS=n=>({}),Rc=n=>({});function e$(n){let e;const t=n[8].afterOptions,i=Ot(t,n,n[12],Rc);return{c(){i&&i.c()},m(s,l){i&&i.m(s,l),e=!0},p(s,l){i&&i.p&&(!e||l&4096)&&At(i,t,s,s[12],e?Dt(t,s[12],l,xS):Et(s[12]),Rc)},i(s){e||(E(i,s),e=!0)},o(s){P(i,s),e=!1},d(s){i&&i.d(s)}}}function t$(n){let e,t,i;const s=[{items:n[1]},{multiple:n[2]},{labelComponent:n[3]},{optionComponent:n[4]},n[5]];function l(r){n[9](r)}let o={$$slots:{afterOptions:[e$]},$$scope:{ctx:n}};for(let r=0;r_e(e,"selected",l)),e.$on("show",n[10]),e.$on("hide",n[11]),{c(){j(e.$$.fragment)},m(r,a){R(e,r,a),i=!0},p(r,[a]){const u=a&62?Zt(s,[a&2&&{items:r[1]},a&4&&{multiple:r[2]},a&8&&{labelComponent:r[3]},a&16&&{optionComponent:r[4]},a&32&&Kn(r[5])]):{};a&4096&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.selected=r[0],ve(()=>t=!1)),e.$set(u)},i(r){i||(E(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function n$(n,e,t){const i=["items","multiple","selected","labelComponent","optionComponent","selectionKey","keyOfSelected"];let s=wt(e,i),{$$slots:l={},$$scope:o}=e,{items:r=[]}=e,{multiple:a=!1}=e,{selected:u=a?[]:void 0}=e,{labelComponent:f=Fc}=e,{optionComponent:c=Fc}=e,{selectionKey:d="value"}=e,{keyOfSelected:h=a?[]:void 0}=e;function m($){$=W.toArray($,!0);let C=[];for(let M of $){const T=W.findByKey(r,d,M);T&&C.push(T)}$.length&&!C.length||t(0,u=a?C:C[0])}async function b($){let C=W.toArray($,!0).map(M=>M[d]);!r.length||t(6,h=a?C:C[0])}function g($){u=$,t(0,u)}function y($){Ve.call(this,n,$)}function k($){Ve.call(this,n,$)}return n.$$set=$=>{e=Ke(Ke({},e),Wn($)),t(5,s=wt(e,i)),"items"in $&&t(1,r=$.items),"multiple"in $&&t(2,a=$.multiple),"selected"in $&&t(0,u=$.selected),"labelComponent"in $&&t(3,f=$.labelComponent),"optionComponent"in $&&t(4,c=$.optionComponent),"selectionKey"in $&&t(7,d=$.selectionKey),"keyOfSelected"in $&&t(6,h=$.keyOfSelected),"$$scope"in $&&t(12,o=$.$$scope)},n.$$.update=()=>{n.$$.dirty&66&&r&&m(h),n.$$.dirty&1&&b(u)},[u,r,a,f,c,s,h,d,l,g,y,k,o]}class xi extends ke{constructor(e){super(),ye(this,e,n$,t$,be,{items:1,multiple:2,selected:0,labelComponent:3,optionComponent:4,selectionKey:7,keyOfSelected:6})}}function i$(n){let e,t,i;const s=[{class:"field-type-select "+n[1]},{items:n[2]},n[3]];function l(r){n[4](r)}let o={};for(let r=0;r_e(e,"keyOfSelected",l)),{c(){j(e.$$.fragment)},m(r,a){R(e,r,a),i=!0},p(r,[a]){const u=a&14?Zt(s,[a&2&&{class:"field-type-select "+r[1]},a&4&&{items:r[2]},a&8&&Kn(r[3])]):{};!t&&a&1&&(t=!0,u.keyOfSelected=r[0],ve(()=>t=!1)),e.$set(u)},i(r){i||(E(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function s$(n,e,t){const i=["value","class"];let s=wt(e,i),{value:l="text"}=e,{class:o=""}=e;const r=[{label:"Text",value:"text",icon:W.getFieldTypeIcon("text")},{label:"Number",value:"number",icon:W.getFieldTypeIcon("number")},{label:"Bool",value:"bool",icon:W.getFieldTypeIcon("bool")},{label:"Email",value:"email",icon:W.getFieldTypeIcon("email")},{label:"Url",value:"url",icon:W.getFieldTypeIcon("url")},{label:"DateTime",value:"date",icon:W.getFieldTypeIcon("date")},{label:"Select",value:"select",icon:W.getFieldTypeIcon("select")},{label:"JSON",value:"json",icon:W.getFieldTypeIcon("json")},{label:"File",value:"file",icon:W.getFieldTypeIcon("file")},{label:"Relation",value:"relation",icon:W.getFieldTypeIcon("relation")}];function a(u){l=u,t(0,l)}return n.$$set=u=>{e=Ke(Ke({},e),Wn(u)),t(3,s=wt(e,i)),"value"in u&&t(0,l=u.value),"class"in u&&t(1,o=u.class)},[l,o,r,s,a]}class l$ extends ke{constructor(e){super(),ye(this,e,s$,i$,be,{value:0,class:1})}}function o$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Min length"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",o=n[5]),p(l,"step","1"),p(l,"min","0")},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].min),r||(a=K(l,"input",n[2]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].min&&ce(l,u[0].min)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function r$(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=B("Max length"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",o=n[5]),p(l,"step","1"),p(l,"min",r=n[0].min||0)},m(f,c){S(f,e,c),_(e,t),S(f,s,c),S(f,l,c),ce(l,n[0].max),a||(u=K(l,"input",n[3]),a=!0)},p(f,c){c&32&&i!==(i=f[5])&&p(e,"for",i),c&32&&o!==(o=f[5])&&p(l,"id",o),c&1&&r!==(r=f[0].min||0)&&p(l,"min",r),c&1&&rt(l.value)!==f[0].max&&ce(l,f[0].max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function a$(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Regex pattern"),s=O(),l=v("input"),r=O(),a=v("div"),a.innerHTML="Valid Go regular expression, eg. ^\\w+$.",p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5]),p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),ce(l,n[0].pattern),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[4]),u=!0)},p(c,d){d&32&&i!==(i=c[5])&&p(e,"for",i),d&32&&o!==(o=c[5])&&p(l,"id",o),d&1&&l.value!==c[0].pattern&&ce(l,c[0].pattern)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function u$(n){let e,t,i,s,l,o,r,a,u,f;return i=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[o$,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[r$,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),u=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.pattern",$$slots:{default:[a$,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(a,"class","col-sm-12"),p(e,"class","grid")},m(c,d){S(c,e,d),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),R(u,a,null),f=!0},p(c,[d]){const h={};d&2&&(h.name="schema."+c[1]+".options.min"),d&97&&(h.$$scope={dirty:d,ctx:c}),i.$set(h);const m={};d&2&&(m.name="schema."+c[1]+".options.max"),d&97&&(m.$$scope={dirty:d,ctx:c}),o.$set(m);const b={};d&2&&(b.name="schema."+c[1]+".options.pattern"),d&97&&(b.$$scope={dirty:d,ctx:c}),u.$set(b)},i(c){f||(E(i.$$.fragment,c),E(o.$$.fragment,c),E(u.$$.fragment,c),f=!0)},o(c){P(i.$$.fragment,c),P(o.$$.fragment,c),P(u.$$.fragment,c),f=!1},d(c){c&&w(e),H(i),H(o),H(u)}}}function f$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.min=rt(this.value),t(0,s)}function o(){s.max=rt(this.value),t(0,s)}function r(){s.pattern=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"options"in a&&t(0,s=a.options)},[s,i,l,o,r]}class c$ extends ke{constructor(e){super(),ye(this,e,f$,u$,be,{key:1,options:0})}}function d$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Min"),s=O(),l=v("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",o=n[4])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].min),r||(a=K(l,"input",n[2]),r=!0)},p(u,f){f&16&&i!==(i=u[4])&&p(e,"for",i),f&16&&o!==(o=u[4])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].min&&ce(l,u[0].min)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function p$(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=B("Max"),s=O(),l=v("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",o=n[4]),p(l,"min",r=n[0].min)},m(f,c){S(f,e,c),_(e,t),S(f,s,c),S(f,l,c),ce(l,n[0].max),a||(u=K(l,"input",n[3]),a=!0)},p(f,c){c&16&&i!==(i=f[4])&&p(e,"for",i),c&16&&o!==(o=f[4])&&p(l,"id",o),c&1&&r!==(r=f[0].min)&&p(l,"min",r),c&1&&rt(l.value)!==f[0].max&&ce(l,f[0].max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function h$(n){let e,t,i,s,l,o,r;return i=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[d$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[p$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.max"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(E(i.$$.fragment,a),E(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function m$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.min=rt(this.value),t(0,s)}function o(){s.max=rt(this.value),t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class g$ extends ke{constructor(e){super(),ye(this,e,m$,h$,be,{key:1,options:0})}}function _$(n,e,t){let{key:i=""}=e,{options:s={}}=e;return n.$$set=l=>{"key"in l&&t(0,i=l.key),"options"in l&&t(1,s=l.options)},[i,s]}class b$ extends ke{constructor(e){super(),ye(this,e,_$,null,be,{key:0,options:1})}}function v$(n){let e,t,i,s,l=[{type:t=n[3].type||"text"},{value:n[2]},n[3]],o={};for(let r=0;r{t(0,o=W.splitNonEmpty(u.target.value,r))};return n.$$set=u=>{e=Ke(Ke({},e),Wn(u)),t(3,l=wt(e,s)),"value"in u&&t(0,o=u.value),"separator"in u&&t(1,r=u.separator)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=(o||[]).join(", "))},[o,r,i,l,a]}class es extends ke{constructor(e){super(),ye(this,e,y$,v$,be,{value:0,separator:1})}}function k$(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function m(g){n[2](g)}let b={id:n[4],disabled:!W.isEmpty(n[0].onlyDomains)};return n[0].exceptDomains!==void 0&&(b.value=n[0].exceptDomains),r=new es({props:b}),le.push(()=>_e(r,"value",m)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=O(),s=v("i"),o=O(),j(r.$$.fragment),u=O(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[4]),p(f,"class","help-block")},m(g,y){S(g,e,y),_(e,t),_(e,i),_(e,s),S(g,o,y),R(r,g,y),S(g,u,y),S(g,f,y),c=!0,d||(h=Ae(Be.call(null,s,{text:`List of domains that are NOT allowed. - This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(g,y){(!c||y&16&&l!==(l=g[4]))&&p(e,"for",l);const k={};y&16&&(k.id=g[4]),y&1&&(k.disabled=!W.isEmpty(g[0].onlyDomains)),!a&&y&1&&(a=!0,k.value=g[0].exceptDomains,ve(()=>a=!1)),r.$set(k)},i(g){c||(E(r.$$.fragment,g),c=!0)},o(g){P(r.$$.fragment,g),c=!1},d(g){g&&w(e),g&&w(o),H(r,g),g&&w(u),g&&w(f),d=!1,h()}}}function w$(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function m(g){n[3](g)}let b={id:n[4]+".options.onlyDomains",disabled:!W.isEmpty(n[0].exceptDomains)};return n[0].onlyDomains!==void 0&&(b.value=n[0].onlyDomains),r=new es({props:b}),le.push(()=>_e(r,"value",m)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=O(),s=v("i"),o=O(),j(r.$$.fragment),u=O(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[4]+".options.onlyDomains"),p(f,"class","help-block")},m(g,y){S(g,e,y),_(e,t),_(e,i),_(e,s),S(g,o,y),R(r,g,y),S(g,u,y),S(g,f,y),c=!0,d||(h=Ae(Be.call(null,s,{text:`List of domains that are ONLY allowed. - This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(g,y){(!c||y&16&&l!==(l=g[4]+".options.onlyDomains"))&&p(e,"for",l);const k={};y&16&&(k.id=g[4]+".options.onlyDomains"),y&1&&(k.disabled=!W.isEmpty(g[0].exceptDomains)),!a&&y&1&&(a=!0,k.value=g[0].onlyDomains,ve(()=>a=!1)),r.$set(k)},i(g){c||(E(r.$$.fragment,g),c=!0)},o(g){P(r.$$.fragment,g),c=!1},d(g){g&&w(e),g&&w(o),H(r,g),g&&w(u),g&&w(f),d=!1,h()}}}function S$(n){let e,t,i,s,l,o,r;return i=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[k$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[w$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.exceptDomains"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.onlyDomains"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(E(i.$$.fragment,a),E(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function $$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.exceptDomains,r)&&(s.exceptDomains=r,t(0,s))}function o(r){n.$$.not_equal(s.onlyDomains,r)&&(s.onlyDomains=r,t(0,s))}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class R_ extends ke{constructor(e){super(),ye(this,e,$$,S$,be,{key:1,options:0})}}function C$(n){let e,t,i,s;function l(a){n[2](a)}function o(a){n[3](a)}let r={};return n[0]!==void 0&&(r.key=n[0]),n[1]!==void 0&&(r.options=n[1]),e=new R_({props:r}),le.push(()=>_e(e,"key",l)),le.push(()=>_e(e,"options",o)),{c(){j(e.$$.fragment)},m(a,u){R(e,a,u),s=!0},p(a,[u]){const f={};!t&&u&1&&(t=!0,f.key=a[0],ve(()=>t=!1)),!i&&u&2&&(i=!0,f.options=a[1],ve(()=>i=!1)),e.$set(f)},i(a){s||(E(e.$$.fragment,a),s=!0)},o(a){P(e.$$.fragment,a),s=!1},d(a){H(e,a)}}}function T$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){i=r,t(0,i)}function o(r){s=r,t(1,s)}return n.$$set=r=>{"key"in r&&t(0,i=r.key),"options"in r&&t(1,s=r.options)},[i,s,l,o]}class M$ extends ke{constructor(e){super(),ye(this,e,T$,C$,be,{key:0,options:1})}}var vr=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],vs={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console<"u"&&console.warn(n)},getWeek:function(n){var e=new Date(n.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},gl={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var e=n%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},Qt=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},_n=function(n){return n===!0?1:0};function Hc(n,e){var t;return function(){var i=this,s=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(i,s)},e)}}var yr=function(n){return n instanceof Array?n:[n]};function Bt(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function nt(n,e,t){var i=window.document.createElement(n);return e=e||"",t=t||"",i.className=e,t!==void 0&&(i.textContent=t),i}function io(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function H_(n,e){if(e(n))return n;if(n.parentNode)return H_(n.parentNode,e)}function so(n,e){var t=nt("div","numInputWrapper"),i=nt("input","numInput "+n),s=nt("span","arrowUp"),l=nt("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?i.type="number":(i.type="text",i.pattern="\\d*"),e!==void 0)for(var o in e)i.setAttribute(o,e[o]);return t.appendChild(i),t.appendChild(s),t.appendChild(l),t}function on(n){try{if(typeof n.composedPath=="function"){var e=n.composedPath();return e[0]}return n.target}catch{return n.target}}var kr=function(){},Po=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},O$={D:kr,F:function(n,e,t){n.setMonth(t.months.longhand.indexOf(e))},G:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},H:function(n,e){n.setHours(parseFloat(e))},J:function(n,e){n.setDate(parseFloat(e))},K:function(n,e,t){n.setHours(n.getHours()%12+12*_n(new RegExp(t.amPM[1],"i").test(e)))},M:function(n,e,t){n.setMonth(t.months.shorthand.indexOf(e))},S:function(n,e){n.setSeconds(parseFloat(e))},U:function(n,e){return new Date(parseFloat(e)*1e3)},W:function(n,e,t){var i=parseInt(e),s=new Date(n.getFullYear(),0,2+(i-1)*7,0,0,0,0);return s.setDate(s.getDate()-s.getDay()+t.firstDayOfWeek),s},Y:function(n,e){n.setFullYear(parseFloat(e))},Z:function(n,e){return new Date(e)},d:function(n,e){n.setDate(parseFloat(e))},h:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},i:function(n,e){n.setMinutes(parseFloat(e))},j:function(n,e){n.setDate(parseFloat(e))},l:kr,m:function(n,e){n.setMonth(parseFloat(e)-1)},n:function(n,e){n.setMonth(parseFloat(e)-1)},s:function(n,e){n.setSeconds(parseFloat(e))},u:function(n,e){return new Date(parseFloat(e))},w:kr,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},ji={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},ll={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[ll.w(n,e,t)]},F:function(n,e,t){return Po(ll.n(n,e,t)-1,!1,e)},G:function(n,e,t){return Qt(ll.h(n,e,t))},H:function(n){return Qt(n.getHours())},J:function(n,e){return e.ordinal!==void 0?n.getDate()+e.ordinal(n.getDate()):n.getDate()},K:function(n,e){return e.amPM[_n(n.getHours()>11)]},M:function(n,e){return Po(n.getMonth(),!0,e)},S:function(n){return Qt(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return Qt(n.getFullYear(),4)},d:function(n){return Qt(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return Qt(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return Qt(n.getMonth()+1)},n:function(n){return n.getMonth()+1},s:function(n){return n.getSeconds()},u:function(n){return n.getTime()},w:function(n){return n.getDay()},y:function(n){return String(n.getFullYear()).substring(2)}},j_=function(n){var e=n.config,t=e===void 0?vs:e,i=n.l10n,s=i===void 0?gl:i,l=n.isMobile,o=l===void 0?!1:l;return function(r,a,u){var f=u||s;return t.formatDate!==void 0&&!o?t.formatDate(r,a,f):a.split("").map(function(c,d,h){return ll[c]&&h[d-1]!=="\\"?ll[c](r,f,t):c!=="\\"?c:""}).join("")}},ia=function(n){var e=n.config,t=e===void 0?vs:e,i=n.l10n,s=i===void 0?gl:i;return function(l,o,r,a){if(!(l!==0&&!l)){var u=a||s,f,c=l;if(l instanceof Date)f=new Date(l.getTime());else if(typeof l!="string"&&l.toFixed!==void 0)f=new Date(l);else if(typeof l=="string"){var d=o||(t||vs).dateFormat,h=String(l).trim();if(h==="today")f=new Date,r=!0;else if(t&&t.parseDate)f=t.parseDate(l,d);else if(/Z$/.test(h)||/GMT$/.test(h))f=new Date(l);else{for(var m=void 0,b=[],g=0,y=0,k="";gMath.min(e,t)&&n=0?new Date:new Date(t.config.minDate.getTime()),ee=Sr(t.config);V.setHours(ee.hours,ee.minutes,ee.seconds,V.getMilliseconds()),t.selectedDates=[V],t.latestSelectedDateObj=V}N!==void 0&&N.type!=="blur"&&Nl(N);var oe=t._input.value;c(),Pt(),t._input.value!==oe&&t._debouncedChange()}function u(N,V){return N%12+12*_n(V===t.l10n.amPM[1])}function f(N){switch(N%24){case 0:case 12:return 12;default:return N%12}}function c(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var N=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,V=(parseInt(t.minuteElement.value,10)||0)%60,ee=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(N=u(N,t.amPM.textContent));var oe=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&rn(t.latestSelectedDateObj,t.config.minDate,!0)===0,$e=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&rn(t.latestSelectedDateObj,t.config.maxDate,!0)===0;if(t.config.maxTime!==void 0&&t.config.minTime!==void 0&&t.config.minTime>t.config.maxTime){var Oe=wr(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),De=wr(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),Te=wr(N,V,ee);if(Te>De&&Te=12)]),t.secondElement!==void 0&&(t.secondElement.value=Qt(ee)))}function m(N){var V=on(N),ee=parseInt(V.value)+(N.delta||0);(ee/1e3>1||N.key==="Enter"&&!/[^\d]/.test(ee.toString()))&&me(ee)}function b(N,V,ee,oe){if(V instanceof Array)return V.forEach(function($e){return b(N,$e,ee,oe)});if(N instanceof Array)return N.forEach(function($e){return b($e,V,ee,oe)});N.addEventListener(V,ee,oe),t._handlers.push({remove:function(){return N.removeEventListener(V,ee,oe)}})}function g(){Je("onChange")}function y(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(ee){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+ee+"]"),function(oe){return b(oe,"click",t[ee])})}),t.isMobile){ss();return}var N=Hc(fe,50);if(t._debouncedChange=Hc(g,I$),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&b(t.daysContainer,"mouseover",function(ee){t.config.mode==="range"&&se(on(ee))}),b(t._input,"keydown",ue),t.calendarContainer!==void 0&&b(t.calendarContainer,"keydown",ue),!t.config.inline&&!t.config.static&&b(window,"resize",N),window.ontouchstart!==void 0?b(window.document,"touchstart",Fe):b(window.document,"mousedown",Fe),b(window.document,"focus",Fe,{capture:!0}),t.config.clickOpens===!0&&(b(t._input,"focus",t.open),b(t._input,"click",t.open)),t.daysContainer!==void 0&&(b(t.monthNav,"click",zt),b(t.monthNav,["keyup","increment"],m),b(t.daysContainer,"click",Ps)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var V=function(ee){return on(ee).select()};b(t.timeContainer,["increment"],a),b(t.timeContainer,"blur",a,{capture:!0}),b(t.timeContainer,"click",$),b([t.hourElement,t.minuteElement],["focus","click"],V),t.secondElement!==void 0&&b(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&b(t.amPM,"click",function(ee){a(ee)})}t.config.allowInput&&b(t._input,"blur",We)}function k(N,V){var ee=N!==void 0?t.parseDate(N):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate1),t.calendarContainer.appendChild(N);var $e=t.config.appendTo!==void 0&&t.config.appendTo.nodeType!==void 0;if((t.config.inline||t.config.static)&&(t.calendarContainer.classList.add(t.config.inline?"inline":"static"),t.config.inline&&(!$e&&t.element.parentNode?t.element.parentNode.insertBefore(t.calendarContainer,t._input.nextSibling):t.config.appendTo!==void 0&&t.config.appendTo.appendChild(t.calendarContainer)),t.config.static)){var Oe=nt("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(Oe,t.element),Oe.appendChild(t.element),t.altInput&&Oe.appendChild(t.altInput),Oe.appendChild(t.calendarContainer)}!t.config.static&&!t.config.inline&&(t.config.appendTo!==void 0?t.config.appendTo:window.document.body).appendChild(t.calendarContainer)}function T(N,V,ee,oe){var $e=Se(V,!0),Oe=nt("span",N,V.getDate().toString());return Oe.dateObj=V,Oe.$i=oe,Oe.setAttribute("aria-label",t.formatDate(V,t.config.ariaDateFormat)),N.indexOf("hidden")===-1&&rn(V,t.now)===0&&(t.todayDateElem=Oe,Oe.classList.add("today"),Oe.setAttribute("aria-current","date")),$e?(Oe.tabIndex=-1,Xn(V)&&(Oe.classList.add("selected"),t.selectedDateElem=Oe,t.config.mode==="range"&&(Bt(Oe,"startRange",t.selectedDates[0]&&rn(V,t.selectedDates[0],!0)===0),Bt(Oe,"endRange",t.selectedDates[1]&&rn(V,t.selectedDates[1],!0)===0),N==="nextMonthDay"&&Oe.classList.add("inRange")))):Oe.classList.add("flatpickr-disabled"),t.config.mode==="range"&&os(V)&&!Xn(V)&&Oe.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&N!=="prevMonthDay"&&oe%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend",""+t.config.getWeek(V)+""),Je("onDayCreate",Oe),Oe}function D(N){N.focus(),t.config.mode==="range"&&se(N)}function A(N){for(var V=N>0?0:t.config.showMonths-1,ee=N>0?t.config.showMonths:-1,oe=V;oe!=ee;oe+=N)for(var $e=t.daysContainer.children[oe],Oe=N>0?0:$e.children.length-1,De=N>0?$e.children.length:-1,Te=Oe;Te!=De;Te+=N){var ze=$e.children[Te];if(ze.className.indexOf("hidden")===-1&&Se(ze.dateObj))return ze}}function I(N,V){for(var ee=N.className.indexOf("Month")===-1?N.dateObj.getMonth():t.currentMonth,oe=V>0?t.config.showMonths:-1,$e=V>0?1:-1,Oe=ee-t.currentMonth;Oe!=oe;Oe+=$e)for(var De=t.daysContainer.children[Oe],Te=ee-t.currentMonth===Oe?N.$i+V:V<0?De.children.length-1:0,ze=De.children.length,Ie=Te;Ie>=0&&Ie0?ze:-1);Ie+=$e){var qe=De.children[Ie];if(qe.className.indexOf("hidden")===-1&&Se(qe.dateObj)&&Math.abs(N.$i-Ie)>=Math.abs(V))return D(qe)}t.changeMonth($e),L(A($e),0)}function L(N,V){var ee=l(),oe=we(ee||document.body),$e=N!==void 0?N:oe?ee:t.selectedDateElem!==void 0&&we(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&we(t.todayDateElem)?t.todayDateElem:A(V>0?1:-1);$e===void 0?t._input.focus():oe?I($e,V):D($e)}function F(N,V){for(var ee=(new Date(N,V,1).getDay()-t.l10n.firstDayOfWeek+7)%7,oe=t.utils.getDaysInMonth((V-1+12)%12,N),$e=t.utils.getDaysInMonth(V,N),Oe=window.document.createDocumentFragment(),De=t.config.showMonths>1,Te=De?"prevMonthDay hidden":"prevMonthDay",ze=De?"nextMonthDay hidden":"nextMonthDay",Ie=oe+1-ee,qe=0;Ie<=oe;Ie++,qe++)Oe.appendChild(T("flatpickr-day "+Te,new Date(N,V-1,Ie),Ie,qe));for(Ie=1;Ie<=$e;Ie++,qe++)Oe.appendChild(T("flatpickr-day",new Date(N,V,Ie),Ie,qe));for(var at=$e+1;at<=42-ee&&(t.config.showMonths===1||qe%7!==0);at++,qe++)Oe.appendChild(T("flatpickr-day "+ze,new Date(N,V+1,at%$e),at,qe));var Hn=nt("div","dayContainer");return Hn.appendChild(Oe),Hn}function q(){if(t.daysContainer!==void 0){io(t.daysContainer),t.weekNumbers&&io(t.weekNumbers);for(var N=document.createDocumentFragment(),V=0;V1||t.config.monthSelectorType!=="dropdown")){var N=function(oe){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&oet.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var V=0;V<12;V++)if(!!N(V)){var ee=nt("option","flatpickr-monthDropdown-month");ee.value=new Date(t.currentYear,V).getMonth().toString(),ee.textContent=Po(V,t.config.shorthandCurrentMonth,t.l10n),ee.tabIndex=-1,t.currentMonth===V&&(ee.selected=!0),t.monthsDropdownContainer.appendChild(ee)}}}function J(){var N=nt("div","flatpickr-month"),V=window.document.createDocumentFragment(),ee;t.config.showMonths>1||t.config.monthSelectorType==="static"?ee=nt("span","cur-month"):(t.monthsDropdownContainer=nt("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),b(t.monthsDropdownContainer,"change",function(De){var Te=on(De),ze=parseInt(Te.value,10);t.changeMonth(ze-t.currentMonth),Je("onMonthChange")}),z(),ee=t.monthsDropdownContainer);var oe=so("cur-year",{tabindex:"-1"}),$e=oe.getElementsByTagName("input")[0];$e.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&$e.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&($e.setAttribute("max",t.config.maxDate.getFullYear().toString()),$e.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var Oe=nt("div","flatpickr-current-month");return Oe.appendChild(ee),Oe.appendChild(oe),V.appendChild(Oe),N.appendChild(V),{container:N,yearElement:$e,monthElement:ee}}function G(){io(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var N=t.config.showMonths;N--;){var V=J();t.yearElements.push(V.yearElement),t.monthElements.push(V.monthElement),t.monthNav.appendChild(V.container)}t.monthNav.appendChild(t.nextMonthNav)}function ie(){return t.monthNav=nt("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=nt("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=nt("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,G(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(N){t.__hidePrevMonthArrow!==N&&(Bt(t.prevMonthNav,"flatpickr-disabled",N),t.__hidePrevMonthArrow=N)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(N){t.__hideNextMonthArrow!==N&&(Bt(t.nextMonthNav,"flatpickr-disabled",N),t.__hideNextMonthArrow=N)}}),t.currentYearElement=t.yearElements[0],Oi(),t.monthNav}function Q(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var N=Sr(t.config);t.timeContainer=nt("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var V=nt("span","flatpickr-time-separator",":"),ee=so("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=ee.getElementsByTagName("input")[0];var oe=so("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=oe.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=Qt(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?N.hours:f(N.hours)),t.minuteElement.value=Qt(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():N.minutes),t.hourElement.setAttribute("step",t.config.hourIncrement.toString()),t.minuteElement.setAttribute("step",t.config.minuteIncrement.toString()),t.hourElement.setAttribute("min",t.config.time_24hr?"0":"1"),t.hourElement.setAttribute("max",t.config.time_24hr?"23":"12"),t.hourElement.setAttribute("maxlength","2"),t.minuteElement.setAttribute("min","0"),t.minuteElement.setAttribute("max","59"),t.minuteElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(ee),t.timeContainer.appendChild(V),t.timeContainer.appendChild(oe),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var $e=so("flatpickr-second");t.secondElement=$e.getElementsByTagName("input")[0],t.secondElement.value=Qt(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():N.seconds),t.secondElement.setAttribute("step",t.minuteElement.getAttribute("step")),t.secondElement.setAttribute("min","0"),t.secondElement.setAttribute("max","59"),t.secondElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(nt("span","flatpickr-time-separator",":")),t.timeContainer.appendChild($e)}return t.config.time_24hr||(t.amPM=nt("span","flatpickr-am-pm",t.l10n.amPM[_n((t.latestSelectedDateObj?t.hourElement.value:t.config.defaultHour)>11)]),t.amPM.title=t.l10n.toggleTitle,t.amPM.tabIndex=-1,t.timeContainer.appendChild(t.amPM)),t.timeContainer}function X(){t.weekdayContainer?io(t.weekdayContainer):t.weekdayContainer=nt("div","flatpickr-weekdays");for(var N=t.config.showMonths;N--;){var V=nt("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(V)}return Y(),t.weekdayContainer}function Y(){if(!!t.weekdayContainer){var N=t.l10n.firstDayOfWeek,V=jc(t.l10n.weekdays.shorthand);N>0&&N>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),n.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:n.languages.dart}}},string:/[\s\S]+/}},string:void 0}),n.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),n.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":i,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})})(Prism);function dS(n){let e,t,i;return{c(){e=v("div"),t=v("code"),p(t,"class","svelte-10s5tkd"),p(e,"class",i="code-wrapper prism-light "+n[0]+" svelte-10s5tkd")},m(s,l){S(s,e,l),_(e,t),t.innerHTML=n[1]},p(s,[l]){l&2&&(t.innerHTML=s[1]),l&1&&i!==(i="code-wrapper prism-light "+s[0]+" svelte-10s5tkd")&&p(e,"class",i)},i:ee,o:ee,d(s){s&&w(e)}}}function pS(n,e,t){let{class:i=""}=e,{content:s=""}=e,{language:l="javascript"}=e,o="";function r(a){return a=typeof a=="string"?a:"",a=Ks.plugins.NormalizeWhitespace.normalize(a,{"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Ks.highlight(a,Ks.languages[l]||Ks.languages.javascript,l)}return n.$$set=a=>{"class"in a&&t(0,i=a.class),"content"in a&&t(2,s=a.content),"language"in a&&t(3,l=a.language)},n.$$.update=()=>{n.$$.dirty&4&&typeof Ks<"u"&&s&&t(1,o=r(s))},[i,o,s,l]}class L_ extends ke{constructor(e){super(),ye(this,e,pS,dS,be,{class:0,content:2,language:3})}}const hS=n=>({}),cc=n=>({}),mS=n=>({}),dc=n=>({});function pc(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,b,y,k,$=n[4]&&!n[2]&&hc(n);const C=n[18].header,M=Ot(C,n,n[17],dc);let T=n[4]&&n[2]&&mc(n);const D=n[18].default,A=Ot(D,n,n[17],null),I=n[18].footer,L=Ot(I,n,n[17],cc);return{c(){e=v("div"),t=v("div"),s=O(),l=v("div"),o=v("div"),$&&$.c(),r=O(),M&&M.c(),a=O(),T&&T.c(),u=O(),f=v("div"),A&&A.c(),c=O(),d=v("div"),L&&L.c(),p(t,"class","overlay"),p(o,"class","overlay-panel-section panel-header"),p(f,"class","overlay-panel-section panel-content"),p(d,"class","overlay-panel-section panel-footer"),p(l,"class",h="overlay-panel "+n[1]+" "+n[8]),ne(l,"popup",n[2]),p(e,"class","overlay-panel-container"),ne(e,"padded",n[2]),ne(e,"active",n[0])},m(F,q){S(F,e,q),_(e,t),_(e,s),_(e,l),_(l,o),$&&$.m(o,null),_(o,r),M&&M.m(o,null),_(o,a),T&&T.m(o,null),_(l,u),_(l,f),A&&A.m(f,null),n[20](f),_(l,c),_(l,d),L&&L.m(d,null),b=!0,y||(k=[K(t,"click",ut(n[19])),K(f,"scroll",n[21])],y=!0)},p(F,q){n=F,n[4]&&!n[2]?$?$.p(n,q):($=hc(n),$.c(),$.m(o,r)):$&&($.d(1),$=null),M&&M.p&&(!b||q&131072)&&At(M,C,n,n[17],b?Dt(C,n[17],q,mS):Et(n[17]),dc),n[4]&&n[2]?T?T.p(n,q):(T=mc(n),T.c(),T.m(o,null)):T&&(T.d(1),T=null),A&&A.p&&(!b||q&131072)&&At(A,D,n,n[17],b?Dt(D,n[17],q,null):Et(n[17]),null),L&&L.p&&(!b||q&131072)&&At(L,I,n,n[17],b?Dt(I,n[17],q,hS):Et(n[17]),cc),(!b||q&258&&h!==(h="overlay-panel "+n[1]+" "+n[8]))&&p(l,"class",h),(!b||q&262)&&ne(l,"popup",n[2]),(!b||q&4)&&ne(e,"padded",n[2]),(!b||q&1)&&ne(e,"active",n[0])},i(F){b||(xe(()=>{i||(i=je(t,ko,{duration:ds,opacity:0},!0)),i.run(1)}),E(M,F),E(A,F),E(L,F),xe(()=>{g&&g.end(1),m=$m(l,Sn,n[2]?{duration:ds,y:-10}:{duration:ds,x:50}),m.start()}),b=!0)},o(F){i||(i=je(t,ko,{duration:ds,opacity:0},!1)),i.run(0),P(M,F),P(A,F),P(L,F),m&&m.invalidate(),g=Cm(l,Sn,n[2]?{duration:ds,y:10}:{duration:ds,x:50}),b=!1},d(F){F&&w(e),F&&i&&i.end(),$&&$.d(),M&&M.d(F),T&&T.d(),A&&A.d(F),n[20](null),L&&L.d(F),F&&g&&g.end(),y=!1,Pe(k)}}}function hc(n){let e,t,i;return{c(){e=v("div"),e.innerHTML='',p(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=K(e,"click",ut(n[5])),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function mc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-secondary btn-close m-l-auto")},m(s,l){S(s,e,l),t||(i=K(e,"click",ut(n[5])),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function gS(n){let e,t,i,s,l=n[0]&&pc(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","overlay-panel-wrapper")},m(o,r){S(o,e,r),l&&l.m(e,null),n[22](e),t=!0,i||(s=[K(window,"resize",n[10]),K(window,"keydown",n[9])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&E(l,1)):(l=pc(o),l.c(),E(l,1),l.m(e,null)):l&&(pe(),P(l,1,1,()=>{l=null}),he())},i(o){t||(E(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[22](null),i=!1,Pe(s)}}}let Ni;function N_(){return Ni=Ni||document.querySelector(".overlays"),Ni||(Ni=document.createElement("div"),Ni.classList.add("overlays"),document.body.appendChild(Ni)),Ni}let ds=150;function gc(){return 1e3+N_().querySelectorAll(".overlay-panel-container.active").length}function _S(n,e,t){let{$$slots:i={},$$scope:s}=e,{class:l=""}=e,{active:o=!1}=e,{popup:r=!1}=e,{overlayClose:a=!0}=e,{btnClose:u=!0}=e,{escClose:f=!0}=e,{beforeOpen:c=void 0}=e,{beforeHide:d=void 0}=e;const h=It();let m,g,b,y,k="";function $(){typeof c=="function"&&c()===!1||t(0,o=!0)}function C(){typeof d=="function"&&d()===!1||t(0,o=!1)}function M(){return o}async function T(G){G?(b=document.activeElement,m==null||m.focus(),h("show"),document.body.classList.add("overlay-active")):(clearTimeout(y),b==null||b.focus(),h("hide"),document.body.classList.remove("overlay-active")),await Tn(),D()}function D(){!m||(o?t(6,m.style.zIndex=gc(),m):t(6,m.style="",m))}function A(G){o&&f&&G.code=="Escape"&&!W.isInput(G.target)&&m&&m.style.zIndex==gc()&&(G.preventDefault(),C())}function I(G){o&&L(g)}function L(G,ie){ie&&t(8,k=""),G&&(y||(y=setTimeout(()=>{if(clearTimeout(y),y=null,!G)return;if(G.scrollHeight-G.offsetHeight>0)t(8,k="scrollable");else{t(8,k="");return}G.scrollTop==0?t(8,k+=" scroll-top-reached"):G.scrollTop+G.offsetHeight==G.scrollHeight&&t(8,k+=" scroll-bottom-reached")},100)))}cn(()=>(N_().appendChild(m),()=>{var G;clearTimeout(y),(G=m==null?void 0:m.classList)==null||G.add("hidden"),setTimeout(()=>{m==null||m.remove()},0)}));const F=()=>a?C():!0;function q(G){le[G?"unshift":"push"](()=>{g=G,t(7,g)})}const z=G=>L(G.target);function J(G){le[G?"unshift":"push"](()=>{m=G,t(6,m)})}return n.$$set=G=>{"class"in G&&t(1,l=G.class),"active"in G&&t(0,o=G.active),"popup"in G&&t(2,r=G.popup),"overlayClose"in G&&t(3,a=G.overlayClose),"btnClose"in G&&t(4,u=G.btnClose),"escClose"in G&&t(12,f=G.escClose),"beforeOpen"in G&&t(13,c=G.beforeOpen),"beforeHide"in G&&t(14,d=G.beforeHide),"$$scope"in G&&t(17,s=G.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&T(o),n.$$.dirty&128&&L(g,!0),n.$$.dirty&64&&m&&D()},[o,l,r,a,u,C,m,g,k,A,I,L,f,c,d,$,M,s,i,F,q,z,J]}class Jn extends ke{constructor(e){super(),ye(this,e,_S,gS,be,{class:1,active:0,popup:2,overlayClose:3,btnClose:4,escClose:12,beforeOpen:13,beforeHide:14,show:15,hide:5,isActive:16})}get show(){return this.$$.ctx[15]}get hide(){return this.$$.ctx[5]}get isActive(){return this.$$.ctx[16]}}function bS(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function vS(n){let e,t=n[2].referer+"",i,s;return{c(){e=v("a"),i=B(t),p(e,"href",s=n[2].referer),p(e,"target","_blank"),p(e,"rel","noopener noreferrer")},m(l,o){S(l,e,o),_(e,i)},p(l,o){o&4&&t!==(t=l[2].referer+"")&&re(i,t),o&4&&s!==(s=l[2].referer)&&p(e,"href",s)},d(l){l&&w(e)}}}function yS(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&w(e)}}}function kS(n){let e,t;return e=new L_({props:{content:JSON.stringify(n[2].meta,null,2)}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s&4&&(l.content=JSON.stringify(i[2].meta,null,2)),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function wS(n){var Oe;let e,t,i,s,l,o,r=n[2].id+"",a,u,f,c,d,h,m,g=n[2].status+"",b,y,k,$,C,M,T=((Oe=n[2].method)==null?void 0:Oe.toUpperCase())+"",D,A,I,L,F,q,z=n[2].auth+"",J,G,ie,Q,X,Y,x=n[2].url+"",U,ae,Re,Ne,Le,Fe,me,Se,we,We,ue,se=n[2].remoteIp+"",fe,Z,Ce,Be,Vt,Gt,sn=n[2].userIp+"",Gn,Ti,oi,ri,Ls,ai,ts=n[2].userAgent+"",ns,Ll,ui,is,Nl,Mi,ss,Xt,Je,ls,Xn,os,Oi,Di,Pt,zt;function Fl(De,Te){return De[2].referer?vS:bS}let N=Fl(n),V=N(n);const te=[kS,yS],oe=[];function $e(De,Te){return Te&4&&(ss=null),ss==null&&(ss=!W.isEmpty(De[2].meta)),ss?0:1}return Xt=$e(n,-1),Je=oe[Xt]=te[Xt](n),Pt=new Ki({props:{date:n[2].created}}),{c(){e=v("table"),t=v("tbody"),i=v("tr"),s=v("td"),s.textContent="ID",l=O(),o=v("td"),a=B(r),u=O(),f=v("tr"),c=v("td"),c.textContent="Status",d=O(),h=v("td"),m=v("span"),b=B(g),y=O(),k=v("tr"),$=v("td"),$.textContent="Method",C=O(),M=v("td"),D=B(T),A=O(),I=v("tr"),L=v("td"),L.textContent="Auth",F=O(),q=v("td"),J=B(z),G=O(),ie=v("tr"),Q=v("td"),Q.textContent="URL",X=O(),Y=v("td"),U=B(x),ae=O(),Re=v("tr"),Ne=v("td"),Ne.textContent="Referer",Le=O(),Fe=v("td"),V.c(),me=O(),Se=v("tr"),we=v("td"),we.textContent="Remote IP",We=O(),ue=v("td"),fe=B(se),Z=O(),Ce=v("tr"),Be=v("td"),Be.textContent="User IP",Vt=O(),Gt=v("td"),Gn=B(sn),Ti=O(),oi=v("tr"),ri=v("td"),ri.textContent="UserAgent",Ls=O(),ai=v("td"),ns=B(ts),Ll=O(),ui=v("tr"),is=v("td"),is.textContent="Meta",Nl=O(),Mi=v("td"),Je.c(),ls=O(),Xn=v("tr"),os=v("td"),os.textContent="Created",Oi=O(),Di=v("td"),j(Pt.$$.fragment),p(s,"class","min-width txt-hint txt-bold"),p(c,"class","min-width txt-hint txt-bold"),p(m,"class","label"),ne(m,"label-danger",n[2].status>=400),p($,"class","min-width txt-hint txt-bold"),p(L,"class","min-width txt-hint txt-bold"),p(Q,"class","min-width txt-hint txt-bold"),p(Ne,"class","min-width txt-hint txt-bold"),p(we,"class","min-width txt-hint txt-bold"),p(Be,"class","min-width txt-hint txt-bold"),p(ri,"class","min-width txt-hint txt-bold"),p(is,"class","min-width txt-hint txt-bold"),p(os,"class","min-width txt-hint txt-bold"),p(e,"class","table-compact table-border")},m(De,Te){S(De,e,Te),_(e,t),_(t,i),_(i,s),_(i,l),_(i,o),_(o,a),_(t,u),_(t,f),_(f,c),_(f,d),_(f,h),_(h,m),_(m,b),_(t,y),_(t,k),_(k,$),_(k,C),_(k,M),_(M,D),_(t,A),_(t,I),_(I,L),_(I,F),_(I,q),_(q,J),_(t,G),_(t,ie),_(ie,Q),_(ie,X),_(ie,Y),_(Y,U),_(t,ae),_(t,Re),_(Re,Ne),_(Re,Le),_(Re,Fe),V.m(Fe,null),_(t,me),_(t,Se),_(Se,we),_(Se,We),_(Se,ue),_(ue,fe),_(t,Z),_(t,Ce),_(Ce,Be),_(Ce,Vt),_(Ce,Gt),_(Gt,Gn),_(t,Ti),_(t,oi),_(oi,ri),_(oi,Ls),_(oi,ai),_(ai,ns),_(t,Ll),_(t,ui),_(ui,is),_(ui,Nl),_(ui,Mi),oe[Xt].m(Mi,null),_(t,ls),_(t,Xn),_(Xn,os),_(Xn,Oi),_(Xn,Di),R(Pt,Di,null),zt=!0},p(De,Te){var qe;(!zt||Te&4)&&r!==(r=De[2].id+"")&&re(a,r),(!zt||Te&4)&&g!==(g=De[2].status+"")&&re(b,g),(!zt||Te&4)&&ne(m,"label-danger",De[2].status>=400),(!zt||Te&4)&&T!==(T=((qe=De[2].method)==null?void 0:qe.toUpperCase())+"")&&re(D,T),(!zt||Te&4)&&z!==(z=De[2].auth+"")&&re(J,z),(!zt||Te&4)&&x!==(x=De[2].url+"")&&re(U,x),N===(N=Fl(De))&&V?V.p(De,Te):(V.d(1),V=N(De),V&&(V.c(),V.m(Fe,null))),(!zt||Te&4)&&se!==(se=De[2].remoteIp+"")&&re(fe,se),(!zt||Te&4)&&sn!==(sn=De[2].userIp+"")&&re(Gn,sn),(!zt||Te&4)&&ts!==(ts=De[2].userAgent+"")&&re(ns,ts);let ze=Xt;Xt=$e(De,Te),Xt===ze?oe[Xt].p(De,Te):(pe(),P(oe[ze],1,1,()=>{oe[ze]=null}),he(),Je=oe[Xt],Je?Je.p(De,Te):(Je=oe[Xt]=te[Xt](De),Je.c()),E(Je,1),Je.m(Mi,null));const Ie={};Te&4&&(Ie.date=De[2].created),Pt.$set(Ie)},i(De){zt||(E(Je),E(Pt.$$.fragment,De),zt=!0)},o(De){P(Je),P(Pt.$$.fragment,De),zt=!1},d(De){De&&w(e),V.d(),oe[Xt].d(),H(Pt)}}}function SS(n){let e;return{c(){e=v("h4"),e.textContent="Request log"},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function $S(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Close',p(e,"type","button"),p(e,"class","btn btn-secondary")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[4]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function CS(n){let e,t,i={class:"overlay-panel-lg log-panel",$$slots:{footer:[$S],header:[SS],default:[wS]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[5](e),e.$on("hide",n[6]),e.$on("show",n[7]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&260&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[5](null),H(e,s)}}}function TS(n,e,t){let i,s=new Ir;function l(c){return t(2,s=c),i==null?void 0:i.show()}function o(){return i==null?void 0:i.hide()}const r=()=>o();function a(c){le[c?"unshift":"push"](()=>{i=c,t(1,i)})}function u(c){Ve.call(this,n,c)}function f(c){Ve.call(this,n,c)}return[o,i,s,l,r,a,u,f]}class MS extends ke{constructor(e){super(),ye(this,e,TS,CS,be,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function OS(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Include requests by admins"),p(e,"type","checkbox"),p(e,"id",t=n[14]),p(s,"for",o=n[14])},m(u,f){S(u,e,f),e.checked=n[0],S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[8]),r=!0)},p(u,f){f&16384&&t!==(t=u[14])&&p(e,"id",t),f&1&&(e.checked=u[0]),f&16384&&o!==(o=u[14])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function _c(n){let e,t,i;function s(o){n[10](o)}let l={presets:n[4]};return n[2]!==void 0&&(l.filter=n[2]),e=new fS({props:l}),le.push(()=>_e(e,"filter",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r&16&&(a.presets=o[4]),!t&&r&4&&(t=!0,a.filter=o[2],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function bc(n){let e,t,i;function s(o){n[11](o)}let l={presets:n[4]};return n[2]!==void 0&&(l.filter=n[2]),e=new Dv({props:l}),le.push(()=>_e(e,"filter",s)),e.$on("select",n[12]),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r&16&&(a.presets=o[4]),!t&&r&4&&(t=!0,a.filter=o[2],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function DS(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,b,y,k=n[3],$,C=n[3],M,T;r=new Sa({}),r.$on("refresh",n[7]),d=new ge({props:{class:"form-field form-field-toggle m-0",$$slots:{default:[OS,({uniqueId:I})=>({14:I}),({uniqueId:I})=>I?16384:0]},$$scope:{ctx:n}}}),m=new wa({props:{value:n[2],placeholder:"Search logs, ex. status > 200",extraAutocompleteKeys:["method","url","remoteIp","userIp","referer","status","auth","userAgent"]}}),m.$on("submit",n[9]);let D=_c(n),A=bc(n);return{c(){e=v("div"),t=v("header"),i=v("nav"),s=v("div"),l=B(n[5]),o=O(),j(r.$$.fragment),a=O(),u=v("div"),f=O(),c=v("div"),j(d.$$.fragment),h=O(),j(m.$$.fragment),g=O(),b=v("div"),y=O(),D.c(),$=O(),A.c(),M=Ae(),p(s,"class","breadcrumb-item"),p(i,"class","breadcrumbs"),p(u,"class","flex-fill"),p(c,"class","inline-flex"),p(t,"class","page-header"),p(b,"class","clearfix m-b-xs"),p(e,"class","page-header-wrapper m-b-0")},m(I,L){S(I,e,L),_(e,t),_(t,i),_(i,s),_(s,l),_(t,o),R(r,t,null),_(t,a),_(t,u),_(t,f),_(t,c),R(d,c,null),_(e,h),R(m,e,null),_(e,g),_(e,b),_(e,y),D.m(e,null),S(I,$,L),A.m(I,L),S(I,M,L),T=!0},p(I,L){(!T||L&32)&&re(l,I[5]);const F={};L&49153&&(F.$$scope={dirty:L,ctx:I}),d.$set(F);const q={};L&4&&(q.value=I[2]),m.$set(q),L&8&&be(k,k=I[3])?(pe(),P(D,1,1,ee),he(),D=_c(I),D.c(),E(D,1),D.m(e,null)):D.p(I,L),L&8&&be(C,C=I[3])?(pe(),P(A,1,1,ee),he(),A=bc(I),A.c(),E(A,1),A.m(M.parentNode,M)):A.p(I,L)},i(I){T||(E(r.$$.fragment,I),E(d.$$.fragment,I),E(m.$$.fragment,I),E(D),E(A),T=!0)},o(I){P(r.$$.fragment,I),P(d.$$.fragment,I),P(m.$$.fragment,I),P(D),P(A),T=!1},d(I){I&&w(e),H(r),H(d),H(m),D.d(I),I&&w($),I&&w(M),A.d(I)}}}function AS(n){let e,t,i,s;e=new pn({props:{$$slots:{default:[DS]},$$scope:{ctx:n}}});let l={};return i=new MS({props:l}),n[13](i),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(o,r){R(e,o,r),S(o,t,r),R(i,o,r),s=!0},p(o,[r]){const a={};r&32831&&(a.$$scope={dirty:r,ctx:o}),e.$set(a);const u={};i.$set(u)},i(o){s||(E(e.$$.fragment,o),E(i.$$.fragment,o),s=!0)},o(o){P(e.$$.fragment,o),P(i.$$.fragment,o),s=!1},d(o){H(e,o),o&&w(t),n[13](null),H(i,o)}}}const vc="includeAdminLogs";function ES(n,e,t){var y;let i,s;Ze(n,mt,k=>t(5,s=k)),Ht(mt,s="Request logs",s);let l,o="",r=((y=window.localStorage)==null?void 0:y.getItem(vc))<<0,a=1;function u(){t(3,a++,a)}const f=()=>u();function c(){r=this.checked,t(0,r)}const d=k=>t(2,o=k.detail);function h(k){o=k,t(2,o)}function m(k){o=k,t(2,o)}const g=k=>l==null?void 0:l.show(k==null?void 0:k.detail);function b(k){le[k?"unshift":"push"](()=>{l=k,t(1,l)})}return n.$$.update=()=>{n.$$.dirty&1&&t(4,i=r?"":'auth!="admin"'),n.$$.dirty&1&&typeof r<"u"&&window.localStorage&&window.localStorage.setItem(vc,r<<0)},[r,l,o,a,i,s,u,f,c,d,h,m,g,b]}class IS extends ke{constructor(e){super(),ye(this,e,ES,AS,be,{})}}const Zi=Mn([]),Bn=Mn({}),ia=Mn(!1);function PS(n){Zi.update(e=>{const t=W.findByKey(e,"id",n);return t?Bn.set(t):e.length&&Bn.set(e[0]),e})}function LS(n){Bn.update(e=>W.isEmpty(e==null?void 0:e.id)||e.id===n.id?n:e),Zi.update(e=>(W.pushOrReplaceByKey(e,n,"id"),W.sortCollections(e)))}function NS(n){Zi.update(e=>(W.removeByKey(e,"id",n.id),Bn.update(t=>t.id===n.id?e[0]:t),e))}async function FS(n=null){return ia.set(!0),Bn.set({}),Zi.set([]),de.collections.getFullList(200,{sort:"+created"}).then(e=>{Zi.set(W.sortCollections(e));const t=n&&W.findByKey(e,"id",n);t?Bn.set(t):e.length&&Bn.set(e[0])}).catch(e=>{de.errorResponseHandler(e)}).finally(()=>{ia.set(!1)})}const Ka=Mn({});function wn(n,e,t){Ka.set({text:n,yesCallback:e,noCallback:t})}function F_(){Ka.set({})}function yc(n){let e,t,i,s;const l=n[14].default,o=Ot(l,n,n[13],null);return{c(){e=v("div"),o&&o.c(),p(e,"class",n[1]),ne(e,"active",n[0])},m(r,a){S(r,e,a),o&&o.m(e,null),s=!0},p(r,a){o&&o.p&&(!s||a&8192)&&At(o,l,r,r[13],s?Dt(l,r[13],a,null):Et(r[13]),null),(!s||a&2)&&p(e,"class",r[1]),(!s||a&3)&&ne(e,"active",r[0])},i(r){s||(E(o,r),r&&xe(()=>{i&&i.end(1),t=$m(e,Sn,{duration:150,y:-5}),t.start()}),s=!0)},o(r){P(o,r),t&&t.invalidate(),r&&(i=Cm(e,Sn,{duration:150,y:2})),s=!1},d(r){r&&w(e),o&&o.d(r),r&&i&&i.end()}}}function RS(n){let e,t,i,s,l=n[0]&&yc(n);return{c(){e=v("div"),l&&l.c(),p(e,"class","toggler-container")},m(o,r){S(o,e,r),l&&l.m(e,null),n[15](e),t=!0,i||(s=[K(window,"click",n[3]),K(window,"keydown",n[4]),K(window,"focusin",n[5])],i=!0)},p(o,[r]){o[0]?l?(l.p(o,r),r&1&&E(l,1)):(l=yc(o),l.c(),E(l,1),l.m(e,null)):l&&(pe(),P(l,1,1,()=>{l=null}),he())},i(o){t||(E(l),t=!0)},o(o){P(l),t=!1},d(o){o&&w(e),l&&l.d(),n[15](null),i=!1,Pe(s)}}}function HS(n,e,t){let{$$slots:i={},$$scope:s}=e,{trigger:l=void 0}=e,{active:o=!1}=e,{escClose:r=!0}=e,{closableClass:a="closable"}=e,{class:u=""}=e,f,c;const d=It();function h(){t(0,o=!1)}function m(){t(0,o=!0)}function g(){o?h():m()}function b(I){return!f||I.classList.contains(a)||(c==null?void 0:c.contains(I))&&!f.contains(I)||f.contains(I)&&I.closest&&I.closest("."+a)}function y(I){(!o||b(I.target))&&(I.preventDefault(),I.stopPropagation(),g())}function k(I){(I.code==="Enter"||I.code==="Space")&&(!o||b(I.target))&&(I.preventDefault(),I.stopPropagation(),g())}function $(I){o&&!(f!=null&&f.contains(I.target))&&!(c!=null&&c.contains(I.target))&&h()}function C(I){o&&r&&I.code==="Escape"&&(I.preventDefault(),h())}function M(I){return $(I)}function T(I){D(),t(12,c=I||(f==null?void 0:f.parentNode)),c&&(f==null||f.addEventListener("click",y),c.addEventListener("click",y),c.addEventListener("keydown",k))}function D(){!c||(f==null||f.removeEventListener("click",y),c.removeEventListener("click",y),c.removeEventListener("keydown",k))}cn(()=>(T(),()=>D()));function A(I){le[I?"unshift":"push"](()=>{f=I,t(2,f)})}return n.$$set=I=>{"trigger"in I&&t(6,l=I.trigger),"active"in I&&t(0,o=I.active),"escClose"in I&&t(7,r=I.escClose),"closableClass"in I&&t(8,a=I.closableClass),"class"in I&&t(1,u=I.class),"$$scope"in I&&t(13,s=I.$$scope)},n.$$.update=()=>{var I,L;n.$$.dirty&68&&f&&T(l),n.$$.dirty&4097&&(o?((I=c==null?void 0:c.classList)==null||I.add("active"),d("show")):((L=c==null?void 0:c.classList)==null||L.remove("active"),d("hide")))},[o,u,f,$,C,M,l,r,a,h,m,g,c,s,i,A]}class Zn extends ke{constructor(e){super(),ye(this,e,HS,RS,be,{trigger:6,active:0,escClose:7,closableClass:8,class:1,hide:9,show:10,toggle:11})}get hide(){return this.$$.ctx[9]}get show(){return this.$$.ctx[10]}get toggle(){return this.$$.ctx[11]}}const jS=n=>({active:n&1}),kc=n=>({active:n[0]});function wc(n){let e,t,i;const s=n[14].default,l=Ot(s,n,n[13],null);return{c(){e=v("div"),l&&l.c(),p(e,"class","accordion-content")},m(o,r){S(o,e,r),l&&l.m(e,null),i=!0},p(o,r){l&&l.p&&(!i||r&8192)&&At(l,s,o,o[13],i?Dt(s,o[13],r,null):Et(o[13]),null)},i(o){i||(E(l,o),o&&xe(()=>{t||(t=je(e,St,{duration:150},!0)),t.run(1)}),i=!0)},o(o){P(l,o),o&&(t||(t=je(e,St,{duration:150},!1)),t.run(0)),i=!1},d(o){o&&w(e),l&&l.d(o),o&&t&&t.end()}}}function qS(n){let e,t,i,s,l,o,r;const a=n[14].header,u=Ot(a,n,n[13],kc);let f=n[0]&&wc(n);return{c(){e=v("div"),t=v("button"),u&&u.c(),i=O(),f&&f.c(),p(t,"type","button"),p(t,"class","accordion-header"),p(t,"draggable",n[2]),ne(t,"interactive",n[3]),p(e,"class",s="accordion "+(n[7]?"drag-over":"")+" "+n[1]),ne(e,"active",n[0])},m(c,d){S(c,e,d),_(e,t),u&&u.m(t,null),_(e,i),f&&f.m(e,null),n[21](e),l=!0,o||(r=[K(t,"click",ut(n[16])),K(t,"drop",ut(n[17])),K(t,"dragstart",n[18]),K(t,"dragenter",n[19]),K(t,"dragleave",n[20]),K(t,"dragover",ut(n[15]))],o=!0)},p(c,[d]){u&&u.p&&(!l||d&8193)&&At(u,a,c,c[13],l?Dt(a,c[13],d,jS):Et(c[13]),kc),(!l||d&4)&&p(t,"draggable",c[2]),(!l||d&8)&&ne(t,"interactive",c[3]),c[0]?f?(f.p(c,d),d&1&&E(f,1)):(f=wc(c),f.c(),E(f,1),f.m(e,null)):f&&(pe(),P(f,1,1,()=>{f=null}),he()),(!l||d&130&&s!==(s="accordion "+(c[7]?"drag-over":"")+" "+c[1]))&&p(e,"class",s),(!l||d&131)&&ne(e,"active",c[0])},i(c){l||(E(u,c),E(f),l=!0)},o(c){P(u,c),P(f),l=!1},d(c){c&&w(e),u&&u.d(c),f&&f.d(),n[21](null),o=!1,Pe(r)}}}function VS(n,e,t){let{$$slots:i={},$$scope:s}=e;const l=It();let o,r,{class:a=""}=e,{draggable:u=!1}=e,{active:f=!1}=e,{interactive:c=!0}=e,{single:d=!1}=e,h=!1;function m(){y(),t(0,f=!0),l("expand")}function g(){t(0,f=!1),clearTimeout(r),l("collapse")}function b(){l("toggle"),f?g():m()}function y(){if(d&&o.closest(".accordions")){const I=o.closest(".accordions").querySelectorAll(".accordion.active .accordion-header.interactive");for(const L of I)L.click()}}cn(()=>()=>clearTimeout(r));function k(I){Ve.call(this,n,I)}const $=()=>c&&b(),C=I=>{u&&(t(7,h=!1),y(),l("drop",I))},M=I=>u&&l("dragstart",I),T=I=>{u&&(t(7,h=!0),l("dragenter",I))},D=I=>{u&&(t(7,h=!1),l("dragleave",I))};function A(I){le[I?"unshift":"push"](()=>{o=I,t(6,o)})}return n.$$set=I=>{"class"in I&&t(1,a=I.class),"draggable"in I&&t(2,u=I.draggable),"active"in I&&t(0,f=I.active),"interactive"in I&&t(3,c=I.interactive),"single"in I&&t(9,d=I.single),"$$scope"in I&&t(13,s=I.$$scope)},n.$$.update=()=>{n.$$.dirty&4161&&f&&(clearTimeout(r),t(12,r=setTimeout(()=>{o!=null&&o.scrollIntoViewIfNeeded?o==null||o.scrollIntoViewIfNeeded():o!=null&&o.scrollIntoView&&(o==null||o.scrollIntoView({behavior:"smooth",block:"nearest"}))},200)))},[f,a,u,c,b,y,o,h,l,d,m,g,r,s,i,k,$,C,M,T,D,A]}class vs extends ke{constructor(e){super(),ye(this,e,VS,qS,be,{class:1,draggable:2,active:0,interactive:3,single:9,expand:10,collapse:11,toggle:4,collapseSiblings:5})}get expand(){return this.$$.ctx[10]}get collapse(){return this.$$.ctx[11]}get toggle(){return this.$$.ctx[4]}get collapseSiblings(){return this.$$.ctx[5]}}const zS=n=>({}),Sc=n=>({});function $c(n,e,t){const i=n.slice();return i[45]=e[t],i}const BS=n=>({}),Cc=n=>({});function Tc(n,e,t){const i=n.slice();return i[45]=e[t],i}function Mc(n){let e,t,i;return{c(){e=v("div"),t=B(n[2]),i=O(),p(e,"class","block txt-placeholder"),ne(e,"link-hint",!n[5])},m(s,l){S(s,e,l),_(e,t),_(e,i)},p(s,l){l[0]&4&&re(t,s[2]),l[0]&32&&ne(e,"link-hint",!s[5])},d(s){s&&w(e)}}}function US(n){let e,t=n[45]+"",i;return{c(){e=v("span"),i=B(t),p(e,"class","txt")},m(s,l){S(s,e,l),_(e,i)},p(s,l){l[0]&1&&t!==(t=s[45]+"")&&re(i,t)},i:ee,o:ee,d(s){s&&w(e)}}}function WS(n){let e,t,i;const s=[{item:n[45]},n[8]];var l=n[7];function o(r){let a={};for(let u=0;u{H(f,1)}),he()}l?(e=jt(l,o()),j(e.$$.fragment),E(e.$$.fragment,1),R(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&E(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&H(e,r)}}}function Oc(n){let e,t,i;function s(){return n[33](n[45])}return{c(){e=v("span"),e.innerHTML='',p(e,"class","clear")},m(l,o){S(l,e,o),t||(i=[Ee(Ue.call(null,e,"Clear")),K(e,"click",Yn(ut(s)))],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,Pe(i)}}}function Dc(n){let e,t,i,s,l,o;const r=[WS,US],a=[];function u(c,d){return c[7]?0:1}t=u(n),i=a[t]=r[t](n);let f=(n[4]||n[6])&&Oc(n);return{c(){e=v("div"),i.c(),s=O(),f&&f.c(),l=O(),p(e,"class","option")},m(c,d){S(c,e,d),a[t].m(e,null),_(e,s),f&&f.m(e,null),_(e,l),o=!0},p(c,d){let h=t;t=u(c),t===h?a[t].p(c,d):(pe(),P(a[h],1,1,()=>{a[h]=null}),he(),i=a[t],i?i.p(c,d):(i=a[t]=r[t](c),i.c()),E(i,1),i.m(e,s)),c[4]||c[6]?f?f.p(c,d):(f=Oc(c),f.c(),f.m(e,l)):f&&(f.d(1),f=null)},i(c){o||(E(i),o=!0)},o(c){P(i),o=!1},d(c){c&&w(e),a[t].d(),f&&f.d()}}}function Ac(n){let e,t,i={class:"dropdown dropdown-block options-dropdown dropdown-left",trigger:n[17],$$slots:{default:[JS]},$$scope:{ctx:n}};return e=new Zn({props:i}),n[38](e),e.$on("show",n[23]),e.$on("hide",n[39]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,l){const o={};l[0]&131072&&(o.trigger=s[17]),l[0]&806410|l[1]&1024&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[38](null),H(e,s)}}}function Ec(n){let e,t,i,s,l,o,r,a,u=n[14].length&&Ic(n);return{c(){e=v("div"),t=v("label"),i=v("div"),i.innerHTML='',s=O(),l=v("input"),o=O(),u&&u.c(),p(i,"class","addon p-r-0"),l.autofocus=!0,p(l,"type","text"),p(l,"placeholder",n[3]),p(t,"class","input-group"),p(e,"class","form-field form-field-sm options-search")},m(f,c){S(f,e,c),_(e,t),_(t,i),_(t,s),_(t,l),ce(l,n[14]),_(t,o),u&&u.m(t,null),l.focus(),r||(a=K(l,"input",n[35]),r=!0)},p(f,c){c[0]&8&&p(l,"placeholder",f[3]),c[0]&16384&&l.value!==f[14]&&ce(l,f[14]),f[14].length?u?u.p(f,c):(u=Ic(f),u.c(),u.m(t,null)):u&&(u.d(1),u=null)},d(f){f&&w(e),u&&u.d(),r=!1,a()}}}function Ic(n){let e,t,i,s;return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","btn btn-sm btn-circle btn-secondary clear"),p(e,"class","addon suffix p-r-5")},m(l,o){S(l,e,o),_(e,t),i||(s=K(t,"click",Yn(ut(n[20]))),i=!0)},p:ee,d(l){l&&w(e),i=!1,s()}}}function Pc(n){let e,t=n[1]&&Lc(n);return{c(){t&&t.c(),e=Ae()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[1]?t?t.p(i,s):(t=Lc(i),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function Lc(n){let e,t;return{c(){e=v("div"),t=B(n[1]),p(e,"class","txt-missing")},m(i,s){S(i,e,s),_(e,t)},p(i,s){s[0]&2&&re(t,i[1])},d(i){i&&w(e)}}}function YS(n){let e=n[45]+"",t;return{c(){t=B(e)},m(i,s){S(i,t,s)},p(i,s){s[0]&524288&&e!==(e=i[45]+"")&&re(t,e)},i:ee,o:ee,d(i){i&&w(t)}}}function KS(n){let e,t,i;const s=[{item:n[45]},n[10]];var l=n[9];function o(r){let a={};for(let u=0;u{H(f,1)}),he()}l?(e=jt(l,o()),j(e.$$.fragment),E(e.$$.fragment,1),R(e,t.parentNode,t)):e=null}else l&&e.$set(u)},i(r){i||(e&&E(e.$$.fragment,r),i=!0)},o(r){e&&P(e.$$.fragment,r),i=!1},d(r){r&&w(t),e&&H(e,r)}}}function Nc(n){let e,t,i,s,l,o,r;const a=[KS,YS],u=[];function f(h,m){return h[9]?0:1}t=f(n),i=u[t]=a[t](n);function c(...h){return n[36](n[45],...h)}function d(...h){return n[37](n[45],...h)}return{c(){e=v("div"),i.c(),s=O(),p(e,"tabindex","0"),p(e,"class","dropdown-item option closable"),ne(e,"selected",n[18](n[45]))},m(h,m){S(h,e,m),u[t].m(e,null),_(e,s),l=!0,o||(r=[K(e,"click",c),K(e,"keydown",d)],o=!0)},p(h,m){n=h;let g=t;t=f(n),t===g?u[t].p(n,m):(pe(),P(u[g],1,1,()=>{u[g]=null}),he(),i=u[t],i?i.p(n,m):(i=u[t]=a[t](n),i.c()),E(i,1),i.m(e,s)),(!l||m[0]&786432)&&ne(e,"selected",n[18](n[45]))},i(h){l||(E(i),l=!0)},o(h){P(i),l=!1},d(h){h&&w(e),u[t].d(),o=!1,Pe(r)}}}function JS(n){let e,t,i,s,l,o=n[11]&&Ec(n);const r=n[32].beforeOptions,a=Ot(r,n,n[41],Cc);let u=n[19],f=[];for(let g=0;gP(f[g],1,1,()=>{f[g]=null});let d=null;u.length||(d=Pc(n));const h=n[32].afterOptions,m=Ot(h,n,n[41],Sc);return{c(){o&&o.c(),e=O(),a&&a.c(),t=O(),i=v("div");for(let g=0;gP(a[d],1,1,()=>{a[d]=null});let f=null;r.length||(f=Mc(n));let c=!n[5]&&Ac(n);return{c(){e=v("div"),t=v("div");for(let d=0;d{c=null}),he()):c?(c.p(d,h),h[0]&32&&E(c,1)):(c=Ac(d),c.c(),E(c,1),c.m(e,null)),(!o||h[0]&4096&&l!==(l="select "+d[12]))&&p(e,"class",l),(!o||h[0]&4112)&&ne(e,"multiple",d[4]),(!o||h[0]&4128)&&ne(e,"disabled",d[5])},i(d){if(!o){for(let h=0;hZ(Ce,fe))||[]}function x(se,fe){se.preventDefault(),g&&d?z(fe):q(fe)}function U(se,fe){(se.code==="Enter"||se.code==="Space")&&x(se,fe)}function ae(){X(),setTimeout(()=>{const se=I==null?void 0:I.querySelector(".dropdown-item.option.selected");se&&(se.focus(),se.scrollIntoView({block:"nearest"}))},0)}function Re(se){se.stopPropagation(),!h&&(D==null||D.toggle())}cn(()=>{const se=document.querySelectorAll(`label[for="${r}"]`);for(const fe of se)fe.addEventListener("click",Re);return()=>{for(const fe of se)fe.removeEventListener("click",Re)}});const Ne=se=>F(se);function Le(se){le[se?"unshift":"push"](()=>{L=se,t(17,L)})}function Fe(){A=this.value,t(14,A)}const me=(se,fe)=>x(fe,se),Se=(se,fe)=>U(fe,se);function we(se){le[se?"unshift":"push"](()=>{D=se,t(15,D)})}function We(se){Ve.call(this,n,se)}function ue(se){le[se?"unshift":"push"](()=>{I=se,t(16,I)})}return n.$$set=se=>{"id"in se&&t(24,r=se.id),"noOptionsText"in se&&t(1,a=se.noOptionsText),"selectPlaceholder"in se&&t(2,u=se.selectPlaceholder),"searchPlaceholder"in se&&t(3,f=se.searchPlaceholder),"items"in se&&t(25,c=se.items),"multiple"in se&&t(4,d=se.multiple),"disabled"in se&&t(5,h=se.disabled),"selected"in se&&t(0,m=se.selected),"toggle"in se&&t(6,g=se.toggle),"labelComponent"in se&&t(7,b=se.labelComponent),"labelComponentProps"in se&&t(8,y=se.labelComponentProps),"optionComponent"in se&&t(9,k=se.optionComponent),"optionComponentProps"in se&&t(10,$=se.optionComponentProps),"searchable"in se&&t(11,C=se.searchable),"searchFunc"in se&&t(26,M=se.searchFunc),"class"in se&&t(12,T=se.class),"$$scope"in se&&t(41,o=se.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&33554432&&c&&(Q(),X()),n.$$.dirty[0]&33570816&&t(19,i=Y(c,A)),n.$$.dirty[0]&1&&t(18,s=function(se){const fe=W.toArray(m);return W.inArray(fe,se)})},[m,a,u,f,d,h,g,b,y,k,$,C,T,F,A,D,I,L,s,i,X,x,U,ae,r,c,M,q,z,J,G,ie,l,Ne,Le,Fe,me,Se,we,We,ue,o]}class R_ extends ke{constructor(e){super(),ye(this,e,XS,ZS,be,{id:24,noOptionsText:1,selectPlaceholder:2,searchPlaceholder:3,items:25,multiple:4,disabled:5,selected:0,toggle:6,labelComponent:7,labelComponentProps:8,optionComponent:9,optionComponentProps:10,searchable:11,searchFunc:26,class:12,deselectItem:13,selectItem:27,toggleItem:28,reset:29,showDropdown:30,hideDropdown:31},null,[-1,-1])}get deselectItem(){return this.$$.ctx[13]}get selectItem(){return this.$$.ctx[27]}get toggleItem(){return this.$$.ctx[28]}get reset(){return this.$$.ctx[29]}get showDropdown(){return this.$$.ctx[30]}get hideDropdown(){return this.$$.ctx[31]}}function Fc(n){let e,t;return{c(){e=v("i"),p(e,"class",t="icon "+n[0].icon)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t="icon "+i[0].icon)&&p(e,"class",t)},d(i){i&&w(e)}}}function QS(n){let e,t,i=(n[0].label||n[0].name||n[0].title||n[0].id||n[0].value)+"",s,l=n[0].icon&&Fc(n);return{c(){l&&l.c(),e=O(),t=v("span"),s=B(i),p(t,"class","txt")},m(o,r){l&&l.m(o,r),S(o,e,r),S(o,t,r),_(t,s)},p(o,[r]){o[0].icon?l?l.p(o,r):(l=Fc(o),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null),r&1&&i!==(i=(o[0].label||o[0].name||o[0].title||o[0].id||o[0].value)+"")&&re(s,i)},i:ee,o:ee,d(o){l&&l.d(o),o&&w(e),o&&w(t)}}}function xS(n,e,t){let{item:i={}}=e;return n.$$set=s=>{"item"in s&&t(0,i=s.item)},[i]}class Rc extends ke{constructor(e){super(),ye(this,e,xS,QS,be,{item:0})}}const e$=n=>({}),Hc=n=>({});function t$(n){let e;const t=n[8].afterOptions,i=Ot(t,n,n[12],Hc);return{c(){i&&i.c()},m(s,l){i&&i.m(s,l),e=!0},p(s,l){i&&i.p&&(!e||l&4096)&&At(i,t,s,s[12],e?Dt(t,s[12],l,e$):Et(s[12]),Hc)},i(s){e||(E(i,s),e=!0)},o(s){P(i,s),e=!1},d(s){i&&i.d(s)}}}function n$(n){let e,t,i;const s=[{items:n[1]},{multiple:n[2]},{labelComponent:n[3]},{optionComponent:n[4]},n[5]];function l(r){n[9](r)}let o={$$slots:{afterOptions:[t$]},$$scope:{ctx:n}};for(let r=0;r_e(e,"selected",l)),e.$on("show",n[10]),e.$on("hide",n[11]),{c(){j(e.$$.fragment)},m(r,a){R(e,r,a),i=!0},p(r,[a]){const u=a&62?Zt(s,[a&2&&{items:r[1]},a&4&&{multiple:r[2]},a&8&&{labelComponent:r[3]},a&16&&{optionComponent:r[4]},a&32&&Kn(r[5])]):{};a&4096&&(u.$$scope={dirty:a,ctx:r}),!t&&a&1&&(t=!0,u.selected=r[0],ve(()=>t=!1)),e.$set(u)},i(r){i||(E(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function i$(n,e,t){const i=["items","multiple","selected","labelComponent","optionComponent","selectionKey","keyOfSelected"];let s=wt(e,i),{$$slots:l={},$$scope:o}=e,{items:r=[]}=e,{multiple:a=!1}=e,{selected:u=a?[]:void 0}=e,{labelComponent:f=Rc}=e,{optionComponent:c=Rc}=e,{selectionKey:d="value"}=e,{keyOfSelected:h=a?[]:void 0}=e;function m($){$=W.toArray($,!0);let C=[];for(let M of $){const T=W.findByKey(r,d,M);T&&C.push(T)}$.length&&!C.length||t(0,u=a?C:C[0])}async function g($){let C=W.toArray($,!0).map(M=>M[d]);!r.length||t(6,h=a?C:C[0])}function b($){u=$,t(0,u)}function y($){Ve.call(this,n,$)}function k($){Ve.call(this,n,$)}return n.$$set=$=>{e=Ke(Ke({},e),Wn($)),t(5,s=wt(e,i)),"items"in $&&t(1,r=$.items),"multiple"in $&&t(2,a=$.multiple),"selected"in $&&t(0,u=$.selected),"labelComponent"in $&&t(3,f=$.labelComponent),"optionComponent"in $&&t(4,c=$.optionComponent),"selectionKey"in $&&t(7,d=$.selectionKey),"keyOfSelected"in $&&t(6,h=$.keyOfSelected),"$$scope"in $&&t(12,o=$.$$scope)},n.$$.update=()=>{n.$$.dirty&66&&r&&m(h),n.$$.dirty&1&&g(u)},[u,r,a,f,c,s,h,d,l,b,y,k,o]}class xi extends ke{constructor(e){super(),ye(this,e,i$,n$,be,{items:1,multiple:2,selected:0,labelComponent:3,optionComponent:4,selectionKey:7,keyOfSelected:6})}}function s$(n){let e,t,i;const s=[{class:"field-type-select "+n[1]},{items:n[2]},n[3]];function l(r){n[4](r)}let o={};for(let r=0;r_e(e,"keyOfSelected",l)),{c(){j(e.$$.fragment)},m(r,a){R(e,r,a),i=!0},p(r,[a]){const u=a&14?Zt(s,[a&2&&{class:"field-type-select "+r[1]},a&4&&{items:r[2]},a&8&&Kn(r[3])]):{};!t&&a&1&&(t=!0,u.keyOfSelected=r[0],ve(()=>t=!1)),e.$set(u)},i(r){i||(E(e.$$.fragment,r),i=!0)},o(r){P(e.$$.fragment,r),i=!1},d(r){H(e,r)}}}function l$(n,e,t){const i=["value","class"];let s=wt(e,i),{value:l="text"}=e,{class:o=""}=e;const r=[{label:"Text",value:"text",icon:W.getFieldTypeIcon("text")},{label:"Number",value:"number",icon:W.getFieldTypeIcon("number")},{label:"Bool",value:"bool",icon:W.getFieldTypeIcon("bool")},{label:"Email",value:"email",icon:W.getFieldTypeIcon("email")},{label:"Url",value:"url",icon:W.getFieldTypeIcon("url")},{label:"DateTime",value:"date",icon:W.getFieldTypeIcon("date")},{label:"Select",value:"select",icon:W.getFieldTypeIcon("select")},{label:"JSON",value:"json",icon:W.getFieldTypeIcon("json")},{label:"File",value:"file",icon:W.getFieldTypeIcon("file")},{label:"Relation",value:"relation",icon:W.getFieldTypeIcon("relation")}];function a(u){l=u,t(0,l)}return n.$$set=u=>{e=Ke(Ke({},e),Wn(u)),t(3,s=wt(e,i)),"value"in u&&t(0,l=u.value),"class"in u&&t(1,o=u.class)},[l,o,r,s,a]}class o$ extends ke{constructor(e){super(),ye(this,e,l$,s$,be,{value:0,class:1})}}function r$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Min length"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",o=n[5]),p(l,"step","1"),p(l,"min","0")},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].min),r||(a=K(l,"input",n[2]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].min&&ce(l,u[0].min)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function a$(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=B("Max length"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",o=n[5]),p(l,"step","1"),p(l,"min",r=n[0].min||0)},m(f,c){S(f,e,c),_(e,t),S(f,s,c),S(f,l,c),ce(l,n[0].max),a||(u=K(l,"input",n[3]),a=!0)},p(f,c){c&32&&i!==(i=f[5])&&p(e,"for",i),c&32&&o!==(o=f[5])&&p(l,"id",o),c&1&&r!==(r=f[0].min||0)&&p(l,"min",r),c&1&&rt(l.value)!==f[0].max&&ce(l,f[0].max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function u$(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Regex pattern"),s=O(),l=v("input"),r=O(),a=v("div"),a.innerHTML="Valid Go regular expression, eg. ^\\w+$.",p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5]),p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),ce(l,n[0].pattern),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[4]),u=!0)},p(c,d){d&32&&i!==(i=c[5])&&p(e,"for",i),d&32&&o!==(o=c[5])&&p(l,"id",o),d&1&&l.value!==c[0].pattern&&ce(l,c[0].pattern)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function f$(n){let e,t,i,s,l,o,r,a,u,f;return i=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[r$,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[a$,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),u=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.pattern",$$slots:{default:[u$,({uniqueId:c})=>({5:c}),({uniqueId:c})=>c?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(a,"class","col-sm-12"),p(e,"class","grid")},m(c,d){S(c,e,d),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),R(u,a,null),f=!0},p(c,[d]){const h={};d&2&&(h.name="schema."+c[1]+".options.min"),d&97&&(h.$$scope={dirty:d,ctx:c}),i.$set(h);const m={};d&2&&(m.name="schema."+c[1]+".options.max"),d&97&&(m.$$scope={dirty:d,ctx:c}),o.$set(m);const g={};d&2&&(g.name="schema."+c[1]+".options.pattern"),d&97&&(g.$$scope={dirty:d,ctx:c}),u.$set(g)},i(c){f||(E(i.$$.fragment,c),E(o.$$.fragment,c),E(u.$$.fragment,c),f=!0)},o(c){P(i.$$.fragment,c),P(o.$$.fragment,c),P(u.$$.fragment,c),f=!1},d(c){c&&w(e),H(i),H(o),H(u)}}}function c$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.min=rt(this.value),t(0,s)}function o(){s.max=rt(this.value),t(0,s)}function r(){s.pattern=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"options"in a&&t(0,s=a.options)},[s,i,l,o,r]}class d$ extends ke{constructor(e){super(),ye(this,e,c$,f$,be,{key:1,options:0})}}function p$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Min"),s=O(),l=v("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",o=n[4])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].min),r||(a=K(l,"input",n[2]),r=!0)},p(u,f){f&16&&i!==(i=u[4])&&p(e,"for",i),f&16&&o!==(o=u[4])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].min&&ce(l,u[0].min)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function h$(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("label"),t=B("Max"),s=O(),l=v("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",o=n[4]),p(l,"min",r=n[0].min)},m(f,c){S(f,e,c),_(e,t),S(f,s,c),S(f,l,c),ce(l,n[0].max),a||(u=K(l,"input",n[3]),a=!0)},p(f,c){c&16&&i!==(i=f[4])&&p(e,"for",i),c&16&&o!==(o=f[4])&&p(l,"id",o),c&1&&r!==(r=f[0].min)&&p(l,"min",r),c&1&&rt(l.value)!==f[0].max&&ce(l,f[0].max)},d(f){f&&w(e),f&&w(s),f&&w(l),a=!1,u()}}}function m$(n){let e,t,i,s,l,o,r;return i=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[p$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[h$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.max"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(E(i.$$.fragment,a),E(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function g$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.min=rt(this.value),t(0,s)}function o(){s.max=rt(this.value),t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class _$ extends ke{constructor(e){super(),ye(this,e,g$,m$,be,{key:1,options:0})}}function b$(n,e,t){let{key:i=""}=e,{options:s={}}=e;return n.$$set=l=>{"key"in l&&t(0,i=l.key),"options"in l&&t(1,s=l.options)},[i,s]}class v$ extends ke{constructor(e){super(),ye(this,e,b$,null,be,{key:0,options:1})}}function y$(n){let e,t,i,s,l=[{type:t=n[3].type||"text"},{value:n[2]},n[3]],o={};for(let r=0;r{t(0,o=W.splitNonEmpty(u.target.value,r))};return n.$$set=u=>{e=Ke(Ke({},e),Wn(u)),t(3,l=wt(e,s)),"value"in u&&t(0,o=u.value),"separator"in u&&t(1,r=u.separator)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=(o||[]).join(", "))},[o,r,i,l,a]}class es extends ke{constructor(e){super(),ye(this,e,k$,y$,be,{value:0,separator:1})}}function w$(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function m(b){n[2](b)}let g={id:n[4],disabled:!W.isEmpty(n[0].onlyDomains)};return n[0].exceptDomains!==void 0&&(g.value=n[0].exceptDomains),r=new es({props:g}),le.push(()=>_e(r,"value",m)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=O(),s=v("i"),o=O(),j(r.$$.fragment),u=O(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[4]),p(f,"class","help-block")},m(b,y){S(b,e,y),_(e,t),_(e,i),_(e,s),S(b,o,y),R(r,b,y),S(b,u,y),S(b,f,y),c=!0,d||(h=Ee(Ue.call(null,s,{text:`List of domains that are NOT allowed. + This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&16&&l!==(l=b[4]))&&p(e,"for",l);const k={};y&16&&(k.id=b[4]),y&1&&(k.disabled=!W.isEmpty(b[0].onlyDomains)),!a&&y&1&&(a=!0,k.value=b[0].exceptDomains,ve(()=>a=!1)),r.$set(k)},i(b){c||(E(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&w(e),b&&w(o),H(r,b),b&&w(u),b&&w(f),d=!1,h()}}}function S$(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function m(b){n[3](b)}let g={id:n[4]+".options.onlyDomains",disabled:!W.isEmpty(n[0].exceptDomains)};return n[0].onlyDomains!==void 0&&(g.value=n[0].onlyDomains),r=new es({props:g}),le.push(()=>_e(r,"value",m)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=O(),s=v("i"),o=O(),j(r.$$.fragment),u=O(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[4]+".options.onlyDomains"),p(f,"class","help-block")},m(b,y){S(b,e,y),_(e,t),_(e,i),_(e,s),S(b,o,y),R(r,b,y),S(b,u,y),S(b,f,y),c=!0,d||(h=Ee(Ue.call(null,s,{text:`List of domains that are ONLY allowed. + This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&16&&l!==(l=b[4]+".options.onlyDomains"))&&p(e,"for",l);const k={};y&16&&(k.id=b[4]+".options.onlyDomains"),y&1&&(k.disabled=!W.isEmpty(b[0].exceptDomains)),!a&&y&1&&(a=!0,k.value=b[0].onlyDomains,ve(()=>a=!1)),r.$set(k)},i(b){c||(E(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&w(e),b&&w(o),H(r,b),b&&w(u),b&&w(f),d=!1,h()}}}function $$(n){let e,t,i,s,l,o,r;return i=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.exceptDomains",$$slots:{default:[w$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.onlyDomains",$$slots:{default:[S$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.exceptDomains"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.onlyDomains"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(E(i.$$.fragment,a),E(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function C$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.exceptDomains,r)&&(s.exceptDomains=r,t(0,s))}function o(r){n.$$.not_equal(s.onlyDomains,r)&&(s.onlyDomains=r,t(0,s))}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class H_ extends ke{constructor(e){super(),ye(this,e,C$,$$,be,{key:1,options:0})}}function T$(n){let e,t,i,s;function l(a){n[2](a)}function o(a){n[3](a)}let r={};return n[0]!==void 0&&(r.key=n[0]),n[1]!==void 0&&(r.options=n[1]),e=new H_({props:r}),le.push(()=>_e(e,"key",l)),le.push(()=>_e(e,"options",o)),{c(){j(e.$$.fragment)},m(a,u){R(e,a,u),s=!0},p(a,[u]){const f={};!t&&u&1&&(t=!0,f.key=a[0],ve(()=>t=!1)),!i&&u&2&&(i=!0,f.options=a[1],ve(()=>i=!1)),e.$set(f)},i(a){s||(E(e.$$.fragment,a),s=!0)},o(a){P(e.$$.fragment,a),s=!1},d(a){H(e,a)}}}function M$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){i=r,t(0,i)}function o(r){s=r,t(1,s)}return n.$$set=r=>{"key"in r&&t(0,i=r.key),"options"in r&&t(1,s=r.options)},[i,s,l,o]}class O$ extends ke{constructor(e){super(),ye(this,e,M$,T$,be,{key:0,options:1})}}var yr=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],ys={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console<"u"&&console.warn(n)},getWeek:function(n){var e=new Date(n.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},_l={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var e=n%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},Qt=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},_n=function(n){return n===!0?1:0};function jc(n,e){var t;return function(){var i=this,s=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(i,s)},e)}}var kr=function(n){return n instanceof Array?n:[n]};function Bt(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function nt(n,e,t){var i=window.document.createElement(n);return e=e||"",t=t||"",i.className=e,t!==void 0&&(i.textContent=t),i}function so(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function j_(n,e){if(e(n))return n;if(n.parentNode)return j_(n.parentNode,e)}function lo(n,e){var t=nt("div","numInputWrapper"),i=nt("input","numInput "+n),s=nt("span","arrowUp"),l=nt("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?i.type="number":(i.type="text",i.pattern="\\d*"),e!==void 0)for(var o in e)i.setAttribute(o,e[o]);return t.appendChild(i),t.appendChild(s),t.appendChild(l),t}function on(n){try{if(typeof n.composedPath=="function"){var e=n.composedPath();return e[0]}return n.target}catch{return n.target}}var wr=function(){},Lo=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},D$={D:wr,F:function(n,e,t){n.setMonth(t.months.longhand.indexOf(e))},G:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},H:function(n,e){n.setHours(parseFloat(e))},J:function(n,e){n.setDate(parseFloat(e))},K:function(n,e,t){n.setHours(n.getHours()%12+12*_n(new RegExp(t.amPM[1],"i").test(e)))},M:function(n,e,t){n.setMonth(t.months.shorthand.indexOf(e))},S:function(n,e){n.setSeconds(parseFloat(e))},U:function(n,e){return new Date(parseFloat(e)*1e3)},W:function(n,e,t){var i=parseInt(e),s=new Date(n.getFullYear(),0,2+(i-1)*7,0,0,0,0);return s.setDate(s.getDate()-s.getDay()+t.firstDayOfWeek),s},Y:function(n,e){n.setFullYear(parseFloat(e))},Z:function(n,e){return new Date(e)},d:function(n,e){n.setDate(parseFloat(e))},h:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},i:function(n,e){n.setMinutes(parseFloat(e))},j:function(n,e){n.setDate(parseFloat(e))},l:wr,m:function(n,e){n.setMonth(parseFloat(e)-1)},n:function(n,e){n.setMonth(parseFloat(e)-1)},s:function(n,e){n.setSeconds(parseFloat(e))},u:function(n,e){return new Date(parseFloat(e))},w:wr,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},ji={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},ol={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[ol.w(n,e,t)]},F:function(n,e,t){return Lo(ol.n(n,e,t)-1,!1,e)},G:function(n,e,t){return Qt(ol.h(n,e,t))},H:function(n){return Qt(n.getHours())},J:function(n,e){return e.ordinal!==void 0?n.getDate()+e.ordinal(n.getDate()):n.getDate()},K:function(n,e){return e.amPM[_n(n.getHours()>11)]},M:function(n,e){return Lo(n.getMonth(),!0,e)},S:function(n){return Qt(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return Qt(n.getFullYear(),4)},d:function(n){return Qt(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return Qt(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return Qt(n.getMonth()+1)},n:function(n){return n.getMonth()+1},s:function(n){return n.getSeconds()},u:function(n){return n.getTime()},w:function(n){return n.getDay()},y:function(n){return String(n.getFullYear()).substring(2)}},q_=function(n){var e=n.config,t=e===void 0?ys:e,i=n.l10n,s=i===void 0?_l:i,l=n.isMobile,o=l===void 0?!1:l;return function(r,a,u){var f=u||s;return t.formatDate!==void 0&&!o?t.formatDate(r,a,f):a.split("").map(function(c,d,h){return ol[c]&&h[d-1]!=="\\"?ol[c](r,f,t):c!=="\\"?c:""}).join("")}},sa=function(n){var e=n.config,t=e===void 0?ys:e,i=n.l10n,s=i===void 0?_l:i;return function(l,o,r,a){if(!(l!==0&&!l)){var u=a||s,f,c=l;if(l instanceof Date)f=new Date(l.getTime());else if(typeof l!="string"&&l.toFixed!==void 0)f=new Date(l);else if(typeof l=="string"){var d=o||(t||ys).dateFormat,h=String(l).trim();if(h==="today")f=new Date,r=!0;else if(t&&t.parseDate)f=t.parseDate(l,d);else if(/Z$/.test(h)||/GMT$/.test(h))f=new Date(l);else{for(var m=void 0,g=[],b=0,y=0,k="";bMath.min(e,t)&&n=0?new Date:new Date(t.config.minDate.getTime()),te=$r(t.config);V.setHours(te.hours,te.minutes,te.seconds,V.getMilliseconds()),t.selectedDates=[V],t.latestSelectedDateObj=V}N!==void 0&&N.type!=="blur"&&Fl(N);var oe=t._input.value;c(),Pt(),t._input.value!==oe&&t._debouncedChange()}function u(N,V){return N%12+12*_n(V===t.l10n.amPM[1])}function f(N){switch(N%24){case 0:case 12:return 12;default:return N%12}}function c(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var N=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,V=(parseInt(t.minuteElement.value,10)||0)%60,te=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(N=u(N,t.amPM.textContent));var oe=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&rn(t.latestSelectedDateObj,t.config.minDate,!0)===0,$e=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&rn(t.latestSelectedDateObj,t.config.maxDate,!0)===0;if(t.config.maxTime!==void 0&&t.config.minTime!==void 0&&t.config.minTime>t.config.maxTime){var Oe=Sr(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),De=Sr(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),Te=Sr(N,V,te);if(Te>De&&Te=12)]),t.secondElement!==void 0&&(t.secondElement.value=Qt(te)))}function m(N){var V=on(N),te=parseInt(V.value)+(N.delta||0);(te/1e3>1||N.key==="Enter"&&!/[^\d]/.test(te.toString()))&&me(te)}function g(N,V,te,oe){if(V instanceof Array)return V.forEach(function($e){return g(N,$e,te,oe)});if(N instanceof Array)return N.forEach(function($e){return g($e,V,te,oe)});N.addEventListener(V,te,oe),t._handlers.push({remove:function(){return N.removeEventListener(V,te,oe)}})}function b(){Je("onChange")}function y(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(te){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+te+"]"),function(oe){return g(oe,"click",t[te])})}),t.isMobile){ss();return}var N=jc(fe,50);if(t._debouncedChange=jc(b,P$),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&g(t.daysContainer,"mouseover",function(te){t.config.mode==="range"&&se(on(te))}),g(t._input,"keydown",ue),t.calendarContainer!==void 0&&g(t.calendarContainer,"keydown",ue),!t.config.inline&&!t.config.static&&g(window,"resize",N),window.ontouchstart!==void 0?g(window.document,"touchstart",Fe):g(window.document,"mousedown",Fe),g(window.document,"focus",Fe,{capture:!0}),t.config.clickOpens===!0&&(g(t._input,"focus",t.open),g(t._input,"click",t.open)),t.daysContainer!==void 0&&(g(t.monthNav,"click",zt),g(t.monthNav,["keyup","increment"],m),g(t.daysContainer,"click",Ls)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var V=function(te){return on(te).select()};g(t.timeContainer,["increment"],a),g(t.timeContainer,"blur",a,{capture:!0}),g(t.timeContainer,"click",$),g([t.hourElement,t.minuteElement],["focus","click"],V),t.secondElement!==void 0&&g(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&g(t.amPM,"click",function(te){a(te)})}t.config.allowInput&&g(t._input,"blur",We)}function k(N,V){var te=N!==void 0?t.parseDate(N):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate1),t.calendarContainer.appendChild(N);var $e=t.config.appendTo!==void 0&&t.config.appendTo.nodeType!==void 0;if((t.config.inline||t.config.static)&&(t.calendarContainer.classList.add(t.config.inline?"inline":"static"),t.config.inline&&(!$e&&t.element.parentNode?t.element.parentNode.insertBefore(t.calendarContainer,t._input.nextSibling):t.config.appendTo!==void 0&&t.config.appendTo.appendChild(t.calendarContainer)),t.config.static)){var Oe=nt("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(Oe,t.element),Oe.appendChild(t.element),t.altInput&&Oe.appendChild(t.altInput),Oe.appendChild(t.calendarContainer)}!t.config.static&&!t.config.inline&&(t.config.appendTo!==void 0?t.config.appendTo:window.document.body).appendChild(t.calendarContainer)}function T(N,V,te,oe){var $e=Se(V,!0),Oe=nt("span",N,V.getDate().toString());return Oe.dateObj=V,Oe.$i=oe,Oe.setAttribute("aria-label",t.formatDate(V,t.config.ariaDateFormat)),N.indexOf("hidden")===-1&&rn(V,t.now)===0&&(t.todayDateElem=Oe,Oe.classList.add("today"),Oe.setAttribute("aria-current","date")),$e?(Oe.tabIndex=-1,Xn(V)&&(Oe.classList.add("selected"),t.selectedDateElem=Oe,t.config.mode==="range"&&(Bt(Oe,"startRange",t.selectedDates[0]&&rn(V,t.selectedDates[0],!0)===0),Bt(Oe,"endRange",t.selectedDates[1]&&rn(V,t.selectedDates[1],!0)===0),N==="nextMonthDay"&&Oe.classList.add("inRange")))):Oe.classList.add("flatpickr-disabled"),t.config.mode==="range"&&os(V)&&!Xn(V)&&Oe.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&N!=="prevMonthDay"&&oe%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend",""+t.config.getWeek(V)+""),Je("onDayCreate",Oe),Oe}function D(N){N.focus(),t.config.mode==="range"&&se(N)}function A(N){for(var V=N>0?0:t.config.showMonths-1,te=N>0?t.config.showMonths:-1,oe=V;oe!=te;oe+=N)for(var $e=t.daysContainer.children[oe],Oe=N>0?0:$e.children.length-1,De=N>0?$e.children.length:-1,Te=Oe;Te!=De;Te+=N){var ze=$e.children[Te];if(ze.className.indexOf("hidden")===-1&&Se(ze.dateObj))return ze}}function I(N,V){for(var te=N.className.indexOf("Month")===-1?N.dateObj.getMonth():t.currentMonth,oe=V>0?t.config.showMonths:-1,$e=V>0?1:-1,Oe=te-t.currentMonth;Oe!=oe;Oe+=$e)for(var De=t.daysContainer.children[Oe],Te=te-t.currentMonth===Oe?N.$i+V:V<0?De.children.length-1:0,ze=De.children.length,Ie=Te;Ie>=0&&Ie0?ze:-1);Ie+=$e){var qe=De.children[Ie];if(qe.className.indexOf("hidden")===-1&&Se(qe.dateObj)&&Math.abs(N.$i-Ie)>=Math.abs(V))return D(qe)}t.changeMonth($e),L(A($e),0)}function L(N,V){var te=l(),oe=we(te||document.body),$e=N!==void 0?N:oe?te:t.selectedDateElem!==void 0&&we(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&we(t.todayDateElem)?t.todayDateElem:A(V>0?1:-1);$e===void 0?t._input.focus():oe?I($e,V):D($e)}function F(N,V){for(var te=(new Date(N,V,1).getDay()-t.l10n.firstDayOfWeek+7)%7,oe=t.utils.getDaysInMonth((V-1+12)%12,N),$e=t.utils.getDaysInMonth(V,N),Oe=window.document.createDocumentFragment(),De=t.config.showMonths>1,Te=De?"prevMonthDay hidden":"prevMonthDay",ze=De?"nextMonthDay hidden":"nextMonthDay",Ie=oe+1-te,qe=0;Ie<=oe;Ie++,qe++)Oe.appendChild(T("flatpickr-day "+Te,new Date(N,V-1,Ie),Ie,qe));for(Ie=1;Ie<=$e;Ie++,qe++)Oe.appendChild(T("flatpickr-day",new Date(N,V,Ie),Ie,qe));for(var at=$e+1;at<=42-te&&(t.config.showMonths===1||qe%7!==0);at++,qe++)Oe.appendChild(T("flatpickr-day "+ze,new Date(N,V+1,at%$e),at,qe));var Hn=nt("div","dayContainer");return Hn.appendChild(Oe),Hn}function q(){if(t.daysContainer!==void 0){so(t.daysContainer),t.weekNumbers&&so(t.weekNumbers);for(var N=document.createDocumentFragment(),V=0;V1||t.config.monthSelectorType!=="dropdown")){var N=function(oe){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&oet.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var V=0;V<12;V++)if(!!N(V)){var te=nt("option","flatpickr-monthDropdown-month");te.value=new Date(t.currentYear,V).getMonth().toString(),te.textContent=Lo(V,t.config.shorthandCurrentMonth,t.l10n),te.tabIndex=-1,t.currentMonth===V&&(te.selected=!0),t.monthsDropdownContainer.appendChild(te)}}}function J(){var N=nt("div","flatpickr-month"),V=window.document.createDocumentFragment(),te;t.config.showMonths>1||t.config.monthSelectorType==="static"?te=nt("span","cur-month"):(t.monthsDropdownContainer=nt("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),g(t.monthsDropdownContainer,"change",function(De){var Te=on(De),ze=parseInt(Te.value,10);t.changeMonth(ze-t.currentMonth),Je("onMonthChange")}),z(),te=t.monthsDropdownContainer);var oe=lo("cur-year",{tabindex:"-1"}),$e=oe.getElementsByTagName("input")[0];$e.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&$e.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&($e.setAttribute("max",t.config.maxDate.getFullYear().toString()),$e.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var Oe=nt("div","flatpickr-current-month");return Oe.appendChild(te),Oe.appendChild(oe),V.appendChild(Oe),N.appendChild(V),{container:N,yearElement:$e,monthElement:te}}function G(){so(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var N=t.config.showMonths;N--;){var V=J();t.yearElements.push(V.yearElement),t.monthElements.push(V.monthElement),t.monthNav.appendChild(V.container)}t.monthNav.appendChild(t.nextMonthNav)}function ie(){return t.monthNav=nt("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=nt("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=nt("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,G(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(N){t.__hidePrevMonthArrow!==N&&(Bt(t.prevMonthNav,"flatpickr-disabled",N),t.__hidePrevMonthArrow=N)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(N){t.__hideNextMonthArrow!==N&&(Bt(t.nextMonthNav,"flatpickr-disabled",N),t.__hideNextMonthArrow=N)}}),t.currentYearElement=t.yearElements[0],Oi(),t.monthNav}function Q(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var N=$r(t.config);t.timeContainer=nt("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var V=nt("span","flatpickr-time-separator",":"),te=lo("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=te.getElementsByTagName("input")[0];var oe=lo("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=oe.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=Qt(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?N.hours:f(N.hours)),t.minuteElement.value=Qt(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():N.minutes),t.hourElement.setAttribute("step",t.config.hourIncrement.toString()),t.minuteElement.setAttribute("step",t.config.minuteIncrement.toString()),t.hourElement.setAttribute("min",t.config.time_24hr?"0":"1"),t.hourElement.setAttribute("max",t.config.time_24hr?"23":"12"),t.hourElement.setAttribute("maxlength","2"),t.minuteElement.setAttribute("min","0"),t.minuteElement.setAttribute("max","59"),t.minuteElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(te),t.timeContainer.appendChild(V),t.timeContainer.appendChild(oe),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var $e=lo("flatpickr-second");t.secondElement=$e.getElementsByTagName("input")[0],t.secondElement.value=Qt(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():N.seconds),t.secondElement.setAttribute("step",t.minuteElement.getAttribute("step")),t.secondElement.setAttribute("min","0"),t.secondElement.setAttribute("max","59"),t.secondElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(nt("span","flatpickr-time-separator",":")),t.timeContainer.appendChild($e)}return t.config.time_24hr||(t.amPM=nt("span","flatpickr-am-pm",t.l10n.amPM[_n((t.latestSelectedDateObj?t.hourElement.value:t.config.defaultHour)>11)]),t.amPM.title=t.l10n.toggleTitle,t.amPM.tabIndex=-1,t.timeContainer.appendChild(t.amPM)),t.timeContainer}function X(){t.weekdayContainer?so(t.weekdayContainer):t.weekdayContainer=nt("div","flatpickr-weekdays");for(var N=t.config.showMonths;N--;){var V=nt("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(V)}return Y(),t.weekdayContainer}function Y(){if(!!t.weekdayContainer){var N=t.l10n.firstDayOfWeek,V=qc(t.l10n.weekdays.shorthand);N>0&&N `+V.join("")+` - `}}function x(){t.calendarContainer.classList.add("hasWeeks");var N=nt("div","flatpickr-weekwrapper");N.appendChild(nt("span","flatpickr-weekday",t.l10n.weekAbbreviation));var V=nt("div","flatpickr-weeks");return N.appendChild(V),{weekWrapper:N,weekNumbers:V}}function U(N,V){V===void 0&&(V=!0);var ee=V?N:N-t.currentMonth;ee<0&&t._hidePrevMonthArrow===!0||ee>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=ee,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Je("onYearChange"),z()),q(),Je("onMonthChange"),Oi())}function re(N,V){if(N===void 0&&(N=!0),V===void 0&&(V=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,V===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var ee=Sr(t.config),oe=ee.hours,$e=ee.minutes,Oe=ee.seconds;h(oe,$e,Oe)}t.redraw(),N&&Je("onChange")}function Re(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),Je("onClose")}function Ne(){t.config!==void 0&&Je("onDestroy");for(var N=t._handlers.length;N--;)t._handlers[N].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var V=t.calendarContainer.parentNode;if(V.lastChild&&V.removeChild(V.lastChild),V.parentNode){for(;V.firstChild;)V.parentNode.insertBefore(V.firstChild,V);V.parentNode.removeChild(V)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(ee){try{delete t[ee]}catch{}})}function Le(N){return t.calendarContainer.contains(N)}function Fe(N){if(t.isOpen&&!t.config.inline){var V=on(N),ee=Le(V),oe=V===t.input||V===t.altInput||t.element.contains(V)||N.path&&N.path.indexOf&&(~N.path.indexOf(t.input)||~N.path.indexOf(t.altInput)),$e=!oe&&!ee&&!Le(N.relatedTarget),Oe=!t.config.ignoredFocusElements.some(function(De){return De.contains(V)});$e&&Oe&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&a(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function me(N){if(!(!N||t.config.minDate&&Nt.config.maxDate.getFullYear())){var V=N,ee=t.currentYear!==V;t.currentYear=V||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),ee&&(t.redraw(),Je("onYearChange"),z())}}function Se(N,V){var ee;V===void 0&&(V=!0);var oe=t.parseDate(N,void 0,V);if(t.config.minDate&&oe&&rn(oe,t.config.minDate,V!==void 0?V:!t.minDateHasTime)<0||t.config.maxDate&&oe&&rn(oe,t.config.maxDate,V!==void 0?V:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(oe===void 0)return!1;for(var $e=!!t.config.enable,Oe=(ee=t.config.enable)!==null&&ee!==void 0?ee:t.config.disable,De=0,Te=void 0;De=Te.from.getTime()&&oe.getTime()<=Te.to.getTime())return $e}return!$e}function we(N){return t.daysContainer!==void 0?N.className.indexOf("hidden")===-1&&N.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(N):!1}function We(N){var V=N.target===t._input,ee=t._input.value.trimEnd()!==Di();V&&ee&&!(N.relatedTarget&&Le(N.relatedTarget))&&t.setDate(t._input.value,!0,N.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function ue(N){var V=on(N),ee=t.config.wrap?n.contains(V):V===t._input,oe=t.config.allowInput,$e=t.isOpen&&(!oe||!ee),Oe=t.config.inline&&ee&&!oe;if(N.keyCode===13&&ee){if(oe)return t.setDate(t._input.value,!0,V===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),V.blur();t.open()}else if(Le(V)||$e||Oe){var De=!!t.timeContainer&&t.timeContainer.contains(V);switch(N.keyCode){case 13:De?(N.preventDefault(),a(),ri()):Ps(N);break;case 27:N.preventDefault(),ri();break;case 8:case 46:ee&&!t.config.allowInput&&(N.preventDefault(),t.clear());break;case 37:case 39:if(!De&&!ee){N.preventDefault();var Te=l();if(t.daysContainer!==void 0&&(oe===!1||Te&&we(Te))){var ze=N.keyCode===39?1:-1;N.ctrlKey?(N.stopPropagation(),U(ze),L(A(1),0)):L(void 0,ze)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:N.preventDefault();var Ie=N.keyCode===40?1:-1;t.daysContainer&&V.$i!==void 0||V===t.input||V===t.altInput?N.ctrlKey?(N.stopPropagation(),me(t.currentYear-Ie),L(A(1),0)):De||L(void 0,Ie*7):V===t.currentYearElement?me(t.currentYear-Ie):t.config.enableTime&&(!De&&t.hourElement&&t.hourElement.focus(),a(N),t._debouncedChange());break;case 9:if(De){var qe=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(ln){return ln}),at=qe.indexOf(V);if(at!==-1){var Hn=qe[at+(N.shiftKey?-1:1)];N.preventDefault(),(Hn||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(V)&&N.shiftKey&&(N.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&V===t.amPM)switch(N.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],c(),Pt();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],c(),Pt();break}(ee||Le(V))&&Je("onKeyDown",N)}function se(N,V){if(V===void 0&&(V="flatpickr-day"),!(t.selectedDates.length!==1||N&&(!N.classList.contains(V)||N.classList.contains("flatpickr-disabled")))){for(var ee=N?N.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),oe=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),$e=Math.min(ee,t.selectedDates[0].getTime()),Oe=Math.max(ee,t.selectedDates[0].getTime()),De=!1,Te=0,ze=0,Ie=$e;Ie$e&&IeTe)?Te=Ie:Ie>oe&&(!ze||Ie ."+V));qe.forEach(function(at){var Hn=at.dateObj,ln=Hn.getTime(),Ls=Te>0&&ln0&&ln>ze;if(Ls){at.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(rs){at.classList.remove(rs)});return}else if(De&&!Ls)return;["startRange","inRange","endRange","notAllowed"].forEach(function(rs){at.classList.remove(rs)}),N!==void 0&&(N.classList.add(ee<=t.selectedDates[0].getTime()?"startRange":"endRange"),oeee&&ln===oe&&at.classList.add("endRange"),ln>=Te&&(ze===0||ln<=ze)&&D$(ln,oe,ee)&&at.classList.add("inRange"))})}}function fe(){t.isOpen&&!t.config.static&&!t.config.inline&&sn()}function Z(N,V){if(V===void 0&&(V=t._positionElement),t.isMobile===!0){if(N){N.preventDefault();var ee=on(N);ee&&ee.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),Je("onOpen");return}else if(t._input.disabled||t.config.inline)return;var oe=t.isOpen;t.isOpen=!0,oe||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),Je("onOpen"),sn(V)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(N===void 0||!t.timeContainer.contains(N.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function Ce(N){return function(V){var ee=t.config["_"+N+"Date"]=t.parseDate(V,t.config.dateFormat),oe=t.config["_"+(N==="min"?"max":"min")+"Date"];ee!==void 0&&(t[N==="min"?"minDateHasTime":"maxDateHasTime"]=ee.getHours()>0||ee.getMinutes()>0||ee.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function($e){return Se($e)}),!t.selectedDates.length&&N==="min"&&d(ee),Pt()),t.daysContainer&&(oi(),ee!==void 0?t.currentYearElement[N]=ee.getFullYear().toString():t.currentYearElement.removeAttribute(N),t.currentYearElement.disabled=!!oe&&ee!==void 0&&oe.getFullYear()===ee.getFullYear())}}function Ue(){var N=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],V=Nt(Nt({},JSON.parse(JSON.stringify(n.dataset||{}))),e),ee={};t.config.parseDate=V.parseDate,t.config.formatDate=V.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(qe){t.config._enable=ui(qe)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(qe){t.config._disable=ui(qe)}});var oe=V.mode==="time";if(!V.dateFormat&&(V.enableTime||oe)){var $e=kt.defaultConfig.dateFormat||vs.dateFormat;ee.dateFormat=V.noCalendar||oe?"H:i"+(V.enableSeconds?":S":""):$e+" H:i"+(V.enableSeconds?":S":"")}if(V.altInput&&(V.enableTime||oe)&&!V.altFormat){var Oe=kt.defaultConfig.altFormat||vs.altFormat;ee.altFormat=V.noCalendar||oe?"h:i"+(V.enableSeconds?":S K":" K"):Oe+(" h:i"+(V.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:Ce("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:Ce("max")});var De=function(qe){return function(at){t.config[qe==="min"?"_minTime":"_maxTime"]=t.parseDate(at,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:De("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:De("max")}),V.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,ee,V);for(var Te=0;Te-1?t.config[Ie]=yr(ze[Ie]).map(o).concat(t.config[Ie]):typeof V[Ie]>"u"&&(t.config[Ie]=ze[Ie])}V.altInputClass||(t.config.altInputClass=Vt().className+" "+t.config.altInputClass),Je("onParseConfig")}function Vt(){return t.config.wrap?n.querySelector("[data-input]"):n}function Gt(){typeof t.config.locale!="object"&&typeof kt.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=Nt(Nt({},kt.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?kt.l10ns[t.config.locale]:void 0),ji.D="("+t.l10n.weekdays.shorthand.join("|")+")",ji.l="("+t.l10n.weekdays.longhand.join("|")+")",ji.M="("+t.l10n.months.shorthand.join("|")+")",ji.F="("+t.l10n.months.longhand.join("|")+")",ji.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var N=Nt(Nt({},e),JSON.parse(JSON.stringify(n.dataset||{})));N.time_24hr===void 0&&kt.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=j_(t),t.parseDate=ia({config:t.config,l10n:t.l10n})}function sn(N){if(typeof t.config.position=="function")return void t.config.position(t,N);if(t.calendarContainer!==void 0){Je("onPreCalendarPosition");var V=N||t._positionElement,ee=Array.prototype.reduce.call(t.calendarContainer.children,function(Z_,G_){return Z_+G_.offsetHeight},0),oe=t.calendarContainer.offsetWidth,$e=t.config.position.split(" "),Oe=$e[0],De=$e.length>1?$e[1]:null,Te=V.getBoundingClientRect(),ze=window.innerHeight-Te.bottom,Ie=Oe==="above"||Oe!=="below"&&zeee,qe=window.pageYOffset+Te.top+(Ie?-ee-2:V.offsetHeight+2);if(Bt(t.calendarContainer,"arrowTop",!Ie),Bt(t.calendarContainer,"arrowBottom",Ie),!t.config.inline){var at=window.pageXOffset+Te.left,Hn=!1,ln=!1;De==="center"?(at-=(oe-Te.width)/2,Hn=!0):De==="right"&&(at-=oe-Te.width,ln=!0),Bt(t.calendarContainer,"arrowLeft",!Hn&&!ln),Bt(t.calendarContainer,"arrowCenter",Hn),Bt(t.calendarContainer,"arrowRight",ln);var Ls=window.document.body.offsetWidth-(window.pageXOffset+Te.right),rs=at+oe>window.document.body.offsetWidth,z_=Ls+oe>window.document.body.offsetWidth;if(Bt(t.calendarContainer,"rightMost",rs),!t.config.static)if(t.calendarContainer.style.top=qe+"px",!rs)t.calendarContainer.style.left=at+"px",t.calendarContainer.style.right="auto";else if(!z_)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=Ls+"px";else{var Zo=Gn();if(Zo===void 0)return;var B_=window.document.body.offsetWidth,U_=Math.max(0,B_/2-oe/2),W_=".flatpickr-calendar.centerMost:before",Y_=".flatpickr-calendar.centerMost:after",K_=Zo.cssRules.length,J_="{left:"+Te.left+"px;right:auto;}";Bt(t.calendarContainer,"rightMost",!1),Bt(t.calendarContainer,"centerMost",!0),Zo.insertRule(W_+","+Y_+J_,K_),t.calendarContainer.style.left=U_+"px",t.calendarContainer.style.right="auto"}}}}function Gn(){for(var N=null,V=0;Vt.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=oe,t.config.mode==="single")t.selectedDates=[$e];else if(t.config.mode==="multiple"){var De=Xn($e);De?t.selectedDates.splice(parseInt(De),1):t.selectedDates.push($e)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=$e,t.selectedDates.push($e),rn($e,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(qe,at){return qe.getTime()-at.getTime()}));if(c(),Oe){var Te=t.currentYear!==$e.getFullYear();t.currentYear=$e.getFullYear(),t.currentMonth=$e.getMonth(),Te&&(Je("onYearChange"),z()),Je("onMonthChange")}if(Oi(),q(),Pt(),!Oe&&t.config.mode!=="range"&&t.config.showMonths===1?D(oe):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var ze=t.config.mode==="single"&&!t.config.enableTime,Ie=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(ze||Ie)&&ri()}g()}}var ai={locale:[Gt,Y],showMonths:[G,r,X],minDate:[k],maxDate:[k],positionElement:[Mi],clickOpens:[function(){t.config.clickOpens===!0?(b(t._input,"focus",t.open),b(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function ts(N,V){if(N!==null&&typeof N=="object"){Object.assign(t.config,N);for(var ee in N)ai[ee]!==void 0&&ai[ee].forEach(function(oe){return oe()})}else t.config[N]=V,ai[N]!==void 0?ai[N].forEach(function(oe){return oe()}):vr.indexOf(N)>-1&&(t.config[N]=yr(V));t.redraw(),Pt(!0)}function ns(N,V){var ee=[];if(N instanceof Array)ee=N.map(function(oe){return t.parseDate(oe,V)});else if(N instanceof Date||typeof N=="number")ee=[t.parseDate(N,V)];else if(typeof N=="string")switch(t.config.mode){case"single":case"time":ee=[t.parseDate(N,V)];break;case"multiple":ee=N.split(t.config.conjunction).map(function(oe){return t.parseDate(oe,V)});break;case"range":ee=N.split(t.l10n.rangeSeparator).map(function(oe){return t.parseDate(oe,V)});break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(N)));t.selectedDates=t.config.allowInvalidPreload?ee:ee.filter(function(oe){return oe instanceof Date&&Se(oe,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(oe,$e){return oe.getTime()-$e.getTime()})}function Pl(N,V,ee){if(V===void 0&&(V=!1),ee===void 0&&(ee=t.config.dateFormat),N!==0&&!N||N instanceof Array&&N.length===0)return t.clear(V);ns(N,ee),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),k(void 0,V),d(),t.selectedDates.length===0&&t.clear(!1),Pt(V),V&&Je("onChange")}function ui(N){return N.slice().map(function(V){return typeof V=="string"||typeof V=="number"||V instanceof Date?t.parseDate(V,void 0,!0):V&&typeof V=="object"&&V.from&&V.to?{from:t.parseDate(V.from,void 0),to:t.parseDate(V.to,void 0)}:V}).filter(function(V){return V})}function is(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var N=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);N&&ns(N,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function Ll(){if(t.input=Vt(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=nt(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),Mi()}function Mi(){t._positionElement=t.config.positionElement||t._input}function ss(){var N=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=nt("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=N,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=N==="datetime-local"?"Y-m-d\\TH:i:S":N==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch{}b(t.mobileInput,"change",function(V){t.setDate(on(V).value,!1,t.mobileFormatStr),Je("onChange"),Je("onClose")})}function Xt(N){if(t.isOpen===!0)return t.close();t.open(N)}function Je(N,V){if(t.config!==void 0){var ee=t.config[N];if(ee!==void 0&&ee.length>0)for(var oe=0;ee[oe]&&oe=0&&rn(N,t.selectedDates[1])<=0}function Oi(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(N,V){var ee=new Date(t.currentYear,t.currentMonth,1);ee.setMonth(t.currentMonth+V),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[V].textContent=Po(ee.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=ee.getMonth().toString(),N.value=ee.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYeart.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function Di(N){var V=N||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(ee){return t.formatDate(ee,V)}).filter(function(ee,oe,$e){return t.config.mode!=="range"||t.config.enableTime||$e.indexOf(ee)===oe}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function Pt(N){N===void 0&&(N=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=Di(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=Di(t.config.altFormat)),N!==!1&&Je("onValueUpdate")}function zt(N){var V=on(N),ee=t.prevMonthNav.contains(V),oe=t.nextMonthNav.contains(V);ee||oe?U(ee?-1:1):t.yearElements.indexOf(V)>=0?V.select():V.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):V.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Nl(N){N.preventDefault();var V=N.type==="keydown",ee=on(N),oe=ee;t.amPM!==void 0&&ee===t.amPM&&(t.amPM.textContent=t.l10n.amPM[_n(t.amPM.textContent===t.l10n.amPM[0])]);var $e=parseFloat(oe.getAttribute("min")),Oe=parseFloat(oe.getAttribute("max")),De=parseFloat(oe.getAttribute("step")),Te=parseInt(oe.value,10),ze=N.delta||(V?N.which===38?1:-1:0),Ie=Te+De*ze;if(typeof oe.value<"u"&&oe.value.length===2){var qe=oe===t.hourElement,at=oe===t.minuteElement;Ie<$e?(Ie=Oe+Ie+_n(!qe)+(_n(qe)&&_n(!t.amPM)),at&&C(void 0,-1,t.hourElement)):Ie>Oe&&(Ie=oe===t.hourElement?Ie-Oe-_n(!t.amPM):$e,at&&C(void 0,1,t.hourElement)),t.amPM&&qe&&(De===1?Ie+Te===23:Math.abs(Ie-Te)>De)&&(t.amPM.textContent=t.l10n.amPM[_n(t.amPM.textContent===t.l10n.amPM[0])]),oe.value=Qt(Ie)}}return s(),t}function ys(n,e){for(var t=Array.prototype.slice.call(n).filter(function(o){return o instanceof HTMLElement}),i=[],s=0;s{const C=f||m,M=y(d);return M.onReady.push(()=>{t(8,h=!0)}),t(3,b=kt(C,Object.assign(M,f?{wrap:!0}:{}))),()=>{b.destroy()}});const g=It();function y(C={}){C=Object.assign({},C);for(const M of r){const T=(D,A,I)=>{g(F$(M),[D,A,I])};M in C?(Array.isArray(C[M])||(C[M]=[C[M]]),C[M].push(T)):C[M]=[T]}return C.onChange&&!C.onChange.includes(k)&&C.onChange.push(k),C}function k(C,M,T){var A,I;const D=(I=(A=T==null?void 0:T.config)==null?void 0:A.mode)!=null?I:"single";t(2,a=D==="single"?C[0]:C),t(4,u=M)}function $(C){le[C?"unshift":"push"](()=>{m=C,t(0,m)})}return n.$$set=C=>{e=Ke(Ke({},e),Wn(C)),t(1,s=wt(e,i)),"value"in C&&t(2,a=C.value),"formattedValue"in C&&t(4,u=C.formattedValue),"element"in C&&t(5,f=C.element),"dateFormat"in C&&t(6,c=C.dateFormat),"options"in C&&t(7,d=C.options),"input"in C&&t(0,m=C.input),"flatpickr"in C&&t(3,b=C.flatpickr),"$$scope"in C&&t(9,o=C.$$scope)},n.$$.update=()=>{if(n.$$.dirty&332&&b&&h&&b.setDate(a,!1,c),n.$$.dirty&392&&b&&h)for(const[C,M]of Object.entries(y(d)))b.set(C,M)},[m,s,a,b,u,f,c,d,h,o,l,$]}class Ka extends ke{constructor(e){super(),ye(this,e,R$,N$,be,{value:2,formattedValue:4,element:5,dateFormat:6,options:7,input:0,flatpickr:3})}}function H$(n){let e,t,i,s,l,o,r;function a(f){n[2](f)}let u={id:n[4],options:W.defaultFlatpickrOptions(),value:n[0].min};return n[0].min!==void 0&&(u.formattedValue=n[0].min),l=new Ka({props:u}),le.push(()=>_e(l,"formattedValue",a)),{c(){e=v("label"),t=B("Min date (UTC)"),s=O(),j(l.$$.fragment),p(e,"for",i=n[4])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&16&&i!==(i=f[4]))&&p(e,"for",i);const d={};c&16&&(d.id=f[4]),c&1&&(d.value=f[0].min),!o&&c&1&&(o=!0,d.formattedValue=f[0].min,ve(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function j$(n){let e,t,i,s,l,o,r;function a(f){n[3](f)}let u={id:n[4],options:W.defaultFlatpickrOptions(),value:n[0].max};return n[0].max!==void 0&&(u.formattedValue=n[0].max),l=new Ka({props:u}),le.push(()=>_e(l,"formattedValue",a)),{c(){e=v("label"),t=B("Max date (UTC)"),s=O(),j(l.$$.fragment),p(e,"for",i=n[4])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&16&&i!==(i=f[4]))&&p(e,"for",i);const d={};c&16&&(d.id=f[4]),c&1&&(d.value=f[0].max),!o&&c&1&&(o=!0,d.formattedValue=f[0].max,ve(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function q$(n){let e,t,i,s,l,o,r;return i=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[H$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[j$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.max"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(E(i.$$.fragment,a),E(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function V$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.min,r)&&(s.min=r,t(0,s))}function o(r){n.$$.not_equal(s.max,r)&&(s.max=r,t(0,s))}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class z$ extends ke{constructor(e){super(),ye(this,e,V$,q$,be,{key:1,options:0})}}function B$(n){let e,t,i,s,l,o,r,a,u;function f(d){n[2](d)}let c={id:n[4],placeholder:"eg. optionA, optionB",required:!0};return n[0].values!==void 0&&(c.value=n[0].values),l=new es({props:c}),le.push(()=>_e(l,"value",f)),{c(){e=v("label"),t=B("Choices"),s=O(),j(l.$$.fragment),r=O(),a=v("div"),a.textContent="Use comma as separator.",p(e,"for",i=n[4]),p(a,"class","help-block")},m(d,h){S(d,e,h),_(e,t),S(d,s,h),R(l,d,h),S(d,r,h),S(d,a,h),u=!0},p(d,h){(!u||h&16&&i!==(i=d[4]))&&p(e,"for",i);const m={};h&16&&(m.id=d[4]),!o&&h&1&&(o=!0,m.value=d[0].values,ve(()=>o=!1)),l.$set(m)},i(d){u||(E(l.$$.fragment,d),u=!0)},o(d){P(l.$$.fragment,d),u=!1},d(d){d&&w(e),d&&w(s),H(l,d),d&&w(r),d&&w(a)}}}function U$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Max select"),s=O(),l=v("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",o=n[4]),p(l,"step","1"),p(l,"min","1"),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].maxSelect),r||(a=K(l,"input",n[3]),r=!0)},p(u,f){f&16&&i!==(i=u[4])&&p(e,"for",i),f&16&&o!==(o=u[4])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].maxSelect&&ce(l,u[0].maxSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function W$(n){let e,t,i,s,l,o,r;return i=new ge({props:{class:"form-field required",name:"schema."+n[1]+".options.values",$$slots:{default:[B$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[U$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),p(t,"class","col-sm-9"),p(l,"class","col-sm-3"),p(e,"class","grid")},m(a,u){S(a,e,u),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.values"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.maxSelect"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(E(i.$$.fragment,a),E(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function Y$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.values,r)&&(s.values=r,t(0,s))}function o(){s.maxSelect=rt(this.value),t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},n.$$.update=()=>{n.$$.dirty&1&&W.isEmpty(s)&&t(0,s={maxSelect:1,values:[]})},[s,i,l,o]}class K$ extends ke{constructor(e){super(),ye(this,e,Y$,W$,be,{key:1,options:0})}}function J$(n,e,t){return["",{}]}class Z$ extends ke{constructor(e){super(),ye(this,e,J$,null,be,{key:0,options:1})}get key(){return this.$$.ctx[0]}get options(){return this.$$.ctx[1]}}function G$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Max file size (bytes)"),s=O(),l=v("input"),p(e,"for",i=n[10]),p(l,"type","number"),p(l,"id",o=n[10]),p(l,"step","1"),p(l,"min","0")},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].maxSize),r||(a=K(l,"input",n[2]),r=!0)},p(u,f){f&1024&&i!==(i=u[10])&&p(e,"for",i),f&1024&&o!==(o=u[10])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].maxSize&&ce(l,u[0].maxSize)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function X$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Max files"),s=O(),l=v("input"),p(e,"for",i=n[10]),p(l,"type","number"),p(l,"id",o=n[10]),p(l,"step","1"),p(l,"min",""),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].maxSelect),r||(a=K(l,"input",n[3]),r=!0)},p(u,f){f&1024&&i!==(i=u[10])&&p(e,"for",i),f&1024&&o!==(o=u[10])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].maxSelect&&ce(l,u[0].maxSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function Q$(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("div"),e.innerHTML='Documents (pdf, doc/docx, xls/xlsx)',t=O(),i=v("div"),i.innerHTML='Images (jpg, png, svg, gif, webp)',s=O(),l=v("div"),l.innerHTML='Videos (mp4, avi, mov, 3gp)',o=O(),r=v("div"),r.innerHTML='Archives (zip, 7zip, rar)',p(e,"tabindex","0"),p(e,"class","dropdown-item closable"),p(i,"tabindex","0"),p(i,"class","dropdown-item closable"),p(l,"tabindex","0"),p(l,"class","dropdown-item closable"),p(r,"tabindex","0"),p(r,"class","dropdown-item closable")},m(f,c){S(f,e,c),S(f,t,c),S(f,i,c),S(f,s,c),S(f,l,c),S(f,o,c),S(f,r,c),a||(u=[K(e,"click",n[5]),K(i,"click",n[6]),K(l,"click",n[7]),K(r,"click",n[8])],a=!0)},p:te,d(f){f&&w(e),f&&w(t),f&&w(i),f&&w(s),f&&w(l),f&&w(o),f&&w(r),a=!1,Pe(u)}}}function x$(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M;function T(A){n[4](A)}let D={id:n[10],placeholder:"eg. image/png, application/pdf..."};return n[0].mimeTypes!==void 0&&(D.value=n[0].mimeTypes),r=new es({props:D}),le.push(()=>_e(r,"value",T)),k=new Zn({props:{class:"dropdown dropdown-sm dropdown-nowrap",$$slots:{default:[Q$]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Mime types",i=O(),s=v("i"),o=O(),j(r.$$.fragment),u=O(),f=v("div"),c=v("span"),c.textContent="Use comma as separator.",d=O(),h=v("button"),m=v("span"),m.textContent="Choose presets",b=O(),g=v("i"),y=O(),j(k.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[10]),p(c,"class","txt"),p(m,"class","txt link-primary"),p(g,"class","ri-arrow-drop-down-fill"),p(h,"type","button"),p(h,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m(A,I){S(A,e,I),_(e,t),_(e,i),_(e,s),S(A,o,I),R(r,A,I),S(A,u,I),S(A,f,I),_(f,c),_(f,d),_(f,h),_(h,m),_(h,b),_(h,g),_(h,y),R(k,h,null),$=!0,C||(M=Ae(Be.call(null,s,{text:`Allow files ONLY with the listed mime types. - Leave empty for no restriction.`,position:"top"})),C=!0)},p(A,I){(!$||I&1024&&l!==(l=A[10]))&&p(e,"for",l);const L={};I&1024&&(L.id=A[10]),!a&&I&1&&(a=!0,L.value=A[0].mimeTypes,ve(()=>a=!1)),r.$set(L);const F={};I&2049&&(F.$$scope={dirty:I,ctx:A}),k.$set(F)},i(A){$||(E(r.$$.fragment,A),E(k.$$.fragment,A),$=!0)},o(A){P(r.$$.fragment,A),P(k.$$.fragment,A),$=!1},d(A){A&&w(e),A&&w(o),H(r,A),A&&w(u),A&&w(f),H(k),C=!1,M()}}}function e3(n){let e;return{c(){e=v("ul"),e.innerHTML=`
  • WxH + `}}function x(){t.calendarContainer.classList.add("hasWeeks");var N=nt("div","flatpickr-weekwrapper");N.appendChild(nt("span","flatpickr-weekday",t.l10n.weekAbbreviation));var V=nt("div","flatpickr-weeks");return N.appendChild(V),{weekWrapper:N,weekNumbers:V}}function U(N,V){V===void 0&&(V=!0);var te=V?N:N-t.currentMonth;te<0&&t._hidePrevMonthArrow===!0||te>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=te,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Je("onYearChange"),z()),q(),Je("onMonthChange"),Oi())}function ae(N,V){if(N===void 0&&(N=!0),V===void 0&&(V=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,V===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var te=$r(t.config),oe=te.hours,$e=te.minutes,Oe=te.seconds;h(oe,$e,Oe)}t.redraw(),N&&Je("onChange")}function Re(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),Je("onClose")}function Ne(){t.config!==void 0&&Je("onDestroy");for(var N=t._handlers.length;N--;)t._handlers[N].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var V=t.calendarContainer.parentNode;if(V.lastChild&&V.removeChild(V.lastChild),V.parentNode){for(;V.firstChild;)V.parentNode.insertBefore(V.firstChild,V);V.parentNode.removeChild(V)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(te){try{delete t[te]}catch{}})}function Le(N){return t.calendarContainer.contains(N)}function Fe(N){if(t.isOpen&&!t.config.inline){var V=on(N),te=Le(V),oe=V===t.input||V===t.altInput||t.element.contains(V)||N.path&&N.path.indexOf&&(~N.path.indexOf(t.input)||~N.path.indexOf(t.altInput)),$e=!oe&&!te&&!Le(N.relatedTarget),Oe=!t.config.ignoredFocusElements.some(function(De){return De.contains(V)});$e&&Oe&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&a(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function me(N){if(!(!N||t.config.minDate&&Nt.config.maxDate.getFullYear())){var V=N,te=t.currentYear!==V;t.currentYear=V||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),te&&(t.redraw(),Je("onYearChange"),z())}}function Se(N,V){var te;V===void 0&&(V=!0);var oe=t.parseDate(N,void 0,V);if(t.config.minDate&&oe&&rn(oe,t.config.minDate,V!==void 0?V:!t.minDateHasTime)<0||t.config.maxDate&&oe&&rn(oe,t.config.maxDate,V!==void 0?V:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(oe===void 0)return!1;for(var $e=!!t.config.enable,Oe=(te=t.config.enable)!==null&&te!==void 0?te:t.config.disable,De=0,Te=void 0;De=Te.from.getTime()&&oe.getTime()<=Te.to.getTime())return $e}return!$e}function we(N){return t.daysContainer!==void 0?N.className.indexOf("hidden")===-1&&N.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(N):!1}function We(N){var V=N.target===t._input,te=t._input.value.trimEnd()!==Di();V&&te&&!(N.relatedTarget&&Le(N.relatedTarget))&&t.setDate(t._input.value,!0,N.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function ue(N){var V=on(N),te=t.config.wrap?n.contains(V):V===t._input,oe=t.config.allowInput,$e=t.isOpen&&(!oe||!te),Oe=t.config.inline&&te&&!oe;if(N.keyCode===13&&te){if(oe)return t.setDate(t._input.value,!0,V===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),V.blur();t.open()}else if(Le(V)||$e||Oe){var De=!!t.timeContainer&&t.timeContainer.contains(V);switch(N.keyCode){case 13:De?(N.preventDefault(),a(),ri()):Ls(N);break;case 27:N.preventDefault(),ri();break;case 8:case 46:te&&!t.config.allowInput&&(N.preventDefault(),t.clear());break;case 37:case 39:if(!De&&!te){N.preventDefault();var Te=l();if(t.daysContainer!==void 0&&(oe===!1||Te&&we(Te))){var ze=N.keyCode===39?1:-1;N.ctrlKey?(N.stopPropagation(),U(ze),L(A(1),0)):L(void 0,ze)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:N.preventDefault();var Ie=N.keyCode===40?1:-1;t.daysContainer&&V.$i!==void 0||V===t.input||V===t.altInput?N.ctrlKey?(N.stopPropagation(),me(t.currentYear-Ie),L(A(1),0)):De||L(void 0,Ie*7):V===t.currentYearElement?me(t.currentYear-Ie):t.config.enableTime&&(!De&&t.hourElement&&t.hourElement.focus(),a(N),t._debouncedChange());break;case 9:if(De){var qe=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(ln){return ln}),at=qe.indexOf(V);if(at!==-1){var Hn=qe[at+(N.shiftKey?-1:1)];N.preventDefault(),(Hn||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(V)&&N.shiftKey&&(N.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&V===t.amPM)switch(N.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],c(),Pt();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],c(),Pt();break}(te||Le(V))&&Je("onKeyDown",N)}function se(N,V){if(V===void 0&&(V="flatpickr-day"),!(t.selectedDates.length!==1||N&&(!N.classList.contains(V)||N.classList.contains("flatpickr-disabled")))){for(var te=N?N.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),oe=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),$e=Math.min(te,t.selectedDates[0].getTime()),Oe=Math.max(te,t.selectedDates[0].getTime()),De=!1,Te=0,ze=0,Ie=$e;Ie$e&&IeTe)?Te=Ie:Ie>oe&&(!ze||Ie ."+V));qe.forEach(function(at){var Hn=at.dateObj,ln=Hn.getTime(),Ns=Te>0&&ln0&&ln>ze;if(Ns){at.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(rs){at.classList.remove(rs)});return}else if(De&&!Ns)return;["startRange","inRange","endRange","notAllowed"].forEach(function(rs){at.classList.remove(rs)}),N!==void 0&&(N.classList.add(te<=t.selectedDates[0].getTime()?"startRange":"endRange"),oete&&ln===oe&&at.classList.add("endRange"),ln>=Te&&(ze===0||ln<=ze)&&A$(ln,oe,te)&&at.classList.add("inRange"))})}}function fe(){t.isOpen&&!t.config.static&&!t.config.inline&&sn()}function Z(N,V){if(V===void 0&&(V=t._positionElement),t.isMobile===!0){if(N){N.preventDefault();var te=on(N);te&&te.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),Je("onOpen");return}else if(t._input.disabled||t.config.inline)return;var oe=t.isOpen;t.isOpen=!0,oe||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),Je("onOpen"),sn(V)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(N===void 0||!t.timeContainer.contains(N.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function Ce(N){return function(V){var te=t.config["_"+N+"Date"]=t.parseDate(V,t.config.dateFormat),oe=t.config["_"+(N==="min"?"max":"min")+"Date"];te!==void 0&&(t[N==="min"?"minDateHasTime":"maxDateHasTime"]=te.getHours()>0||te.getMinutes()>0||te.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function($e){return Se($e)}),!t.selectedDates.length&&N==="min"&&d(te),Pt()),t.daysContainer&&(oi(),te!==void 0?t.currentYearElement[N]=te.getFullYear().toString():t.currentYearElement.removeAttribute(N),t.currentYearElement.disabled=!!oe&&te!==void 0&&oe.getFullYear()===te.getFullYear())}}function Be(){var N=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],V=Nt(Nt({},JSON.parse(JSON.stringify(n.dataset||{}))),e),te={};t.config.parseDate=V.parseDate,t.config.formatDate=V.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(qe){t.config._enable=ui(qe)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(qe){t.config._disable=ui(qe)}});var oe=V.mode==="time";if(!V.dateFormat&&(V.enableTime||oe)){var $e=kt.defaultConfig.dateFormat||ys.dateFormat;te.dateFormat=V.noCalendar||oe?"H:i"+(V.enableSeconds?":S":""):$e+" H:i"+(V.enableSeconds?":S":"")}if(V.altInput&&(V.enableTime||oe)&&!V.altFormat){var Oe=kt.defaultConfig.altFormat||ys.altFormat;te.altFormat=V.noCalendar||oe?"h:i"+(V.enableSeconds?":S K":" K"):Oe+(" h:i"+(V.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:Ce("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:Ce("max")});var De=function(qe){return function(at){t.config[qe==="min"?"_minTime":"_maxTime"]=t.parseDate(at,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:De("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:De("max")}),V.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,te,V);for(var Te=0;Te-1?t.config[Ie]=kr(ze[Ie]).map(o).concat(t.config[Ie]):typeof V[Ie]>"u"&&(t.config[Ie]=ze[Ie])}V.altInputClass||(t.config.altInputClass=Vt().className+" "+t.config.altInputClass),Je("onParseConfig")}function Vt(){return t.config.wrap?n.querySelector("[data-input]"):n}function Gt(){typeof t.config.locale!="object"&&typeof kt.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=Nt(Nt({},kt.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?kt.l10ns[t.config.locale]:void 0),ji.D="("+t.l10n.weekdays.shorthand.join("|")+")",ji.l="("+t.l10n.weekdays.longhand.join("|")+")",ji.M="("+t.l10n.months.shorthand.join("|")+")",ji.F="("+t.l10n.months.longhand.join("|")+")",ji.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var N=Nt(Nt({},e),JSON.parse(JSON.stringify(n.dataset||{})));N.time_24hr===void 0&&kt.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=q_(t),t.parseDate=sa({config:t.config,l10n:t.l10n})}function sn(N){if(typeof t.config.position=="function")return void t.config.position(t,N);if(t.calendarContainer!==void 0){Je("onPreCalendarPosition");var V=N||t._positionElement,te=Array.prototype.reduce.call(t.calendarContainer.children,function(G_,X_){return G_+X_.offsetHeight},0),oe=t.calendarContainer.offsetWidth,$e=t.config.position.split(" "),Oe=$e[0],De=$e.length>1?$e[1]:null,Te=V.getBoundingClientRect(),ze=window.innerHeight-Te.bottom,Ie=Oe==="above"||Oe!=="below"&&zete,qe=window.pageYOffset+Te.top+(Ie?-te-2:V.offsetHeight+2);if(Bt(t.calendarContainer,"arrowTop",!Ie),Bt(t.calendarContainer,"arrowBottom",Ie),!t.config.inline){var at=window.pageXOffset+Te.left,Hn=!1,ln=!1;De==="center"?(at-=(oe-Te.width)/2,Hn=!0):De==="right"&&(at-=oe-Te.width,ln=!0),Bt(t.calendarContainer,"arrowLeft",!Hn&&!ln),Bt(t.calendarContainer,"arrowCenter",Hn),Bt(t.calendarContainer,"arrowRight",ln);var Ns=window.document.body.offsetWidth-(window.pageXOffset+Te.right),rs=at+oe>window.document.body.offsetWidth,B_=Ns+oe>window.document.body.offsetWidth;if(Bt(t.calendarContainer,"rightMost",rs),!t.config.static)if(t.calendarContainer.style.top=qe+"px",!rs)t.calendarContainer.style.left=at+"px",t.calendarContainer.style.right="auto";else if(!B_)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=Ns+"px";else{var Go=Gn();if(Go===void 0)return;var U_=window.document.body.offsetWidth,W_=Math.max(0,U_/2-oe/2),Y_=".flatpickr-calendar.centerMost:before",K_=".flatpickr-calendar.centerMost:after",J_=Go.cssRules.length,Z_="{left:"+Te.left+"px;right:auto;}";Bt(t.calendarContainer,"rightMost",!1),Bt(t.calendarContainer,"centerMost",!0),Go.insertRule(Y_+","+K_+Z_,J_),t.calendarContainer.style.left=W_+"px",t.calendarContainer.style.right="auto"}}}}function Gn(){for(var N=null,V=0;Vt.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=oe,t.config.mode==="single")t.selectedDates=[$e];else if(t.config.mode==="multiple"){var De=Xn($e);De?t.selectedDates.splice(parseInt(De),1):t.selectedDates.push($e)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=$e,t.selectedDates.push($e),rn($e,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(qe,at){return qe.getTime()-at.getTime()}));if(c(),Oe){var Te=t.currentYear!==$e.getFullYear();t.currentYear=$e.getFullYear(),t.currentMonth=$e.getMonth(),Te&&(Je("onYearChange"),z()),Je("onMonthChange")}if(Oi(),q(),Pt(),!Oe&&t.config.mode!=="range"&&t.config.showMonths===1?D(oe):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var ze=t.config.mode==="single"&&!t.config.enableTime,Ie=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(ze||Ie)&&ri()}b()}}var ai={locale:[Gt,Y],showMonths:[G,r,X],minDate:[k],maxDate:[k],positionElement:[Mi],clickOpens:[function(){t.config.clickOpens===!0?(g(t._input,"focus",t.open),g(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function ts(N,V){if(N!==null&&typeof N=="object"){Object.assign(t.config,N);for(var te in N)ai[te]!==void 0&&ai[te].forEach(function(oe){return oe()})}else t.config[N]=V,ai[N]!==void 0?ai[N].forEach(function(oe){return oe()}):yr.indexOf(N)>-1&&(t.config[N]=kr(V));t.redraw(),Pt(!0)}function ns(N,V){var te=[];if(N instanceof Array)te=N.map(function(oe){return t.parseDate(oe,V)});else if(N instanceof Date||typeof N=="number")te=[t.parseDate(N,V)];else if(typeof N=="string")switch(t.config.mode){case"single":case"time":te=[t.parseDate(N,V)];break;case"multiple":te=N.split(t.config.conjunction).map(function(oe){return t.parseDate(oe,V)});break;case"range":te=N.split(t.l10n.rangeSeparator).map(function(oe){return t.parseDate(oe,V)});break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(N)));t.selectedDates=t.config.allowInvalidPreload?te:te.filter(function(oe){return oe instanceof Date&&Se(oe,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(oe,$e){return oe.getTime()-$e.getTime()})}function Ll(N,V,te){if(V===void 0&&(V=!1),te===void 0&&(te=t.config.dateFormat),N!==0&&!N||N instanceof Array&&N.length===0)return t.clear(V);ns(N,te),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),k(void 0,V),d(),t.selectedDates.length===0&&t.clear(!1),Pt(V),V&&Je("onChange")}function ui(N){return N.slice().map(function(V){return typeof V=="string"||typeof V=="number"||V instanceof Date?t.parseDate(V,void 0,!0):V&&typeof V=="object"&&V.from&&V.to?{from:t.parseDate(V.from,void 0),to:t.parseDate(V.to,void 0)}:V}).filter(function(V){return V})}function is(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var N=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);N&&ns(N,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function Nl(){if(t.input=Vt(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=nt(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),Mi()}function Mi(){t._positionElement=t.config.positionElement||t._input}function ss(){var N=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=nt("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=N,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=N==="datetime-local"?"Y-m-d\\TH:i:S":N==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch{}g(t.mobileInput,"change",function(V){t.setDate(on(V).value,!1,t.mobileFormatStr),Je("onChange"),Je("onClose")})}function Xt(N){if(t.isOpen===!0)return t.close();t.open(N)}function Je(N,V){if(t.config!==void 0){var te=t.config[N];if(te!==void 0&&te.length>0)for(var oe=0;te[oe]&&oe=0&&rn(N,t.selectedDates[1])<=0}function Oi(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(N,V){var te=new Date(t.currentYear,t.currentMonth,1);te.setMonth(t.currentMonth+V),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[V].textContent=Lo(te.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=te.getMonth().toString(),N.value=te.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYeart.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function Di(N){var V=N||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(te){return t.formatDate(te,V)}).filter(function(te,oe,$e){return t.config.mode!=="range"||t.config.enableTime||$e.indexOf(te)===oe}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function Pt(N){N===void 0&&(N=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=Di(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=Di(t.config.altFormat)),N!==!1&&Je("onValueUpdate")}function zt(N){var V=on(N),te=t.prevMonthNav.contains(V),oe=t.nextMonthNav.contains(V);te||oe?U(te?-1:1):t.yearElements.indexOf(V)>=0?V.select():V.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):V.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Fl(N){N.preventDefault();var V=N.type==="keydown",te=on(N),oe=te;t.amPM!==void 0&&te===t.amPM&&(t.amPM.textContent=t.l10n.amPM[_n(t.amPM.textContent===t.l10n.amPM[0])]);var $e=parseFloat(oe.getAttribute("min")),Oe=parseFloat(oe.getAttribute("max")),De=parseFloat(oe.getAttribute("step")),Te=parseInt(oe.value,10),ze=N.delta||(V?N.which===38?1:-1:0),Ie=Te+De*ze;if(typeof oe.value<"u"&&oe.value.length===2){var qe=oe===t.hourElement,at=oe===t.minuteElement;Ie<$e?(Ie=Oe+Ie+_n(!qe)+(_n(qe)&&_n(!t.amPM)),at&&C(void 0,-1,t.hourElement)):Ie>Oe&&(Ie=oe===t.hourElement?Ie-Oe-_n(!t.amPM):$e,at&&C(void 0,1,t.hourElement)),t.amPM&&qe&&(De===1?Ie+Te===23:Math.abs(Ie-Te)>De)&&(t.amPM.textContent=t.l10n.amPM[_n(t.amPM.textContent===t.l10n.amPM[0])]),oe.value=Qt(Ie)}}return s(),t}function ks(n,e){for(var t=Array.prototype.slice.call(n).filter(function(o){return o instanceof HTMLElement}),i=[],s=0;s{const C=f||m,M=y(d);return M.onReady.push(()=>{t(8,h=!0)}),t(3,g=kt(C,Object.assign(M,f?{wrap:!0}:{}))),()=>{g.destroy()}});const b=It();function y(C={}){C=Object.assign({},C);for(const M of r){const T=(D,A,I)=>{b(R$(M),[D,A,I])};M in C?(Array.isArray(C[M])||(C[M]=[C[M]]),C[M].push(T)):C[M]=[T]}return C.onChange&&!C.onChange.includes(k)&&C.onChange.push(k),C}function k(C,M,T){var A,I;const D=(I=(A=T==null?void 0:T.config)==null?void 0:A.mode)!=null?I:"single";t(2,a=D==="single"?C[0]:C),t(4,u=M)}function $(C){le[C?"unshift":"push"](()=>{m=C,t(0,m)})}return n.$$set=C=>{e=Ke(Ke({},e),Wn(C)),t(1,s=wt(e,i)),"value"in C&&t(2,a=C.value),"formattedValue"in C&&t(4,u=C.formattedValue),"element"in C&&t(5,f=C.element),"dateFormat"in C&&t(6,c=C.dateFormat),"options"in C&&t(7,d=C.options),"input"in C&&t(0,m=C.input),"flatpickr"in C&&t(3,g=C.flatpickr),"$$scope"in C&&t(9,o=C.$$scope)},n.$$.update=()=>{if(n.$$.dirty&332&&g&&h&&g.setDate(a,!1,c),n.$$.dirty&392&&g&&h)for(const[C,M]of Object.entries(y(d)))g.set(C,M)},[m,s,a,g,u,f,c,d,h,o,l,$]}class Ja extends ke{constructor(e){super(),ye(this,e,H$,F$,be,{value:2,formattedValue:4,element:5,dateFormat:6,options:7,input:0,flatpickr:3})}}function j$(n){let e,t,i,s,l,o,r;function a(f){n[2](f)}let u={id:n[4],options:W.defaultFlatpickrOptions(),value:n[0].min};return n[0].min!==void 0&&(u.formattedValue=n[0].min),l=new Ja({props:u}),le.push(()=>_e(l,"formattedValue",a)),{c(){e=v("label"),t=B("Min date (UTC)"),s=O(),j(l.$$.fragment),p(e,"for",i=n[4])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&16&&i!==(i=f[4]))&&p(e,"for",i);const d={};c&16&&(d.id=f[4]),c&1&&(d.value=f[0].min),!o&&c&1&&(o=!0,d.formattedValue=f[0].min,ve(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function q$(n){let e,t,i,s,l,o,r;function a(f){n[3](f)}let u={id:n[4],options:W.defaultFlatpickrOptions(),value:n[0].max};return n[0].max!==void 0&&(u.formattedValue=n[0].max),l=new Ja({props:u}),le.push(()=>_e(l,"formattedValue",a)),{c(){e=v("label"),t=B("Max date (UTC)"),s=O(),j(l.$$.fragment),p(e,"for",i=n[4])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&16&&i!==(i=f[4]))&&p(e,"for",i);const d={};c&16&&(d.id=f[4]),c&1&&(d.value=f[0].max),!o&&c&1&&(o=!0,d.formattedValue=f[0].max,ve(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function V$(n){let e,t,i,s,l,o,r;return i=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.min",$$slots:{default:[j$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.max",$$slots:{default:[q$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.min"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.max"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(E(i.$$.fragment,a),E(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function z$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.min,r)&&(s.min=r,t(0,s))}function o(r){n.$$.not_equal(s.max,r)&&(s.max=r,t(0,s))}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},[s,i,l,o]}class B$ extends ke{constructor(e){super(),ye(this,e,z$,V$,be,{key:1,options:0})}}function U$(n){let e,t,i,s,l,o,r,a,u;function f(d){n[2](d)}let c={id:n[4],placeholder:"eg. optionA, optionB",required:!0};return n[0].values!==void 0&&(c.value=n[0].values),l=new es({props:c}),le.push(()=>_e(l,"value",f)),{c(){e=v("label"),t=B("Choices"),s=O(),j(l.$$.fragment),r=O(),a=v("div"),a.textContent="Use comma as separator.",p(e,"for",i=n[4]),p(a,"class","help-block")},m(d,h){S(d,e,h),_(e,t),S(d,s,h),R(l,d,h),S(d,r,h),S(d,a,h),u=!0},p(d,h){(!u||h&16&&i!==(i=d[4]))&&p(e,"for",i);const m={};h&16&&(m.id=d[4]),!o&&h&1&&(o=!0,m.value=d[0].values,ve(()=>o=!1)),l.$set(m)},i(d){u||(E(l.$$.fragment,d),u=!0)},o(d){P(l.$$.fragment,d),u=!1},d(d){d&&w(e),d&&w(s),H(l,d),d&&w(r),d&&w(a)}}}function W$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Max select"),s=O(),l=v("input"),p(e,"for",i=n[4]),p(l,"type","number"),p(l,"id",o=n[4]),p(l,"step","1"),p(l,"min","1"),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].maxSelect),r||(a=K(l,"input",n[3]),r=!0)},p(u,f){f&16&&i!==(i=u[4])&&p(e,"for",i),f&16&&o!==(o=u[4])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].maxSelect&&ce(l,u[0].maxSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function Y$(n){let e,t,i,s,l,o,r;return i=new ge({props:{class:"form-field required",name:"schema."+n[1]+".options.values",$$slots:{default:[U$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[W$,({uniqueId:a})=>({4:a}),({uniqueId:a})=>a?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),p(t,"class","col-sm-9"),p(l,"class","col-sm-3"),p(e,"class","grid")},m(a,u){S(a,e,u),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.values"),u&49&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.maxSelect"),u&49&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(E(i.$$.fragment,a),E(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function K$(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(r){n.$$.not_equal(s.values,r)&&(s.values=r,t(0,s))}function o(){s.maxSelect=rt(this.value),t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"options"in r&&t(0,s=r.options)},n.$$.update=()=>{n.$$.dirty&1&&W.isEmpty(s)&&t(0,s={maxSelect:1,values:[]})},[s,i,l,o]}class J$ extends ke{constructor(e){super(),ye(this,e,K$,Y$,be,{key:1,options:0})}}function Z$(n,e,t){return["",{}]}class G$ extends ke{constructor(e){super(),ye(this,e,Z$,null,be,{key:0,options:1})}get key(){return this.$$.ctx[0]}get options(){return this.$$.ctx[1]}}function X$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Max file size (bytes)"),s=O(),l=v("input"),p(e,"for",i=n[10]),p(l,"type","number"),p(l,"id",o=n[10]),p(l,"step","1"),p(l,"min","0")},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].maxSize),r||(a=K(l,"input",n[2]),r=!0)},p(u,f){f&1024&&i!==(i=u[10])&&p(e,"for",i),f&1024&&o!==(o=u[10])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].maxSize&&ce(l,u[0].maxSize)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function Q$(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Max files"),s=O(),l=v("input"),p(e,"for",i=n[10]),p(l,"type","number"),p(l,"id",o=n[10]),p(l,"step","1"),p(l,"min",""),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].maxSelect),r||(a=K(l,"input",n[3]),r=!0)},p(u,f){f&1024&&i!==(i=u[10])&&p(e,"for",i),f&1024&&o!==(o=u[10])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].maxSelect&&ce(l,u[0].maxSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function x$(n){let e,t,i,s,l,o,r,a,u;return{c(){e=v("div"),e.innerHTML='Documents (pdf, doc/docx, xls/xlsx)',t=O(),i=v("div"),i.innerHTML='Images (jpg, png, svg, gif, webp)',s=O(),l=v("div"),l.innerHTML='Videos (mp4, avi, mov, 3gp)',o=O(),r=v("div"),r.innerHTML='Archives (zip, 7zip, rar)',p(e,"tabindex","0"),p(e,"class","dropdown-item closable"),p(i,"tabindex","0"),p(i,"class","dropdown-item closable"),p(l,"tabindex","0"),p(l,"class","dropdown-item closable"),p(r,"tabindex","0"),p(r,"class","dropdown-item closable")},m(f,c){S(f,e,c),S(f,t,c),S(f,i,c),S(f,s,c),S(f,l,c),S(f,o,c),S(f,r,c),a||(u=[K(e,"click",n[5]),K(i,"click",n[6]),K(l,"click",n[7]),K(r,"click",n[8])],a=!0)},p:ee,d(f){f&&w(e),f&&w(t),f&&w(i),f&&w(s),f&&w(l),f&&w(o),f&&w(r),a=!1,Pe(u)}}}function eC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,b,y,k,$,C,M;function T(A){n[4](A)}let D={id:n[10],placeholder:"eg. image/png, application/pdf..."};return n[0].mimeTypes!==void 0&&(D.value=n[0].mimeTypes),r=new es({props:D}),le.push(()=>_e(r,"value",T)),k=new Zn({props:{class:"dropdown dropdown-sm dropdown-nowrap",$$slots:{default:[x$]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Mime types",i=O(),s=v("i"),o=O(),j(r.$$.fragment),u=O(),f=v("div"),c=v("span"),c.textContent="Use comma as separator.",d=O(),h=v("button"),m=v("span"),m.textContent="Choose presets",g=O(),b=v("i"),y=O(),j(k.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[10]),p(c,"class","txt"),p(m,"class","txt link-primary"),p(b,"class","ri-arrow-drop-down-fill"),p(h,"type","button"),p(h,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m(A,I){S(A,e,I),_(e,t),_(e,i),_(e,s),S(A,o,I),R(r,A,I),S(A,u,I),S(A,f,I),_(f,c),_(f,d),_(f,h),_(h,m),_(h,g),_(h,b),_(h,y),R(k,h,null),$=!0,C||(M=Ee(Ue.call(null,s,{text:`Allow files ONLY with the listed mime types. + Leave empty for no restriction.`,position:"top"})),C=!0)},p(A,I){(!$||I&1024&&l!==(l=A[10]))&&p(e,"for",l);const L={};I&1024&&(L.id=A[10]),!a&&I&1&&(a=!0,L.value=A[0].mimeTypes,ve(()=>a=!1)),r.$set(L);const F={};I&2049&&(F.$$scope={dirty:I,ctx:A}),k.$set(F)},i(A){$||(E(r.$$.fragment,A),E(k.$$.fragment,A),$=!0)},o(A){P(r.$$.fragment,A),P(k.$$.fragment,A),$=!1},d(A){A&&w(e),A&&w(o),H(r,A),A&&w(u),A&&w(f),H(k),C=!1,M()}}}function tC(n){let e;return{c(){e=v("ul"),e.innerHTML=`
  • WxH (eg. 100x50) - crop to WxH viewbox (from center)
  • WxHt (eg. 100x50t) - crop to WxH viewbox (from top)
  • @@ -61,114 +61,118 @@
  • 0xH (eg. 0x50) - resize to H height preserving the aspect ratio
  • Wx0 - (eg. 100x0) - resize to W width preserving the aspect ratio
  • `,p(e,"class","m-0")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function t3(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M;function T(A){n[9](A)}let D={id:n[10],placeholder:"eg. 50x50, 480x720"};return n[0].thumbs!==void 0&&(D.value=n[0].thumbs),r=new es({props:D}),le.push(()=>_e(r,"value",T)),k=new Zn({props:{class:"dropdown dropdown-sm dropdown-center dropdown-nowrap p-r-10",$$slots:{default:[e3]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Thumb sizes",i=O(),s=v("i"),o=O(),j(r.$$.fragment),u=O(),f=v("div"),c=v("span"),c.textContent="Use comma as separator.",d=O(),h=v("button"),m=v("span"),m.textContent="Supported formats",b=O(),g=v("i"),y=O(),j(k.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[10]),p(c,"class","txt"),p(m,"class","txt link-primary"),p(g,"class","ri-arrow-drop-down-fill"),p(h,"type","button"),p(h,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m(A,I){S(A,e,I),_(e,t),_(e,i),_(e,s),S(A,o,I),R(r,A,I),S(A,u,I),S(A,f,I),_(f,c),_(f,d),_(f,h),_(h,m),_(h,b),_(h,g),_(h,y),R(k,h,null),$=!0,C||(M=Ae(Be.call(null,s,{text:"List of additional thumb sizes for image files, along with the default thumb size of 100x100. The thumbs are generated lazily on first access.",position:"top"})),C=!0)},p(A,I){(!$||I&1024&&l!==(l=A[10]))&&p(e,"for",l);const L={};I&1024&&(L.id=A[10]),!a&&I&1&&(a=!0,L.value=A[0].thumbs,ve(()=>a=!1)),r.$set(L);const F={};I&2048&&(F.$$scope={dirty:I,ctx:A}),k.$set(F)},i(A){$||(E(r.$$.fragment,A),E(k.$$.fragment,A),$=!0)},o(A){P(r.$$.fragment,A),P(k.$$.fragment,A),$=!1},d(A){A&&w(e),A&&w(o),H(r,A),A&&w(u),A&&w(f),H(k),C=!1,M()}}}function n3(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;return i=new ge({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[G$,({uniqueId:m})=>({10:m}),({uniqueId:m})=>m?1024:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[X$,({uniqueId:m})=>({10:m}),({uniqueId:m})=>m?1024:0]},$$scope:{ctx:n}}}),u=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[x$,({uniqueId:m})=>({10:m}),({uniqueId:m})=>m?1024:0]},$$scope:{ctx:n}}}),d=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[t3,({uniqueId:m})=>({10:m}),({uniqueId:m})=>m?1024:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),f=O(),c=v("div"),j(d.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(a,"class","col-sm-12"),p(c,"class","col-sm-12"),p(e,"class","grid")},m(m,b){S(m,e,b),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),R(u,a,null),_(e,f),_(e,c),R(d,c,null),h=!0},p(m,[b]){const g={};b&2&&(g.name="schema."+m[1]+".options.maxSize"),b&3073&&(g.$$scope={dirty:b,ctx:m}),i.$set(g);const y={};b&2&&(y.name="schema."+m[1]+".options.maxSelect"),b&3073&&(y.$$scope={dirty:b,ctx:m}),o.$set(y);const k={};b&2&&(k.name="schema."+m[1]+".options.mimeTypes"),b&3073&&(k.$$scope={dirty:b,ctx:m}),u.$set(k);const $={};b&2&&($.name="schema."+m[1]+".options.thumbs"),b&3073&&($.$$scope={dirty:b,ctx:m}),d.$set($)},i(m){h||(E(i.$$.fragment,m),E(o.$$.fragment,m),E(u.$$.fragment,m),E(d.$$.fragment,m),h=!0)},o(m){P(i.$$.fragment,m),P(o.$$.fragment,m),P(u.$$.fragment,m),P(d.$$.fragment,m),h=!1},d(m){m&&w(e),H(i),H(o),H(u),H(d)}}}function i3(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.maxSize=rt(this.value),t(0,s)}function o(){s.maxSelect=rt(this.value),t(0,s)}function r(h){n.$$.not_equal(s.mimeTypes,h)&&(s.mimeTypes=h,t(0,s))}const a=()=>{t(0,s.mimeTypes=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],s)},u=()=>{t(0,s.mimeTypes=["image/jpg","image/jpeg","image/png","image/svg+xml","image/gif","image/webp"],s)},f=()=>{t(0,s.mimeTypes=["video/mp4","video/x-ms-wmv","video/quicktime","video/3gpp"],s)},c=()=>{t(0,s.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],s)};function d(h){n.$$.not_equal(s.thumbs,h)&&(s.thumbs=h,t(0,s))}return n.$$set=h=>{"key"in h&&t(1,i=h.key),"options"in h&&t(0,s=h.options)},n.$$.update=()=>{n.$$.dirty&1&&W.isEmpty(s)&&t(0,s={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]})},[s,i,l,o,r,a,u,f,c,d]}class s3 extends ke{constructor(e){super(),ye(this,e,i3,n3,be,{key:1,options:0})}}function l3(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='New collection',p(e,"type","button"),p(e,"class","btn btn-warning btn-block btn-sm m-t-5")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[8]),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function o3(n){let e,t,i,s,l,o,r;function a(f){n[9](f)}let u={searchable:n[2].length>5,selectPlaceholder:n[3]?"Loading...":"Select collection",noOptionsText:"No collections found",selectionKey:"id",items:n[2],$$slots:{afterOptions:[l3]},$$scope:{ctx:n}};return n[0].collectionId!==void 0&&(u.keyOfSelected=n[0].collectionId),l=new xi({props:u}),le.push(()=>_e(l,"keyOfSelected",a)),{c(){e=v("label"),t=B("Collection"),s=O(),j(l.$$.fragment),p(e,"for",i=n[14])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&16384&&i!==(i=f[14]))&&p(e,"for",i);const d={};c&4&&(d.searchable=f[2].length>5),c&8&&(d.selectPlaceholder=f[3]?"Loading...":"Select collection"),c&4&&(d.items=f[2]),c&32784&&(d.$$scope={dirty:c,ctx:f}),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].collectionId,ve(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function r3(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("span"),t.textContent="Max select",i=O(),s=v("i"),o=O(),r=v("input"),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[14]),p(r,"type","number"),p(r,"id",a=n[14]),p(r,"step","1"),p(r,"min","1")},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),ce(r,n[0].maxSelect),u||(f=[Ae(Be.call(null,s,{text:"Leave empty for no limit.",position:"top"})),K(r,"input",n[10])],u=!0)},p(c,d){d&16384&&l!==(l=c[14])&&p(e,"for",l),d&16384&&a!==(a=c[14])&&p(r,"id",a),d&1&&rt(r.value)!==c[0].maxSelect&&ce(r,c[0].maxSelect)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,Pe(f)}}}function a3(n){let e,t,i=(n[5]?n[5].name:"relation")+"",s,l,o,r,a,u,f;function c(h){n[11](h)}let d={id:n[14],items:n[6]};return n[0].cascadeDelete!==void 0&&(d.keyOfSelected=n[0].cascadeDelete),a=new xi({props:d}),le.push(()=>_e(a,"keyOfSelected",c)),{c(){e=v("label"),t=B("Delete record on "),s=B(i),l=B(" delete"),r=O(),j(a.$$.fragment),p(e,"for",o=n[14])},m(h,m){S(h,e,m),_(e,t),_(e,s),_(e,l),S(h,r,m),R(a,h,m),f=!0},p(h,m){(!f||m&32)&&i!==(i=(h[5]?h[5].name:"relation")+"")&&ae(s,i),(!f||m&16384&&o!==(o=h[14]))&&p(e,"for",o);const b={};m&16384&&(b.id=h[14]),!u&&m&1&&(u=!0,b.keyOfSelected=h[0].cascadeDelete,ve(()=>u=!1)),a.$set(b)},i(h){f||(E(a.$$.fragment,h),f=!0)},o(h){P(a.$$.fragment,h),f=!1},d(h){h&&w(e),h&&w(r),H(a,h)}}}function u3(n){let e,t,i,s,l,o,r,a,u,f,c,d;i=new ge({props:{class:"form-field required",name:"schema."+n[1]+".options.collectionId",$$slots:{default:[o3,({uniqueId:m})=>({14:m}),({uniqueId:m})=>m?16384:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[r3,({uniqueId:m})=>({14:m}),({uniqueId:m})=>m?16384:0]},$$scope:{ctx:n}}}),u=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[a3,({uniqueId:m})=>({14:m}),({uniqueId:m})=>m?16384:0]},$$scope:{ctx:n}}});let h={};return c=new Ja({props:h}),n[12](c),c.$on("save",n[13]),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),f=O(),j(c.$$.fragment),p(t,"class","col-sm-9"),p(l,"class","col-sm-3"),p(a,"class","col-sm-12"),p(e,"class","grid")},m(m,b){S(m,e,b),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),R(u,a,null),S(m,f,b),R(c,m,b),d=!0},p(m,[b]){const g={};b&2&&(g.name="schema."+m[1]+".options.collectionId"),b&49181&&(g.$$scope={dirty:b,ctx:m}),i.$set(g);const y={};b&2&&(y.name="schema."+m[1]+".options.maxSelect"),b&49153&&(y.$$scope={dirty:b,ctx:m}),o.$set(y);const k={};b&2&&(k.name="schema."+m[1]+".options.cascadeDelete"),b&49185&&(k.$$scope={dirty:b,ctx:m}),u.$set(k);const $={};c.$set($)},i(m){d||(E(i.$$.fragment,m),E(o.$$.fragment,m),E(u.$$.fragment,m),E(c.$$.fragment,m),d=!0)},o(m){P(i.$$.fragment,m),P(o.$$.fragment,m),P(u.$$.fragment,m),P(c.$$.fragment,m),d=!1},d(m){m&&w(e),H(i),H(o),H(u),m&&w(f),n[12](null),H(c,m)}}}function f3(n,e,t){let i,{key:s=""}=e,{options:l={}}=e;const o=[{label:"False",value:!1},{label:"True",value:!0}];let r=!1,a=[],u=null;f();async function f(){t(3,r=!0);try{const y=await de.collections.getFullList(200,{sort:"created"});t(2,a=W.sortCollections(y))}catch(y){de.errorResponseHandler(y)}t(3,r=!1)}const c=()=>u==null?void 0:u.show();function d(y){n.$$.not_equal(l.collectionId,y)&&(l.collectionId=y,t(0,l))}function h(){l.maxSelect=rt(this.value),t(0,l)}function m(y){n.$$.not_equal(l.cascadeDelete,y)&&(l.cascadeDelete=y,t(0,l))}function b(y){le[y?"unshift":"push"](()=>{u=y,t(4,u)})}const g=y=>{var k,$;($=(k=y==null?void 0:y.detail)==null?void 0:k.collection)!=null&&$.id&&t(0,l.collectionId=y.detail.collection.id,l),f()};return n.$$set=y=>{"key"in y&&t(1,s=y.key),"options"in y&&t(0,l=y.options)},n.$$.update=()=>{n.$$.dirty&1&&W.isEmpty(l)&&t(0,l={maxSelect:1,collectionId:null,cascadeDelete:!1}),n.$$.dirty&5&&t(5,i=a.find(y=>y.id==l.collectionId)||null)},[l,s,a,r,u,i,o,f,c,d,h,m,b,g]}class c3 extends ke{constructor(e){super(),ye(this,e,f3,u3,be,{key:1,options:0})}}function d3(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Max select"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",o=n[5]),p(l,"step","1"),p(l,"min","1"),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].maxSelect),r||(a=K(l,"input",n[3]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].maxSelect&&ce(l,u[0].maxSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function p3(n){let e,t,i,s,l,o,r;function a(f){n[4](f)}let u={id:n[5],items:n[2]};return n[0].cascadeDelete!==void 0&&(u.keyOfSelected=n[0].cascadeDelete),l=new xi({props:u}),le.push(()=>_e(l,"keyOfSelected",a)),{c(){e=v("label"),t=B("Delete record on user delete"),s=O(),j(l.$$.fragment),p(e,"for",i=n[5])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&32&&i!==(i=f[5]))&&p(e,"for",i);const d={};c&32&&(d.id=f[5]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].cascadeDelete,ve(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function h3(n){let e,t,i,s,l,o,r;return i=new ge({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[d3,({uniqueId:a})=>({5:a}),({uniqueId:a})=>a?32:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[p3,({uniqueId:a})=>({5:a}),({uniqueId:a})=>a?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.maxSelect"),u&97&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.cascadeDelete"),u&97&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(E(i.$$.fragment,a),E(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function m3(n,e,t){const i=[{label:"False",value:!1},{label:"True",value:!0}];let{key:s=""}=e,{options:l={}}=e;function o(){l.maxSelect=rt(this.value),t(0,l)}function r(a){n.$$.not_equal(l.cascadeDelete,a)&&(l.cascadeDelete=a,t(0,l))}return n.$$set=a=>{"key"in a&&t(1,s=a.key),"options"in a&&t(0,l=a.options)},n.$$.update=()=>{n.$$.dirty&1&&W.isEmpty(l)&&t(0,l={maxSelect:1,cascadeDelete:!1})},[l,s,i,o,r]}class g3 extends ke{constructor(e){super(),ye(this,e,m3,h3,be,{key:1,options:0})}}function _3(n){let e,t,i,s,l,o,r;function a(f){n[17](f)}let u={id:n[43],disabled:n[0].id};return n[0].type!==void 0&&(u.value=n[0].type),l=new l$({props:u}),le.push(()=>_e(l,"value",a)),{c(){e=v("label"),t=B("Type"),s=O(),j(l.$$.fragment),p(e,"for",i=n[43])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c[1]&4096&&i!==(i=f[43]))&&p(e,"for",i);const d={};c[1]&4096&&(d.id=f[43]),c[0]&1&&(d.disabled=f[0].id),!o&&c[0]&1&&(o=!0,d.value=f[0].type,ve(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function qc(n){let e,t,i;return{c(){e=v("span"),e.textContent="Duplicated or invalid name",p(e,"class","txt invalid-name-note svelte-1tpxlm5")},m(s,l){S(s,e,l),i=!0},i(s){i||(xe(()=>{t||(t=je(e,Sn,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){t||(t=je(e,Sn,{duration:150,x:5},!1)),t.run(0),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function b3(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m=!n[5]&&qc();return{c(){e=v("label"),t=v("span"),t.textContent="Name",i=O(),m&&m.c(),l=O(),o=v("input"),p(t,"class","txt"),p(e,"for",s=n[43]),p(o,"type","text"),p(o,"id",r=n[43]),o.required=!0,o.disabled=a=n[0].id&&n[0].system,p(o,"spellcheck","false"),o.autofocus=u=!n[0].id,o.value=f=n[0].name},m(b,g){S(b,e,g),_(e,t),_(e,i),m&&m.m(e,null),S(b,l,g),S(b,o,g),c=!0,n[0].id||o.focus(),d||(h=K(o,"input",n[18]),d=!0)},p(b,g){b[5]?m&&(pe(),P(m,1,1,()=>{m=null}),he()):m?g[0]&32&&E(m,1):(m=qc(),m.c(),E(m,1),m.m(e,null)),(!c||g[1]&4096&&s!==(s=b[43]))&&p(e,"for",s),(!c||g[1]&4096&&r!==(r=b[43]))&&p(o,"id",r),(!c||g[0]&1&&a!==(a=b[0].id&&b[0].system))&&(o.disabled=a),(!c||g[0]&1&&u!==(u=!b[0].id))&&(o.autofocus=u),(!c||g[0]&1&&f!==(f=b[0].name)&&o.value!==f)&&(o.value=f)},i(b){c||(E(m),c=!0)},o(b){P(m),c=!1},d(b){b&&w(e),m&&m.d(),b&&w(l),b&&w(o),d=!1,h()}}}function v3(n){let e,t,i;function s(o){n[29](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new g3({props:l}),le.push(()=>_e(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function y3(n){let e,t,i;function s(o){n[28](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new c3({props:l}),le.push(()=>_e(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function k3(n){let e,t,i;function s(o){n[27](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new s3({props:l}),le.push(()=>_e(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function w3(n){let e,t,i;function s(o){n[26](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new Z$({props:l}),le.push(()=>_e(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function S3(n){let e,t,i;function s(o){n[25](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new K$({props:l}),le.push(()=>_e(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function $3(n){let e,t,i;function s(o){n[24](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new z$({props:l}),le.push(()=>_e(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function C3(n){let e,t,i;function s(o){n[23](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new M$({props:l}),le.push(()=>_e(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function T3(n){let e,t,i;function s(o){n[22](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new R_({props:l}),le.push(()=>_e(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function M3(n){let e,t,i;function s(o){n[21](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new b$({props:l}),le.push(()=>_e(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function O3(n){let e,t,i;function s(o){n[20](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new g$({props:l}),le.push(()=>_e(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function D3(n){let e,t,i;function s(o){n[19](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new c$({props:l}),le.push(()=>_e(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function A3(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Nonempty",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[43]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",u=n[43])},m(d,h){S(d,e,h),e.checked=n[0].required,S(d,i,h),S(d,s,h),_(s,l),_(s,o),_(s,r),f||(c=[K(e,"change",n[30]),Ae(a=Be.call(null,r,{text:`Requires the field value to be nonempty -(aka. not ${W.zeroDefaultStr(n[0])}).`,position:"right"}))],f=!0)},p(d,h){h[1]&4096&&t!==(t=d[43])&&p(e,"id",t),h[0]&1&&(e.checked=d[0].required),a&&Jt(a.update)&&h[0]&1&&a.update.call(null,{text:`Requires the field value to be nonempty -(aka. not ${W.zeroDefaultStr(d[0])}).`,position:"right"}),h[1]&4096&&u!==(u=d[43])&&p(s,"for",u)},d(d){d&&w(e),d&&w(i),d&&w(s),f=!1,Pe(c)}}}function Vc(n){let e,t;return e=new ge({props:{class:"form-field form-field-toggle m-0",name:"unique",$$slots:{default:[E3,({uniqueId:i})=>({43:i}),({uniqueId:i})=>[0,i?4096:0]]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s[0]&1|s[1]&12288&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function E3(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Unique"),p(e,"type","checkbox"),p(e,"id",t=n[43]),p(s,"for",o=n[43])},m(u,f){S(u,e,f),e.checked=n[0].unique,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[31]),r=!0)},p(u,f){f[1]&4096&&t!==(t=u[43])&&p(e,"id",t),f[0]&1&&(e.checked=u[0].unique),f[1]&4096&&o!==(o=u[43])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function zc(n){let e,t,i,s,l,o,r,a,u,f;a=new Zn({props:{class:"dropdown dropdown-sm dropdown-upside dropdown-right dropdown-nowrap no-min-width",$$slots:{default:[I3]},$$scope:{ctx:n}}});let c=n[8]&&Bc(n);return{c(){e=v("div"),t=v("div"),i=O(),s=v("div"),l=v("button"),o=v("i"),r=O(),j(a.$$.fragment),u=O(),c&&c.c(),p(t,"class","flex-fill"),p(o,"class","ri-more-line"),p(l,"type","button"),p(l,"class","btn btn-circle btn-sm btn-secondary"),p(s,"class","inline-flex flex-gap-sm flex-nowrap"),p(e,"class","col-sm-4 txt-right")},m(d,h){S(d,e,h),_(e,t),_(e,i),_(e,s),_(s,l),_(l,o),_(l,r),R(a,l,null),_(s,u),c&&c.m(s,null),f=!0},p(d,h){const m={};h[1]&8192&&(m.$$scope={dirty:h,ctx:d}),a.$set(m),d[8]?c?c.p(d,h):(c=Bc(d),c.c(),c.m(s,null)):c&&(c.d(1),c=null)},i(d){f||(E(a.$$.fragment,d),f=!0)},o(d){P(a.$$.fragment,d),f=!1},d(d){d&&w(e),H(a),c&&c.d()}}}function I3(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Remove',p(e,"type","button"),p(e,"class","dropdown-item txt-right")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[9]),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function Bc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Done',p(e,"type","button"),p(e,"class","btn btn-sm btn-outline btn-expanded-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",Yn(n[3])),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function P3(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M,T;s=new ge({props:{class:"form-field required "+(n[0].id?"disabled":""),name:"schema."+n[1]+".type",$$slots:{default:[_3,({uniqueId:q})=>({43:q}),({uniqueId:q})=>[0,q?4096:0]]},$$scope:{ctx:n}}}),r=new ge({props:{class:` + (eg. 100x0) - resize to W width preserving the aspect ratio`,p(e,"class","m-0")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function nC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,b,y,k,$,C,M;function T(A){n[9](A)}let D={id:n[10],placeholder:"eg. 50x50, 480x720"};return n[0].thumbs!==void 0&&(D.value=n[0].thumbs),r=new es({props:D}),le.push(()=>_e(r,"value",T)),k=new Zn({props:{class:"dropdown dropdown-sm dropdown-center dropdown-nowrap p-r-10",$$slots:{default:[tC]},$$scope:{ctx:n}}}),{c(){e=v("label"),t=v("span"),t.textContent="Thumb sizes",i=O(),s=v("i"),o=O(),j(r.$$.fragment),u=O(),f=v("div"),c=v("span"),c.textContent="Use comma as separator.",d=O(),h=v("button"),m=v("span"),m.textContent="Supported formats",g=O(),b=v("i"),y=O(),j(k.$$.fragment),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[10]),p(c,"class","txt"),p(m,"class","txt link-primary"),p(b,"class","ri-arrow-drop-down-fill"),p(h,"type","button"),p(h,"class","inline-flex flex-gap-0"),p(f,"class","help-block")},m(A,I){S(A,e,I),_(e,t),_(e,i),_(e,s),S(A,o,I),R(r,A,I),S(A,u,I),S(A,f,I),_(f,c),_(f,d),_(f,h),_(h,m),_(h,g),_(h,b),_(h,y),R(k,h,null),$=!0,C||(M=Ee(Ue.call(null,s,{text:"List of additional thumb sizes for image files, along with the default thumb size of 100x100. The thumbs are generated lazily on first access.",position:"top"})),C=!0)},p(A,I){(!$||I&1024&&l!==(l=A[10]))&&p(e,"for",l);const L={};I&1024&&(L.id=A[10]),!a&&I&1&&(a=!0,L.value=A[0].thumbs,ve(()=>a=!1)),r.$set(L);const F={};I&2048&&(F.$$scope={dirty:I,ctx:A}),k.$set(F)},i(A){$||(E(r.$$.fragment,A),E(k.$$.fragment,A),$=!0)},o(A){P(r.$$.fragment,A),P(k.$$.fragment,A),$=!1},d(A){A&&w(e),A&&w(o),H(r,A),A&&w(u),A&&w(f),H(k),C=!1,M()}}}function iC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;return i=new ge({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSize",$$slots:{default:[X$,({uniqueId:m})=>({10:m}),({uniqueId:m})=>m?1024:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[Q$,({uniqueId:m})=>({10:m}),({uniqueId:m})=>m?1024:0]},$$scope:{ctx:n}}}),u=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.mimeTypes",$$slots:{default:[eC,({uniqueId:m})=>({10:m}),({uniqueId:m})=>m?1024:0]},$$scope:{ctx:n}}}),d=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.thumbs",$$slots:{default:[nC,({uniqueId:m})=>({10:m}),({uniqueId:m})=>m?1024:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),f=O(),c=v("div"),j(d.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(a,"class","col-sm-12"),p(c,"class","col-sm-12"),p(e,"class","grid")},m(m,g){S(m,e,g),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),R(u,a,null),_(e,f),_(e,c),R(d,c,null),h=!0},p(m,[g]){const b={};g&2&&(b.name="schema."+m[1]+".options.maxSize"),g&3073&&(b.$$scope={dirty:g,ctx:m}),i.$set(b);const y={};g&2&&(y.name="schema."+m[1]+".options.maxSelect"),g&3073&&(y.$$scope={dirty:g,ctx:m}),o.$set(y);const k={};g&2&&(k.name="schema."+m[1]+".options.mimeTypes"),g&3073&&(k.$$scope={dirty:g,ctx:m}),u.$set(k);const $={};g&2&&($.name="schema."+m[1]+".options.thumbs"),g&3073&&($.$$scope={dirty:g,ctx:m}),d.$set($)},i(m){h||(E(i.$$.fragment,m),E(o.$$.fragment,m),E(u.$$.fragment,m),E(d.$$.fragment,m),h=!0)},o(m){P(i.$$.fragment,m),P(o.$$.fragment,m),P(u.$$.fragment,m),P(d.$$.fragment,m),h=!1},d(m){m&&w(e),H(i),H(o),H(u),H(d)}}}function sC(n,e,t){let{key:i=""}=e,{options:s={}}=e;function l(){s.maxSize=rt(this.value),t(0,s)}function o(){s.maxSelect=rt(this.value),t(0,s)}function r(h){n.$$.not_equal(s.mimeTypes,h)&&(s.mimeTypes=h,t(0,s))}const a=()=>{t(0,s.mimeTypes=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],s)},u=()=>{t(0,s.mimeTypes=["image/jpg","image/jpeg","image/png","image/svg+xml","image/gif","image/webp"],s)},f=()=>{t(0,s.mimeTypes=["video/mp4","video/x-ms-wmv","video/quicktime","video/3gpp"],s)},c=()=>{t(0,s.mimeTypes=["application/zip","application/x-7z-compressed","application/x-rar-compressed"],s)};function d(h){n.$$.not_equal(s.thumbs,h)&&(s.thumbs=h,t(0,s))}return n.$$set=h=>{"key"in h&&t(1,i=h.key),"options"in h&&t(0,s=h.options)},n.$$.update=()=>{n.$$.dirty&1&&W.isEmpty(s)&&t(0,s={maxSelect:1,maxSize:5242880,thumbs:[],mimeTypes:[]})},[s,i,l,o,r,a,u,f,c,d]}class lC extends ke{constructor(e){super(),ye(this,e,sC,iC,be,{key:1,options:0})}}function oC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='New collection',p(e,"type","button"),p(e,"class","btn btn-warning btn-block btn-sm m-t-5")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[8]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function rC(n){let e,t,i,s,l,o,r;function a(f){n[9](f)}let u={searchable:n[2].length>5,selectPlaceholder:n[3]?"Loading...":"Select collection",noOptionsText:"No collections found",selectionKey:"id",items:n[2],$$slots:{afterOptions:[oC]},$$scope:{ctx:n}};return n[0].collectionId!==void 0&&(u.keyOfSelected=n[0].collectionId),l=new xi({props:u}),le.push(()=>_e(l,"keyOfSelected",a)),{c(){e=v("label"),t=B("Collection"),s=O(),j(l.$$.fragment),p(e,"for",i=n[14])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&16384&&i!==(i=f[14]))&&p(e,"for",i);const d={};c&4&&(d.searchable=f[2].length>5),c&8&&(d.selectPlaceholder=f[3]?"Loading...":"Select collection"),c&4&&(d.items=f[2]),c&32784&&(d.$$scope={dirty:c,ctx:f}),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].collectionId,ve(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function aC(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("span"),t.textContent="Max select",i=O(),s=v("i"),o=O(),r=v("input"),p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[14]),p(r,"type","number"),p(r,"id",a=n[14]),p(r,"step","1"),p(r,"min","1")},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),ce(r,n[0].maxSelect),u||(f=[Ee(Ue.call(null,s,{text:"Leave empty for no limit.",position:"top"})),K(r,"input",n[10])],u=!0)},p(c,d){d&16384&&l!==(l=c[14])&&p(e,"for",l),d&16384&&a!==(a=c[14])&&p(r,"id",a),d&1&&rt(r.value)!==c[0].maxSelect&&ce(r,c[0].maxSelect)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,Pe(f)}}}function uC(n){let e,t,i=(n[5]?n[5].name:"relation")+"",s,l,o,r,a,u,f;function c(h){n[11](h)}let d={id:n[14],items:n[6]};return n[0].cascadeDelete!==void 0&&(d.keyOfSelected=n[0].cascadeDelete),a=new xi({props:d}),le.push(()=>_e(a,"keyOfSelected",c)),{c(){e=v("label"),t=B("Delete record on "),s=B(i),l=B(" delete"),r=O(),j(a.$$.fragment),p(e,"for",o=n[14])},m(h,m){S(h,e,m),_(e,t),_(e,s),_(e,l),S(h,r,m),R(a,h,m),f=!0},p(h,m){(!f||m&32)&&i!==(i=(h[5]?h[5].name:"relation")+"")&&re(s,i),(!f||m&16384&&o!==(o=h[14]))&&p(e,"for",o);const g={};m&16384&&(g.id=h[14]),!u&&m&1&&(u=!0,g.keyOfSelected=h[0].cascadeDelete,ve(()=>u=!1)),a.$set(g)},i(h){f||(E(a.$$.fragment,h),f=!0)},o(h){P(a.$$.fragment,h),f=!1},d(h){h&&w(e),h&&w(r),H(a,h)}}}function fC(n){let e,t,i,s,l,o,r,a,u,f,c,d;i=new ge({props:{class:"form-field required",name:"schema."+n[1]+".options.collectionId",$$slots:{default:[rC,({uniqueId:m})=>({14:m}),({uniqueId:m})=>m?16384:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[aC,({uniqueId:m})=>({14:m}),({uniqueId:m})=>m?16384:0]},$$scope:{ctx:n}}}),u=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[uC,({uniqueId:m})=>({14:m}),({uniqueId:m})=>m?16384:0]},$$scope:{ctx:n}}});let h={};return c=new Za({props:h}),n[12](c),c.$on("save",n[13]),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),f=O(),j(c.$$.fragment),p(t,"class","col-sm-9"),p(l,"class","col-sm-3"),p(a,"class","col-sm-12"),p(e,"class","grid")},m(m,g){S(m,e,g),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),R(u,a,null),S(m,f,g),R(c,m,g),d=!0},p(m,[g]){const b={};g&2&&(b.name="schema."+m[1]+".options.collectionId"),g&49181&&(b.$$scope={dirty:g,ctx:m}),i.$set(b);const y={};g&2&&(y.name="schema."+m[1]+".options.maxSelect"),g&49153&&(y.$$scope={dirty:g,ctx:m}),o.$set(y);const k={};g&2&&(k.name="schema."+m[1]+".options.cascadeDelete"),g&49185&&(k.$$scope={dirty:g,ctx:m}),u.$set(k);const $={};c.$set($)},i(m){d||(E(i.$$.fragment,m),E(o.$$.fragment,m),E(u.$$.fragment,m),E(c.$$.fragment,m),d=!0)},o(m){P(i.$$.fragment,m),P(o.$$.fragment,m),P(u.$$.fragment,m),P(c.$$.fragment,m),d=!1},d(m){m&&w(e),H(i),H(o),H(u),m&&w(f),n[12](null),H(c,m)}}}function cC(n,e,t){let i,{key:s=""}=e,{options:l={}}=e;const o=[{label:"False",value:!1},{label:"True",value:!0}];let r=!1,a=[],u=null;f();async function f(){t(3,r=!0);try{const y=await de.collections.getFullList(200,{sort:"created"});t(2,a=W.sortCollections(y))}catch(y){de.errorResponseHandler(y)}t(3,r=!1)}const c=()=>u==null?void 0:u.show();function d(y){n.$$.not_equal(l.collectionId,y)&&(l.collectionId=y,t(0,l))}function h(){l.maxSelect=rt(this.value),t(0,l)}function m(y){n.$$.not_equal(l.cascadeDelete,y)&&(l.cascadeDelete=y,t(0,l))}function g(y){le[y?"unshift":"push"](()=>{u=y,t(4,u)})}const b=y=>{var k,$;($=(k=y==null?void 0:y.detail)==null?void 0:k.collection)!=null&&$.id&&t(0,l.collectionId=y.detail.collection.id,l),f()};return n.$$set=y=>{"key"in y&&t(1,s=y.key),"options"in y&&t(0,l=y.options)},n.$$.update=()=>{n.$$.dirty&1&&W.isEmpty(l)&&t(0,l={maxSelect:1,collectionId:null,cascadeDelete:!1}),n.$$.dirty&5&&t(5,i=a.find(y=>y.id==l.collectionId)||null)},[l,s,a,r,u,i,o,f,c,d,h,m,g,b]}class dC extends ke{constructor(e){super(),ye(this,e,cC,fC,be,{key:1,options:0})}}function pC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Max select"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","number"),p(l,"id",o=n[5]),p(l,"step","1"),p(l,"min","1"),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].maxSelect),r||(a=K(l,"input",n[3]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].maxSelect&&ce(l,u[0].maxSelect)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function hC(n){let e,t,i,s,l,o,r;function a(f){n[4](f)}let u={id:n[5],items:n[2]};return n[0].cascadeDelete!==void 0&&(u.keyOfSelected=n[0].cascadeDelete),l=new xi({props:u}),le.push(()=>_e(l,"keyOfSelected",a)),{c(){e=v("label"),t=B("Delete record on user delete"),s=O(),j(l.$$.fragment),p(e,"for",i=n[5])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&32&&i!==(i=f[5]))&&p(e,"for",i);const d={};c&32&&(d.id=f[5]),!o&&c&1&&(o=!0,d.keyOfSelected=f[0].cascadeDelete,ve(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function mC(n){let e,t,i,s,l,o,r;return i=new ge({props:{class:"form-field required",name:"schema."+n[1]+".options.maxSelect",$$slots:{default:[pC,({uniqueId:a})=>({5:a}),({uniqueId:a})=>a?32:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field",name:"schema."+n[1]+".options.cascadeDelete",$$slots:{default:[hC,({uniqueId:a})=>({5:a}),({uniqueId:a})=>a?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),p(t,"class","col-sm-6"),p(l,"class","col-sm-6"),p(e,"class","grid")},m(a,u){S(a,e,u),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),r=!0},p(a,[u]){const f={};u&2&&(f.name="schema."+a[1]+".options.maxSelect"),u&97&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};u&2&&(c.name="schema."+a[1]+".options.cascadeDelete"),u&97&&(c.$$scope={dirty:u,ctx:a}),o.$set(c)},i(a){r||(E(i.$$.fragment,a),E(o.$$.fragment,a),r=!0)},o(a){P(i.$$.fragment,a),P(o.$$.fragment,a),r=!1},d(a){a&&w(e),H(i),H(o)}}}function gC(n,e,t){const i=[{label:"False",value:!1},{label:"True",value:!0}];let{key:s=""}=e,{options:l={}}=e;function o(){l.maxSelect=rt(this.value),t(0,l)}function r(a){n.$$.not_equal(l.cascadeDelete,a)&&(l.cascadeDelete=a,t(0,l))}return n.$$set=a=>{"key"in a&&t(1,s=a.key),"options"in a&&t(0,l=a.options)},n.$$.update=()=>{n.$$.dirty&1&&W.isEmpty(l)&&t(0,l={maxSelect:1,cascadeDelete:!1})},[l,s,i,o,r]}class _C extends ke{constructor(e){super(),ye(this,e,gC,mC,be,{key:1,options:0})}}function bC(n){let e,t,i,s,l,o,r;function a(f){n[17](f)}let u={id:n[43],disabled:n[0].id};return n[0].type!==void 0&&(u.value=n[0].type),l=new o$({props:u}),le.push(()=>_e(l,"value",a)),{c(){e=v("label"),t=B("Type"),s=O(),j(l.$$.fragment),p(e,"for",i=n[43])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c[1]&4096&&i!==(i=f[43]))&&p(e,"for",i);const d={};c[1]&4096&&(d.id=f[43]),c[0]&1&&(d.disabled=f[0].id),!o&&c[0]&1&&(o=!0,d.value=f[0].type,ve(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function Vc(n){let e,t,i;return{c(){e=v("span"),e.textContent="Duplicated or invalid name",p(e,"class","txt invalid-name-note svelte-1tpxlm5")},m(s,l){S(s,e,l),i=!0},i(s){i||(xe(()=>{t||(t=je(e,Sn,{duration:150,x:5},!0)),t.run(1)}),i=!0)},o(s){t||(t=je(e,Sn,{duration:150,x:5},!1)),t.run(0),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function vC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m=!n[5]&&Vc();return{c(){e=v("label"),t=v("span"),t.textContent="Name",i=O(),m&&m.c(),l=O(),o=v("input"),p(t,"class","txt"),p(e,"for",s=n[43]),p(o,"type","text"),p(o,"id",r=n[43]),o.required=!0,o.disabled=a=n[0].id&&n[0].system,p(o,"spellcheck","false"),o.autofocus=u=!n[0].id,o.value=f=n[0].name},m(g,b){S(g,e,b),_(e,t),_(e,i),m&&m.m(e,null),S(g,l,b),S(g,o,b),c=!0,n[0].id||o.focus(),d||(h=K(o,"input",n[18]),d=!0)},p(g,b){g[5]?m&&(pe(),P(m,1,1,()=>{m=null}),he()):m?b[0]&32&&E(m,1):(m=Vc(),m.c(),E(m,1),m.m(e,null)),(!c||b[1]&4096&&s!==(s=g[43]))&&p(e,"for",s),(!c||b[1]&4096&&r!==(r=g[43]))&&p(o,"id",r),(!c||b[0]&1&&a!==(a=g[0].id&&g[0].system))&&(o.disabled=a),(!c||b[0]&1&&u!==(u=!g[0].id))&&(o.autofocus=u),(!c||b[0]&1&&f!==(f=g[0].name)&&o.value!==f)&&(o.value=f)},i(g){c||(E(m),c=!0)},o(g){P(m),c=!1},d(g){g&&w(e),m&&m.d(),g&&w(l),g&&w(o),d=!1,h()}}}function yC(n){let e,t,i;function s(o){n[29](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new _C({props:l}),le.push(()=>_e(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function kC(n){let e,t,i;function s(o){n[28](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new dC({props:l}),le.push(()=>_e(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function wC(n){let e,t,i;function s(o){n[27](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new lC({props:l}),le.push(()=>_e(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function SC(n){let e,t,i;function s(o){n[26](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new G$({props:l}),le.push(()=>_e(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function $C(n){let e,t,i;function s(o){n[25](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new J$({props:l}),le.push(()=>_e(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function CC(n){let e,t,i;function s(o){n[24](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new B$({props:l}),le.push(()=>_e(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function TC(n){let e,t,i;function s(o){n[23](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new O$({props:l}),le.push(()=>_e(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function MC(n){let e,t,i;function s(o){n[22](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new H_({props:l}),le.push(()=>_e(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function OC(n){let e,t,i;function s(o){n[21](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new v$({props:l}),le.push(()=>_e(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function DC(n){let e,t,i;function s(o){n[20](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new _$({props:l}),le.push(()=>_e(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function AC(n){let e,t,i;function s(o){n[19](o)}let l={key:n[1]};return n[0].options!==void 0&&(l.options=n[0].options),e=new d$({props:l}),le.push(()=>_e(e,"options",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[0]&2&&(a.key=o[1]),!t&&r[0]&1&&(t=!0,a.options=o[0].options,ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function EC(n){let e,t,i,s,l,o=hs(n[0])+"",r,a,u,f,c,d,h;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),r=B(o),a=O(),u=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[43]),p(l,"class","txt"),p(u,"class","ri-information-line link-hint"),p(s,"for",c=n[43])},m(m,g){S(m,e,g),e.checked=n[0].required,S(m,i,g),S(m,s,g),_(s,l),_(l,r),_(s,a),_(s,u),d||(h=[K(e,"change",n[30]),Ee(f=Ue.call(null,u,{text:`Requires the field value to be ${hs(n[0])} +(aka. not ${W.zeroDefaultStr(n[0])}).`,position:"right"}))],d=!0)},p(m,g){g[1]&4096&&t!==(t=m[43])&&p(e,"id",t),g[0]&1&&(e.checked=m[0].required),g[0]&1&&o!==(o=hs(m[0])+"")&&re(r,o),f&&Jt(f.update)&&g[0]&1&&f.update.call(null,{text:`Requires the field value to be ${hs(m[0])} +(aka. not ${W.zeroDefaultStr(m[0])}).`,position:"right"}),g[1]&4096&&c!==(c=m[43])&&p(s,"for",c)},d(m){m&&w(e),m&&w(i),m&&w(s),d=!1,Pe(h)}}}function zc(n){let e,t;return e=new ge({props:{class:"form-field form-field-toggle m-0",name:"unique",$$slots:{default:[IC,({uniqueId:i})=>({43:i}),({uniqueId:i})=>[0,i?4096:0]]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s[0]&1|s[1]&12288&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function IC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Unique"),p(e,"type","checkbox"),p(e,"id",t=n[43]),p(s,"for",o=n[43])},m(u,f){S(u,e,f),e.checked=n[0].unique,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[31]),r=!0)},p(u,f){f[1]&4096&&t!==(t=u[43])&&p(e,"id",t),f[0]&1&&(e.checked=u[0].unique),f[1]&4096&&o!==(o=u[43])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Bc(n){let e,t,i,s,l,o,r,a,u,f;a=new Zn({props:{class:"dropdown dropdown-sm dropdown-upside dropdown-right dropdown-nowrap no-min-width",$$slots:{default:[PC]},$$scope:{ctx:n}}});let c=n[8]&&Uc(n);return{c(){e=v("div"),t=v("div"),i=O(),s=v("div"),l=v("button"),o=v("i"),r=O(),j(a.$$.fragment),u=O(),c&&c.c(),p(t,"class","flex-fill"),p(o,"class","ri-more-line"),p(l,"type","button"),p(l,"class","btn btn-circle btn-sm btn-secondary"),p(s,"class","inline-flex flex-gap-sm flex-nowrap"),p(e,"class","col-sm-4 txt-right")},m(d,h){S(d,e,h),_(e,t),_(e,i),_(e,s),_(s,l),_(l,o),_(l,r),R(a,l,null),_(s,u),c&&c.m(s,null),f=!0},p(d,h){const m={};h[1]&8192&&(m.$$scope={dirty:h,ctx:d}),a.$set(m),d[8]?c?c.p(d,h):(c=Uc(d),c.c(),c.m(s,null)):c&&(c.d(1),c=null)},i(d){f||(E(a.$$.fragment,d),f=!0)},o(d){P(a.$$.fragment,d),f=!1},d(d){d&&w(e),H(a),c&&c.d()}}}function PC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Remove',p(e,"type","button"),p(e,"class","dropdown-item txt-right")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[9]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function Uc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Done',p(e,"type","button"),p(e,"class","btn btn-sm btn-outline btn-expanded-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",Yn(n[3])),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function LC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,b,y,k,$,C,M,T;s=new ge({props:{class:"form-field required "+(n[0].id?"disabled":""),name:"schema."+n[1]+".type",$$slots:{default:[bC,({uniqueId:q})=>({43:q}),({uniqueId:q})=>[0,q?4096:0]]},$$scope:{ctx:n}}}),r=new ge({props:{class:` form-field required `+(n[5]?"":"invalid")+` `+(n[0].id&&n[0].system?"disabled":"")+` - `,name:"schema."+n[1]+".name",$$slots:{default:[b3,({uniqueId:q})=>({43:q}),({uniqueId:q})=>[0,q?4096:0]]},$$scope:{ctx:n}}});const D=[D3,O3,M3,T3,C3,$3,S3,w3,k3,y3,v3],A=[];function I(q,z){return q[0].type==="text"?0:q[0].type==="number"?1:q[0].type==="bool"?2:q[0].type==="email"?3:q[0].type==="url"?4:q[0].type==="date"?5:q[0].type==="select"?6:q[0].type==="json"?7:q[0].type==="file"?8:q[0].type==="relation"?9:q[0].type==="user"?10:-1}~(f=I(n))&&(c=A[f]=D[f](n)),m=new ge({props:{class:"form-field form-field-toggle m-0",name:"requried",$$slots:{default:[A3,({uniqueId:q})=>({43:q}),({uniqueId:q})=>[0,q?4096:0]]},$$scope:{ctx:n}}});let L=n[0].type!=="file"&&Vc(n),F=!n[0].toDelete&&zc(n);return{c(){e=v("form"),t=v("div"),i=v("div"),j(s.$$.fragment),l=O(),o=v("div"),j(r.$$.fragment),a=O(),u=v("div"),c&&c.c(),d=O(),h=v("div"),j(m.$$.fragment),b=O(),g=v("div"),L&&L.c(),y=O(),F&&F.c(),k=O(),$=v("input"),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(u,"class","col-sm-12 hidden-empty"),p(h,"class","col-sm-4 flex"),p(g,"class","col-sm-4 flex"),p(t,"class","grid"),p($,"type","submit"),p($,"class","hidden"),p($,"tabindex","-1"),p(e,"class","field-form")},m(q,z){S(q,e,z),_(e,t),_(t,i),R(s,i,null),_(t,l),_(t,o),R(r,o,null),_(t,a),_(t,u),~f&&A[f].m(u,null),_(t,d),_(t,h),R(m,h,null),_(t,b),_(t,g),L&&L.m(g,null),_(t,y),F&&F.m(t,null),_(e,k),_(e,$),C=!0,M||(T=[K(e,"dragstart",F3),K(e,"submit",ut(n[32]))],M=!0)},p(q,z){const J={};z[0]&1&&(J.class="form-field required "+(q[0].id?"disabled":"")),z[0]&2&&(J.name="schema."+q[1]+".type"),z[0]&1|z[1]&12288&&(J.$$scope={dirty:z,ctx:q}),s.$set(J);const G={};z[0]&33&&(G.class=` + `,name:"schema."+n[1]+".name",$$slots:{default:[vC,({uniqueId:q})=>({43:q}),({uniqueId:q})=>[0,q?4096:0]]},$$scope:{ctx:n}}});const D=[AC,DC,OC,MC,TC,CC,$C,SC,wC,kC,yC],A=[];function I(q,z){return q[0].type==="text"?0:q[0].type==="number"?1:q[0].type==="bool"?2:q[0].type==="email"?3:q[0].type==="url"?4:q[0].type==="date"?5:q[0].type==="select"?6:q[0].type==="json"?7:q[0].type==="file"?8:q[0].type==="relation"?9:q[0].type==="user"?10:-1}~(f=I(n))&&(c=A[f]=D[f](n)),m=new ge({props:{class:"form-field form-field-toggle m-0",name:"requried",$$slots:{default:[EC,({uniqueId:q})=>({43:q}),({uniqueId:q})=>[0,q?4096:0]]},$$scope:{ctx:n}}});let L=n[0].type!=="file"&&zc(n),F=!n[0].toDelete&&Bc(n);return{c(){e=v("form"),t=v("div"),i=v("div"),j(s.$$.fragment),l=O(),o=v("div"),j(r.$$.fragment),a=O(),u=v("div"),c&&c.c(),d=O(),h=v("div"),j(m.$$.fragment),g=O(),b=v("div"),L&&L.c(),y=O(),F&&F.c(),k=O(),$=v("input"),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(u,"class","col-sm-12 hidden-empty"),p(h,"class","col-sm-4 flex"),p(b,"class","col-sm-4 flex"),p(t,"class","grid"),p($,"type","submit"),p($,"class","hidden"),p($,"tabindex","-1"),p(e,"class","field-form")},m(q,z){S(q,e,z),_(e,t),_(t,i),R(s,i,null),_(t,l),_(t,o),R(r,o,null),_(t,a),_(t,u),~f&&A[f].m(u,null),_(t,d),_(t,h),R(m,h,null),_(t,g),_(t,b),L&&L.m(b,null),_(t,y),F&&F.m(t,null),_(e,k),_(e,$),C=!0,M||(T=[K(e,"dragstart",RC),K(e,"submit",ut(n[32]))],M=!0)},p(q,z){const J={};z[0]&1&&(J.class="form-field required "+(q[0].id?"disabled":"")),z[0]&2&&(J.name="schema."+q[1]+".type"),z[0]&1|z[1]&12288&&(J.$$scope={dirty:z,ctx:q}),s.$set(J);const G={};z[0]&33&&(G.class=` form-field required `+(q[5]?"":"invalid")+` `+(q[0].id&&q[0].system?"disabled":"")+` - `),z[0]&2&&(G.name="schema."+q[1]+".name"),z[0]&33|z[1]&12288&&(G.$$scope={dirty:z,ctx:q}),r.$set(G);let ie=f;f=I(q),f===ie?~f&&A[f].p(q,z):(c&&(pe(),P(A[ie],1,1,()=>{A[ie]=null}),he()),~f?(c=A[f],c?c.p(q,z):(c=A[f]=D[f](q),c.c()),E(c,1),c.m(u,null)):c=null);const Q={};z[0]&1|z[1]&12288&&(Q.$$scope={dirty:z,ctx:q}),m.$set(Q),q[0].type!=="file"?L?(L.p(q,z),z[0]&1&&E(L,1)):(L=Vc(q),L.c(),E(L,1),L.m(g,null)):L&&(pe(),P(L,1,1,()=>{L=null}),he()),q[0].toDelete?F&&(pe(),P(F,1,1,()=>{F=null}),he()):F?(F.p(q,z),z[0]&1&&E(F,1)):(F=zc(q),F.c(),E(F,1),F.m(t,null))},i(q){C||(E(s.$$.fragment,q),E(r.$$.fragment,q),E(c),E(m.$$.fragment,q),E(L),E(F),C=!0)},o(q){P(s.$$.fragment,q),P(r.$$.fragment,q),P(c),P(m.$$.fragment,q),P(L),P(F),C=!1},d(q){q&&w(e),H(s),H(r),~f&&A[f].d(),H(m),L&&L.d(),F&&F.d(),M=!1,Pe(T)}}}function Uc(n){let e,t,i,s,l=n[0].system&&Wc(),o=!n[0].id&&Yc(n),r=n[0].required&&Kc(),a=n[0].unique&&Jc();return{c(){e=v("div"),l&&l.c(),t=O(),o&&o.c(),i=O(),r&&r.c(),s=O(),a&&a.c(),p(e,"class","inline-flex")},m(u,f){S(u,e,f),l&&l.m(e,null),_(e,t),o&&o.m(e,null),_(e,i),r&&r.m(e,null),_(e,s),a&&a.m(e,null)},p(u,f){u[0].system?l||(l=Wc(),l.c(),l.m(e,t)):l&&(l.d(1),l=null),u[0].id?o&&(o.d(1),o=null):o?o.p(u,f):(o=Yc(u),o.c(),o.m(e,i)),u[0].required?r||(r=Kc(),r.c(),r.m(e,s)):r&&(r.d(1),r=null),u[0].unique?a||(a=Jc(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},d(u){u&&w(e),l&&l.d(),o&&o.d(),r&&r.d(),a&&a.d()}}}function Wc(n){let e;return{c(){e=v("span"),e.textContent="System",p(e,"class","label label-danger")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Yc(n){let e;return{c(){e=v("span"),e.textContent="New",p(e,"class","label"),ne(e,"label-warning",n[8]&&!n[0].toDelete)},m(t,i){S(t,e,i)},p(t,i){i[0]&257&&ne(e,"label-warning",t[8]&&!t[0].toDelete)},d(t){t&&w(e)}}}function Kc(n){let e;return{c(){e=v("span"),e.textContent="Nonempty",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Jc(n){let e;return{c(){e=v("span"),e.textContent="Unique",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Zc(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ae(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(xe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function Gc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Restore',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-secondary")},m(s,l){S(s,e,l),t||(i=K(e,"click",Yn(n[16])),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function L3(n){let e,t,i,s,l,o,r=(n[0].name||"-")+"",a,u,f,c,d,h,m,b,g,y=!n[0].toDelete&&Uc(n),k=n[7]&&!n[0].system&&Zc(),$=n[0].toDelete&&Gc(n);return{c(){e=v("div"),t=v("span"),i=v("i"),l=O(),o=v("strong"),a=B(r),f=O(),y&&y.c(),c=O(),d=v("div"),h=O(),k&&k.c(),m=O(),$&&$.c(),b=Ee(),p(i,"class",s=ks(W.getFieldTypeIcon(n[0].type))+" svelte-1tpxlm5"),p(t,"class","icon field-type"),p(o,"class","title field-name svelte-1tpxlm5"),p(o,"title",u=n[0].name),ne(o,"txt-strikethrough",n[0].toDelete),p(e,"class","inline-flex"),p(d,"class","flex-fill")},m(C,M){S(C,e,M),_(e,t),_(t,i),_(e,l),_(e,o),_(o,a),S(C,f,M),y&&y.m(C,M),S(C,c,M),S(C,d,M),S(C,h,M),k&&k.m(C,M),S(C,m,M),$&&$.m(C,M),S(C,b,M),g=!0},p(C,M){(!g||M[0]&1&&s!==(s=ks(W.getFieldTypeIcon(C[0].type))+" svelte-1tpxlm5"))&&p(i,"class",s),(!g||M[0]&1)&&r!==(r=(C[0].name||"-")+"")&&ae(a,r),(!g||M[0]&1&&u!==(u=C[0].name))&&p(o,"title",u),(!g||M[0]&1)&&ne(o,"txt-strikethrough",C[0].toDelete),C[0].toDelete?y&&(y.d(1),y=null):y?y.p(C,M):(y=Uc(C),y.c(),y.m(c.parentNode,c)),C[7]&&!C[0].system?k?M[0]&129&&E(k,1):(k=Zc(),k.c(),E(k,1),k.m(m.parentNode,m)):k&&(pe(),P(k,1,1,()=>{k=null}),he()),C[0].toDelete?$?$.p(C,M):($=Gc(C),$.c(),$.m(b.parentNode,b)):$&&($.d(1),$=null)},i(C){g||(E(k),g=!0)},o(C){P(k),g=!1},d(C){C&&w(e),C&&w(f),y&&y.d(C),C&&w(c),C&&w(d),C&&w(h),k&&k.d(C),C&&w(m),$&&$.d(C),C&&w(b)}}}function N3(n){let e,t;const i=[{draggable:!0},{single:!0},{interactive:n[8]},{class:n[2]||n[0].toDelete||n[0].system?"field-accordion disabled":"field-accordion"},n[11]];let s={$$slots:{header:[L3],default:[P3]},$$scope:{ctx:n}};for(let l=0;l{n.stopPropagation(),n.preventDefault(),n.stopImmediatePropagation()};function R3(n,e,t){let i,s,l,o;const r=["key","field","disabled","excludeNames","expand","collapse"];let a=wt(e,r),u;Ze(n,wi,ue=>t(15,u=ue));const f=It();let{key:c="0"}=e,{field:d=new dn}=e,{disabled:h=!1}=e,{excludeNames:m=[]}=e,b,g=d.type;function y(){b==null||b.expand()}function k(){b==null||b.collapse()}function $(){d.id?t(0,d.toDelete=!0,d):(k(),f("remove"))}function C(ue){if(ue=(""+ue).toLowerCase(),!ue)return!1;for(const se of m)if(se.toLowerCase()===ue)return!1;return!0}function M(ue){return W.slugify(ue)}cn(()=>{d.id||y()});const T=()=>{t(0,d.toDelete=!1,d)};function D(ue){n.$$.not_equal(d.type,ue)&&(d.type=ue,t(0,d),t(14,g),t(4,b))}const A=ue=>{t(0,d.name=M(ue.target.value),d),ue.target.value=d.name};function I(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,g),t(4,b))}function L(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,g),t(4,b))}function F(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,g),t(4,b))}function q(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,g),t(4,b))}function z(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,g),t(4,b))}function J(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,g),t(4,b))}function G(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,g),t(4,b))}function ie(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,g),t(4,b))}function Q(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,g),t(4,b))}function X(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,g),t(4,b))}function Y(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,g),t(4,b))}function x(){d.required=this.checked,t(0,d),t(14,g),t(4,b)}function U(){d.unique=this.checked,t(0,d),t(14,g),t(4,b)}const re=()=>{i&&k()};function Re(ue){le[ue?"unshift":"push"](()=>{b=ue,t(4,b)})}function Ne(ue){Ve.call(this,n,ue)}function Le(ue){Ve.call(this,n,ue)}function Fe(ue){Ve.call(this,n,ue)}function me(ue){Ve.call(this,n,ue)}function Se(ue){Ve.call(this,n,ue)}function we(ue){Ve.call(this,n,ue)}function We(ue){Ve.call(this,n,ue)}return n.$$set=ue=>{e=Ke(Ke({},e),Wn(ue)),t(11,a=wt(e,r)),"key"in ue&&t(1,c=ue.key),"field"in ue&&t(0,d=ue.field),"disabled"in ue&&t(2,h=ue.disabled),"excludeNames"in ue&&t(12,m=ue.excludeNames)},n.$$.update=()=>{n.$$.dirty[0]&16385&&g!=d.type&&(t(14,g=d.type),t(0,d.options={},d),t(0,d.unique=!1,d)),n.$$.dirty[0]&17&&d.toDelete&&(b&&k(),d.originalName&&d.name!==d.originalName&&t(0,d.name=d.originalName,d)),n.$$.dirty[0]&1&&!d.originalName&&d.name&&t(0,d.originalName=d.name,d),n.$$.dirty[0]&1&&typeof d.toDelete>"u"&&t(0,d.toDelete=!1,d),n.$$.dirty[0]&1&&d.required&&t(0,d.nullable=!1,d),n.$$.dirty[0]&1&&t(6,i=!W.isEmpty(d.name)&&d.type),n.$$.dirty[0]&80&&(i||b&&y()),n.$$.dirty[0]&69&&t(8,s=!h&&!d.system&&!d.toDelete&&i),n.$$.dirty[0]&1&&t(5,l=C(d.name)),n.$$.dirty[0]&32802&&t(7,o=!l||!W.isEmpty(W.getNestedVal(u,`schema.${c}`)))},[d,c,h,k,b,l,i,o,s,$,M,a,m,y,g,u,T,D,A,I,L,F,q,z,J,G,ie,Q,X,Y,x,U,re,Re,Ne,Le,Fe,me,Se,we,We]}class H3 extends ke{constructor(e){super(),ye(this,e,R3,N3,be,{key:1,field:0,disabled:2,excludeNames:12,expand:13,collapse:3},null,[-1,-1])}get expand(){return this.$$.ctx[13]}get collapse(){return this.$$.ctx[3]}}function Xc(n,e,t){const i=n.slice();return i[13]=e[t],i[14]=e,i[15]=t,i}function Qc(n){let e,t,i,s,l,o,r,a;return{c(){e=B(`, + `),z[0]&2&&(G.name="schema."+q[1]+".name"),z[0]&33|z[1]&12288&&(G.$$scope={dirty:z,ctx:q}),r.$set(G);let ie=f;f=I(q),f===ie?~f&&A[f].p(q,z):(c&&(pe(),P(A[ie],1,1,()=>{A[ie]=null}),he()),~f?(c=A[f],c?c.p(q,z):(c=A[f]=D[f](q),c.c()),E(c,1),c.m(u,null)):c=null);const Q={};z[0]&1|z[1]&12288&&(Q.$$scope={dirty:z,ctx:q}),m.$set(Q),q[0].type!=="file"?L?(L.p(q,z),z[0]&1&&E(L,1)):(L=zc(q),L.c(),E(L,1),L.m(b,null)):L&&(pe(),P(L,1,1,()=>{L=null}),he()),q[0].toDelete?F&&(pe(),P(F,1,1,()=>{F=null}),he()):F?(F.p(q,z),z[0]&1&&E(F,1)):(F=Bc(q),F.c(),E(F,1),F.m(t,null))},i(q){C||(E(s.$$.fragment,q),E(r.$$.fragment,q),E(c),E(m.$$.fragment,q),E(L),E(F),C=!0)},o(q){P(s.$$.fragment,q),P(r.$$.fragment,q),P(c),P(m.$$.fragment,q),P(L),P(F),C=!1},d(q){q&&w(e),H(s),H(r),~f&&A[f].d(),H(m),L&&L.d(),F&&F.d(),M=!1,Pe(T)}}}function Wc(n){let e,t,i,s,l=n[0].system&&Yc(),o=!n[0].id&&Kc(n),r=n[0].required&&Jc(n),a=n[0].unique&&Zc();return{c(){e=v("div"),l&&l.c(),t=O(),o&&o.c(),i=O(),r&&r.c(),s=O(),a&&a.c(),p(e,"class","inline-flex")},m(u,f){S(u,e,f),l&&l.m(e,null),_(e,t),o&&o.m(e,null),_(e,i),r&&r.m(e,null),_(e,s),a&&a.m(e,null)},p(u,f){u[0].system?l||(l=Yc(),l.c(),l.m(e,t)):l&&(l.d(1),l=null),u[0].id?o&&(o.d(1),o=null):o?o.p(u,f):(o=Kc(u),o.c(),o.m(e,i)),u[0].required?r?r.p(u,f):(r=Jc(u),r.c(),r.m(e,s)):r&&(r.d(1),r=null),u[0].unique?a||(a=Zc(),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},d(u){u&&w(e),l&&l.d(),o&&o.d(),r&&r.d(),a&&a.d()}}}function Yc(n){let e;return{c(){e=v("span"),e.textContent="System",p(e,"class","label label-danger")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Kc(n){let e;return{c(){e=v("span"),e.textContent="New",p(e,"class","label"),ne(e,"label-warning",n[8]&&!n[0].toDelete)},m(t,i){S(t,e,i)},p(t,i){i[0]&257&&ne(e,"label-warning",t[8]&&!t[0].toDelete)},d(t){t&&w(e)}}}function Jc(n){let e,t=hs(n[0])+"",i;return{c(){e=v("span"),i=B(t),p(e,"class","label label-success")},m(s,l){S(s,e,l),_(e,i)},p(s,l){l[0]&1&&t!==(t=hs(s[0])+"")&&re(i,t)},d(s){s&&w(e)}}}function Zc(n){let e;return{c(){e=v("span"),e.textContent="Unique",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Gc(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ee(Ue.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(xe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function Xc(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Restore',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-secondary")},m(s,l){S(s,e,l),t||(i=K(e,"click",Yn(n[16])),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function NC(n){let e,t,i,s,l,o,r=(n[0].name||"-")+"",a,u,f,c,d,h,m,g,b,y=!n[0].toDelete&&Wc(n),k=n[7]&&!n[0].system&&Gc(),$=n[0].toDelete&&Xc(n);return{c(){e=v("div"),t=v("span"),i=v("i"),l=O(),o=v("strong"),a=B(r),f=O(),y&&y.c(),c=O(),d=v("div"),h=O(),k&&k.c(),m=O(),$&&$.c(),g=Ae(),p(i,"class",s=ws(W.getFieldTypeIcon(n[0].type))+" svelte-1tpxlm5"),p(t,"class","icon field-type"),p(o,"class","title field-name svelte-1tpxlm5"),p(o,"title",u=n[0].name),ne(o,"txt-strikethrough",n[0].toDelete),p(e,"class","inline-flex"),p(d,"class","flex-fill")},m(C,M){S(C,e,M),_(e,t),_(t,i),_(e,l),_(e,o),_(o,a),S(C,f,M),y&&y.m(C,M),S(C,c,M),S(C,d,M),S(C,h,M),k&&k.m(C,M),S(C,m,M),$&&$.m(C,M),S(C,g,M),b=!0},p(C,M){(!b||M[0]&1&&s!==(s=ws(W.getFieldTypeIcon(C[0].type))+" svelte-1tpxlm5"))&&p(i,"class",s),(!b||M[0]&1)&&r!==(r=(C[0].name||"-")+"")&&re(a,r),(!b||M[0]&1&&u!==(u=C[0].name))&&p(o,"title",u),(!b||M[0]&1)&&ne(o,"txt-strikethrough",C[0].toDelete),C[0].toDelete?y&&(y.d(1),y=null):y?y.p(C,M):(y=Wc(C),y.c(),y.m(c.parentNode,c)),C[7]&&!C[0].system?k?M[0]&129&&E(k,1):(k=Gc(),k.c(),E(k,1),k.m(m.parentNode,m)):k&&(pe(),P(k,1,1,()=>{k=null}),he()),C[0].toDelete?$?$.p(C,M):($=Xc(C),$.c(),$.m(g.parentNode,g)):$&&($.d(1),$=null)},i(C){b||(E(k),b=!0)},o(C){P(k),b=!1},d(C){C&&w(e),C&&w(f),y&&y.d(C),C&&w(c),C&&w(d),C&&w(h),k&&k.d(C),C&&w(m),$&&$.d(C),C&&w(g)}}}function FC(n){let e,t;const i=[{draggable:!0},{single:!0},{interactive:n[8]},{class:n[2]||n[0].toDelete||n[0].system?"field-accordion disabled":"field-accordion"},n[11]];let s={$$slots:{header:[NC],default:[LC]},$$scope:{ctx:n}};for(let l=0;l{n.stopPropagation(),n.preventDefault(),n.stopImmediatePropagation()};function HC(n,e,t){let i,s,l,o;const r=["key","field","disabled","excludeNames","expand","collapse"];let a=wt(e,r),u;Ze(n,wi,ue=>t(15,u=ue));const f=It();let{key:c="0"}=e,{field:d=new dn}=e,{disabled:h=!1}=e,{excludeNames:m=[]}=e,g,b=d.type;function y(){g==null||g.expand()}function k(){g==null||g.collapse()}function $(){d.id?t(0,d.toDelete=!0,d):(k(),f("remove"))}function C(ue){if(ue=(""+ue).toLowerCase(),!ue)return!1;for(const se of m)if(se.toLowerCase()===ue)return!1;return!0}function M(ue){return W.slugify(ue)}cn(()=>{d.id||y()});const T=()=>{t(0,d.toDelete=!1,d)};function D(ue){n.$$.not_equal(d.type,ue)&&(d.type=ue,t(0,d),t(14,b),t(4,g))}const A=ue=>{t(0,d.name=M(ue.target.value),d),ue.target.value=d.name};function I(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,b),t(4,g))}function L(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,b),t(4,g))}function F(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,b),t(4,g))}function q(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,b),t(4,g))}function z(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,b),t(4,g))}function J(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,b),t(4,g))}function G(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,b),t(4,g))}function ie(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,b),t(4,g))}function Q(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,b),t(4,g))}function X(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,b),t(4,g))}function Y(ue){n.$$.not_equal(d.options,ue)&&(d.options=ue,t(0,d),t(14,b),t(4,g))}function x(){d.required=this.checked,t(0,d),t(14,b),t(4,g)}function U(){d.unique=this.checked,t(0,d),t(14,b),t(4,g)}const ae=()=>{i&&k()};function Re(ue){le[ue?"unshift":"push"](()=>{g=ue,t(4,g)})}function Ne(ue){Ve.call(this,n,ue)}function Le(ue){Ve.call(this,n,ue)}function Fe(ue){Ve.call(this,n,ue)}function me(ue){Ve.call(this,n,ue)}function Se(ue){Ve.call(this,n,ue)}function we(ue){Ve.call(this,n,ue)}function We(ue){Ve.call(this,n,ue)}return n.$$set=ue=>{e=Ke(Ke({},e),Wn(ue)),t(11,a=wt(e,r)),"key"in ue&&t(1,c=ue.key),"field"in ue&&t(0,d=ue.field),"disabled"in ue&&t(2,h=ue.disabled),"excludeNames"in ue&&t(12,m=ue.excludeNames)},n.$$.update=()=>{n.$$.dirty[0]&16385&&b!=d.type&&(t(14,b=d.type),t(0,d.options={},d),t(0,d.unique=!1,d)),n.$$.dirty[0]&17&&d.toDelete&&(g&&k(),d.originalName&&d.name!==d.originalName&&t(0,d.name=d.originalName,d)),n.$$.dirty[0]&1&&!d.originalName&&d.name&&t(0,d.originalName=d.name,d),n.$$.dirty[0]&1&&typeof d.toDelete>"u"&&t(0,d.toDelete=!1,d),n.$$.dirty[0]&1&&d.required&&t(0,d.nullable=!1,d),n.$$.dirty[0]&1&&t(6,i=!W.isEmpty(d.name)&&d.type),n.$$.dirty[0]&80&&(i||g&&y()),n.$$.dirty[0]&69&&t(8,s=!h&&!d.system&&!d.toDelete&&i),n.$$.dirty[0]&1&&t(5,l=C(d.name)),n.$$.dirty[0]&32802&&t(7,o=!l||!W.isEmpty(W.getNestedVal(u,`schema.${c}`)))},[d,c,h,k,g,l,i,o,s,$,M,a,m,y,b,u,T,D,A,I,L,F,q,z,J,G,ie,Q,X,Y,x,U,ae,Re,Ne,Le,Fe,me,Se,we,We]}class jC extends ke{constructor(e){super(),ye(this,e,HC,FC,be,{key:1,field:0,disabled:2,excludeNames:12,expand:13,collapse:3},null,[-1,-1])}get expand(){return this.$$.ctx[13]}get collapse(){return this.$$.ctx[3]}}function Qc(n,e,t){const i=n.slice();return i[13]=e[t],i[14]=e,i[15]=t,i}function xc(n){let e,t,i,s,l,o,r,a;return{c(){e=B(`, `),t=v("code"),t.textContent="username",i=B(` , `),s=v("code"),s.textContent="email",l=B(` , `),o=v("code"),o.textContent="emailVisibility",r=B(` , - `),a=v("code"),a.textContent="verified",p(t,"class","txt-sm"),p(s,"class","txt-sm"),p(o,"class","txt-sm"),p(a,"class","txt-sm")},m(u,f){S(u,e,f),S(u,t,f),S(u,i,f),S(u,s,f),S(u,l,f),S(u,o,f),S(u,r,f),S(u,a,f)},d(u){u&&w(e),u&&w(t),u&&w(i),u&&w(s),u&&w(l),u&&w(o),u&&w(r),u&&w(a)}}}function xc(n,e){let t,i,s,l;function o(c){e[6](c,e[13],e[14],e[15])}function r(){return e[7](e[15])}function a(...c){return e[8](e[15],...c)}function u(...c){return e[9](e[15],...c)}let f={key:e[15],excludeNames:e[1].concat(e[4](e[13]))};return e[13]!==void 0&&(f.field=e[13]),i=new H3({props:f}),le.push(()=>_e(i,"field",o)),i.$on("remove",r),i.$on("dragstart",a),i.$on("drop",u),{key:n,first:null,c(){t=Ee(),j(i.$$.fragment),this.first=t},m(c,d){S(c,t,d),R(i,c,d),l=!0},p(c,d){e=c;const h={};d&1&&(h.key=e[15]),d&3&&(h.excludeNames=e[1].concat(e[4](e[13]))),!s&&d&1&&(s=!0,h.field=e[13],ve(()=>s=!1)),i.$set(h)},i(c){l||(E(i.$$.fragment,c),l=!0)},o(c){P(i.$$.fragment,c),l=!1},d(c){c&&w(t),H(i,c)}}}function j3(n){let e,t,i,s,l,o,r,a,u,f,c,d,h=[],m=new Map,b,g,y,k,$,C,M,T,D,A,I,L=n[0].isAuth&&Qc(),F=n[0].schema;const q=z=>z[13];for(let z=0;z_e(i,"field",o)),i.$on("remove",r),i.$on("dragstart",a),i.$on("drop",u),{key:n,first:null,c(){t=Ae(),j(i.$$.fragment),this.first=t},m(c,d){S(c,t,d),R(i,c,d),l=!0},p(c,d){e=c;const h={};d&1&&(h.key=e[15]),d&3&&(h.excludeNames=e[1].concat(e[4](e[13]))),!s&&d&1&&(s=!0,h.field=e[13],ve(()=>s=!1)),i.$set(h)},i(c){l||(E(i.$$.fragment,c),l=!0)},o(c){P(i.$$.fragment,c),l=!1},d(c){c&&w(t),H(i,c)}}}function qC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h=[],m=new Map,g,b,y,k,$,C,M,T,D,A,I,L=n[0].isAuth&&xc(),F=n[0].schema;const q=z=>z[13];for(let z=0;zy.name===g)}function f(g){let y=[];if(g.toDelete)return y;for(let k of i.schema)k===g||k.toDelete||y.push(k.name);return y}function c(g,y){if(!g)return;g.dataTransfer.dropEffect="move";const k=parseInt(g.dataTransfer.getData("text/plain")),$=i.schema;ko(g),m=(g,y)=>q3(y==null?void 0:y.detail,g),b=(g,y)=>c(y==null?void 0:y.detail,g);return n.$$set=g=>{"collection"in g&&t(0,i=g.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof(i==null?void 0:i.schema)>"u"&&(t(0,i=i||{}),t(0,i.schema=[],i)),n.$$.dirty&1&&(i.isAuth?t(1,l=s.concat(["username","email","emailVisibility","verified","tokenKey","passwordHash","lastResetSentAt","lastVerificationSentAt","password","passwordConfirm","oldPassword"])):t(1,l=s.slice(0)))},[i,l,o,r,f,c,d,h,m,b]}class z3 extends ke{constructor(e){super(),ye(this,e,V3,j3,be,{collection:0})}}const B3=n=>({isAdminOnly:n&512}),ed=n=>({isAdminOnly:n[9]});function U3(n){let e,t,i,s;function l(a,u){return a[9]?K3:Y3}let o=l(n),r=o(n);return i=new ge({props:{class:"form-field rule-field m-0 "+(n[4]?"requied":"")+" "+(n[9]?"disabled":""),name:n[3],$$slots:{default:[X3,({uniqueId:a})=>({17:a}),({uniqueId:a})=>a?131072:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),r.c(),t=O(),j(i.$$.fragment),p(e,"class","rule-block svelte-fjxz7k")},m(a,u){S(a,e,u),r.m(e,null),_(e,t),R(i,e,null),s=!0},p(a,u){o===(o=l(a))&&r?r.p(a,u):(r.d(1),r=o(a),r&&(r.c(),r.m(e,t)));const f={};u&528&&(f.class="form-field rule-field m-0 "+(a[4]?"requied":"")+" "+(a[9]?"disabled":"")),u&8&&(f.name=a[3]),u&164519&&(f.$$scope={dirty:u,ctx:a}),i.$set(f)},i(a){s||(E(i.$$.fragment,a),s=!0)},o(a){P(i.$$.fragment,a),s=!1},d(a){a&&w(e),r.d(),H(i)}}}function W3(n){let e;return{c(){e=v("div"),e.innerHTML='',p(e,"class","txt-center")},m(t,i){S(t,e,i)},p:te,i:te,o:te,d(t){t&&w(e)}}}function Y3(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline svelte-fjxz7k")},m(s,l){S(s,e,l),t||(i=[Ae(Be.call(null,e,{text:"Lock and set to Admins only",position:"left"})),K(e,"click",n[12])],t=!0)},p:te,d(s){s&&w(e),t=!1,Pe(i)}}}function K3(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","rule-toggle-btn btn btn-circle btn-outline btn-success svelte-fjxz7k")},m(s,l){S(s,e,l),t||(i=[Ae(Be.call(null,e,{text:"Unlock and set custom rule",position:"left"})),K(e,"click",n[11])],t=!0)},p:te,d(s){s&&w(e),t=!1,Pe(i)}}}function J3(n){let e;return{c(){e=B("Leave empty to grant everyone access")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Z3(n){let e;return{c(){e=B("Only admins will be able to perform this action (unlock to change)")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function G3(n){let e;function t(l,o){return l[9]?Z3:J3}let i=t(n),s=i(n);return{c(){e=v("p"),s.c()},m(l,o){S(l,e,o),s.m(e,null)},p(l,o){i!==(i=t(l))&&(s.d(1),s=i(l),s&&(s.c(),s.m(e,null)))},d(l){l&&w(e),s.d()}}}function X3(n){let e,t,i,s=n[9]?"Admins only":"Custom rule",l,o,r,a,u,f,c,d;function h($){n[14]($)}var m=n[7];function b($){let C={id:$[17],baseCollection:$[1],disabled:$[9]};return $[0]!==void 0&&(C.value=$[0]),{props:C}}m&&(a=jt(m,b(n)),n[13](a),le.push(()=>_e(a,"value",h)));const g=n[10].default,y=Ot(g,n,n[15],ed),k=y||G3(n);return{c(){e=v("label"),t=B(n[2]),i=B(" - "),l=B(s),r=O(),a&&j(a.$$.fragment),f=O(),c=v("div"),k&&k.c(),p(e,"for",o=n[17]),p(c,"class","help-block")},m($,C){S($,e,C),_(e,t),_(e,i),_(e,l),S($,r,C),a&&R(a,$,C),S($,f,C),S($,c,C),k&&k.m(c,null),d=!0},p($,C){(!d||C&4)&&ae(t,$[2]),(!d||C&512)&&s!==(s=$[9]?"Admins only":"Custom rule")&&ae(l,s),(!d||C&131072&&o!==(o=$[17]))&&p(e,"for",o);const M={};if(C&131072&&(M.id=$[17]),C&2&&(M.baseCollection=$[1]),C&512&&(M.disabled=$[9]),!u&&C&1&&(u=!0,M.value=$[0],ve(()=>u=!1)),m!==(m=$[7])){if(a){pe();const T=a;P(T.$$.fragment,1,0,()=>{H(T,1)}),he()}m?(a=jt(m,b($)),$[13](a),le.push(()=>_e(a,"value",h)),j(a.$$.fragment),E(a.$$.fragment,1),R(a,f.parentNode,f)):a=null}else m&&a.$set(M);y?y.p&&(!d||C&33280)&&At(y,g,$,$[15],d?Dt(g,$[15],C,B3):Et($[15]),ed):k&&k.p&&(!d||C&512)&&k.p($,d?C:-1)},i($){d||(a&&E(a.$$.fragment,$),E(k,$),d=!0)},o($){a&&P(a.$$.fragment,$),P(k,$),d=!1},d($){$&&w(e),$&&w(r),n[13](null),a&&H(a,$),$&&w(f),$&&w(c),k&&k.d($)}}}function Q3(n){let e,t,i,s;const l=[W3,U3],o=[];function r(a,u){return a[8]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Ee()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(pe(),P(o[f],1,1,()=>{o[f]=null}),he(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),E(t,1),t.m(i.parentNode,i))},i(a){s||(E(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}let td;function x3(n,e,t){let i,{$$slots:s={},$$scope:l}=e,{collection:o=null}=e,{rule:r=null}=e,{label:a="Rule"}=e,{formKey:u="rule"}=e,{required:f=!1}=e,c=null,d=null,h=td,m=!1;async function b(){h||m||(t(8,m=!0),t(7,h=(await st(()=>import("./FilterAutocompleteInput.cea6a97d.js"),["./FilterAutocompleteInput.cea6a97d.js","./index.e8a8986f.js"],import.meta.url)).default),td=h,t(8,m=!1))}b();const g=async()=>{t(0,r=d||""),await Tn(),c==null||c.focus()},y=()=>{t(6,d=r),t(0,r=null)};function k(C){le[C?"unshift":"push"](()=>{c=C,t(5,c)})}function $(C){r=C,t(0,r)}return n.$$set=C=>{"collection"in C&&t(1,o=C.collection),"rule"in C&&t(0,r=C.rule),"label"in C&&t(2,a=C.label),"formKey"in C&&t(3,u=C.formKey),"required"in C&&t(4,f=C.required),"$$scope"in C&&t(15,l=C.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(9,i=r===null)},[r,o,a,u,f,c,d,h,m,i,s,g,y,k,$,l]}class ps extends ke{constructor(e){super(),ye(this,e,x3,Q3,be,{collection:1,rule:0,label:2,formKey:3,required:4})}}function nd(n,e,t){const i=n.slice();return i[9]=e[t],i}function id(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M,T,D,A,I,L,F,q,z,J,G=n[0].schema,ie=[];for(let Q=0;Q@request filter:",y=O(),k=v("div"),k.innerHTML=`@request.method + .`),c=O(),d=v("div");for(let G=0;Gy.name===b)}function f(b){let y=[];if(b.toDelete)return y;for(let k of i.schema)k===b||k.toDelete||y.push(k.name);return y}function c(b,y){if(!b)return;b.dataTransfer.dropEffect="move";const k=parseInt(b.dataTransfer.getData("text/plain")),$=i.schema;ko(b),m=(b,y)=>VC(y==null?void 0:y.detail,b),g=(b,y)=>c(y==null?void 0:y.detail,b);return n.$$set=b=>{"collection"in b&&t(0,i=b.collection)},n.$$.update=()=>{n.$$.dirty&1&&typeof(i==null?void 0:i.schema)>"u"&&(t(0,i=i||{}),t(0,i.schema=[],i)),n.$$.dirty&1&&(i.isAuth?t(1,l=s.concat(["username","email","emailVisibility","verified","tokenKey","passwordHash","lastResetSentAt","lastVerificationSentAt","password","passwordConfirm","oldPassword"])):t(1,l=s.slice(0)))},[i,l,o,r,f,c,d,h,m,g]}class BC extends ke{constructor(e){super(),ye(this,e,zC,qC,be,{collection:0})}}const UC=n=>({isAdminOnly:n&256}),td=n=>({isAdminOnly:n[8]});function WC(n){let e,t;return e=new ge({props:{class:"form-field rule-field m-0 "+(n[4]?"requied":"")+" "+(n[8]?"disabled":""),name:n[3],$$slots:{default:[QC,({uniqueId:i})=>({17:i}),({uniqueId:i})=>i?131072:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s&272&&(l.class="form-field rule-field m-0 "+(i[4]?"requied":"")+" "+(i[8]?"disabled":"")),s&8&&(l.name=i[3]),s&147815&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function YC(n){let e;return{c(){e=v("div"),e.innerHTML='',p(e,"class","txt-center")},m(t,i){S(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&w(e)}}}function KC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` + Set Admins only`,p(e,"type","button"),p(e,"class","lock-toggle link-hint svelte-1e6tebt")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[10]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function JC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` + Set custom rule`,p(e,"type","button"),p(e,"class","lock-toggle link-success svelte-1e6tebt")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[9]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function ZC(n){let e;return{c(){e=B("Leave empty to grant everyone access.")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function GC(n){let e,t,i,s,l;return{c(){e=B(`Only admins will be able to perform this action ( + `),t=v("button"),t.textContent="unlock to change",i=B(` + ).`),p(t,"type","button"),p(t,"class","link-hint")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=K(t,"click",n[9]),s=!0)},p:ee,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function XC(n){let e;function t(l,o){return l[8]?GC:ZC}let i=t(n),s=i(n);return{c(){e=v("p"),s.c()},m(l,o){S(l,e,o),s.m(e,null)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e,null)))},d(l){l&&w(e),s.d()}}}function QC(n){let e,t,i,s,l=n[8]?"Admins only":"Custom rule",o,r,a,u,f,c,d,h,m;function g(A,I){return A[8]?JC:KC}let b=g(n),y=b(n);function k(A){n[13](A)}var $=n[6];function C(A){let I={id:A[17],baseCollection:A[1],disabled:A[8]};return A[0]!==void 0&&(I.value=A[0]),{props:I}}$&&(f=jt($,C(n)),n[12](f),le.push(()=>_e(f,"value",k)));const M=n[11].default,T=Ot(M,n,n[14],td),D=T||XC(n);return{c(){e=v("label"),t=v("span"),i=B(n[2]),s=B(" - "),o=B(l),r=O(),y.c(),u=O(),f&&j(f.$$.fragment),d=O(),h=v("div"),D&&D.c(),p(t,"class","txt"),p(e,"for",a=n[17]),p(h,"class","help-block")},m(A,I){S(A,e,I),_(e,t),_(t,i),_(t,s),_(t,o),_(e,r),y.m(e,null),S(A,u,I),f&&R(f,A,I),S(A,d,I),S(A,h,I),D&&D.m(h,null),m=!0},p(A,I){(!m||I&4)&&re(i,A[2]),(!m||I&256)&&l!==(l=A[8]?"Admins only":"Custom rule")&&re(o,l),b===(b=g(A))&&y?y.p(A,I):(y.d(1),y=b(A),y&&(y.c(),y.m(e,null))),(!m||I&131072&&a!==(a=A[17]))&&p(e,"for",a);const L={};if(I&131072&&(L.id=A[17]),I&2&&(L.baseCollection=A[1]),I&256&&(L.disabled=A[8]),!c&&I&1&&(c=!0,L.value=A[0],ve(()=>c=!1)),$!==($=A[6])){if(f){pe();const F=f;P(F.$$.fragment,1,0,()=>{H(F,1)}),he()}$?(f=jt($,C(A)),A[12](f),le.push(()=>_e(f,"value",k)),j(f.$$.fragment),E(f.$$.fragment,1),R(f,d.parentNode,d)):f=null}else $&&f.$set(L);T?T.p&&(!m||I&16640)&&At(T,M,A,A[14],m?Dt(M,A[14],I,UC):Et(A[14]),td):D&&D.p&&(!m||I&256)&&D.p(A,m?I:-1)},i(A){m||(f&&E(f.$$.fragment,A),E(D,A),m=!0)},o(A){f&&P(f.$$.fragment,A),P(D,A),m=!1},d(A){A&&w(e),y.d(),A&&w(u),n[12](null),f&&H(f,A),A&&w(d),A&&w(h),D&&D.d(A)}}}function xC(n){let e,t,i,s;const l=[YC,WC],o=[];function r(a,u){return a[7]?0:1}return e=r(n),t=o[e]=l[e](n),{c(){t.c(),i=Ae()},m(a,u){o[e].m(a,u),S(a,i,u),s=!0},p(a,[u]){let f=e;e=r(a),e===f?o[e].p(a,u):(pe(),P(o[f],1,1,()=>{o[f]=null}),he(),t=o[e],t?t.p(a,u):(t=o[e]=l[e](a),t.c()),E(t,1),t.m(i.parentNode,i))},i(a){s||(E(t),s=!0)},o(a){P(t),s=!1},d(a){o[e].d(a),a&&w(i)}}}let nd;function e3(n,e,t){let i,{$$slots:s={},$$scope:l}=e,{collection:o=null}=e,{rule:r=null}=e,{label:a="Rule"}=e,{formKey:u="rule"}=e,{required:f=!1}=e,c=null,d=null,h=nd,m=!1;g();async function g(){h||m||(t(7,m=!0),t(6,h=(await st(()=>import("./FilterAutocompleteInput.b52a3ef2.js"),["./FilterAutocompleteInput.b52a3ef2.js","./index.e8a8986f.js"],import.meta.url)).default),nd=h,t(7,m=!1))}async function b(){t(0,r=d||""),await Tn(),c==null||c.focus()}async function y(){d=r,t(0,r=null)}function k(C){le[C?"unshift":"push"](()=>{c=C,t(5,c)})}function $(C){r=C,t(0,r)}return n.$$set=C=>{"collection"in C&&t(1,o=C.collection),"rule"in C&&t(0,r=C.rule),"label"in C&&t(2,a=C.label),"formKey"in C&&t(3,u=C.formKey),"required"in C&&t(4,f=C.required),"$$scope"in C&&t(14,l=C.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(8,i=r===null)},[r,o,a,u,f,c,h,m,i,b,y,s,k,$,l]}class ps extends ke{constructor(e){super(),ye(this,e,e3,xC,be,{collection:1,rule:0,label:2,formKey:3,required:4})}}function id(n,e,t){const i=n.slice();return i[9]=e[t],i}function sd(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,b,y,k,$,C,M,T,D,A,I,L,F,q,z,J,G=n[0].schema,ie=[];for(let Q=0;Q@request filter:",y=O(),k=v("div"),k.innerHTML=`@request.method @request.query.* @request.data.* @request.auth.*`,$=O(),C=v("hr"),M=O(),T=v("p"),T.innerHTML="You could also add constraints and query other collections using the @collection filter:",D=O(),A=v("div"),A.innerHTML="@collection.ANY_COLLECTION_NAME.*",I=O(),L=v("hr"),F=O(),q=v("p"),q.innerHTML=`Example rule:
    - @request.auth.id != "" && created > "2022-01-01 00:00:00"`,p(s,"class","m-b-0"),p(o,"class","inline-flex flex-gap-5"),p(m,"class","m-t-10 m-b-5"),p(g,"class","m-b-0"),p(k,"class","inline-flex flex-gap-5"),p(C,"class","m-t-10 m-b-5"),p(T,"class","m-b-0"),p(A,"class","inline-flex flex-gap-5"),p(L,"class","m-t-10 m-b-5"),p(i,"class","content"),p(t,"class","alert alert-warning m-0")},m(Q,X){S(Q,e,X),_(e,t),_(t,i),_(i,s),_(i,l),_(i,o),_(o,r),_(o,a),_(o,u),_(o,f),_(o,c),_(o,d);for(let Y=0;Y{z||(z=je(e,St,{duration:150},!0)),z.run(1)}),J=!0)},o(Q){Q&&(z||(z=je(e,St,{duration:150},!1)),z.run(0)),J=!1},d(Q){Q&&w(e),Mt(ie,Q),Q&&z&&z.end()}}}function eC(n){let e,t=n[9].name+"",i;return{c(){e=v("code"),i=B(t)},m(s,l){S(s,e,l),_(e,i)},p(s,l){l&1&&t!==(t=s[9].name+"")&&ae(i,t)},d(s){s&&w(e)}}}function tC(n){let e,t=n[9].name+"",i,s;return{c(){e=v("code"),i=B(t),s=B(".*")},m(l,o){S(l,e,o),_(e,i),_(e,s)},p(l,o){o&1&&t!==(t=l[9].name+"")&&ae(i,t)},d(l){l&&w(e)}}}function sd(n){let e;function t(l,o){return l[9].type==="relation"||l[9].type==="user"?tC:eC}let i=t(n),s=i(n);return{c(){s.c(),e=Ee()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function ld(n){let e,t,i,s,l;function o(a){n[8](a)}let r={label:"Manage action",formKey:"options.manageRule",collection:n[0],$$slots:{default:[nC]},$$scope:{ctx:n}};return n[0].options.manageRule!==void 0&&(r.rule=n[0].options.manageRule),i=new ps({props:r}),le.push(()=>_e(i,"rule",o)),{c(){e=v("hr"),t=O(),j(i.$$.fragment),p(e,"class","m-t-sm m-b-sm")},m(a,u){S(a,e,u),S(a,t,u),R(i,a,u),l=!0},p(a,u){const f={};u&1&&(f.collection=a[0]),u&4096&&(f.$$scope={dirty:u,ctx:a}),!s&&u&1&&(s=!0,f.rule=a[0].options.manageRule,ve(()=>s=!1)),i.$set(f)},i(a){l||(E(i.$$.fragment,a),l=!0)},o(a){P(i.$$.fragment,a),l=!1},d(a){a&&w(e),a&&w(t),H(i,a)}}}function nC(n){let e,t,i;return{c(){e=v("p"),e.textContent=`This API rule gives admin-like permissions to allow fully managing the auth record(s), eg. + @request.auth.id != "" && created > "2022-01-01 00:00:00"`,p(s,"class","m-b-0"),p(o,"class","inline-flex flex-gap-5"),p(m,"class","m-t-10 m-b-5"),p(b,"class","m-b-0"),p(k,"class","inline-flex flex-gap-5"),p(C,"class","m-t-10 m-b-5"),p(T,"class","m-b-0"),p(A,"class","inline-flex flex-gap-5"),p(L,"class","m-t-10 m-b-5"),p(i,"class","content"),p(t,"class","alert alert-warning m-0")},m(Q,X){S(Q,e,X),_(e,t),_(t,i),_(i,s),_(i,l),_(i,o),_(o,r),_(o,a),_(o,u),_(o,f),_(o,c),_(o,d);for(let Y=0;Y{z||(z=je(e,St,{duration:150},!0)),z.run(1)}),J=!0)},o(Q){Q&&(z||(z=je(e,St,{duration:150},!1)),z.run(0)),J=!1},d(Q){Q&&w(e),Mt(ie,Q),Q&&z&&z.end()}}}function t3(n){let e,t=n[9].name+"",i;return{c(){e=v("code"),i=B(t)},m(s,l){S(s,e,l),_(e,i)},p(s,l){l&1&&t!==(t=s[9].name+"")&&re(i,t)},d(s){s&&w(e)}}}function n3(n){let e,t=n[9].name+"",i,s;return{c(){e=v("code"),i=B(t),s=B(".*")},m(l,o){S(l,e,o),_(e,i),_(e,s)},p(l,o){o&1&&t!==(t=l[9].name+"")&&re(i,t)},d(l){l&&w(e)}}}function ld(n){let e;function t(l,o){return l[9].type==="relation"||l[9].type==="user"?n3:t3}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function od(n){let e,t,i,s,l;function o(a){n[8](a)}let r={label:"Manage action",formKey:"options.manageRule",collection:n[0],$$slots:{default:[i3]},$$scope:{ctx:n}};return n[0].options.manageRule!==void 0&&(r.rule=n[0].options.manageRule),i=new ps({props:r}),le.push(()=>_e(i,"rule",o)),{c(){e=v("hr"),t=O(),j(i.$$.fragment),p(e,"class","m-t-sm m-b-sm")},m(a,u){S(a,e,u),S(a,t,u),R(i,a,u),l=!0},p(a,u){const f={};u&1&&(f.collection=a[0]),u&4096&&(f.$$scope={dirty:u,ctx:a}),!s&&u&1&&(s=!0,f.rule=a[0].options.manageRule,ve(()=>s=!1)),i.$set(f)},i(a){l||(E(i.$$.fragment,a),l=!0)},o(a){P(i.$$.fragment,a),l=!1},d(a){a&&w(e),a&&w(t),H(i,a)}}}function i3(n){let e,t,i;return{c(){e=v("p"),e.textContent=`This API rule gives admin-like permissions to allow fully managing the auth record(s), eg. changing the password without requiring to enter the old one, directly updating the verified - state or email, etc.`,t=O(),i=v("p"),i.innerHTML="This rule is executed in addition to the create and update API rules."},m(s,l){S(s,e,l),S(s,t,l),S(s,i,l)},p:te,d(s){s&&w(e),s&&w(t),s&&w(i)}}}function iC(n){var fe;let e,t,i,s,l,o=n[1]?"Hide available fields":"Show available fields",r,a,u,f,c,d,h,m,b,g,y,k,$,C,M,T,D,A,I,L,F,q,z,J,G,ie,Q,X,Y,x,U=n[1]&&id(n);function re(Z){n[3](Z)}let Re={label:"List/Search action",formKey:"listRule",collection:n[0]};n[0].listRule!==void 0&&(Re.rule=n[0].listRule),f=new ps({props:Re}),le.push(()=>_e(f,"rule",re));function Ne(Z){n[4](Z)}let Le={label:"View action",formKey:"viewRule",collection:n[0]};n[0].viewRule!==void 0&&(Le.rule=n[0].viewRule),b=new ps({props:Le}),le.push(()=>_e(b,"rule",Ne));function Fe(Z){n[5](Z)}let me={label:"Create action",formKey:"createRule",collection:n[0]};n[0].createRule!==void 0&&(me.rule=n[0].createRule),C=new ps({props:me}),le.push(()=>_e(C,"rule",Fe));function Se(Z){n[6](Z)}let we={label:"Update action",formKey:"updateRule",collection:n[0]};n[0].updateRule!==void 0&&(we.rule=n[0].updateRule),I=new ps({props:we}),le.push(()=>_e(I,"rule",Se));function We(Z){n[7](Z)}let ue={label:"Delete action",formKey:"deleteRule",collection:n[0]};n[0].deleteRule!==void 0&&(ue.rule=n[0].deleteRule),J=new ps({props:ue}),le.push(()=>_e(J,"rule",We));let se=((fe=n[0])==null?void 0:fe.isAuth)&&ld(n);return{c(){e=v("div"),t=v("div"),i=v("p"),i.innerHTML=`All rules follow the + state or email, etc.`,t=O(),i=v("p"),i.innerHTML="This rule is executed in addition to the create and update API rules."},m(s,l){S(s,e,l),S(s,t,l),S(s,i,l)},p:ee,d(s){s&&w(e),s&&w(t),s&&w(i)}}}function s3(n){var fe;let e,t,i,s,l,o=n[1]?"Hide available fields":"Show available fields",r,a,u,f,c,d,h,m,g,b,y,k,$,C,M,T,D,A,I,L,F,q,z,J,G,ie,Q,X,Y,x,U=n[1]&&sd(n);function ae(Z){n[3](Z)}let Re={label:"List/Search action",formKey:"listRule",collection:n[0]};n[0].listRule!==void 0&&(Re.rule=n[0].listRule),f=new ps({props:Re}),le.push(()=>_e(f,"rule",ae));function Ne(Z){n[4](Z)}let Le={label:"View action",formKey:"viewRule",collection:n[0]};n[0].viewRule!==void 0&&(Le.rule=n[0].viewRule),g=new ps({props:Le}),le.push(()=>_e(g,"rule",Ne));function Fe(Z){n[5](Z)}let me={label:"Create action",formKey:"createRule",collection:n[0]};n[0].createRule!==void 0&&(me.rule=n[0].createRule),C=new ps({props:me}),le.push(()=>_e(C,"rule",Fe));function Se(Z){n[6](Z)}let we={label:"Update action",formKey:"updateRule",collection:n[0]};n[0].updateRule!==void 0&&(we.rule=n[0].updateRule),I=new ps({props:we}),le.push(()=>_e(I,"rule",Se));function We(Z){n[7](Z)}let ue={label:"Delete action",formKey:"deleteRule",collection:n[0]};n[0].deleteRule!==void 0&&(ue.rule=n[0].deleteRule),J=new ps({props:ue}),le.push(()=>_e(J,"rule",We));let se=((fe=n[0])==null?void 0:fe.isAuth)&&od(n);return{c(){e=v("div"),t=v("div"),i=v("p"),i.innerHTML=`All rules follow the
    PocketBase filter syntax and operators - .`,s=O(),l=v("button"),r=B(o),a=O(),U&&U.c(),u=O(),j(f.$$.fragment),d=O(),h=v("hr"),m=O(),j(b.$$.fragment),y=O(),k=v("hr"),$=O(),j(C.$$.fragment),T=O(),D=v("hr"),A=O(),j(I.$$.fragment),F=O(),q=v("hr"),z=O(),j(J.$$.fragment),ie=O(),se&&se.c(),Q=Ee(),p(l,"type","button"),p(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),p(t,"class","flex txt-sm m-b-5"),p(e,"class","block m-b-base"),p(h,"class","m-t-sm m-b-sm"),p(k,"class","m-t-sm m-b-sm"),p(D,"class","m-t-sm m-b-sm"),p(q,"class","m-t-sm m-b-sm")},m(Z,Ce){S(Z,e,Ce),_(e,t),_(t,i),_(t,s),_(t,l),_(l,r),_(e,a),U&&U.m(e,null),S(Z,u,Ce),R(f,Z,Ce),S(Z,d,Ce),S(Z,h,Ce),S(Z,m,Ce),R(b,Z,Ce),S(Z,y,Ce),S(Z,k,Ce),S(Z,$,Ce),R(C,Z,Ce),S(Z,T,Ce),S(Z,D,Ce),S(Z,A,Ce),R(I,Z,Ce),S(Z,F,Ce),S(Z,q,Ce),S(Z,z,Ce),R(J,Z,Ce),S(Z,ie,Ce),se&&se.m(Z,Ce),S(Z,Q,Ce),X=!0,Y||(x=K(l,"click",n[2]),Y=!0)},p(Z,[Ce]){var Ti;(!X||Ce&2)&&o!==(o=Z[1]?"Hide available fields":"Show available fields")&&ae(r,o),Z[1]?U?(U.p(Z,Ce),Ce&2&&E(U,1)):(U=id(Z),U.c(),E(U,1),U.m(e,null)):U&&(pe(),P(U,1,1,()=>{U=null}),he());const Ue={};Ce&1&&(Ue.collection=Z[0]),!c&&Ce&1&&(c=!0,Ue.rule=Z[0].listRule,ve(()=>c=!1)),f.$set(Ue);const Vt={};Ce&1&&(Vt.collection=Z[0]),!g&&Ce&1&&(g=!0,Vt.rule=Z[0].viewRule,ve(()=>g=!1)),b.$set(Vt);const Gt={};Ce&1&&(Gt.collection=Z[0]),!M&&Ce&1&&(M=!0,Gt.rule=Z[0].createRule,ve(()=>M=!1)),C.$set(Gt);const sn={};Ce&1&&(sn.collection=Z[0]),!L&&Ce&1&&(L=!0,sn.rule=Z[0].updateRule,ve(()=>L=!1)),I.$set(sn);const Gn={};Ce&1&&(Gn.collection=Z[0]),!G&&Ce&1&&(G=!0,Gn.rule=Z[0].deleteRule,ve(()=>G=!1)),J.$set(Gn),(Ti=Z[0])!=null&&Ti.isAuth?se?(se.p(Z,Ce),Ce&1&&E(se,1)):(se=ld(Z),se.c(),E(se,1),se.m(Q.parentNode,Q)):se&&(pe(),P(se,1,1,()=>{se=null}),he())},i(Z){X||(E(U),E(f.$$.fragment,Z),E(b.$$.fragment,Z),E(C.$$.fragment,Z),E(I.$$.fragment,Z),E(J.$$.fragment,Z),E(se),X=!0)},o(Z){P(U),P(f.$$.fragment,Z),P(b.$$.fragment,Z),P(C.$$.fragment,Z),P(I.$$.fragment,Z),P(J.$$.fragment,Z),P(se),X=!1},d(Z){Z&&w(e),U&&U.d(),Z&&w(u),H(f,Z),Z&&w(d),Z&&w(h),Z&&w(m),H(b,Z),Z&&w(y),Z&&w(k),Z&&w($),H(C,Z),Z&&w(T),Z&&w(D),Z&&w(A),H(I,Z),Z&&w(F),Z&&w(q),Z&&w(z),H(J,Z),Z&&w(ie),se&&se.d(Z),Z&&w(Q),Y=!1,x()}}}function sC(n,e,t){let{collection:i=new Pn}=e,s=!1;const l=()=>t(1,s=!s);function o(d){n.$$.not_equal(i.listRule,d)&&(i.listRule=d,t(0,i))}function r(d){n.$$.not_equal(i.viewRule,d)&&(i.viewRule=d,t(0,i))}function a(d){n.$$.not_equal(i.createRule,d)&&(i.createRule=d,t(0,i))}function u(d){n.$$.not_equal(i.updateRule,d)&&(i.updateRule=d,t(0,i))}function f(d){n.$$.not_equal(i.deleteRule,d)&&(i.deleteRule=d,t(0,i))}function c(d){n.$$.not_equal(i.options.manageRule,d)&&(i.options.manageRule=d,t(0,i))}return n.$$set=d=>{"collection"in d&&t(0,i=d.collection)},[i,s,l,o,r,a,u,f,c]}class lC extends ke{constructor(e){super(),ye(this,e,sC,iC,be,{collection:0})}}function oC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowUsernameAuth,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[5]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowUsernameAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function rC(n){let e,t;return e=new ge({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowUsernameAuth",$$slots:{default:[oC,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s&12289&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function aC(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function uC(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function od(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ae(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(xe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function fC(n){let e,t,i,s,l,o,r;function a(d,h){return d[0].options.allowUsernameAuth?uC:aC}let u=a(n),f=u(n),c=n[3]&&od();return{c(){e=v("div"),e.innerHTML=` - Username/Password`,t=O(),i=v("div"),s=O(),f.c(),l=O(),c&&c.c(),o=Ee(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,h){S(d,e,h),S(d,t,h),S(d,i,h),S(d,s,h),f.m(d,h),S(d,l,h),c&&c.m(d,h),S(d,o,h),r=!0},p(d,h){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[3]?c?h&8&&E(c,1):(c=od(),c.c(),E(c,1),c.m(o.parentNode,o)):c&&(pe(),P(c,1,1,()=>{c=null}),he())},i(d){r||(E(c),r=!0)},o(d){P(c),r=!1},d(d){d&&w(e),d&&w(t),d&&w(i),d&&w(s),f.d(d),d&&w(l),c&&c.d(d),d&&w(o)}}}function cC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowEmailAuth,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[6]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowEmailAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function rd(n){let e,t,i,s,l,o,r,a;return i=new ge({props:{class:"form-field "+(W.isEmpty(n[0].options.onlyEmailDomains)?"":"disabled"),name:"options.exceptEmailDomains",$$slots:{default:[dC,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field "+(W.isEmpty(n[0].options.exceptEmailDomains)?"":"disabled"),name:"options.onlyEmailDomains",$$slots:{default:[pC,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid grid-sm p-t-sm")},m(u,f){S(u,e,f),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),a=!0},p(u,f){const c={};f&1&&(c.class="form-field "+(W.isEmpty(u[0].options.onlyEmailDomains)?"":"disabled")),f&12289&&(c.$$scope={dirty:f,ctx:u}),i.$set(c);const d={};f&1&&(d.class="form-field "+(W.isEmpty(u[0].options.exceptEmailDomains)?"":"disabled")),f&12289&&(d.$$scope={dirty:f,ctx:u}),o.$set(d)},i(u){a||(E(i.$$.fragment,u),E(o.$$.fragment,u),u&&xe(()=>{r||(r=je(e,St,{duration:150},!0)),r.run(1)}),a=!0)},o(u){P(i.$$.fragment,u),P(o.$$.fragment,u),u&&(r||(r=je(e,St,{duration:150},!1)),r.run(0)),a=!1},d(u){u&&w(e),H(i),H(o),u&&r&&r.end()}}}function dC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function m(g){n[7](g)}let b={id:n[12],disabled:!W.isEmpty(n[0].options.onlyEmailDomains)};return n[0].options.exceptEmailDomains!==void 0&&(b.value=n[0].options.exceptEmailDomains),r=new es({props:b}),le.push(()=>_e(r,"value",m)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=O(),s=v("i"),o=O(),j(r.$$.fragment),u=O(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(g,y){S(g,e,y),_(e,t),_(e,i),_(e,s),S(g,o,y),R(r,g,y),S(g,u,y),S(g,f,y),c=!0,d||(h=Ae(Be.call(null,s,{text:`Email domains that are NOT allowed to sign up. - This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(g,y){(!c||y&4096&&l!==(l=g[12]))&&p(e,"for",l);const k={};y&4096&&(k.id=g[12]),y&1&&(k.disabled=!W.isEmpty(g[0].options.onlyEmailDomains)),!a&&y&1&&(a=!0,k.value=g[0].options.exceptEmailDomains,ve(()=>a=!1)),r.$set(k)},i(g){c||(E(r.$$.fragment,g),c=!0)},o(g){P(r.$$.fragment,g),c=!1},d(g){g&&w(e),g&&w(o),H(r,g),g&&w(u),g&&w(f),d=!1,h()}}}function pC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function m(g){n[8](g)}let b={id:n[12],disabled:!W.isEmpty(n[0].options.exceptEmailDomains)};return n[0].options.onlyEmailDomains!==void 0&&(b.value=n[0].options.onlyEmailDomains),r=new es({props:b}),le.push(()=>_e(r,"value",m)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=O(),s=v("i"),o=O(),j(r.$$.fragment),u=O(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(g,y){S(g,e,y),_(e,t),_(e,i),_(e,s),S(g,o,y),R(r,g,y),S(g,u,y),S(g,f,y),c=!0,d||(h=Ae(Be.call(null,s,{text:`Email domains that are ONLY allowed to sign up. - This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(g,y){(!c||y&4096&&l!==(l=g[12]))&&p(e,"for",l);const k={};y&4096&&(k.id=g[12]),y&1&&(k.disabled=!W.isEmpty(g[0].options.exceptEmailDomains)),!a&&y&1&&(a=!0,k.value=g[0].options.onlyEmailDomains,ve(()=>a=!1)),r.$set(k)},i(g){c||(E(r.$$.fragment,g),c=!0)},o(g){P(r.$$.fragment,g),c=!1},d(g){g&&w(e),g&&w(o),H(r,g),g&&w(u),g&&w(f),d=!1,h()}}}function hC(n){let e,t,i,s;e=new ge({props:{class:"form-field form-field-toggle m-0",name:"options.allowEmailAuth",$$slots:{default:[cC,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowEmailAuth&&rd(n);return{c(){j(e.$$.fragment),t=O(),l&&l.c(),i=Ee()},m(o,r){R(e,o,r),S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowEmailAuth?l?(l.p(o,r),r&1&&E(l,1)):(l=rd(o),l.c(),E(l,1),l.m(i.parentNode,i)):l&&(pe(),P(l,1,1,()=>{l=null}),he())},i(o){s||(E(e.$$.fragment,o),E(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){H(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function mC(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function gC(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function ad(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ae(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(xe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function _C(n){let e,t,i,s,l,o,r;function a(d,h){return d[0].options.allowEmailAuth?gC:mC}let u=a(n),f=u(n),c=n[2]&&ad();return{c(){e=v("div"),e.innerHTML=` - Email/Password`,t=O(),i=v("div"),s=O(),f.c(),l=O(),c&&c.c(),o=Ee(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,h){S(d,e,h),S(d,t,h),S(d,i,h),S(d,s,h),f.m(d,h),S(d,l,h),c&&c.m(d,h),S(d,o,h),r=!0},p(d,h){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[2]?c?h&4&&E(c,1):(c=ad(),c.c(),E(c,1),c.m(o.parentNode,o)):c&&(pe(),P(c,1,1,()=>{c=null}),he())},i(d){r||(E(c),r=!0)},o(d){P(c),r=!1},d(d){d&&w(e),d&&w(t),d&&w(i),d&&w(s),f.d(d),d&&w(l),c&&c.d(d),d&&w(o)}}}function bC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowOAuth2Auth,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[9]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowOAuth2Auth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function ud(n){let e,t,i;return{c(){e=v("div"),e.innerHTML='',p(e,"class","block")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&xe(()=>{t||(t=je(e,St,{duration:150},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=je(e,St,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function vC(n){let e,t,i,s;e=new ge({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowOAuth2Auth",$$slots:{default:[bC,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowOAuth2Auth&&ud();return{c(){j(e.$$.fragment),t=O(),l&&l.c(),i=Ee()},m(o,r){R(e,o,r),S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowOAuth2Auth?l?r&1&&E(l,1):(l=ud(),l.c(),E(l,1),l.m(i.parentNode,i)):l&&(pe(),P(l,1,1,()=>{l=null}),he())},i(o){s||(E(e.$$.fragment,o),E(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){H(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function yC(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function kC(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function fd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ae(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(xe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function wC(n){let e,t,i,s,l,o,r;function a(d,h){return d[0].options.allowOAuth2Auth?kC:yC}let u=a(n),f=u(n),c=n[1]&&fd();return{c(){e=v("div"),e.innerHTML=` - OAuth2`,t=O(),i=v("div"),s=O(),f.c(),l=O(),c&&c.c(),o=Ee(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,h){S(d,e,h),S(d,t,h),S(d,i,h),S(d,s,h),f.m(d,h),S(d,l,h),c&&c.m(d,h),S(d,o,h),r=!0},p(d,h){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[1]?c?h&2&&E(c,1):(c=fd(),c.c(),E(c,1),c.m(o.parentNode,o)):c&&(pe(),P(c,1,1,()=>{c=null}),he())},i(d){r||(E(c),r=!0)},o(d){P(c),r=!1},d(d){d&&w(e),d&&w(t),d&&w(i),d&&w(s),f.d(d),d&&w(l),c&&c.d(d),d&&w(o)}}}function SC(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Minimum password length"),s=O(),l=v("input"),p(e,"for",i=n[12]),p(l,"type","number"),p(l,"id",o=n[12]),l.required=!0,p(l,"min","6"),p(l,"max","72")},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].options.minPasswordLength),r||(a=K(l,"input",n[10]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&o!==(o=u[12])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].options.minPasswordLength&&ce(l,u[0].options.minPasswordLength)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function $C(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Always require email",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(l,"class","txt"),p(r,"class","ri-information-line txt-sm link-hint"),p(s,"for",a=n[12])},m(c,d){S(c,e,d),e.checked=n[0].options.requireEmail,S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[K(e,"change",n[11]),Ae(Be.call(null,r,{text:`The constraint is applied only for new records. -Also note that some OAuth2 providers (like Twitter), don't return an email and the authentication may fail if the email field is required.`,position:"right"}))],u=!0)},p(c,d){d&4096&&t!==(t=c[12])&&p(e,"id",t),d&1&&(e.checked=c[0].options.requireEmail),d&4096&&a!==(a=c[12])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Pe(f)}}}function CC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y;return s=new bs({props:{single:!0,$$slots:{header:[fC],default:[rC]},$$scope:{ctx:n}}}),o=new bs({props:{single:!0,$$slots:{header:[_C],default:[hC]},$$scope:{ctx:n}}}),a=new bs({props:{single:!0,$$slots:{header:[wC],default:[vC]},$$scope:{ctx:n}}}),m=new ge({props:{class:"form-field required",name:"options.minPasswordLength",$$slots:{default:[SC,({uniqueId:k})=>({12:k}),({uniqueId:k})=>k?4096:0]},$$scope:{ctx:n}}}),g=new ge({props:{class:"form-field form-field-toggle m-b-sm",name:"options.requireEmail",$$slots:{default:[$C,({uniqueId:k})=>({12:k}),({uniqueId:k})=>k?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("h4"),e.textContent="Auth methods",t=O(),i=v("div"),j(s.$$.fragment),l=O(),j(o.$$.fragment),r=O(),j(a.$$.fragment),u=O(),f=v("hr"),c=O(),d=v("h4"),d.textContent="General",h=O(),j(m.$$.fragment),b=O(),j(g.$$.fragment),p(e,"class","section-title"),p(i,"class","accordions"),p(d,"class","section-title")},m(k,$){S(k,e,$),S(k,t,$),S(k,i,$),R(s,i,null),_(i,l),R(o,i,null),_(i,r),R(a,i,null),S(k,u,$),S(k,f,$),S(k,c,$),S(k,d,$),S(k,h,$),R(m,k,$),S(k,b,$),R(g,k,$),y=!0},p(k,[$]){const C={};$&8201&&(C.$$scope={dirty:$,ctx:k}),s.$set(C);const M={};$&8197&&(M.$$scope={dirty:$,ctx:k}),o.$set(M);const T={};$&8195&&(T.$$scope={dirty:$,ctx:k}),a.$set(T);const D={};$&12289&&(D.$$scope={dirty:$,ctx:k}),m.$set(D);const A={};$&12289&&(A.$$scope={dirty:$,ctx:k}),g.$set(A)},i(k){y||(E(s.$$.fragment,k),E(o.$$.fragment,k),E(a.$$.fragment,k),E(m.$$.fragment,k),E(g.$$.fragment,k),y=!0)},o(k){P(s.$$.fragment,k),P(o.$$.fragment,k),P(a.$$.fragment,k),P(m.$$.fragment,k),P(g.$$.fragment,k),y=!1},d(k){k&&w(e),k&&w(t),k&&w(i),H(s),H(o),H(a),k&&w(u),k&&w(f),k&&w(c),k&&w(d),k&&w(h),H(m,k),k&&w(b),H(g,k)}}}function TC(n,e,t){let i,s,l,o;Ze(n,wi,b=>t(4,o=b));let{collection:r=new Pn}=e;function a(){r.options.allowUsernameAuth=this.checked,t(0,r)}function u(){r.options.allowEmailAuth=this.checked,t(0,r)}function f(b){n.$$.not_equal(r.options.exceptEmailDomains,b)&&(r.options.exceptEmailDomains=b,t(0,r))}function c(b){n.$$.not_equal(r.options.onlyEmailDomains,b)&&(r.options.onlyEmailDomains=b,t(0,r))}function d(){r.options.allowOAuth2Auth=this.checked,t(0,r)}function h(){r.options.minPasswordLength=rt(this.value),t(0,r)}function m(){r.options.requireEmail=this.checked,t(0,r)}return n.$$set=b=>{"collection"in b&&t(0,r=b.collection)},n.$$.update=()=>{var b,g,y,k;n.$$.dirty&1&&r.isAuth&&W.isEmpty(r.options)&&t(0,r.options={allowEmailAuth:!0,allowUsernameAuth:!0,allowOAuth2Auth:!0,minPasswordLength:8},r),n.$$.dirty&16&&t(2,s=!W.isEmpty((b=o==null?void 0:o.options)==null?void 0:b.allowEmailAuth)||!W.isEmpty((g=o==null?void 0:o.options)==null?void 0:g.onlyEmailDomains)||!W.isEmpty((y=o==null?void 0:o.options)==null?void 0:y.exceptEmailDomains)),n.$$.dirty&16&&t(1,l=!W.isEmpty((k=o==null?void 0:o.options)==null?void 0:k.allowOAuth2Auth))},t(3,i=!1),[r,l,s,i,o,a,u,f,c,d,h,m]}class MC extends ke{constructor(e){super(),ye(this,e,TC,CC,be,{collection:0})}}function cd(n,e,t){const i=n.slice();return i[14]=e[t],i}function dd(n,e,t){const i=n.slice();return i[14]=e[t],i}function pd(n){let e;return{c(){e=v("p"),e.textContent="All data associated with the removed fields will be permanently deleted!"},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function hd(n){let e,t,i,s,l=n[1].originalName+"",o,r,a,u,f,c=n[1].name+"",d;return{c(){e=v("li"),t=v("div"),i=B(`Renamed collection - `),s=v("strong"),o=B(l),r=O(),a=v("i"),u=O(),f=v("strong"),d=B(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex")},m(h,m){S(h,e,m),_(e,t),_(t,i),_(t,s),_(s,o),_(t,r),_(t,a),_(t,u),_(t,f),_(f,d)},p(h,m){m&2&&l!==(l=h[1].originalName+"")&&ae(o,l),m&2&&c!==(c=h[1].name+"")&&ae(d,c)},d(h){h&&w(e)}}}function md(n){let e,t,i,s,l=n[14].originalName+"",o,r,a,u,f,c=n[14].name+"",d;return{c(){e=v("li"),t=v("div"),i=B(`Renamed field - `),s=v("strong"),o=B(l),r=O(),a=v("i"),u=O(),f=v("strong"),d=B(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex")},m(h,m){S(h,e,m),_(e,t),_(t,i),_(t,s),_(s,o),_(t,r),_(t,a),_(t,u),_(t,f),_(f,d)},p(h,m){m&16&&l!==(l=h[14].originalName+"")&&ae(o,l),m&16&&c!==(c=h[14].name+"")&&ae(d,c)},d(h){h&&w(e)}}}function gd(n){let e,t,i,s=n[14].name+"",l,o;return{c(){e=v("li"),t=B("Removed field "),i=v("span"),l=B(s),o=O(),p(i,"class","txt-bold"),p(e,"class","txt-danger")},m(r,a){S(r,e,a),_(e,t),_(e,i),_(i,l),_(e,o)},p(r,a){a&8&&s!==(s=r[14].name+"")&&ae(l,s)},d(r){r&&w(e)}}}function OC(n){let e,t,i,s,l,o,r,a,u,f,c,d,h=n[3].length&&pd(),m=n[5]&&hd(n),b=n[4],g=[];for(let $=0;$',i=O(),s=v("div"),l=v("p"),l.textContent=`If any of the following changes is part of another collection rule or filter, you'll have to - update it manually!`,o=O(),h&&h.c(),r=O(),a=v("h6"),a.textContent="Changes:",u=O(),f=v("ul"),m&&m.c(),c=O();for(let $=0;$Cancel',t=O(),i=v("button"),i.innerHTML='Confirm',e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-secondary"),p(i,"type","button"),p(i,"class","btn btn-expanded")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),e.focus(),s||(l=[K(e,"click",n[8]),K(i,"click",n[9])],s=!0)},p:te,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Pe(l)}}}function EC(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[AC],header:[DC],default:[OC]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&524346&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[10](null),H(e,s)}}}function IC(n,e,t){let i,s,l;const o=It();let r,a;async function u(y){t(1,a=y),await Tn(),!i&&!s.length&&!l.length?c():r==null||r.show()}function f(){r==null||r.hide()}function c(){f(),o("confirm")}const d=()=>f(),h=()=>c();function m(y){le[y?"unshift":"push"](()=>{r=y,t(2,r)})}function b(y){Ve.call(this,n,y)}function g(y){Ve.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&2&&t(5,i=(a==null?void 0:a.originalName)!=(a==null?void 0:a.name)),n.$$.dirty&2&&t(4,s=(a==null?void 0:a.schema.filter(y=>y.id&&!y.toDelete&&y.originalName!=y.name))||[]),n.$$.dirty&2&&t(3,l=(a==null?void 0:a.schema.filter(y=>y.id&&y.toDelete))||[])},[f,a,r,l,s,i,c,u,d,h,m,b,g]}class PC extends ke{constructor(e){super(),ye(this,e,IC,EC,be,{show:7,hide:0})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}}function _d(n,e,t){const i=n.slice();return i[43]=e[t][0],i[44]=e[t][1],i}function bd(n){let e,t,i,s;function l(r){n[30](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new lC({props:o}),le.push(()=>_e(t,"collection",l)),{c(){e=v("div"),j(t.$$.fragment),p(e,"class","tab-item active")},m(r,a){S(r,e,a),R(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],ve(()=>i=!1)),t.$set(u)},i(r){s||(E(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&w(e),H(t)}}}function vd(n){let e,t,i,s;function l(r){n[31](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new MC({props:o}),le.push(()=>_e(t,"collection",l)),{c(){e=v("div"),j(t.$$.fragment),p(e,"class","tab-item"),ne(e,"active",n[3]===Os)},m(r,a){S(r,e,a),R(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],ve(()=>i=!1)),t.$set(u),(!s||a[0]&8)&&ne(e,"active",r[3]===Os)},i(r){s||(E(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&w(e),H(t)}}}function LC(n){let e,t,i,s,l,o,r;function a(d){n[29](d)}let u={};n[2]!==void 0&&(u.collection=n[2]),i=new z3({props:u}),le.push(()=>_e(i,"collection",a));let f=n[3]===_l&&bd(n),c=n[2].isAuth&&vd(n);return{c(){e=v("div"),t=v("div"),j(i.$$.fragment),l=O(),f&&f.c(),o=O(),c&&c.c(),p(t,"class","tab-item"),ne(t,"active",n[3]===gi),p(e,"class","tabs-content svelte-b10vi")},m(d,h){S(d,e,h),_(e,t),R(i,t,null),_(e,l),f&&f.m(e,null),_(e,o),c&&c.m(e,null),r=!0},p(d,h){const m={};!s&&h[0]&4&&(s=!0,m.collection=d[2],ve(()=>s=!1)),i.$set(m),(!r||h[0]&8)&&ne(t,"active",d[3]===gi),d[3]===_l?f?(f.p(d,h),h[0]&8&&E(f,1)):(f=bd(d),f.c(),E(f,1),f.m(e,o)):f&&(pe(),P(f,1,1,()=>{f=null}),he()),d[2].isAuth?c?(c.p(d,h),h[0]&4&&E(c,1)):(c=vd(d),c.c(),E(c,1),c.m(e,null)):c&&(pe(),P(c,1,1,()=>{c=null}),he())},i(d){r||(E(i.$$.fragment,d),E(f),E(c),r=!0)},o(d){P(i.$$.fragment,d),P(f),P(c),r=!1},d(d){d&&w(e),H(i),f&&f.d(),c&&c.d()}}}function yd(n){let e,t,i,s,l,o,r;return o=new Zn({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[NC]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=O(),i=v("button"),s=v("i"),l=O(),j(o.$$.fragment),p(e,"class","flex-fill"),p(s,"class","ri-more-line"),p(i,"type","button"),p(i,"class","btn btn-sm btn-circle btn-secondary flex-gap-0")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),_(i,s),_(i,l),R(o,i,null),r=!0},p(a,u){const f={};u[1]&65536&&(f.$$scope={dirty:u,ctx:a}),o.$set(f)},i(a){r||(E(o.$$.fragment,a),r=!0)},o(a){P(o.$$.fragment,a),r=!1},d(a){a&&w(e),a&&w(t),a&&w(i),H(o)}}}function NC(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - Delete`,p(e,"type","button"),p(e,"class","dropdown-item txt-danger closable")},m(s,l){S(s,e,l),t||(i=K(e,"click",Yn(ut(n[22]))),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function kd(n){let e,t,i,s;return i=new Zn({props:{class:"dropdown dropdown-right dropdown-nowrap m-t-5",$$slots:{default:[FC]},$$scope:{ctx:n}}}),{c(){e=v("i"),t=O(),j(i.$$.fragment),p(e,"class","ri-arrow-down-s-fill")},m(l,o){S(l,e,o),S(l,t,o),R(i,l,o),s=!0},p(l,o){const r={};o[0]&68|o[1]&65536&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(e),l&&w(t),H(i,l)}}}function wd(n){let e,t,i,s,l,o=n[44]+"",r,a,u,f,c;function d(){return n[24](n[43])}return{c(){e=v("button"),t=v("i"),s=O(),l=v("span"),r=B(o),a=B(" collection"),u=O(),p(t,"class",i=ks(W.getCollectionTypeIcon(n[43]))+" svelte-b10vi"),p(l,"class","txt"),p(e,"type","button"),p(e,"class","dropdown-item closable"),ne(e,"selected",n[43]==n[2].type)},m(h,m){S(h,e,m),_(e,t),_(e,s),_(e,l),_(l,r),_(l,a),_(e,u),f||(c=K(e,"click",d),f=!0)},p(h,m){n=h,m[0]&64&&i!==(i=ks(W.getCollectionTypeIcon(n[43]))+" svelte-b10vi")&&p(t,"class",i),m[0]&64&&o!==(o=n[44]+"")&&ae(r,o),m[0]&68&&ne(e,"selected",n[43]==n[2].type)},d(h){h&&w(e),f=!1,c()}}}function FC(n){let e,t=Object.entries(n[6]),i=[];for(let s=0;s{F=null}),he()),(!A||J[0]&4&&C!==(C="btn btn-sm p-r-10 p-l-10 "+(z[2].isNew?"btn-hint":"btn-secondary")))&&p(d,"class",C),(!A||J[0]&4&&M!==(M=!z[2].isNew))&&(d.disabled=M),z[2].system?q||(q=Sd(),q.c(),q.m(D.parentNode,D)):q&&(q.d(1),q=null)},i(z){A||(E(F),A=!0)},o(z){P(F),A=!1},d(z){z&&w(e),z&&w(s),z&&w(l),z&&w(f),z&&w(c),F&&F.d(),z&&w(T),q&&q.d(z),z&&w(D),I=!1,L()}}}function $d(n){let e,t,i,s,l,o;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(r,a){S(r,e,a),s=!0,l||(o=Ae(t=Be.call(null,e,n[13])),l=!0)},p(r,a){t&&Jt(t.update)&&a[0]&8192&&t.update.call(null,r[13])},i(r){s||(r&&xe(()=>{i||(i=je(e,$t,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(r){r&&(i||(i=je(e,$t,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&w(e),r&&i&&i.end(),l=!1,o()}}}function Cd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ae(Be.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&xe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function Td(n){var a,u,f;let e,t,i,s=!W.isEmpty((a=n[5])==null?void 0:a.options)&&!((f=(u=n[5])==null?void 0:u.options)!=null&&f.manageRule),l,o,r=s&&Md();return{c(){e=v("button"),t=v("span"),t.textContent="Options",i=O(),r&&r.c(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","tab-item"),ne(e,"active",n[3]===Os)},m(c,d){S(c,e,d),_(e,t),_(e,i),r&&r.m(e,null),l||(o=K(e,"click",n[28]),l=!0)},p(c,d){var h,m,b;d[0]&32&&(s=!W.isEmpty((h=c[5])==null?void 0:h.options)&&!((b=(m=c[5])==null?void 0:m.options)!=null&&b.manageRule)),s?r?d[0]&32&&E(r,1):(r=Md(),r.c(),E(r,1),r.m(e,null)):r&&(pe(),P(r,1,1,()=>{r=null}),he()),d[0]&8&&ne(e,"active",c[3]===Os)},d(c){c&&w(e),r&&r.d(),l=!1,o()}}}function Md(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ae(Be.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&xe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function HC(n){var z,J,G,ie,Q,X,Y,x;let e,t=n[2].isNew?"New collection":"Edit collection",i,s,l,o,r,a,u,f,c,d,h,m,b=!W.isEmpty((z=n[5])==null?void 0:z.schema),g,y,k,$,C=!W.isEmpty((J=n[5])==null?void 0:J.listRule)||!W.isEmpty((G=n[5])==null?void 0:G.viewRule)||!W.isEmpty((ie=n[5])==null?void 0:ie.createRule)||!W.isEmpty((Q=n[5])==null?void 0:Q.updateRule)||!W.isEmpty((X=n[5])==null?void 0:X.deleteRule)||!W.isEmpty((x=(Y=n[5])==null?void 0:Y.options)==null?void 0:x.manageRule),M,T,D,A,I=!n[2].isNew&&!n[2].system&&yd(n);r=new ge({props:{class:"form-field collection-field-name required m-b-0 "+(n[12]?"disabled":""),name:"name",$$slots:{default:[RC,({uniqueId:U})=>({42:U}),({uniqueId:U})=>[0,U?2048:0]]},$$scope:{ctx:n}}});let L=b&&$d(n),F=C&&Cd(),q=n[2].isAuth&&Td(n);return{c(){e=v("h4"),i=B(t),s=O(),I&&I.c(),l=O(),o=v("form"),j(r.$$.fragment),a=O(),u=v("input"),f=O(),c=v("div"),d=v("button"),h=v("span"),h.textContent="Fields",m=O(),L&&L.c(),g=O(),y=v("button"),k=v("span"),k.textContent="API Rules",$=O(),F&&F.c(),M=O(),q&&q.c(),p(u,"type","submit"),p(u,"class","hidden"),p(u,"tabindex","-1"),p(o,"class","block"),p(h,"class","txt"),p(d,"type","button"),p(d,"class","tab-item"),ne(d,"active",n[3]===gi),p(k,"class","txt"),p(y,"type","button"),p(y,"class","tab-item"),ne(y,"active",n[3]===_l),p(c,"class","tabs-header stretched")},m(U,re){S(U,e,re),_(e,i),S(U,s,re),I&&I.m(U,re),S(U,l,re),S(U,o,re),R(r,o,null),_(o,a),_(o,u),S(U,f,re),S(U,c,re),_(c,d),_(d,h),_(d,m),L&&L.m(d,null),_(c,g),_(c,y),_(y,k),_(y,$),F&&F.m(y,null),_(c,M),q&&q.m(c,null),T=!0,D||(A=[K(o,"submit",ut(n[25])),K(d,"click",n[26]),K(y,"click",n[27])],D=!0)},p(U,re){var Ne,Le,Fe,me,Se,we,We,ue;(!T||re[0]&4)&&t!==(t=U[2].isNew?"New collection":"Edit collection")&&ae(i,t),!U[2].isNew&&!U[2].system?I?(I.p(U,re),re[0]&4&&E(I,1)):(I=yd(U),I.c(),E(I,1),I.m(l.parentNode,l)):I&&(pe(),P(I,1,1,()=>{I=null}),he());const Re={};re[0]&4096&&(Re.class="form-field collection-field-name required m-b-0 "+(U[12]?"disabled":"")),re[0]&4164|re[1]&67584&&(Re.$$scope={dirty:re,ctx:U}),r.$set(Re),re[0]&32&&(b=!W.isEmpty((Ne=U[5])==null?void 0:Ne.schema)),b?L?(L.p(U,re),re[0]&32&&E(L,1)):(L=$d(U),L.c(),E(L,1),L.m(d,null)):L&&(pe(),P(L,1,1,()=>{L=null}),he()),(!T||re[0]&8)&&ne(d,"active",U[3]===gi),re[0]&32&&(C=!W.isEmpty((Le=U[5])==null?void 0:Le.listRule)||!W.isEmpty((Fe=U[5])==null?void 0:Fe.viewRule)||!W.isEmpty((me=U[5])==null?void 0:me.createRule)||!W.isEmpty((Se=U[5])==null?void 0:Se.updateRule)||!W.isEmpty((we=U[5])==null?void 0:we.deleteRule)||!W.isEmpty((ue=(We=U[5])==null?void 0:We.options)==null?void 0:ue.manageRule)),C?F?re[0]&32&&E(F,1):(F=Cd(),F.c(),E(F,1),F.m(y,null)):F&&(pe(),P(F,1,1,()=>{F=null}),he()),(!T||re[0]&8)&&ne(y,"active",U[3]===_l),U[2].isAuth?q?q.p(U,re):(q=Td(U),q.c(),q.m(c,null)):q&&(q.d(1),q=null)},i(U){T||(E(I),E(r.$$.fragment,U),E(L),E(F),T=!0)},o(U){P(I),P(r.$$.fragment,U),P(L),P(F),T=!1},d(U){U&&w(e),U&&w(s),I&&I.d(U),U&&w(l),U&&w(o),H(r),U&&w(f),U&&w(c),L&&L.d(),F&&F.d(),q&&q.d(),D=!1,Pe(A)}}}function jC(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=O(),s=v("button"),l=v("span"),r=B(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[9],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-expanded"),s.disabled=a=!n[11]||n[9],ne(s,"btn-loading",n[9])},m(c,d){S(c,e,d),_(e,t),S(c,i,d),S(c,s,d),_(s,l),_(l,r),u||(f=[K(e,"click",n[20]),K(s,"click",n[21])],u=!0)},p(c,d){d[0]&512&&(e.disabled=c[9]),d[0]&4&&o!==(o=c[2].isNew?"Create":"Save changes")&&ae(r,o),d[0]&2560&&a!==(a=!c[11]||c[9])&&(s.disabled=a),d[0]&512&&ne(s,"btn-loading",c[9])},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Pe(f)}}}function qC(n){let e,t,i,s,l={class:"overlay-panel-lg colored-header collection-panel",beforeHide:n[32],$$slots:{footer:[jC],header:[HC],default:[LC]},$$scope:{ctx:n}};e=new Jn({props:l}),n[33](e),e.$on("hide",n[34]),e.$on("show",n[35]);let o={};return i=new PC({props:o}),n[36](i),i.$on("confirm",n[37]),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(r,a){R(e,r,a),S(r,t,a),R(i,r,a),s=!0},p(r,a){const u={};a[0]&1040&&(u.beforeHide=r[32]),a[0]&14956|a[1]&65536&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};i.$set(f)},i(r){s||(E(e.$$.fragment,r),E(i.$$.fragment,r),s=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),s=!1},d(r){n[33](null),H(e,r),r&&w(t),n[36](null),H(i,r)}}}const gi="fields",_l="api_rules",Os="options",VC="base",Od="auth";function $r(n){return JSON.stringify(n)}function zC(n,e,t){let i,s,l,o,r;Ze(n,wi,we=>t(5,r=we));const a={};a[VC]="Base",a[Od]="Auth";const u=It();let f,c,d=null,h=new Pn,m=!1,b=!1,g=gi,y=$r(h);function k(we){t(3,g=we)}function $(we){return M(we),t(10,b=!0),k(gi),f==null?void 0:f.show()}function C(){return f==null?void 0:f.hide()}async function M(we){Fn({}),typeof we<"u"?(d=we,t(2,h=we==null?void 0:we.clone())):(d=null,t(2,h=new Pn)),t(2,h.schema=h.schema||[],h),t(2,h.originalName=h.name||"",h),await Tn(),t(19,y=$r(h))}function T(){if(h.isNew)return D();c==null||c.show(h)}function D(){if(m)return;t(9,m=!0);const we=A();let We;h.isNew?We=de.collections.create(we):We=de.collections.update(h.id,we),We.then(ue=>{t(10,b=!1),C(),Lt(h.isNew?"Successfully created collection.":"Successfully updated collection."),PS(ue),u("save",{isNew:h.isNew,collection:ue})}).catch(ue=>{de.errorResponseHandler(ue)}).finally(()=>{t(9,m=!1)})}function A(){const we=h.export();we.schema=we.schema.slice(0);for(let We=we.schema.length-1;We>=0;We--)we.schema[We].toDelete&&we.schema.splice(We,1);return we}function I(){!(d!=null&&d.id)||wn(`Do you really want to delete collection "${d==null?void 0:d.name}" and all its records?`,()=>de.collections.delete(d==null?void 0:d.id).then(()=>{C(),Lt(`Successfully deleted collection "${d==null?void 0:d.name}".`),u("delete",d),LS(d)}).catch(we=>{de.errorResponseHandler(we)}))}function L(we){t(2,h.type=we,h),Ss("schema")}const F=()=>C(),q=()=>T(),z=()=>I(),J=we=>{t(2,h.name=W.slugify(we.target.value),h),we.target.value=h.name},G=we=>L(we),ie=()=>{o&&T()},Q=()=>k(gi),X=()=>k(_l),Y=()=>k(Os);function x(we){h=we,t(2,h)}function U(we){h=we,t(2,h)}function re(we){h=we,t(2,h)}const Re=()=>l&&b?(wn("You have unsaved changes. Do you really want to close the panel?",()=>{t(10,b=!1),C()}),!1):!0;function Ne(we){le[we?"unshift":"push"](()=>{f=we,t(7,f)})}function Le(we){Ve.call(this,n,we)}function Fe(we){Ve.call(this,n,we)}function me(we){le[we?"unshift":"push"](()=>{c=we,t(8,c)})}const Se=()=>D();return n.$$.update=()=>{n.$$.dirty[0]&32&&t(13,i=typeof W.getNestedVal(r,"schema.message",null)=="string"?W.getNestedVal(r,"schema.message"):"Has errors"),n.$$.dirty[0]&4&&t(12,s=!h.isNew&&h.system),n.$$.dirty[0]&524292&&t(4,l=y!=$r(h)),n.$$.dirty[0]&20&&t(11,o=h.isNew||l),n.$$.dirty[0]&12&&g===Os&&h.type!==Od&&k(gi)},[k,C,h,g,l,r,a,f,c,m,b,o,s,i,T,D,I,L,$,y,F,q,z,J,G,ie,Q,X,Y,x,U,re,Re,Ne,Le,Fe,me,Se]}class Ja extends ke{constructor(e){super(),ye(this,e,zC,qC,be,{changeTab:0,show:18,hide:1},null,[-1,-1])}get changeTab(){return this.$$.ctx[0]}get show(){return this.$$.ctx[18]}get hide(){return this.$$.ctx[1]}}function Dd(n,e,t){const i=n.slice();return i[14]=e[t],i}function Ad(n){let e,t=n[1].length&&Ed();return{c(){t&&t.c(),e=Ee()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[1].length?t||(t=Ed(),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function Ed(n){let e;return{c(){e=v("p"),e.textContent="No collections found.",p(e,"class","txt-hint m-t-10 m-b-10 txt-center")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Id(n,e){let t,i,s,l,o,r=e[14].name+"",a,u,f,c,d;return{key:n,first:null,c(){var h;t=v("a"),i=v("i"),l=O(),o=v("span"),a=B(r),u=O(),p(i,"class",s=W.getCollectionTypeIcon(e[14].type)),p(o,"class","txt"),p(t,"href",f="/collections?collectionId="+e[14].id),p(t,"class","sidebar-list-item"),ne(t,"active",((h=e[5])==null?void 0:h.id)===e[14].id),this.first=t},m(h,m){S(h,t,m),_(t,i),_(t,l),_(t,o),_(o,a),_(t,u),c||(d=Ae(Ut.call(null,t)),c=!0)},p(h,m){var b;e=h,m&8&&s!==(s=W.getCollectionTypeIcon(e[14].type))&&p(i,"class",s),m&8&&r!==(r=e[14].name+"")&&ae(a,r),m&8&&f!==(f="/collections?collectionId="+e[14].id)&&p(t,"href",f),m&40&&ne(t,"active",((b=e[5])==null?void 0:b.id)===e[14].id)},d(h){h&&w(t),c=!1,d()}}}function Pd(n){let e,t,i,s;return{c(){e=v("footer"),t=v("button"),t.innerHTML=` - New collection`,p(t,"type","button"),p(t,"class","btn btn-block btn-outline"),p(e,"class","sidebar-footer")},m(l,o){S(l,e,o),_(e,t),i||(s=K(t,"click",n[11]),i=!0)},p:te,d(l){l&&w(e),i=!1,s()}}}function BC(n){let e,t,i,s,l,o,r,a,u,f,c,d=[],h=new Map,m,b,g,y,k,$,C=n[3];const M=I=>I[14].id;for(let I=0;I',o=O(),r=v("input"),a=O(),u=v("hr"),f=O(),c=v("div");for(let I=0;I20),p(e,"class","page-sidebar collection-sidebar")},m(I,L){S(I,e,L),_(e,t),_(t,i),_(i,s),_(s,l),_(i,o),_(i,r),ce(r,n[0]),_(e,a),_(e,u),_(e,f),_(e,c);for(let F=0;F20),I[6]?D&&(D.d(1),D=null):D?D.p(I,L):(D=Pd(I),D.c(),D.m(e,null));const F={};g.$set(F)},i(I){y||(E(g.$$.fragment,I),y=!0)},o(I){P(g.$$.fragment,I),y=!1},d(I){I&&w(e);for(let L=0;L{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function WC(n,e,t){let i,s,l,o,r,a;Ze(n,Bn,y=>t(5,o=y)),Ze(n,Zi,y=>t(8,r=y)),Ze(n,$s,y=>t(6,a=y));let u,f="";function c(y){Ht(Bn,o=y,o)}const d=()=>t(0,f="");function h(){f=this.value,t(0,f)}const m=()=>u==null?void 0:u.show();function b(y){le[y?"unshift":"push"](()=>{u=y,t(2,u)})}const g=y=>{var k;((k=y.detail)==null?void 0:k.isNew)&&y.detail.collection&&c(y.detail.collection)};return n.$$.update=()=>{n.$$.dirty&1&&t(1,i=f.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=f!==""),n.$$.dirty&259&&t(3,l=r.filter(y=>y.id==f||y.name.replace(/\s+/g,"").toLowerCase().includes(i))),n.$$.dirty&256&&r&&UC()},[f,i,u,l,s,o,a,c,r,d,h,m,b,g]}class YC extends ke{constructor(e){super(),ye(this,e,WC,BC,be,{})}}function Ld(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function Nd(n){n[18]=n[19].default}function Fd(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function Rd(n){let e;return{c(){e=v("hr"),p(e,"class","m-t-sm m-b-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Hd(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,u,f,c=i&&Rd();function d(){return e[9](e[14])}return{key:n,first:null,c(){t=Ee(),c&&c.c(),s=O(),l=v("button"),r=B(o),a=O(),p(l,"type","button"),p(l,"class","sidebar-item"),ne(l,"active",e[5]===e[14]),this.first=t},m(h,m){S(h,t,m),c&&c.m(h,m),S(h,s,m),S(h,l,m),_(l,r),_(l,a),u||(f=K(l,"click",d),u=!0)},p(h,m){e=h,m&8&&(i=e[21]===Object.keys(e[6]).length),i?c||(c=Rd(),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null),m&8&&o!==(o=e[15].label+"")&&ae(r,o),m&40&&ne(l,"active",e[5]===e[14])},d(h){h&&w(t),c&&c.d(h),h&&w(s),h&&w(l),u=!1,f()}}}function jd(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:ZC,then:JC,catch:KC,value:19,blocks:[,,,]};return xa(t=n[15].component,s),{c(){e=Ee(),s.block.c()},m(l,o){S(l,e,o),s.block.m(l,s.anchor=o),s.mount=()=>e.parentNode,s.anchor=e,i=!0},p(l,o){n=l,s.ctx=n,o&8&&t!==(t=n[15].component)&&xa(t,s)||f0(s,n,o)},i(l){i||(E(s.block),i=!0)},o(l){for(let o=0;o<3;o+=1){const r=s.blocks[o];P(r)}i=!1},d(l){l&&w(e),s.block.d(l),s.token=null,s=null}}}function KC(n){return{c:te,m:te,p:te,i:te,o:te,d:te}}function JC(n){Nd(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){j(e.$$.fragment),t=O()},m(s,l){R(e,s,l),S(s,t,l),i=!0},p(s,l){Nd(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(E(e.$$.fragment,s),i=!0)},o(s){P(e.$$.fragment,s),i=!1},d(s){H(e,s),s&&w(t)}}}function ZC(n){return{c:te,m:te,p:te,i:te,o:te,d:te}}function qd(n,e){let t,i,s,l=e[5]===e[14]&&jd(e);return{key:n,first:null,c(){t=Ee(),l&&l.c(),i=Ee(),this.first=t},m(o,r){S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){e=o,e[5]===e[14]?l?(l.p(e,r),r&40&&E(l,1)):(l=jd(e),l.c(),E(l,1),l.m(i.parentNode,i)):l&&(pe(),P(l,1,1,()=>{l=null}),he())},i(o){s||(E(l),s=!0)},o(o){P(l),s=!1},d(o){o&&w(t),l&&l.d(o),o&&w(i)}}}function GC(n){let e,t,i,s=[],l=new Map,o,r,a=[],u=new Map,f,c=Object.entries(n[3]);const d=b=>b[14];for(let b=0;bb[14];for(let b=0;bClose',p(e,"type","button"),p(e,"class","btn btn-secondary")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[8]),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function QC(n){let e,t,i={class:"docs-panel",$$slots:{footer:[XC],default:[GC]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&4194348&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[10](null),H(e,s)}}}function xC(n,e,t){const i={list:{label:"List/Search",component:st(()=>import("./ListApiDocs.01d92f2e.js"),["./ListApiDocs.01d92f2e.js","./SdkTabs.2a5180be.js","./SdkTabs.9b0b7a06.css","./ListApiDocs.68f52edd.css"],import.meta.url)},view:{label:"View",component:st(()=>import("./ViewApiDocs.dec83248.js"),["./ViewApiDocs.dec83248.js","./SdkTabs.2a5180be.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},create:{label:"Create",component:st(()=>import("./CreateApiDocs.02259e08.js"),["./CreateApiDocs.02259e08.js","./SdkTabs.2a5180be.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},update:{label:"Update",component:st(()=>import("./UpdateApiDocs.0af7bddf.js"),["./UpdateApiDocs.0af7bddf.js","./SdkTabs.2a5180be.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},delete:{label:"Delete",component:st(()=>import("./DeleteApiDocs.486795b5.js"),["./DeleteApiDocs.486795b5.js","./SdkTabs.2a5180be.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},realtime:{label:"Realtime",component:st(()=>import("./RealtimeApiDocs.311e36b6.js"),["./RealtimeApiDocs.311e36b6.js","./SdkTabs.2a5180be.js","./SdkTabs.9b0b7a06.css"],import.meta.url)}},s={"auth-with-password":{label:"Auth with password",component:st(()=>import("./AuthWithPasswordDocs.be3fe4fc.js"),["./AuthWithPasswordDocs.be3fe4fc.js","./SdkTabs.2a5180be.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:st(()=>import("./AuthWithOAuth2Docs.a8493c67.js"),["./AuthWithOAuth2Docs.a8493c67.js","./SdkTabs.2a5180be.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},refresh:{label:"Auth refresh",component:st(()=>import("./AuthRefreshDocs.ef72f8e3.js"),["./AuthRefreshDocs.ef72f8e3.js","./SdkTabs.2a5180be.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"request-verification":{label:"Request verification",component:st(()=>import("./RequestVerificationDocs.19557128.js"),["./RequestVerificationDocs.19557128.js","./SdkTabs.2a5180be.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"confirm-verification":{label:"Confirm verification",component:st(()=>import("./ConfirmVerificationDocs.10de9953.js"),["./ConfirmVerificationDocs.10de9953.js","./SdkTabs.2a5180be.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"request-password-reset":{label:"Request password reset",component:st(()=>import("./RequestPasswordResetDocs.1f7548dd.js"),["./RequestPasswordResetDocs.1f7548dd.js","./SdkTabs.2a5180be.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"confirm-password-reset":{label:"Confirm password reset",component:st(()=>import("./ConfirmPasswordResetDocs.ba88ebb6.js"),["./ConfirmPasswordResetDocs.ba88ebb6.js","./SdkTabs.2a5180be.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"request-email-change":{label:"Request email change",component:st(()=>import("./RequestEmailChangeDocs.6f686b5c.js"),["./RequestEmailChangeDocs.6f686b5c.js","./SdkTabs.2a5180be.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"confirm-email-change":{label:"Confirm email change",component:st(()=>import("./ConfirmEmailChangeDocs.f5ffe149.js"),["./ConfirmEmailChangeDocs.f5ffe149.js","./SdkTabs.2a5180be.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"list-auth-methods":{label:"List auth methods",component:st(()=>import("./AuthMethodsDocs.6fb9150f.js"),["./AuthMethodsDocs.6fb9150f.js","./SdkTabs.2a5180be.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"list-linked-accounts":{label:"List OAuth2 accounts",component:st(()=>import("./ListExternalAuthsDocs.eb32d46b.js"),["./ListExternalAuthsDocs.eb32d46b.js","./SdkTabs.2a5180be.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"unlink-account":{label:"Unlink OAuth2 account",component:st(()=>import("./UnlinkExternalAuthDocs.a011446e.js"),["./UnlinkExternalAuthDocs.a011446e.js","./SdkTabs.2a5180be.js","./SdkTabs.9b0b7a06.css"],import.meta.url)}};let l,o=new Pn,r,a=[];a.length&&(r=Object.keys(a)[0]);function u(y){return t(2,o=y),c(Object.keys(a)[0]),l==null?void 0:l.show()}function f(){return l==null?void 0:l.hide()}function c(y){t(5,r=y)}const d=()=>f(),h=y=>c(y);function m(y){le[y?"unshift":"push"](()=>{l=y,t(4,l)})}function b(y){Ve.call(this,n,y)}function g(y){Ve.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&12&&(o.isAuth?(t(3,a=Object.assign({},i,s)),!(o!=null&&o.options.allowUsernameAuth)&&!(o!=null&&o.options.allowEmailAuth)&&delete a["auth-with-password"],o!=null&&o.options.allowOAuth2Auth||delete a["auth-with-oauth2"]):t(3,a=Object.assign({},i)))},[f,c,o,a,l,r,i,u,d,h,m,b,g]}class e4 extends ke{constructor(e){super(),ye(this,e,xC,QC,be,{show:7,hide:0,changeTab:1})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}get changeTab(){return this.$$.ctx[1]}}function t4(n){let e,t,i,s,l,o,r,a,u,f,c,d;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Username",o=O(),r=v("input"),p(t,"class",W.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","text"),p(r,"requried",a=!n[0].isNew),p(r,"placeholder",u=n[0].isNew?"Leave empty to auto generate...":n[3]),p(r,"id",f=n[12])},m(h,m){S(h,e,m),_(e,t),_(e,i),_(e,s),S(h,o,m),S(h,r,m),ce(r,n[0].username),c||(d=K(r,"input",n[4]),c=!0)},p(h,m){m&4096&&l!==(l=h[12])&&p(e,"for",l),m&1&&a!==(a=!h[0].isNew)&&p(r,"requried",a),m&1&&u!==(u=h[0].isNew?"Leave empty to auto generate...":h[3])&&p(r,"placeholder",u),m&4096&&f!==(f=h[12])&&p(r,"id",f),m&1&&r.value!==h[0].username&&ce(r,h[0].username)},d(h){h&&w(e),h&&w(o),h&&w(r),c=!1,d()}}}function n4(n){let e,t,i,s,l,o,r,a,u,f,c=n[0].emailVisibility?"On":"Off",d,h,m,b,g,y,k,$,C;return{c(){var M;e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Email",o=O(),r=v("div"),a=v("button"),u=v("span"),f=B("Public: "),d=B(c),m=O(),b=v("input"),p(t,"class",W.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[12]),p(u,"class","txt"),p(a,"type","button"),p(a,"class",h="btn btn-sm btn-secondary "+(n[0].emailVisibility?"btn-success":"btn-hint")),p(r,"class","form-field-addon email-visibility-addon svelte-1751a4d"),p(b,"type","email"),b.autofocus=g=n[0].isNew,p(b,"autocomplete","off"),p(b,"id",y=n[12]),b.required=k=(M=n[1].options)==null?void 0:M.requireEmail,p(b,"class","svelte-1751a4d")},m(M,T){S(M,e,T),_(e,t),_(e,i),_(e,s),S(M,o,T),S(M,r,T),_(r,a),_(a,u),_(u,f),_(u,d),S(M,m,T),S(M,b,T),ce(b,n[0].email),n[0].isNew&&b.focus(),$||(C=[Ae(Be.call(null,a,{text:"Make email public or private",position:"top-right"})),K(a,"click",n[5]),K(b,"input",n[6])],$=!0)},p(M,T){var D;T&4096&&l!==(l=M[12])&&p(e,"for",l),T&1&&c!==(c=M[0].emailVisibility?"On":"Off")&&ae(d,c),T&1&&h!==(h="btn btn-sm btn-secondary "+(M[0].emailVisibility?"btn-success":"btn-hint"))&&p(a,"class",h),T&1&&g!==(g=M[0].isNew)&&(b.autofocus=g),T&4096&&y!==(y=M[12])&&p(b,"id",y),T&2&&k!==(k=(D=M[1].options)==null?void 0:D.requireEmail)&&(b.required=k),T&1&&b.value!==M[0].email&&ce(b,M[0].email)},d(M){M&&w(e),M&&w(o),M&&w(r),M&&w(m),M&&w(b),$=!1,Pe(C)}}}function Vd(n){let e,t;return e=new ge({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[i4,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s&12292&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function i4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[2],S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[7]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&4&&(e.checked=u[2]),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function zd(n){let e,t,i,s,l,o,r,a,u;return s=new ge({props:{class:"form-field required",name:"password",$$slots:{default:[s4,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),r=new ge({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[l4,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),j(s.$$.fragment),l=O(),o=v("div"),j(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),ne(t,"p-t-xs",n[2]),p(e,"class","block")},m(f,c){S(f,e,c),_(e,t),_(t,i),R(s,i,null),_(t,l),_(t,o),R(r,o,null),u=!0},p(f,c){const d={};c&12289&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const h={};c&12289&&(h.$$scope={dirty:c,ctx:f}),r.$set(h),(!u||c&4)&&ne(t,"p-t-xs",f[2])},i(f){u||(E(s.$$.fragment,f),E(r.$$.fragment,f),f&&xe(()=>{a||(a=je(e,St,{duration:150},!0)),a.run(1)}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=je(e,St,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),H(s),H(r),f&&a&&a.end()}}}function s4(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[12]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),ce(r,n[0].password),u||(f=K(r,"input",n[8]),u=!0)},p(c,d){d&4096&&l!==(l=c[12])&&p(e,"for",l),d&4096&&a!==(a=c[12])&&p(r,"id",a),d&1&&r.value!==c[0].password&&ce(r,c[0].password)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function l4(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password confirm",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[12]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),ce(r,n[0].passwordConfirm),u||(f=K(r,"input",n[9]),u=!0)},p(c,d){d&4096&&l!==(l=c[12])&&p(e,"for",l),d&4096&&a!==(a=c[12])&&p(r,"id",a),d&1&&r.value!==c[0].passwordConfirm&&ce(r,c[0].passwordConfirm)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function o4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Verified"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].verified,S(u,i,f),S(u,s,f),_(s,l),r||(a=[K(e,"change",n[10]),K(e,"change",ut(n[11]))],r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].verified),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Pe(a)}}}function r4(n){var g;let e,t,i,s,l,o,r,a,u,f,c,d,h;i=new ge({props:{class:"form-field "+(n[0].isNew?"":"required"),name:"username",$$slots:{default:[t4,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field "+((g=n[1].options)!=null&&g.requireEmail?"required":""),name:"email",$$slots:{default:[n4,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}});let m=!n[0].isNew&&Vd(n),b=(n[0].isNew||n[2])&&zd(n);return d=new ge({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[o4,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),m&&m.c(),u=O(),b&&b.c(),f=O(),c=v("div"),j(d.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(a,"class","col-lg-12"),p(c,"class","col-lg-12"),p(e,"class","grid m-b-base")},m(y,k){S(y,e,k),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),m&&m.m(a,null),_(a,u),b&&b.m(a,null),_(e,f),_(e,c),R(d,c,null),h=!0},p(y,[k]){var T;const $={};k&1&&($.class="form-field "+(y[0].isNew?"":"required")),k&12289&&($.$$scope={dirty:k,ctx:y}),i.$set($);const C={};k&2&&(C.class="form-field "+((T=y[1].options)!=null&&T.requireEmail?"required":"")),k&12291&&(C.$$scope={dirty:k,ctx:y}),o.$set(C),y[0].isNew?m&&(pe(),P(m,1,1,()=>{m=null}),he()):m?(m.p(y,k),k&1&&E(m,1)):(m=Vd(y),m.c(),E(m,1),m.m(a,u)),y[0].isNew||y[2]?b?(b.p(y,k),k&5&&E(b,1)):(b=zd(y),b.c(),E(b,1),b.m(a,null)):b&&(pe(),P(b,1,1,()=>{b=null}),he());const M={};k&12289&&(M.$$scope={dirty:k,ctx:y}),d.$set(M)},i(y){h||(E(i.$$.fragment,y),E(o.$$.fragment,y),E(m),E(b),E(d.$$.fragment,y),h=!0)},o(y){P(i.$$.fragment,y),P(o.$$.fragment,y),P(m),P(b),P(d.$$.fragment,y),h=!1},d(y){y&&w(e),H(i),H(o),m&&m.d(),b&&b.d(),H(d)}}}function a4(n,e,t){let{collection:i=new Pn}=e,{record:s=new Wi}=e,l=s.username||null,o=!1;function r(){s.username=this.value,t(0,s),t(2,o)}const a=()=>t(0,s.emailVisibility=!s.emailVisibility,s);function u(){s.email=this.value,t(0,s),t(2,o)}function f(){o=this.checked,t(2,o)}function c(){s.password=this.value,t(0,s),t(2,o)}function d(){s.passwordConfirm=this.value,t(0,s),t(2,o)}function h(){s.verified=this.checked,t(0,s),t(2,o)}const m=b=>{s.isNew||wn("Do you really want to manually change the verified account state?",()=>{},()=>{t(0,s.verified=!b.target.checked,s)})};return n.$$set=b=>{"collection"in b&&t(1,i=b.collection),"record"in b&&t(0,s=b.record)},n.$$.update=()=>{n.$$.dirty&1&&!s.username&&s.username!==null&&t(0,s.username=null,s),n.$$.dirty&4&&(o||(t(0,s.password=null,s),t(0,s.passwordConfirm=null,s),Ss("password"),Ss("passwordConfirm")))},[s,i,o,l,r,a,u,f,c,d,h,m]}class u4 extends ke{constructor(e){super(),ye(this,e,a4,r4,be,{collection:1,record:0})}}function f4(n){let e,t,i,s=[n[3]],l={};for(let o=0;o{r&&(t(1,r.style.height="",r),t(1,r.style.height=Math.min(r.scrollHeight+2,o)+"px",r))},0)}function f(h){if((h==null?void 0:h.code)==="Enter"&&!(h!=null&&h.shiftKey)&&!(h!=null&&h.isComposing)){h.preventDefault();const m=r.closest("form");m!=null&&m.requestSubmit&&m.requestSubmit()}}cn(()=>(u(),()=>clearTimeout(a)));function c(h){le[h?"unshift":"push"](()=>{r=h,t(1,r)})}function d(){l=this.value,t(0,l)}return n.$$set=h=>{e=Ke(Ke({},e),Wn(h)),t(3,s=wt(e,i)),"value"in h&&t(0,l=h.value),"maxHeight"in h&&t(4,o=h.maxHeight)},n.$$.update=()=>{n.$$.dirty&1&&typeof l!==void 0&&u()},[l,r,f,s,o,c,d]}class d4 extends ke{constructor(e){super(),ye(this,e,c4,f4,be,{value:0,maxHeight:4})}}function p4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d;function h(b){n[2](b)}let m={id:n[3],required:n[1].required};return n[0]!==void 0&&(m.value=n[0]),f=new d4({props:m}),le.push(()=>_e(f,"value",h)),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),j(f.$$.fragment),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(b,g){S(b,e,g),_(e,t),_(e,s),_(e,l),_(l,r),S(b,u,g),R(f,b,g),d=!0},p(b,g){(!d||g&2&&i!==(i=W.getFieldTypeIcon(b[1].type)))&&p(t,"class",i),(!d||g&2)&&o!==(o=b[1].name+"")&&ae(r,o),(!d||g&8&&a!==(a=b[3]))&&p(e,"for",a);const y={};g&8&&(y.id=b[3]),g&2&&(y.required=b[1].required),!c&&g&1&&(c=!0,y.value=b[0],ve(()=>c=!1)),f.$set(y)},i(b){d||(E(f.$$.fragment,b),d=!0)},o(b){P(f.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(u),H(f,b)}}}function h4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[p4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function m4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class g4 extends ke{constructor(e){super(),ye(this,e,m4,h4,be,{field:1,value:0})}}function _4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m,b,g;return{c(){var y,k;e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),f=v("input"),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","number"),p(f,"id",c=n[3]),f.required=d=n[1].required,p(f,"min",h=(y=n[1].options)==null?void 0:y.min),p(f,"max",m=(k=n[1].options)==null?void 0:k.max),p(f,"step","any")},m(y,k){S(y,e,k),_(e,t),_(e,s),_(e,l),_(l,r),S(y,u,k),S(y,f,k),ce(f,n[0]),b||(g=K(f,"input",n[2]),b=!0)},p(y,k){var $,C;k&2&&i!==(i=W.getFieldTypeIcon(y[1].type))&&p(t,"class",i),k&2&&o!==(o=y[1].name+"")&&ae(r,o),k&8&&a!==(a=y[3])&&p(e,"for",a),k&8&&c!==(c=y[3])&&p(f,"id",c),k&2&&d!==(d=y[1].required)&&(f.required=d),k&2&&h!==(h=($=y[1].options)==null?void 0:$.min)&&p(f,"min",h),k&2&&m!==(m=(C=y[1].options)==null?void 0:C.max)&&p(f,"max",m),k&1&&rt(f.value)!==y[0]&&ce(f,y[0])},d(y){y&&w(e),y&&w(u),y&&w(f),b=!1,g()}}}function b4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[_4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function v4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=rt(this.value),t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class y4 extends ke{constructor(e){super(),ye(this,e,v4,b4,be,{field:1,value:0})}}function k4(n){let e,t,i,s,l=n[1].name+"",o,r,a,u;return{c(){e=v("input"),i=O(),s=v("label"),o=B(l),p(e,"type","checkbox"),p(e,"id",t=n[3]),p(s,"for",r=n[3])},m(f,c){S(f,e,c),e.checked=n[0],S(f,i,c),S(f,s,c),_(s,o),a||(u=K(e,"change",n[2]),a=!0)},p(f,c){c&8&&t!==(t=f[3])&&p(e,"id",t),c&1&&(e.checked=f[0]),c&2&&l!==(l=f[1].name+"")&&ae(o,l),c&8&&r!==(r=f[3])&&p(s,"for",r)},d(f){f&&w(e),f&&w(i),f&&w(s),a=!1,u()}}}function w4(n){let e,t;return e=new ge({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[k4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field form-field-toggle "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function S4(n,e,t){let{field:i=new dn}=e,{value:s=!1}=e;function l(){s=this.checked,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class $4 extends ke{constructor(e){super(),ye(this,e,S4,w4,be,{field:1,value:0})}}function C4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),f=v("input"),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","email"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(b,g){S(b,e,g),_(e,t),_(e,s),_(e,l),_(l,r),S(b,u,g),S(b,f,g),ce(f,n[0]),h||(m=K(f,"input",n[2]),h=!0)},p(b,g){g&2&&i!==(i=W.getFieldTypeIcon(b[1].type))&&p(t,"class",i),g&2&&o!==(o=b[1].name+"")&&ae(r,o),g&8&&a!==(a=b[3])&&p(e,"for",a),g&8&&c!==(c=b[3])&&p(f,"id",c),g&2&&d!==(d=b[1].required)&&(f.required=d),g&1&&f.value!==b[0]&&ce(f,b[0])},d(b){b&&w(e),b&&w(u),b&&w(f),h=!1,m()}}}function T4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[C4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function M4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class O4 extends ke{constructor(e){super(),ye(this,e,M4,T4,be,{field:1,value:0})}}function D4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),f=v("input"),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","url"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(b,g){S(b,e,g),_(e,t),_(e,s),_(e,l),_(l,r),S(b,u,g),S(b,f,g),ce(f,n[0]),h||(m=K(f,"input",n[2]),h=!0)},p(b,g){g&2&&i!==(i=W.getFieldTypeIcon(b[1].type))&&p(t,"class",i),g&2&&o!==(o=b[1].name+"")&&ae(r,o),g&8&&a!==(a=b[3])&&p(e,"for",a),g&8&&c!==(c=b[3])&&p(f,"id",c),g&2&&d!==(d=b[1].required)&&(f.required=d),g&1&&ce(f,b[0])},d(b){b&&w(e),b&&w(u),b&&w(f),h=!1,m()}}}function A4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[D4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function E4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class I4 extends ke{constructor(e){super(),ye(this,e,E4,A4,be,{field:1,value:0})}}function Bd(n){let e,t,i,s;return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","link-hint clear-btn svelte-11df51y"),p(e,"class","form-field-addon")},m(l,o){S(l,e,o),_(e,t),i||(s=[Ae(Be.call(null,t,"Clear")),K(t,"click",n[4])],i=!0)},p:te,d(l){l&&w(e),i=!1,Pe(s)}}}function P4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m,b=n[0]&&!n[1].required&&Bd(n);function g(k){n[5](k)}let y={id:n[6],options:W.defaultFlatpickrOptions(),value:n[0]};return n[0]!==void 0&&(y.formattedValue=n[0]),d=new Ka({props:y}),le.push(()=>_e(d,"formattedValue",g)),d.$on("close",n[2]),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),a=B(" (UTC)"),f=O(),b&&b.c(),c=O(),j(d.$$.fragment),p(t,"class",i=ks(W.getFieldTypeIcon(n[1].type))+" svelte-11df51y"),p(l,"class","txt"),p(e,"for",u=n[6])},m(k,$){S(k,e,$),_(e,t),_(e,s),_(e,l),_(l,r),_(l,a),S(k,f,$),b&&b.m(k,$),S(k,c,$),R(d,k,$),m=!0},p(k,$){(!m||$&2&&i!==(i=ks(W.getFieldTypeIcon(k[1].type))+" svelte-11df51y"))&&p(t,"class",i),(!m||$&2)&&o!==(o=k[1].name+"")&&ae(r,o),(!m||$&64&&u!==(u=k[6]))&&p(e,"for",u),k[0]&&!k[1].required?b?b.p(k,$):(b=Bd(k),b.c(),b.m(c.parentNode,c)):b&&(b.d(1),b=null);const C={};$&64&&(C.id=k[6]),$&1&&(C.value=k[0]),!h&&$&1&&(h=!0,C.formattedValue=k[0],ve(()=>h=!1)),d.$set(C)},i(k){m||(E(d.$$.fragment,k),m=!0)},o(k){P(d.$$.fragment,k),m=!1},d(k){k&&w(e),k&&w(f),b&&b.d(k),k&&w(c),H(d,k)}}}function L4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[P4,({uniqueId:i})=>({6:i}),({uniqueId:i})=>i?64:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&195&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function N4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(u){u.detail&&u.detail.length==3&&t(0,s=u.detail[1])}function o(){t(0,s="")}const r=()=>o();function a(u){s=u,t(0,s)}return n.$$set=u=>{"field"in u&&t(1,i=u.field),"value"in u&&t(0,s=u.value)},n.$$.update=()=>{n.$$.dirty&1&&s&&s.length>19&&t(0,s=s.substring(0,19))},[s,i,l,o,r,a]}class F4 extends ke{constructor(e){super(),ye(this,e,N4,L4,be,{field:1,value:0})}}function Ud(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=v("div"),t=B("Select up to "),s=B(i),l=B(" items."),p(e,"class","help-block")},m(o,r){S(o,e,r),_(e,t),_(e,s),_(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&ae(s,i)},d(o){o&&w(e)}}}function R4(n){var k,$,C;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;function b(M){n[3](M)}let g={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],items:(k=n[1].options)==null?void 0:k.values,searchable:(($=n[1].options)==null?void 0:$.values)>5};n[0]!==void 0&&(g.selected=n[0]),f=new F_({props:g}),le.push(()=>_e(f,"selected",b));let y=((C=n[1].options)==null?void 0:C.maxSelect)>1&&Ud(n);return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),j(f.$$.fragment),d=O(),y&&y.c(),h=Ee(),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(M,T){S(M,e,T),_(e,t),_(e,s),_(e,l),_(l,r),S(M,u,T),R(f,M,T),S(M,d,T),y&&y.m(M,T),S(M,h,T),m=!0},p(M,T){var A,I,L;(!m||T&2&&i!==(i=W.getFieldTypeIcon(M[1].type)))&&p(t,"class",i),(!m||T&2)&&o!==(o=M[1].name+"")&&ae(r,o),(!m||T&16&&a!==(a=M[4]))&&p(e,"for",a);const D={};T&16&&(D.id=M[4]),T&6&&(D.toggle=!M[1].required||M[2]),T&4&&(D.multiple=M[2]),T&2&&(D.items=(A=M[1].options)==null?void 0:A.values),T&2&&(D.searchable=((I=M[1].options)==null?void 0:I.values)>5),!c&&T&1&&(c=!0,D.selected=M[0],ve(()=>c=!1)),f.$set(D),((L=M[1].options)==null?void 0:L.maxSelect)>1?y?y.p(M,T):(y=Ud(M),y.c(),y.m(h.parentNode,h)):y&&(y.d(1),y=null)},i(M){m||(E(f.$$.fragment,M),m=!0)},o(M){P(f.$$.fragment,M),m=!1},d(M){M&&w(e),M&&w(u),H(f,M),M&&w(d),y&&y.d(M),M&&w(h)}}}function H4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[R4,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function j4(n,e,t){let i,{field:s=new dn}=e,{value:l=void 0}=e;function o(r){l=r,t(0,l),t(2,i),t(1,s)}return n.$$set=r=>{"field"in r&&t(1,s=r.field),"value"in r&&t(0,l=r.value)},n.$$.update=()=>{var r;n.$$.dirty&2&&t(2,i=((r=s.options)==null?void 0:r.maxSelect)>1),n.$$.dirty&5&&typeof l>"u"&&t(0,l=i?[]:""),n.$$.dirty&7&&i&&Array.isArray(l)&&l.length>s.options.maxSelect&&t(0,l=l.slice(l.length-s.options.maxSelect))},[l,s,i,o]}class q4 extends ke{constructor(e){super(),ye(this,e,j4,H4,be,{field:1,value:0})}}function V4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),f=v("textarea"),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"id",c=n[3]),f.required=d=n[1].required,p(f,"class","txt-mono")},m(b,g){S(b,e,g),_(e,t),_(e,s),_(e,l),_(l,r),S(b,u,g),S(b,f,g),ce(f,n[0]),h||(m=K(f,"input",n[2]),h=!0)},p(b,g){g&2&&i!==(i=W.getFieldTypeIcon(b[1].type))&&p(t,"class",i),g&2&&o!==(o=b[1].name+"")&&ae(r,o),g&8&&a!==(a=b[3])&&p(e,"for",a),g&8&&c!==(c=b[3])&&p(f,"id",c),g&2&&d!==(d=b[1].required)&&(f.required=d),g&1&&ce(f,b[0])},d(b){b&&w(e),b&&w(u),b&&w(f),h=!1,m()}}}function z4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[V4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function B4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&typeof s!="string"&&s!==null&&t(0,s=JSON.stringify(s,null,2))},[s,i,l]}class U4 extends ke{constructor(e){super(),ye(this,e,B4,z4,be,{field:1,value:0})}}function W4(n){let e,t;return{c(){e=v("i"),p(e,"class","ri-file-line"),p(e,"alt",t=n[0].name)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&p(e,"alt",t)},d(i){i&&w(e)}}}function Y4(n){let e,t,i;return{c(){e=v("img"),Ln(e.src,t=n[2])||p(e,"src",t),p(e,"width",n[1]),p(e,"height",n[1]),p(e,"alt",i=n[0].name)},m(s,l){S(s,e,l)},p(s,l){l&4&&!Ln(e.src,t=s[2])&&p(e,"src",t),l&2&&p(e,"width",s[1]),l&2&&p(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&p(e,"alt",i)},d(s){s&&w(e)}}}function K4(n){let e;function t(l,o){return l[2]?Y4:W4}let i=t(n),s=i(n);return{c(){s.c(),e=Ee()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:te,o:te,d(l){s.d(l),l&&w(e)}}}function J4(n,e,t){let i,{file:s}=e,{size:l=50}=e;function o(){t(2,i=""),W.hasImageExtension(s==null?void 0:s.name)&&W.generateThumb(s,l,l).then(r=>{t(2,i=r)}).catch(r=>{console.warn("Unable to generate thumb: ",r)})}return n.$$set=r=>{"file"in r&&t(0,s=r.file),"size"in r&&t(1,l=r.size)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&o()},t(2,i=""),[s,l,i]}class Z4 extends ke{constructor(e){super(),ye(this,e,J4,K4,be,{file:0,size:1})}}function G4(n){let e,t,i;return{c(){e=v("img"),Ln(e.src,t=n[2])||p(e,"src",t),p(e,"alt",i="Preview "+n[2])},m(s,l){S(s,e,l)},p(s,l){l&4&&!Ln(e.src,t=s[2])&&p(e,"src",t),l&4&&i!==(i="Preview "+s[2])&&p(e,"alt",i)},d(s){s&&w(e)}}}function X4(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=K(e,"click",ut(n[0])),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function Q4(n){let e,t=n[2].substring(n[2].lastIndexOf("/")+1)+"",i,s,l,o,r,a,u;return{c(){e=v("a"),i=B(t),s=O(),l=v("div"),o=O(),r=v("button"),r.textContent="Close",p(e,"href",n[2]),p(e,"title","Download"),p(e,"target","_blank"),p(e,"rel","noreferrer noopener"),p(e,"class","link-hint txt-ellipsis"),p(l,"class","flex-fill"),p(r,"type","button"),p(r,"class","btn btn-secondary")},m(f,c){S(f,e,c),_(e,i),S(f,s,c),S(f,l,c),S(f,o,c),S(f,r,c),a||(u=K(r,"click",n[0]),a=!0)},p(f,c){c&4&&t!==(t=f[2].substring(f[2].lastIndexOf("/")+1)+"")&&ae(i,t),c&4&&p(e,"href",f[2])},d(f){f&&w(e),f&&w(s),f&&w(l),f&&w(o),f&&w(r),a=!1,u()}}}function x4(n){let e,t,i={class:"image-preview",btnClose:!1,popup:!0,$$slots:{footer:[Q4],header:[X4],default:[G4]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[4](e),e.$on("show",n[5]),e.$on("hide",n[6]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&132&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[4](null),H(e,s)}}}function eT(n,e,t){let i,s="";function l(f){f!==""&&(t(2,s=f),i==null||i.show())}function o(){return i==null?void 0:i.hide()}function r(f){le[f?"unshift":"push"](()=>{i=f,t(1,i)})}function a(f){Ve.call(this,n,f)}function u(f){Ve.call(this,n,f)}return[o,i,s,l,r,a,u]}class tT extends ke{constructor(e){super(),ye(this,e,eT,x4,be,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function nT(n){let e;return{c(){e=v("i"),p(e,"class","ri-file-line")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function iT(n){let e,t,i,s,l;return{c(){e=v("img"),Ln(e.src,t=n[4])||p(e,"src",t),p(e,"alt",n[0]),p(e,"title",i="Preview "+n[0]),ne(e,"link-fade",n[2])},m(o,r){S(o,e,r),s||(l=[K(e,"click",n[7]),K(e,"error",n[5])],s=!0)},p(o,r){r&16&&!Ln(e.src,t=o[4])&&p(e,"src",t),r&1&&p(e,"alt",o[0]),r&1&&i!==(i="Preview "+o[0])&&p(e,"title",i),r&4&&ne(e,"link-fade",o[2])},d(o){o&&w(e),s=!1,Pe(l)}}}function sT(n){let e,t,i;function s(a,u){return a[2]?iT:nT}let l=s(n),o=l(n),r={};return t=new tT({props:r}),n[8](t),{c(){o.c(),e=O(),j(t.$$.fragment)},m(a,u){o.m(a,u),S(a,e,u),R(t,a,u),i=!0},p(a,[u]){l===(l=s(a))&&o?o.p(a,u):(o.d(1),o=l(a),o&&(o.c(),o.m(e.parentNode,e)));const f={};t.$set(f)},i(a){i||(E(t.$$.fragment,a),i=!0)},o(a){P(t.$$.fragment,a),i=!1},d(a){o.d(a),a&&w(e),n[8](null),H(t,a)}}}function lT(n,e,t){let i,{record:s}=e,{filename:l}=e,o,r="",a="";function u(){t(4,r="")}const f=d=>{d.stopPropagation(),o==null||o.show(a)};function c(d){le[d?"unshift":"push"](()=>{o=d,t(3,o)})}return n.$$set=d=>{"record"in d&&t(6,s=d.record),"filename"in d&&t(0,l=d.filename)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=W.hasImageExtension(l)),n.$$.dirty&69&&i&&t(1,a=de.getFileUrl(s,`${l}`)),n.$$.dirty&2&&t(4,r=a?a+"?thumb=100x100":"")},[l,a,i,o,r,u,s,f,c]}class q_ extends ke{constructor(e){super(),ye(this,e,lT,sT,be,{record:6,filename:0})}}function Wd(n,e,t){const i=n.slice();return i[22]=e[t],i[24]=t,i}function Yd(n,e,t){const i=n.slice();return i[25]=e[t],i[24]=t,i}function oT(n){let e,t,i;function s(){return n[14](n[24])}return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-secondary btn-sm btn-circle btn-remove txt-hint")},m(l,o){S(l,e,o),t||(i=[Ae(Be.call(null,e,"Remove file")),K(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,Pe(i)}}}function rT(n){let e,t,i;function s(){return n[13](n[24])}return{c(){e=v("button"),e.innerHTML='Restore',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-secondary")},m(l,o){S(l,e,o),t||(i=K(e,"click",s),t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,i()}}}function Kd(n,e){let t,i,s,l,o,r=e[25]+"",a,u,f,c,d,h,m;s=new q_({props:{record:e[2],filename:e[25]}});function b(k,$){return $&18&&(c=null),c==null&&(c=!!k[1].includes(k[24])),c?rT:oT}let g=b(e,-1),y=g(e);return{key:n,first:null,c(){t=v("div"),i=v("figure"),j(s.$$.fragment),l=O(),o=v("a"),a=B(r),f=O(),y.c(),p(i,"class","thumb"),ne(i,"fade",e[1].includes(e[24])),p(o,"href",u=de.getFileUrl(e[2],e[25])),p(o,"class","filename link-hint"),p(o,"target","_blank"),p(o,"rel","noopener noreferrer"),ne(o,"txt-strikethrough",e[1].includes(e[24])),p(t,"class","list-item"),this.first=t},m(k,$){S(k,t,$),_(t,i),R(s,i,null),_(t,l),_(t,o),_(o,a),_(t,f),y.m(t,null),d=!0,h||(m=Ae(Be.call(null,o,{position:"right",text:"Download"})),h=!0)},p(k,$){e=k;const C={};$&4&&(C.record=e[2]),$&16&&(C.filename=e[25]),s.$set(C),(!d||$&18)&&ne(i,"fade",e[1].includes(e[24])),(!d||$&16)&&r!==(r=e[25]+"")&&ae(a,r),(!d||$&20&&u!==(u=de.getFileUrl(e[2],e[25])))&&p(o,"href",u),(!d||$&18)&&ne(o,"txt-strikethrough",e[1].includes(e[24])),g===(g=b(e,$))&&y?y.p(e,$):(y.d(1),y=g(e),y&&(y.c(),y.m(t,null)))},i(k){d||(E(s.$$.fragment,k),d=!0)},o(k){P(s.$$.fragment,k),d=!1},d(k){k&&w(t),H(s),y.d(),h=!1,m()}}}function Jd(n){let e,t,i,s,l,o,r,a,u=n[22].name+"",f,c,d,h,m,b,g;i=new Z4({props:{file:n[22]}});function y(){return n[15](n[24])}return{c(){e=v("div"),t=v("figure"),j(i.$$.fragment),s=O(),l=v("div"),o=v("small"),o.textContent="New",r=O(),a=v("span"),f=B(u),d=O(),h=v("button"),h.innerHTML='',p(t,"class","thumb"),p(o,"class","label label-success m-r-5"),p(a,"class","txt"),p(l,"class","filename"),p(l,"title",c=n[22].name),p(h,"type","button"),p(h,"class","btn btn-secondary btn-sm btn-circle btn-remove"),p(e,"class","list-item")},m(k,$){S(k,e,$),_(e,t),R(i,t,null),_(e,s),_(e,l),_(l,o),_(l,r),_(l,a),_(a,f),_(e,d),_(e,h),m=!0,b||(g=[Ae(Be.call(null,h,"Remove file")),K(h,"click",y)],b=!0)},p(k,$){n=k;const C={};$&1&&(C.file=n[22]),i.$set(C),(!m||$&1)&&u!==(u=n[22].name+"")&&ae(f,u),(!m||$&1&&c!==(c=n[22].name))&&p(l,"title",c)},i(k){m||(E(i.$$.fragment,k),m=!0)},o(k){P(i.$$.fragment,k),m=!1},d(k){k&&w(e),H(i),b=!1,Pe(g)}}}function Zd(n){let e,t,i,s,l,o;return{c(){e=v("div"),t=v("input"),i=O(),s=v("button"),s.innerHTML=` - Upload new file`,p(t,"type","file"),p(t,"class","hidden"),t.multiple=n[5],p(s,"type","button"),p(s,"class","btn btn-secondary btn-sm btn-block"),p(e,"class","list-item btn-list-item")},m(r,a){S(r,e,a),_(e,t),n[16](t),_(e,i),_(e,s),l||(o=[K(t,"change",n[17]),K(s,"click",n[18])],l=!0)},p(r,a){a&32&&(t.multiple=r[5])},d(r){r&&w(e),n[16](null),l=!1,Pe(o)}}}function aT(n){let e,t,i,s,l,o=n[3].name+"",r,a,u,f,c=[],d=new Map,h,m,b,g=n[4];const y=T=>T[25];for(let T=0;TP($[T],1,1,()=>{$[T]=null});let M=!n[8]&&Zd(n);return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),f=v("div");for(let T=0;T({21:i}),({uniqueId:i})=>i?2097152:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field form-field-file "+(i[3].required?"required":"")),s&8&&(l.name=i[3].name),s&136315391&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function fT(n,e,t){let i,s,l,{record:o}=e,{value:r=""}=e,{uploadedFiles:a=[]}=e,{deletedFileIndexes:u=[]}=e,{field:f=new dn}=e,c,d;function h(A){W.removeByValue(u,A),t(1,u)}function m(A){W.pushUnique(u,A),t(1,u)}function b(A){W.isEmpty(a[A])||a.splice(A,1),t(0,a)}function g(){d==null||d.dispatchEvent(new CustomEvent("change",{detail:{value:r,uploadedFiles:a,deletedFileIndexes:u},bubbles:!0}))}const y=A=>h(A),k=A=>m(A),$=A=>b(A);function C(A){le[A?"unshift":"push"](()=>{c=A,t(6,c)})}const M=()=>{for(let A of c.files)a.push(A);t(0,a),t(6,c.value=null,c)},T=()=>c==null?void 0:c.click();function D(A){le[A?"unshift":"push"](()=>{d=A,t(7,d)})}return n.$$set=A=>{"record"in A&&t(2,o=A.record),"value"in A&&t(12,r=A.value),"uploadedFiles"in A&&t(0,a=A.uploadedFiles),"deletedFileIndexes"in A&&t(1,u=A.deletedFileIndexes),"field"in A&&t(3,f=A.field)},n.$$.update=()=>{var A,I;n.$$.dirty&1&&(Array.isArray(a)||t(0,a=W.toArray(a))),n.$$.dirty&2&&(Array.isArray(u)||t(1,u=W.toArray(u))),n.$$.dirty&8&&t(5,i=((A=f.options)==null?void 0:A.maxSelect)>1),n.$$.dirty&4128&&W.isEmpty(r)&&t(12,r=i?[]:""),n.$$.dirty&4096&&t(4,s=W.toArray(r)),n.$$.dirty&27&&t(8,l=(s.length||a.length)&&((I=f.options)==null?void 0:I.maxSelect)<=s.length+a.length-u.length),n.$$.dirty&3&&(a!==-1||u!==-1)&&g()},[a,u,o,f,s,i,c,d,l,h,m,b,r,y,k,$,C,M,T,D]}class cT extends ke{constructor(e){super(),ye(this,e,fT,uT,be,{record:2,value:12,uploadedFiles:0,deletedFileIndexes:1,field:3})}}function Gd(n){let e,t;return{c(){e=v("small"),t=B(n[1]),p(e,"class","block txt-hint txt-ellipsis")},m(i,s){S(i,e,s),_(e,t)},p(i,s){s&2&&ae(t,i[1])},d(i){i&&w(e)}}}function dT(n){let e,t,i,s,l,o=n[0].id+"",r,a,u,f,c=n[1]!==""&&n[1]!==n[0].id&&Gd(n);return{c(){e=v("i"),i=O(),s=v("div"),l=v("div"),r=B(o),a=O(),c&&c.c(),p(e,"class","ri-information-line link-hint"),p(l,"class","block txt-ellipsis"),p(s,"class","content svelte-1gjwqyd")},m(d,h){S(d,e,h),S(d,i,h),S(d,s,h),_(s,l),_(l,r),_(s,a),c&&c.m(s,null),u||(f=Ae(t=Be.call(null,e,{text:JSON.stringify(n[0],null,2),position:"left",class:"code"})),u=!0)},p(d,[h]){t&&Jt(t.update)&&h&1&&t.update.call(null,{text:JSON.stringify(d[0],null,2),position:"left",class:"code"}),h&1&&o!==(o=d[0].id+"")&&ae(r,o),d[1]!==""&&d[1]!==d[0].id?c?c.p(d,h):(c=Gd(d),c.c(),c.m(s,null)):c&&(c.d(1),c=null)},i:te,o:te,d(d){d&&w(e),d&&w(i),d&&w(s),c&&c.d(),u=!1,f()}}}function pT(n,e,t){let i;const s=["id","created","updated","collectionId","collectionName"];let{item:l={}}=e;function o(r){r=r||{};const a=["title","name","email","username","label","key","heading","content","description",...Object.keys(r)];for(const u of a)if(typeof r[u]=="string"&&!W.isEmpty(r[u])&&!s.includes(u))return u+": "+r[u];return""}return n.$$set=r=>{"item"in r&&t(0,l=r.item)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=o(l))},[l,i]}class hT extends ke{constructor(e){super(),ye(this,e,pT,dT,be,{item:0})}}function Xd(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='New record',p(e,"type","button"),p(e,"class","btn btn-warning btn-block btn-sm m-t-5")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[17]),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function Qd(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Load more',p(e,"type","button"),p(e,"class","btn btn-block btn-sm m-t-5"),ne(e,"btn-loading",n[6]),ne(e,"btn-disabled",n[6])},m(s,l){S(s,e,l),t||(i=K(e,"click",Yn(n[18])),t=!0)},p(s,l){l&64&&ne(e,"btn-loading",s[6]),l&64&&ne(e,"btn-disabled",s[6])},d(s){s&&w(e),t=!1,i()}}}function mT(n){let e,t,i=!n[7]&&n[8]&&Xd(n),s=n[10]&&Qd(n);return{c(){i&&i.c(),e=O(),s&&s.c(),t=Ee()},m(l,o){i&&i.m(l,o),S(l,e,o),s&&s.m(l,o),S(l,t,o)},p(l,o){!l[7]&&l[8]?i?i.p(l,o):(i=Xd(l),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null),l[10]?s?s.p(l,o):(s=Qd(l),s.c(),s.m(t.parentNode,t)):s&&(s.d(1),s=null)},d(l){i&&i.d(l),l&&w(e),s&&s.d(l),l&&w(t)}}}function gT(n){let e,t,i,s,l,o;const r=[{selectPlaceholder:n[11]?"Loading...":n[3]},{items:n[5]},{searchable:n[5].length>5},{selectionKey:"id"},{labelComponent:n[4]},{disabled:n[11]},{optionComponent:n[4]},{multiple:n[2]},{class:"records-select block-options"},n[13]];function a(d){n[19](d)}function u(d){n[20](d)}let f={$$slots:{afterOptions:[mT]},$$scope:{ctx:n}};for(let d=0;d_e(e,"keyOfSelected",a)),le.push(()=>_e(e,"selected",u)),e.$on("show",n[21]),e.$on("hide",n[22]);let c={collection:n[8]};return l=new V_({props:c}),n[23](l),l.$on("save",n[24]),{c(){j(e.$$.fragment),s=O(),j(l.$$.fragment)},m(d,h){R(e,d,h),S(d,s,h),R(l,d,h),o=!0},p(d,[h]){const m=h&10300?Zt(r,[h&2056&&{selectPlaceholder:d[11]?"Loading...":d[3]},h&32&&{items:d[5]},h&32&&{searchable:d[5].length>5},r[3],h&16&&{labelComponent:d[4]},h&2048&&{disabled:d[11]},h&16&&{optionComponent:d[4]},h&4&&{multiple:d[2]},r[8],h&8192&&Kn(d[13])]):{};h&536872896&&(m.$$scope={dirty:h,ctx:d}),!t&&h&2&&(t=!0,m.keyOfSelected=d[1],ve(()=>t=!1)),!i&&h&1&&(i=!0,m.selected=d[0],ve(()=>i=!1)),e.$set(m);const b={};h&256&&(b.collection=d[8]),l.$set(b)},i(d){o||(E(e.$$.fragment,d),E(l.$$.fragment,d),o=!0)},o(d){P(e.$$.fragment,d),P(l.$$.fragment,d),o=!1},d(d){H(e,d),d&&w(s),n[23](null),H(l,d)}}}function _T(n,e,t){let i,s;const l=["multiple","selected","keyOfSelected","selectPlaceholder","optionComponent","collectionId"];let o=wt(e,l);const r="select_"+W.randomString(5);let{multiple:a=!1}=e,{selected:u=[]}=e,{keyOfSelected:f=a?[]:void 0}=e,{selectPlaceholder:c="- Select -"}=e,{optionComponent:d=hT}=e,{collectionId:h}=e,m=[],b=1,g=0,y=!1,k=!1,$=!1,C=null,M;async function T(){if(!h){t(8,C=null),t(7,$=!1);return}t(7,$=!0);try{t(8,C=await de.collections.getOne(h,{$cancelKey:"collection_"+r}))}catch(Q){de.errorResponseHandler(Q)}t(7,$=!1)}async function D(){const Q=W.toArray(f);if(!h||!Q.length)return;t(16,k=!0);let X=[];const Y=Q.slice(),x=[];for(;Y.length>0;){const U=[];for(const re of Y.splice(0,50))U.push(`id="${re}"`);x.push(de.collection(h).getFullList(200,{filter:U.join("||"),$autoCancel:!1}))}try{await Promise.all(x).then(U=>{X=X.concat(...U)}),t(0,u=[]);for(const U of Q){const re=W.findByKey(X,"id",U);re&&u.push(re)}t(5,m=W.filterDuplicatesByKey(u.concat(m)))}catch(U){de.errorResponseHandler(U)}t(16,k=!1)}async function A(Q=!1){if(!!h){t(6,y=!0);try{const X=Q?1:b+1,Y=await de.collection(h).getList(X,200,{sort:"-created",$cancelKey:r+"loadList"});Q&&t(5,m=W.toArray(u).slice()),t(5,m=W.filterDuplicatesByKey(m.concat(Y.items,W.toArray(u)))),b=Y.page,t(15,g=Y.totalItems)}catch(X){de.errorResponseHandler(X)}t(6,y=!1)}}const I=()=>M==null?void 0:M.show(),L=()=>A();function F(Q){f=Q,t(1,f)}function q(Q){u=Q,t(0,u)}function z(Q){Ve.call(this,n,Q)}function J(Q){Ve.call(this,n,Q)}function G(Q){le[Q?"unshift":"push"](()=>{M=Q,t(9,M)})}const ie=Q=>{var X;(X=Q==null?void 0:Q.detail)!=null&&X.id&&t(1,f=W.toArray(f).concat(Q.detail.id)),A(!0)};return n.$$set=Q=>{e=Ke(Ke({},e),Wn(Q)),t(13,o=wt(e,l)),"multiple"in Q&&t(2,a=Q.multiple),"selected"in Q&&t(0,u=Q.selected),"keyOfSelected"in Q&&t(1,f=Q.keyOfSelected),"selectPlaceholder"in Q&&t(3,c=Q.selectPlaceholder),"optionComponent"in Q&&t(4,d=Q.optionComponent),"collectionId"in Q&&t(14,h=Q.collectionId)},n.$$.update=()=>{n.$$.dirty&16384&&h&&(T(),D().then(()=>{A(!0)})),n.$$.dirty&65600&&t(11,i=y||k),n.$$.dirty&32800&&t(10,s=g>m.length)},[u,f,a,c,d,m,y,$,C,M,s,i,A,o,h,g,k,I,L,F,q,z,J,G,ie]}class bT extends ke{constructor(e){super(),ye(this,e,_T,gT,be,{multiple:2,selected:0,keyOfSelected:1,selectPlaceholder:3,optionComponent:4,collectionId:14})}}function xd(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=v("div"),t=B("Select up to "),s=B(i),l=B(" items."),p(e,"class","help-block")},m(o,r){S(o,e,r),_(e,t),_(e,s),_(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&ae(s,i)},d(o){o&&w(e)}}}function vT(n){var k,$;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;function b(C){n[3](C)}let g={toggle:!0,id:n[4],multiple:n[2],collectionId:(k=n[1].options)==null?void 0:k.collectionId};n[0]!==void 0&&(g.keyOfSelected=n[0]),f=new bT({props:g}),le.push(()=>_e(f,"keyOfSelected",b));let y=(($=n[1].options)==null?void 0:$.maxSelect)>1&&xd(n);return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),j(f.$$.fragment),d=O(),y&&y.c(),h=Ee(),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(C,M){S(C,e,M),_(e,t),_(e,s),_(e,l),_(l,r),S(C,u,M),R(f,C,M),S(C,d,M),y&&y.m(C,M),S(C,h,M),m=!0},p(C,M){var D,A;(!m||M&2&&i!==(i=W.getFieldTypeIcon(C[1].type)))&&p(t,"class",i),(!m||M&2)&&o!==(o=C[1].name+"")&&ae(r,o),(!m||M&16&&a!==(a=C[4]))&&p(e,"for",a);const T={};M&16&&(T.id=C[4]),M&4&&(T.multiple=C[2]),M&2&&(T.collectionId=(D=C[1].options)==null?void 0:D.collectionId),!c&&M&1&&(c=!0,T.keyOfSelected=C[0],ve(()=>c=!1)),f.$set(T),((A=C[1].options)==null?void 0:A.maxSelect)>1?y?y.p(C,M):(y=xd(C),y.c(),y.m(h.parentNode,h)):y&&(y.d(1),y=null)},i(C){m||(E(f.$$.fragment,C),m=!0)},o(C){P(f.$$.fragment,C),m=!1},d(C){C&&w(e),C&&w(u),H(f,C),C&&w(d),y&&y.d(C),C&&w(h)}}}function yT(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[vT,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function kT(n,e,t){let i,{field:s=new dn}=e,{value:l=void 0}=e;function o(r){l=r,t(0,l),t(2,i),t(1,s)}return n.$$set=r=>{"field"in r&&t(1,s=r.field),"value"in r&&t(0,l=r.value)},n.$$.update=()=>{var r,a;n.$$.dirty&2&&t(2,i=((r=s.options)==null?void 0:r.maxSelect)!=1),n.$$.dirty&7&&i&&Array.isArray(l)&&((a=s.options)==null?void 0:a.maxSelect)&&l.length>s.options.maxSelect&&t(0,l=l.slice(s.options.maxSelect-1))},[l,s,i,o]}class wT extends ke{constructor(e){super(),ye(this,e,kT,yT,be,{field:1,value:0})}}function ST(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Auth URL"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].authUrl),r||(a=K(l,"input",n[2]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&ce(l,u[0].authUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function $T(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Token URL"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].tokenUrl),r||(a=K(l,"input",n[3]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&l.value!==u[0].tokenUrl&&ce(l,u[0].tokenUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function CT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("User API URL"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].userApiUrl),r||(a=K(l,"input",n[4]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&l.value!==u[0].userApiUrl&&ce(l,u[0].userApiUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function TT(n){let e,t,i,s,l,o,r,a,u,f,c,d;return l=new ge({props:{class:"form-field",name:n[1]+".authUrl",$$slots:{default:[ST,({uniqueId:h})=>({5:h}),({uniqueId:h})=>h?32:0]},$$scope:{ctx:n}}}),a=new ge({props:{class:"form-field",name:n[1]+".tokenUrl",$$slots:{default:[$T,({uniqueId:h})=>({5:h}),({uniqueId:h})=>h?32:0]},$$scope:{ctx:n}}}),c=new ge({props:{class:"form-field",name:n[1]+".userApiUrl",$$slots:{default:[CT,({uniqueId:h})=>({5:h}),({uniqueId:h})=>h?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Selfhosted endpoints (optional)",t=O(),i=v("div"),s=v("div"),j(l.$$.fragment),o=O(),r=v("div"),j(a.$$.fragment),u=O(),f=v("div"),j(c.$$.fragment),p(e,"class","section-title"),p(s,"class","col-lg-4"),p(r,"class","col-lg-4"),p(f,"class","col-lg-4"),p(i,"class","grid")},m(h,m){S(h,e,m),S(h,t,m),S(h,i,m),_(i,s),R(l,s,null),_(i,o),_(i,r),R(a,r,null),_(i,u),_(i,f),R(c,f,null),d=!0},p(h,[m]){const b={};m&2&&(b.name=h[1]+".authUrl"),m&97&&(b.$$scope={dirty:m,ctx:h}),l.$set(b);const g={};m&2&&(g.name=h[1]+".tokenUrl"),m&97&&(g.$$scope={dirty:m,ctx:h}),a.$set(g);const y={};m&2&&(y.name=h[1]+".userApiUrl"),m&97&&(y.$$scope={dirty:m,ctx:h}),c.$set(y)},i(h){d||(E(l.$$.fragment,h),E(a.$$.fragment,h),E(c.$$.fragment,h),d=!0)},o(h){P(l.$$.fragment,h),P(a.$$.fragment,h),P(c.$$.fragment,h),d=!1},d(h){h&&w(e),h&&w(t),h&&w(i),H(l),H(a),H(c)}}}function MT(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}function r(){s.userApiUrl=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"config"in a&&t(0,s=a.config)},[s,i,l,o,r]}class OT extends ke{constructor(e){super(),ye(this,e,MT,TT,be,{key:1,config:0})}}function DT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Auth URL"),s=O(),l=v("input"),r=O(),a=v("div"),a.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/authorize",p(e,"for",i=n[4]),p(l,"type","url"),p(l,"id",o=n[4]),l.required=!0,p(l,"placeholder","https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/authorize"),p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),ce(l,n[0].authUrl),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[2]),u=!0)},p(c,d){d&16&&i!==(i=c[4])&&p(e,"for",i),d&16&&o!==(o=c[4])&&p(l,"id",o),d&1&&ce(l,c[0].authUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function AT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Token URL"),s=O(),l=v("input"),r=O(),a=v("div"),a.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/token",p(e,"for",i=n[4]),p(l,"type","text"),p(l,"id",o=n[4]),l.required=!0,p(l,"placeholder","https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/token"),p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),ce(l,n[0].tokenUrl),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[3]),u=!0)},p(c,d){d&16&&i!==(i=c[4])&&p(e,"for",i),d&16&&o!==(o=c[4])&&p(l,"id",o),d&1&&l.value!==c[0].tokenUrl&&ce(l,c[0].tokenUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function ET(n){let e,t,i,s,l,o,r,a,u;return l=new ge({props:{class:"form-field required",name:n[1]+".authUrl",$$slots:{default:[DT,({uniqueId:f})=>({4:f}),({uniqueId:f})=>f?16:0]},$$scope:{ctx:n}}}),a=new ge({props:{class:"form-field required",name:n[1]+".tokenUrl",$$slots:{default:[AT,({uniqueId:f})=>({4:f}),({uniqueId:f})=>f?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Azure AD endpoints",t=O(),i=v("div"),s=v("div"),j(l.$$.fragment),o=O(),r=v("div"),j(a.$$.fragment),p(e,"class","section-title"),p(s,"class","col-lg-12"),p(r,"class","col-lg-12"),p(i,"class","grid")},m(f,c){S(f,e,c),S(f,t,c),S(f,i,c),_(i,s),R(l,s,null),_(i,o),_(i,r),R(a,r,null),u=!0},p(f,[c]){const d={};c&2&&(d.name=f[1]+".authUrl"),c&49&&(d.$$scope={dirty:c,ctx:f}),l.$set(d);const h={};c&2&&(h.name=f[1]+".tokenUrl"),c&49&&(h.$$scope={dirty:c,ctx:f}),a.$set(h)},i(f){u||(E(l.$$.fragment,f),E(a.$$.fragment,f),u=!0)},o(f){P(l.$$.fragment,f),P(a.$$.fragment,f),u=!1},d(f){f&&w(e),f&&w(t),f&&w(i),H(l),H(a)}}}function IT(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"config"in r&&t(0,s=r.config)},[s,i,l,o]}class PT extends ke{constructor(e){super(),ye(this,e,IT,ET,be,{key:1,config:0})}}const bl={googleAuth:{title:"Google",icon:"ri-google-fill"},facebookAuth:{title:"Facebook",icon:"ri-facebook-fill"},twitterAuth:{title:"Twitter",icon:"ri-twitter-fill"},githubAuth:{title:"GitHub",icon:"ri-github-fill"},gitlabAuth:{title:"GitLab",icon:"ri-gitlab-fill",optionsComponent:OT},discordAuth:{title:"Discord",icon:"ri-discord-fill"},microsoftAuth:{title:"Microsoft",icon:"ri-microsoft-fill",optionsComponent:PT},spotifyAuth:{title:"Spotify",icon:"ri-spotify-fill"},kakaoAuth:{title:"Kakao",icon:"ri-kakao-talk-fill"},twitchAuth:{title:"Twitch",icon:"ri-twitch-fill"},stravaAuth:{title:"Strava",icon:"ri-riding-fill"},giteeAuth:{title:"Gitee",icon:"ri-git-repository-fill"}};function ep(n,e,t){const i=n.slice();return i[9]=e[t],i}function LT(n){let e;return{c(){e=v("p"),e.textContent="No linked OAuth2 providers.",p(e,"class","txt-hint txt-center")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function NT(n){let e,t=n[1],i=[];for(let s=0;s',p(e,"class","block txt-center")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function tp(n){let e,t,i,s,l,o=n[3](n[9].provider)+"",r,a,u,f,c=n[9].providerId+"",d,h,m,b,g,y;function k(){return n[6](n[9])}return{c(){e=v("div"),t=v("i"),s=O(),l=v("span"),r=B(o),a=O(),u=v("div"),f=B("ID: "),d=B(c),h=O(),m=v("button"),m.innerHTML='',b=O(),p(t,"class",i=n[4](n[9].provider)),p(l,"class","txt"),p(u,"class","txt-hint"),p(m,"type","button"),p(m,"class","btn btn-secondary link-hint btn-circle btn-sm m-l-auto"),p(e,"class","list-item")},m($,C){S($,e,C),_(e,t),_(e,s),_(e,l),_(l,r),_(e,a),_(e,u),_(u,f),_(u,d),_(e,h),_(e,m),_(e,b),g||(y=K(m,"click",k),g=!0)},p($,C){n=$,C&2&&i!==(i=n[4](n[9].provider))&&p(t,"class",i),C&2&&o!==(o=n[3](n[9].provider)+"")&&ae(r,o),C&2&&c!==(c=n[9].providerId+"")&&ae(d,c)},d($){$&&w(e),g=!1,y()}}}function RT(n){let e;function t(l,o){var r;return l[2]?FT:((r=l[0])==null?void 0:r.id)&&l[1].length?NT:LT}let i=t(n),s=i(n);return{c(){s.c(),e=Ee()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:te,o:te,d(l){s.d(l),l&&w(e)}}}function HT(n,e,t){const i=It();let{record:s}=e,l=[],o=!1;function r(d){var h;return((h=bl[d+"Auth"])==null?void 0:h.title)||W.sentenize(d,!1)}function a(d){var h;return((h=bl[d+"Auth"])==null?void 0:h.icon)||`ri-${d}-line`}async function u(){if(!(s!=null&&s.id)){t(1,l=[]),t(2,o=!1);return}t(2,o=!0);try{t(1,l=await de.collection(s.collectionId).listExternalAuths(s.id))}catch(d){de.errorResponseHandler(d)}t(2,o=!1)}function f(d){!(s!=null&&s.id)||!d||wn(`Do you really want to unlink the ${r(d)} provider?`,()=>de.collection(s.collectionId).unlinkExternalAuth(s.id,d).then(()=>{Lt(`Successfully unlinked the ${r(d)} provider.`),i("unlink",d),u()}).catch(h=>{de.errorResponseHandler(h)}))}u();const c=d=>f(d.provider);return n.$$set=d=>{"record"in d&&t(0,s=d.record)},[s,l,o,r,a,f,c]}class jT extends ke{constructor(e){super(),ye(this,e,HT,RT,be,{record:0})}}function np(n,e,t){const i=n.slice();return i[46]=e[t],i[47]=e,i[48]=t,i}function ip(n){let e,t;return e=new ge({props:{class:"form-field disabled",name:"id",$$slots:{default:[qT,({uniqueId:i})=>({49:i}),({uniqueId:i})=>[0,i?262144:0]]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s[0]&4|s[1]&786432&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function qT(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="id",l=O(),o=v("span"),a=O(),u=v("div"),f=v("i"),d=O(),h=v("input"),p(t,"class",W.getFieldTypeIcon("primary")),p(s,"class","txt"),p(o,"class","flex-fill"),p(e,"for",r=n[49]),p(f,"class","ri-calendar-event-line txt-disabled"),p(u,"class","form-field-addon"),p(h,"type","text"),p(h,"id",m=n[49]),h.value=b=n[2].id,h.readOnly=!0},m(k,$){S(k,e,$),_(e,t),_(e,i),_(e,s),_(e,l),_(e,o),S(k,a,$),S(k,u,$),_(u,f),S(k,d,$),S(k,h,$),g||(y=Ae(c=Be.call(null,f,{text:`Created: ${n[2].created} -Updated: ${n[2].updated}`,position:"left"})),g=!0)},p(k,$){$[1]&262144&&r!==(r=k[49])&&p(e,"for",r),c&&Jt(c.update)&&$[0]&4&&c.update.call(null,{text:`Created: ${k[2].created} -Updated: ${k[2].updated}`,position:"left"}),$[1]&262144&&m!==(m=k[49])&&p(h,"id",m),$[0]&4&&b!==(b=k[2].id)&&h.value!==b&&(h.value=b)},d(k){k&&w(e),k&&w(a),k&&w(u),k&&w(d),k&&w(h),g=!1,y()}}}function sp(n){var u,f;let e,t,i,s,l;function o(c){n[26](c)}let r={collection:n[0]};n[2]!==void 0&&(r.record=n[2]),e=new u4({props:r}),le.push(()=>_e(e,"record",o));let a=((f=(u=n[0])==null?void 0:u.schema)==null?void 0:f.length)&&lp();return{c(){j(e.$$.fragment),i=O(),a&&a.c(),s=Ee()},m(c,d){R(e,c,d),S(c,i,d),a&&a.m(c,d),S(c,s,d),l=!0},p(c,d){var m,b;const h={};d[0]&1&&(h.collection=c[0]),!t&&d[0]&4&&(t=!0,h.record=c[2],ve(()=>t=!1)),e.$set(h),(b=(m=c[0])==null?void 0:m.schema)!=null&&b.length?a||(a=lp(),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null)},i(c){l||(E(e.$$.fragment,c),l=!0)},o(c){P(e.$$.fragment,c),l=!1},d(c){H(e,c),c&&w(i),a&&a.d(c),c&&w(s)}}}function lp(n){let e;return{c(){e=v("hr")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function VT(n){let e,t,i;function s(o){n[38](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new wT({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function zT(n){let e,t,i,s,l;function o(f){n[35](f,n[46])}function r(f){n[36](f,n[46])}function a(f){n[37](f,n[46])}let u={field:n[46],record:n[2]};return n[2][n[46].name]!==void 0&&(u.value=n[2][n[46].name]),n[3][n[46].name]!==void 0&&(u.uploadedFiles=n[3][n[46].name]),n[4][n[46].name]!==void 0&&(u.deletedFileIndexes=n[4][n[46].name]),e=new cT({props:u}),le.push(()=>_e(e,"value",o)),le.push(()=>_e(e,"uploadedFiles",r)),le.push(()=>_e(e,"deletedFileIndexes",a)),{c(){j(e.$$.fragment)},m(f,c){R(e,f,c),l=!0},p(f,c){n=f;const d={};c[0]&1&&(d.field=n[46]),c[0]&4&&(d.record=n[2]),!t&&c[0]&5&&(t=!0,d.value=n[2][n[46].name],ve(()=>t=!1)),!i&&c[0]&9&&(i=!0,d.uploadedFiles=n[3][n[46].name],ve(()=>i=!1)),!s&&c[0]&17&&(s=!0,d.deletedFileIndexes=n[4][n[46].name],ve(()=>s=!1)),e.$set(d)},i(f){l||(E(e.$$.fragment,f),l=!0)},o(f){P(e.$$.fragment,f),l=!1},d(f){H(e,f)}}}function BT(n){let e,t,i;function s(o){n[34](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new U4({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function UT(n){let e,t,i;function s(o){n[33](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new q4({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function WT(n){let e,t,i;function s(o){n[32](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new F4({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function YT(n){let e,t,i;function s(o){n[31](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new I4({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function KT(n){let e,t,i;function s(o){n[30](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new O4({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function JT(n){let e,t,i;function s(o){n[29](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new $4({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function ZT(n){let e,t,i;function s(o){n[28](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new y4({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function GT(n){let e,t,i;function s(o){n[27](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new g4({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function op(n,e){let t,i,s,l,o;const r=[GT,ZT,JT,KT,YT,WT,UT,BT,zT,VT],a=[];function u(f,c){return f[46].type==="text"?0:f[46].type==="number"?1:f[46].type==="bool"?2:f[46].type==="email"?3:f[46].type==="url"?4:f[46].type==="date"?5:f[46].type==="select"?6:f[46].type==="json"?7:f[46].type==="file"?8:f[46].type==="relation"?9:-1}return~(i=u(e))&&(s=a[i]=r[i](e)),{key:n,first:null,c(){t=Ee(),s&&s.c(),l=Ee(),this.first=t},m(f,c){S(f,t,c),~i&&a[i].m(f,c),S(f,l,c),o=!0},p(f,c){e=f;let d=i;i=u(e),i===d?~i&&a[i].p(e,c):(s&&(pe(),P(a[d],1,1,()=>{a[d]=null}),he()),~i?(s=a[i],s?s.p(e,c):(s=a[i]=r[i](e),s.c()),E(s,1),s.m(l.parentNode,l)):s=null)},i(f){o||(E(s),o=!0)},o(f){P(s),o=!1},d(f){f&&w(t),~i&&a[i].d(f),f&&w(l)}}}function rp(n){let e,t,i;return t=new jT({props:{record:n[2]}}),{c(){e=v("div"),j(t.$$.fragment),p(e,"class","tab-item"),ne(e,"active",n[10]===vl)},m(s,l){S(s,e,l),R(t,e,null),i=!0},p(s,l){const o={};l[0]&4&&(o.record=s[2]),t.$set(o),(!i||l[0]&1024)&&ne(e,"active",s[10]===vl)},i(s){i||(E(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),H(t)}}}function XT(n){var g,y;let e,t,i,s,l=[],o=new Map,r,a,u,f,c=!n[2].isNew&&ip(n),d=((g=n[0])==null?void 0:g.isAuth)&&sp(n),h=((y=n[0])==null?void 0:y.schema)||[];const m=k=>k[46].name;for(let k=0;k{c=null}),he()):c?(c.p(k,$),$[0]&4&&E(c,1)):(c=ip(k),c.c(),E(c,1),c.m(t,i)),(C=k[0])!=null&&C.isAuth?d?(d.p(k,$),$[0]&1&&E(d,1)):(d=sp(k),d.c(),E(d,1),d.m(t,s)):d&&(pe(),P(d,1,1,()=>{d=null}),he()),$[0]&29&&(h=((M=k[0])==null?void 0:M.schema)||[],pe(),l=bt(l,$,m,1,k,h,o,t,nn,op,null,np),he()),(!a||$[0]&1024)&&ne(t,"active",k[10]===Ui),k[0].isAuth&&!k[2].isNew?b?(b.p(k,$),$[0]&5&&E(b,1)):(b=rp(k),b.c(),E(b,1),b.m(e,null)):b&&(pe(),P(b,1,1,()=>{b=null}),he())},i(k){if(!a){E(c),E(d);for(let $=0;$ - Send verification email`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[21]),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function fp(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - Send password reset email`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[22]),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function QT(n){let e,t,i,s,l,o=n[0].isAuth&&!n[7].verified&&n[7].email&&up(n),r=n[0].isAuth&&n[7].email&&fp(n);return{c(){o&&o.c(),e=O(),r&&r.c(),t=O(),i=v("button"),i.innerHTML=` - Delete`,p(i,"type","button"),p(i,"class","dropdown-item txt-danger closable")},m(a,u){o&&o.m(a,u),S(a,e,u),r&&r.m(a,u),S(a,t,u),S(a,i,u),s||(l=K(i,"click",Yn(ut(n[23]))),s=!0)},p(a,u){a[0].isAuth&&!a[7].verified&&a[7].email?o?o.p(a,u):(o=up(a),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null),a[0].isAuth&&a[7].email?r?r.p(a,u):(r=fp(a),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},d(a){o&&o.d(a),a&&w(e),r&&r.d(a),a&&w(t),a&&w(i),s=!1,l()}}}function cp(n){let e,t,i,s,l,o;return{c(){e=v("div"),t=v("button"),t.textContent="Account",i=O(),s=v("button"),s.textContent="Authorized providers",p(t,"type","button"),p(t,"class","tab-item"),ne(t,"active",n[10]===Ui),p(s,"type","button"),p(s,"class","tab-item"),ne(s,"active",n[10]===vl),p(e,"class","tabs-header stretched")},m(r,a){S(r,e,a),_(e,t),_(e,i),_(e,s),l||(o=[K(t,"click",n[24]),K(s,"click",n[25])],l=!0)},p(r,a){a[0]&1024&&ne(t,"active",r[10]===Ui),a[0]&1024&&ne(s,"active",r[10]===vl)},d(r){r&&w(e),l=!1,Pe(o)}}}function xT(n){var b;let e,t=n[2].isNew?"New":"Edit",i,s,l,o=((b=n[0])==null?void 0:b.name)+"",r,a,u,f,c,d,h=!n[2].isNew&&ap(n),m=n[0].isAuth&&!n[2].isNew&&cp(n);return{c(){e=v("h4"),i=B(t),s=O(),l=v("strong"),r=B(o),a=B(" record"),u=O(),h&&h.c(),f=O(),m&&m.c(),c=Ee()},m(g,y){S(g,e,y),_(e,i),_(e,s),_(e,l),_(l,r),_(e,a),S(g,u,y),h&&h.m(g,y),S(g,f,y),m&&m.m(g,y),S(g,c,y),d=!0},p(g,y){var k;(!d||y[0]&4)&&t!==(t=g[2].isNew?"New":"Edit")&&ae(i,t),(!d||y[0]&1)&&o!==(o=((k=g[0])==null?void 0:k.name)+"")&&ae(r,o),g[2].isNew?h&&(pe(),P(h,1,1,()=>{h=null}),he()):h?(h.p(g,y),y[0]&4&&E(h,1)):(h=ap(g),h.c(),E(h,1),h.m(f.parentNode,f)),g[0].isAuth&&!g[2].isNew?m?m.p(g,y):(m=cp(g),m.c(),m.m(c.parentNode,c)):m&&(m.d(1),m=null)},i(g){d||(E(h),d=!0)},o(g){P(h),d=!1},d(g){g&&w(e),g&&w(u),h&&h.d(g),g&&w(f),m&&m.d(g),g&&w(c)}}}function eM(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=O(),s=v("button"),l=v("span"),r=B(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[8],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[12]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[11]||n[8],ne(s,"btn-loading",n[8])},m(c,d){S(c,e,d),_(e,t),S(c,i,d),S(c,s,d),_(s,l),_(l,r),u||(f=K(e,"click",n[20]),u=!0)},p(c,d){d[0]&256&&(e.disabled=c[8]),d[0]&4&&o!==(o=c[2].isNew?"Create":"Save changes")&&ae(r,o),d[0]&2304&&a!==(a=!c[11]||c[8])&&(s.disabled=a),d[0]&256&&ne(s,"btn-loading",c[8])},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,f()}}}function tM(n){var s;let e,t,i={class:"overlay-panel-lg record-panel "+(((s=n[0])==null?void 0:s.isAuth)&&!n[2].isNew?"colored-header":""),beforeHide:n[39],$$slots:{footer:[eM],header:[xT],default:[XT]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[40](e),e.$on("hide",n[41]),e.$on("show",n[42]),{c(){j(e.$$.fragment)},m(l,o){R(e,l,o),t=!0},p(l,o){var a;const r={};o[0]&5&&(r.class="overlay-panel-lg record-panel "+(((a=l[0])==null?void 0:a.isAuth)&&!l[2].isNew?"colored-header":"")),o[0]&544&&(r.beforeHide=l[39]),o[0]&3485|o[1]&524288&&(r.$$scope={dirty:o,ctx:l}),e.$set(r)},i(l){t||(E(e.$$.fragment,l),t=!0)},o(l){P(e.$$.fragment,l),t=!1},d(l){n[40](null),H(e,l)}}}const Ui="form",vl="providers";function dp(n){return JSON.stringify(n)}function nM(n,e,t){let i,s,l;const o=It(),r="record_"+W.randomString(5);let{collection:a}=e,u,f=null,c=new Wi,d=!1,h=!1,m={},b={},g="",y=Ui;function k(fe){return C(fe),t(9,h=!0),t(10,y=Ui),u==null?void 0:u.show()}function $(){return u==null?void 0:u.hide()}async function C(fe){Fn({}),t(7,f=fe||{}),fe!=null&&fe.clone?t(2,c=fe.clone()):t(2,c=new Wi),t(3,m={}),t(4,b={}),await Tn(),t(18,g=dp(c))}function M(){if(d||!l||!(a!=null&&a.id))return;t(8,d=!0);const fe=D();let Z;c.isNew?Z=de.collection(a.id).create(fe):Z=de.collection(a.id).update(c.id,fe),Z.then(Ce=>{Lt(c.isNew?"Successfully created record.":"Successfully updated record."),t(9,h=!1),$(),o("save",Ce)}).catch(Ce=>{de.errorResponseHandler(Ce)}).finally(()=>{t(8,d=!1)})}function T(){!(f!=null&&f.id)||wn("Do you really want to delete the selected record?",()=>de.collection(f.collectionId).delete(f.id).then(()=>{$(),Lt("Successfully deleted record."),o("delete",f)}).catch(fe=>{de.errorResponseHandler(fe)}))}function D(){const fe=(c==null?void 0:c.export())||{},Z=new FormData,Ce={};for(const Ue of(a==null?void 0:a.schema)||[])Ce[Ue.name]=!0;a!=null&&a.isAuth&&(Ce.username=!0,Ce.email=!0,Ce.emailVisibility=!0,Ce.password=!0,Ce.passwordConfirm=!0,Ce.verified=!0);for(const Ue in fe)!Ce[Ue]||(typeof fe[Ue]>"u"&&(fe[Ue]=null),W.addValueToFormData(Z,Ue,fe[Ue]));for(const Ue in m){const Vt=W.toArray(m[Ue]);for(const Gt of Vt)Z.append(Ue,Gt)}for(const Ue in b){const Vt=W.toArray(b[Ue]);for(const Gt of Vt)Z.append(Ue+"."+Gt,"")}return Z}function A(){!(a!=null&&a.id)||!(f!=null&&f.email)||wn(`Do you really want to sent verification email to ${f.email}?`,()=>de.collection(a.id).requestVerification(f.email).then(()=>{Lt(`Successfully sent verification email to ${f.email}.`)}).catch(fe=>{de.errorResponseHandler(fe)}))}function I(){!(a!=null&&a.id)||!(f!=null&&f.email)||wn(`Do you really want to sent password reset email to ${f.email}?`,()=>de.collection(a.id).requestPasswordReset(f.email).then(()=>{Lt(`Successfully sent password reset email to ${f.email}.`)}).catch(fe=>{de.errorResponseHandler(fe)}))}const L=()=>$(),F=()=>A(),q=()=>I(),z=()=>T(),J=()=>t(10,y=Ui),G=()=>t(10,y=vl);function ie(fe){c=fe,t(2,c)}function Q(fe,Z){n.$$.not_equal(c[Z.name],fe)&&(c[Z.name]=fe,t(2,c))}function X(fe,Z){n.$$.not_equal(c[Z.name],fe)&&(c[Z.name]=fe,t(2,c))}function Y(fe,Z){n.$$.not_equal(c[Z.name],fe)&&(c[Z.name]=fe,t(2,c))}function x(fe,Z){n.$$.not_equal(c[Z.name],fe)&&(c[Z.name]=fe,t(2,c))}function U(fe,Z){n.$$.not_equal(c[Z.name],fe)&&(c[Z.name]=fe,t(2,c))}function re(fe,Z){n.$$.not_equal(c[Z.name],fe)&&(c[Z.name]=fe,t(2,c))}function Re(fe,Z){n.$$.not_equal(c[Z.name],fe)&&(c[Z.name]=fe,t(2,c))}function Ne(fe,Z){n.$$.not_equal(c[Z.name],fe)&&(c[Z.name]=fe,t(2,c))}function Le(fe,Z){n.$$.not_equal(c[Z.name],fe)&&(c[Z.name]=fe,t(2,c))}function Fe(fe,Z){n.$$.not_equal(m[Z.name],fe)&&(m[Z.name]=fe,t(3,m))}function me(fe,Z){n.$$.not_equal(b[Z.name],fe)&&(b[Z.name]=fe,t(4,b))}function Se(fe,Z){n.$$.not_equal(c[Z.name],fe)&&(c[Z.name]=fe,t(2,c))}const we=()=>s&&h?(wn("You have unsaved changes. Do you really want to close the panel?",()=>{t(9,h=!1),$()}),!1):(Fn({}),!0);function We(fe){le[fe?"unshift":"push"](()=>{u=fe,t(6,u)})}function ue(fe){Ve.call(this,n,fe)}function se(fe){Ve.call(this,n,fe)}return n.$$set=fe=>{"collection"in fe&&t(0,a=fe.collection)},n.$$.update=()=>{n.$$.dirty[0]&24&&t(19,i=W.hasNonEmptyProps(m)||W.hasNonEmptyProps(b)),n.$$.dirty[0]&786436&&t(5,s=i||g!=dp(c)),n.$$.dirty[0]&36&&t(11,l=c.isNew||s)},[a,$,c,m,b,s,u,f,d,h,y,l,r,M,T,A,I,k,g,i,L,F,q,z,J,G,ie,Q,X,Y,x,U,re,Re,Ne,Le,Fe,me,Se,we,We,ue,se]}class V_ extends ke{constructor(e){super(),ye(this,e,nM,tM,be,{collection:0,show:17,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[17]}get hide(){return this.$$.ctx[1]}}function iM(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function sM(n){let e,t;return{c(){e=v("span"),t=B(n[1]),p(e,"class","label txt-base txt-mono"),p(e,"title",n[0])},m(i,s){S(i,e,s),_(e,t)},p(i,s){s&2&&ae(t,i[1]),s&1&&p(e,"title",i[0])},d(i){i&&w(e)}}}function lM(n){let e;function t(l,o){return l[0]?sM:iM}let i=t(n),s=i(n);return{c(){s.c(),e=Ee()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:te,o:te,d(l){s.d(l),l&&w(e)}}}function oM(n,e,t){let{id:i=""}=e,s=i;return n.$$set=l=>{"id"in l&&t(0,i=l.id)},n.$$.update=()=>{n.$$.dirty&1&&typeof i=="string"&&i.length>27&&t(1,s=i.substring(0,5)+"..."+i.substring(i.length-10))},[i,s]}class Za extends ke{constructor(e){super(),ye(this,e,oM,lM,be,{id:0})}}function pp(n,e,t){const i=n.slice();return i[7]=e[t],i[5]=t,i}function hp(n,e,t){const i=n.slice();return i[3]=e[t],i[5]=t,i}function mp(n,e,t){const i=n.slice();return i[3]=e[t],i[5]=t,i}function rM(n){let e,t=hs(n[0][n[1].name])+"",i,s;return{c(){e=v("span"),i=B(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=hs(n[0][n[1].name]))},m(l,o){S(l,e,o),_(e,i)},p(l,o){o&3&&t!==(t=hs(l[0][l[1].name])+"")&&ae(i,t),o&3&&s!==(s=hs(l[0][l[1].name]))&&p(e,"title",s)},i:te,o:te,d(l){l&&w(e)}}}function aM(n){let e,t=[],i=new Map,s,l=W.toArray(n[0][n[1].name]);const o=r=>r[5]+r[7];for(let r=0;r20,o,r=W.toArray(n[0][n[1].name]).slice(0,20);const a=f=>f[5]+f[3];for(let f=0;f20),l?u||(u=bp(),u.c(),u.m(e,null)):u&&(u.d(1),u=null)},i(f){if(!o){for(let c=0;co[5]+o[3];for(let o=0;o{a[d]=null}),he(),s=a[i],s?s.p(f,c):(s=a[i]=r[i](f),s.c()),E(s,1),s.m(e,null)),(!o||c&2&&l!==(l="col-type-"+f[1].type+" col-field-"+f[1].name))&&p(e,"class",l)},i(f){o||(E(s),o=!0)},o(f){P(s),o=!1},d(f){f&&w(e),a[i].d()}}}function hs(n){return n=n||"",n.length>200?n.substring(0,200):n}function bM(n,e,t){let{record:i}=e,{field:s}=e;function l(o){Ve.call(this,n,o)}return n.$$set=o=>{"record"in o&&t(0,i=o.record),"field"in o&&t(1,s=o.field)},[i,s,l]}class vM extends ke{constructor(e){super(),ye(this,e,bM,_M,be,{record:0,field:1})}}function yp(n,e,t){const i=n.slice();return i[51]=e[t],i}function kp(n,e,t){const i=n.slice();return i[54]=e[t],i}function wp(n,e,t){const i=n.slice();return i[54]=e[t],i}function Sp(n,e,t){const i=n.slice();return i[47]=e[t],i}function yM(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("input"),s=O(),l=v("label"),p(t,"type","checkbox"),p(t,"id","checkbox_0"),t.disabled=i=!n[4].length,t.checked=n[14],p(l,"for","checkbox_0"),p(e,"class","form-field")},m(a,u){S(a,e,u),_(e,t),_(e,s),_(e,l),o||(r=K(t,"change",n[26]),o=!0)},p(a,u){u[0]&16&&i!==(i=!a[4].length)&&(t.disabled=i),u[0]&16384&&(t.checked=a[14])},d(a){a&&w(e),o=!1,r()}}}function kM(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function $p(n){let e,t,i;function s(o){n[27](o)}let l={class:"col-type-text col-field-id",name:"id",$$slots:{default:[wM]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Ft({props:l}),le.push(()=>_e(e,"sort",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[1]&268435456&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function wM(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="id",p(t,"class",W.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:te,d(l){l&&w(e)}}}function Cp(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l,o=e&&Tp(n),r=i&&Mp(n);return{c(){o&&o.c(),t=O(),r&&r.c(),s=Ee()},m(a,u){o&&o.m(a,u),S(a,t,u),r&&r.m(a,u),S(a,s,u),l=!0},p(a,u){u[0]&128&&(e=!a[7].includes("@username")),e?o?(o.p(a,u),u[0]&128&&E(o,1)):(o=Tp(a),o.c(),E(o,1),o.m(t.parentNode,t)):o&&(pe(),P(o,1,1,()=>{o=null}),he()),u[0]&128&&(i=!a[7].includes("@email")),i?r?(r.p(a,u),u[0]&128&&E(r,1)):(r=Mp(a),r.c(),E(r,1),r.m(s.parentNode,s)):r&&(pe(),P(r,1,1,()=>{r=null}),he())},i(a){l||(E(o),E(r),l=!0)},o(a){P(o),P(r),l=!1},d(a){o&&o.d(a),a&&w(t),r&&r.d(a),a&&w(s)}}}function Tp(n){let e,t,i;function s(o){n[28](o)}let l={class:"col-type-text col-field-id",name:"username",$$slots:{default:[SM]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Ft({props:l}),le.push(()=>_e(e,"sort",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[1]&268435456&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function SM(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="username",p(t,"class",W.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:te,d(l){l&&w(e)}}}function Mp(n){let e,t,i;function s(o){n[29](o)}let l={class:"col-type-email col-field-email",name:"email",$$slots:{default:[$M]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Ft({props:l}),le.push(()=>_e(e,"sort",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[1]&268435456&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function $M(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="email",p(t,"class",W.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:te,d(l){l&&w(e)}}}function CM(n){let e,t,i,s,l,o=n[54].name+"",r;return{c(){e=v("div"),t=v("i"),s=O(),l=v("span"),r=B(o),p(t,"class",i=W.getFieldTypeIcon(n[54].type)),p(l,"class","txt"),p(e,"class","col-header-content")},m(a,u){S(a,e,u),_(e,t),_(e,s),_(e,l),_(l,r)},p(a,u){u[0]&65536&&i!==(i=W.getFieldTypeIcon(a[54].type))&&p(t,"class",i),u[0]&65536&&o!==(o=a[54].name+"")&&ae(r,o)},d(a){a&&w(e)}}}function Op(n,e){let t,i,s,l;function o(a){e[30](a)}let r={class:"col-type-"+e[54].type+" col-field-"+e[54].name,name:e[54].name,$$slots:{default:[CM]},$$scope:{ctx:e}};return e[0]!==void 0&&(r.sort=e[0]),i=new Ft({props:r}),le.push(()=>_e(i,"sort",o)),{key:n,first:null,c(){t=Ee(),j(i.$$.fragment),this.first=t},m(a,u){S(a,t,u),R(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&65536&&(f.class="col-type-"+e[54].type+" col-field-"+e[54].name),u[0]&65536&&(f.name=e[54].name),u[0]&65536|u[1]&268435456&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&1&&(s=!0,f.sort=e[0],ve(()=>s=!1)),i.$set(f)},i(a){l||(E(i.$$.fragment,a),l=!0)},o(a){P(i.$$.fragment,a),l=!1},d(a){a&&w(t),H(i,a)}}}function Dp(n){let e,t,i;function s(o){n[31](o)}let l={class:"col-type-date col-field-created",name:"created",$$slots:{default:[TM]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Ft({props:l}),le.push(()=>_e(e,"sort",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[1]&268435456&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function TM(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="created",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:te,d(l){l&&w(e)}}}function Ap(n){let e,t,i;function s(o){n[32](o)}let l={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[MM]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Ft({props:l}),le.push(()=>_e(e,"sort",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[1]&268435456&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function MM(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="updated",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:te,d(l){l&&w(e)}}}function Ep(n){let e;function t(l,o){return l[10]?DM:OM}let i=t(n),s=i(n);return{c(){s.c(),e=Ee()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function OM(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&Ip(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No records found.",s=O(),o&&o.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),_(e,t),_(t,i),_(t,s),o&&o.m(t,null),_(e,l)},p(a,u){var f;(f=a[1])!=null&&f.length?o?o.p(a,u):(o=Ip(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function DM(n){let e;return{c(){e=v("tr"),e.innerHTML=` - `},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function Ip(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[37]),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function Pp(n){let e,t,i,s,l;i=new Za({props:{id:n[51].id}});let o=n[2].isAuth&&Lp(n);return{c(){e=v("td"),t=v("div"),j(i.$$.fragment),s=O(),o&&o.c(),p(t,"class","flex flex-gap-5"),p(e,"class","col-type-text col-field-id")},m(r,a){S(r,e,a),_(e,t),R(i,t,null),_(t,s),o&&o.m(t,null),l=!0},p(r,a){const u={};a[0]&16&&(u.id=r[51].id),i.$set(u),r[2].isAuth?o?o.p(r,a):(o=Lp(r),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},i(r){l||(E(i.$$.fragment,r),l=!0)},o(r){P(i.$$.fragment,r),l=!1},d(r){r&&w(e),H(i),o&&o.d()}}}function Lp(n){let e;function t(l,o){return l[51].verified?EM:AM}let i=t(n),s=i(n);return{c(){s.c(),e=Ee()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i!==(i=t(l))&&(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function AM(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-sm txt-hint")},m(s,l){S(s,e,l),t||(i=Ae(Be.call(null,e,"Unverified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function EM(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-fill txt-sm txt-success")},m(s,l){S(s,e,l),t||(i=Ae(Be.call(null,e,"Verified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function Np(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l=e&&Fp(n),o=i&&Rp(n);return{c(){l&&l.c(),t=O(),o&&o.c(),s=Ee()},m(r,a){l&&l.m(r,a),S(r,t,a),o&&o.m(r,a),S(r,s,a)},p(r,a){a[0]&128&&(e=!r[7].includes("@username")),e?l?l.p(r,a):(l=Fp(r),l.c(),l.m(t.parentNode,t)):l&&(l.d(1),l=null),a[0]&128&&(i=!r[7].includes("@email")),i?o?o.p(r,a):(o=Rp(r),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},d(r){l&&l.d(r),r&&w(t),o&&o.d(r),r&&w(s)}}}function Fp(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!W.isEmpty(o[51].username)),t?PM:IM}let s=i(n,[-1,-1]),l=s(n);return{c(){e=v("td"),l.c(),p(e,"class","col-type-text col-field-username")},m(o,r){S(o,e,r),l.m(e,null)},p(o,r){s===(s=i(o,r))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,null)))},d(o){o&&w(e),l.d()}}}function IM(n){let e,t=n[51].username+"",i,s;return{c(){e=v("span"),i=B(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[51].username)},m(l,o){S(l,e,o),_(e,i)},p(l,o){o[0]&16&&t!==(t=l[51].username+"")&&ae(i,t),o[0]&16&&s!==(s=l[51].username)&&p(e,"title",s)},d(l){l&&w(e)}}}function PM(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function Rp(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!W.isEmpty(o[51].email)),t?NM:LM}let s=i(n,[-1,-1]),l=s(n);return{c(){e=v("td"),l.c(),p(e,"class","col-type-text col-field-email")},m(o,r){S(o,e,r),l.m(e,null)},p(o,r){s===(s=i(o,r))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,null)))},d(o){o&&w(e),l.d()}}}function LM(n){let e,t=n[51].email+"",i,s;return{c(){e=v("span"),i=B(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[51].email)},m(l,o){S(l,e,o),_(e,i)},p(l,o){o[0]&16&&t!==(t=l[51].email+"")&&ae(i,t),o[0]&16&&s!==(s=l[51].email)&&p(e,"title",s)},d(l){l&&w(e)}}}function NM(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function Hp(n,e){let t,i,s;return i=new vM({props:{record:e[51],field:e[54]}}),{key:n,first:null,c(){t=Ee(),j(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),R(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&16&&(r.record=e[51]),o[0]&65536&&(r.field=e[54]),i.$set(r)},i(l){s||(E(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(t),H(i,l)}}}function jp(n){let e,t,i;return t=new Ki({props:{date:n[51].created}}),{c(){e=v("td"),j(t.$$.fragment),p(e,"class","col-type-date col-field-created")},m(s,l){S(s,e,l),R(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[51].created),t.$set(o)},i(s){i||(E(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),H(t)}}}function qp(n){let e,t,i;return t=new Ki({props:{date:n[51].updated}}),{c(){e=v("td"),j(t.$$.fragment),p(e,"class","col-type-date col-field-updated")},m(s,l){S(s,e,l),R(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[51].updated),t.$set(o)},i(s){i||(E(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),H(t)}}}function Vp(n,e){let t,i,s,l,o,r,a,u,f,c,d=!e[7].includes("@id"),h,m,b=[],g=new Map,y,k=!e[7].includes("@created"),$,C=!e[7].includes("@updated"),M,T,D,A,I,L;function F(){return e[34](e[51])}let q=d&&Pp(e),z=e[2].isAuth&&Np(e),J=e[16];const G=x=>x[54].name;for(let x=0;x',D=O(),p(l,"type","checkbox"),p(l,"id",o="checkbox_"+e[51].id),l.checked=r=e[6][e[51].id],p(u,"for",f="checkbox_"+e[51].id),p(s,"class","form-field"),p(i,"class","bulk-select-col min-width"),p(T,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(x,U){S(x,t,U),_(t,i),_(i,s),_(s,l),_(s,a),_(s,u),_(t,c),q&&q.m(t,null),_(t,h),z&&z.m(t,null),_(t,m);for(let re=0;re{q=null}),he()),e[2].isAuth?z?z.p(e,U):(z=Np(e),z.c(),z.m(t,m)):z&&(z.d(1),z=null),U[0]&65552&&(J=e[16],pe(),b=bt(b,U,G,1,e,J,g,t,nn,Hp,y,kp),he()),U[0]&128&&(k=!e[7].includes("@created")),k?ie?(ie.p(e,U),U[0]&128&&E(ie,1)):(ie=jp(e),ie.c(),E(ie,1),ie.m(t,$)):ie&&(pe(),P(ie,1,1,()=>{ie=null}),he()),U[0]&128&&(C=!e[7].includes("@updated")),C?Q?(Q.p(e,U),U[0]&128&&E(Q,1)):(Q=qp(e),Q.c(),E(Q,1),Q.m(t,M)):Q&&(pe(),P(Q,1,1,()=>{Q=null}),he())},i(x){if(!A){E(q);for(let U=0;UY[54].name;for(let Y=0;YY[51].id;for(let Y=0;Y',k=O(),$=v("tbody");for(let Y=0;Y{L=null}),he()),Y[2].isAuth?F?(F.p(Y,x),x[0]&4&&E(F,1)):(F=Cp(Y),F.c(),E(F,1),F.m(i,a)):F&&(pe(),P(F,1,1,()=>{F=null}),he()),x[0]&65537&&(q=Y[16],pe(),u=bt(u,x,z,1,Y,q,f,i,nn,Op,c,wp),he()),x[0]&128&&(d=!Y[7].includes("@created")),d?J?(J.p(Y,x),x[0]&128&&E(J,1)):(J=Dp(Y),J.c(),E(J,1),J.m(i,h)):J&&(pe(),P(J,1,1,()=>{J=null}),he()),x[0]&128&&(m=!Y[7].includes("@updated")),m?G?(G.p(Y,x),x[0]&128&&E(G,1)):(G=Ap(Y),G.c(),E(G,1),G.m(i,b)):G&&(pe(),P(G,1,1,()=>{G=null}),he()),x[0]&1246422&&(ie=Y[4],pe(),C=bt(C,x,Q,1,Y,ie,M,$,nn,Vp,null,yp),he(),!ie.length&&X?X.p(Y,x):ie.length?X&&(X.d(1),X=null):(X=Ep(Y),X.c(),X.m($,null))),(!T||x[0]&1024)&&ne(e,"table-loading",Y[10])},i(Y){if(!T){E(L),E(F);for(let x=0;x({50:l}),({uniqueId:l})=>[0,l?524288:0]]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=Ee(),j(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),R(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&8320|o[1]&268959744&&(r.$$scope={dirty:o,ctx:e}),i.$set(r)},i(l){s||(E(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(t),H(i,l)}}}function HM(n){let e,t,i=[],s=new Map,l,o,r=n[13];const a=u=>u[47].id+u[47].name;for(let u=0;uReset',c=O(),d=v("div"),h=O(),m=v("button"),m.innerHTML='Delete selected',p(t,"class","txt"),p(f,"type","button"),p(f,"class","btn btn-xs btn-secondary btn-outline p-l-5 p-r-5"),ne(f,"btn-disabled",n[11]),p(d,"class","flex-fill"),p(m,"type","button"),p(m,"class","btn btn-sm btn-secondary btn-danger"),ne(m,"btn-loading",n[11]),ne(m,"btn-disabled",n[11]),p(e,"class","bulkbar")},m($,C){S($,e,C),_(e,t),_(t,i),_(t,s),_(s,l),_(t,o),_(t,a),_(e,u),_(e,f),_(e,c),_(e,d),_(e,h),_(e,m),g=!0,y||(k=[K(f,"click",n[39]),K(m,"click",n[40])],y=!0)},p($,C){(!g||C[0]&256)&&ae(l,$[8]),(!g||C[0]&256)&&r!==(r=$[8]===1?"record":"records")&&ae(a,r),(!g||C[0]&2048)&&ne(f,"btn-disabled",$[11]),(!g||C[0]&2048)&&ne(m,"btn-loading",$[11]),(!g||C[0]&2048)&&ne(m,"btn-disabled",$[11])},i($){g||($&&xe(()=>{b||(b=je(e,Sn,{duration:150,y:5},!0)),b.run(1)}),g=!0)},o($){$&&(b||(b=je(e,Sn,{duration:150,y:5},!1)),b.run(0)),g=!1},d($){$&&w(e),$&&b&&b.end(),y=!1,Pe(k)}}}function qM(n){let e,t,i,s,l,o;e=new Sa({props:{class:"table-wrapper",$$slots:{before:[jM],default:[FM]},$$scope:{ctx:n}}});let r=n[4].length&&Bp(n),a=n[4].length&&n[15]&&Up(n),u=n[8]&&Wp(n);return{c(){j(e.$$.fragment),t=O(),r&&r.c(),i=O(),a&&a.c(),s=O(),u&&u.c(),l=Ee()},m(f,c){R(e,f,c),S(f,t,c),r&&r.m(f,c),S(f,i,c),a&&a.m(f,c),S(f,s,c),u&&u.m(f,c),S(f,l,c),o=!0},p(f,c){const d={};c[0]&95447|c[1]&268435456&&(d.$$scope={dirty:c,ctx:f}),e.$set(d),f[4].length?r?r.p(f,c):(r=Bp(f),r.c(),r.m(i.parentNode,i)):r&&(r.d(1),r=null),f[4].length&&f[15]?a?a.p(f,c):(a=Up(f),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null),f[8]?u?(u.p(f,c),c[0]&256&&E(u,1)):(u=Wp(f),u.c(),E(u,1),u.m(l.parentNode,l)):u&&(pe(),P(u,1,1,()=>{u=null}),he())},i(f){o||(E(e.$$.fragment,f),E(u),o=!0)},o(f){P(e.$$.fragment,f),P(u),o=!1},d(f){H(e,f),f&&w(t),r&&r.d(f),f&&w(i),a&&a.d(f),f&&w(s),u&&u.d(f),f&&w(l)}}}function VM(n,e,t){let i,s,l,o,r;const a=It();let{collection:u}=e,{sort:f=""}=e,{filter:c=""}=e,d=[],h=1,m=0,b={},g=!0,y=!1,k=0,$,C=[],M=[];function T(){!(u!=null&&u.id)||localStorage.setItem((u==null?void 0:u.id)+"@hiddenCollumns",JSON.stringify(C))}function D(){if(t(7,C=[]),!!(u!=null&&u.id))try{const Z=localStorage.getItem(u.id+"@hiddenCollumns");Z&&t(7,C=JSON.parse(Z)||[])}catch{}}async function A(){const Z=h;for(let Ce=1;Ce<=Z;Ce++)(Ce===1||i)&&await I(Ce,!1)}async function I(Z=1,Ce=!0){if(!!(u!=null&&u.id))return t(10,g=!0),de.collection(u.id).getList(Z,30,{sort:f,filter:c}).then(async Ue=>{if(Z<=1&&L(),t(10,g=!1),t(9,h=Ue.page),t(5,m=Ue.totalItems),a("load",d.concat(Ue.items)),Ce){const Vt=++k;for(;Ue.items.length&&k==Vt;)t(4,d=d.concat(Ue.items.splice(0,15))),await W.yieldToMain()}else t(4,d=d.concat(Ue.items))}).catch(Ue=>{Ue!=null&&Ue.isAbort||(t(10,g=!1),console.warn(Ue),L(),de.errorResponseHandler(Ue,!1))})}function L(){t(4,d=[]),t(9,h=1),t(5,m=0),t(6,b={})}function F(){r?q():z()}function q(){t(6,b={})}function z(){for(const Z of d)t(6,b[Z.id]=Z,b);t(6,b)}function J(Z){b[Z.id]?delete b[Z.id]:t(6,b[Z.id]=Z,b),t(6,b)}function G(){wn(`Do you really want to delete the selected ${o===1?"record":"records"}?`,ie)}async function ie(){if(y||!o||!(u!=null&&u.id))return;let Z=[];for(const Ce of Object.keys(b))Z.push(de.collection(u.id).delete(Ce));return t(11,y=!0),Promise.all(Z).then(()=>{Lt(`Successfully deleted the selected ${o===1?"record":"records"}.`),q()}).catch(Ce=>{de.errorResponseHandler(Ce)}).finally(()=>(t(11,y=!1),A()))}function Q(Z){Ve.call(this,n,Z)}const X=(Z,Ce)=>{Ce.target.checked?W.removeByValue(C,Z.id):W.pushUnique(C,Z.id),t(7,C)},Y=()=>F();function x(Z){f=Z,t(0,f)}function U(Z){f=Z,t(0,f)}function re(Z){f=Z,t(0,f)}function Re(Z){f=Z,t(0,f)}function Ne(Z){f=Z,t(0,f)}function Le(Z){f=Z,t(0,f)}function Fe(Z){le[Z?"unshift":"push"](()=>{$=Z,t(12,$)})}const me=Z=>J(Z),Se=Z=>a("select",Z),we=(Z,Ce)=>{Ce.code==="Enter"&&(Ce.preventDefault(),a("select",Z))},We=()=>t(1,c=""),ue=()=>I(h+1),se=()=>q(),fe=()=>G();return n.$$set=Z=>{"collection"in Z&&t(2,u=Z.collection),"sort"in Z&&t(0,f=Z.sort),"filter"in Z&&t(1,c=Z.filter)},n.$$.update=()=>{n.$$.dirty[0]&4&&u!=null&&u.id&&(D(),L()),n.$$.dirty[0]&7&&(u==null?void 0:u.id)&&f!==-1&&c!==-1&&I(1),n.$$.dirty[0]&48&&t(15,i=m>d.length),n.$$.dirty[0]&4&&t(23,s=(u==null?void 0:u.schema)||[]),n.$$.dirty[0]&8388736&&t(16,l=s.filter(Z=>!C.includes(Z.id))),n.$$.dirty[0]&64&&t(8,o=Object.keys(b).length),n.$$.dirty[0]&272&&t(14,r=d.length&&o===d.length),n.$$.dirty[0]&128&&C!==-1&&T(),n.$$.dirty[0]&8388612&&t(13,M=[].concat(u.isAuth?[{id:"@username",name:"username"},{id:"@email",name:"email"}]:[],s.map(Z=>({id:Z.id,name:Z.name})),[{id:"@created",name:"created"},{id:"@updated",name:"updated"}]))},[f,c,u,I,d,m,b,C,o,h,g,y,$,M,r,i,l,a,F,q,J,G,A,s,Q,X,Y,x,U,re,Re,Ne,Le,Fe,me,Se,we,We,ue,se,fe]}class zM extends ke{constructor(e){super(),ye(this,e,VM,qM,be,{collection:2,sort:0,filter:1,reloadLoadedPages:22,load:3},null,[-1,-1])}get reloadLoadedPages(){return this.$$.ctx[22]}get load(){return this.$$.ctx[3]}}function BM(n){let e,t,i,s;return e=new YC({}),i=new pn({props:{$$slots:{default:[YM]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(l,o){R(e,l,o),S(l,t,o),R(i,l,o),s=!0},p(l,o){const r={};o[0]&759|o[1]&1&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function UM(n){let e,t;return e=new pn({props:{center:!0,$$slots:{default:[ZM]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s[0]&528|s[1]&1&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function WM(n){let e,t;return e=new pn({props:{center:!0,$$slots:{default:[GM]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s[1]&1&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function Yp(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-secondary btn-circle")},m(s,l){S(s,e,l),t||(i=[Ae(Be.call(null,e,{text:"Edit collection",position:"right"})),K(e,"click",n[14])],t=!0)},p:te,d(s){s&&w(e),t=!1,Pe(i)}}}function YM(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,c,d,h,m,b,g,y,k,$,C,M,T,D,A,I,L=!n[9]&&Yp(n);c=new wa({}),c.$on("refresh",n[15]),k=new ka({props:{value:n[0],autocompleteCollection:n[2]}}),k.$on("submit",n[18]);function F(J){n[20](J)}function q(J){n[21](J)}let z={collection:n[2]};return n[0]!==void 0&&(z.filter=n[0]),n[1]!==void 0&&(z.sort=n[1]),C=new zM({props:z}),n[19](C),le.push(()=>_e(C,"filter",F)),le.push(()=>_e(C,"sort",q)),C.$on("select",n[22]),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Collections",s=O(),l=v("div"),r=B(o),a=O(),u=v("div"),L&&L.c(),f=O(),j(c.$$.fragment),d=O(),h=v("div"),m=v("button"),m.innerHTML=` - API Preview`,b=O(),g=v("button"),g.innerHTML=` - New record`,y=O(),j(k.$$.fragment),$=O(),j(C.$$.fragment),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(u,"class","inline-flex gap-5"),p(m,"type","button"),p(m,"class","btn btn-outline"),p(g,"type","button"),p(g,"class","btn btn-expanded"),p(h,"class","btns-group"),p(e,"class","page-header")},m(J,G){S(J,e,G),_(e,t),_(t,i),_(t,s),_(t,l),_(l,r),_(e,a),_(e,u),L&&L.m(u,null),_(u,f),R(c,u,null),_(e,d),_(e,h),_(h,m),_(h,b),_(h,g),S(J,y,G),R(k,J,G),S(J,$,G),R(C,J,G),D=!0,A||(I=[K(m,"click",n[16]),K(g,"click",n[17])],A=!0)},p(J,G){(!D||G[0]&4)&&o!==(o=J[2].name+"")&&ae(r,o),J[9]?L&&(L.d(1),L=null):L?L.p(J,G):(L=Yp(J),L.c(),L.m(u,f));const ie={};G[0]&1&&(ie.value=J[0]),G[0]&4&&(ie.autocompleteCollection=J[2]),k.$set(ie);const Q={};G[0]&4&&(Q.collection=J[2]),!M&&G[0]&1&&(M=!0,Q.filter=J[0],ve(()=>M=!1)),!T&&G[0]&2&&(T=!0,Q.sort=J[1],ve(()=>T=!1)),C.$set(Q)},i(J){D||(E(c.$$.fragment,J),E(k.$$.fragment,J),E(C.$$.fragment,J),D=!0)},o(J){P(c.$$.fragment,J),P(k.$$.fragment,J),P(C.$$.fragment,J),D=!1},d(J){J&&w(e),L&&L.d(),H(c),J&&w(y),H(k,J),J&&w($),n[19](null),H(C,J),A=!1,Pe(I)}}}function KM(n){let e,t,i,s,l;return{c(){e=v("h1"),e.textContent="Create your first collection to add records!",t=O(),i=v("button"),i.innerHTML=` - Create new collection`,p(e,"class","m-b-10"),p(i,"type","button"),p(i,"class","btn btn-expanded-lg btn-lg")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=K(i,"click",n[13]),s=!0)},p:te,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function JM(n){let e;return{c(){e=v("h1"),e.textContent="You don't have any collections yet.",p(e,"class","m-b-10")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function ZM(n){let e,t,i;function s(r,a){return r[9]?JM:KM}let l=s(n),o=l(n);return{c(){e=v("div"),t=v("div"),t.innerHTML='',i=O(),o.c(),p(t,"class","icon"),p(e,"class","placeholder-section m-b-base")},m(r,a){S(r,e,a),_(e,t),_(e,i),o.m(e,null)},p(r,a){l===(l=s(r))&&o?o.p(r,a):(o.d(1),o=l(r),o&&(o.c(),o.m(e,null)))},d(r){r&&w(e),o.d()}}}function GM(n){let e;return{c(){e=v("div"),e.innerHTML=` -

    Loading collections...

    `,p(e,"class","placeholder-section m-b-base")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function XM(n){let e,t,i,s,l,o,r,a,u;const f=[WM,UM,BM],c=[];function d(g,y){return g[3]?0:g[8].length?2:1}e=d(n),t=c[e]=f[e](n);let h={};s=new Ja({props:h}),n[23](s);let m={};o=new e4({props:m}),n[24](o);let b={collection:n[2]};return a=new V_({props:b}),n[25](a),a.$on("save",n[26]),a.$on("delete",n[27]),{c(){t.c(),i=O(),j(s.$$.fragment),l=O(),j(o.$$.fragment),r=O(),j(a.$$.fragment)},m(g,y){c[e].m(g,y),S(g,i,y),R(s,g,y),S(g,l,y),R(o,g,y),S(g,r,y),R(a,g,y),u=!0},p(g,y){let k=e;e=d(g),e===k?c[e].p(g,y):(pe(),P(c[k],1,1,()=>{c[k]=null}),he(),t=c[e],t?t.p(g,y):(t=c[e]=f[e](g),t.c()),E(t,1),t.m(i.parentNode,i));const $={};s.$set($);const C={};o.$set(C);const M={};y[0]&4&&(M.collection=g[2]),a.$set(M)},i(g){u||(E(t),E(s.$$.fragment,g),E(o.$$.fragment,g),E(a.$$.fragment,g),u=!0)},o(g){P(t),P(s.$$.fragment,g),P(o.$$.fragment,g),P(a.$$.fragment,g),u=!1},d(g){c[e].d(g),g&&w(i),n[23](null),H(s,g),g&&w(l),n[24](null),H(o,g),g&&w(r),n[25](null),H(a,g)}}}function QM(n,e,t){let i,s,l,o,r,a,u;Ze(n,Bn,X=>t(2,s=X)),Ze(n,na,X=>t(3,l=X)),Ze(n,aa,X=>t(12,o=X)),Ze(n,mt,X=>t(28,r=X)),Ze(n,Zi,X=>t(8,a=X)),Ze(n,$s,X=>t(9,u=X)),Ht(mt,r="Collections",r);const f=new URLSearchParams(o);let c,d,h,m,b=f.get("filter")||"",g=f.get("sort")||"-created",y=f.get("collectionId")||"";function k(){t(10,y=s.id),t(1,g="-created"),t(0,b="")}NS(y);const $=()=>c==null?void 0:c.show(),C=()=>c==null?void 0:c.show(s),M=()=>m==null?void 0:m.load(),T=()=>d==null?void 0:d.show(s),D=()=>h==null?void 0:h.show(),A=X=>t(0,b=X.detail);function I(X){le[X?"unshift":"push"](()=>{m=X,t(7,m)})}function L(X){b=X,t(0,b)}function F(X){g=X,t(1,g)}const q=X=>h==null?void 0:h.show(X==null?void 0:X.detail);function z(X){le[X?"unshift":"push"](()=>{c=X,t(4,c)})}function J(X){le[X?"unshift":"push"](()=>{d=X,t(5,d)})}function G(X){le[X?"unshift":"push"](()=>{h=X,t(6,h)})}const ie=()=>m==null?void 0:m.reloadLoadedPages(),Q=()=>m==null?void 0:m.reloadLoadedPages();return n.$$.update=()=>{if(n.$$.dirty[0]&4096&&t(11,i=new URLSearchParams(o)),n.$$.dirty[0]&3080&&!l&&i.has("collectionId")&&i.get("collectionId")!=y&&IS(i.get("collectionId")),n.$$.dirty[0]&1028&&(s==null?void 0:s.id)&&y!=s.id&&k(),n.$$.dirty[0]&7&&(g||b||(s==null?void 0:s.id))){const X=new URLSearchParams({collectionId:(s==null?void 0:s.id)||"",filter:b,sort:g}).toString();ki("/collections?"+X)}},[b,g,s,l,c,d,h,m,a,u,y,i,o,$,C,M,T,D,A,I,L,F,q,z,J,G,ie,Q]}class xM extends ke{constructor(e){super(),ye(this,e,QM,XM,be,{},null,[-1,-1])}}function eO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M,T,D,A,I;return{c(){e=v("aside"),t=v("div"),i=v("div"),i.textContent="System",s=O(),l=v("a"),l.innerHTML=` + .`,s=O(),l=v("button"),r=B(o),a=O(),U&&U.c(),u=O(),j(f.$$.fragment),d=O(),h=v("hr"),m=O(),j(g.$$.fragment),y=O(),k=v("hr"),$=O(),j(C.$$.fragment),T=O(),D=v("hr"),A=O(),j(I.$$.fragment),F=O(),q=v("hr"),z=O(),j(J.$$.fragment),ie=O(),se&&se.c(),Q=Ae(),p(l,"type","button"),p(l,"class","expand-handle txt-sm txt-bold txt-nowrap link-hint"),p(t,"class","flex txt-sm txt-hint m-b-5"),p(e,"class","block m-b-base"),p(h,"class","m-t-sm m-b-sm"),p(k,"class","m-t-sm m-b-sm"),p(D,"class","m-t-sm m-b-sm"),p(q,"class","m-t-sm m-b-sm")},m(Z,Ce){S(Z,e,Ce),_(e,t),_(t,i),_(t,s),_(t,l),_(l,r),_(e,a),U&&U.m(e,null),S(Z,u,Ce),R(f,Z,Ce),S(Z,d,Ce),S(Z,h,Ce),S(Z,m,Ce),R(g,Z,Ce),S(Z,y,Ce),S(Z,k,Ce),S(Z,$,Ce),R(C,Z,Ce),S(Z,T,Ce),S(Z,D,Ce),S(Z,A,Ce),R(I,Z,Ce),S(Z,F,Ce),S(Z,q,Ce),S(Z,z,Ce),R(J,Z,Ce),S(Z,ie,Ce),se&&se.m(Z,Ce),S(Z,Q,Ce),X=!0,Y||(x=K(l,"click",n[2]),Y=!0)},p(Z,[Ce]){var Ti;(!X||Ce&2)&&o!==(o=Z[1]?"Hide available fields":"Show available fields")&&re(r,o),Z[1]?U?(U.p(Z,Ce),Ce&2&&E(U,1)):(U=sd(Z),U.c(),E(U,1),U.m(e,null)):U&&(pe(),P(U,1,1,()=>{U=null}),he());const Be={};Ce&1&&(Be.collection=Z[0]),!c&&Ce&1&&(c=!0,Be.rule=Z[0].listRule,ve(()=>c=!1)),f.$set(Be);const Vt={};Ce&1&&(Vt.collection=Z[0]),!b&&Ce&1&&(b=!0,Vt.rule=Z[0].viewRule,ve(()=>b=!1)),g.$set(Vt);const Gt={};Ce&1&&(Gt.collection=Z[0]),!M&&Ce&1&&(M=!0,Gt.rule=Z[0].createRule,ve(()=>M=!1)),C.$set(Gt);const sn={};Ce&1&&(sn.collection=Z[0]),!L&&Ce&1&&(L=!0,sn.rule=Z[0].updateRule,ve(()=>L=!1)),I.$set(sn);const Gn={};Ce&1&&(Gn.collection=Z[0]),!G&&Ce&1&&(G=!0,Gn.rule=Z[0].deleteRule,ve(()=>G=!1)),J.$set(Gn),(Ti=Z[0])!=null&&Ti.isAuth?se?(se.p(Z,Ce),Ce&1&&E(se,1)):(se=od(Z),se.c(),E(se,1),se.m(Q.parentNode,Q)):se&&(pe(),P(se,1,1,()=>{se=null}),he())},i(Z){X||(E(U),E(f.$$.fragment,Z),E(g.$$.fragment,Z),E(C.$$.fragment,Z),E(I.$$.fragment,Z),E(J.$$.fragment,Z),E(se),X=!0)},o(Z){P(U),P(f.$$.fragment,Z),P(g.$$.fragment,Z),P(C.$$.fragment,Z),P(I.$$.fragment,Z),P(J.$$.fragment,Z),P(se),X=!1},d(Z){Z&&w(e),U&&U.d(),Z&&w(u),H(f,Z),Z&&w(d),Z&&w(h),Z&&w(m),H(g,Z),Z&&w(y),Z&&w(k),Z&&w($),H(C,Z),Z&&w(T),Z&&w(D),Z&&w(A),H(I,Z),Z&&w(F),Z&&w(q),Z&&w(z),H(J,Z),Z&&w(ie),se&&se.d(Z),Z&&w(Q),Y=!1,x()}}}function l3(n,e,t){let{collection:i=new Pn}=e,s=!1;const l=()=>t(1,s=!s);function o(d){n.$$.not_equal(i.listRule,d)&&(i.listRule=d,t(0,i))}function r(d){n.$$.not_equal(i.viewRule,d)&&(i.viewRule=d,t(0,i))}function a(d){n.$$.not_equal(i.createRule,d)&&(i.createRule=d,t(0,i))}function u(d){n.$$.not_equal(i.updateRule,d)&&(i.updateRule=d,t(0,i))}function f(d){n.$$.not_equal(i.deleteRule,d)&&(i.deleteRule=d,t(0,i))}function c(d){n.$$.not_equal(i.options.manageRule,d)&&(i.options.manageRule=d,t(0,i))}return n.$$set=d=>{"collection"in d&&t(0,i=d.collection)},[i,s,l,o,r,a,u,f,c]}class o3 extends ke{constructor(e){super(),ye(this,e,l3,s3,be,{collection:0})}}function r3(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowUsernameAuth,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[5]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowUsernameAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function a3(n){let e,t;return e=new ge({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowUsernameAuth",$$slots:{default:[r3,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s&12289&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function u3(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function f3(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function rd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ee(Ue.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(xe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function c3(n){let e,t,i,s,l,o,r;function a(d,h){return d[0].options.allowUsernameAuth?f3:u3}let u=a(n),f=u(n),c=n[3]&&rd();return{c(){e=v("div"),e.innerHTML=` + Username/Password`,t=O(),i=v("div"),s=O(),f.c(),l=O(),c&&c.c(),o=Ae(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,h){S(d,e,h),S(d,t,h),S(d,i,h),S(d,s,h),f.m(d,h),S(d,l,h),c&&c.m(d,h),S(d,o,h),r=!0},p(d,h){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[3]?c?h&8&&E(c,1):(c=rd(),c.c(),E(c,1),c.m(o.parentNode,o)):c&&(pe(),P(c,1,1,()=>{c=null}),he())},i(d){r||(E(c),r=!0)},o(d){P(c),r=!1},d(d){d&&w(e),d&&w(t),d&&w(i),d&&w(s),f.d(d),d&&w(l),c&&c.d(d),d&&w(o)}}}function d3(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowEmailAuth,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[6]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowEmailAuth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function ad(n){let e,t,i,s,l,o,r,a;return i=new ge({props:{class:"form-field "+(W.isEmpty(n[0].options.onlyEmailDomains)?"":"disabled"),name:"options.exceptEmailDomains",$$slots:{default:[p3,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field "+(W.isEmpty(n[0].options.exceptEmailDomains)?"":"disabled"),name:"options.onlyEmailDomains",$$slots:{default:[h3,({uniqueId:u})=>({12:u}),({uniqueId:u})=>u?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid grid-sm p-t-sm")},m(u,f){S(u,e,f),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),a=!0},p(u,f){const c={};f&1&&(c.class="form-field "+(W.isEmpty(u[0].options.onlyEmailDomains)?"":"disabled")),f&12289&&(c.$$scope={dirty:f,ctx:u}),i.$set(c);const d={};f&1&&(d.class="form-field "+(W.isEmpty(u[0].options.exceptEmailDomains)?"":"disabled")),f&12289&&(d.$$scope={dirty:f,ctx:u}),o.$set(d)},i(u){a||(E(i.$$.fragment,u),E(o.$$.fragment,u),u&&xe(()=>{r||(r=je(e,St,{duration:150},!0)),r.run(1)}),a=!0)},o(u){P(i.$$.fragment,u),P(o.$$.fragment,u),u&&(r||(r=je(e,St,{duration:150},!1)),r.run(0)),a=!1},d(u){u&&w(e),H(i),H(o),u&&r&&r.end()}}}function p3(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function m(b){n[7](b)}let g={id:n[12],disabled:!W.isEmpty(n[0].options.onlyEmailDomains)};return n[0].options.exceptEmailDomains!==void 0&&(g.value=n[0].options.exceptEmailDomains),r=new es({props:g}),le.push(()=>_e(r,"value",m)),{c(){e=v("label"),t=v("span"),t.textContent="Except domains",i=O(),s=v("i"),o=O(),j(r.$$.fragment),u=O(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(b,y){S(b,e,y),_(e,t),_(e,i),_(e,s),S(b,o,y),R(r,b,y),S(b,u,y),S(b,f,y),c=!0,d||(h=Ee(Ue.call(null,s,{text:`Email domains that are NOT allowed to sign up. + This field is disabled if "Only domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&4096&&l!==(l=b[12]))&&p(e,"for",l);const k={};y&4096&&(k.id=b[12]),y&1&&(k.disabled=!W.isEmpty(b[0].options.onlyEmailDomains)),!a&&y&1&&(a=!0,k.value=b[0].options.exceptEmailDomains,ve(()=>a=!1)),r.$set(k)},i(b){c||(E(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&w(e),b&&w(o),H(r,b),b&&w(u),b&&w(f),d=!1,h()}}}function h3(n){let e,t,i,s,l,o,r,a,u,f,c,d,h;function m(b){n[8](b)}let g={id:n[12],disabled:!W.isEmpty(n[0].options.exceptEmailDomains)};return n[0].options.onlyEmailDomains!==void 0&&(g.value=n[0].options.onlyEmailDomains),r=new es({props:g}),le.push(()=>_e(r,"value",m)),{c(){e=v("label"),t=v("span"),t.textContent="Only domains",i=O(),s=v("i"),o=O(),j(r.$$.fragment),u=O(),f=v("div"),f.textContent="Use comma as separator.",p(t,"class","txt"),p(s,"class","ri-information-line link-hint"),p(e,"for",l=n[12]),p(f,"class","help-block")},m(b,y){S(b,e,y),_(e,t),_(e,i),_(e,s),S(b,o,y),R(r,b,y),S(b,u,y),S(b,f,y),c=!0,d||(h=Ee(Ue.call(null,s,{text:`Email domains that are ONLY allowed to sign up. + This field is disabled if "Except domains" is set.`,position:"top"})),d=!0)},p(b,y){(!c||y&4096&&l!==(l=b[12]))&&p(e,"for",l);const k={};y&4096&&(k.id=b[12]),y&1&&(k.disabled=!W.isEmpty(b[0].options.exceptEmailDomains)),!a&&y&1&&(a=!0,k.value=b[0].options.onlyEmailDomains,ve(()=>a=!1)),r.$set(k)},i(b){c||(E(r.$$.fragment,b),c=!0)},o(b){P(r.$$.fragment,b),c=!1},d(b){b&&w(e),b&&w(o),H(r,b),b&&w(u),b&&w(f),d=!1,h()}}}function m3(n){let e,t,i,s;e=new ge({props:{class:"form-field form-field-toggle m-0",name:"options.allowEmailAuth",$$slots:{default:[d3,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowEmailAuth&&ad(n);return{c(){j(e.$$.fragment),t=O(),l&&l.c(),i=Ae()},m(o,r){R(e,o,r),S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowEmailAuth?l?(l.p(o,r),r&1&&E(l,1)):(l=ad(o),l.c(),E(l,1),l.m(i.parentNode,i)):l&&(pe(),P(l,1,1,()=>{l=null}),he())},i(o){s||(E(e.$$.fragment,o),E(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){H(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function g3(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function _3(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function ud(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ee(Ue.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(xe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function b3(n){let e,t,i,s,l,o,r;function a(d,h){return d[0].options.allowEmailAuth?_3:g3}let u=a(n),f=u(n),c=n[2]&&ud();return{c(){e=v("div"),e.innerHTML=` + Email/Password`,t=O(),i=v("div"),s=O(),f.c(),l=O(),c&&c.c(),o=Ae(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,h){S(d,e,h),S(d,t,h),S(d,i,h),S(d,s,h),f.m(d,h),S(d,l,h),c&&c.m(d,h),S(d,o,h),r=!0},p(d,h){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[2]?c?h&4&&E(c,1):(c=ud(),c.c(),E(c,1),c.m(o.parentNode,o)):c&&(pe(),P(c,1,1,()=>{c=null}),he())},i(d){r||(E(c),r=!0)},o(d){P(c),r=!1},d(d){d&&w(e),d&&w(t),d&&w(i),d&&w(s),f.d(d),d&&w(l),c&&c.d(d),d&&w(o)}}}function v3(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].options.allowOAuth2Auth,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[9]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].options.allowOAuth2Auth),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function fd(n){let e,t,i;return{c(){e=v("div"),e.innerHTML='',p(e,"class","block")},m(s,l){S(s,e,l),i=!0},i(s){i||(s&&xe(()=>{t||(t=je(e,St,{duration:150},!0)),t.run(1)}),i=!0)},o(s){s&&(t||(t=je(e,St,{duration:150},!1)),t.run(0)),i=!1},d(s){s&&w(e),s&&t&&t.end()}}}function y3(n){let e,t,i,s;e=new ge({props:{class:"form-field form-field-toggle m-b-0",name:"options.allowOAuth2Auth",$$slots:{default:[v3,({uniqueId:o})=>({12:o}),({uniqueId:o})=>o?4096:0]},$$scope:{ctx:n}}});let l=n[0].options.allowOAuth2Auth&&fd();return{c(){j(e.$$.fragment),t=O(),l&&l.c(),i=Ae()},m(o,r){R(e,o,r),S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){const a={};r&12289&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].options.allowOAuth2Auth?l?r&1&&E(l,1):(l=fd(),l.c(),E(l,1),l.m(i.parentNode,i)):l&&(pe(),P(l,1,1,()=>{l=null}),he())},i(o){s||(E(e.$$.fragment,o),E(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){H(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function k3(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function w3(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function cd(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ee(Ue.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(xe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function S3(n){let e,t,i,s,l,o,r;function a(d,h){return d[0].options.allowOAuth2Auth?w3:k3}let u=a(n),f=u(n),c=n[1]&&cd();return{c(){e=v("div"),e.innerHTML=` + OAuth2`,t=O(),i=v("div"),s=O(),f.c(),l=O(),c&&c.c(),o=Ae(),p(e,"class","inline-flex"),p(i,"class","flex-fill")},m(d,h){S(d,e,h),S(d,t,h),S(d,i,h),S(d,s,h),f.m(d,h),S(d,l,h),c&&c.m(d,h),S(d,o,h),r=!0},p(d,h){u!==(u=a(d))&&(f.d(1),f=u(d),f&&(f.c(),f.m(l.parentNode,l))),d[1]?c?h&2&&E(c,1):(c=cd(),c.c(),E(c,1),c.m(o.parentNode,o)):c&&(pe(),P(c,1,1,()=>{c=null}),he())},i(d){r||(E(c),r=!0)},o(d){P(c),r=!1},d(d){d&&w(e),d&&w(t),d&&w(i),d&&w(s),f.d(d),d&&w(l),c&&c.d(d),d&&w(o)}}}function $3(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Minimum password length"),s=O(),l=v("input"),p(e,"for",i=n[12]),p(l,"type","number"),p(l,"id",o=n[12]),l.required=!0,p(l,"min","6"),p(l,"max","72")},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].options.minPasswordLength),r||(a=K(l,"input",n[10]),r=!0)},p(u,f){f&4096&&i!==(i=u[12])&&p(e,"for",i),f&4096&&o!==(o=u[12])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].options.minPasswordLength&&ce(l,u[0].options.minPasswordLength)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function C3(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Always require email",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(l,"class","txt"),p(r,"class","ri-information-line txt-sm link-hint"),p(s,"for",a=n[12])},m(c,d){S(c,e,d),e.checked=n[0].options.requireEmail,S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[K(e,"change",n[11]),Ee(Ue.call(null,r,{text:`The constraint is applied only for new records. +Also note that some OAuth2 providers (like Twitter), don't return an email and the authentication may fail if the email field is required.`,position:"right"}))],u=!0)},p(c,d){d&4096&&t!==(t=c[12])&&p(e,"id",t),d&1&&(e.checked=c[0].options.requireEmail),d&4096&&a!==(a=c[12])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Pe(f)}}}function T3(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,b,y;return s=new vs({props:{single:!0,$$slots:{header:[c3],default:[a3]},$$scope:{ctx:n}}}),o=new vs({props:{single:!0,$$slots:{header:[b3],default:[m3]},$$scope:{ctx:n}}}),a=new vs({props:{single:!0,$$slots:{header:[S3],default:[y3]},$$scope:{ctx:n}}}),m=new ge({props:{class:"form-field required",name:"options.minPasswordLength",$$slots:{default:[$3,({uniqueId:k})=>({12:k}),({uniqueId:k})=>k?4096:0]},$$scope:{ctx:n}}}),b=new ge({props:{class:"form-field form-field-toggle m-b-sm",name:"options.requireEmail",$$slots:{default:[C3,({uniqueId:k})=>({12:k}),({uniqueId:k})=>k?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("h4"),e.textContent="Auth methods",t=O(),i=v("div"),j(s.$$.fragment),l=O(),j(o.$$.fragment),r=O(),j(a.$$.fragment),u=O(),f=v("hr"),c=O(),d=v("h4"),d.textContent="General",h=O(),j(m.$$.fragment),g=O(),j(b.$$.fragment),p(e,"class","section-title"),p(i,"class","accordions"),p(d,"class","section-title")},m(k,$){S(k,e,$),S(k,t,$),S(k,i,$),R(s,i,null),_(i,l),R(o,i,null),_(i,r),R(a,i,null),S(k,u,$),S(k,f,$),S(k,c,$),S(k,d,$),S(k,h,$),R(m,k,$),S(k,g,$),R(b,k,$),y=!0},p(k,[$]){const C={};$&8201&&(C.$$scope={dirty:$,ctx:k}),s.$set(C);const M={};$&8197&&(M.$$scope={dirty:$,ctx:k}),o.$set(M);const T={};$&8195&&(T.$$scope={dirty:$,ctx:k}),a.$set(T);const D={};$&12289&&(D.$$scope={dirty:$,ctx:k}),m.$set(D);const A={};$&12289&&(A.$$scope={dirty:$,ctx:k}),b.$set(A)},i(k){y||(E(s.$$.fragment,k),E(o.$$.fragment,k),E(a.$$.fragment,k),E(m.$$.fragment,k),E(b.$$.fragment,k),y=!0)},o(k){P(s.$$.fragment,k),P(o.$$.fragment,k),P(a.$$.fragment,k),P(m.$$.fragment,k),P(b.$$.fragment,k),y=!1},d(k){k&&w(e),k&&w(t),k&&w(i),H(s),H(o),H(a),k&&w(u),k&&w(f),k&&w(c),k&&w(d),k&&w(h),H(m,k),k&&w(g),H(b,k)}}}function M3(n,e,t){let i,s,l,o;Ze(n,wi,g=>t(4,o=g));let{collection:r=new Pn}=e;function a(){r.options.allowUsernameAuth=this.checked,t(0,r)}function u(){r.options.allowEmailAuth=this.checked,t(0,r)}function f(g){n.$$.not_equal(r.options.exceptEmailDomains,g)&&(r.options.exceptEmailDomains=g,t(0,r))}function c(g){n.$$.not_equal(r.options.onlyEmailDomains,g)&&(r.options.onlyEmailDomains=g,t(0,r))}function d(){r.options.allowOAuth2Auth=this.checked,t(0,r)}function h(){r.options.minPasswordLength=rt(this.value),t(0,r)}function m(){r.options.requireEmail=this.checked,t(0,r)}return n.$$set=g=>{"collection"in g&&t(0,r=g.collection)},n.$$.update=()=>{var g,b,y,k;n.$$.dirty&1&&r.isAuth&&W.isEmpty(r.options)&&t(0,r.options={allowEmailAuth:!0,allowUsernameAuth:!0,allowOAuth2Auth:!0,minPasswordLength:8},r),n.$$.dirty&16&&t(2,s=!W.isEmpty((g=o==null?void 0:o.options)==null?void 0:g.allowEmailAuth)||!W.isEmpty((b=o==null?void 0:o.options)==null?void 0:b.onlyEmailDomains)||!W.isEmpty((y=o==null?void 0:o.options)==null?void 0:y.exceptEmailDomains)),n.$$.dirty&16&&t(1,l=!W.isEmpty((k=o==null?void 0:o.options)==null?void 0:k.allowOAuth2Auth))},t(3,i=!1),[r,l,s,i,o,a,u,f,c,d,h,m]}class O3 extends ke{constructor(e){super(),ye(this,e,M3,T3,be,{collection:0})}}function dd(n,e,t){const i=n.slice();return i[14]=e[t],i}function pd(n,e,t){const i=n.slice();return i[14]=e[t],i}function hd(n){let e;return{c(){e=v("p"),e.textContent="All data associated with the removed fields will be permanently deleted!"},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function md(n){let e,t,i,s,l=n[1].originalName+"",o,r,a,u,f,c=n[1].name+"",d;return{c(){e=v("li"),t=v("div"),i=B(`Renamed collection + `),s=v("strong"),o=B(l),r=O(),a=v("i"),u=O(),f=v("strong"),d=B(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex")},m(h,m){S(h,e,m),_(e,t),_(t,i),_(t,s),_(s,o),_(t,r),_(t,a),_(t,u),_(t,f),_(f,d)},p(h,m){m&2&&l!==(l=h[1].originalName+"")&&re(o,l),m&2&&c!==(c=h[1].name+"")&&re(d,c)},d(h){h&&w(e)}}}function gd(n){let e,t,i,s,l=n[14].originalName+"",o,r,a,u,f,c=n[14].name+"",d;return{c(){e=v("li"),t=v("div"),i=B(`Renamed field + `),s=v("strong"),o=B(l),r=O(),a=v("i"),u=O(),f=v("strong"),d=B(c),p(s,"class","txt-strikethrough txt-hint"),p(a,"class","ri-arrow-right-line txt-sm"),p(f,"class","txt"),p(t,"class","inline-flex")},m(h,m){S(h,e,m),_(e,t),_(t,i),_(t,s),_(s,o),_(t,r),_(t,a),_(t,u),_(t,f),_(f,d)},p(h,m){m&16&&l!==(l=h[14].originalName+"")&&re(o,l),m&16&&c!==(c=h[14].name+"")&&re(d,c)},d(h){h&&w(e)}}}function _d(n){let e,t,i,s=n[14].name+"",l,o;return{c(){e=v("li"),t=B("Removed field "),i=v("span"),l=B(s),o=O(),p(i,"class","txt-bold"),p(e,"class","txt-danger")},m(r,a){S(r,e,a),_(e,t),_(e,i),_(i,l),_(e,o)},p(r,a){a&8&&s!==(s=r[14].name+"")&&re(l,s)},d(r){r&&w(e)}}}function D3(n){let e,t,i,s,l,o,r,a,u,f,c,d,h=n[3].length&&hd(),m=n[5]&&md(n),g=n[4],b=[];for(let $=0;$',i=O(),s=v("div"),l=v("p"),l.textContent=`If any of the following changes is part of another collection rule or filter, you'll have to + update it manually!`,o=O(),h&&h.c(),r=O(),a=v("h6"),a.textContent="Changes:",u=O(),f=v("ul"),m&&m.c(),c=O();for(let $=0;$Cancel',t=O(),i=v("button"),i.innerHTML='Confirm',e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-secondary"),p(i,"type","button"),p(i,"class","btn btn-expanded")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),e.focus(),s||(l=[K(e,"click",n[8]),K(i,"click",n[9])],s=!0)},p:ee,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,Pe(l)}}}function I3(n){let e,t,i={class:"confirm-changes-panel",popup:!0,$$slots:{footer:[E3],header:[A3],default:[D3]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&524346&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[10](null),H(e,s)}}}function P3(n,e,t){let i,s,l;const o=It();let r,a;async function u(y){t(1,a=y),await Tn(),!i&&!s.length&&!l.length?c():r==null||r.show()}function f(){r==null||r.hide()}function c(){f(),o("confirm")}const d=()=>f(),h=()=>c();function m(y){le[y?"unshift":"push"](()=>{r=y,t(2,r)})}function g(y){Ve.call(this,n,y)}function b(y){Ve.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&2&&t(5,i=(a==null?void 0:a.originalName)!=(a==null?void 0:a.name)),n.$$.dirty&2&&t(4,s=(a==null?void 0:a.schema.filter(y=>y.id&&!y.toDelete&&y.originalName!=y.name))||[]),n.$$.dirty&2&&t(3,l=(a==null?void 0:a.schema.filter(y=>y.id&&y.toDelete))||[])},[f,a,r,l,s,i,c,u,d,h,m,g,b]}class L3 extends ke{constructor(e){super(),ye(this,e,P3,I3,be,{show:7,hide:0})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}}function bd(n,e,t){const i=n.slice();return i[43]=e[t][0],i[44]=e[t][1],i}function vd(n){let e,t,i,s;function l(r){n[30](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new o3({props:o}),le.push(()=>_e(t,"collection",l)),{c(){e=v("div"),j(t.$$.fragment),p(e,"class","tab-item active")},m(r,a){S(r,e,a),R(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],ve(()=>i=!1)),t.$set(u)},i(r){s||(E(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&w(e),H(t)}}}function yd(n){let e,t,i,s;function l(r){n[31](r)}let o={};return n[2]!==void 0&&(o.collection=n[2]),t=new O3({props:o}),le.push(()=>_e(t,"collection",l)),{c(){e=v("div"),j(t.$$.fragment),p(e,"class","tab-item"),ne(e,"active",n[3]===Ds)},m(r,a){S(r,e,a),R(t,e,null),s=!0},p(r,a){const u={};!i&&a[0]&4&&(i=!0,u.collection=r[2],ve(()=>i=!1)),t.$set(u),(!s||a[0]&8)&&ne(e,"active",r[3]===Ds)},i(r){s||(E(t.$$.fragment,r),s=!0)},o(r){P(t.$$.fragment,r),s=!1},d(r){r&&w(e),H(t)}}}function N3(n){let e,t,i,s,l,o,r;function a(d){n[29](d)}let u={};n[2]!==void 0&&(u.collection=n[2]),i=new BC({props:u}),le.push(()=>_e(i,"collection",a));let f=n[3]===bl&&vd(n),c=n[2].isAuth&&yd(n);return{c(){e=v("div"),t=v("div"),j(i.$$.fragment),l=O(),f&&f.c(),o=O(),c&&c.c(),p(t,"class","tab-item"),ne(t,"active",n[3]===gi),p(e,"class","tabs-content svelte-b10vi")},m(d,h){S(d,e,h),_(e,t),R(i,t,null),_(e,l),f&&f.m(e,null),_(e,o),c&&c.m(e,null),r=!0},p(d,h){const m={};!s&&h[0]&4&&(s=!0,m.collection=d[2],ve(()=>s=!1)),i.$set(m),(!r||h[0]&8)&&ne(t,"active",d[3]===gi),d[3]===bl?f?(f.p(d,h),h[0]&8&&E(f,1)):(f=vd(d),f.c(),E(f,1),f.m(e,o)):f&&(pe(),P(f,1,1,()=>{f=null}),he()),d[2].isAuth?c?(c.p(d,h),h[0]&4&&E(c,1)):(c=yd(d),c.c(),E(c,1),c.m(e,null)):c&&(pe(),P(c,1,1,()=>{c=null}),he())},i(d){r||(E(i.$$.fragment,d),E(f),E(c),r=!0)},o(d){P(i.$$.fragment,d),P(f),P(c),r=!1},d(d){d&&w(e),H(i),f&&f.d(),c&&c.d()}}}function kd(n){let e,t,i,s,l,o,r;return o=new Zn({props:{class:"dropdown dropdown-right m-t-5",$$slots:{default:[F3]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=O(),i=v("button"),s=v("i"),l=O(),j(o.$$.fragment),p(e,"class","flex-fill"),p(s,"class","ri-more-line"),p(i,"type","button"),p(i,"class","btn btn-sm btn-circle btn-secondary flex-gap-0")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),_(i,s),_(i,l),R(o,i,null),r=!0},p(a,u){const f={};u[1]&65536&&(f.$$scope={dirty:u,ctx:a}),o.$set(f)},i(a){r||(E(o.$$.fragment,a),r=!0)},o(a){P(o.$$.fragment,a),r=!1},d(a){a&&w(e),a&&w(t),a&&w(i),H(o)}}}function F3(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` + Delete`,p(e,"type","button"),p(e,"class","dropdown-item txt-danger closable")},m(s,l){S(s,e,l),t||(i=K(e,"click",Yn(ut(n[22]))),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function wd(n){let e,t,i,s;return i=new Zn({props:{class:"dropdown dropdown-right dropdown-nowrap m-t-5",$$slots:{default:[R3]},$$scope:{ctx:n}}}),{c(){e=v("i"),t=O(),j(i.$$.fragment),p(e,"class","ri-arrow-down-s-fill")},m(l,o){S(l,e,o),S(l,t,o),R(i,l,o),s=!0},p(l,o){const r={};o[0]&68|o[1]&65536&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(e),l&&w(t),H(i,l)}}}function Sd(n){let e,t,i,s,l,o=n[44]+"",r,a,u,f,c;function d(){return n[24](n[43])}return{c(){e=v("button"),t=v("i"),s=O(),l=v("span"),r=B(o),a=B(" collection"),u=O(),p(t,"class",i=ws(W.getCollectionTypeIcon(n[43]))+" svelte-b10vi"),p(l,"class","txt"),p(e,"type","button"),p(e,"class","dropdown-item closable"),ne(e,"selected",n[43]==n[2].type)},m(h,m){S(h,e,m),_(e,t),_(e,s),_(e,l),_(l,r),_(l,a),_(e,u),f||(c=K(e,"click",d),f=!0)},p(h,m){n=h,m[0]&64&&i!==(i=ws(W.getCollectionTypeIcon(n[43]))+" svelte-b10vi")&&p(t,"class",i),m[0]&64&&o!==(o=n[44]+"")&&re(r,o),m[0]&68&&ne(e,"selected",n[43]==n[2].type)},d(h){h&&w(e),f=!1,c()}}}function R3(n){let e,t=Object.entries(n[6]),i=[];for(let s=0;s{F=null}),he()),(!A||J[0]&4&&C!==(C="btn btn-sm p-r-10 p-l-10 "+(z[2].isNew?"btn-hint":"btn-secondary")))&&p(d,"class",C),(!A||J[0]&4&&M!==(M=!z[2].isNew))&&(d.disabled=M),z[2].system?q||(q=$d(),q.c(),q.m(D.parentNode,D)):q&&(q.d(1),q=null)},i(z){A||(E(F),A=!0)},o(z){P(F),A=!1},d(z){z&&w(e),z&&w(s),z&&w(l),z&&w(f),z&&w(c),F&&F.d(),z&&w(T),q&&q.d(z),z&&w(D),I=!1,L()}}}function Cd(n){let e,t,i,s,l,o;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(r,a){S(r,e,a),s=!0,l||(o=Ee(t=Ue.call(null,e,n[13])),l=!0)},p(r,a){t&&Jt(t.update)&&a[0]&8192&&t.update.call(null,r[13])},i(r){s||(r&&xe(()=>{i||(i=je(e,$t,{duration:150,start:.7},!0)),i.run(1)}),s=!0)},o(r){r&&(i||(i=je(e,$t,{duration:150,start:.7},!1)),i.run(0)),s=!1},d(r){r&&w(e),r&&i&&i.end(),l=!1,o()}}}function Td(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ee(Ue.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&xe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function Md(n){var a,u,f;let e,t,i,s=!W.isEmpty((a=n[5])==null?void 0:a.options)&&!((f=(u=n[5])==null?void 0:u.options)!=null&&f.manageRule),l,o,r=s&&Od();return{c(){e=v("button"),t=v("span"),t.textContent="Options",i=O(),r&&r.c(),p(t,"class","txt"),p(e,"type","button"),p(e,"class","tab-item"),ne(e,"active",n[3]===Ds)},m(c,d){S(c,e,d),_(e,t),_(e,i),r&&r.m(e,null),l||(o=K(e,"click",n[28]),l=!0)},p(c,d){var h,m,g;d[0]&32&&(s=!W.isEmpty((h=c[5])==null?void 0:h.options)&&!((g=(m=c[5])==null?void 0:m.options)!=null&&g.manageRule)),s?r?d[0]&32&&E(r,1):(r=Od(),r.c(),E(r,1),r.m(e,null)):r&&(pe(),P(r,1,1,()=>{r=null}),he()),d[0]&8&&ne(e,"active",c[3]===Ds)},d(c){c&&w(e),r&&r.d(),l=!1,o()}}}function Od(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ee(Ue.call(null,e,"Has errors")),s=!0)},i(o){i||(o&&xe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function j3(n){var z,J,G,ie,Q,X,Y,x;let e,t=n[2].isNew?"New collection":"Edit collection",i,s,l,o,r,a,u,f,c,d,h,m,g=!W.isEmpty((z=n[5])==null?void 0:z.schema),b,y,k,$,C=!W.isEmpty((J=n[5])==null?void 0:J.listRule)||!W.isEmpty((G=n[5])==null?void 0:G.viewRule)||!W.isEmpty((ie=n[5])==null?void 0:ie.createRule)||!W.isEmpty((Q=n[5])==null?void 0:Q.updateRule)||!W.isEmpty((X=n[5])==null?void 0:X.deleteRule)||!W.isEmpty((x=(Y=n[5])==null?void 0:Y.options)==null?void 0:x.manageRule),M,T,D,A,I=!n[2].isNew&&!n[2].system&&kd(n);r=new ge({props:{class:"form-field collection-field-name required m-b-0 "+(n[12]?"disabled":""),name:"name",$$slots:{default:[H3,({uniqueId:U})=>({42:U}),({uniqueId:U})=>[0,U?2048:0]]},$$scope:{ctx:n}}});let L=g&&Cd(n),F=C&&Td(),q=n[2].isAuth&&Md(n);return{c(){e=v("h4"),i=B(t),s=O(),I&&I.c(),l=O(),o=v("form"),j(r.$$.fragment),a=O(),u=v("input"),f=O(),c=v("div"),d=v("button"),h=v("span"),h.textContent="Fields",m=O(),L&&L.c(),b=O(),y=v("button"),k=v("span"),k.textContent="API Rules",$=O(),F&&F.c(),M=O(),q&&q.c(),p(u,"type","submit"),p(u,"class","hidden"),p(u,"tabindex","-1"),p(o,"class","block"),p(h,"class","txt"),p(d,"type","button"),p(d,"class","tab-item"),ne(d,"active",n[3]===gi),p(k,"class","txt"),p(y,"type","button"),p(y,"class","tab-item"),ne(y,"active",n[3]===bl),p(c,"class","tabs-header stretched")},m(U,ae){S(U,e,ae),_(e,i),S(U,s,ae),I&&I.m(U,ae),S(U,l,ae),S(U,o,ae),R(r,o,null),_(o,a),_(o,u),S(U,f,ae),S(U,c,ae),_(c,d),_(d,h),_(d,m),L&&L.m(d,null),_(c,b),_(c,y),_(y,k),_(y,$),F&&F.m(y,null),_(c,M),q&&q.m(c,null),T=!0,D||(A=[K(o,"submit",ut(n[25])),K(d,"click",n[26]),K(y,"click",n[27])],D=!0)},p(U,ae){var Ne,Le,Fe,me,Se,we,We,ue;(!T||ae[0]&4)&&t!==(t=U[2].isNew?"New collection":"Edit collection")&&re(i,t),!U[2].isNew&&!U[2].system?I?(I.p(U,ae),ae[0]&4&&E(I,1)):(I=kd(U),I.c(),E(I,1),I.m(l.parentNode,l)):I&&(pe(),P(I,1,1,()=>{I=null}),he());const Re={};ae[0]&4096&&(Re.class="form-field collection-field-name required m-b-0 "+(U[12]?"disabled":"")),ae[0]&4164|ae[1]&67584&&(Re.$$scope={dirty:ae,ctx:U}),r.$set(Re),ae[0]&32&&(g=!W.isEmpty((Ne=U[5])==null?void 0:Ne.schema)),g?L?(L.p(U,ae),ae[0]&32&&E(L,1)):(L=Cd(U),L.c(),E(L,1),L.m(d,null)):L&&(pe(),P(L,1,1,()=>{L=null}),he()),(!T||ae[0]&8)&&ne(d,"active",U[3]===gi),ae[0]&32&&(C=!W.isEmpty((Le=U[5])==null?void 0:Le.listRule)||!W.isEmpty((Fe=U[5])==null?void 0:Fe.viewRule)||!W.isEmpty((me=U[5])==null?void 0:me.createRule)||!W.isEmpty((Se=U[5])==null?void 0:Se.updateRule)||!W.isEmpty((we=U[5])==null?void 0:we.deleteRule)||!W.isEmpty((ue=(We=U[5])==null?void 0:We.options)==null?void 0:ue.manageRule)),C?F?ae[0]&32&&E(F,1):(F=Td(),F.c(),E(F,1),F.m(y,null)):F&&(pe(),P(F,1,1,()=>{F=null}),he()),(!T||ae[0]&8)&&ne(y,"active",U[3]===bl),U[2].isAuth?q?q.p(U,ae):(q=Md(U),q.c(),q.m(c,null)):q&&(q.d(1),q=null)},i(U){T||(E(I),E(r.$$.fragment,U),E(L),E(F),T=!0)},o(U){P(I),P(r.$$.fragment,U),P(L),P(F),T=!1},d(U){U&&w(e),U&&w(s),I&&I.d(U),U&&w(l),U&&w(o),H(r),U&&w(f),U&&w(c),L&&L.d(),F&&F.d(),q&&q.d(),D=!1,Pe(A)}}}function q3(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=O(),s=v("button"),l=v("span"),r=B(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[9],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-expanded"),s.disabled=a=!n[11]||n[9],ne(s,"btn-loading",n[9])},m(c,d){S(c,e,d),_(e,t),S(c,i,d),S(c,s,d),_(s,l),_(l,r),u||(f=[K(e,"click",n[20]),K(s,"click",n[21])],u=!0)},p(c,d){d[0]&512&&(e.disabled=c[9]),d[0]&4&&o!==(o=c[2].isNew?"Create":"Save changes")&&re(r,o),d[0]&2560&&a!==(a=!c[11]||c[9])&&(s.disabled=a),d[0]&512&&ne(s,"btn-loading",c[9])},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Pe(f)}}}function V3(n){let e,t,i,s,l={class:"overlay-panel-lg colored-header collection-panel",beforeHide:n[32],$$slots:{footer:[q3],header:[j3],default:[N3]},$$scope:{ctx:n}};e=new Jn({props:l}),n[33](e),e.$on("hide",n[34]),e.$on("show",n[35]);let o={};return i=new L3({props:o}),n[36](i),i.$on("confirm",n[37]),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(r,a){R(e,r,a),S(r,t,a),R(i,r,a),s=!0},p(r,a){const u={};a[0]&1040&&(u.beforeHide=r[32]),a[0]&14956|a[1]&65536&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};i.$set(f)},i(r){s||(E(e.$$.fragment,r),E(i.$$.fragment,r),s=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),s=!1},d(r){n[33](null),H(e,r),r&&w(t),n[36](null),H(i,r)}}}const gi="fields",bl="api_rules",Ds="options",z3="base",Dd="auth";function Cr(n){return JSON.stringify(n)}function B3(n,e,t){let i,s,l,o,r;Ze(n,wi,we=>t(5,r=we));const a={};a[z3]="Base",a[Dd]="Auth";const u=It();let f,c,d=null,h=new Pn,m=!1,g=!1,b=gi,y=Cr(h);function k(we){t(3,b=we)}function $(we){return M(we),t(10,g=!0),k(gi),f==null?void 0:f.show()}function C(){return f==null?void 0:f.hide()}async function M(we){Fn({}),typeof we<"u"?(d=we,t(2,h=we==null?void 0:we.clone())):(d=null,t(2,h=new Pn)),t(2,h.schema=h.schema||[],h),t(2,h.originalName=h.name||"",h),await Tn(),t(19,y=Cr(h))}function T(){if(h.isNew)return D();c==null||c.show(h)}function D(){if(m)return;t(9,m=!0);const we=A();let We;h.isNew?We=de.collections.create(we):We=de.collections.update(h.id,we),We.then(ue=>{t(10,g=!1),C(),Lt(h.isNew?"Successfully created collection.":"Successfully updated collection."),LS(ue),u("save",{isNew:h.isNew,collection:ue})}).catch(ue=>{de.errorResponseHandler(ue)}).finally(()=>{t(9,m=!1)})}function A(){const we=h.export();we.schema=we.schema.slice(0);for(let We=we.schema.length-1;We>=0;We--)we.schema[We].toDelete&&we.schema.splice(We,1);return we}function I(){!(d!=null&&d.id)||wn(`Do you really want to delete collection "${d==null?void 0:d.name}" and all its records?`,()=>de.collections.delete(d==null?void 0:d.id).then(()=>{C(),Lt(`Successfully deleted collection "${d==null?void 0:d.name}".`),u("delete",d),NS(d)}).catch(we=>{de.errorResponseHandler(we)}))}function L(we){t(2,h.type=we,h),$s("schema")}const F=()=>C(),q=()=>T(),z=()=>I(),J=we=>{t(2,h.name=W.slugify(we.target.value),h),we.target.value=h.name},G=we=>L(we),ie=()=>{o&&T()},Q=()=>k(gi),X=()=>k(bl),Y=()=>k(Ds);function x(we){h=we,t(2,h)}function U(we){h=we,t(2,h)}function ae(we){h=we,t(2,h)}const Re=()=>l&&g?(wn("You have unsaved changes. Do you really want to close the panel?",()=>{t(10,g=!1),C()}),!1):!0;function Ne(we){le[we?"unshift":"push"](()=>{f=we,t(7,f)})}function Le(we){Ve.call(this,n,we)}function Fe(we){Ve.call(this,n,we)}function me(we){le[we?"unshift":"push"](()=>{c=we,t(8,c)})}const Se=()=>D();return n.$$.update=()=>{n.$$.dirty[0]&32&&t(13,i=typeof W.getNestedVal(r,"schema.message",null)=="string"?W.getNestedVal(r,"schema.message"):"Has errors"),n.$$.dirty[0]&4&&t(12,s=!h.isNew&&h.system),n.$$.dirty[0]&524292&&t(4,l=y!=Cr(h)),n.$$.dirty[0]&20&&t(11,o=h.isNew||l),n.$$.dirty[0]&12&&b===Ds&&h.type!==Dd&&k(gi)},[k,C,h,b,l,r,a,f,c,m,g,o,s,i,T,D,I,L,$,y,F,q,z,J,G,ie,Q,X,Y,x,U,ae,Re,Ne,Le,Fe,me,Se]}class Za extends ke{constructor(e){super(),ye(this,e,B3,V3,be,{changeTab:0,show:18,hide:1},null,[-1,-1])}get changeTab(){return this.$$.ctx[0]}get show(){return this.$$.ctx[18]}get hide(){return this.$$.ctx[1]}}function Ad(n,e,t){const i=n.slice();return i[14]=e[t],i}function Ed(n){let e,t=n[1].length&&Id();return{c(){t&&t.c(),e=Ae()},m(i,s){t&&t.m(i,s),S(i,e,s)},p(i,s){i[1].length?t||(t=Id(),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(i){t&&t.d(i),i&&w(e)}}}function Id(n){let e;return{c(){e=v("p"),e.textContent="No collections found.",p(e,"class","txt-hint m-t-10 m-b-10 txt-center")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Pd(n,e){let t,i,s,l,o,r=e[14].name+"",a,u,f,c,d;return{key:n,first:null,c(){var h;t=v("a"),i=v("i"),l=O(),o=v("span"),a=B(r),u=O(),p(i,"class",s=W.getCollectionTypeIcon(e[14].type)),p(o,"class","txt"),p(t,"href",f="/collections?collectionId="+e[14].id),p(t,"class","sidebar-list-item"),ne(t,"active",((h=e[5])==null?void 0:h.id)===e[14].id),this.first=t},m(h,m){S(h,t,m),_(t,i),_(t,l),_(t,o),_(o,a),_(t,u),c||(d=Ee(Ut.call(null,t)),c=!0)},p(h,m){var g;e=h,m&8&&s!==(s=W.getCollectionTypeIcon(e[14].type))&&p(i,"class",s),m&8&&r!==(r=e[14].name+"")&&re(a,r),m&8&&f!==(f="/collections?collectionId="+e[14].id)&&p(t,"href",f),m&40&&ne(t,"active",((g=e[5])==null?void 0:g.id)===e[14].id)},d(h){h&&w(t),c=!1,d()}}}function Ld(n){let e,t,i,s;return{c(){e=v("footer"),t=v("button"),t.innerHTML=` + New collection`,p(t,"type","button"),p(t,"class","btn btn-block btn-outline"),p(e,"class","sidebar-footer")},m(l,o){S(l,e,o),_(e,t),i||(s=K(t,"click",n[11]),i=!0)},p:ee,d(l){l&&w(e),i=!1,s()}}}function U3(n){let e,t,i,s,l,o,r,a,u,f,c,d=[],h=new Map,m,g,b,y,k,$,C=n[3];const M=I=>I[14].id;for(let I=0;I',o=O(),r=v("input"),a=O(),u=v("hr"),f=O(),c=v("div");for(let I=0;I20),p(e,"class","page-sidebar collection-sidebar")},m(I,L){S(I,e,L),_(e,t),_(t,i),_(i,s),_(s,l),_(i,o),_(i,r),ce(r,n[0]),_(e,a),_(e,u),_(e,f),_(e,c);for(let F=0;F20),I[6]?D&&(D.d(1),D=null):D?D.p(I,L):(D=Ld(I),D.c(),D.m(e,null));const F={};b.$set(F)},i(I){y||(E(b.$$.fragment,I),y=!0)},o(I){P(b.$$.fragment,I),y=!1},d(I){I&&w(e);for(let L=0;L{const n=document.querySelector(".collection-sidebar .sidebar-list-item.active");n&&(n==null||n.scrollIntoView({block:"nearest"}))},0)}function Y3(n,e,t){let i,s,l,o,r,a;Ze(n,Bn,y=>t(5,o=y)),Ze(n,Zi,y=>t(8,r=y)),Ze(n,Cs,y=>t(6,a=y));let u,f="";function c(y){Ht(Bn,o=y,o)}const d=()=>t(0,f="");function h(){f=this.value,t(0,f)}const m=()=>u==null?void 0:u.show();function g(y){le[y?"unshift":"push"](()=>{u=y,t(2,u)})}const b=y=>{var k;((k=y.detail)==null?void 0:k.isNew)&&y.detail.collection&&c(y.detail.collection)};return n.$$.update=()=>{n.$$.dirty&1&&t(1,i=f.replace(/\s+/g,"").toLowerCase()),n.$$.dirty&1&&t(4,s=f!==""),n.$$.dirty&259&&t(3,l=r.filter(y=>y.id==f||y.name.replace(/\s+/g,"").toLowerCase().includes(i))),n.$$.dirty&256&&r&&W3()},[f,i,u,l,s,o,a,c,r,d,h,m,g,b]}class K3 extends ke{constructor(e){super(),ye(this,e,Y3,U3,be,{})}}function Nd(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i}function Fd(n){n[18]=n[19].default}function Rd(n,e,t){const i=n.slice();return i[14]=e[t][0],i[15]=e[t][1],i[21]=t,i}function Hd(n){let e;return{c(){e=v("hr"),p(e,"class","m-t-sm m-b-sm")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function jd(n,e){let t,i=e[21]===Object.keys(e[6]).length,s,l,o=e[15].label+"",r,a,u,f,c=i&&Hd();function d(){return e[9](e[14])}return{key:n,first:null,c(){t=Ae(),c&&c.c(),s=O(),l=v("button"),r=B(o),a=O(),p(l,"type","button"),p(l,"class","sidebar-item"),ne(l,"active",e[5]===e[14]),this.first=t},m(h,m){S(h,t,m),c&&c.m(h,m),S(h,s,m),S(h,l,m),_(l,r),_(l,a),u||(f=K(l,"click",d),u=!0)},p(h,m){e=h,m&8&&(i=e[21]===Object.keys(e[6]).length),i?c||(c=Hd(),c.c(),c.m(s.parentNode,s)):c&&(c.d(1),c=null),m&8&&o!==(o=e[15].label+"")&&re(r,o),m&40&&ne(l,"active",e[5]===e[14])},d(h){h&&w(t),c&&c.d(h),h&&w(s),h&&w(l),u=!1,f()}}}function qd(n){let e,t,i,s={ctx:n,current:null,token:null,hasCatch:!1,pending:G3,then:Z3,catch:J3,value:19,blocks:[,,,]};return eu(t=n[15].component,s),{c(){e=Ae(),s.block.c()},m(l,o){S(l,e,o),s.block.m(l,s.anchor=o),s.mount=()=>e.parentNode,s.anchor=e,i=!0},p(l,o){n=l,s.ctx=n,o&8&&t!==(t=n[15].component)&&eu(t,s)||c0(s,n,o)},i(l){i||(E(s.block),i=!0)},o(l){for(let o=0;o<3;o+=1){const r=s.blocks[o];P(r)}i=!1},d(l){l&&w(e),s.block.d(l),s.token=null,s=null}}}function J3(n){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function Z3(n){Fd(n);let e,t,i;return e=new n[18]({props:{collection:n[2]}}),{c(){j(e.$$.fragment),t=O()},m(s,l){R(e,s,l),S(s,t,l),i=!0},p(s,l){Fd(s);const o={};l&4&&(o.collection=s[2]),e.$set(o)},i(s){i||(E(e.$$.fragment,s),i=!0)},o(s){P(e.$$.fragment,s),i=!1},d(s){H(e,s),s&&w(t)}}}function G3(n){return{c:ee,m:ee,p:ee,i:ee,o:ee,d:ee}}function Vd(n,e){let t,i,s,l=e[5]===e[14]&&qd(e);return{key:n,first:null,c(){t=Ae(),l&&l.c(),i=Ae(),this.first=t},m(o,r){S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){e=o,e[5]===e[14]?l?(l.p(e,r),r&40&&E(l,1)):(l=qd(e),l.c(),E(l,1),l.m(i.parentNode,i)):l&&(pe(),P(l,1,1,()=>{l=null}),he())},i(o){s||(E(l),s=!0)},o(o){P(l),s=!1},d(o){o&&w(t),l&&l.d(o),o&&w(i)}}}function X3(n){let e,t,i,s=[],l=new Map,o,r,a=[],u=new Map,f,c=Object.entries(n[3]);const d=g=>g[14];for(let g=0;gg[14];for(let g=0;gClose',p(e,"type","button"),p(e,"class","btn btn-secondary")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[8]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function x3(n){let e,t,i={class:"docs-panel",$$slots:{footer:[Q3],default:[X3]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[10](e),e.$on("hide",n[11]),e.$on("show",n[12]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&4194348&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[10](null),H(e,s)}}}function e4(n,e,t){const i={list:{label:"List/Search",component:st(()=>import("./ListApiDocs.fa7883e0.js"),["./ListApiDocs.fa7883e0.js","./SdkTabs.6909f1b6.js","./SdkTabs.9b0b7a06.css","./ListApiDocs.68f52edd.css"],import.meta.url)},view:{label:"View",component:st(()=>import("./ViewApiDocs.06d25880.js"),["./ViewApiDocs.06d25880.js","./SdkTabs.6909f1b6.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},create:{label:"Create",component:st(()=>import("./CreateApiDocs.0bcde8fa.js"),["./CreateApiDocs.0bcde8fa.js","./SdkTabs.6909f1b6.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},update:{label:"Update",component:st(()=>import("./UpdateApiDocs.5f466f13.js"),["./UpdateApiDocs.5f466f13.js","./SdkTabs.6909f1b6.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},delete:{label:"Delete",component:st(()=>import("./DeleteApiDocs.8b05ad6e.js"),["./DeleteApiDocs.8b05ad6e.js","./SdkTabs.6909f1b6.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},realtime:{label:"Realtime",component:st(()=>import("./RealtimeApiDocs.e0a4f9c5.js"),["./RealtimeApiDocs.e0a4f9c5.js","./SdkTabs.6909f1b6.js","./SdkTabs.9b0b7a06.css"],import.meta.url)}},s={"auth-with-password":{label:"Auth with password",component:st(()=>import("./AuthWithPasswordDocs.7298ae6e.js"),["./AuthWithPasswordDocs.7298ae6e.js","./SdkTabs.6909f1b6.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"auth-with-oauth2":{label:"Auth with OAuth2",component:st(()=>import("./AuthWithOAuth2Docs.4b3132ae.js"),["./AuthWithOAuth2Docs.4b3132ae.js","./SdkTabs.6909f1b6.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},refresh:{label:"Auth refresh",component:st(()=>import("./AuthRefreshDocs.ddc75cc1.js"),["./AuthRefreshDocs.ddc75cc1.js","./SdkTabs.6909f1b6.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"request-verification":{label:"Request verification",component:st(()=>import("./RequestVerificationDocs.bc7b243e.js"),["./RequestVerificationDocs.bc7b243e.js","./SdkTabs.6909f1b6.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"confirm-verification":{label:"Confirm verification",component:st(()=>import("./ConfirmVerificationDocs.9c85c320.js"),["./ConfirmVerificationDocs.9c85c320.js","./SdkTabs.6909f1b6.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"request-password-reset":{label:"Request password reset",component:st(()=>import("./RequestPasswordResetDocs.b37ecab0.js"),["./RequestPasswordResetDocs.b37ecab0.js","./SdkTabs.6909f1b6.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"confirm-password-reset":{label:"Confirm password reset",component:st(()=>import("./ConfirmPasswordResetDocs.a459ecae.js"),["./ConfirmPasswordResetDocs.a459ecae.js","./SdkTabs.6909f1b6.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"request-email-change":{label:"Request email change",component:st(()=>import("./RequestEmailChangeDocs.8d460654.js"),["./RequestEmailChangeDocs.8d460654.js","./SdkTabs.6909f1b6.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"confirm-email-change":{label:"Confirm email change",component:st(()=>import("./ConfirmEmailChangeDocs.eaef2b04.js"),["./ConfirmEmailChangeDocs.eaef2b04.js","./SdkTabs.6909f1b6.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"list-auth-methods":{label:"List auth methods",component:st(()=>import("./AuthMethodsDocs.533b2725.js"),["./AuthMethodsDocs.533b2725.js","./SdkTabs.6909f1b6.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"list-linked-accounts":{label:"List OAuth2 accounts",component:st(()=>import("./ListExternalAuthsDocs.619a62c2.js"),["./ListExternalAuthsDocs.619a62c2.js","./SdkTabs.6909f1b6.js","./SdkTabs.9b0b7a06.css"],import.meta.url)},"unlink-account":{label:"Unlink OAuth2 account",component:st(()=>import("./UnlinkExternalAuthDocs.52eecf60.js"),["./UnlinkExternalAuthDocs.52eecf60.js","./SdkTabs.6909f1b6.js","./SdkTabs.9b0b7a06.css"],import.meta.url)}};let l,o=new Pn,r,a=[];a.length&&(r=Object.keys(a)[0]);function u(y){return t(2,o=y),c(Object.keys(a)[0]),l==null?void 0:l.show()}function f(){return l==null?void 0:l.hide()}function c(y){t(5,r=y)}const d=()=>f(),h=y=>c(y);function m(y){le[y?"unshift":"push"](()=>{l=y,t(4,l)})}function g(y){Ve.call(this,n,y)}function b(y){Ve.call(this,n,y)}return n.$$.update=()=>{n.$$.dirty&12&&(o.isAuth?(t(3,a=Object.assign({},i,s)),!(o!=null&&o.options.allowUsernameAuth)&&!(o!=null&&o.options.allowEmailAuth)&&delete a["auth-with-password"],o!=null&&o.options.allowOAuth2Auth||delete a["auth-with-oauth2"]):t(3,a=Object.assign({},i)))},[f,c,o,a,l,r,i,u,d,h,m,g,b]}class t4 extends ke{constructor(e){super(),ye(this,e,e4,x3,be,{show:7,hide:0,changeTab:1})}get show(){return this.$$.ctx[7]}get hide(){return this.$$.ctx[0]}get changeTab(){return this.$$.ctx[1]}}function n4(n){let e,t,i,s,l,o,r,a,u,f,c,d;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Username",o=O(),r=v("input"),p(t,"class",W.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","text"),p(r,"requried",a=!n[0].isNew),p(r,"placeholder",u=n[0].isNew?"Leave empty to auto generate...":n[3]),p(r,"id",f=n[12])},m(h,m){S(h,e,m),_(e,t),_(e,i),_(e,s),S(h,o,m),S(h,r,m),ce(r,n[0].username),c||(d=K(r,"input",n[4]),c=!0)},p(h,m){m&4096&&l!==(l=h[12])&&p(e,"for",l),m&1&&a!==(a=!h[0].isNew)&&p(r,"requried",a),m&1&&u!==(u=h[0].isNew?"Leave empty to auto generate...":h[3])&&p(r,"placeholder",u),m&4096&&f!==(f=h[12])&&p(r,"id",f),m&1&&r.value!==h[0].username&&ce(r,h[0].username)},d(h){h&&w(e),h&&w(o),h&&w(r),c=!1,d()}}}function i4(n){let e,t,i,s,l,o,r,a,u,f,c=n[0].emailVisibility?"On":"Off",d,h,m,g,b,y,k,$,C;return{c(){var M;e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Email",o=O(),r=v("div"),a=v("button"),u=v("span"),f=B("Public: "),d=B(c),m=O(),g=v("input"),p(t,"class",W.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[12]),p(u,"class","txt"),p(a,"type","button"),p(a,"class",h="btn btn-sm btn-secondary "+(n[0].emailVisibility?"btn-success":"btn-hint")),p(r,"class","form-field-addon email-visibility-addon svelte-1751a4d"),p(g,"type","email"),g.autofocus=b=n[0].isNew,p(g,"autocomplete","off"),p(g,"id",y=n[12]),g.required=k=(M=n[1].options)==null?void 0:M.requireEmail,p(g,"class","svelte-1751a4d")},m(M,T){S(M,e,T),_(e,t),_(e,i),_(e,s),S(M,o,T),S(M,r,T),_(r,a),_(a,u),_(u,f),_(u,d),S(M,m,T),S(M,g,T),ce(g,n[0].email),n[0].isNew&&g.focus(),$||(C=[Ee(Ue.call(null,a,{text:"Make email public or private",position:"top-right"})),K(a,"click",n[5]),K(g,"input",n[6])],$=!0)},p(M,T){var D;T&4096&&l!==(l=M[12])&&p(e,"for",l),T&1&&c!==(c=M[0].emailVisibility?"On":"Off")&&re(d,c),T&1&&h!==(h="btn btn-sm btn-secondary "+(M[0].emailVisibility?"btn-success":"btn-hint"))&&p(a,"class",h),T&1&&b!==(b=M[0].isNew)&&(g.autofocus=b),T&4096&&y!==(y=M[12])&&p(g,"id",y),T&2&&k!==(k=(D=M[1].options)==null?void 0:D.requireEmail)&&(g.required=k),T&1&&g.value!==M[0].email&&ce(g,M[0].email)},d(M){M&&w(e),M&&w(o),M&&w(r),M&&w(m),M&&w(g),$=!1,Pe(C)}}}function zd(n){let e,t;return e=new ge({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[s4,({uniqueId:i})=>({12:i}),({uniqueId:i})=>i?4096:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s&12292&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function s4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[2],S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[7]),r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&4&&(e.checked=u[2]),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Bd(n){let e,t,i,s,l,o,r,a,u;return s=new ge({props:{class:"form-field required",name:"password",$$slots:{default:[l4,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),r=new ge({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[o4,({uniqueId:f})=>({12:f}),({uniqueId:f})=>f?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),j(s.$$.fragment),l=O(),o=v("div"),j(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),ne(t,"p-t-xs",n[2]),p(e,"class","block")},m(f,c){S(f,e,c),_(e,t),_(t,i),R(s,i,null),_(t,l),_(t,o),R(r,o,null),u=!0},p(f,c){const d={};c&12289&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const h={};c&12289&&(h.$$scope={dirty:c,ctx:f}),r.$set(h),(!u||c&4)&&ne(t,"p-t-xs",f[2])},i(f){u||(E(s.$$.fragment,f),E(r.$$.fragment,f),f&&xe(()=>{a||(a=je(e,St,{duration:150},!0)),a.run(1)}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=je(e,St,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),H(s),H(r),f&&a&&a.end()}}}function l4(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[12]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),ce(r,n[0].password),u||(f=K(r,"input",n[8]),u=!0)},p(c,d){d&4096&&l!==(l=c[12])&&p(e,"for",l),d&4096&&a!==(a=c[12])&&p(r,"id",a),d&1&&r.value!==c[0].password&&ce(r,c[0].password)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function o4(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password confirm",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[12]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[12]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),ce(r,n[0].passwordConfirm),u||(f=K(r,"input",n[9]),u=!0)},p(c,d){d&4096&&l!==(l=c[12])&&p(e,"for",l),d&4096&&a!==(a=c[12])&&p(r,"id",a),d&1&&r.value!==c[0].passwordConfirm&&ce(r,c[0].passwordConfirm)},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function r4(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Verified"),p(e,"type","checkbox"),p(e,"id",t=n[12]),p(s,"for",o=n[12])},m(u,f){S(u,e,f),e.checked=n[0].verified,S(u,i,f),S(u,s,f),_(s,l),r||(a=[K(e,"change",n[10]),K(e,"change",ut(n[11]))],r=!0)},p(u,f){f&4096&&t!==(t=u[12])&&p(e,"id",t),f&1&&(e.checked=u[0].verified),f&4096&&o!==(o=u[12])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Pe(a)}}}function a4(n){var b;let e,t,i,s,l,o,r,a,u,f,c,d,h;i=new ge({props:{class:"form-field "+(n[0].isNew?"":"required"),name:"username",$$slots:{default:[n4,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field "+((b=n[1].options)!=null&&b.requireEmail?"required":""),name:"email",$$slots:{default:[i4,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}});let m=!n[0].isNew&&zd(n),g=(n[0].isNew||n[2])&&Bd(n);return d=new ge({props:{class:"form-field form-field-toggle",name:"verified",$$slots:{default:[r4,({uniqueId:y})=>({12:y}),({uniqueId:y})=>y?4096:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),m&&m.c(),u=O(),g&&g.c(),f=O(),c=v("div"),j(d.$$.fragment),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(a,"class","col-lg-12"),p(c,"class","col-lg-12"),p(e,"class","grid m-b-base")},m(y,k){S(y,e,k),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),m&&m.m(a,null),_(a,u),g&&g.m(a,null),_(e,f),_(e,c),R(d,c,null),h=!0},p(y,[k]){var T;const $={};k&1&&($.class="form-field "+(y[0].isNew?"":"required")),k&12289&&($.$$scope={dirty:k,ctx:y}),i.$set($);const C={};k&2&&(C.class="form-field "+((T=y[1].options)!=null&&T.requireEmail?"required":"")),k&12291&&(C.$$scope={dirty:k,ctx:y}),o.$set(C),y[0].isNew?m&&(pe(),P(m,1,1,()=>{m=null}),he()):m?(m.p(y,k),k&1&&E(m,1)):(m=zd(y),m.c(),E(m,1),m.m(a,u)),y[0].isNew||y[2]?g?(g.p(y,k),k&5&&E(g,1)):(g=Bd(y),g.c(),E(g,1),g.m(a,null)):g&&(pe(),P(g,1,1,()=>{g=null}),he());const M={};k&12289&&(M.$$scope={dirty:k,ctx:y}),d.$set(M)},i(y){h||(E(i.$$.fragment,y),E(o.$$.fragment,y),E(m),E(g),E(d.$$.fragment,y),h=!0)},o(y){P(i.$$.fragment,y),P(o.$$.fragment,y),P(m),P(g),P(d.$$.fragment,y),h=!1},d(y){y&&w(e),H(i),H(o),m&&m.d(),g&&g.d(),H(d)}}}function u4(n,e,t){let{collection:i=new Pn}=e,{record:s=new Wi}=e,l=s.username||null,o=!1;function r(){s.username=this.value,t(0,s),t(2,o)}const a=()=>t(0,s.emailVisibility=!s.emailVisibility,s);function u(){s.email=this.value,t(0,s),t(2,o)}function f(){o=this.checked,t(2,o)}function c(){s.password=this.value,t(0,s),t(2,o)}function d(){s.passwordConfirm=this.value,t(0,s),t(2,o)}function h(){s.verified=this.checked,t(0,s),t(2,o)}const m=g=>{s.isNew||wn("Do you really want to manually change the verified account state?",()=>{},()=>{t(0,s.verified=!g.target.checked,s)})};return n.$$set=g=>{"collection"in g&&t(1,i=g.collection),"record"in g&&t(0,s=g.record)},n.$$.update=()=>{n.$$.dirty&1&&!s.username&&s.username!==null&&t(0,s.username=null,s),n.$$.dirty&4&&(o||(t(0,s.password=null,s),t(0,s.passwordConfirm=null,s),$s("password"),$s("passwordConfirm")))},[s,i,o,l,r,a,u,f,c,d,h,m]}class f4 extends ke{constructor(e){super(),ye(this,e,u4,a4,be,{collection:1,record:0})}}function c4(n){let e,t,i,s=[n[3]],l={};for(let o=0;o{r&&(t(1,r.style.height="",r),t(1,r.style.height=Math.min(r.scrollHeight+2,o)+"px",r))},0)}function f(h){if((h==null?void 0:h.code)==="Enter"&&!(h!=null&&h.shiftKey)&&!(h!=null&&h.isComposing)){h.preventDefault();const m=r.closest("form");m!=null&&m.requestSubmit&&m.requestSubmit()}}cn(()=>(u(),()=>clearTimeout(a)));function c(h){le[h?"unshift":"push"](()=>{r=h,t(1,r)})}function d(){l=this.value,t(0,l)}return n.$$set=h=>{e=Ke(Ke({},e),Wn(h)),t(3,s=wt(e,i)),"value"in h&&t(0,l=h.value),"maxHeight"in h&&t(4,o=h.maxHeight)},n.$$.update=()=>{n.$$.dirty&1&&typeof l!==void 0&&u()},[l,r,f,s,o,c,d]}class p4 extends ke{constructor(e){super(),ye(this,e,d4,c4,be,{value:0,maxHeight:4})}}function h4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d;function h(g){n[2](g)}let m={id:n[3],required:n[1].required};return n[0]!==void 0&&(m.value=n[0]),f=new p4({props:m}),le.push(()=>_e(f,"value",h)),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),j(f.$$.fragment),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3])},m(g,b){S(g,e,b),_(e,t),_(e,s),_(e,l),_(l,r),S(g,u,b),R(f,g,b),d=!0},p(g,b){(!d||b&2&&i!==(i=W.getFieldTypeIcon(g[1].type)))&&p(t,"class",i),(!d||b&2)&&o!==(o=g[1].name+"")&&re(r,o),(!d||b&8&&a!==(a=g[3]))&&p(e,"for",a);const y={};b&8&&(y.id=g[3]),b&2&&(y.required=g[1].required),!c&&b&1&&(c=!0,y.value=g[0],ve(()=>c=!1)),f.$set(y)},i(g){d||(E(f.$$.fragment,g),d=!0)},o(g){P(f.$$.fragment,g),d=!1},d(g){g&&w(e),g&&w(u),H(f,g)}}}function m4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[h4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function g4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(o){s=o,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class _4 extends ke{constructor(e){super(),ye(this,e,g4,m4,be,{field:1,value:0})}}function b4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m,g,b;return{c(){var y,k;e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),f=v("input"),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","number"),p(f,"id",c=n[3]),f.required=d=n[1].required,p(f,"min",h=(y=n[1].options)==null?void 0:y.min),p(f,"max",m=(k=n[1].options)==null?void 0:k.max),p(f,"step","any")},m(y,k){S(y,e,k),_(e,t),_(e,s),_(e,l),_(l,r),S(y,u,k),S(y,f,k),ce(f,n[0]),g||(b=K(f,"input",n[2]),g=!0)},p(y,k){var $,C;k&2&&i!==(i=W.getFieldTypeIcon(y[1].type))&&p(t,"class",i),k&2&&o!==(o=y[1].name+"")&&re(r,o),k&8&&a!==(a=y[3])&&p(e,"for",a),k&8&&c!==(c=y[3])&&p(f,"id",c),k&2&&d!==(d=y[1].required)&&(f.required=d),k&2&&h!==(h=($=y[1].options)==null?void 0:$.min)&&p(f,"min",h),k&2&&m!==(m=(C=y[1].options)==null?void 0:C.max)&&p(f,"max",m),k&1&&rt(f.value)!==y[0]&&ce(f,y[0])},d(y){y&&w(e),y&&w(u),y&&w(f),g=!1,b()}}}function v4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[b4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function y4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=rt(this.value),t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class k4 extends ke{constructor(e){super(),ye(this,e,y4,v4,be,{field:1,value:0})}}function w4(n){let e,t,i,s,l=n[1].name+"",o,r,a,u;return{c(){e=v("input"),i=O(),s=v("label"),o=B(l),p(e,"type","checkbox"),p(e,"id",t=n[3]),p(s,"for",r=n[3])},m(f,c){S(f,e,c),e.checked=n[0],S(f,i,c),S(f,s,c),_(s,o),a||(u=K(e,"change",n[2]),a=!0)},p(f,c){c&8&&t!==(t=f[3])&&p(e,"id",t),c&1&&(e.checked=f[0]),c&2&&l!==(l=f[1].name+"")&&re(o,l),c&8&&r!==(r=f[3])&&p(s,"for",r)},d(f){f&&w(e),f&&w(i),f&&w(s),a=!1,u()}}}function S4(n){let e,t;return e=new ge({props:{class:"form-field form-field-toggle "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[w4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field form-field-toggle "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function $4(n,e,t){let{field:i=new dn}=e,{value:s=!1}=e;function l(){s=this.checked,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class C4 extends ke{constructor(e){super(),ye(this,e,$4,S4,be,{field:1,value:0})}}function T4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),f=v("input"),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","email"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(g,b){S(g,e,b),_(e,t),_(e,s),_(e,l),_(l,r),S(g,u,b),S(g,f,b),ce(f,n[0]),h||(m=K(f,"input",n[2]),h=!0)},p(g,b){b&2&&i!==(i=W.getFieldTypeIcon(g[1].type))&&p(t,"class",i),b&2&&o!==(o=g[1].name+"")&&re(r,o),b&8&&a!==(a=g[3])&&p(e,"for",a),b&8&&c!==(c=g[3])&&p(f,"id",c),b&2&&d!==(d=g[1].required)&&(f.required=d),b&1&&f.value!==g[0]&&ce(f,g[0])},d(g){g&&w(e),g&&w(u),g&&w(f),h=!1,m()}}}function M4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[T4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function O4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class D4 extends ke{constructor(e){super(),ye(this,e,O4,M4,be,{field:1,value:0})}}function A4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),f=v("input"),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"type","url"),p(f,"id",c=n[3]),f.required=d=n[1].required},m(g,b){S(g,e,b),_(e,t),_(e,s),_(e,l),_(l,r),S(g,u,b),S(g,f,b),ce(f,n[0]),h||(m=K(f,"input",n[2]),h=!0)},p(g,b){b&2&&i!==(i=W.getFieldTypeIcon(g[1].type))&&p(t,"class",i),b&2&&o!==(o=g[1].name+"")&&re(r,o),b&8&&a!==(a=g[3])&&p(e,"for",a),b&8&&c!==(c=g[3])&&p(f,"id",c),b&2&&d!==(d=g[1].required)&&(f.required=d),b&1&&ce(f,g[0])},d(g){g&&w(e),g&&w(u),g&&w(f),h=!1,m()}}}function E4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[A4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function I4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},[s,i,l]}class P4 extends ke{constructor(e){super(),ye(this,e,I4,E4,be,{field:1,value:0})}}function Ud(n){let e,t,i,s;return{c(){e=v("div"),t=v("button"),t.innerHTML='',p(t,"type","button"),p(t,"class","link-hint clear-btn svelte-11df51y"),p(e,"class","form-field-addon")},m(l,o){S(l,e,o),_(e,t),i||(s=[Ee(Ue.call(null,t,"Clear")),K(t,"click",n[4])],i=!0)},p:ee,d(l){l&&w(e),i=!1,Pe(s)}}}function L4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m,g=n[0]&&!n[1].required&&Ud(n);function b(k){n[5](k)}let y={id:n[6],options:W.defaultFlatpickrOptions(),value:n[0]};return n[0]!==void 0&&(y.formattedValue=n[0]),d=new Ja({props:y}),le.push(()=>_e(d,"formattedValue",b)),d.$on("close",n[2]),{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),a=B(" (UTC)"),f=O(),g&&g.c(),c=O(),j(d.$$.fragment),p(t,"class",i=ws(W.getFieldTypeIcon(n[1].type))+" svelte-11df51y"),p(l,"class","txt"),p(e,"for",u=n[6])},m(k,$){S(k,e,$),_(e,t),_(e,s),_(e,l),_(l,r),_(l,a),S(k,f,$),g&&g.m(k,$),S(k,c,$),R(d,k,$),m=!0},p(k,$){(!m||$&2&&i!==(i=ws(W.getFieldTypeIcon(k[1].type))+" svelte-11df51y"))&&p(t,"class",i),(!m||$&2)&&o!==(o=k[1].name+"")&&re(r,o),(!m||$&64&&u!==(u=k[6]))&&p(e,"for",u),k[0]&&!k[1].required?g?g.p(k,$):(g=Ud(k),g.c(),g.m(c.parentNode,c)):g&&(g.d(1),g=null);const C={};$&64&&(C.id=k[6]),$&1&&(C.value=k[0]),!h&&$&1&&(h=!0,C.formattedValue=k[0],ve(()=>h=!1)),d.$set(C)},i(k){m||(E(d.$$.fragment,k),m=!0)},o(k){P(d.$$.fragment,k),m=!1},d(k){k&&w(e),k&&w(f),g&&g.d(k),k&&w(c),H(d,k)}}}function N4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[L4,({uniqueId:i})=>({6:i}),({uniqueId:i})=>i?64:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&195&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function F4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(u){u.detail&&u.detail.length==3&&t(0,s=u.detail[1])}function o(){t(0,s="")}const r=()=>o();function a(u){s=u,t(0,s)}return n.$$set=u=>{"field"in u&&t(1,i=u.field),"value"in u&&t(0,s=u.value)},n.$$.update=()=>{n.$$.dirty&1&&s&&s.length>19&&t(0,s=s.substring(0,19))},[s,i,l,o,r,a]}class R4 extends ke{constructor(e){super(),ye(this,e,F4,N4,be,{field:1,value:0})}}function Wd(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=v("div"),t=B("Select up to "),s=B(i),l=B(" items."),p(e,"class","help-block")},m(o,r){S(o,e,r),_(e,t),_(e,s),_(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&re(s,i)},d(o){o&&w(e)}}}function H4(n){var k,$,C;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;function g(M){n[3](M)}let b={id:n[4],toggle:!n[1].required||n[2],multiple:n[2],items:(k=n[1].options)==null?void 0:k.values,searchable:(($=n[1].options)==null?void 0:$.values)>5};n[0]!==void 0&&(b.selected=n[0]),f=new R_({props:b}),le.push(()=>_e(f,"selected",g));let y=((C=n[1].options)==null?void 0:C.maxSelect)>1&&Wd(n);return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),j(f.$$.fragment),d=O(),y&&y.c(),h=Ae(),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(M,T){S(M,e,T),_(e,t),_(e,s),_(e,l),_(l,r),S(M,u,T),R(f,M,T),S(M,d,T),y&&y.m(M,T),S(M,h,T),m=!0},p(M,T){var A,I,L;(!m||T&2&&i!==(i=W.getFieldTypeIcon(M[1].type)))&&p(t,"class",i),(!m||T&2)&&o!==(o=M[1].name+"")&&re(r,o),(!m||T&16&&a!==(a=M[4]))&&p(e,"for",a);const D={};T&16&&(D.id=M[4]),T&6&&(D.toggle=!M[1].required||M[2]),T&4&&(D.multiple=M[2]),T&2&&(D.items=(A=M[1].options)==null?void 0:A.values),T&2&&(D.searchable=((I=M[1].options)==null?void 0:I.values)>5),!c&&T&1&&(c=!0,D.selected=M[0],ve(()=>c=!1)),f.$set(D),((L=M[1].options)==null?void 0:L.maxSelect)>1?y?y.p(M,T):(y=Wd(M),y.c(),y.m(h.parentNode,h)):y&&(y.d(1),y=null)},i(M){m||(E(f.$$.fragment,M),m=!0)},o(M){P(f.$$.fragment,M),m=!1},d(M){M&&w(e),M&&w(u),H(f,M),M&&w(d),y&&y.d(M),M&&w(h)}}}function j4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[H4,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function q4(n,e,t){let i,{field:s=new dn}=e,{value:l=void 0}=e;function o(r){l=r,t(0,l),t(2,i),t(1,s)}return n.$$set=r=>{"field"in r&&t(1,s=r.field),"value"in r&&t(0,l=r.value)},n.$$.update=()=>{var r;n.$$.dirty&2&&t(2,i=((r=s.options)==null?void 0:r.maxSelect)>1),n.$$.dirty&5&&typeof l>"u"&&t(0,l=i?[]:""),n.$$.dirty&7&&i&&Array.isArray(l)&&l.length>s.options.maxSelect&&t(0,l=l.slice(l.length-s.options.maxSelect))},[l,s,i,o]}class V4 extends ke{constructor(e){super(),ye(this,e,q4,j4,be,{field:1,value:0})}}function z4(n){let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),f=v("textarea"),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[3]),p(f,"id",c=n[3]),f.required=d=n[1].required,p(f,"class","txt-mono")},m(g,b){S(g,e,b),_(e,t),_(e,s),_(e,l),_(l,r),S(g,u,b),S(g,f,b),ce(f,n[0]),h||(m=K(f,"input",n[2]),h=!0)},p(g,b){b&2&&i!==(i=W.getFieldTypeIcon(g[1].type))&&p(t,"class",i),b&2&&o!==(o=g[1].name+"")&&re(r,o),b&8&&a!==(a=g[3])&&p(e,"for",a),b&8&&c!==(c=g[3])&&p(f,"id",c),b&2&&d!==(d=g[1].required)&&(f.required=d),b&1&&ce(f,g[0])},d(g){g&&w(e),g&&w(u),g&&w(f),h=!1,m()}}}function B4(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[z4,({uniqueId:i})=>({3:i}),({uniqueId:i})=>i?8:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&27&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function U4(n,e,t){let{field:i=new dn}=e,{value:s=void 0}=e;function l(){s=this.value,t(0,s)}return n.$$set=o=>{"field"in o&&t(1,i=o.field),"value"in o&&t(0,s=o.value)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&typeof s!="string"&&s!==null&&t(0,s=JSON.stringify(s,null,2))},[s,i,l]}class W4 extends ke{constructor(e){super(),ye(this,e,U4,B4,be,{field:1,value:0})}}function Y4(n){let e,t;return{c(){e=v("i"),p(e,"class","ri-file-line"),p(e,"alt",t=n[0].name)},m(i,s){S(i,e,s)},p(i,s){s&1&&t!==(t=i[0].name)&&p(e,"alt",t)},d(i){i&&w(e)}}}function K4(n){let e,t,i;return{c(){e=v("img"),Ln(e.src,t=n[2])||p(e,"src",t),p(e,"width",n[1]),p(e,"height",n[1]),p(e,"alt",i=n[0].name)},m(s,l){S(s,e,l)},p(s,l){l&4&&!Ln(e.src,t=s[2])&&p(e,"src",t),l&2&&p(e,"width",s[1]),l&2&&p(e,"height",s[1]),l&1&&i!==(i=s[0].name)&&p(e,"alt",i)},d(s){s&&w(e)}}}function J4(n){let e;function t(l,o){return l[2]?K4:Y4}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:ee,o:ee,d(l){s.d(l),l&&w(e)}}}function Z4(n,e,t){let i,{file:s}=e,{size:l=50}=e;function o(){t(2,i=""),W.hasImageExtension(s==null?void 0:s.name)&&W.generateThumb(s,l,l).then(r=>{t(2,i=r)}).catch(r=>{console.warn("Unable to generate thumb: ",r)})}return n.$$set=r=>{"file"in r&&t(0,s=r.file),"size"in r&&t(1,l=r.size)},n.$$.update=()=>{n.$$.dirty&1&&typeof s<"u"&&o()},t(2,i=""),[s,l,i]}class G4 extends ke{constructor(e){super(),ye(this,e,Z4,J4,be,{file:0,size:1})}}function X4(n){let e,t,i;return{c(){e=v("img"),Ln(e.src,t=n[2])||p(e,"src",t),p(e,"alt",i="Preview "+n[2])},m(s,l){S(s,e,l)},p(s,l){l&4&&!Ln(e.src,t=s[2])&&p(e,"src",t),l&4&&i!==(i="Preview "+s[2])&&p(e,"alt",i)},d(s){s&&w(e)}}}function Q4(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","overlay-close")},m(s,l){S(s,e,l),t||(i=K(e,"click",ut(n[0])),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function x4(n){let e,t=n[2].substring(n[2].lastIndexOf("/")+1)+"",i,s,l,o,r,a,u;return{c(){e=v("a"),i=B(t),s=O(),l=v("div"),o=O(),r=v("button"),r.textContent="Close",p(e,"href",n[2]),p(e,"title","Download"),p(e,"target","_blank"),p(e,"rel","noreferrer noopener"),p(e,"class","link-hint txt-ellipsis"),p(l,"class","flex-fill"),p(r,"type","button"),p(r,"class","btn btn-secondary")},m(f,c){S(f,e,c),_(e,i),S(f,s,c),S(f,l,c),S(f,o,c),S(f,r,c),a||(u=K(r,"click",n[0]),a=!0)},p(f,c){c&4&&t!==(t=f[2].substring(f[2].lastIndexOf("/")+1)+"")&&re(i,t),c&4&&p(e,"href",f[2])},d(f){f&&w(e),f&&w(s),f&&w(l),f&&w(o),f&&w(r),a=!1,u()}}}function eT(n){let e,t,i={class:"image-preview",btnClose:!1,popup:!0,$$slots:{footer:[x4],header:[Q4],default:[X4]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[4](e),e.$on("show",n[5]),e.$on("hide",n[6]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&132&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[4](null),H(e,s)}}}function tT(n,e,t){let i,s="";function l(f){f!==""&&(t(2,s=f),i==null||i.show())}function o(){return i==null?void 0:i.hide()}function r(f){le[f?"unshift":"push"](()=>{i=f,t(1,i)})}function a(f){Ve.call(this,n,f)}function u(f){Ve.call(this,n,f)}return[o,i,s,l,r,a,u]}class nT extends ke{constructor(e){super(),ye(this,e,tT,eT,be,{show:3,hide:0})}get show(){return this.$$.ctx[3]}get hide(){return this.$$.ctx[0]}}function iT(n){let e;return{c(){e=v("i"),p(e,"class","ri-file-line")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function sT(n){let e,t,i,s,l;return{c(){e=v("img"),Ln(e.src,t=n[4])||p(e,"src",t),p(e,"alt",n[0]),p(e,"title",i="Preview "+n[0]),ne(e,"link-fade",n[2])},m(o,r){S(o,e,r),s||(l=[K(e,"click",n[7]),K(e,"error",n[5])],s=!0)},p(o,r){r&16&&!Ln(e.src,t=o[4])&&p(e,"src",t),r&1&&p(e,"alt",o[0]),r&1&&i!==(i="Preview "+o[0])&&p(e,"title",i),r&4&&ne(e,"link-fade",o[2])},d(o){o&&w(e),s=!1,Pe(l)}}}function lT(n){let e,t,i;function s(a,u){return a[2]?sT:iT}let l=s(n),o=l(n),r={};return t=new nT({props:r}),n[8](t),{c(){o.c(),e=O(),j(t.$$.fragment)},m(a,u){o.m(a,u),S(a,e,u),R(t,a,u),i=!0},p(a,[u]){l===(l=s(a))&&o?o.p(a,u):(o.d(1),o=l(a),o&&(o.c(),o.m(e.parentNode,e)));const f={};t.$set(f)},i(a){i||(E(t.$$.fragment,a),i=!0)},o(a){P(t.$$.fragment,a),i=!1},d(a){o.d(a),a&&w(e),n[8](null),H(t,a)}}}function oT(n,e,t){let i,{record:s}=e,{filename:l}=e,o,r="",a="";function u(){t(4,r="")}const f=d=>{d.stopPropagation(),o==null||o.show(a)};function c(d){le[d?"unshift":"push"](()=>{o=d,t(3,o)})}return n.$$set=d=>{"record"in d&&t(6,s=d.record),"filename"in d&&t(0,l=d.filename)},n.$$.update=()=>{n.$$.dirty&1&&t(2,i=W.hasImageExtension(l)),n.$$.dirty&69&&i&&t(1,a=de.getFileUrl(s,`${l}`)),n.$$.dirty&2&&t(4,r=a?a+"?thumb=100x100":"")},[l,a,i,o,r,u,s,f,c]}class V_ extends ke{constructor(e){super(),ye(this,e,oT,lT,be,{record:6,filename:0})}}function Yd(n,e,t){const i=n.slice();return i[22]=e[t],i[24]=t,i}function Kd(n,e,t){const i=n.slice();return i[25]=e[t],i[24]=t,i}function rT(n){let e,t,i;function s(){return n[14](n[24])}return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-secondary btn-sm btn-circle btn-remove txt-hint")},m(l,o){S(l,e,o),t||(i=[Ee(Ue.call(null,e,"Remove file")),K(e,"click",s)],t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,Pe(i)}}}function aT(n){let e,t,i;function s(){return n[13](n[24])}return{c(){e=v("button"),e.innerHTML='Restore',p(e,"type","button"),p(e,"class","btn btn-sm btn-danger btn-secondary")},m(l,o){S(l,e,o),t||(i=K(e,"click",s),t=!0)},p(l,o){n=l},d(l){l&&w(e),t=!1,i()}}}function Jd(n,e){let t,i,s,l,o,r=e[25]+"",a,u,f,c,d,h,m;s=new V_({props:{record:e[2],filename:e[25]}});function g(k,$){return $&18&&(c=null),c==null&&(c=!!k[1].includes(k[24])),c?aT:rT}let b=g(e,-1),y=b(e);return{key:n,first:null,c(){t=v("div"),i=v("figure"),j(s.$$.fragment),l=O(),o=v("a"),a=B(r),f=O(),y.c(),p(i,"class","thumb"),ne(i,"fade",e[1].includes(e[24])),p(o,"href",u=de.getFileUrl(e[2],e[25])),p(o,"class","filename link-hint"),p(o,"target","_blank"),p(o,"rel","noopener noreferrer"),ne(o,"txt-strikethrough",e[1].includes(e[24])),p(t,"class","list-item"),this.first=t},m(k,$){S(k,t,$),_(t,i),R(s,i,null),_(t,l),_(t,o),_(o,a),_(t,f),y.m(t,null),d=!0,h||(m=Ee(Ue.call(null,o,{position:"right",text:"Download"})),h=!0)},p(k,$){e=k;const C={};$&4&&(C.record=e[2]),$&16&&(C.filename=e[25]),s.$set(C),(!d||$&18)&&ne(i,"fade",e[1].includes(e[24])),(!d||$&16)&&r!==(r=e[25]+"")&&re(a,r),(!d||$&20&&u!==(u=de.getFileUrl(e[2],e[25])))&&p(o,"href",u),(!d||$&18)&&ne(o,"txt-strikethrough",e[1].includes(e[24])),b===(b=g(e,$))&&y?y.p(e,$):(y.d(1),y=b(e),y&&(y.c(),y.m(t,null)))},i(k){d||(E(s.$$.fragment,k),d=!0)},o(k){P(s.$$.fragment,k),d=!1},d(k){k&&w(t),H(s),y.d(),h=!1,m()}}}function Zd(n){let e,t,i,s,l,o,r,a,u=n[22].name+"",f,c,d,h,m,g,b;i=new G4({props:{file:n[22]}});function y(){return n[15](n[24])}return{c(){e=v("div"),t=v("figure"),j(i.$$.fragment),s=O(),l=v("div"),o=v("small"),o.textContent="New",r=O(),a=v("span"),f=B(u),d=O(),h=v("button"),h.innerHTML='',p(t,"class","thumb"),p(o,"class","label label-success m-r-5"),p(a,"class","txt"),p(l,"class","filename"),p(l,"title",c=n[22].name),p(h,"type","button"),p(h,"class","btn btn-secondary btn-sm btn-circle btn-remove"),p(e,"class","list-item")},m(k,$){S(k,e,$),_(e,t),R(i,t,null),_(e,s),_(e,l),_(l,o),_(l,r),_(l,a),_(a,f),_(e,d),_(e,h),m=!0,g||(b=[Ee(Ue.call(null,h,"Remove file")),K(h,"click",y)],g=!0)},p(k,$){n=k;const C={};$&1&&(C.file=n[22]),i.$set(C),(!m||$&1)&&u!==(u=n[22].name+"")&&re(f,u),(!m||$&1&&c!==(c=n[22].name))&&p(l,"title",c)},i(k){m||(E(i.$$.fragment,k),m=!0)},o(k){P(i.$$.fragment,k),m=!1},d(k){k&&w(e),H(i),g=!1,Pe(b)}}}function Gd(n){let e,t,i,s,l,o;return{c(){e=v("div"),t=v("input"),i=O(),s=v("button"),s.innerHTML=` + Upload new file`,p(t,"type","file"),p(t,"class","hidden"),t.multiple=n[5],p(s,"type","button"),p(s,"class","btn btn-secondary btn-sm btn-block"),p(e,"class","list-item btn-list-item")},m(r,a){S(r,e,a),_(e,t),n[16](t),_(e,i),_(e,s),l||(o=[K(t,"change",n[17]),K(s,"click",n[18])],l=!0)},p(r,a){a&32&&(t.multiple=r[5])},d(r){r&&w(e),n[16](null),l=!1,Pe(o)}}}function uT(n){let e,t,i,s,l,o=n[3].name+"",r,a,u,f,c=[],d=new Map,h,m,g,b=n[4];const y=T=>T[25];for(let T=0;TP($[T],1,1,()=>{$[T]=null});let M=!n[8]&&Gd(n);return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),f=v("div");for(let T=0;T({21:i}),({uniqueId:i})=>i?2097152:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&8&&(l.class="form-field form-field-file "+(i[3].required?"required":"")),s&8&&(l.name=i[3].name),s&136315391&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function cT(n,e,t){let i,s,l,{record:o}=e,{value:r=""}=e,{uploadedFiles:a=[]}=e,{deletedFileIndexes:u=[]}=e,{field:f=new dn}=e,c,d;function h(A){W.removeByValue(u,A),t(1,u)}function m(A){W.pushUnique(u,A),t(1,u)}function g(A){W.isEmpty(a[A])||a.splice(A,1),t(0,a)}function b(){d==null||d.dispatchEvent(new CustomEvent("change",{detail:{value:r,uploadedFiles:a,deletedFileIndexes:u},bubbles:!0}))}const y=A=>h(A),k=A=>m(A),$=A=>g(A);function C(A){le[A?"unshift":"push"](()=>{c=A,t(6,c)})}const M=()=>{for(let A of c.files)a.push(A);t(0,a),t(6,c.value=null,c)},T=()=>c==null?void 0:c.click();function D(A){le[A?"unshift":"push"](()=>{d=A,t(7,d)})}return n.$$set=A=>{"record"in A&&t(2,o=A.record),"value"in A&&t(12,r=A.value),"uploadedFiles"in A&&t(0,a=A.uploadedFiles),"deletedFileIndexes"in A&&t(1,u=A.deletedFileIndexes),"field"in A&&t(3,f=A.field)},n.$$.update=()=>{var A,I;n.$$.dirty&1&&(Array.isArray(a)||t(0,a=W.toArray(a))),n.$$.dirty&2&&(Array.isArray(u)||t(1,u=W.toArray(u))),n.$$.dirty&8&&t(5,i=((A=f.options)==null?void 0:A.maxSelect)>1),n.$$.dirty&4128&&W.isEmpty(r)&&t(12,r=i?[]:""),n.$$.dirty&4096&&t(4,s=W.toArray(r)),n.$$.dirty&27&&t(8,l=(s.length||a.length)&&((I=f.options)==null?void 0:I.maxSelect)<=s.length+a.length-u.length),n.$$.dirty&3&&(a!==-1||u!==-1)&&b()},[a,u,o,f,s,i,c,d,l,h,m,g,r,y,k,$,C,M,T,D]}class dT extends ke{constructor(e){super(),ye(this,e,cT,fT,be,{record:2,value:12,uploadedFiles:0,deletedFileIndexes:1,field:3})}}function Xd(n){let e,t;return{c(){e=v("small"),t=B(n[1]),p(e,"class","block txt-hint txt-ellipsis")},m(i,s){S(i,e,s),_(e,t)},p(i,s){s&2&&re(t,i[1])},d(i){i&&w(e)}}}function pT(n){let e,t,i,s,l,o=n[0].id+"",r,a,u,f,c=n[1]!==""&&n[1]!==n[0].id&&Xd(n);return{c(){e=v("i"),i=O(),s=v("div"),l=v("div"),r=B(o),a=O(),c&&c.c(),p(e,"class","ri-information-line link-hint"),p(l,"class","block txt-ellipsis"),p(s,"class","content svelte-1gjwqyd")},m(d,h){S(d,e,h),S(d,i,h),S(d,s,h),_(s,l),_(l,r),_(s,a),c&&c.m(s,null),u||(f=Ee(t=Ue.call(null,e,{text:JSON.stringify(n[0],null,2),position:"left",class:"code"})),u=!0)},p(d,[h]){t&&Jt(t.update)&&h&1&&t.update.call(null,{text:JSON.stringify(d[0],null,2),position:"left",class:"code"}),h&1&&o!==(o=d[0].id+"")&&re(r,o),d[1]!==""&&d[1]!==d[0].id?c?c.p(d,h):(c=Xd(d),c.c(),c.m(s,null)):c&&(c.d(1),c=null)},i:ee,o:ee,d(d){d&&w(e),d&&w(i),d&&w(s),c&&c.d(),u=!1,f()}}}function hT(n,e,t){let i;const s=["id","created","updated","collectionId","collectionName"];let{item:l={}}=e;function o(r){r=r||{};const a=["title","name","email","username","label","key","heading","content","description",...Object.keys(r)];for(const u of a)if(typeof r[u]=="string"&&!W.isEmpty(r[u])&&!s.includes(u))return u+": "+r[u];return""}return n.$$set=r=>{"item"in r&&t(0,l=r.item)},n.$$.update=()=>{n.$$.dirty&1&&t(1,i=o(l))},[l,i]}class mT extends ke{constructor(e){super(),ye(this,e,hT,pT,be,{item:0})}}function Qd(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='New record',p(e,"type","button"),p(e,"class","btn btn-warning btn-block btn-sm m-t-5")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[17]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function xd(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Load more',p(e,"type","button"),p(e,"class","btn btn-block btn-sm m-t-5"),ne(e,"btn-loading",n[6]),ne(e,"btn-disabled",n[6])},m(s,l){S(s,e,l),t||(i=K(e,"click",Yn(n[18])),t=!0)},p(s,l){l&64&&ne(e,"btn-loading",s[6]),l&64&&ne(e,"btn-disabled",s[6])},d(s){s&&w(e),t=!1,i()}}}function gT(n){let e,t,i=!n[7]&&n[8]&&Qd(n),s=n[10]&&xd(n);return{c(){i&&i.c(),e=O(),s&&s.c(),t=Ae()},m(l,o){i&&i.m(l,o),S(l,e,o),s&&s.m(l,o),S(l,t,o)},p(l,o){!l[7]&&l[8]?i?i.p(l,o):(i=Qd(l),i.c(),i.m(e.parentNode,e)):i&&(i.d(1),i=null),l[10]?s?s.p(l,o):(s=xd(l),s.c(),s.m(t.parentNode,t)):s&&(s.d(1),s=null)},d(l){i&&i.d(l),l&&w(e),s&&s.d(l),l&&w(t)}}}function _T(n){let e,t,i,s,l,o;const r=[{selectPlaceholder:n[11]?"Loading...":n[3]},{items:n[5]},{searchable:n[5].length>5},{selectionKey:"id"},{labelComponent:n[4]},{disabled:n[11]},{optionComponent:n[4]},{multiple:n[2]},{class:"records-select block-options"},n[13]];function a(d){n[19](d)}function u(d){n[20](d)}let f={$$slots:{afterOptions:[gT]},$$scope:{ctx:n}};for(let d=0;d_e(e,"keyOfSelected",a)),le.push(()=>_e(e,"selected",u)),e.$on("show",n[21]),e.$on("hide",n[22]);let c={collection:n[8]};return l=new z_({props:c}),n[23](l),l.$on("save",n[24]),{c(){j(e.$$.fragment),s=O(),j(l.$$.fragment)},m(d,h){R(e,d,h),S(d,s,h),R(l,d,h),o=!0},p(d,[h]){const m=h&10300?Zt(r,[h&2056&&{selectPlaceholder:d[11]?"Loading...":d[3]},h&32&&{items:d[5]},h&32&&{searchable:d[5].length>5},r[3],h&16&&{labelComponent:d[4]},h&2048&&{disabled:d[11]},h&16&&{optionComponent:d[4]},h&4&&{multiple:d[2]},r[8],h&8192&&Kn(d[13])]):{};h&536872896&&(m.$$scope={dirty:h,ctx:d}),!t&&h&2&&(t=!0,m.keyOfSelected=d[1],ve(()=>t=!1)),!i&&h&1&&(i=!0,m.selected=d[0],ve(()=>i=!1)),e.$set(m);const g={};h&256&&(g.collection=d[8]),l.$set(g)},i(d){o||(E(e.$$.fragment,d),E(l.$$.fragment,d),o=!0)},o(d){P(e.$$.fragment,d),P(l.$$.fragment,d),o=!1},d(d){H(e,d),d&&w(s),n[23](null),H(l,d)}}}function bT(n,e,t){let i,s;const l=["multiple","selected","keyOfSelected","selectPlaceholder","optionComponent","collectionId"];let o=wt(e,l);const r="select_"+W.randomString(5);let{multiple:a=!1}=e,{selected:u=[]}=e,{keyOfSelected:f=a?[]:void 0}=e,{selectPlaceholder:c="- Select -"}=e,{optionComponent:d=mT}=e,{collectionId:h}=e,m=[],g=1,b=0,y=!1,k=!1,$=!1,C=null,M;async function T(){if(!h){t(8,C=null),t(7,$=!1);return}t(7,$=!0);try{t(8,C=await de.collections.getOne(h,{$cancelKey:"collection_"+r}))}catch(Q){de.errorResponseHandler(Q)}t(7,$=!1)}async function D(){const Q=W.toArray(f);if(!h||!Q.length)return;t(16,k=!0);let X=[];const Y=Q.slice(),x=[];for(;Y.length>0;){const U=[];for(const ae of Y.splice(0,50))U.push(`id="${ae}"`);x.push(de.collection(h).getFullList(200,{filter:U.join("||"),$autoCancel:!1}))}try{await Promise.all(x).then(U=>{X=X.concat(...U)}),t(0,u=[]);for(const U of Q){const ae=W.findByKey(X,"id",U);ae&&u.push(ae)}t(5,m=W.filterDuplicatesByKey(u.concat(m)))}catch(U){de.errorResponseHandler(U)}t(16,k=!1)}async function A(Q=!1){if(!!h){t(6,y=!0);try{const X=Q?1:g+1,Y=await de.collection(h).getList(X,200,{sort:"-created",$cancelKey:r+"loadList"});Q&&t(5,m=W.toArray(u).slice()),t(5,m=W.filterDuplicatesByKey(m.concat(Y.items,W.toArray(u)))),g=Y.page,t(15,b=Y.totalItems)}catch(X){de.errorResponseHandler(X)}t(6,y=!1)}}const I=()=>M==null?void 0:M.show(),L=()=>A();function F(Q){f=Q,t(1,f)}function q(Q){u=Q,t(0,u)}function z(Q){Ve.call(this,n,Q)}function J(Q){Ve.call(this,n,Q)}function G(Q){le[Q?"unshift":"push"](()=>{M=Q,t(9,M)})}const ie=Q=>{var X;(X=Q==null?void 0:Q.detail)!=null&&X.id&&t(1,f=W.toArray(f).concat(Q.detail.id)),A(!0)};return n.$$set=Q=>{e=Ke(Ke({},e),Wn(Q)),t(13,o=wt(e,l)),"multiple"in Q&&t(2,a=Q.multiple),"selected"in Q&&t(0,u=Q.selected),"keyOfSelected"in Q&&t(1,f=Q.keyOfSelected),"selectPlaceholder"in Q&&t(3,c=Q.selectPlaceholder),"optionComponent"in Q&&t(4,d=Q.optionComponent),"collectionId"in Q&&t(14,h=Q.collectionId)},n.$$.update=()=>{n.$$.dirty&16384&&h&&(T(),D().then(()=>{A(!0)})),n.$$.dirty&65600&&t(11,i=y||k),n.$$.dirty&32800&&t(10,s=b>m.length)},[u,f,a,c,d,m,y,$,C,M,s,i,A,o,h,b,k,I,L,F,q,z,J,G,ie]}class vT extends ke{constructor(e){super(),ye(this,e,bT,_T,be,{multiple:2,selected:0,keyOfSelected:1,selectPlaceholder:3,optionComponent:4,collectionId:14})}}function ep(n){let e,t,i=n[1].options.maxSelect+"",s,l;return{c(){e=v("div"),t=B("Select up to "),s=B(i),l=B(" items."),p(e,"class","help-block")},m(o,r){S(o,e,r),_(e,t),_(e,s),_(e,l)},p(o,r){r&2&&i!==(i=o[1].options.maxSelect+"")&&re(s,i)},d(o){o&&w(e)}}}function yT(n){var k,$;let e,t,i,s,l,o=n[1].name+"",r,a,u,f,c,d,h,m;function g(C){n[3](C)}let b={toggle:!0,id:n[4],multiple:n[2],collectionId:(k=n[1].options)==null?void 0:k.collectionId};n[0]!==void 0&&(b.keyOfSelected=n[0]),f=new vT({props:b}),le.push(()=>_e(f,"keyOfSelected",g));let y=(($=n[1].options)==null?void 0:$.maxSelect)>1&&ep(n);return{c(){e=v("label"),t=v("i"),s=O(),l=v("span"),r=B(o),u=O(),j(f.$$.fragment),d=O(),y&&y.c(),h=Ae(),p(t,"class",i=W.getFieldTypeIcon(n[1].type)),p(l,"class","txt"),p(e,"for",a=n[4])},m(C,M){S(C,e,M),_(e,t),_(e,s),_(e,l),_(l,r),S(C,u,M),R(f,C,M),S(C,d,M),y&&y.m(C,M),S(C,h,M),m=!0},p(C,M){var D,A;(!m||M&2&&i!==(i=W.getFieldTypeIcon(C[1].type)))&&p(t,"class",i),(!m||M&2)&&o!==(o=C[1].name+"")&&re(r,o),(!m||M&16&&a!==(a=C[4]))&&p(e,"for",a);const T={};M&16&&(T.id=C[4]),M&4&&(T.multiple=C[2]),M&2&&(T.collectionId=(D=C[1].options)==null?void 0:D.collectionId),!c&&M&1&&(c=!0,T.keyOfSelected=C[0],ve(()=>c=!1)),f.$set(T),((A=C[1].options)==null?void 0:A.maxSelect)>1?y?y.p(C,M):(y=ep(C),y.c(),y.m(h.parentNode,h)):y&&(y.d(1),y=null)},i(C){m||(E(f.$$.fragment,C),m=!0)},o(C){P(f.$$.fragment,C),m=!1},d(C){C&&w(e),C&&w(u),H(f,C),C&&w(d),y&&y.d(C),C&&w(h)}}}function kT(n){let e,t;return e=new ge({props:{class:"form-field "+(n[1].required?"required":""),name:n[1].name,$$slots:{default:[yT,({uniqueId:i})=>({4:i}),({uniqueId:i})=>i?16:0]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&2&&(l.class="form-field "+(i[1].required?"required":"")),s&2&&(l.name=i[1].name),s&55&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function wT(n,e,t){let i,{field:s=new dn}=e,{value:l=void 0}=e;function o(r){l=r,t(0,l),t(2,i),t(1,s)}return n.$$set=r=>{"field"in r&&t(1,s=r.field),"value"in r&&t(0,l=r.value)},n.$$.update=()=>{var r,a;n.$$.dirty&2&&t(2,i=((r=s.options)==null?void 0:r.maxSelect)!=1),n.$$.dirty&7&&i&&Array.isArray(l)&&((a=s.options)==null?void 0:a.maxSelect)&&l.length>s.options.maxSelect&&t(0,l=l.slice(s.options.maxSelect-1))},[l,s,i,o]}class ST extends ke{constructor(e){super(),ye(this,e,wT,kT,be,{field:1,value:0})}}function $T(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Auth URL"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","url"),p(l,"id",o=n[5])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].authUrl),r||(a=K(l,"input",n[2]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&ce(l,u[0].authUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function CT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Token URL"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].tokenUrl),r||(a=K(l,"input",n[3]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&l.value!==u[0].tokenUrl&&ce(l,u[0].tokenUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function TT(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("User API URL"),s=O(),l=v("input"),p(e,"for",i=n[5]),p(l,"type","text"),p(l,"id",o=n[5])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].userApiUrl),r||(a=K(l,"input",n[4]),r=!0)},p(u,f){f&32&&i!==(i=u[5])&&p(e,"for",i),f&32&&o!==(o=u[5])&&p(l,"id",o),f&1&&l.value!==u[0].userApiUrl&&ce(l,u[0].userApiUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function MT(n){let e,t,i,s,l,o,r,a,u,f,c,d;return l=new ge({props:{class:"form-field",name:n[1]+".authUrl",$$slots:{default:[$T,({uniqueId:h})=>({5:h}),({uniqueId:h})=>h?32:0]},$$scope:{ctx:n}}}),a=new ge({props:{class:"form-field",name:n[1]+".tokenUrl",$$slots:{default:[CT,({uniqueId:h})=>({5:h}),({uniqueId:h})=>h?32:0]},$$scope:{ctx:n}}}),c=new ge({props:{class:"form-field",name:n[1]+".userApiUrl",$$slots:{default:[TT,({uniqueId:h})=>({5:h}),({uniqueId:h})=>h?32:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Selfhosted endpoints (optional)",t=O(),i=v("div"),s=v("div"),j(l.$$.fragment),o=O(),r=v("div"),j(a.$$.fragment),u=O(),f=v("div"),j(c.$$.fragment),p(e,"class","section-title"),p(s,"class","col-lg-4"),p(r,"class","col-lg-4"),p(f,"class","col-lg-4"),p(i,"class","grid")},m(h,m){S(h,e,m),S(h,t,m),S(h,i,m),_(i,s),R(l,s,null),_(i,o),_(i,r),R(a,r,null),_(i,u),_(i,f),R(c,f,null),d=!0},p(h,[m]){const g={};m&2&&(g.name=h[1]+".authUrl"),m&97&&(g.$$scope={dirty:m,ctx:h}),l.$set(g);const b={};m&2&&(b.name=h[1]+".tokenUrl"),m&97&&(b.$$scope={dirty:m,ctx:h}),a.$set(b);const y={};m&2&&(y.name=h[1]+".userApiUrl"),m&97&&(y.$$scope={dirty:m,ctx:h}),c.$set(y)},i(h){d||(E(l.$$.fragment,h),E(a.$$.fragment,h),E(c.$$.fragment,h),d=!0)},o(h){P(l.$$.fragment,h),P(a.$$.fragment,h),P(c.$$.fragment,h),d=!1},d(h){h&&w(e),h&&w(t),h&&w(i),H(l),H(a),H(c)}}}function OT(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}function r(){s.userApiUrl=this.value,t(0,s)}return n.$$set=a=>{"key"in a&&t(1,i=a.key),"config"in a&&t(0,s=a.config)},[s,i,l,o,r]}class DT extends ke{constructor(e){super(),ye(this,e,OT,MT,be,{key:1,config:0})}}function AT(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Auth URL"),s=O(),l=v("input"),r=O(),a=v("div"),a.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/authorize",p(e,"for",i=n[4]),p(l,"type","url"),p(l,"id",o=n[4]),l.required=!0,p(l,"placeholder","https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/authorize"),p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),ce(l,n[0].authUrl),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[2]),u=!0)},p(c,d){d&16&&i!==(i=c[4])&&p(e,"for",i),d&16&&o!==(o=c[4])&&p(l,"id",o),d&1&&ce(l,c[0].authUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function ET(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=B("Token URL"),s=O(),l=v("input"),r=O(),a=v("div"),a.textContent="Eg. https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/token",p(e,"for",i=n[4]),p(l,"type","text"),p(l,"id",o=n[4]),l.required=!0,p(l,"placeholder","https://login.microsoftonline.com/YOUR_DIRECTORY_TENANT_ID/oauth2/v2.0/token"),p(a,"class","help-block")},m(c,d){S(c,e,d),_(e,t),S(c,s,d),S(c,l,d),ce(l,n[0].tokenUrl),S(c,r,d),S(c,a,d),u||(f=K(l,"input",n[3]),u=!0)},p(c,d){d&16&&i!==(i=c[4])&&p(e,"for",i),d&16&&o!==(o=c[4])&&p(l,"id",o),d&1&&l.value!==c[0].tokenUrl&&ce(l,c[0].tokenUrl)},d(c){c&&w(e),c&&w(s),c&&w(l),c&&w(r),c&&w(a),u=!1,f()}}}function IT(n){let e,t,i,s,l,o,r,a,u;return l=new ge({props:{class:"form-field required",name:n[1]+".authUrl",$$slots:{default:[AT,({uniqueId:f})=>({4:f}),({uniqueId:f})=>f?16:0]},$$scope:{ctx:n}}}),a=new ge({props:{class:"form-field required",name:n[1]+".tokenUrl",$$slots:{default:[ET,({uniqueId:f})=>({4:f}),({uniqueId:f})=>f?16:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),e.textContent="Azure AD endpoints",t=O(),i=v("div"),s=v("div"),j(l.$$.fragment),o=O(),r=v("div"),j(a.$$.fragment),p(e,"class","section-title"),p(s,"class","col-lg-12"),p(r,"class","col-lg-12"),p(i,"class","grid")},m(f,c){S(f,e,c),S(f,t,c),S(f,i,c),_(i,s),R(l,s,null),_(i,o),_(i,r),R(a,r,null),u=!0},p(f,[c]){const d={};c&2&&(d.name=f[1]+".authUrl"),c&49&&(d.$$scope={dirty:c,ctx:f}),l.$set(d);const h={};c&2&&(h.name=f[1]+".tokenUrl"),c&49&&(h.$$scope={dirty:c,ctx:f}),a.$set(h)},i(f){u||(E(l.$$.fragment,f),E(a.$$.fragment,f),u=!0)},o(f){P(l.$$.fragment,f),P(a.$$.fragment,f),u=!1},d(f){f&&w(e),f&&w(t),f&&w(i),H(l),H(a)}}}function PT(n,e,t){let{key:i=""}=e,{config:s={}}=e;function l(){s.authUrl=this.value,t(0,s)}function o(){s.tokenUrl=this.value,t(0,s)}return n.$$set=r=>{"key"in r&&t(1,i=r.key),"config"in r&&t(0,s=r.config)},[s,i,l,o]}class LT extends ke{constructor(e){super(),ye(this,e,PT,IT,be,{key:1,config:0})}}const vl={googleAuth:{title:"Google",icon:"ri-google-fill"},facebookAuth:{title:"Facebook",icon:"ri-facebook-fill"},twitterAuth:{title:"Twitter",icon:"ri-twitter-fill"},githubAuth:{title:"GitHub",icon:"ri-github-fill"},gitlabAuth:{title:"GitLab",icon:"ri-gitlab-fill",optionsComponent:DT},discordAuth:{title:"Discord",icon:"ri-discord-fill"},microsoftAuth:{title:"Microsoft",icon:"ri-microsoft-fill",optionsComponent:LT},spotifyAuth:{title:"Spotify",icon:"ri-spotify-fill"},kakaoAuth:{title:"Kakao",icon:"ri-kakao-talk-fill"},twitchAuth:{title:"Twitch",icon:"ri-twitch-fill"},stravaAuth:{title:"Strava",icon:"ri-riding-fill"},giteeAuth:{title:"Gitee",icon:"ri-git-repository-fill"}};function tp(n,e,t){const i=n.slice();return i[9]=e[t],i}function NT(n){let e;return{c(){e=v("p"),e.textContent="No linked OAuth2 providers.",p(e,"class","txt-hint txt-center")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function FT(n){let e,t=n[1],i=[];for(let s=0;s',p(e,"class","block txt-center")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function np(n){let e,t,i,s,l,o=n[3](n[9].provider)+"",r,a,u,f,c=n[9].providerId+"",d,h,m,g,b,y;function k(){return n[6](n[9])}return{c(){e=v("div"),t=v("i"),s=O(),l=v("span"),r=B(o),a=O(),u=v("div"),f=B("ID: "),d=B(c),h=O(),m=v("button"),m.innerHTML='',g=O(),p(t,"class",i=n[4](n[9].provider)),p(l,"class","txt"),p(u,"class","txt-hint"),p(m,"type","button"),p(m,"class","btn btn-secondary link-hint btn-circle btn-sm m-l-auto"),p(e,"class","list-item")},m($,C){S($,e,C),_(e,t),_(e,s),_(e,l),_(l,r),_(e,a),_(e,u),_(u,f),_(u,d),_(e,h),_(e,m),_(e,g),b||(y=K(m,"click",k),b=!0)},p($,C){n=$,C&2&&i!==(i=n[4](n[9].provider))&&p(t,"class",i),C&2&&o!==(o=n[3](n[9].provider)+"")&&re(r,o),C&2&&c!==(c=n[9].providerId+"")&&re(d,c)},d($){$&&w(e),b=!1,y()}}}function HT(n){let e;function t(l,o){var r;return l[2]?RT:((r=l[0])==null?void 0:r.id)&&l[1].length?FT:NT}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:ee,o:ee,d(l){s.d(l),l&&w(e)}}}function jT(n,e,t){const i=It();let{record:s}=e,l=[],o=!1;function r(d){var h;return((h=vl[d+"Auth"])==null?void 0:h.title)||W.sentenize(d,!1)}function a(d){var h;return((h=vl[d+"Auth"])==null?void 0:h.icon)||`ri-${d}-line`}async function u(){if(!(s!=null&&s.id)){t(1,l=[]),t(2,o=!1);return}t(2,o=!0);try{t(1,l=await de.collection(s.collectionId).listExternalAuths(s.id))}catch(d){de.errorResponseHandler(d)}t(2,o=!1)}function f(d){!(s!=null&&s.id)||!d||wn(`Do you really want to unlink the ${r(d)} provider?`,()=>de.collection(s.collectionId).unlinkExternalAuth(s.id,d).then(()=>{Lt(`Successfully unlinked the ${r(d)} provider.`),i("unlink",d),u()}).catch(h=>{de.errorResponseHandler(h)}))}u();const c=d=>f(d.provider);return n.$$set=d=>{"record"in d&&t(0,s=d.record)},[s,l,o,r,a,f,c]}class qT extends ke{constructor(e){super(),ye(this,e,jT,HT,be,{record:0})}}function ip(n,e,t){const i=n.slice();return i[46]=e[t],i[47]=e,i[48]=t,i}function sp(n){let e,t;return e=new ge({props:{class:"form-field disabled",name:"id",$$slots:{default:[VT,({uniqueId:i})=>({49:i}),({uniqueId:i})=>[0,i?262144:0]]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s[0]&4|s[1]&786432&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function VT(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,b,y;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="id",l=O(),o=v("span"),a=O(),u=v("div"),f=v("i"),d=O(),h=v("input"),p(t,"class",W.getFieldTypeIcon("primary")),p(s,"class","txt"),p(o,"class","flex-fill"),p(e,"for",r=n[49]),p(f,"class","ri-calendar-event-line txt-disabled"),p(u,"class","form-field-addon"),p(h,"type","text"),p(h,"id",m=n[49]),h.value=g=n[2].id,h.readOnly=!0},m(k,$){S(k,e,$),_(e,t),_(e,i),_(e,s),_(e,l),_(e,o),S(k,a,$),S(k,u,$),_(u,f),S(k,d,$),S(k,h,$),b||(y=Ee(c=Ue.call(null,f,{text:`Created: ${n[2].created} +Updated: ${n[2].updated}`,position:"left"})),b=!0)},p(k,$){$[1]&262144&&r!==(r=k[49])&&p(e,"for",r),c&&Jt(c.update)&&$[0]&4&&c.update.call(null,{text:`Created: ${k[2].created} +Updated: ${k[2].updated}`,position:"left"}),$[1]&262144&&m!==(m=k[49])&&p(h,"id",m),$[0]&4&&g!==(g=k[2].id)&&h.value!==g&&(h.value=g)},d(k){k&&w(e),k&&w(a),k&&w(u),k&&w(d),k&&w(h),b=!1,y()}}}function lp(n){var u,f;let e,t,i,s,l;function o(c){n[26](c)}let r={collection:n[0]};n[2]!==void 0&&(r.record=n[2]),e=new f4({props:r}),le.push(()=>_e(e,"record",o));let a=((f=(u=n[0])==null?void 0:u.schema)==null?void 0:f.length)&&op();return{c(){j(e.$$.fragment),i=O(),a&&a.c(),s=Ae()},m(c,d){R(e,c,d),S(c,i,d),a&&a.m(c,d),S(c,s,d),l=!0},p(c,d){var m,g;const h={};d[0]&1&&(h.collection=c[0]),!t&&d[0]&4&&(t=!0,h.record=c[2],ve(()=>t=!1)),e.$set(h),(g=(m=c[0])==null?void 0:m.schema)!=null&&g.length?a||(a=op(),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null)},i(c){l||(E(e.$$.fragment,c),l=!0)},o(c){P(e.$$.fragment,c),l=!1},d(c){H(e,c),c&&w(i),a&&a.d(c),c&&w(s)}}}function op(n){let e;return{c(){e=v("hr")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function zT(n){let e,t,i;function s(o){n[38](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new ST({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function BT(n){let e,t,i,s,l;function o(f){n[35](f,n[46])}function r(f){n[36](f,n[46])}function a(f){n[37](f,n[46])}let u={field:n[46],record:n[2]};return n[2][n[46].name]!==void 0&&(u.value=n[2][n[46].name]),n[3][n[46].name]!==void 0&&(u.uploadedFiles=n[3][n[46].name]),n[4][n[46].name]!==void 0&&(u.deletedFileIndexes=n[4][n[46].name]),e=new dT({props:u}),le.push(()=>_e(e,"value",o)),le.push(()=>_e(e,"uploadedFiles",r)),le.push(()=>_e(e,"deletedFileIndexes",a)),{c(){j(e.$$.fragment)},m(f,c){R(e,f,c),l=!0},p(f,c){n=f;const d={};c[0]&1&&(d.field=n[46]),c[0]&4&&(d.record=n[2]),!t&&c[0]&5&&(t=!0,d.value=n[2][n[46].name],ve(()=>t=!1)),!i&&c[0]&9&&(i=!0,d.uploadedFiles=n[3][n[46].name],ve(()=>i=!1)),!s&&c[0]&17&&(s=!0,d.deletedFileIndexes=n[4][n[46].name],ve(()=>s=!1)),e.$set(d)},i(f){l||(E(e.$$.fragment,f),l=!0)},o(f){P(e.$$.fragment,f),l=!1},d(f){H(e,f)}}}function UT(n){let e,t,i;function s(o){n[34](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new W4({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function WT(n){let e,t,i;function s(o){n[33](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new V4({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function YT(n){let e,t,i;function s(o){n[32](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new R4({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function KT(n){let e,t,i;function s(o){n[31](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new P4({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function JT(n){let e,t,i;function s(o){n[30](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new D4({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function ZT(n){let e,t,i;function s(o){n[29](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new C4({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function GT(n){let e,t,i;function s(o){n[28](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new k4({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function XT(n){let e,t,i;function s(o){n[27](o,n[46])}let l={field:n[46]};return n[2][n[46].name]!==void 0&&(l.value=n[2][n[46].name]),e=new _4({props:l}),le.push(()=>_e(e,"value",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){n=o;const a={};r[0]&1&&(a.field=n[46]),!t&&r[0]&5&&(t=!0,a.value=n[2][n[46].name],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function rp(n,e){let t,i,s,l,o;const r=[XT,GT,ZT,JT,KT,YT,WT,UT,BT,zT],a=[];function u(f,c){return f[46].type==="text"?0:f[46].type==="number"?1:f[46].type==="bool"?2:f[46].type==="email"?3:f[46].type==="url"?4:f[46].type==="date"?5:f[46].type==="select"?6:f[46].type==="json"?7:f[46].type==="file"?8:f[46].type==="relation"?9:-1}return~(i=u(e))&&(s=a[i]=r[i](e)),{key:n,first:null,c(){t=Ae(),s&&s.c(),l=Ae(),this.first=t},m(f,c){S(f,t,c),~i&&a[i].m(f,c),S(f,l,c),o=!0},p(f,c){e=f;let d=i;i=u(e),i===d?~i&&a[i].p(e,c):(s&&(pe(),P(a[d],1,1,()=>{a[d]=null}),he()),~i?(s=a[i],s?s.p(e,c):(s=a[i]=r[i](e),s.c()),E(s,1),s.m(l.parentNode,l)):s=null)},i(f){o||(E(s),o=!0)},o(f){P(s),o=!1},d(f){f&&w(t),~i&&a[i].d(f),f&&w(l)}}}function ap(n){let e,t,i;return t=new qT({props:{record:n[2]}}),{c(){e=v("div"),j(t.$$.fragment),p(e,"class","tab-item"),ne(e,"active",n[10]===yl)},m(s,l){S(s,e,l),R(t,e,null),i=!0},p(s,l){const o={};l[0]&4&&(o.record=s[2]),t.$set(o),(!i||l[0]&1024)&&ne(e,"active",s[10]===yl)},i(s){i||(E(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),H(t)}}}function QT(n){var b,y;let e,t,i,s,l=[],o=new Map,r,a,u,f,c=!n[2].isNew&&sp(n),d=((b=n[0])==null?void 0:b.isAuth)&&lp(n),h=((y=n[0])==null?void 0:y.schema)||[];const m=k=>k[46].name;for(let k=0;k{c=null}),he()):c?(c.p(k,$),$[0]&4&&E(c,1)):(c=sp(k),c.c(),E(c,1),c.m(t,i)),(C=k[0])!=null&&C.isAuth?d?(d.p(k,$),$[0]&1&&E(d,1)):(d=lp(k),d.c(),E(d,1),d.m(t,s)):d&&(pe(),P(d,1,1,()=>{d=null}),he()),$[0]&29&&(h=((M=k[0])==null?void 0:M.schema)||[],pe(),l=bt(l,$,m,1,k,h,o,t,nn,rp,null,ip),he()),(!a||$[0]&1024)&&ne(t,"active",k[10]===Ui),k[0].isAuth&&!k[2].isNew?g?(g.p(k,$),$[0]&5&&E(g,1)):(g=ap(k),g.c(),E(g,1),g.m(e,null)):g&&(pe(),P(g,1,1,()=>{g=null}),he())},i(k){if(!a){E(c),E(d);for(let $=0;$ + Send verification email`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[21]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function cp(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` + Send password reset email`,p(e,"type","button"),p(e,"class","dropdown-item closable")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[22]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function xT(n){let e,t,i,s,l,o=n[0].isAuth&&!n[7].verified&&n[7].email&&fp(n),r=n[0].isAuth&&n[7].email&&cp(n);return{c(){o&&o.c(),e=O(),r&&r.c(),t=O(),i=v("button"),i.innerHTML=` + Delete`,p(i,"type","button"),p(i,"class","dropdown-item txt-danger closable")},m(a,u){o&&o.m(a,u),S(a,e,u),r&&r.m(a,u),S(a,t,u),S(a,i,u),s||(l=K(i,"click",Yn(ut(n[23]))),s=!0)},p(a,u){a[0].isAuth&&!a[7].verified&&a[7].email?o?o.p(a,u):(o=fp(a),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null),a[0].isAuth&&a[7].email?r?r.p(a,u):(r=cp(a),r.c(),r.m(t.parentNode,t)):r&&(r.d(1),r=null)},d(a){o&&o.d(a),a&&w(e),r&&r.d(a),a&&w(t),a&&w(i),s=!1,l()}}}function dp(n){let e,t,i,s,l,o;return{c(){e=v("div"),t=v("button"),t.textContent="Account",i=O(),s=v("button"),s.textContent="Authorized providers",p(t,"type","button"),p(t,"class","tab-item"),ne(t,"active",n[10]===Ui),p(s,"type","button"),p(s,"class","tab-item"),ne(s,"active",n[10]===yl),p(e,"class","tabs-header stretched")},m(r,a){S(r,e,a),_(e,t),_(e,i),_(e,s),l||(o=[K(t,"click",n[24]),K(s,"click",n[25])],l=!0)},p(r,a){a[0]&1024&&ne(t,"active",r[10]===Ui),a[0]&1024&&ne(s,"active",r[10]===yl)},d(r){r&&w(e),l=!1,Pe(o)}}}function eM(n){var g;let e,t=n[2].isNew?"New":"Edit",i,s,l,o=((g=n[0])==null?void 0:g.name)+"",r,a,u,f,c,d,h=!n[2].isNew&&up(n),m=n[0].isAuth&&!n[2].isNew&&dp(n);return{c(){e=v("h4"),i=B(t),s=O(),l=v("strong"),r=B(o),a=B(" record"),u=O(),h&&h.c(),f=O(),m&&m.c(),c=Ae()},m(b,y){S(b,e,y),_(e,i),_(e,s),_(e,l),_(l,r),_(e,a),S(b,u,y),h&&h.m(b,y),S(b,f,y),m&&m.m(b,y),S(b,c,y),d=!0},p(b,y){var k;(!d||y[0]&4)&&t!==(t=b[2].isNew?"New":"Edit")&&re(i,t),(!d||y[0]&1)&&o!==(o=((k=b[0])==null?void 0:k.name)+"")&&re(r,o),b[2].isNew?h&&(pe(),P(h,1,1,()=>{h=null}),he()):h?(h.p(b,y),y[0]&4&&E(h,1)):(h=up(b),h.c(),E(h,1),h.m(f.parentNode,f)),b[0].isAuth&&!b[2].isNew?m?m.p(b,y):(m=dp(b),m.c(),m.m(c.parentNode,c)):m&&(m.d(1),m=null)},i(b){d||(E(h),d=!0)},o(b){P(h),d=!1},d(b){b&&w(e),b&&w(u),h&&h.d(b),b&&w(f),m&&m.d(b),b&&w(c)}}}function tM(n){let e,t,i,s,l,o=n[2].isNew?"Create":"Save changes",r,a,u,f;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=O(),s=v("button"),l=v("span"),r=B(o),p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[8],p(l,"class","txt"),p(s,"type","submit"),p(s,"form",n[12]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[11]||n[8],ne(s,"btn-loading",n[8])},m(c,d){S(c,e,d),_(e,t),S(c,i,d),S(c,s,d),_(s,l),_(l,r),u||(f=K(e,"click",n[20]),u=!0)},p(c,d){d[0]&256&&(e.disabled=c[8]),d[0]&4&&o!==(o=c[2].isNew?"Create":"Save changes")&&re(r,o),d[0]&2304&&a!==(a=!c[11]||c[8])&&(s.disabled=a),d[0]&256&&ne(s,"btn-loading",c[8])},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,f()}}}function nM(n){var s;let e,t,i={class:"overlay-panel-lg record-panel "+(((s=n[0])==null?void 0:s.isAuth)&&!n[2].isNew?"colored-header":""),beforeHide:n[39],$$slots:{footer:[tM],header:[eM],default:[QT]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[40](e),e.$on("hide",n[41]),e.$on("show",n[42]),{c(){j(e.$$.fragment)},m(l,o){R(e,l,o),t=!0},p(l,o){var a;const r={};o[0]&5&&(r.class="overlay-panel-lg record-panel "+(((a=l[0])==null?void 0:a.isAuth)&&!l[2].isNew?"colored-header":"")),o[0]&544&&(r.beforeHide=l[39]),o[0]&3485|o[1]&524288&&(r.$$scope={dirty:o,ctx:l}),e.$set(r)},i(l){t||(E(e.$$.fragment,l),t=!0)},o(l){P(e.$$.fragment,l),t=!1},d(l){n[40](null),H(e,l)}}}const Ui="form",yl="providers";function pp(n){return JSON.stringify(n)}function iM(n,e,t){let i,s,l;const o=It(),r="record_"+W.randomString(5);let{collection:a}=e,u,f=null,c=new Wi,d=!1,h=!1,m={},g={},b="",y=Ui;function k(fe){return C(fe),t(9,h=!0),t(10,y=Ui),u==null?void 0:u.show()}function $(){return u==null?void 0:u.hide()}async function C(fe){Fn({}),t(7,f=fe||{}),fe!=null&&fe.clone?t(2,c=fe.clone()):t(2,c=new Wi),t(3,m={}),t(4,g={}),await Tn(),t(18,b=pp(c))}function M(){if(d||!l||!(a!=null&&a.id))return;t(8,d=!0);const fe=D();let Z;c.isNew?Z=de.collection(a.id).create(fe):Z=de.collection(a.id).update(c.id,fe),Z.then(Ce=>{Lt(c.isNew?"Successfully created record.":"Successfully updated record."),t(9,h=!1),$(),o("save",Ce)}).catch(Ce=>{de.errorResponseHandler(Ce)}).finally(()=>{t(8,d=!1)})}function T(){!(f!=null&&f.id)||wn("Do you really want to delete the selected record?",()=>de.collection(f.collectionId).delete(f.id).then(()=>{$(),Lt("Successfully deleted record."),o("delete",f)}).catch(fe=>{de.errorResponseHandler(fe)}))}function D(){const fe=(c==null?void 0:c.export())||{},Z=new FormData,Ce={};for(const Be of(a==null?void 0:a.schema)||[])Ce[Be.name]=!0;a!=null&&a.isAuth&&(Ce.username=!0,Ce.email=!0,Ce.emailVisibility=!0,Ce.password=!0,Ce.passwordConfirm=!0,Ce.verified=!0);for(const Be in fe)!Ce[Be]||(typeof fe[Be]>"u"&&(fe[Be]=null),W.addValueToFormData(Z,Be,fe[Be]));for(const Be in m){const Vt=W.toArray(m[Be]);for(const Gt of Vt)Z.append(Be,Gt)}for(const Be in g){const Vt=W.toArray(g[Be]);for(const Gt of Vt)Z.append(Be+"."+Gt,"")}return Z}function A(){!(a!=null&&a.id)||!(f!=null&&f.email)||wn(`Do you really want to sent verification email to ${f.email}?`,()=>de.collection(a.id).requestVerification(f.email).then(()=>{Lt(`Successfully sent verification email to ${f.email}.`)}).catch(fe=>{de.errorResponseHandler(fe)}))}function I(){!(a!=null&&a.id)||!(f!=null&&f.email)||wn(`Do you really want to sent password reset email to ${f.email}?`,()=>de.collection(a.id).requestPasswordReset(f.email).then(()=>{Lt(`Successfully sent password reset email to ${f.email}.`)}).catch(fe=>{de.errorResponseHandler(fe)}))}const L=()=>$(),F=()=>A(),q=()=>I(),z=()=>T(),J=()=>t(10,y=Ui),G=()=>t(10,y=yl);function ie(fe){c=fe,t(2,c)}function Q(fe,Z){n.$$.not_equal(c[Z.name],fe)&&(c[Z.name]=fe,t(2,c))}function X(fe,Z){n.$$.not_equal(c[Z.name],fe)&&(c[Z.name]=fe,t(2,c))}function Y(fe,Z){n.$$.not_equal(c[Z.name],fe)&&(c[Z.name]=fe,t(2,c))}function x(fe,Z){n.$$.not_equal(c[Z.name],fe)&&(c[Z.name]=fe,t(2,c))}function U(fe,Z){n.$$.not_equal(c[Z.name],fe)&&(c[Z.name]=fe,t(2,c))}function ae(fe,Z){n.$$.not_equal(c[Z.name],fe)&&(c[Z.name]=fe,t(2,c))}function Re(fe,Z){n.$$.not_equal(c[Z.name],fe)&&(c[Z.name]=fe,t(2,c))}function Ne(fe,Z){n.$$.not_equal(c[Z.name],fe)&&(c[Z.name]=fe,t(2,c))}function Le(fe,Z){n.$$.not_equal(c[Z.name],fe)&&(c[Z.name]=fe,t(2,c))}function Fe(fe,Z){n.$$.not_equal(m[Z.name],fe)&&(m[Z.name]=fe,t(3,m))}function me(fe,Z){n.$$.not_equal(g[Z.name],fe)&&(g[Z.name]=fe,t(4,g))}function Se(fe,Z){n.$$.not_equal(c[Z.name],fe)&&(c[Z.name]=fe,t(2,c))}const we=()=>s&&h?(wn("You have unsaved changes. Do you really want to close the panel?",()=>{t(9,h=!1),$()}),!1):(Fn({}),!0);function We(fe){le[fe?"unshift":"push"](()=>{u=fe,t(6,u)})}function ue(fe){Ve.call(this,n,fe)}function se(fe){Ve.call(this,n,fe)}return n.$$set=fe=>{"collection"in fe&&t(0,a=fe.collection)},n.$$.update=()=>{n.$$.dirty[0]&24&&t(19,i=W.hasNonEmptyProps(m)||W.hasNonEmptyProps(g)),n.$$.dirty[0]&786436&&t(5,s=i||b!=pp(c)),n.$$.dirty[0]&36&&t(11,l=c.isNew||s)},[a,$,c,m,g,s,u,f,d,h,y,l,r,M,T,A,I,k,b,i,L,F,q,z,J,G,ie,Q,X,Y,x,U,ae,Re,Ne,Le,Fe,me,Se,we,We,ue,se]}class z_ extends ke{constructor(e){super(),ye(this,e,iM,nM,be,{collection:0,show:17,hide:1},null,[-1,-1])}get show(){return this.$$.ctx[17]}get hide(){return this.$$.ctx[1]}}function sM(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt txt-hint")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function lM(n){let e,t;return{c(){e=v("span"),t=B(n[1]),p(e,"class","label txt-base txt-mono"),p(e,"title",n[0])},m(i,s){S(i,e,s),_(e,t)},p(i,s){s&2&&re(t,i[1]),s&1&&p(e,"title",i[0])},d(i){i&&w(e)}}}function oM(n){let e;function t(l,o){return l[0]?lM:sM}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:ee,o:ee,d(l){s.d(l),l&&w(e)}}}function rM(n,e,t){let{id:i=""}=e,s=i;return n.$$set=l=>{"id"in l&&t(0,i=l.id)},n.$$.update=()=>{n.$$.dirty&1&&typeof i=="string"&&i.length>27&&t(1,s=i.substring(0,5)+"..."+i.substring(i.length-10))},[i,s]}class Ga extends ke{constructor(e){super(),ye(this,e,rM,oM,be,{id:0})}}function hp(n,e,t){const i=n.slice();return i[7]=e[t],i[5]=t,i}function mp(n,e,t){const i=n.slice();return i[3]=e[t],i[5]=t,i}function gp(n,e,t){const i=n.slice();return i[3]=e[t],i[5]=t,i}function aM(n){let e,t=ms(n[0][n[1].name])+"",i,s;return{c(){e=v("span"),i=B(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=ms(n[0][n[1].name]))},m(l,o){S(l,e,o),_(e,i)},p(l,o){o&3&&t!==(t=ms(l[0][l[1].name])+"")&&re(i,t),o&3&&s!==(s=ms(l[0][l[1].name]))&&p(e,"title",s)},i:ee,o:ee,d(l){l&&w(e)}}}function uM(n){let e,t=[],i=new Map,s,l=W.toArray(n[0][n[1].name]);const o=r=>r[5]+r[7];for(let r=0;r20,o,r=W.toArray(n[0][n[1].name]).slice(0,20);const a=f=>f[5]+f[3];for(let f=0;f20),l?u||(u=vp(),u.c(),u.m(e,null)):u&&(u.d(1),u=null)},i(f){if(!o){for(let c=0;co[5]+o[3];for(let o=0;o{a[d]=null}),he(),s=a[i],s?s.p(f,c):(s=a[i]=r[i](f),s.c()),E(s,1),s.m(e,null)),(!o||c&2&&l!==(l="col-type-"+f[1].type+" col-field-"+f[1].name))&&p(e,"class",l)},i(f){o||(E(s),o=!0)},o(f){P(s),o=!1},d(f){f&&w(e),a[i].d()}}}function ms(n){return n=n||"",n.length>200?n.substring(0,200):n}function vM(n,e,t){let{record:i}=e,{field:s}=e;function l(o){Ve.call(this,n,o)}return n.$$set=o=>{"record"in o&&t(0,i=o.record),"field"in o&&t(1,s=o.field)},[i,s,l]}class yM extends ke{constructor(e){super(),ye(this,e,vM,bM,be,{record:0,field:1})}}function kp(n,e,t){const i=n.slice();return i[51]=e[t],i}function wp(n,e,t){const i=n.slice();return i[54]=e[t],i}function Sp(n,e,t){const i=n.slice();return i[54]=e[t],i}function $p(n,e,t){const i=n.slice();return i[47]=e[t],i}function kM(n){let e,t,i,s,l,o,r;return{c(){e=v("div"),t=v("input"),s=O(),l=v("label"),p(t,"type","checkbox"),p(t,"id","checkbox_0"),t.disabled=i=!n[4].length,t.checked=n[14],p(l,"for","checkbox_0"),p(e,"class","form-field")},m(a,u){S(a,e,u),_(e,t),_(e,s),_(e,l),o||(r=K(t,"change",n[26]),o=!0)},p(a,u){u[0]&16&&i!==(i=!a[4].length)&&(t.disabled=i),u[0]&16384&&(t.checked=a[14])},d(a){a&&w(e),o=!1,r()}}}function wM(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function Cp(n){let e,t,i;function s(o){n[27](o)}let l={class:"col-type-text col-field-id",name:"id",$$slots:{default:[SM]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Ft({props:l}),le.push(()=>_e(e,"sort",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[1]&268435456&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function SM(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="id",p(t,"class",W.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:ee,d(l){l&&w(e)}}}function Tp(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l,o=e&&Mp(n),r=i&&Op(n);return{c(){o&&o.c(),t=O(),r&&r.c(),s=Ae()},m(a,u){o&&o.m(a,u),S(a,t,u),r&&r.m(a,u),S(a,s,u),l=!0},p(a,u){u[0]&128&&(e=!a[7].includes("@username")),e?o?(o.p(a,u),u[0]&128&&E(o,1)):(o=Mp(a),o.c(),E(o,1),o.m(t.parentNode,t)):o&&(pe(),P(o,1,1,()=>{o=null}),he()),u[0]&128&&(i=!a[7].includes("@email")),i?r?(r.p(a,u),u[0]&128&&E(r,1)):(r=Op(a),r.c(),E(r,1),r.m(s.parentNode,s)):r&&(pe(),P(r,1,1,()=>{r=null}),he())},i(a){l||(E(o),E(r),l=!0)},o(a){P(o),P(r),l=!1},d(a){o&&o.d(a),a&&w(t),r&&r.d(a),a&&w(s)}}}function Mp(n){let e,t,i;function s(o){n[28](o)}let l={class:"col-type-text col-field-id",name:"username",$$slots:{default:[$M]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Ft({props:l}),le.push(()=>_e(e,"sort",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[1]&268435456&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function $M(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="username",p(t,"class",W.getFieldTypeIcon("user")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:ee,d(l){l&&w(e)}}}function Op(n){let e,t,i;function s(o){n[29](o)}let l={class:"col-type-email col-field-email",name:"email",$$slots:{default:[CM]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Ft({props:l}),le.push(()=>_e(e,"sort",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[1]&268435456&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function CM(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="email",p(t,"class",W.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:ee,d(l){l&&w(e)}}}function TM(n){let e,t,i,s,l,o=n[54].name+"",r;return{c(){e=v("div"),t=v("i"),s=O(),l=v("span"),r=B(o),p(t,"class",i=W.getFieldTypeIcon(n[54].type)),p(l,"class","txt"),p(e,"class","col-header-content")},m(a,u){S(a,e,u),_(e,t),_(e,s),_(e,l),_(l,r)},p(a,u){u[0]&65536&&i!==(i=W.getFieldTypeIcon(a[54].type))&&p(t,"class",i),u[0]&65536&&o!==(o=a[54].name+"")&&re(r,o)},d(a){a&&w(e)}}}function Dp(n,e){let t,i,s,l;function o(a){e[30](a)}let r={class:"col-type-"+e[54].type+" col-field-"+e[54].name,name:e[54].name,$$slots:{default:[TM]},$$scope:{ctx:e}};return e[0]!==void 0&&(r.sort=e[0]),i=new Ft({props:r}),le.push(()=>_e(i,"sort",o)),{key:n,first:null,c(){t=Ae(),j(i.$$.fragment),this.first=t},m(a,u){S(a,t,u),R(i,a,u),l=!0},p(a,u){e=a;const f={};u[0]&65536&&(f.class="col-type-"+e[54].type+" col-field-"+e[54].name),u[0]&65536&&(f.name=e[54].name),u[0]&65536|u[1]&268435456&&(f.$$scope={dirty:u,ctx:e}),!s&&u[0]&1&&(s=!0,f.sort=e[0],ve(()=>s=!1)),i.$set(f)},i(a){l||(E(i.$$.fragment,a),l=!0)},o(a){P(i.$$.fragment,a),l=!1},d(a){a&&w(t),H(i,a)}}}function Ap(n){let e,t,i;function s(o){n[31](o)}let l={class:"col-type-date col-field-created",name:"created",$$slots:{default:[MM]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Ft({props:l}),le.push(()=>_e(e,"sort",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[1]&268435456&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function MM(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="created",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:ee,d(l){l&&w(e)}}}function Ep(n){let e,t,i;function s(o){n[32](o)}let l={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[OM]},$$scope:{ctx:n}};return n[0]!==void 0&&(l.sort=n[0]),e=new Ft({props:l}),le.push(()=>_e(e,"sort",s)),{c(){j(e.$$.fragment)},m(o,r){R(e,o,r),i=!0},p(o,r){const a={};r[1]&268435456&&(a.$$scope={dirty:r,ctx:o}),!t&&r[0]&1&&(t=!0,a.sort=o[0],ve(()=>t=!1)),e.$set(a)},i(o){i||(E(e.$$.fragment,o),i=!0)},o(o){P(e.$$.fragment,o),i=!1},d(o){H(e,o)}}}function OM(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="updated",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:ee,d(l){l&&w(e)}}}function Ip(n){let e;function t(l,o){return l[10]?AM:DM}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function DM(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&Pp(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No records found.",s=O(),o&&o.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),_(e,t),_(t,i),_(t,s),o&&o.m(t,null),_(e,l)},p(a,u){var f;(f=a[1])!=null&&f.length?o?o.p(a,u):(o=Pp(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function AM(n){let e;return{c(){e=v("tr"),e.innerHTML=` + `},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function Pp(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[37]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function Lp(n){let e,t,i,s,l;i=new Ga({props:{id:n[51].id}});let o=n[2].isAuth&&Np(n);return{c(){e=v("td"),t=v("div"),j(i.$$.fragment),s=O(),o&&o.c(),p(t,"class","flex flex-gap-5"),p(e,"class","col-type-text col-field-id")},m(r,a){S(r,e,a),_(e,t),R(i,t,null),_(t,s),o&&o.m(t,null),l=!0},p(r,a){const u={};a[0]&16&&(u.id=r[51].id),i.$set(u),r[2].isAuth?o?o.p(r,a):(o=Np(r),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},i(r){l||(E(i.$$.fragment,r),l=!0)},o(r){P(i.$$.fragment,r),l=!1},d(r){r&&w(e),H(i),o&&o.d()}}}function Np(n){let e;function t(l,o){return l[51].verified?IM:EM}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i!==(i=t(l))&&(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function EM(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-sm txt-hint")},m(s,l){S(s,e,l),t||(i=Ee(Ue.call(null,e,"Unverified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function IM(n){let e,t,i;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-fill txt-sm txt-success")},m(s,l){S(s,e,l),t||(i=Ee(Ue.call(null,e,"Verified")),t=!0)},d(s){s&&w(e),t=!1,i()}}}function Fp(n){let e=!n[7].includes("@username"),t,i=!n[7].includes("@email"),s,l=e&&Rp(n),o=i&&Hp(n);return{c(){l&&l.c(),t=O(),o&&o.c(),s=Ae()},m(r,a){l&&l.m(r,a),S(r,t,a),o&&o.m(r,a),S(r,s,a)},p(r,a){a[0]&128&&(e=!r[7].includes("@username")),e?l?l.p(r,a):(l=Rp(r),l.c(),l.m(t.parentNode,t)):l&&(l.d(1),l=null),a[0]&128&&(i=!r[7].includes("@email")),i?o?o.p(r,a):(o=Hp(r),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},d(r){l&&l.d(r),r&&w(t),o&&o.d(r),r&&w(s)}}}function Rp(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!W.isEmpty(o[51].username)),t?LM:PM}let s=i(n,[-1,-1]),l=s(n);return{c(){e=v("td"),l.c(),p(e,"class","col-type-text col-field-username")},m(o,r){S(o,e,r),l.m(e,null)},p(o,r){s===(s=i(o,r))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,null)))},d(o){o&&w(e),l.d()}}}function PM(n){let e,t=n[51].username+"",i,s;return{c(){e=v("span"),i=B(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[51].username)},m(l,o){S(l,e,o),_(e,i)},p(l,o){o[0]&16&&t!==(t=l[51].username+"")&&re(i,t),o[0]&16&&s!==(s=l[51].username)&&p(e,"title",s)},d(l){l&&w(e)}}}function LM(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function Hp(n){let e,t;function i(o,r){return r[0]&16&&(t=null),t==null&&(t=!!W.isEmpty(o[51].email)),t?FM:NM}let s=i(n,[-1,-1]),l=s(n);return{c(){e=v("td"),l.c(),p(e,"class","col-type-text col-field-email")},m(o,r){S(o,e,r),l.m(e,null)},p(o,r){s===(s=i(o,r))&&l?l.p(o,r):(l.d(1),l=s(o),l&&(l.c(),l.m(e,null)))},d(o){o&&w(e),l.d()}}}function NM(n){let e,t=n[51].email+"",i,s;return{c(){e=v("span"),i=B(t),p(e,"class","txt txt-ellipsis"),p(e,"title",s=n[51].email)},m(l,o){S(l,e,o),_(e,i)},p(l,o){o[0]&16&&t!==(t=l[51].email+"")&&re(i,t),o[0]&16&&s!==(s=l[51].email)&&p(e,"title",s)},d(l){l&&w(e)}}}function FM(n){let e;return{c(){e=v("span"),e.textContent="N/A",p(e,"class","txt-hint")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function jp(n,e){let t,i,s;return i=new yM({props:{record:e[51],field:e[54]}}),{key:n,first:null,c(){t=Ae(),j(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),R(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&16&&(r.record=e[51]),o[0]&65536&&(r.field=e[54]),i.$set(r)},i(l){s||(E(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(t),H(i,l)}}}function qp(n){let e,t,i;return t=new Ki({props:{date:n[51].created}}),{c(){e=v("td"),j(t.$$.fragment),p(e,"class","col-type-date col-field-created")},m(s,l){S(s,e,l),R(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[51].created),t.$set(o)},i(s){i||(E(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),H(t)}}}function Vp(n){let e,t,i;return t=new Ki({props:{date:n[51].updated}}),{c(){e=v("td"),j(t.$$.fragment),p(e,"class","col-type-date col-field-updated")},m(s,l){S(s,e,l),R(t,e,null),i=!0},p(s,l){const o={};l[0]&16&&(o.date=s[51].updated),t.$set(o)},i(s){i||(E(t.$$.fragment,s),i=!0)},o(s){P(t.$$.fragment,s),i=!1},d(s){s&&w(e),H(t)}}}function zp(n,e){let t,i,s,l,o,r,a,u,f,c,d=!e[7].includes("@id"),h,m,g=[],b=new Map,y,k=!e[7].includes("@created"),$,C=!e[7].includes("@updated"),M,T,D,A,I,L;function F(){return e[34](e[51])}let q=d&&Lp(e),z=e[2].isAuth&&Fp(e),J=e[16];const G=x=>x[54].name;for(let x=0;x',D=O(),p(l,"type","checkbox"),p(l,"id",o="checkbox_"+e[51].id),l.checked=r=e[6][e[51].id],p(u,"for",f="checkbox_"+e[51].id),p(s,"class","form-field"),p(i,"class","bulk-select-col min-width"),p(T,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(x,U){S(x,t,U),_(t,i),_(i,s),_(s,l),_(s,a),_(s,u),_(t,c),q&&q.m(t,null),_(t,h),z&&z.m(t,null),_(t,m);for(let ae=0;ae{q=null}),he()),e[2].isAuth?z?z.p(e,U):(z=Fp(e),z.c(),z.m(t,m)):z&&(z.d(1),z=null),U[0]&65552&&(J=e[16],pe(),g=bt(g,U,G,1,e,J,b,t,nn,jp,y,wp),he()),U[0]&128&&(k=!e[7].includes("@created")),k?ie?(ie.p(e,U),U[0]&128&&E(ie,1)):(ie=qp(e),ie.c(),E(ie,1),ie.m(t,$)):ie&&(pe(),P(ie,1,1,()=>{ie=null}),he()),U[0]&128&&(C=!e[7].includes("@updated")),C?Q?(Q.p(e,U),U[0]&128&&E(Q,1)):(Q=Vp(e),Q.c(),E(Q,1),Q.m(t,M)):Q&&(pe(),P(Q,1,1,()=>{Q=null}),he())},i(x){if(!A){E(q);for(let U=0;UY[54].name;for(let Y=0;YY[51].id;for(let Y=0;Y',k=O(),$=v("tbody");for(let Y=0;Y{L=null}),he()),Y[2].isAuth?F?(F.p(Y,x),x[0]&4&&E(F,1)):(F=Tp(Y),F.c(),E(F,1),F.m(i,a)):F&&(pe(),P(F,1,1,()=>{F=null}),he()),x[0]&65537&&(q=Y[16],pe(),u=bt(u,x,z,1,Y,q,f,i,nn,Dp,c,Sp),he()),x[0]&128&&(d=!Y[7].includes("@created")),d?J?(J.p(Y,x),x[0]&128&&E(J,1)):(J=Ap(Y),J.c(),E(J,1),J.m(i,h)):J&&(pe(),P(J,1,1,()=>{J=null}),he()),x[0]&128&&(m=!Y[7].includes("@updated")),m?G?(G.p(Y,x),x[0]&128&&E(G,1)):(G=Ep(Y),G.c(),E(G,1),G.m(i,g)):G&&(pe(),P(G,1,1,()=>{G=null}),he()),x[0]&1246422&&(ie=Y[4],pe(),C=bt(C,x,Q,1,Y,ie,M,$,nn,zp,null,kp),he(),!ie.length&&X?X.p(Y,x):ie.length?X&&(X.d(1),X=null):(X=Ip(Y),X.c(),X.m($,null))),(!T||x[0]&1024)&&ne(e,"table-loading",Y[10])},i(Y){if(!T){E(L),E(F);for(let x=0;x({50:l}),({uniqueId:l})=>[0,l?524288:0]]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=Ae(),j(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),R(i,l,o),s=!0},p(l,o){e=l;const r={};o[0]&8320|o[1]&268959744&&(r.$$scope={dirty:o,ctx:e}),i.$set(r)},i(l){s||(E(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(t),H(i,l)}}}function jM(n){let e,t,i=[],s=new Map,l,o,r=n[13];const a=u=>u[47].id+u[47].name;for(let u=0;uReset',c=O(),d=v("div"),h=O(),m=v("button"),m.innerHTML='Delete selected',p(t,"class","txt"),p(f,"type","button"),p(f,"class","btn btn-xs btn-secondary btn-outline p-l-5 p-r-5"),ne(f,"btn-disabled",n[11]),p(d,"class","flex-fill"),p(m,"type","button"),p(m,"class","btn btn-sm btn-secondary btn-danger"),ne(m,"btn-loading",n[11]),ne(m,"btn-disabled",n[11]),p(e,"class","bulkbar")},m($,C){S($,e,C),_(e,t),_(t,i),_(t,s),_(s,l),_(t,o),_(t,a),_(e,u),_(e,f),_(e,c),_(e,d),_(e,h),_(e,m),b=!0,y||(k=[K(f,"click",n[39]),K(m,"click",n[40])],y=!0)},p($,C){(!b||C[0]&256)&&re(l,$[8]),(!b||C[0]&256)&&r!==(r=$[8]===1?"record":"records")&&re(a,r),(!b||C[0]&2048)&&ne(f,"btn-disabled",$[11]),(!b||C[0]&2048)&&ne(m,"btn-loading",$[11]),(!b||C[0]&2048)&&ne(m,"btn-disabled",$[11])},i($){b||($&&xe(()=>{g||(g=je(e,Sn,{duration:150,y:5},!0)),g.run(1)}),b=!0)},o($){$&&(g||(g=je(e,Sn,{duration:150,y:5},!1)),g.run(0)),b=!1},d($){$&&w(e),$&&g&&g.end(),y=!1,Pe(k)}}}function VM(n){let e,t,i,s,l,o;e=new $a({props:{class:"table-wrapper",$$slots:{before:[qM],default:[RM]},$$scope:{ctx:n}}});let r=n[4].length&&Up(n),a=n[4].length&&n[15]&&Wp(n),u=n[8]&&Yp(n);return{c(){j(e.$$.fragment),t=O(),r&&r.c(),i=O(),a&&a.c(),s=O(),u&&u.c(),l=Ae()},m(f,c){R(e,f,c),S(f,t,c),r&&r.m(f,c),S(f,i,c),a&&a.m(f,c),S(f,s,c),u&&u.m(f,c),S(f,l,c),o=!0},p(f,c){const d={};c[0]&95447|c[1]&268435456&&(d.$$scope={dirty:c,ctx:f}),e.$set(d),f[4].length?r?r.p(f,c):(r=Up(f),r.c(),r.m(i.parentNode,i)):r&&(r.d(1),r=null),f[4].length&&f[15]?a?a.p(f,c):(a=Wp(f),a.c(),a.m(s.parentNode,s)):a&&(a.d(1),a=null),f[8]?u?(u.p(f,c),c[0]&256&&E(u,1)):(u=Yp(f),u.c(),E(u,1),u.m(l.parentNode,l)):u&&(pe(),P(u,1,1,()=>{u=null}),he())},i(f){o||(E(e.$$.fragment,f),E(u),o=!0)},o(f){P(e.$$.fragment,f),P(u),o=!1},d(f){H(e,f),f&&w(t),r&&r.d(f),f&&w(i),a&&a.d(f),f&&w(s),u&&u.d(f),f&&w(l)}}}function zM(n,e,t){let i,s,l,o,r;const a=It();let{collection:u}=e,{sort:f=""}=e,{filter:c=""}=e,d=[],h=1,m=0,g={},b=!0,y=!1,k=0,$,C=[],M=[];function T(){!(u!=null&&u.id)||localStorage.setItem((u==null?void 0:u.id)+"@hiddenCollumns",JSON.stringify(C))}function D(){if(t(7,C=[]),!!(u!=null&&u.id))try{const Z=localStorage.getItem(u.id+"@hiddenCollumns");Z&&t(7,C=JSON.parse(Z)||[])}catch{}}async function A(){const Z=h;for(let Ce=1;Ce<=Z;Ce++)(Ce===1||i)&&await I(Ce,!1)}async function I(Z=1,Ce=!0){if(!!(u!=null&&u.id))return t(10,b=!0),de.collection(u.id).getList(Z,30,{sort:f,filter:c}).then(async Be=>{if(Z<=1&&L(),t(10,b=!1),t(9,h=Be.page),t(5,m=Be.totalItems),a("load",d.concat(Be.items)),Ce){const Vt=++k;for(;Be.items.length&&k==Vt;)t(4,d=d.concat(Be.items.splice(0,15))),await W.yieldToMain()}else t(4,d=d.concat(Be.items))}).catch(Be=>{Be!=null&&Be.isAbort||(t(10,b=!1),console.warn(Be),L(),de.errorResponseHandler(Be,!1))})}function L(){t(4,d=[]),t(9,h=1),t(5,m=0),t(6,g={})}function F(){r?q():z()}function q(){t(6,g={})}function z(){for(const Z of d)t(6,g[Z.id]=Z,g);t(6,g)}function J(Z){g[Z.id]?delete g[Z.id]:t(6,g[Z.id]=Z,g),t(6,g)}function G(){wn(`Do you really want to delete the selected ${o===1?"record":"records"}?`,ie)}async function ie(){if(y||!o||!(u!=null&&u.id))return;let Z=[];for(const Ce of Object.keys(g))Z.push(de.collection(u.id).delete(Ce));return t(11,y=!0),Promise.all(Z).then(()=>{Lt(`Successfully deleted the selected ${o===1?"record":"records"}.`),q()}).catch(Ce=>{de.errorResponseHandler(Ce)}).finally(()=>(t(11,y=!1),A()))}function Q(Z){Ve.call(this,n,Z)}const X=(Z,Ce)=>{Ce.target.checked?W.removeByValue(C,Z.id):W.pushUnique(C,Z.id),t(7,C)},Y=()=>F();function x(Z){f=Z,t(0,f)}function U(Z){f=Z,t(0,f)}function ae(Z){f=Z,t(0,f)}function Re(Z){f=Z,t(0,f)}function Ne(Z){f=Z,t(0,f)}function Le(Z){f=Z,t(0,f)}function Fe(Z){le[Z?"unshift":"push"](()=>{$=Z,t(12,$)})}const me=Z=>J(Z),Se=Z=>a("select",Z),we=(Z,Ce)=>{Ce.code==="Enter"&&(Ce.preventDefault(),a("select",Z))},We=()=>t(1,c=""),ue=()=>I(h+1),se=()=>q(),fe=()=>G();return n.$$set=Z=>{"collection"in Z&&t(2,u=Z.collection),"sort"in Z&&t(0,f=Z.sort),"filter"in Z&&t(1,c=Z.filter)},n.$$.update=()=>{n.$$.dirty[0]&4&&u!=null&&u.id&&(D(),L()),n.$$.dirty[0]&7&&(u==null?void 0:u.id)&&f!==-1&&c!==-1&&I(1),n.$$.dirty[0]&48&&t(15,i=m>d.length),n.$$.dirty[0]&4&&t(23,s=(u==null?void 0:u.schema)||[]),n.$$.dirty[0]&8388736&&t(16,l=s.filter(Z=>!C.includes(Z.id))),n.$$.dirty[0]&64&&t(8,o=Object.keys(g).length),n.$$.dirty[0]&272&&t(14,r=d.length&&o===d.length),n.$$.dirty[0]&128&&C!==-1&&T(),n.$$.dirty[0]&8388612&&t(13,M=[].concat(u.isAuth?[{id:"@username",name:"username"},{id:"@email",name:"email"}]:[],s.map(Z=>({id:Z.id,name:Z.name})),[{id:"@created",name:"created"},{id:"@updated",name:"updated"}]))},[f,c,u,I,d,m,g,C,o,h,b,y,$,M,r,i,l,a,F,q,J,G,A,s,Q,X,Y,x,U,ae,Re,Ne,Le,Fe,me,Se,we,We,ue,se,fe]}class BM extends ke{constructor(e){super(),ye(this,e,zM,VM,be,{collection:2,sort:0,filter:1,reloadLoadedPages:22,load:3},null,[-1,-1])}get reloadLoadedPages(){return this.$$.ctx[22]}get load(){return this.$$.ctx[3]}}function UM(n){let e,t,i,s;return e=new K3({}),i=new pn({props:{$$slots:{default:[KM]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(l,o){R(e,l,o),S(l,t,o),R(i,l,o),s=!0},p(l,o){const r={};o[0]&759|o[1]&1&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function WM(n){let e,t;return e=new pn({props:{center:!0,$$slots:{default:[GM]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s[0]&528|s[1]&1&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function YM(n){let e,t;return e=new pn({props:{center:!0,$$slots:{default:[XM]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s[1]&1&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function Kp(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='',p(e,"type","button"),p(e,"class","btn btn-secondary btn-circle")},m(s,l){S(s,e,l),t||(i=[Ee(Ue.call(null,e,{text:"Edit collection",position:"right"})),K(e,"click",n[14])],t=!0)},p:ee,d(s){s&&w(e),t=!1,Pe(i)}}}function KM(n){let e,t,i,s,l,o=n[2].name+"",r,a,u,f,c,d,h,m,g,b,y,k,$,C,M,T,D,A,I,L=!n[9]&&Kp(n);c=new Sa({}),c.$on("refresh",n[15]),k=new wa({props:{value:n[0],autocompleteCollection:n[2]}}),k.$on("submit",n[18]);function F(J){n[20](J)}function q(J){n[21](J)}let z={collection:n[2]};return n[0]!==void 0&&(z.filter=n[0]),n[1]!==void 0&&(z.sort=n[1]),C=new BM({props:z}),n[19](C),le.push(()=>_e(C,"filter",F)),le.push(()=>_e(C,"sort",q)),C.$on("select",n[22]),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Collections",s=O(),l=v("div"),r=B(o),a=O(),u=v("div"),L&&L.c(),f=O(),j(c.$$.fragment),d=O(),h=v("div"),m=v("button"),m.innerHTML=` + API Preview`,g=O(),b=v("button"),b.innerHTML=` + New record`,y=O(),j(k.$$.fragment),$=O(),j(C.$$.fragment),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(u,"class","inline-flex gap-5"),p(m,"type","button"),p(m,"class","btn btn-outline"),p(b,"type","button"),p(b,"class","btn btn-expanded"),p(h,"class","btns-group"),p(e,"class","page-header")},m(J,G){S(J,e,G),_(e,t),_(t,i),_(t,s),_(t,l),_(l,r),_(e,a),_(e,u),L&&L.m(u,null),_(u,f),R(c,u,null),_(e,d),_(e,h),_(h,m),_(h,g),_(h,b),S(J,y,G),R(k,J,G),S(J,$,G),R(C,J,G),D=!0,A||(I=[K(m,"click",n[16]),K(b,"click",n[17])],A=!0)},p(J,G){(!D||G[0]&4)&&o!==(o=J[2].name+"")&&re(r,o),J[9]?L&&(L.d(1),L=null):L?L.p(J,G):(L=Kp(J),L.c(),L.m(u,f));const ie={};G[0]&1&&(ie.value=J[0]),G[0]&4&&(ie.autocompleteCollection=J[2]),k.$set(ie);const Q={};G[0]&4&&(Q.collection=J[2]),!M&&G[0]&1&&(M=!0,Q.filter=J[0],ve(()=>M=!1)),!T&&G[0]&2&&(T=!0,Q.sort=J[1],ve(()=>T=!1)),C.$set(Q)},i(J){D||(E(c.$$.fragment,J),E(k.$$.fragment,J),E(C.$$.fragment,J),D=!0)},o(J){P(c.$$.fragment,J),P(k.$$.fragment,J),P(C.$$.fragment,J),D=!1},d(J){J&&w(e),L&&L.d(),H(c),J&&w(y),H(k,J),J&&w($),n[19](null),H(C,J),A=!1,Pe(I)}}}function JM(n){let e,t,i,s,l;return{c(){e=v("h1"),e.textContent="Create your first collection to add records!",t=O(),i=v("button"),i.innerHTML=` + Create new collection`,p(e,"class","m-b-10"),p(i,"type","button"),p(i,"class","btn btn-expanded-lg btn-lg")},m(o,r){S(o,e,r),S(o,t,r),S(o,i,r),s||(l=K(i,"click",n[13]),s=!0)},p:ee,d(o){o&&w(e),o&&w(t),o&&w(i),s=!1,l()}}}function ZM(n){let e;return{c(){e=v("h1"),e.textContent="You don't have any collections yet.",p(e,"class","m-b-10")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function GM(n){let e,t,i;function s(r,a){return r[9]?ZM:JM}let l=s(n),o=l(n);return{c(){e=v("div"),t=v("div"),t.innerHTML='',i=O(),o.c(),p(t,"class","icon"),p(e,"class","placeholder-section m-b-base")},m(r,a){S(r,e,a),_(e,t),_(e,i),o.m(e,null)},p(r,a){l===(l=s(r))&&o?o.p(r,a):(o.d(1),o=l(r),o&&(o.c(),o.m(e,null)))},d(r){r&&w(e),o.d()}}}function XM(n){let e;return{c(){e=v("div"),e.innerHTML=` +

    Loading collections...

    `,p(e,"class","placeholder-section m-b-base")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function QM(n){let e,t,i,s,l,o,r,a,u;const f=[YM,WM,UM],c=[];function d(b,y){return b[3]?0:b[8].length?2:1}e=d(n),t=c[e]=f[e](n);let h={};s=new Za({props:h}),n[23](s);let m={};o=new t4({props:m}),n[24](o);let g={collection:n[2]};return a=new z_({props:g}),n[25](a),a.$on("save",n[26]),a.$on("delete",n[27]),{c(){t.c(),i=O(),j(s.$$.fragment),l=O(),j(o.$$.fragment),r=O(),j(a.$$.fragment)},m(b,y){c[e].m(b,y),S(b,i,y),R(s,b,y),S(b,l,y),R(o,b,y),S(b,r,y),R(a,b,y),u=!0},p(b,y){let k=e;e=d(b),e===k?c[e].p(b,y):(pe(),P(c[k],1,1,()=>{c[k]=null}),he(),t=c[e],t?t.p(b,y):(t=c[e]=f[e](b),t.c()),E(t,1),t.m(i.parentNode,i));const $={};s.$set($);const C={};o.$set(C);const M={};y[0]&4&&(M.collection=b[2]),a.$set(M)},i(b){u||(E(t),E(s.$$.fragment,b),E(o.$$.fragment,b),E(a.$$.fragment,b),u=!0)},o(b){P(t),P(s.$$.fragment,b),P(o.$$.fragment,b),P(a.$$.fragment,b),u=!1},d(b){c[e].d(b),b&&w(i),n[23](null),H(s,b),b&&w(l),n[24](null),H(o,b),b&&w(r),n[25](null),H(a,b)}}}function xM(n,e,t){let i,s,l,o,r,a,u;Ze(n,Bn,X=>t(2,s=X)),Ze(n,ia,X=>t(3,l=X)),Ze(n,ua,X=>t(12,o=X)),Ze(n,mt,X=>t(28,r=X)),Ze(n,Zi,X=>t(8,a=X)),Ze(n,Cs,X=>t(9,u=X)),Ht(mt,r="Collections",r);const f=new URLSearchParams(o);let c,d,h,m,g=f.get("filter")||"",b=f.get("sort")||"-created",y=f.get("collectionId")||"";function k(){t(10,y=s.id),t(1,b="-created"),t(0,g="")}FS(y);const $=()=>c==null?void 0:c.show(),C=()=>c==null?void 0:c.show(s),M=()=>m==null?void 0:m.load(),T=()=>d==null?void 0:d.show(s),D=()=>h==null?void 0:h.show(),A=X=>t(0,g=X.detail);function I(X){le[X?"unshift":"push"](()=>{m=X,t(7,m)})}function L(X){g=X,t(0,g)}function F(X){b=X,t(1,b)}const q=X=>h==null?void 0:h.show(X==null?void 0:X.detail);function z(X){le[X?"unshift":"push"](()=>{c=X,t(4,c)})}function J(X){le[X?"unshift":"push"](()=>{d=X,t(5,d)})}function G(X){le[X?"unshift":"push"](()=>{h=X,t(6,h)})}const ie=()=>m==null?void 0:m.reloadLoadedPages(),Q=()=>m==null?void 0:m.reloadLoadedPages();return n.$$.update=()=>{if(n.$$.dirty[0]&4096&&t(11,i=new URLSearchParams(o)),n.$$.dirty[0]&3080&&!l&&i.has("collectionId")&&i.get("collectionId")!=y&&PS(i.get("collectionId")),n.$$.dirty[0]&1028&&(s==null?void 0:s.id)&&y!=s.id&&k(),n.$$.dirty[0]&7&&(b||g||(s==null?void 0:s.id))){const X=new URLSearchParams({collectionId:(s==null?void 0:s.id)||"",filter:g,sort:b}).toString();ki("/collections?"+X)}},[g,b,s,l,c,d,h,m,a,u,y,i,o,$,C,M,T,D,A,I,L,F,q,z,J,G,ie,Q]}class eO extends ke{constructor(e){super(),ye(this,e,xM,QM,be,{},null,[-1,-1])}}function tO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,b,y,k,$,C,M,T,D,A,I;return{c(){e=v("aside"),t=v("div"),i=v("div"),i.textContent="System",s=O(),l=v("a"),l.innerHTML=` Application`,o=O(),r=v("a"),r.innerHTML=` Mail settings`,a=O(),u=v("a"),u.innerHTML=` Files storage`,f=O(),c=v("div"),c.innerHTML=`Sync Experimental`,d=O(),h=v("a"),h.innerHTML=` - Export collections`,m=O(),b=v("a"),b.innerHTML=` - Import collections`,g=O(),y=v("div"),y.textContent="Authentication",k=O(),$=v("a"),$.innerHTML=` + Export collections`,m=O(),g=v("a"),g.innerHTML=` + Import collections`,b=O(),y=v("div"),y.textContent="Authentication",k=O(),$=v("a"),$.innerHTML=` Auth providers`,C=O(),M=v("a"),M.innerHTML=` Token options`,T=O(),D=v("a"),D.innerHTML=` - Admins`,p(i,"class","sidebar-title"),p(l,"href","/settings"),p(l,"class","sidebar-list-item"),p(r,"href","/settings/mail"),p(r,"class","sidebar-list-item"),p(u,"href","/settings/storage"),p(u,"class","sidebar-list-item"),p(c,"class","sidebar-title"),p(h,"href","/settings/export-collections"),p(h,"class","sidebar-list-item"),p(b,"href","/settings/import-collections"),p(b,"class","sidebar-list-item"),p(y,"class","sidebar-title"),p($,"href","/settings/auth-providers"),p($,"class","sidebar-list-item"),p(M,"href","/settings/tokens"),p(M,"class","sidebar-list-item"),p(D,"href","/settings/admins"),p(D,"class","sidebar-list-item"),p(t,"class","sidebar-content"),p(e,"class","page-sidebar settings-sidebar")},m(L,F){S(L,e,F),_(e,t),_(t,i),_(t,s),_(t,l),_(t,o),_(t,r),_(t,a),_(t,u),_(t,f),_(t,c),_(t,d),_(t,h),_(t,m),_(t,b),_(t,g),_(t,y),_(t,k),_(t,$),_(t,C),_(t,M),_(t,T),_(t,D),A||(I=[Ae(An.call(null,l,{path:"/settings"})),Ae(Ut.call(null,l)),Ae(An.call(null,r,{path:"/settings/mail/?.*"})),Ae(Ut.call(null,r)),Ae(An.call(null,u,{path:"/settings/storage/?.*"})),Ae(Ut.call(null,u)),Ae(An.call(null,h,{path:"/settings/export-collections/?.*"})),Ae(Ut.call(null,h)),Ae(An.call(null,b,{path:"/settings/import-collections/?.*"})),Ae(Ut.call(null,b)),Ae(An.call(null,$,{path:"/settings/auth-providers/?.*"})),Ae(Ut.call(null,$)),Ae(An.call(null,M,{path:"/settings/tokens/?.*"})),Ae(Ut.call(null,M)),Ae(An.call(null,D,{path:"/settings/admins/?.*"})),Ae(Ut.call(null,D))],A=!0)},p:te,i:te,o:te,d(L){L&&w(e),A=!1,Pe(I)}}}class Ci extends ke{constructor(e){super(),ye(this,e,null,eO,be,{})}}function Kp(n,e,t){const i=n.slice();return i[30]=e[t],i}function Jp(n){let e,t;return e=new ge({props:{class:"form-field disabled",name:"id",$$slots:{default:[tO,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s[0]&536870914|s[1]&4&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function tO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="ID",o=O(),r=v("div"),a=v("i"),f=O(),c=v("input"),p(t,"class",W.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"for",l=n[29]),p(a,"class","ri-calendar-event-line txt-disabled"),p(r,"class","form-field-addon"),p(c,"type","text"),p(c,"id",d=n[29]),c.value=h=n[1].id,c.disabled=!0},m(g,y){S(g,e,y),_(e,t),_(e,i),_(e,s),S(g,o,y),S(g,r,y),_(r,a),S(g,f,y),S(g,c,y),m||(b=Ae(u=Be.call(null,a,{text:`Created: ${n[1].created} -Updated: ${n[1].updated}`,position:"left"})),m=!0)},p(g,y){y[0]&536870912&&l!==(l=g[29])&&p(e,"for",l),u&&Jt(u.update)&&y[0]&2&&u.update.call(null,{text:`Created: ${g[1].created} -Updated: ${g[1].updated}`,position:"left"}),y[0]&536870912&&d!==(d=g[29])&&p(c,"id",d),y[0]&2&&h!==(h=g[1].id)&&c.value!==h&&(c.value=h)},d(g){g&&w(e),g&&w(o),g&&w(r),g&&w(f),g&&w(c),m=!1,b()}}}function Zp(n){let e,t,i,s,l,o,r;function a(){return n[17](n[30])}return{c(){e=v("button"),t=v("img"),s=O(),Ln(t.src,i="./images/avatars/avatar"+n[30]+".svg")||p(t,"src",i),p(t,"alt","Avatar "+n[30]),p(e,"type","button"),p(e,"class",l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))},m(u,f){S(u,e,f),_(e,t),_(e,s),o||(r=K(e,"click",a),o=!0)},p(u,f){n=u,f[0]&4&&l!==(l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))&&p(e,"class",l)},d(u){u&&w(e),o=!1,r()}}}function nO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Email",o=O(),r=v("input"),p(t,"class",W.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","email"),p(r,"autocomplete","off"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),ce(r,n[3]),u||(f=K(r,"input",n[18]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&8&&r.value!==c[3]&&ce(r,c[3])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function Gp(n){let e,t;return e=new ge({props:{class:"form-field form-field-toggle",$$slots:{default:[iO,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s[0]&536870928|s[1]&4&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function iO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[29]),p(s,"for",o=n[29])},m(u,f){S(u,e,f),e.checked=n[4],S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[19]),r=!0)},p(u,f){f[0]&536870912&&t!==(t=u[29])&&p(e,"id",t),f[0]&16&&(e.checked=u[4]),f[0]&536870912&&o!==(o=u[29])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Xp(n){let e,t,i,s,l,o,r,a,u;return s=new ge({props:{class:"form-field required",name:"password",$$slots:{default:[sO,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),r=new ge({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[lO,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),j(s.$$.fragment),l=O(),o=v("div"),j(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),p(e,"class","col-12")},m(f,c){S(f,e,c),_(e,t),_(t,i),R(s,i,null),_(t,l),_(t,o),R(r,o,null),u=!0},p(f,c){const d={};c[0]&536871168|c[1]&4&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const h={};c[0]&536871424|c[1]&4&&(h.$$scope={dirty:c,ctx:f}),r.$set(h)},i(f){u||(E(s.$$.fragment,f),E(r.$$.fragment,f),f&&xe(()=>{a||(a=je(t,St,{duration:150},!0)),a.run(1)}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=je(t,St,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),H(s),H(r),f&&a&&a.end()}}}function sO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),ce(r,n[8]),u||(f=K(r,"input",n[20]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&256&&r.value!==c[8]&&ce(r,c[8])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function lO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password confirm",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),ce(r,n[9]),u||(f=K(r,"input",n[21]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&512&&r.value!==c[9]&&ce(r,c[9])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function oO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m=!n[1].isNew&&Jp(n),b=[0,1,2,3,4,5,6,7,8,9],g=[];for(let $=0;$<10;$+=1)g[$]=Zp(Kp(n,b,$));a=new ge({props:{class:"form-field required",name:"email",$$slots:{default:[nO,({uniqueId:$})=>({29:$}),({uniqueId:$})=>[$?536870912:0]]},$$scope:{ctx:n}}});let y=!n[1].isNew&&Gp(n),k=(n[1].isNew||n[4])&&Xp(n);return{c(){e=v("form"),m&&m.c(),t=O(),i=v("div"),s=v("p"),s.textContent="Avatar",l=O(),o=v("div");for(let $=0;$<10;$+=1)g[$].c();r=O(),j(a.$$.fragment),u=O(),y&&y.c(),f=O(),k&&k.c(),p(s,"class","section-title"),p(o,"class","flex flex-gap-xs flex-wrap"),p(i,"class","content"),p(e,"id",n[11]),p(e,"class","grid"),p(e,"autocomplete","off")},m($,C){S($,e,C),m&&m.m(e,null),_(e,t),_(e,i),_(i,s),_(i,l),_(i,o);for(let M=0;M<10;M+=1)g[M].m(o,null);_(e,r),R(a,e,null),_(e,u),y&&y.m(e,null),_(e,f),k&&k.m(e,null),c=!0,d||(h=K(e,"submit",ut(n[12])),d=!0)},p($,C){if($[1].isNew?m&&(pe(),P(m,1,1,()=>{m=null}),he()):m?(m.p($,C),C[0]&2&&E(m,1)):(m=Jp($),m.c(),E(m,1),m.m(e,t)),C[0]&4){b=[0,1,2,3,4,5,6,7,8,9];let T;for(T=0;T<10;T+=1){const D=Kp($,b,T);g[T]?g[T].p(D,C):(g[T]=Zp(D),g[T].c(),g[T].m(o,null))}for(;T<10;T+=1)g[T].d(1)}const M={};C[0]&536870920|C[1]&4&&(M.$$scope={dirty:C,ctx:$}),a.$set(M),$[1].isNew?y&&(pe(),P(y,1,1,()=>{y=null}),he()):y?(y.p($,C),C[0]&2&&E(y,1)):(y=Gp($),y.c(),E(y,1),y.m(e,f)),$[1].isNew||$[4]?k?(k.p($,C),C[0]&18&&E(k,1)):(k=Xp($),k.c(),E(k,1),k.m(e,null)):k&&(pe(),P(k,1,1,()=>{k=null}),he())},i($){c||(E(m),E(a.$$.fragment,$),E(y),E(k),c=!0)},o($){P(m),P(a.$$.fragment,$),P(y),P(k),c=!1},d($){$&&w(e),m&&m.d(),Mt(g,$),H(a),y&&y.d(),k&&k.d(),d=!1,h()}}}function rO(n){let e,t=n[1].isNew?"New admin":"Edit admin",i;return{c(){e=v("h4"),i=B(t)},m(s,l){S(s,e,l),_(e,i)},p(s,l){l[0]&2&&t!==(t=s[1].isNew?"New admin":"Edit admin")&&ae(i,t)},d(s){s&&w(e)}}}function Qp(n){let e,t,i,s,l,o,r,a,u;return o=new Zn({props:{class:"dropdown dropdown-upside dropdown-left dropdown-nowrap",$$slots:{default:[aO]},$$scope:{ctx:n}}}),{c(){e=v("button"),t=v("span"),i=O(),s=v("i"),l=O(),j(o.$$.fragment),r=O(),a=v("div"),p(s,"class","ri-more-line"),p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-secondary"),p(a,"class","flex-fill")},m(f,c){S(f,e,c),_(e,t),_(e,i),_(e,s),_(e,l),R(o,e,null),S(f,r,c),S(f,a,c),u=!0},p(f,c){const d={};c[1]&4&&(d.$$scope={dirty:c,ctx:f}),o.$set(d)},i(f){u||(E(o.$$.fragment,f),u=!0)},o(f){P(o.$$.fragment,f),u=!1},d(f){f&&w(e),H(o),f&&w(r),f&&w(a)}}}function aO(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - Delete`,p(e,"type","button"),p(e,"class","dropdown-item txt-danger")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[15]),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function uO(n){let e,t,i,s,l,o,r=n[1].isNew?"Create":"Save changes",a,u,f,c,d,h=!n[1].isNew&&Qp(n);return{c(){h&&h.c(),e=O(),t=v("button"),i=v("span"),i.textContent="Cancel",s=O(),l=v("button"),o=v("span"),a=B(r),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-secondary"),t.disabled=n[6],p(o,"class","txt"),p(l,"type","submit"),p(l,"form",n[11]),p(l,"class","btn btn-expanded"),l.disabled=u=!n[10]||n[6],ne(l,"btn-loading",n[6])},m(m,b){h&&h.m(m,b),S(m,e,b),S(m,t,b),_(t,i),S(m,s,b),S(m,l,b),_(l,o),_(o,a),f=!0,c||(d=K(t,"click",n[16]),c=!0)},p(m,b){m[1].isNew?h&&(pe(),P(h,1,1,()=>{h=null}),he()):h?(h.p(m,b),b[0]&2&&E(h,1)):(h=Qp(m),h.c(),E(h,1),h.m(e.parentNode,e)),(!f||b[0]&64)&&(t.disabled=m[6]),(!f||b[0]&2)&&r!==(r=m[1].isNew?"Create":"Save changes")&&ae(a,r),(!f||b[0]&1088&&u!==(u=!m[10]||m[6]))&&(l.disabled=u),(!f||b[0]&64)&&ne(l,"btn-loading",m[6])},i(m){f||(E(h),f=!0)},o(m){P(h),f=!1},d(m){h&&h.d(m),m&&w(e),m&&w(t),m&&w(s),m&&w(l),c=!1,d()}}}function fO(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[22],$$slots:{footer:[uO],header:[rO],default:[oO]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[23](e),e.$on("hide",n[24]),e.$on("show",n[25]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,l){const o={};l[0]&1152&&(o.beforeHide=s[22]),l[0]&1886|l[1]&4&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[23](null),H(e,s)}}}function cO(n,e,t){let i;const s=It(),l="admin_"+W.randomString(5);let o,r=new Yi,a=!1,u=!1,f=0,c="",d="",h="",m=!1;function b(ie){return y(ie),t(7,u=!0),o==null?void 0:o.show()}function g(){return o==null?void 0:o.hide()}function y(ie){t(1,r=ie!=null&&ie.clone?ie.clone():new Yi),k()}function k(){t(4,m=!1),t(3,c=(r==null?void 0:r.email)||""),t(2,f=(r==null?void 0:r.avatar)||0),t(8,d=""),t(9,h=""),Fn({})}function $(){if(a||!i)return;t(6,a=!0);const ie={email:c,avatar:f};(r.isNew||m)&&(ie.password=d,ie.passwordConfirm=h);let Q;r.isNew?Q=de.admins.create(ie):Q=de.admins.update(r.id,ie),Q.then(async X=>{var Y;t(7,u=!1),g(),Lt(r.isNew?"Successfully created admin.":"Successfully updated admin."),s("save",X),((Y=de.authStore.model)==null?void 0:Y.id)===X.id&&de.authStore.save(de.authStore.token,X)}).catch(X=>{de.errorResponseHandler(X)}).finally(()=>{t(6,a=!1)})}function C(){!(r!=null&&r.id)||wn("Do you really want to delete the selected admin?",()=>de.admins.delete(r.id).then(()=>{t(7,u=!1),g(),Lt("Successfully deleted admin."),s("delete",r)}).catch(ie=>{de.errorResponseHandler(ie)}))}const M=()=>C(),T=()=>g(),D=ie=>t(2,f=ie);function A(){c=this.value,t(3,c)}function I(){m=this.checked,t(4,m)}function L(){d=this.value,t(8,d)}function F(){h=this.value,t(9,h)}const q=()=>i&&u?(wn("You have unsaved changes. Do you really want to close the panel?",()=>{t(7,u=!1),g()}),!1):!0;function z(ie){le[ie?"unshift":"push"](()=>{o=ie,t(5,o)})}function J(ie){Ve.call(this,n,ie)}function G(ie){Ve.call(this,n,ie)}return n.$$.update=()=>{n.$$.dirty[0]&30&&t(10,i=r.isNew&&c!=""||m||c!==r.email||f!==r.avatar)},[g,r,f,c,m,o,a,u,d,h,i,l,$,C,b,M,T,D,A,I,L,F,q,z,J,G]}class dO extends ke{constructor(e){super(),ye(this,e,cO,fO,be,{show:14,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[0]}}function xp(n,e,t){const i=n.slice();return i[24]=e[t],i}function pO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="id",p(t,"class",W.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:te,d(l){l&&w(e)}}}function hO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="email",p(t,"class",W.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:te,d(l){l&&w(e)}}}function mO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="created",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:te,d(l){l&&w(e)}}}function gO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="updated",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:te,d(l){l&&w(e)}}}function eh(n){let e;function t(l,o){return l[5]?bO:_O}let i=t(n),s=i(n);return{c(){s.c(),e=Ee()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function _O(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&th(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No admins found.",s=O(),o&&o.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),_(e,t),_(t,i),_(t,s),o&&o.m(t,null),_(e,l)},p(a,u){var f;(f=a[1])!=null&&f.length?o?o.p(a,u):(o=th(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function bO(n){let e;return{c(){e=v("tr"),e.innerHTML=` - `},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function th(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[17]),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function nh(n){let e;return{c(){e=v("span"),e.textContent="You",p(e,"class","label label-warning m-l-5")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function ih(n,e){let t,i,s,l,o,r,a,u,f,c,d,h,m=e[24].email+"",b,g,y,k,$,C,M,T,D,A,I,L,F,q;u=new Za({props:{id:e[24].id}});let z=e[24].id===e[7].id&&nh();$=new Ki({props:{date:e[24].created}}),T=new Ki({props:{date:e[24].updated}});function J(){return e[15](e[24])}function G(...ie){return e[16](e[24],...ie)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("figure"),l=v("img"),r=O(),a=v("td"),j(u.$$.fragment),f=O(),z&&z.c(),c=O(),d=v("td"),h=v("span"),b=B(m),y=O(),k=v("td"),j($.$$.fragment),C=O(),M=v("td"),j(T.$$.fragment),D=O(),A=v("td"),A.innerHTML='',I=O(),Ln(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg")||p(l,"src",o),p(l,"alt","Admin avatar"),p(s,"class","thumb thumb-sm thumb-circle"),p(i,"class","min-width"),p(a,"class","col-type-text col-field-id"),p(h,"class","txt txt-ellipsis"),p(h,"title",g=e[24].email),p(d,"class","col-type-email col-field-email"),p(k,"class","col-type-date col-field-created"),p(M,"class","col-type-date col-field-updated"),p(A,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(ie,Q){S(ie,t,Q),_(t,i),_(i,s),_(s,l),_(t,r),_(t,a),R(u,a,null),_(a,f),z&&z.m(a,null),_(t,c),_(t,d),_(d,h),_(h,b),_(t,y),_(t,k),R($,k,null),_(t,C),_(t,M),R(T,M,null),_(t,D),_(t,A),_(t,I),L=!0,F||(q=[K(t,"click",J),K(t,"keydown",G)],F=!0)},p(ie,Q){e=ie,(!L||Q&16&&!Ln(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg"))&&p(l,"src",o);const X={};Q&16&&(X.id=e[24].id),u.$set(X),e[24].id===e[7].id?z||(z=nh(),z.c(),z.m(a,null)):z&&(z.d(1),z=null),(!L||Q&16)&&m!==(m=e[24].email+"")&&ae(b,m),(!L||Q&16&&g!==(g=e[24].email))&&p(h,"title",g);const Y={};Q&16&&(Y.date=e[24].created),$.$set(Y);const x={};Q&16&&(x.date=e[24].updated),T.$set(x)},i(ie){L||(E(u.$$.fragment,ie),E($.$$.fragment,ie),E(T.$$.fragment,ie),L=!0)},o(ie){P(u.$$.fragment,ie),P($.$$.fragment,ie),P(T.$$.fragment,ie),L=!1},d(ie){ie&&w(t),H(u),z&&z.d(),H($),H(T),F=!1,Pe(q)}}}function vO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M=[],T=new Map,D;function A(Y){n[11](Y)}let I={class:"col-type-text",name:"id",$$slots:{default:[pO]},$$scope:{ctx:n}};n[2]!==void 0&&(I.sort=n[2]),o=new Ft({props:I}),le.push(()=>_e(o,"sort",A));function L(Y){n[12](Y)}let F={class:"col-type-email col-field-email",name:"email",$$slots:{default:[hO]},$$scope:{ctx:n}};n[2]!==void 0&&(F.sort=n[2]),u=new Ft({props:F}),le.push(()=>_e(u,"sort",L));function q(Y){n[13](Y)}let z={class:"col-type-date col-field-created",name:"created",$$slots:{default:[mO]},$$scope:{ctx:n}};n[2]!==void 0&&(z.sort=n[2]),d=new Ft({props:z}),le.push(()=>_e(d,"sort",q));function J(Y){n[14](Y)}let G={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[gO]},$$scope:{ctx:n}};n[2]!==void 0&&(G.sort=n[2]),b=new Ft({props:G}),le.push(()=>_e(b,"sort",J));let ie=n[4];const Q=Y=>Y[24].id;for(let Y=0;Yr=!1)),o.$set(U);const re={};x&134217728&&(re.$$scope={dirty:x,ctx:Y}),!f&&x&4&&(f=!0,re.sort=Y[2],ve(()=>f=!1)),u.$set(re);const Re={};x&134217728&&(Re.$$scope={dirty:x,ctx:Y}),!h&&x&4&&(h=!0,Re.sort=Y[2],ve(()=>h=!1)),d.$set(Re);const Ne={};x&134217728&&(Ne.$$scope={dirty:x,ctx:Y}),!g&&x&4&&(g=!0,Ne.sort=Y[2],ve(()=>g=!1)),b.$set(Ne),x&186&&(ie=Y[4],pe(),M=bt(M,x,Q,1,Y,ie,T,C,nn,ih,null,xp),he(),!ie.length&&X?X.p(Y,x):ie.length?X&&(X.d(1),X=null):(X=eh(Y),X.c(),X.m(C,null))),(!D||x&32)&&ne(e,"table-loading",Y[5])},i(Y){if(!D){E(o.$$.fragment,Y),E(u.$$.fragment,Y),E(d.$$.fragment,Y),E(b.$$.fragment,Y);for(let x=0;x - New admin`,h=O(),j(m.$$.fragment),b=O(),j(g.$$.fragment),y=O(),T&&T.c(),k=Ee(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(f,"class","flex-fill"),p(d,"type","button"),p(d,"class","btn btn-expanded"),p(e,"class","page-header")},m(D,A){S(D,e,A),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),_(e,r),R(a,e,null),_(e,u),_(e,f),_(e,c),_(e,d),S(D,h,A),R(m,D,A),S(D,b,A),R(g,D,A),S(D,y,A),T&&T.m(D,A),S(D,k,A),$=!0,C||(M=K(d,"click",n[9]),C=!0)},p(D,A){(!$||A&64)&&ae(o,D[6]);const I={};A&2&&(I.value=D[1]),m.$set(I);const L={};A&134217918&&(L.$$scope={dirty:A,ctx:D}),g.$set(L),D[4].length?T?T.p(D,A):(T=sh(D),T.c(),T.m(k.parentNode,k)):T&&(T.d(1),T=null)},i(D){$||(E(a.$$.fragment,D),E(m.$$.fragment,D),E(g.$$.fragment,D),$=!0)},o(D){P(a.$$.fragment,D),P(m.$$.fragment,D),P(g.$$.fragment,D),$=!1},d(D){D&&w(e),H(a),D&&w(h),H(m,D),D&&w(b),H(g,D),D&&w(y),T&&T.d(D),D&&w(k),C=!1,M()}}}function kO(n){let e,t,i,s,l,o;e=new Ci({}),i=new pn({props:{$$slots:{default:[yO]},$$scope:{ctx:n}}});let r={};return l=new dO({props:r}),n[18](l),l.$on("save",n[19]),l.$on("delete",n[20]),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment),s=O(),j(l.$$.fragment)},m(a,u){R(e,a,u),S(a,t,u),R(i,a,u),S(a,s,u),R(l,a,u),o=!0},p(a,[u]){const f={};u&134217982&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(E(e.$$.fragment,a),E(i.$$.fragment,a),E(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&w(t),H(i,a),a&&w(s),n[18](null),H(l,a)}}}function wO(n,e,t){let i,s,l;Ze(n,aa,F=>t(21,i=F)),Ze(n,mt,F=>t(6,s=F)),Ze(n,ya,F=>t(7,l=F)),Ht(mt,s="Admins",s);const o=new URLSearchParams(i);let r,a=[],u=!1,f=o.get("filter")||"",c=o.get("sort")||"-created";function d(){return t(5,u=!0),t(4,a=[]),de.admins.getFullList(100,{sort:c||"-created",filter:f}).then(F=>{t(4,a=F),t(5,u=!1)}).catch(F=>{F!=null&&F.isAbort||(t(5,u=!1),console.warn(F),h(),de.errorResponseHandler(F,!1))})}function h(){t(4,a=[])}const m=()=>d(),b=()=>r==null?void 0:r.show(),g=F=>t(1,f=F.detail);function y(F){c=F,t(2,c)}function k(F){c=F,t(2,c)}function $(F){c=F,t(2,c)}function C(F){c=F,t(2,c)}const M=F=>r==null?void 0:r.show(F),T=(F,q)=>{(q.code==="Enter"||q.code==="Space")&&(q.preventDefault(),r==null||r.show(F))},D=()=>t(1,f="");function A(F){le[F?"unshift":"push"](()=>{r=F,t(3,r)})}const I=()=>d(),L=()=>d();return n.$$.update=()=>{if(n.$$.dirty&6&&c!==-1&&f!==-1){const F=new URLSearchParams({filter:f,sort:c}).toString();ki("/settings/admins?"+F),d()}},[d,f,c,r,a,u,s,l,m,b,g,y,k,$,C,M,T,D,A,I,L]}class SO extends ke{constructor(e){super(),ye(this,e,wO,kO,be,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function $O(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Email"),s=O(),l=v("input"),p(e,"for",i=n[8]),p(l,"type","email"),p(l,"id",o=n[8]),l.required=!0,l.autofocus=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0]),l.focus(),r||(a=K(l,"input",n[4]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&p(e,"for",i),f&256&&o!==(o=u[8])&&p(l,"id",o),f&1&&l.value!==u[0]&&ce(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function CO(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=B("Password"),s=O(),l=v("input"),r=O(),a=v("div"),u=v("a"),u.textContent="Forgotten password?",p(e,"for",i=n[8]),p(l,"type","password"),p(l,"id",o=n[8]),l.required=!0,p(u,"href","/request-password-reset"),p(u,"class","link-hint"),p(a,"class","help-block")},m(d,h){S(d,e,h),_(e,t),S(d,s,h),S(d,l,h),ce(l,n[1]),S(d,r,h),S(d,a,h),_(a,u),f||(c=[K(l,"input",n[5]),Ae(Ut.call(null,u))],f=!0)},p(d,h){h&256&&i!==(i=d[8])&&p(e,"for",i),h&256&&o!==(o=d[8])&&p(l,"id",o),h&2&&l.value!==d[1]&&ce(l,d[1])},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),f=!1,Pe(c)}}}function TO(n){let e,t,i,s,l,o,r,a,u,f,c;return s=new ge({props:{class:"form-field required",name:"identity",$$slots:{default:[$O,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:"password",$$slots:{default:[CO,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

    Admin sign in

    ",i=O(),j(s.$$.fragment),l=O(),j(o.$$.fragment),r=O(),a=v("button"),a.innerHTML=`Login - `,p(t,"class","content txt-center m-b-base"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block btn-next"),ne(a,"btn-disabled",n[2]),ne(a,"btn-loading",n[2]),p(e,"class","block")},m(d,h){S(d,e,h),_(e,t),_(e,i),R(s,e,null),_(e,l),R(o,e,null),_(e,r),_(e,a),u=!0,f||(c=K(e,"submit",ut(n[3])),f=!0)},p(d,h){const m={};h&769&&(m.$$scope={dirty:h,ctx:d}),s.$set(m);const b={};h&770&&(b.$$scope={dirty:h,ctx:d}),o.$set(b),(!u||h&4)&&ne(a,"btn-disabled",d[2]),(!u||h&4)&&ne(a,"btn-loading",d[2])},i(d){u||(E(s.$$.fragment,d),E(o.$$.fragment,d),u=!0)},o(d){P(s.$$.fragment,d),P(o.$$.fragment,d),u=!1},d(d){d&&w(e),H(s),H(o),f=!1,c()}}}function MO(n){let e,t;return e=new Pg({props:{$$slots:{default:[TO]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&519&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function OO(n,e,t){let i;Ze(n,aa,c=>t(6,i=c));const s=new URLSearchParams(i);let l=s.get("demoEmail")||"",o=s.get("demoPassword")||"",r=!1;function a(){if(!r)return t(2,r=!0),de.admins.authWithPassword(l,o).then(()=>{Ig(),ki("/")}).catch(()=>{fl("Invalid login credentials.")}).finally(()=>{t(2,r=!1)})}function u(){l=this.value,t(0,l)}function f(){o=this.value,t(1,o)}return[l,o,r,a,u,f]}class DO extends ke{constructor(e){super(),ye(this,e,OO,MO,be,{})}}function AO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M;i=new ge({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[IO,({uniqueId:D})=>({19:D}),({uniqueId:D})=>D?524288:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[PO,({uniqueId:D})=>({19:D}),({uniqueId:D})=>D?524288:0]},$$scope:{ctx:n}}}),a=new ge({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[LO,({uniqueId:D})=>({19:D}),({uniqueId:D})=>D?524288:0]},$$scope:{ctx:n}}}),f=new ge({props:{class:"form-field form-field-toggle",name:"meta.hideControls",$$slots:{default:[NO,({uniqueId:D})=>({19:D}),({uniqueId:D})=>D?524288:0]},$$scope:{ctx:n}}});let T=n[3]&&lh(n);return{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),j(a.$$.fragment),u=O(),j(f.$$.fragment),c=O(),d=v("div"),h=v("div"),m=O(),T&&T.c(),b=O(),g=v("button"),y=v("span"),y.textContent="Save changes",p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(h,"class","flex-fill"),p(y,"class","txt"),p(g,"type","submit"),p(g,"class","btn btn-expanded"),g.disabled=k=!n[3]||n[2],ne(g,"btn-loading",n[2]),p(d,"class","col-lg-12 flex"),p(e,"class","grid")},m(D,A){S(D,e,A),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),R(a,e,null),_(e,u),R(f,e,null),_(e,c),_(e,d),_(d,h),_(d,m),T&&T.m(d,null),_(d,b),_(d,g),_(g,y),$=!0,C||(M=K(g,"click",n[13]),C=!0)},p(D,A){const I={};A&1572865&&(I.$$scope={dirty:A,ctx:D}),i.$set(I);const L={};A&1572865&&(L.$$scope={dirty:A,ctx:D}),o.$set(L);const F={};A&1572865&&(F.$$scope={dirty:A,ctx:D}),a.$set(F);const q={};A&1572865&&(q.$$scope={dirty:A,ctx:D}),f.$set(q),D[3]?T?T.p(D,A):(T=lh(D),T.c(),T.m(d,b)):T&&(T.d(1),T=null),(!$||A&12&&k!==(k=!D[3]||D[2]))&&(g.disabled=k),(!$||A&4)&&ne(g,"btn-loading",D[2])},i(D){$||(E(i.$$.fragment,D),E(o.$$.fragment,D),E(a.$$.fragment,D),E(f.$$.fragment,D),$=!0)},o(D){P(i.$$.fragment,D),P(o.$$.fragment,D),P(a.$$.fragment,D),P(f.$$.fragment,D),$=!1},d(D){D&&w(e),H(i),H(o),H(a),H(f),T&&T.d(),C=!1,M()}}}function EO(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:te,i:te,o:te,d(t){t&&w(e)}}}function IO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Application name"),s=O(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].meta.appName),r||(a=K(l,"input",n[8]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].meta.appName&&ce(l,u[0].meta.appName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function PO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Application url"),s=O(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].meta.appUrl),r||(a=K(l,"input",n[9]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].meta.appUrl&&ce(l,u[0].meta.appUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function LO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Logs max days retention"),s=O(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","number"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].logs.maxDays),r||(a=K(l,"input",n[10]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].logs.maxDays&&ce(l,u[0].logs.maxDays)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function NO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Hide collection create and edit controls",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[19]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[19])},m(c,d){S(c,e,d),e.checked=n[0].meta.hideControls,S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[K(e,"change",n[11]),Ae(Be.call(null,r,{text:"This could prevent making accidental schema changes when in production environment.",position:"right"}))],u=!0)},p(c,d){d&524288&&t!==(t=c[19])&&p(e,"id",t),d&1&&(e.checked=c[0].meta.hideControls),d&524288&&a!==(a=c[19])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Pe(f)}}}function lh(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary btn-hint"),e.disabled=n[2]},m(l,o){S(l,e,o),_(e,t),i||(s=K(e,"click",n[12]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&w(e),i=!1,s()}}}function FO(n){let e,t,i,s,l,o,r,a,u;const f=[EO,AO],c=[];function d(h,m){return h[1]?0:1}return l=d(n),o=c[l]=f[l](n),{c(){e=v("header"),e.innerHTML=``,t=O(),i=v("div"),s=v("form"),o.c(),p(e,"class","page-header"),p(s,"class","panel"),p(s,"autocomplete","off"),p(i,"class","wrapper")},m(h,m){S(h,e,m),S(h,t,m),S(h,i,m),_(i,s),c[l].m(s,null),r=!0,a||(u=K(s,"submit",ut(n[4])),a=!0)},p(h,m){let b=l;l=d(h),l===b?c[l].p(h,m):(pe(),P(c[b],1,1,()=>{c[b]=null}),he(),o=c[l],o?o.p(h,m):(o=c[l]=f[l](h),o.c()),E(o,1),o.m(s,null))},i(h){r||(E(o),r=!0)},o(h){P(o),r=!1},d(h){h&&w(e),h&&w(t),h&&w(i),c[l].d(),a=!1,u()}}}function RO(n){let e,t,i,s;return e=new Ci({}),i=new pn({props:{$$slots:{default:[FO]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(l,o){R(e,l,o),S(l,t,o),R(i,l,o),s=!0},p(l,[o]){const r={};o&1048591&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function HO(n,e,t){let i,s,l,o;Ze(n,$s,T=>t(14,s=T)),Ze(n,vo,T=>t(15,l=T)),Ze(n,mt,T=>t(16,o=T)),Ht(mt,o="Application settings",o);let r={},a={},u=!1,f=!1,c="";d();async function d(){t(1,u=!0);try{const T=await de.settings.getAll()||{};m(T)}catch(T){de.errorResponseHandler(T)}t(1,u=!1)}async function h(){if(!(f||!i)){t(2,f=!0);try{const T=await de.settings.update(W.filterRedactedProps(a));m(T),Lt("Successfully saved application settings.")}catch(T){de.errorResponseHandler(T)}t(2,f=!1)}}function m(T={}){var D,A;Ht(vo,l=(D=T==null?void 0:T.meta)==null?void 0:D.appName,l),Ht($s,s=!!((A=T==null?void 0:T.meta)!=null&&A.hideControls),s),t(0,a={meta:(T==null?void 0:T.meta)||{},logs:(T==null?void 0:T.logs)||{}}),t(6,r=JSON.parse(JSON.stringify(a)))}function b(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function g(){a.meta.appName=this.value,t(0,a)}function y(){a.meta.appUrl=this.value,t(0,a)}function k(){a.logs.maxDays=rt(this.value),t(0,a)}function $(){a.meta.hideControls=this.checked,t(0,a)}const C=()=>b(),M=()=>h();return n.$$.update=()=>{n.$$.dirty&64&&t(7,c=JSON.stringify(r)),n.$$.dirty&129&&t(3,i=c!=JSON.stringify(a))},[a,u,f,i,h,b,r,c,g,y,k,$,C,M]}class jO extends ke{constructor(e){super(),ye(this,e,HO,RO,be,{})}}function qO(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let o=0;o',i=O(),s=v("input"),p(t,"type","button"),p(t,"class","btn btn-secondary btn-circle"),p(e,"class","form-field-addon"),Un(s,a)},m(u,f){S(u,e,f),_(e,t),S(u,i,f),S(u,s,f),s.autofocus&&s.focus(),l||(o=[Ae(Be.call(null,t,{position:"left",text:"Set new value"})),K(t,"click",n[6])],l=!0)},p(u,f){Un(s,a=Zt(r,[{readOnly:!0},{type:"text"},f&2&&{placeholder:u[1]},f&32&&u[5]]))},d(u){u&&w(e),u&&w(i),u&&w(s),l=!1,Pe(o)}}}function zO(n){let e;function t(l,o){return l[3]?VO:qO}let i=t(n),s=i(n);return{c(){s.c(),e=Ee()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:te,o:te,d(l){s.d(l),l&&w(e)}}}function BO(n,e,t){const i=["value","mask"];let s=wt(e,i),{value:l=""}=e,{mask:o="******"}=e,r,a=!1;async function u(){t(0,l=""),t(3,a=!1),await Tn(),r==null||r.focus()}const f=()=>u();function c(h){le[h?"unshift":"push"](()=>{r=h,t(2,r)})}function d(){l=this.value,t(0,l)}return n.$$set=h=>{e=Ke(Ke({},e),Wn(h)),t(5,s=wt(e,i)),"value"in h&&t(0,l=h.value),"mask"in h&&t(1,o=h.mask)},n.$$.update=()=>{n.$$.dirty&3&&l===o&&t(3,a=!0)},[l,o,r,a,u,s,f,c,d]}class Ga extends ke{constructor(e){super(),ye(this,e,BO,zO,be,{value:0,mask:1})}}function UO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b;return{c(){e=v("label"),t=B("Subject"),s=O(),l=v("input"),r=O(),a=v("div"),u=B(`Available placeholder parameters: + Admins`,p(i,"class","sidebar-title"),p(l,"href","/settings"),p(l,"class","sidebar-list-item"),p(r,"href","/settings/mail"),p(r,"class","sidebar-list-item"),p(u,"href","/settings/storage"),p(u,"class","sidebar-list-item"),p(c,"class","sidebar-title"),p(h,"href","/settings/export-collections"),p(h,"class","sidebar-list-item"),p(g,"href","/settings/import-collections"),p(g,"class","sidebar-list-item"),p(y,"class","sidebar-title"),p($,"href","/settings/auth-providers"),p($,"class","sidebar-list-item"),p(M,"href","/settings/tokens"),p(M,"class","sidebar-list-item"),p(D,"href","/settings/admins"),p(D,"class","sidebar-list-item"),p(t,"class","sidebar-content"),p(e,"class","page-sidebar settings-sidebar")},m(L,F){S(L,e,F),_(e,t),_(t,i),_(t,s),_(t,l),_(t,o),_(t,r),_(t,a),_(t,u),_(t,f),_(t,c),_(t,d),_(t,h),_(t,m),_(t,g),_(t,b),_(t,y),_(t,k),_(t,$),_(t,C),_(t,M),_(t,T),_(t,D),A||(I=[Ee(An.call(null,l,{path:"/settings"})),Ee(Ut.call(null,l)),Ee(An.call(null,r,{path:"/settings/mail/?.*"})),Ee(Ut.call(null,r)),Ee(An.call(null,u,{path:"/settings/storage/?.*"})),Ee(Ut.call(null,u)),Ee(An.call(null,h,{path:"/settings/export-collections/?.*"})),Ee(Ut.call(null,h)),Ee(An.call(null,g,{path:"/settings/import-collections/?.*"})),Ee(Ut.call(null,g)),Ee(An.call(null,$,{path:"/settings/auth-providers/?.*"})),Ee(Ut.call(null,$)),Ee(An.call(null,M,{path:"/settings/tokens/?.*"})),Ee(Ut.call(null,M)),Ee(An.call(null,D,{path:"/settings/admins/?.*"})),Ee(Ut.call(null,D))],A=!0)},p:ee,i:ee,o:ee,d(L){L&&w(e),A=!1,Pe(I)}}}class Ci extends ke{constructor(e){super(),ye(this,e,null,tO,be,{})}}function Jp(n,e,t){const i=n.slice();return i[30]=e[t],i}function Zp(n){let e,t;return e=new ge({props:{class:"form-field disabled",name:"id",$$slots:{default:[nO,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s[0]&536870914|s[1]&4&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function nO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="ID",o=O(),r=v("div"),a=v("i"),f=O(),c=v("input"),p(t,"class",W.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"for",l=n[29]),p(a,"class","ri-calendar-event-line txt-disabled"),p(r,"class","form-field-addon"),p(c,"type","text"),p(c,"id",d=n[29]),c.value=h=n[1].id,c.disabled=!0},m(b,y){S(b,e,y),_(e,t),_(e,i),_(e,s),S(b,o,y),S(b,r,y),_(r,a),S(b,f,y),S(b,c,y),m||(g=Ee(u=Ue.call(null,a,{text:`Created: ${n[1].created} +Updated: ${n[1].updated}`,position:"left"})),m=!0)},p(b,y){y[0]&536870912&&l!==(l=b[29])&&p(e,"for",l),u&&Jt(u.update)&&y[0]&2&&u.update.call(null,{text:`Created: ${b[1].created} +Updated: ${b[1].updated}`,position:"left"}),y[0]&536870912&&d!==(d=b[29])&&p(c,"id",d),y[0]&2&&h!==(h=b[1].id)&&c.value!==h&&(c.value=h)},d(b){b&&w(e),b&&w(o),b&&w(r),b&&w(f),b&&w(c),m=!1,g()}}}function Gp(n){let e,t,i,s,l,o,r;function a(){return n[17](n[30])}return{c(){e=v("button"),t=v("img"),s=O(),Ln(t.src,i="./images/avatars/avatar"+n[30]+".svg")||p(t,"src",i),p(t,"alt","Avatar "+n[30]),p(e,"type","button"),p(e,"class",l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))},m(u,f){S(u,e,f),_(e,t),_(e,s),o||(r=K(e,"click",a),o=!0)},p(u,f){n=u,f[0]&4&&l!==(l="link-fade thumb thumb-circle "+(n[30]==n[2]?"thumb-active":"thumb-sm"))&&p(e,"class",l)},d(u){u&&w(e),o=!1,r()}}}function iO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Email",o=O(),r=v("input"),p(t,"class",W.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","email"),p(r,"autocomplete","off"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),ce(r,n[3]),u||(f=K(r,"input",n[18]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&8&&r.value!==c[3]&&ce(r,c[3])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function Xp(n){let e,t;return e=new ge({props:{class:"form-field form-field-toggle",$$slots:{default:[sO,({uniqueId:i})=>({29:i}),({uniqueId:i})=>[i?536870912:0]]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s[0]&536870928|s[1]&4&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function sO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Change password"),p(e,"type","checkbox"),p(e,"id",t=n[29]),p(s,"for",o=n[29])},m(u,f){S(u,e,f),e.checked=n[4],S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[19]),r=!0)},p(u,f){f[0]&536870912&&t!==(t=u[29])&&p(e,"id",t),f[0]&16&&(e.checked=u[4]),f[0]&536870912&&o!==(o=u[29])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function Qp(n){let e,t,i,s,l,o,r,a,u;return s=new ge({props:{class:"form-field required",name:"password",$$slots:{default:[lO,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),r=new ge({props:{class:"form-field required",name:"passwordConfirm",$$slots:{default:[oO,({uniqueId:f})=>({29:f}),({uniqueId:f})=>[f?536870912:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),i=v("div"),j(s.$$.fragment),l=O(),o=v("div"),j(r.$$.fragment),p(i,"class","col-sm-6"),p(o,"class","col-sm-6"),p(t,"class","grid"),p(e,"class","col-12")},m(f,c){S(f,e,c),_(e,t),_(t,i),R(s,i,null),_(t,l),_(t,o),R(r,o,null),u=!0},p(f,c){const d={};c[0]&536871168|c[1]&4&&(d.$$scope={dirty:c,ctx:f}),s.$set(d);const h={};c[0]&536871424|c[1]&4&&(h.$$scope={dirty:c,ctx:f}),r.$set(h)},i(f){u||(E(s.$$.fragment,f),E(r.$$.fragment,f),f&&xe(()=>{a||(a=je(t,St,{duration:150},!0)),a.run(1)}),u=!0)},o(f){P(s.$$.fragment,f),P(r.$$.fragment,f),f&&(a||(a=je(t,St,{duration:150},!1)),a.run(0)),u=!1},d(f){f&&w(e),H(s),H(r),f&&a&&a.end()}}}function lO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),ce(r,n[8]),u||(f=K(r,"input",n[20]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&256&&r.value!==c[8]&&ce(r,c[8])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function oO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("label"),t=v("i"),i=O(),s=v("span"),s.textContent="Password confirm",o=O(),r=v("input"),p(t,"class","ri-lock-line"),p(s,"class","txt"),p(e,"for",l=n[29]),p(r,"type","password"),p(r,"autocomplete","new-password"),p(r,"id",a=n[29]),r.required=!0},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),S(c,o,d),S(c,r,d),ce(r,n[9]),u||(f=K(r,"input",n[21]),u=!0)},p(c,d){d[0]&536870912&&l!==(l=c[29])&&p(e,"for",l),d[0]&536870912&&a!==(a=c[29])&&p(r,"id",a),d[0]&512&&r.value!==c[9]&&ce(r,c[9])},d(c){c&&w(e),c&&w(o),c&&w(r),u=!1,f()}}}function rO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m=!n[1].isNew&&Zp(n),g=[0,1,2,3,4,5,6,7,8,9],b=[];for(let $=0;$<10;$+=1)b[$]=Gp(Jp(n,g,$));a=new ge({props:{class:"form-field required",name:"email",$$slots:{default:[iO,({uniqueId:$})=>({29:$}),({uniqueId:$})=>[$?536870912:0]]},$$scope:{ctx:n}}});let y=!n[1].isNew&&Xp(n),k=(n[1].isNew||n[4])&&Qp(n);return{c(){e=v("form"),m&&m.c(),t=O(),i=v("div"),s=v("p"),s.textContent="Avatar",l=O(),o=v("div");for(let $=0;$<10;$+=1)b[$].c();r=O(),j(a.$$.fragment),u=O(),y&&y.c(),f=O(),k&&k.c(),p(s,"class","section-title"),p(o,"class","flex flex-gap-xs flex-wrap"),p(i,"class","content"),p(e,"id",n[11]),p(e,"class","grid"),p(e,"autocomplete","off")},m($,C){S($,e,C),m&&m.m(e,null),_(e,t),_(e,i),_(i,s),_(i,l),_(i,o);for(let M=0;M<10;M+=1)b[M].m(o,null);_(e,r),R(a,e,null),_(e,u),y&&y.m(e,null),_(e,f),k&&k.m(e,null),c=!0,d||(h=K(e,"submit",ut(n[12])),d=!0)},p($,C){if($[1].isNew?m&&(pe(),P(m,1,1,()=>{m=null}),he()):m?(m.p($,C),C[0]&2&&E(m,1)):(m=Zp($),m.c(),E(m,1),m.m(e,t)),C[0]&4){g=[0,1,2,3,4,5,6,7,8,9];let T;for(T=0;T<10;T+=1){const D=Jp($,g,T);b[T]?b[T].p(D,C):(b[T]=Gp(D),b[T].c(),b[T].m(o,null))}for(;T<10;T+=1)b[T].d(1)}const M={};C[0]&536870920|C[1]&4&&(M.$$scope={dirty:C,ctx:$}),a.$set(M),$[1].isNew?y&&(pe(),P(y,1,1,()=>{y=null}),he()):y?(y.p($,C),C[0]&2&&E(y,1)):(y=Xp($),y.c(),E(y,1),y.m(e,f)),$[1].isNew||$[4]?k?(k.p($,C),C[0]&18&&E(k,1)):(k=Qp($),k.c(),E(k,1),k.m(e,null)):k&&(pe(),P(k,1,1,()=>{k=null}),he())},i($){c||(E(m),E(a.$$.fragment,$),E(y),E(k),c=!0)},o($){P(m),P(a.$$.fragment,$),P(y),P(k),c=!1},d($){$&&w(e),m&&m.d(),Mt(b,$),H(a),y&&y.d(),k&&k.d(),d=!1,h()}}}function aO(n){let e,t=n[1].isNew?"New admin":"Edit admin",i;return{c(){e=v("h4"),i=B(t)},m(s,l){S(s,e,l),_(e,i)},p(s,l){l[0]&2&&t!==(t=s[1].isNew?"New admin":"Edit admin")&&re(i,t)},d(s){s&&w(e)}}}function xp(n){let e,t,i,s,l,o,r,a,u;return o=new Zn({props:{class:"dropdown dropdown-upside dropdown-left dropdown-nowrap",$$slots:{default:[uO]},$$scope:{ctx:n}}}),{c(){e=v("button"),t=v("span"),i=O(),s=v("i"),l=O(),j(o.$$.fragment),r=O(),a=v("div"),p(s,"class","ri-more-line"),p(e,"type","button"),p(e,"class","btn btn-sm btn-circle btn-secondary"),p(a,"class","flex-fill")},m(f,c){S(f,e,c),_(e,t),_(e,i),_(e,s),_(e,l),R(o,e,null),S(f,r,c),S(f,a,c),u=!0},p(f,c){const d={};c[1]&4&&(d.$$scope={dirty:c,ctx:f}),o.$set(d)},i(f){u||(E(o.$$.fragment,f),u=!0)},o(f){P(o.$$.fragment,f),u=!1},d(f){f&&w(e),H(o),f&&w(r),f&&w(a)}}}function uO(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` + Delete`,p(e,"type","button"),p(e,"class","dropdown-item txt-danger")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[15]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function fO(n){let e,t,i,s,l,o,r=n[1].isNew?"Create":"Save changes",a,u,f,c,d,h=!n[1].isNew&&xp(n);return{c(){h&&h.c(),e=O(),t=v("button"),i=v("span"),i.textContent="Cancel",s=O(),l=v("button"),o=v("span"),a=B(r),p(i,"class","txt"),p(t,"type","button"),p(t,"class","btn btn-secondary"),t.disabled=n[6],p(o,"class","txt"),p(l,"type","submit"),p(l,"form",n[11]),p(l,"class","btn btn-expanded"),l.disabled=u=!n[10]||n[6],ne(l,"btn-loading",n[6])},m(m,g){h&&h.m(m,g),S(m,e,g),S(m,t,g),_(t,i),S(m,s,g),S(m,l,g),_(l,o),_(o,a),f=!0,c||(d=K(t,"click",n[16]),c=!0)},p(m,g){m[1].isNew?h&&(pe(),P(h,1,1,()=>{h=null}),he()):h?(h.p(m,g),g[0]&2&&E(h,1)):(h=xp(m),h.c(),E(h,1),h.m(e.parentNode,e)),(!f||g[0]&64)&&(t.disabled=m[6]),(!f||g[0]&2)&&r!==(r=m[1].isNew?"Create":"Save changes")&&re(a,r),(!f||g[0]&1088&&u!==(u=!m[10]||m[6]))&&(l.disabled=u),(!f||g[0]&64)&&ne(l,"btn-loading",m[6])},i(m){f||(E(h),f=!0)},o(m){P(h),f=!1},d(m){h&&h.d(m),m&&w(e),m&&w(t),m&&w(s),m&&w(l),c=!1,d()}}}function cO(n){let e,t,i={popup:!0,class:"admin-panel",beforeHide:n[22],$$slots:{footer:[fO],header:[aO],default:[rO]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[23](e),e.$on("hide",n[24]),e.$on("show",n[25]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,l){const o={};l[0]&1152&&(o.beforeHide=s[22]),l[0]&1886|l[1]&4&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[23](null),H(e,s)}}}function dO(n,e,t){let i;const s=It(),l="admin_"+W.randomString(5);let o,r=new Yi,a=!1,u=!1,f=0,c="",d="",h="",m=!1;function g(ie){return y(ie),t(7,u=!0),o==null?void 0:o.show()}function b(){return o==null?void 0:o.hide()}function y(ie){t(1,r=ie!=null&&ie.clone?ie.clone():new Yi),k()}function k(){t(4,m=!1),t(3,c=(r==null?void 0:r.email)||""),t(2,f=(r==null?void 0:r.avatar)||0),t(8,d=""),t(9,h=""),Fn({})}function $(){if(a||!i)return;t(6,a=!0);const ie={email:c,avatar:f};(r.isNew||m)&&(ie.password=d,ie.passwordConfirm=h);let Q;r.isNew?Q=de.admins.create(ie):Q=de.admins.update(r.id,ie),Q.then(async X=>{var Y;t(7,u=!1),b(),Lt(r.isNew?"Successfully created admin.":"Successfully updated admin."),s("save",X),((Y=de.authStore.model)==null?void 0:Y.id)===X.id&&de.authStore.save(de.authStore.token,X)}).catch(X=>{de.errorResponseHandler(X)}).finally(()=>{t(6,a=!1)})}function C(){!(r!=null&&r.id)||wn("Do you really want to delete the selected admin?",()=>de.admins.delete(r.id).then(()=>{t(7,u=!1),b(),Lt("Successfully deleted admin."),s("delete",r)}).catch(ie=>{de.errorResponseHandler(ie)}))}const M=()=>C(),T=()=>b(),D=ie=>t(2,f=ie);function A(){c=this.value,t(3,c)}function I(){m=this.checked,t(4,m)}function L(){d=this.value,t(8,d)}function F(){h=this.value,t(9,h)}const q=()=>i&&u?(wn("You have unsaved changes. Do you really want to close the panel?",()=>{t(7,u=!1),b()}),!1):!0;function z(ie){le[ie?"unshift":"push"](()=>{o=ie,t(5,o)})}function J(ie){Ve.call(this,n,ie)}function G(ie){Ve.call(this,n,ie)}return n.$$.update=()=>{n.$$.dirty[0]&30&&t(10,i=r.isNew&&c!=""||m||c!==r.email||f!==r.avatar)},[b,r,f,c,m,o,a,u,d,h,i,l,$,C,g,M,T,D,A,I,L,F,q,z,J,G]}class pO extends ke{constructor(e){super(),ye(this,e,dO,cO,be,{show:14,hide:0},null,[-1,-1])}get show(){return this.$$.ctx[14]}get hide(){return this.$$.ctx[0]}}function eh(n,e,t){const i=n.slice();return i[24]=e[t],i}function hO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="id",p(t,"class",W.getFieldTypeIcon("primary")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:ee,d(l){l&&w(e)}}}function mO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="email",p(t,"class",W.getFieldTypeIcon("email")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:ee,d(l){l&&w(e)}}}function gO(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="created",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:ee,d(l){l&&w(e)}}}function _O(n){let e,t,i,s;return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),s.textContent="updated",p(t,"class",W.getFieldTypeIcon("date")),p(s,"class","txt"),p(e,"class","col-header-content")},m(l,o){S(l,e,o),_(e,t),_(e,i),_(e,s)},p:ee,d(l){l&&w(e)}}}function th(n){let e;function t(l,o){return l[5]?vO:bO}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function bO(n){var r;let e,t,i,s,l,o=((r=n[1])==null?void 0:r.length)&&nh(n);return{c(){e=v("tr"),t=v("td"),i=v("h6"),i.textContent="No admins found.",s=O(),o&&o.c(),l=O(),p(t,"colspan","99"),p(t,"class","txt-center txt-hint p-xs")},m(a,u){S(a,e,u),_(e,t),_(t,i),_(t,s),o&&o.m(t,null),_(e,l)},p(a,u){var f;(f=a[1])!=null&&f.length?o?o.p(a,u):(o=nh(a),o.c(),o.m(t,null)):o&&(o.d(1),o=null)},d(a){a&&w(e),o&&o.d()}}}function vO(n){let e;return{c(){e=v("tr"),e.innerHTML=` + `},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function nh(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear filters',p(e,"type","button"),p(e,"class","btn btn-hint btn-expanded m-t-sm")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[17]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function ih(n){let e;return{c(){e=v("span"),e.textContent="You",p(e,"class","label label-warning m-l-5")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function sh(n,e){let t,i,s,l,o,r,a,u,f,c,d,h,m=e[24].email+"",g,b,y,k,$,C,M,T,D,A,I,L,F,q;u=new Ga({props:{id:e[24].id}});let z=e[24].id===e[7].id&&ih();$=new Ki({props:{date:e[24].created}}),T=new Ki({props:{date:e[24].updated}});function J(){return e[15](e[24])}function G(...ie){return e[16](e[24],...ie)}return{key:n,first:null,c(){t=v("tr"),i=v("td"),s=v("figure"),l=v("img"),r=O(),a=v("td"),j(u.$$.fragment),f=O(),z&&z.c(),c=O(),d=v("td"),h=v("span"),g=B(m),y=O(),k=v("td"),j($.$$.fragment),C=O(),M=v("td"),j(T.$$.fragment),D=O(),A=v("td"),A.innerHTML='',I=O(),Ln(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg")||p(l,"src",o),p(l,"alt","Admin avatar"),p(s,"class","thumb thumb-sm thumb-circle"),p(i,"class","min-width"),p(a,"class","col-type-text col-field-id"),p(h,"class","txt txt-ellipsis"),p(h,"title",b=e[24].email),p(d,"class","col-type-email col-field-email"),p(k,"class","col-type-date col-field-created"),p(M,"class","col-type-date col-field-updated"),p(A,"class","col-type-action min-width"),p(t,"tabindex","0"),p(t,"class","row-handle"),this.first=t},m(ie,Q){S(ie,t,Q),_(t,i),_(i,s),_(s,l),_(t,r),_(t,a),R(u,a,null),_(a,f),z&&z.m(a,null),_(t,c),_(t,d),_(d,h),_(h,g),_(t,y),_(t,k),R($,k,null),_(t,C),_(t,M),R(T,M,null),_(t,D),_(t,A),_(t,I),L=!0,F||(q=[K(t,"click",J),K(t,"keydown",G)],F=!0)},p(ie,Q){e=ie,(!L||Q&16&&!Ln(l.src,o="./images/avatars/avatar"+(e[24].avatar||0)+".svg"))&&p(l,"src",o);const X={};Q&16&&(X.id=e[24].id),u.$set(X),e[24].id===e[7].id?z||(z=ih(),z.c(),z.m(a,null)):z&&(z.d(1),z=null),(!L||Q&16)&&m!==(m=e[24].email+"")&&re(g,m),(!L||Q&16&&b!==(b=e[24].email))&&p(h,"title",b);const Y={};Q&16&&(Y.date=e[24].created),$.$set(Y);const x={};Q&16&&(x.date=e[24].updated),T.$set(x)},i(ie){L||(E(u.$$.fragment,ie),E($.$$.fragment,ie),E(T.$$.fragment,ie),L=!0)},o(ie){P(u.$$.fragment,ie),P($.$$.fragment,ie),P(T.$$.fragment,ie),L=!1},d(ie){ie&&w(t),H(u),z&&z.d(),H($),H(T),F=!1,Pe(q)}}}function yO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,b,y,k,$,C,M=[],T=new Map,D;function A(Y){n[11](Y)}let I={class:"col-type-text",name:"id",$$slots:{default:[hO]},$$scope:{ctx:n}};n[2]!==void 0&&(I.sort=n[2]),o=new Ft({props:I}),le.push(()=>_e(o,"sort",A));function L(Y){n[12](Y)}let F={class:"col-type-email col-field-email",name:"email",$$slots:{default:[mO]},$$scope:{ctx:n}};n[2]!==void 0&&(F.sort=n[2]),u=new Ft({props:F}),le.push(()=>_e(u,"sort",L));function q(Y){n[13](Y)}let z={class:"col-type-date col-field-created",name:"created",$$slots:{default:[gO]},$$scope:{ctx:n}};n[2]!==void 0&&(z.sort=n[2]),d=new Ft({props:z}),le.push(()=>_e(d,"sort",q));function J(Y){n[14](Y)}let G={class:"col-type-date col-field-updated",name:"updated",$$slots:{default:[_O]},$$scope:{ctx:n}};n[2]!==void 0&&(G.sort=n[2]),g=new Ft({props:G}),le.push(()=>_e(g,"sort",J));let ie=n[4];const Q=Y=>Y[24].id;for(let Y=0;Yr=!1)),o.$set(U);const ae={};x&134217728&&(ae.$$scope={dirty:x,ctx:Y}),!f&&x&4&&(f=!0,ae.sort=Y[2],ve(()=>f=!1)),u.$set(ae);const Re={};x&134217728&&(Re.$$scope={dirty:x,ctx:Y}),!h&&x&4&&(h=!0,Re.sort=Y[2],ve(()=>h=!1)),d.$set(Re);const Ne={};x&134217728&&(Ne.$$scope={dirty:x,ctx:Y}),!b&&x&4&&(b=!0,Ne.sort=Y[2],ve(()=>b=!1)),g.$set(Ne),x&186&&(ie=Y[4],pe(),M=bt(M,x,Q,1,Y,ie,T,C,nn,sh,null,eh),he(),!ie.length&&X?X.p(Y,x):ie.length?X&&(X.d(1),X=null):(X=th(Y),X.c(),X.m(C,null))),(!D||x&32)&&ne(e,"table-loading",Y[5])},i(Y){if(!D){E(o.$$.fragment,Y),E(u.$$.fragment,Y),E(d.$$.fragment,Y),E(g.$$.fragment,Y);for(let x=0;x + New admin`,h=O(),j(m.$$.fragment),g=O(),j(b.$$.fragment),y=O(),T&&T.c(),k=Ae(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(f,"class","flex-fill"),p(d,"type","button"),p(d,"class","btn btn-expanded"),p(e,"class","page-header")},m(D,A){S(D,e,A),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),_(e,r),R(a,e,null),_(e,u),_(e,f),_(e,c),_(e,d),S(D,h,A),R(m,D,A),S(D,g,A),R(b,D,A),S(D,y,A),T&&T.m(D,A),S(D,k,A),$=!0,C||(M=K(d,"click",n[9]),C=!0)},p(D,A){(!$||A&64)&&re(o,D[6]);const I={};A&2&&(I.value=D[1]),m.$set(I);const L={};A&134217918&&(L.$$scope={dirty:A,ctx:D}),b.$set(L),D[4].length?T?T.p(D,A):(T=lh(D),T.c(),T.m(k.parentNode,k)):T&&(T.d(1),T=null)},i(D){$||(E(a.$$.fragment,D),E(m.$$.fragment,D),E(b.$$.fragment,D),$=!0)},o(D){P(a.$$.fragment,D),P(m.$$.fragment,D),P(b.$$.fragment,D),$=!1},d(D){D&&w(e),H(a),D&&w(h),H(m,D),D&&w(g),H(b,D),D&&w(y),T&&T.d(D),D&&w(k),C=!1,M()}}}function wO(n){let e,t,i,s,l,o;e=new Ci({}),i=new pn({props:{$$slots:{default:[kO]},$$scope:{ctx:n}}});let r={};return l=new pO({props:r}),n[18](l),l.$on("save",n[19]),l.$on("delete",n[20]),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment),s=O(),j(l.$$.fragment)},m(a,u){R(e,a,u),S(a,t,u),R(i,a,u),S(a,s,u),R(l,a,u),o=!0},p(a,[u]){const f={};u&134217982&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(E(e.$$.fragment,a),E(i.$$.fragment,a),E(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&w(t),H(i,a),a&&w(s),n[18](null),H(l,a)}}}function SO(n,e,t){let i,s,l;Ze(n,ua,F=>t(21,i=F)),Ze(n,mt,F=>t(6,s=F)),Ze(n,ka,F=>t(7,l=F)),Ht(mt,s="Admins",s);const o=new URLSearchParams(i);let r,a=[],u=!1,f=o.get("filter")||"",c=o.get("sort")||"-created";function d(){return t(5,u=!0),t(4,a=[]),de.admins.getFullList(100,{sort:c||"-created",filter:f}).then(F=>{t(4,a=F),t(5,u=!1)}).catch(F=>{F!=null&&F.isAbort||(t(5,u=!1),console.warn(F),h(),de.errorResponseHandler(F,!1))})}function h(){t(4,a=[])}const m=()=>d(),g=()=>r==null?void 0:r.show(),b=F=>t(1,f=F.detail);function y(F){c=F,t(2,c)}function k(F){c=F,t(2,c)}function $(F){c=F,t(2,c)}function C(F){c=F,t(2,c)}const M=F=>r==null?void 0:r.show(F),T=(F,q)=>{(q.code==="Enter"||q.code==="Space")&&(q.preventDefault(),r==null||r.show(F))},D=()=>t(1,f="");function A(F){le[F?"unshift":"push"](()=>{r=F,t(3,r)})}const I=()=>d(),L=()=>d();return n.$$.update=()=>{if(n.$$.dirty&6&&c!==-1&&f!==-1){const F=new URLSearchParams({filter:f,sort:c}).toString();ki("/settings/admins?"+F),d()}},[d,f,c,r,a,u,s,l,m,g,b,y,k,$,C,M,T,D,A,I,L]}class $O extends ke{constructor(e){super(),ye(this,e,SO,wO,be,{loadAdmins:0})}get loadAdmins(){return this.$$.ctx[0]}}function CO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Email"),s=O(),l=v("input"),p(e,"for",i=n[8]),p(l,"type","email"),p(l,"id",o=n[8]),l.required=!0,l.autofocus=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0]),l.focus(),r||(a=K(l,"input",n[4]),r=!0)},p(u,f){f&256&&i!==(i=u[8])&&p(e,"for",i),f&256&&o!==(o=u[8])&&p(l,"id",o),f&1&&l.value!==u[0]&&ce(l,u[0])},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function TO(n){let e,t,i,s,l,o,r,a,u,f,c;return{c(){e=v("label"),t=B("Password"),s=O(),l=v("input"),r=O(),a=v("div"),u=v("a"),u.textContent="Forgotten password?",p(e,"for",i=n[8]),p(l,"type","password"),p(l,"id",o=n[8]),l.required=!0,p(u,"href","/request-password-reset"),p(u,"class","link-hint"),p(a,"class","help-block")},m(d,h){S(d,e,h),_(e,t),S(d,s,h),S(d,l,h),ce(l,n[1]),S(d,r,h),S(d,a,h),_(a,u),f||(c=[K(l,"input",n[5]),Ee(Ut.call(null,u))],f=!0)},p(d,h){h&256&&i!==(i=d[8])&&p(e,"for",i),h&256&&o!==(o=d[8])&&p(l,"id",o),h&2&&l.value!==d[1]&&ce(l,d[1])},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),d&&w(a),f=!1,Pe(c)}}}function MO(n){let e,t,i,s,l,o,r,a,u,f,c;return s=new ge({props:{class:"form-field required",name:"identity",$$slots:{default:[CO,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:"password",$$slots:{default:[TO,({uniqueId:d})=>({8:d}),({uniqueId:d})=>d?256:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),t=v("div"),t.innerHTML="

    Admin sign in

    ",i=O(),j(s.$$.fragment),l=O(),j(o.$$.fragment),r=O(),a=v("button"),a.innerHTML=`Login + `,p(t,"class","content txt-center m-b-base"),p(a,"type","submit"),p(a,"class","btn btn-lg btn-block btn-next"),ne(a,"btn-disabled",n[2]),ne(a,"btn-loading",n[2]),p(e,"class","block")},m(d,h){S(d,e,h),_(e,t),_(e,i),R(s,e,null),_(e,l),R(o,e,null),_(e,r),_(e,a),u=!0,f||(c=K(e,"submit",ut(n[3])),f=!0)},p(d,h){const m={};h&769&&(m.$$scope={dirty:h,ctx:d}),s.$set(m);const g={};h&770&&(g.$$scope={dirty:h,ctx:d}),o.$set(g),(!u||h&4)&&ne(a,"btn-disabled",d[2]),(!u||h&4)&&ne(a,"btn-loading",d[2])},i(d){u||(E(s.$$.fragment,d),E(o.$$.fragment,d),u=!0)},o(d){P(s.$$.fragment,d),P(o.$$.fragment,d),u=!1},d(d){d&&w(e),H(s),H(o),f=!1,c()}}}function OO(n){let e,t;return e=new Lg({props:{$$slots:{default:[MO]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,[s]){const l={};s&519&&(l.$$scope={dirty:s,ctx:i}),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function DO(n,e,t){let i;Ze(n,ua,c=>t(6,i=c));const s=new URLSearchParams(i);let l=s.get("demoEmail")||"",o=s.get("demoPassword")||"",r=!1;function a(){if(!r)return t(2,r=!0),de.admins.authWithPassword(l,o).then(()=>{Pg(),ki("/")}).catch(()=>{cl("Invalid login credentials.")}).finally(()=>{t(2,r=!1)})}function u(){l=this.value,t(0,l)}function f(){o=this.value,t(1,o)}return[l,o,r,a,u,f]}class AO extends ke{constructor(e){super(),ye(this,e,DO,OO,be,{})}}function EO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,b,y,k,$,C,M;i=new ge({props:{class:"form-field required",name:"meta.appName",$$slots:{default:[PO,({uniqueId:D})=>({19:D}),({uniqueId:D})=>D?524288:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:"meta.appUrl",$$slots:{default:[LO,({uniqueId:D})=>({19:D}),({uniqueId:D})=>D?524288:0]},$$scope:{ctx:n}}}),a=new ge({props:{class:"form-field required",name:"logs.maxDays",$$slots:{default:[NO,({uniqueId:D})=>({19:D}),({uniqueId:D})=>D?524288:0]},$$scope:{ctx:n}}}),f=new ge({props:{class:"form-field form-field-toggle",name:"meta.hideControls",$$slots:{default:[FO,({uniqueId:D})=>({19:D}),({uniqueId:D})=>D?524288:0]},$$scope:{ctx:n}}});let T=n[3]&&oh(n);return{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),j(a.$$.fragment),u=O(),j(f.$$.fragment),c=O(),d=v("div"),h=v("div"),m=O(),T&&T.c(),g=O(),b=v("button"),y=v("span"),y.textContent="Save changes",p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(h,"class","flex-fill"),p(y,"class","txt"),p(b,"type","submit"),p(b,"class","btn btn-expanded"),b.disabled=k=!n[3]||n[2],ne(b,"btn-loading",n[2]),p(d,"class","col-lg-12 flex"),p(e,"class","grid")},m(D,A){S(D,e,A),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),R(a,e,null),_(e,u),R(f,e,null),_(e,c),_(e,d),_(d,h),_(d,m),T&&T.m(d,null),_(d,g),_(d,b),_(b,y),$=!0,C||(M=K(b,"click",n[13]),C=!0)},p(D,A){const I={};A&1572865&&(I.$$scope={dirty:A,ctx:D}),i.$set(I);const L={};A&1572865&&(L.$$scope={dirty:A,ctx:D}),o.$set(L);const F={};A&1572865&&(F.$$scope={dirty:A,ctx:D}),a.$set(F);const q={};A&1572865&&(q.$$scope={dirty:A,ctx:D}),f.$set(q),D[3]?T?T.p(D,A):(T=oh(D),T.c(),T.m(d,g)):T&&(T.d(1),T=null),(!$||A&12&&k!==(k=!D[3]||D[2]))&&(b.disabled=k),(!$||A&4)&&ne(b,"btn-loading",D[2])},i(D){$||(E(i.$$.fragment,D),E(o.$$.fragment,D),E(a.$$.fragment,D),E(f.$$.fragment,D),$=!0)},o(D){P(i.$$.fragment,D),P(o.$$.fragment,D),P(a.$$.fragment,D),P(f.$$.fragment,D),$=!1},d(D){D&&w(e),H(i),H(o),H(a),H(f),T&&T.d(),C=!1,M()}}}function IO(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&w(e)}}}function PO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Application name"),s=O(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].meta.appName),r||(a=K(l,"input",n[8]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].meta.appName&&ce(l,u[0].meta.appName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function LO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Application url"),s=O(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","text"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].meta.appUrl),r||(a=K(l,"input",n[9]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&l.value!==u[0].meta.appUrl&&ce(l,u[0].meta.appUrl)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function NO(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Logs max days retention"),s=O(),l=v("input"),p(e,"for",i=n[19]),p(l,"type","number"),p(l,"id",o=n[19]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].logs.maxDays),r||(a=K(l,"input",n[10]),r=!0)},p(u,f){f&524288&&i!==(i=u[19])&&p(e,"for",i),f&524288&&o!==(o=u[19])&&p(l,"id",o),f&1&&rt(l.value)!==u[0].logs.maxDays&&ce(l,u[0].logs.maxDays)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function FO(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Hide collection create and edit controls",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[19]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[19])},m(c,d){S(c,e,d),e.checked=n[0].meta.hideControls,S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[K(e,"change",n[11]),Ee(Ue.call(null,r,{text:"This could prevent making accidental schema changes when in production environment.",position:"right"}))],u=!0)},p(c,d){d&524288&&t!==(t=c[19])&&p(e,"id",t),d&1&&(e.checked=c[0].meta.hideControls),d&524288&&a!==(a=c[19])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Pe(f)}}}function oh(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary btn-hint"),e.disabled=n[2]},m(l,o){S(l,e,o),_(e,t),i||(s=K(e,"click",n[12]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&w(e),i=!1,s()}}}function RO(n){let e,t,i,s,l,o,r,a,u;const f=[IO,EO],c=[];function d(h,m){return h[1]?0:1}return l=d(n),o=c[l]=f[l](n),{c(){e=v("header"),e.innerHTML=``,t=O(),i=v("div"),s=v("form"),o.c(),p(e,"class","page-header"),p(s,"class","panel"),p(s,"autocomplete","off"),p(i,"class","wrapper")},m(h,m){S(h,e,m),S(h,t,m),S(h,i,m),_(i,s),c[l].m(s,null),r=!0,a||(u=K(s,"submit",ut(n[4])),a=!0)},p(h,m){let g=l;l=d(h),l===g?c[l].p(h,m):(pe(),P(c[g],1,1,()=>{c[g]=null}),he(),o=c[l],o?o.p(h,m):(o=c[l]=f[l](h),o.c()),E(o,1),o.m(s,null))},i(h){r||(E(o),r=!0)},o(h){P(o),r=!1},d(h){h&&w(e),h&&w(t),h&&w(i),c[l].d(),a=!1,u()}}}function HO(n){let e,t,i,s;return e=new Ci({}),i=new pn({props:{$$slots:{default:[RO]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(l,o){R(e,l,o),S(l,t,o),R(i,l,o),s=!0},p(l,[o]){const r={};o&1048591&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function jO(n,e,t){let i,s,l,o;Ze(n,Cs,T=>t(14,s=T)),Ze(n,yo,T=>t(15,l=T)),Ze(n,mt,T=>t(16,o=T)),Ht(mt,o="Application settings",o);let r={},a={},u=!1,f=!1,c="";d();async function d(){t(1,u=!0);try{const T=await de.settings.getAll()||{};m(T)}catch(T){de.errorResponseHandler(T)}t(1,u=!1)}async function h(){if(!(f||!i)){t(2,f=!0);try{const T=await de.settings.update(W.filterRedactedProps(a));m(T),Lt("Successfully saved application settings.")}catch(T){de.errorResponseHandler(T)}t(2,f=!1)}}function m(T={}){var D,A;Ht(yo,l=(D=T==null?void 0:T.meta)==null?void 0:D.appName,l),Ht(Cs,s=!!((A=T==null?void 0:T.meta)!=null&&A.hideControls),s),t(0,a={meta:(T==null?void 0:T.meta)||{},logs:(T==null?void 0:T.logs)||{}}),t(6,r=JSON.parse(JSON.stringify(a)))}function g(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function b(){a.meta.appName=this.value,t(0,a)}function y(){a.meta.appUrl=this.value,t(0,a)}function k(){a.logs.maxDays=rt(this.value),t(0,a)}function $(){a.meta.hideControls=this.checked,t(0,a)}const C=()=>g(),M=()=>h();return n.$$.update=()=>{n.$$.dirty&64&&t(7,c=JSON.stringify(r)),n.$$.dirty&129&&t(3,i=c!=JSON.stringify(a))},[a,u,f,i,h,g,r,c,b,y,k,$,C,M]}class qO extends ke{constructor(e){super(),ye(this,e,jO,HO,be,{})}}function VO(n){let e,t,i,s=[{type:"password"},{autocomplete:"new-password"},n[5]],l={};for(let o=0;o',i=O(),s=v("input"),p(t,"type","button"),p(t,"class","btn btn-secondary btn-circle"),p(e,"class","form-field-addon"),Un(s,a)},m(u,f){S(u,e,f),_(e,t),S(u,i,f),S(u,s,f),s.autofocus&&s.focus(),l||(o=[Ee(Ue.call(null,t,{position:"left",text:"Set new value"})),K(t,"click",n[6])],l=!0)},p(u,f){Un(s,a=Zt(r,[{readOnly:!0},{type:"text"},f&2&&{placeholder:u[1]},f&32&&u[5]]))},d(u){u&&w(e),u&&w(i),u&&w(s),l=!1,Pe(o)}}}function BO(n){let e;function t(l,o){return l[3]?zO:VO}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,[o]){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},i:ee,o:ee,d(l){s.d(l),l&&w(e)}}}function UO(n,e,t){const i=["value","mask"];let s=wt(e,i),{value:l=""}=e,{mask:o="******"}=e,r,a=!1;async function u(){t(0,l=""),t(3,a=!1),await Tn(),r==null||r.focus()}const f=()=>u();function c(h){le[h?"unshift":"push"](()=>{r=h,t(2,r)})}function d(){l=this.value,t(0,l)}return n.$$set=h=>{e=Ke(Ke({},e),Wn(h)),t(5,s=wt(e,i)),"value"in h&&t(0,l=h.value),"mask"in h&&t(1,o=h.mask)},n.$$.update=()=>{n.$$.dirty&3&&l===o&&t(3,a=!0)},[l,o,r,a,u,s,f,c,d]}class Xa extends ke{constructor(e){super(),ye(this,e,UO,BO,be,{value:0,mask:1})}}function WO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g;return{c(){e=v("label"),t=B("Subject"),s=O(),l=v("input"),r=O(),a=v("div"),u=B(`Available placeholder parameters: `),f=v("span"),f.textContent=`{APP_NAME} `,c=B(`, `),d=v("span"),d.textContent=`{APP_URL} - `,h=B("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"class","label label-sm link-primary txt-mono"),p(d,"class","label label-sm link-primary txt-mono"),p(a,"class","help-block")},m(g,y){S(g,e,y),_(e,t),S(g,s,y),S(g,l,y),ce(l,n[0].subject),S(g,r,y),S(g,a,y),_(a,u),_(a,f),_(a,c),_(a,d),_(a,h),m||(b=[K(l,"input",n[13]),K(f,"click",n[14]),K(d,"click",n[15])],m=!0)},p(g,y){y[1]&1&&i!==(i=g[31])&&p(e,"for",i),y[1]&1&&o!==(o=g[31])&&p(l,"id",o),y[0]&1&&l.value!==g[0].subject&&ce(l,g[0].subject)},d(g){g&&w(e),g&&w(s),g&&w(l),g&&w(r),g&&w(a),m=!1,Pe(b)}}}function WO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y;return{c(){e=v("label"),t=B("Action URL"),s=O(),l=v("input"),r=O(),a=v("div"),u=B(`Available placeholder parameters: + `,h=B("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"class","label label-sm link-primary txt-mono"),p(d,"class","label label-sm link-primary txt-mono"),p(a,"class","help-block")},m(b,y){S(b,e,y),_(e,t),S(b,s,y),S(b,l,y),ce(l,n[0].subject),S(b,r,y),S(b,a,y),_(a,u),_(a,f),_(a,c),_(a,d),_(a,h),m||(g=[K(l,"input",n[13]),K(f,"click",n[14]),K(d,"click",n[15])],m=!0)},p(b,y){y[1]&1&&i!==(i=b[31])&&p(e,"for",i),y[1]&1&&o!==(o=b[31])&&p(l,"id",o),y[0]&1&&l.value!==b[0].subject&&ce(l,b[0].subject)},d(b){b&&w(e),b&&w(s),b&&w(l),b&&w(r),b&&w(a),m=!1,Pe(g)}}}function YO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,b,y;return{c(){e=v("label"),t=B("Action URL"),s=O(),l=v("input"),r=O(),a=v("div"),u=B(`Available placeholder parameters: `),f=v("span"),f.textContent=`{APP_NAME} `,c=B(`, `),d=v("span"),d.textContent=`{APP_URL} `,h=B(`, - `),m=v("span"),m.textContent="{TOKEN}",b=B("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"class","label label-sm link-primary txt-mono"),p(d,"class","label label-sm link-primary txt-mono"),p(m,"class","label label-sm link-primary txt-mono"),p(m,"title","Required parameter"),p(a,"class","help-block")},m(k,$){S(k,e,$),_(e,t),S(k,s,$),S(k,l,$),ce(l,n[0].actionUrl),S(k,r,$),S(k,a,$),_(a,u),_(a,f),_(a,c),_(a,d),_(a,h),_(a,m),_(a,b),g||(y=[K(l,"input",n[16]),K(f,"click",n[17]),K(d,"click",n[18]),K(m,"click",n[19])],g=!0)},p(k,$){$[1]&1&&i!==(i=k[31])&&p(e,"for",i),$[1]&1&&o!==(o=k[31])&&p(l,"id",o),$[0]&1&&l.value!==k[0].actionUrl&&ce(l,k[0].actionUrl)},d(k){k&&w(e),k&&w(s),k&&w(l),k&&w(r),k&&w(a),g=!1,Pe(y)}}}function YO(n){let e,t,i,s;return{c(){e=v("textarea"),p(e,"id",t=n[31]),p(e,"class","txt-mono"),p(e,"spellcheck","false"),p(e,"rows","14"),e.required=!0},m(l,o){S(l,e,o),ce(e,n[0].body),i||(s=K(e,"input",n[21]),i=!0)},p(l,o){o[1]&1&&t!==(t=l[31])&&p(e,"id",t),o[0]&1&&ce(e,l[0].body)},i:te,o:te,d(l){l&&w(e),i=!1,s()}}}function KO(n){let e,t,i,s;function l(a){n[20](a)}var o=n[4];function r(a){let u={id:a[31],language:"html"};return a[0].body!==void 0&&(u.value=a[0].body),{props:u}}return o&&(e=jt(o,r(n)),le.push(()=>_e(e,"value",l))),{c(){e&&j(e.$$.fragment),i=Ee()},m(a,u){e&&R(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u[1]&1&&(f.id=a[31]),!t&&u[0]&1&&(t=!0,f.value=a[0].body,ve(()=>t=!1)),o!==(o=a[4])){if(e){pe();const c=e;P(c.$$.fragment,1,0,()=>{H(c,1)}),he()}o?(e=jt(o,r(a)),le.push(()=>_e(e,"value",l)),j(e.$$.fragment),E(e.$$.fragment,1),R(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&E(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&H(e,a)}}}function JO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C;const M=[KO,YO],T=[];function D(A,I){return A[4]&&!A[5]?0:1}return l=D(n),o=T[l]=M[l](n),{c(){e=v("label"),t=B("Body (HTML)"),s=O(),o.c(),r=O(),a=v("div"),u=B(`Available placeholder parameters: + `),m=v("span"),m.textContent="{TOKEN}",g=B("."),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),p(l,"spellcheck","false"),l.required=!0,p(f,"class","label label-sm link-primary txt-mono"),p(d,"class","label label-sm link-primary txt-mono"),p(m,"class","label label-sm link-primary txt-mono"),p(m,"title","Required parameter"),p(a,"class","help-block")},m(k,$){S(k,e,$),_(e,t),S(k,s,$),S(k,l,$),ce(l,n[0].actionUrl),S(k,r,$),S(k,a,$),_(a,u),_(a,f),_(a,c),_(a,d),_(a,h),_(a,m),_(a,g),b||(y=[K(l,"input",n[16]),K(f,"click",n[17]),K(d,"click",n[18]),K(m,"click",n[19])],b=!0)},p(k,$){$[1]&1&&i!==(i=k[31])&&p(e,"for",i),$[1]&1&&o!==(o=k[31])&&p(l,"id",o),$[0]&1&&l.value!==k[0].actionUrl&&ce(l,k[0].actionUrl)},d(k){k&&w(e),k&&w(s),k&&w(l),k&&w(r),k&&w(a),b=!1,Pe(y)}}}function KO(n){let e,t,i,s;return{c(){e=v("textarea"),p(e,"id",t=n[31]),p(e,"class","txt-mono"),p(e,"spellcheck","false"),p(e,"rows","14"),e.required=!0},m(l,o){S(l,e,o),ce(e,n[0].body),i||(s=K(e,"input",n[21]),i=!0)},p(l,o){o[1]&1&&t!==(t=l[31])&&p(e,"id",t),o[0]&1&&ce(e,l[0].body)},i:ee,o:ee,d(l){l&&w(e),i=!1,s()}}}function JO(n){let e,t,i,s;function l(a){n[20](a)}var o=n[4];function r(a){let u={id:a[31],language:"html"};return a[0].body!==void 0&&(u.value=a[0].body),{props:u}}return o&&(e=jt(o,r(n)),le.push(()=>_e(e,"value",l))),{c(){e&&j(e.$$.fragment),i=Ae()},m(a,u){e&&R(e,a,u),S(a,i,u),s=!0},p(a,u){const f={};if(u[1]&1&&(f.id=a[31]),!t&&u[0]&1&&(t=!0,f.value=a[0].body,ve(()=>t=!1)),o!==(o=a[4])){if(e){pe();const c=e;P(c.$$.fragment,1,0,()=>{H(c,1)}),he()}o?(e=jt(o,r(a)),le.push(()=>_e(e,"value",l)),j(e.$$.fragment),E(e.$$.fragment,1),R(e,i.parentNode,i)):e=null}else o&&e.$set(f)},i(a){s||(e&&E(e.$$.fragment,a),s=!0)},o(a){e&&P(e.$$.fragment,a),s=!1},d(a){a&&w(i),e&&H(e,a)}}}function ZO(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,b,y,k,$,C;const M=[JO,KO],T=[];function D(A,I){return A[4]&&!A[5]?0:1}return l=D(n),o=T[l]=M[l](n),{c(){e=v("label"),t=B("Body (HTML)"),s=O(),o.c(),r=O(),a=v("div"),u=B(`Available placeholder parameters: `),f=v("span"),f.textContent=`{APP_NAME} `,c=B(`, `),d=v("span"),d.textContent=`{APP_URL} `,h=B(`, `),m=v("span"),m.textContent=`{TOKEN} - `,b=B(`, - `),g=v("span"),g.textContent=`{ACTION_URL} - `,y=B("."),p(e,"for",i=n[31]),p(f,"class","label label-sm link-primary txt-mono"),p(d,"class","label label-sm link-primary txt-mono"),p(m,"class","label label-sm link-primary txt-mono"),p(g,"class","label label-sm link-primary txt-mono"),p(g,"title","Required parameter"),p(a,"class","help-block")},m(A,I){S(A,e,I),_(e,t),S(A,s,I),T[l].m(A,I),S(A,r,I),S(A,a,I),_(a,u),_(a,f),_(a,c),_(a,d),_(a,h),_(a,m),_(a,b),_(a,g),_(a,y),k=!0,$||(C=[K(f,"click",n[22]),K(d,"click",n[23]),K(m,"click",n[24]),K(g,"click",n[25])],$=!0)},p(A,I){(!k||I[1]&1&&i!==(i=A[31]))&&p(e,"for",i);let L=l;l=D(A),l===L?T[l].p(A,I):(pe(),P(T[L],1,1,()=>{T[L]=null}),he(),o=T[l],o?o.p(A,I):(o=T[l]=M[l](A),o.c()),E(o,1),o.m(r.parentNode,r))},i(A){k||(E(o),k=!0)},o(A){P(o),k=!1},d(A){A&&w(e),A&&w(s),T[l].d(A),A&&w(r),A&&w(a),$=!1,Pe(C)}}}function ZO(n){let e,t,i,s,l,o;return e=new ge({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[UO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new ge({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[WO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new ge({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[JO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment),s=O(),j(l.$$.fragment)},m(r,a){R(e,r,a),S(r,t,a),R(i,r,a),S(r,s,a),R(l,r,a),o=!0},p(r,a){const u={};a[0]&2&&(u.name=r[1]+".subject"),a[0]&1|a[1]&3&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a[0]&2&&(f.name=r[1]+".actionUrl"),a[0]&1|a[1]&3&&(f.$$scope={dirty:a,ctx:r}),i.$set(f);const c={};a[0]&2&&(c.name=r[1]+".body"),a[0]&49|a[1]&3&&(c.$$scope={dirty:a,ctx:r}),l.$set(c)},i(r){o||(E(e.$$.fragment,r),E(i.$$.fragment,r),E(l.$$.fragment,r),o=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){H(e,r),r&&w(t),H(i,r),r&&w(s),H(l,r)}}}function oh(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ae(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(xe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function GO(n){let e,t,i,s,l,o,r,a,u,f,c=n[6]&&oh();return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),l=B(n[2]),o=O(),r=v("div"),a=O(),c&&c.c(),u=Ee(),p(t,"class","ri-draft-line"),p(s,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(d,h){S(d,e,h),_(e,t),_(e,i),_(e,s),_(s,l),S(d,o,h),S(d,r,h),S(d,a,h),c&&c.m(d,h),S(d,u,h),f=!0},p(d,h){(!f||h[0]&4)&&ae(l,d[2]),d[6]?c?h[0]&64&&E(c,1):(c=oh(),c.c(),E(c,1),c.m(u.parentNode,u)):c&&(pe(),P(c,1,1,()=>{c=null}),he())},i(d){f||(E(c),f=!0)},o(d){P(c),f=!1},d(d){d&&w(e),d&&w(o),d&&w(r),d&&w(a),c&&c.d(d),d&&w(u)}}}function XO(n){let e,t;const i=[n[8]];let s={$$slots:{header:[GO],default:[ZO]},$$scope:{ctx:n}};for(let l=0;lt(12,o=Y));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,c=rh,d=!1;function h(){f==null||f.expand()}function m(){f==null||f.collapse()}function b(){f==null||f.collapseSiblings()}async function g(){c||d||(t(5,d=!0),t(4,c=(await st(()=>import("./CodeEditor.d71155bc.js"),["./CodeEditor.d71155bc.js","./index.e8a8986f.js"],import.meta.url)).default),rh=c,t(5,d=!1))}function y(Y){W.copyToClipboard(Y),Ag(`Copied ${Y} to clipboard`,2e3)}g();function k(){u.subject=this.value,t(0,u)}const $=()=>y("{APP_NAME}"),C=()=>y("{APP_URL}");function M(){u.actionUrl=this.value,t(0,u)}const T=()=>y("{APP_NAME}"),D=()=>y("{APP_URL}"),A=()=>y("{TOKEN}");function I(Y){n.$$.not_equal(u.body,Y)&&(u.body=Y,t(0,u))}function L(){u.body=this.value,t(0,u)}const F=()=>y("{APP_NAME}"),q=()=>y("{APP_URL}"),z=()=>y("{TOKEN}"),J=()=>y("{ACTION_URL}");function G(Y){le[Y?"unshift":"push"](()=>{f=Y,t(3,f)})}function ie(Y){Ve.call(this,n,Y)}function Q(Y){Ve.call(this,n,Y)}function X(Y){Ve.call(this,n,Y)}return n.$$set=Y=>{e=Ke(Ke({},e),Wn(Y)),t(8,l=wt(e,s)),"key"in Y&&t(1,r=Y.key),"title"in Y&&t(2,a=Y.title),"config"in Y&&t(0,u=Y.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!W.isEmpty(W.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||Ss(r))},[u,r,a,f,c,d,i,y,l,h,m,b,o,k,$,C,M,T,D,A,I,L,F,q,z,J,G,ie,Q,X]}class Cr extends ke{constructor(e){super(),ye(this,e,QO,XO,be,{key:1,title:2,config:0,expand:9,collapse:10,collapseSiblings:11},null,[-1,-1])}get expand(){return this.$$.ctx[9]}get collapse(){return this.$$.ctx[10]}get collapseSiblings(){return this.$$.ctx[11]}}function ah(n,e,t){const i=n.slice();return i[22]=e[t],i}function uh(n,e){let t,i,s,l,o,r=e[22].label+"",a,u,f,c,d;return{key:n,first:null,c(){t=v("div"),i=v("input"),l=O(),o=v("label"),a=B(r),f=O(),p(i,"type","radio"),p(i,"name","template"),p(i,"id",s=e[21]+e[22].value),i.__value=e[22].value,i.value=i.__value,e[12][0].push(i),p(o,"for",u=e[21]+e[22].value),p(t,"class","form-field-block"),this.first=t},m(h,m){S(h,t,m),_(t,i),i.checked=i.__value===e[2],_(t,l),_(t,o),_(o,a),_(t,f),c||(d=K(i,"change",e[11]),c=!0)},p(h,m){e=h,m&2097152&&s!==(s=e[21]+e[22].value)&&p(i,"id",s),m&4&&(i.checked=i.__value===e[2]),m&2097152&&u!==(u=e[21]+e[22].value)&&p(o,"for",u)},d(h){h&&w(t),e[12][0].splice(e[12][0].indexOf(i),1),c=!1,d()}}}function xO(n){let e=[],t=new Map,i,s=n[7];const l=o=>o[22].value;for(let o=0;o({21:a}),({uniqueId:a})=>a?2097152:0]},$$scope:{ctx:n}}}),s=new ge({props:{class:"form-field required m-0",name:"email",$$slots:{default:[eD,({uniqueId:a})=>({21:a}),({uniqueId:a})=>a?2097152:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),j(t.$$.fragment),i=O(),j(s.$$.fragment),p(e,"id",n[6]),p(e,"autocomplete","off")},m(a,u){S(a,e,u),R(t,e,null),_(e,i),R(s,e,null),l=!0,o||(r=K(e,"submit",ut(n[14])),o=!0)},p(a,u){const f={};u&35651588&&(f.$$scope={dirty:u,ctx:a}),t.$set(f);const c={};u&35651586&&(c.$$scope={dirty:u,ctx:a}),s.$set(c)},i(a){l||(E(t.$$.fragment,a),E(s.$$.fragment,a),l=!0)},o(a){P(t.$$.fragment,a),P(s.$$.fragment,a),l=!1},d(a){a&&w(e),H(t),H(s),o=!1,r()}}}function nD(n){let e;return{c(){e=v("h4"),e.textContent="Send test email",p(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function iD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("button"),t=B("Close"),i=O(),s=v("button"),l=v("i"),o=O(),r=v("span"),r.textContent="Send",p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[4],p(l,"class","ri-mail-send-line"),p(r,"class","txt"),p(s,"type","submit"),p(s,"form",n[6]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[5]||n[4],ne(s,"btn-loading",n[4])},m(c,d){S(c,e,d),_(e,t),S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[K(e,"click",n[0]),K(s,"click",n[10])],u=!0)},p(c,d){d&16&&(e.disabled=c[4]),d&48&&a!==(a=!c[5]||c[4])&&(s.disabled=a),d&16&&ne(s,"btn-loading",c[4])},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Pe(f)}}}function sD(n){let e,t,i={class:"overlay-panel-sm email-test-popup",overlayClose:!n[4],escClose:!n[4],beforeHide:n[15],popup:!0,$$slots:{footer:[iD],header:[nD],default:[tD]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[16](e),e.$on("show",n[17]),e.$on("hide",n[18]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[15]),l&33554486&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[16](null),H(e,s)}}}const Tr="last_email_test",fh="email_test_request";function lD(n,e,t){let i;const s=It(),l="email_test_"+W.randomString(5),o=[{label:'"Verification" template',value:"verification"},{label:'"Password reset" template',value:"password-reset"},{label:'"Confirm email change" template',value:"email-change"}];let r,a=localStorage.getItem(Tr),u=o[0].value,f=!1,c=null;function d(A="",I=""){t(1,a=A||localStorage.getItem(Tr)),t(2,u=I||o[0].value),Fn({}),r==null||r.show()}function h(){return clearTimeout(c),r==null?void 0:r.hide()}async function m(){if(!(!i||f)){t(4,f=!0),localStorage==null||localStorage.setItem(Tr,a),clearTimeout(c),c=setTimeout(()=>{de.cancelRequest(fh),fl("Test email send timeout.")},3e4);try{await de.settings.testEmail(a,u,{$cancelKey:fh}),Lt("Successfully sent test email."),s("submit"),t(4,f=!1),await Tn(),h()}catch(A){t(4,f=!1),de.errorResponseHandler(A)}clearTimeout(c)}}const b=[[]],g=()=>m();function y(){u=this.__value,t(2,u)}function k(){a=this.value,t(1,a)}const $=()=>m(),C=()=>!f;function M(A){le[A?"unshift":"push"](()=>{r=A,t(3,r)})}function T(A){Ve.call(this,n,A)}function D(A){Ve.call(this,n,A)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!a&&!!u)},[h,a,u,r,f,i,l,o,m,d,g,y,b,k,$,C,M,T,D]}class oD extends ke{constructor(e){super(),ye(this,e,lD,sD,be,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function rD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M,T,D,A,I,L;i=new ge({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[uD,({uniqueId:U})=>({31:U}),({uniqueId:U})=>[0,U?1:0]]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[fD,({uniqueId:U})=>({31:U}),({uniqueId:U})=>[0,U?1:0]]},$$scope:{ctx:n}}});function F(U){n[14](U)}let q={single:!0,key:"meta.verificationTemplate",title:'Default "Verification" email template'};n[0].meta.verificationTemplate!==void 0&&(q.config=n[0].meta.verificationTemplate),u=new Cr({props:q}),le.push(()=>_e(u,"config",F));function z(U){n[15](U)}let J={single:!0,key:"meta.resetPasswordTemplate",title:'Default "Password reset" email template'};n[0].meta.resetPasswordTemplate!==void 0&&(J.config=n[0].meta.resetPasswordTemplate),d=new Cr({props:J}),le.push(()=>_e(d,"config",z));function G(U){n[16](U)}let ie={single:!0,key:"meta.confirmEmailChangeTemplate",title:'Default "Confirm email change" email template'};n[0].meta.confirmEmailChangeTemplate!==void 0&&(ie.config=n[0].meta.confirmEmailChangeTemplate),b=new Cr({props:ie}),le.push(()=>_e(b,"config",G)),C=new ge({props:{class:"form-field form-field-toggle m-b-sm",$$slots:{default:[cD,({uniqueId:U})=>({31:U}),({uniqueId:U})=>[0,U?1:0]]},$$scope:{ctx:n}}});let Q=n[0].smtp.enabled&&ch(n);function X(U,re){return U[4]?vD:bD}let Y=X(n),x=Y(n);return{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),c=O(),j(d.$$.fragment),m=O(),j(b.$$.fragment),y=O(),k=v("hr"),$=O(),j(C.$$.fragment),M=O(),Q&&Q.c(),T=O(),D=v("div"),A=v("div"),I=O(),x.c(),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid m-b-base"),p(a,"class","accordions"),p(A,"class","flex-fill"),p(D,"class","flex")},m(U,re){S(U,e,re),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),S(U,r,re),S(U,a,re),R(u,a,null),_(a,c),R(d,a,null),_(a,m),R(b,a,null),S(U,y,re),S(U,k,re),S(U,$,re),R(C,U,re),S(U,M,re),Q&&Q.m(U,re),S(U,T,re),S(U,D,re),_(D,A),_(D,I),x.m(D,null),L=!0},p(U,re){const Re={};re[0]&1|re[1]&3&&(Re.$$scope={dirty:re,ctx:U}),i.$set(Re);const Ne={};re[0]&1|re[1]&3&&(Ne.$$scope={dirty:re,ctx:U}),o.$set(Ne);const Le={};!f&&re[0]&1&&(f=!0,Le.config=U[0].meta.verificationTemplate,ve(()=>f=!1)),u.$set(Le);const Fe={};!h&&re[0]&1&&(h=!0,Fe.config=U[0].meta.resetPasswordTemplate,ve(()=>h=!1)),d.$set(Fe);const me={};!g&&re[0]&1&&(g=!0,me.config=U[0].meta.confirmEmailChangeTemplate,ve(()=>g=!1)),b.$set(me);const Se={};re[0]&1|re[1]&3&&(Se.$$scope={dirty:re,ctx:U}),C.$set(Se),U[0].smtp.enabled?Q?(Q.p(U,re),re[0]&1&&E(Q,1)):(Q=ch(U),Q.c(),E(Q,1),Q.m(T.parentNode,T)):Q&&(pe(),P(Q,1,1,()=>{Q=null}),he()),Y===(Y=X(U))&&x?x.p(U,re):(x.d(1),x=Y(U),x&&(x.c(),x.m(D,null)))},i(U){L||(E(i.$$.fragment,U),E(o.$$.fragment,U),E(u.$$.fragment,U),E(d.$$.fragment,U),E(b.$$.fragment,U),E(C.$$.fragment,U),E(Q),L=!0)},o(U){P(i.$$.fragment,U),P(o.$$.fragment,U),P(u.$$.fragment,U),P(d.$$.fragment,U),P(b.$$.fragment,U),P(C.$$.fragment,U),P(Q),L=!1},d(U){U&&w(e),H(i),H(o),U&&w(r),U&&w(a),H(u),H(d),H(b),U&&w(y),U&&w(k),U&&w($),H(C,U),U&&w(M),Q&&Q.d(U),U&&w(T),U&&w(D),x.d()}}}function aD(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:te,i:te,o:te,d(t){t&&w(e)}}}function uD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Sender name"),s=O(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].meta.senderName),r||(a=K(l,"input",n[12]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderName&&ce(l,u[0].meta.senderName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function fD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Sender address"),s=O(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","email"),p(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].meta.senderAddress),r||(a=K(l,"input",n[13]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderAddress&&ce(l,u[0].meta.senderAddress)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function cD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.innerHTML="Use SMTP mail server (recommended)",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[31]),e.required=!0,p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[31])},m(c,d){S(c,e,d),e.checked=n[0].smtp.enabled,S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[K(e,"change",n[17]),Ae(Be.call(null,r,{text:'By default PocketBase uses the unix "sendmail" command for sending emails. For better emails deliverability it is recommended to use a SMTP mail server.',position:"top"}))],u=!0)},p(c,d){d[1]&1&&t!==(t=c[31])&&p(e,"id",t),d[0]&1&&(e.checked=c[0].smtp.enabled),d[1]&1&&a!==(a=c[31])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Pe(f)}}}function ch(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M,T;return i=new ge({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[dD,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[pD,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),u=new ge({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[hD,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),d=new ge({props:{class:"form-field",name:"smtp.authMethod",$$slots:{default:[mD,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),b=new ge({props:{class:"form-field",name:"smtp.username",$$slots:{default:[gD,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),k=new ge({props:{class:"form-field",name:"smtp.password",$$slots:{default:[_D,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),f=O(),c=v("div"),j(d.$$.fragment),h=O(),m=v("div"),j(b.$$.fragment),g=O(),y=v("div"),j(k.$$.fragment),$=O(),C=v("div"),p(t,"class","col-lg-4"),p(l,"class","col-lg-2"),p(a,"class","col-lg-3"),p(c,"class","col-lg-3"),p(m,"class","col-lg-6"),p(y,"class","col-lg-6"),p(C,"class","col-lg-12"),p(e,"class","grid")},m(D,A){S(D,e,A),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),R(u,a,null),_(e,f),_(e,c),R(d,c,null),_(e,h),_(e,m),R(b,m,null),_(e,g),_(e,y),R(k,y,null),_(e,$),_(e,C),T=!0},p(D,A){const I={};A[0]&1|A[1]&3&&(I.$$scope={dirty:A,ctx:D}),i.$set(I);const L={};A[0]&1|A[1]&3&&(L.$$scope={dirty:A,ctx:D}),o.$set(L);const F={};A[0]&1|A[1]&3&&(F.$$scope={dirty:A,ctx:D}),u.$set(F);const q={};A[0]&1|A[1]&3&&(q.$$scope={dirty:A,ctx:D}),d.$set(q);const z={};A[0]&1|A[1]&3&&(z.$$scope={dirty:A,ctx:D}),b.$set(z);const J={};A[0]&1|A[1]&3&&(J.$$scope={dirty:A,ctx:D}),k.$set(J)},i(D){T||(E(i.$$.fragment,D),E(o.$$.fragment,D),E(u.$$.fragment,D),E(d.$$.fragment,D),E(b.$$.fragment,D),E(k.$$.fragment,D),D&&xe(()=>{M||(M=je(e,St,{duration:150},!0)),M.run(1)}),T=!0)},o(D){P(i.$$.fragment,D),P(o.$$.fragment,D),P(u.$$.fragment,D),P(d.$$.fragment,D),P(b.$$.fragment,D),P(k.$$.fragment,D),D&&(M||(M=je(e,St,{duration:150},!1)),M.run(0)),T=!1},d(D){D&&w(e),H(i),H(o),H(u),H(d),H(b),H(k),D&&M&&M.end()}}}function dD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("SMTP server host"),s=O(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].smtp.host),r||(a=K(l,"input",n[18]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].smtp.host&&ce(l,u[0].smtp.host)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function pD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Port"),s=O(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","number"),p(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].smtp.port),r||(a=K(l,"input",n[19]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&rt(l.value)!==u[0].smtp.port&&ce(l,u[0].smtp.port)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function hD(n){let e,t,i,s,l,o,r;function a(f){n[20](f)}let u={id:n[31],items:n[6]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new xi({props:u}),le.push(()=>_e(l,"keyOfSelected",a)),{c(){e=v("label"),t=B("TLS Encryption"),s=O(),j(l.$$.fragment),p(e,"for",i=n[31])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c[1]&1&&i!==(i=f[31]))&&p(e,"for",i);const d={};c[1]&1&&(d.id=f[31]),!o&&c[0]&1&&(o=!0,d.keyOfSelected=f[0].smtp.tls,ve(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function mD(n){let e,t,i,s,l,o,r;function a(f){n[21](f)}let u={id:n[31],items:n[7]};return n[0].smtp.authMethod!==void 0&&(u.keyOfSelected=n[0].smtp.authMethod),l=new xi({props:u}),le.push(()=>_e(l,"keyOfSelected",a)),{c(){e=v("label"),t=B("AUTH Method"),s=O(),j(l.$$.fragment),p(e,"for",i=n[31])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c[1]&1&&i!==(i=f[31]))&&p(e,"for",i);const d={};c[1]&1&&(d.id=f[31]),!o&&c[0]&1&&(o=!0,d.keyOfSelected=f[0].smtp.authMethod,ve(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function gD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Username"),s=O(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].smtp.username),r||(a=K(l,"input",n[22]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].smtp.username&&ce(l,u[0].smtp.username)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function _D(n){let e,t,i,s,l,o,r;function a(f){n[23](f)}let u={id:n[31]};return n[0].smtp.password!==void 0&&(u.value=n[0].smtp.password),l=new Ga({props:u}),le.push(()=>_e(l,"value",a)),{c(){e=v("label"),t=B("Password"),s=O(),j(l.$$.fragment),p(e,"for",i=n[31])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c[1]&1&&i!==(i=f[31]))&&p(e,"for",i);const d={};c[1]&1&&(d.id=f[31]),!o&&c[0]&1&&(o=!0,d.value=f[0].smtp.password,ve(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function bD(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` - Send test email`,p(e,"type","button"),p(e,"class","btn btn-expanded btn-outline")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[26]),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function vD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=O(),s=v("button"),l=v("span"),l.textContent="Save changes",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary btn-hint"),e.disabled=n[3],p(l,"class","txt"),p(s,"type","submit"),p(s,"class","btn btn-expanded"),s.disabled=o=!n[4]||n[3],ne(s,"btn-loading",n[3])},m(u,f){S(u,e,f),_(e,t),S(u,i,f),S(u,s,f),_(s,l),r||(a=[K(e,"click",n[24]),K(s,"click",n[25])],r=!0)},p(u,f){f[0]&8&&(e.disabled=u[3]),f[0]&24&&o!==(o=!u[4]||u[3])&&(s.disabled=o),f[0]&8&&ne(s,"btn-loading",u[3])},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Pe(a)}}}function yD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g;const y=[aD,rD],k=[];function $(C,M){return C[2]?0:1}return d=$(n),h=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=B(n[5]),r=O(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="

    Configure common settings for sending emails.

    ",c=O(),h.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content txt-xl m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){S(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(C,r,M),S(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),m=!0,b||(g=K(u,"submit",ut(n[27])),b=!0)},p(C,M){(!m||M[0]&32)&&ae(o,C[5]);let T=d;d=$(C),d===T?k[d].p(C,M):(pe(),P(k[T],1,1,()=>{k[T]=null}),he(),h=k[d],h?h.p(C,M):(h=k[d]=y[d](C),h.c()),E(h,1),h.m(u,null))},i(C){m||(E(h),m=!0)},o(C){P(h),m=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),b=!1,g()}}}function kD(n){let e,t,i,s,l,o;e=new Ci({}),i=new pn({props:{$$slots:{default:[yD]},$$scope:{ctx:n}}});let r={};return l=new oD({props:r}),n[28](l),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment),s=O(),j(l.$$.fragment)},m(a,u){R(e,a,u),S(a,t,u),R(i,a,u),S(a,s,u),R(l,a,u),o=!0},p(a,u){const f={};u[0]&63|u[1]&2&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(E(e.$$.fragment,a),E(i.$$.fragment,a),E(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&w(t),H(i,a),a&&w(s),n[28](null),H(l,a)}}}function wD(n,e,t){let i,s,l;Ze(n,mt,X=>t(5,l=X));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}],r=[{label:"PLAIN (default)",value:"PLAIN"},{label:"LOGIN",value:"LOGIN"}];Ht(mt,l="Mail settings",l);let a,u={},f={},c=!1,d=!1;h();async function h(){t(2,c=!0);try{const X=await de.settings.getAll()||{};b(X)}catch(X){de.errorResponseHandler(X)}t(2,c=!1)}async function m(){if(!(d||!s)){t(3,d=!0);try{const X=await de.settings.update(W.filterRedactedProps(f));b(X),Fn({}),Lt("Successfully saved mail settings.")}catch(X){de.errorResponseHandler(X)}t(3,d=!1)}}function b(X={}){t(0,f={meta:(X==null?void 0:X.meta)||{},smtp:(X==null?void 0:X.smtp)||{}}),f.smtp.authMethod||t(0,f.smtp.authMethod=r[0].value,f),t(10,u=JSON.parse(JSON.stringify(f)))}function g(){t(0,f=JSON.parse(JSON.stringify(u||{})))}function y(){f.meta.senderName=this.value,t(0,f)}function k(){f.meta.senderAddress=this.value,t(0,f)}function $(X){n.$$.not_equal(f.meta.verificationTemplate,X)&&(f.meta.verificationTemplate=X,t(0,f))}function C(X){n.$$.not_equal(f.meta.resetPasswordTemplate,X)&&(f.meta.resetPasswordTemplate=X,t(0,f))}function M(X){n.$$.not_equal(f.meta.confirmEmailChangeTemplate,X)&&(f.meta.confirmEmailChangeTemplate=X,t(0,f))}function T(){f.smtp.enabled=this.checked,t(0,f)}function D(){f.smtp.host=this.value,t(0,f)}function A(){f.smtp.port=rt(this.value),t(0,f)}function I(X){n.$$.not_equal(f.smtp.tls,X)&&(f.smtp.tls=X,t(0,f))}function L(X){n.$$.not_equal(f.smtp.authMethod,X)&&(f.smtp.authMethod=X,t(0,f))}function F(){f.smtp.username=this.value,t(0,f)}function q(X){n.$$.not_equal(f.smtp.password,X)&&(f.smtp.password=X,t(0,f))}const z=()=>g(),J=()=>m(),G=()=>a==null?void 0:a.show(),ie=()=>m();function Q(X){le[X?"unshift":"push"](()=>{a=X,t(1,a)})}return n.$$.update=()=>{n.$$.dirty[0]&1024&&t(11,i=JSON.stringify(u)),n.$$.dirty[0]&2049&&t(4,s=i!=JSON.stringify(f))},[f,a,c,d,s,l,o,r,m,g,u,i,y,k,$,C,M,T,D,A,I,L,F,q,z,J,G,ie,Q]}class SD extends ke{constructor(e){super(),ye(this,e,wD,kD,be,{},null,[-1,-1])}}function $D(n){var C,M;let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b;e=new ge({props:{class:"form-field form-field-toggle",$$slots:{default:[TD,({uniqueId:T})=>({25:T}),({uniqueId:T})=>T?33554432:0]},$$scope:{ctx:n}}});let g=((C=n[0].s3)==null?void 0:C.enabled)!=n[1].s3.enabled&&dh(n),y=n[1].s3.enabled&&ph(n),k=((M=n[1].s3)==null?void 0:M.enabled)&&!n[6]&&!n[3]&&hh(n),$=n[6]&&mh(n);return{c(){j(e.$$.fragment),t=O(),g&&g.c(),i=O(),y&&y.c(),s=O(),l=v("div"),o=v("div"),r=O(),k&&k.c(),a=O(),$&&$.c(),u=O(),f=v("button"),c=v("span"),c.textContent="Save changes",p(o,"class","flex-fill"),p(c,"class","txt"),p(f,"type","submit"),p(f,"class","btn btn-expanded"),f.disabled=d=!n[6]||n[3],ne(f,"btn-loading",n[3]),p(l,"class","flex")},m(T,D){R(e,T,D),S(T,t,D),g&&g.m(T,D),S(T,i,D),y&&y.m(T,D),S(T,s,D),S(T,l,D),_(l,o),_(l,r),k&&k.m(l,null),_(l,a),$&&$.m(l,null),_(l,u),_(l,f),_(f,c),h=!0,m||(b=K(f,"click",n[19]),m=!0)},p(T,D){var I,L;const A={};D&100663298&&(A.$$scope={dirty:D,ctx:T}),e.$set(A),((I=T[0].s3)==null?void 0:I.enabled)!=T[1].s3.enabled?g?(g.p(T,D),D&3&&E(g,1)):(g=dh(T),g.c(),E(g,1),g.m(i.parentNode,i)):g&&(pe(),P(g,1,1,()=>{g=null}),he()),T[1].s3.enabled?y?(y.p(T,D),D&2&&E(y,1)):(y=ph(T),y.c(),E(y,1),y.m(s.parentNode,s)):y&&(pe(),P(y,1,1,()=>{y=null}),he()),((L=T[1].s3)==null?void 0:L.enabled)&&!T[6]&&!T[3]?k?k.p(T,D):(k=hh(T),k.c(),k.m(l,a)):k&&(k.d(1),k=null),T[6]?$?$.p(T,D):($=mh(T),$.c(),$.m(l,u)):$&&($.d(1),$=null),(!h||D&72&&d!==(d=!T[6]||T[3]))&&(f.disabled=d),(!h||D&8)&&ne(f,"btn-loading",T[3])},i(T){h||(E(e.$$.fragment,T),E(g),E(y),h=!0)},o(T){P(e.$$.fragment,T),P(g),P(y),h=!1},d(T){H(e,T),T&&w(t),g&&g.d(T),T&&w(i),y&&y.d(T),T&&w(s),T&&w(l),k&&k.d(),$&&$.d(),m=!1,b()}}}function CD(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:te,i:te,o:te,d(t){t&&w(e)}}}function TD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Use S3 storage"),p(e,"type","checkbox"),p(e,"id",t=n[25]),e.required=!0,p(s,"for",o=n[25])},m(u,f){S(u,e,f),e.checked=n[1].s3.enabled,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[11]),r=!0)},p(u,f){f&33554432&&t!==(t=u[25])&&p(e,"id",t),f&2&&(e.checked=u[1].s3.enabled),f&33554432&&o!==(o=u[25])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function dh(n){var I;let e,t,i,s,l,o,r,a=(I=n[0].s3)!=null&&I.enabled?"S3 storage":"local file system",u,f,c,d=n[1].s3.enabled?"S3 storage":"local file system",h,m,b,g,y,k,$,C,M,T,D,A;return{c(){e=v("div"),t=v("div"),i=v("div"),i.innerHTML='',s=O(),l=v("div"),o=B(`If you have existing uploaded files, you'll have to migrate them manually from + `,g=B(`, + `),b=v("span"),b.textContent=`{ACTION_URL} + `,y=B("."),p(e,"for",i=n[31]),p(f,"class","label label-sm link-primary txt-mono"),p(d,"class","label label-sm link-primary txt-mono"),p(m,"class","label label-sm link-primary txt-mono"),p(b,"class","label label-sm link-primary txt-mono"),p(b,"title","Required parameter"),p(a,"class","help-block")},m(A,I){S(A,e,I),_(e,t),S(A,s,I),T[l].m(A,I),S(A,r,I),S(A,a,I),_(a,u),_(a,f),_(a,c),_(a,d),_(a,h),_(a,m),_(a,g),_(a,b),_(a,y),k=!0,$||(C=[K(f,"click",n[22]),K(d,"click",n[23]),K(m,"click",n[24]),K(b,"click",n[25])],$=!0)},p(A,I){(!k||I[1]&1&&i!==(i=A[31]))&&p(e,"for",i);let L=l;l=D(A),l===L?T[l].p(A,I):(pe(),P(T[L],1,1,()=>{T[L]=null}),he(),o=T[l],o?o.p(A,I):(o=T[l]=M[l](A),o.c()),E(o,1),o.m(r.parentNode,r))},i(A){k||(E(o),k=!0)},o(A){P(o),k=!1},d(A){A&&w(e),A&&w(s),T[l].d(A),A&&w(r),A&&w(a),$=!1,Pe(C)}}}function GO(n){let e,t,i,s,l,o;return e=new ge({props:{class:"form-field required",name:n[1]+".subject",$$slots:{default:[WO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),i=new ge({props:{class:"form-field required",name:n[1]+".actionUrl",$$slots:{default:[YO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),l=new ge({props:{class:"form-field m-0 required",name:n[1]+".body",$$slots:{default:[ZO,({uniqueId:r})=>({31:r}),({uniqueId:r})=>[0,r?1:0]]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment),s=O(),j(l.$$.fragment)},m(r,a){R(e,r,a),S(r,t,a),R(i,r,a),S(r,s,a),R(l,r,a),o=!0},p(r,a){const u={};a[0]&2&&(u.name=r[1]+".subject"),a[0]&1|a[1]&3&&(u.$$scope={dirty:a,ctx:r}),e.$set(u);const f={};a[0]&2&&(f.name=r[1]+".actionUrl"),a[0]&1|a[1]&3&&(f.$$scope={dirty:a,ctx:r}),i.$set(f);const c={};a[0]&2&&(c.name=r[1]+".body"),a[0]&49|a[1]&3&&(c.$$scope={dirty:a,ctx:r}),l.$set(c)},i(r){o||(E(e.$$.fragment,r),E(i.$$.fragment,r),E(l.$$.fragment,r),o=!0)},o(r){P(e.$$.fragment,r),P(i.$$.fragment,r),P(l.$$.fragment,r),o=!1},d(r){H(e,r),r&&w(t),H(i,r),r&&w(s),H(l,r)}}}function rh(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ee(Ue.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&xe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function XO(n){let e,t,i,s,l,o,r,a,u,f=n[6]&&rh();return{c(){e=v("div"),t=v("i"),i=O(),s=v("span"),l=B(n[2]),o=O(),r=v("div"),a=O(),f&&f.c(),u=Ae(),p(t,"class","ri-draft-line"),p(s,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(c,d){S(c,e,d),_(e,t),_(e,i),_(e,s),_(s,l),S(c,o,d),S(c,r,d),S(c,a,d),f&&f.m(c,d),S(c,u,d)},p(c,d){d[0]&4&&re(l,c[2]),c[6]?f?d[0]&64&&E(f,1):(f=rh(),f.c(),E(f,1),f.m(u.parentNode,u)):f&&(pe(),P(f,1,1,()=>{f=null}),he())},d(c){c&&w(e),c&&w(o),c&&w(r),c&&w(a),f&&f.d(c),c&&w(u)}}}function QO(n){let e,t;const i=[n[8]];let s={$$slots:{header:[XO],default:[GO]},$$scope:{ctx:n}};for(let l=0;lt(12,o=Y));let{key:r}=e,{title:a}=e,{config:u={}}=e,f,c=ah,d=!1;function h(){f==null||f.expand()}function m(){f==null||f.collapse()}function g(){f==null||f.collapseSiblings()}async function b(){c||d||(t(5,d=!0),t(4,c=(await st(()=>import("./CodeEditor.3853a6d4.js"),["./CodeEditor.3853a6d4.js","./index.e8a8986f.js"],import.meta.url)).default),ah=c,t(5,d=!1))}function y(Y){W.copyToClipboard(Y),Eg(`Copied ${Y} to clipboard`,2e3)}b();function k(){u.subject=this.value,t(0,u)}const $=()=>y("{APP_NAME}"),C=()=>y("{APP_URL}");function M(){u.actionUrl=this.value,t(0,u)}const T=()=>y("{APP_NAME}"),D=()=>y("{APP_URL}"),A=()=>y("{TOKEN}");function I(Y){n.$$.not_equal(u.body,Y)&&(u.body=Y,t(0,u))}function L(){u.body=this.value,t(0,u)}const F=()=>y("{APP_NAME}"),q=()=>y("{APP_URL}"),z=()=>y("{TOKEN}"),J=()=>y("{ACTION_URL}");function G(Y){le[Y?"unshift":"push"](()=>{f=Y,t(3,f)})}function ie(Y){Ve.call(this,n,Y)}function Q(Y){Ve.call(this,n,Y)}function X(Y){Ve.call(this,n,Y)}return n.$$set=Y=>{e=Ke(Ke({},e),Wn(Y)),t(8,l=wt(e,s)),"key"in Y&&t(1,r=Y.key),"title"in Y&&t(2,a=Y.title),"config"in Y&&t(0,u=Y.config)},n.$$.update=()=>{n.$$.dirty[0]&4098&&t(6,i=!W.isEmpty(W.getNestedVal(o,r))),n.$$.dirty[0]&3&&(u.enabled||$s(r))},[u,r,a,f,c,d,i,y,l,h,m,g,o,k,$,C,M,T,D,A,I,L,F,q,z,J,G,ie,Q,X]}class Tr extends ke{constructor(e){super(),ye(this,e,xO,QO,be,{key:1,title:2,config:0,expand:9,collapse:10,collapseSiblings:11},null,[-1,-1])}get expand(){return this.$$.ctx[9]}get collapse(){return this.$$.ctx[10]}get collapseSiblings(){return this.$$.ctx[11]}}function uh(n,e,t){const i=n.slice();return i[22]=e[t],i}function fh(n,e){let t,i,s,l,o,r=e[22].label+"",a,u,f,c,d;return{key:n,first:null,c(){t=v("div"),i=v("input"),l=O(),o=v("label"),a=B(r),f=O(),p(i,"type","radio"),p(i,"name","template"),p(i,"id",s=e[21]+e[22].value),i.__value=e[22].value,i.value=i.__value,e[12][0].push(i),p(o,"for",u=e[21]+e[22].value),p(t,"class","form-field-block"),this.first=t},m(h,m){S(h,t,m),_(t,i),i.checked=i.__value===e[2],_(t,l),_(t,o),_(o,a),_(t,f),c||(d=K(i,"change",e[11]),c=!0)},p(h,m){e=h,m&2097152&&s!==(s=e[21]+e[22].value)&&p(i,"id",s),m&4&&(i.checked=i.__value===e[2]),m&2097152&&u!==(u=e[21]+e[22].value)&&p(o,"for",u)},d(h){h&&w(t),e[12][0].splice(e[12][0].indexOf(i),1),c=!1,d()}}}function eD(n){let e=[],t=new Map,i,s=n[7];const l=o=>o[22].value;for(let o=0;o({21:a}),({uniqueId:a})=>a?2097152:0]},$$scope:{ctx:n}}}),s=new ge({props:{class:"form-field required m-0",name:"email",$$slots:{default:[tD,({uniqueId:a})=>({21:a}),({uniqueId:a})=>a?2097152:0]},$$scope:{ctx:n}}}),{c(){e=v("form"),j(t.$$.fragment),i=O(),j(s.$$.fragment),p(e,"id",n[6]),p(e,"autocomplete","off")},m(a,u){S(a,e,u),R(t,e,null),_(e,i),R(s,e,null),l=!0,o||(r=K(e,"submit",ut(n[14])),o=!0)},p(a,u){const f={};u&35651588&&(f.$$scope={dirty:u,ctx:a}),t.$set(f);const c={};u&35651586&&(c.$$scope={dirty:u,ctx:a}),s.$set(c)},i(a){l||(E(t.$$.fragment,a),E(s.$$.fragment,a),l=!0)},o(a){P(t.$$.fragment,a),P(s.$$.fragment,a),l=!1},d(a){a&&w(e),H(t),H(s),o=!1,r()}}}function iD(n){let e;return{c(){e=v("h4"),e.textContent="Send test email",p(e,"class","center txt-break")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function sD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("button"),t=B("Close"),i=O(),s=v("button"),l=v("i"),o=O(),r=v("span"),r.textContent="Send",p(e,"type","button"),p(e,"class","btn btn-secondary"),e.disabled=n[4],p(l,"class","ri-mail-send-line"),p(r,"class","txt"),p(s,"type","submit"),p(s,"form",n[6]),p(s,"class","btn btn-expanded"),s.disabled=a=!n[5]||n[4],ne(s,"btn-loading",n[4])},m(c,d){S(c,e,d),_(e,t),S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[K(e,"click",n[0]),K(s,"click",n[10])],u=!0)},p(c,d){d&16&&(e.disabled=c[4]),d&48&&a!==(a=!c[5]||c[4])&&(s.disabled=a),d&16&&ne(s,"btn-loading",c[4])},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Pe(f)}}}function lD(n){let e,t,i={class:"overlay-panel-sm email-test-popup",overlayClose:!n[4],escClose:!n[4],beforeHide:n[15],popup:!0,$$slots:{footer:[sD],header:[iD],default:[nD]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[16](e),e.$on("show",n[17]),e.$on("hide",n[18]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&16&&(o.overlayClose=!s[4]),l&16&&(o.escClose=!s[4]),l&16&&(o.beforeHide=s[15]),l&33554486&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[16](null),H(e,s)}}}const Mr="last_email_test",ch="email_test_request";function oD(n,e,t){let i;const s=It(),l="email_test_"+W.randomString(5),o=[{label:'"Verification" template',value:"verification"},{label:'"Password reset" template',value:"password-reset"},{label:'"Confirm email change" template',value:"email-change"}];let r,a=localStorage.getItem(Mr),u=o[0].value,f=!1,c=null;function d(A="",I=""){t(1,a=A||localStorage.getItem(Mr)),t(2,u=I||o[0].value),Fn({}),r==null||r.show()}function h(){return clearTimeout(c),r==null?void 0:r.hide()}async function m(){if(!(!i||f)){t(4,f=!0),localStorage==null||localStorage.setItem(Mr,a),clearTimeout(c),c=setTimeout(()=>{de.cancelRequest(ch),cl("Test email send timeout.")},3e4);try{await de.settings.testEmail(a,u,{$cancelKey:ch}),Lt("Successfully sent test email."),s("submit"),t(4,f=!1),await Tn(),h()}catch(A){t(4,f=!1),de.errorResponseHandler(A)}clearTimeout(c)}}const g=[[]],b=()=>m();function y(){u=this.__value,t(2,u)}function k(){a=this.value,t(1,a)}const $=()=>m(),C=()=>!f;function M(A){le[A?"unshift":"push"](()=>{r=A,t(3,r)})}function T(A){Ve.call(this,n,A)}function D(A){Ve.call(this,n,A)}return n.$$.update=()=>{n.$$.dirty&6&&t(5,i=!!a&&!!u)},[h,a,u,r,f,i,l,o,m,d,b,y,g,k,$,C,M,T,D]}class rD extends ke{constructor(e){super(),ye(this,e,oD,lD,be,{show:9,hide:0})}get show(){return this.$$.ctx[9]}get hide(){return this.$$.ctx[0]}}function aD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,b,y,k,$,C,M,T,D,A,I,L;i=new ge({props:{class:"form-field required",name:"meta.senderName",$$slots:{default:[fD,({uniqueId:U})=>({31:U}),({uniqueId:U})=>[0,U?1:0]]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:"meta.senderAddress",$$slots:{default:[cD,({uniqueId:U})=>({31:U}),({uniqueId:U})=>[0,U?1:0]]},$$scope:{ctx:n}}});function F(U){n[14](U)}let q={single:!0,key:"meta.verificationTemplate",title:'Default "Verification" email template'};n[0].meta.verificationTemplate!==void 0&&(q.config=n[0].meta.verificationTemplate),u=new Tr({props:q}),le.push(()=>_e(u,"config",F));function z(U){n[15](U)}let J={single:!0,key:"meta.resetPasswordTemplate",title:'Default "Password reset" email template'};n[0].meta.resetPasswordTemplate!==void 0&&(J.config=n[0].meta.resetPasswordTemplate),d=new Tr({props:J}),le.push(()=>_e(d,"config",z));function G(U){n[16](U)}let ie={single:!0,key:"meta.confirmEmailChangeTemplate",title:'Default "Confirm email change" email template'};n[0].meta.confirmEmailChangeTemplate!==void 0&&(ie.config=n[0].meta.confirmEmailChangeTemplate),g=new Tr({props:ie}),le.push(()=>_e(g,"config",G)),C=new ge({props:{class:"form-field form-field-toggle m-b-sm",$$slots:{default:[dD,({uniqueId:U})=>({31:U}),({uniqueId:U})=>[0,U?1:0]]},$$scope:{ctx:n}}});let Q=n[0].smtp.enabled&&dh(n);function X(U,ae){return U[4]?yD:vD}let Y=X(n),x=Y(n);return{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),c=O(),j(d.$$.fragment),m=O(),j(g.$$.fragment),y=O(),k=v("hr"),$=O(),j(C.$$.fragment),M=O(),Q&&Q.c(),T=O(),D=v("div"),A=v("div"),I=O(),x.c(),p(t,"class","col-lg-6"),p(l,"class","col-lg-6"),p(e,"class","grid m-b-base"),p(a,"class","accordions"),p(A,"class","flex-fill"),p(D,"class","flex")},m(U,ae){S(U,e,ae),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),S(U,r,ae),S(U,a,ae),R(u,a,null),_(a,c),R(d,a,null),_(a,m),R(g,a,null),S(U,y,ae),S(U,k,ae),S(U,$,ae),R(C,U,ae),S(U,M,ae),Q&&Q.m(U,ae),S(U,T,ae),S(U,D,ae),_(D,A),_(D,I),x.m(D,null),L=!0},p(U,ae){const Re={};ae[0]&1|ae[1]&3&&(Re.$$scope={dirty:ae,ctx:U}),i.$set(Re);const Ne={};ae[0]&1|ae[1]&3&&(Ne.$$scope={dirty:ae,ctx:U}),o.$set(Ne);const Le={};!f&&ae[0]&1&&(f=!0,Le.config=U[0].meta.verificationTemplate,ve(()=>f=!1)),u.$set(Le);const Fe={};!h&&ae[0]&1&&(h=!0,Fe.config=U[0].meta.resetPasswordTemplate,ve(()=>h=!1)),d.$set(Fe);const me={};!b&&ae[0]&1&&(b=!0,me.config=U[0].meta.confirmEmailChangeTemplate,ve(()=>b=!1)),g.$set(me);const Se={};ae[0]&1|ae[1]&3&&(Se.$$scope={dirty:ae,ctx:U}),C.$set(Se),U[0].smtp.enabled?Q?(Q.p(U,ae),ae[0]&1&&E(Q,1)):(Q=dh(U),Q.c(),E(Q,1),Q.m(T.parentNode,T)):Q&&(pe(),P(Q,1,1,()=>{Q=null}),he()),Y===(Y=X(U))&&x?x.p(U,ae):(x.d(1),x=Y(U),x&&(x.c(),x.m(D,null)))},i(U){L||(E(i.$$.fragment,U),E(o.$$.fragment,U),E(u.$$.fragment,U),E(d.$$.fragment,U),E(g.$$.fragment,U),E(C.$$.fragment,U),E(Q),L=!0)},o(U){P(i.$$.fragment,U),P(o.$$.fragment,U),P(u.$$.fragment,U),P(d.$$.fragment,U),P(g.$$.fragment,U),P(C.$$.fragment,U),P(Q),L=!1},d(U){U&&w(e),H(i),H(o),U&&w(r),U&&w(a),H(u),H(d),H(g),U&&w(y),U&&w(k),U&&w($),H(C,U),U&&w(M),Q&&Q.d(U),U&&w(T),U&&w(D),x.d()}}}function uD(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&w(e)}}}function fD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Sender name"),s=O(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].meta.senderName),r||(a=K(l,"input",n[12]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderName&&ce(l,u[0].meta.senderName)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function cD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Sender address"),s=O(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","email"),p(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].meta.senderAddress),r||(a=K(l,"input",n[13]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].meta.senderAddress&&ce(l,u[0].meta.senderAddress)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function dD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.innerHTML="Use SMTP mail server (recommended)",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[31]),e.required=!0,p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[31])},m(c,d){S(c,e,d),e.checked=n[0].smtp.enabled,S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[K(e,"change",n[17]),Ee(Ue.call(null,r,{text:'By default PocketBase uses the unix "sendmail" command for sending emails. For better emails deliverability it is recommended to use a SMTP mail server.',position:"top"}))],u=!0)},p(c,d){d[1]&1&&t!==(t=c[31])&&p(e,"id",t),d[0]&1&&(e.checked=c[0].smtp.enabled),d[1]&1&&a!==(a=c[31])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Pe(f)}}}function dh(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,b,y,k,$,C,M,T;return i=new ge({props:{class:"form-field required",name:"smtp.host",$$slots:{default:[pD,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:"smtp.port",$$slots:{default:[hD,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),u=new ge({props:{class:"form-field required",name:"smtp.tls",$$slots:{default:[mD,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),d=new ge({props:{class:"form-field",name:"smtp.authMethod",$$slots:{default:[gD,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),g=new ge({props:{class:"form-field",name:"smtp.username",$$slots:{default:[_D,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),k=new ge({props:{class:"form-field",name:"smtp.password",$$slots:{default:[bD,({uniqueId:D})=>({31:D}),({uniqueId:D})=>[0,D?1:0]]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),f=O(),c=v("div"),j(d.$$.fragment),h=O(),m=v("div"),j(g.$$.fragment),b=O(),y=v("div"),j(k.$$.fragment),$=O(),C=v("div"),p(t,"class","col-lg-4"),p(l,"class","col-lg-2"),p(a,"class","col-lg-3"),p(c,"class","col-lg-3"),p(m,"class","col-lg-6"),p(y,"class","col-lg-6"),p(C,"class","col-lg-12"),p(e,"class","grid")},m(D,A){S(D,e,A),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),R(u,a,null),_(e,f),_(e,c),R(d,c,null),_(e,h),_(e,m),R(g,m,null),_(e,b),_(e,y),R(k,y,null),_(e,$),_(e,C),T=!0},p(D,A){const I={};A[0]&1|A[1]&3&&(I.$$scope={dirty:A,ctx:D}),i.$set(I);const L={};A[0]&1|A[1]&3&&(L.$$scope={dirty:A,ctx:D}),o.$set(L);const F={};A[0]&1|A[1]&3&&(F.$$scope={dirty:A,ctx:D}),u.$set(F);const q={};A[0]&1|A[1]&3&&(q.$$scope={dirty:A,ctx:D}),d.$set(q);const z={};A[0]&1|A[1]&3&&(z.$$scope={dirty:A,ctx:D}),g.$set(z);const J={};A[0]&1|A[1]&3&&(J.$$scope={dirty:A,ctx:D}),k.$set(J)},i(D){T||(E(i.$$.fragment,D),E(o.$$.fragment,D),E(u.$$.fragment,D),E(d.$$.fragment,D),E(g.$$.fragment,D),E(k.$$.fragment,D),D&&xe(()=>{M||(M=je(e,St,{duration:150},!0)),M.run(1)}),T=!0)},o(D){P(i.$$.fragment,D),P(o.$$.fragment,D),P(u.$$.fragment,D),P(d.$$.fragment,D),P(g.$$.fragment,D),P(k.$$.fragment,D),D&&(M||(M=je(e,St,{duration:150},!1)),M.run(0)),T=!1},d(D){D&&w(e),H(i),H(o),H(u),H(d),H(g),H(k),D&&M&&M.end()}}}function pD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("SMTP server host"),s=O(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].smtp.host),r||(a=K(l,"input",n[18]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].smtp.host&&ce(l,u[0].smtp.host)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function hD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Port"),s=O(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","number"),p(l,"id",o=n[31]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].smtp.port),r||(a=K(l,"input",n[19]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&rt(l.value)!==u[0].smtp.port&&ce(l,u[0].smtp.port)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function mD(n){let e,t,i,s,l,o,r;function a(f){n[20](f)}let u={id:n[31],items:n[6]};return n[0].smtp.tls!==void 0&&(u.keyOfSelected=n[0].smtp.tls),l=new xi({props:u}),le.push(()=>_e(l,"keyOfSelected",a)),{c(){e=v("label"),t=B("TLS Encryption"),s=O(),j(l.$$.fragment),p(e,"for",i=n[31])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c[1]&1&&i!==(i=f[31]))&&p(e,"for",i);const d={};c[1]&1&&(d.id=f[31]),!o&&c[0]&1&&(o=!0,d.keyOfSelected=f[0].smtp.tls,ve(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function gD(n){let e,t,i,s,l,o,r;function a(f){n[21](f)}let u={id:n[31],items:n[7]};return n[0].smtp.authMethod!==void 0&&(u.keyOfSelected=n[0].smtp.authMethod),l=new xi({props:u}),le.push(()=>_e(l,"keyOfSelected",a)),{c(){e=v("label"),t=B("AUTH Method"),s=O(),j(l.$$.fragment),p(e,"for",i=n[31])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c[1]&1&&i!==(i=f[31]))&&p(e,"for",i);const d={};c[1]&1&&(d.id=f[31]),!o&&c[0]&1&&(o=!0,d.keyOfSelected=f[0].smtp.authMethod,ve(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function _D(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Username"),s=O(),l=v("input"),p(e,"for",i=n[31]),p(l,"type","text"),p(l,"id",o=n[31])},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].smtp.username),r||(a=K(l,"input",n[22]),r=!0)},p(u,f){f[1]&1&&i!==(i=u[31])&&p(e,"for",i),f[1]&1&&o!==(o=u[31])&&p(l,"id",o),f[0]&1&&l.value!==u[0].smtp.username&&ce(l,u[0].smtp.username)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function bD(n){let e,t,i,s,l,o,r;function a(f){n[23](f)}let u={id:n[31]};return n[0].smtp.password!==void 0&&(u.value=n[0].smtp.password),l=new Xa({props:u}),le.push(()=>_e(l,"value",a)),{c(){e=v("label"),t=B("Password"),s=O(),j(l.$$.fragment),p(e,"for",i=n[31])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c[1]&1&&i!==(i=f[31]))&&p(e,"for",i);const d={};c[1]&1&&(d.id=f[31]),!o&&c[0]&1&&(o=!0,d.value=f[0].smtp.password,ve(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function vD(n){let e,t,i;return{c(){e=v("button"),e.innerHTML=` + Send test email`,p(e,"type","button"),p(e,"class","btn btn-expanded btn-outline")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[26]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function yD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",i=O(),s=v("button"),l=v("span"),l.textContent="Save changes",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary btn-hint"),e.disabled=n[3],p(l,"class","txt"),p(s,"type","submit"),p(s,"class","btn btn-expanded"),s.disabled=o=!n[4]||n[3],ne(s,"btn-loading",n[3])},m(u,f){S(u,e,f),_(e,t),S(u,i,f),S(u,s,f),_(s,l),r||(a=[K(e,"click",n[24]),K(s,"click",n[25])],r=!0)},p(u,f){f[0]&8&&(e.disabled=u[3]),f[0]&24&&o!==(o=!u[4]||u[3])&&(s.disabled=o),f[0]&8&&ne(s,"btn-loading",u[3])},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,Pe(a)}}}function kD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,b;const y=[uD,aD],k=[];function $(C,M){return C[2]?0:1}return d=$(n),h=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=B(n[5]),r=O(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="

    Configure common settings for sending emails.

    ",c=O(),h.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content txt-xl m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){S(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(C,r,M),S(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),m=!0,g||(b=K(u,"submit",ut(n[27])),g=!0)},p(C,M){(!m||M[0]&32)&&re(o,C[5]);let T=d;d=$(C),d===T?k[d].p(C,M):(pe(),P(k[T],1,1,()=>{k[T]=null}),he(),h=k[d],h?h.p(C,M):(h=k[d]=y[d](C),h.c()),E(h,1),h.m(u,null))},i(C){m||(E(h),m=!0)},o(C){P(h),m=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),g=!1,b()}}}function wD(n){let e,t,i,s,l,o;e=new Ci({}),i=new pn({props:{$$slots:{default:[kD]},$$scope:{ctx:n}}});let r={};return l=new rD({props:r}),n[28](l),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment),s=O(),j(l.$$.fragment)},m(a,u){R(e,a,u),S(a,t,u),R(i,a,u),S(a,s,u),R(l,a,u),o=!0},p(a,u){const f={};u[0]&63|u[1]&2&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(E(e.$$.fragment,a),E(i.$$.fragment,a),E(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&w(t),H(i,a),a&&w(s),n[28](null),H(l,a)}}}function SD(n,e,t){let i,s,l;Ze(n,mt,X=>t(5,l=X));const o=[{label:"Auto (StartTLS)",value:!1},{label:"Always",value:!0}],r=[{label:"PLAIN (default)",value:"PLAIN"},{label:"LOGIN",value:"LOGIN"}];Ht(mt,l="Mail settings",l);let a,u={},f={},c=!1,d=!1;h();async function h(){t(2,c=!0);try{const X=await de.settings.getAll()||{};g(X)}catch(X){de.errorResponseHandler(X)}t(2,c=!1)}async function m(){if(!(d||!s)){t(3,d=!0);try{const X=await de.settings.update(W.filterRedactedProps(f));g(X),Fn({}),Lt("Successfully saved mail settings.")}catch(X){de.errorResponseHandler(X)}t(3,d=!1)}}function g(X={}){t(0,f={meta:(X==null?void 0:X.meta)||{},smtp:(X==null?void 0:X.smtp)||{}}),f.smtp.authMethod||t(0,f.smtp.authMethod=r[0].value,f),t(10,u=JSON.parse(JSON.stringify(f)))}function b(){t(0,f=JSON.parse(JSON.stringify(u||{})))}function y(){f.meta.senderName=this.value,t(0,f)}function k(){f.meta.senderAddress=this.value,t(0,f)}function $(X){n.$$.not_equal(f.meta.verificationTemplate,X)&&(f.meta.verificationTemplate=X,t(0,f))}function C(X){n.$$.not_equal(f.meta.resetPasswordTemplate,X)&&(f.meta.resetPasswordTemplate=X,t(0,f))}function M(X){n.$$.not_equal(f.meta.confirmEmailChangeTemplate,X)&&(f.meta.confirmEmailChangeTemplate=X,t(0,f))}function T(){f.smtp.enabled=this.checked,t(0,f)}function D(){f.smtp.host=this.value,t(0,f)}function A(){f.smtp.port=rt(this.value),t(0,f)}function I(X){n.$$.not_equal(f.smtp.tls,X)&&(f.smtp.tls=X,t(0,f))}function L(X){n.$$.not_equal(f.smtp.authMethod,X)&&(f.smtp.authMethod=X,t(0,f))}function F(){f.smtp.username=this.value,t(0,f)}function q(X){n.$$.not_equal(f.smtp.password,X)&&(f.smtp.password=X,t(0,f))}const z=()=>b(),J=()=>m(),G=()=>a==null?void 0:a.show(),ie=()=>m();function Q(X){le[X?"unshift":"push"](()=>{a=X,t(1,a)})}return n.$$.update=()=>{n.$$.dirty[0]&1024&&t(11,i=JSON.stringify(u)),n.$$.dirty[0]&2049&&t(4,s=i!=JSON.stringify(f))},[f,a,c,d,s,l,o,r,m,b,u,i,y,k,$,C,M,T,D,A,I,L,F,q,z,J,G,ie,Q]}class $D extends ke{constructor(e){super(),ye(this,e,SD,wD,be,{},null,[-1,-1])}}function CD(n){var C,M;let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g;e=new ge({props:{class:"form-field form-field-toggle",$$slots:{default:[MD,({uniqueId:T})=>({25:T}),({uniqueId:T})=>T?33554432:0]},$$scope:{ctx:n}}});let b=((C=n[0].s3)==null?void 0:C.enabled)!=n[1].s3.enabled&&ph(n),y=n[1].s3.enabled&&hh(n),k=((M=n[1].s3)==null?void 0:M.enabled)&&!n[6]&&!n[3]&&mh(n),$=n[6]&&gh(n);return{c(){j(e.$$.fragment),t=O(),b&&b.c(),i=O(),y&&y.c(),s=O(),l=v("div"),o=v("div"),r=O(),k&&k.c(),a=O(),$&&$.c(),u=O(),f=v("button"),c=v("span"),c.textContent="Save changes",p(o,"class","flex-fill"),p(c,"class","txt"),p(f,"type","submit"),p(f,"class","btn btn-expanded"),f.disabled=d=!n[6]||n[3],ne(f,"btn-loading",n[3]),p(l,"class","flex")},m(T,D){R(e,T,D),S(T,t,D),b&&b.m(T,D),S(T,i,D),y&&y.m(T,D),S(T,s,D),S(T,l,D),_(l,o),_(l,r),k&&k.m(l,null),_(l,a),$&&$.m(l,null),_(l,u),_(l,f),_(f,c),h=!0,m||(g=K(f,"click",n[19]),m=!0)},p(T,D){var I,L;const A={};D&100663298&&(A.$$scope={dirty:D,ctx:T}),e.$set(A),((I=T[0].s3)==null?void 0:I.enabled)!=T[1].s3.enabled?b?(b.p(T,D),D&3&&E(b,1)):(b=ph(T),b.c(),E(b,1),b.m(i.parentNode,i)):b&&(pe(),P(b,1,1,()=>{b=null}),he()),T[1].s3.enabled?y?(y.p(T,D),D&2&&E(y,1)):(y=hh(T),y.c(),E(y,1),y.m(s.parentNode,s)):y&&(pe(),P(y,1,1,()=>{y=null}),he()),((L=T[1].s3)==null?void 0:L.enabled)&&!T[6]&&!T[3]?k?k.p(T,D):(k=mh(T),k.c(),k.m(l,a)):k&&(k.d(1),k=null),T[6]?$?$.p(T,D):($=gh(T),$.c(),$.m(l,u)):$&&($.d(1),$=null),(!h||D&72&&d!==(d=!T[6]||T[3]))&&(f.disabled=d),(!h||D&8)&&ne(f,"btn-loading",T[3])},i(T){h||(E(e.$$.fragment,T),E(b),E(y),h=!0)},o(T){P(e.$$.fragment,T),P(b),P(y),h=!1},d(T){H(e,T),T&&w(t),b&&b.d(T),T&&w(i),y&&y.d(T),T&&w(s),T&&w(l),k&&k.d(),$&&$.d(),m=!1,g()}}}function TD(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&w(e)}}}function MD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Use S3 storage"),p(e,"type","checkbox"),p(e,"id",t=n[25]),e.required=!0,p(s,"for",o=n[25])},m(u,f){S(u,e,f),e.checked=n[1].s3.enabled,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[11]),r=!0)},p(u,f){f&33554432&&t!==(t=u[25])&&p(e,"id",t),f&2&&(e.checked=u[1].s3.enabled),f&33554432&&o!==(o=u[25])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function ph(n){var I;let e,t,i,s,l,o,r,a=(I=n[0].s3)!=null&&I.enabled?"S3 storage":"local file system",u,f,c,d=n[1].s3.enabled?"S3 storage":"local file system",h,m,g,b,y,k,$,C,M,T,D,A;return{c(){e=v("div"),t=v("div"),i=v("div"),i.innerHTML='',s=O(),l=v("div"),o=B(`If you have existing uploaded files, you'll have to migrate them manually from the `),r=v("strong"),u=B(a),f=B(` to the `),c=v("strong"),h=B(d),m=B(`. - `),b=v("br"),g=B(` + `),g=v("br"),b=B(` There are numerous command line tools that can help you, such as: `),y=v("a"),y.textContent=`rclone `,k=B(`, `),$=v("a"),$.textContent=`s5cmd - `,C=B(", etc."),M=O(),T=v("div"),p(i,"class","icon"),p(y,"href","https://github.com/rclone/rclone"),p(y,"target","_blank"),p(y,"rel","noopener noreferrer"),p(y,"class","txt-bold"),p($,"href","https://github.com/peak/s5cmd"),p($,"target","_blank"),p($,"rel","noopener noreferrer"),p($,"class","txt-bold"),p(l,"class","content"),p(t,"class","alert alert-warning m-0"),p(T,"class","clearfix m-t-base")},m(L,F){S(L,e,F),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),_(l,r),_(r,u),_(l,f),_(l,c),_(c,h),_(l,m),_(l,b),_(l,g),_(l,y),_(l,k),_(l,$),_(l,C),_(e,M),_(e,T),A=!0},p(L,F){var q;(!A||F&1)&&a!==(a=(q=L[0].s3)!=null&&q.enabled?"S3 storage":"local file system")&&ae(u,a),(!A||F&2)&&d!==(d=L[1].s3.enabled?"S3 storage":"local file system")&&ae(h,d)},i(L){A||(L&&xe(()=>{D||(D=je(e,St,{duration:150},!0)),D.run(1)}),A=!0)},o(L){L&&(D||(D=je(e,St,{duration:150},!1)),D.run(0)),A=!1},d(L){L&&w(e),L&&D&&D.end()}}}function ph(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M,T;return i=new ge({props:{class:"form-field required",name:"s3.endpoint",$$slots:{default:[MD,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:"s3.bucket",$$slots:{default:[OD,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),u=new ge({props:{class:"form-field required",name:"s3.region",$$slots:{default:[DD,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),d=new ge({props:{class:"form-field required",name:"s3.accessKey",$$slots:{default:[AD,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),b=new ge({props:{class:"form-field required",name:"s3.secret",$$slots:{default:[ED,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),k=new ge({props:{class:"form-field",name:"s3.forcePathStyle",$$slots:{default:[ID,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),f=O(),c=v("div"),j(d.$$.fragment),h=O(),m=v("div"),j(b.$$.fragment),g=O(),y=v("div"),j(k.$$.fragment),$=O(),C=v("div"),p(t,"class","col-lg-6"),p(l,"class","col-lg-3"),p(a,"class","col-lg-3"),p(c,"class","col-lg-6"),p(m,"class","col-lg-6"),p(y,"class","col-lg-12"),p(C,"class","col-lg-12"),p(e,"class","grid")},m(D,A){S(D,e,A),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),R(u,a,null),_(e,f),_(e,c),R(d,c,null),_(e,h),_(e,m),R(b,m,null),_(e,g),_(e,y),R(k,y,null),_(e,$),_(e,C),T=!0},p(D,A){const I={};A&100663298&&(I.$$scope={dirty:A,ctx:D}),i.$set(I);const L={};A&100663298&&(L.$$scope={dirty:A,ctx:D}),o.$set(L);const F={};A&100663298&&(F.$$scope={dirty:A,ctx:D}),u.$set(F);const q={};A&100663298&&(q.$$scope={dirty:A,ctx:D}),d.$set(q);const z={};A&100663298&&(z.$$scope={dirty:A,ctx:D}),b.$set(z);const J={};A&100663298&&(J.$$scope={dirty:A,ctx:D}),k.$set(J)},i(D){T||(E(i.$$.fragment,D),E(o.$$.fragment,D),E(u.$$.fragment,D),E(d.$$.fragment,D),E(b.$$.fragment,D),E(k.$$.fragment,D),D&&xe(()=>{M||(M=je(e,St,{duration:150},!0)),M.run(1)}),T=!0)},o(D){P(i.$$.fragment,D),P(o.$$.fragment,D),P(u.$$.fragment,D),P(d.$$.fragment,D),P(b.$$.fragment,D),P(k.$$.fragment,D),D&&(M||(M=je(e,St,{duration:150},!1)),M.run(0)),T=!1},d(D){D&&w(e),H(i),H(o),H(u),H(d),H(b),H(k),D&&M&&M.end()}}}function MD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Endpoint"),s=O(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[1].s3.endpoint),r||(a=K(l,"input",n[12]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.endpoint&&ce(l,u[1].s3.endpoint)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function OD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Bucket"),s=O(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[1].s3.bucket),r||(a=K(l,"input",n[13]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.bucket&&ce(l,u[1].s3.bucket)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function DD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Region"),s=O(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[1].s3.region),r||(a=K(l,"input",n[14]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.region&&ce(l,u[1].s3.region)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function AD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Access key"),s=O(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[1].s3.accessKey),r||(a=K(l,"input",n[15]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.accessKey&&ce(l,u[1].s3.accessKey)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function ED(n){let e,t,i,s,l,o,r;function a(f){n[16](f)}let u={id:n[25],required:!0};return n[1].s3.secret!==void 0&&(u.value=n[1].s3.secret),l=new Ga({props:u}),le.push(()=>_e(l,"value",a)),{c(){e=v("label"),t=B("Secret"),s=O(),j(l.$$.fragment),p(e,"for",i=n[25])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&33554432&&i!==(i=f[25]))&&p(e,"for",i);const d={};c&33554432&&(d.id=f[25]),!o&&c&2&&(o=!0,d.value=f[1].s3.secret,ve(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function ID(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Force path-style addressing",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[25]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[25])},m(c,d){S(c,e,d),e.checked=n[1].s3.forcePathStyle,S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[K(e,"change",n[17]),Ae(Be.call(null,r,{text:'Forces the request to use path-style addressing, eg. "https://s3.amazonaws.com/BUCKET/KEY" instead of the default "https://BUCKET.s3.amazonaws.com/KEY".',position:"top"}))],u=!0)},p(c,d){d&33554432&&t!==(t=c[25])&&p(e,"id",t),d&2&&(e.checked=c[1].s3.forcePathStyle),d&33554432&&a!==(a=c[25])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Pe(f)}}}function hh(n){let e;function t(l,o){return l[4]?ND:l[5]?LD:PD}let i=t(n),s=i(n);return{c(){s.c(),e=Ee()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function PD(n){let e;return{c(){e=v("div"),e.innerHTML=` - S3 connected successfully`,p(e,"class","label label-sm label-success entrance-right")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function LD(n){let e,t,i,s;return{c(){e=v("div"),e.innerHTML=` - Failed to establish S3 connection`,p(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;S(l,e,o),i||(s=Ae(t=Be.call(null,e,(r=n[5].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&Jt(t.update)&&o&32&&t.update.call(null,(r=l[5].data)==null?void 0:r.message)},d(l){l&&w(e),i=!1,s()}}}function ND(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){S(t,e,i)},p:te,d(t){t&&w(e)}}}function mh(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary btn-hint"),e.disabled=n[3]},m(l,o){S(l,e,o),_(e,t),i||(s=K(e,"click",n[18]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&w(e),i=!1,s()}}}function FD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g;const y=[CD,$D],k=[];function $(C,M){return C[2]?0:1}return d=$(n),h=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=B(n[7]),r=O(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML=`

    By default PocketBase uses the local file system to store uploaded files.

    -

    If you have limited disk space, you could optionally connect to a S3 compatible storage.

    `,c=O(),h.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content txt-xl m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){S(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(C,r,M),S(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),m=!0,b||(g=K(u,"submit",ut(n[20])),b=!0)},p(C,M){(!m||M&128)&&ae(o,C[7]);let T=d;d=$(C),d===T?k[d].p(C,M):(pe(),P(k[T],1,1,()=>{k[T]=null}),he(),h=k[d],h?h.p(C,M):(h=k[d]=y[d](C),h.c()),E(h,1),h.m(u,null))},i(C){m||(E(h),m=!0)},o(C){P(h),m=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),b=!1,g()}}}function RD(n){let e,t,i,s;return e=new Ci({}),i=new pn({props:{$$slots:{default:[FD]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(l,o){R(e,l,o),S(l,t,o),R(i,l,o),s=!0},p(l,[o]){const r={};o&67109119&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}const lo="s3_test_request";function HD(n,e,t){let i,s,l;Ze(n,mt,q=>t(7,l=q)),Ht(mt,l="Files storage",l);let o={},r={},a=!1,u=!1,f=!1,c=null,d=null;h();async function h(){t(2,a=!0);try{const q=await de.settings.getAll()||{};b(q)}catch(q){de.errorResponseHandler(q)}t(2,a=!1)}async function m(){if(!(u||!s)){t(3,u=!0);try{de.cancelRequest(lo);const q=await de.settings.update(W.filterRedactedProps(r));Fn({}),await b(q),Ig(),c?I1("Successfully saved but failed to establish S3 connection."):Lt("Successfully saved files storage settings.")}catch(q){de.errorResponseHandler(q)}t(3,u=!1)}}async function b(q={}){t(1,r={s3:(q==null?void 0:q.s3)||{}}),t(0,o=JSON.parse(JSON.stringify(r))),await y()}async function g(){t(1,r=JSON.parse(JSON.stringify(o||{}))),await y()}async function y(){if(t(5,c=null),!!r.s3.enabled){de.cancelRequest(lo),clearTimeout(d),d=setTimeout(()=>{de.cancelRequest(lo),addErrorToast("S3 test connection timeout.")},3e4),t(4,f=!0);try{await de.settings.testS3({$cancelKey:lo})}catch(q){t(5,c=q)}t(4,f=!1),clearTimeout(d)}}cn(()=>()=>{clearTimeout(d)});function k(){r.s3.enabled=this.checked,t(1,r)}function $(){r.s3.endpoint=this.value,t(1,r)}function C(){r.s3.bucket=this.value,t(1,r)}function M(){r.s3.region=this.value,t(1,r)}function T(){r.s3.accessKey=this.value,t(1,r)}function D(q){n.$$.not_equal(r.s3.secret,q)&&(r.s3.secret=q,t(1,r))}function A(){r.s3.forcePathStyle=this.checked,t(1,r)}const I=()=>g(),L=()=>m(),F=()=>m();return n.$$.update=()=>{n.$$.dirty&1&&t(10,i=JSON.stringify(o)),n.$$.dirty&1026&&t(6,s=i!=JSON.stringify(r))},[o,r,a,u,f,c,s,l,m,g,i,k,$,C,M,T,D,A,I,L,F]}class jD extends ke{constructor(e){super(),ye(this,e,HD,RD,be,{})}}function qD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[20]),p(s,"for",o=n[20])},m(u,f){S(u,e,f),e.checked=n[0].enabled,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[12]),r=!0)},p(u,f){f&1048576&&t!==(t=u[20])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&1048576&&o!==(o=u[20])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function gh(n){let e,t,i,s,l,o,r,a,u,f,c;l=new ge({props:{class:"form-field required",name:n[1]+".clientId",$$slots:{default:[VD,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}}),a=new ge({props:{class:"form-field required",name:n[1]+".clientSecret",$$slots:{default:[zD,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}});let d=n[4]&&_h(n);return{c(){e=v("div"),t=v("div"),i=O(),s=v("div"),j(l.$$.fragment),o=O(),r=v("div"),j(a.$$.fragment),u=O(),d&&d.c(),p(t,"class","col-12 spacing"),p(s,"class","col-lg-6"),p(r,"class","col-lg-6"),p(e,"class","grid")},m(h,m){S(h,e,m),_(e,t),_(e,i),_(e,s),R(l,s,null),_(e,o),_(e,r),R(a,r,null),_(e,u),d&&d.m(e,null),c=!0},p(h,m){const b={};m&2&&(b.name=h[1]+".clientId"),m&3145729&&(b.$$scope={dirty:m,ctx:h}),l.$set(b);const g={};m&2&&(g.name=h[1]+".clientSecret"),m&3145729&&(g.$$scope={dirty:m,ctx:h}),a.$set(g),h[4]?d?(d.p(h,m),m&16&&E(d,1)):(d=_h(h),d.c(),E(d,1),d.m(e,null)):d&&(pe(),P(d,1,1,()=>{d=null}),he())},i(h){c||(E(l.$$.fragment,h),E(a.$$.fragment,h),E(d),h&&xe(()=>{f||(f=je(e,St,{duration:200},!0)),f.run(1)}),c=!0)},o(h){P(l.$$.fragment,h),P(a.$$.fragment,h),P(d),h&&(f||(f=je(e,St,{duration:200},!1)),f.run(0)),c=!1},d(h){h&&w(e),H(l),H(a),d&&d.d(),h&&f&&f.end()}}}function VD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Client ID"),s=O(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].clientId),r||(a=K(l,"input",n[13]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].clientId&&ce(l,u[0].clientId)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function zD(n){let e,t,i,s,l,o,r;function a(f){n[14](f)}let u={id:n[20],required:!0};return n[0].clientSecret!==void 0&&(u.value=n[0].clientSecret),l=new Ga({props:u}),le.push(()=>_e(l,"value",a)),{c(){e=v("label"),t=B("Client Secret"),s=O(),j(l.$$.fragment),p(e,"for",i=n[20])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&1048576&&i!==(i=f[20]))&&p(e,"for",i);const d={};c&1048576&&(d.id=f[20]),!o&&c&1&&(o=!0,d.value=f[0].clientSecret,ve(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function _h(n){let e,t,i,s;function l(a){n[15](a)}var o=n[4];function r(a){let u={key:a[1]};return a[0]!==void 0&&(u.config=a[0]),{props:u}}return o&&(t=jt(o,r(n)),le.push(()=>_e(t,"config",l))),{c(){e=v("div"),t&&j(t.$$.fragment),p(e,"class","col-lg-12")},m(a,u){S(a,e,u),t&&R(t,e,null),s=!0},p(a,u){const f={};if(u&2&&(f.key=a[1]),!i&&u&1&&(i=!0,f.config=a[0],ve(()=>i=!1)),o!==(o=a[4])){if(t){pe();const c=t;P(c.$$.fragment,1,0,()=>{H(c,1)}),he()}o?(t=jt(o,r(a)),le.push(()=>_e(t,"config",l)),j(t.$$.fragment),E(t.$$.fragment,1),R(t,e,null)):t=null}else o&&t.$set(f)},i(a){s||(t&&E(t.$$.fragment,a),s=!0)},o(a){t&&P(t.$$.fragment,a),s=!1},d(a){a&&w(e),t&&H(t)}}}function BD(n){let e,t,i,s;e=new ge({props:{class:"form-field form-field-toggle m-b-0",name:n[1]+".enabled",$$slots:{default:[qD,({uniqueId:o})=>({20:o}),({uniqueId:o})=>o?1048576:0]},$$scope:{ctx:n}}});let l=n[0].enabled&&gh(n);return{c(){j(e.$$.fragment),t=O(),l&&l.c(),i=Ee()},m(o,r){R(e,o,r),S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){const a={};r&2&&(a.name=o[1]+".enabled"),r&3145729&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].enabled?l?(l.p(o,r),r&1&&E(l,1)):(l=gh(o),l.c(),E(l,1),l.m(i.parentNode,i)):l&&(pe(),P(l,1,1,()=>{l=null}),he())},i(o){s||(E(e.$$.fragment,o),E(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){H(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function bh(n){let e;return{c(){e=v("i"),p(e,"class",n[3])},m(t,i){S(t,e,i)},p(t,i){i&8&&p(e,"class",t[3])},d(t){t&&w(e)}}}function UD(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label label-hint")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function WD(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function vh(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ae(Be.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(xe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function YD(n){let e,t,i,s,l,o,r,a,u,f,c=n[3]&&bh(n);function d(g,y){return g[0].enabled?WD:UD}let h=d(n),m=h(n),b=n[6]&&vh();return{c(){e=v("div"),c&&c.c(),t=O(),i=v("span"),s=B(n[2]),l=O(),m.c(),o=O(),r=v("div"),a=O(),b&&b.c(),u=Ee(),p(i,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(g,y){S(g,e,y),c&&c.m(e,null),_(e,t),_(e,i),_(i,s),S(g,l,y),m.m(g,y),S(g,o,y),S(g,r,y),S(g,a,y),b&&b.m(g,y),S(g,u,y),f=!0},p(g,y){g[3]?c?c.p(g,y):(c=bh(g),c.c(),c.m(e,t)):c&&(c.d(1),c=null),(!f||y&4)&&ae(s,g[2]),h!==(h=d(g))&&(m.d(1),m=h(g),m&&(m.c(),m.m(o.parentNode,o))),g[6]?b?y&64&&E(b,1):(b=vh(),b.c(),E(b,1),b.m(u.parentNode,u)):b&&(pe(),P(b,1,1,()=>{b=null}),he())},i(g){f||(E(b),f=!0)},o(g){P(b),f=!1},d(g){g&&w(e),c&&c.d(),g&&w(l),m.d(g),g&&w(o),g&&w(r),g&&w(a),b&&b.d(g),g&&w(u)}}}function KD(n){let e,t;const i=[n[7]];let s={$$slots:{header:[YD],default:[BD]},$$scope:{ctx:n}};for(let l=0;lt(11,o=A));let{key:r}=e,{title:a}=e,{icon:u=""}=e,{config:f={}}=e,{optionsComponent:c}=e,d;function h(){d==null||d.expand()}function m(){d==null||d.collapse()}function b(){d==null||d.collapseSiblings()}function g(){f.enabled=this.checked,t(0,f)}function y(){f.clientId=this.value,t(0,f)}function k(A){n.$$.not_equal(f.clientSecret,A)&&(f.clientSecret=A,t(0,f))}function $(A){f=A,t(0,f)}function C(A){le[A?"unshift":"push"](()=>{d=A,t(5,d)})}function M(A){Ve.call(this,n,A)}function T(A){Ve.call(this,n,A)}function D(A){Ve.call(this,n,A)}return n.$$set=A=>{e=Ke(Ke({},e),Wn(A)),t(7,l=wt(e,s)),"key"in A&&t(1,r=A.key),"title"in A&&t(2,a=A.title),"icon"in A&&t(3,u=A.icon),"config"in A&&t(0,f=A.config),"optionsComponent"in A&&t(4,c=A.optionsComponent)},n.$$.update=()=>{n.$$.dirty&2050&&t(6,i=!W.isEmpty(W.getNestedVal(o,r))),n.$$.dirty&3&&(f.enabled||Ss(r))},[f,r,a,u,c,d,i,l,h,m,b,o,g,y,k,$,C,M,T,D]}class ZD extends ke{constructor(e){super(),ye(this,e,JD,KD,be,{key:1,title:2,icon:3,config:0,optionsComponent:4,expand:8,collapse:9,collapseSiblings:10})}get expand(){return this.$$.ctx[8]}get collapse(){return this.$$.ctx[9]}get collapseSiblings(){return this.$$.ctx[10]}}function yh(n,e,t){const i=n.slice();return i[16]=e[t][0],i[17]=e[t][1],i[18]=e,i[19]=t,i}function GD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h=Object.entries(bl),m=[];for(let y=0;yP(m[y],1,1,()=>{m[y]=null});let g=n[4]&&wh(n);return{c(){e=v("div");for(let y=0;yn[10](e,t),o=()=>n[10](null,t);function r(u){n[11](u,n[16])}let a={single:!0,key:n[16],title:n[17].title,icon:n[17].icon||"ri-fingerprint-line",optionsComponent:n[17].optionsComponent};return n[0][n[16]]!==void 0&&(a.config=n[0][n[16]]),e=new ZD({props:a}),l(),le.push(()=>_e(e,"config",r)),{c(){j(e.$$.fragment)},m(u,f){R(e,u,f),s=!0},p(u,f){n=u,t!==n[16]&&(o(),t=n[16],l());const c={};!i&&f&1&&(i=!0,c.config=n[0][n[16]],ve(()=>i=!1)),e.$set(c)},i(u){s||(E(e.$$.fragment,u),s=!0)},o(u){P(e.$$.fragment,u),s=!1},d(u){o(),H(e,u)}}}function wh(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary btn-hint"),e.disabled=n[3]},m(l,o){S(l,e,o),_(e,t),i||(s=K(e,"click",n[12]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&w(e),i=!1,s()}}}function QD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g;const y=[XD,GD],k=[];function $(C,M){return C[2]?0:1}return d=$(n),h=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=B(n[5]),r=O(),a=v("div"),u=v("form"),f=v("h6"),f.textContent="Manage the allowed users sign-in/sign-up methods.",c=O(),h.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){S(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(C,r,M),S(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),m=!0,b||(g=K(u,"submit",ut(n[6])),b=!0)},p(C,M){(!m||M&32)&&ae(o,C[5]);let T=d;d=$(C),d===T?k[d].p(C,M):(pe(),P(k[T],1,1,()=>{k[T]=null}),he(),h=k[d],h?h.p(C,M):(h=k[d]=y[d](C),h.c()),E(h,1),h.m(u,null))},i(C){m||(E(h),m=!0)},o(C){P(h),m=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),b=!1,g()}}}function xD(n){let e,t,i,s;return e=new Ci({}),i=new pn({props:{$$slots:{default:[QD]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(l,o){R(e,l,o),S(l,t,o),R(i,l,o),s=!0},p(l,[o]){const r={};o&1048639&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function eA(n,e,t){let i,s,l;Ze(n,mt,$=>t(5,l=$)),Ht(mt,l="Auth providers",l);let o={},r={},a={},u=!1,f=!1;c();async function c(){t(2,u=!0);try{const $=await de.settings.getAll()||{};h($)}catch($){de.errorResponseHandler($)}t(2,u=!1)}async function d(){var $;if(!(f||!s)){t(3,f=!0);try{const C=await de.settings.update(W.filterRedactedProps(a));h(C),Fn({}),($=o[Object.keys(o)[0]])==null||$.collapseSiblings(),Lt("Successfully updated auth providers.")}catch(C){de.errorResponseHandler(C)}t(3,f=!1)}}function h($){$=$||{},t(0,a={});for(const C in bl)t(0,a[C]=Object.assign({enabled:!1},$[C]),a);t(8,r=JSON.parse(JSON.stringify(a)))}function m(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function b($,C){le[$?"unshift":"push"](()=>{o[C]=$,t(1,o)})}function g($,C){n.$$.not_equal(a[C],$)&&(a[C]=$,t(0,a))}const y=()=>m(),k=()=>d();return n.$$.update=()=>{n.$$.dirty&256&&t(9,i=JSON.stringify(r)),n.$$.dirty&513&&t(4,s=i!=JSON.stringify(a))},[a,o,u,f,s,l,d,m,r,i,b,g,y,k]}class tA extends ke{constructor(e){super(),ye(this,e,eA,xD,be,{})}}function Sh(n,e,t){const i=n.slice();return i[16]=e[t],i[17]=e,i[18]=t,i}function nA(n){let e=[],t=new Map,i,s,l,o,r,a,u,f,c,d,h,m=n[5];const b=y=>y[16].key;for(let y=0;y({19:l}),({uniqueId:l})=>l?524288:0]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=Ee(),j(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),R(i,l,o),s=!0},p(l,o){e=l;const r={};o&1572865&&(r.$$scope={dirty:o,ctx:e}),i.$set(r)},i(l){s||(E(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(t),H(i,l)}}}function Ch(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary btn-hint"),e.disabled=n[2]},m(l,o){S(l,e,o),_(e,t),i||(s=K(e,"click",n[12]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&w(e),i=!1,s()}}}function lA(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g;const y=[iA,nA],k=[];function $(C,M){return C[1]?0:1}return d=$(n),h=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=B(n[4]),r=O(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="

    Adjust common token options.

    ",c=O(),h.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content m-b-sm txt-xl"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){S(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(C,r,M),S(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),m=!0,b||(g=K(u,"submit",ut(n[6])),b=!0)},p(C,M){(!m||M&16)&&ae(o,C[4]);let T=d;d=$(C),d===T?k[d].p(C,M):(pe(),P(k[T],1,1,()=>{k[T]=null}),he(),h=k[d],h?h.p(C,M):(h=k[d]=y[d](C),h.c()),E(h,1),h.m(u,null))},i(C){m||(E(h),m=!0)},o(C){P(h),m=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),b=!1,g()}}}function oA(n){let e,t,i,s;return e=new Ci({}),i=new pn({props:{$$slots:{default:[lA]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(l,o){R(e,l,o),S(l,t,o),R(i,l,o),s=!0},p(l,[o]){const r={};o&1048607&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function rA(n,e,t){let i,s,l;Ze(n,mt,$=>t(4,l=$));const o=[{key:"recordAuthToken",label:"Auth record authentication token"},{key:"recordVerificationToken",label:"Auth record email verification token"},{key:"recordPasswordResetToken",label:"Auth record password reset token"},{key:"recordEmailChangeToken",label:"Auth record email change token"},{key:"adminAuthToken",label:"Admins auth token"},{key:"adminPasswordResetToken",label:"Admins password reset token"}];Ht(mt,l="Token options",l);let r={},a={},u=!1,f=!1;c();async function c(){t(1,u=!0);try{const $=await de.settings.getAll()||{};h($)}catch($){de.errorResponseHandler($)}t(1,u=!1)}async function d(){if(!(f||!s)){t(2,f=!0);try{const $=await de.settings.update(W.filterRedactedProps(a));h($),Lt("Successfully saved tokens options.")}catch($){de.errorResponseHandler($)}t(2,f=!1)}}function h($){var C;$=$||{},t(0,a={});for(const M of o)t(0,a[M.key]={duration:((C=$[M.key])==null?void 0:C.duration)||0},a);t(8,r=JSON.parse(JSON.stringify(a)))}function m(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function b($){a[$.key].duration=rt(this.value),t(0,a)}const g=$=>{a[$.key].secret?(delete a[$.key].secret,t(0,a)):t(0,a[$.key].secret=W.randomString(50),a)},y=()=>m(),k=()=>d();return n.$$.update=()=>{n.$$.dirty&256&&t(9,i=JSON.stringify(r)),n.$$.dirty&513&&t(3,s=i!=JSON.stringify(a))},[a,u,f,s,l,o,d,m,r,i,b,g,y,k]}class aA extends ke{constructor(e){super(),ye(this,e,rA,oA,be,{})}}function uA(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m;return o=new P_({props:{content:n[2]}}),{c(){e=v("div"),e.innerHTML=`

    Below you'll find your current collections configuration that you could import in + `,C=B(", etc."),M=O(),T=v("div"),p(i,"class","icon"),p(y,"href","https://github.com/rclone/rclone"),p(y,"target","_blank"),p(y,"rel","noopener noreferrer"),p(y,"class","txt-bold"),p($,"href","https://github.com/peak/s5cmd"),p($,"target","_blank"),p($,"rel","noopener noreferrer"),p($,"class","txt-bold"),p(l,"class","content"),p(t,"class","alert alert-warning m-0"),p(T,"class","clearfix m-t-base")},m(L,F){S(L,e,F),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),_(l,r),_(r,u),_(l,f),_(l,c),_(c,h),_(l,m),_(l,g),_(l,b),_(l,y),_(l,k),_(l,$),_(l,C),_(e,M),_(e,T),A=!0},p(L,F){var q;(!A||F&1)&&a!==(a=(q=L[0].s3)!=null&&q.enabled?"S3 storage":"local file system")&&re(u,a),(!A||F&2)&&d!==(d=L[1].s3.enabled?"S3 storage":"local file system")&&re(h,d)},i(L){A||(L&&xe(()=>{D||(D=je(e,St,{duration:150},!0)),D.run(1)}),A=!0)},o(L){L&&(D||(D=je(e,St,{duration:150},!1)),D.run(0)),A=!1},d(L){L&&w(e),L&&D&&D.end()}}}function hh(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,b,y,k,$,C,M,T;return i=new ge({props:{class:"form-field required",name:"s3.endpoint",$$slots:{default:[OD,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),o=new ge({props:{class:"form-field required",name:"s3.bucket",$$slots:{default:[DD,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),u=new ge({props:{class:"form-field required",name:"s3.region",$$slots:{default:[AD,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),d=new ge({props:{class:"form-field required",name:"s3.accessKey",$$slots:{default:[ED,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),g=new ge({props:{class:"form-field required",name:"s3.secret",$$slots:{default:[ID,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),k=new ge({props:{class:"form-field",name:"s3.forcePathStyle",$$slots:{default:[PD,({uniqueId:D})=>({25:D}),({uniqueId:D})=>D?33554432:0]},$$scope:{ctx:n}}}),{c(){e=v("div"),t=v("div"),j(i.$$.fragment),s=O(),l=v("div"),j(o.$$.fragment),r=O(),a=v("div"),j(u.$$.fragment),f=O(),c=v("div"),j(d.$$.fragment),h=O(),m=v("div"),j(g.$$.fragment),b=O(),y=v("div"),j(k.$$.fragment),$=O(),C=v("div"),p(t,"class","col-lg-6"),p(l,"class","col-lg-3"),p(a,"class","col-lg-3"),p(c,"class","col-lg-6"),p(m,"class","col-lg-6"),p(y,"class","col-lg-12"),p(C,"class","col-lg-12"),p(e,"class","grid")},m(D,A){S(D,e,A),_(e,t),R(i,t,null),_(e,s),_(e,l),R(o,l,null),_(e,r),_(e,a),R(u,a,null),_(e,f),_(e,c),R(d,c,null),_(e,h),_(e,m),R(g,m,null),_(e,b),_(e,y),R(k,y,null),_(e,$),_(e,C),T=!0},p(D,A){const I={};A&100663298&&(I.$$scope={dirty:A,ctx:D}),i.$set(I);const L={};A&100663298&&(L.$$scope={dirty:A,ctx:D}),o.$set(L);const F={};A&100663298&&(F.$$scope={dirty:A,ctx:D}),u.$set(F);const q={};A&100663298&&(q.$$scope={dirty:A,ctx:D}),d.$set(q);const z={};A&100663298&&(z.$$scope={dirty:A,ctx:D}),g.$set(z);const J={};A&100663298&&(J.$$scope={dirty:A,ctx:D}),k.$set(J)},i(D){T||(E(i.$$.fragment,D),E(o.$$.fragment,D),E(u.$$.fragment,D),E(d.$$.fragment,D),E(g.$$.fragment,D),E(k.$$.fragment,D),D&&xe(()=>{M||(M=je(e,St,{duration:150},!0)),M.run(1)}),T=!0)},o(D){P(i.$$.fragment,D),P(o.$$.fragment,D),P(u.$$.fragment,D),P(d.$$.fragment,D),P(g.$$.fragment,D),P(k.$$.fragment,D),D&&(M||(M=je(e,St,{duration:150},!1)),M.run(0)),T=!1},d(D){D&&w(e),H(i),H(o),H(u),H(d),H(g),H(k),D&&M&&M.end()}}}function OD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Endpoint"),s=O(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[1].s3.endpoint),r||(a=K(l,"input",n[12]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.endpoint&&ce(l,u[1].s3.endpoint)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function DD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Bucket"),s=O(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[1].s3.bucket),r||(a=K(l,"input",n[13]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.bucket&&ce(l,u[1].s3.bucket)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function AD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Region"),s=O(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[1].s3.region),r||(a=K(l,"input",n[14]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.region&&ce(l,u[1].s3.region)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function ED(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Access key"),s=O(),l=v("input"),p(e,"for",i=n[25]),p(l,"type","text"),p(l,"id",o=n[25]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[1].s3.accessKey),r||(a=K(l,"input",n[15]),r=!0)},p(u,f){f&33554432&&i!==(i=u[25])&&p(e,"for",i),f&33554432&&o!==(o=u[25])&&p(l,"id",o),f&2&&l.value!==u[1].s3.accessKey&&ce(l,u[1].s3.accessKey)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function ID(n){let e,t,i,s,l,o,r;function a(f){n[16](f)}let u={id:n[25],required:!0};return n[1].s3.secret!==void 0&&(u.value=n[1].s3.secret),l=new Xa({props:u}),le.push(()=>_e(l,"value",a)),{c(){e=v("label"),t=B("Secret"),s=O(),j(l.$$.fragment),p(e,"for",i=n[25])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&33554432&&i!==(i=f[25]))&&p(e,"for",i);const d={};c&33554432&&(d.id=f[25]),!o&&c&2&&(o=!0,d.value=f[1].s3.secret,ve(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function PD(n){let e,t,i,s,l,o,r,a,u,f;return{c(){e=v("input"),i=O(),s=v("label"),l=v("span"),l.textContent="Force path-style addressing",o=O(),r=v("i"),p(e,"type","checkbox"),p(e,"id",t=n[25]),p(l,"class","txt"),p(r,"class","ri-information-line link-hint"),p(s,"for",a=n[25])},m(c,d){S(c,e,d),e.checked=n[1].s3.forcePathStyle,S(c,i,d),S(c,s,d),_(s,l),_(s,o),_(s,r),u||(f=[K(e,"change",n[17]),Ee(Ue.call(null,r,{text:'Forces the request to use path-style addressing, eg. "https://s3.amazonaws.com/BUCKET/KEY" instead of the default "https://BUCKET.s3.amazonaws.com/KEY".',position:"top"}))],u=!0)},p(c,d){d&33554432&&t!==(t=c[25])&&p(e,"id",t),d&2&&(e.checked=c[1].s3.forcePathStyle),d&33554432&&a!==(a=c[25])&&p(s,"for",a)},d(c){c&&w(e),c&&w(i),c&&w(s),u=!1,Pe(f)}}}function mh(n){let e;function t(l,o){return l[4]?FD:l[5]?ND:LD}let i=t(n),s=i(n);return{c(){s.c(),e=Ae()},m(l,o){s.m(l,o),S(l,e,o)},p(l,o){i===(i=t(l))&&s?s.p(l,o):(s.d(1),s=i(l),s&&(s.c(),s.m(e.parentNode,e)))},d(l){s.d(l),l&&w(e)}}}function LD(n){let e;return{c(){e=v("div"),e.innerHTML=` + S3 connected successfully`,p(e,"class","label label-sm label-success entrance-right")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function ND(n){let e,t,i,s;return{c(){e=v("div"),e.innerHTML=` + Failed to establish S3 connection`,p(e,"class","label label-sm label-warning entrance-right")},m(l,o){var r;S(l,e,o),i||(s=Ee(t=Ue.call(null,e,(r=n[5].data)==null?void 0:r.message)),i=!0)},p(l,o){var r;t&&Jt(t.update)&&o&32&&t.update.call(null,(r=l[5].data)==null?void 0:r.message)},d(l){l&&w(e),i=!1,s()}}}function FD(n){let e;return{c(){e=v("span"),p(e,"class","loader loader-sm")},m(t,i){S(t,e,i)},p:ee,d(t){t&&w(e)}}}function gh(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary btn-hint"),e.disabled=n[3]},m(l,o){S(l,e,o),_(e,t),i||(s=K(e,"click",n[18]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&w(e),i=!1,s()}}}function RD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,b;const y=[TD,CD],k=[];function $(C,M){return C[2]?0:1}return d=$(n),h=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=B(n[7]),r=O(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML=`

    By default PocketBase uses the local file system to store uploaded files.

    +

    If you have limited disk space, you could optionally connect to a S3 compatible storage.

    `,c=O(),h.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content txt-xl m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){S(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(C,r,M),S(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),m=!0,g||(b=K(u,"submit",ut(n[20])),g=!0)},p(C,M){(!m||M&128)&&re(o,C[7]);let T=d;d=$(C),d===T?k[d].p(C,M):(pe(),P(k[T],1,1,()=>{k[T]=null}),he(),h=k[d],h?h.p(C,M):(h=k[d]=y[d](C),h.c()),E(h,1),h.m(u,null))},i(C){m||(E(h),m=!0)},o(C){P(h),m=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),g=!1,b()}}}function HD(n){let e,t,i,s;return e=new Ci({}),i=new pn({props:{$$slots:{default:[RD]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(l,o){R(e,l,o),S(l,t,o),R(i,l,o),s=!0},p(l,[o]){const r={};o&67109119&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}const oo="s3_test_request";function jD(n,e,t){let i,s,l;Ze(n,mt,q=>t(7,l=q)),Ht(mt,l="Files storage",l);let o={},r={},a=!1,u=!1,f=!1,c=null,d=null;h();async function h(){t(2,a=!0);try{const q=await de.settings.getAll()||{};g(q)}catch(q){de.errorResponseHandler(q)}t(2,a=!1)}async function m(){if(!(u||!s)){t(3,u=!0);try{de.cancelRequest(oo);const q=await de.settings.update(W.filterRedactedProps(r));Fn({}),await g(q),Pg(),c?P1("Successfully saved but failed to establish S3 connection."):Lt("Successfully saved files storage settings.")}catch(q){de.errorResponseHandler(q)}t(3,u=!1)}}async function g(q={}){t(1,r={s3:(q==null?void 0:q.s3)||{}}),t(0,o=JSON.parse(JSON.stringify(r))),await y()}async function b(){t(1,r=JSON.parse(JSON.stringify(o||{}))),await y()}async function y(){if(t(5,c=null),!!r.s3.enabled){de.cancelRequest(oo),clearTimeout(d),d=setTimeout(()=>{de.cancelRequest(oo),addErrorToast("S3 test connection timeout.")},3e4),t(4,f=!0);try{await de.settings.testS3({$cancelKey:oo})}catch(q){t(5,c=q)}t(4,f=!1),clearTimeout(d)}}cn(()=>()=>{clearTimeout(d)});function k(){r.s3.enabled=this.checked,t(1,r)}function $(){r.s3.endpoint=this.value,t(1,r)}function C(){r.s3.bucket=this.value,t(1,r)}function M(){r.s3.region=this.value,t(1,r)}function T(){r.s3.accessKey=this.value,t(1,r)}function D(q){n.$$.not_equal(r.s3.secret,q)&&(r.s3.secret=q,t(1,r))}function A(){r.s3.forcePathStyle=this.checked,t(1,r)}const I=()=>b(),L=()=>m(),F=()=>m();return n.$$.update=()=>{n.$$.dirty&1&&t(10,i=JSON.stringify(o)),n.$$.dirty&1026&&t(6,s=i!=JSON.stringify(r))},[o,r,a,u,f,c,s,l,m,b,i,k,$,C,M,T,D,A,I,L,F]}class qD extends ke{constructor(e){super(),ye(this,e,jD,HD,be,{})}}function VD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("input"),i=O(),s=v("label"),l=B("Enable"),p(e,"type","checkbox"),p(e,"id",t=n[20]),p(s,"for",o=n[20])},m(u,f){S(u,e,f),e.checked=n[0].enabled,S(u,i,f),S(u,s,f),_(s,l),r||(a=K(e,"change",n[12]),r=!0)},p(u,f){f&1048576&&t!==(t=u[20])&&p(e,"id",t),f&1&&(e.checked=u[0].enabled),f&1048576&&o!==(o=u[20])&&p(s,"for",o)},d(u){u&&w(e),u&&w(i),u&&w(s),r=!1,a()}}}function _h(n){let e,t,i,s,l,o,r,a,u,f,c;l=new ge({props:{class:"form-field required",name:n[1]+".clientId",$$slots:{default:[zD,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}}),a=new ge({props:{class:"form-field required",name:n[1]+".clientSecret",$$slots:{default:[BD,({uniqueId:h})=>({20:h}),({uniqueId:h})=>h?1048576:0]},$$scope:{ctx:n}}});let d=n[4]&&bh(n);return{c(){e=v("div"),t=v("div"),i=O(),s=v("div"),j(l.$$.fragment),o=O(),r=v("div"),j(a.$$.fragment),u=O(),d&&d.c(),p(t,"class","col-12 spacing"),p(s,"class","col-lg-6"),p(r,"class","col-lg-6"),p(e,"class","grid")},m(h,m){S(h,e,m),_(e,t),_(e,i),_(e,s),R(l,s,null),_(e,o),_(e,r),R(a,r,null),_(e,u),d&&d.m(e,null),c=!0},p(h,m){const g={};m&2&&(g.name=h[1]+".clientId"),m&3145729&&(g.$$scope={dirty:m,ctx:h}),l.$set(g);const b={};m&2&&(b.name=h[1]+".clientSecret"),m&3145729&&(b.$$scope={dirty:m,ctx:h}),a.$set(b),h[4]?d?(d.p(h,m),m&16&&E(d,1)):(d=bh(h),d.c(),E(d,1),d.m(e,null)):d&&(pe(),P(d,1,1,()=>{d=null}),he())},i(h){c||(E(l.$$.fragment,h),E(a.$$.fragment,h),E(d),h&&xe(()=>{f||(f=je(e,St,{duration:200},!0)),f.run(1)}),c=!0)},o(h){P(l.$$.fragment,h),P(a.$$.fragment,h),P(d),h&&(f||(f=je(e,St,{duration:200},!1)),f.run(0)),c=!1},d(h){h&&w(e),H(l),H(a),d&&d.d(),h&&f&&f.end()}}}function zD(n){let e,t,i,s,l,o,r,a;return{c(){e=v("label"),t=B("Client ID"),s=O(),l=v("input"),p(e,"for",i=n[20]),p(l,"type","text"),p(l,"id",o=n[20]),l.required=!0},m(u,f){S(u,e,f),_(e,t),S(u,s,f),S(u,l,f),ce(l,n[0].clientId),r||(a=K(l,"input",n[13]),r=!0)},p(u,f){f&1048576&&i!==(i=u[20])&&p(e,"for",i),f&1048576&&o!==(o=u[20])&&p(l,"id",o),f&1&&l.value!==u[0].clientId&&ce(l,u[0].clientId)},d(u){u&&w(e),u&&w(s),u&&w(l),r=!1,a()}}}function BD(n){let e,t,i,s,l,o,r;function a(f){n[14](f)}let u={id:n[20],required:!0};return n[0].clientSecret!==void 0&&(u.value=n[0].clientSecret),l=new Xa({props:u}),le.push(()=>_e(l,"value",a)),{c(){e=v("label"),t=B("Client Secret"),s=O(),j(l.$$.fragment),p(e,"for",i=n[20])},m(f,c){S(f,e,c),_(e,t),S(f,s,c),R(l,f,c),r=!0},p(f,c){(!r||c&1048576&&i!==(i=f[20]))&&p(e,"for",i);const d={};c&1048576&&(d.id=f[20]),!o&&c&1&&(o=!0,d.value=f[0].clientSecret,ve(()=>o=!1)),l.$set(d)},i(f){r||(E(l.$$.fragment,f),r=!0)},o(f){P(l.$$.fragment,f),r=!1},d(f){f&&w(e),f&&w(s),H(l,f)}}}function bh(n){let e,t,i,s;function l(a){n[15](a)}var o=n[4];function r(a){let u={key:a[1]};return a[0]!==void 0&&(u.config=a[0]),{props:u}}return o&&(t=jt(o,r(n)),le.push(()=>_e(t,"config",l))),{c(){e=v("div"),t&&j(t.$$.fragment),p(e,"class","col-lg-12")},m(a,u){S(a,e,u),t&&R(t,e,null),s=!0},p(a,u){const f={};if(u&2&&(f.key=a[1]),!i&&u&1&&(i=!0,f.config=a[0],ve(()=>i=!1)),o!==(o=a[4])){if(t){pe();const c=t;P(c.$$.fragment,1,0,()=>{H(c,1)}),he()}o?(t=jt(o,r(a)),le.push(()=>_e(t,"config",l)),j(t.$$.fragment),E(t.$$.fragment,1),R(t,e,null)):t=null}else o&&t.$set(f)},i(a){s||(t&&E(t.$$.fragment,a),s=!0)},o(a){t&&P(t.$$.fragment,a),s=!1},d(a){a&&w(e),t&&H(t)}}}function UD(n){let e,t,i,s;e=new ge({props:{class:"form-field form-field-toggle m-b-0",name:n[1]+".enabled",$$slots:{default:[VD,({uniqueId:o})=>({20:o}),({uniqueId:o})=>o?1048576:0]},$$scope:{ctx:n}}});let l=n[0].enabled&&_h(n);return{c(){j(e.$$.fragment),t=O(),l&&l.c(),i=Ae()},m(o,r){R(e,o,r),S(o,t,r),l&&l.m(o,r),S(o,i,r),s=!0},p(o,r){const a={};r&2&&(a.name=o[1]+".enabled"),r&3145729&&(a.$$scope={dirty:r,ctx:o}),e.$set(a),o[0].enabled?l?(l.p(o,r),r&1&&E(l,1)):(l=_h(o),l.c(),E(l,1),l.m(i.parentNode,i)):l&&(pe(),P(l,1,1,()=>{l=null}),he())},i(o){s||(E(e.$$.fragment,o),E(l),s=!0)},o(o){P(e.$$.fragment,o),P(l),s=!1},d(o){H(e,o),o&&w(t),l&&l.d(o),o&&w(i)}}}function vh(n){let e;return{c(){e=v("i"),p(e,"class",n[3])},m(t,i){S(t,e,i)},p(t,i){i&8&&p(e,"class",t[3])},d(t){t&&w(e)}}}function WD(n){let e;return{c(){e=v("span"),e.textContent="Disabled",p(e,"class","label label-hint")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function YD(n){let e;return{c(){e=v("span"),e.textContent="Enabled",p(e,"class","label label-success")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function yh(n){let e,t,i,s,l;return{c(){e=v("i"),p(e,"class","ri-error-warning-fill txt-danger")},m(o,r){S(o,e,r),i=!0,s||(l=Ee(Ue.call(null,e,{text:"Has errors",position:"left"})),s=!0)},i(o){i||(o&&xe(()=>{t||(t=je(e,$t,{duration:150,start:.7},!0)),t.run(1)}),i=!0)},o(o){o&&(t||(t=je(e,$t,{duration:150,start:.7},!1)),t.run(0)),i=!1},d(o){o&&w(e),o&&t&&t.end(),s=!1,l()}}}function KD(n){let e,t,i,s,l,o,r,a,u,f=n[3]&&vh(n);function c(g,b){return g[0].enabled?YD:WD}let d=c(n),h=d(n),m=n[6]&&yh();return{c(){e=v("div"),f&&f.c(),t=O(),i=v("span"),s=B(n[2]),l=O(),h.c(),o=O(),r=v("div"),a=O(),m&&m.c(),u=Ae(),p(i,"class","txt"),p(e,"class","inline-flex"),p(r,"class","flex-fill")},m(g,b){S(g,e,b),f&&f.m(e,null),_(e,t),_(e,i),_(i,s),S(g,l,b),h.m(g,b),S(g,o,b),S(g,r,b),S(g,a,b),m&&m.m(g,b),S(g,u,b)},p(g,b){g[3]?f?f.p(g,b):(f=vh(g),f.c(),f.m(e,t)):f&&(f.d(1),f=null),b&4&&re(s,g[2]),d!==(d=c(g))&&(h.d(1),h=d(g),h&&(h.c(),h.m(o.parentNode,o))),g[6]?m?b&64&&E(m,1):(m=yh(),m.c(),E(m,1),m.m(u.parentNode,u)):m&&(pe(),P(m,1,1,()=>{m=null}),he())},d(g){g&&w(e),f&&f.d(),g&&w(l),h.d(g),g&&w(o),g&&w(r),g&&w(a),m&&m.d(g),g&&w(u)}}}function JD(n){let e,t;const i=[n[7]];let s={$$slots:{header:[KD],default:[UD]},$$scope:{ctx:n}};for(let l=0;lt(11,o=A));let{key:r}=e,{title:a}=e,{icon:u=""}=e,{config:f={}}=e,{optionsComponent:c}=e,d;function h(){d==null||d.expand()}function m(){d==null||d.collapse()}function g(){d==null||d.collapseSiblings()}function b(){f.enabled=this.checked,t(0,f)}function y(){f.clientId=this.value,t(0,f)}function k(A){n.$$.not_equal(f.clientSecret,A)&&(f.clientSecret=A,t(0,f))}function $(A){f=A,t(0,f)}function C(A){le[A?"unshift":"push"](()=>{d=A,t(5,d)})}function M(A){Ve.call(this,n,A)}function T(A){Ve.call(this,n,A)}function D(A){Ve.call(this,n,A)}return n.$$set=A=>{e=Ke(Ke({},e),Wn(A)),t(7,l=wt(e,s)),"key"in A&&t(1,r=A.key),"title"in A&&t(2,a=A.title),"icon"in A&&t(3,u=A.icon),"config"in A&&t(0,f=A.config),"optionsComponent"in A&&t(4,c=A.optionsComponent)},n.$$.update=()=>{n.$$.dirty&2050&&t(6,i=!W.isEmpty(W.getNestedVal(o,r))),n.$$.dirty&3&&(f.enabled||$s(r))},[f,r,a,u,c,d,i,l,h,m,g,o,b,y,k,$,C,M,T,D]}class GD extends ke{constructor(e){super(),ye(this,e,ZD,JD,be,{key:1,title:2,icon:3,config:0,optionsComponent:4,expand:8,collapse:9,collapseSiblings:10})}get expand(){return this.$$.ctx[8]}get collapse(){return this.$$.ctx[9]}get collapseSiblings(){return this.$$.ctx[10]}}function kh(n,e,t){const i=n.slice();return i[16]=e[t][0],i[17]=e[t][1],i[18]=e,i[19]=t,i}function XD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h=Object.entries(vl),m=[];for(let y=0;yP(m[y],1,1,()=>{m[y]=null});let b=n[4]&&Sh(n);return{c(){e=v("div");for(let y=0;yn[10](e,t),o=()=>n[10](null,t);function r(u){n[11](u,n[16])}let a={single:!0,key:n[16],title:n[17].title,icon:n[17].icon||"ri-fingerprint-line",optionsComponent:n[17].optionsComponent};return n[0][n[16]]!==void 0&&(a.config=n[0][n[16]]),e=new GD({props:a}),l(),le.push(()=>_e(e,"config",r)),{c(){j(e.$$.fragment)},m(u,f){R(e,u,f),s=!0},p(u,f){n=u,t!==n[16]&&(o(),t=n[16],l());const c={};!i&&f&1&&(i=!0,c.config=n[0][n[16]],ve(()=>i=!1)),e.$set(c)},i(u){s||(E(e.$$.fragment,u),s=!0)},o(u){P(e.$$.fragment,u),s=!1},d(u){o(),H(e,u)}}}function Sh(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary btn-hint"),e.disabled=n[3]},m(l,o){S(l,e,o),_(e,t),i||(s=K(e,"click",n[12]),i=!0)},p(l,o){o&8&&(e.disabled=l[3])},d(l){l&&w(e),i=!1,s()}}}function xD(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,b;const y=[QD,XD],k=[];function $(C,M){return C[2]?0:1}return d=$(n),h=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=B(n[5]),r=O(),a=v("div"),u=v("form"),f=v("h6"),f.textContent="Manage the allowed users sign-in/sign-up methods.",c=O(),h.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","m-b-base"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){S(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(C,r,M),S(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),m=!0,g||(b=K(u,"submit",ut(n[6])),g=!0)},p(C,M){(!m||M&32)&&re(o,C[5]);let T=d;d=$(C),d===T?k[d].p(C,M):(pe(),P(k[T],1,1,()=>{k[T]=null}),he(),h=k[d],h?h.p(C,M):(h=k[d]=y[d](C),h.c()),E(h,1),h.m(u,null))},i(C){m||(E(h),m=!0)},o(C){P(h),m=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),g=!1,b()}}}function eA(n){let e,t,i,s;return e=new Ci({}),i=new pn({props:{$$slots:{default:[xD]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(l,o){R(e,l,o),S(l,t,o),R(i,l,o),s=!0},p(l,[o]){const r={};o&1048639&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function tA(n,e,t){let i,s,l;Ze(n,mt,$=>t(5,l=$)),Ht(mt,l="Auth providers",l);let o={},r={},a={},u=!1,f=!1;c();async function c(){t(2,u=!0);try{const $=await de.settings.getAll()||{};h($)}catch($){de.errorResponseHandler($)}t(2,u=!1)}async function d(){var $;if(!(f||!s)){t(3,f=!0);try{const C=await de.settings.update(W.filterRedactedProps(a));h(C),Fn({}),($=o[Object.keys(o)[0]])==null||$.collapseSiblings(),Lt("Successfully updated auth providers.")}catch(C){de.errorResponseHandler(C)}t(3,f=!1)}}function h($){$=$||{},t(0,a={});for(const C in vl)t(0,a[C]=Object.assign({enabled:!1},$[C]),a);t(8,r=JSON.parse(JSON.stringify(a)))}function m(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function g($,C){le[$?"unshift":"push"](()=>{o[C]=$,t(1,o)})}function b($,C){n.$$.not_equal(a[C],$)&&(a[C]=$,t(0,a))}const y=()=>m(),k=()=>d();return n.$$.update=()=>{n.$$.dirty&256&&t(9,i=JSON.stringify(r)),n.$$.dirty&513&&t(4,s=i!=JSON.stringify(a))},[a,o,u,f,s,l,d,m,r,i,g,b,y,k]}class nA extends ke{constructor(e){super(),ye(this,e,tA,eA,be,{})}}function $h(n,e,t){const i=n.slice();return i[16]=e[t],i[17]=e,i[18]=t,i}function iA(n){let e=[],t=new Map,i,s,l,o,r,a,u,f,c,d,h,m=n[5];const g=y=>y[16].key;for(let y=0;y({19:l}),({uniqueId:l})=>l?524288:0]},$$scope:{ctx:e}}}),{key:n,first:null,c(){t=Ae(),j(i.$$.fragment),this.first=t},m(l,o){S(l,t,o),R(i,l,o),s=!0},p(l,o){e=l;const r={};o&1572865&&(r.$$scope={dirty:o,ctx:e}),i.$set(r)},i(l){s||(E(i.$$.fragment,l),s=!0)},o(l){P(i.$$.fragment,l),s=!1},d(l){l&&w(t),H(i,l)}}}function Th(n){let e,t,i,s;return{c(){e=v("button"),t=v("span"),t.textContent="Cancel",p(t,"class","txt"),p(e,"type","button"),p(e,"class","btn btn-secondary btn-hint"),e.disabled=n[2]},m(l,o){S(l,e,o),_(e,t),i||(s=K(e,"click",n[12]),i=!0)},p(l,o){o&4&&(e.disabled=l[2])},d(l){l&&w(e),i=!1,s()}}}function oA(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,b;const y=[sA,iA],k=[];function $(C,M){return C[1]?0:1}return d=$(n),h=k[d]=y[d](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=B(n[4]),r=O(),a=v("div"),u=v("form"),f=v("div"),f.innerHTML="

    Adjust common token options.

    ",c=O(),h.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(f,"class","content m-b-sm txt-xl"),p(u,"class","panel"),p(u,"autocomplete","off"),p(a,"class","wrapper")},m(C,M){S(C,e,M),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(C,r,M),S(C,a,M),_(a,u),_(u,f),_(u,c),k[d].m(u,null),m=!0,g||(b=K(u,"submit",ut(n[6])),g=!0)},p(C,M){(!m||M&16)&&re(o,C[4]);let T=d;d=$(C),d===T?k[d].p(C,M):(pe(),P(k[T],1,1,()=>{k[T]=null}),he(),h=k[d],h?h.p(C,M):(h=k[d]=y[d](C),h.c()),E(h,1),h.m(u,null))},i(C){m||(E(h),m=!0)},o(C){P(h),m=!1},d(C){C&&w(e),C&&w(r),C&&w(a),k[d].d(),g=!1,b()}}}function rA(n){let e,t,i,s;return e=new Ci({}),i=new pn({props:{$$slots:{default:[oA]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(l,o){R(e,l,o),S(l,t,o),R(i,l,o),s=!0},p(l,[o]){const r={};o&1048607&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function aA(n,e,t){let i,s,l;Ze(n,mt,$=>t(4,l=$));const o=[{key:"recordAuthToken",label:"Auth record authentication token"},{key:"recordVerificationToken",label:"Auth record email verification token"},{key:"recordPasswordResetToken",label:"Auth record password reset token"},{key:"recordEmailChangeToken",label:"Auth record email change token"},{key:"adminAuthToken",label:"Admins auth token"},{key:"adminPasswordResetToken",label:"Admins password reset token"}];Ht(mt,l="Token options",l);let r={},a={},u=!1,f=!1;c();async function c(){t(1,u=!0);try{const $=await de.settings.getAll()||{};h($)}catch($){de.errorResponseHandler($)}t(1,u=!1)}async function d(){if(!(f||!s)){t(2,f=!0);try{const $=await de.settings.update(W.filterRedactedProps(a));h($),Lt("Successfully saved tokens options.")}catch($){de.errorResponseHandler($)}t(2,f=!1)}}function h($){var C;$=$||{},t(0,a={});for(const M of o)t(0,a[M.key]={duration:((C=$[M.key])==null?void 0:C.duration)||0},a);t(8,r=JSON.parse(JSON.stringify(a)))}function m(){t(0,a=JSON.parse(JSON.stringify(r||{})))}function g($){a[$.key].duration=rt(this.value),t(0,a)}const b=$=>{a[$.key].secret?(delete a[$.key].secret,t(0,a)):t(0,a[$.key].secret=W.randomString(50),a)},y=()=>m(),k=()=>d();return n.$$.update=()=>{n.$$.dirty&256&&t(9,i=JSON.stringify(r)),n.$$.dirty&513&&t(3,s=i!=JSON.stringify(a))},[a,u,f,s,l,o,d,m,r,i,g,b,y,k]}class uA extends ke{constructor(e){super(),ye(this,e,aA,rA,be,{})}}function fA(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m;return o=new L_({props:{content:n[2]}}),{c(){e=v("div"),e.innerHTML=`

    Below you'll find your current collections configuration that you could import in another PocketBase environment.

    `,t=O(),i=v("div"),s=v("button"),s.innerHTML='Copy',l=O(),j(o.$$.fragment),r=O(),a=v("div"),u=v("div"),f=O(),c=v("button"),c.innerHTML=` - Download as JSON`,p(e,"class","content txt-xl m-b-base"),p(s,"type","button"),p(s,"class","btn btn-sm btn-secondary fade copy-schema svelte-jm5c4z"),p(i,"tabindex","0"),p(i,"class","export-preview svelte-jm5c4z"),p(u,"class","flex-fill"),p(c,"type","button"),p(c,"class","btn btn-expanded"),p(a,"class","flex m-t-base")},m(b,g){S(b,e,g),S(b,t,g),S(b,i,g),_(i,s),_(i,l),R(o,i,null),n[8](i),S(b,r,g),S(b,a,g),_(a,u),_(a,f),_(a,c),d=!0,h||(m=[K(s,"click",n[7]),K(i,"keydown",n[9]),K(c,"click",n[10])],h=!0)},p(b,g){const y={};g&4&&(y.content=b[2]),o.$set(y)},i(b){d||(E(o.$$.fragment,b),d=!0)},o(b){P(o.$$.fragment,b),d=!1},d(b){b&&w(e),b&&w(t),b&&w(i),H(o),n[8](null),b&&w(r),b&&w(a),h=!1,Pe(m)}}}function fA(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:te,i:te,o:te,d(t){t&&w(e)}}}function cA(n){let e,t,i,s,l,o,r,a,u,f,c,d;const h=[fA,uA],m=[];function b(g,y){return g[1]?0:1}return f=b(n),c=m[f]=h[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=B(n[3]),r=O(),a=v("div"),u=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(g,y){S(g,e,y),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(g,r,y),S(g,a,y),_(a,u),m[f].m(u,null),d=!0},p(g,y){(!d||y&8)&&ae(o,g[3]);let k=f;f=b(g),f===k?m[f].p(g,y):(pe(),P(m[k],1,1,()=>{m[k]=null}),he(),c=m[f],c?c.p(g,y):(c=m[f]=h[f](g),c.c()),E(c,1),c.m(u,null))},i(g){d||(E(c),d=!0)},o(g){P(c),d=!1},d(g){g&&w(e),g&&w(r),g&&w(a),m[f].d()}}}function dA(n){let e,t,i,s;return e=new Ci({}),i=new pn({props:{$$slots:{default:[cA]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(l,o){R(e,l,o),S(l,t,o),R(i,l,o),s=!0},p(l,[o]){const r={};o&8207&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function pA(n,e,t){let i,s;Ze(n,mt,g=>t(3,s=g)),Ht(mt,s="Export collections",s);const l="export_"+W.randomString(5);let o,r=[],a=!1;u();async function u(){t(1,a=!0);try{t(6,r=await de.collections.getFullList(100,{$cancelKey:l}));for(let g of r)delete g.created,delete g.updated}catch(g){de.errorResponseHandler(g)}t(1,a=!1)}function f(){W.downloadJson(r,"pb_schema")}function c(){W.copyToClipboard(i),Ag("The configuration was copied to your clipboard!",3e3)}const d=()=>c();function h(g){le[g?"unshift":"push"](()=>{o=g,t(0,o)})}const m=g=>{if(g.ctrlKey&&g.code==="KeyA"){g.preventDefault();const y=window.getSelection(),k=document.createRange();k.selectNodeContents(o),y.removeAllRanges(),y.addRange(k)}},b=()=>f();return n.$$.update=()=>{n.$$.dirty&64&&t(2,i=JSON.stringify(r,null,4))},[o,a,i,s,f,c,r,d,h,m,b]}class hA extends ke{constructor(e){super(),ye(this,e,pA,dA,be,{})}}function Th(n,e,t){const i=n.slice();return i[14]=e[t],i}function Mh(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function Oh(n,e,t){const i=n.slice();return i[14]=e[t],i}function Dh(n,e,t){const i=n.slice();return i[17]=e[t][0],i[23]=e[t][1],i}function Ah(n,e,t){const i=n.slice();return i[14]=e[t],i}function Eh(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function Ih(n,e,t){const i=n.slice();return i[30]=e[t],i}function mA(n){let e,t,i,s,l=n[1].name+"",o,r=n[9]&&Ph(),a=n[0].name!==n[1].name&&Lh(n);return{c(){e=v("div"),r&&r.c(),t=O(),a&&a.c(),i=O(),s=v("strong"),o=B(l),p(s,"class","txt"),p(e,"class","inline-flex fleg-gap-5")},m(u,f){S(u,e,f),r&&r.m(e,null),_(e,t),a&&a.m(e,null),_(e,i),_(e,s),_(s,o)},p(u,f){u[9]?r||(r=Ph(),r.c(),r.m(e,t)):r&&(r.d(1),r=null),u[0].name!==u[1].name?a?a.p(u,f):(a=Lh(u),a.c(),a.m(e,i)):a&&(a.d(1),a=null),f[0]&2&&l!==(l=u[1].name+"")&&ae(o,l)},d(u){u&&w(e),r&&r.d(),a&&a.d()}}}function gA(n){var o;let e,t,i,s=((o=n[0])==null?void 0:o.name)+"",l;return{c(){e=v("span"),e.textContent="Deleted",t=O(),i=v("strong"),l=B(s),p(e,"class","label label-danger")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),_(i,l)},p(r,a){var u;a[0]&1&&s!==(s=((u=r[0])==null?void 0:u.name)+"")&&ae(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function _A(n){var o;let e,t,i,s=((o=n[1])==null?void 0:o.name)+"",l;return{c(){e=v("span"),e.textContent="Added",t=O(),i=v("strong"),l=B(s),p(e,"class","label label-success")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),_(i,l)},p(r,a){var u;a[0]&2&&s!==(s=((u=r[1])==null?void 0:u.name)+"")&&ae(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function Ph(n){let e;return{c(){e=v("span"),e.textContent="Changed",p(e,"class","label label-warning")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Lh(n){let e,t=n[0].name+"",i,s,l;return{c(){e=v("strong"),i=B(t),s=O(),l=v("i"),p(e,"class","txt-strikethrough txt-hint"),p(l,"class","ri-arrow-right-line txt-sm")},m(o,r){S(o,e,r),_(e,i),S(o,s,r),S(o,l,r)},p(o,r){r[0]&1&&t!==(t=o[0].name+"")&&ae(i,t)},d(o){o&&w(e),o&&w(s),o&&w(l)}}}function Nh(n){var g,y;let e,t,i,s=n[30]+"",l,o,r,a,u=n[12]((g=n[0])==null?void 0:g[n[30]])+"",f,c,d,h,m=n[12]((y=n[1])==null?void 0:y[n[30]])+"",b;return{c(){var k,$,C,M,T,D;e=v("tr"),t=v("td"),i=v("span"),l=B(s),o=O(),r=v("td"),a=v("pre"),f=B(u),c=O(),d=v("td"),h=v("pre"),b=B(m),p(t,"class","min-width svelte-lmkr38"),p(a,"class","txt"),p(r,"class","svelte-lmkr38"),ne(r,"changed-old-col",!n[10]&&xt((k=n[0])==null?void 0:k[n[30]],($=n[1])==null?void 0:$[n[30]])),ne(r,"changed-none-col",n[10]),p(h,"class","txt"),p(d,"class","svelte-lmkr38"),ne(d,"changed-new-col",!n[5]&&xt((C=n[0])==null?void 0:C[n[30]],(M=n[1])==null?void 0:M[n[30]])),ne(d,"changed-none-col",n[5]),p(e,"class","svelte-lmkr38"),ne(e,"txt-primary",xt((T=n[0])==null?void 0:T[n[30]],(D=n[1])==null?void 0:D[n[30]]))},m(k,$){S(k,e,$),_(e,t),_(t,i),_(i,l),_(e,o),_(e,r),_(r,a),_(a,f),_(e,c),_(e,d),_(d,h),_(h,b)},p(k,$){var C,M,T,D,A,I,L,F;$[0]&1&&u!==(u=k[12]((C=k[0])==null?void 0:C[k[30]])+"")&&ae(f,u),$[0]&3075&&ne(r,"changed-old-col",!k[10]&&xt((M=k[0])==null?void 0:M[k[30]],(T=k[1])==null?void 0:T[k[30]])),$[0]&1024&&ne(r,"changed-none-col",k[10]),$[0]&2&&m!==(m=k[12]((D=k[1])==null?void 0:D[k[30]])+"")&&ae(b,m),$[0]&2083&&ne(d,"changed-new-col",!k[5]&&xt((A=k[0])==null?void 0:A[k[30]],(I=k[1])==null?void 0:I[k[30]])),$[0]&32&&ne(d,"changed-none-col",k[5]),$[0]&2051&&ne(e,"txt-primary",xt((L=k[0])==null?void 0:L[k[30]],(F=k[1])==null?void 0:F[k[30]]))},d(k){k&&w(e)}}}function Fh(n){let e,t=n[6],i=[];for(let s=0;sProps + Download as JSON`,p(e,"class","content txt-xl m-b-base"),p(s,"type","button"),p(s,"class","btn btn-sm btn-secondary fade copy-schema svelte-jm5c4z"),p(i,"tabindex","0"),p(i,"class","export-preview svelte-jm5c4z"),p(u,"class","flex-fill"),p(c,"type","button"),p(c,"class","btn btn-expanded"),p(a,"class","flex m-t-base")},m(g,b){S(g,e,b),S(g,t,b),S(g,i,b),_(i,s),_(i,l),R(o,i,null),n[8](i),S(g,r,b),S(g,a,b),_(a,u),_(a,f),_(a,c),d=!0,h||(m=[K(s,"click",n[7]),K(i,"keydown",n[9]),K(c,"click",n[10])],h=!0)},p(g,b){const y={};b&4&&(y.content=g[2]),o.$set(y)},i(g){d||(E(o.$$.fragment,g),d=!0)},o(g){P(o.$$.fragment,g),d=!1},d(g){g&&w(e),g&&w(t),g&&w(i),H(o),n[8](null),g&&w(r),g&&w(a),h=!1,Pe(m)}}}function cA(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&w(e)}}}function dA(n){let e,t,i,s,l,o,r,a,u,f,c,d;const h=[cA,fA],m=[];function g(b,y){return b[1]?0:1}return f=g(n),c=m[f]=h[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=B(n[3]),r=O(),a=v("div"),u=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(b,y){S(b,e,y),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(b,r,y),S(b,a,y),_(a,u),m[f].m(u,null),d=!0},p(b,y){(!d||y&8)&&re(o,b[3]);let k=f;f=g(b),f===k?m[f].p(b,y):(pe(),P(m[k],1,1,()=>{m[k]=null}),he(),c=m[f],c?c.p(b,y):(c=m[f]=h[f](b),c.c()),E(c,1),c.m(u,null))},i(b){d||(E(c),d=!0)},o(b){P(c),d=!1},d(b){b&&w(e),b&&w(r),b&&w(a),m[f].d()}}}function pA(n){let e,t,i,s;return e=new Ci({}),i=new pn({props:{$$slots:{default:[dA]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment)},m(l,o){R(e,l,o),S(l,t,o),R(i,l,o),s=!0},p(l,[o]){const r={};o&8207&&(r.$$scope={dirty:o,ctx:l}),i.$set(r)},i(l){s||(E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){P(e.$$.fragment,l),P(i.$$.fragment,l),s=!1},d(l){H(e,l),l&&w(t),H(i,l)}}}function hA(n,e,t){let i,s;Ze(n,mt,b=>t(3,s=b)),Ht(mt,s="Export collections",s);const l="export_"+W.randomString(5);let o,r=[],a=!1;u();async function u(){t(1,a=!0);try{t(6,r=await de.collections.getFullList(100,{$cancelKey:l}));for(let b of r)delete b.created,delete b.updated}catch(b){de.errorResponseHandler(b)}t(1,a=!1)}function f(){W.downloadJson(r,"pb_schema")}function c(){W.copyToClipboard(i),Eg("The configuration was copied to your clipboard!",3e3)}const d=()=>c();function h(b){le[b?"unshift":"push"](()=>{o=b,t(0,o)})}const m=b=>{if(b.ctrlKey&&b.code==="KeyA"){b.preventDefault();const y=window.getSelection(),k=document.createRange();k.selectNodeContents(o),y.removeAllRanges(),y.addRange(k)}},g=()=>f();return n.$$.update=()=>{n.$$.dirty&64&&t(2,i=JSON.stringify(r,null,4))},[o,a,i,s,f,c,r,d,h,m,g]}class mA extends ke{constructor(e){super(),ye(this,e,hA,pA,be,{})}}function Mh(n,e,t){const i=n.slice();return i[14]=e[t],i}function Oh(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function Dh(n,e,t){const i=n.slice();return i[14]=e[t],i}function Ah(n,e,t){const i=n.slice();return i[17]=e[t][0],i[23]=e[t][1],i}function Eh(n,e,t){const i=n.slice();return i[14]=e[t],i}function Ih(n,e,t){const i=n.slice();return i[17]=e[t][0],i[18]=e[t][1],i}function Ph(n,e,t){const i=n.slice();return i[30]=e[t],i}function gA(n){let e,t,i,s,l=n[1].name+"",o,r=n[9]&&Lh(),a=n[0].name!==n[1].name&&Nh(n);return{c(){e=v("div"),r&&r.c(),t=O(),a&&a.c(),i=O(),s=v("strong"),o=B(l),p(s,"class","txt"),p(e,"class","inline-flex fleg-gap-5")},m(u,f){S(u,e,f),r&&r.m(e,null),_(e,t),a&&a.m(e,null),_(e,i),_(e,s),_(s,o)},p(u,f){u[9]?r||(r=Lh(),r.c(),r.m(e,t)):r&&(r.d(1),r=null),u[0].name!==u[1].name?a?a.p(u,f):(a=Nh(u),a.c(),a.m(e,i)):a&&(a.d(1),a=null),f[0]&2&&l!==(l=u[1].name+"")&&re(o,l)},d(u){u&&w(e),r&&r.d(),a&&a.d()}}}function _A(n){var o;let e,t,i,s=((o=n[0])==null?void 0:o.name)+"",l;return{c(){e=v("span"),e.textContent="Deleted",t=O(),i=v("strong"),l=B(s),p(e,"class","label label-danger")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),_(i,l)},p(r,a){var u;a[0]&1&&s!==(s=((u=r[0])==null?void 0:u.name)+"")&&re(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function bA(n){var o;let e,t,i,s=((o=n[1])==null?void 0:o.name)+"",l;return{c(){e=v("span"),e.textContent="Added",t=O(),i=v("strong"),l=B(s),p(e,"class","label label-success")},m(r,a){S(r,e,a),S(r,t,a),S(r,i,a),_(i,l)},p(r,a){var u;a[0]&2&&s!==(s=((u=r[1])==null?void 0:u.name)+"")&&re(l,s)},d(r){r&&w(e),r&&w(t),r&&w(i)}}}function Lh(n){let e;return{c(){e=v("span"),e.textContent="Changed",p(e,"class","label label-warning")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Nh(n){let e,t=n[0].name+"",i,s,l;return{c(){e=v("strong"),i=B(t),s=O(),l=v("i"),p(e,"class","txt-strikethrough txt-hint"),p(l,"class","ri-arrow-right-line txt-sm")},m(o,r){S(o,e,r),_(e,i),S(o,s,r),S(o,l,r)},p(o,r){r[0]&1&&t!==(t=o[0].name+"")&&re(i,t)},d(o){o&&w(e),o&&w(s),o&&w(l)}}}function Fh(n){var b,y;let e,t,i,s=n[30]+"",l,o,r,a,u=n[12]((b=n[0])==null?void 0:b[n[30]])+"",f,c,d,h,m=n[12]((y=n[1])==null?void 0:y[n[30]])+"",g;return{c(){var k,$,C,M,T,D;e=v("tr"),t=v("td"),i=v("span"),l=B(s),o=O(),r=v("td"),a=v("pre"),f=B(u),c=O(),d=v("td"),h=v("pre"),g=B(m),p(t,"class","min-width svelte-lmkr38"),p(a,"class","txt"),p(r,"class","svelte-lmkr38"),ne(r,"changed-old-col",!n[10]&&xt((k=n[0])==null?void 0:k[n[30]],($=n[1])==null?void 0:$[n[30]])),ne(r,"changed-none-col",n[10]),p(h,"class","txt"),p(d,"class","svelte-lmkr38"),ne(d,"changed-new-col",!n[5]&&xt((C=n[0])==null?void 0:C[n[30]],(M=n[1])==null?void 0:M[n[30]])),ne(d,"changed-none-col",n[5]),p(e,"class","svelte-lmkr38"),ne(e,"txt-primary",xt((T=n[0])==null?void 0:T[n[30]],(D=n[1])==null?void 0:D[n[30]]))},m(k,$){S(k,e,$),_(e,t),_(t,i),_(i,l),_(e,o),_(e,r),_(r,a),_(a,f),_(e,c),_(e,d),_(d,h),_(h,g)},p(k,$){var C,M,T,D,A,I,L,F;$[0]&1&&u!==(u=k[12]((C=k[0])==null?void 0:C[k[30]])+"")&&re(f,u),$[0]&3075&&ne(r,"changed-old-col",!k[10]&&xt((M=k[0])==null?void 0:M[k[30]],(T=k[1])==null?void 0:T[k[30]])),$[0]&1024&&ne(r,"changed-none-col",k[10]),$[0]&2&&m!==(m=k[12]((D=k[1])==null?void 0:D[k[30]])+"")&&re(g,m),$[0]&2083&&ne(d,"changed-new-col",!k[5]&&xt((A=k[0])==null?void 0:A[k[30]],(I=k[1])==null?void 0:I[k[30]])),$[0]&32&&ne(d,"changed-none-col",k[5]),$[0]&2051&&ne(e,"txt-primary",xt((L=k[0])==null?void 0:L[k[30]],(F=k[1])==null?void 0:F[k[30]]))},d(k){k&&w(e)}}}function Rh(n){let e,t=n[6],i=[];for(let s=0;sProps Old - New`,l=O(),o=v("tbody");for(let C=0;C!["schema","created","updated"].includes(y));function b(){t(4,f=Array.isArray(r==null?void 0:r.schema)?r==null?void 0:r.schema.concat():[]),a||t(4,f=f.concat(u.filter(y=>!f.find(k=>y.id==k.id))))}function g(y){return typeof y>"u"?"":W.isObject(y)?JSON.stringify(y,null,4):y}return n.$$set=y=>{"collectionA"in y&&t(0,o=y.collectionA),"collectionB"in y&&t(1,r=y.collectionB),"deleteMissing"in y&&t(2,a=y.deleteMissing)},n.$$.update=()=>{n.$$.dirty[0]&2&&t(5,i=!(r!=null&&r.id)&&!(r!=null&&r.name)),n.$$.dirty[0]&33&&t(10,s=!i&&!(o!=null&&o.id)),n.$$.dirty[0]&1&&t(3,u=Array.isArray(o==null?void 0:o.schema)?o==null?void 0:o.schema.concat():[]),n.$$.dirty[0]&7&&(typeof(o==null?void 0:o.schema)<"u"||typeof(r==null?void 0:r.schema)<"u"||typeof a<"u")&&b(),n.$$.dirty[0]&24&&t(6,c=u.filter(y=>!f.find(k=>y.id==k.id))),n.$$.dirty[0]&24&&t(7,d=f.filter(y=>u.find(k=>k.id==y.id))),n.$$.dirty[0]&24&&t(8,h=f.filter(y=>!u.find(k=>k.id==y.id))),n.$$.dirty[0]&7&&t(9,l=W.hasCollectionChanges(o,r,a))},[o,r,a,u,f,i,c,d,h,l,s,m,g]}class yA extends ke{constructor(e){super(),ye(this,e,vA,bA,be,{collectionA:0,collectionB:1,deleteMissing:2},null,[-1,-1])}}function Uh(n,e,t){const i=n.slice();return i[17]=e[t],i}function Wh(n){let e,t;return e=new yA({props:{collectionA:n[17].old,collectionB:n[17].new,deleteMissing:n[3]}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s&4&&(l.collectionA=i[17].old),s&4&&(l.collectionB=i[17].new),s&8&&(l.deleteMissing=i[3]),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function kA(n){let e,t,i=n[2],s=[];for(let o=0;oP(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;oNew`,l=O(),o=v("tbody");for(let C=0;C!["schema","created","updated"].includes(y));function g(){t(4,f=Array.isArray(r==null?void 0:r.schema)?r==null?void 0:r.schema.concat():[]),a||t(4,f=f.concat(u.filter(y=>!f.find(k=>y.id==k.id))))}function b(y){return typeof y>"u"?"":W.isObject(y)?JSON.stringify(y,null,4):y}return n.$$set=y=>{"collectionA"in y&&t(0,o=y.collectionA),"collectionB"in y&&t(1,r=y.collectionB),"deleteMissing"in y&&t(2,a=y.deleteMissing)},n.$$.update=()=>{n.$$.dirty[0]&2&&t(5,i=!(r!=null&&r.id)&&!(r!=null&&r.name)),n.$$.dirty[0]&33&&t(10,s=!i&&!(o!=null&&o.id)),n.$$.dirty[0]&1&&t(3,u=Array.isArray(o==null?void 0:o.schema)?o==null?void 0:o.schema.concat():[]),n.$$.dirty[0]&7&&(typeof(o==null?void 0:o.schema)<"u"||typeof(r==null?void 0:r.schema)<"u"||typeof a<"u")&&g(),n.$$.dirty[0]&24&&t(6,c=u.filter(y=>!f.find(k=>y.id==k.id))),n.$$.dirty[0]&24&&t(7,d=f.filter(y=>u.find(k=>k.id==y.id))),n.$$.dirty[0]&24&&t(8,h=f.filter(y=>!u.find(k=>k.id==y.id))),n.$$.dirty[0]&7&&t(9,l=W.hasCollectionChanges(o,r,a))},[o,r,a,u,f,i,c,d,h,l,s,m,b]}class kA extends ke{constructor(e){super(),ye(this,e,yA,vA,be,{collectionA:0,collectionB:1,deleteMissing:2},null,[-1,-1])}}function Wh(n,e,t){const i=n.slice();return i[17]=e[t],i}function Yh(n){let e,t;return e=new kA({props:{collectionA:n[17].old,collectionB:n[17].new,deleteMissing:n[3]}}),{c(){j(e.$$.fragment)},m(i,s){R(e,i,s),t=!0},p(i,s){const l={};s&4&&(l.collectionA=i[17].old),s&4&&(l.collectionB=i[17].new),s&8&&(l.deleteMissing=i[3]),e.$set(l)},i(i){t||(E(e.$$.fragment,i),t=!0)},o(i){P(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function wA(n){let e,t,i=n[2],s=[];for(let o=0;oP(s[o],1,1,()=>{s[o]=null});return{c(){for(let o=0;o{m()}):m()}async function m(){if(!u){t(4,u=!0);try{await de.collections.import(o,a),Lt("Successfully imported collections configuration."),i("submit")}catch(C){de.errorResponseHandler(C)}t(4,u=!1),c()}}const b=()=>h(),g=()=>!u;function y(C){le[C?"unshift":"push"](()=>{s=C,t(1,s)})}function k(C){Ve.call(this,n,C)}function $(C){Ve.call(this,n,C)}return n.$$.update=()=>{n.$$.dirty&384&&Array.isArray(l)&&Array.isArray(o)&&d()},[c,s,r,a,u,h,f,l,o,b,g,y,k,$]}class TA extends ke{constructor(e){super(),ye(this,e,CA,$A,be,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function Yh(n,e,t){const i=n.slice();return i[32]=e[t],i}function Kh(n,e,t){const i=n.slice();return i[35]=e[t],i}function Jh(n,e,t){const i=n.slice();return i[32]=e[t],i}function MA(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k,$,C,M,T,D;a=new ge({props:{class:"form-field "+(n[6]?"":"field-error"),name:"collections",$$slots:{default:[DA,({uniqueId:z})=>({40:z}),({uniqueId:z})=>[0,z?512:0]]},$$scope:{ctx:n}}});let A=!1,I=n[6]&&n[1].length&&!n[7]&&Gh(),L=n[6]&&n[1].length&&n[7]&&Xh(n),F=n[13].length&&am(n),q=!!n[0]&&um(n);return{c(){e=v("input"),t=O(),i=v("div"),s=v("p"),l=B(`Paste below the collections configuration you want to import or - `),o=v("button"),o.innerHTML='Load from JSON file',r=O(),j(a.$$.fragment),u=O(),f=O(),I&&I.c(),c=O(),L&&L.c(),d=O(),F&&F.c(),h=O(),m=v("div"),q&&q.c(),b=O(),g=v("div"),y=O(),k=v("button"),$=v("span"),$.textContent="Review",p(e,"type","file"),p(e,"class","hidden"),p(e,"accept",".json"),p(o,"class","btn btn-outline btn-sm m-l-5"),ne(o,"btn-loading",n[12]),p(i,"class","content txt-xl m-b-base"),p(g,"class","flex-fill"),p($,"class","txt"),p(k,"type","button"),p(k,"class","btn btn-expanded btn-warning m-l-auto"),k.disabled=C=!n[14],p(m,"class","flex m-t-base")},m(z,J){S(z,e,J),n[19](e),S(z,t,J),S(z,i,J),_(i,s),_(s,l),_(s,o),S(z,r,J),R(a,z,J),S(z,u,J),S(z,f,J),I&&I.m(z,J),S(z,c,J),L&&L.m(z,J),S(z,d,J),F&&F.m(z,J),S(z,h,J),S(z,m,J),q&&q.m(m,null),_(m,b),_(m,g),_(m,y),_(m,k),_(k,$),M=!0,T||(D=[K(e,"change",n[20]),K(o,"click",n[21]),K(k,"click",n[26])],T=!0)},p(z,J){(!M||J[0]&4096)&&ne(o,"btn-loading",z[12]);const G={};J[0]&64&&(G.class="form-field "+(z[6]?"":"field-error")),J[0]&65|J[1]&1536&&(G.$$scope={dirty:J,ctx:z}),a.$set(G),z[6]&&z[1].length&&!z[7]?I||(I=Gh(),I.c(),I.m(c.parentNode,c)):I&&(I.d(1),I=null),z[6]&&z[1].length&&z[7]?L?L.p(z,J):(L=Xh(z),L.c(),L.m(d.parentNode,d)):L&&(L.d(1),L=null),z[13].length?F?F.p(z,J):(F=am(z),F.c(),F.m(h.parentNode,h)):F&&(F.d(1),F=null),z[0]?q?q.p(z,J):(q=um(z),q.c(),q.m(m,b)):q&&(q.d(1),q=null),(!M||J[0]&16384&&C!==(C=!z[14]))&&(k.disabled=C)},i(z){M||(E(a.$$.fragment,z),E(A),M=!0)},o(z){P(a.$$.fragment,z),P(A),M=!1},d(z){z&&w(e),n[19](null),z&&w(t),z&&w(i),z&&w(r),H(a,z),z&&w(u),z&&w(f),I&&I.d(z),z&&w(c),L&&L.d(z),z&&w(d),F&&F.d(z),z&&w(h),z&&w(m),q&&q.d(),T=!1,Pe(D)}}}function OA(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:te,i:te,o:te,d(t){t&&w(e)}}}function Zh(n){let e;return{c(){e=v("div"),e.textContent="Invalid collections configuration.",p(e,"class","help-block help-block-error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function DA(n){let e,t,i,s,l,o,r,a,u,f,c=!!n[0]&&!n[6]&&Zh();return{c(){e=v("label"),t=B("Collections"),s=O(),l=v("textarea"),r=O(),c&&c.c(),a=Ee(),p(e,"for",i=n[40]),p(e,"class","p-b-10"),p(l,"id",o=n[40]),p(l,"class","code"),p(l,"spellcheck","false"),p(l,"rows","15"),l.required=!0},m(d,h){S(d,e,h),_(e,t),S(d,s,h),S(d,l,h),ce(l,n[0]),S(d,r,h),c&&c.m(d,h),S(d,a,h),u||(f=K(l,"input",n[22]),u=!0)},p(d,h){h[1]&512&&i!==(i=d[40])&&p(e,"for",i),h[1]&512&&o!==(o=d[40])&&p(l,"id",o),h[0]&1&&ce(l,d[0]),!!d[0]&&!d[6]?c||(c=Zh(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),c&&c.d(d),d&&w(a),u=!1,f()}}}function Gh(n){let e;return{c(){e=v("div"),e.innerHTML=`
    -
    Your collections configuration is already up-to-date!
    `,p(e,"class","alert alert-info")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Xh(n){let e,t,i,s,l,o=n[9].length&&Qh(n),r=n[4].length&&tm(n),a=n[8].length&&lm(n);return{c(){e=v("h5"),e.textContent="Detected changes",t=O(),i=v("div"),o&&o.c(),s=O(),r&&r.c(),l=O(),a&&a.c(),p(e,"class","section-title"),p(i,"class","list")},m(u,f){S(u,e,f),S(u,t,f),S(u,i,f),o&&o.m(i,null),_(i,s),r&&r.m(i,null),_(i,l),a&&a.m(i,null)},p(u,f){u[9].length?o?o.p(u,f):(o=Qh(u),o.c(),o.m(i,s)):o&&(o.d(1),o=null),u[4].length?r?r.p(u,f):(r=tm(u),r.c(),r.m(i,l)):r&&(r.d(1),r=null),u[8].length?a?a.p(u,f):(a=lm(u),a.c(),a.m(i,null)):a&&(a.d(1),a=null)},d(u){u&&w(e),u&&w(t),u&&w(i),o&&o.d(),r&&r.d(),a&&a.d()}}}function Qh(n){let e=[],t=new Map,i,s=n[9];const l=o=>o[32].id;for(let o=0;oo[35].old.id+o[35].new.id;for(let o=0;oo[32].id;for(let o=0;o',i=O(),s=v("div"),s.innerHTML=`Some of the imported collections shares the same name and/or fields but are +- `)}`,()=>{m()}):m()}async function m(){if(!u){t(4,u=!0);try{await de.collections.import(o,a),Lt("Successfully imported collections configuration."),i("submit")}catch(C){de.errorResponseHandler(C)}t(4,u=!1),c()}}const g=()=>h(),b=()=>!u;function y(C){le[C?"unshift":"push"](()=>{s=C,t(1,s)})}function k(C){Ve.call(this,n,C)}function $(C){Ve.call(this,n,C)}return n.$$.update=()=>{n.$$.dirty&384&&Array.isArray(l)&&Array.isArray(o)&&d()},[c,s,r,a,u,h,f,l,o,g,b,y,k,$]}class MA extends ke{constructor(e){super(),ye(this,e,TA,CA,be,{show:6,hide:0})}get show(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[0]}}function Kh(n,e,t){const i=n.slice();return i[32]=e[t],i}function Jh(n,e,t){const i=n.slice();return i[35]=e[t],i}function Zh(n,e,t){const i=n.slice();return i[32]=e[t],i}function OA(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,b,y,k,$,C,M,T,D;a=new ge({props:{class:"form-field "+(n[6]?"":"field-error"),name:"collections",$$slots:{default:[AA,({uniqueId:z})=>({40:z}),({uniqueId:z})=>[0,z?512:0]]},$$scope:{ctx:n}}});let A=!1,I=n[6]&&n[1].length&&!n[7]&&Xh(),L=n[6]&&n[1].length&&n[7]&&Qh(n),F=n[13].length&&um(n),q=!!n[0]&&fm(n);return{c(){e=v("input"),t=O(),i=v("div"),s=v("p"),l=B(`Paste below the collections configuration you want to import or + `),o=v("button"),o.innerHTML='Load from JSON file',r=O(),j(a.$$.fragment),u=O(),f=O(),I&&I.c(),c=O(),L&&L.c(),d=O(),F&&F.c(),h=O(),m=v("div"),q&&q.c(),g=O(),b=v("div"),y=O(),k=v("button"),$=v("span"),$.textContent="Review",p(e,"type","file"),p(e,"class","hidden"),p(e,"accept",".json"),p(o,"class","btn btn-outline btn-sm m-l-5"),ne(o,"btn-loading",n[12]),p(i,"class","content txt-xl m-b-base"),p(b,"class","flex-fill"),p($,"class","txt"),p(k,"type","button"),p(k,"class","btn btn-expanded btn-warning m-l-auto"),k.disabled=C=!n[14],p(m,"class","flex m-t-base")},m(z,J){S(z,e,J),n[19](e),S(z,t,J),S(z,i,J),_(i,s),_(s,l),_(s,o),S(z,r,J),R(a,z,J),S(z,u,J),S(z,f,J),I&&I.m(z,J),S(z,c,J),L&&L.m(z,J),S(z,d,J),F&&F.m(z,J),S(z,h,J),S(z,m,J),q&&q.m(m,null),_(m,g),_(m,b),_(m,y),_(m,k),_(k,$),M=!0,T||(D=[K(e,"change",n[20]),K(o,"click",n[21]),K(k,"click",n[26])],T=!0)},p(z,J){(!M||J[0]&4096)&&ne(o,"btn-loading",z[12]);const G={};J[0]&64&&(G.class="form-field "+(z[6]?"":"field-error")),J[0]&65|J[1]&1536&&(G.$$scope={dirty:J,ctx:z}),a.$set(G),z[6]&&z[1].length&&!z[7]?I||(I=Xh(),I.c(),I.m(c.parentNode,c)):I&&(I.d(1),I=null),z[6]&&z[1].length&&z[7]?L?L.p(z,J):(L=Qh(z),L.c(),L.m(d.parentNode,d)):L&&(L.d(1),L=null),z[13].length?F?F.p(z,J):(F=um(z),F.c(),F.m(h.parentNode,h)):F&&(F.d(1),F=null),z[0]?q?q.p(z,J):(q=fm(z),q.c(),q.m(m,g)):q&&(q.d(1),q=null),(!M||J[0]&16384&&C!==(C=!z[14]))&&(k.disabled=C)},i(z){M||(E(a.$$.fragment,z),E(A),M=!0)},o(z){P(a.$$.fragment,z),P(A),M=!1},d(z){z&&w(e),n[19](null),z&&w(t),z&&w(i),z&&w(r),H(a,z),z&&w(u),z&&w(f),I&&I.d(z),z&&w(c),L&&L.d(z),z&&w(d),F&&F.d(z),z&&w(h),z&&w(m),q&&q.d(),T=!1,Pe(D)}}}function DA(n){let e;return{c(){e=v("div"),p(e,"class","loader")},m(t,i){S(t,e,i)},p:ee,i:ee,o:ee,d(t){t&&w(e)}}}function Gh(n){let e;return{c(){e=v("div"),e.textContent="Invalid collections configuration.",p(e,"class","help-block help-block-error")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function AA(n){let e,t,i,s,l,o,r,a,u,f,c=!!n[0]&&!n[6]&&Gh();return{c(){e=v("label"),t=B("Collections"),s=O(),l=v("textarea"),r=O(),c&&c.c(),a=Ae(),p(e,"for",i=n[40]),p(e,"class","p-b-10"),p(l,"id",o=n[40]),p(l,"class","code"),p(l,"spellcheck","false"),p(l,"rows","15"),l.required=!0},m(d,h){S(d,e,h),_(e,t),S(d,s,h),S(d,l,h),ce(l,n[0]),S(d,r,h),c&&c.m(d,h),S(d,a,h),u||(f=K(l,"input",n[22]),u=!0)},p(d,h){h[1]&512&&i!==(i=d[40])&&p(e,"for",i),h[1]&512&&o!==(o=d[40])&&p(l,"id",o),h[0]&1&&ce(l,d[0]),!!d[0]&&!d[6]?c||(c=Gh(),c.c(),c.m(a.parentNode,a)):c&&(c.d(1),c=null)},d(d){d&&w(e),d&&w(s),d&&w(l),d&&w(r),c&&c.d(d),d&&w(a),u=!1,f()}}}function Xh(n){let e;return{c(){e=v("div"),e.innerHTML=`
    +
    Your collections configuration is already up-to-date!
    `,p(e,"class","alert alert-info")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function Qh(n){let e,t,i,s,l,o=n[9].length&&xh(n),r=n[4].length&&nm(n),a=n[8].length&&om(n);return{c(){e=v("h5"),e.textContent="Detected changes",t=O(),i=v("div"),o&&o.c(),s=O(),r&&r.c(),l=O(),a&&a.c(),p(e,"class","section-title"),p(i,"class","list")},m(u,f){S(u,e,f),S(u,t,f),S(u,i,f),o&&o.m(i,null),_(i,s),r&&r.m(i,null),_(i,l),a&&a.m(i,null)},p(u,f){u[9].length?o?o.p(u,f):(o=xh(u),o.c(),o.m(i,s)):o&&(o.d(1),o=null),u[4].length?r?r.p(u,f):(r=nm(u),r.c(),r.m(i,l)):r&&(r.d(1),r=null),u[8].length?a?a.p(u,f):(a=om(u),a.c(),a.m(i,null)):a&&(a.d(1),a=null)},d(u){u&&w(e),u&&w(t),u&&w(i),o&&o.d(),r&&r.d(),a&&a.d()}}}function xh(n){let e=[],t=new Map,i,s=n[9];const l=o=>o[32].id;for(let o=0;oo[35].old.id+o[35].new.id;for(let o=0;oo[32].id;for(let o=0;o',i=O(),s=v("div"),s.innerHTML=`Some of the imported collections shares the same name and/or fields but are imported with different IDs. You can replace them in the import if you want - to.`,l=O(),o=v("button"),o.innerHTML='Replace with original ids',p(t,"class","icon"),p(s,"class","content"),p(o,"type","button"),p(o,"class","btn btn-warning btn-sm btn-outline"),p(e,"class","alert alert-warning m-t-base")},m(u,f){S(u,e,f),_(e,t),_(e,i),_(e,s),_(e,l),_(e,o),r||(a=K(o,"click",n[24]),r=!0)},p:te,d(u){u&&w(e),r=!1,a()}}}function um(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear',p(e,"type","button"),p(e,"class","btn btn-secondary link-hint")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[25]),t=!0)},p:te,d(s){s&&w(e),t=!1,i()}}}function AA(n){let e,t,i,s,l,o,r,a,u,f,c,d;const h=[OA,MA],m=[];function b(g,y){return g[5]?0:1}return f=b(n),c=m[f]=h[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=B(n[15]),r=O(),a=v("div"),u=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(g,y){S(g,e,y),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(g,r,y),S(g,a,y),_(a,u),m[f].m(u,null),d=!0},p(g,y){(!d||y[0]&32768)&&ae(o,g[15]);let k=f;f=b(g),f===k?m[f].p(g,y):(pe(),P(m[k],1,1,()=>{m[k]=null}),he(),c=m[f],c?c.p(g,y):(c=m[f]=h[f](g),c.c()),E(c,1),c.m(u,null))},i(g){d||(E(c),d=!0)},o(g){P(c),d=!1},d(g){g&&w(e),g&&w(r),g&&w(a),m[f].d()}}}function EA(n){let e,t,i,s,l,o;e=new Ci({}),i=new pn({props:{$$slots:{default:[AA]},$$scope:{ctx:n}}});let r={};return l=new TA({props:r}),n[27](l),l.$on("submit",n[28]),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment),s=O(),j(l.$$.fragment)},m(a,u){R(e,a,u),S(a,t,u),R(i,a,u),S(a,s,u),R(l,a,u),o=!0},p(a,u){const f={};u[0]&65535|u[1]&1024&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(E(e.$$.fragment,a),E(i.$$.fragment,a),E(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&w(t),H(i,a),a&&w(s),n[27](null),H(l,a)}}}function IA(n,e,t){let i,s,l,o,r,a,u;Ze(n,mt,Y=>t(15,u=Y)),Ht(mt,u="Import collections",u);let f,c,d="",h=!1,m=[],b=[],g=!0,y=[],k=!1;$();async function $(){t(5,k=!0);try{t(2,b=await de.collections.getFullList(200));for(let Y of b)delete Y.created,delete Y.updated}catch(Y){de.errorResponseHandler(Y)}t(5,k=!1)}function C(){if(t(4,y=[]),!!i)for(let Y of m){const x=W.findByKey(b,"id",Y.id);!(x!=null&&x.id)||!W.hasCollectionChanges(x,Y,g)||y.push({new:Y,old:x})}}function M(){t(1,m=[]);try{t(1,m=JSON.parse(d))}catch{}Array.isArray(m)?t(1,m=W.filterDuplicatesByKey(m)):t(1,m=[]);for(let Y of m)delete Y.created,delete Y.updated,Y.schema=W.filterDuplicatesByKey(Y.schema)}function T(){var Y,x;for(let U of m){const re=W.findByKey(b,"name",U.name)||W.findByKey(b,"id",U.id);if(!re)continue;const Re=U.id,Ne=re.id;U.id=Ne;const Le=Array.isArray(re.schema)?re.schema:[],Fe=Array.isArray(U.schema)?U.schema:[];for(const me of Fe){const Se=W.findByKey(Le,"name",me.name);Se&&Se.id&&(me.id=Se.id)}for(let me of m)if(!!Array.isArray(me.schema))for(let Se of me.schema)((Y=Se.options)==null?void 0:Y.collectionId)&&((x=Se.options)==null?void 0:x.collectionId)===Re&&(Se.options.collectionId=Ne)}t(0,d=JSON.stringify(m,null,4))}function D(Y){t(12,h=!0);const x=new FileReader;x.onload=async U=>{t(12,h=!1),t(10,f.value="",f),t(0,d=U.target.result),await Tn(),m.length||(fl("Invalid collections configuration."),A())},x.onerror=U=>{console.warn(U),fl("Failed to load the imported JSON."),t(12,h=!1),t(10,f.value="",f)},x.readAsText(Y)}function A(){t(0,d=""),t(10,f.value="",f),Fn({})}function I(Y){le[Y?"unshift":"push"](()=>{f=Y,t(10,f)})}const L=()=>{f.files.length&&D(f.files[0])},F=()=>{f.click()};function q(){d=this.value,t(0,d)}function z(){g=this.checked,t(3,g)}const J=()=>T(),G=()=>A(),ie=()=>c==null?void 0:c.show(b,m,g);function Q(Y){le[Y?"unshift":"push"](()=>{c=Y,t(11,c)})}const X=()=>A();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof d<"u"&&M(),n.$$.dirty[0]&3&&t(6,i=!!d&&m.length&&m.length===m.filter(Y=>!!Y.id&&!!Y.name).length),n.$$.dirty[0]&78&&t(9,s=b.filter(Y=>i&&g&&!W.findByKey(m,"id",Y.id))),n.$$.dirty[0]&70&&t(8,l=m.filter(Y=>i&&!W.findByKey(b,"id",Y.id))),n.$$.dirty[0]&10&&(typeof m<"u"||typeof g<"u")&&C(),n.$$.dirty[0]&785&&t(7,o=!!d&&(s.length||l.length||y.length)),n.$$.dirty[0]&224&&t(14,r=!k&&i&&o),n.$$.dirty[0]&6&&t(13,a=m.filter(Y=>{let x=W.findByKey(b,"name",Y.name)||W.findByKey(b,"id",Y.id);if(!x)return!1;if(x.id!=Y.id)return!0;const U=Array.isArray(x.schema)?x.schema:[],re=Array.isArray(Y.schema)?Y.schema:[];for(const Re of re){if(W.findByKey(U,"id",Re.id))continue;const Le=W.findByKey(U,"name",Re.name);if(Le&&Re.id!=Le.id)return!0}return!1}))},[d,m,b,g,y,k,i,o,l,s,f,c,h,a,r,u,T,D,A,I,L,F,q,z,J,G,ie,Q,X]}class PA extends ke{constructor(e){super(),ye(this,e,IA,EA,be,{},null,[-1,-1])}}const Ct=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?ki("/"):!0}],LA={"/login":vt({component:DO,conditions:Ct.concat([n=>!de.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":vt({asyncComponent:()=>st(()=>import("./PageAdminRequestPasswordReset.ab8ae049.js"),[],import.meta.url),conditions:Ct.concat([n=>!de.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":vt({asyncComponent:()=>st(()=>import("./PageAdminConfirmPasswordReset.86ba1dcf.js"),[],import.meta.url),conditions:Ct.concat([n=>!de.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":vt({component:xM,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":vt({component:ES,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":vt({component:jO,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":vt({component:SO,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":vt({component:SD,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":vt({component:jD,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":vt({component:tA,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":vt({component:aA,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":vt({component:hA,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":vt({component:PA,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmPasswordReset.1767c74b.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmPasswordReset.1767c74b.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmVerification.77b2a45d.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmVerification.77b2a45d.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmEmailChange.e9bedc1d.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmEmailChange.e9bedc1d.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"*":vt({component:x1,userData:{showAppSidebar:!1}})};function NA(n,{from:e,to:t},i={}){const s=getComputedStyle(n),l=s.transform==="none"?"":s.transform,[o,r]=s.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*o/t.width-(t.left+o),u=e.top+e.height*r/t.height-(t.top+r),{delay:f=0,duration:c=h=>Math.sqrt(h)*120,easing:d=zo}=i;return{delay:f,duration:Jt(c)?c(Math.sqrt(a*a+u*u)):c,easing:d,css:(h,m)=>{const b=m*a,g=m*u,y=h+m*e.width/t.width,k=h+m*e.height/t.height;return`transform: ${l} translate(${b}px, ${g}px) scale(${y}, ${k});`}}}function fm(n,e,t){const i=n.slice();return i[2]=e[t],i}function FA(n){let e;return{c(){e=v("i"),p(e,"class","ri-alert-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function RA(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function HA(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function jA(n){let e;return{c(){e=v("i"),p(e,"class","ri-information-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function cm(n,e){let t,i,s,l,o=e[2].message+"",r,a,u,f,c,d,h=te,m,b,g;function y(M,T){return M[2].type==="info"?jA:M[2].type==="success"?HA:M[2].type==="warning"?RA:FA}let k=y(e),$=k(e);function C(){return e[1](e[2])}return{key:n,first:null,c(){t=v("div"),i=v("div"),$.c(),s=O(),l=v("div"),r=B(o),a=O(),u=v("button"),u.innerHTML='',f=O(),p(i,"class","icon"),p(l,"class","content"),p(u,"type","button"),p(u,"class","close"),p(t,"class","alert txt-break"),ne(t,"alert-info",e[2].type=="info"),ne(t,"alert-success",e[2].type=="success"),ne(t,"alert-danger",e[2].type=="error"),ne(t,"alert-warning",e[2].type=="warning"),this.first=t},m(M,T){S(M,t,T),_(t,i),$.m(i,null),_(t,s),_(t,l),_(l,r),_(t,a),_(t,u),_(t,f),m=!0,b||(g=K(u,"click",ut(C)),b=!0)},p(M,T){e=M,k!==(k=y(e))&&($.d(1),$=k(e),$&&($.c(),$.m(i,null))),(!m||T&1)&&o!==(o=e[2].message+"")&&ae(r,o),(!m||T&1)&&ne(t,"alert-info",e[2].type=="info"),(!m||T&1)&&ne(t,"alert-success",e[2].type=="success"),(!m||T&1)&&ne(t,"alert-danger",e[2].type=="error"),(!m||T&1)&&ne(t,"alert-warning",e[2].type=="warning")},r(){d=t.getBoundingClientRect()},f(){o0(t),h(),ym(t,d)},a(){h(),h=l0(t,d,NA,{duration:150})},i(M){m||(xe(()=>{c||(c=je(t,yo,{duration:150},!0)),c.run(1)}),m=!0)},o(M){c||(c=je(t,yo,{duration:150},!1)),c.run(0),m=!1},d(M){M&&w(t),$.d(),M&&c&&c.end(),b=!1,g()}}}function qA(n){let e,t=[],i=new Map,s,l=n[0];const o=r=>r[2].message;for(let r=0;rt(0,i=l)),[i,l=>Eg(l)]}class zA extends ke{constructor(e){super(),ye(this,e,VA,qA,be,{})}}function BA(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=v("h4"),i=B(t),p(e,"class","block center txt-break"),p(e,"slot","header")},m(l,o){S(l,e,o),_(e,i)},p(l,o){var r;o&2&&t!==(t=((r=l[1])==null?void 0:r.text)+"")&&ae(i,t)},d(l){l&&w(e)}}}function UA(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=v("span"),t.textContent="No",i=O(),s=v("button"),l=v("span"),l.textContent="Yes",p(t,"class","txt"),e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-secondary btn-expanded-sm"),e.disabled=n[2],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-danger btn-expanded"),s.disabled=n[2],ne(s,"btn-loading",n[2])},m(a,u){S(a,e,u),_(e,t),S(a,i,u),S(a,s,u),_(s,l),e.focus(),o||(r=[K(e,"click",n[4]),K(s,"click",n[5])],o=!0)},p(a,u){u&4&&(e.disabled=a[2]),u&4&&(s.disabled=a[2]),u&4&&ne(s,"btn-loading",a[2])},d(a){a&&w(e),a&&w(i),a&&w(s),o=!1,Pe(r)}}}function WA(n){let e,t,i={class:"confirm-popup hide-content overlay-panel-sm",overlayClose:!n[2],escClose:!n[2],btnClose:!1,popup:!0,$$slots:{footer:[UA],header:[BA]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[6](e),e.$on("hide",n[7]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&4&&(o.overlayClose=!s[2]),l&4&&(o.escClose=!s[2]),l&271&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[6](null),H(e,s)}}}function YA(n,e,t){let i;Ze(n,Ya,c=>t(1,i=c));let s,l=!1,o=!1;const r=()=>{t(3,o=!1),s==null||s.hide()},a=async()=>{i!=null&&i.yesCallback&&(t(2,l=!0),await Promise.resolve(i.yesCallback()),t(2,l=!1)),t(3,o=!0),s==null||s.hide()};function u(c){le[c?"unshift":"push"](()=>{s=c,t(0,s)})}const f=async()=>{!o&&(i==null?void 0:i.noCallback)&&i.noCallback(),await Tn(),t(3,o=!1),N_()};return n.$$.update=()=>{n.$$.dirty&3&&i!=null&&i.text&&(t(3,o=!1),s==null||s.show())},[s,i,l,o,r,a,u,f]}class KA extends ke{constructor(e){super(),ye(this,e,YA,WA,be,{})}}function dm(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,b,g,y,k;return b=new Zn({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[JA]},$$scope:{ctx:n}}}),{c(){var $;e=v("aside"),t=v("a"),t.innerHTML='PocketBase logo',i=O(),s=v("nav"),l=v("a"),l.innerHTML='',o=O(),r=v("a"),r.innerHTML='',a=O(),u=v("a"),u.innerHTML='',f=O(),c=v("figure"),d=v("img"),m=O(),j(b.$$.fragment),p(t,"href","/"),p(t,"class","logo logo-sm"),p(l,"href","/collections"),p(l,"class","menu-item"),p(l,"aria-label","Collections"),p(r,"href","/logs"),p(r,"class","menu-item"),p(r,"aria-label","Logs"),p(u,"href","/settings"),p(u,"class","menu-item"),p(u,"aria-label","Settings"),p(s,"class","main-menu"),Ln(d.src,h="./images/avatars/avatar"+((($=n[0])==null?void 0:$.avatar)||0)+".svg")||p(d,"src",h),p(d,"alt","Avatar"),p(c,"class","thumb thumb-circle link-hint closable"),p(e,"class","app-sidebar")},m($,C){S($,e,C),_(e,t),_(e,i),_(e,s),_(s,l),_(s,o),_(s,r),_(s,a),_(s,u),_(e,f),_(e,c),_(c,d),_(c,m),R(b,c,null),g=!0,y||(k=[Ae(Ut.call(null,t)),Ae(Ut.call(null,l)),Ae(An.call(null,l,{path:"/collections/?.*",className:"current-route"})),Ae(Be.call(null,l,{text:"Collections",position:"right"})),Ae(Ut.call(null,r)),Ae(An.call(null,r,{path:"/logs/?.*",className:"current-route"})),Ae(Be.call(null,r,{text:"Logs",position:"right"})),Ae(Ut.call(null,u)),Ae(An.call(null,u,{path:"/settings/?.*",className:"current-route"})),Ae(Be.call(null,u,{text:"Settings",position:"right"}))],y=!0)},p($,C){var T;(!g||C&1&&!Ln(d.src,h="./images/avatars/avatar"+(((T=$[0])==null?void 0:T.avatar)||0)+".svg"))&&p(d,"src",h);const M={};C&1024&&(M.$$scope={dirty:C,ctx:$}),b.$set(M)},i($){g||(E(b.$$.fragment,$),g=!0)},o($){P(b.$$.fragment,$),g=!1},d($){$&&w(e),H(b),y=!1,Pe(k)}}}function JA(n){let e,t,i,s,l,o,r;return{c(){e=v("a"),e.innerHTML=` + to.
    `,l=O(),o=v("button"),o.innerHTML='Replace with original ids',p(t,"class","icon"),p(s,"class","content"),p(o,"type","button"),p(o,"class","btn btn-warning btn-sm btn-outline"),p(e,"class","alert alert-warning m-t-base")},m(u,f){S(u,e,f),_(e,t),_(e,i),_(e,s),_(e,l),_(e,o),r||(a=K(o,"click",n[24]),r=!0)},p:ee,d(u){u&&w(e),r=!1,a()}}}function fm(n){let e,t,i;return{c(){e=v("button"),e.innerHTML='Clear',p(e,"type","button"),p(e,"class","btn btn-secondary link-hint")},m(s,l){S(s,e,l),t||(i=K(e,"click",n[25]),t=!0)},p:ee,d(s){s&&w(e),t=!1,i()}}}function EA(n){let e,t,i,s,l,o,r,a,u,f,c,d;const h=[DA,OA],m=[];function g(b,y){return b[5]?0:1}return f=g(n),c=m[f]=h[f](n),{c(){e=v("header"),t=v("nav"),i=v("div"),i.textContent="Settings",s=O(),l=v("div"),o=B(n[15]),r=O(),a=v("div"),u=v("div"),c.c(),p(i,"class","breadcrumb-item"),p(l,"class","breadcrumb-item"),p(t,"class","breadcrumbs"),p(e,"class","page-header"),p(u,"class","panel"),p(a,"class","wrapper")},m(b,y){S(b,e,y),_(e,t),_(t,i),_(t,s),_(t,l),_(l,o),S(b,r,y),S(b,a,y),_(a,u),m[f].m(u,null),d=!0},p(b,y){(!d||y[0]&32768)&&re(o,b[15]);let k=f;f=g(b),f===k?m[f].p(b,y):(pe(),P(m[k],1,1,()=>{m[k]=null}),he(),c=m[f],c?c.p(b,y):(c=m[f]=h[f](b),c.c()),E(c,1),c.m(u,null))},i(b){d||(E(c),d=!0)},o(b){P(c),d=!1},d(b){b&&w(e),b&&w(r),b&&w(a),m[f].d()}}}function IA(n){let e,t,i,s,l,o;e=new Ci({}),i=new pn({props:{$$slots:{default:[EA]},$$scope:{ctx:n}}});let r={};return l=new MA({props:r}),n[27](l),l.$on("submit",n[28]),{c(){j(e.$$.fragment),t=O(),j(i.$$.fragment),s=O(),j(l.$$.fragment)},m(a,u){R(e,a,u),S(a,t,u),R(i,a,u),S(a,s,u),R(l,a,u),o=!0},p(a,u){const f={};u[0]&65535|u[1]&1024&&(f.$$scope={dirty:u,ctx:a}),i.$set(f);const c={};l.$set(c)},i(a){o||(E(e.$$.fragment,a),E(i.$$.fragment,a),E(l.$$.fragment,a),o=!0)},o(a){P(e.$$.fragment,a),P(i.$$.fragment,a),P(l.$$.fragment,a),o=!1},d(a){H(e,a),a&&w(t),H(i,a),a&&w(s),n[27](null),H(l,a)}}}function PA(n,e,t){let i,s,l,o,r,a,u;Ze(n,mt,Y=>t(15,u=Y)),Ht(mt,u="Import collections",u);let f,c,d="",h=!1,m=[],g=[],b=!0,y=[],k=!1;$();async function $(){t(5,k=!0);try{t(2,g=await de.collections.getFullList(200));for(let Y of g)delete Y.created,delete Y.updated}catch(Y){de.errorResponseHandler(Y)}t(5,k=!1)}function C(){if(t(4,y=[]),!!i)for(let Y of m){const x=W.findByKey(g,"id",Y.id);!(x!=null&&x.id)||!W.hasCollectionChanges(x,Y,b)||y.push({new:Y,old:x})}}function M(){t(1,m=[]);try{t(1,m=JSON.parse(d))}catch{}Array.isArray(m)?t(1,m=W.filterDuplicatesByKey(m)):t(1,m=[]);for(let Y of m)delete Y.created,delete Y.updated,Y.schema=W.filterDuplicatesByKey(Y.schema)}function T(){var Y,x;for(let U of m){const ae=W.findByKey(g,"name",U.name)||W.findByKey(g,"id",U.id);if(!ae)continue;const Re=U.id,Ne=ae.id;U.id=Ne;const Le=Array.isArray(ae.schema)?ae.schema:[],Fe=Array.isArray(U.schema)?U.schema:[];for(const me of Fe){const Se=W.findByKey(Le,"name",me.name);Se&&Se.id&&(me.id=Se.id)}for(let me of m)if(!!Array.isArray(me.schema))for(let Se of me.schema)((Y=Se.options)==null?void 0:Y.collectionId)&&((x=Se.options)==null?void 0:x.collectionId)===Re&&(Se.options.collectionId=Ne)}t(0,d=JSON.stringify(m,null,4))}function D(Y){t(12,h=!0);const x=new FileReader;x.onload=async U=>{t(12,h=!1),t(10,f.value="",f),t(0,d=U.target.result),await Tn(),m.length||(cl("Invalid collections configuration."),A())},x.onerror=U=>{console.warn(U),cl("Failed to load the imported JSON."),t(12,h=!1),t(10,f.value="",f)},x.readAsText(Y)}function A(){t(0,d=""),t(10,f.value="",f),Fn({})}function I(Y){le[Y?"unshift":"push"](()=>{f=Y,t(10,f)})}const L=()=>{f.files.length&&D(f.files[0])},F=()=>{f.click()};function q(){d=this.value,t(0,d)}function z(){b=this.checked,t(3,b)}const J=()=>T(),G=()=>A(),ie=()=>c==null?void 0:c.show(g,m,b);function Q(Y){le[Y?"unshift":"push"](()=>{c=Y,t(11,c)})}const X=()=>A();return n.$$.update=()=>{n.$$.dirty[0]&1&&typeof d<"u"&&M(),n.$$.dirty[0]&3&&t(6,i=!!d&&m.length&&m.length===m.filter(Y=>!!Y.id&&!!Y.name).length),n.$$.dirty[0]&78&&t(9,s=g.filter(Y=>i&&b&&!W.findByKey(m,"id",Y.id))),n.$$.dirty[0]&70&&t(8,l=m.filter(Y=>i&&!W.findByKey(g,"id",Y.id))),n.$$.dirty[0]&10&&(typeof m<"u"||typeof b<"u")&&C(),n.$$.dirty[0]&785&&t(7,o=!!d&&(s.length||l.length||y.length)),n.$$.dirty[0]&224&&t(14,r=!k&&i&&o),n.$$.dirty[0]&6&&t(13,a=m.filter(Y=>{let x=W.findByKey(g,"name",Y.name)||W.findByKey(g,"id",Y.id);if(!x)return!1;if(x.id!=Y.id)return!0;const U=Array.isArray(x.schema)?x.schema:[],ae=Array.isArray(Y.schema)?Y.schema:[];for(const Re of ae){if(W.findByKey(U,"id",Re.id))continue;const Le=W.findByKey(U,"name",Re.name);if(Le&&Re.id!=Le.id)return!0}return!1}))},[d,m,g,b,y,k,i,o,l,s,f,c,h,a,r,u,T,D,A,I,L,F,q,z,J,G,ie,Q,X]}class LA extends ke{constructor(e){super(),ye(this,e,PA,IA,be,{},null,[-1,-1])}}const Ct=[async n=>{const e=new URLSearchParams(window.location.search);return n.location!=="/"&&e.has("installer")?ki("/"):!0}],NA={"/login":vt({component:AO,conditions:Ct.concat([n=>!de.authStore.isValid]),userData:{showAppSidebar:!1}}),"/request-password-reset":vt({asyncComponent:()=>st(()=>import("./PageAdminRequestPasswordReset.a16f1615.js"),[],import.meta.url),conditions:Ct.concat([n=>!de.authStore.isValid]),userData:{showAppSidebar:!1}}),"/confirm-password-reset/:token":vt({asyncComponent:()=>st(()=>import("./PageAdminConfirmPasswordReset.2286108f.js"),[],import.meta.url),conditions:Ct.concat([n=>!de.authStore.isValid]),userData:{showAppSidebar:!1}}),"/collections":vt({component:eO,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/logs":vt({component:IS,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings":vt({component:qO,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/admins":vt({component:$O,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/mail":vt({component:$D,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/storage":vt({component:qD,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/auth-providers":vt({component:nA,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/tokens":vt({component:uA,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/export-collections":vt({component:mA,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/settings/import-collections":vt({component:LA,conditions:Ct.concat([n=>de.authStore.isValid]),userData:{showAppSidebar:!0}}),"/users/confirm-password-reset/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmPasswordReset.ce74e903.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/auth/confirm-password-reset/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmPasswordReset.ce74e903.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/users/confirm-verification/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmVerification.7214c772.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/auth/confirm-verification/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmVerification.7214c772.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/users/confirm-email-change/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmEmailChange.b5ca8f93.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"/auth/confirm-email-change/:token":vt({asyncComponent:()=>st(()=>import("./PageRecordConfirmEmailChange.b5ca8f93.js"),[],import.meta.url),conditions:Ct,userData:{showAppSidebar:!1}}),"*":vt({component:ev,userData:{showAppSidebar:!1}})};function FA(n,{from:e,to:t},i={}){const s=getComputedStyle(n),l=s.transform==="none"?"":s.transform,[o,r]=s.transformOrigin.split(" ").map(parseFloat),a=e.left+e.width*o/t.width-(t.left+o),u=e.top+e.height*r/t.height-(t.top+r),{delay:f=0,duration:c=h=>Math.sqrt(h)*120,easing:d=Bo}=i;return{delay:f,duration:Jt(c)?c(Math.sqrt(a*a+u*u)):c,easing:d,css:(h,m)=>{const g=m*a,b=m*u,y=h+m*e.width/t.width,k=h+m*e.height/t.height;return`transform: ${l} translate(${g}px, ${b}px) scale(${y}, ${k});`}}}function cm(n,e,t){const i=n.slice();return i[2]=e[t],i}function RA(n){let e;return{c(){e=v("i"),p(e,"class","ri-alert-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function HA(n){let e;return{c(){e=v("i"),p(e,"class","ri-error-warning-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function jA(n){let e;return{c(){e=v("i"),p(e,"class","ri-checkbox-circle-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function qA(n){let e;return{c(){e=v("i"),p(e,"class","ri-information-line")},m(t,i){S(t,e,i)},d(t){t&&w(e)}}}function dm(n,e){let t,i,s,l,o=e[2].message+"",r,a,u,f,c,d,h=ee,m,g,b;function y(M,T){return M[2].type==="info"?qA:M[2].type==="success"?jA:M[2].type==="warning"?HA:RA}let k=y(e),$=k(e);function C(){return e[1](e[2])}return{key:n,first:null,c(){t=v("div"),i=v("div"),$.c(),s=O(),l=v("div"),r=B(o),a=O(),u=v("button"),u.innerHTML='',f=O(),p(i,"class","icon"),p(l,"class","content"),p(u,"type","button"),p(u,"class","close"),p(t,"class","alert txt-break"),ne(t,"alert-info",e[2].type=="info"),ne(t,"alert-success",e[2].type=="success"),ne(t,"alert-danger",e[2].type=="error"),ne(t,"alert-warning",e[2].type=="warning"),this.first=t},m(M,T){S(M,t,T),_(t,i),$.m(i,null),_(t,s),_(t,l),_(l,r),_(t,a),_(t,u),_(t,f),m=!0,g||(b=K(u,"click",ut(C)),g=!0)},p(M,T){e=M,k!==(k=y(e))&&($.d(1),$=k(e),$&&($.c(),$.m(i,null))),(!m||T&1)&&o!==(o=e[2].message+"")&&re(r,o),(!m||T&1)&&ne(t,"alert-info",e[2].type=="info"),(!m||T&1)&&ne(t,"alert-success",e[2].type=="success"),(!m||T&1)&&ne(t,"alert-danger",e[2].type=="error"),(!m||T&1)&&ne(t,"alert-warning",e[2].type=="warning")},r(){d=t.getBoundingClientRect()},f(){r0(t),h(),km(t,d)},a(){h(),h=o0(t,d,FA,{duration:150})},i(M){m||(xe(()=>{c||(c=je(t,ko,{duration:150},!0)),c.run(1)}),m=!0)},o(M){c||(c=je(t,ko,{duration:150},!1)),c.run(0),m=!1},d(M){M&&w(t),$.d(),M&&c&&c.end(),g=!1,b()}}}function VA(n){let e,t=[],i=new Map,s,l=n[0];const o=r=>r[2].message;for(let r=0;rt(0,i=l)),[i,l=>Ig(l)]}class BA extends ke{constructor(e){super(),ye(this,e,zA,VA,be,{})}}function UA(n){var s;let e,t=((s=n[1])==null?void 0:s.text)+"",i;return{c(){e=v("h4"),i=B(t),p(e,"class","block center txt-break"),p(e,"slot","header")},m(l,o){S(l,e,o),_(e,i)},p(l,o){var r;o&2&&t!==(t=((r=l[1])==null?void 0:r.text)+"")&&re(i,t)},d(l){l&&w(e)}}}function WA(n){let e,t,i,s,l,o,r;return{c(){e=v("button"),t=v("span"),t.textContent="No",i=O(),s=v("button"),l=v("span"),l.textContent="Yes",p(t,"class","txt"),e.autofocus=!0,p(e,"type","button"),p(e,"class","btn btn-secondary btn-expanded-sm"),e.disabled=n[2],p(l,"class","txt"),p(s,"type","button"),p(s,"class","btn btn-danger btn-expanded"),s.disabled=n[2],ne(s,"btn-loading",n[2])},m(a,u){S(a,e,u),_(e,t),S(a,i,u),S(a,s,u),_(s,l),e.focus(),o||(r=[K(e,"click",n[4]),K(s,"click",n[5])],o=!0)},p(a,u){u&4&&(e.disabled=a[2]),u&4&&(s.disabled=a[2]),u&4&&ne(s,"btn-loading",a[2])},d(a){a&&w(e),a&&w(i),a&&w(s),o=!1,Pe(r)}}}function YA(n){let e,t,i={class:"confirm-popup hide-content overlay-panel-sm",overlayClose:!n[2],escClose:!n[2],btnClose:!1,popup:!0,$$slots:{footer:[WA],header:[UA]},$$scope:{ctx:n}};return e=new Jn({props:i}),n[6](e),e.$on("hide",n[7]),{c(){j(e.$$.fragment)},m(s,l){R(e,s,l),t=!0},p(s,[l]){const o={};l&4&&(o.overlayClose=!s[2]),l&4&&(o.escClose=!s[2]),l&271&&(o.$$scope={dirty:l,ctx:s}),e.$set(o)},i(s){t||(E(e.$$.fragment,s),t=!0)},o(s){P(e.$$.fragment,s),t=!1},d(s){n[6](null),H(e,s)}}}function KA(n,e,t){let i;Ze(n,Ka,c=>t(1,i=c));let s,l=!1,o=!1;const r=()=>{t(3,o=!1),s==null||s.hide()},a=async()=>{i!=null&&i.yesCallback&&(t(2,l=!0),await Promise.resolve(i.yesCallback()),t(2,l=!1)),t(3,o=!0),s==null||s.hide()};function u(c){le[c?"unshift":"push"](()=>{s=c,t(0,s)})}const f=async()=>{!o&&(i==null?void 0:i.noCallback)&&i.noCallback(),await Tn(),t(3,o=!1),F_()};return n.$$.update=()=>{n.$$.dirty&3&&i!=null&&i.text&&(t(3,o=!1),s==null||s.show())},[s,i,l,o,r,a,u,f]}class JA extends ke{constructor(e){super(),ye(this,e,KA,YA,be,{})}}function pm(n){let e,t,i,s,l,o,r,a,u,f,c,d,h,m,g,b,y,k;return g=new Zn({props:{class:"dropdown dropdown-nowrap dropdown-upside dropdown-left",$$slots:{default:[ZA]},$$scope:{ctx:n}}}),{c(){var $;e=v("aside"),t=v("a"),t.innerHTML='PocketBase logo',i=O(),s=v("nav"),l=v("a"),l.innerHTML='',o=O(),r=v("a"),r.innerHTML='',a=O(),u=v("a"),u.innerHTML='',f=O(),c=v("figure"),d=v("img"),m=O(),j(g.$$.fragment),p(t,"href","/"),p(t,"class","logo logo-sm"),p(l,"href","/collections"),p(l,"class","menu-item"),p(l,"aria-label","Collections"),p(r,"href","/logs"),p(r,"class","menu-item"),p(r,"aria-label","Logs"),p(u,"href","/settings"),p(u,"class","menu-item"),p(u,"aria-label","Settings"),p(s,"class","main-menu"),Ln(d.src,h="./images/avatars/avatar"+((($=n[0])==null?void 0:$.avatar)||0)+".svg")||p(d,"src",h),p(d,"alt","Avatar"),p(c,"class","thumb thumb-circle link-hint closable"),p(e,"class","app-sidebar")},m($,C){S($,e,C),_(e,t),_(e,i),_(e,s),_(s,l),_(s,o),_(s,r),_(s,a),_(s,u),_(e,f),_(e,c),_(c,d),_(c,m),R(g,c,null),b=!0,y||(k=[Ee(Ut.call(null,t)),Ee(Ut.call(null,l)),Ee(An.call(null,l,{path:"/collections/?.*",className:"current-route"})),Ee(Ue.call(null,l,{text:"Collections",position:"right"})),Ee(Ut.call(null,r)),Ee(An.call(null,r,{path:"/logs/?.*",className:"current-route"})),Ee(Ue.call(null,r,{text:"Logs",position:"right"})),Ee(Ut.call(null,u)),Ee(An.call(null,u,{path:"/settings/?.*",className:"current-route"})),Ee(Ue.call(null,u,{text:"Settings",position:"right"}))],y=!0)},p($,C){var T;(!b||C&1&&!Ln(d.src,h="./images/avatars/avatar"+(((T=$[0])==null?void 0:T.avatar)||0)+".svg"))&&p(d,"src",h);const M={};C&1024&&(M.$$scope={dirty:C,ctx:$}),g.$set(M)},i($){b||(E(g.$$.fragment,$),b=!0)},o($){P(g.$$.fragment,$),b=!1},d($){$&&w(e),H(g),y=!1,Pe(k)}}}function ZA(n){let e,t,i,s,l,o,r;return{c(){e=v("a"),e.innerHTML=` Manage admins`,t=O(),i=v("hr"),s=O(),l=v("button"),l.innerHTML=` - Logout`,p(e,"href","/settings/admins"),p(e,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),S(a,s,u),S(a,l,u),o||(r=[Ae(Ut.call(null,e)),K(l,"click",n[6])],o=!0)},p:te,d(a){a&&w(e),a&&w(t),a&&w(i),a&&w(s),a&&w(l),o=!1,Pe(r)}}}function ZA(n){var h;let e,t,i,s,l,o,r,a,u,f,c;document.title=e=W.joinNonEmpty([n[3],n[2],"PocketBase"]," - ");let d=((h=n[0])==null?void 0:h.id)&&n[1]&&dm(n);return o=new v0({props:{routes:LA}}),o.$on("routeLoading",n[4]),o.$on("conditionsFailed",n[5]),a=new zA({}),f=new KA({}),{c(){t=O(),i=v("div"),d&&d.c(),s=O(),l=v("div"),j(o.$$.fragment),r=O(),j(a.$$.fragment),u=O(),j(f.$$.fragment),p(l,"class","app-body"),p(i,"class","app-layout")},m(m,b){S(m,t,b),S(m,i,b),d&&d.m(i,null),_(i,s),_(i,l),R(o,l,null),_(l,r),R(a,l,null),S(m,u,b),R(f,m,b),c=!0},p(m,[b]){var g;(!c||b&12)&&e!==(e=W.joinNonEmpty([m[3],m[2],"PocketBase"]," - "))&&(document.title=e),((g=m[0])==null?void 0:g.id)&&m[1]?d?(d.p(m,b),b&3&&E(d,1)):(d=dm(m),d.c(),E(d,1),d.m(i,s)):d&&(pe(),P(d,1,1,()=>{d=null}),he())},i(m){c||(E(d),E(o.$$.fragment,m),E(a.$$.fragment,m),E(f.$$.fragment,m),c=!0)},o(m){P(d),P(o.$$.fragment,m),P(a.$$.fragment,m),P(f.$$.fragment,m),c=!1},d(m){m&&w(t),m&&w(i),d&&d.d(),H(o),H(a),m&&w(u),H(f,m)}}}function GA(n,e,t){let i,s,l,o;Ze(n,$s,h=>t(8,i=h)),Ze(n,vo,h=>t(2,s=h)),Ze(n,ya,h=>t(0,l=h)),Ze(n,mt,h=>t(3,o=h));let r,a=!1;function u(h){var m,b,g,y;((m=h==null?void 0:h.detail)==null?void 0:m.location)!==r&&(t(1,a=!!((g=(b=h==null?void 0:h.detail)==null?void 0:b.userData)!=null&&g.showAppSidebar)),r=(y=h==null?void 0:h.detail)==null?void 0:y.location,Ht(mt,o="",o),Fn({}),N_())}function f(){ki("/")}async function c(){var h,m;if(!!(l!=null&&l.id))try{const b=await de.settings.getAll({$cancelKey:"initialAppSettings"});Ht(vo,s=((h=b==null?void 0:b.meta)==null?void 0:h.appName)||"",s),Ht($s,i=!!((m=b==null?void 0:b.meta)!=null&&m.hideControls),i)}catch(b){console.warn("Failed to load app settings.",b)}}function d(){de.logout()}return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&c()},[l,a,s,o,u,f,d]}class XA extends ke{constructor(e){super(),ye(this,e,GA,ZA,be,{})}}new XA({target:document.getElementById("app")});export{Pe as A,Lt as B,W as C,ki as D,Ee as E,Pg as F,fa as G,ru as H,Ze as I,Zi as J,It as K,cn as L,le as M,P_ as N,bt as O,Gi as P,nn as Q,Pn as R,ke as S,Qa as T,P as a,O as b,j as c,H as d,v as e,p as f,S as g,_ as h,ye as i,Ae as j,pe as k,Ut as l,R as m,he as n,w as o,de as p,ge as q,ne as r,be as s,E as t,K as u,ut as v,B as w,ae as x,te as y,ce as z}; + Logout`,p(e,"href","/settings/admins"),p(e,"class","dropdown-item closable"),p(l,"type","button"),p(l,"class","dropdown-item closable")},m(a,u){S(a,e,u),S(a,t,u),S(a,i,u),S(a,s,u),S(a,l,u),o||(r=[Ee(Ut.call(null,e)),K(l,"click",n[6])],o=!0)},p:ee,d(a){a&&w(e),a&&w(t),a&&w(i),a&&w(s),a&&w(l),o=!1,Pe(r)}}}function GA(n){var h;let e,t,i,s,l,o,r,a,u,f,c;document.title=e=W.joinNonEmpty([n[3],n[2],"PocketBase"]," - ");let d=((h=n[0])==null?void 0:h.id)&&n[1]&&pm(n);return o=new y0({props:{routes:NA}}),o.$on("routeLoading",n[4]),o.$on("conditionsFailed",n[5]),a=new BA({}),f=new JA({}),{c(){t=O(),i=v("div"),d&&d.c(),s=O(),l=v("div"),j(o.$$.fragment),r=O(),j(a.$$.fragment),u=O(),j(f.$$.fragment),p(l,"class","app-body"),p(i,"class","app-layout")},m(m,g){S(m,t,g),S(m,i,g),d&&d.m(i,null),_(i,s),_(i,l),R(o,l,null),_(l,r),R(a,l,null),S(m,u,g),R(f,m,g),c=!0},p(m,[g]){var b;(!c||g&12)&&e!==(e=W.joinNonEmpty([m[3],m[2],"PocketBase"]," - "))&&(document.title=e),((b=m[0])==null?void 0:b.id)&&m[1]?d?(d.p(m,g),g&3&&E(d,1)):(d=pm(m),d.c(),E(d,1),d.m(i,s)):d&&(pe(),P(d,1,1,()=>{d=null}),he())},i(m){c||(E(d),E(o.$$.fragment,m),E(a.$$.fragment,m),E(f.$$.fragment,m),c=!0)},o(m){P(d),P(o.$$.fragment,m),P(a.$$.fragment,m),P(f.$$.fragment,m),c=!1},d(m){m&&w(t),m&&w(i),d&&d.d(),H(o),H(a),m&&w(u),H(f,m)}}}function XA(n,e,t){let i,s,l,o;Ze(n,Cs,h=>t(8,i=h)),Ze(n,yo,h=>t(2,s=h)),Ze(n,ka,h=>t(0,l=h)),Ze(n,mt,h=>t(3,o=h));let r,a=!1;function u(h){var m,g,b,y;((m=h==null?void 0:h.detail)==null?void 0:m.location)!==r&&(t(1,a=!!((b=(g=h==null?void 0:h.detail)==null?void 0:g.userData)!=null&&b.showAppSidebar)),r=(y=h==null?void 0:h.detail)==null?void 0:y.location,Ht(mt,o="",o),Fn({}),F_())}function f(){ki("/")}async function c(){var h,m;if(!!(l!=null&&l.id))try{const g=await de.settings.getAll({$cancelKey:"initialAppSettings"});Ht(yo,s=((h=g==null?void 0:g.meta)==null?void 0:h.appName)||"",s),Ht(Cs,i=!!((m=g==null?void 0:g.meta)!=null&&m.hideControls),i)}catch(g){console.warn("Failed to load app settings.",g)}}function d(){de.logout()}return n.$$.update=()=>{n.$$.dirty&1&&l!=null&&l.id&&c()},[l,a,s,o,u,f,d]}class QA extends ke{constructor(e){super(),ye(this,e,XA,GA,be,{})}}new QA({target:document.getElementById("app")});export{Pe as A,Lt as B,W as C,ki as D,Ae as E,Lg as F,ca as G,au as H,Ze as I,Zi as J,It as K,cn as L,le as M,L_ as N,bt as O,Gi as P,nn as Q,Pn as R,ke as S,xa as T,P as a,O as b,j as c,H as d,v as e,p as f,S as g,_ as h,ye as i,Ee as j,pe as k,Ut as l,R as m,he as n,w as o,de as p,ge as q,ne as r,be as s,E as t,K as u,ut as v,B as w,re as x,ee as y,ce as z}; diff --git a/ui/dist/index.html b/ui/dist/index.html index 3d9529d5..4b61de0c 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -24,8 +24,8 @@ window.Prism = window.Prism || {}; window.Prism.manual = true; - - + +
    diff --git a/ui/src/components/base/FilterAutocompleteInput.svelte b/ui/src/components/base/FilterAutocompleteInput.svelte index 41506b8b..5870c462 100644 --- a/ui/src/components/base/FilterAutocompleteInput.svelte +++ b/ui/src/components/base/FilterAutocompleteInput.svelte @@ -236,12 +236,23 @@ result.push(key); - if (field.type === "relation" && field.options.collectionId) { + // add relation fields + if (field.type === "relation" && field.options?.collectionId) { const subKeys = getCollectionFieldKeys(field.options.collectionId, key + ".", level + 1); if (subKeys.length) { result = result.concat(subKeys); } } + + // add ":each" field modifier + if (field.type === "select" && field.options?.maxSelect != 1) { + result.push(key + ":each"); + } + + // add ":length" field modifier to arrayble fields + if (field.options?.maxSelect != 1 && ["select", "file", "relation"].includes(field.type)) { + result.push(key + ":length"); + } } return result; @@ -259,7 +270,6 @@ result.push("@request.method"); result.push("@request.query."); result.push("@request.data."); - result.push("@request.auth."); result.push("@request.auth.id"); result.push("@request.auth.collectionId"); result.push("@request.auth.collectionName"); @@ -279,6 +289,27 @@ } } + // load base collection fields into @request.data.* + const issetExcludeList = ["created", "updated"]; + if (baseCollection?.id) { + const keys = getCollectionFieldKeys(baseCollection.name, "@request.data."); + for (const key of keys) { + result.push(key); + + // add ":isset" modifier to non-base keys + const parts = key.split("."); + if ( + parts.length === 3 && + // doesn't contain another modifier + parts[2].indexOf(":") === -1 && + // is not from the exclude list + !issetExcludeList.includes(parts[2]) + ) { + result.push(key + ":isset"); + } + } + } + return result; } diff --git a/ui/src/components/collections/CollectionRulesTab.svelte b/ui/src/components/collections/CollectionRulesTab.svelte index 68156d55..39bf0428 100644 --- a/ui/src/components/collections/CollectionRulesTab.svelte +++ b/ui/src/components/collections/CollectionRulesTab.svelte @@ -9,7 +9,7 @@
    -
    +

    All rules follow the diff --git a/ui/src/components/collections/FieldAccordion.svelte b/ui/src/components/collections/FieldAccordion.svelte index d93b6602..414370fa 100644 --- a/ui/src/components/collections/FieldAccordion.svelte +++ b/ui/src/components/collections/FieldAccordion.svelte @@ -108,6 +108,17 @@ return CommonHelper.slugify(name); } + function requiredLabel(field) { + switch (field?.type) { + case "bool": + return "Nonfalsey"; + case "number": + return "Nonzero"; + default: + return "Nonempty"; + } + } + onMount(() => { // auto expand new fields if (!field.id) { @@ -150,7 +161,7 @@ New {/if} {#if field.required} - Nonempty + {requiredLabel(field)} {/if} {#if field.unique} Unique @@ -270,13 +281,13 @@

    {:else} -
    - {#if isAdminOnly} - - {:else} - - {/if} - - - -
    - -

    - {#if isAdminOnly} - Only admins will be able to perform this action (unlock to change) - {:else} - Leave empty to grant everyone access - {/if} -

    -
    -
    -
    -
    + + +
    + +

    + {#if isAdminOnly} + Only admins will be able to perform this action ( + + ). + {:else} + Leave empty to grant everyone access. + {/if} +

    +
    +
    + {/if} diff --git a/ui/src/components/collections/docs/ListApiDocs.svelte b/ui/src/components/collections/docs/ListApiDocs.svelte index dab74c57..03a4be17 100644 --- a/ui/src/components/collections/docs/ListApiDocs.svelte +++ b/ui/src/components/collections/docs/ListApiDocs.svelte @@ -77,7 +77,7 @@ // fetch a paginated records list const resultList = await pb.collection('${collection?.name}').getList(1, 50, { - filter: 'created >= "2022-01-01 00:00:00" && someFiled1 != someField2', + filter: 'created >= "2022-01-01 00:00:00" && someField1 != someField2', }); // you can also fetch all records at once via getFullList @@ -101,7 +101,7 @@ final resultList = await pb.collection('${collection?.name}').getList( page: 1, perPage: 50, - filter: 'created >= "2022-01-01 00:00:00" && someFiled1 != someField2', + filter: 'created >= "2022-01-01 00:00:00" && someField1 != someField2', ); // you can also fetch all records at once via getFullList diff --git a/ui/src/components/settings/AuthProviderAccordion.svelte b/ui/src/components/settings/AuthProviderAccordion.svelte index a3b921c5..479fd81b 100644 --- a/ui/src/components/settings/AuthProviderAccordion.svelte +++ b/ui/src/components/settings/AuthProviderAccordion.svelte @@ -54,7 +54,7 @@ {#if hasErrors} {/if} diff --git a/ui/src/components/settings/EmailTemplateAccordion.svelte b/ui/src/components/settings/EmailTemplateAccordion.svelte index 7e69741d..83767c5c 100644 --- a/ui/src/components/settings/EmailTemplateAccordion.svelte +++ b/ui/src/components/settings/EmailTemplateAccordion.svelte @@ -71,7 +71,7 @@ {#if hasErrors} {/if} diff --git a/ui/src/scss/_form.scss b/ui/src/scss/_form.scss index dd4f85de..b682ff97 100644 --- a/ui/src/scss/_form.scss +++ b/ui/src/scss/_form.scss @@ -346,10 +346,6 @@ button { $thumbActiveColor: var(--baseAlt4Color) ); } - &:focus, - &.active { - border-color: var(--primaryColor); - } &[readonly], &.readonly { cursor: default; @@ -359,7 +355,6 @@ button { &.disabled { cursor: default; color: var(--txtDisabledColor); - border-color: var(--baseAlt2Color); } &.txt-mono { line-height: var(--smLineHeight); @@ -536,9 +531,6 @@ select { > label { color: var(--txtDisabledColor); } - label, %input { - border-color: var(--baseAlt2Color); - } &.required > label:after { opacity: 0.5; }